aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/lib
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 17:29:19 +1000
committerDavid Walter Seikel2013-01-13 17:29:19 +1000
commit07274513e984f0b5544586c74508ccd16e7dcafa (patch)
treeb32ff2a9136fbc1a4a6a0ed1e4d79cde0f5f16d9 /libraries/evas/src/lib
parentAdded Irrlicht 1.8, but without all the Windows binaries. (diff)
downloadSledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.zip
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.gz
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.bz2
SledjHamr-07274513e984f0b5544586c74508ccd16e7dcafa.tar.xz
Remove EFL, since it's been released now.
Diffstat (limited to '')
-rw-r--r--libraries/evas/src/lib/Evas.h12569
-rw-r--r--libraries/evas/src/lib/Evas_GL.h1438
-rw-r--r--libraries/evas/src/lib/Makefile.am260
-rw-r--r--libraries/evas/src/lib/Makefile.in1094
-rw-r--r--libraries/evas/src/lib/cache/Makefile.am26
-rw-r--r--libraries/evas/src/lib/cache/Makefile.in686
-rw-r--r--libraries/evas/src/lib/cache/evas_cache.h175
-rw-r--r--libraries/evas/src/lib/cache/evas_cache_engine_image.c703
-rw-r--r--libraries/evas/src/lib/cache/evas_cache_image.c1428
-rw-r--r--libraries/evas/src/lib/cache/evas_preload.c266
-rw-r--r--libraries/evas/src/lib/canvas/Makefile.am67
-rw-r--r--libraries/evas/src/lib/canvas/Makefile.in763
-rw-r--r--libraries/evas/src/lib/canvas/evas_async_events.c173
-rw-r--r--libraries/evas/src/lib/canvas/evas_callbacks.c543
-rw-r--r--libraries/evas/src/lib/canvas/evas_clip.c321
-rw-r--r--libraries/evas/src/lib/canvas/evas_data.c72
-rw-r--r--libraries/evas/src/lib/canvas/evas_events.c1867
-rw-r--r--libraries/evas/src/lib/canvas/evas_filter.c1427
-rw-r--r--libraries/evas/src/lib/canvas/evas_focus.c61
-rw-r--r--libraries/evas/src/lib/canvas/evas_font_dir.c1349
-rw-r--r--libraries/evas/src/lib/canvas/evas_gl.c272
-rw-r--r--libraries/evas/src/lib/canvas/evas_key.c245
-rw-r--r--libraries/evas/src/lib/canvas/evas_key_grab.c179
-rw-r--r--libraries/evas/src/lib/canvas/evas_layer.c193
-rw-r--r--libraries/evas/src/lib/canvas/evas_main.c710
-rw-r--r--libraries/evas/src/lib/canvas/evas_map.c1037
-rw-r--r--libraries/evas/src/lib/canvas/evas_name.c72
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_box.c2127
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_grid.c465
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_image.c3957
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_inform.c79
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_intercept.c585
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_line.c461
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_main.c1398
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_polygon.c554
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_rectangle.c387
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_smart.c951
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_smart_clipped.c183
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_table.c1373
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_text.c1943
-rw-r--r--libraries/evas/src/lib/canvas/evas_object_textblock.c10052
-rw-r--r--libraries/evas/src/lib/canvas/evas_rectangle.c98
-rw-r--r--libraries/evas/src/lib/canvas/evas_render.c1914
-rw-r--r--libraries/evas/src/lib/canvas/evas_smart.c266
-rw-r--r--libraries/evas/src/lib/canvas/evas_stack.c391
-rw-r--r--libraries/evas/src/lib/canvas/evas_stats.c185
-rw-r--r--libraries/evas/src/lib/canvas/evas_touch_point.c110
-rw-r--r--libraries/evas/src/lib/cserve/Makefile.am32
-rw-r--r--libraries/evas/src/lib/cserve/Makefile.in692
-rw-r--r--libraries/evas/src/lib/cserve/evas_cs.h285
-rw-r--r--libraries/evas/src/lib/cserve/evas_cs_client.c528
-rw-r--r--libraries/evas/src/lib/cserve/evas_cs_main.c9
-rw-r--r--libraries/evas/src/lib/cserve/evas_cs_mem.c168
-rw-r--r--libraries/evas/src/lib/cserve/evas_cs_server.c380
-rw-r--r--libraries/evas/src/lib/engines/Makefile.am16
-rw-r--r--libraries/evas/src/lib/engines/Makefile.in740
-rw-r--r--libraries/evas/src/lib/engines/common/Makefile.am118
-rw-r--r--libraries/evas/src/lib/engines/common/Makefile.in1009
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blend.h8
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blend_main.c325
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blend_private.h31
-rw-r--r--libraries/evas/src/lib/engines/common/evas_blit_main.c700
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_color.c246
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_color.h16
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_colorspace.c186
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_colorspace.h12
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_1.c6
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_1.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_4.c10
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_4.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_8.c78
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_gry_8.h12
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_grypal_6.c23
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_grypal_6.h6
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_main.c632
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_main.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_16.c2089
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_16.h50
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_24.c89
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_24.h10
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_32.c625
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_32.h24
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_8.c248
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_rgb_8.h14
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_yuv.c1258
-rw-r--r--libraries/evas/src/lib/engines/common/evas_convert_yuv.h9
-rw-r--r--libraries/evas/src/lib/engines/common/evas_cpu.c274
-rw-r--r--libraries/evas/src/lib/engines/common/evas_draw.h36
-rw-r--r--libraries/evas/src/lib/engines/common/evas_draw_main.c691
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font.h76
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_default_walk.x144
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_draw.c658
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_load.c925
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_main.c545
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_ot.c336
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_ot.h45
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_private.h52
-rw-r--r--libraries/evas/src/lib/engines/common/evas_font_query.c789
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image.h63
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_data.c151
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_load.c385
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_main.c889
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_private.h17
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_save.c51
-rw-r--r--libraries/evas/src/lib/engines/common/evas_image_scalecache.c844
-rw-r--r--libraries/evas/src/lib/engines/common/evas_line.h11
-rw-r--r--libraries/evas/src/lib/engines/common/evas_line_main.c1029
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image.c432
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image.h10
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image_core.c226
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image_internal.c117
-rw-r--r--libraries/evas/src/lib/engines/common/evas_map_image_loop.c116
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/Makefile.am13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/Makefile.in547
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_mask_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_color_i386.c29
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_.c37
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add/op_add_pixel_mask_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_add_main_.c541
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.am46
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/Makefile.in721
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_.c109
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_i386.c138
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_neon.c223
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_color_sse3.c167
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_.c185
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_i386.c251
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_neon.c562
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_mask_color_sse3.c321
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_master_sse3.c77
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_.c162
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_.c284
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_i386.c221
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_neon.c570
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_color_sse3.c543
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_i386.c217
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_.c189
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_i386.c157
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c129
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_sse3.c300
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_neon.c530
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_sse3.c315
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_blend_main_.c671
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.am18
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/Makefile.in552
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_.c138
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_i386.c150
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_color_neon.c212
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_.c170
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_i386.c193
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c170
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_.c117
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_.c236
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_i386.c255
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_color_neon.c238
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_i386.c131
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_.c150
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_i386.c176
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_mask_neon.c151
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_pixel_neon.c158
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_copy_main_.c675
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.am13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/Makefile.in547
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_.c49
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_color_i386.c58
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_.c63
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_mask_color_i386.c13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_.c48
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_.c100
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_color_i386.c13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_i386.c58
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_.c62
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask/op_mask_pixel_mask_i386.c13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mask_main_.c309
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.am13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/Makefile.in547
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_.c65
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_color_i386.c66
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_.c72
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_mask_color_i386.c92
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_.c56
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_.c122
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_color_i386.c120
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_i386.c66
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_.c117
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul/op_mul_pixel_mask_i386.c63
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_mul_main_.c308
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.am14
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/Makefile.in547
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_mask_color_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_color_i386.c29
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_.c37
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub/op_sub_pixel_mask_i386.c33
-rw-r--r--libraries/evas/src/lib/engines/common/evas_op_sub_main_.c542
-rw-r--r--libraries/evas/src/lib/engines/common/evas_pipe.c1733
-rw-r--r--libraries/evas/src/lib/engines/common/evas_pipe.h111
-rw-r--r--libraries/evas/src/lib/engines/common/evas_polygon.h13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_polygon_main.c325
-rw-r--r--libraries/evas/src/lib/engines/common/evas_rectangle.h11
-rw-r--r--libraries/evas/src/lib/engines/common/evas_rectangle_main.c91
-rw-r--r--libraries/evas/src/lib/engines/common/evas_regionbuf.c357
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_main.c6
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_main.h13
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_sample.c418
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth.c532
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth.h19
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler.c211
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_down.c43
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx.c259
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downx_downy.c387
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_downy.c260
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_noscale.c62
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_smooth_scaler_up.c266
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_span.c653
-rw-r--r--libraries/evas/src/lib/engines/common/evas_scale_span.h14
-rw-r--r--libraries/evas/src/lib/engines/common/evas_text_utils.c472
-rw-r--r--libraries/evas/src/lib/engines/common/evas_text_utils.h89
-rw-r--r--libraries/evas/src/lib/engines/common/evas_tiler.c1439
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_bidi_utils.c645
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_bidi_utils.h157
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_language_utils.c152
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_language_utils.h132
-rw-r--r--libraries/evas/src/lib/engines/common/language/evas_script_table.h3087
-rw-r--r--libraries/evas/src/lib/engines/common_16/Makefile.am32
-rw-r--r--libraries/evas/src/lib/engines/common_16/Makefile.in702
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_dither_mask.c293
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_font.c295
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_image_scaled_sampled.c471
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_image_unscaled.c287
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_line.c444
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_main.c594
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_point_blend.c149
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_polygon.c231
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_rectangle.c121
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_blend.c353
-rw-r--r--libraries/evas/src/lib/engines/common_16/evas_soft16_scanline_fill.c86
-rw-r--r--libraries/evas/src/lib/engines/common_8/Makefile.am32
-rw-r--r--libraries/evas/src/lib/engines/common_8/Makefile.in700
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_dither_mask.c100
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_font.c285
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_image_scaled_sampled.c463
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_image_unscaled.c284
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_line.c426
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_main.c656
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_polygon.c230
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_rectangle.c125
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_blend.c447
-rw-r--r--libraries/evas/src/lib/engines/common_8/evas_soft8_scanline_fill.c53
-rw-r--r--libraries/evas/src/lib/file/Makefile.am22
-rw-r--r--libraries/evas/src/lib/file/Makefile.in682
-rw-r--r--libraries/evas/src/lib/file/evas_module.c582
-rw-r--r--libraries/evas/src/lib/file/evas_module.h94
-rw-r--r--libraries/evas/src/lib/file/evas_path.c152
-rw-r--r--libraries/evas/src/lib/file/evas_path.h15
-rw-r--r--libraries/evas/src/lib/include/Makefile.am13
-rw-r--r--libraries/evas/src/lib/include/Makefile.in546
-rw-r--r--libraries/evas/src/lib/include/evas_blend_ops.h378
-rw-r--r--libraries/evas/src/lib/include/evas_common.h1258
-rw-r--r--libraries/evas/src/lib/include/evas_common_soft16.h100
-rw-r--r--libraries/evas/src/lib/include/evas_common_soft8.h184
-rw-r--r--libraries/evas/src/lib/include/evas_inline.x259
-rw-r--r--libraries/evas/src/lib/include/evas_macros.h217
-rw-r--r--libraries/evas/src/lib/include/evas_mmx.h735
-rw-r--r--libraries/evas/src/lib/include/evas_options.h69
-rw-r--r--libraries/evas/src/lib/include/evas_private.h1122
-rw-r--r--libraries/evas/src/lib/main.c150
278 files changed, 0 insertions, 118387 deletions
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 @@
1/**
2@mainpage Evas
3
4@version 1.1
5@date 2000-2012
6
7Please see the @ref authors page for contact details.
8@link Evas.h Evas API @endlink
9
10@link Evas.h Evas API @endlink
11
12@section toc Table of Contents
13
14@li @ref intro
15@li @ref work
16@li @ref compiling
17@li @ref install
18@li @ref next_steps
19@li @ref intro_example
20
21
22@section intro What is Evas?
23
24Evas is a clean display canvas API for several target display systems
25that can draw anti-aliased text, smooth super and sub-sampled scaled
26images, alpha-blend objects and much more.
27
28It abstracts any need to know much about what the characteristics of
29your display system are or what graphics calls are used to draw them
30and how. It deals on an object level where all you do is create and
31manipulate objects in a canvas, set their properties, and the rest is
32done for you.
33
34Evas optimises the rendering pipeline to minimise effort in redrawing
35changes made to the canvas and so takes this work out of the
36programmers hand, saving a lot of time and energy.
37
38It's small and lean, designed to work on embedded systems all the way
39to large and powerful multi-cpu workstations. It can be compiled to
40only have the features you need for your target platform if you so
41wish, thus keeping it small and lean. It has several display
42back-ends, letting it display on several display systems, making it
43portable for cross-device and cross-platform development.
44
45@subsection intro_not_evas What Evas is not?
46
47Evas is not a widget set or widget toolkit, however it is their
48base. See Elementary (http://docs.enlightenment.org/auto/elementary/)
49for a toolkit based on Evas, Edje, Ecore and other Enlightenment
50technologies.
51
52It is not dependent or aware of main loops, input or output
53systems. Input should be polled from various sources and fed to
54Evas. Similarly, it will not create windows or report windows updates
55to your system, rather just drawing the pixels and reporting to the
56user the areas that were changed. Of course these operations are quite
57common and thus they are ready to use in Ecore, particularly in
58Ecore_Evas (http://docs.enlightenment.org/auto/ecore/).
59
60
61@section work How does Evas work?
62
63Evas is a canvas display library. This is markedly different from most
64display and windowing systems as a canvas is structural and is also a
65state engine, whereas most display and windowing systems are immediate
66mode display targets. Evas handles the logic between a structural
67display via its state engine, and controls the target windowing system
68in order to produce rendered results of the current canvas' state on
69the display.
70
71Immediate mode display systems retain very little, or no state. A
72program will execute a series of commands, as in the pseudo code:
73
74@verbatim
75draw line from position (0, 0) to position (100, 200);
76
77draw rectangle from position (10, 30) to position (50, 500);
78
79bitmap_handle = create_bitmap();
80scale bitmap_handle to size 100 x 100;
81draw image bitmap_handle at position (10, 30);
82@endverbatim
83
84The series of commands is executed by the windowing system and the
85results are displayed on the screen (normally). Once the commands are
86executed the display system has little or no idea of how to reproduce
87this image again, and so has to be instructed by the application how
88to redraw sections of the screen whenever needed. Each successive
89command will be executed as instructed by the application and either
90emulated by software or sent to the graphics hardware on the device to
91be performed.
92
93The advantage of such a system is that it is simple, and gives a
94program tight control over how something looks and is drawn. Given the
95increasing complexity of displays and demands by users to have better
96looking interfaces, more and more work is needing to be done at this
97level by the internals of widget sets, custom display widgets and
98other programs. This means more and more logic and display rendering
99code needs to be written time and time again, each time the
100application needs to figure out how to minimise redraws so that
101display is fast and interactive, and keep track of redraw logic. The
102power comes at a high-price, lots of extra code and work. Programmers
103not very familiar with graphics programming will often make mistakes
104at this level and produce code that is sub optimal. Those familiar
105with this kind of programming will simply get bored by writing the
106same code again and again.
107
108For example, if in the above scene, the windowing system requires the
109application to redraw the area from 0, 0 to 50, 50 (also referred as
110"expose event"), then the programmer must calculate manually the
111updates and repaint it again:
112
113@verbatim
114Redraw from position (0, 0) to position (50, 50):
115
116// what was in area (0, 0, 50, 50)?
117
118// 1. intersection part of line (0, 0) to (100, 200)?
119 draw line from position (0, 0) to position (25, 50);
120
121// 2. intersection part of rectangle (10, 30) to (50, 500)?
122 draw rectangle from position (10, 30) to position (50, 50)
123
124// 3. intersection part of image at (10, 30), size 100 x 100?
125 bitmap_subimage = subregion from position (0, 0) to position (40, 20)
126 draw image bitmap_subimage at position (10, 30);
127@endverbatim
128
129The clever reader might have noticed that, if all elements in the
130above scene are opaque, then the system is doing useless paints: part
131of the line is behind the rectangle, and part of the rectangle is
132behind the image. These useless paints tend to be very costly, as
133pixels tend to be 4 bytes in size, thus an overlapping region of 100 x
134100 pixels is around 40000 useless writes! The developer could write
135code to calculate the overlapping areas and avoid painting then, but
136then it should be mixed with the "expose event" handling mentioned
137above and quickly one realizes the initially simpler method became
138really complex.
139
140Evas is a structural system in which the programmer creates and
141manages display objects and their properties, and as a result of this
142higher level state management, the canvas is able to redraw the set of
143objects when needed to represent the current state of the canvas.
144
145For example, the pseudo code:
146
147@verbatim
148line_handle = create_line();
149set line_handle from position (0, 0) to position (100, 200);
150show line_handle;
151
152rectangle_handle = create_rectangle();
153move rectangle_handle to position (10, 30);
154resize rectangle_handle to size 40 x 470;
155show rectangle_handle;
156
157bitmap_handle = create_bitmap();
158scale bitmap_handle to size 100 x 100;
159move bitmap_handle to position (10, 30);
160show bitmap_handle;
161
162render scene;
163@endverbatim
164
165This may look longer, but when the display needs to be refreshed or
166updated, the programmer only moves, resizes, shows, hides etc. the
167objects that need to change. The programmer simply thinks at the
168object logic level, and the canvas software does the rest of the work
169for them, figuring out what actually changed in the canvas since it
170was last drawn, how to most efficiently redraw the canvas and its
171contents to reflect the current state, and then it can go off and do
172the actual drawing of the canvas.
173
174This lets the programmer think in a more natural way when dealing with
175a display, and saves time and effort of working out how to load and
176display images, render given the current display system etc. Since
177Evas also is portable across different display systems, this also
178gives the programmer the ability to have their code ported and
179displayed on different display systems with very little work.
180
181Evas can be seen as a display system that stands somewhere between a
182widget set and an immediate mode display system. It retains basic
183display logic, but does very little high-level logic such as
184scrollbars, sliders, push buttons etc.
185
186
187@section compiling How to compile using Evas ?
188
189Evas is a library your application links to. The procedure for this is
190very simple. You simply have to compile your application with the
191appropriate compiler flags that the @c pkg-config script outputs. For
192example:
193
194Compiling C or C++ files into object files:
195
196@verbatim
197gcc -c -o main.o main.c `pkg-config --cflags evas`
198@endverbatim
199
200Linking object files into a binary executable:
201
202@verbatim
203gcc -o my_application main.o `pkg-config --libs evas`
204@endverbatim
205
206You simply have to make sure that @c pkg-config is in your shell's @c
207PATH (see the manual page for your appropriate shell) and @c evas.pc
208in @c /usr/lib/pkgconfig or its path in the @c PKG_CONFIG_PATH
209environment variable. It's that simple to link and use Evas once you
210have written your code to use it.
211
212Since the program is linked to Evas, it is now able to use any
213advertised API calls to display graphics in a canvas managed by it, as
214well as use the API calls provided to manage data.
215
216You should make sure you add any extra compile and link flags to your
217compile commands that your application may need as well. The above
218example is only guaranteed to make Evas add it's own requirements.
219
220
221@section install How is it installed?
222
223Simple:
224
225@verbatim
226./configure
227make
228su -
229...
230make install
231@endverbatim
232
233@section next_steps Next Steps
234
235After you understood what Evas is and installed it in your system you
236should proceed understanding the programming interface for all
237objects, then see the specific for the most used elements. We'd
238recommend you to take a while to learn Ecore
239(http://docs.enlightenment.org/auto/ecore/) and Edje
240(http://docs.enlightenment.org/auto/edje/) as they will likely save
241you tons of work compared to using just Evas directly.
242
243Recommended reading:
244
245@li @ref Evas_Object_Group, where you'll get how to basically
246 manipulate generic objects lying on an Evas canvas, handle canvas
247 and object events, etc.
248@li @ref Evas_Object_Rectangle, to learn about the most basic object
249 type on Evas -- the rectangle.
250@li @ref Evas_Object_Polygon, to learn how to create polygon elements
251 on the canvas.
252@li @ref Evas_Line_Group, to learn how to create line elements on the
253 canvas.
254@li @ref Evas_Object_Image, to learn about image objects, over which
255 Evas can do a plethora of operations.
256@li @ref Evas_Object_Text, to learn how to create textual elements on
257 the canvas.
258@li @ref Evas_Object_Textblock, to learn how to create multiline
259 textual elements on the canvas.
260@li @ref Evas_Smart_Object_Group and @ref Evas_Smart_Group, to define
261 new objects that provide @b custom functions to handle clipping,
262 hiding, moving, resizing, color setting and more. These could
263 be as simple as a group of objects that move together (see @ref
264 Evas_Smart_Object_Clipped) up to implementations of what
265 ends to be a widget, providing some intelligence (thus the name)
266 to Evas objects -- like a button or check box, for example.
267
268@section intro_example Introductory Example
269
270@include evas-buffer-simple.c
271*/
272
273/**
274@page authors Authors
275@author Carsten Haitzler <raster@@rasterman.com>
276@author Till Adam <till@@adam-lilienthal.de>
277@author Steve Ireland <sireland@@pobox.com>
278@author Brett Nash <nash@@nash.id.au>
279@author Tilman Sauerbeck <tilman@@code-monkey.de>
280@author Corey Donohoe <atmos@@atmos.org>
281@author Yuri Hudobin <glassy_ape@@users.sourceforge.net>
282@author Nathan Ingersoll <ningerso@@d.umn.edu>
283@author Willem Monsuwe <willem@@stack.nl>
284@author Jose O Gonzalez <jose_ogp@@juno.com>
285@author Bernhard Nemec <Bernhard.Nemec@@viasyshc.com>
286@author Jorge Luis Zapata Muga <jorgeluis.zapata@@gmail.com>
287@author Cedric Bail <cedric.bail@@free.fr>
288@author Gustavo Sverzut Barbieri <barbieri@@profusion.mobi>
289@author Vincent Torri <vtorri@@univ-evry.fr>
290@author Tim Horton <hortont424@@gmail.com>
291@author Tom Hacohen <tom@@stosb.com>
292@author Mathieu Taillefumier <mathieu.taillefumier@@free.fr>
293@author Iván Briano <ivan@@profusion.mobi>
294@author Gustavo Lima Chaves <glima@@profusion.mobi>
295@author Samsung Electronics <tbd>
296@author Samsung SAIT <tbd>
297@author Sung W. Park <sungwoo@@gmail.com>
298@author Jiyoun Park <jy0703.park@@samsung.com>
299@author Myoungwoon Roy Kim(roy_kim) <myoungwoon.kim@@samsung.com> <myoungwoon@@gmail.com>
300@author Thierry el Borgi <thierry@@substantiel.fr>
301@author ChunEon Park <hermet@@hermet.pe.kr>
302@author Christopher 'devilhorns' Michael <cpmichael1@comcast.net>
303@author Seungsoo Woo <om101.woo@samsung.com>
304
305Please contact <enlightenment-devel@lists.sourceforge.net> to get in
306contact with the developers and maintainers.
307*/
308
309#ifndef _EVAS_H
310#define _EVAS_H
311
312#include <time.h>
313
314#include <Eina.h>
315
316#ifdef EAPI
317# undef EAPI
318#endif
319
320#ifdef _WIN32
321# ifdef EFL_EVAS_BUILD
322# ifdef DLL_EXPORT
323# define EAPI __declspec(dllexport)
324# else
325# define EAPI
326# endif /* ! DLL_EXPORT */
327# else
328# define EAPI __declspec(dllimport)
329# endif /* ! EFL_EVAS_BUILD */
330#else
331# ifdef __GNUC__
332# if __GNUC__ >= 4
333# define EAPI __attribute__ ((visibility("default")))
334# else
335# define EAPI
336# endif
337# else
338# define EAPI
339# endif
340#endif /* ! _WIN32 */
341
342#ifdef __cplusplus
343extern "C" {
344#endif
345
346#define EVAS_VERSION_MAJOR 1
347#define EVAS_VERSION_MINOR 2
348
349typedef struct _Evas_Version
350{
351 int major;
352 int minor;
353 int micro;
354 int revision;
355} Evas_Version;
356
357EAPI extern Evas_Version *evas_version;
358
359/**
360 * @file
361 * @brief These routines are used for Evas library interaction.
362 *
363 * @todo check boolean return values and convert to Eina_Bool
364 * @todo change all api to use EINA_SAFETY_*
365 * @todo finish api documentation
366 */
367
368/* BiDi exposed stuff */
369 /*FIXME: document */
370typedef enum _Evas_BiDi_Direction
371{
372 EVAS_BIDI_DIRECTION_NATURAL,
373 EVAS_BIDI_DIRECTION_NEUTRAL = EVAS_BIDI_DIRECTION_NATURAL,
374 EVAS_BIDI_DIRECTION_LTR,
375 EVAS_BIDI_DIRECTION_RTL
376} Evas_BiDi_Direction;
377
378/**
379 * Identifier of callbacks to be set for Evas canvases or Evas
380 * objects.
381 *
382 * The following figure illustrates some Evas callbacks:
383 *
384 * @image html evas-callbacks.png
385 * @image rtf evas-callbacks.png
386 * @image latex evas-callbacks.eps
387 *
388 * @see evas_object_event_callback_add()
389 * @see evas_event_callback_add()
390 */
391typedef enum _Evas_Callback_Type
392{
393 /*
394 * The following events are only for use with Evas objects, with
395 * evas_object_event_callback_add():
396 */
397 EVAS_CALLBACK_MOUSE_IN, /**< Mouse In Event */
398 EVAS_CALLBACK_MOUSE_OUT, /**< Mouse Out Event */
399 EVAS_CALLBACK_MOUSE_DOWN, /**< Mouse Button Down Event */
400 EVAS_CALLBACK_MOUSE_UP, /**< Mouse Button Up Event */
401 EVAS_CALLBACK_MOUSE_MOVE, /**< Mouse Move Event */
402 EVAS_CALLBACK_MOUSE_WHEEL, /**< Mouse Wheel Event */
403 EVAS_CALLBACK_MULTI_DOWN, /**< Multi-touch Down Event */
404 EVAS_CALLBACK_MULTI_UP, /**< Multi-touch Up Event */
405 EVAS_CALLBACK_MULTI_MOVE, /**< Multi-touch Move Event */
406 EVAS_CALLBACK_FREE, /**< Object Being Freed (Called after Del) */
407 EVAS_CALLBACK_KEY_DOWN, /**< Key Press Event */
408 EVAS_CALLBACK_KEY_UP, /**< Key Release Event */
409 EVAS_CALLBACK_FOCUS_IN, /**< Focus In Event */
410 EVAS_CALLBACK_FOCUS_OUT, /**< Focus Out Event */
411 EVAS_CALLBACK_SHOW, /**< Show Event */
412 EVAS_CALLBACK_HIDE, /**< Hide Event */
413 EVAS_CALLBACK_MOVE, /**< Move Event */
414 EVAS_CALLBACK_RESIZE, /**< Resize Event */
415 EVAS_CALLBACK_RESTACK, /**< Restack Event */
416 EVAS_CALLBACK_DEL, /**< Object Being Deleted (called before Free) */
417 EVAS_CALLBACK_HOLD, /**< Events go on/off hold */
418 EVAS_CALLBACK_CHANGED_SIZE_HINTS, /**< Size hints changed event */
419 EVAS_CALLBACK_IMAGE_PRELOADED, /**< Image has been preloaded */
420
421 /*
422 * The following events are only for use with Evas canvases, with
423 * evas_event_callback_add():
424 */
425 EVAS_CALLBACK_CANVAS_FOCUS_IN, /**< Canvas got focus as a whole */
426 EVAS_CALLBACK_CANVAS_FOCUS_OUT, /**< Canvas lost focus as a whole */
427 EVAS_CALLBACK_RENDER_FLUSH_PRE, /**< Called just before rendering is updated on the canvas target */
428 EVAS_CALLBACK_RENDER_FLUSH_POST, /**< Called just after rendering is updated on the canvas target */
429 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, /**< Canvas object got focus */
430 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, /**< Canvas object lost focus */
431
432 /*
433 * More Evas object event types - see evas_object_event_callback_add():
434 */
435 EVAS_CALLBACK_IMAGE_UNLOADED, /**< Image data has been unloaded (by some mechanims in Evas that throw out original image data) */
436
437 EVAS_CALLBACK_RENDER_PRE, /**< Called just before rendering starts on the canvas target @since 1.2 */
438 EVAS_CALLBACK_RENDER_POST, /**< Called just after rendering stops on the canvas target @since 1.2 */
439
440 EVAS_CALLBACK_LAST /**< kept as last element/sentinel -- not really an event */
441} Evas_Callback_Type; /**< The types of events triggering a callback */
442
443/**
444 * @def EVAS_CALLBACK_PRIORITY_BEFORE
445 * Slightly more prioritized than default.
446 * @since 1.1.0
447 */
448#define EVAS_CALLBACK_PRIORITY_BEFORE -100
449/**
450 * @def EVAS_CALLBACK_PRIORITY_DEFAULT
451 * Default callback priority level
452 * @since 1.1.0
453 */
454#define EVAS_CALLBACK_PRIORITY_DEFAULT 0
455/**
456 * @def EVAS_CALLBACK_PRIORITY_AFTER
457 * Slightly less prioritized than default.
458 * @since 1.1.0
459 */
460#define EVAS_CALLBACK_PRIORITY_AFTER 100
461
462/**
463 * @typedef Evas_Callback_Priority
464 *
465 * Callback priority value. Range is -32k - 32k. The lower the number, the
466 * bigger the priority.
467 *
468 * @see EVAS_CALLBACK_PRIORITY_AFTER
469 * @see EVAS_CALLBACK_PRIORITY_BEFORE
470 * @see EVAS_CALLBACK_PRIORITY_DEFAULT
471 *
472 * @since 1.1.0
473 */
474typedef short Evas_Callback_Priority;
475
476/**
477 * Flags for Mouse Button events
478 */
479typedef enum _Evas_Button_Flags
480{
481 EVAS_BUTTON_NONE = 0, /**< No extra mouse button data */
482 EVAS_BUTTON_DOUBLE_CLICK = (1 << 0), /**< This mouse button press was the 2nd press of a double click */
483 EVAS_BUTTON_TRIPLE_CLICK = (1 << 1) /**< This mouse button press was the 3rd press of a triple click */
484} Evas_Button_Flags; /**< Flags for Mouse Button events */
485
486/**
487 * Flags for Events
488 */
489typedef enum _Evas_Event_Flags
490{
491 EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */
492 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 */
493 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 */
494} Evas_Event_Flags; /**< Flags for Events */
495
496/**
497 * State of Evas_Coord_Touch_Point
498 */
499typedef enum _Evas_Touch_Point_State
500{
501 EVAS_TOUCH_POINT_DOWN, /**< Touch point is pressed down */
502 EVAS_TOUCH_POINT_UP, /**< Touch point is released */
503 EVAS_TOUCH_POINT_MOVE, /**< Touch point is moved */
504 EVAS_TOUCH_POINT_STILL, /**< Touch point is not moved after pressed */
505 EVAS_TOUCH_POINT_CANCEL /**< Touch point is cancelled */
506} Evas_Touch_Point_State;
507
508/**
509 * Flags for Font Hinting
510 * @ingroup Evas_Font_Group
511 */
512typedef enum _Evas_Font_Hinting_Flags
513{
514 EVAS_FONT_HINTING_NONE, /**< No font hinting */
515 EVAS_FONT_HINTING_AUTO, /**< Automatic font hinting */
516 EVAS_FONT_HINTING_BYTECODE /**< Bytecode font hinting */
517} Evas_Font_Hinting_Flags; /**< Flags for Font Hinting */
518
519/**
520 * Colorspaces for pixel data supported by Evas
521 * @ingroup Evas_Object_Image
522 */
523typedef enum _Evas_Colorspace
524{
525 EVAS_COLORSPACE_ARGB8888, /**< ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */
526 /* these are not currently supported - but planned for the future */
527 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 */
528 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 */
529 EVAS_COLORSPACE_RGB565_A5P, /**< 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */
530 EVAS_COLORSPACE_GRY8, /**< 8bit grayscale */
531 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 */
532 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. */
533 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. */
534} Evas_Colorspace; /**< Colorspaces for pixel data supported by Evas */
535
536/**
537 * How to pack items into cells in a table.
538 * @ingroup Evas_Object_Table
539 *
540 * @see evas_object_table_homogeneous_set() for an explanation of the function of
541 * each one.
542 */
543typedef enum _Evas_Object_Table_Homogeneous_Mode
544{
545 EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE = 0,
546 EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE = 1,
547 EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM = 2
548} Evas_Object_Table_Homogeneous_Mode; /**< Table cell pack mode. */
549
550typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */
551typedef struct _Evas_Point Evas_Point; /**< integer point */
552
553typedef struct _Evas_Coord_Point Evas_Coord_Point; /**< Evas_Coord point */
554typedef struct _Evas_Coord_Precision_Point Evas_Coord_Precision_Point; /**< Evas_Coord point with sub-pixel precision */
555
556typedef struct _Evas_Position Evas_Position; /**< associates given point in Canvas and Output */
557typedef struct _Evas_Precision_Position Evas_Precision_Position; /**< associates given point in Canvas and Output, with sub-pixel precision */
558
559/**
560 * @typedef Evas_Smart_Class
561 *
562 * A smart object's @b base class definition
563 *
564 * @ingroup Evas_Smart_Group
565 */
566typedef struct _Evas_Smart_Class Evas_Smart_Class;
567
568/**
569 * @typedef Evas_Smart_Cb_Description
570 *
571 * A smart object callback description, used to provide introspection
572 *
573 * @ingroup Evas_Smart_Group
574 */
575typedef struct _Evas_Smart_Cb_Description Evas_Smart_Cb_Description;
576
577/**
578 * @typedef Evas_Map
579 *
580 * An opaque handle to map points
581 *
582 * @see evas_map_new()
583 * @see evas_map_free()
584 * @see evas_map_dup()
585 *
586 * @ingroup Evas_Object_Group_Map
587 */
588typedef struct _Evas_Map Evas_Map;
589
590/**
591 * @typedef Evas
592 *
593 * An opaque handle to an Evas canvas.
594 *
595 * @see evas_new()
596 * @see evas_free()
597 *
598 * @ingroup Evas_Canvas
599 */
600typedef struct _Evas Evas;
601
602/**
603 * @typedef Evas_Object
604 * An Evas Object handle.
605 * @ingroup Evas_Object_Group
606 */
607typedef struct _Evas_Object Evas_Object;
608
609typedef void Evas_Performance; /**< An Evas Performance handle */
610typedef struct _Evas_Modifier Evas_Modifier; /**< An opaque type containing information on which modifier keys are registered in an Evas canvas */
611typedef struct _Evas_Lock Evas_Lock; /**< An opaque type containing information on which lock keys are registered in an Evas canvas */
612typedef struct _Evas_Smart Evas_Smart; /**< An Evas Smart Object handle */
613typedef struct _Evas_Native_Surface Evas_Native_Surface; /**< A generic datatype for engine specific native surface information */
614
615 /**
616 * @typedef Evas_Video_Surface
617 *
618 * A generic datatype for video specific surface information
619 * @see evas_object_image_video_surface_set
620 * @see evas_object_image_video_surface_get
621 * @since 1.1.0
622 */
623typedef struct _Evas_Video_Surface Evas_Video_Surface;
624
625typedef unsigned long long Evas_Modifier_Mask; /**< An Evas modifier mask type */
626
627typedef int Evas_Coord;
628typedef int Evas_Font_Size;
629typedef int Evas_Angle;
630
631struct _Evas_Coord_Rectangle /**< A rectangle in Evas_Coord */
632{
633 Evas_Coord x; /**< top-left x co-ordinate of rectangle */
634 Evas_Coord y; /**< top-left y co-ordinate of rectangle */
635 Evas_Coord w; /**< width of rectangle */
636 Evas_Coord h; /**< height of rectangle */
637};
638
639struct _Evas_Point
640{
641 int x, y;
642};
643
644struct _Evas_Coord_Point
645{
646 Evas_Coord x, y;
647};
648
649struct _Evas_Coord_Precision_Point
650{
651 Evas_Coord x, y;
652 double xsub, ysub;
653};
654
655struct _Evas_Position
656{
657 Evas_Point output;
658 Evas_Coord_Point canvas;
659};
660
661struct _Evas_Precision_Position
662{
663 Evas_Point output;
664 Evas_Coord_Precision_Point canvas;
665};
666
667typedef enum _Evas_Aspect_Control
668{
669 EVAS_ASPECT_CONTROL_NONE = 0, /**< Preference on scaling unset */
670 EVAS_ASPECT_CONTROL_NEITHER = 1, /**< Same effect as unset preference on scaling */
671 EVAS_ASPECT_CONTROL_HORIZONTAL = 2, /**< Use all horizontal container space to place an object, using the given aspect */
672 EVAS_ASPECT_CONTROL_VERTICAL = 3, /**< Use all vertical container space to place an object, using the given aspect */
673 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 */
674} Evas_Aspect_Control; /**< Aspect types/policies for scaling size hints, used for evas_object_size_hint_aspect_set() */
675
676typedef struct _Evas_Pixel_Import_Source Evas_Pixel_Import_Source; /**< A source description of pixels for importing pixels */
677typedef struct _Evas_Engine_Info Evas_Engine_Info; /**< A generic Evas Engine information structure */
678typedef struct _Evas_Device Evas_Device; /**< A source device handle - where the event came from */
679typedef struct _Evas_Event_Mouse_Down Evas_Event_Mouse_Down; /**< Event structure for #EVAS_CALLBACK_MOUSE_DOWN event callbacks */
680typedef struct _Evas_Event_Mouse_Up Evas_Event_Mouse_Up; /**< Event structure for #EVAS_CALLBACK_MOUSE_UP event callbacks */
681typedef struct _Evas_Event_Mouse_In Evas_Event_Mouse_In; /**< Event structure for #EVAS_CALLBACK_MOUSE_IN event callbacks */
682typedef struct _Evas_Event_Mouse_Out Evas_Event_Mouse_Out; /**< Event structure for #EVAS_CALLBACK_MOUSE_OUT event callbacks */
683typedef struct _Evas_Event_Mouse_Move Evas_Event_Mouse_Move; /**< Event structure for #EVAS_CALLBACK_MOUSE_MOVE event callbacks */
684typedef struct _Evas_Event_Mouse_Wheel Evas_Event_Mouse_Wheel; /**< Event structure for #EVAS_CALLBACK_MOUSE_WHEEL event callbacks */
685typedef struct _Evas_Event_Multi_Down Evas_Event_Multi_Down; /**< Event structure for #EVAS_CALLBACK_MULTI_DOWN event callbacks */
686typedef struct _Evas_Event_Multi_Up Evas_Event_Multi_Up; /**< Event structure for #EVAS_CALLBACK_MULTI_UP event callbacks */
687typedef struct _Evas_Event_Multi_Move Evas_Event_Multi_Move; /**< Event structure for #EVAS_CALLBACK_MULTI_MOVE event callbacks */
688typedef struct _Evas_Event_Key_Down Evas_Event_Key_Down; /**< Event structure for #EVAS_CALLBACK_KEY_DOWN event callbacks */
689typedef struct _Evas_Event_Key_Up Evas_Event_Key_Up; /**< Event structure for #EVAS_CALLBACK_KEY_UP event callbacks */
690typedef struct _Evas_Event_Hold Evas_Event_Hold; /**< Event structure for #EVAS_CALLBACK_HOLD event callbacks */
691
692typedef enum _Evas_Load_Error
693{
694 EVAS_LOAD_ERROR_NONE = 0, /**< No error on load */
695 EVAS_LOAD_ERROR_GENERIC = 1, /**< A non-specific error occurred */
696 EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2, /**< File (or file path) does not exist */
697 EVAS_LOAD_ERROR_PERMISSION_DENIED = 3, /**< Permission denied to an existing file (or path) */
698 EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4, /**< Allocation of resources failure prevented load */
699 EVAS_LOAD_ERROR_CORRUPT_FILE = 5, /**< File corrupt (but was detected as a known format) */
700 EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6 /**< File is not a known format */
701} Evas_Load_Error; /**< Evas image load error codes one can get - see evas_load_error_str() too. */
702
703
704typedef enum _Evas_Alloc_Error
705{
706 EVAS_ALLOC_ERROR_NONE = 0, /**< No allocation error */
707 EVAS_ALLOC_ERROR_FATAL = 1, /**< Allocation failed despite attempts to free up memory */
708 EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */
709} Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */
710
711typedef enum _Evas_Fill_Spread
712{
713 EVAS_TEXTURE_REFLECT = 0, /**< image fill tiling mode - tiling reflects */
714 EVAS_TEXTURE_REPEAT = 1, /**< tiling repeats */
715 EVAS_TEXTURE_RESTRICT = 2, /**< tiling clamps - range offset ignored */
716 EVAS_TEXTURE_RESTRICT_REFLECT = 3, /**< tiling clamps and any range offset reflects */
717 EVAS_TEXTURE_RESTRICT_REPEAT = 4, /**< tiling clamps and any range offset repeats */
718 EVAS_TEXTURE_PAD = 5 /**< tiling extends with end values */
719} Evas_Fill_Spread; /**< Fill types used for evas_object_image_fill_spread_set() */
720
721typedef enum _Evas_Pixel_Import_Pixel_Format
722{
723 EVAS_PIXEL_FORMAT_NONE = 0, /**< No pixel format */
724 EVAS_PIXEL_FORMAT_ARGB32 = 1, /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */
725 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 */
726} Evas_Pixel_Import_Pixel_Format; /**< Pixel format for import call. See evas_object_image_pixels_import() */
727
728struct _Evas_Pixel_Import_Source
729{
730 Evas_Pixel_Import_Pixel_Format format; /**< pixel format type ie ARGB32, YUV420P_601 etc. */
731 int w, h; /**< width and height of source in pixels */
732 void **rows; /**< an array of pointers (size depends on format) pointing to left edge of each scanline */
733};
734
735/* magic version number to know what the native surf struct looks like */
736#define EVAS_NATIVE_SURFACE_VERSION 2
737
738typedef enum _Evas_Native_Surface_Type
739{
740 EVAS_NATIVE_SURFACE_NONE,
741 EVAS_NATIVE_SURFACE_X11,
742 EVAS_NATIVE_SURFACE_OPENGL
743} Evas_Native_Surface_Type;
744
745struct _Evas_Native_Surface
746{
747 int version;
748 Evas_Native_Surface_Type type;
749 union {
750 struct {
751 void *visual; /**< visual of the pixmap to use (Visual) */
752 unsigned long pixmap; /**< pixmap id to use (Pixmap) */
753 } x11;
754 struct {
755 unsigned int texture_id; /**< opengl texture id to use from glGenTextures() */
756 unsigned int framebuffer_id; /**< 0 if not a FBO, FBO id otherwise from glGenFramebuffers() */
757 unsigned int internal_format; /**< same as 'internalFormat' for glTexImage2D() */
758 unsigned int format; /**< same as 'format' for glTexImage2D() */
759 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) */
760 } opengl;
761 } data;
762};
763
764/**
765 * @def EVAS_VIDEO_SURFACE_VERSION
766 * Magic version number to know what the video surf struct looks like
767 * @since 1.1.0
768 */
769#define EVAS_VIDEO_SURFACE_VERSION 1
770
771typedef void (*Evas_Video_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface);
772typedef void (*Evas_Video_Coord_Cb)(void *data, Evas_Object *obj, const Evas_Video_Surface *surface, Evas_Coord a, Evas_Coord b);
773
774struct _Evas_Video_Surface
775{
776 int version;
777
778 Evas_Video_Coord_Cb move; /**< Move the video surface to this position */
779 Evas_Video_Coord_Cb resize; /**< Resize the video surface to that size */
780 Evas_Video_Cb show; /**< Show the video overlay surface */
781 Evas_Video_Cb hide; /**< Hide the video overlay surface */
782 Evas_Video_Cb update_pixels; /**< Please update the Evas_Object_Image pixels when called */
783
784 Evas_Object *parent;
785 void *data;
786};
787
788#define EVAS_LAYER_MIN -32768 /**< bottom-most layer number */
789#define EVAS_LAYER_MAX 32767 /**< top-most layer number */
790
791#define EVAS_COLOR_SPACE_ARGB 0 /**< Not used for anything */
792#define EVAS_COLOR_SPACE_AHSV 1 /**< Not used for anything */
793#define EVAS_TEXT_INVALID -1 /**< Not used for anything */
794#define EVAS_TEXT_SPECIAL -2 /**< Not used for anything */
795
796#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() */
797#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() */
798#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) */
799#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) */
800#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 */
801#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 */
802
803/**
804 * How the object should be rendered to output.
805 * @ingroup Evas_Object_Group_Extras
806 */
807typedef enum _Evas_Render_Op
808{
809 EVAS_RENDER_BLEND = 0, /**< default op: d = d*(1-sa) + s */
810 EVAS_RENDER_BLEND_REL = 1, /**< d = d*(1 - sa) + s*da */
811 EVAS_RENDER_COPY = 2, /**< d = s */
812 EVAS_RENDER_COPY_REL = 3, /**< d = s*da */
813 EVAS_RENDER_ADD = 4, /* d = d + s */
814 EVAS_RENDER_ADD_REL = 5, /**< d = d + s*da */
815 EVAS_RENDER_SUB = 6, /**< d = d - s */
816 EVAS_RENDER_SUB_REL = 7, /* d = d - s*da */
817 EVAS_RENDER_TINT = 8, /**< d = d*s + d*(1 - sa) + s*(1 - da) */
818 EVAS_RENDER_TINT_REL = 9, /**< d = d*(1 - sa + s) */
819 EVAS_RENDER_MASK = 10, /**< d = d*sa */
820 EVAS_RENDER_MUL = 11 /**< d = d*s */
821} Evas_Render_Op; /**< How the object should be rendered to output. */
822
823typedef enum _Evas_Border_Fill_Mode
824{
825 EVAS_BORDER_FILL_NONE = 0, /**< Image's center region is @b not to be rendered */
826 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 */
827 EVAS_BORDER_FILL_SOLID = 2 /**< Image's center region is to be made solid, even if it has transparency on it */
828} Evas_Border_Fill_Mode; /**< How an image's center region (the complement to the border region) should be rendered by Evas */
829
830typedef enum _Evas_Image_Scale_Hint
831{
832 EVAS_IMAGE_SCALE_HINT_NONE = 0, /**< No scale hint at all */
833 EVAS_IMAGE_SCALE_HINT_DYNAMIC = 1, /**< Image is being re-scaled over time, thus turning scaling cache @b off for its data */
834 EVAS_IMAGE_SCALE_HINT_STATIC = 2 /**< Image is not being re-scaled over time, thus turning scaling cache @b on for its data */
835} Evas_Image_Scale_Hint; /**< How an image's data is to be treated by Evas, with regard to scaling cache */
836
837typedef enum _Evas_Image_Animated_Loop_Hint
838{
839 EVAS_IMAGE_ANIMATED_HINT_NONE = 0,
840 EVAS_IMAGE_ANIMATED_HINT_LOOP = 1, /**< Image's animation mode is loop like 1->2->3->1->2->3 */
841 EVAS_IMAGE_ANIMATED_HINT_PINGPONG = 2 /**< Image's animation mode is pingpong like 1->2->3->2->1-> ... */
842} Evas_Image_Animated_Loop_Hint;
843
844typedef enum _Evas_Engine_Render_Mode
845{
846 EVAS_RENDER_MODE_BLOCKING = 0,
847 EVAS_RENDER_MODE_NONBLOCKING = 1,
848} Evas_Engine_Render_Mode;
849
850typedef enum _Evas_Image_Content_Hint
851{
852 EVAS_IMAGE_CONTENT_HINT_NONE = 0, /**< No hint at all */
853 EVAS_IMAGE_CONTENT_HINT_DYNAMIC = 1, /**< The contents will change over time */
854 EVAS_IMAGE_CONTENT_HINT_STATIC = 2 /**< The contents won't change over time */
855} Evas_Image_Content_Hint; /**< How an image's data is to be treated by Evas, for optimization */
856
857struct _Evas_Engine_Info /** Generic engine information. Generic info is useless */
858{
859 int magic; /**< Magic number */
860};
861
862struct _Evas_Event_Mouse_Down /** Mouse button press event */
863{
864 int button; /**< Mouse button number that went down (1 - 32) */
865
866 Evas_Point output; /**< The X/Y location of the cursor */
867 Evas_Coord_Point canvas; /**< The X/Y location of the cursor */
868
869 void *data;
870 Evas_Modifier *modifiers; /**< modifier keys pressed during the event */
871 Evas_Lock *locks;
872
873 Evas_Button_Flags flags; /**< button flags set during the event */
874 unsigned int timestamp;
875 Evas_Event_Flags event_flags;
876 Evas_Device *dev;
877};
878
879struct _Evas_Event_Mouse_Up /** Mouse button release event */
880{
881 int button; /**< Mouse button number that was raised (1 - 32) */
882
883 Evas_Point output;
884 Evas_Coord_Point canvas;
885
886 void *data;
887 Evas_Modifier *modifiers;
888 Evas_Lock *locks;
889
890 Evas_Button_Flags flags;
891 unsigned int timestamp;
892 Evas_Event_Flags event_flags;
893 Evas_Device *dev;
894};
895
896struct _Evas_Event_Mouse_In /** Mouse enter event */
897{
898 int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
899
900 Evas_Point output;
901 Evas_Coord_Point canvas;
902
903 void *data;
904 Evas_Modifier *modifiers;
905 Evas_Lock *locks;
906 unsigned int timestamp;
907 Evas_Event_Flags event_flags;
908 Evas_Device *dev;
909};
910
911struct _Evas_Event_Mouse_Out /** Mouse leave event */
912{
913 int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
914
915
916 Evas_Point output;
917 Evas_Coord_Point canvas;
918
919 void *data;
920 Evas_Modifier *modifiers;
921 Evas_Lock *locks;
922 unsigned int timestamp;
923 Evas_Event_Flags event_flags;
924 Evas_Device *dev;
925};
926
927struct _Evas_Event_Mouse_Move /** Mouse button down event */
928{
929 int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
930
931 Evas_Position cur, prev;
932
933 void *data;
934 Evas_Modifier *modifiers;
935 Evas_Lock *locks;
936 unsigned int timestamp;
937 Evas_Event_Flags event_flags;
938 Evas_Device *dev;
939};
940
941struct _Evas_Event_Mouse_Wheel /** Wheel event */
942{
943 int direction; /* 0 = default up/down wheel FIXME: more wheel types */
944 int z; /* ...,-2,-1 = down, 1,2,... = up */
945
946 Evas_Point output;
947 Evas_Coord_Point canvas;
948
949 void *data;
950 Evas_Modifier *modifiers;
951 Evas_Lock *locks;
952 unsigned int timestamp;
953 Evas_Event_Flags event_flags;
954 Evas_Device *dev;
955};
956
957struct _Evas_Event_Multi_Down /** Multi button press event */
958{
959 int device; /**< Multi device number that went down (1 or more for extra touches) */
960 double radius, radius_x, radius_y;
961 double pressure, angle;
962
963 Evas_Point output;
964 Evas_Coord_Precision_Point canvas;
965
966 void *data;
967 Evas_Modifier *modifiers;
968 Evas_Lock *locks;
969
970 Evas_Button_Flags flags;
971 unsigned int timestamp;
972 Evas_Event_Flags event_flags;
973 Evas_Device *dev;
974};
975
976struct _Evas_Event_Multi_Up /** Multi button release event */
977{
978 int device; /**< Multi device number that went up (1 or more for extra touches) */
979 double radius, radius_x, radius_y;
980 double pressure, angle;
981
982 Evas_Point output;
983 Evas_Coord_Precision_Point canvas;
984
985 void *data;
986 Evas_Modifier *modifiers;
987 Evas_Lock *locks;
988
989 Evas_Button_Flags flags;
990 unsigned int timestamp;
991 Evas_Event_Flags event_flags;
992 Evas_Device *dev;
993};
994
995struct _Evas_Event_Multi_Move /** Multi button down event */
996{
997 int device; /**< Multi device number that moved (1 or more for extra touches) */
998 double radius, radius_x, radius_y;
999 double pressure, angle;
1000
1001 Evas_Precision_Position cur;
1002
1003 void *data;
1004 Evas_Modifier *modifiers;
1005 Evas_Lock *locks;
1006 unsigned int timestamp;
1007 Evas_Event_Flags event_flags;
1008 Evas_Device *dev;
1009};
1010
1011struct _Evas_Event_Key_Down /** Key press event */
1012{
1013 char *keyname; /**< the name string of the key pressed */
1014 void *data;
1015 Evas_Modifier *modifiers;
1016 Evas_Lock *locks;
1017
1018 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
1019 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
1020 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 */
1021 unsigned int timestamp;
1022 Evas_Event_Flags event_flags;
1023 Evas_Device *dev;
1024};
1025
1026struct _Evas_Event_Key_Up /** Key release event */
1027{
1028 char *keyname; /**< the name string of the key released */
1029 void *data;
1030 Evas_Modifier *modifiers;
1031 Evas_Lock *locks;
1032
1033 const char *key; /**< The logical key : (eg shift+1 == exclamation) */
1034 const char *string; /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
1035 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 */
1036 unsigned int timestamp;
1037 Evas_Event_Flags event_flags;
1038 Evas_Device *dev;
1039};
1040
1041struct _Evas_Event_Hold /** Hold change event */
1042{
1043 int hold; /**< The hold flag */
1044 void *data;
1045
1046 unsigned int timestamp;
1047 Evas_Event_Flags event_flags;
1048 Evas_Device *dev;
1049};
1050
1051/**
1052 * How the mouse pointer should be handled by Evas.
1053 *
1054 * In the mode #EVAS_OBJECT_POINTER_MODE_AUTOGRAB, when a mouse button
1055 * is pressed down over an object and held, with the mouse pointer
1056 * being moved outside of it, the pointer still behaves as being bound
1057 * to that object, albeit out of its drawing region. When the button
1058 * is released, the event will be fed to the object, that may check if
1059 * the final position is over it or not and do something about it.
1060 *
1061 * In the mode #EVAS_OBJECT_POINTER_MODE_NOGRAB, the pointer will
1062 * always be bound to the object right below it.
1063 *
1064 * @ingroup Evas_Object_Group_Extras
1065 */
1066typedef enum _Evas_Object_Pointer_Mode
1067{
1068 EVAS_OBJECT_POINTER_MODE_AUTOGRAB, /**< default, X11-like */
1069 EVAS_OBJECT_POINTER_MODE_NOGRAB, /**< pointer always bound to the object right below it */
1070 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 */
1071} Evas_Object_Pointer_Mode; /**< How the mouse pointer should be handled by Evas. */
1072
1073typedef void (*Evas_Smart_Cb) (void *data, Evas_Object *obj, void *event_info); /**< Evas smart objects' "smart callback" function signature */
1074typedef void (*Evas_Event_Cb) (void *data, Evas *e, void *event_info); /**< Evas event callback function signature */
1075typedef Eina_Bool (*Evas_Object_Event_Post_Cb) (void *data, Evas *e);
1076typedef void (*Evas_Object_Event_Cb) (void *data, Evas *e, Evas_Object *obj, void *event_info); /**< Evas object event callback function signature */
1077typedef void (*Evas_Async_Events_Put_Cb)(void *target, Evas_Callback_Type type, void *event_info);
1078
1079/**
1080 * @defgroup Evas_Group Top Level Functions
1081 *
1082 * Functions that affect Evas as a whole.
1083 */
1084
1085/**
1086 * Initialize Evas
1087 *
1088 * @return The init counter value.
1089 *
1090 * This function initializes Evas and increments a counter of the
1091 * number of calls to it. It returns the new counter's value.
1092 *
1093 * @see evas_shutdown().
1094 *
1095 * Most EFL users wouldn't be using this function directly, because
1096 * they wouldn't access Evas directly by themselves. Instead, they
1097 * would be using higher level helpers, like @c ecore_evas_init().
1098 * See http://docs.enlightenment.org/auto/ecore/.
1099 *
1100 * You should be using this if your use is something like the
1101 * following. The buffer engine is just one of the many ones Evas
1102 * provides.
1103 *
1104 * @dontinclude evas-buffer-simple.c
1105 * @skip int main
1106 * @until return -1;
1107 * And being the canvas creation something like:
1108 * @skip static Evas *create_canvas
1109 * @until evas_output_viewport_set(canvas,
1110 *
1111 * Note that this is code creating an Evas canvas with no usage of
1112 * Ecore helpers at all -- no linkage with Ecore on this scenario,
1113 * thus. Again, this wouldn't be on Evas common usage for most
1114 * developers. See the full @ref Example_Evas_Buffer_Simple "example".
1115 *
1116 * @ingroup Evas_Group
1117 */
1118EAPI int evas_init (void);
1119
1120/**
1121 * Shutdown Evas
1122 *
1123 * @return Evas' init counter value.
1124 *
1125 * This function finalizes Evas, decrementing the counter of the
1126 * number of calls to the function evas_init(). This new value for the
1127 * counter is returned.
1128 *
1129 * @see evas_init().
1130 *
1131 * If you were the sole user of Evas, by means of evas_init(), you can
1132 * check if it's being properly shut down by expecting a return value
1133 * of 0.
1134 *
1135 * Example code follows.
1136 * @dontinclude evas-buffer-simple.c
1137 * @skip // NOTE: use ecore_evas_buffer_new
1138 * @until evas_shutdown
1139 * Where that function would contain:
1140 * @skip evas_free(canvas)
1141 * @until evas_free(canvas)
1142 *
1143 * Most users would be using ecore_evas_shutdown() instead, like told
1144 * in evas_init(). See the full @ref Example_Evas_Buffer_Simple
1145 * "example".
1146 *
1147 * @ingroup Evas_Group
1148 */
1149EAPI int evas_shutdown (void);
1150
1151
1152/**
1153 * Return if any allocation errors have occurred during the prior function
1154 * @return The allocation error flag
1155 *
1156 * This function will return if any memory allocation errors occurred during,
1157 * and what kind they were. The return value will be one of
1158 * EVAS_ALLOC_ERROR_NONE, EVAS_ALLOC_ERROR_FATAL or EVAS_ALLOC_ERROR_RECOVERED
1159 * with each meaning something different.
1160 *
1161 * EVAS_ALLOC_ERROR_NONE means that no errors occurred at all and the function
1162 * worked as expected.
1163 *
1164 * EVAS_ALLOC_ERROR_FATAL means the function was completely unable to perform
1165 * its job and will have exited as cleanly as possible. The programmer
1166 * should consider this as a sign of very low memory and should try and safely
1167 * recover from the prior functions failure (or try free up memory elsewhere
1168 * and try again after more memory is freed).
1169 *
1170 * EVAS_ALLOC_ERROR_RECOVERED means that an allocation error occurred, but was
1171 * recovered from by evas finding memory of its own it has allocated and
1172 * freeing what it sees as not really usefully allocated memory. What is freed
1173 * may vary. Evas may reduce the resolution of images, free cached images or
1174 * fonts, trhow out pre-rendered data, reduce the complexity of change lists
1175 * etc. Evas and the program will function as per normal after this, but this
1176 * is a sign of low memory, and it is suggested that the program try and
1177 * identify memory it doesn't need, and free it.
1178 *
1179 * Example:
1180 * @code
1181 * extern Evas_Object *object;
1182 * void callback (void *data, Evas *e, Evas_Object *obj, void *event_info);
1183 *
1184 * evas_object_event_callback_add(object, EVAS_CALLBACK_MOUSE_DOWN, callback, NULL);
1185 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_FATAL)
1186 * {
1187 * fprintf(stderr, "ERROR: Completely unable to attach callback. Must\n");
1188 * fprintf(stderr, " destroy object now as it cannot be used.\n");
1189 * evas_object_del(object);
1190 * object = NULL;
1191 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
1192 * my_memory_cleanup();
1193 * }
1194 * if (evas_alloc_error() == EVAS_ALLOC_ERROR_RECOVERED)
1195 * {
1196 * fprintf(stderr, "WARNING: Memory is really low. Cleaning out RAM.\n");
1197 * my_memory_cleanup();
1198 * }
1199 * @endcode
1200 *
1201 * @ingroup Evas_Group
1202 */
1203EAPI Evas_Alloc_Error evas_alloc_error (void);
1204
1205
1206/**
1207 * @brief Get evas' internal asynchronous events read file descriptor.
1208 *
1209 * @return The canvas' asynchronous events read file descriptor.
1210 *
1211 * Evas' asynchronous events are meant to be dealt with internally,
1212 * i. e., when building stuff to be glued together into the EFL
1213 * infrastructure -- a module, for example. The context which demands
1214 * its use is when calculations need to be done out of the main
1215 * thread, asynchronously, and some action must be performed after
1216 * that.
1217 *
1218 * An example of actual use of this API is for image asynchronous
1219 * preload inside evas. If the canvas was instantiated through
1220 * ecore-evas usage, ecore itself will take care of calling those
1221 * events' processing.
1222 *
1223 * This function returns the read file descriptor where to get the
1224 * asynchronous events of the canvas. Naturally, other mainloops,
1225 * apart from ecore, may make use of it.
1226 *
1227 * @ingroup Evas_Group
1228 */
1229EAPI int evas_async_events_fd_get (void) EINA_WARN_UNUSED_RESULT;
1230
1231/**
1232 * @brief Trigger the processing of all events waiting on the file
1233 * descriptor returned by evas_async_events_fd_get().
1234 *
1235 * @return The number of events processed.
1236 *
1237 * All asynchronous events queued up by evas_async_events_put() are
1238 * processed here. More precisely, the callback functions, informed
1239 * together with other event parameters, when queued, get called (with
1240 * those parameters), in that order.
1241 *
1242 * @ingroup Evas_Group
1243 */
1244EAPI int evas_async_events_process (void);
1245
1246/**
1247* Insert asynchronous events on the canvas.
1248 *
1249 * @param target The target to be affected by the events.
1250 * @param type The type of callback function.
1251 * @param event_info Information about the event.
1252 * @param func The callback function pointer.
1253 *
1254 * This is the way, for a routine running outside evas' main thread,
1255 * to report an asynchronous event. A callback function is informed,
1256 * whose call is to happen after evas_async_events_process() is
1257 * called.
1258 *
1259 * @ingroup Evas_Group
1260 */
1261EAPI 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);
1262
1263/**
1264 * @defgroup Evas_Canvas Canvas Functions
1265 *
1266 * Low level Evas canvas functions. Sub groups will present more high
1267 * level ones, though.
1268 *
1269 * Most of these functions deal with low level Evas actions, like:
1270 * @li create/destroy raw canvases, not bound to any displaying engine
1271 * @li tell a canvas i got focused (in a windowing context, for example)
1272 * @li tell a canvas a region should not be calculated anymore in rendering
1273 * @li tell a canvas to render its contents, immediately
1274 *
1275 * Most users will be using Evas by means of the @c Ecore_Evas
1276 * wrapper, which deals with all the above mentioned issues
1277 * automatically for them. Thus, you'll be looking at this section
1278 * only if you're building low level stuff.
1279 *
1280 * The groups within present you functions that deal with the canvas
1281 * directly, too, and not yet with its @b objects. They are the
1282 * functions you need to use at a minimum to get a working canvas.
1283 *
1284 * Some of the functions in this group are exemplified @ref
1285 * Example_Evas_Events "here".
1286 */
1287
1288/**
1289 * Creates a new empty evas.
1290 *
1291 * Note that before you can use the evas, you will to at a minimum:
1292 * @li Set its render method with @ref evas_output_method_set .
1293 * @li Set its viewport size with @ref evas_output_viewport_set .
1294 * @li Set its size of the canvas with @ref evas_output_size_set .
1295 * @li Ensure that the render engine is given the correct settings
1296 * with @ref evas_engine_info_set .
1297 *
1298 * This function should only fail if the memory allocation fails
1299 *
1300 * @note this function is very low level. Instead of using it
1301 * directly, consider using the high level functions in
1302 * Ecore_Evas such as @c ecore_evas_new(). See
1303 * http://docs.enlightenment.org/auto/ecore/.
1304 *
1305 * @attention it is recommended that one calls evas_init() before
1306 * creating new canvas.
1307 *
1308 * @return A new uninitialised Evas canvas on success. Otherwise, @c
1309 * NULL.
1310 * @ingroup Evas_Canvas
1311 */
1312EAPI Evas *evas_new (void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
1313
1314/**
1315 * Frees the given evas and any objects created on it.
1316 *
1317 * Any objects with 'free' callbacks will have those callbacks called
1318 * in this function.
1319 *
1320 * @param e The given evas.
1321 *
1322 * @ingroup Evas_Canvas
1323 */
1324EAPI void evas_free (Evas *e) EINA_ARG_NONNULL(1);
1325
1326/**
1327 * Inform to the evas that it got the focus.
1328 *
1329 * @param e The evas to change information.
1330 * @ingroup Evas_Canvas
1331 */
1332EAPI void evas_focus_in (Evas *e);
1333
1334/**
1335 * Inform to the evas that it lost the focus.
1336 *
1337 * @param e The evas to change information.
1338 * @ingroup Evas_Canvas
1339 */
1340EAPI void evas_focus_out (Evas *e);
1341
1342/**
1343 * Get the focus state known by the given evas
1344 *
1345 * @param e The evas to query information.
1346 * @ingroup Evas_Canvas
1347 */
1348EAPI Eina_Bool evas_focus_state_get (const Evas *e);
1349
1350/**
1351 * Push the nochange flag up 1
1352 *
1353 * This tells evas, that while the nochange flag is greater than 0, do not
1354 * mark objects as "changed" when making changes.
1355 *
1356 * @param e The evas to change information.
1357 * @ingroup Evas_Canvas
1358 */
1359EAPI void evas_nochange_push (Evas *e);
1360
1361/**
1362 * Pop the nochange flag down 1
1363 *
1364 * This tells evas, that while the nochange flag is greater than 0, do not
1365 * mark objects as "changed" when making changes.
1366 *
1367 * @param e The evas to change information.
1368 * @ingroup Evas_Canvas
1369 */
1370EAPI void evas_nochange_pop (Evas *e);
1371
1372
1373/**
1374 * Attaches a specific pointer to the evas for fetching later
1375 *
1376 * @param e The canvas to attach the pointer to
1377 * @param data The pointer to attach
1378 * @ingroup Evas_Canvas
1379 */
1380EAPI void evas_data_attach_set (Evas *e, void *data) EINA_ARG_NONNULL(1);
1381
1382/**
1383 * Returns the pointer attached by evas_data_attach_set()
1384 *
1385 * @param e The canvas to attach the pointer to
1386 * @return The pointer attached
1387 * @ingroup Evas_Canvas
1388 */
1389EAPI void *evas_data_attach_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1390
1391
1392/**
1393 * Add a damage rectangle.
1394 *
1395 * @param e The given canvas pointer.
1396 * @param x The rectangle's left position.
1397 * @param y The rectangle's top position.
1398 * @param w The rectangle's width.
1399 * @param h The rectangle's height.
1400 *
1401 * This is the function by which one tells evas that a part of the
1402 * canvas has to be repainted.
1403 *
1404 * @ingroup Evas_Canvas
1405 */
1406EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
1407
1408/**
1409 * Add an "obscured region" to an Evas canvas.
1410 *
1411 * @param e The given canvas pointer.
1412 * @param x The rectangle's top left corner's horizontal coordinate.
1413 * @param y The rectangle's top left corner's vertical coordinate
1414 * @param w The rectangle's width.
1415 * @param h The rectangle's height.
1416 *
1417 * This is the function by which one tells an Evas canvas that a part
1418 * of it <b>must not</b> be repainted. The region must be
1419 * rectangular and its coordinates inside the canvas viewport are
1420 * passed in the call. After this call, the region specified won't
1421 * participate in any form in Evas' calculations and actions during
1422 * its rendering updates, having its displaying content frozen as it
1423 * was just after this function took place.
1424 *
1425 * We call it "obscured region" because the most common use case for
1426 * this rendering (partial) freeze is something else (most probably
1427 * other canvas) being on top of the specified rectangular region,
1428 * thus shading it completely from the user's final scene in a
1429 * display. To avoid unnecessary processing, one should indicate to the
1430 * obscured canvas not to bother about the non-important area.
1431 *
1432 * The majority of users won't have to worry about this function, as
1433 * they'll be using just one canvas in their applications, with
1434 * nothing inset or on top of it in any form.
1435 *
1436 * To make this region one that @b has to be repainted again, call the
1437 * function evas_obscured_clear().
1438 *
1439 * @note This is a <b>very low level function</b>, which most of
1440 * Evas' users wouldn't care about.
1441 *
1442 * @note This function does @b not flag the canvas as having its state
1443 * changed. If you want to re-render it afterwards expecting new
1444 * contents, you have to add "damage" regions yourself (see
1445 * evas_damage_rectangle_add()).
1446 *
1447 * @see evas_obscured_clear()
1448 * @see evas_render_updates()
1449 *
1450 * Example code follows.
1451 * @dontinclude evas-events.c
1452 * @skip add an obscured
1453 * @until evas_obscured_clear(evas);
1454 *
1455 * In that example, pressing the "Ctrl" and "o" keys will impose or
1456 * remove an obscured region in the middle of the canvas. You'll get
1457 * the same contents at the time the key was pressed, if toggling it
1458 * on, until you toggle it off again (make sure the animation is
1459 * running on to get the idea better). See the full @ref
1460 * Example_Evas_Events "example".
1461 *
1462 * @ingroup Evas_Canvas
1463 */
1464EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
1465
1466/**
1467 * Remove all "obscured regions" from an Evas canvas.
1468 *
1469 * @param e The given canvas pointer.
1470 *
1471 * This function removes all the rectangles from the obscured regions
1472 * list of the canvas @p e. It takes obscured areas added with
1473 * evas_obscured_rectangle_add() and make them again a regions that @b
1474 * have to be repainted on rendering updates.
1475 *
1476 * @note This is a <b>very low level function</b>, which most of
1477 * Evas' users wouldn't care about.
1478 *
1479 * @note This function does @b not flag the canvas as having its state
1480 * changed. If you want to re-render it afterwards expecting new
1481 * contents, you have to add "damage" regions yourself (see
1482 * evas_damage_rectangle_add()).
1483 *
1484 * @see evas_obscured_rectangle_add() for an example
1485 * @see evas_render_updates()
1486 *
1487 * @ingroup Evas_Canvas
1488 */
1489EAPI void evas_obscured_clear (Evas *e) EINA_ARG_NONNULL(1);
1490
1491/**
1492 * Force immediate renderization of the given Evas canvas.
1493 *
1494 * @param e The given canvas pointer.
1495 * @return A newly allocated list of updated rectangles of the canvas
1496 * (@c Eina_Rectangle structs). Free this list with
1497 * evas_render_updates_free().
1498 *
1499 * This function forces an immediate renderization update of the given
1500 * canvas @e.
1501 *
1502 * @note This is a <b>very low level function</b>, which most of
1503 * Evas' users wouldn't care about. One would use it, for example, to
1504 * grab an Evas' canvas update regions and paint them back, using the
1505 * canvas' pixmap, on a displaying system working below Evas.
1506 *
1507 * @note Evas is a stateful canvas. If no operations changing its
1508 * state took place since the last rendering action, you won't see no
1509 * changes and this call will be a no-op.
1510 *
1511 * Example code follows.
1512 * @dontinclude evas-events.c
1513 * @skip add an obscured
1514 * @until d.obscured = !d.obscured;
1515 *
1516 * See the full @ref Example_Evas_Events "example".
1517 *
1518 * @ingroup Evas_Canvas
1519 */
1520EAPI Eina_List *evas_render_updates (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1521
1522/**
1523 * Free the rectangles returned by evas_render_updates().
1524 *
1525 * @param updates The list of updated rectangles of the canvas.
1526 *
1527 * This function removes the region from the render updates list. It
1528 * makes the region doesn't be render updated anymore.
1529 *
1530 * @see evas_render_updates() for an example
1531 *
1532 * @ingroup Evas_Canvas
1533 */
1534EAPI void evas_render_updates_free (Eina_List *updates);
1535
1536/**
1537 * Force renderization of the given canvas.
1538 *
1539 * @param e The given canvas pointer.
1540 *
1541 * @ingroup Evas_Canvas
1542 */
1543EAPI void evas_render (Evas *e) EINA_ARG_NONNULL(1);
1544
1545/**
1546 * Update the canvas internal objects but not triggering immediate
1547 * renderization.
1548 *
1549 * @param e The given canvas pointer.
1550 *
1551 * This function updates the canvas internal objects not triggering
1552 * renderization. To force renderization function evas_render() should
1553 * be used.
1554 *
1555 * @see evas_render.
1556 *
1557 * @ingroup Evas_Canvas
1558 */
1559EAPI void evas_norender (Evas *e) EINA_ARG_NONNULL(1);
1560
1561/**
1562 * Make the canvas discard internally cached data used for rendering.
1563 *
1564 * @param e The given canvas pointer.
1565 *
1566 * This function flushes the arrays of delete, active and render objects.
1567 * Other things it may also discard are: shared memory segments,
1568 * temporary scratch buffers, cached data to avoid re-compute of that data etc.
1569 *
1570 * @ingroup Evas_Canvas
1571 */
1572EAPI void evas_render_idle_flush (Evas *e) EINA_ARG_NONNULL(1);
1573
1574/**
1575 * Make the canvas discard as much data as possible used by the engine at
1576 * runtime.
1577 *
1578 * @param e The given canvas pointer.
1579 *
1580 * This function will unload images, delete textures and much more, where
1581 * possible. You may also want to call evas_render_idle_flush() immediately
1582 * prior to this to perhaps discard a little more, though evas_render_dump()
1583 * should implicitly delete most of what evas_render_idle_flush() might
1584 * discard too.
1585 *
1586 * @ingroup Evas_Canvas
1587 */
1588EAPI void evas_render_dump (Evas *e) EINA_ARG_NONNULL(1);
1589
1590/**
1591 * @defgroup Evas_Output_Method Render Engine Functions
1592 *
1593 * Functions that are used to set the render engine for a given
1594 * function, and then get that engine working.
1595 *
1596 * The following code snippet shows how they can be used to
1597 * initialise an evas that uses the X11 software engine:
1598 * @code
1599 * Evas *evas;
1600 * Evas_Engine_Info_Software_X11 *einfo;
1601 * extern Display *display;
1602 * extern Window win;
1603 *
1604 * evas_init();
1605 *
1606 * evas = evas_new();
1607 * evas_output_method_set(evas, evas_render_method_lookup("software_x11"));
1608 * evas_output_size_set(evas, 640, 480);
1609 * evas_output_viewport_set(evas, 0, 0, 640, 480);
1610 * einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(evas);
1611 * einfo->info.display = display;
1612 * einfo->info.visual = DefaultVisual(display, DefaultScreen(display));
1613 * einfo->info.colormap = DefaultColormap(display, DefaultScreen(display));
1614 * einfo->info.drawable = win;
1615 * einfo->info.depth = DefaultDepth(display, DefaultScreen(display));
1616 * evas_engine_info_set(evas, (Evas_Engine_Info *)einfo);
1617 * @endcode
1618 *
1619 * @ingroup Evas_Canvas
1620 */
1621
1622/**
1623 * Look up a numeric ID from a string name of a rendering engine.
1624 *
1625 * @param name the name string of an engine
1626 * @return A numeric (opaque) ID for the rendering engine
1627 * @ingroup Evas_Output_Method
1628 *
1629 * This function looks up a numeric return value for the named engine
1630 * in the string @p name. This is a normal C string, NUL byte
1631 * terminated. The name is case sensitive. If the rendering engine is
1632 * available, a numeric ID for that engine is returned that is not
1633 * 0. If the engine is not available, 0 is returned, indicating an
1634 * invalid engine.
1635 *
1636 * The programmer should NEVER rely on the numeric ID of an engine
1637 * unless it is returned by this function. Programs should NOT be
1638 * written accessing render method ID's directly, without first
1639 * obtaining it from this function.
1640 *
1641 * @attention it is mandatory that one calls evas_init() before
1642 * looking up the render method.
1643 *
1644 * Example:
1645 * @code
1646 * int engine_id;
1647 * Evas *evas;
1648 *
1649 * evas_init();
1650 *
1651 * evas = evas_new();
1652 * if (!evas)
1653 * {
1654 * fprintf(stderr, "ERROR: Canvas creation failed. Fatal error.\n");
1655 * exit(-1);
1656 * }
1657 * engine_id = evas_render_method_lookup("software_x11");
1658 * if (!engine_id)
1659 * {
1660 * fprintf(stderr, "ERROR: Requested rendering engine is absent.\n");
1661 * exit(-1);
1662 * }
1663 * evas_output_method_set(evas, engine_id);
1664 * @endcode
1665 */
1666EAPI int evas_render_method_lookup (const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1667
1668/**
1669 * List all the rendering engines compiled into the copy of the Evas library
1670 *
1671 * @return A linked list whose data members are C strings of engine names
1672 * @ingroup Evas_Output_Method
1673 *
1674 * Calling this will return a handle (pointer) to an Evas linked
1675 * list. Each node in the linked list will have the data pointer be a
1676 * (char *) pointer to the name string of the rendering engine
1677 * available. The strings should never be modified, neither should the
1678 * list be modified. This list should be cleaned up as soon as the
1679 * program no longer needs it using evas_render_method_list_free(). If
1680 * no engines are available from Evas, NULL will be returned.
1681 *
1682 * Example:
1683 * @code
1684 * Eina_List *engine_list, *l;
1685 * char *engine_name;
1686 *
1687 * engine_list = evas_render_method_list();
1688 * if (!engine_list)
1689 * {
1690 * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
1691 * exit(-1);
1692 * }
1693 * printf("Available Evas Engines:\n");
1694 * EINA_LIST_FOREACH(engine_list, l, engine_name)
1695 * printf("%s\n", engine_name);
1696 * evas_render_method_list_free(engine_list);
1697 * @endcode
1698 */
1699EAPI Eina_List *evas_render_method_list (void) EINA_WARN_UNUSED_RESULT;
1700
1701/**
1702 * This function should be called to free a list of engine names
1703 *
1704 * @param list The Eina_List base pointer for the engine list to be freed
1705 * @ingroup Evas_Output_Method
1706 *
1707 * When this function is called it will free the engine list passed in
1708 * as @p list. The list should only be a list of engines generated by
1709 * calling evas_render_method_list(). If @p list is NULL, nothing will
1710 * happen.
1711 *
1712 * Example:
1713 * @code
1714 * Eina_List *engine_list, *l;
1715 * char *engine_name;
1716 *
1717 * engine_list = evas_render_method_list();
1718 * if (!engine_list)
1719 * {
1720 * fprintf(stderr, "ERROR: Evas supports no engines! Exit.\n");
1721 * exit(-1);
1722 * }
1723 * printf("Available Evas Engines:\n");
1724 * EINA_LIST_FOREACH(engine_list, l, engine_name)
1725 * printf("%s\n", engine_name);
1726 * evas_render_method_list_free(engine_list);
1727 * @endcode
1728 */
1729EAPI void evas_render_method_list_free (Eina_List *list);
1730
1731
1732/**
1733 * Sets the output engine for the given evas.
1734 *
1735 * Once the output engine for an evas is set, any attempt to change it
1736 * will be ignored. The value for @p render_method can be found using
1737 * @ref evas_render_method_lookup .
1738 *
1739 * @param e The given evas.
1740 * @param render_method The numeric engine value to use.
1741 *
1742 * @attention it is mandatory that one calls evas_init() before
1743 * setting the output method.
1744 *
1745 * @ingroup Evas_Output_Method
1746 */
1747EAPI void evas_output_method_set (Evas *e, int render_method) EINA_ARG_NONNULL(1);
1748
1749/**
1750 * Retrieves the number of the output engine used for the given evas.
1751 * @param e The given evas.
1752 * @return The ID number of the output engine being used. @c 0 is
1753 * returned if there is an error.
1754 * @ingroup Evas_Output_Method
1755 */
1756EAPI int evas_output_method_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1757
1758
1759/**
1760 * Retrieves the current render engine info struct from the given evas.
1761 *
1762 * The returned structure is publicly modifiable. The contents are
1763 * valid until either @ref evas_engine_info_set or @ref evas_render
1764 * are called.
1765 *
1766 * This structure does not need to be freed by the caller.
1767 *
1768 * @param e The given evas.
1769 * @return A pointer to the Engine Info structure. @c NULL is returned if
1770 * an engine has not yet been assigned.
1771 * @ingroup Evas_Output_Method
1772 */
1773EAPI Evas_Engine_Info *evas_engine_info_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1774
1775/**
1776 * Applies the engine settings for the given evas from the given @c
1777 * Evas_Engine_Info structure.
1778 *
1779 * To get the Evas_Engine_Info structure to use, call @ref
1780 * evas_engine_info_get . Do not try to obtain a pointer to an
1781 * @c Evas_Engine_Info structure in any other way.
1782 *
1783 * You will need to call this function at least once before you can
1784 * create objects on an evas or render that evas. Some engines allow
1785 * their settings to be changed more than once.
1786 *
1787 * Once called, the @p info pointer should be considered invalid.
1788 *
1789 * @param e The pointer to the Evas Canvas
1790 * @param info The pointer to the Engine Info to use
1791 * @return 1 if no error occurred, 0 otherwise
1792 * @ingroup Evas_Output_Method
1793 */
1794EAPI Eina_Bool evas_engine_info_set (Evas *e, Evas_Engine_Info *info) EINA_ARG_NONNULL(1);
1795
1796/**
1797 * @defgroup Evas_Output_Size Output and Viewport Resizing Functions
1798 *
1799 * Functions that set and retrieve the output and viewport size of an
1800 * evas.
1801 *
1802 * @ingroup Evas_Canvas
1803 */
1804
1805/**
1806 * Sets the output size of the render engine of the given evas.
1807 *
1808 * The evas will render to a rectangle of the given size once this
1809 * function is called. The output size is independent of the viewport
1810 * size. The viewport will be stretched to fill the given rectangle.
1811 *
1812 * The units used for @p w and @p h depend on the engine used by the
1813 * evas.
1814 *
1815 * @param e The given evas.
1816 * @param w The width in output units, usually pixels.
1817 * @param h The height in output units, usually pixels.
1818 * @ingroup Evas_Output_Size
1819 */
1820EAPI void evas_output_size_set (Evas *e, int w, int h) EINA_ARG_NONNULL(1);
1821
1822/**
1823 * Retrieve the output size of the render engine of the given evas.
1824 *
1825 * The output size is given in whatever the output units are for the
1826 * engine.
1827 *
1828 * If either @p w or @p h is @c NULL, then it is ignored. If @p e is
1829 * invalid, the returned results are undefined.
1830 *
1831 * @param e The given evas.
1832 * @param w The pointer to an integer to store the width in.
1833 * @param h The pointer to an integer to store the height in.
1834 * @ingroup Evas_Output_Size
1835 */
1836EAPI void evas_output_size_get (const Evas *e, int *w, int *h) EINA_ARG_NONNULL(1);
1837
1838/**
1839 * Sets the output viewport of the given evas in evas units.
1840 *
1841 * The output viewport is the area of the evas that will be visible to
1842 * the viewer. The viewport will be stretched to fit the output
1843 * target of the evas when rendering is performed.
1844 *
1845 * @note The coordinate values do not have to map 1-to-1 with the output
1846 * target. However, it is generally advised that it is done for ease
1847 * of use.
1848 *
1849 * @param e The given evas.
1850 * @param x The top-left corner x value of the viewport.
1851 * @param y The top-left corner y value of the viewport.
1852 * @param w The width of the viewport. Must be greater than 0.
1853 * @param h The height of the viewport. Must be greater than 0.
1854 * @ingroup Evas_Output_Size
1855 */
1856EAPI void evas_output_viewport_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
1857
1858/**
1859 * Get the render engine's output viewport co-ordinates in canvas units.
1860 * @param e The pointer to the Evas Canvas
1861 * @param x The pointer to a x variable to be filled in
1862 * @param y The pointer to a y variable to be filled in
1863 * @param w The pointer to a width variable to be filled in
1864 * @param h The pointer to a height variable to be filled in
1865 * @ingroup Evas_Output_Size
1866 *
1867 * Calling this function writes the current canvas output viewport
1868 * size and location values into the variables pointed to by @p x, @p
1869 * y, @p w and @p h. On success the variables have the output
1870 * location and size values written to them in canvas units. Any of @p
1871 * x, @p y, @p w or @p h that are NULL will not be written to. If @p e
1872 * is invalid, the results are undefined.
1873 *
1874 * Example:
1875 * @code
1876 * extern Evas *evas;
1877 * Evas_Coord x, y, width, height;
1878 *
1879 * evas_output_viewport_get(evas, &x, &y, &w, &h);
1880 * @endcode
1881 */
1882EAPI void evas_output_viewport_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
1883
1884/**
1885 * Sets the output framespace size of the render engine of the given evas.
1886 *
1887 * The framespace size is used in the Wayland engines to denote space where
1888 * the output is not drawn. This is mainly used in ecore_evas to draw borders
1889 *
1890 * The units used for @p w and @p h depend on the engine used by the
1891 * evas.
1892 *
1893 * @param e The given evas.
1894 * @param x The left coordinate in output units, usually pixels.
1895 * @param y The top coordinate in output units, usually pixels.
1896 * @param w The width in output units, usually pixels.
1897 * @param h The height in output units, usually pixels.
1898 * @ingroup Evas_Output_Size
1899 * @since 1.1.0
1900 */
1901EAPI void evas_output_framespace_set (Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
1902
1903/**
1904 * Get the render engine's output framespace co-ordinates in canvas units.
1905 *
1906 * @param e The pointer to the Evas Canvas
1907 * @param x The pointer to a x variable to be filled in
1908 * @param y The pointer to a y variable to be filled in
1909 * @param w The pointer to a width variable to be filled in
1910 * @param h The pointer to a height variable to be filled in
1911 * @ingroup Evas_Output_Size
1912 * @since 1.1.0
1913 */
1914EAPI void evas_output_framespace_get (const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
1915
1916/**
1917 * @defgroup Evas_Coord_Mapping_Group Coordinate Mapping Functions
1918 *
1919 * Functions that are used to map coordinates from the canvas to the
1920 * screen or the screen to the canvas.
1921 *
1922 * @ingroup Evas_Canvas
1923 */
1924
1925/**
1926 * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
1927 *
1928 * @param e The pointer to the Evas Canvas
1929 * @param x The screen/output x co-ordinate
1930 * @return The screen co-ordinate translated to canvas unit co-ordinates
1931 * @ingroup Evas_Coord_Mapping_Group
1932 *
1933 * This function takes in a horizontal co-ordinate as the @p x
1934 * parameter and converts it into canvas units, accounting for output
1935 * size, viewport size and location, returning it as the function
1936 * return value. If @p e is invalid, the results are undefined.
1937 *
1938 * Example:
1939 * @code
1940 * extern Evas *evas;
1941 * extern int screen_x;
1942 * Evas_Coord canvas_x;
1943 *
1944 * canvas_x = evas_coord_screen_x_to_world(evas, screen_x);
1945 * @endcode
1946 */
1947EAPI Evas_Coord evas_coord_screen_x_to_world (const Evas *e, int x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1948
1949/**
1950 * Convert/scale an ouput screen co-ordinate into canvas co-ordinates
1951 *
1952 * @param e The pointer to the Evas Canvas
1953 * @param y The screen/output y co-ordinate
1954 * @return The screen co-ordinate translated to canvas unit co-ordinates
1955 * @ingroup Evas_Coord_Mapping_Group
1956 *
1957 * This function takes in a vertical co-ordinate as the @p y parameter
1958 * and converts it into canvas units, accounting for output size,
1959 * viewport size and location, returning it as the function return
1960 * value. If @p e is invalid, the results are undefined.
1961 *
1962 * Example:
1963 * @code
1964 * extern Evas *evas;
1965 * extern int screen_y;
1966 * Evas_Coord canvas_y;
1967 *
1968 * canvas_y = evas_coord_screen_y_to_world(evas, screen_y);
1969 * @endcode
1970 */
1971EAPI Evas_Coord evas_coord_screen_y_to_world (const Evas *e, int y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1972
1973/**
1974 * Convert/scale a canvas co-ordinate into output screen co-ordinates
1975 *
1976 * @param e The pointer to the Evas Canvas
1977 * @param x The canvas x co-ordinate
1978 * @return The output/screen co-ordinate translated to output co-ordinates
1979 * @ingroup Evas_Coord_Mapping_Group
1980 *
1981 * This function takes in a horizontal co-ordinate as the @p x
1982 * parameter and converts it into output units, accounting for output
1983 * size, viewport size and location, returning it as the function
1984 * return value. If @p e is invalid, the results are undefined.
1985 *
1986 * Example:
1987 * @code
1988 * extern Evas *evas;
1989 * int screen_x;
1990 * extern Evas_Coord canvas_x;
1991 *
1992 * screen_x = evas_coord_world_x_to_screen(evas, canvas_x);
1993 * @endcode
1994 */
1995EAPI int evas_coord_world_x_to_screen (const Evas *e, Evas_Coord x) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
1996
1997/**
1998 * Convert/scale a canvas co-ordinate into output screen co-ordinates
1999 *
2000 * @param e The pointer to the Evas Canvas
2001 * @param y The canvas y co-ordinate
2002 * @return The output/screen co-ordinate translated to output co-ordinates
2003 * @ingroup Evas_Coord_Mapping_Group
2004 *
2005 * This function takes in a vertical co-ordinate as the @p x parameter
2006 * and converts it into output units, accounting for output size,
2007 * viewport size and location, returning it as the function return
2008 * value. If @p e is invalid, the results are undefined.
2009 *
2010 * Example:
2011 * @code
2012 * extern Evas *evas;
2013 * int screen_y;
2014 * extern Evas_Coord canvas_y;
2015 *
2016 * screen_y = evas_coord_world_y_to_screen(evas, canvas_y);
2017 * @endcode
2018 */
2019EAPI int evas_coord_world_y_to_screen (const Evas *e, Evas_Coord y) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2020
2021/**
2022 * @defgroup Evas_Pointer_Group Pointer (Mouse) Functions
2023 *
2024 * Functions that deal with the status of the pointer (mouse cursor).
2025 *
2026 * @ingroup Evas_Canvas
2027 */
2028
2029/**
2030 * This function returns the current known pointer co-ordinates
2031 *
2032 * @param e The pointer to the Evas Canvas
2033 * @param x The pointer to an integer to be filled in
2034 * @param y The pointer to an integer to be filled in
2035 * @ingroup Evas_Pointer_Group
2036 *
2037 * This function returns the current known screen/output co-ordinates
2038 * of the mouse pointer and sets the contents of the integers pointed
2039 * to by @p x and @p y to contain these co-ordinates. If @p e is not a
2040 * valid canvas the results of this function are undefined.
2041 *
2042 * Example:
2043 * @code
2044 * extern Evas *evas;
2045 * int mouse_x, mouse_y;
2046 *
2047 * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
2048 * printf("Mouse is at screen position %i, %i\n", mouse_x, mouse_y);
2049 * @endcode
2050 */
2051EAPI void evas_pointer_output_xy_get (const Evas *e, int *x, int *y) EINA_ARG_NONNULL(1);
2052
2053/**
2054 * This function returns the current known pointer co-ordinates
2055 *
2056 * @param e The pointer to the Evas Canvas
2057 * @param x The pointer to a Evas_Coord to be filled in
2058 * @param y The pointer to a Evas_Coord to be filled in
2059 * @ingroup Evas_Pointer_Group
2060 *
2061 * This function returns the current known canvas unit co-ordinates of
2062 * the mouse pointer and sets the contents of the Evas_Coords pointed
2063 * to by @p x and @p y to contain these co-ordinates. If @p e is not a
2064 * valid canvas the results of this function are undefined.
2065 *
2066 * Example:
2067 * @code
2068 * extern Evas *evas;
2069 * Evas_Coord mouse_x, mouse_y;
2070 *
2071 * evas_pointer_output_xy_get(evas, &mouse_x, &mouse_y);
2072 * printf("Mouse is at canvas position %f, %f\n", mouse_x, mouse_y);
2073 * @endcode
2074 */
2075EAPI void evas_pointer_canvas_xy_get (const Evas *e, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
2076
2077/**
2078 * Returns a bitmask with the mouse buttons currently pressed, set to 1
2079 *
2080 * @param e The pointer to the Evas Canvas
2081 * @return A bitmask of the currently depressed buttons on the canvas
2082 * @ingroup Evas_Pointer_Group
2083 *
2084 * Calling this function will return a 32-bit integer with the
2085 * appropriate bits set to 1 that correspond to a mouse button being
2086 * depressed. This limits Evas to a mouse devices with a maximum of 32
2087 * buttons, but that is generally in excess of any host system's
2088 * pointing device abilities.
2089 *
2090 * A canvas by default begins with no mouse buttons being pressed and
2091 * only calls to evas_event_feed_mouse_down(),
2092 * evas_event_feed_mouse_down_data(), evas_event_feed_mouse_up() and
2093 * evas_event_feed_mouse_up_data() will alter that.
2094 *
2095 * The least significant bit corresponds to the first mouse button
2096 * (button 1) and the most significant bit corresponds to the last
2097 * mouse button (button 32).
2098 *
2099 * If @p e is not a valid canvas, the return value is undefined.
2100 *
2101 * Example:
2102 * @code
2103 * extern Evas *evas;
2104 * int button_mask, i;
2105 *
2106 * button_mask = evas_pointer_button_down_mask_get(evas);
2107 * printf("Buttons currently pressed:\n");
2108 * for (i = 0; i < 32; i++)
2109 * {
2110 * if ((button_mask & (1 << i)) != 0) printf("Button %i\n", i + 1);
2111 * }
2112 * @endcode
2113 */
2114EAPI int evas_pointer_button_down_mask_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2115
2116/**
2117 * Returns whether the mouse pointer is logically inside the canvas
2118 *
2119 * @param e The pointer to the Evas Canvas
2120 * @return An integer that is 1 if the mouse is inside the canvas, 0 otherwise
2121 * @ingroup Evas_Pointer_Group
2122 *
2123 * When this function is called it will return a value of either 0 or
2124 * 1, depending on if evas_event_feed_mouse_in(),
2125 * evas_event_feed_mouse_in_data(), or evas_event_feed_mouse_out(),
2126 * evas_event_feed_mouse_out_data() have been called to feed in a
2127 * mouse enter event into the canvas.
2128 *
2129 * A return value of 1 indicates the mouse is logically inside the
2130 * canvas, and 0 implies it is logically outside the canvas.
2131 *
2132 * A canvas begins with the mouse being assumed outside (0).
2133 *
2134 * If @p e is not a valid canvas, the return value is undefined.
2135 *
2136 * Example:
2137 * @code
2138 * extern Evas *evas;
2139 *
2140 * if (evas_pointer_inside_get(evas)) printf("Mouse is in!\n");
2141 * else printf("Mouse is out!\n");
2142 * @endcode
2143 */
2144EAPI Eina_Bool evas_pointer_inside_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2145 EAPI void evas_sync(Evas *e) EINA_ARG_NONNULL(1);
2146
2147/**
2148 * @defgroup Evas_Canvas_Events Canvas Events
2149 *
2150 * Functions relating to canvas events, which are mainly reports on
2151 * its internal states changing (an object got focused, the rendering
2152 * is updated, etc).
2153 *
2154 * Some of the functions in this group are exemplified @ref
2155 * Example_Evas_Events "here".
2156 *
2157 * @ingroup Evas_Canvas
2158 */
2159
2160/**
2161 * @addtogroup Evas_Canvas_Events
2162 * @{
2163 */
2164
2165/**
2166 * Add (register) a callback function to a given canvas event.
2167 *
2168 * @param e Canvas to attach a callback to
2169 * @param type The type of event that will trigger the callback
2170 * @param func The (callback) function to be called when the event is
2171 * triggered
2172 * @param data The data pointer to be passed to @p func
2173 *
2174 * This function adds a function callback to the canvas @p e when the
2175 * event of type @p type occurs on it. The function pointer is @p
2176 * func.
2177 *
2178 * In the event of a memory allocation error during the addition of
2179 * the callback to the canvas, evas_alloc_error() should be used to
2180 * determine the nature of the error, if any, and the program should
2181 * sensibly try and recover.
2182 *
2183 * A callback function must have the ::Evas_Event_Cb prototype
2184 * definition. The first parameter (@p data) in this definition will
2185 * have the same value passed to evas_event_callback_add() as the @p
2186 * data parameter, at runtime. The second parameter @p e is the canvas
2187 * pointer on which the event occurred. The third parameter @p
2188 * event_info is a pointer to a data structure that may or may not be
2189 * passed to the callback, depending on the event type that triggered
2190 * the callback. This is so because some events don't carry extra
2191 * context with them, but others do.
2192 *
2193 * The event type @p type to trigger the function may be one of
2194 * #EVAS_CALLBACK_RENDER_FLUSH_PRE, #EVAS_CALLBACK_RENDER_FLUSH_POST,
2195 * #EVAS_CALLBACK_CANVAS_FOCUS_IN, #EVAS_CALLBACK_CANVAS_FOCUS_OUT,
2196 * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN and
2197 * #EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT. This determines the kind of
2198 * event that will trigger the callback to be called. Only the last
2199 * two of the event types listed here provide useful event information
2200 * data -- a pointer to the recently focused Evas object. For the
2201 * others the @p event_info pointer is going to be @c NULL.
2202 *
2203 * Example:
2204 * @dontinclude evas-events.c
2205 * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_RENDER_FLUSH_PRE
2206 * @until two canvas event callbacks
2207 *
2208 * Looking to the callbacks registered above,
2209 * @dontinclude evas-events.c
2210 * @skip called when our rectangle gets focus
2211 * @until let's have our events back
2212 *
2213 * we see that the canvas flushes its rendering pipeline
2214 * (#EVAS_CALLBACK_RENDER_FLUSH_PRE) whenever the @c _resize_cb
2215 * routine takes place: it has to redraw that image at a different
2216 * size. Also, the callback on an object being focused comes just
2217 * after we focus it explicitly, on code.
2218 *
2219 * See the full @ref Example_Evas_Events "example".
2220 *
2221 * @note Be careful not to add the same callback multiple times, if
2222 * that's not what you want, because Evas won't check if a callback
2223 * existed before exactly as the one being registered (and thus, call
2224 * it more than once on the event, in this case). This would make
2225 * sense if you passed different functions and/or callback data, only.
2226 */
2227EAPI void evas_event_callback_add (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
2228
2229/**
2230 * Add (register) a callback function to a given canvas event with a
2231 * non-default priority set. Except for the priority field, it's exactly the
2232 * same as @ref evas_event_callback_add
2233 *
2234 * @param e Canvas to attach a callback to
2235 * @param type The type of event that will trigger the callback
2236 * @param priority The priority of the callback, lower values called first.
2237 * @param func The (callback) function to be called when the event is
2238 * triggered
2239 * @param data The data pointer to be passed to @p func
2240 *
2241 * @see evas_event_callback_add
2242 * @since 1.1.0
2243 */
2244EAPI 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);
2245
2246/**
2247 * Delete a callback function from the canvas.
2248 *
2249 * @param e Canvas to remove a callback from
2250 * @param type The type of event that was triggering the callback
2251 * @param func The function that was to be called when the event was triggered
2252 * @return The data pointer that was to be passed to the callback
2253 *
2254 * This function removes the most recently added callback from the
2255 * canvas @p e which was triggered by the event type @p type and was
2256 * calling the function @p func when triggered. If the removal is
2257 * successful it will also return the data pointer that was passed to
2258 * evas_event_callback_add() when the callback was added to the
2259 * canvas. If not successful NULL will be returned.
2260 *
2261 * Example:
2262 * @code
2263 * extern Evas *e;
2264 * void *my_data;
2265 * void focus_in_callback(void *data, Evas *e, void *event_info);
2266 *
2267 * my_data = evas_event_callback_del(ebject, EVAS_CALLBACK_CANVAS_FOCUS_IN, focus_in_callback);
2268 * @endcode
2269 */
2270EAPI void *evas_event_callback_del (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func) EINA_ARG_NONNULL(1, 3);
2271
2272/**
2273 * Delete (unregister) a callback function registered to a given
2274 * canvas event.
2275 *
2276 * @param e Canvas to remove an event callback from
2277 * @param type The type of event that was triggering the callback
2278 * @param func The function that was to be called when the event was
2279 * triggered
2280 * @param data The data pointer that was to be passed to the callback
2281 * @return The data pointer that was to be passed to the callback
2282 *
2283 * This function removes <b>the first</b> added callback from the
2284 * canvas @p e matching the event type @p type, the registered
2285 * function pointer @p func and the callback data pointer @p data. If
2286 * the removal is successful it will also return the data pointer that
2287 * was passed to evas_event_callback_add() (that will be the same as
2288 * the parameter) when the callback(s) was(were) added to the
2289 * canvas. If not successful @c NULL will be returned. A common use
2290 * would be to remove an exact match of a callback.
2291 *
2292 * Example:
2293 * @dontinclude evas-events.c
2294 * @skip evas_event_callback_del_full(evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
2295 * @until _object_focus_in_cb, NULL);
2296 *
2297 * See the full @ref Example_Evas_Events "example".
2298 *
2299 * @note For deletion of canvas events callbacks filtering by just
2300 * type and function pointer, user evas_event_callback_del().
2301 */
2302EAPI void *evas_event_callback_del_full (Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data) EINA_ARG_NONNULL(1, 3);
2303
2304/**
2305 * Push a callback on the post-event callback stack
2306 *
2307 * @param e Canvas to push the callback on
2308 * @param func The function that to be called when the stack is unwound
2309 * @param data The data pointer to be passed to the callback
2310 *
2311 * Evas has a stack of callbacks that get called after all the callbacks for
2312 * an event have triggered (all the objects it triggers on and all the callbacks
2313 * in each object triggered). When all these have been called, the stack is
2314 * unwond from most recently to least recently pushed item and removed from the
2315 * stack calling the callback set for it.
2316 *
2317 * This is intended for doing reverse logic-like processing, example - when a
2318 * child object that happens to get the event later is meant to be able to
2319 * "steal" functions from a parent and thus on unwind of this stack have its
2320 * function called first, thus being able to set flags, or return 0 from the
2321 * post-callback that stops all other post-callbacks in the current stack from
2322 * being called (thus basically allowing a child to take control, if the event
2323 * callback prepares information ready for taking action, but the post callback
2324 * actually does the action).
2325 *
2326 */
2327EAPI void evas_post_event_callback_push (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
2328
2329/**
2330 * Remove a callback from the post-event callback stack
2331 *
2332 * @param e Canvas to push the callback on
2333 * @param func The function that to be called when the stack is unwound
2334 *
2335 * This removes a callback from the stack added with
2336 * evas_post_event_callback_push(). The first instance of the function in
2337 * the callback stack is removed from being executed when the stack is
2338 * unwound. Further instances may still be run on unwind.
2339 */
2340EAPI void evas_post_event_callback_remove (Evas *e, Evas_Object_Event_Post_Cb func);
2341
2342/**
2343 * Remove a callback from the post-event callback stack
2344 *
2345 * @param e Canvas to push the callback on
2346 * @param func The function that to be called when the stack is unwound
2347 * @param data The data pointer to be passed to the callback
2348 *
2349 * This removes a callback from the stack added with
2350 * evas_post_event_callback_push(). The first instance of the function and data
2351 * in the callback stack is removed from being executed when the stack is
2352 * unwound. Further instances may still be run on unwind.
2353 */
2354EAPI void evas_post_event_callback_remove_full (Evas *e, Evas_Object_Event_Post_Cb func, const void *data);
2355
2356/**
2357 * @defgroup Evas_Event_Freezing_Group Input Events Freezing Functions
2358 *
2359 * Functions that deal with the freezing of input event processing of
2360 * an Evas canvas.
2361 *
2362 * There might be scenarios during a graphical user interface
2363 * program's use when the developer wishes the users wouldn't be able
2364 * to deliver input events to this application. It may, for example,
2365 * be the time for it to populate a view or to change some
2366 * layout. Assuming proper behavior with user interaction during this
2367 * exact time would be hard, as things are in a changing state. The
2368 * programmer can then tell the canvas to ignore input events,
2369 * bringing it back to normal behavior when he/she wants.
2370 *
2371 * Most of the time use of freezing events is done like this:
2372 * @code
2373 * evas_event_freeze(my_evas_canvas);
2374 * function_that_does_work_which_cant_be_interrupted_by_events();
2375 * evas_event_thaw(my_evas_canvas);
2376 * @endcode
2377 *
2378 * Some of the functions in this group are exemplified @ref
2379 * Example_Evas_Events "here".
2380 *
2381 * @ingroup Evas_Canvas_Events
2382 */
2383
2384/**
2385 * @addtogroup Evas_Event_Freezing_Group
2386 * @{
2387 */
2388
2389/**
2390 * Set the default set of flags an event begins with
2391 *
2392 * @param e The canvas to set the default event flags of
2393 * @param flags The default flags to use
2394 *
2395 * Events in evas can have an event_flags member. This starts out with
2396 * and initial value (no flags). this lets you set the default flags that
2397 * an event begins with to be @p flags
2398 *
2399 * @since 1.2
2400 */
2401EAPI void evas_event_default_flags_set (Evas *e, Evas_Event_Flags flags) EINA_ARG_NONNULL(1);
2402
2403/**
2404 * Get the defaulty set of flags an event begins with
2405 *
2406 * @param e The canvas to get the default event flags from
2407 * @return The default event flags for that canvas
2408 *
2409 * This gets the default event flags events are produced with when fed in.
2410 *
2411 * @see evas_event_default_flags_set()
2412 * @since 1.2
2413 */
2414EAPI Evas_Event_Flags evas_event_default_flags_get (const Evas *e) EINA_ARG_NONNULL(1);
2415
2416/**
2417 * Freeze all input events processing.
2418 *
2419 * @param e The canvas to freeze input events processing on.
2420 *
2421 * This function will indicate to Evas that the canvas @p e is to have
2422 * all input event processing frozen until a matching
2423 * evas_event_thaw() function is called on the same canvas. All events
2424 * of this kind during the freeze will get @b discarded. Every freeze
2425 * call must be matched by a thaw call in order to completely thaw out
2426 * a canvas (i.e. these calls may be nested). The most common use is
2427 * when you don't want the user to interact with your user interface
2428 * when you're populating a view or changing the layout.
2429 *
2430 * Example:
2431 * @dontinclude evas-events.c
2432 * @skip freeze input for 3 seconds
2433 * @until }
2434 * @dontinclude evas-events.c
2435 * @skip let's have our events back
2436 * @until }
2437 *
2438 * See the full @ref Example_Evas_Events "example".
2439 *
2440 * If you run that example, you'll see the canvas ignoring all input
2441 * events for 3 seconds, when the "f" key is pressed. In a more
2442 * realistic code we would be freezing while a toolkit or Edje was
2443 * doing some UI changes, thawing it back afterwards.
2444 */
2445EAPI void evas_event_freeze (Evas *e) EINA_ARG_NONNULL(1);
2446
2447/**
2448 * Thaw a canvas out after freezing (for input events).
2449 *
2450 * @param e The canvas to thaw out.
2451 *
2452 * This will thaw out a canvas after a matching evas_event_freeze()
2453 * call. If this call completely thaws out a canvas, i.e., there's no
2454 * other unbalanced call to evas_event_freeze(), events will start to
2455 * be processed again, but any "missed" events will @b not be
2456 * evaluated.
2457 *
2458 * See evas_event_freeze() for an example.
2459 */
2460EAPI void evas_event_thaw (Evas *e) EINA_ARG_NONNULL(1);
2461
2462/**
2463 * Return the freeze count on input events of a given canvas.
2464 *
2465 * @param e The canvas to fetch the freeze count from.
2466 *
2467 * This returns the number of times the canvas has been told to freeze
2468 * input events. It is possible to call evas_event_freeze() multiple
2469 * times, and these must be matched by evas_event_thaw() calls. This
2470 * call allows the program to discover just how many times things have
2471 * been frozen in case it may want to break out of a deep freeze state
2472 * where the count is high.
2473 *
2474 * Example:
2475 * @code
2476 * extern Evas *evas;
2477 *
2478 * while (evas_event_freeze_get(evas) > 0) evas_event_thaw(evas);
2479 * @endcode
2480 *
2481 */
2482EAPI int evas_event_freeze_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2483
2484/**
2485 * After thaw of a canvas, re-evaluate the state of objects and call callbacks
2486 *
2487 * @param e The canvas to evaluate after a thaw
2488 *
2489 * This is normally called after evas_event_thaw() to re-evaluate mouse
2490 * containment and other states and thus also call callbacks for mouse in and
2491 * out on new objects if the state change demands it.
2492 */
2493EAPI void evas_event_thaw_eval (Evas *e) EINA_ARG_NONNULL(1);
2494
2495/**
2496 * @}
2497 */
2498
2499/**
2500 * @defgroup Evas_Event_Feeding_Group Input Events Feeding Functions
2501 *
2502 * Functions to tell Evas that input events happened and should be
2503 * processed.
2504 *
2505 * @warning Most of the time these functions are @b not what you're looking for.
2506 * These functions should only be used if you're not working with ecore evas(or
2507 * another input handling system). If you're not using ecore evas please
2508 * consider using it, in most situation it will make life a lot easier.
2509 *
2510 * As explained in @ref intro_not_evas, Evas does not know how to poll
2511 * for input events, so the developer should do it and then feed such
2512 * events to the canvas to be processed. This is only required if
2513 * operating Evas directly. Modules such as Ecore_Evas do that for
2514 * you.
2515 *
2516 * Some of the functions in this group are exemplified @ref
2517 * Example_Evas_Events "here".
2518 *
2519 * @ingroup Evas_Canvas_Events
2520 */
2521
2522/**
2523 * @addtogroup Evas_Event_Feeding_Group
2524 * @{
2525 */
2526
2527/**
2528 * Get the number of mouse or multi presses currently active
2529 *
2530 * @p e The given canvas pointer.
2531 * @return The numer of presses (0 if none active).
2532 *
2533 * @since 1.2
2534 */
2535EAPI int evas_event_down_count_get (const Evas *e) EINA_ARG_NONNULL(1);
2536
2537/**
2538 * Mouse down event feed.
2539 *
2540 * @param e The given canvas pointer.
2541 * @param b The button number.
2542 * @param flags The evas button flags.
2543 * @param timestamp The timestamp of the mouse down event.
2544 * @param data The data for canvas.
2545 *
2546 * This function will set some evas properties that is necessary when
2547 * the mouse button is pressed. It prepares information to be treated
2548 * by the callback function.
2549 *
2550 */
2551EAPI void evas_event_feed_mouse_down (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2552
2553/**
2554 * Mouse up event feed.
2555 *
2556 * @param e The given canvas pointer.
2557 * @param b The button number.
2558 * @param flags evas button flags.
2559 * @param timestamp The timestamp of the mouse up event.
2560 * @param data The data for canvas.
2561 *
2562 * This function will set some evas properties that is necessary when
2563 * the mouse button is released. It prepares information to be treated
2564 * by the callback function.
2565 *
2566 */
2567EAPI void evas_event_feed_mouse_up (Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2568
2569/**
2570 * Mouse move event feed.
2571 *
2572 * @param e The given canvas pointer.
2573 * @param x The horizontal position of the mouse pointer.
2574 * @param y The vertical position of the mouse pointer.
2575 * @param timestamp The timestamp of the mouse up event.
2576 * @param data The data for canvas.
2577 *
2578 * This function will set some evas properties that is necessary when
2579 * the mouse is moved from its last position. It prepares information
2580 * to be treated by the callback function.
2581 *
2582 */
2583EAPI void evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2584
2585/**
2586 * Mouse in event feed.
2587 *
2588 * @param e The given canvas pointer.
2589 * @param timestamp The timestamp of the mouse up event.
2590 * @param data The data for canvas.
2591 *
2592 * This function will set some evas properties that is necessary when
2593 * the mouse in event happens. It prepares information to be treated
2594 * by the callback function.
2595 *
2596 */
2597EAPI void evas_event_feed_mouse_in (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2598
2599/**
2600 * Mouse out event feed.
2601 *
2602 * @param e The given canvas pointer.
2603 * @param timestamp Timestamp of the mouse up event.
2604 * @param data The data for canvas.
2605 *
2606 * This function will set some evas properties that is necessary when
2607 * the mouse out event happens. It prepares information to be treated
2608 * by the callback function.
2609 *
2610 */
2611EAPI void evas_event_feed_mouse_out (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2612 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);
2613 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);
2614 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);
2615
2616/**
2617 * Mouse cancel event feed.
2618 *
2619 * @param e The given canvas pointer.
2620 * @param timestamp The timestamp of the mouse up event.
2621 * @param data The data for canvas.
2622 *
2623 * This function will call evas_event_feed_mouse_up() when a
2624 * mouse cancel event happens.
2625 *
2626 */
2627EAPI void evas_event_feed_mouse_cancel (Evas *e, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2628
2629/**
2630 * Mouse wheel event feed.
2631 *
2632 * @param e The given canvas pointer.
2633 * @param direction The wheel mouse direction.
2634 * @param z How much mouse wheel was scrolled up or down.
2635 * @param timestamp The timestamp of the mouse up event.
2636 * @param data The data for canvas.
2637 *
2638 * This function will set some evas properties that is necessary when
2639 * the mouse wheel is scrolled up or down. It prepares information to
2640 * be treated by the callback function.
2641 *
2642 */
2643EAPI void evas_event_feed_mouse_wheel (Evas *e, int direction, int z, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2644
2645/**
2646 * Key down event feed
2647 *
2648 * @param e The canvas to thaw out
2649 * @param keyname Name of the key
2650 * @param key The key pressed.
2651 * @param string A String
2652 * @param compose The compose string
2653 * @param timestamp Timestamp of the mouse up event
2654 * @param data Data for canvas.
2655 *
2656 * This function will set some evas properties that is necessary when
2657 * a key is pressed. It prepares information to be treated by the
2658 * callback function.
2659 *
2660 */
2661EAPI 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);
2662
2663/**
2664 * Key up event feed
2665 *
2666 * @param e The canvas to thaw out
2667 * @param keyname Name of the key
2668 * @param key The key released.
2669 * @param string string
2670 * @param compose compose
2671 * @param timestamp Timestamp of the mouse up event
2672 * @param data Data for canvas.
2673 *
2674 * This function will set some evas properties that is necessary when
2675 * a key is released. It prepares information to be treated by the
2676 * callback function.
2677 *
2678 */
2679EAPI 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);
2680
2681/**
2682 * Hold event feed
2683 *
2684 * @param e The given canvas pointer.
2685 * @param hold The hold.
2686 * @param timestamp The timestamp of the mouse up event.
2687 * @param data The data for canvas.
2688 *
2689 * This function makes the object to stop sending events.
2690 *
2691 */
2692EAPI void evas_event_feed_hold (Evas *e, int hold, unsigned int timestamp, const void *data) EINA_ARG_NONNULL(1);
2693
2694/**
2695 * Re feed event.
2696 *
2697 * @param e The given canvas pointer.
2698 * @param event_copy the event to refeed
2699 * @param event_type Event type
2700 *
2701 * This function re-feeds the event pointed by event_copy
2702 *
2703 * This function call evas_event_feed_* functions, so it can
2704 * cause havoc if not used wisely. Please use it responsibly.
2705 */
2706EAPI void evas_event_refeed_event (Evas *e, void *event_copy, Evas_Callback_Type event_type) EINA_ARG_NONNULL(1);
2707
2708
2709/**
2710 * @}
2711 */
2712
2713/**
2714 * @}
2715 */
2716
2717/**
2718 * @defgroup Evas_Image_Group Image Functions
2719 *
2720 * Functions that deals with images at canvas level.
2721 *
2722 * @ingroup Evas_Canvas
2723 */
2724
2725/**
2726 * @addtogroup Evas_Image_Group
2727 * @{
2728 */
2729
2730/**
2731 * Flush the image cache of the canvas.
2732 *
2733 * @param e The given evas pointer.
2734 *
2735 * This function flushes image cache of canvas.
2736 *
2737 */
2738EAPI void evas_image_cache_flush (Evas *e) EINA_ARG_NONNULL(1);
2739
2740/**
2741 * Reload the image cache
2742 *
2743 * @param e The given evas pointer.
2744 *
2745 * This function reloads the image cache of canvas.
2746 *
2747 */
2748EAPI void evas_image_cache_reload (Evas *e) EINA_ARG_NONNULL(1);
2749
2750/**
2751 * Set the image cache.
2752 *
2753 * @param e The given evas pointer.
2754 * @param size The cache size.
2755 *
2756 * This function sets the image cache of canvas in bytes.
2757 *
2758 */
2759EAPI void evas_image_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1);
2760
2761/**
2762 * Get the image cache
2763 *
2764 * @param e The given evas pointer.
2765 *
2766 * This function returns the image cache size of canvas in bytes.
2767 *
2768 */
2769EAPI int evas_image_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2770
2771/**
2772 * Get the maximum image size evas can possibly handle
2773 *
2774 * @param e The given evas pointer.
2775 * @param maxw Pointer to hold the return value in pixels of the maxumum width
2776 * @param maxh Pointer to hold the return value in pixels of the maximum height
2777 *
2778 * This function returns the larges image or surface size that evas can handle
2779 * in pixels, and if there is one, returns EINA_TRUE. It returns EINA_FALSE
2780 * if no extra constraint on maximum image size exists. You still should
2781 * check the return values of @p maxw and @p maxh as there may still be a
2782 * limit, just a much higher one.
2783 *
2784 * @since 1.1
2785 */
2786EAPI Eina_Bool evas_image_max_size_get (const Evas *e, int *maxw, int *maxh) EINA_ARG_NONNULL(1);
2787
2788/**
2789 * @}
2790 */
2791
2792/**
2793 * @defgroup Evas_Font_Group Font Functions
2794 *
2795 * Functions that deals with fonts.
2796 *
2797 * @ingroup Evas_Canvas
2798 */
2799
2800/**
2801 * Changes the font hinting for the given evas.
2802 *
2803 * @param e The given evas.
2804 * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
2805 * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
2806 * @ingroup Evas_Font_Group
2807 */
2808EAPI void evas_font_hinting_set (Evas *e, Evas_Font_Hinting_Flags hinting) EINA_ARG_NONNULL(1);
2809
2810/**
2811 * Retrieves the font hinting used by the given evas.
2812 *
2813 * @param e The given evas to query.
2814 * @return The hinting in use, one of #EVAS_FONT_HINTING_NONE,
2815 * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
2816 * @ingroup Evas_Font_Group
2817 */
2818EAPI Evas_Font_Hinting_Flags evas_font_hinting_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2819
2820/**
2821 * Checks if the font hinting is supported by the given evas.
2822 *
2823 * @param e The given evas to query.
2824 * @param hinting The hinting to use, one of #EVAS_FONT_HINTING_NONE,
2825 * #EVAS_FONT_HINTING_AUTO, #EVAS_FONT_HINTING_BYTECODE.
2826 * @return @c EINA_TRUE if it is supported, @c EINA_FALSE otherwise.
2827 * @ingroup Evas_Font_Group
2828 */
2829EAPI Eina_Bool evas_font_hinting_can_hint (const Evas *e, Evas_Font_Hinting_Flags hinting) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2830
2831
2832/**
2833 * Force the given evas and associated engine to flush its font cache.
2834 *
2835 * @param e The given evas to flush font cache.
2836 * @ingroup Evas_Font_Group
2837 */
2838EAPI void evas_font_cache_flush (Evas *e) EINA_ARG_NONNULL(1);
2839
2840/**
2841 * Changes the size of font cache of the given evas.
2842 *
2843 * @param e The given evas to flush font cache.
2844 * @param size The size, in bytes.
2845 *
2846 * @ingroup Evas_Font_Group
2847 */
2848EAPI void evas_font_cache_set (Evas *e, int size) EINA_ARG_NONNULL(1);
2849
2850/**
2851 * Changes the size of font cache of the given evas.
2852 *
2853 * @param e The given evas to flush font cache.
2854 * @return The size, in bytes.
2855 *
2856 * @ingroup Evas_Font_Group
2857 */
2858EAPI int evas_font_cache_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2859
2860
2861/**
2862 * List of available font descriptions known or found by this evas.
2863 *
2864 * The list depends on Evas compile time configuration, such as
2865 * fontconfig support, and the paths provided at runtime as explained
2866 * in @ref Evas_Font_Path_Group.
2867 *
2868 * @param e The evas instance to query.
2869 * @return a newly allocated list of strings. Do not change the
2870 * strings. Be sure to call evas_font_available_list_free()
2871 * after you're done.
2872 *
2873 * @ingroup Evas_Font_Group
2874 */
2875EAPI Eina_List *evas_font_available_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2876
2877/**
2878 * Free list of font descriptions returned by evas_font_dir_available_list().
2879 *
2880 * @param e The evas instance that returned such list.
2881 * @param available the list returned by evas_font_dir_available_list().
2882 *
2883 * @ingroup Evas_Font_Group
2884 */
2885EAPI void evas_font_available_list_free(Evas *e, Eina_List *available) EINA_ARG_NONNULL(1);
2886
2887/**
2888 * @defgroup Evas_Font_Path_Group Font Path Functions
2889 *
2890 * Functions that edit the paths being used to load fonts.
2891 *
2892 * @ingroup Evas_Font_Group
2893 */
2894
2895/**
2896 * Removes all font paths loaded into memory for the given evas.
2897 * @param e The given evas.
2898 * @ingroup Evas_Font_Path_Group
2899 */
2900EAPI void evas_font_path_clear (Evas *e) EINA_ARG_NONNULL(1);
2901
2902/**
2903 * Appends a font path to the list of font paths used by the given evas.
2904 * @param e The given evas.
2905 * @param path The new font path.
2906 * @ingroup Evas_Font_Path_Group
2907 */
2908EAPI void evas_font_path_append (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
2909
2910/**
2911 * Prepends a font path to the list of font paths used by the given evas.
2912 * @param e The given evas.
2913 * @param path The new font path.
2914 * @ingroup Evas_Font_Path_Group
2915 */
2916EAPI void evas_font_path_prepend (Evas *e, const char *path) EINA_ARG_NONNULL(1, 2);
2917
2918/**
2919 * Retrieves the list of font paths used by the given evas.
2920 * @param e The given evas.
2921 * @return The list of font paths used.
2922 * @ingroup Evas_Font_Path_Group
2923 */
2924EAPI const Eina_List *evas_font_path_list (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
2925
2926/**
2927 * @defgroup Evas_Object_Group Generic Object Functions
2928 *
2929 * Functions that manipulate generic Evas objects.
2930 *
2931 * All Evas displaying units are Evas objects. One handles them all by
2932 * means of the handle ::Evas_Object. Besides Evas treats their
2933 * objects equally, they have @b types, which define their specific
2934 * behavior (and individual API).
2935 *
2936 * Evas comes with a set of built-in object types:
2937 * - rectangle,
2938 * - line,
2939 * - polygon,
2940 * - text,
2941 * - textblock and
2942 * - image.
2943 *
2944 * These functions apply to @b any Evas object, whichever type that
2945 * may have.
2946 *
2947 * @note The built-in types which are most used are rectangles, text
2948 * and images. In fact, with these ones one can create 2D interfaces
2949 * of arbitrary complexity and EFL makes it easy.
2950 */
2951
2952/**
2953 * @defgroup Evas_Object_Group_Basic Basic Object Manipulation
2954 *
2955 * Almost every evas object created will have some generic function used to
2956 * manipulate it. That's because there are a number of basic actions to be done
2957 * to objects that are irrespective of the object's type, things like:
2958 * @li Showing/Hiding
2959 * @li Setting(and getting) geometry
2960 * @li Bring up or down a layer
2961 * @li Color management
2962 * @li Handling focus
2963 * @li Clipping
2964 * @li Reference counting
2965 *
2966 * All of this issues are handled through the functions here grouped. Examples
2967 * of these function can be seen in @ref Example_Evas_Object_Manipulation(which
2968 * deals with the most common ones) and in @ref Example_Evas_Stacking(which
2969 * deals with stacking functions).
2970 *
2971 * @ingroup Evas_Object_Group
2972 */
2973
2974/**
2975 * @addtogroup Evas_Object_Group_Basic
2976 * @{
2977 */
2978
2979/**
2980 * Clip one object to another.
2981 *
2982 * @param obj The object to be clipped
2983 * @param clip The object to clip @p obj by
2984 *
2985 * This function will clip the object @p obj to the area occupied by
2986 * the object @p clip. This means the object @p obj will only be
2987 * visible within the area occupied by the clipping object (@p clip).
2988 *
2989 * The color of the object being clipped will be multiplied by the
2990 * color of the clipping one, so the resulting color for the former
2991 * will be <code>RESULT = (OBJ * CLIP) / (255 * 255)</code>, per color
2992 * element (red, green, blue and alpha).
2993 *
2994 * Clipping is recursive, so clipping objects may be clipped by
2995 * others, and their color will in term be multiplied. You may @b not
2996 * set up circular clipping lists (i.e. object 1 clips object 2, which
2997 * clips object 1): the behavior of Evas is undefined in this case.
2998 *
2999 * Objects which do not clip others are visible in the canvas as
3000 * normal; <b>those that clip one or more objects become invisible
3001 * themselves</b>, only affecting what they clip. If an object ceases
3002 * to have other objects being clipped by it, it will become visible
3003 * again.
3004 *
3005 * The visibility of an object affects the objects that are clipped by
3006 * it, so if the object clipping others is not shown (as in
3007 * evas_object_show()), the objects clipped by it will not be shown
3008 * either.
3009 *
3010 * If @p obj was being clipped by another object when this function is
3011 * called, it gets implicitly removed from the old clipper's domain
3012 * and is made now to be clipped by its new clipper.
3013 *
3014 * The following figure illustrates some clipping in Evas:
3015 *
3016 * @image html clipping.png
3017 * @image rtf clipping.png
3018 * @image latex clipping.eps
3019 *
3020 * @note At the moment the <b>only objects that can validly be used to
3021 * clip other objects are rectangle objects</b>. All other object
3022 * types are invalid and the result of using them is undefined. The
3023 * clip object @p clip must be a valid object, but can also be @c
3024 * NULL, in which case the effect of this function is the same as
3025 * calling evas_object_clip_unset() on the @p obj object.
3026 *
3027 * Example:
3028 * @dontinclude evas-object-manipulation.c
3029 * @skip solid white clipper (note that it's the default color for a
3030 * @until evas_object_show(d.clipper);
3031 *
3032 * See the full @ref Example_Evas_Object_Manipulation "example".
3033 */
3034EAPI void evas_object_clip_set (Evas_Object *obj, Evas_Object *clip) EINA_ARG_NONNULL(1, 2);
3035
3036/**
3037 * Get the object clipping @p obj (if any).
3038 *
3039 * @param obj The object to get the clipper from
3040 *
3041 * This function returns the object clipping @p obj. If @p obj is
3042 * not being clipped at all, @c NULL is returned. The object @p obj
3043 * must be a valid ::Evas_Object.
3044 *
3045 * See also evas_object_clip_set(), evas_object_clip_unset() and
3046 * evas_object_clipees_get().
3047 *
3048 * Example:
3049 * @dontinclude evas-object-manipulation.c
3050 * @skip if (evas_object_clip_get(d.img) == d.clipper)
3051 * @until return
3052 *
3053 * See the full @ref Example_Evas_Object_Manipulation "example".
3054 */
3055EAPI Evas_Object *evas_object_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3056
3057/**
3058 * Disable/cease clipping on a clipped @p obj object.
3059 *
3060 * @param obj The object to cease clipping on
3061 *
3062 * This function disables clipping for the object @p obj, if it was
3063 * already clipped, i.e., its visibility and color get detached from
3064 * the previous clipper. If it wasn't, this has no effect. The object
3065 * @p obj must be a valid ::Evas_Object.
3066 *
3067 * See also evas_object_clip_set() (for an example),
3068 * evas_object_clipees_get() and evas_object_clip_get().
3069 *
3070 */
3071EAPI void evas_object_clip_unset (Evas_Object *obj);
3072
3073/**
3074 * Return a list of objects currently clipped by @p obj.
3075 *
3076 * @param obj The object to get a list of clippees from
3077 * @return a list of objects being clipped by @p obj
3078 *
3079 * This returns the internal list handle that contains all objects
3080 * clipped by the object @p obj. If none are clipped by it, the call
3081 * returns @c NULL. This list is only valid until the clip list is
3082 * changed and should be fetched again with another call to
3083 * evas_object_clipees_get() if any objects being clipped by this
3084 * object are unclipped, clipped by a new object, deleted or get the
3085 * clipper deleted. These operations will invalidate the list
3086 * returned, so it should not be used anymore after that point. Any
3087 * use of the list after this may have undefined results, possibly
3088 * leading to crashes. The object @p obj must be a valid
3089 * ::Evas_Object.
3090 *
3091 * See also evas_object_clip_set(), evas_object_clip_unset() and
3092 * evas_object_clip_get().
3093 *
3094 * Example:
3095 * @code
3096 * extern Evas_Object *obj;
3097 * Evas_Object *clipper;
3098 *
3099 * clipper = evas_object_clip_get(obj);
3100 * if (clipper)
3101 * {
3102 * Eina_List *clippees, *l;
3103 * Evas_Object *obj_tmp;
3104 *
3105 * clippees = evas_object_clipees_get(clipper);
3106 * printf("Clipper clips %i objects\n", eina_list_count(clippees));
3107 * EINA_LIST_FOREACH(clippees, l, obj_tmp)
3108 * evas_object_show(obj_tmp);
3109 * }
3110 * @endcode
3111 */
3112EAPI const Eina_List *evas_object_clipees_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3113
3114
3115/**
3116 * Sets or unsets a given object as the currently focused one on its
3117 * canvas.
3118 *
3119 * @param obj The object to be focused or unfocused.
3120 * @param focus @c EINA_TRUE, to set it as focused or @c EINA_FALSE,
3121 * to take away the focus from it.
3122 *
3123 * Changing focus only affects where (key) input events go. There can
3124 * be only one object focused at any time. If @p focus is @c
3125 * EINA_TRUE, @p obj will be set as the currently focused object and
3126 * it will receive all keyboard events that are not exclusive key
3127 * grabs on other objects.
3128 *
3129 * Example:
3130 * @dontinclude evas-events.c
3131 * @skip evas_object_focus_set
3132 * @until evas_object_focus_set
3133 *
3134 * See the full example @ref Example_Evas_Events "here".
3135 *
3136 * @see evas_object_focus_get
3137 * @see evas_focus_get
3138 * @see evas_object_key_grab
3139 * @see evas_object_key_ungrab
3140 */
3141EAPI void evas_object_focus_set (Evas_Object *obj, Eina_Bool focus) EINA_ARG_NONNULL(1);
3142
3143/**
3144 * Retrieve whether an object has the focus.
3145 *
3146 * @param obj The object to retrieve focus information from.
3147 * @return @c EINA_TRUE if the object has the focus, @c EINA_FALSE
3148 * otherwise.
3149 *
3150 * If the passed object is the currently focused one, @c EINA_TRUE is
3151 * returned. @c EINA_FALSE is returned, otherwise.
3152 *
3153 * Example:
3154 * @dontinclude evas-events.c
3155 * @skip And again
3156 * @until something is bad
3157 *
3158 * See the full example @ref Example_Evas_Events "here".
3159 *
3160 * @see evas_object_focus_set
3161 * @see evas_focus_get
3162 * @see evas_object_key_grab
3163 * @see evas_object_key_ungrab
3164 */
3165EAPI Eina_Bool evas_object_focus_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3166
3167
3168/**
3169 * Sets the layer of the its canvas that the given object will be part
3170 * of.
3171 *
3172 * @param obj The given Evas object.
3173 * @param l The number of the layer to place the object on.
3174 * Must be between #EVAS_LAYER_MIN and #EVAS_LAYER_MAX.
3175 *
3176 * If you don't use this function, you'll be dealing with an @b unique
3177 * layer of objects, the default one. Additional layers are handy when
3178 * you don't want a set of objects to interfere with another set with
3179 * regard to @b stacking. Two layers are completely disjoint in that
3180 * matter.
3181 *
3182 * This is a low-level function, which you'd be using when something
3183 * should be always on top, for example.
3184 *
3185 * @warning Be careful, it doesn't make sense to change the layer of
3186 * smart objects' children. Smart objects have a layer of their own,
3187 * which should contain all their children objects.
3188 *
3189 * @see evas_object_layer_get()
3190 */
3191EAPI void evas_object_layer_set (Evas_Object *obj, short l) EINA_ARG_NONNULL(1);
3192
3193/**
3194 * Retrieves the layer of its canvas that the given object is part of.
3195 *
3196 * @param obj The given Evas object to query layer from
3197 * @return Number of the its layer
3198 *
3199 * @see evas_object_layer_set()
3200 */
3201EAPI short evas_object_layer_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3202
3203
3204/**
3205 * Sets the name of the given Evas object to the given name.
3206 *
3207 * @param obj The given object.
3208 * @param name The given name.
3209 *
3210 * There might be occasions where one would like to name his/her
3211 * objects.
3212 *
3213 * Example:
3214 * @dontinclude evas-events.c
3215 * @skip d.bg = evas_object_rectangle_add(d.canvas);
3216 * @until evas_object_name_set(d.bg, "our dear rectangle");
3217 *
3218 * See the full @ref Example_Evas_Events "example".
3219 */
3220EAPI void evas_object_name_set (Evas_Object *obj, const char *name) EINA_ARG_NONNULL(1);
3221
3222/**
3223 * Retrieves the name of the given Evas object.
3224 *
3225 * @param obj The given object.
3226 * @return The name of the object or @c NULL, if no name has been given
3227 * to it.
3228 *
3229 * Example:
3230 * @dontinclude evas-events.c
3231 * @skip fprintf(stdout, "An object got focused: %s\n",
3232 * @until evas_focus_get
3233 *
3234 * See the full @ref Example_Evas_Events "example".
3235 */
3236EAPI const char *evas_object_name_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3237
3238
3239/**
3240 * Increments object reference count to defer its deletion.
3241 *
3242 * @param obj The given Evas object to reference
3243 *
3244 * This increments the reference count of an object, which if greater
3245 * than 0 will defer deletion by evas_object_del() until all
3246 * references are released back (counter back to 0). References cannot
3247 * go below 0 and unreferencing past that will result in the reference
3248 * count being limited to 0. References are limited to <c>2^32 - 1</c>
3249 * for an object. Referencing it more than this will result in it
3250 * being limited to this value.
3251 *
3252 * @see evas_object_unref()
3253 * @see evas_object_del()
3254 *
3255 * @note This is a <b>very simple<b> reference counting mechanism! For
3256 * instance, Evas is not ready to check for pending references on a
3257 * canvas deletion, or things like that. This is useful on scenarios
3258 * where, inside a code block, callbacks exist which would possibly
3259 * delete an object we are operating on afterwards. Then, one would
3260 * evas_object_ref() it on the beginning of the block and
3261 * evas_object_unref() it on the end. It would then be deleted at this
3262 * point, if it should be.
3263 *
3264 * Example:
3265 * @code
3266 * evas_object_ref(obj);
3267 *
3268 * // action here...
3269 * evas_object_smart_callback_call(obj, SIG_SELECTED, NULL);
3270 * // more action here...
3271 * evas_object_unref(obj);
3272 * @endcode
3273 *
3274 * @ingroup Evas_Object_Group_Basic
3275 * @since 1.1.0
3276 */
3277EAPI void evas_object_ref (Evas_Object *obj);
3278
3279/**
3280 * Decrements object reference count.
3281 *
3282 * @param obj The given Evas object to unreference
3283 *
3284 * This decrements the reference count of an object. If the object has
3285 * had evas_object_del() called on it while references were more than
3286 * 0, it will be deleted at the time this function is called and puts
3287 * the counter back to 0. See evas_object_ref() for more information.
3288 *
3289 * @see evas_object_ref() (for an example)
3290 * @see evas_object_del()
3291 *
3292 * @ingroup Evas_Object_Group_Basic
3293 * @since 1.1.0
3294 */
3295EAPI void evas_object_unref (Evas_Object *obj);
3296
3297
3298/**
3299 * Marks the given Evas object for deletion (when Evas will free its
3300 * memory).
3301 *
3302 * @param obj The given Evas object.
3303 *
3304 * This call will mark @p obj for deletion, which will take place
3305 * whenever it has no more references to it (see evas_object_ref() and
3306 * evas_object_unref()).
3307 *
3308 * At actual deletion time, which may or may not be just after this
3309 * call, ::EVAS_CALLBACK_DEL and ::EVAS_CALLBACK_FREE callbacks will
3310 * be called. If the object currently had the focus, its
3311 * ::EVAS_CALLBACK_FOCUS_OUT callback will also be called.
3312 *
3313 * @see evas_object_ref()
3314 * @see evas_object_unref()
3315 *
3316 * @ingroup Evas_Object_Group_Basic
3317 */
3318EAPI void evas_object_del (Evas_Object *obj) EINA_ARG_NONNULL(1);
3319
3320/**
3321 * Move the given Evas object to the given location inside its
3322 * canvas' viewport.
3323 *
3324 * @param obj The given Evas object.
3325 * @param x X position to move the object to, in canvas units.
3326 * @param y Y position to move the object to, in canvas units.
3327 *
3328 * Besides being moved, the object's ::EVAS_CALLBACK_MOVE callback
3329 * will be called.
3330 *
3331 * @note Naturally, newly created objects are placed at the canvas'
3332 * origin: <code>0, 0</code>.
3333 *
3334 * Example:
3335 * @dontinclude evas-object-manipulation.c
3336 * @skip evas_object_image_border_set(d.clipper_border, 3, 3, 3, 3);
3337 * @until evas_object_show
3338 *
3339 * See the full @ref Example_Evas_Object_Manipulation "example".
3340 *
3341 * @ingroup Evas_Object_Group_Basic
3342 */
3343EAPI void evas_object_move (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
3344
3345/**
3346 * Changes the size of the given Evas object.
3347 *
3348 * @param obj The given Evas object.
3349 * @param w The new width of the Evas object.
3350 * @param h The new height of the Evas object.
3351 *
3352 * Besides being resized, the object's ::EVAS_CALLBACK_RESIZE callback
3353 * will be called.
3354 *
3355 * @note Newly created objects have zeroed dimensions. Then, you most
3356 * probably want to use evas_object_resize() on them after they are
3357 * created.
3358 *
3359 * @note Be aware that resizing an object changes its drawing area,
3360 * but that does imply the object is rescaled! For instance, images
3361 * are filled inside their drawing area using the specifications of
3362 * evas_object_image_fill_set(). Thus to scale the image to match
3363 * exactly your drawing area, you need to change the
3364 * evas_object_image_fill_set() as well.
3365 *
3366 * @note This is more evident in images, but text, textblock, lines
3367 * and polygons will behave similarly. Check their specific APIs to
3368 * know how to achieve your desired behavior. Consider the following
3369 * example:
3370 *
3371 * @code
3372 * // rescale image to fill exactly its area without tiling:
3373 * evas_object_resize(img, w, h);
3374 * evas_object_image_fill_set(img, 0, 0, w, h);
3375 * @endcode
3376 *
3377 * @ingroup Evas_Object_Group_Basic
3378 */
3379EAPI void evas_object_resize (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
3380
3381/**
3382 * Retrieves the position and (rectangular) size of the given Evas
3383 * object.
3384 *
3385 * @param obj The given Evas object.
3386 * @param x Pointer to an integer in which to store the X coordinate
3387 * of the object.
3388 * @param y Pointer to an integer in which to store the Y coordinate
3389 * of the object.
3390 * @param w Pointer to an integer in which to store the width of the
3391 * object.
3392 * @param h Pointer to an integer in which to store the height of the
3393 * object.
3394 *
3395 * The position, naturally, will be relative to the top left corner of
3396 * the canvas' viewport.
3397 *
3398 * @note Use @c NULL pointers on the geometry components you're not
3399 * interested in: they'll be ignored by the function.
3400 *
3401 * Example:
3402 * @dontinclude evas-events.c
3403 * @skip int w, h, cw, ch;
3404 * @until return
3405 *
3406 * See the full @ref Example_Evas_Events "example".
3407 *
3408 * @ingroup Evas_Object_Group_Basic
3409 */
3410EAPI 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);
3411
3412
3413/**
3414 * Makes the given Evas object visible.
3415 *
3416 * @param obj The given Evas object.
3417 *
3418 * Besides becoming visible, the object's ::EVAS_CALLBACK_SHOW
3419 * callback will be called.
3420 *
3421 * @see evas_object_hide() for more on object visibility.
3422 * @see evas_object_visible_get()
3423 *
3424 * @ingroup Evas_Object_Group_Basic
3425 */
3426EAPI void evas_object_show (Evas_Object *obj) EINA_ARG_NONNULL(1);
3427
3428/**
3429 * Makes the given Evas object invisible.
3430 *
3431 * @param obj The given Evas object.
3432 *
3433 * Hidden objects, besides not being shown at all in your canvas,
3434 * won't be checked for changes on the canvas rendering
3435 * process. Furthermore, they will not catch input events. Thus, they
3436 * are much ligher (in processing needs) than an object that is
3437 * invisible due to indirect causes, such as being clipped or out of
3438 * the canvas' viewport.
3439 *
3440 * Besides becoming hidden, @p obj object's ::EVAS_CALLBACK_SHOW
3441 * callback will be called.
3442 *
3443 * @note All objects are created in the hidden state! If you want them
3444 * shown, use evas_object_show() after their creation.
3445 *
3446 * @see evas_object_show()
3447 * @see evas_object_visible_get()
3448 *
3449 * Example:
3450 * @dontinclude evas-object-manipulation.c
3451 * @skip if (evas_object_visible_get(d.clipper))
3452 * @until return
3453 *
3454 * See the full @ref Example_Evas_Object_Manipulation "example".
3455 *
3456 * @ingroup Evas_Object_Group_Basic
3457 */
3458EAPI void evas_object_hide (Evas_Object *obj) EINA_ARG_NONNULL(1);
3459
3460/**
3461 * Retrieves whether or not the given Evas object is visible.
3462 *
3463 * @param obj The given Evas object.
3464 * @return @c EINA_TRUE if the object is visible, @c EINA_FALSE
3465 * otherwise.
3466 *
3467 * This retrieves an object's visibility as the one enforced by
3468 * evas_object_show() and evas_object_hide().
3469 *
3470 * @note The value returned isn't, by any means, influenced by
3471 * clippers covering @obj, it being out of its canvas' viewport or
3472 * stacked below other object.
3473 *
3474 * @see evas_object_show()
3475 * @see evas_object_hide() (for an example)
3476 *
3477 * @ingroup Evas_Object_Group_Basic
3478 */
3479EAPI Eina_Bool evas_object_visible_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3480
3481
3482/**
3483 * Sets the general/main color of the given Evas object to the given
3484 * one.
3485 *
3486 * @param obj The given Evas object.
3487 * @param r The red component of the given color.
3488 * @param g The green component of the given color.
3489 * @param b The blue component of the given color.
3490 * @param a The alpha component of the given color.
3491 *
3492 * @see evas_object_color_get() (for an example)
3493 * @note These color values are expected to be premultiplied by @p a.
3494 *
3495 * @ingroup Evas_Object_Group_Basic
3496 */
3497EAPI void evas_object_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
3498
3499/**
3500 * Retrieves the general/main color of the given Evas object.
3501 *
3502 * @param obj The given Evas object to retrieve color from.
3503 * @param r Pointer to an integer in which to store the red component
3504 * of the color.
3505 * @param g Pointer to an integer in which to store the green
3506 * component of the color.
3507 * @param b Pointer to an integer in which to store the blue component
3508 * of the color.
3509 * @param a Pointer to an integer in which to store the alpha
3510 * component of the color.
3511 *
3512 * Retrieves the “main” color's RGB component (and alpha channel)
3513 * values, <b>which range from 0 to 255</b>. For the alpha channel,
3514 * which defines the object's transparency level, 0 means totally
3515 * transparent, while 255 means opaque. These color values are
3516 * premultiplied by the alpha value.
3517 *
3518 * Usually you’ll use this attribute for text and rectangle objects,
3519 * where the “main” color is their unique one. If set for objects
3520 * which themselves have colors, like the images one, those colors get
3521 * modulated by this one.
3522 *
3523 * @note All newly created Evas rectangles get the default color
3524 * values of <code>255 255 255 255</code> (opaque white).
3525 *
3526 * @note Use @c NULL pointers on the components you're not interested
3527 * in: they'll be ignored by the function.
3528 *
3529 * Example:
3530 * @dontinclude evas-object-manipulation.c
3531 * @skip int alpha, r, g, b;
3532 * @until return
3533 *
3534 * See the full @ref Example_Evas_Object_Manipulation "example".
3535 *
3536 * @ingroup Evas_Object_Group_Basic
3537 */
3538EAPI void evas_object_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
3539
3540
3541/**
3542 * Retrieves the Evas canvas that the given object lives on.
3543 *
3544 * @param obj The given Evas object.
3545 * @return A pointer to the canvas where the object is on.
3546 *
3547 * This function is most useful at code contexts where you need to
3548 * operate on the canvas but have only the object pointer.
3549 *
3550 * @ingroup Evas_Object_Group_Basic
3551 */
3552EAPI Evas *evas_object_evas_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3553
3554/**
3555 * Retrieves the type of the given Evas object.
3556 *
3557 * @param obj The given object.
3558 * @return The type of the object.
3559 *
3560 * For Evas' builtin types, the return strings will be one of:
3561 * - <c>"rectangle"</c>,
3562 * - <c>"line"</c>,
3563 * - <c>"polygon"</c>,
3564 * - <c>"text"</c>,
3565 * - <c>"textblock"</c> and
3566 * - <c>"image"</c>.
3567 *
3568 * For Evas smart objects (see @ref Evas_Smart_Group), the name of the
3569 * smart class itself is returned on this call. For the built-in smart
3570 * objects, these names are:
3571 * - <c>"EvasObjectSmartClipped"</c>, for the clipped smart object
3572 * - <c>"Evas_Object_Box"</c>, for the box object and
3573 * - <c>"Evas_Object_Table"</c>, for the table object.
3574 *
3575 * Example:
3576 * @dontinclude evas-object-manipulation.c
3577 * @skip d.img = evas_object_image_filled_add(d.canvas);
3578 * @until border on the
3579 *
3580 * See the full @ref Example_Evas_Object_Manipulation "example".
3581 */
3582EAPI const char *evas_object_type_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3583
3584/**
3585 * Raise @p obj to the top of its layer.
3586 *
3587 * @param obj the object to raise
3588 *
3589 * @p obj will, then, be the highest one in the layer it belongs
3590 * to. Object on other layers won't get touched.
3591 *
3592 * @see evas_object_stack_above()
3593 * @see evas_object_stack_below()
3594 * @see evas_object_lower()
3595 */
3596EAPI void evas_object_raise (Evas_Object *obj) EINA_ARG_NONNULL(1);
3597
3598/**
3599 * Lower @p obj to the bottom of its layer.
3600 *
3601 * @param obj the object to lower
3602 *
3603 * @p obj will, then, be the lowest one in the layer it belongs
3604 * to. Objects on other layers won't get touched.
3605 *
3606 * @see evas_object_stack_above()
3607 * @see evas_object_stack_below()
3608 * @see evas_object_raise()
3609 */
3610EAPI void evas_object_lower (Evas_Object *obj) EINA_ARG_NONNULL(1);
3611
3612/**
3613 * Stack @p obj immediately above @p above
3614 *
3615 * @param obj the object to stack
3616 * @param above the object above which to stack
3617 *
3618 * Objects, in a given canvas, are stacked in the order they get added
3619 * to it. This means that, if they overlap, the highest ones will
3620 * cover the lowest ones, in that order. This function is a way to
3621 * change the stacking order for the objects.
3622 *
3623 * This function is intended to be used with <b>objects belonging to
3624 * the same layer</b> in a given canvas, otherwise it will fail (and
3625 * accomplish nothing).
3626 *
3627 * If you have smart objects on your canvas and @p obj is a member of
3628 * one of them, then @p above must also be a member of the same
3629 * smart object.
3630 *
3631 * Similarly, if @p obj is not a member of a smart object, @p above
3632 * must not be either.
3633 *
3634 * @see evas_object_layer_get()
3635 * @see evas_object_layer_set()
3636 * @see evas_object_stack_below()
3637 */
3638EAPI void evas_object_stack_above (Evas_Object *obj, Evas_Object *above) EINA_ARG_NONNULL(1, 2);
3639
3640/**
3641 * Stack @p obj immediately below @p below
3642 *
3643 * @param obj the object to stack
3644 * @param below the object below which to stack
3645 *
3646 * Objects, in a given canvas, are stacked in the order they get added
3647 * to it. This means that, if they overlap, the highest ones will
3648 * cover the lowest ones, in that order. This function is a way to
3649 * change the stacking order for the objects.
3650 *
3651 * This function is intended to be used with <b>objects belonging to
3652 * the same layer</b> in a given canvas, otherwise it will fail (and
3653 * accomplish nothing).
3654 *
3655 * If you have smart objects on your canvas and @p obj is a member of
3656 * one of them, then @p below must also be a member of the same
3657 * smart object.
3658 *
3659 * Similarly, if @p obj is not a member of a smart object, @p below
3660 * must not be either.
3661 *
3662 * @see evas_object_layer_get()
3663 * @see evas_object_layer_set()
3664 * @see evas_object_stack_below()
3665 */
3666EAPI void evas_object_stack_below (Evas_Object *obj, Evas_Object *below) EINA_ARG_NONNULL(1, 2);
3667
3668/**
3669 * Get the Evas object stacked right above @p obj
3670 *
3671 * @param obj an #Evas_Object
3672 * @return the #Evas_Object directly above @p obj, if any, or @c NULL,
3673 * if none
3674 *
3675 * This function will traverse layers in its search, if there are
3676 * objects on layers above the one @p obj is placed at.
3677 *
3678 * @see evas_object_layer_get()
3679 * @see evas_object_layer_set()
3680 * @see evas_object_below_get()
3681 *
3682 */
3683EAPI Evas_Object *evas_object_above_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3684
3685/**
3686 * Get the Evas object stacked right below @p obj
3687 *
3688 * @param obj an #Evas_Object
3689 * @return the #Evas_Object directly below @p obj, if any, or @c NULL,
3690 * if none
3691 *
3692 * This function will traverse layers in its search, if there are
3693 * objects on layers below the one @p obj is placed at.
3694 *
3695 * @see evas_object_layer_get()
3696 * @see evas_object_layer_set()
3697 * @see evas_object_below_get()
3698 */
3699EAPI Evas_Object *evas_object_below_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
3700
3701/**
3702 * @}
3703 */
3704
3705/**
3706 * @defgroup Evas_Object_Group_Events Object Events
3707 *
3708 * Objects generate events when they are moved, resized, when their
3709 * visibility change, when they are deleted and so on. These methods
3710 * allow one to be notified about and to handle such events.
3711 *
3712 * Objects also generate events on input (keyboard and mouse), if they
3713 * accept them (are visible, focused, etc).
3714 *
3715 * For each of those events, Evas provides a way for one to register
3716 * callback functions to be issued just after they happen.
3717 *
3718 * The following figure illustrates some Evas (event) callbacks:
3719 *
3720 * @image html evas-callbacks.png
3721 * @image rtf evas-callbacks.png
3722 * @image latex evas-callbacks.eps
3723 *
3724 * Thees events have their values in the #Evas_Callback_Type
3725 * enumeration, which has also ones happening on the canvas level (se
3726 * #Evas_Canvas_Events).
3727 *
3728 * Examples on this group of functions can be found @ref
3729 * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here".
3730 *
3731 * @ingroup Evas_Object_Group
3732 */
3733
3734/**
3735 * @addtogroup Evas_Object_Group_Events
3736 * @{
3737 */
3738
3739/**
3740 * Add (register) a callback function to a given Evas object event.
3741 *
3742 * @param obj Object to attach a callback to
3743 * @param type The type of event that will trigger the callback
3744 * @param func The function to be called when the event is triggered
3745 * @param data The data pointer to be passed to @p func
3746 *
3747 * This function adds a function callback to an object when the event
3748 * of type @p type occurs on object @p obj. The function is @p func.
3749 *
3750 * In the event of a memory allocation error during addition of the
3751 * callback to the object, evas_alloc_error() should be used to
3752 * determine the nature of the error, if any, and the program should
3753 * sensibly try and recover.
3754 *
3755 * A callback function must have the ::Evas_Object_Event_Cb prototype
3756 * definition. The first parameter (@p data) in this definition will
3757 * have the same value passed to evas_object_event_callback_add() as
3758 * the @p data parameter, at runtime. The second parameter @p e is the
3759 * canvas pointer on which the event occurred. The third parameter is
3760 * a pointer to the object on which event occurred. Finally, the
3761 * fourth parameter @p event_info is a pointer to a data structure
3762 * that may or may not be passed to the callback, depending on the
3763 * event type that triggered the callback. This is so because some
3764 * events don't carry extra context with them, but others do.
3765 *
3766 * The event type @p type to trigger the function may be one of
3767 * #EVAS_CALLBACK_MOUSE_IN, #EVAS_CALLBACK_MOUSE_OUT,
3768 * #EVAS_CALLBACK_MOUSE_DOWN, #EVAS_CALLBACK_MOUSE_UP,
3769 * #EVAS_CALLBACK_MOUSE_MOVE, #EVAS_CALLBACK_MOUSE_WHEEL,
3770 * #EVAS_CALLBACK_MULTI_DOWN, #EVAS_CALLBACK_MULTI_UP,
3771 * #EVAS_CALLBACK_MULTI_MOVE, #EVAS_CALLBACK_FREE,
3772 * #EVAS_CALLBACK_KEY_DOWN, #EVAS_CALLBACK_KEY_UP,
3773 * #EVAS_CALLBACK_FOCUS_IN, #EVAS_CALLBACK_FOCUS_OUT,
3774 * #EVAS_CALLBACK_SHOW, #EVAS_CALLBACK_HIDE, #EVAS_CALLBACK_MOVE,
3775 * #EVAS_CALLBACK_RESIZE, #EVAS_CALLBACK_RESTACK, #EVAS_CALLBACK_DEL,
3776 * #EVAS_CALLBACK_HOLD, #EVAS_CALLBACK_CHANGED_SIZE_HINTS,
3777 * #EVAS_CALLBACK_IMAGE_PRELOADED or #EVAS_CALLBACK_IMAGE_UNLOADED.
3778 *
3779 * This determines the kind of event that will trigger the callback.
3780 * What follows is a list explaining better the nature of each type of
3781 * event, along with their associated @p event_info pointers:
3782 *
3783 * - #EVAS_CALLBACK_MOUSE_IN: @p event_info is a pointer to an
3784 * #Evas_Event_Mouse_In struct\n\n
3785 * This event is triggered when the mouse pointer enters the area
3786 * (not shaded by other objects) of the object @p obj. This may
3787 * occur by the mouse pointer being moved by
3788 * evas_event_feed_mouse_move() calls, or by the object being shown,
3789 * raised, moved, resized, or other objects being moved out of the
3790 * way, hidden or lowered, whatever may cause the mouse pointer to
3791 * get on top of @p obj, having been on top of another object
3792 * previously.
3793 *
3794 * - #EVAS_CALLBACK_MOUSE_OUT: @p event_info is a pointer to an
3795 * #Evas_Event_Mouse_Out struct\n\n
3796 * This event is triggered exactly like #EVAS_CALLBACK_MOUSE_IN is,
3797 * but it occurs when the mouse pointer exits an object's area. Note
3798 * that no mouse out events will be reported if the mouse pointer is
3799 * implicitly grabbed to an object (mouse buttons are down, having
3800 * been pressed while the pointer was over that object). In these
3801 * cases, mouse out events will be reported once all buttons are
3802 * released, if the mouse pointer has left the object's area. The
3803 * indirect ways of taking off the mouse pointer from an object,
3804 * like cited above, for #EVAS_CALLBACK_MOUSE_IN, also apply here,
3805 * naturally.
3806 *
3807 * - #EVAS_CALLBACK_MOUSE_DOWN: @p event_info is a pointer to an
3808 * #Evas_Event_Mouse_Down struct\n\n
3809 * This event is triggered by a mouse button being pressed while the
3810 * mouse pointer is over an object. If the pointer mode for Evas is
3811 * #EVAS_OBJECT_POINTER_MODE_AUTOGRAB (default), this causes this
3812 * object to <b>passively grab the mouse</b> until all mouse buttons
3813 * have been released: all future mouse events will be reported to
3814 * only this object until no buttons are down. That includes mouse
3815 * move events, mouse in and mouse out events, and further button
3816 * presses. When all buttons are released, event propagation will
3817 * occur as normal (see #Evas_Object_Pointer_Mode).
3818 *
3819 * - #EVAS_CALLBACK_MOUSE_UP: @p event_info is a pointer to an
3820 * #Evas_Event_Mouse_Up struct\n\n
3821 * This event is triggered by a mouse button being released while
3822 * the mouse pointer is over an object's area (or when passively
3823 * grabbed to an object).
3824 *
3825 * - #EVAS_CALLBACK_MOUSE_MOVE: @p event_info is a pointer to an
3826 * #Evas_Event_Mouse_Move struct\n\n
3827 * This event is triggered by the mouse pointer being moved while
3828 * over an object's area (or while passively grabbed to an object).
3829 *
3830 * - #EVAS_CALLBACK_MOUSE_WHEEL: @p event_info is a pointer to an
3831 * #Evas_Event_Mouse_Wheel struct\n\n
3832 * This event is triggered by the mouse wheel being rolled while the
3833 * mouse pointer is over an object (or passively grabbed to an
3834 * object).
3835 *
3836 * - #EVAS_CALLBACK_MULTI_DOWN: @p event_info is a pointer to an
3837 * #Evas_Event_Multi_Down struct
3838 *
3839 * - #EVAS_CALLBACK_MULTI_UP: @p event_info is a pointer to an
3840 * #Evas_Event_Multi_Up struct
3841 *
3842 * - #EVAS_CALLBACK_MULTI_MOVE: @p event_info is a pointer to an
3843 * #Evas_Event_Multi_Move struct
3844 *
3845 * - #EVAS_CALLBACK_FREE: @p event_info is @c NULL \n\n
3846 * This event is triggered just before Evas is about to free all
3847 * memory used by an object and remove all references to it. This is
3848 * useful for programs to use if they attached data to an object and
3849 * want to free it when the object is deleted. The object is still
3850 * valid when this callback is called, but after it returns, there
3851 * is no guarantee on the object's validity.
3852 *
3853 * - #EVAS_CALLBACK_KEY_DOWN: @p event_info is a pointer to an
3854 * #Evas_Event_Key_Down struct\n\n
3855 * This callback is called when a key is pressed and the focus is on
3856 * the object, or a key has been grabbed to a particular object
3857 * which wants to intercept the key press regardless of what object
3858 * has the focus.
3859 *
3860 * - #EVAS_CALLBACK_KEY_UP: @p event_info is a pointer to an
3861 * #Evas_Event_Key_Up struct \n\n
3862 * This callback is called when a key is released and the focus is
3863 * on the object, or a key has been grabbed to a particular object
3864 * which wants to intercept the key release regardless of what
3865 * object has the focus.
3866 *
3867 * - #EVAS_CALLBACK_FOCUS_IN: @p event_info is @c NULL \n\n
3868 * This event is called when an object gains the focus. When it is
3869 * called the object has already gained the focus.
3870 *
3871 * - #EVAS_CALLBACK_FOCUS_OUT: @p event_info is @c NULL \n\n
3872 * This event is triggered when an object loses the focus. When it
3873 * is called the object has already lost the focus.
3874 *
3875 * - #EVAS_CALLBACK_SHOW: @p event_info is @c NULL \n\n
3876 * This event is triggered by the object being shown by
3877 * evas_object_show().
3878 *
3879 * - #EVAS_CALLBACK_HIDE: @p event_info is @c NULL \n\n
3880 * This event is triggered by an object being hidden by
3881 * evas_object_hide().
3882 *
3883 * - #EVAS_CALLBACK_MOVE: @p event_info is @c NULL \n\n
3884 * This event is triggered by an object being
3885 * moved. evas_object_move() can trigger this, as can any
3886 * object-specific manipulations that would mean the object's origin
3887 * could move.
3888 *
3889 * - #EVAS_CALLBACK_RESIZE: @p event_info is @c NULL \n\n
3890 * This event is triggered by an object being resized. Resizes can
3891 * be triggered by evas_object_resize() or by any object-specific
3892 * calls that may cause the object to resize.
3893 *
3894 * - #EVAS_CALLBACK_RESTACK: @p event_info is @c NULL \n\n
3895 * This event is triggered by an object being re-stacked. Stacking
3896 * changes can be triggered by
3897 * evas_object_stack_below()/evas_object_stack_above() and others.
3898 *
3899 * - #EVAS_CALLBACK_DEL: @p event_info is @c NULL.
3900 *
3901 * - #EVAS_CALLBACK_HOLD: @p event_info is a pointer to an
3902 * #Evas_Event_Hold struct
3903 *
3904 * - #EVAS_CALLBACK_CHANGED_SIZE_HINTS: @p event_info is @c NULL.
3905 *
3906 * - #EVAS_CALLBACK_IMAGE_PRELOADED: @p event_info is @c NULL.
3907 *
3908 * - #EVAS_CALLBACK_IMAGE_UNLOADED: @p event_info is @c NULL.
3909 *
3910 * @note Be careful not to add the same callback multiple times, if
3911 * that's not what you want, because Evas won't check if a callback
3912 * existed before exactly as the one being registered (and thus, call
3913 * it more than once on the event, in this case). This would make
3914 * sense if you passed different functions and/or callback data, only.
3915 *
3916 * Example:
3917 * @dontinclude evas-events.c
3918 * @skip evas_object_event_callback_add(
3919 * @until }
3920 *
3921 * See the full example @ref Example_Evas_Events "here".
3922 *
3923 */
3924 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);
3925
3926/**
3927 * Add (register) a callback function to a given Evas object event with a
3928 * non-default priority set. Except for the priority field, it's exactly the
3929 * same as @ref evas_object_event_callback_add
3930 *
3931 * @param obj Object to attach a callback to
3932 * @param type The type of event that will trigger the callback
3933 * @param priority The priority of the callback, lower values called first.
3934 * @param func The function to be called when the event is triggered
3935 * @param data The data pointer to be passed to @p func
3936 *
3937 * @see evas_object_event_callback_add
3938 * @since 1.1.0
3939 */
3940EAPI 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);
3941
3942/**
3943 * Delete a callback function from an object
3944 *
3945 * @param obj Object to remove a callback from
3946 * @param type The type of event that was triggering the callback
3947 * @param func The function that was to be called when the event was triggered
3948 * @return The data pointer that was to be passed to the callback
3949 *
3950 * This function removes the most recently added callback from the
3951 * object @p obj which was triggered by the event type @p type and was
3952 * calling the function @p func when triggered. If the removal is
3953 * successful it will also return the data pointer that was passed to
3954 * evas_object_event_callback_add() when the callback was added to the
3955 * object. If not successful NULL will be returned.
3956 *
3957 * Example:
3958 * @code
3959 * extern Evas_Object *object;
3960 * void *my_data;
3961 * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
3962 *
3963 * my_data = evas_object_event_callback_del(object, EVAS_CALLBACK_MOUSE_UP, up_callback);
3964 * @endcode
3965 */
3966EAPI void *evas_object_event_callback_del (Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func) EINA_ARG_NONNULL(1, 3);
3967
3968/**
3969 * Delete (unregister) a callback function registered to a given
3970 * Evas object event.
3971 *
3972 * @param obj Object to remove a callback from
3973 * @param type The type of event that was triggering the callback
3974 * @param func The function that was to be called when the event was
3975 * triggered
3976 * @param data The data pointer that was to be passed to the callback
3977 * @return The data pointer that was to be passed to the callback
3978 *
3979 * This function removes the most recently added callback from the
3980 * object @p obj, which was triggered by the event type @p type and was
3981 * calling the function @p func with data @p data, when triggered. If
3982 * the removal is successful it will also return the data pointer that
3983 * was passed to evas_object_event_callback_add() (that will be the
3984 * same as the parameter) when the callback was added to the
3985 * object. In errors, @c NULL will be returned.
3986 *
3987 * @note For deletion of Evas object events callbacks filtering by
3988 * just type and function pointer, user
3989 * evas_object_event_callback_del().
3990 *
3991 * Example:
3992 * @code
3993 * extern Evas_Object *object;
3994 * void *my_data;
3995 * void up_callback(void *data, Evas *e, Evas_Object *obj, void *event_info);
3996 *
3997 * my_data = evas_object_event_callback_del_full(object, EVAS_CALLBACK_MOUSE_UP, up_callback, data);
3998 * @endcode
3999 */
4000EAPI 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);
4001
4002
4003/**
4004 * Set whether an Evas object is to pass (ignore) events.
4005 *
4006 * @param obj the Evas object to operate on
4007 * @param pass whether @p obj is to pass events (@c EINA_TRUE) or not
4008 * (@c EINA_FALSE)
4009 *
4010 * If @p pass is @c EINA_TRUE, it will make events on @p obj to be @b
4011 * ignored. They will be triggered on the @b next lower object (that
4012 * is not set to pass events), instead (see evas_object_below_get()).
4013 *
4014 * If @p pass is @c EINA_FALSE, events will be processed on that
4015 * object as normal.
4016 *
4017 * @see evas_object_pass_events_get() for an example
4018 * @see evas_object_repeat_events_set()
4019 * @see evas_object_propagate_events_set()
4020 * @see evas_object_freeze_events_set()
4021 */
4022EAPI void evas_object_pass_events_set (Evas_Object *obj, Eina_Bool pass) EINA_ARG_NONNULL(1);
4023
4024/**
4025 * Determine whether an object is set to pass (ignore) events.
4026 *
4027 * @param obj the Evas object to get information from.
4028 * @return pass whether @p obj is set to pass events (@c EINA_TRUE) or not
4029 * (@c EINA_FALSE)
4030 *
4031 * Example:
4032 * @dontinclude evas-stacking.c
4033 * @skip if (strcmp(ev->keyname, "p") == 0)
4034 * @until }
4035 *
4036 * See the full @ref Example_Evas_Stacking "example".
4037 *
4038 * @see evas_object_pass_events_set()
4039 * @see evas_object_repeat_events_get()
4040 * @see evas_object_propagate_events_get()
4041 * @see evas_object_freeze_events_get()
4042 */
4043EAPI Eina_Bool evas_object_pass_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
4044
4045/**
4046 * Set whether an Evas object is to repeat events.
4047 *
4048 * @param obj the Evas object to operate on
4049 * @param repeat whether @p obj is to repeat events (@c EINA_TRUE) or not
4050 * (@c EINA_FALSE)
4051 *
4052 * If @p repeat is @c EINA_TRUE, it will make events on @p obj to also
4053 * be repeated for the @b next lower object in the objects' stack (see
4054 * see evas_object_below_get()).
4055 *
4056 * If @p repeat is @c EINA_FALSE, events occurring on @p obj will be
4057 * processed only on it.
4058 *
4059 * Example:
4060 * @dontinclude evas-stacking.c
4061 * @skip if (strcmp(ev->keyname, "r") == 0)
4062 * @until }
4063 *
4064 * See the full @ref Example_Evas_Stacking "example".
4065 *
4066 * @see evas_object_repeat_events_get()
4067 * @see evas_object_pass_events_set()
4068 * @see evas_object_propagate_events_set()
4069 * @see evas_object_freeze_events_set()
4070 */
4071EAPI void evas_object_repeat_events_set (Evas_Object *obj, Eina_Bool repeat) EINA_ARG_NONNULL(1);
4072
4073/**
4074 * Determine whether an object is set to repeat events.
4075 *
4076 * @param obj the given Evas object pointer
4077 * @retrieve whether @p obj is set to repeat events (@c EINA_TRUE)
4078 * or not (@c EINA_FALSE)
4079 *
4080 * @see evas_object_repeat_events_set() for an example
4081 * @see evas_object_pass_events_get()
4082 * @see evas_object_propagate_events_get()
4083 * @see evas_object_freeze_events_get()
4084 */
4085EAPI Eina_Bool evas_object_repeat_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
4086
4087/**
4088 * Set whether events on a smart object's member should get propagated
4089 * up to its parent.
4090 *
4091 * @param obj the smart object's child to operate on
4092 * @param prop whether to propagate events (@c EINA_TRUE) or not (@c
4093 * EINA_FALSE)
4094 *
4095 * This function has @b no effect if @p obj is not a member of a smart
4096 * object.
4097 *
4098 * If @p prop is @c EINA_TRUE, events occurring on this object will be
4099 * propagated on to the smart object of which @p obj is a member. If
4100 * @p prop is @c EINA_FALSE, events occurring on this object will @b
4101 * not be propagated on to the smart object of which @p obj is a
4102 * member. The default value is @c EINA_TRUE.
4103 *
4104 * @see evas_object_propagate_events_get()
4105 * @see evas_object_repeat_events_set()
4106 * @see evas_object_pass_events_set()
4107 * @see evas_object_freeze_events_set()
4108 */
4109EAPI void evas_object_propagate_events_set (Evas_Object *obj, Eina_Bool prop) EINA_ARG_NONNULL(1);
4110
4111/**
4112 * Retrieve whether an Evas object is set to propagate events.
4113 *
4114 * @param obj the given Evas object pointer
4115 * @return whether @p obj is set to propagate events (@c EINA_TRUE)
4116 * or not (@c EINA_FALSE)
4117 *
4118 * @see evas_object_propagate_events_set()
4119 * @see evas_object_repeat_events_get()
4120 * @see evas_object_pass_events_get()
4121 * @see evas_object_freeze_events_get()
4122 */
4123EAPI Eina_Bool evas_object_propagate_events_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
4124
4125/**
4126 * Set whether an Evas object is to freeze (discard) events.
4127 *
4128 * @param obj the Evas object to operate on
4129 * @param pass whether @p obj is to freeze events (@c EINA_TRUE) or not
4130 * (@c EINA_FALSE)
4131 *
4132 * If @p freeze is @c EINA_TRUE, it will make events on @p obj to be @b
4133 * discarded. Unlike evas_object_pass_events_set(), events will not be
4134 * passed to @b next lower object. This API can be used for blocking
4135 * events while @p obj is on transiting.
4136 *
4137 * If @p freeze is @c EINA_FALSE, events will be processed on that
4138 * object as normal.
4139 *
4140 * @see evas_object_freeze_events_get()
4141 * @see evas_object_pass_events_set()
4142 * @see evas_object_repeat_events_set()
4143 * @see evas_object_propagate_events_set()
4144 * @since 1.1.0
4145 */
4146EAPI void evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze) EINA_ARG_NONNULL(1);
4147
4148/**
4149 * Determine whether an object is set to freeze (discard) events.
4150 *
4151 * @param obj the Evas object to get information from.
4152 * @return freeze whether @p obj is set to freeze events (@c EINA_TRUE) or
4153 * not (@c EINA_FALSE)
4154 *
4155 * @see evas_object_freeze_events_set()
4156 * @see evas_object_pass_events_get()
4157 * @see evas_object_repeat_events_get()
4158 * @see evas_object_propagate_events_get()
4159 * @since 1.1.0
4160 */
4161EAPI Eina_Bool evas_object_freeze_events_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
4162
4163/**
4164 * @}
4165 */
4166
4167/**
4168 * @defgroup Evas_Object_Group_Map UV Mapping (Rotation, Perspective, 3D...)
4169 *
4170 * Evas allows different transformations to be applied to all kinds of
4171 * objects. These are applied by means of UV mapping.
4172 *
4173 * With UV mapping, one maps points in the source object to a 3D space
4174 * positioning at target. This allows rotation, perspective, scale and
4175 * lots of other effects, depending on the map that is used.
4176 *
4177 * Each map point may carry a multiplier color. If properly
4178 * calculated, these can do shading effects on the object, producing
4179 * 3D effects.
4180 *
4181 * As usual, Evas provides both the raw and easy to use methods. The
4182 * raw methods allow developer to create its maps somewhere else,
4183 * maybe load them from some file format. The easy to use methods,
4184 * calculate the points given some high-level parameters, such as
4185 * rotation angle, ambient light and so on.
4186 *
4187 * @note applying mapping will reduce performance, so use with
4188 * care. The impact on performance depends on engine in
4189 * use. Software is quite optimized, but not as fast as OpenGL.
4190 *
4191 * @section sec-map-points Map points
4192 * @subsection subsec-rotation Rotation
4193 *
4194 * A map consists of a set of points, currently only four are supported. Each
4195 * of these points contains a set of canvas coordinates @c x and @c y that
4196 * can be used to alter the geometry of the mapped object, and a @c z
4197 * coordinate that indicates the depth of that point. This last coordinate
4198 * does not normally affect the map, but it's used by several of the utility
4199 * functions to calculate the right position of the point given other
4200 * parameters.
4201 *
4202 * The coordinates for each point are set with evas_map_point_coord_set().
4203 * The following image shows a map set to match the geometry of an existing
4204 * object.
4205 *
4206 * @image html map-set-map-points-1.png
4207 * @image rtf map-set-map-points-1.png
4208 * @image latex map-set-map-points-1.eps
4209 *
4210 * This is a common practice, so there are a few functions that help make it
4211 * easier.
4212 *
4213 * evas_map_util_points_populate_from_geometry() sets the coordinates of each
4214 * point in the given map to match the rectangle defined by the function
4215 * parameters.
4216 *
4217 * evas_map_util_points_populate_from_object() and
4218 * evas_map_util_points_populate_from_object_full() both take an object and
4219 * set the map points to match its geometry. The difference between the two
4220 * is that the first function sets the @c z value of all points to 0, while
4221 * the latter receives the value to set in said coordinate as a parameter.
4222 *
4223 * The following lines of code all produce the same result as in the image
4224 * above.
4225 * @code
4226 * evas_map_util_points_populate_from_geometry(m, 100, 100, 200, 200, 0);
4227 * // Assuming o is our original object
4228 * evas_object_move(o, 100, 100);
4229 * evas_object_resize(o, 200, 200);
4230 * evas_map_util_points_populate_from_object(m, o);
4231 * evas_map_util_points_populate_from_object_full(m, o, 0);
4232 * @endcode
4233 *
4234 * Several effects can be applied to an object by simply setting each point
4235 * of the map to the right coordinates. For example, a simulated perspective
4236 * could be achieve as follows.
4237 *
4238 * @image html map-set-map-points-2.png
4239 * @image rtf map-set-map-points-2.png
4240 * @image latex map-set-map-points-2.eps
4241 *
4242 * As said before, the @c z coordinate is unused here so when setting points
4243 * by hand, its value is of no importance.
4244 *
4245 * @image html map-set-map-points-3.png
4246 * @image rtf map-set-map-points-3.png
4247 * @image latex map-set-map-points-3.eps
4248 *
4249 * In all three cases above, setting the map to be used by the object is the
4250 * same.
4251 * @code
4252 * evas_object_map_set(o, m);
4253 * evas_object_map_enable_set(o, EINA_TRUE);
4254 * @endcode
4255 *
4256 * Doing things this way, however, is a lot of work that can be avoided by
4257 * using the provided utility functions, as described in the next section.
4258 *
4259 * @section map-utils Utility functions
4260 *
4261 * Utility functions take an already set up map and alter it to produce a
4262 * specific effect. For example, to rotate an object around its own center
4263 * you would need to take the rotation angle, the coordinates of each corner
4264 * of the object and do all the math to get the new set of coordinates that
4265 * need to tbe set in the map.
4266 *
4267 * Or you can use this code:
4268 * @code
4269 * evas_object_geometry_get(o, &x, &y, &w, &h);
4270 * m = evas_map_new(4);
4271 * evas_map_util_points_populate_from_object(m, o);
4272 * evas_map_util_rotate(m, 45, x + (w / 2), y + (h / 2));
4273 * evas_object_map_set(o, m);
4274 * evas_object_map_enable_set(o, EINA_TRUE);
4275 * evas_map_free(m);
4276 * @endcode
4277 *
4278 * Which will rotate the object around its center point in a 45 degree angle
4279 * in the clockwise direction, taking it from this
4280 *
4281 * @image html map-rotation-2d-1.png
4282 * @image rtf map-rotation-2d-1.png
4283 * @image latex map-rotation-2d-1.eps
4284 *
4285 * to this
4286 *
4287 * @image html map-rotation-2d-2.png
4288 * @image rtf map-rotation-2d-2.png
4289 * @image latex map-rotation-2d-2.eps
4290 *
4291 * Objects may be rotated around any other point just by setting the last two
4292 * paramaters of the evas_map_util_rotate() function to the right values. A
4293 * circle of roughly the diameter of the object overlaid on each image shows
4294 * where the center of rotation is set for each example.
4295 *
4296 * For example, this code
4297 * @code
4298 * evas_object_geometry_get(o, &x, &y, &w, &h);
4299 * m = evas_map_new(4);
4300 * evas_map_util_points_populate_from_object(m, o);
4301 * evas_map_util_rotate(m, 45, x + w - 20, y + h - 20);
4302 * evas_object_map_set(o, m);
4303 * evas_object_map_enable_set(o, EINA_TRUE);
4304 * evas_map_free(m);
4305 * @endcode
4306 *
4307 * produces something like
4308 *
4309 * @image html map-rotation-2d-3.png
4310 * @image rtf map-rotation-2d-3.png
4311 * @image latex map-rotation-2d-3.eps
4312 *
4313 * And the following
4314 * @code
4315 * evas_output_size_get(evas, &w, &h);
4316 * m = evas_map_new(4);
4317 * evas_map_util_points_populate_from_object(m, o);
4318 * evas_map_util_rotate(m, 45, w, h);
4319 * evas_object_map_set(o, m);
4320 * evas_object_map_enable_set(o, EINA_TRUE);
4321 * evas_map_free(m);
4322 * @endcode
4323 *
4324 * rotates the object around the center of the window
4325 *
4326 * @image html map-rotation-2d-4.png
4327 * @image rtf map-rotation-2d-4.png
4328 * @image latex map-rotation-2d-4.eps
4329 *
4330 * @subsection subsec-3d 3D Maps
4331 *
4332 * Maps can also be used to achieve the effect of 3-dimensionality. When doing
4333 * this, the @c z coordinate of each point counts, with higher values meaning
4334 * the point is further into the screen, and smaller values (negative, usually)
4335 * meaning the point is closwer towards the user.
4336 *
4337 * Thinking in 3D also introduces the concept of back-face of an object. An
4338 * object is said to be facing the user when all its points are placed in a
4339 * clockwise fashion. The next image shows this, with each point showing the
4340 * with which is identified within the map.
4341 *
4342 * @image html map-point-order-face.png
4343 * @image rtf map-point-order-face.png
4344 * @image latex map-point-order-face.eps
4345 *
4346 * Rotating this map around the @c Y axis would leave the order of the points
4347 * in a counter-clockwise fashion, as seen in the following image.
4348 *
4349 * @image html map-point-order-back.png
4350 * @image rtf map-point-order-back.png
4351 * @image latex map-point-order-back.eps
4352 *
4353 * This way we can say that we are looking at the back face of the object.
4354 * This will have stronger implications later when we talk about lighting.
4355 *
4356 * To know if a map is facing towards the user or not it's enough to use
4357 * the evas_map_util_clockwise_get() function, but this is normally done
4358 * after all the other operations are applied on the map.
4359 *
4360 * @subsection subsec-3d-rot 3D rotation and perspective
4361 *
4362 * Much like evas_map_util_rotate(), there's the function
4363 * evas_map_util_3d_rotate() that transforms the map to apply a 3D rotation
4364 * to an object. As in its 2D counterpart, the rotation can be applied around
4365 * any point in the canvas, this time with a @c z coordinate too. The rotation
4366 * can also be around any of the 3 axis.
4367 *
4368 * Starting from this simple setup
4369 *
4370 * @image html map-3d-basic-1.png
4371 * @image rtf map-3d-basic-1.png
4372 * @image latex map-3d-basic-1.eps
4373 *
4374 * and setting maps so that the blue square to rotate on all axis around a
4375 * sphere that uses the object as its center, and the red square to rotate
4376 * around the @c Y axis, we get the following. A simple overlay over the image
4377 * shows the original geometry of each object and the axis around which they
4378 * are being rotated, with the @c Z one not appearing due to being orthogonal
4379 * to the screen.
4380 *
4381 * @image html map-3d-basic-2.png
4382 * @image rtf map-3d-basic-2.png
4383 * @image latex map-3d-basic-2.eps
4384 *
4385 * which doesn't look very real. This can be helped by adding perspective
4386 * to the transformation, which can be simply done by calling
4387 * evas_map_util_3d_perspective() on the map after its position has been set.
4388 * The result in this case, making the vanishing point the center of each
4389 * object:
4390 *
4391 * @image html map-3d-basic-3.png
4392 * @image rtf map-3d-basic-3.png
4393 * @image latex map-3d-basic-3.eps
4394 *
4395 * @section sec-color Color and lighting
4396 *
4397 * Each point in a map can be set to a color, which will be multiplied with
4398 * the objects own color and linearly interpolated in between adjacent points.
4399 * This is done with evas_map_point_color_set() for each point of the map,
4400 * or evas_map_util_points_color_set() to set every point to the same color.
4401 *
4402 * When using 3D effects, colors can be used to improve the looks of them by
4403 * simulating a light source. The evas_map_util_3d_lighting() function makes
4404 * this task easier by taking the coordinates of the light source and its
4405 * color, along with the color of the ambient light. Evas then sets the color
4406 * of each point based on the distance to the light source, the angle with
4407 * which the object is facing the light and the ambient light. Here, the
4408 * orientation of each point as explained before, becomes more important.
4409 * If the map is defined counter-clockwise, the object will be facing away
4410 * from the user and thus become obscured, since no light would be reflecting
4411 * from it.
4412 *
4413 * @image html map-light.png
4414 * @image rtf map-light.png
4415 * @image latex map-light.eps
4416 * @note Object facing the light source
4417 *
4418 * @image html map-light2.png
4419 * @image rtf map-light2.png
4420 * @image latex map-light2.eps
4421 * @note Same object facing away from the user
4422 *
4423 * @section Image mapping
4424 *
4425 * @image html map-uv-mapping-1.png
4426 * @image rtf map-uv-mapping-1.png
4427 * @image latex map-uv-mapping-1.eps
4428 *
4429 * Images need some special handling when mapped. Evas can easily take care
4430 * of objects and do almost anything with them, but it's completely oblivious
4431 * to the content of images, so each point in the map needs to be told to what
4432 * pixel in the source image it belongs. Failing to do may sometimes result
4433 * in the expected behavior, or it may look like a partial work.
4434 *
4435 * The next image illustrates one possibility of a map being set to an image
4436 * object, without setting the right UV mapping for each point. The objects
4437 * themselves are mapped properly to their new geometry, but the image content
4438 * may not be displayed correctly within the mapped object.
4439 *
4440 * @image html map-uv-mapping-2.png
4441 * @image rtf map-uv-mapping-2.png
4442 * @image latex map-uv-mapping-2.eps
4443 *
4444 * Once Evas knows how to handle the source image within the map, it will
4445 * transform it as needed. This is done with evas_map_point_image_uv_set(),
4446 * which tells the map to which pixel in image it maps.
4447 *
4448 * To match our example images to the maps above all we need is the size of
4449 * each image, which can always be found with evas_object_image_size_get().
4450 *
4451 * @code
4452 * evas_map_point_image_uv_set(m, 0, 0, 0);
4453 * evas_map_point_image_uv_set(m, 1, 150, 0);
4454 * evas_map_point_image_uv_set(m, 2, 150, 200);
4455 * evas_map_point_image_uv_set(m, 3, 0, 200);
4456 * evas_object_map_set(o, m);
4457 * evas_object_map_enable_set(o, EINA_TRUE);
4458 *
4459 * evas_map_point_image_uv_set(m, 0, 0, 0);
4460 * evas_map_point_image_uv_set(m, 1, 120, 0);
4461 * evas_map_point_image_uv_set(m, 2, 120, 160);
4462 * evas_map_point_image_uv_set(m, 3, 0, 160);
4463 * evas_object_map_set(o2, m);
4464 * evas_object_map_enable_set(o2, EINA_TRUE);
4465 * @endcode
4466 *
4467 * To get
4468 *
4469 * @image html map-uv-mapping-3.png
4470 * @image rtf map-uv-mapping-3.png
4471 * @image latex map-uv-mapping-3.eps
4472 *
4473 * Maps can also be set to use part of an image only, or even map them inverted,
4474 * and combined with evas_object_image_source_set() it can be used to achieve
4475 * more interesting results.
4476 *
4477 * @code
4478 * evas_object_image_size_get(evas_object_image_source_get(o), &w, &h);
4479 * evas_map_point_image_uv_set(m, 0, 0, h);
4480 * evas_map_point_image_uv_set(m, 1, w, h);
4481 * evas_map_point_image_uv_set(m, 2, w, h / 3);
4482 * evas_map_point_image_uv_set(m, 3, 0, h / 3);
4483 * evas_object_map_set(o, m);
4484 * evas_object_map_enable_set(o, EINA_TRUE);
4485 * @endcode
4486 *
4487 * @image html map-uv-mapping-4.png
4488 * @image rtf map-uv-mapping-4.png
4489 * @image latex map-uv-mapping-4.eps
4490 *
4491 * Examples:
4492 * @li @ref Example_Evas_Map_Overview
4493 *
4494 * @ingroup Evas_Object_Group
4495 *
4496 * @{
4497 */
4498
4499/**
4500 * Enable or disable the map that is set.
4501 *
4502 * Enable or disable the use of map for the object @p obj.
4503 * On enable, the object geometry will be saved, and the new geometry will
4504 * change (position and size) to reflect the map geometry set.
4505 *
4506 * If the object doesn't have a map set (with evas_object_map_set()), the
4507 * initial geometry will be undefined. It is advised to always set a map
4508 * to the object first, and then call this function to enable its use.
4509 *
4510 * @param obj object to enable the map on
4511 * @param enabled enabled state
4512 */
4513EAPI void evas_object_map_enable_set (Evas_Object *obj, Eina_Bool enabled);
4514
4515/**
4516 * Get the map enabled state
4517 *
4518 * This returns the currently enabled state of the map on the object indicated.
4519 * The default map enable state is off. You can enable and disable it with
4520 * evas_object_map_enable_set().
4521 *
4522 * @param obj object to get the map enabled state from
4523 * @return the map enabled state
4524 */
4525EAPI Eina_Bool evas_object_map_enable_get (const Evas_Object *obj);
4526
4527/**
4528 * Set the map source object
4529 *
4530 * This sets the object from which the map is taken - can be any object that
4531 * has map enabled on it.
4532 *
4533 * Currently not implemented. for future use.
4534 *
4535 * @param obj object to set the map source of
4536 * @param src the source object from which the map is taken
4537 */
4538EAPI void evas_object_map_source_set (Evas_Object *obj, Evas_Object *src);
4539
4540/**
4541 * Get the map source object
4542 *
4543 * @param obj object to set the map source of
4544 * @return the object set as the source
4545 *
4546 * @see evas_object_map_source_set()
4547 */
4548EAPI Evas_Object *evas_object_map_source_get (const Evas_Object *obj);
4549
4550/**
4551 * Set current object transformation map.
4552 *
4553 * This sets the map on a given object. It is copied from the @p map pointer,
4554 * so there is no need to keep the @p map object if you don't need it anymore.
4555 *
4556 * A map is a set of 4 points which have canvas x, y coordinates per point,
4557 * with an optional z point value as a hint for perspective correction, if it
4558 * is available. As well each point has u and v coordinates. These are like
4559 * "texture coordinates" in OpenGL in that they define a point in the source
4560 * image that is mapped to that map vertex/point. The u corresponds to the x
4561 * coordinate of this mapped point and v, the y coordinate. Note that these
4562 * coordinates describe a bounding region to sample. If you have a 200x100
4563 * source image and want to display it at 200x100 with proper pixel
4564 * precision, then do:
4565 *
4566 * @code
4567 * Evas_Map *m = evas_map_new(4);
4568 * evas_map_point_coord_set(m, 0, 0, 0, 0);
4569 * evas_map_point_coord_set(m, 1, 200, 0, 0);
4570 * evas_map_point_coord_set(m, 2, 200, 100, 0);
4571 * evas_map_point_coord_set(m, 3, 0, 100, 0);
4572 * evas_map_point_image_uv_set(m, 0, 0, 0);
4573 * evas_map_point_image_uv_set(m, 1, 200, 0);
4574 * evas_map_point_image_uv_set(m, 2, 200, 100);
4575 * evas_map_point_image_uv_set(m, 3, 0, 100);
4576 * evas_object_map_set(obj, m);
4577 * evas_map_free(m);
4578 * @endcode
4579 *
4580 * Note that the map points a uv coordinates match the image geometry. If
4581 * the @p map parameter is NULL, the stored map will be freed and geometry
4582 * prior to enabling/setting a map will be restored.
4583 *
4584 * @param obj object to change transformation map
4585 * @param map new map to use
4586 *
4587 * @see evas_map_new()
4588 */
4589EAPI void evas_object_map_set (Evas_Object *obj, const Evas_Map *map);
4590
4591/**
4592 * Get current object transformation map.
4593 *
4594 * This returns the current internal map set on the indicated object. It is
4595 * intended for read-only access and is only valid as long as the object is
4596 * not deleted or the map on the object is not changed. If you wish to modify
4597 * the map and set it back do the following:
4598 *
4599 * @code
4600 * const Evas_Map *m = evas_object_map_get(obj);
4601 * Evas_Map *m2 = evas_map_dup(m);
4602 * evas_map_util_rotate(m2, 30.0, 0, 0);
4603 * evas_object_map_set(obj);
4604 * evas_map_free(m2);
4605 * @endcode
4606 *
4607 * @param obj object to query transformation map.
4608 * @return map reference to map in use. This is an internal data structure, so
4609 * do not modify it.
4610 *
4611 * @see evas_object_map_set()
4612 */
4613EAPI const Evas_Map *evas_object_map_get (const Evas_Object *obj);
4614
4615
4616/**
4617 * Populate source and destination map points to match exactly object.
4618 *
4619 * Usually one initialize map of an object to match it's original
4620 * position and size, then transform these with evas_map_util_*
4621 * functions, such as evas_map_util_rotate() or
4622 * evas_map_util_3d_rotate(). The original set is done by this
4623 * function, avoiding code duplication all around.
4624 *
4625 * @param m map to change all 4 points (must be of size 4).
4626 * @param obj object to use unmapped geometry to populate map coordinates.
4627 * @param z Point Z Coordinate hint (pre-perspective transform). This value
4628 * will be used for all four points.
4629 *
4630 * @see evas_map_util_points_populate_from_object()
4631 * @see evas_map_point_coord_set()
4632 * @see evas_map_point_image_uv_set()
4633 */
4634EAPI void evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z);
4635
4636/**
4637 * Populate source and destination map points to match exactly object.
4638 *
4639 * Usually one initialize map of an object to match it's original
4640 * position and size, then transform these with evas_map_util_*
4641 * functions, such as evas_map_util_rotate() or
4642 * evas_map_util_3d_rotate(). The original set is done by this
4643 * function, avoiding code duplication all around.
4644 *
4645 * Z Point coordinate is assumed as 0 (zero).
4646 *
4647 * @param m map to change all 4 points (must be of size 4).
4648 * @param obj object to use unmapped geometry to populate map coordinates.
4649 *
4650 * @see evas_map_util_points_populate_from_object_full()
4651 * @see evas_map_util_points_populate_from_geometry()
4652 * @see evas_map_point_coord_set()
4653 * @see evas_map_point_image_uv_set()
4654 */
4655EAPI void evas_map_util_points_populate_from_object (Evas_Map *m, const Evas_Object *obj);
4656
4657/**
4658 * Populate source and destination map points to match given geometry.
4659 *
4660 * Similar to evas_map_util_points_populate_from_object_full(), this
4661 * call takes raw values instead of querying object's unmapped
4662 * geometry. The given width will be used to calculate destination
4663 * points (evas_map_point_coord_set()) and set the image uv
4664 * (evas_map_point_image_uv_set()).
4665 *
4666 * @param m map to change all 4 points (must be of size 4).
4667 * @param x Point X Coordinate
4668 * @param y Point Y Coordinate
4669 * @param w width to use to calculate second and third points.
4670 * @param h height to use to calculate third and fourth points.
4671 * @param z Point Z Coordinate hint (pre-perspective transform). This value
4672 * will be used for all four points.
4673 *
4674 * @see evas_map_util_points_populate_from_object()
4675 * @see evas_map_point_coord_set()
4676 * @see evas_map_point_image_uv_set()
4677 */
4678EAPI 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);
4679
4680/**
4681 * Set color of all points to given color.
4682 *
4683 * This call is useful to reuse maps after they had 3d lightning or
4684 * any other colorization applied before.
4685 *
4686 * @param m map to change the color of.
4687 * @param r red (0 - 255)
4688 * @param g green (0 - 255)
4689 * @param b blue (0 - 255)
4690 * @param a alpha (0 - 255)
4691 *
4692 * @see evas_map_point_color_set()
4693 */
4694EAPI void evas_map_util_points_color_set (Evas_Map *m, int r, int g, int b, int a);
4695
4696/**
4697 * Change the map to apply the given rotation.
4698 *
4699 * This rotates the indicated map's coordinates around the center coordinate
4700 * given by @p cx and @p cy as the rotation center. The points will have their
4701 * X and Y coordinates rotated clockwise by @p degrees degrees (360.0 is a
4702 * full rotation). Negative values for degrees will rotate counter-clockwise
4703 * by that amount. All coordinates are canvas global coordinates.
4704 *
4705 * @param m map to change.
4706 * @param degrees amount of degrees from 0.0 to 360.0 to rotate.
4707 * @param cx rotation's center horizontal position.
4708 * @param cy rotation's center vertical position.
4709 *
4710 * @see evas_map_point_coord_set()
4711 * @see evas_map_util_zoom()
4712 */
4713EAPI void evas_map_util_rotate (Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy);
4714
4715/**
4716 * Change the map to apply the given zooming.
4717 *
4718 * Like evas_map_util_rotate(), this zooms the points of the map from a center
4719 * point. That center is defined by @p cx and @p cy. The @p zoomx and @p zoomy
4720 * parameters specify how much to zoom in the X and Y direction respectively.
4721 * A value of 1.0 means "don't zoom". 2.0 means "double the size". 0.5 is
4722 * "half the size" etc. All coordinates are canvas global coordinates.
4723 *
4724 * @param m map to change.
4725 * @param zoomx horizontal zoom to use.
4726 * @param zoomy vertical zoom to use.
4727 * @param cx zooming center horizontal position.
4728 * @param cy zooming center vertical position.
4729 *
4730 * @see evas_map_point_coord_set()
4731 * @see evas_map_util_rotate()
4732 */
4733EAPI void evas_map_util_zoom (Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy);
4734
4735/**
4736 * Rotate the map around 3 axes in 3D
4737 *
4738 * This will rotate not just around the "Z" axis as in evas_map_util_rotate()
4739 * (which is a convenience call for those only wanting 2D). This will rotate
4740 * around the X, Y and Z axes. The Z axis points "into" the screen with low
4741 * values at the screen and higher values further away. The X axis runs from
4742 * left to right on the screen and the Y axis from top to bottom. Like with
4743 * evas_map_util_rotate() you provide a center point to rotate around (in 3D).
4744 *
4745 * @param m map to change.
4746 * @param dx amount of degrees from 0.0 to 360.0 to rotate around X axis.
4747 * @param dy amount of degrees from 0.0 to 360.0 to rotate around Y axis.
4748 * @param dz amount of degrees from 0.0 to 360.0 to rotate around Z axis.
4749 * @param cx rotation's center horizontal position.
4750 * @param cy rotation's center vertical position.
4751 * @param cz rotation's center vertical position.
4752 */
4753EAPI void evas_map_util_3d_rotate (Evas_Map *m, double dx, double dy, double dz, Evas_Coord cx, Evas_Coord cy, Evas_Coord cz);
4754
4755/**
4756 * Perform lighting calculations on the given Map
4757 *
4758 * This is used to apply lighting calculations (from a single light source)
4759 * to a given map. The R, G and B values of each vertex will be modified to
4760 * reflect the lighting based on the lixth point coordinates, the light
4761 * color and the ambient color, and at what angle the map is facing the
4762 * light source. A surface should have its points be declared in a
4763 * clockwise fashion if the face is "facing" towards you (as opposed to
4764 * away from you) as faces have a "logical" side for lighting.
4765 *
4766 * @image html map-light3.png
4767 * @image rtf map-light3.png
4768 * @image latex map-light3.eps
4769 * @note Grey object, no lighting used
4770 *
4771 * @image html map-light4.png
4772 * @image rtf map-light4.png
4773 * @image latex map-light4.eps
4774 * @note Lights out! Every color set to 0
4775 *
4776 * @image html map-light5.png
4777 * @image rtf map-light5.png
4778 * @image latex map-light5.eps
4779 * @note Ambient light to full black, red light coming from close at the
4780 * bottom-left vertex
4781 *
4782 * @image html map-light6.png
4783 * @image rtf map-light6.png
4784 * @image latex map-light6.eps
4785 * @note Same light as before, but not the light is set to 0 and ambient light
4786 * is cyan
4787 *
4788 * @image html map-light7.png
4789 * @image rtf map-light7.png
4790 * @image latex map-light7.eps
4791 * @note Both lights are on
4792 *
4793 * @image html map-light8.png
4794 * @image rtf map-light8.png
4795 * @image latex map-light8.eps
4796 * @note Both lights again, but this time both are the same color.
4797 *
4798 * @param m map to change.
4799 * @param lx X coordinate in space of light point
4800 * @param ly Y coordinate in space of light point
4801 * @param lz Z coordinate in space of light point
4802 * @param lr light red value (0 - 255)
4803 * @param lg light green value (0 - 255)
4804 * @param lb light blue value (0 - 255)
4805 * @param ar ambient color red value (0 - 255)
4806 * @param ag ambient color green value (0 - 255)
4807 * @param ab ambient color blue value (0 - 255)
4808 */
4809EAPI 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);
4810
4811/**
4812 * Apply a perspective transform to the map
4813 *
4814 * This applies a given perspective (3D) to the map coordinates. X, Y and Z
4815 * values are used. The px and py points specify the "infinite distance" point
4816 * in the 3D conversion (where all lines converge to like when artists draw
4817 * 3D by hand). The @p z0 value specifies the z value at which there is a 1:1
4818 * mapping between spatial coordinates and screen coordinates. Any points
4819 * on this z value will not have their X and Y values modified in the transform.
4820 * Those further away (Z value higher) will shrink into the distance, and
4821 * those less than this value will expand and become bigger. The @p foc value
4822 * determines the "focal length" of the camera. This is in reality the distance
4823 * between the camera lens plane itself (at or closer than this rendering
4824 * results are undefined) and the "z0" z value. This allows for some "depth"
4825 * control and @p foc must be greater than 0.
4826 *
4827 * @param m map to change.
4828 * @param px The perspective distance X coordinate
4829 * @param py The perspective distance Y coordinate
4830 * @param z0 The "0" z plane value
4831 * @param foc The focal distance
4832 */
4833EAPI void evas_map_util_3d_perspective (Evas_Map *m, Evas_Coord px, Evas_Coord py, Evas_Coord z0, Evas_Coord foc);
4834
4835/**
4836 * Get the clockwise state of a map
4837 *
4838 * This determines if the output points (X and Y. Z is not used) are
4839 * clockwise or anti-clockwise. This can be used for "back-face culling". This
4840 * is where you hide objects that "face away" from you. In this case objects
4841 * that are not clockwise.
4842 *
4843 * @param m map to query.
4844 * @return 1 if clockwise, 0 otherwise
4845 */
4846EAPI Eina_Bool evas_map_util_clockwise_get (Evas_Map *m);
4847
4848
4849/**
4850 * Create map of transformation points to be later used with an Evas object.
4851 *
4852 * This creates a set of points (currently only 4 is supported. no other
4853 * number for @p count will work). That is empty and ready to be modified
4854 * with evas_map calls.
4855 *
4856 * @param count number of points in the map.
4857 * @return a newly allocated map or @c NULL on errors.
4858 *
4859 * @see evas_map_free()
4860 * @see evas_map_dup()
4861 * @see evas_map_point_coord_set()
4862 * @see evas_map_point_image_uv_set()
4863 * @see evas_map_util_points_populate_from_object_full()
4864 * @see evas_map_util_points_populate_from_object()
4865 *
4866 * @see evas_object_map_set()
4867 */
4868EAPI Evas_Map *evas_map_new (int count);
4869
4870/**
4871 * Set the smoothing for map rendering
4872 *
4873 * This sets smoothing for map rendering. If the object is a type that has
4874 * its own smoothing settings, then both the smooth settings for this object
4875 * and the map must be turned off. By default smooth maps are enabled.
4876 *
4877 * @param m map to modify. Must not be NULL.
4878 * @param enabled enable or disable smooth map rendering
4879 */
4880EAPI void evas_map_smooth_set (Evas_Map *m, Eina_Bool enabled);
4881
4882/**
4883 * get the smoothing for map rendering
4884 *
4885 * This gets smoothing for map rendering.
4886 *
4887 * @param m map to get the smooth from. Must not be NULL.
4888 */
4889EAPI Eina_Bool evas_map_smooth_get (const Evas_Map *m);
4890
4891/**
4892 * Set the alpha flag for map rendering
4893 *
4894 * This sets alpha flag for map rendering. If the object is a type that has
4895 * its own alpha settings, then this will take precedence. Only image objects
4896 * have this currently.
4897 * Setting this off stops alpha blending of the map area, and is
4898 * useful if you know the object and/or all sub-objects is 100% solid.
4899 *
4900 * @param m map to modify. Must not be NULL.
4901 * @param enabled enable or disable alpha map rendering
4902 */
4903EAPI void evas_map_alpha_set (Evas_Map *m, Eina_Bool enabled);
4904
4905/**
4906 * get the alpha flag for map rendering
4907 *
4908 * This gets the alpha flag for map rendering.
4909 *
4910 * @param m map to get the alpha from. Must not be NULL.
4911 */
4912EAPI Eina_Bool evas_map_alpha_get (const Evas_Map *m);
4913
4914/**
4915 * Copy a previously allocated map.
4916 *
4917 * This makes a duplicate of the @p m object and returns it.
4918 *
4919 * @param m map to copy. Must not be NULL.
4920 * @return newly allocated map with the same count and contents as @p m.
4921 */
4922EAPI Evas_Map *evas_map_dup (const Evas_Map *m);
4923
4924/**
4925 * Free a previously allocated map.
4926 *
4927 * This frees a givem map @p m and all memory associated with it. You must NOT
4928 * free a map returned by evas_object_map_get() as this is internal.
4929 *
4930 * @param m map to free.
4931 */
4932EAPI void evas_map_free (Evas_Map *m);
4933
4934/**
4935 * Get a maps size.
4936 *
4937 * Returns the number of points in a map. Should be at least 4.
4938 *
4939 * @param m map to get size.
4940 * @return -1 on error, points otherwise.
4941 */
4942EAPI int evas_map_count_get (const Evas_Map *m) EINA_CONST;
4943
4944/**
4945 * Change the map point's coordinate.
4946 *
4947 * This sets the fixed point's coordinate in the map. Note that points
4948 * describe the outline of a quadrangle and are ordered either clockwise
4949 * or anti-clock-wise. It is suggested to keep your quadrangles concave and
4950 * non-complex, though these polygon modes may work, they may not render
4951 * a desired set of output. The quadrangle will use points 0 and 1 , 1 and 2,
4952 * 2 and 3, and 3 and 0 to describe the edges of the quadrangle.
4953 *
4954 * The X and Y and Z coordinates are in canvas units. Z is optional and may
4955 * or may not be honored in drawing. Z is a hint and does not affect the
4956 * X and Y rendered coordinates. It may be used for calculating fills with
4957 * perspective correct rendering.
4958 *
4959 * Remember all coordinates are canvas global ones like with move and resize
4960 * in evas.
4961 *
4962 * @param m map to change point. Must not be @c NULL.
4963 * @param idx index of point to change. Must be smaller than map size.
4964 * @param x Point X Coordinate
4965 * @param y Point Y Coordinate
4966 * @param z Point Z Coordinate hint (pre-perspective transform)
4967 *
4968 * @see evas_map_util_rotate()
4969 * @see evas_map_util_zoom()
4970 * @see evas_map_util_points_populate_from_object_full()
4971 * @see evas_map_util_points_populate_from_object()
4972 */
4973EAPI void evas_map_point_coord_set (Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z);
4974
4975/**
4976 * Get the map point's coordinate.
4977 *
4978 * This returns the coordinates of the given point in the map.
4979 *
4980 * @param m map to query point.
4981 * @param idx index of point to query. Must be smaller than map size.
4982 * @param x where to return the X coordinate.
4983 * @param y where to return the Y coordinate.
4984 * @param z where to return the Z coordinate.
4985 */
4986EAPI void evas_map_point_coord_get (const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z);
4987
4988/**
4989 * Change the map point's U and V texture source point
4990 *
4991 * This sets the U and V coordinates for the point. This determines which
4992 * coordinate in the source image is mapped to the given point, much like
4993 * OpenGL and textures. Notes that these points do select the pixel, but
4994 * are double floating point values to allow for accuracy and sub-pixel
4995 * selection.
4996 *
4997 * @param m map to change the point of.
4998 * @param idx index of point to change. Must be smaller than map size.
4999 * @param u the X coordinate within the image/texture source
5000 * @param v the Y coordinate within the image/texture source
5001 *
5002 * @see evas_map_point_coord_set()
5003 * @see evas_object_map_set()
5004 * @see evas_map_util_points_populate_from_object_full()
5005 * @see evas_map_util_points_populate_from_object()
5006 */
5007EAPI void evas_map_point_image_uv_set (Evas_Map *m, int idx, double u, double v);
5008
5009/**
5010 * Get the map point's U and V texture source points
5011 *
5012 * This returns the texture points set by evas_map_point_image_uv_set().
5013 *
5014 * @param m map to query point.
5015 * @param idx index of point to query. Must be smaller than map size.
5016 * @param u where to write the X coordinate within the image/texture source
5017 * @param v where to write the Y coordinate within the image/texture source
5018 */
5019EAPI void evas_map_point_image_uv_get (const Evas_Map *m, int idx, double *u, double *v);
5020
5021/**
5022 * Set the color of a vertex in the map
5023 *
5024 * This sets the color of the vertex in the map. Colors will be linearly
5025 * interpolated between vertex points through the map. Color will multiply
5026 * the "texture" pixels (like GL_MODULATE in OpenGL). The default color of
5027 * a vertex in a map is white solid (255, 255, 255, 255) which means it will
5028 * have no affect on modifying the texture pixels.
5029 *
5030 * @param m map to change the color of.
5031 * @param idx index of point to change. Must be smaller than map size.
5032 * @param r red (0 - 255)
5033 * @param g green (0 - 255)
5034 * @param b blue (0 - 255)
5035 * @param a alpha (0 - 255)
5036 *
5037 * @see evas_map_util_points_color_set()
5038 * @see evas_map_point_coord_set()
5039 * @see evas_object_map_set()
5040 */
5041EAPI void evas_map_point_color_set (Evas_Map *m, int idx, int r, int g, int b, int a);
5042
5043/**
5044 * Get the color set on a vertex in the map
5045 *
5046 * This gets the color set by evas_map_point_color_set() on the given vertex
5047 * of the map.
5048 *
5049 * @param m map to get the color of the vertex from.
5050 * @param idx index of point get. Must be smaller than map size.
5051 * @param r pointer to red return
5052 * @param g pointer to green return
5053 * @param b pointer to blue return
5054 * @param a pointer to alpha return (0 - 255)
5055 *
5056 * @see evas_map_point_coord_set()
5057 * @see evas_object_map_set()
5058 */
5059EAPI void evas_map_point_color_get (const Evas_Map *m, int idx, int *r, int *g, int *b, int *a);
5060/**
5061 * @}
5062 */
5063
5064/**
5065 * @defgroup Evas_Object_Group_Size_Hints Size Hints
5066 *
5067 * Objects may carry hints, so that another object that acts as a
5068 * manager (see @ref Evas_Smart_Object_Group) may know how to properly
5069 * position and resize its subordinate objects. The Size Hints provide
5070 * a common interface that is recommended as the protocol for such
5071 * information.
5072 *
5073 * For example, box objects use alignment hints to align its
5074 * lines/columns inside its container, padding hints to set the
5075 * padding between each individual child, etc.
5076 *
5077 * Examples on their usage:
5078 * - @ref Example_Evas_Size_Hints "evas-hints.c"
5079 * - @ref Example_Evas_Aspect_Hints "evas-aspect-hints.c"
5080 *
5081 * @ingroup Evas_Object_Group
5082 */
5083
5084/**
5085 * @addtogroup Evas_Object_Group_Size_Hints
5086 * @{
5087 */
5088
5089/**
5090 * Retrieves the hints for an object's minimum size.
5091 *
5092 * @param obj The given Evas object to query hints from.
5093 * @param w Pointer to an integer in which to store the minimum width.
5094 * @param h Pointer to an integer in which to store the minimum height.
5095 *
5096 * These are hints on the minimim sizes @p obj should have. This is
5097 * not a size enforcement in any way, it's just a hint that should be
5098 * used whenever appropriate.
5099 *
5100 * @note Use @c NULL pointers on the hint components you're not
5101 * interested in: they'll be ignored by the function.
5102 *
5103 * @see evas_object_size_hint_min_set() for an example
5104 */
5105EAPI void evas_object_size_hint_min_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
5106
5107/**
5108 * Sets the hints for an object's minimum size.
5109 *
5110 * @param obj The given Evas object to query hints from.
5111 * @param w Integer to use as the minimum width hint.
5112 * @param h Integer to use as the minimum height hint.
5113 *
5114 * This is not a size enforcement in any way, it's just a hint that
5115 * should be used whenever appropriate.
5116 *
5117 * Values @c 0 will be treated as unset hint components, when queried
5118 * by managers.
5119 *
5120 * Example:
5121 * @dontinclude evas-hints.c
5122 * @skip evas_object_size_hint_min_set
5123 * @until return
5124 *
5125 * In this example the minimum size hints change the behavior of an
5126 * Evas box when layouting its children. See the full @ref
5127 * Example_Evas_Size_Hints "example".
5128 *
5129 * @see evas_object_size_hint_min_get()
5130 */
5131EAPI void evas_object_size_hint_min_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5132
5133/**
5134 * Retrieves the hints for an object's maximum size.
5135 *
5136 * @param obj The given Evas object to query hints from.
5137 * @param w Pointer to an integer in which to store the maximum width.
5138 * @param h Pointer to an integer in which to store the maximum height.
5139 *
5140 * These are hints on the maximum sizes @p obj should have. This is
5141 * not a size enforcement in any way, it's just a hint that should be
5142 * used whenever appropriate.
5143 *
5144 * @note Use @c NULL pointers on the hint components you're not
5145 * interested in: they'll be ignored by the function.
5146 *
5147 * @see evas_object_size_hint_max_set()
5148 */
5149EAPI void evas_object_size_hint_max_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
5150
5151/**
5152 * Sets the hints for an object's maximum size.
5153 *
5154 * @param obj The given Evas object to query hints from.
5155 * @param w Integer to use as the maximum width hint.
5156 * @param h Integer to use as the maximum height hint.
5157 *
5158 * This is not a size enforcement in any way, it's just a hint that
5159 * should be used whenever appropriate.
5160 *
5161 * Values @c -1 will be treated as unset hint components, when queried
5162 * by managers.
5163 *
5164 * Example:
5165 * @dontinclude evas-hints.c
5166 * @skip evas_object_size_hint_max_set
5167 * @until return
5168 *
5169 * In this example the maximum size hints change the behavior of an
5170 * Evas box when layouting its children. See the full @ref
5171 * Example_Evas_Size_Hints "example".
5172 *
5173 * @see evas_object_size_hint_max_get()
5174 */
5175EAPI void evas_object_size_hint_max_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5176
5177/**
5178 * Retrieves the hints for an object's optimum size.
5179 *
5180 * @param obj The given Evas object to query hints from.
5181 * @param w Pointer to an integer in which to store the requested width.
5182 * @param h Pointer to an integer in which to store the requested height.
5183 *
5184 * These are hints on the optimum sizes @p obj should have. This is
5185 * not a size enforcement in any way, it's just a hint that should be
5186 * used whenever appropriate.
5187 *
5188 * @note Use @c NULL pointers on the hint components you're not
5189 * interested in: they'll be ignored by the function.
5190 *
5191 * @see evas_object_size_hint_request_set()
5192 */
5193EAPI void evas_object_size_hint_request_get (const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
5194
5195/**
5196 * Sets the hints for an object's optimum size.
5197 *
5198 * @param obj The given Evas object to query hints from.
5199 * @param w Integer to use as the preferred width hint.
5200 * @param h Integer to use as the preferred height hint.
5201 *
5202 * This is not a size enforcement in any way, it's just a hint that
5203 * should be used whenever appropriate.
5204 *
5205 * Values @c 0 will be treated as unset hint components, when queried
5206 * by managers.
5207 *
5208 * @see evas_object_size_hint_request_get()
5209 */
5210EAPI void evas_object_size_hint_request_set (Evas_Object *obj, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5211
5212/**
5213 * Retrieves the hints for an object's aspect ratio.
5214 *
5215 * @param obj The given Evas object to query hints from.
5216 * @param aspect Returns the policy/type of aspect ratio applied to @p obj.
5217 * @param w Pointer to an integer in which to store the aspect's width
5218 * ratio term.
5219 * @param h Pointer to an integer in which to store the aspect's
5220 * height ratio term.
5221 *
5222 * The different aspect ratio policies are documented in the
5223 * #Evas_Aspect_Control type. A container respecting these size hints
5224 * would @b resize its children accordingly to those policies.
5225 *
5226 * For any policy, if any of the given aspect ratio terms are @c 0,
5227 * the object's container should ignore the aspect and scale @p obj to
5228 * occupy the whole available area. If they are both positive
5229 * integers, that proportion will be respected, under each scaling
5230 * policy.
5231 *
5232 * These images illustrate some of the #Evas_Aspect_Control policies:
5233 *
5234 * @image html any-policy.png
5235 * @image rtf any-policy.png
5236 * @image latex any-policy.eps
5237 *
5238 * @image html aspect-control-none-neither.png
5239 * @image rtf aspect-control-none-neither.png
5240 * @image latex aspect-control-none-neither.eps
5241 *
5242 * @image html aspect-control-both.png
5243 * @image rtf aspect-control-both.png
5244 * @image latex aspect-control-both.eps
5245 *
5246 * @image html aspect-control-horizontal.png
5247 * @image rtf aspect-control-horizontal.png
5248 * @image latex aspect-control-horizontal.eps
5249 *
5250 * This is not a size enforcement in any way, it's just a hint that
5251 * should be used whenever appropriate.
5252 *
5253 * @note Use @c NULL pointers on the hint components you're not
5254 * interested in: they'll be ignored by the function.
5255 *
5256 * Example:
5257 * @dontinclude evas-aspect-hints.c
5258 * @skip if (strcmp(ev->keyname, "c") == 0)
5259 * @until }
5260 *
5261 * See the full @ref Example_Evas_Aspect_Hints "example".
5262 *
5263 * @see evas_object_size_hint_aspect_set()
5264 */
5265EAPI 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);
5266
5267/**
5268 * Sets the hints for an object's aspect ratio.
5269 *
5270 * @param obj The given Evas object to query hints from.
5271 * @param aspect The policy/type of aspect ratio to apply to @p obj.
5272 * @param w Integer to use as aspect width ratio term.
5273 * @param h Integer to use as aspect height ratio term.
5274 *
5275 * This is not a size enforcement in any way, it's just a hint that should
5276 * be used whenever appropriate.
5277 *
5278 * If any of the given aspect ratio terms are @c 0,
5279 * the object's container will ignore the aspect and scale @p obj to
5280 * occupy the whole available area, for any given policy.
5281 *
5282 * @see evas_object_size_hint_aspect_get() for more information.
5283 */
5284EAPI void evas_object_size_hint_aspect_set (Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h) EINA_ARG_NONNULL(1);
5285
5286/**
5287 * Retrieves the hints for on object's alignment.
5288 *
5289 * @param obj The given Evas object to query hints from.
5290 * @param x Pointer to a double in which to store the horizontal
5291 * alignment hint.
5292 * @param y Pointer to a double in which to store the vertical
5293 * alignment hint.
5294 *
5295 * This is not a size enforcement in any way, it's just a hint that
5296 * should be used whenever appropriate.
5297 *
5298 * @note Use @c NULL pointers on the hint components you're not
5299 * interested in: they'll be ignored by the function.
5300 *
5301 * @see evas_object_size_hint_align_set() for more information
5302 */
5303EAPI void evas_object_size_hint_align_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
5304
5305/**
5306 * Sets the hints for an object's alignment.
5307 *
5308 * @param obj The given Evas object to query hints from.
5309 * @param x Double, ranging from @c 0.0 to @c 1.0 or with the
5310 * special value #EVAS_HINT_FILL, to use as horizontal alignment hint.
5311 * @param y Double, ranging from @c 0.0 to @c 1.0 or with the
5312 * special value #EVAS_HINT_FILL, to use as vertical alignment hint.
5313 *
5314 * These are hints on how to align an object <b>inside the boundaries
5315 * of a container/manager</b>. Accepted values are in the @c 0.0 to @c
5316 * 1.0 range, with the special value #EVAS_HINT_FILL used to specify
5317 * "justify" or "fill" by some users. In this case, maximum size hints
5318 * should be enforced with higher priority, if they are set. Also, any
5319 * padding hint set on objects should add up to the alignment space on
5320 * the final scene composition.
5321 *
5322 * See documentation of possible users: in Evas, they are the @ref
5323 * Evas_Object_Box "box" and @ref Evas_Object_Table "table" smart
5324 * objects.
5325 *
5326 * For the horizontal component, @c 0.0 means to the left, @c 1.0
5327 * means to the right. Analogously, for the vertical component, @c 0.0
5328 * to the top, @c 1.0 means to the bottom.
5329 *
5330 * See the following figure:
5331 *
5332 * @image html alignment-hints.png
5333 * @image rtf alignment-hints.png
5334 * @image latex alignment-hints.eps
5335 *
5336 * This is not a size enforcement in any way, it's just a hint that
5337 * should be used whenever appropriate.
5338 *
5339 * Example:
5340 * @dontinclude evas-hints.c
5341 * @skip evas_object_size_hint_align_set
5342 * @until return
5343 *
5344 * In this example the alignment hints change the behavior of an Evas
5345 * box when layouting its children. See the full @ref
5346 * Example_Evas_Size_Hints "example".
5347 *
5348 * @see evas_object_size_hint_align_get()
5349 * @see evas_object_size_hint_max_set()
5350 * @see evas_object_size_hint_padding_set()
5351 */
5352EAPI void evas_object_size_hint_align_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
5353
5354/**
5355 * Retrieves the hints for an object's weight.
5356 *
5357 * @param obj The given Evas object to query hints from.
5358 * @param x Pointer to a double in which to store the horizontal weight.
5359 * @param y Pointer to a double in which to store the vertical weight.
5360 *
5361 * Accepted values are zero or positive values. Some users might use
5362 * this hint as a boolean, but some might consider it as a @b
5363 * proportion, see documentation of possible users, which in Evas are
5364 * the @ref Evas_Object_Box "box" and @ref Evas_Object_Table "table"
5365 * smart objects.
5366 *
5367 * This is not a size enforcement in any way, it's just a hint that
5368 * should be used whenever appropriate.
5369 *
5370 * @note Use @c NULL pointers on the hint components you're not
5371 * interested in: they'll be ignored by the function.
5372 *
5373 * @see evas_object_size_hint_weight_set() for an example
5374 */
5375EAPI void evas_object_size_hint_weight_get (const Evas_Object *obj, double *x, double *y) EINA_ARG_NONNULL(1);
5376
5377/**
5378 * Sets the hints for an object's weight.
5379 *
5380 * @param obj The given Evas object to query hints from.
5381 * @param x Nonnegative double value to use as horizontal weight hint.
5382 * @param y Nonnegative double value to use as vertical weight hint.
5383 *
5384 * This is not a size enforcement in any way, it's just a hint that
5385 * should be used whenever appropriate.
5386 *
5387 * This is a hint on how a container object should @b resize a given
5388 * child within its area. Containers may adhere to the simpler logic
5389 * of just expanding the child object's dimensions to fit its own (see
5390 * the #EVAS_HINT_EXPAND helper weight macro) or the complete one of
5391 * taking each child's weight hint as real @b weights to how much of
5392 * its size to allocate for them in each axis. A container is supposed
5393 * to, after @b normalizing the weights of its children (with weight
5394 * hints), distribute the space it has to layout them by those factors
5395 * -- most weighted children get larger in this process than the least
5396 * ones.
5397 *
5398 * Example:
5399 * @dontinclude evas-hints.c
5400 * @skip evas_object_size_hint_weight_set
5401 * @until return
5402 *
5403 * In this example the weight hints change the behavior of an Evas box
5404 * when layouting its children. See the full @ref
5405 * Example_Evas_Size_Hints "example".
5406 *
5407 * @see evas_object_size_hint_weight_get() for more information
5408 */
5409EAPI void evas_object_size_hint_weight_set (Evas_Object *obj, double x, double y) EINA_ARG_NONNULL(1);
5410
5411/**
5412 * Retrieves the hints for an object's padding space.
5413 *
5414 * @param obj The given Evas object to query hints from.
5415 * @param l Pointer to an integer in which to store left padding.
5416 * @param r Pointer to an integer in which to store right padding.
5417 * @param t Pointer to an integer in which to store top padding.
5418 * @param b Pointer to an integer in which to store bottom padding.
5419 *
5420 * Padding is extra space an object takes on each of its delimiting
5421 * rectangle sides, in canvas units. This space will be rendered
5422 * transparent, naturally, as in the following figure:
5423 *
5424 * @image html padding-hints.png
5425 * @image rtf padding-hints.png
5426 * @image latex padding-hints.eps
5427 *
5428 * This is not a size enforcement in any way, it's just a hint that
5429 * should be used whenever appropriate.
5430 *
5431 * @note Use @c NULL pointers on the hint components you're not
5432 * interested in: they'll be ignored by the function.
5433 *
5434 * Example:
5435 * @dontinclude evas-hints.c
5436 * @skip evas_object_size_hint_padding_set
5437 * @until return
5438 *
5439 * In this example the padding hints change the behavior of an Evas box
5440 * when layouting its children. See the full @ref
5441 * Example_Evas_Size_Hints "example".
5442 *
5443 * @see evas_object_size_hint_padding_set()
5444 */
5445EAPI 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);
5446
5447/**
5448 * Sets the hints for an object's padding space.
5449 *
5450 * @param obj The given Evas object to query hints from.
5451 * @param l Integer to specify left padding.
5452 * @param r Integer to specify right padding.
5453 * @param t Integer to specify top padding.
5454 * @param b Integer to specify bottom padding.
5455 *
5456 * This is not a size enforcement in any way, it's just a hint that
5457 * should be used whenever appropriate.
5458 *
5459 * @see evas_object_size_hint_padding_get() for more information
5460 */
5461EAPI 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);
5462
5463/**
5464 * @}
5465 */
5466
5467/**
5468 * @defgroup Evas_Object_Group_Extras Extra Object Manipulation
5469 *
5470 * Miscellaneous functions that also apply to any object, but are less
5471 * used or not implemented by all objects.
5472 *
5473 * Examples on this group of functions can be found @ref
5474 * Example_Evas_Stacking "here" and @ref Example_Evas_Events "here".
5475 *
5476 * @ingroup Evas_Object_Group
5477 */
5478
5479/**
5480 * @addtogroup Evas_Object_Group_Extras
5481 * @{
5482 */
5483
5484/**
5485 * Set an attached data pointer to an object with a given string key.
5486 *
5487 * @param obj The object to attach the data pointer to
5488 * @param key The string key for the data to access it
5489 * @param data The pointer to the data to be attached
5490 *
5491 * This attaches the pointer @p data to the object @p obj, given the
5492 * access string @p key. This pointer will stay "hooked" to the object
5493 * until a new pointer with the same string key is attached with
5494 * evas_object_data_set() or it is deleted with
5495 * evas_object_data_del(). On deletion of the object @p obj, the
5496 * pointers will not be accessible from the object anymore.
5497 *
5498 * You can find the pointer attached under a string key using
5499 * evas_object_data_get(). It is the job of the calling application to
5500 * free any data pointed to by @p data when it is no longer required.
5501 *
5502 * If @p data is @c NULL, the old value stored at @p key will be
5503 * removed but no new value will be stored. This is synonymous with
5504 * calling evas_object_data_del() with @p obj and @p key.
5505 *
5506 * @note This function is very handy when you have data associated
5507 * specifically to an Evas object, being of use only when dealing with
5508 * it. Than you don't have the burden to a pointer to it elsewhere,
5509 * using this family of functions.
5510 *
5511 * Example:
5512 *
5513 * @code
5514 * int *my_data;
5515 * extern Evas_Object *obj;
5516 *
5517 * my_data = malloc(500);
5518 * evas_object_data_set(obj, "name_of_data", my_data);
5519 * printf("The data that was attached was %p\n", evas_object_data_get(obj, "name_of_data"));
5520 * @endcode
5521 */
5522EAPI void evas_object_data_set (Evas_Object *obj, const char *key, const void *data) EINA_ARG_NONNULL(1, 2);
5523
5524/**
5525 * Return an attached data pointer on an Evas object by its given
5526 * string key.
5527 *
5528 * @param obj The object to which the data was attached
5529 * @param key The string key the data was stored under
5530 * @return The data pointer stored, or @c NULL if none was stored
5531 *
5532 * This function will return the data pointer attached to the object
5533 * @p obj, stored using the string key @p key. If the object is valid
5534 * and a data pointer was stored under the given key, that pointer
5535 * will be returned. If this is not the case, @c NULL will be
5536 * returned, signifying an invalid object or a non-existent key. It is
5537 * possible that a @c NULL pointer was stored given that key, but this
5538 * situation is non-sensical and thus can be considered an error as
5539 * well. @c NULL pointers are never stored as this is the return value
5540 * if an error occurs.
5541 *
5542 * Example:
5543 *
5544 * @code
5545 * int *my_data;
5546 * extern Evas_Object *obj;
5547 *
5548 * my_data = evas_object_data_get(obj, "name_of_my_data");
5549 * if (my_data) printf("Data stored was %p\n", my_data);
5550 * else printf("No data was stored on the object\n");
5551 * @endcode
5552 */
5553EAPI void *evas_object_data_get (const Evas_Object *obj, const char *key) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
5554
5555/**
5556 * Delete an attached data pointer from an object.
5557 *
5558 * @param obj The object to delete the data pointer from
5559 * @param key The string key the data was stored under
5560 * @return The original data pointer stored at @p key on @p obj
5561 *
5562 * This will remove the stored data pointer from @p obj stored under
5563 * @p key and return this same pointer, if actually there was data
5564 * there, or @c NULL, if nothing was stored under that key.
5565 *
5566 * Example:
5567 *
5568 * @code
5569 * int *my_data;
5570 * extern Evas_Object *obj;
5571 *
5572 * my_data = evas_object_data_del(obj, "name_of_my_data");
5573 * @endcode
5574 */
5575EAPI void *evas_object_data_del (Evas_Object *obj, const char *key) EINA_ARG_NONNULL(1, 2);
5576
5577
5578/**
5579 * Set pointer behavior.
5580 *
5581 * @param obj
5582 * @param setting desired behavior.
5583 *
5584 * This function has direct effect on event callbacks related to
5585 * mouse.
5586 *
5587 * If @p setting is EVAS_OBJECT_POINTER_MODE_AUTOGRAB, then when mouse
5588 * is down at this object, events will be restricted to it as source,
5589 * mouse moves, for example, will be emitted even if outside this
5590 * object area.
5591 *
5592 * If @p setting is EVAS_OBJECT_POINTER_MODE_NOGRAB, then events will
5593 * be emitted just when inside this object area.
5594 *
5595 * The default value is EVAS_OBJECT_POINTER_MODE_AUTOGRAB.
5596 *
5597 * @ingroup Evas_Object_Group_Extras
5598 */
5599EAPI void evas_object_pointer_mode_set (Evas_Object *obj, Evas_Object_Pointer_Mode setting) EINA_ARG_NONNULL(1);
5600
5601/**
5602 * Determine how pointer will behave.
5603 * @param obj
5604 * @return pointer behavior.
5605 * @ingroup Evas_Object_Group_Extras
5606 */
5607EAPI Evas_Object_Pointer_Mode evas_object_pointer_mode_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5608
5609
5610/**
5611 * Sets whether or not the given Evas object is to be drawn anti-aliased.
5612 *
5613 * @param obj The given Evas object.
5614 * @param anti_alias 1 if the object is to be anti_aliased, 0 otherwise.
5615 * @ingroup Evas_Object_Group_Extras
5616 */
5617EAPI void evas_object_anti_alias_set (Evas_Object *obj, Eina_Bool antialias) EINA_ARG_NONNULL(1);
5618
5619/**
5620 * Retrieves whether or not the given Evas object is to be drawn anti_aliased.
5621 * @param obj The given Evas object.
5622 * @return @c 1 if the object is to be anti_aliased. @c 0 otherwise.
5623 * @ingroup Evas_Object_Group_Extras
5624 */
5625EAPI Eina_Bool evas_object_anti_alias_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5626
5627
5628/**
5629 * Sets the scaling factor for an Evas object. Does not affect all
5630 * objects.
5631 *
5632 * @param obj The given Evas object.
5633 * @param scale The scaling factor. <c>1.0</c> means no scaling,
5634 * default size.
5635 *
5636 * This will multiply the object's dimension by the given factor, thus
5637 * altering its geometry (width and height). Useful when you want
5638 * scalable UI elements, possibly at run time.
5639 *
5640 * @note Only text and textblock objects have scaling change
5641 * handlers. Other objects won't change visually on this call.
5642 *
5643 * @see evas_object_scale_get()
5644 *
5645 * @ingroup Evas_Object_Group_Extras
5646 */
5647EAPI void evas_object_scale_set (Evas_Object *obj, double scale) EINA_ARG_NONNULL(1);
5648
5649/**
5650 * Retrieves the scaling factor for the given Evas object.
5651 *
5652 * @param obj The given Evas object.
5653 * @return The scaling factor.
5654 *
5655 * @ingroup Evas_Object_Group_Extras
5656 *
5657 * @see evas_object_scale_set()
5658 */
5659EAPI double evas_object_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5660
5661
5662/**
5663 * Sets the render_op to be used for rendering the Evas object.
5664 * @param obj The given Evas object.
5665 * @param render_op one of the Evas_Render_Op values.
5666 * @ingroup Evas_Object_Group_Extras
5667 */
5668EAPI void evas_object_render_op_set (Evas_Object *obj, Evas_Render_Op op) EINA_ARG_NONNULL(1);
5669
5670/**
5671 * Retrieves the current value of the operation used for rendering the Evas object.
5672 * @param obj The given Evas object.
5673 * @return one of the enumerated values in Evas_Render_Op.
5674 * @ingroup Evas_Object_Group_Extras
5675 */
5676EAPI Evas_Render_Op evas_object_render_op_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5677
5678/**
5679 * Set whether to use precise (usually expensive) point collision
5680 * detection for a given Evas object.
5681 *
5682 * @param obj The given object.
5683 * @param precise whether to use precise point collision detection or
5684 * not The default value is false.
5685 *
5686 * Use this function to make Evas treat objects' transparent areas as
5687 * @b not belonging to it with regard to mouse pointer events. By
5688 * default, all of the object's boundary rectangle will be taken in
5689 * account for them.
5690 *
5691 * @warning By using precise point collision detection you'll be
5692 * making Evas more resource intensive.
5693 *
5694 * Example code follows.
5695 * @dontinclude evas-events.c
5696 * @skip if (strcmp(ev->keyname, "p") == 0)
5697 * @until }
5698 *
5699 * See the full example @ref Example_Evas_Events "here".
5700 *
5701 * @see evas_object_precise_is_inside_get()
5702 * @ingroup Evas_Object_Group_Extras
5703 */
5704 EAPI void evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise) EINA_ARG_NONNULL(1);
5705
5706/**
5707 * Determine whether an object is set to use precise point collision
5708 * detection.
5709 *
5710 * @param obj The given object.
5711 * @return whether @p obj is set to use precise point collision
5712 * detection or not The default value is false.
5713 *
5714 * @see evas_object_precise_is_inside_set() for an example
5715 *
5716 * @ingroup Evas_Object_Group_Extras
5717 */
5718 EAPI Eina_Bool evas_object_precise_is_inside_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5719
5720/**
5721 * Set a hint flag on the given Evas object that it's used as a "static
5722 * clipper".
5723 *
5724 * @param obj The given object.
5725 * @param is_static_clip @c EINA_TRUE if it's to be used as a static
5726 * clipper, @c EINA_FALSE otherwise
5727 *
5728 * This is a hint to Evas that this object is used as a big static
5729 * clipper and shouldn't be moved with children and otherwise
5730 * considered specially. The default value for new objects is @c
5731 * EINA_FALSE.
5732 *
5733 * @see evas_object_static_clip_get()
5734 *
5735 * @ingroup Evas_Object_Group_Extras
5736 */
5737 EAPI void evas_object_static_clip_set (Evas_Object *obj, Eina_Bool is_static_clip) EINA_ARG_NONNULL(1);
5738
5739/**
5740 * Get the "static clipper" hint flag for a given Evas object.
5741 *
5742 * @param obj The given object.
5743 * @returrn @c EINA_TRUE if it's set as a static clipper, @c
5744 * EINA_FALSE otherwise
5745 *
5746 * @see evas_object_static_clip_set() for more details
5747 *
5748 * @ingroup Evas_Object_Group_Extras
5749 */
5750 EAPI Eina_Bool evas_object_static_clip_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5751
5752/**
5753 * @}
5754 */
5755
5756/**
5757 * @defgroup Evas_Object_Group_Find Finding Objects
5758 *
5759 * Functions that allows finding objects by their position, name or
5760 * other properties.
5761 *
5762 * @ingroup Evas_Object_Group
5763 */
5764
5765/**
5766 * @addtogroup Evas_Object_Group_Find
5767 * @{
5768 */
5769
5770/**
5771 * Retrieve the object that currently has focus.
5772 *
5773 * @param e The Evas canvas to query for focused object on.
5774 * @return The object that has focus or @c NULL if there is not one.
5775 *
5776 * Evas can have (at most) one of its objects focused at a time.
5777 * Focused objects will be the ones having <b>key events</b> delivered
5778 * to, which the programmer can act upon by means of
5779 * evas_object_event_callback_add() usage.
5780 *
5781 * @note Most users wouldn't be dealing directly with Evas' focused
5782 * objects. Instead, they would be using a higher level library for
5783 * that (like a toolkit, as Elementary) to handle focus and who's
5784 * receiving input for them.
5785 *
5786 * This call returns the object that currently has focus on the canvas
5787 * @p e or @c NULL, if none.
5788 *
5789 * @see evas_object_focus_set
5790 * @see evas_object_focus_get
5791 * @see evas_object_key_grab
5792 * @see evas_object_key_ungrab
5793 *
5794 * Example:
5795 * @dontinclude evas-events.c
5796 * @skip evas_event_callback_add(d.canvas, EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN,
5797 * @until evas_object_focus_set(d.bg, EINA_TRUE);
5798 * @dontinclude evas-events.c
5799 * @skip called when our rectangle gets focus
5800 * @until }
5801 *
5802 * In this example the @c event_info is exactly a pointer to that
5803 * focused rectangle. See the full @ref Example_Evas_Events "example".
5804 *
5805 * @ingroup Evas_Object_Group_Find
5806 */
5807EAPI Evas_Object *evas_focus_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5808
5809/**
5810 * Retrieves the object on the given evas with the given name.
5811 * @param e The given evas.
5812 * @param name The given name.
5813 * @return If successful, the Evas object with the given name. Otherwise,
5814 * @c NULL.
5815 *
5816 * This looks for the evas object given a name by evas_object_name_set(). If
5817 * the name is not unique canvas-wide, then which one of the many objects
5818 * with that name is returned is undefined, so only use this if you can ensure
5819 * the object name is unique.
5820 *
5821 * @ingroup Evas_Object_Group_Find
5822 */
5823EAPI Evas_Object *evas_object_name_find (const Evas *e, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5824
5825/**
5826 * Retrieves the object from children of the given object with the given name.
5827 * @param obj The parent (smart) object whose children to search.
5828 * @param name The given name.
5829 * @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.).
5830 * @return If successful, the Evas object with the given name. Otherwise,
5831 * @c NULL.
5832 *
5833 * This looks for the evas object given a name by evas_object_name_set(), but
5834 * it ONLY looks at the children of the object *p obj, and will only recurse
5835 * into those children if @p recurse is greater than 0. If the name is not
5836 * unique within immediate children (or the whole child tree) then it is not
5837 * defined which child object will be returned. If @p recurse is set to -1 then
5838 * it will recurse without limit.
5839 *
5840 * @since 1.2
5841 *
5842 * @ingroup Evas_Object_Group_Find
5843 */
5844EAPI Evas_Object *evas_object_name_child_find (const Evas_Object *obj, const char *name, int recurse) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5845
5846/**
5847 * Retrieve the Evas object stacked at the top of a given position in
5848 * a canvas
5849 *
5850 * @param e A handle to the canvas.
5851 * @param x The horizontal coordinate of the position
5852 * @param y The vertical coordinate of the position
5853 * @param include_pass_events_objects Boolean flag to include or not
5854 * objects which pass events in this calculation
5855 * @param include_hidden_objects Boolean flag to include or not hidden
5856 * objects in this calculation
5857 * @return The Evas object that is over all other objects at the given
5858 * position.
5859 *
5860 * This function will traverse all the layers of the given canvas,
5861 * from top to bottom, querying for objects with areas covering the
5862 * given position. The user can remove from from the query
5863 * objects which are hidden and/or which are set to pass events.
5864 *
5865 * @warning This function will @b skip objects parented by smart
5866 * objects, acting only on the ones at the "top level", with regard to
5867 * object parenting.
5868 */
5869EAPI 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);
5870
5871/**
5872 * Retrieve the Evas object stacked at the top at the position of the
5873 * mouse cursor, over a given canvas
5874 *
5875 * @param e A handle to the canvas.
5876 * @return The Evas object that is over all other objects at the mouse
5877 * pointer's position
5878 *
5879 * This function will traverse all the layers of the given canvas,
5880 * from top to bottom, querying for objects with areas covering the
5881 * mouse pointer's position, over @p e.
5882 *
5883 * @warning This function will @b skip objects parented by smart
5884 * objects, acting only on the ones at the "top level", with regard to
5885 * object parenting.
5886 */
5887EAPI Evas_Object *evas_object_top_at_pointer_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5888
5889/**
5890 * Retrieve the Evas object stacked at the top of a given rectangular
5891 * region in a canvas
5892 *
5893 * @param e A handle to the canvas.
5894 * @param x The top left corner's horizontal coordinate for the
5895 * rectangular region
5896 * @param y The top left corner's vertical coordinate for the
5897 * rectangular region
5898 * @param w The width of the rectangular region
5899 * @param h The height of the rectangular region
5900 * @param include_pass_events_objects Boolean flag to include or not
5901 * objects which pass events in this calculation
5902 * @param include_hidden_objects Boolean flag to include or not hidden
5903 * objects in this calculation
5904 * @return The Evas object that is over all other objects at the given
5905 * rectangular region.
5906 *
5907 * This function will traverse all the layers of the given canvas,
5908 * from top to bottom, querying for objects with areas overlapping
5909 * with the given rectangular region inside @p e. The user can remove
5910 * from the query objects which are hidden and/or which are set to
5911 * pass events.
5912 *
5913 * @warning This function will @b skip objects parented by smart
5914 * objects, acting only on the ones at the "top level", with regard to
5915 * object parenting.
5916 */
5917EAPI 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);
5918
5919/**
5920 * Retrieve a list of Evas objects lying over a given position in
5921 * a canvas
5922 *
5923 * @param e A handle to the canvas.
5924 * @param x The horizontal coordinate of the position
5925 * @param y The vertical coordinate of the position
5926 * @param include_pass_events_objects Boolean flag to include or not
5927 * objects which pass events in this calculation
5928 * @param include_hidden_objects Boolean flag to include or not hidden
5929 * objects in this calculation
5930 * @return The list of Evas objects that are over the given position
5931 * in @p e
5932 *
5933 * This function will traverse all the layers of the given canvas,
5934 * from top to bottom, querying for objects with areas covering the
5935 * given position. The user can remove from from the query
5936 * objects which are hidden and/or which are set to pass events.
5937 *
5938 * @warning This function will @b skip objects parented by smart
5939 * objects, acting only on the ones at the "top level", with regard to
5940 * object parenting.
5941 */
5942EAPI 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);
5943 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);
5944
5945/**
5946 * Get the lowest (stacked) Evas object on the canvas @p
5947 *
5948 * @param e a valid canvas pointer
5949 * @return a pointer to the lowest object on it, if any, or @c NULL,
5950 * otherwise
5951 *
5952 * This function will take all populated layers in the canvas into
5953 * account, getting the lowest object for the lowest layer, naturally.
5954 *
5955 * @see evas_object_layer_get()
5956 * @see evas_object_layer_set()
5957 * @see evas_object_below_get()
5958 * @see evas_object_above_get()
5959 *
5960 * @warning This function will @b skip objects parented by smart
5961 * objects, acting only on the ones at the "top level", with regard to
5962 * object parenting.
5963 */
5964EAPI Evas_Object *evas_object_bottom_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5965
5966/**
5967 * Get the highest (stacked) Evas object on the canvas @p
5968 *
5969 * @param e a valid canvas pointer
5970 * @return a pointer to the highest object on it, if any, or @c NULL,
5971 * otherwise
5972 *
5973 * This function will take all populated layers in the canvas into
5974 * account, getting the highest object for the highest layer,
5975 * naturally.
5976 *
5977 * @see evas_object_layer_get()
5978 * @see evas_object_layer_set()
5979 * @see evas_object_below_get()
5980 * @see evas_object_above_get()
5981 *
5982 * @warning This function will @b skip objects parented by smart
5983 * objects, acting only on the ones at the "top level", with regard to
5984 * object parenting.
5985 */
5986EAPI Evas_Object *evas_object_top_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
5987
5988/**
5989 * @}
5990 */
5991
5992/**
5993 * @defgroup Evas_Object_Group_Interceptors Object Method Interceptors
5994 *
5995 * Evas provides a way to intercept method calls. The interceptor
5996 * callback may opt to completely deny the call, or may check and
5997 * change the parameters before continuing. The continuation of an
5998 * intercepted call is done by calling the intercepted call again,
5999 * from inside the interceptor callback.
6000 *
6001 * @ingroup Evas_Object_Group
6002 */
6003
6004/**
6005 * @addtogroup Evas_Object_Group_Interceptors
6006 * @{
6007 */
6008
6009typedef void (*Evas_Object_Intercept_Show_Cb) (void *data, Evas_Object *obj);
6010typedef void (*Evas_Object_Intercept_Hide_Cb) (void *data, Evas_Object *obj);
6011typedef void (*Evas_Object_Intercept_Move_Cb) (void *data, Evas_Object *obj, Evas_Coord x, Evas_Coord y);
6012typedef void (*Evas_Object_Intercept_Resize_Cb) (void *data, Evas_Object *obj, Evas_Coord w, Evas_Coord h);
6013typedef void (*Evas_Object_Intercept_Raise_Cb) (void *data, Evas_Object *obj);
6014typedef void (*Evas_Object_Intercept_Lower_Cb) (void *data, Evas_Object *obj);
6015typedef void (*Evas_Object_Intercept_Stack_Above_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
6016typedef void (*Evas_Object_Intercept_Stack_Below_Cb) (void *data, Evas_Object *obj, Evas_Object *above);
6017typedef void (*Evas_Object_Intercept_Layer_Set_Cb) (void *data, Evas_Object *obj, int l);
6018typedef void (*Evas_Object_Intercept_Color_Set_Cb) (void *data, Evas_Object *obj, int r, int g, int b, int a);
6019typedef void (*Evas_Object_Intercept_Clip_Set_Cb) (void *data, Evas_Object *obj, Evas_Object *clip);
6020typedef void (*Evas_Object_Intercept_Clip_Unset_Cb) (void *data, Evas_Object *obj);
6021
6022/**
6023 * Set the callback function that intercepts a show event of a object.
6024 *
6025 * @param obj The given canvas object pointer.
6026 * @param func The given function to be the callback function.
6027 * @param data The data passed to the callback function.
6028 *
6029 * This function sets a callback function to intercepts a show event
6030 * of a canvas object.
6031 *
6032 * @see evas_object_intercept_show_callback_del().
6033 *
6034 */
6035EAPI void evas_object_intercept_show_callback_add (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
6036
6037/**
6038 * Unset the callback function that intercepts a show event of a
6039 * object.
6040 *
6041 * @param obj The given canvas object pointer.
6042 * @param func The given callback function.
6043 *
6044 * This function sets a callback function to intercepts a show event
6045 * of a canvas object.
6046 *
6047 * @see evas_object_intercept_show_callback_add().
6048 *
6049 */
6050EAPI void *evas_object_intercept_show_callback_del (Evas_Object *obj, Evas_Object_Intercept_Show_Cb func) EINA_ARG_NONNULL(1, 2);
6051
6052/**
6053 * Set the callback function that intercepts a hide event of a object.
6054 *
6055 * @param obj The given canvas object pointer.
6056 * @param func The given function to be the callback function.
6057 * @param data The data passed to the callback function.
6058 *
6059 * This function sets a callback function to intercepts a hide event
6060 * of a canvas object.
6061 *
6062 * @see evas_object_intercept_hide_callback_del().
6063 *
6064 */
6065EAPI void evas_object_intercept_hide_callback_add (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
6066
6067/**
6068 * Unset the callback function that intercepts a hide event of a
6069 * object.
6070 *
6071 * @param obj The given canvas object pointer.
6072 * @param func The given callback function.
6073 *
6074 * This function sets a callback function to intercepts a hide event
6075 * of a canvas object.
6076 *
6077 * @see evas_object_intercept_hide_callback_add().
6078 *
6079 */
6080EAPI void *evas_object_intercept_hide_callback_del (Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func) EINA_ARG_NONNULL(1, 2);
6081
6082/**
6083 * Set the callback function that intercepts a move event of a object.
6084 *
6085 * @param obj The given canvas object pointer.
6086 * @param func The given function to be the callback function.
6087 * @param data The data passed to the callback function.
6088 *
6089 * This function sets a callback function to intercepts a move event
6090 * of a canvas object.
6091 *
6092 * @see evas_object_intercept_move_callback_del().
6093 *
6094 */
6095EAPI void evas_object_intercept_move_callback_add (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data) EINA_ARG_NONNULL(1, 2);
6096
6097/**
6098 * Unset the callback function that intercepts a move event of a
6099 * object.
6100 *
6101 * @param obj The given canvas object pointer.
6102 * @param func The given callback function.
6103 *
6104 * This function sets a callback function to intercepts a move event
6105 * of a canvas object.
6106 *
6107 * @see evas_object_intercept_move_callback_add().
6108 *
6109 */
6110EAPI void *evas_object_intercept_move_callback_del (Evas_Object *obj, Evas_Object_Intercept_Move_Cb func) EINA_ARG_NONNULL(1, 2);
6111
6112 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);
6113 EAPI void *evas_object_intercept_resize_callback_del (Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func) EINA_ARG_NONNULL(1, 2);
6114 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);
6115 EAPI void *evas_object_intercept_raise_callback_del (Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func) EINA_ARG_NONNULL(1, 2);
6116 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);
6117 EAPI void *evas_object_intercept_lower_callback_del (Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func) EINA_ARG_NONNULL(1, 2);
6118 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);
6119 EAPI void *evas_object_intercept_stack_above_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func) EINA_ARG_NONNULL(1, 2);
6120 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);
6121 EAPI void *evas_object_intercept_stack_below_callback_del (Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func) EINA_ARG_NONNULL(1, 2);
6122 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);
6123 EAPI void *evas_object_intercept_layer_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func) EINA_ARG_NONNULL(1, 2);
6124 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);
6125 EAPI void *evas_object_intercept_color_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func) EINA_ARG_NONNULL(1, 2);
6126 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);
6127 EAPI void *evas_object_intercept_clip_set_callback_del (Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func) EINA_ARG_NONNULL(1, 2);
6128 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);
6129 EAPI void *evas_object_intercept_clip_unset_callback_del (Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func) EINA_ARG_NONNULL(1, 2);
6130
6131/**
6132 * @}
6133 */
6134
6135/**
6136 * @defgroup Evas_Object_Specific Specific Object Functions
6137 *
6138 * Functions that work on specific objects.
6139 *
6140 */
6141
6142/**
6143 * @defgroup Evas_Object_Rectangle Rectangle Object Functions
6144 *
6145 * @brief Function to create evas rectangle objects.
6146 *
6147 * There is only one function to deal with rectangle objects, this may make this
6148 * function seem useless given there are no functions to manipulate the created
6149 * rectangle, however the rectangle is actually very useful and should be
6150 * manipulated using the generic @ref Evas_Object_Group "evas object functions".
6151 *
6152 * The evas rectangle server a number of key functions when working on evas
6153 * programs:
6154 * @li Background
6155 * @li Debugging
6156 * @li Clipper
6157 *
6158 * @section Background
6159 *
6160 * One extremely common requirement of evas programs is to have a solid color
6161 * background, this can be accomplished with the following very simple code:
6162 * @code
6163 * Evas_Object *bg = evas_object_rectangle_add(evas_canvas);
6164 * //Here we set the rectangles red, green, blue and opacity levels
6165 * evas_object_color_set(bg, 255, 255, 255, 255); // opaque white background
6166 * evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas
6167 * evas_object_show(bg);
6168 * @endcode
6169 *
6170 * This however will have issues if the @c evas_canvas is resized, however most
6171 * windows are created using ecore evas and that has a solution to using the
6172 * rectangle as a background:
6173 * @code
6174 * Evas_Object *bg = evas_object_rectangle_add(ecore_evas_get(ee));
6175 * //Here we set the rectangles red, green, blue and opacity levels
6176 * evas_object_color_set(bg, 255, 255, 255, 255); // opaque white background
6177 * evas_object_resize(bg, WIDTH, HEIGHT); // covers full canvas
6178 * evas_object_show(bg);
6179 * ecore_evas_object_associate(ee, bg, ECORE_EVAS_OBJECT_ASSOCIATE_BASE);
6180 * @endcode
6181 * So this gives us a white background to our window that will be resized
6182 * together with it.
6183 *
6184 * @section Debugging
6185 *
6186 * Debugging is a major part of any programmers task and when debugging visual
6187 * issues with evas programs the rectangle is an extremely useful tool. The
6188 * rectangle's simplicity means that it's easier to pinpoint issues with it than
6189 * with more complex objects. Therefore a common technique to use when writing
6190 * an evas program and not getting the desired visual result is to replace the
6191 * misbehaving object for a solid color rectangle and seeing how it interacts
6192 * with the other elements, this often allows us to notice clipping, parenting
6193 * or positioning issues. Once the issues have been identified and corrected the
6194 * rectangle can be replaced for the original part and in all likelihood any
6195 * remaining issues will be specific to that object's type.
6196 *
6197 * @section clipping Clipping
6198 *
6199 * Clipping serves two main functions:
6200 * @li Limiting visibility(i.e. hiding portions of an object).
6201 * @li Applying a layer of color to an object.
6202 *
6203 * @subsection hiding Limiting visibility
6204 *
6205 * It is often necessary to show only parts of an object, while it may be
6206 * possible to create an object that corresponds only to the part that must be
6207 * shown(and it isn't always possible) it's usually easier to use a a clipper. A
6208 * clipper is a rectangle that defines what's visible and what is not. The way
6209 * to do this is to create a solid white rectangle(which is the default, no need
6210 * to call evas_object_color_set()) and give it a position and size of what
6211 * should be visible. The following code exemplifies showing the center half of
6212 * @c my_evas_object:
6213 * @code
6214 * Evas_Object *clipper = evas_object_rectangle_add(evas_canvas);
6215 * evas_object_move(clipper, my_evas_object_x / 4, my_evas_object_y / 4);
6216 * evas_object_resize(clipper, my_evas_object_width / 2, my_evas_object_height / 2);
6217 * evas_object_clip_set(my_evas_object, clipper);
6218 * evas_object_show(clipper);
6219 * @endcode
6220 *
6221 * @subsection color Layer of color
6222 *
6223 * In the @ref clipping section we used a solid white clipper, which produced no
6224 * change in the color of the clipped object, it just hid what was outside the
6225 * clippers area. It is however sometimes desirable to change the of color an
6226 * object, this can be accomplished using a clipper that has a non-white color.
6227 * Clippers with color work by multiplying the colors of clipped object. The
6228 * following code will show how to remove all the red from an object:
6229 * @code
6230 * Evas_Object *clipper = evas_object_rectangle_add(evas);
6231 * evas_object_move(clipper, my_evas_object_x, my_evas_object_y);
6232 * evas_object_resize(clipper, my_evas_object_width, my_evas_object_height);
6233 * evas_object_color_set(clipper, 0, 255, 255, 255);
6234 * evas_object_clip_set(obj, clipper);
6235 * evas_object_show(clipper);
6236 * @endcode
6237 *
6238 * For an example that more fully exercise the use of an evas object rectangle
6239 * see @ref Example_Evas_Object_Manipulation.
6240 *
6241 * @ingroup Evas_Object_Specific
6242 */
6243
6244/**
6245 * Adds a rectangle to the given evas.
6246 * @param e The given evas.
6247 * @return The new rectangle object.
6248 *
6249 * @ingroup Evas_Object_Rectangle
6250 */
6251EAPI Evas_Object *evas_object_rectangle_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
6252
6253/**
6254 * @defgroup Evas_Object_Image Image Object Functions
6255 *
6256 * Here are grouped together functions used to create and manipulate
6257 * image objects. They are available to whichever occasion one needs
6258 * complex imagery on a GUI that could not be achieved by the other
6259 * Evas' primitive object types, or to make image manipulations.
6260 *
6261 * Evas will support whichever image file types it was compiled with
6262 * support to (its image loaders) -- check your software packager for
6263 * that information and see
6264 * evas_object_image_extension_can_load_get().
6265 *
6266 * @section Evas_Object_Image_Basics Image object basics
6267 *
6268 * The most common use of image objects -- to display an image on the
6269 * canvas -- is achieved by a common function triplet:
6270 * @code
6271 * img = evas_object_image_add(canvas);
6272 * evas_object_image_file_set(img, "path/to/img", NULL);
6273 * evas_object_image_fill_set(img, 0, 0, w, h);
6274 * @endcode
6275 * The first function, naturally, is creating the image object. Then,
6276 * one must set an source file on it, so that it knows where to fetch
6277 * image data from. Next, one must set <b>how to fill the image
6278 * object's area</b> with that given pixel data. One could use just a
6279 * sub-region of the original image or even have it tiled repeatedly
6280 * on the image object. For the common case of having the whole source
6281 * image to be displayed on the image object, stretched to the
6282 * destination's size, there's also a function helper, to be used
6283 * instead of evas_object_image_fill_set():
6284 * @code
6285 * evas_object_image_filled_set(img, EINA_TRUE);
6286 * @endcode
6287 * See those functions' documentation for more details.
6288 *
6289 * @section Evas_Object_Image_Scale Scale and resizing
6290 *
6291 * Resizing of image objects will scale their respective source images
6292 * to their areas, if they are set to "fill" the object's area
6293 * (evas_object_image_filled_set()). If the user wants any control on
6294 * the aspect ratio of an image for different sizes, he/she has to
6295 * take care of that themselves. There are functions to make images to
6296 * get loaded scaled (up or down) in memory, already, if the user is
6297 * going to use them at pre-determined sizes and wants to save
6298 * computations.
6299 *
6300 * Evas has even a scale cache, which will take care of caching scaled
6301 * versions of images with more often usage/hits. Finally, one can
6302 * have images being rescaled @b smoothly by Evas (more
6303 * computationally expensive) or not.
6304 *
6305 * @section Evas_Object_Image_Performance Performance hints
6306 *
6307 * When dealing with image objects, there are some tricks to boost the
6308 * performance of your application, if it does intense image loading
6309 * and/or manipulations, as in animations on a UI.
6310 *
6311 * @subsection Evas_Object_Image_Load Load hints
6312 *
6313 * In image viewer applications, for example, the user will be looking
6314 * at a given image, at full size, and will desire that the navigation
6315 * to the adjacent images on his/her album be fluid and fast. Thus,
6316 * while displaying a given image, the program can be on the
6317 * background loading the next and previous images already, so that
6318 * displaying them on the sequence is just a matter of repainting the
6319 * screen (and not decoding image data).
6320 *
6321 * Evas addresses this issue with <b>image pre-loading</b>. The code
6322 * for the situation above would be something like the following:
6323 * @code
6324 * prev = evas_object_image_filled_add(canvas);
6325 * evas_object_image_file_set(prev, "/path/to/prev", NULL);
6326 * evas_object_image_preload(prev, EINA_TRUE);
6327 *
6328 * next = evas_object_image_filled_add(canvas);
6329 * evas_object_image_file_set(next, "/path/to/next", NULL);
6330 * evas_object_image_preload(next, EINA_TRUE);
6331 * @endcode
6332 *
6333 * If you're loading images which are too big, consider setting
6334 * previously it's loading size to something smaller, in case you
6335 * won't expose them in real size. It may speed up the loading
6336 * considerably:
6337 * @code
6338 * //to load a scaled down version of the image in memory, if that's
6339 * //the size you'll be displaying it anyway
6340 * evas_object_image_load_scale_down_set(img, zoom);
6341 *
6342 * //optional: if you know you'll be showing a sub-set of the image's
6343 * //pixels, you can avoid loading the complementary data
6344 * evas_object_image_load_region_set(img, x, y, w, h);
6345 * @endcode
6346 * Refer to Elementary's Photocam widget for a high level (smart)
6347 * object which does lots of loading speed-ups for you.
6348 *
6349 * @subsection Evas_Object_Image_Animation Animation hints
6350 *
6351 * If you want to animate image objects on a UI (what you'd get by
6352 * concomitant usage of other libraries, like Ecore and Edje), there
6353 * are also some tips on how to boost the performance of your
6354 * application. If the animation involves resizing of an image (thus,
6355 * re-scaling), you'd better turn off smooth scaling on it @b during
6356 * the animation, turning it back on afterwards, for less
6357 * computations. Also, in this case you'd better flag the image object
6358 * in question not to cache scaled versions of it:
6359 * @code
6360 * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
6361 *
6362 * // resizing takes place in between
6363 *
6364 * evas_object_image_scale_hint_set(wd->img, EVAS_IMAGE_SCALE_HINT_STATIC);
6365 * @endcode
6366 *
6367 * Finally, movement of opaque images through the canvas is less
6368 * expensive than of translucid ones, because of blending
6369 * computations.
6370 *
6371 * @section Evas_Object_Image_Borders Borders
6372 *
6373 * Evas provides facilities for one to specify an image's region to be
6374 * treated specially -- as "borders". This will make those regions be
6375 * treated specially on resizing scales, by keeping their aspect. This
6376 * makes setting frames around other objects on UIs easy.
6377 * See the following figures for a visual explanation:\n
6378 * @htmlonly
6379 * <img src="image-borders.png" style="max-width: 100%;" />
6380 * <a href="image-borders.png">Full-size</a>
6381 * @endhtmlonly
6382 * @image rtf image-borders.png
6383 * @image latex image-borders.eps width=\textwidth
6384 * @htmlonly
6385 * <img src="border-effect.png" style="max-width: 100%;" />
6386 * <a href="border-effect.png">Full-size</a>
6387 * @endhtmlonly
6388 * @image rtf border-effect.png
6389 * @image latex border-effect.eps width=\textwidth
6390 *
6391 * @section Evas_Object_Image_Manipulation Manipulating pixels
6392 *
6393 * Evas image objects can be used to manipulate raw pixels in many
6394 * ways. The meaning of the data in the pixel arrays will depend on
6395 * the image's color space, be warned (see next section). You can set
6396 * your own data as an image's pixel data, fetch an image's pixel data
6397 * for saving/altering, convert images between different color spaces
6398 * and even advanced operations like setting a native surface as image
6399 * objects' data.
6400 *
6401 * @section Evas_Object_Image_Color_Spaces Color spaces
6402 *
6403 * Image objects may return or accept "image data" in multiple
6404 * formats. This is based on the color space of an object. Here is a
6405 * rundown on formats:
6406 *
6407 * - #EVAS_COLORSPACE_ARGB8888:
6408 * .
6409 * This pixel format is a linear block of pixels, starting at the
6410 * top-left row by row until the bottom right of the image or pixel
6411 * region. All pixels are 32-bit unsigned int's with the high-byte
6412 * being alpha and the low byte being blue in the format ARGB. Alpha
6413 * may or may not be used by evas depending on the alpha flag of the
6414 * image, but if not used, should be set to 0xff anyway.
6415 * \n\n
6416 * This colorspace uses premultiplied alpha. That means that R, G
6417 * and B cannot exceed A in value. The conversion from
6418 * non-premultiplied colorspace is:
6419 * \n\n
6420 * R = (r * a) / 255; G = (g * a) / 255; B = (b * a) / 255;
6421 * \n\n
6422 * So 50% transparent blue will be: 0x80000080. This will not be
6423 * "dark" - just 50% transparent. Values are 0 == black, 255 ==
6424 * solid or full red, green or blue.
6425 *
6426 * - #EVAS_COLORSPACE_YCBCR422P601_PL:
6427 * .
6428 * This is a pointer-list indirected set of YUV (YCbCr) pixel
6429 * data. This means that the data returned or set is not actual
6430 * pixel data, but pointers TO lines of pixel data. The list of
6431 * pointers will first be N rows of pointers to the Y plane -
6432 * pointing to the first pixel at the start of each row in the Y
6433 * plane. N is the height of the image data in pixels. Each pixel in
6434 * the Y, U and V planes is 1 byte exactly, packed. The next N / 2
6435 * pointers will point to rows in the U plane, and the next N / 2
6436 * pointers will point to the V plane rows. U and V planes are half
6437 * the horizontal and vertical resolution of the Y plane.
6438 * \n\n
6439 * Row order is top to bottom and row pixels are stored left to
6440 * right.
6441 * \n\n
6442 * There is a limitation that these images MUST be a multiple of 2
6443 * pixels in size horizontally or vertically. This is due to the U
6444 * and V planes being half resolution. Also note that this assumes
6445 * the itu601 YUV colorspace specification. This is defined for
6446 * standard television and mpeg streams. HDTV may use the itu709
6447 * specification.
6448 * \n\n
6449 * Values are 0 to 255, indicating full or no signal in that plane
6450 * respectively.
6451 *
6452 * - #EVAS_COLORSPACE_YCBCR422P709_PL:
6453 * .
6454 * Not implemented yet.
6455 *
6456 * - #EVAS_COLORSPACE_RGB565_A5P:
6457 * .
6458 * In the process of being implemented in 1 engine only. This may
6459 * change.
6460 * \n\n
6461 * This is a pointer to image data for 16-bit half-word pixel data
6462 * in 16bpp RGB 565 format (5 bits red, 6 bits green, 5 bits blue),
6463 * with the high-byte containing red and the low byte containing
6464 * blue, per pixel. This data is packed row by row from the top-left
6465 * to the bottom right.
6466 * \n\n
6467 * If the image has an alpha channel enabled there will be an extra
6468 * alpha plane after the color pixel plane. If not, then this data
6469 * will not exist and should not be accessed in any way. This plane
6470 * is a set of pixels with 1 byte per pixel defining the alpha
6471 * values of all pixels in the image from the top-left to the bottom
6472 * right of the image, row by row. Even though the values of the
6473 * alpha pixels can be 0 to 255, only values 0 through to 32 are
6474 * used, 32 being solid and 0 being transparent.
6475 * \n\n
6476 * RGB values can be 0 to 31 for red and blue and 0 to 63 for green,
6477 * with 0 being black and 31 or 63 being full red, green or blue
6478 * respectively. This colorspace is also pre-multiplied like
6479 * EVAS_COLORSPACE_ARGB8888 so:
6480 * \n\n
6481 * R = (r * a) / 32; G = (g * a) / 32; B = (b * a) / 32;
6482 *
6483 * - #EVAS_COLORSPACE_GRY8:
6484 * .
6485 * The image is just a alpha mask (8 bit's per pixel). This is used
6486 * for alpha masking.
6487 *
6488 * Some examples on this group of functions can be found @ref
6489 * Example_Evas_Images "here".
6490 *
6491 * @ingroup Evas_Object_Specific
6492 */
6493
6494/**
6495 * @addtogroup Evas_Object_Image
6496 * @{
6497 */
6498
6499typedef void (*Evas_Object_Image_Pixels_Get_Cb) (void *data, Evas_Object *o);
6500
6501
6502/**
6503 * Creates a new image object on the given Evas @p e canvas.
6504 *
6505 * @param e The given canvas.
6506 * @return The created image object handle.
6507 *
6508 * @note If you intend to @b display an image somehow in a GUI,
6509 * besides binding it to a real image file/source (with
6510 * evas_object_image_file_set(), for example), you'll have to tell
6511 * this image object how to fill its space with the pixels it can get
6512 * from the source. See evas_object_image_filled_add(), for a helper
6513 * on the common case of scaling up an image source to the whole area
6514 * of the image object.
6515 *
6516 * @see evas_object_image_fill_set()
6517 *
6518 * Example:
6519 * @code
6520 * img = evas_object_image_add(canvas);
6521 * evas_object_image_file_set(img, "/path/to/img", NULL);
6522 * @endcode
6523 */
6524EAPI Evas_Object *evas_object_image_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
6525
6526/**
6527 * Creates a new image object that @b automatically scales its bound
6528 * image to the object's area, on both axis.
6529 *
6530 * @param e The given canvas.
6531 * @return The created image object handle.
6532 *
6533 * This is a helper function around evas_object_image_add() and
6534 * evas_object_image_filled_set(). It has the same effect of applying
6535 * those functions in sequence, which is a very common use case.
6536 *
6537 * @note Whenever this object gets resized, the bound image will be
6538 * rescaled, too.
6539 *
6540 * @see evas_object_image_add()
6541 * @see evas_object_image_filled_set()
6542 * @see evas_object_image_fill_set()
6543 */
6544EAPI Evas_Object *evas_object_image_filled_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
6545
6546
6547/**
6548 * Sets the data for an image from memory to be loaded
6549 *
6550 * This is the same as evas_object_image_file_set() but the file to be loaded
6551 * may exist at an address in memory (the data for the file, not the filename
6552 * itself). The @p data at the address is copied and stored for future use, so
6553 * no @p data needs to be kept after this call is made. It will be managed and
6554 * freed for you when no longer needed. The @p size is limited to 2 gigabytes
6555 * in size, and must be greater than 0. A NULL @p data pointer is also invalid.
6556 * Set the filename to NULL to reset to empty state and have the image file
6557 * data freed from memory using evas_object_image_file_set().
6558 *
6559 * The @p format is optional (pass NULL if you don't need/use it). It is used
6560 * to help Evas guess better which loader to use for the data. It may simply
6561 * be the "extension" of the file as it would normally be on disk such as
6562 * "jpg" or "png" or "gif" etc.
6563 *
6564 * @param obj The given image object.
6565 * @param data The image file data address
6566 * @param size The size of the image file data in bytes
6567 * @param format The format of the file (optional), or @c NULL if not needed
6568 * @param key The image key in file, or @c NULL.
6569 */
6570EAPI void evas_object_image_memfile_set (Evas_Object *obj, void *data, int size, char *format, char *key) EINA_ARG_NONNULL(1, 2);
6571
6572/**
6573 * Set the source file from where an image object must fetch the real
6574 * image data (it may be an Eet file, besides pure image ones).
6575 *
6576 * @param obj The given image object.
6577 * @param file The image file path.
6578 * @param key The image key in @p file (if its an Eet one), or @c
6579 * NULL, otherwise.
6580 *
6581 * If the file supports multiple data stored in it (as Eet files do),
6582 * you can specify the key to be used as the index of the image in
6583 * this file.
6584 *
6585 * Example:
6586 * @code
6587 * img = evas_object_image_add(canvas);
6588 * evas_object_image_file_set(img, "/path/to/img", NULL);
6589 * err = evas_object_image_load_error_get(img);
6590 * if (err != EVAS_LOAD_ERROR_NONE)
6591 * {
6592 * fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
6593 * valid_path, evas_load_error_str(err));
6594 * }
6595 * else
6596 * {
6597 * evas_object_image_fill_set(img, 0, 0, w, h);
6598 * evas_object_resize(img, w, h);
6599 * evas_object_show(img);
6600 * }
6601 * @endcode
6602 */
6603EAPI void evas_object_image_file_set (Evas_Object *obj, const char *file, const char *key) EINA_ARG_NONNULL(1);
6604
6605/**
6606 * Retrieve the source file from where an image object is to fetch the
6607 * real image data (it may be an Eet file, besides pure image ones).
6608 *
6609 * @param obj The given image object.
6610 * @param file Location to store the image file path.
6611 * @param key Location to store the image key (if @p file is an Eet
6612 * one).
6613 *
6614 * You must @b not modify the strings on the returned pointers.
6615 *
6616 * @note Use @c NULL pointers on the file components you're not
6617 * interested in: they'll be ignored by the function.
6618 */
6619EAPI void evas_object_image_file_get (const Evas_Object *obj, const char **file, const char **key) EINA_ARG_NONNULL(1, 2);
6620
6621/**
6622 * Set the dimensions for an image object's border, a region which @b
6623 * won't ever be scaled together with its center.
6624 *
6625 * @param obj The given image object.
6626 * @param l The border's left width.
6627 * @param r The border's right width.
6628 * @param t The border's top width.
6629 * @param b The border's bottom width.
6630 *
6631 * When Evas is rendering, an image source may be scaled to fit the
6632 * size of its image object. This function sets an area from the
6633 * borders of the image inwards which is @b not to be scaled. This
6634 * function is useful for making frames and for widget theming, where,
6635 * for example, buttons may be of varying sizes, but their border size
6636 * must remain constant.
6637 *
6638 * The units used for @p l, @p r, @p t and @p b are canvas units.
6639 *
6640 * @note The border region itself @b may be scaled by the
6641 * evas_object_image_border_scale_set() function.
6642 *
6643 * @note By default, image objects have no borders set, i. e. @c l, @c
6644 * r, @c t and @c b start as @c 0.
6645 *
6646 * See the following figures for visual explanation:\n
6647 * @htmlonly
6648 * <img src="image-borders.png" style="max-width: 100%;" />
6649 * <a href="image-borders.png">Full-size</a>
6650 * @endhtmlonly
6651 * @image rtf image-borders.png
6652 * @image latex image-borders.eps width=\textwidth
6653 * @htmlonly
6654 * <img src="border-effect.png" style="max-width: 100%;" />
6655 * <a href="border-effect.png">Full-size</a>
6656 * @endhtmlonly
6657 * @image rtf border-effect.png
6658 * @image latex border-effect.eps width=\textwidth
6659 *
6660 * @see evas_object_image_border_get()
6661 * @see evas_object_image_border_center_fill_set()
6662 */
6663EAPI void evas_object_image_border_set (Evas_Object *obj, int l, int r, int t, int b) EINA_ARG_NONNULL(1);
6664
6665/**
6666 * Retrieve the dimensions for an image object's border, a region
6667 * which @b won't ever be scaled together with its center.
6668 *
6669 * @param obj The given image object.
6670 * @param l Location to store the border's left width in.
6671 * @param r Location to store the border's right width in.
6672 * @param t Location to store the border's top width in.
6673 * @param b Location to store the border's bottom width in.
6674 *
6675 * @note Use @c NULL pointers on the border components you're not
6676 * interested in: they'll be ignored by the function.
6677 *
6678 * See @ref evas_object_image_border_set() for more details.
6679 */
6680EAPI void evas_object_image_border_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
6681
6682/**
6683 * Sets @b how the center part of the given image object (not the
6684 * borders) should be drawn when Evas is rendering it.
6685 *
6686 * @param obj The given image object.
6687 * @param fill Fill mode of the center region of @p obj (a value in
6688 * #Evas_Border_Fill_Mode).
6689 *
6690 * This function sets how the center part of the image object's source
6691 * image is to be drawn, which must be one of the values in
6692 * #Evas_Border_Fill_Mode. By center we mean the complementary part of
6693 * that defined by evas_object_image_border_set(). This one is very
6694 * useful for making frames and decorations. You would most probably
6695 * also be using a filled image (as in evas_object_image_filled_set())
6696 * to use as a frame.
6697 *
6698 * @see evas_object_image_border_center_fill_get()
6699 */
6700EAPI void evas_object_image_border_center_fill_set (Evas_Object *obj, Evas_Border_Fill_Mode fill) EINA_ARG_NONNULL(1);
6701
6702/**
6703 * Retrieves @b how the center part of the given image object (not the
6704 * borders) is to be drawn when Evas is rendering it.
6705 *
6706 * @param obj The given image object.
6707 * @return fill Fill mode of the center region of @p obj (a value in
6708 * #Evas_Border_Fill_Mode).
6709 *
6710 * See @ref evas_object_image_fill_set() for more details.
6711 */
6712EAPI Evas_Border_Fill_Mode evas_object_image_border_center_fill_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
6713
6714/**
6715 * Set whether the image object's fill property should track the
6716 * object's size.
6717 *
6718 * @param obj The given image object.
6719 * @param setting @c EINA_TRUE, to make the fill property follow
6720 * object size or @c EINA_FALSE, otherwise
6721 *
6722 * If @p setting is @c EINA_TRUE, then every evas_object_resize() will
6723 * @b automatically trigger a call to evas_object_image_fill_set()
6724 * with the that new size (and @c 0, @c 0 as source image's origin),
6725 * so the bound image will fill the whole object's area.
6726 *
6727 * @see evas_object_image_filled_add()
6728 * @see evas_object_image_fill_get()
6729 */
6730EAPI void evas_object_image_filled_set (Evas_Object *obj, Eina_Bool setting) EINA_ARG_NONNULL(1);
6731
6732/**
6733 * Retrieve whether the image object's fill property should track the
6734 * object's size.
6735 *
6736 * @param obj The given image object.
6737 * @return @c EINA_TRUE if it is tracking, @c EINA_FALSE, if not (and
6738 * evas_object_fill_set() must be called manually).
6739 *
6740 * @see evas_object_image_filled_set() for more information
6741 */
6742EAPI Eina_Bool evas_object_image_filled_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
6743
6744/**
6745 * Sets the scaling factor (multiplier) for the borders of an image
6746 * object.
6747 *
6748 * @param obj The given image object.
6749 * @param scale The scale factor (default is @c 1.0 - i.e. no scaling)
6750 *
6751 * @see evas_object_image_border_set()
6752 * @see evas_object_image_border_scale_get()
6753 */
6754EAPI void evas_object_image_border_scale_set (Evas_Object *obj, double scale);
6755
6756/**
6757 * Retrieves the scaling factor (multiplier) for the borders of an
6758 * image object.
6759 *
6760 * @param obj The given image object.
6761 * @return The scale factor set for its borders
6762 *
6763 * @see evas_object_image_border_set()
6764 * @see evas_object_image_border_scale_set()
6765 */
6766EAPI double evas_object_image_border_scale_get (const Evas_Object *obj);
6767
6768/**
6769 * Set how to fill an image object's drawing rectangle given the
6770 * (real) image bound to it.
6771 *
6772 * @param obj The given image object to operate on.
6773 * @param x The x coordinate (from the top left corner of the bound
6774 * image) to start drawing from.
6775 * @param y The y coordinate (from the top left corner of the bound
6776 * image) to start drawing from.
6777 * @param w The width the bound image will be displayed at.
6778 * @param h The height the bound image will be displayed at.
6779 *
6780 * Note that if @p w or @p h are smaller than the dimensions of
6781 * @p obj, the displayed image will be @b tiled around the object's
6782 * area. To have only one copy of the bound image drawn, @p x and @p y
6783 * must be 0 and @p w and @p h need to be the exact width and height
6784 * of the image object itself, respectively.
6785 *
6786 * See the following image to better understand the effects of this
6787 * call. On this diagram, both image object and original image source
6788 * have @c a x @c a dimensions and the image itself is a circle, with
6789 * empty space around it:
6790 *
6791 * @image html image-fill.png
6792 * @image rtf image-fill.png
6793 * @image latex image-fill.eps
6794 *
6795 * @warning The default values for the fill parameters are @p x = 0,
6796 * @p y = 0, @p w = 0 and @p h = 0. Thus, if you're not using the
6797 * evas_object_image_filled_add() helper and want your image
6798 * displayed, you'll have to set valid values with this function on
6799 * your object.
6800 *
6801 * @note evas_object_image_filled_set() is a helper function which
6802 * will @b override the values set here automatically, for you, in a
6803 * given way.
6804 */
6805EAPI 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);
6806
6807/**
6808 * Retrieve how an image object is to fill its drawing rectangle,
6809 * given the (real) image bound to it.
6810 *
6811 * @param obj The given image object.
6812 * @param x Location to store the x coordinate (from the top left
6813 * corner of the bound image) to start drawing from.
6814 * @param y Location to store the y coordinate (from the top left
6815 * corner of the bound image) to start drawing from.
6816 * @param w Location to store the width the bound image is to be
6817 * displayed at.
6818 * @param h Location to store the height the bound image is to be
6819 * displayed at.
6820 *
6821 * @note Use @c NULL pointers on the fill components you're not
6822 * interested in: they'll be ignored by the function.
6823 *
6824 * See @ref evas_object_image_fill_set() for more details.
6825 */
6826EAPI 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);
6827
6828/**
6829 * Sets the tiling mode for the given evas image object's fill.
6830 * @param obj The given evas image object.
6831 * @param spread One of EVAS_TEXTURE_REFLECT, EVAS_TEXTURE_REPEAT,
6832 * EVAS_TEXTURE_RESTRICT, or EVAS_TEXTURE_PAD.
6833 */
6834EAPI void evas_object_image_fill_spread_set (Evas_Object *obj, Evas_Fill_Spread spread) EINA_ARG_NONNULL(1);
6835
6836/**
6837 * Retrieves the spread (tiling mode) for the given image object's
6838 * fill.
6839 *
6840 * @param obj The given evas image object.
6841 * @return The current spread mode of the image object.
6842 */
6843EAPI Evas_Fill_Spread evas_object_image_fill_spread_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
6844
6845/**
6846 * Sets the size of the given image object.
6847 *
6848 * @param obj The given image object.
6849 * @param w The new width of the image.
6850 * @param h The new height of the image.
6851 *
6852 * This function will scale down or crop the image so that it is
6853 * treated as if it were at the given size. If the size given is
6854 * smaller than the image, it will be cropped. If the size given is
6855 * larger, then the image will be treated as if it were in the upper
6856 * left hand corner of a larger image that is otherwise transparent.
6857 */
6858EAPI void evas_object_image_size_set (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
6859
6860/**
6861 * Retrieves the size of the given image object.
6862 *
6863 * @param obj The given image object.
6864 * @param w Location to store the width of the image in, or @c NULL.
6865 * @param h Location to store the height of the image in, or @c NULL.
6866 *
6867 * See @ref evas_object_image_size_set() for more details.
6868 */
6869EAPI void evas_object_image_size_get (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
6870
6871/**
6872 * Retrieves the row stride of the given image object.
6873 *
6874 * @param obj The given image object.
6875 * @return The stride of the image (<b>in bytes</b>).
6876 *
6877 * The row stride is the number of bytes between the start of a row
6878 * and the start of the next row for image data.
6879 */
6880EAPI int evas_object_image_stride_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
6881
6882/**
6883 * Retrieves a number representing any error that occurred during the
6884 * last loading of the given image object's source image.
6885 *
6886 * @param obj The given image object.
6887 * @return A value giving the last error that occurred. It should be
6888 * one of the #Evas_Load_Error values. #EVAS_LOAD_ERROR_NONE
6889 * is returned if there was no error.
6890 */
6891EAPI Evas_Load_Error evas_object_image_load_error_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
6892
6893/**
6894 * Sets the raw image data of the given image object.
6895 *
6896 * @param obj The given image object.
6897 * @param data The raw data, or @c NULL.
6898 *
6899 * Note that the raw data must be of the same size (see
6900 * evas_object_image_size_set(), which has to be called @b before this
6901 * one) and colorspace (see evas_object_image_colorspace_set()) of the
6902 * image. If data is @c NULL, the current image data will be
6903 * freed. Naturally, if one does not set an image object's data
6904 * manually, it will still have one, allocated by Evas.
6905 *
6906 * @see evas_object_image_data_get()
6907 */
6908EAPI void evas_object_image_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
6909
6910/**
6911 * Get a pointer to the raw image data of the given image object.
6912 *
6913 * @param obj The given image object.
6914 * @param for_writing Whether the data being retrieved will be
6915 * modified (@c EINA_TRUE) or not (@c EINA_FALSE).
6916 * @return The raw image data.
6917 *
6918 * This function returns a pointer to an image object's internal pixel
6919 * buffer, for reading only or read/write. If you request it for
6920 * writing, the image will be marked dirty so that it gets redrawn at
6921 * the next update.
6922 *
6923 * Each time you call this function on an image object, its data
6924 * buffer will have an internal reference counter
6925 * incremented. Decrement it back by using
6926 * evas_object_image_data_set(). This is specially important for the
6927 * directfb Evas engine.
6928 *
6929 * This is best suited for when you want to modify an existing image,
6930 * without changing its dimensions.
6931 *
6932 * @note The contents' format returned by it depend on the color
6933 * space of the given image object.
6934 *
6935 * @note You may want to use evas_object_image_data_update_add() to
6936 * inform data changes, if you did any.
6937 *
6938 * @see evas_object_image_data_set()
6939 */
6940EAPI void *evas_object_image_data_get (const Evas_Object *obj, Eina_Bool for_writing) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
6941
6942/**
6943 * Converts the raw image data of the given image object to the
6944 * specified colorspace.
6945 *
6946 * Note that this function does not modify the raw image data. If the
6947 * requested colorspace is the same as the image colorspace nothing is
6948 * done and NULL is returned. You should use
6949 * evas_object_image_colorspace_get() to check the current image
6950 * colorspace.
6951 *
6952 * See @ref evas_object_image_colorspace_get.
6953 *
6954 * @param obj The given image object.
6955 * @param to_cspace The colorspace to which the image raw data will be converted.
6956 * @return data A newly allocated data in the format specified by to_cspace.
6957 */
6958EAPI void *evas_object_image_data_convert (Evas_Object *obj, Evas_Colorspace to_cspace) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
6959
6960/**
6961 * Replaces the raw image data of the given image object.
6962 *
6963 * @param obj The given image object.
6964 * @param data The raw data to replace.
6965 *
6966 * This function lets the application replace an image object's
6967 * internal pixel buffer with an user-allocated one. For best results,
6968 * you should generally first call evas_object_image_size_set() with
6969 * the width and height for the new buffer.
6970 *
6971 * This call is best suited for when you will be using image data with
6972 * different dimensions than the existing image data, if any. If you
6973 * only need to modify the existing image in some fashion, then using
6974 * evas_object_image_data_get() is probably what you are after.
6975 *
6976 * Note that the caller is responsible for freeing the buffer when
6977 * finished with it, as user-set image data will not be automatically
6978 * freed when the image object is deleted.
6979 *
6980 * See @ref evas_object_image_data_get() for more details.
6981 *
6982 */
6983EAPI void evas_object_image_data_copy_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
6984
6985/**
6986 * Mark a sub-region of the given image object to be redrawn.
6987 *
6988 * @param obj The given image object.
6989 * @param x X-offset of the region to be updated.
6990 * @param y Y-offset of the region to be updated.
6991 * @param w Width of the region to be updated.
6992 * @param h Height of the region to be updated.
6993 *
6994 * This function schedules a particular rectangular region of an image
6995 * object to be updated (redrawn) at the next rendering cycle.
6996 */
6997EAPI void evas_object_image_data_update_add (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
6998
6999/**
7000 * Enable or disable alpha channel usage on the given image object.
7001 *
7002 * @param obj The given image object.
7003 * @param has_alpha Whether to use alpha channel (@c EINA_TRUE) data
7004 * or not (@c EINA_FALSE).
7005 *
7006 * This function sets a flag on an image object indicating whether or
7007 * not to use alpha channel data. A value of @c EINA_TRUE makes it use
7008 * alpha channel data, and @c EINA_FALSE makes it ignore that
7009 * data. Note that this has nothing to do with an object's color as
7010 * manipulated by evas_object_color_set().
7011 *
7012 * @see evas_object_image_alpha_get()
7013 */
7014EAPI void evas_object_image_alpha_set (Evas_Object *obj, Eina_Bool has_alpha) EINA_ARG_NONNULL(1);
7015
7016/**
7017 * Retrieve whether alpha channel data is being used on the given
7018 * image object.
7019 *
7020 * @param obj The given image object.
7021 * @return Whether the alpha channel data is being used (@c EINA_TRUE)
7022 * or not (@c EINA_FALSE).
7023 *
7024 * This function returns @c EINA_TRUE if the image object's alpha
7025 * channel is being used, or @c EINA_FALSE otherwise.
7026 *
7027 * See @ref evas_object_image_alpha_set() for more details.
7028 */
7029EAPI Eina_Bool evas_object_image_alpha_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7030
7031/**
7032 * Sets whether to use high-quality image scaling algorithm on the
7033 * given image object.
7034 *
7035 * @param obj The given image object.
7036 * @param smooth_scale Whether to use smooth scale or not.
7037 *
7038 * When enabled, a higher quality image scaling algorithm is used when
7039 * scaling images to sizes other than the source image's original
7040 * one. This gives better results but is more computationally
7041 * expensive.
7042 *
7043 * @note Image objects get created originally with smooth scaling @b
7044 * on.
7045 *
7046 * @see evas_object_image_smooth_scale_get()
7047 */
7048EAPI void evas_object_image_smooth_scale_set (Evas_Object *obj, Eina_Bool smooth_scale) EINA_ARG_NONNULL(1);
7049
7050/**
7051 * Retrieves whether the given image object is using high-quality
7052 * image scaling algorithm.
7053 *
7054 * @param obj The given image object.
7055 * @return Whether smooth scale is being used.
7056 *
7057 * See @ref evas_object_image_smooth_scale_set() for more details.
7058 */
7059EAPI Eina_Bool evas_object_image_smooth_scale_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7060
7061/**
7062 * Preload an image object's image data in the background
7063 *
7064 * @param obj The given image object.
7065 * @param cancel @c EINA_FALSE will add it the preloading work queue,
7066 * @c EINA_TRUE will remove it (if it was issued before).
7067 *
7068 * This function requests the preload of the data image in the
7069 * background. The work is queued before being processed (because
7070 * there might be other pending requests of this type).
7071 *
7072 * Whenever the image data gets loaded, Evas will call
7073 * #EVAS_CALLBACK_IMAGE_PRELOADED registered callbacks on @p obj (what
7074 * may be immediately, if the data was already preloaded before).
7075 *
7076 * Use @c EINA_TRUE for @p cancel on scenarios where you don't need
7077 * the image data preloaded anymore.
7078 *
7079 * @note Any evas_object_show() call after evas_object_image_preload()
7080 * will make the latter to be @b cancelled, with the loading process
7081 * now taking place @b synchronously (and, thus, blocking the return
7082 * of the former until the image is loaded). It is highly advisable,
7083 * then, that the user preload an image with it being @b hidden, just
7084 * to be shown on the #EVAS_CALLBACK_IMAGE_PRELOADED event's callback.
7085 */
7086EAPI void evas_object_image_preload (Evas_Object *obj, Eina_Bool cancel) EINA_ARG_NONNULL(1);
7087
7088/**
7089 * Reload an image object's image data.
7090 *
7091 * @param obj The given image object pointer.
7092 *
7093 * This function reloads the image data bound to image object @p obj.
7094 */
7095EAPI void evas_object_image_reload (Evas_Object *obj) EINA_ARG_NONNULL(1);
7096
7097/**
7098 * Save the given image object's contents to an (image) file.
7099 *
7100 * @param obj The given image object.
7101 * @param file The filename to be used to save the image (extension
7102 * obligatory).
7103 * @param key The image key in the file (if an Eet one), or @c NULL,
7104 * otherwise.
7105 * @param flags String containing the flags to be used (@c NULL for
7106 * none).
7107 *
7108 * The extension suffix on @p file will determine which <b>saver
7109 * module</b> Evas is to use when saving, thus the final file's
7110 * format. If the file supports multiple data stored in it (Eet ones),
7111 * you can specify the key to be used as the index of the image in it.
7112 *
7113 * You can specify some flags when saving the image. Currently
7114 * acceptable flags are @c quality and @c compress. Eg.: @c
7115 * "quality=100 compress=9"
7116 */
7117EAPI Eina_Bool evas_object_image_save (const Evas_Object *obj, const char *file, const char *key, const char *flags) EINA_ARG_NONNULL(1, 2);
7118
7119/**
7120 * Import pixels from given source to a given canvas image object.
7121 *
7122 * @param obj The given canvas object.
7123 * @param pixels The pixel's source to be imported.
7124 *
7125 * This function imports pixels from a given source to a given canvas image.
7126 *
7127 */
7128EAPI Eina_Bool evas_object_image_pixels_import (Evas_Object *obj, Evas_Pixel_Import_Source *pixels) EINA_ARG_NONNULL(1, 2);
7129
7130/**
7131 * Set the callback function to get pixels from a canvas' image.
7132 *
7133 * @param obj The given canvas pointer.
7134 * @param func The callback function.
7135 * @param data The data pointer to be passed to @a func.
7136 *
7137 * This functions sets a function to be the callback function that get
7138 * pixes from a image of the canvas.
7139 *
7140 */
7141EAPI 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);
7142
7143/**
7144 * Mark whether the given image object is dirty (needs to be redrawn).
7145 *
7146 * @param obj The given image object.
7147 * @param dirty Whether the image is dirty.
7148 */
7149EAPI void evas_object_image_pixels_dirty_set (Evas_Object *obj, Eina_Bool dirty) EINA_ARG_NONNULL(1);
7150
7151/**
7152 * Retrieves whether the given image object is dirty (needs to be redrawn).
7153 *
7154 * @param obj The given image object.
7155 * @return Whether the image is dirty.
7156 */
7157EAPI Eina_Bool evas_object_image_pixels_dirty_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7158
7159/**
7160 * Set the DPI resolution of an image object's source image.
7161 *
7162 * @param obj The given canvas pointer.
7163 * @param dpi The new DPI resolution.
7164 *
7165 * This function sets the DPI resolution of a given loaded canvas
7166 * image. Most useful for the SVG image loader.
7167 *
7168 * @see evas_object_image_load_dpi_get()
7169 */
7170EAPI void evas_object_image_load_dpi_set (Evas_Object *obj, double dpi) EINA_ARG_NONNULL(1);
7171
7172/**
7173 * Get the DPI resolution of a loaded image object in the canvas.
7174 *
7175 * @param obj The given canvas pointer.
7176 * @return The DPI resolution of the given canvas image.
7177 *
7178 * This function returns the DPI resolution of the given canvas image.
7179 *
7180 * @see evas_object_image_load_dpi_set() for more details
7181 */
7182EAPI double evas_object_image_load_dpi_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7183
7184/**
7185 * Set the size of a given image object's source image, when loading
7186 * it.
7187 *
7188 * @param obj The given canvas object.
7189 * @param w The new width of the image's load size.
7190 * @param h The new height of the image's load size.
7191 *
7192 * This function sets a new (loading) size for the given canvas
7193 * image.
7194 *
7195 * @see evas_object_image_load_size_get()
7196 */
7197EAPI void evas_object_image_load_size_set (Evas_Object *obj, int w, int h) EINA_ARG_NONNULL(1);
7198
7199/**
7200 * Get the size of a given image object's source image, when loading
7201 * it.
7202 *
7203 * @param obj The given image object.
7204 * @param w Where to store the new width of the image's load size.
7205 * @param h Where to store the new height of the image's load size.
7206 *
7207 * @note Use @c NULL pointers on the size components you're not
7208 * interested in: they'll be ignored by the function.
7209 *
7210 * @see evas_object_image_load_size_set() for more details
7211 */
7212EAPI void evas_object_image_load_size_get (const Evas_Object *obj, int *w, int *h) EINA_ARG_NONNULL(1);
7213
7214/**
7215 * Set the scale down factor of a given image object's source image,
7216 * when loading it.
7217 *
7218 * @param obj The given image object pointer.
7219 * @param scale_down The scale down factor.
7220 *
7221 * This function sets the scale down factor of a given canvas
7222 * image. Most useful for the SVG image loader.
7223 *
7224 * @see evas_object_image_load_scale_down_get()
7225 */
7226EAPI void evas_object_image_load_scale_down_set (Evas_Object *obj, int scale_down) EINA_ARG_NONNULL(1);
7227
7228/**
7229 * get the scale down factor of a given image object's source image,
7230 * when loading it.
7231 *
7232 * @param obj The given image object pointer.
7233 *
7234 * @see evas_object_image_load_scale_down_set() for more details
7235 */
7236EAPI int evas_object_image_load_scale_down_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7237
7238/**
7239 * Inform a given image object to load a selective region of its
7240 * source image.
7241 *
7242 * @param obj The given image object pointer.
7243 * @param x X-offset of the region to be loaded.
7244 * @param y Y-offset of the region to be loaded.
7245 * @param w Width of the region to be loaded.
7246 * @param h Height of the region to be loaded.
7247 *
7248 * This function is useful when one is not showing all of an image's
7249 * area on its image object.
7250 *
7251 * @note The image loader for the image format in question has to
7252 * support selective region loading in order to this function to take
7253 * effect.
7254 *
7255 * @see evas_object_image_load_region_get()
7256 */
7257EAPI void evas_object_image_load_region_set (Evas_Object *obj, int x, int y, int w, int h) EINA_ARG_NONNULL(1);
7258
7259/**
7260 * Retrieve the coordinates of a given image object's selective
7261 * (source image) load region.
7262 *
7263 * @param obj The given image object pointer.
7264 * @param x Where to store the X-offset of the region to be loaded.
7265 * @param y Where to store the Y-offset of the region to be loaded.
7266 * @param w Where to store the width of the region to be loaded.
7267 * @param h Where to store the height of the region to be loaded.
7268 *
7269 * @note Use @c NULL pointers on the coordinates you're not interested
7270 * in: they'll be ignored by the function.
7271 *
7272 * @see evas_object_image_load_region_get()
7273 */
7274EAPI void evas_object_image_load_region_get (const Evas_Object *obj, int *x, int *y, int *w, int *h) EINA_ARG_NONNULL(1);
7275
7276/**
7277 * Define if the orientation information in the image file should be honored.
7278 *
7279 * @param obj The given image object pointer.
7280 * @param enable @p EINA_TRUE means that it should honor the orientation information
7281 * @since 1.1
7282 */
7283EAPI void evas_object_image_load_orientation_set (Evas_Object *obj, Eina_Bool enable) EINA_ARG_NONNULL(1);
7284
7285/**
7286 * Get if the orientation information in the image file should be honored.
7287 *
7288 * @param obj The given image object pointer.
7289 * @since 1.1
7290 */
7291EAPI Eina_Bool evas_object_image_load_orientation_get (const Evas_Object *obj) EINA_ARG_NONNULL(1);
7292
7293/**
7294 * Set the colorspace of a given image of the canvas.
7295 *
7296 * @param obj The given image object pointer.
7297 * @param cspace The new color space.
7298 *
7299 * This function sets the colorspace of given canvas image.
7300 *
7301 */
7302EAPI void evas_object_image_colorspace_set (Evas_Object *obj, Evas_Colorspace cspace) EINA_ARG_NONNULL(1);
7303
7304/**
7305 * Get the colorspace of a given image of the canvas.
7306 *
7307 * @param obj The given image object pointer.
7308 * @return The colorspace of the image.
7309 *
7310 * This function returns the colorspace of given canvas image.
7311 *
7312 */
7313EAPI Evas_Colorspace evas_object_image_colorspace_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7314
7315/**
7316 * Get the support state of a given image
7317 *
7318 * @param obj The given image object pointer
7319 * @return The region support state
7320 * @since 1.2.0
7321 *
7322 * This function returns the state of the region support of given image
7323 */
7324EAPI Eina_Bool evas_object_image_region_support_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7325
7326/**
7327 * Set the native surface of a given image of the canvas
7328 *
7329 * @param obj The given canvas pointer.
7330 * @param surf The new native surface.
7331 *
7332 * This function sets a native surface of a given canvas image.
7333 *
7334 */
7335EAPI void evas_object_image_native_surface_set (Evas_Object *obj, Evas_Native_Surface *surf) EINA_ARG_NONNULL(1, 2);
7336
7337/**
7338 * Get the native surface of a given image of the canvas
7339 *
7340 * @param obj The given canvas pointer.
7341 * @return The native surface of the given canvas image.
7342 *
7343 * This function returns the native surface of a given canvas image.
7344 *
7345 */
7346EAPI Evas_Native_Surface *evas_object_image_native_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7347
7348/**
7349 * Set the video surface linked to a given image of the canvas
7350 *
7351 * @param obj The given canvas pointer.
7352 * @param surf The new video surface.
7353 * @since 1.1.0
7354 *
7355 * This function link a video surface to a given canvas image.
7356 *
7357 */
7358EAPI void evas_object_image_video_surface_set (Evas_Object *obj, Evas_Video_Surface *surf) EINA_ARG_NONNULL(1);
7359
7360/**
7361 * Get the video surface linekd to a given image of the canvas
7362 *
7363 * @param obj The given canvas pointer.
7364 * @return The video surface of the given canvas image.
7365 * @since 1.1.0
7366 *
7367 * This function returns the video surface linked to a given canvas image.
7368 *
7369 */
7370EAPI const Evas_Video_Surface *evas_object_image_video_surface_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7371
7372/**
7373 * Set the scale hint of a given image of the canvas.
7374 *
7375 * @param obj The given image object pointer.
7376 * @param hint The scale hint, a value in
7377 * #Evas_Image_Scale_Hint.
7378 *
7379 * This function sets the scale hint value of the given image object
7380 * in the canvas, which will affect how Evas is to cache scaled
7381 * versions of its original source image.
7382 *
7383 * @see evas_object_image_scale_hint_get()
7384 */
7385EAPI void evas_object_image_scale_hint_set (Evas_Object *obj, Evas_Image_Scale_Hint hint) EINA_ARG_NONNULL(1);
7386
7387/**
7388 * Get the scale hint of a given image of the canvas.
7389 *
7390 * @param obj The given image object pointer.
7391 * @return The scale hint value set on @p obj, a value in
7392 * #Evas_Image_Scale_Hint.
7393 *
7394 * This function returns the scale hint value of the given image
7395 * object of the canvas.
7396 *
7397 * @see evas_object_image_scale_hint_set() for more details.
7398 */
7399EAPI Evas_Image_Scale_Hint evas_object_image_scale_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7400
7401/**
7402 * Set the content hint setting of a given image object of the canvas.
7403 *
7404 * @param obj The given canvas pointer.
7405 * @param hint The content hint value, one of the
7406 * #Evas_Image_Content_Hint ones.
7407 *
7408 * This function sets the content hint value of the given image of the
7409 * canvas. For example, if you're on the GL engine and your driver
7410 * implementation supports it, setting this hint to
7411 * #EVAS_IMAGE_CONTENT_HINT_DYNAMIC will make it need @b zero copies
7412 * at texture upload time, which is an "expensive" operation.
7413 *
7414 * @see evas_object_image_content_hint_get()
7415 */
7416EAPI void evas_object_image_content_hint_set (Evas_Object *obj, Evas_Image_Content_Hint hint) EINA_ARG_NONNULL(1);
7417
7418/**
7419 * Get the content hint setting of a given image object of the canvas.
7420 *
7421 * @param obj The given canvas pointer.
7422 * @return hint The content hint value set on it, one of the
7423 * #Evas_Image_Content_Hint ones (#EVAS_IMAGE_CONTENT_HINT_NONE means
7424 * an error).
7425 *
7426 * This function returns the content hint value of the given image of
7427 * the canvas.
7428 *
7429 * @see evas_object_image_content_hint_set()
7430 */
7431EAPI Evas_Image_Content_Hint evas_object_image_content_hint_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7432
7433
7434/**
7435 * Enable an image to be used as an alpha mask.
7436 *
7437 * This will set any flags, and discard any excess image data not used as an
7438 * alpha mask.
7439 *
7440 * Note there is little point in using a image as alpha mask unless it has an
7441 * alpha channel.
7442 *
7443 * @param obj Object to use as an alpha mask.
7444 * @param ismask Use image as alphamask, must be true.
7445 */
7446EAPI void evas_object_image_alpha_mask_set (Evas_Object *obj, Eina_Bool ismask) EINA_ARG_NONNULL(1);
7447
7448/**
7449 * Set the source object on an image object to used as a @b proxy.
7450 *
7451 * @param obj Proxy (image) object.
7452 * @param src Source object to use for the proxy.
7453 * @return @c EINA_TRUE on success, @c EINA_FALSE on error.
7454 *
7455 * If an image object is set to behave as a @b proxy, it will mirror
7456 * the rendering contents of a given @b source object in its drawing
7457 * region, without affecting that source in any way. The source must
7458 * be another valid Evas object. Other effects may be applied to the
7459 * proxy, such as a map (see evas_object_map_set()) to create a
7460 * reflection of the original object (for example).
7461 *
7462 * Any existing source object on @p obj will be removed after this
7463 * call. Setting @p src to @c NULL clears the proxy object (not in
7464 * "proxy state" anymore).
7465 *
7466 * @warning You cannot set a proxy as another proxy's source.
7467 *
7468 * @see evas_object_image_source_get()
7469 * @see evas_object_image_source_unset()
7470 */
7471EAPI Eina_Bool evas_object_image_source_set (Evas_Object *obj, Evas_Object *src) EINA_ARG_NONNULL(1);
7472
7473/**
7474 * Get the current source object of an image object.
7475 *
7476 * @param obj Image object
7477 * @return Source object (if any), or @c NULL, if not in "proxy mode"
7478 * (or on errors).
7479 *
7480 * @see evas_object_image_source_set() for more details
7481 */
7482EAPI Evas_Object *evas_object_image_source_get (Evas_Object *obj) EINA_ARG_NONNULL(1);
7483
7484/**
7485 * Clear the source object on a proxy image object.
7486 *
7487 * @param obj Image object to clear source of.
7488 * @return @c EINA_TRUE on success, @c EINA_FALSE on error.
7489 *
7490 * This is equivalent to calling evas_object_image_source_set() with a
7491 * @c NULL source.
7492 */
7493EAPI Eina_Bool evas_object_image_source_unset (Evas_Object *obj) EINA_ARG_NONNULL(1);
7494
7495/**
7496 * Check if a file extension may be supported by @ref Evas_Object_Image.
7497 *
7498 * @param file The file to check
7499 * @return EINA_TRUE if we may be able to opeen it, EINA_FALSE if it's unlikely.
7500 * @since 1.1.0
7501 *
7502 * If file is a Eina_Stringshare, use directly @ref evas_object_image_extension_can_load_fast_get.
7503 *
7504 * This functions is threadsafe.
7505 */
7506EAPI Eina_Bool evas_object_image_extension_can_load_get(const char *file);
7507
7508/**
7509 * Check if a file extension may be supported by @ref Evas_Object_Image.
7510 *
7511 * @param file The file to check, it should be an Eina_Stringshare.
7512 * @return EINA_TRUE if we may be able to open it, EINA_FALSE if it's unlikely.
7513 * @since 1.1.0
7514 *
7515 * This functions is threadsafe.
7516 */
7517EAPI Eina_Bool evas_object_image_extension_can_load_fast_get(const char *file);
7518
7519/**
7520 * Check if an image object can be animated (have multiple frames)
7521 *
7522 * @param obj Image object
7523 * @return whether obj support animation
7524 *
7525 * This returns if the image file of an image object is capable of animation
7526 * such as an animated gif file might. This is only useful to be called once
7527 * the image object file has been set.
7528 *
7529 * Example:
7530 * @code
7531 * extern Evas_Object *obj;
7532 *
7533 * if (evas_object_image_animated_get(obj))
7534 * {
7535 * int frame_count;
7536 * int loop_count;
7537 * Evas_Image_Animated_Loop_Hint loop_type;
7538 * double duration;
7539 *
7540 * frame_count = evas_object_image_animated_frame_count_get(obj);
7541 * printf("This image has %d frames\n",frame_count);
7542 *
7543 * duration = evas_object_image_animated_frame_duration_get(obj,1,0);
7544 * printf("Frame 1's duration is %f. You had better set object's frame to 2 after this duration using timer\n");
7545 *
7546 * loop_count = evas_object_image_animated_loop_count_get(obj);
7547 * printf("loop count is %d. You had better run loop %d times\n",loop_count,loop_count);
7548 *
7549 * loop_type = evas_object_image_animated_loop_type_get(obj);
7550 * if (loop_type == EVAS_IMAGE_ANIMATED_HINT_LOOP)
7551 * printf("You had better set frame like 1->2->3->1->2->3...\n");
7552 * else if (loop_type == EVAS_IMAGE_ANIMATED_HINT_PINGPONG)
7553 * printf("You had better set frame like 1->2->3->2->1->2...\n");
7554 * else
7555 * printf("Unknown loop type\n");
7556 *
7557 * evas_object_image_animated_frame_set(obj,1);
7558 * printf("You set image object's frame to 1. You can see frame 1\n");
7559 * }
7560 * @endcode
7561 *
7562 * @see evas_object_image_animated_get()
7563 * @see evas_object_image_animated_frame_count_get()
7564 * @see evas_object_image_animated_loop_type_get()
7565 * @see evas_object_image_animated_loop_count_get()
7566 * @see evas_object_image_animated_frame_duration_get()
7567 * @see evas_object_image_animated_frame_set()
7568 * @since 1.1.0
7569 */
7570EAPI Eina_Bool evas_object_image_animated_get(const Evas_Object *obj);
7571
7572/**
7573 * Get the total number of frames of the image object.
7574 *
7575 * @param obj Image object
7576 * @return The number of frames
7577 *
7578 * This returns total number of frames the image object supports (if animated)
7579 *
7580 * @see evas_object_image_animated_get()
7581 * @see evas_object_image_animated_frame_count_get()
7582 * @see evas_object_image_animated_loop_type_get()
7583 * @see evas_object_image_animated_loop_count_get()
7584 * @see evas_object_image_animated_frame_duration_get()
7585 * @see evas_object_image_animated_frame_set()
7586 * @since 1.1.0
7587 */
7588EAPI int evas_object_image_animated_frame_count_get(const Evas_Object *obj);
7589
7590/**
7591 * Get the kind of looping the image object does.
7592 *
7593 * @param obj Image object
7594 * @return Loop type of the image object
7595 *
7596 * This returns the kind of looping the image object wants to do.
7597 *
7598 * If it returns EVAS_IMAGE_ANIMATED_HINT_LOOP, you should display frames in a sequence like:
7599 * 1->2->3->1->2->3->1...
7600 * If it returns EVAS_IMAGE_ANIMATED_HINT_PINGPONG, it is better to
7601 * display frames in a sequence like: 1->2->3->2->1->2->3->1...
7602 *
7603 * The default type is EVAS_IMAGE_ANIMATED_HINT_LOOP.
7604 *
7605 * @see evas_object_image_animated_get()
7606 * @see evas_object_image_animated_frame_count_get()
7607 * @see evas_object_image_animated_loop_type_get()
7608 * @see evas_object_image_animated_loop_count_get()
7609 * @see evas_object_image_animated_frame_duration_get()
7610 * @see evas_object_image_animated_frame_set()
7611 * @since 1.1.0
7612 */
7613EAPI Evas_Image_Animated_Loop_Hint evas_object_image_animated_loop_type_get(const Evas_Object *obj);
7614
7615/**
7616 * Get the number times the animation of the object loops.
7617 *
7618 * @param obj Image object
7619 * @return The number of loop of an animated image object
7620 *
7621 * This returns loop count of image. The loop count is the number of times
7622 * the animation will play fully from first to last frame until the animation
7623 * should stop (at the final frame).
7624 *
7625 * If 0 is returned, then looping should happen indefinitely (no limit to
7626 * the number of times it loops).
7627 *
7628 * @see evas_object_image_animated_get()
7629 * @see evas_object_image_animated_frame_count_get()
7630 * @see evas_object_image_animated_loop_type_get()
7631 * @see evas_object_image_animated_loop_count_get()
7632 * @see evas_object_image_animated_frame_duration_get()
7633 * @see evas_object_image_animated_frame_set()
7634 * @since 1.1.0
7635 */
7636EAPI int evas_object_image_animated_loop_count_get(const Evas_Object *obj);
7637
7638/**
7639 * Get the duration of a sequence of frames.
7640 *
7641 * @param obj Image object
7642 * @param start_frame The first frame
7643 * @param fram_num Number of frames in the sequence
7644 *
7645 * This returns total duration that the specified sequence of frames should
7646 * take in seconds.
7647 *
7648 * If you set start_frame to 1 and frame_num 0, you get frame 1's duration
7649 * If you set start_frame to 1 and frame_num 1, you get frame 1's duration +
7650 * frame2's duration
7651 *
7652 * @see evas_object_image_animated_get()
7653 * @see evas_object_image_animated_frame_count_get()
7654 * @see evas_object_image_animated_loop_type_get()
7655 * @see evas_object_image_animated_loop_count_get()
7656 * @see evas_object_image_animated_frame_duration_get()
7657 * @see evas_object_image_animated_frame_set()
7658 * @since 1.1.0
7659 */
7660EAPI double evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int fram_num);
7661
7662/**
7663 * Set the frame to current frame of an image object
7664 *
7665 * @param obj The given image object.
7666 * @param frame_num The index of current frame
7667 *
7668 * This set image object's current frame to frame_num with 1 being the first
7669 * frame.
7670 *
7671 * @see evas_object_image_animated_get()
7672 * @see evas_object_image_animated_frame_count_get()
7673 * @see evas_object_image_animated_loop_type_get()
7674 * @see evas_object_image_animated_loop_count_get()
7675 * @see evas_object_image_animated_frame_duration_get()
7676 * @see evas_object_image_animated_frame_set()
7677 * @since 1.1.0
7678 */
7679EAPI void evas_object_image_animated_frame_set(Evas_Object *obj, int frame_num);
7680/**
7681 * @}
7682 */
7683
7684/**
7685 * @defgroup Evas_Object_Text Text Object Functions
7686 *
7687 * Functions that operate on single line, single style text objects.
7688 *
7689 * For multiline and multiple style text, see @ref Evas_Object_Textblock.
7690 *
7691 * See some @ref Example_Evas_Text "examples" on this group of functions.
7692 *
7693 * @ingroup Evas_Object_Specific
7694 */
7695
7696/**
7697 * @addtogroup Evas_Object_Text
7698 * @{
7699 */
7700
7701/* basic styles (4 bits allocated use 0->10 now, 5 left) */
7702#define EVAS_TEXT_STYLE_MASK_BASIC 0xf
7703
7704/**
7705 * Text style type creation macro. Use style types on the 's'
7706 * arguments, being 'x' your style variable.
7707 */
7708#define EVAS_TEXT_STYLE_BASIC_SET(x, s) \
7709 do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_BASIC) | (s); } while (0)
7710
7711#define EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION (0x7 << 4)
7712
7713/**
7714 * Text style type creation macro. This one will impose shadow
7715 * directions on the style type variable -- use the @c
7716 * EVAS_TEXT_STYLE_SHADOW_DIRECTION_* values on 's', incrementally.
7717 */
7718#define EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(x, s) \
7719 do { x = ((x) & ~EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION) | (s); } while (0)
7720
7721 typedef enum _Evas_Text_Style_Type
7722 {
7723 EVAS_TEXT_STYLE_PLAIN, /**< plain, standard text */
7724 EVAS_TEXT_STYLE_SHADOW, /**< text with shadow underneath */
7725 EVAS_TEXT_STYLE_OUTLINE, /**< text with an outline */
7726 EVAS_TEXT_STYLE_SOFT_OUTLINE, /**< text with a soft outline */
7727 EVAS_TEXT_STYLE_GLOW, /**< text with a glow effect */
7728 EVAS_TEXT_STYLE_OUTLINE_SHADOW, /**< text with both outline and shadow effects */
7729 EVAS_TEXT_STYLE_FAR_SHADOW, /**< text with (far) shadow underneath */
7730 EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW, /**< text with outline and soft shadow effects combined */
7731 EVAS_TEXT_STYLE_SOFT_SHADOW, /**< text with (soft) shadow underneath */
7732 EVAS_TEXT_STYLE_FAR_SOFT_SHADOW, /**< text with (far soft) shadow underneath */
7733
7734 /* OR these to modify shadow direction (3 bits needed) */
7735 EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT = (0x0 << 4), /**< shadow growing to bottom right */
7736 EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM = (0x1 << 4), /**< shadow growing to the bottom */
7737 EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT = (0x2 << 4), /**< shadow growing to bottom left */
7738 EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT = (0x3 << 4), /**< shadow growing to the left */
7739 EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT = (0x4 << 4), /**< shadow growing to top left */
7740 EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP = (0x5 << 4), /**< shadow growing to the top */
7741 EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT = (0x6 << 4), /**< shadow growing to top right */
7742 EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< shadow growing to the right */
7743 } 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 */
7744
7745/**
7746 * Creates a new text object on the provided canvas.
7747 *
7748 * @param e The canvas to create the text object on.
7749 * @return @c NULL on error, a pointer to a new text object on
7750 * success.
7751 *
7752 * Text objects are for simple, single line text elements. If you want
7753 * more elaborated text blocks, see @ref Evas_Object_Textblock.
7754 *
7755 * @see evas_object_text_font_source_set()
7756 * @see evas_object_text_font_set()
7757 * @see evas_object_text_text_set()
7758 */
7759EAPI Evas_Object *evas_object_text_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
7760
7761/**
7762 * Set the font (source) file to be used on a given text object.
7763 *
7764 * @param obj The text object to set font for.
7765 * @param font The font file's path.
7766 *
7767 * This function allows the font file to be explicitly set for a given
7768 * text object, overriding system lookup, which will first occur in
7769 * the given file's contents.
7770 *
7771 * @see evas_object_text_font_get()
7772 */
7773EAPI void evas_object_text_font_source_set (Evas_Object *obj, const char *font) EINA_ARG_NONNULL(1);
7774
7775/**
7776 * Get the font file's path which is being used on a given text
7777 * object.
7778 *
7779 * @param obj The text object to set font for.
7780 * @param font The font file's path.
7781 *
7782 * @see evas_object_text_font_get() for more details
7783 */
7784EAPI const char *evas_object_text_font_source_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7785
7786/**
7787 * Set the font family and size on a given text object.
7788 *
7789 * @param obj The text object to set font for.
7790 * @param font The font (family) name.
7791 * @param size The font size, in points.
7792 *
7793 * This function allows the font name and size of a text object to be
7794 * set. The @p font string has to follow fontconfig's convention on
7795 * naming fonts, as it's the underlying library used to query system
7796 * fonts by Evas (see the @c fc-list command's output, on your system,
7797 * to get an idea).
7798 *
7799 * @see evas_object_text_font_get()
7800 * @see evas_object_text_font_source_set()
7801 */
7802 EAPI void evas_object_text_font_set (Evas_Object *obj, const char *font, Evas_Font_Size size) EINA_ARG_NONNULL(1);
7803
7804/**
7805 * Retrieve the font family and size in use on a given text object.
7806 *
7807 * @param obj The evas text object to query for font information.
7808 * @param font A pointer to the location to store the font name in.
7809 * @param size A pointer to the location to store the font size in.
7810 *
7811 * This function allows the font name and size of a text object to be
7812 * queried. Be aware that the font name string is still owned by Evas
7813 * and should @b not have free() called on it by the caller of the
7814 * function.
7815 *
7816 * @see evas_object_text_font_set()
7817 */
7818EAPI void evas_object_text_font_get (const Evas_Object *obj, const char **font, Evas_Font_Size *size) EINA_ARG_NONNULL(1);
7819
7820/**
7821 * Sets the text string to be displayed by the given text object.
7822 *
7823 * @param obj The text object to set text string on.
7824 * @param text Text string to display on it.
7825 *
7826 * @see evas_object_text_text_get()
7827 */
7828EAPI void evas_object_text_text_set (Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
7829
7830/**
7831 * Retrieves the text string currently being displayed by the given
7832 * text object.
7833 *
7834 * @param obj The given text object.
7835 * @return The text string currently being displayed on it.
7836 *
7837 * @note Do not free() the return value.
7838 *
7839 * @see evas_object_text_text_set()
7840 */
7841EAPI const char *evas_object_text_text_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7842
7843/**
7844 * @brief Sets the BiDi delimiters used in the textblock.
7845 *
7846 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
7847 * is useful for example in recipients fields of e-mail clients where bidi
7848 * oddities can occur when mixing rtl and ltr.
7849 *
7850 * @param obj The given text object.
7851 * @param delim A null terminated string of delimiters, e.g ",|".
7852 * @since 1.1.0
7853 */
7854EAPI void evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim);
7855
7856/**
7857 * @brief Gets the BiDi delimiters used in the textblock.
7858 *
7859 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
7860 * is useful for example in recipients fields of e-mail clients where bidi
7861 * oddities can occur when mixing rtl and ltr.
7862 *
7863 * @param obj The given text object.
7864 * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL.
7865 * @since 1.1.0
7866 */
7867EAPI const char *evas_object_text_bidi_delimiters_get(const Evas_Object *obj);
7868
7869 EAPI Evas_Coord evas_object_text_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7870 EAPI Evas_Coord evas_object_text_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7871 EAPI Evas_Coord evas_object_text_max_ascent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7872 EAPI Evas_Coord evas_object_text_max_descent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7873 EAPI Evas_Coord evas_object_text_horiz_advance_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7874 EAPI Evas_Coord evas_object_text_vert_advance_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7875 EAPI Evas_Coord evas_object_text_inset_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7876
7877/**
7878 * Retrieve position and dimension information of a character within a text @c Evas_Object.
7879 *
7880 * This function is used to obtain the X, Y, width and height of a the character
7881 * located at @p pos within the @c Evas_Object @p obj. @p obj must be a text object
7882 * as created with evas_object_text_add(). Any of the @c Evas_Coord parameters (@p cx,
7883 * @p cy, @p cw, @p ch) may be NULL in which case no value will be assigned to that
7884 * parameter.
7885 *
7886 * @param obj The text object to retrieve position information for.
7887 * @param pos The character position to request co-ordinates for.
7888 * @param cx A pointer to an @c Evas_Coord to store the X value in (can be NULL).
7889 * @param cy A pointer to an @c Evas_Coord to store the Y value in (can be NULL).
7890 * @param cw A pointer to an @c Evas_Coord to store the Width value in (can be NULL).
7891 * @param ch A pointer to an @c Evas_Coord to store the Height value in (can be NULL).
7892 *
7893 * @returns EINA_FALSE on success, EINA_TRUE on error.
7894 */
7895EAPI 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);
7896 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);
7897
7898/**
7899 * Returns the logical position of the last char in the text
7900 * up to the pos given. this is NOT the position of the last char
7901 * because of the possibility of RTL in the text.
7902 */
7903EAPI int evas_object_text_last_up_to_pos (const Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
7904
7905/**
7906 * Retrieves the style on use on the given text object.
7907 *
7908 * @param obj the given text object to set style on.
7909 * @return the style type in use.
7910 *
7911 * @see evas_object_text_style_set() for more details.
7912 */
7913EAPI Evas_Text_Style_Type evas_object_text_style_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
7914
7915/**
7916 * Sets the style to apply on the given text object.
7917 *
7918 * @param obj the given text object to set style on.
7919 * @param type a style type.
7920 *
7921 * Text object styles are one of the values in
7922 * #Evas_Text_Style_Type. Some of those values are combinations of
7923 * more than one style, and some account for the direction of the
7924 * rendering of shadow effects.
7925 *
7926 * @note One may use the helper macros #EVAS_TEXT_STYLE_BASIC_SET and
7927 * #EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET to assemble a style value.
7928 *
7929 * The following figure illustrates the text styles:
7930 *
7931 * @image html text-styles.png
7932 * @image rtf text-styles.png
7933 * @image latex text-styles.eps
7934 *
7935 * @see evas_object_text_style_get()
7936 * @see evas_object_text_shadow_color_set()
7937 * @see evas_object_text_outline_color_set()
7938 * @see evas_object_text_glow_color_set()
7939 * @see evas_object_text_glow2_color_set()
7940 */
7941EAPI void evas_object_text_style_set (Evas_Object *obj, Evas_Text_Style_Type type) EINA_ARG_NONNULL(1);
7942
7943/**
7944 * Sets the shadow color for the given text object.
7945 *
7946 * @param obj The given Evas text object.
7947 * @param r The red component of the given color.
7948 * @param g The green component of the given color.
7949 * @param b The blue component of the given color.
7950 * @param a The alpha component of the given color.
7951 *
7952 * Shadow effects, which are fading colors decorating the text
7953 * underneath it, will just be shown if the object is set to one of
7954 * the following styles:
7955 *
7956 * - #EVAS_TEXT_STYLE_SHADOW
7957 * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW
7958 * - #EVAS_TEXT_STYLE_FAR_SHADOW
7959 * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW
7960 * - #EVAS_TEXT_STYLE_SOFT_SHADOW
7961 * - #EVAS_TEXT_STYLE_FAR_SOFT_SHADOW
7962 *
7963 * One can also change the direction where the shadow grows to, with
7964 * evas_object_text_style_set().
7965 *
7966 * @see evas_object_text_shadow_color_get()
7967 */
7968EAPI void evas_object_text_shadow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
7969
7970/**
7971 * Retrieves the shadow color for the given text object.
7972 *
7973 * @param obj The given Evas text object.
7974 * @param r Pointer to variable to hold the red component of the given
7975 * color.
7976 * @param g Pointer to variable to hold the green component of the
7977 * given color.
7978 * @param b Pointer to variable to hold the blue component of the
7979 * given color.
7980 * @param a Pointer to variable to hold the alpha component of the
7981 * given color.
7982 *
7983 * @note Use @c NULL pointers on the color components you're not
7984 * interested in: they'll be ignored by the function.
7985 *
7986 * @see evas_object_text_shadow_color_set() for more details.
7987 */
7988EAPI void evas_object_text_shadow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
7989
7990/**
7991 * Sets the glow color for the given text object.
7992 *
7993 * @param obj The given Evas text object.
7994 * @param r The red component of the given color.
7995 * @param g The green component of the given color.
7996 * @param b The blue component of the given color.
7997 * @param a The alpha component of the given color.
7998 *
7999 * Glow effects, which are glowing colors decorating the text's
8000 * surroundings, will just be shown if the object is set to the
8001 * #EVAS_TEXT_STYLE_GLOW style.
8002 *
8003 * @note Glow effects are placed from a short distance of the text
8004 * itself, but no touching it. For glowing effects right on the
8005 * borders of the glyphs, see 'glow 2' effects
8006 * (evas_object_text_glow2_color_set()).
8007 *
8008 * @see evas_object_text_glow_color_get()
8009 */
8010EAPI void evas_object_text_glow_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
8011
8012/**
8013 * Retrieves the glow color for the given text object.
8014 *
8015 * @param obj The given Evas text object.
8016 * @param r Pointer to variable to hold the red component of the given
8017 * color.
8018 * @param g Pointer to variable to hold the green component of the
8019 * given color.
8020 * @param b Pointer to variable to hold the blue component of the
8021 * given color.
8022 * @param a Pointer to variable to hold the alpha component of the
8023 * given color.
8024 *
8025 * @note Use @c NULL pointers on the color components you're not
8026 * interested in: they'll be ignored by the function.
8027 *
8028 * @see evas_object_text_glow_color_set() for more details.
8029 */
8030EAPI void evas_object_text_glow_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
8031
8032/**
8033 * Sets the 'glow 2' color for the given text object.
8034 *
8035 * @param obj The given Evas text object.
8036 * @param r The red component of the given color.
8037 * @param g The green component of the given color.
8038 * @param b The blue component of the given color.
8039 * @param a The alpha component of the given color.
8040 *
8041 * 'Glow 2' effects, which are glowing colors decorating the text's
8042 * (immediate) surroundings, will just be shown if the object is set
8043 * to the #EVAS_TEXT_STYLE_GLOW style. See also
8044 * evas_object_text_glow_color_set().
8045 *
8046 * @see evas_object_text_glow2_color_get()
8047 */
8048EAPI void evas_object_text_glow2_color_set (Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
8049
8050/**
8051 * Retrieves the 'glow 2' color for the given text object.
8052 *
8053 * @param obj The given Evas text object.
8054 * @param r Pointer to variable to hold the red component of the given
8055 * color.
8056 * @param g Pointer to variable to hold the green component of the
8057 * given color.
8058 * @param b Pointer to variable to hold the blue component of the
8059 * given color.
8060 * @param a Pointer to variable to hold the alpha component of the
8061 * given color.
8062 *
8063 * @note Use @c NULL pointers on the color components you're not
8064 * interested in: they'll be ignored by the function.
8065 *
8066 * @see evas_object_text_glow2_color_set() for more details.
8067 */
8068EAPI void evas_object_text_glow2_color_get (const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
8069
8070/**
8071 * Sets the outline color for the given text object.
8072 *
8073 * @param obj The given Evas text object.
8074 * @param r The red component of the given color.
8075 * @param g The green component of the given color.
8076 * @param b The blue component of the given color.
8077 * @param a The alpha component of the given color.
8078 *
8079 * Outline effects (colored lines around text glyphs) will just be
8080 * shown if the object is set to one of the following styles:
8081 * - #EVAS_TEXT_STYLE_OUTLINE
8082 * - #EVAS_TEXT_STYLE_SOFT_OUTLINE
8083 * - #EVAS_TEXT_STYLE_OUTLINE_SHADOW
8084 * - #EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW
8085 *
8086 * @see evas_object_text_outline_color_get()
8087 */
8088EAPI void evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a) EINA_ARG_NONNULL(1);
8089
8090/**
8091 * Retrieves the outline color for the given text object.
8092 *
8093 * @param obj The given Evas text object.
8094 * @param r Pointer to variable to hold the red component of the given
8095 * color.
8096 * @param g Pointer to variable to hold the green component of the
8097 * given color.
8098 * @param b Pointer to variable to hold the blue component of the
8099 * given color.
8100 * @param a Pointer to variable to hold the alpha component of the
8101 * given color.
8102 *
8103 * @note Use @c NULL pointers on the color components you're not
8104 * interested in: they'll be ignored by the function.
8105 *
8106 * @see evas_object_text_outline_color_set() for more details.
8107 */
8108EAPI void evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a) EINA_ARG_NONNULL(1);
8109
8110/**
8111 * Gets the text style pad of a text object.
8112 *
8113 * @param obj The given text object.
8114 * @param l The left pad (or @c NULL).
8115 * @param r The right pad (or @c NULL).
8116 * @param t The top pad (or @c NULL).
8117 * @param b The bottom pad (or @c NULL).
8118 *
8119 */
8120EAPI void evas_object_text_style_pad_get (const Evas_Object *obj, int *l, int *r, int *t, int *b) EINA_ARG_NONNULL(1);
8121
8122/**
8123 * Retrieves the direction of the text currently being displayed in the
8124 * text object.
8125 * @param obj The given evas text object.
8126 * @return the direction of the text
8127 */
8128EAPI Evas_BiDi_Direction evas_object_text_direction_get (const Evas_Object *obj) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
8129
8130/**
8131 * @}
8132 */
8133
8134/**
8135 * @defgroup Evas_Object_Textblock Textblock Object Functions
8136 *
8137 * Functions used to create and manipulate textblock objects. Unlike
8138 * @ref Evas_Object_Text, these handle complex text, doing multiple
8139 * styles and multiline text based on HTML-like tags. Of these extra
8140 * features will be heavier on memory and processing cost.
8141 *
8142 * @section Evas_Object_Textblock_Tutorial Textblock Object Tutorial
8143 *
8144 * This part explains about the textblock object's API and proper usage.
8145 * If you want to develop textblock, you should also refer to @ref Evas_Object_Textblock_Internal.
8146 * The main user of the textblock object is the edje entry object in Edje, so
8147 * that's a good place to learn from, but I think this document is more than
8148 * enough, if it's not, please contact me and I'll update it.
8149 *
8150 * @subsection textblock_intro Introduction
8151 * The textblock objects is, as implied, an object that can show big chunks of
8152 * text. Textblock supports many features including: Text formatting, automatic
8153 * and manual text alignment, embedding items (for example icons) and more.
8154 * Textblock has three important parts, the text paragraphs, the format nodes
8155 * and the cursors.
8156 *
8157 * You can use markup to format text, for example: "<font_size=50>Big!</font_size>".
8158 * You can also put more than one style directive in one tag:
8159 * "<font_size=50 color=#F00>Big and Red!</font_size>".
8160 * Please notice that we used "</font_size>" although the format also included
8161 * color, this is because the first format determines the matching closing tag's
8162 * name. You can also use anonymous tags, like: "<font_size=30>Big</>" which
8163 * just pop any type of format, but it's advised to use the named alternatives
8164 * instead.
8165 *
8166 * @subsection textblock_cursors Textblock Object Cursors
8167 * A textblock Cursor @ref Evas_Textblock_Cursor is data type that represents
8168 * a position in a textblock. Each cursor contains information about the
8169 * paragraph it points to, the position in that paragraph and the object itself.
8170 * Cursors register to textblock objects upon creation, this means that once
8171 * you created a cursor, it belongs to a specific obj and you can't for example
8172 * copy a cursor "into" a cursor of a different object. Registered cursors
8173 * also have the added benefit of updating automatically upon textblock changes,
8174 * this means that if you have a cursor pointing to a specific character, it'll
8175 * still point to it even after you change the whole object completely (as long
8176 * as the char was not deleted), this is not possible without updating, because
8177 * as mentioned, each cursor holds a character position. There are many
8178 * functions that handle cursors, just check out the evas_textblock_cursor*
8179 * functions. For creation and deletion of cursors check out:
8180 * @see evas_object_textblock_cursor_new()
8181 * @see evas_textblock_cursor_free()
8182 * @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).
8183 *
8184 * @subsection textblock_paragraphs Textblock Object Paragraphs
8185 * The textblock object is made out of text splitted to paragraphs (delimited
8186 * by the paragraph separation character). Each paragraph has many (or none)
8187 * format nodes associated with it which are responsible for the formatting
8188 * of that paragraph.
8189 *
8190 * @subsection textblock_format_nodes Textblock Object Format Nodes
8191 * As explained in @ref textblock_paragraphs each one of the format nodes
8192 * is associated with a paragraph.
8193 * There are two types of format nodes, visible and invisible:
8194 * Visible: formats that a cursor can point to, i.e formats that
8195 * occupy space, for example: newlines, tabs, items and etc. Some visible items
8196 * are made of two parts, in this case, only the opening tag is visible.
8197 * A closing tag (i.e a </tag> tag) should NEVER be visible.
8198 * Invisible: formats that don't occupy space, for example: bold and underline.
8199 * Being able to access format nodes is very important for some uses. For
8200 * example, edje uses the "<a>" format to create links in the text (and pop
8201 * popups above them when clicked). For the textblock object a is just a
8202 * formatting instruction (how to color the text), but edje utilizes the access
8203 * to the format nodes to make it do more.
8204 * For more information, take a look at all the evas_textblock_node_format_*
8205 * functions.
8206 * The translation of "<tag>" tags to actual format is done according to the
8207 * tags defined in the style, see @ref evas_textblock_style_set
8208 *
8209 * @subsection textblock_special_formats Special Formats
8210 * Textblock supports various format directives that can be used either in
8211 * markup, or by calling @ref evas_object_textblock_format_append or
8212 * @ref evas_object_textblock_format_prepend. In addition to the mentioned
8213 * format directives, textblock allows creating additional format directives
8214 * using "tags" that can be set in the style see @ref evas_textblock_style_set .
8215 *
8216 * Textblock supports the following formats:
8217 * @li font - Font description in fontconfig like format, e.g: "Sans:style=Italic:lang=hi". or "Serif:style=Bold".
8218 * @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".
8219 * @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".
8220 * @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".
8221 * @li lang - Overrides the language defined in "font". E.g: "lang=he" is the same as "font=:lang=he".
8222 * @li font_fallbacks - A comma delimited list of fonts to try if finding the main font fails.
8223 * @li font_size - The font size in points.
8224 * @li font_source - The source of the font, e.g an eet file.
8225 * @li color - Text color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8226 * @li underline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8227 * @li underline2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8228 * @li outline_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8229 * @li shadow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8230 * @li glow_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8231 * @li glow2_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8232 * @li backing_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8233 * @li strikethrough_color - color in one of the following formats: "#RRGGBB", "#RRGGBBAA", "#RGB", and "#RGBA".
8234 * @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%.
8235 * @li valign - Either "top", "bottom", "middle", "center", "baseline", "base", a value between 0.0 and 1.0, or a value between 0% to 100%.
8236 * @li wrap - "word", "char", "mixed", or "none".
8237 * @li left_margin - Either "reset", or a pixel value indicating the margin.
8238 * @li right_margin - Either "reset", or a pixel value indicating the margin.
8239 * @li underline - "on", "off", "single", or "double".
8240 * @li strikethrough - "on" or "off"
8241 * @li backing - "on" or "off"
8242 * @li style - Either "off", "none", "plain", "shadow", "outline", "soft_outline", "outline_shadow", "outline_soft_shadow", "glow", "far_shadow", "soft_shadow", or "far_soft_shadow".
8243 * @li tabstops - Pixel value for tab width.
8244 * @li linesize - Force a line size in pixels.
8245 * @li linerelsize - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size.
8246 * @li linegap - Force a line gap in pixels.
8247 * @li linerelgap - Either a floating point value or a percentage indicating the wanted size of the line relative to the calculated size.
8248 * @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.
8249 * @li linefill - Either a float value or percentage indicating how much to fill the line.
8250 * @li ellipsis - Value between 0.0-1.0 to indicate the type of ellipsis, or -1.0 to indicate ellipsis isn't wanted.
8251 * @li password - "on" or "off". This is used to specifically turn replacing chars with the replacement char (i.e password mode) on and off.
8252 *
8253 *
8254 * @todo put here some usage examples
8255 *
8256 * @ingroup Evas_Object_Specific
8257 *
8258 * @{
8259 */
8260
8261 typedef struct _Evas_Textblock_Style Evas_Textblock_Style;
8262 typedef struct _Evas_Textblock_Cursor Evas_Textblock_Cursor;
8263 /**
8264 * @typedef Evas_Object_Textblock_Node_Format
8265 * A format node.
8266 */
8267 typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format;
8268 typedef struct _Evas_Textblock_Rectangle Evas_Textblock_Rectangle;
8269
8270 struct _Evas_Textblock_Rectangle
8271 {
8272 Evas_Coord x, y, w, h;
8273 };
8274
8275 typedef enum _Evas_Textblock_Text_Type
8276 {
8277 EVAS_TEXTBLOCK_TEXT_RAW,
8278 EVAS_TEXTBLOCK_TEXT_PLAIN,
8279 EVAS_TEXTBLOCK_TEXT_MARKUP
8280 } Evas_Textblock_Text_Type;
8281
8282 typedef enum _Evas_Textblock_Cursor_Type
8283 {
8284 EVAS_TEXTBLOCK_CURSOR_UNDER,
8285 EVAS_TEXTBLOCK_CURSOR_BEFORE
8286 } Evas_Textblock_Cursor_Type;
8287
8288
8289/**
8290 * Adds a textblock to the given evas.
8291 * @param e The given evas.
8292 * @return The new textblock object.
8293 */
8294EAPI Evas_Object *evas_object_textblock_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8295
8296
8297/**
8298 * Returns the unescaped version of escape.
8299 * @param escape the string to be escaped
8300 * @return the unescaped version of escape
8301 */
8302EAPI const char *evas_textblock_escape_string_get(const char *escape) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8303
8304/**
8305 * Returns the escaped version of the string.
8306 * @param string to escape
8307 * @param len_ret the len of the part of the string that was used.
8308 * @return the escaped string.
8309 */
8310EAPI const char *evas_textblock_string_escape_get(const char *string, int *len_ret) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8311
8312/**
8313 * Return the unescaped version of the string between start and end.
8314 *
8315 * @param escape_start the start of the string.
8316 * @param escape_end the end of the string.
8317 * @return the unescaped version of the range
8318 */
8319EAPI 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);
8320
8321/**
8322 * Return the plain version of the markup.
8323 *
8324 * Works as if you set the markup to a textblock and then retrieve the plain
8325 * version of the text. i.e: <br> and <\n> will be replaced with \n, &...; with
8326 * the actual char and etc.
8327 *
8328 * @param obj the textblock object to work with. (if NULL, tries the default)
8329 * @param text the markup text (if NULL, return NULL)
8330 * @return an allocated plain text version of the markup
8331 * @since 1.2.0
8332 */
8333EAPI char *evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
8334
8335/**
8336 * Return the markup version of the plain text.
8337 *
8338 * Replaces \n -> <br/> \t -> <tab/> and etc. Generally needed before you pass
8339 * plain text to be set in a textblock.
8340 *
8341 * @param obj the textblock object to work with (if NULL, it just does the
8342 * default behaviour, i.e with no extra object information).
8343 * @param text the markup text (if NULL, return NULL)
8344 * @return an allocated plain text version of the markup
8345 * @since 1.2.0
8346 */
8347EAPI char *evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
8348
8349/**
8350 * Creates a new textblock style.
8351 * @return The new textblock style.
8352 */
8353EAPI Evas_Textblock_Style *evas_textblock_style_new(void) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
8354
8355/**
8356 * Destroys a textblock style.
8357 * @param ts The textblock style to free.
8358 */
8359EAPI void evas_textblock_style_free(Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
8360
8361/**
8362 * Sets the style ts to the style passed as text by text.
8363 * Expected a string consisting of many (or none) tag='format' pairs.
8364 *
8365 * @param ts the style to set.
8366 * @param text the text to parse - NOT NULL.
8367 * @return Returns no value.
8368 */
8369EAPI void evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text) EINA_ARG_NONNULL(1);
8370
8371/**
8372 * Return the text of the style ts.
8373 * @param ts the style to get it's text.
8374 * @return the text of the style or null on error.
8375 */
8376EAPI const char *evas_textblock_style_get(const Evas_Textblock_Style *ts) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8377
8378
8379/**
8380 * Set the objects style to ts.
8381 * @param obj the Evas object to set the style to.
8382 * @param ts the style to set.
8383 * @return Returns no value.
8384 */
8385EAPI void evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
8386
8387/**
8388 * Return the style of an object.
8389 * @param obj the object to get the style from.
8390 * @return the style of the object.
8391 */
8392EAPI const Evas_Textblock_Style *evas_object_textblock_style_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8393
8394/**
8395 * Push ts to the top of the user style stack.
8396 *
8397 * FIXME: API is solid but currently only supports 1 style in the stack.
8398 *
8399 * The user style overrides the corresponding elements of the regular style.
8400 * This is the proper way to do theme overrides in code.
8401 * @param obj the Evas object to set the style to.
8402 * @param ts the style to set.
8403 * @return Returns no value.
8404 * @see evas_object_textblock_style_set
8405 * @since 1.2.0
8406 */
8407EAPI void evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts) EINA_ARG_NONNULL(1);
8408
8409/**
8410 * Del the from the top of the user style stack.
8411 *
8412 * @param obj the object to get the style from.
8413 * @see evas_object_textblock_style_get
8414 * @since 1.2.0
8415 */
8416EAPI void evas_object_textblock_style_user_pop(Evas_Object *obj) EINA_ARG_NONNULL(1);
8417
8418/**
8419 * Get (don't remove) the style at the top of the user style stack.
8420 *
8421 * @param obj the object to get the style from.
8422 * @return the style of the object.
8423 * @see evas_object_textblock_style_get
8424 * @since 1.2.0
8425 */
8426EAPI const Evas_Textblock_Style *evas_object_textblock_style_user_peek(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8427
8428/**
8429 * @brief Set the "replacement character" to use for the given textblock object.
8430 *
8431 * @param obj The given textblock object.
8432 * @param ch The charset name.
8433 */
8434EAPI void evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch) EINA_ARG_NONNULL(1);
8435
8436/**
8437 * @brief Get the "replacement character" for given textblock object. Returns
8438 * NULL if no replacement character is in use.
8439 *
8440 * @param obj The given textblock object
8441 * @return replacement character or @c NULL
8442 */
8443EAPI const char *evas_object_textblock_replace_char_get(Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8444
8445/**
8446 * @brief Sets the vertical alignment of text within the textblock object
8447 * as a whole.
8448 *
8449 * Normally alignment is 0.0 (top of object). Values given should be
8450 * between 0.0 and 1.0 (1.0 bottom of object, 0.5 being vertically centered
8451 * etc.).
8452 *
8453 * @param obj The given textblock object.
8454 * @param align A value between 0.0 and 1.0
8455 * @since 1.1.0
8456 */
8457EAPI void evas_object_textblock_valign_set(Evas_Object *obj, double align);
8458
8459/**
8460 * @brief Gets the vertical alignment of a textblock
8461 *
8462 * @param obj The given textblock object.
8463 * @return The alignment set for the object
8464 * @since 1.1.0
8465 */
8466EAPI double evas_object_textblock_valign_get(const Evas_Object *obj);
8467
8468/**
8469 * @brief Sets the BiDi delimiters used in the textblock.
8470 *
8471 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
8472 * is useful for example in recipients fields of e-mail clients where bidi
8473 * oddities can occur when mixing rtl and ltr.
8474 *
8475 * @param obj The given textblock object.
8476 * @param delim A null terminated string of delimiters, e.g ",|".
8477 * @since 1.1.0
8478 */
8479EAPI void evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim);
8480
8481/**
8482 * @brief Gets the BiDi delimiters used in the textblock.
8483 *
8484 * BiDi delimiters are use for in-paragraph separation of bidi segments. This
8485 * is useful for example in recipients fields of e-mail clients where bidi
8486 * oddities can occur when mixing rtl and ltr.
8487 *
8488 * @param obj The given textblock object.
8489 * @return A null terminated string of delimiters, e.g ",|". If empty, returns NULL.
8490 * @since 1.1.0
8491 */
8492EAPI const char *evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj);
8493
8494/**
8495 * @brief Sets newline mode. When true, newline character will behave
8496 * as a paragraph separator.
8497 *
8498 * @param obj The given textblock object.
8499 * @param mode EINA_TRUE for legacy mode, EINA_FALSE otherwise.
8500 * @since 1.1.0
8501 */
8502EAPI void evas_object_textblock_legacy_newline_set(Evas_Object *obj, Eina_Bool mode) EINA_ARG_NONNULL(1);
8503
8504/**
8505 * @brief Gets newline mode. When true, newline character behaves
8506 * as a paragraph separator.
8507 *
8508 * @param obj The given textblock object.
8509 * @return EINA_TRUE if in legacy mode, EINA_FALSE otherwise.
8510 * @since 1.1.0
8511 */
8512EAPI Eina_Bool evas_object_textblock_legacy_newline_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8513
8514
8515/**
8516 * Sets the tetxblock's text to the markup text.
8517 *
8518 * @note assumes text does not include the unicode object replacement char (0xFFFC)
8519 *
8520 * @param obj the textblock object.
8521 * @param text the markup text to use.
8522 * @return Return no value.
8523 */
8524EAPI void evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text) EINA_ARG_NONNULL(1);
8525
8526/**
8527 * Prepends markup to the cursor cur.
8528 *
8529 * @note assumes text does not include the unicode object replacement char (0xFFFC)
8530 *
8531 * @param cur the cursor to prepend to.
8532 * @param text the markup text to prepend.
8533 * @return Return no value.
8534 */
8535EAPI void evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
8536
8537/**
8538 * Return the markup of the object.
8539 *
8540 * @param obj the Evas object.
8541 * @return the markup text of the object.
8542 */
8543EAPI const char *evas_object_textblock_text_markup_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
8544
8545
8546/**
8547 * Return the object's main cursor.
8548 *
8549 * @param obj the object.
8550 * @return the obj's main cursor.
8551 */
8552EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8553
8554/**
8555 * Create a new cursor, associate it to the obj and init it to point
8556 * to the start of the textblock. Association to the object means the cursor
8557 * will be updated when the object will change.
8558 *
8559 * @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).
8560 *
8561 * @param obj the object to associate to.
8562 * @return the new cursor.
8563 */
8564EAPI Evas_Textblock_Cursor *evas_object_textblock_cursor_new(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8565
8566
8567/**
8568 * Free the cursor and unassociate it from the object.
8569 * @note do not use it to free unassociated cursors.
8570 *
8571 * @param cur the cursor to free.
8572 * @return Returns no value.
8573 */
8574EAPI void evas_textblock_cursor_free(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8575
8576
8577/**
8578 * Sets the cursor to the start of the first text node.
8579 *
8580 * @param cur the cursor to update.
8581 * @return Returns no value.
8582 */
8583EAPI void evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8584
8585/**
8586 * sets the cursor to the end of the last text node.
8587 *
8588 * @param cur the cursor to set.
8589 * @return Returns no value.
8590 */
8591EAPI void evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8592
8593/**
8594 * Advances to the start of the next text node
8595 *
8596 * @param cur the cursor to update
8597 * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
8598 */
8599EAPI Eina_Bool evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8600
8601/**
8602 * Advances to the end of the previous text node
8603 *
8604 * @param cur the cursor to update
8605 * @return #EINA_TRUE if it managed to advance a paragraph, #EINA_FALSE otherwise.
8606 */
8607EAPI Eina_Bool evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8608
8609/**
8610 * Returns the
8611 *
8612 * @param obj The evas, must not be NULL.
8613 * @param anchor the anchor name to get
8614 * @return Returns the list format node corresponding to the anchor, may be null if there are none.
8615 */
8616EAPI const Eina_List *evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor) EINA_ARG_NONNULL(1, 2);
8617
8618/**
8619 * Returns the first format node.
8620 *
8621 * @param obj The evas, must not be NULL.
8622 * @return Returns the first format node, may be null if there are none.
8623 */
8624EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_first_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
8625
8626/**
8627 * Returns the last format node.
8628 *
8629 * @param obj The evas textblock, must not be NULL.
8630 * @return Returns the first format node, may be null if there are none.
8631 */
8632EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_last_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
8633
8634/**
8635 * Returns the next format node (after n)
8636 *
8637 * @param n the current format node - not null.
8638 * @return Returns the next format node, may be null.
8639 */
8640EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
8641
8642/**
8643 * Returns the prev format node (after n)
8644 *
8645 * @param n the current format node - not null.
8646 * @return Returns the prev format node, may be null.
8647 */
8648EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1);
8649
8650/**
8651 * Remove a format node and it's match. i.e, removes a <tag> </tag> pair.
8652 * Assumes the node is the first part of <tag> i.e, this won't work if
8653 * n is a closing tag.
8654 *
8655 * @param obj the Evas object of the textblock - not null.
8656 * @param n the current format node - not null.
8657 */
8658EAPI void evas_textblock_node_format_remove_pair(Evas_Object *obj, Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
8659
8660/**
8661 * Sets the cursor to point to the place where format points to.
8662 *
8663 * @param cur the cursor to update.
8664 * @param n the format node to update according.
8665 * @deprecated duplicate of evas_textblock_cursor_at_format_set
8666 */
8667EAPI void evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n) EINA_ARG_NONNULL(1, 2);
8668
8669/**
8670 * Return the format node at the position pointed by cur.
8671 *
8672 * @param cur the position to look at.
8673 * @return the format node if found, NULL otherwise.
8674 * @see evas_textblock_cursor_format_is_visible_get()
8675 */
8676EAPI const Evas_Object_Textblock_Node_Format *evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8677
8678/**
8679 * Get the text format representation of the format node.
8680 *
8681 * @param fmt the format node.
8682 * @return the textual format of the format node.
8683 */
8684EAPI const char *evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fnode) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8685
8686/**
8687 * Set the cursor to point to the position of fmt.
8688 *
8689 * @param cur the cursor to update
8690 * @param fmt the format to update according to.
8691 */
8692EAPI void evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt) EINA_ARG_NONNULL(1, 2);
8693
8694/**
8695 * Check if the current cursor position is a visible format. This way is more
8696 * efficient than evas_textblock_cursor_format_get() to check for the existence
8697 * of a visible format.
8698 *
8699 * @param cur the cursor to look at.
8700 * @return #EINA_TRUE if the cursor points to a visible format, #EINA_FALSE otherwise.
8701 * @see evas_textblock_cursor_format_get()
8702 */
8703EAPI Eina_Bool evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8704
8705/**
8706 * Advances to the next format node
8707 *
8708 * @param cur the cursor to be updated.
8709 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8710 */
8711EAPI Eina_Bool evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8712
8713/**
8714 * Advances to the previous format node.
8715 *
8716 * @param cur the cursor to update.
8717 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8718 */
8719EAPI Eina_Bool evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8720
8721/**
8722 * Returns true if the cursor points to a format.
8723 *
8724 * @param cur the cursor to check.
8725 * @return Returns #EINA_TRUE if a cursor points to a format #EINA_FALSE otherwise.
8726 */
8727EAPI Eina_Bool evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8728
8729/**
8730 * Advances 1 char forward.
8731 *
8732 * @param cur the cursor to advance.
8733 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8734 */
8735EAPI Eina_Bool evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8736
8737/**
8738 * Advances 1 char backward.
8739 *
8740 * @param cur the cursor to advance.
8741 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8742 */
8743EAPI Eina_Bool evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8744
8745/**
8746 * Moves the cursor to the start of the word under the cursor.
8747 *
8748 * @param cur the cursor to move.
8749 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8750 * @since 1.2.0
8751 */
8752EAPI Eina_Bool evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8753
8754/**
8755 * Moves the cursor to the end of the word under the cursor.
8756 *
8757 * @param cur the cursor to move.
8758 * @return #EINA_TRUE on success #EINA_FALSE otherwise.
8759 * @since 1.2.0
8760 */
8761EAPI Eina_Bool evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8762
8763/**
8764 * Go to the first char in the node the cursor is pointing on.
8765 *
8766 * @param cur the cursor to update.
8767 * @return Returns no value.
8768 */
8769EAPI void evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8770
8771/**
8772 * Go to the last char in a text node.
8773 *
8774 * @param cur the cursor to update.
8775 * @return Returns no value.
8776 */
8777EAPI void evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8778
8779/**
8780 * Go to the start of the current line
8781 *
8782 * @param cur the cursor to update.
8783 * @return Returns no value.
8784 */
8785EAPI void evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8786
8787/**
8788 * Go to the end of the current line.
8789 *
8790 * @param cur the cursor to update.
8791 * @return Returns no value.
8792 */
8793EAPI void evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8794
8795/**
8796 * Return the current cursor pos.
8797 *
8798 * @param cur the cursor to take the position from.
8799 * @return the position or -1 on error
8800 */
8801EAPI int evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8802
8803/**
8804 * Set the cursor pos.
8805 *
8806 * @param cur the cursor to be set.
8807 * @param pos the pos to set.
8808 */
8809EAPI void evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int pos) EINA_ARG_NONNULL(1);
8810
8811/**
8812 * Go to the start of the line passed
8813 *
8814 * @param cur cursor to update.
8815 * @param line numer to set.
8816 * @return #EINA_TRUE on success, #EINA_FALSE on error.
8817 */
8818EAPI Eina_Bool evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line) EINA_ARG_NONNULL(1);
8819
8820/**
8821 * Compare two cursors.
8822 *
8823 * @param cur1 the first cursor.
8824 * @param cur2 the second cursor.
8825 * @return -1 if cur1 < cur2, 0 if cur1 == cur2 and 1 otherwise.
8826 */
8827EAPI int evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
8828
8829/**
8830 * Make cur_dest point to the same place as cur. Does not work if they don't
8831 * point to the same object.
8832 *
8833 * @param cur the source cursor.
8834 * @param cur_dest destination cursor.
8835 * @return Returns no value.
8836 */
8837EAPI void evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest) EINA_ARG_NONNULL(1, 2);
8838
8839
8840/**
8841 * Adds text to the current cursor position and set the cursor to *before*
8842 * the start of the text just added.
8843 *
8844 * @param cur the cursor to where to add text at.
8845 * @param _text the text to add.
8846 * @return Returns the len of the text added.
8847 * @see evas_textblock_cursor_text_prepend()
8848 */
8849EAPI int evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
8850
8851/**
8852 * Adds text to the current cursor position and set the cursor to *after*
8853 * the start of the text just added.
8854 *
8855 * @param cur the cursor to where to add text at.
8856 * @param _text the text to add.
8857 * @return Returns the len of the text added.
8858 * @see evas_textblock_cursor_text_append()
8859 */
8860EAPI int evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *text) EINA_ARG_NONNULL(1, 2);
8861
8862
8863/**
8864 * Adds format to the current cursor position. If the format being added is a
8865 * visible format, add it *before* the cursor position, otherwise, add it after.
8866 * This behavior is because visible formats are like characters and invisible
8867 * should be stacked in a way that the last one is added last.
8868 *
8869 * This function works with native formats, that means that style defined
8870 * tags like <br> won't work here. For those kind of things use markup prepend.
8871 *
8872 * @param cur the cursor to where to add format at.
8873 * @param format the format to add.
8874 * @return Returns true if a visible format was added, false otherwise.
8875 * @see evas_textblock_cursor_format_prepend()
8876 */
8877
8878/**
8879 * Check if the current cursor position points to the terminating null of the
8880 * last paragraph. (shouldn't be allowed to point to the terminating null of
8881 * any previous paragraph anyway.
8882 *
8883 * @param cur the cursor to look at.
8884 * @return #EINA_TRUE if the cursor points to the terminating null, #EINA_FALSE otherwise.
8885 */
8886EAPI Eina_Bool evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
8887
8888/**
8889 * Adds format to the current cursor position. If the format being added is a
8890 * visible format, add it *before* the cursor position, otherwise, add it after.
8891 * This behavior is because visible formats are like characters and invisible
8892 * should be stacked in a way that the last one is added last.
8893 * If the format is visible the cursor is advanced after it.
8894 *
8895 * This function works with native formats, that means that style defined
8896 * tags like <br> won't work here. For those kind of things use markup prepend.
8897 *
8898 * @param cur the cursor to where to add format at.
8899 * @param format the format to add.
8900 * @return Returns true if a visible format was added, false otherwise.
8901 * @see evas_textblock_cursor_format_prepend()
8902 */
8903EAPI Eina_Bool evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format) EINA_ARG_NONNULL(1, 2);
8904
8905/**
8906 * Delete the character at the location of the cursor. If there's a format
8907 * pointing to this position, delete it as well.
8908 *
8909 * @param cur the cursor pointing to the current location.
8910 * @return Returns no value.
8911 */
8912EAPI void evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur) EINA_ARG_NONNULL(1);
8913
8914/**
8915 * Delete the range between cur1 and cur2.
8916 *
8917 * @param cur1 one side of the range.
8918 * @param cur2 the second side of the range
8919 * @return Returns no value.
8920 */
8921EAPI void evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2) EINA_ARG_NONNULL(1, 2);
8922
8923
8924/**
8925 * Return the text of the paragraph cur points to - returns the text in markup..
8926 *
8927 * @param cur the cursor pointing to the paragraph.
8928 * @return the text on success, NULL otherwise.
8929 */
8930EAPI const char *evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8931
8932/**
8933 * Return the length of the paragraph, cheaper the eina_unicode_strlen()
8934 *
8935 * @param cur the position of the paragraph.
8936 * @return the length of the paragraph on success, -1 otehrwise.
8937 */
8938EAPI int evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
8939
8940/**
8941 * Return the currently visible range.
8942 *
8943 * @param start the start of the range.
8944 * @param end the end of the range.
8945 * @return EINA_TRUE on success. EINA_FALSE otherwise.
8946 * @since 1.1.0
8947 */
8948EAPI Eina_Bool evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end) EINA_ARG_NONNULL(1, 2);
8949
8950/**
8951 * Return the format nodes in the range between cur1 and cur2.
8952 *
8953 * @param cur1 one side of the range.
8954 * @param cur2 the other side of the range
8955 * @return the foramt nodes in the range. You have to free it.
8956 * @since 1.1.0
8957 */
8958EAPI 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);
8959
8960/**
8961 * Return the text in the range between cur1 and cur2
8962 *
8963 * @param cur1 one side of the range.
8964 * @param cur2 the other side of the range
8965 * @param format The form on which to return the text. Markup - in textblock markup. Plain - UTF8.
8966 * @return the text in the range
8967 * @see elm_entry_markup_to_utf8()
8968 */
8969EAPI 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);
8970
8971/**
8972 * Return the content of the cursor.
8973 *
8974 * Free the returned string pointer when done (if it is not NULL).
8975 *
8976 * @param cur the cursor
8977 * @return the text in the range, terminated by a nul byte (may be utf8).
8978 */
8979EAPI char *evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
8980
8981
8982/**
8983 * Returns the geometry of the cursor. Depends on the type of cursor requested.
8984 * This should be used instead of char_geometry_get because there are weird
8985 * special cases with BiDi text.
8986 * in '_' cursor mode (i.e a line below the char) it's the same as char_geometry
8987 * get, except for the case of the last char of a line which depends on the
8988 * paragraph direction.
8989 *
8990 * in '|' cursor mode (i.e a line between two chars) it is very variable.
8991 * For example consider the following visual string:
8992 * "abcCBA" (ABC are rtl chars), a cursor pointing on A should actually draw
8993 * a '|' between the c and the C.
8994 *
8995 * @param cur the cursor.
8996 * @param cx the x of the cursor
8997 * @param cy the y of the cursor
8998 * @param cw the width of the cursor
8999 * @param ch the height of the cursor
9000 * @param dir the direction of the cursor, can be NULL.
9001 * @param ctype the type of the cursor.
9002 * @return line number of the char on success, -1 on error.
9003 */
9004EAPI 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);
9005
9006/**
9007 * Returns the geometry of the char at cur.
9008 *
9009 * @param cur the position of the char.
9010 * @param cx the x of the char.
9011 * @param cy the y of the char.
9012 * @param cw the w of the char.
9013 * @param ch the h of the char.
9014 * @return line number of the char on success, -1 on error.
9015 */
9016EAPI 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);
9017
9018/**
9019 * Returns the geometry of the pen at cur.
9020 *
9021 * @param cur the position of the char.
9022 * @param cpen_x the pen_x of the char.
9023 * @param cy the y of the char.
9024 * @param cadv the adv of the char.
9025 * @param ch the h of the char.
9026 * @return line number of the char on success, -1 on error.
9027 */
9028EAPI 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);
9029
9030/**
9031 * Returns the geometry of the line at cur.
9032 *
9033 * @param cur the position of the line.
9034 * @param cx the x of the line.
9035 * @param cy the y of the line.
9036 * @param cw the width of the line.
9037 * @param ch the height of the line.
9038 * @return line number of the line on success, -1 on error.
9039 */
9040EAPI 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);
9041
9042/**
9043 * Set the position of the cursor according to the X and Y coordinates.
9044 *
9045 * @param cur the cursor to set.
9046 * @param x coord to set by.
9047 * @param y coord to set by.
9048 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
9049 */
9050EAPI Eina_Bool evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
9051
9052/**
9053 * Set the cursor position according to the y coord.
9054 *
9055 * @param cur the cur to be set.
9056 * @param y the coord to set by.
9057 * @return the line number found, -1 on error.
9058 */
9059EAPI int evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y) EINA_ARG_NONNULL(1);
9060
9061/**
9062 * Get the geometry of a range.
9063 *
9064 * @param cur1 one side of the range.
9065 * @param cur2 other side of the range.
9066 * @return a list of Rectangles representing the geometry of the range.
9067 */
9068EAPI 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);
9069 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);
9070
9071
9072/**
9073 * Checks if the cursor points to the end of the line.
9074 *
9075 * @param cur the cursor to check.
9076 * @return #EINA_TRUE if true, #EINA_FALSE otherwise.
9077 */
9078EAPI Eina_Bool evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
9079
9080
9081/**
9082 * Get the geometry of a line number.
9083 *
9084 * @param obj the object.
9085 * @param line the line number.
9086 * @param cx x coord of the line.
9087 * @param cy y coord of the line.
9088 * @param cw w coord of the line.
9089 * @param ch h coord of the line.
9090 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
9091 */
9092EAPI 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);
9093
9094/**
9095 * Clear the textblock object.
9096 * @note Does *NOT* free the Evas object itself.
9097 *
9098 * @param obj the object to clear.
9099 * @return nothing.
9100 */
9101EAPI void evas_object_textblock_clear(Evas_Object *obj) EINA_ARG_NONNULL(1);
9102
9103/**
9104 * Get the formatted width and height. This calculates the actual size after restricting
9105 * the textblock to the current size of the object.
9106 * The main difference between this and @ref evas_object_textblock_size_native_get
9107 * is that the "native" function does not wrapping into account
9108 * it just calculates the real width of the object if it was placed on an
9109 * infinite canvas, while this function gives the size after wrapping
9110 * according to the size restrictions of the object.
9111 *
9112 * For example for a textblock containing the text: "You shall not pass!"
9113 * with no margins or padding and assuming a monospace font and a size of
9114 * 7x10 char widths (for simplicity) has a native size of 19x1
9115 * and a formatted size of 5x4.
9116 *
9117 *
9118 * @param obj the Evas object.
9119 * @param w[out] the width of the object.
9120 * @param h[out] the height of the object
9121 * @return Returns no value.
9122 * @see evas_object_textblock_size_native_get
9123 */
9124EAPI void evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
9125
9126/**
9127 * Get the native width and height. This calculates the actual size without taking account
9128 * the current size of the object.
9129 * The main difference between this and @ref evas_object_textblock_size_formatted_get
9130 * is that the "native" function does not take wrapping into account
9131 * it just calculates the real width of the object if it was placed on an
9132 * infinite canvas, while the "formatted" function gives the size after
9133 * wrapping text according to the size restrictions of the object.
9134 *
9135 * For example for a textblock containing the text: "You shall not pass!"
9136 * with no margins or padding and assuming a monospace font and a size of
9137 * 7x10 char widths (for simplicity) has a native size of 19x1
9138 * and a formatted size of 5x4.
9139 *
9140 * @param obj the Evas object of the textblock
9141 * @param w[out] the width returned
9142 * @param h[out] the height returned
9143 * @return Returns no value.
9144 */
9145EAPI void evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) EINA_ARG_NONNULL(1);
9146 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);
9147/**
9148 * @}
9149 */
9150
9151/**
9152 * @defgroup Evas_Line_Group Line Object Functions
9153 *
9154 * Functions used to deal with evas line objects.
9155 *
9156 * @ingroup Evas_Object_Specific
9157 *
9158 * @{
9159 */
9160
9161/**
9162 * Adds a new evas line object to the given evas.
9163 * @param e The given evas.
9164 * @return The new evas line object.
9165 */
9166EAPI Evas_Object *evas_object_line_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
9167
9168/**
9169 * Sets the coordinates of the end points of the given evas line object.
9170 * @param obj The given evas line object.
9171 * @param x1 The X coordinate of the first point.
9172 * @param y1 The Y coordinate of the first point.
9173 * @param x2 The X coordinate of the second point.
9174 * @param y2 The Y coordinate of the second point.
9175 */
9176EAPI void evas_object_line_xy_set (Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
9177
9178/**
9179 * Retrieves the coordinates of the end points of the given evas line object.
9180 * @param obj The given line object.
9181 * @param x1 Pointer to an integer in which to store the X coordinate of the
9182 * first end point.
9183 * @param y1 Pointer to an integer in which to store the Y coordinate of the
9184 * first end point.
9185 * @param x2 Pointer to an integer in which to store the X coordinate of the
9186 * second end point.
9187 * @param y2 Pointer to an integer in which to store the Y coordinate of the
9188 * second end point.
9189 */
9190EAPI void evas_object_line_xy_get (const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2);
9191/**
9192 * @}
9193 */
9194
9195/**
9196 * @defgroup Evas_Object_Polygon Polygon Object Functions
9197 *
9198 * Functions that operate on evas polygon objects.
9199 *
9200 * Hint: as evas does not provide ellipse, smooth paths or circle, one
9201 * can calculate points and convert these to a polygon.
9202 *
9203 * @ingroup Evas_Object_Specific
9204 *
9205 * @{
9206 */
9207
9208/**
9209 * Adds a new evas polygon object to the given evas.
9210 * @param e The given evas.
9211 * @return A new evas polygon object.
9212 */
9213EAPI Evas_Object *evas_object_polygon_add (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
9214
9215/**
9216 * Adds the given point to the given evas polygon object.
9217 * @param obj The given evas polygon object.
9218 * @param x The X coordinate of the given point.
9219 * @param y The Y coordinate of the given point.
9220 * @ingroup Evas_Polygon_Group
9221 */
9222EAPI void evas_object_polygon_point_add (Evas_Object *obj, Evas_Coord x, Evas_Coord y) EINA_ARG_NONNULL(1);
9223
9224/**
9225 * Removes all of the points from the given evas polygon object.
9226 * @param obj The given polygon object.
9227 */
9228EAPI void evas_object_polygon_points_clear (Evas_Object *obj) EINA_ARG_NONNULL(1);
9229/**
9230 * @}
9231 */
9232
9233/* @since 1.2.0 */
9234EAPI void evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame);
9235
9236/* @since 1.2.0 */
9237EAPI Eina_Bool evas_object_is_frame_object_get(Evas_Object *obj);
9238
9239/**
9240 * @defgroup Evas_Smart_Group Smart Functions
9241 *
9242 * Functions that deal with #Evas_Smart structs, creating definition
9243 * (classes) of objects that will have customized behavior for methods
9244 * like evas_object_move(), evas_object_resize(),
9245 * evas_object_clip_set() and others.
9246 *
9247 * These objects will accept the generic methods defined in @ref
9248 * Evas_Object_Group and the extensions defined in @ref
9249 * Evas_Smart_Object_Group. There are a couple of existent smart
9250 * objects in Evas itself (see @ref Evas_Object_Box, @ref
9251 * Evas_Object_Table and @ref Evas_Smart_Object_Clipped).
9252 *
9253 * See also some @ref Example_Evas_Smart_Objects "examples" of this
9254 * group of functions.
9255 */
9256
9257/**
9258 * @addtogroup Evas_Smart_Group
9259 * @{
9260 */
9261
9262/**
9263 * @def EVAS_SMART_CLASS_VERSION
9264 *
9265 * The version you have to put into the version field in the
9266 * #Evas_Smart_Class struct. Used to safeguard from binaries with old
9267 * smart object intefaces running with newer ones.
9268 *
9269 * @ingroup Evas_Smart_Group
9270 */
9271#define EVAS_SMART_CLASS_VERSION 4
9272/**
9273 * @struct _Evas_Smart_Class
9274 *
9275 * A smart object's @b base class definition
9276 *
9277 * @ingroup Evas_Smart_Group
9278 */
9279struct _Evas_Smart_Class
9280{
9281 const char *name; /**< the name string of the class */
9282 int version;
9283 void (*add) (Evas_Object *o); /**< code to be run when adding object to a canvas */
9284 void (*del) (Evas_Object *o); /**< code to be run when removing object to a canvas */
9285 void (*move) (Evas_Object *o, Evas_Coord x, Evas_Coord y); /**< code to be run when moving object on a canvas */
9286 void (*resize) (Evas_Object *o, Evas_Coord w, Evas_Coord h); /**< code to be run when resizing object on a canvas */
9287 void (*show) (Evas_Object *o); /**< code to be run when showing object on a canvas */
9288 void (*hide) (Evas_Object *o); /**< code to be run when hiding object on a canvas */
9289 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 */
9290 void (*clip_set) (Evas_Object *o, Evas_Object *clip); /**< code to be run when setting clipper of object on a canvas */
9291 void (*clip_unset) (Evas_Object *o); /**< code to be run when unsetting clipper of object on a canvas */
9292 void (*calculate) (Evas_Object *o); /**< code to be run when object has rendering updates on a canvas */
9293 void (*member_add) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is added to object */
9294 void (*member_del) (Evas_Object *o, Evas_Object *child); /**< code to be run when child member is removed from object */
9295
9296 const Evas_Smart_Class *parent; /**< this class inherits from this parent */
9297 const Evas_Smart_Cb_Description *callbacks; /**< callbacks at this level, @c NULL terminated */
9298 void *interfaces; /**< to be used in a future near you */
9299 const void *data;
9300};
9301
9302/**
9303 * @struct _Evas_Smart_Cb_Description
9304 *
9305 * Describes a callback issued by a smart object
9306 * (evas_object_smart_callback_call()), as defined in its smart object
9307 * class. This is particularly useful to explain to end users and
9308 * their code (i.e., introspection) what the parameter @c event_info
9309 * will point to.
9310 *
9311 * @ingroup Evas_Smart_Group
9312 */
9313struct _Evas_Smart_Cb_Description
9314{
9315 const char *name; /**< callback name ("changed", for example) */
9316
9317 /**
9318 * @brief Hint on the type of @c event_info parameter's contents on
9319 * a #Evas_Smart_Cb callback.
9320 *
9321 * The type string uses the pattern similar to
9322 * http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-signatures,
9323 * but extended to optionally include variable names within
9324 * brackets preceding types. Example:
9325 *
9326 * @li Structure with two integers:
9327 * @c "(ii)"
9328 *
9329 * @li Structure called 'x' with two integers named 'a' and 'b':
9330 * @c "[x]([a]i[b]i)"
9331 *
9332 * @li Array of integers:
9333 * @c "ai"
9334 *
9335 * @li Array called 'x' of struct with two integers:
9336 * @c "[x]a(ii)"
9337 *
9338 * @note This type string is used as a hint and is @b not validated
9339 * or enforced in any way. Implementors should make the best
9340 * use of it to help bindings, documentation and other users
9341 * of introspection features.
9342 */
9343 const char *type;
9344};
9345
9346/**
9347 * @def EVAS_SMART_CLASS_INIT_NULL
9348 * Initializer to zero a whole Evas_Smart_Class structure.
9349 *
9350 * @see EVAS_SMART_CLASS_INIT_VERSION
9351 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9352 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9353 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9354 * @ingroup Evas_Smart_Group
9355 */
9356#define EVAS_SMART_CLASS_INIT_NULL {NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
9357
9358/**
9359 * @def EVAS_SMART_CLASS_INIT_VERSION
9360 * Initializer to zero a whole Evas_Smart_Class structure and set version.
9361 *
9362 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9363 * latest EVAS_SMART_CLASS_VERSION.
9364 *
9365 * @see EVAS_SMART_CLASS_INIT_NULL
9366 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9367 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9368 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9369 * @ingroup Evas_Smart_Group
9370 */
9371#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}
9372
9373/**
9374 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION
9375 * Initializer to zero a whole Evas_Smart_Class structure and set name
9376 * and version.
9377 *
9378 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9379 * latest EVAS_SMART_CLASS_VERSION and name to the specified value.
9380 *
9381 * It will keep a reference to name field as a "const char *", that is,
9382 * name must be available while the structure is used (hint: static or global!)
9383 * and will not be modified.
9384 *
9385 * @see EVAS_SMART_CLASS_INIT_NULL
9386 * @see EVAS_SMART_CLASS_INIT_VERSION
9387 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9388 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9389 * @ingroup Evas_Smart_Group
9390 */
9391#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}
9392
9393/**
9394 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9395 * Initializer to zero a whole Evas_Smart_Class structure and set name,
9396 * version and parent class.
9397 *
9398 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9399 * latest EVAS_SMART_CLASS_VERSION, name to the specified value and
9400 * parent class.
9401 *
9402 * It will keep a reference to name field as a "const char *", that is,
9403 * name must be available while the structure is used (hint: static or global!)
9404 * and will not be modified. Similarly, parent reference will be kept.
9405 *
9406 * @see EVAS_SMART_CLASS_INIT_NULL
9407 * @see EVAS_SMART_CLASS_INIT_VERSION
9408 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9409 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9410 * @ingroup Evas_Smart_Group
9411 */
9412#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}
9413
9414/**
9415 * @def EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT_CALLBACKS
9416 * Initializer to zero a whole Evas_Smart_Class structure and set name,
9417 * version, parent class and callbacks definition.
9418 *
9419 * Similar to EVAS_SMART_CLASS_INIT_NULL, but will set version field to
9420 * latest EVAS_SMART_CLASS_VERSION, name to the specified value, parent
9421 * class and callbacks at this level.
9422 *
9423 * It will keep a reference to name field as a "const char *", that is,
9424 * name must be available while the structure is used (hint: static or global!)
9425 * and will not be modified. Similarly, parent and callbacks reference
9426 * will be kept.
9427 *
9428 * @see EVAS_SMART_CLASS_INIT_NULL
9429 * @see EVAS_SMART_CLASS_INIT_VERSION
9430 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
9431 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION_PARENT
9432 * @ingroup Evas_Smart_Group
9433 */
9434#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}
9435
9436/**
9437 * @def EVAS_SMART_SUBCLASS_NEW
9438 *
9439 * Convenience macro to subclass a given Evas smart class.
9440 *
9441 * @param smart_name The name used for the smart class. e.g:
9442 * @c "Evas_Object_Box".
9443 * @param prefix Prefix used for all variables and functions defined
9444 * and referenced by this macro.
9445 * @param api_type Type of the structure used as API for the smart
9446 * class. Either #Evas_Smart_Class or something derived from it.
9447 * @param parent_type Type of the parent class API.
9448 * @param parent_func Function that gets the parent class. e.g:
9449 * evas_object_box_smart_class_get().
9450 * @param cb_desc Array of callback descriptions for this smart class.
9451 *
9452 * This macro saves some typing when writing a smart class derived
9453 * from another one. In order to work, the user @b must provide some
9454 * functions adhering to the following guidelines:
9455 * - @<prefix@>_smart_set_user(): the @b internal @c _smart_set
9456 * function (defined by this macro) will call this one, provided by
9457 * the user, after inheriting everything from the parent, which
9458 * should <b>take care of setting the right member functions for
9459 * the class</b>, both overrides and extensions, if any.
9460 * - If this new class should be subclassable as well, a @b public @c
9461 * _smart_set() function is desirable to fill in the class used as
9462 * parent by the children. It's up to the user to provide this
9463 * interface, which will most likely call @<prefix@>_smart_set() to
9464 * get the job done.
9465 *
9466 * After the macro's usage, the following will be defined for use:
9467 * - @<prefix@>_parent_sc: A pointer to the @b parent smart
9468 * class. When calling parent functions from overloaded ones, use
9469 * this global variable.
9470 * - @<prefix@>_smart_class_new(): this function returns the
9471 * #Evas_Smart needed to create smart objects with this class,
9472 * which should be passed to evas_object_smart_add().
9473 *
9474 * @warning @p smart_name has to be a pointer to a globally available
9475 * string! The smart class created here will just have a pointer set
9476 * to that, and all object instances will depend on it for smart class
9477 * name lookup.
9478 *
9479 * @ingroup Evas_Smart_Group
9480 */
9481#define EVAS_SMART_SUBCLASS_NEW(smart_name, prefix, api_type, parent_type, parent_func, cb_desc) \
9482 static const parent_type * prefix##_parent_sc = NULL; \
9483 static void prefix##_smart_set_user(api_type *api); \
9484 static void prefix##_smart_set(api_type *api) \
9485 { \
9486 Evas_Smart_Class *sc; \
9487 if (!(sc = (Evas_Smart_Class *)api)) \
9488 return; \
9489 if (!prefix##_parent_sc) \
9490 prefix##_parent_sc = parent_func(); \
9491 evas_smart_class_inherit(sc, prefix##_parent_sc); \
9492 prefix##_smart_set_user(api); \
9493 } \
9494 static Evas_Smart * prefix##_smart_class_new(void) \
9495 { \
9496 static Evas_Smart *smart = NULL; \
9497 static api_type api; \
9498 if (!smart) \
9499 { \
9500 Evas_Smart_Class *sc = (Evas_Smart_Class *)&api; \
9501 memset(&api, 0, sizeof(api_type)); \
9502 sc->version = EVAS_SMART_CLASS_VERSION; \
9503 sc->name = smart_name; \
9504 sc->callbacks = cb_desc; \
9505 prefix##_smart_set(&api); \
9506 smart = evas_smart_class_new(sc); \
9507 } \
9508 return smart; \
9509 }
9510
9511/**
9512 * @def EVAS_SMART_DATA_ALLOC
9513 *
9514 * Convenience macro to allocate smart data only if needed.
9515 *
9516 * When writing a subclassable smart object, the @c .add() function
9517 * will need to check if the smart private data was already allocated
9518 * by some child object or not. This macro makes it easier to do it.
9519 *
9520 * @note This is an idiom used when one calls the parent's @c. add()
9521 * after the specialized code. Naturally, the parent's base smart data
9522 * has to be contemplated as the specialized one's first member, for
9523 * things to work.
9524 *
9525 * @param o Evas object passed to the @c .add() function
9526 * @param priv_type The type of the data to allocate
9527 *
9528 * @ingroup Evas_Smart_Group
9529 */
9530#define EVAS_SMART_DATA_ALLOC(o, priv_type) \
9531 priv_type *priv; \
9532 priv = evas_object_smart_data_get(o); \
9533 if (!priv) { \
9534 priv = (priv_type *)calloc(1, sizeof(priv_type)); \
9535 if (!priv) return; \
9536 evas_object_smart_data_set(o, priv); \
9537 }
9538
9539
9540/**
9541 * Free an #Evas_Smart struct
9542 *
9543 * @param s the #Evas_Smart struct to free
9544 *
9545 * @warning If this smart handle was created using
9546 * evas_smart_class_new(), the associated #Evas_Smart_Class will not
9547 * be freed.
9548 *
9549 * @note If you're using the #EVAS_SMART_SUBCLASS_NEW schema to create your
9550 * smart object, note that an #Evas_Smart handle will be shared amongst all
9551 * instances of the given smart class, through a static variable.
9552 * Evas will internally count references on #Evas_Smart handles and free them
9553 * when they are not referenced anymore. Thus, this function is of no use
9554 * for Evas users, most probably.
9555 */
9556EAPI void evas_smart_free (Evas_Smart *s) EINA_ARG_NONNULL(1);
9557
9558/**
9559 * Creates a new #Evas_Smart from a given #Evas_Smart_Class struct
9560 *
9561 * @param sc the smart class definition
9562 * @return a new #Evas_Smart pointer
9563 *
9564 * #Evas_Smart handles are necessary to create new @b instances of
9565 * smart objects belonging to the class described by @p sc. That
9566 * handle will contain, besides the smart class interface definition,
9567 * all its smart callbacks infrastructure set, too.
9568 *
9569 * @note If you are willing to subclass a given smart class to
9570 * construct yours, consider using the #EVAS_SMART_SUBCLASS_NEW macro,
9571 * which will make use of this function automatically for you.
9572 */
9573EAPI Evas_Smart *evas_smart_class_new (const Evas_Smart_Class *sc) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
9574
9575/**
9576 * Get the #Evas_Smart_Class handle of an #Evas_Smart struct
9577 *
9578 * @param s a valid #Evas_Smart pointer
9579 * @return the #Evas_Smart_Class in it
9580 */
9581EAPI const Evas_Smart_Class *evas_smart_class_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
9582
9583
9584/**
9585 * @brief Get the data pointer set on an #Evas_Smart struct
9586 *
9587 * @param s a valid #Evas_Smart handle
9588 *
9589 * This data pointer is set as the data field in the #Evas_Smart_Class
9590 * passed in to evas_smart_class_new().
9591 */
9592EAPI void *evas_smart_data_get (const Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
9593
9594/**
9595 * Get the smart callbacks known by this #Evas_Smart handle's smart
9596 * class hierarchy.
9597 *
9598 * @param s A valid #Evas_Smart handle.
9599 * @param[out] count Returns the number of elements in the returned
9600 * array.
9601 * @return The array with callback descriptions known by this smart
9602 * class, with its size returned in @a count parameter. It
9603 * should not be modified in any way. If no callbacks are
9604 * known, @c NULL is returned. The array is sorted by event
9605 * names and elements refer to the original values given to
9606 * evas_smart_class_new()'s #Evas_Smart_Class::callbacks
9607 * (pointer to them).
9608 *
9609 * This is likely different from
9610 * evas_object_smart_callbacks_descriptions_get() as it will contain
9611 * the callbacks of @b all this class hierarchy sorted, while the
9612 * direct smart class member refers only to that specific class and
9613 * should not include parent's.
9614 *
9615 * If no callbacks are known, this function returns @c NULL.
9616 *
9617 * The array elements and thus their contents will be @b references to
9618 * original values given to evas_smart_class_new() as
9619 * Evas_Smart_Class::callbacks.
9620 *
9621 * The array is sorted by Evas_Smart_Cb_Description::name. The last
9622 * array element is a @c NULL pointer and is not accounted for in @a
9623 * count. Loop iterations can check any of these size indicators.
9624 *
9625 * @note objects may provide per-instance callbacks, use
9626 * evas_object_smart_callbacks_descriptions_get() to get those
9627 * as well.
9628 * @see evas_object_smart_callbacks_descriptions_get()
9629 */
9630EAPI const Evas_Smart_Cb_Description **evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count) EINA_ARG_NONNULL(1, 1);
9631
9632
9633/**
9634 * Find a callback description for the callback named @a name.
9635 *
9636 * @param s The #Evas_Smart where to search for class registered smart
9637 * event callbacks.
9638 * @param name Name of the desired callback, which must @b not be @c
9639 * NULL. The search has a special case for @a name being the
9640 * same pointer as registered with #Evas_Smart_Cb_Description.
9641 * One can use it to avoid excessive use of strcmp().
9642 * @return A reference to the description if found, or @c NULL, otherwise
9643 *
9644 * @see evas_smart_callbacks_descriptions_get()
9645 */
9646EAPI const Evas_Smart_Cb_Description *evas_smart_callback_description_find(const Evas_Smart *s, const char *name) EINA_ARG_NONNULL(1, 2);
9647
9648
9649/**
9650 * Sets one class to inherit from the other.
9651 *
9652 * Copy all function pointers, set @c parent to @a parent_sc and copy
9653 * everything after sizeof(Evas_Smart_Class) present in @a parent_sc,
9654 * using @a parent_sc_size as reference.
9655 *
9656 * This is recommended instead of a single memcpy() since it will take
9657 * care to not modify @a sc name, version, callbacks and possible
9658 * other members.
9659 *
9660 * @param sc child class.
9661 * @param parent_sc parent class, will provide attributes.
9662 * @param parent_sc_size size of parent_sc structure, child should be at least
9663 * this size. Everything after @c Evas_Smart_Class size is copied
9664 * using regular memcpy().
9665 */
9666EAPI 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);
9667
9668/**
9669 * Get the number of users of the smart instance
9670 *
9671 * @param s The Evas_Smart to get the usage count of
9672 * @return The number of uses of the smart instance
9673 *
9674 * This function tells you how many more uses of the smart instance are in
9675 * existence. This should be used before freeing/clearing any of the
9676 * Evas_Smart_Class that was used to create the smart instance. The smart
9677 * instance will refer to data in the Evas_Smart_Class used to create it and
9678 * thus you cannot remove the original data until all users of it are gone.
9679 * When the usage count goes to 0, you can evas_smart_free() the smart
9680 * instance @p s and remove from memory any of the Evas_Smart_Class that
9681 * was used to create the smart instance, if you desire. Removing it from
9682 * memory without doing this will cause problems (crashes, undefined
9683 * behavior etc. etc.), so either never remove the original
9684 * Evas_Smart_Class data from memory (have it be a constant structure and
9685 * data), or use this API call and be very careful.
9686 */
9687EAPI int evas_smart_usage_get(const Evas_Smart *s);
9688
9689 /**
9690 * @def evas_smart_class_inherit
9691 * Easy to use version of evas_smart_class_inherit_full().
9692 *
9693 * This version will use sizeof(parent_sc), copying everything.
9694 *
9695 * @param sc child class, will have methods copied from @a parent_sc
9696 * @param parent_sc parent class, will provide contents to be copied.
9697 * @return 1 on success, 0 on failure.
9698 * @ingroup Evas_Smart_Group
9699 */
9700#define evas_smart_class_inherit(sc, parent_sc) evas_smart_class_inherit_full(sc, (Evas_Smart_Class *)parent_sc, sizeof(*parent_sc))
9701
9702/**
9703 * @}
9704 */
9705
9706/**
9707 * @defgroup Evas_Smart_Object_Group Smart Object Functions
9708 *
9709 * Functions dealing with Evas smart objects (instances).
9710 *
9711 * Smart objects are groupings of primitive Evas objects that behave
9712 * as a cohesive group. For instance, a file manager icon may be a
9713 * smart object composed of an image object, a text label and two
9714 * rectangles that appear behind the image and text when the icon is
9715 * selected. As a smart object, the normal Evas object API could be
9716 * used on the icon object.
9717 *
9718 * Besides that, generally smart objects implement a <b>specific
9719 * API</b>, so that users interact with its own custom features. The
9720 * API takes form of explicit exported functions one may call and
9721 * <b>smart callbacks</b>.
9722 *
9723 * @section Evas_Smart_Object_Group_Callbacks Smart events and callbacks
9724 *
9725 * Smart objects can elect events (smart events, from now on) occurring
9726 * inside of them to be reported back to their users via callback
9727 * functions (smart callbacks). This way, you can extend Evas' own
9728 * object events. They are defined by an <b>event string</b>, which
9729 * identifies them uniquely. There's also a function prototype
9730 * definition for the callback functions: #Evas_Smart_Cb.
9731 *
9732 * When defining an #Evas_Smart_Class, smart object implementors are
9733 * strongly encouraged to properly set the Evas_Smart_Class::callbacks
9734 * callbacks description array, so that the users of the smart object
9735 * can have introspection on its events API <b>at run time</b>.
9736 *
9737 * See some @ref Example_Evas_Smart_Objects "examples" of this group
9738 * of functions.
9739 *
9740 * @see @ref Evas_Smart_Group for class definitions.
9741 */
9742
9743/**
9744 * @addtogroup Evas_Smart_Object_Group
9745 * @{
9746 */
9747
9748/**
9749 * Instantiates a new smart object described by @p s.
9750 *
9751 * @param e the canvas on which to add the object
9752 * @param s the #Evas_Smart describing the smart object
9753 * @return a new #Evas_Object handle
9754 *
9755 * This is the function one should use when defining the public
9756 * function @b adding an instance of the new smart object to a given
9757 * canvas. It will take care of setting all of its internals to work
9758 * as they should, if the user set things properly, as seem on the
9759 * #EVAS_SMART_SUBCLASS_NEW, for example.
9760 *
9761 * @ingroup Evas_Smart_Object_Group
9762 */
9763EAPI Evas_Object *evas_object_smart_add (Evas *e, Evas_Smart *s) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2) EINA_MALLOC;
9764
9765/**
9766 * Set an Evas object as a member of a given smart object.
9767 *
9768 * @param obj The member object
9769 * @param smart_obj The smart object
9770 *
9771 * Members will automatically be stacked and layered together with the
9772 * smart object. The various stacking functions will operate on
9773 * members relative to the other members instead of the entire canvas,
9774 * since they now live on an exclusive layer (see
9775 * evas_object_stack_above(), for more details).
9776 *
9777 * Any @p smart_obj object's specific implementation of the @c
9778 * member_add() smart function will take place too, naturally.
9779 *
9780 * @see evas_object_smart_member_del()
9781 * @see evas_object_smart_members_get()
9782 *
9783 * @ingroup Evas_Smart_Object_Group
9784 */
9785EAPI void evas_object_smart_member_add (Evas_Object *obj, Evas_Object *smart_obj) EINA_ARG_NONNULL(1, 2);
9786
9787/**
9788 * Removes a member object from a given smart object.
9789 *
9790 * @param obj the member object
9791 * @ingroup Evas_Smart_Object_Group
9792 *
9793 * This removes a member object from a smart object, if it was added
9794 * to any. The object will still be on the canvas, but no longer
9795 * associated with whichever smart object it was associated with.
9796 *
9797 * @see evas_object_smart_member_add() for more details
9798 * @see evas_object_smart_members_get()
9799 */
9800EAPI void evas_object_smart_member_del (Evas_Object *obj) EINA_ARG_NONNULL(1);
9801
9802/**
9803 * Retrieves the list of the member objects of a given Evas smart
9804 * object
9805 *
9806 * @param obj the smart object to get members from
9807 * @return Returns the list of the member objects of @p obj.
9808 *
9809 * The returned list should be freed with @c eina_list_free() when you
9810 * no longer need it.
9811 *
9812 * @see evas_object_smart_member_add()
9813 * @see evas_object_smart_member_del()
9814*/
9815EAPI Eina_List *evas_object_smart_members_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
9816
9817/**
9818 * Gets the parent smart object of a given Evas object, if it has one.
9819 *
9820 * @param obj the Evas object you want to get the parent smart object
9821 * from
9822 * @return Returns the parent smart object of @a obj or @c NULL, if @a
9823 * obj is not a smart member of any
9824 *
9825 * @ingroup Evas_Smart_Object_Group
9826 */
9827EAPI Evas_Object *evas_object_smart_parent_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
9828
9829/**
9830 * Checks whether a given smart object or any of its smart object
9831 * parents is of a given smart class.
9832 *
9833 * @param obj An Evas smart object to check the type of
9834 * @param type The @b name (type) of the smart class to check for
9835 * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a
9836 * type, @c EINA_FALSE otherwise
9837 *
9838 * If @p obj is not a smart object, this call will fail
9839 * immediately. Otherwise, make sure evas_smart_class_inherit() or its
9840 * sibling functions were used correctly when creating the smart
9841 * object's class, so it has a valid @b parent smart class pointer
9842 * set.
9843 *
9844 * The checks use smart classes names and <b>string
9845 * comparison</b>. There is a version of this same check using
9846 * <b>pointer comparison</b>, since a smart class' name is a single
9847 * string in Evas.
9848 *
9849 * @see evas_object_smart_type_check_ptr()
9850 * @see #EVAS_SMART_SUBCLASS_NEW
9851 *
9852 * @ingroup Evas_Smart_Object_Group
9853 */
9854EAPI Eina_Bool evas_object_smart_type_check (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
9855
9856/**
9857 * Checks whether a given smart object or any of its smart object
9858 * parents is of a given smart class, <b>using pointer comparison</b>.
9859 *
9860 * @param obj An Evas smart object to check the type of
9861 * @param type The type (name string) to check for. Must be the name
9862 * @return @c EINA_TRUE, if @a obj or any of its parents is of type @a
9863 * type, @c EINA_FALSE otherwise
9864 *
9865 * @see evas_object_smart_type_check() for more details
9866 *
9867 * @ingroup Evas_Smart_Object_Group
9868 */
9869EAPI Eina_Bool evas_object_smart_type_check_ptr (const Evas_Object *obj, const char *type) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
9870
9871/**
9872 * Get the #Evas_Smart from which @p obj smart object was created.
9873 *
9874 * @param obj a smart object
9875 * @return the #Evas_Smart handle or @c NULL, on errors
9876 *
9877 * @ingroup Evas_Smart_Object_Group
9878 */
9879EAPI Evas_Smart *evas_object_smart_smart_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
9880
9881/**
9882 * Retrieve user data stored on a given smart object.
9883 *
9884 * @param obj The smart object's handle
9885 * @return A pointer to data stored using
9886 * evas_object_smart_data_set(), or @c NULL, if none has been
9887 * set.
9888 *
9889 * @see evas_object_smart_data_set()
9890 *
9891 * @ingroup Evas_Smart_Object_Group
9892 */
9893EAPI void *evas_object_smart_data_get (const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
9894
9895/**
9896 * Store a pointer to user data for a given smart object.
9897 *
9898 * @param obj The smart object's handle
9899 * @param data A pointer to user data
9900 *
9901 * This data is stored @b independently of the one set by
9902 * evas_object_data_set(), naturally.
9903 *
9904 * @see evas_object_smart_data_get()
9905 *
9906 * @ingroup Evas_Smart_Object_Group
9907 */
9908EAPI void evas_object_smart_data_set (Evas_Object *obj, void *data) EINA_ARG_NONNULL(1);
9909
9910/**
9911 * Add (register) a callback function to the smart event specified by
9912 * @p event on the smart object @p obj.
9913 *
9914 * @param obj a smart object
9915 * @param event the event's name string
9916 * @param func the callback function
9917 * @param data user data to be passed to the callback function
9918 *
9919 * Smart callbacks look very similar to Evas callbacks, but are
9920 * implemented as smart object's custom ones.
9921 *
9922 * This function adds a function callback to an smart object when the
9923 * event named @p event occurs in it. The function is @p func.
9924 *
9925 * In the event of a memory allocation error during addition of the
9926 * callback to the object, evas_alloc_error() should be used to
9927 * determine the nature of the error, if any, and the program should
9928 * sensibly try and recover.
9929 *
9930 * A smart callback function must have the ::Evas_Smart_Cb prototype
9931 * definition. The first parameter (@p data) in this definition will
9932 * have the same value passed to evas_object_smart_callback_add() as
9933 * the @p data parameter, at runtime. The second parameter @p obj is a
9934 * handle to the object on which the event occurred. The third
9935 * parameter, @p event_info, is a pointer to data which is totally
9936 * dependent on the smart object's implementation and semantic for the
9937 * given event.
9938 *
9939 * There is an infrastructure for introspection on smart objects'
9940 * events (see evas_smart_callbacks_descriptions_get()), but no
9941 * internal smart objects on Evas implement them yet.
9942 *
9943 * @see @ref Evas_Smart_Object_Group_Callbacks for more details.
9944 *
9945 * @see evas_object_smart_callback_del()
9946 * @ingroup Evas_Smart_Object_Group
9947 */
9948EAPI 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);
9949
9950/**
9951 * Add (register) a callback function to the smart event specified by
9952 * @p event on the smart object @p obj. Except for the priority field,
9953 * it's exactly the same as @ref evas_object_smart_callback_add
9954 *
9955 * @param obj a smart object
9956 * @param event the event's name string
9957 * @param priority The priority of the callback, lower values called first.
9958 * @param func the callback function
9959 * @param data user data to be passed to the callback function
9960 *
9961 * @see evas_object_smart_callback_add
9962 * @since 1.1.0
9963 * @ingroup Evas_Smart_Object_Group
9964 */
9965EAPI void evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data);
9966
9967/**
9968 * Delete (unregister) a callback function from the smart event
9969 * specified by @p event on the smart object @p obj.
9970 *
9971 * @param obj a smart object
9972 * @param event the event's name string
9973 * @param func the callback function
9974 * @return the data pointer
9975 *
9976 * This function removes <b>the first</b> added smart callback on the
9977 * object @p obj matching the event name @p event and the registered
9978 * function pointer @p func. If the removal is successful it will also
9979 * return the data pointer that was passed to
9980 * evas_object_smart_callback_add() (that will be the same as the
9981 * parameter) when the callback(s) was(were) added to the canvas. If
9982 * not successful @c NULL will be returned.
9983 *
9984 * @see evas_object_smart_callback_add() for more details.
9985 *
9986 * @ingroup Evas_Smart_Object_Group
9987 */
9988EAPI void *evas_object_smart_callback_del (Evas_Object *obj, const char *event, Evas_Smart_Cb func) EINA_ARG_NONNULL(1, 2, 3);
9989
9990/**
9991 * Delete (unregister) a callback function from the smart event
9992 * specified by @p event on the smart object @p obj.
9993 *
9994 * @param obj a smart object
9995 * @param event the event's name string
9996 * @param func the callback function
9997 * @param data the data pointer that was passed to the callback
9998 * @return the data pointer
9999 *
10000 * This function removes <b>the first</b> added smart callback on the
10001 * object @p obj matching the event name @p event, the registered
10002 * function pointer @p func and the callback data pointer @p data. If
10003 * the removal is successful it will also return the data pointer that
10004 * was passed to evas_object_smart_callback_add() (that will be the same
10005 * as the parameter) when the callback(s) was(were) added to the canvas.
10006 * If not successful @c NULL will be returned. A common use would be to
10007 * remove an exact match of a callback
10008 *
10009 * @see evas_object_smart_callback_add() for more details.
10010 * @since 1.2.0
10011 * @ingroup Evas_Smart_Object_Group
10012 *
10013 * @note To delete all smart event callbacks which match @p type and @p func,
10014 * use evas_object_smart_callback_del().
10015 */
10016EAPI 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);
10017
10018/**
10019 * Call a given smart callback on the smart object @p obj.
10020 *
10021 * @param obj the smart object
10022 * @param event the event's name string
10023 * @param event_info pointer to an event specific struct or information to
10024 * pass to the callback functions registered on this smart event
10025 *
10026 * This should be called @b internally, from the smart object's own
10027 * code, when some specific event has occurred and the implementor
10028 * wants is to pertain to the object's events API (see @ref
10029 * Evas_Smart_Object_Group_Callbacks). The documentation for the smart
10030 * object should include a list of possible events and what type of @p
10031 * event_info to expect for each of them. Also, when defining an
10032 * #Evas_Smart_Class, smart object implementors are strongly
10033 * encouraged to properly set the Evas_Smart_Class::callbacks
10034 * callbacks description array, so that the users of the smart object
10035 * can have introspection on its events API <b>at run time</b>.
10036 *
10037 * @ingroup Evas_Smart_Object_Group
10038 */
10039EAPI void evas_object_smart_callback_call (Evas_Object *obj, const char *event, void *event_info) EINA_ARG_NONNULL(1, 2);
10040
10041
10042/**
10043 * Set an smart object @b instance's smart callbacks descriptions.
10044 *
10045 * @param obj A smart object
10046 * @param descriptions @c NULL terminated array with
10047 * #Evas_Smart_Cb_Description descriptions. Array elements won't be
10048 * modified at run time, but references to them and their contents
10049 * will be made, so this array should be kept alive during the whole
10050 * object's lifetime.
10051 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
10052 *
10053 * These descriptions are hints to be used by introspection and are
10054 * not enforced in any way.
10055 *
10056 * It will not be checked if instance callbacks descriptions have the
10057 * same name as respective possibly registered in the smart object
10058 * @b class. Both are kept in different arrays and users of
10059 * evas_object_smart_callbacks_descriptions_get() should handle this
10060 * case as they wish.
10061 *
10062 * @note Becase @p descriptions must be @c NULL terminated, and
10063 * because a @c NULL name makes little sense, too,
10064 * Evas_Smart_Cb_Description::name must @b not be @c NULL.
10065 *
10066 * @note While instance callbacks descriptions are possible, they are
10067 * @b not recommended. Use @b class callbacks descriptions
10068 * instead as they make you smart object user's life simpler and
10069 * will use less memory, as descriptions and arrays will be
10070 * shared among all instances.
10071 *
10072 * @ingroup Evas_Smart_Object_Group
10073 */
10074EAPI Eina_Bool evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions) EINA_ARG_NONNULL(1);
10075
10076/**
10077 * Retrieve an smart object's know smart callback descriptions (both
10078 * instance and class ones).
10079 *
10080 * @param obj The smart object to get callback descriptions from.
10081 * @param class_descriptions Where to store class callbacks
10082 * descriptions array, if any is known. If no descriptions are
10083 * known, @c NULL is returned
10084 * @param class_count Returns how many class callbacks descriptions
10085 * are known.
10086 * @param instance_descriptions Where to store instance callbacks
10087 * descriptions array, if any is known. If no descriptions are
10088 * known, @c NULL is returned.
10089 * @param instance_count Returns how many instance callbacks
10090 * descriptions are known.
10091 *
10092 * This call searches for registered callback descriptions for both
10093 * instance and class of the given smart object. These arrays will be
10094 * sorted by Evas_Smart_Cb_Description::name and also @c NULL
10095 * terminated, so both @a class_count and @a instance_count can be
10096 * ignored, if the caller wishes so. The terminator @c NULL is not
10097 * counted in these values.
10098 *
10099 * @note If just class descriptions are of interest, try
10100 * evas_smart_callbacks_descriptions_get() instead.
10101 *
10102 * @note Use @c NULL pointers on the descriptions/counters you're not
10103 * interested in: they'll be ignored by the function.
10104 *
10105 * @see evas_smart_callbacks_descriptions_get()
10106 *
10107 * @ingroup Evas_Smart_Object_Group
10108 */
10109EAPI 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);
10110
10111/**
10112 * Find callback description for callback called @a name.
10113 *
10114 * @param obj the smart object.
10115 * @param name name of desired callback, must @b not be @c NULL. The
10116 * search have a special case for @a name being the same
10117 * pointer as registered with Evas_Smart_Cb_Description, one
10118 * can use it to avoid excessive use of strcmp().
10119 * @param class_description pointer to return class description or @c
10120 * NULL if not found. If parameter is @c NULL, no search will
10121 * be done on class descriptions.
10122 * @param instance_description pointer to return instance description
10123 * or @c NULL if not found. If parameter is @c NULL, no search
10124 * will be done on instance descriptions.
10125 * @return reference to description if found, @c NULL if not found.
10126 */
10127EAPI 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);
10128
10129
10130/**
10131 * Mark smart object as changed, dirty.
10132 *
10133 * @param obj The given Evas smart object
10134 *
10135 * This will flag the given object as needing recalculation,
10136 * forcefully. As an effect, on the next rendering cycle it's @b
10137 * calculate() (see #Evas_Smart_Class) smart function will be called.
10138 *
10139 * @see evas_object_smart_need_recalculate_set().
10140 * @see evas_object_smart_calculate().
10141 *
10142 * @ingroup Evas_Smart_Object_Group
10143 */
10144EAPI void evas_object_smart_changed (Evas_Object *obj) EINA_ARG_NONNULL(1);
10145
10146/**
10147 * Set or unset the flag signalling that a given smart object needs to
10148 * get recalculated.
10149 *
10150 * @param obj the smart object
10151 * @param value whether one wants to set (@c EINA_TRUE) or to unset
10152 * (@c EINA_FALSE) the flag.
10153 *
10154 * If this flag is set, then the @c calculate() smart function of @p
10155 * obj will be called, if one is provided, during rendering phase of
10156 * Evas (see evas_render()), after which this flag will be
10157 * automatically unset.
10158 *
10159 * If that smart function is not provided for the given object, this
10160 * flag will be left unchanged.
10161 *
10162 * @note just setting this flag will not make the canvas' whole scene
10163 * dirty, by itself, and evas_render() will have no effect. To
10164 * force that, use evas_object_smart_changed(), that will also
10165 * automatically call this function automatically, with @c
10166 * EINA_TRUE as parameter.
10167 *
10168 * @see evas_object_smart_need_recalculate_get()
10169 * @see evas_object_smart_calculate()
10170 * @see evas_smart_objects_calculate()
10171 *
10172 * @ingroup Evas_Smart_Object_Group
10173 */
10174EAPI void evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value) EINA_ARG_NONNULL(1);
10175
10176/**
10177 * Get the value of the flag signalling that a given smart object needs to
10178 * get recalculated.
10179 *
10180 * @param obj the smart object
10181 * @return if flag is set or not.
10182 *
10183 * @note this flag will be unset during the rendering phase, when the
10184 * @c calculate() smart function is called, if one is provided.
10185 * If it's not provided, then the flag will be left unchanged
10186 * after the rendering phase.
10187 *
10188 * @see evas_object_smart_need_recalculate_set(), for more details
10189 *
10190 * @ingroup Evas_Smart_Object_Group
10191 */
10192EAPI Eina_Bool evas_object_smart_need_recalculate_get(const Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
10193
10194/**
10195 * Call the @b calculate() smart function immediately on a given smart
10196 * object.
10197 *
10198 * @param obj the smart object's handle
10199 *
10200 * This will force immediate calculations (see #Evas_Smart_Class)
10201 * needed for renderization of this object and, besides, unset the
10202 * flag on it telling it needs recalculation for the next rendering
10203 * phase.
10204 *
10205 * @see evas_object_smart_need_recalculate_set()
10206 *
10207 * @ingroup Evas_Smart_Object_Group
10208 */
10209EAPI void evas_object_smart_calculate (Evas_Object *obj) EINA_ARG_NONNULL(1);
10210
10211/**
10212 * Call user-provided @c calculate() smart functions and unset the
10213 * flag signalling that the object needs to get recalculated to @b all
10214 * smart objects in the canvas.
10215 *
10216 * @param e The canvas to calculate all smart objects in
10217 *
10218 * @see evas_object_smart_need_recalculate_set()
10219 *
10220 * @ingroup Evas_Smart_Object_Group
10221 */
10222EAPI void evas_smart_objects_calculate (Evas *e);
10223
10224/**
10225 * This gets the internal counter that counts the number of smart calculations
10226 *
10227 * @param e The canvas to get the calculate counter from
10228 *
10229 * Whenever evas performs smart object calculations on the whole canvas
10230 * it increments a counter by 1. This is the smart object calculate counter
10231 * that this function returns the value of. It starts at the value of 0 and
10232 * will increase (and eventually wrap around to negative values and so on) by
10233 * 1 every time objects are calculated. You can use this counter to ensure
10234 * you don't re-do calculations withint the same calculation generation/run
10235 * if the calculations maybe cause self-feeding effects.
10236 *
10237 * @ingroup Evas_Smart_Object_Group
10238 * @since 1.1
10239 */
10240EAPI int evas_smart_objects_calculate_count_get (const Evas *e);
10241
10242/**
10243 * Moves all children objects of a given smart object relative to a
10244 * given offset.
10245 *
10246 * @param obj the smart object.
10247 * @param dx horizontal offset (delta).
10248 * @param dy vertical offset (delta).
10249 *
10250 * This will make each of @p obj object's children to move, from where
10251 * they before, with those delta values (offsets) on both directions.
10252 *
10253 * @note This is most useful on custom smart @c move() functions.
10254 *
10255 * @note Clipped smart objects already make use of this function on
10256 * their @c move() smart function definition.
10257 */
10258EAPI void evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy) EINA_ARG_NONNULL(1);
10259
10260/**
10261 * @}
10262 */
10263
10264/**
10265 * @defgroup Evas_Smart_Object_Clipped Clipped Smart Object
10266 *
10267 * Clipped smart object is a base to construct other smart objects
10268 * based on the concept of having an internal clipper that is applied
10269 * to all children objects. This clipper will control the visibility,
10270 * clipping and color of sibling objects (remember that the clipping
10271 * is recursive, and clipper color modulates the color of its
10272 * clippees). By default, this base will also move children relatively
10273 * to the parent, and delete them when parent is deleted. In other
10274 * words, it is the base for simple object grouping.
10275 *
10276 * See some @ref Example_Evas_Smart_Objects "examples" of this group
10277 * of functions.
10278 *
10279 * @see evas_object_smart_clipped_smart_set()
10280 *
10281 * @ingroup Evas_Smart_Object_Group
10282 */
10283
10284/**
10285 * @addtogroup Evas_Smart_Object_Clipped
10286 * @{
10287 */
10288
10289/**
10290 * Every subclass should provide this at the beginning of their own
10291 * data set with evas_object_smart_data_set().
10292 */
10293 typedef struct _Evas_Object_Smart_Clipped_Data Evas_Object_Smart_Clipped_Data;
10294 struct _Evas_Object_Smart_Clipped_Data
10295 {
10296 Evas_Object *clipper;
10297 Evas *evas;
10298 };
10299
10300
10301/**
10302 * Get the clipper object for the given clipped smart object.
10303 *
10304 * @param obj the clipped smart object to retrieve associated clipper
10305 * from.
10306 * @return the clipper object.
10307 *
10308 * Use this function if you want to change any of this clipper's
10309 * properties, like colors.
10310 *
10311 * @see evas_object_smart_clipped_smart_add()
10312 */
10313EAPI Evas_Object *evas_object_smart_clipped_clipper_get (Evas_Object *obj) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
10314
10315/**
10316 * Set a given smart class' callbacks so it implements the <b>clipped smart
10317 * object"</b>'s interface.
10318 *
10319 * @param sc The smart class handle to operate on
10320 *
10321 * This call will assign all the required methods of the @p sc
10322 * #Evas_Smart_Class instance to the implementations set for clipped
10323 * smart objects. If one wants to "subclass" it, call this function
10324 * and then override desired values. If one wants to call any original
10325 * method, save it somewhere. Example:
10326 *
10327 * @code
10328 * static Evas_Smart_Class parent_sc = EVAS_SMART_CLASS_INIT_NULL;
10329 *
10330 * static void my_class_smart_add(Evas_Object *o)
10331 * {
10332 * parent_sc.add(o);
10333 * evas_object_color_set(evas_object_smart_clipped_clipper_get(o),
10334 * 255, 0, 0, 255);
10335 * }
10336 *
10337 * Evas_Smart_Class *my_class_new(void)
10338 * {
10339 * static Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass");
10340 * if (!parent_sc.name)
10341 * {
10342 * evas_object_smart_clipped_smart_set(&sc);
10343 * parent_sc = sc;
10344 * sc.add = my_class_smart_add;
10345 * }
10346 * return &sc;
10347 * }
10348 * @endcode
10349 *
10350 * Default behavior for each of #Evas_Smart_Class functions on a
10351 * clipped smart object are:
10352 * - @c add: creates a hidden clipper with "infinite" size, to clip
10353 * any incoming members;
10354 * - @c del: delete all children objects;
10355 * - @c move: move all objects relative relatively;
10356 * - @c resize: <b>not defined</b>;
10357 * - @c show: if there are children objects, show clipper;
10358 * - @c hide: hides clipper;
10359 * - @c color_set: set the color of clipper;
10360 * - @c clip_set: set clipper of clipper;
10361 * - @c clip_unset: unset the clipper of clipper;
10362 *
10363 * @note There are other means of assigning parent smart classes to
10364 * child ones, like the #EVAS_SMART_SUBCLASS_NEW macro or the
10365 * evas_smart_class_inherit_full() function.
10366 */
10367EAPI void evas_object_smart_clipped_smart_set (Evas_Smart_Class *sc) EINA_ARG_NONNULL(1);
10368
10369/**
10370 * Get a pointer to the <b>clipped smart object's</b> class, to use
10371 * for proper inheritance
10372 *
10373 * @see #Evas_Smart_Object_Clipped for more information on this smart
10374 * class
10375 */
10376EAPI const Evas_Smart_Class *evas_object_smart_clipped_class_get (void) EINA_CONST;
10377
10378/**
10379 * @}
10380 */
10381
10382/**
10383 * @defgroup Evas_Object_Box Box Smart Object
10384 *
10385 * A box is a convenience smart object that packs children inside it
10386 * in @b sequence, using a layouting function specified by the
10387 * user. There are a couple of pre-made layouting functions <b>built-in
10388 * in Evas</b>, all of them using children size hints to define their
10389 * size and alignment inside their cell space.
10390 *
10391 * Examples on this smart object's usage:
10392 * - @ref Example_Evas_Box
10393 * - @ref Example_Evas_Size_Hints
10394 *
10395 * @see @ref Evas_Object_Group_Size_Hints
10396 *
10397 * @ingroup Evas_Smart_Object_Group
10398 */
10399
10400/**
10401 * @addtogroup Evas_Object_Box
10402 * @{
10403 */
10404
10405/**
10406 * @typedef Evas_Object_Box_Api
10407 *
10408 * Smart class extension, providing extra box object requirements.
10409 *
10410 * @ingroup Evas_Object_Box
10411 */
10412 typedef struct _Evas_Object_Box_Api Evas_Object_Box_Api;
10413
10414/**
10415 * @typedef Evas_Object_Box_Data
10416 *
10417 * Smart object instance data, providing box object requirements.
10418 *
10419 * @ingroup Evas_Object_Box
10420 */
10421 typedef struct _Evas_Object_Box_Data Evas_Object_Box_Data;
10422
10423/**
10424 * @typedef Evas_Object_Box_Option
10425 *
10426 * The base structure for a box option. Box options are a way of
10427 * extending box items properties, which will be taken into account
10428 * for layouting decisions. The box layouting functions provided by
10429 * Evas will only rely on objects' canonical size hints to layout
10430 * them, so the basic box option has @b no (custom) property set.
10431 *
10432 * Users creating their own layouts, but not depending on extra child
10433 * items' properties, would be fine just using
10434 * evas_object_box_layout_set(). But if one desires a layout depending
10435 * on extra child properties, he/she has to @b subclass the box smart
10436 * object. Thus, by using evas_object_box_smart_class_get() and
10437 * evas_object_box_smart_set(), the @c option_new() and @c
10438 * option_free() smart class functions should be properly
10439 * redefined/extended.
10440 *
10441 * Object properties are bound to an integer identifier and must have
10442 * a name string. Their values are open to any data. See the API on
10443 * option properties for more details.
10444 *
10445 * @ingroup Evas_Object_Box
10446 */
10447 typedef struct _Evas_Object_Box_Option Evas_Object_Box_Option;
10448
10449/**
10450 * @typedef Evas_Object_Box_Layout
10451 *
10452 * Function signature for an Evas box object layouting routine. By
10453 * @a o it will be passed the box object in question, by @a priv it will
10454 * be passed the box's internal data and, by @a user_data, it will be
10455 * passed any custom data one could have set to a given box layouting
10456 * function, with evas_object_box_layout_set().
10457 *
10458 * @ingroup Evas_Object_Box
10459 */
10460 typedef void (*Evas_Object_Box_Layout) (Evas_Object *o, Evas_Object_Box_Data *priv, void *user_data);
10461
10462/**
10463 * @def EVAS_OBJECT_BOX_API_VERSION
10464 *
10465 * Current version for Evas box object smart class, a value which goes
10466 * to _Evas_Object_Box_Api::version.
10467 *
10468 * @ingroup Evas_Object_Box
10469 */
10470#define EVAS_OBJECT_BOX_API_VERSION 1
10471
10472/**
10473 * @struct _Evas_Object_Box_Api
10474 *
10475 * This structure should be used by any smart class inheriting from
10476 * the box's one, to provide custom box behavior which could not be
10477 * achieved only by providing a layout function, with
10478 * evas_object_box_layout_set().
10479 *
10480 * @extends Evas_Smart_Class
10481 * @ingroup Evas_Object_Box
10482 */
10483 struct _Evas_Object_Box_Api
10484 {
10485 Evas_Smart_Class base; /**< Base smart class struct, need for all smart objects */
10486 int version; /**< Version of this smart class definition */
10487 Evas_Object_Box_Option *(*append) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to append child elements in boxes */
10488 Evas_Object_Box_Option *(*prepend) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to prepend child elements in boxes */
10489 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 */
10490 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 */
10491 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 */
10492 Evas_Object *(*remove) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child); /**< Smart function to remove a child element from boxes */
10493 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 */
10494 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 */
10495 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 */
10496 const char *(*property_name_get)(Evas_Object *o, int property); /**< Smart function to get the name of a custom property of box children */
10497 int (*property_id_get) (Evas_Object *o, const char *name); /**< Smart function to get the numerical ID of a custom property of box children */
10498 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 */
10499 void (*option_free) (Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt); /**< Smart function to delete a box option struct */
10500 };
10501
10502/**
10503 * @def EVAS_OBJECT_BOX_API_INIT
10504 *
10505 * Initializer for a whole #Evas_Object_Box_Api structure, with
10506 * @c NULL values on its specific fields.
10507 *
10508 * @param smart_class_init initializer to use for the "base" field
10509 * (#Evas_Smart_Class).
10510 *
10511 * @see EVAS_SMART_CLASS_INIT_NULL
10512 * @see EVAS_SMART_CLASS_INIT_VERSION
10513 * @see EVAS_SMART_CLASS_INIT_NAME_VERSION
10514 * @see EVAS_OBJECT_BOX_API_INIT_NULL
10515 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
10516 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10517 * @ingroup Evas_Object_Box
10518 */
10519#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}
10520
10521/**
10522 * @def EVAS_OBJECT_BOX_API_INIT_NULL
10523 *
10524 * Initializer to zero out a whole #Evas_Object_Box_Api structure.
10525 *
10526 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
10527 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10528 * @see EVAS_OBJECT_BOX_API_INIT
10529 * @ingroup Evas_Object_Box
10530 */
10531#define EVAS_OBJECT_BOX_API_INIT_NULL EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NULL)
10532
10533/**
10534 * @def EVAS_OBJECT_BOX_API_INIT_VERSION
10535 *
10536 * Initializer to zero out a whole #Evas_Object_Box_Api structure and
10537 * set a specific version on it.
10538 *
10539 * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will set
10540 * the version field of #Evas_Smart_Class (base field) to the latest
10541 * #EVAS_SMART_CLASS_VERSION.
10542 *
10543 * @see EVAS_OBJECT_BOX_API_INIT_NULL
10544 * @see EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10545 * @see EVAS_OBJECT_BOX_API_INIT
10546 * @ingroup Evas_Object_Box
10547 */
10548#define EVAS_OBJECT_BOX_API_INIT_VERSION EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_VERSION)
10549
10550/**
10551 * @def EVAS_OBJECT_BOX_API_INIT_NAME_VERSION
10552 *
10553 * Initializer to zero out a whole #Evas_Object_Box_Api structure and
10554 * set its name and version.
10555 *
10556 * This is similar to #EVAS_OBJECT_BOX_API_INIT_NULL, but it will also
10557 * set the version field of #Evas_Smart_Class (base field) to the
10558 * latest #EVAS_SMART_CLASS_VERSION and name it to the specific value.
10559 *
10560 * It will keep a reference to the name field as a <c>"const char *"</c>,
10561 * i.e., the name must be available while the structure is
10562 * used (hint: static or global variable!) and must not be modified.
10563 *
10564 * @see EVAS_OBJECT_BOX_API_INIT_NULL
10565 * @see EVAS_OBJECT_BOX_API_INIT_VERSION
10566 * @see EVAS_OBJECT_BOX_API_INIT
10567 * @ingroup Evas_Object_Box
10568 */
10569#define EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(name) EVAS_OBJECT_BOX_API_INIT(EVAS_SMART_CLASS_INIT_NAME_VERSION(name))
10570
10571/**
10572 * @struct _Evas_Object_Box_Data
10573 *
10574 * This structure augments clipped smart object's instance data,
10575 * providing extra members required by generic box implementation. If
10576 * a subclass inherits from #Evas_Object_Box_Api, then it may augment
10577 * #Evas_Object_Box_Data to fit its own needs.
10578 *
10579 * @extends Evas_Object_Smart_Clipped_Data
10580 * @ingroup Evas_Object_Box
10581 */
10582 struct _Evas_Object_Box_Data
10583 {
10584 Evas_Object_Smart_Clipped_Data base;
10585 const Evas_Object_Box_Api *api;
10586 struct {
10587 double h, v;
10588 } align;
10589 struct {
10590 Evas_Coord h, v;
10591 } pad;
10592 Eina_List *children;
10593 struct {
10594 Evas_Object_Box_Layout cb;
10595 void *data;
10596 void (*free_data)(void *data);
10597 } layout;
10598 Eina_Bool layouting : 1;
10599 Eina_Bool children_changed : 1;
10600 };
10601
10602 struct _Evas_Object_Box_Option
10603 {
10604 Evas_Object *obj; /**< Pointer to the box child object, itself */
10605 Eina_Bool max_reached:1;
10606 Eina_Bool min_reached:1;
10607 Evas_Coord alloc_size;
10608 }; /**< #Evas_Object_Box_Option struct fields */
10609
10610/**
10611 * Set the default box @a api struct (Evas_Object_Box_Api)
10612 * with the default values. May be used to extend that API.
10613 *
10614 * @param api The box API struct to set back, most probably with
10615 * overridden fields (on class extensions scenarios)
10616 */
10617EAPI void evas_object_box_smart_set (Evas_Object_Box_Api *api) EINA_ARG_NONNULL(1);
10618
10619/**
10620 * Get the Evas box smart class, for inheritance purposes.
10621 *
10622 * @return the (canonical) Evas box smart class.
10623 *
10624 * The returned value is @b not to be modified, just use it as your
10625 * parent class.
10626 */
10627EAPI const Evas_Object_Box_Api *evas_object_box_smart_class_get (void) EINA_CONST;
10628
10629/**
10630 * Set a new layouting function to a given box object
10631 *
10632 * @param o The box object to operate on.
10633 * @param cb The new layout function to set on @p o.
10634 * @param data Data pointer to be passed to @p cb.
10635 * @param free_data Function to free @p data, if need be.
10636 *
10637 * A box layout function affects how a box object displays child
10638 * elements within its area. The list of pre-defined box layouts
10639 * available in Evas is:
10640 * - evas_object_box_layout_horizontal()
10641 * - evas_object_box_layout_vertical()
10642 * - evas_object_box_layout_homogeneous_horizontal()
10643 * - evas_object_box_layout_homogeneous_vertical()
10644 * - evas_object_box_layout_homogeneous_max_size_horizontal()
10645 * - evas_object_box_layout_homogeneous_max_size_vertical()
10646 * - evas_object_box_layout_flow_horizontal()
10647 * - evas_object_box_layout_flow_vertical()
10648 * - evas_object_box_layout_stack()
10649 *
10650 * Refer to each of their documentation texts for details on them.
10651 *
10652 * @note A box layouting function will be triggered by the @c
10653 * 'calculate' smart callback of the box's smart class.
10654 */
10655EAPI 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);
10656
10657/**
10658 * Add a new box object on the provided canvas.
10659 *
10660 * @param evas The canvas to create the box object on.
10661 * @return @c NULL on error, a pointer to a new box object on
10662 * success.
10663 *
10664 * After instantiation, if a box object hasn't its layout function
10665 * set, via evas_object_box_layout_set(), it will have it by default
10666 * set to evas_object_box_layout_horizontal(). The remaining
10667 * properties of the box must be set/retrieved via
10668 * <c>evas_object_box_{h,v}_{align,padding}_{get,set)()</c>.
10669 */
10670EAPI Evas_Object *evas_object_box_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
10671
10672/**
10673 * Add a new box as a @b child of a given smart object.
10674 *
10675 * @param parent The parent smart object to put the new box in.
10676 * @return @c NULL on error, a pointer to a new box object on
10677 * success.
10678 *
10679 * This is a helper function that has the same effect of putting a new
10680 * box object into @p parent by use of evas_object_smart_member_add().
10681 *
10682 * @see evas_object_box_add()
10683 */
10684EAPI Evas_Object *evas_object_box_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
10685
10686/**
10687 * Layout function which sets the box @a o to a (basic) horizontal box
10688 *
10689 * @param o The box object in question
10690 * @param priv The smart data of the @p o
10691 * @param data The data pointer passed on
10692 * evas_object_box_layout_set(), if any
10693 *
10694 * In this layout, the box object's overall behavior is controlled by
10695 * its padding/alignment properties, which are set by the
10696 * <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10697 * functions. The size hints of the elements in the box -- set by the
10698 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10699 * -- also control the way this function works.
10700 *
10701 * \par Box's properties:
10702 * @c align_h controls the horizontal alignment of the child objects
10703 * relative to the containing box. When set to @c 0.0, children are
10704 * aligned to the left. A value of @c 1.0 makes them aligned to the
10705 * right border. Values in between align them proportionally. Note
10706 * that if the size required by the children, which is given by their
10707 * widths and the @c padding_h property of the box, is bigger than the
10708 * their container's width, the children will be displayed out of the
10709 * box's bounds. A negative value of @c align_h makes the box to
10710 * @b justify its children. The padding between them, in this case, is
10711 * corrected so that the leftmost one touches the left border and the
10712 * rightmost one touches the right border (even if they must
10713 * overlap). The @c align_v and @c padding_v properties of the box
10714 * @b don't contribute to its behaviour when this layout is chosen.
10715 *
10716 * \par Child element's properties:
10717 * @c align_x does @b not influence the box's behavior. @c padding_l
10718 * and @c padding_r sum up to the container's horizontal padding
10719 * between elements. The child's @c padding_t, @c padding_b and
10720 * @c align_y properties apply for padding/alignment relative to the
10721 * overall height of the box. Finally, there is the @c weight_x
10722 * property, which, if set to a non-zero value, tells the container
10723 * that the child width is @b not pre-defined. If the container can't
10724 * accommodate all its children, it sets the widths of the ones
10725 * <b>with weights</b> to sizes as small as they can all fit into
10726 * it. If the size required by the children is less than the
10727 * available, the box increases its childrens' (which have weights)
10728 * widths as to fit the remaining space. The @c weight_x property,
10729 * besides telling the element is resizable, gives a @b weight for the
10730 * resizing process. The parent box will try to distribute (or take
10731 * off) widths accordingly to the @b normalized list of weigths: most
10732 * weighted children remain/get larger in this process than the least
10733 * ones. @c weight_y does not influence the layout.
10734 *
10735 * If one desires that, besides having weights, child elements must be
10736 * resized bounded to a minimum or maximum size, those size hints must
10737 * be set, by the <c>evas_object_size_hint_{min,max}_set()</c>
10738 * functions.
10739 */
10740EAPI void evas_object_box_layout_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10741
10742/**
10743 * Layout function which sets the box @a o to a (basic) vertical box
10744 *
10745 * This function behaves analogously to
10746 * evas_object_box_layout_horizontal(). The description of its
10747 * behaviour can be derived from that function's documentation.
10748 */
10749EAPI void evas_object_box_layout_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10750
10751/**
10752 * Layout function which sets the box @a o to a @b homogeneous
10753 * vertical box
10754 *
10755 * This function behaves analogously to
10756 * evas_object_box_layout_homogeneous_horizontal(). The description
10757 * of its behaviour can be derived from that function's documentation.
10758 */
10759EAPI void evas_object_box_layout_homogeneous_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10760
10761/**
10762 * Layout function which sets the box @a o to a @b homogeneous
10763 * horizontal box
10764 *
10765 * @param o The box object in question
10766 * @param priv The smart data of the @p o
10767 * @param data The data pointer passed on
10768 * evas_object_box_layout_set(), if any
10769 *
10770 * In a homogeneous horizontal box, its width is divided @b equally
10771 * between the contained objects. The box's overall behavior is
10772 * controlled by its padding/alignment properties, which are set by
10773 * the <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10774 * functions. The size hints the elements in the box -- set by the
10775 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10776 * -- also control the way this function works.
10777 *
10778 * \par Box's properties:
10779 * @c align_h has no influence on the box for this layout.
10780 * @c padding_h tells the box to draw empty spaces of that size, in
10781 * pixels, between the (equal) child objects's cells. The @c align_v
10782 * and @c padding_v properties of the box don't contribute to its
10783 * behaviour when this layout is chosen.
10784 *
10785 * \par Child element's properties:
10786 * @c padding_l and @c padding_r sum up to the required width of the
10787 * child element. The @c align_x property tells the relative position
10788 * of this overall child width in its allocated cell (@r 0.0 to
10789 * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to
10790 * @c align_x makes the box try to resize this child element to the exact
10791 * width of its cell (respecting the minimum and maximum size hints on
10792 * the child's width and accounting for its horizontal padding
10793 * hints). The child's @c padding_t, @c padding_b and @c align_y
10794 * properties apply for padding/alignment relative to the overall
10795 * height of the box. A value of @c -1.0 to @c align_y makes the box
10796 * try to resize this child element to the exact height of its parent
10797 * (respecting the maximum size hint on the child's height).
10798 */
10799EAPI void evas_object_box_layout_homogeneous_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10800
10801/**
10802 * Layout function which sets the box @a o to a <b>maximum size,
10803 * homogeneous</b> horizontal box
10804 *
10805 * @param o The box object in question
10806 * @param priv The smart data of the @p o
10807 * @param data The data pointer passed on
10808 * evas_object_box_layout_set(), if any
10809 *
10810 * In a maximum size, homogeneous horizontal box, besides having cells
10811 * of <b>equal size</b> reserved for the child objects, this size will
10812 * be defined by the size of the @b largest child in the box (in
10813 * width). The box's overall behavior is controlled by its properties,
10814 * which are set by the
10815 * <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10816 * functions. The size hints of the elements in the box -- set by the
10817 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10818 * -- also control the way this function works.
10819 *
10820 * \par Box's properties:
10821 * @c padding_h tells the box to draw empty spaces of that size, in
10822 * pixels, between the child objects's cells. @c align_h controls the
10823 * horizontal alignment of the child objects, relative to the
10824 * containing box. When set to @c 0.0, children are aligned to the
10825 * left. A value of @c 1.0 lets them aligned to the right
10826 * border. Values in between align them proportionally. A negative
10827 * value of @c align_h makes the box to @b justify its children
10828 * cells. The padding between them, in this case, is corrected so that
10829 * the leftmost one touches the left border and the rightmost one
10830 * touches the right border (even if they must overlap). The
10831 * @c align_v and @c padding_v properties of the box don't contribute to
10832 * its behaviour when this layout is chosen.
10833 *
10834 * \par Child element's properties:
10835 * @c padding_l and @c padding_r sum up to the required width of the
10836 * child element. The @c align_x property tells the relative position
10837 * of this overall child width in its allocated cell (@c 0.0 to
10838 * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to
10839 * @c align_x makes the box try to resize this child element to the exact
10840 * width of its cell (respecting the minimum and maximum size hints on
10841 * the child's width and accounting for its horizontal padding
10842 * hints). The child's @c padding_t, @c padding_b and @c align_y
10843 * properties apply for padding/alignment relative to the overall
10844 * height of the box. A value of @c -1.0 to @c align_y makes the box
10845 * try to resize this child element to the exact height of its parent
10846 * (respecting the max hint on the child's height).
10847 */
10848EAPI void evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10849
10850/**
10851 * Layout function which sets the box @a o to a <b>maximum size,
10852 * homogeneous</b> vertical box
10853 *
10854 * This function behaves analogously to
10855 * evas_object_box_layout_homogeneous_max_size_horizontal(). The
10856 * description of its behaviour can be derived from that function's
10857 * documentation.
10858 */
10859EAPI void evas_object_box_layout_homogeneous_max_size_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10860
10861/**
10862 * Layout function which sets the box @a o to a @b flow horizontal
10863 * box.
10864 *
10865 * @param o The box object in question
10866 * @param priv The smart data of the @p o
10867 * @param data The data pointer passed on
10868 * evas_object_box_layout_set(), if any
10869 *
10870 * In a flow horizontal box, the box's child elements are placed in
10871 * @b rows (think of text as an analogy). A row has as much elements as
10872 * can fit into the box's width. The box's overall behavior is
10873 * controlled by its properties, which are set by the
10874 * <c>evas_object_box_{h,v}_{align,padding}_set()</c> family of
10875 * functions. The size hints of the elements in the box -- set by the
10876 * <c>evas_object_size_hint_{align,padding,weight}_set()</c> functions
10877 * -- also control the way this function works.
10878 *
10879 * \par Box's properties:
10880 * @c padding_h tells the box to draw empty spaces of that size, in
10881 * pixels, between the child objects's cells. @c align_h dictates the
10882 * horizontal alignment of the rows (@c 0.0 to left align them, @c 1.0
10883 * to right align). A value of @c -1.0 to @c align_h lets the rows
10884 * @b justified horizontally. @c align_v controls the vertical alignment
10885 * of the entire set of rows (@c 0.0 to top, @c 1.0 to bottom). A
10886 * value of @c -1.0 to @c align_v makes the box to @b justify the rows
10887 * vertically. The padding between them, in this case, is corrected so
10888 * that the first row touches the top border and the last one touches
10889 * the bottom border (even if they must overlap). @c padding_v has no
10890 * influence on the layout.
10891 *
10892 * \par Child element's properties:
10893 * @c padding_l and @c padding_r sum up to the required width of the
10894 * child element. The @c align_x property has no influence on the
10895 * layout. The child's @c padding_t and @c padding_b sum up to the
10896 * required height of the child element and is the only means (besides
10897 * row justifying) of setting space between rows. Note, however, that
10898 * @c align_y dictates positioning relative to the <b>largest
10899 * height</b> required by a child object in the actual row.
10900 */
10901EAPI void evas_object_box_layout_flow_horizontal (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10902
10903/**
10904 * Layout function which sets the box @a o to a @b flow vertical box.
10905 *
10906 * This function behaves analogously to
10907 * evas_object_box_layout_flow_horizontal(). The description of its
10908 * behaviour can be derived from that function's documentation.
10909 */
10910EAPI void evas_object_box_layout_flow_vertical (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10911
10912/**
10913 * Layout function which sets the box @a o to a @b stacking box
10914 *
10915 * @param o The box object in question
10916 * @param priv The smart data of the @p o
10917 * @param data The data pointer passed on
10918 * evas_object_box_layout_set(), if any
10919 *
10920 * In a stacking box, all children will be given the same size -- the
10921 * box's own size -- and they will be stacked one above the other, so
10922 * that the first object in @p o's internal list of child elements
10923 * will be the bottommost in the stack.
10924 *
10925 * \par Box's properties:
10926 * No box properties are used.
10927 *
10928 * \par Child element's properties:
10929 * @c padding_l and @c padding_r sum up to the required width of the
10930 * child element. The @c align_x property tells the relative position
10931 * of this overall child width in its allocated cell (@c 0.0 to
10932 * extreme left, @c 1.0 to extreme right). A value of @c -1.0 to @c
10933 * align_x makes the box try to resize this child element to the exact
10934 * width of its cell (respecting the min and max hints on the child's
10935 * width and accounting for its horizontal padding properties). The
10936 * same applies to the vertical axis.
10937 */
10938EAPI void evas_object_box_layout_stack (Evas_Object *o, Evas_Object_Box_Data *priv, void *data) EINA_ARG_NONNULL(1, 2);
10939
10940/**
10941 * Set the alignment of the whole bounding box of contents, for a
10942 * given box object.
10943 *
10944 * @param o The given box object to set alignment from
10945 * @param horizontal The horizontal alignment, in pixels
10946 * @param vertical the vertical alignment, in pixels
10947 *
10948 * This will influence how a box object is to align its bounding box
10949 * of contents within its own area. The values @b must be in the range
10950 * @c 0.0 - @c 1.0, or undefined behavior is expected. For horizontal
10951 * alignment, @c 0.0 means to the left, with @c 1.0 meaning to the
10952 * right. For vertical alignment, @c 0.0 means to the top, with @c 1.0
10953 * meaning to the bottom.
10954 *
10955 * @note The default values for both alignments is @c 0.5.
10956 *
10957 * @see evas_object_box_align_get()
10958 */
10959EAPI void evas_object_box_align_set (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
10960
10961/**
10962 * Get the alignment of the whole bounding box of contents, for a
10963 * given box object.
10964 *
10965 * @param o The given box object to get alignment from
10966 * @param horizontal Pointer to a variable where to store the
10967 * horizontal alignment
10968 * @param vertical Pointer to a variable where to store the vertical
10969 * alignment
10970 *
10971 * @see evas_object_box_align_set() for more information
10972 */
10973EAPI void evas_object_box_align_get (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
10974
10975/**
10976 * Set the (space) padding between cells set for a given box object.
10977 *
10978 * @param o The given box object to set padding from
10979 * @param horizontal The horizontal padding, in pixels
10980 * @param vertical the vertical padding, in pixels
10981 *
10982 * @note The default values for both padding components is @c 0.
10983 *
10984 * @see evas_object_box_padding_get()
10985 */
10986EAPI void evas_object_box_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
10987
10988/**
10989 * Get the (space) padding between cells set for a given box object.
10990 *
10991 * @param o The given box object to get padding from
10992 * @param horizontal Pointer to a variable where to store the
10993 * horizontal padding
10994 * @param vertical Pointer to a variable where to store the vertical
10995 * padding
10996 *
10997 * @see evas_object_box_padding_set()
10998 */
10999EAPI void evas_object_box_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
11000
11001/**
11002 * Append a new @a child object to the given box object @a o.
11003 *
11004 * @param o The given box object
11005 * @param child A child Evas object to be made a member of @p o
11006 * @return A box option bound to the recently added box item or @c
11007 * NULL, on errors
11008 *
11009 * On success, the @c "child,added" smart event will take place.
11010 *
11011 * @note The actual placing of the item relative to @p o's area will
11012 * depend on the layout set to it. For example, on horizontal layouts
11013 * an item in the end of the box's list of children will appear on its
11014 * right.
11015 *
11016 * @note This call will trigger the box's _Evas_Object_Box_Api::append
11017 * smart function.
11018 */
11019EAPI Evas_Object_Box_Option *evas_object_box_append (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
11020
11021/**
11022 * Prepend a new @a child object to the given box object @a o.
11023 *
11024 * @param o The given box object
11025 * @param child A child Evas object to be made a member of @p o
11026 * @return A box option bound to the recently added box item or @c
11027 * NULL, on errors
11028 *
11029 * On success, the @c "child,added" smart event will take place.
11030 *
11031 * @note The actual placing of the item relative to @p o's area will
11032 * depend on the layout set to it. For example, on horizontal layouts
11033 * an item in the beginning of the box's list of children will appear
11034 * on its left.
11035 *
11036 * @note This call will trigger the box's
11037 * _Evas_Object_Box_Api::prepend smart function.
11038 */
11039EAPI Evas_Object_Box_Option *evas_object_box_prepend (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
11040
11041/**
11042 * Insert a new @a child object <b>before another existing one</b>, in
11043 * a given box object @a o.
11044 *
11045 * @param o The given box object
11046 * @param child A child Evas object to be made a member of @p o
11047 * @param reference The child object to place this new one before
11048 * @return A box option bound to the recently added box item or @c
11049 * NULL, on errors
11050 *
11051 * On success, the @c "child,added" smart event will take place.
11052 *
11053 * @note This function will fail if @p reference is not a member of @p
11054 * o.
11055 *
11056 * @note The actual placing of the item relative to @p o's area will
11057 * depend on the layout set to it.
11058 *
11059 * @note This call will trigger the box's
11060 * _Evas_Object_Box_Api::insert_before smart function.
11061 */
11062EAPI 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);
11063
11064/**
11065 * Insert a new @a child object <b>after another existing one</b>, in
11066 * a given box object @a o.
11067 *
11068 * @param o The given box object
11069 * @param child A child Evas object to be made a member of @p o
11070 * @param reference The child object to place this new one after
11071 * @return A box option bound to the recently added box item or @c
11072 * NULL, on errors
11073 *
11074 * On success, the @c "child,added" smart event will take place.
11075 *
11076 * @note This function will fail if @p reference is not a member of @p
11077 * o.
11078 *
11079 * @note The actual placing of the item relative to @p o's area will
11080 * depend on the layout set to it.
11081 *
11082 * @note This call will trigger the box's
11083 * _Evas_Object_Box_Api::insert_after smart function.
11084 */
11085EAPI 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);
11086
11087/**
11088 * Insert a new @a child object <b>at a given position</b>, in a given
11089 * box object @a o.
11090 *
11091 * @param o The given box object
11092 * @param child A child Evas object to be made a member of @p o
11093 * @param pos The numeric position (starting from @c 0) to place the
11094 * new child object at
11095 * @return A box option bound to the recently added box item or @c
11096 * NULL, on errors
11097 *
11098 * On success, the @c "child,added" smart event will take place.
11099 *
11100 * @note This function will fail if the given position is invalid,
11101 * given @p o's internal list of elements.
11102 *
11103 * @note The actual placing of the item relative to @p o's area will
11104 * depend on the layout set to it.
11105 *
11106 * @note This call will trigger the box's
11107 * _Evas_Object_Box_Api::insert_at smart function.
11108 */
11109EAPI Evas_Object_Box_Option *evas_object_box_insert_at (Evas_Object *o, Evas_Object *child, unsigned int pos) EINA_ARG_NONNULL(1, 2);
11110
11111/**
11112 * Remove a given object from a box object, unparenting it again.
11113 *
11114 * @param o The box object to remove a child object from
11115 * @param child The handle to the child object to be removed
11116 * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
11117 *
11118 * On removal, you'll get an unparented object again, just as it was
11119 * before you inserted it in the box. The
11120 * _Evas_Object_Box_Api::option_free box smart callback will be called
11121 * automatically for you and, also, the @c "child,removed" smart event
11122 * will take place.
11123 *
11124 * @note This call will trigger the box's _Evas_Object_Box_Api::remove
11125 * smart function.
11126 */
11127EAPI Eina_Bool evas_object_box_remove (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
11128
11129/**
11130 * Remove an object, <b>bound to a given position</b> in a box object,
11131 * unparenting it again.
11132 *
11133 * @param o The box object to remove a child object from
11134 * @param in The numeric position (starting from @c 0) of the child
11135 * object to be removed
11136 * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
11137 *
11138 * On removal, you'll get an unparented object again, just as it was
11139 * before you inserted it in the box. The @c option_free() box smart
11140 * callback will be called automatically for you and, also, the
11141 * @c "child,removed" smart event will take place.
11142 *
11143 * @note This function will fail if the given position is invalid,
11144 * given @p o's internal list of elements.
11145 *
11146 * @note This call will trigger the box's
11147 * _Evas_Object_Box_Api::remove_at smart function.
11148 */
11149EAPI Eina_Bool evas_object_box_remove_at (Evas_Object *o, unsigned int pos) EINA_ARG_NONNULL(1);
11150
11151/**
11152 * Remove @b all child objects from a box object, unparenting them
11153 * again.
11154 *
11155 * @param o The box object to remove a child object from
11156 * @param child The handle to the child object to be removed
11157 * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
11158 *
11159 * This has the same effect of calling evas_object_box_remove() on
11160 * each of @p o's child objects, in sequence. If, and only if, all
11161 * those calls succeed, so does this one.
11162 */
11163EAPI Eina_Bool evas_object_box_remove_all (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
11164
11165/**
11166 * Get an iterator to walk the list of children of a given box object.
11167 *
11168 * @param o The box to retrieve an items iterator from
11169 * @return An iterator on @p o's child objects, on success, or @c NULL,
11170 * on errors
11171 *
11172 * @note Do @b not remove or delete objects while walking the list.
11173 */
11174EAPI Eina_Iterator *evas_object_box_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11175
11176/**
11177 * Get an accessor (a structure providing random items access) to the
11178 * list of children of a given box object.
11179 *
11180 * @param o The box to retrieve an items iterator from
11181 * @return An accessor on @p o's child objects, on success, or @c NULL,
11182 * on errors
11183 *
11184 * @note Do not remove or delete objects while walking the list.
11185 */
11186EAPI Eina_Accessor *evas_object_box_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11187
11188/**
11189 * Get the list of children objects in a given box object.
11190 *
11191 * @param o The box to retrieve an items list from
11192 * @return A list of @p o's child objects, on success, or @c NULL,
11193 * on errors (or if it has no child objects)
11194 *
11195 * The returned list should be freed with @c eina_list_free() when you
11196 * no longer need it.
11197 *
11198 * @note This is a duplicate of the list kept by the box internally.
11199 * It's up to the user to destroy it when it no longer needs it.
11200 * It's possible to remove objects from the box when walking
11201 * this list, but these removals won't be reflected on it.
11202 */
11203EAPI Eina_List *evas_object_box_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11204
11205/**
11206 * Get the name of the property of the child elements of the box @a o
11207 * which have @a id as identifier
11208 *
11209 * @param o The box to search child options from
11210 * @param id The numerical identifier of the option being searched, for
11211 * its name
11212 * @return The name of the given property or @c NULL, on errors.
11213 *
11214 * @note This call won't do anything for a canonical Evas box. Only
11215 * users which have @b subclassed it, setting custom box items options
11216 * (see #Evas_Object_Box_Option) on it, would benefit from this
11217 * function. They'd have to implement it and set it to be the
11218 * _Evas_Object_Box_Api::property_name_get smart class function of the
11219 * box, which is originally set to @c NULL.
11220 */
11221EAPI const char *evas_object_box_option_property_name_get (Evas_Object *o, int property) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
11222
11223/**
11224 * Get the numerical identifier of the property of the child elements
11225 * of the box @a o which have @a name as name string
11226 *
11227 * @param o The box to search child options from
11228 * @param name The name string of the option being searched, for
11229 * its ID
11230 * @return The numerical ID of the given property or @c -1, on
11231 * errors.
11232 *
11233 * @note This call won't do anything for a canonical Evas box. Only
11234 * users which have @b subclassed it, setting custom box items options
11235 * (see #Evas_Object_Box_Option) on it, would benefit from this
11236 * function. They'd have to implement it and set it to be the
11237 * _Evas_Object_Box_Api::property_id_get smart class function of the
11238 * box, which is originally set to @c NULL.
11239 */
11240EAPI int evas_object_box_option_property_id_get (Evas_Object *o, const char *name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
11241
11242/**
11243 * Set a property value (by its given numerical identifier), on a
11244 * given box child element
11245 *
11246 * @param o The box parenting the child element
11247 * @param opt The box option structure bound to the child box element
11248 * to set a property on
11249 * @param id The numerical ID of the given property
11250 * @param ... (List of) actual value(s) to be set for this
11251 * property. It (they) @b must be of the same type the user has
11252 * defined for it (them).
11253 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
11254 *
11255 * @note This call won't do anything for a canonical Evas box. Only
11256 * users which have @b subclassed it, setting custom box items options
11257 * (see #Evas_Object_Box_Option) on it, would benefit from this
11258 * function. They'd have to implement it and set it to be the
11259 * _Evas_Object_Box_Api::property_set smart class function of the box,
11260 * which is originally set to @c NULL.
11261 *
11262 * @note This function will internally create a variable argument
11263 * list, with the values passed after @p property, and call
11264 * evas_object_box_option_property_vset() with this list and the same
11265 * previous arguments.
11266 */
11267EAPI Eina_Bool evas_object_box_option_property_set (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
11268
11269/**
11270 * Set a property value (by its given numerical identifier), on a
11271 * given box child element -- by a variable argument list
11272 *
11273 * @param o The box parenting the child element
11274 * @param opt The box option structure bound to the child box element
11275 * to set a property on
11276 * @param id The numerical ID of the given property
11277 * @param va_list The variable argument list implementing the value to
11278 * be set for this property. It @b must be of the same type the user has
11279 * defined for it.
11280 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
11281 *
11282 * This is a variable argument list variant of the
11283 * evas_object_box_option_property_set(). See its documentation for
11284 * more details.
11285 */
11286EAPI 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);
11287
11288/**
11289 * Get a property's value (by its given numerical identifier), on a
11290 * given box child element
11291 *
11292 * @param o The box parenting the child element
11293 * @param opt The box option structure bound to the child box element
11294 * to get a property from
11295 * @param id The numerical ID of the given property
11296 * @param ... (List of) pointer(s) where to store the value(s) set for
11297 * this property. It (they) @b must point to variable(s) of the same
11298 * type the user has defined for it (them).
11299 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
11300 *
11301 * @note This call won't do anything for a canonical Evas box. Only
11302 * users which have @b subclassed it, getting custom box items options
11303 * (see #Evas_Object_Box_Option) on it, would benefit from this
11304 * function. They'd have to implement it and get it to be the
11305 * _Evas_Object_Box_Api::property_get smart class function of the
11306 * box, which is originally get to @c NULL.
11307 *
11308 * @note This function will internally create a variable argument
11309 * list, with the values passed after @p property, and call
11310 * evas_object_box_option_property_vget() with this list and the same
11311 * previous arguments.
11312 */
11313EAPI Eina_Bool evas_object_box_option_property_get (Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...) EINA_ARG_NONNULL(1, 2);
11314
11315/**
11316 * Get a property's value (by its given numerical identifier), on a
11317 * given box child element -- by a variable argument list
11318 *
11319 * @param o The box parenting the child element
11320 * @param opt The box option structure bound to the child box element
11321 * to get a property from
11322 * @param id The numerical ID of the given property
11323 * @param va_list The variable argument list with pointers to where to
11324 * store the values of this property. They @b must point to variables
11325 * of the same type the user has defined for them.
11326 * @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
11327 *
11328 * This is a variable argument list variant of the
11329 * evas_object_box_option_property_get(). See its documentation for
11330 * more details.
11331 */
11332EAPI 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);
11333
11334/**
11335 * @}
11336 */
11337
11338/**
11339 * @defgroup Evas_Object_Table Table Smart Object.
11340 *
11341 * Convenience smart object that packs children using a tabular
11342 * layout using children size hints to define their size and
11343 * alignment inside their cell space.
11344 *
11345 * @ref tutorial_table shows how to use this Evas_Object.
11346 *
11347 * @see @ref Evas_Object_Group_Size_Hints
11348 *
11349 * @ingroup Evas_Smart_Object_Group
11350 *
11351 * @{
11352 */
11353
11354/**
11355 * @brief Create a new table.
11356 *
11357 * @param evas Canvas in which table will be added.
11358 */
11359EAPI Evas_Object *evas_object_table_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11360
11361/**
11362 * @brief Create a table that is child of a given element @a parent.
11363 *
11364 * @see evas_object_table_add()
11365 */
11366EAPI Evas_Object *evas_object_table_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11367
11368/**
11369 * @brief Set how this table should layout children.
11370 *
11371 * @todo consider aspect hint and respect it.
11372 *
11373 * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE
11374 * If table does not use homogeneous mode then columns and rows will
11375 * be calculated based on hints of individual cells. This operation
11376 * mode is more flexible, but more complex and heavy to calculate as
11377 * well. @b Weight properties are handled as a boolean expand. Negative
11378 * alignment will be considered as 0.5. This is the default.
11379 *
11380 * @todo @c EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE should balance weight.
11381 *
11382 * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE
11383 * When homogeneous is relative to table the own table size is divided
11384 * equally among children, filling the whole table area. That is, if
11385 * table has @c WIDTH and @c COLUMNS, each cell will get <tt>WIDTH /
11386 * COLUMNS</tt> pixels. If children have minimum size that is larger
11387 * than this amount (including padding), then it will overflow and be
11388 * aligned respecting the alignment hint, possible overlapping sibling
11389 * cells. @b Weight hint is used as a boolean, if greater than zero it
11390 * will make the child expand in that axis, taking as much space as
11391 * possible (bounded to maximum size hint). Negative alignment will be
11392 * considered as 0.5.
11393 *
11394 * @par EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM
11395 * When homogeneous is relative to item it means the greatest minimum
11396 * cell size will be used. That is, if no element is set to expand,
11397 * the table will have its contents to a minimum size, the bounding
11398 * box of all these children will be aligned relatively to the table
11399 * object using evas_object_table_align_get(). If the table area is
11400 * too small to hold this minimum bounding box, then the objects will
11401 * keep their size and the bounding box will overflow the box area,
11402 * still respecting the alignment. @b Weight hint is used as a
11403 * boolean, if greater than zero it will make that cell expand in that
11404 * axis, toggling the <b>expand mode</b>, which makes the table behave
11405 * much like @b EVAS_OBJECT_TABLE_HOMOGENEOUS_TABLE, except that the
11406 * bounding box will overflow and items will not overlap siblings. If
11407 * no minimum size is provided at all then the table will fallback to
11408 * expand mode as well.
11409 */
11410EAPI void evas_object_table_homogeneous_set (Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous) EINA_ARG_NONNULL(1);
11411
11412/**
11413 * Get the current layout homogeneous mode.
11414 *
11415 * @see evas_object_table_homogeneous_set()
11416 */
11417EAPI Evas_Object_Table_Homogeneous_Mode evas_object_table_homogeneous_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
11418
11419/**
11420 * Set padding between cells.
11421 */
11422EAPI void evas_object_table_padding_set (Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical) EINA_ARG_NONNULL(1);
11423
11424/**
11425 * Get padding between cells.
11426 */
11427EAPI void evas_object_table_padding_get (const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical) EINA_ARG_NONNULL(1);
11428
11429/**
11430 * Set the alignment of the whole bounding box of contents.
11431 */
11432EAPI void evas_object_table_align_set (Evas_Object *o, double horizontal, double vertical) EINA_ARG_NONNULL(1);
11433
11434/**
11435 * Get alignment of the whole bounding box of contents.
11436 */
11437EAPI void evas_object_table_align_get (const Evas_Object *o, double *horizontal, double *vertical) EINA_ARG_NONNULL(1);
11438
11439/**
11440 * Sets the mirrored mode of the table. In mirrored mode the table items go
11441 * from right to left instead of left to right. That is, 1,1 is top right, not
11442 * top left.
11443 *
11444 * @param obj The table object.
11445 * @param mirrored the mirrored mode to set
11446 * @since 1.1.0
11447 */
11448EAPI void evas_object_table_mirrored_set (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
11449
11450/**
11451 * Gets the mirrored mode of the table.
11452 *
11453 * @param obj The table object.
11454 * @return EINA_TRUE if it's a mirrored table, EINA_FALSE otherwise.
11455 * @since 1.1.0
11456 * @see evas_object_table_mirrored_set()
11457 */
11458EAPI Eina_Bool evas_object_table_mirrored_get (const Evas_Object *o) EINA_ARG_NONNULL(1);
11459
11460/**
11461 * Get packing location of a child of table
11462 *
11463 * @param o The given table object.
11464 * @param child The child object to add.
11465 * @param col pointer to store relative-horizontal position to place child.
11466 * @param row pointer to store relative-vertical position to place child.
11467 * @param colspan pointer to store how many relative-horizontal position to use for this child.
11468 * @param rowspan pointer to store how many relative-vertical position to use for this child.
11469 *
11470 * @return 1 on success, 0 on failure.
11471 * @since 1.1.0
11472 */
11473EAPI 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);
11474
11475/**
11476 * Add a new child to a table object or set its current packing.
11477 *
11478 * @param o The given table object.
11479 * @param child The child object to add.
11480 * @param col relative-horizontal position to place child.
11481 * @param row relative-vertical position to place child.
11482 * @param colspan how many relative-horizontal position to use for this child.
11483 * @param rowspan how many relative-vertical position to use for this child.
11484 *
11485 * @return 1 on success, 0 on failure.
11486 */
11487EAPI 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);
11488
11489/**
11490 * Remove child from table.
11491 *
11492 * @note removing a child will immediately call a walk over children in order
11493 * to recalculate numbers of columns and rows. If you plan to remove
11494 * all children, use evas_object_table_clear() instead.
11495 *
11496 * @return 1 on success, 0 on failure.
11497 */
11498EAPI Eina_Bool evas_object_table_unpack (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
11499
11500/**
11501 * Faster way to remove all child objects from a table object.
11502 *
11503 * @param o The given table object.
11504 * @param clear if true, it will delete just removed children.
11505 */
11506EAPI void evas_object_table_clear (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
11507
11508/**
11509 * Get the number of columns and rows this table takes.
11510 *
11511 * @note columns and rows are virtual entities, one can specify a table
11512 * with a single object that takes 4 columns and 5 rows. The only
11513 * difference for a single cell table is that paddings will be
11514 * accounted proportionally.
11515 */
11516EAPI void evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows) EINA_ARG_NONNULL(1);
11517
11518/**
11519 * Get an iterator to walk the list of children for the table.
11520 *
11521 * @note Do not remove or delete objects while walking the list.
11522 */
11523EAPI Eina_Iterator *evas_object_table_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11524
11525/**
11526 * Get an accessor to get random access to the list of children for the table.
11527 *
11528 * @note Do not remove or delete objects while walking the list.
11529 */
11530EAPI Eina_Accessor *evas_object_table_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11531
11532/**
11533 * Get the list of children for the table.
11534 *
11535 * @note This is a duplicate of the list kept by the table internally.
11536 * It's up to the user to destroy it when it no longer needs it.
11537 * It's possible to remove objects from the table when walking this
11538 * list, but these removals won't be reflected on it.
11539 */
11540EAPI Eina_List *evas_object_table_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11541
11542/**
11543 * Get the child of the table at the given coordinates
11544 *
11545 * @note This does not take into account col/row spanning
11546 */
11547EAPI Evas_Object *evas_object_table_child_get (const Evas_Object *o, unsigned short col, unsigned short row) EINA_ARG_NONNULL(1);
11548/**
11549 * @}
11550 */
11551
11552/**
11553 * @defgroup Evas_Object_Grid Grid Smart Object.
11554 *
11555 * Convenience smart object that packs children under a regular grid
11556 * layout, using their virtual grid location and size to determine
11557 * children's positions inside the grid object's area.
11558 *
11559 * @ingroup Evas_Smart_Object_Group
11560 * @since 1.1.0
11561 */
11562
11563/**
11564 * @addtogroup Evas_Object_Grid
11565 * @{
11566 */
11567
11568/**
11569 * Create a new grid.
11570 *
11571 * It's set to a virtual size of 1x1 by default and add children with
11572 * evas_object_grid_pack().
11573 * @since 1.1.0
11574 */
11575EAPI Evas_Object *evas_object_grid_add (Evas *evas) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11576
11577/**
11578 * Create a grid that is child of a given element @a parent.
11579 *
11580 * @see evas_object_grid_add()
11581 * @since 1.1.0
11582 */
11583EAPI Evas_Object *evas_object_grid_add_to (Evas_Object *parent) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11584
11585/**
11586 * Set the virtual resolution for the grid
11587 *
11588 * @param o The grid object to modify
11589 * @param w The virtual horizontal size (resolution) in integer units
11590 * @param h The virtual vertical size (resolution) in integer units
11591 * @since 1.1.0
11592 */
11593EAPI void evas_object_grid_size_set (Evas_Object *o, int w, int h) EINA_ARG_NONNULL(1);
11594
11595/**
11596 * Get the current virtual resolution
11597 *
11598 * @param o The grid object to query
11599 * @param w A pointer to an integer to store the virtual width
11600 * @param h A pointer to an integer to store the virtual height
11601 * @see evas_object_grid_size_set()
11602 * @since 1.1.0
11603 */
11604EAPI void evas_object_grid_size_get (const Evas_Object *o, int *w, int *h) EINA_ARG_NONNULL(1);
11605
11606/**
11607 * Sets the mirrored mode of the grid. In mirrored mode the grid items go
11608 * from right to left instead of left to right. That is, 0,0 is top right, not
11609 * to left.
11610 *
11611 * @param obj The grid object.
11612 * @param mirrored the mirrored mode to set
11613 * @since 1.1.0
11614 */
11615EAPI void evas_object_grid_mirrored_set (Evas_Object *o, Eina_Bool mirrored) EINA_ARG_NONNULL(1);
11616
11617/**
11618 * Gets the mirrored mode of the grid.
11619 *
11620 * @param obj The grid object.
11621 * @return EINA_TRUE if it's a mirrored grid, EINA_FALSE otherwise.
11622 * @see evas_object_grid_mirrored_set()
11623 * @since 1.1.0
11624 */
11625EAPI Eina_Bool evas_object_grid_mirrored_get (const Evas_Object *o) EINA_ARG_NONNULL(1);
11626
11627/**
11628 * Add a new child to a grid object.
11629 *
11630 * @param o The given grid object.
11631 * @param child The child object to add.
11632 * @param x The virtual x coordinate of the child
11633 * @param y The virtual y coordinate of the child
11634 * @param w The virtual width of the child
11635 * @param h The virtual height of the child
11636 * @return 1 on success, 0 on failure.
11637 * @since 1.1.0
11638 */
11639EAPI 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);
11640
11641/**
11642 * Remove child from grid.
11643 *
11644 * @note removing a child will immediately call a walk over children in order
11645 * to recalculate numbers of columns and rows. If you plan to remove
11646 * all children, use evas_object_grid_clear() instead.
11647 *
11648 * @return 1 on success, 0 on failure.
11649 * @since 1.1.0
11650 */
11651EAPI Eina_Bool evas_object_grid_unpack (Evas_Object *o, Evas_Object *child) EINA_ARG_NONNULL(1, 2);
11652
11653/**
11654 * Faster way to remove all child objects from a grid object.
11655 *
11656 * @param o The given grid object.
11657 * @param clear if true, it will delete just removed children.
11658 * @since 1.1.0
11659 */
11660EAPI void evas_object_grid_clear (Evas_Object *o, Eina_Bool clear) EINA_ARG_NONNULL(1);
11661
11662/**
11663 * Get the pack options for a grid child
11664 *
11665 * Get the pack x, y, width and height in virtual coordinates set by
11666 * evas_object_grid_pack()
11667 * @param o The grid object
11668 * @param child The grid child to query for coordinates
11669 * @param x The pointer to where the x coordinate will be returned
11670 * @param y The pointer to where the y coordinate will be returned
11671 * @param w The pointer to where the width will be returned
11672 * @param h The pointer to where the height will be returned
11673 * @return 1 on success, 0 on failure.
11674 * @since 1.1.0
11675 */
11676EAPI Eina_Bool evas_object_grid_pack_get (Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h);
11677
11678/**
11679 * Get an iterator to walk the list of children for the grid.
11680 *
11681 * @note Do not remove or delete objects while walking the list.
11682 * @since 1.1.0
11683 */
11684EAPI Eina_Iterator *evas_object_grid_iterator_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11685
11686/**
11687 * Get an accessor to get random access to the list of children for the grid.
11688 *
11689 * @note Do not remove or delete objects while walking the list.
11690 * @since 1.1.0
11691 */
11692EAPI Eina_Accessor *evas_object_grid_accessor_new (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11693
11694/**
11695 * Get the list of children for the grid.
11696 *
11697 * @note This is a duplicate of the list kept by the grid internally.
11698 * It's up to the user to destroy it when it no longer needs it.
11699 * It's possible to remove objects from the grid when walking this
11700 * list, but these removals won't be reflected on it.
11701 * @since 1.1.0
11702 */
11703EAPI Eina_List *evas_object_grid_children_get (const Evas_Object *o) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
11704
11705/**
11706 * @}
11707 */
11708
11709/**
11710 * @defgroup Evas_Cserve Shared Image Cache Server
11711 *
11712 * Evas has an (optional) module which provides client-server
11713 * infrastructure to <b>share bitmaps across multiple processes</b>,
11714 * saving data and processing power.
11715 *
11716 * Be warned that it @b doesn't work when <b>threaded image
11717 * preloading</b> is enabled for Evas, though.
11718 */
11719 typedef struct _Evas_Cserve_Stats Evas_Cserve_Stats;
11720 typedef struct _Evas_Cserve_Image_Cache Evas_Cserve_Image_Cache;
11721 typedef struct _Evas_Cserve_Image Evas_Cserve_Image;
11722 typedef struct _Evas_Cserve_Config Evas_Cserve_Config;
11723
11724/**
11725 * Statistics about the server that shares cached bitmaps.
11726 * @ingroup Evas_Cserve
11727 */
11728 struct _Evas_Cserve_Stats
11729 {
11730 int saved_memory; /**< current amount of saved memory, in bytes */
11731 int wasted_memory; /**< current amount of wasted memory, in bytes */
11732 int saved_memory_peak; /**< peak amount of saved memory, in bytes */
11733 int wasted_memory_peak; /**< peak amount of wasted memory, in bytes */
11734 double saved_time_image_header_load; /**< time, in seconds, saved in header loads by sharing cached loads instead */
11735 double saved_time_image_data_load; /**< time, in seconds, saved in data loads by sharing cached loads instead */
11736 };
11737
11738/**
11739 * A handle of a cache of images shared by a server.
11740 * @ingroup Evas_Cserve
11741 */
11742 struct _Evas_Cserve_Image_Cache
11743 {
11744 struct {
11745 int mem_total;
11746 int count;
11747 } active, cached;
11748 Eina_List *images;
11749 };
11750
11751/**
11752 * A handle to an image shared by a server.
11753 * @ingroup Evas_Cserve
11754 */
11755 struct _Evas_Cserve_Image
11756 {
11757 const char *file, *key;
11758 int w, h;
11759 time_t file_mod_time;
11760 time_t file_checked_time;
11761 time_t cached_time;
11762 int refcount;
11763 int data_refcount;
11764 int memory_footprint;
11765 double head_load_time;
11766 double data_load_time;
11767 Eina_Bool alpha : 1;
11768 Eina_Bool data_loaded : 1;
11769 Eina_Bool active : 1;
11770 Eina_Bool dead : 1;
11771 Eina_Bool useless : 1;
11772 };
11773
11774/**
11775 * Configuration that controls the server that shares cached bitmaps.
11776 * @ingroup Evas_Cserve
11777 */
11778 struct _Evas_Cserve_Config
11779 {
11780 int cache_max_usage;
11781 int cache_item_timeout;
11782 int cache_item_timeout_check;
11783 };
11784
11785
11786/**
11787 * Retrieves if the system wants to share bitmaps using the server.
11788 * @return @c EINA_TRUE if it wants, @c EINA_FALSE otherwise.
11789 * @ingroup Evas_Cserve
11790 */
11791EAPI Eina_Bool evas_cserve_want_get (void) EINA_WARN_UNUSED_RESULT;
11792
11793/**
11794 * Retrieves if the system is connected to the server used to share
11795 * bitmaps.
11796 *
11797 * @return @c EINA_TRUE if it's connected, @c EINA_FALSE otherwise.
11798 * @ingroup Evas_Cserve
11799 */
11800EAPI Eina_Bool evas_cserve_connected_get (void) EINA_WARN_UNUSED_RESULT;
11801
11802/**
11803 * Retrieves statistics from a running bitmap sharing server.
11804 * @param stats pointer to structure to fill with statistics about the
11805 * bitmap cache server.
11806 *
11807 * @return @c EINA_TRUE if @p stats were filled with data,
11808 * @c EINA_FALSE otherwise (when @p stats is untouched)
11809 * @ingroup Evas_Cserve
11810 */
11811EAPI Eina_Bool evas_cserve_stats_get (Evas_Cserve_Stats *stats) EINA_WARN_UNUSED_RESULT;
11812
11813/**
11814 * Completely discard/clean a given images cache, thus re-setting it.
11815 *
11816 * @param cache A handle to the given images cache.
11817 */
11818EAPI void evas_cserve_image_cache_contents_clean (Evas_Cserve_Image_Cache *cache);
11819
11820/**
11821 * Retrieves the current configuration of the Evas image caching
11822 * server.
11823 *
11824 * @param config where to store current image caching server's
11825 * configuration.
11826 *
11827 * @return @c EINA_TRUE if @p config was filled with data,
11828 * @c EINA_FALSE otherwise (when @p config is untouched)
11829 *
11830 * The fields of @p config will be altered to reflect the current
11831 * configuration's values.
11832 *
11833 * @see evas_cserve_config_set()
11834 *
11835 * @ingroup Evas_Cserve
11836 */
11837EAPI Eina_Bool evas_cserve_config_get (Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT;
11838
11839/**
11840 * Changes the configurations of the Evas image caching server.
11841 *
11842 * @param config A bitmap cache configuration handle with fields set
11843 * to desired configuration values.
11844 * @return @c EINA_TRUE if @p config was successfully applied,
11845 * @c EINA_FALSE otherwise.
11846 *
11847 * @see evas_cserve_config_get()
11848 *
11849 * @ingroup Evas_Cserve
11850 */
11851EAPI Eina_Bool evas_cserve_config_set (const Evas_Cserve_Config *config) EINA_WARN_UNUSED_RESULT;
11852
11853/**
11854 * Force the system to disconnect from the bitmap caching server.
11855 *
11856 * @ingroup Evas_Cserve
11857 */
11858EAPI void evas_cserve_disconnect (void);
11859
11860/**
11861 * @defgroup Evas_Utils General Utilities
11862 *
11863 * Some functions that are handy but are not specific of canvas or
11864 * objects.
11865 */
11866
11867/**
11868 * Converts the given Evas image load error code into a string
11869 * describing it in english.
11870 *
11871 * @param error the error code, a value in ::Evas_Load_Error.
11872 * @return Always returns a valid string. If the given @p error is not
11873 * supported, <code>"Unknown error"</code> is returned.
11874 *
11875 * Mostly evas_object_image_file_set() would be the function setting
11876 * that error value afterwards, but also evas_object_image_load(),
11877 * evas_object_image_save(), evas_object_image_data_get(),
11878 * evas_object_image_data_convert(), evas_object_image_pixels_import()
11879 * and evas_object_image_is_inside(). This function is meant to be
11880 * used in conjunction with evas_object_image_load_error_get(), as in:
11881 *
11882 * Example code:
11883 * @dontinclude evas-load-error-str.c
11884 * @skip img1 =
11885 * @until ecore_main_loop_begin(
11886 *
11887 * Here, being @c valid_path the path to a valid image and @c
11888 * bogus_path a path to a file which does not exist, the two outputs
11889 * of evas_load_error_str() would be (if no other errors occur):
11890 * <code>"No error on load"</code> and <code>"File (or file path) does
11891 * not exist"</code>, respectively. See the full @ref
11892 * Example_Evas_Images "example".
11893 *
11894 * @ingroup Evas_Utils
11895 */
11896EAPI const char *evas_load_error_str (Evas_Load_Error error);
11897
11898/* Evas utility routines for color space conversions */
11899/* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */
11900/* rgb color space has r,g,b in the range 0 to 255 */
11901
11902/**
11903 * Convert a given color from HSV to RGB format.
11904 *
11905 * @param h The Hue component of the color.
11906 * @param s The Saturation component of the color.
11907 * @param v The Value component of the color.
11908 * @param r The Red component of the color.
11909 * @param g The Green component of the color.
11910 * @param b The Blue component of the color.
11911 *
11912 * This function converts a given color in HSV color format to RGB
11913 * color format.
11914 *
11915 * @ingroup Evas_Utils
11916 **/
11917EAPI void evas_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
11918
11919/**
11920 * Convert a given color from RGB to HSV format.
11921 *
11922 * @param r The Red component of the color.
11923 * @param g The Green component of the color.
11924 * @param b The Blue component of the color.
11925 * @param h The Hue component of the color.
11926 * @param s The Saturation component of the color.
11927 * @param v The Value component of the color.
11928 *
11929 * This function converts a given color in RGB color format to HSV
11930 * color format.
11931 *
11932 * @ingroup Evas_Utils
11933 **/
11934EAPI void evas_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
11935
11936/* argb color space has a,r,g,b in the range 0 to 255 */
11937
11938/**
11939 * Pre-multiplies a rgb triplet by an alpha factor.
11940 *
11941 * @param a The alpha factor.
11942 * @param r The Red component of the color.
11943 * @param g The Green component of the color.
11944 * @param b The Blue component of the color.
11945 *
11946 * This function pre-multiplies a given rgb triplet by an alpha
11947 * factor. Alpha factor is used to define transparency.
11948 *
11949 * @ingroup Evas_Utils
11950 **/
11951EAPI void evas_color_argb_premul (int a, int *r, int *g, int *b);
11952
11953/**
11954 * Undo pre-multiplication of a rgb triplet by an alpha factor.
11955 *
11956 * @param a The alpha factor.
11957 * @param r The Red component of the color.
11958 * @param g The Green component of the color.
11959 * @param b The Blue component of the color.
11960 *
11961 * This function undoes pre-multiplication a given rbg triplet by an
11962 * alpha factor. Alpha factor is used to define transparency.
11963 *
11964 * @see evas_color_argb_premul().
11965 *
11966 * @ingroup Evas_Utils
11967 **/
11968EAPI void evas_color_argb_unpremul (int a, int *r, int *g, int *b);
11969
11970
11971/**
11972 * Pre-multiplies data by an alpha factor.
11973 *
11974 * @param data The data value.
11975 * @param len The length value.
11976 *
11977 * This function pre-multiplies a given data by an alpha
11978 * factor. Alpha factor is used to define transparency.
11979 *
11980 * @ingroup Evas_Utils
11981 **/
11982EAPI void evas_data_argb_premul (unsigned int *data, unsigned int len);
11983
11984/**
11985 * Undo pre-multiplication data by an alpha factor.
11986 *
11987 * @param data The data value.
11988 * @param len The length value.
11989 *
11990 * This function undoes pre-multiplication of a given data by an alpha
11991 * factor. Alpha factor is used to define transparency.
11992 *
11993 * @ingroup Evas_Utils
11994 **/
11995EAPI void evas_data_argb_unpremul (unsigned int *data, unsigned int len);
11996
11997/* string and font handling */
11998
11999/**
12000 * Gets the next character in the string
12001 *
12002 * Given the UTF-8 string in @p str, and starting byte position in @p pos,
12003 * this function will place in @p decoded the decoded code point at @p pos
12004 * and return the byte index for the next character in the string.
12005 *
12006 * The only boundary check done is that @p pos must be >= 0. Other than that,
12007 * no checks are performed, so passing an index value that's not within the
12008 * length of the string will result in undefined behavior.
12009 *
12010 * @param str The UTF-8 string
12011 * @param pos The byte index where to start
12012 * @param decoded Address where to store the decoded code point. Optional.
12013 *
12014 * @return The byte index of the next character
12015 *
12016 * @ingroup Evas_Utils
12017 */
12018EAPI int evas_string_char_next_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
12019
12020/**
12021 * Gets the previous character in the string
12022 *
12023 * Given the UTF-8 string in @p str, and starting byte position in @p pos,
12024 * this function will place in @p decoded the decoded code point at @p pos
12025 * and return the byte index for the previous character in the string.
12026 *
12027 * The only boundary check done is that @p pos must be >= 1. Other than that,
12028 * no checks are performed, so passing an index value that's not within the
12029 * length of the string will result in undefined behavior.
12030 *
12031 * @param str The UTF-8 string
12032 * @param pos The byte index where to start
12033 * @param decoded Address where to store the decoded code point. Optional.
12034 *
12035 * @return The byte index of the previous character
12036 *
12037 * @ingroup Evas_Utils
12038 */
12039EAPI int evas_string_char_prev_get (const char *str, int pos, int *decoded) EINA_ARG_NONNULL(1);
12040
12041/**
12042 * Get the length in characters of the string.
12043 * @param str The string to get the length of.
12044 * @return The length in characters (not bytes)
12045 * @ingroup Evas_Utils
12046 */
12047EAPI int evas_string_char_len_get (const char *str) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
12048
12049/**
12050 * @defgroup Evas_Keys Key Input Functions
12051 *
12052 * Functions which feed key events to the canvas.
12053 *
12054 * As explained in @ref intro_not_evas, Evas is @b not aware of input
12055 * systems at all. Then, the user, if using it crudely (evas_new()),
12056 * will have to feed it with input events, so that it can react
12057 * somehow. If, however, the user creates a canvas by means of the
12058 * Ecore_Evas wrapper, it will automatically bind the chosen display
12059 * engine's input events to the canvas, for you.
12060 *
12061 * This group presents the functions dealing with the feeding of key
12062 * events to the canvas. On most of them, one has to reference a given
12063 * key by a name (<code>keyname</code> argument). Those are
12064 * <b>platform dependent</b> symbolic names for the keys. Sometimes
12065 * you'll get the right <code>keyname</code> by simply using an ASCII
12066 * value of the key name, but it won't be like that always.
12067 *
12068 * Typical platforms are Linux frame buffer (Ecore_FB) and X server
12069 * (Ecore_X) when using Evas with Ecore and Ecore_Evas. Please refer
12070 * to your display engine's documentation when using evas through an
12071 * Ecore helper wrapper when you need the <code>keyname</code>s.
12072 *
12073 * Example:
12074 * @dontinclude evas-events.c
12075 * @skip mods = evas_key_modifier_get(evas);
12076 * @until {
12077 *
12078 * All the other @c evas_key functions behave on the same manner. See
12079 * the full @ref Example_Evas_Events "example".
12080 *
12081 * @ingroup Evas_Canvas
12082 */
12083
12084/**
12085 * @addtogroup Evas_Keys
12086 * @{
12087 */
12088
12089/**
12090 * Returns a handle to the list of modifier keys registered in the
12091 * canvas @p e. This is required to check for which modifiers are set
12092 * at a given time with the evas_key_modifier_is_set() function.
12093 *
12094 * @param e The pointer to the Evas canvas
12095 *
12096 * @see evas_key_modifier_add
12097 * @see evas_key_modifier_del
12098 * @see evas_key_modifier_on
12099 * @see evas_key_modifier_off
12100 * @see evas_key_modifier_is_set
12101 *
12102 * @return An ::Evas_Modifier handle to query Evas' keys subsystem
12103 * with evas_key_modifier_is_set(), or @c NULL on error.
12104 */
12105EAPI const Evas_Modifier *evas_key_modifier_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
12106
12107/**
12108 * Returns a handle to the list of lock keys registered in the canvas
12109 * @p e. This is required to check for which locks are set at a given
12110 * time with the evas_key_lock_is_set() function.
12111 *
12112 * @param e The pointer to the Evas canvas
12113 *
12114 * @see evas_key_lock_add
12115 * @see evas_key_lock_del
12116 * @see evas_key_lock_on
12117 * @see evas_key_lock_off
12118 * @see evas_key_lock_is_set
12119 *
12120 * @return An ::Evas_Lock handle to query Evas' keys subsystem with
12121 * evas_key_lock_is_set(), or @c NULL on error.
12122 */
12123EAPI const Evas_Lock *evas_key_lock_get (const Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
12124
12125
12126/**
12127 * Checks the state of a given modifier key, at the time of the
12128 * call. If the modifier is set, such as shift being pressed, this
12129 * function returns @c Eina_True.
12130 *
12131 * @param m The current modifiers set, as returned by
12132 * evas_key_modifier_get().
12133 * @param keyname The name of the modifier key to check status for.
12134 *
12135 * @return @c Eina_True if the modifier key named @p keyname is on, @c
12136 * Eina_False otherwise.
12137 *
12138 * @see evas_key_modifier_add
12139 * @see evas_key_modifier_del
12140 * @see evas_key_modifier_get
12141 * @see evas_key_modifier_on
12142 * @see evas_key_modifier_off
12143 */
12144EAPI Eina_Bool evas_key_modifier_is_set (const Evas_Modifier *m, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
12145
12146
12147/**
12148 * Checks the state of a given lock key, at the time of the call. If
12149 * the lock is set, such as caps lock, this function returns @c
12150 * Eina_True.
12151 *
12152 * @param l The current locks set, as returned by evas_key_lock_get().
12153 * @param keyname The name of the lock key to check status for.
12154 *
12155 * @return @c Eina_True if the @p keyname lock key is set, @c
12156 * Eina_False otherwise.
12157 *
12158 * @see evas_key_lock_get
12159 * @see evas_key_lock_add
12160 * @see evas_key_lock_del
12161 * @see evas_key_lock_on
12162 * @see evas_key_lock_off
12163 */
12164EAPI Eina_Bool evas_key_lock_is_set (const Evas_Lock *l, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
12165
12166
12167/**
12168 * Adds the @p keyname key to the current list of modifier keys.
12169 *
12170 * @param e The pointer to the Evas canvas
12171 * @param keyname The name of the modifier key to add to the list of
12172 * Evas modifiers.
12173 *
12174 * Modifiers are keys like shift, alt and ctrl, i.e., keys which are
12175 * meant to be pressed together with others, altering the behavior of
12176 * the secondly pressed keys somehow. Evas is so that these keys can
12177 * be user defined.
12178 *
12179 * This call allows custom modifiers to be added to the Evas system at
12180 * run time. It is then possible to set and unset modifier keys
12181 * programmatically for other parts of the program to check and act
12182 * on. Programmers using Evas would check for modifier keys on key
12183 * event callbacks using evas_key_modifier_is_set().
12184 *
12185 * @see evas_key_modifier_del
12186 * @see evas_key_modifier_get
12187 * @see evas_key_modifier_on
12188 * @see evas_key_modifier_off
12189 * @see evas_key_modifier_is_set
12190 *
12191 * @note If the programmer instantiates the canvas by means of the
12192 * ecore_evas_new() family of helper functions, Ecore will take
12193 * care of registering on it all standard modifiers: "Shift",
12194 * "Control", "Alt", "Meta", "Hyper", "Super".
12195 */
12196EAPI void evas_key_modifier_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12197
12198/**
12199 * Removes the @p keyname key from the current list of modifier keys
12200 * on canvas @e.
12201 *
12202 * @param e The pointer to the Evas canvas
12203 * @param keyname The name of the key to remove from the modifiers list.
12204 *
12205 * @see evas_key_modifier_add
12206 * @see evas_key_modifier_get
12207 * @see evas_key_modifier_on
12208 * @see evas_key_modifier_off
12209 * @see evas_key_modifier_is_set
12210 */
12211EAPI void evas_key_modifier_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12212
12213/**
12214 * Adds the @p keyname key to the current list of lock keys.
12215 *
12216 * @param e The pointer to the Evas canvas
12217 * @param keyname The name of the key to add to the locks list.
12218 *
12219 * Locks are keys like caps lock, num lock or scroll lock, i.e., keys
12220 * which are meant to be pressed once -- toggling a binary state which
12221 * is bound to it -- and thus altering the behavior of all
12222 * subsequently pressed keys somehow, depending on its state. Evas is
12223 * so that these keys can be defined by the user.
12224 *
12225 * This allows custom locks to be added to the evas system at run
12226 * time. It is then possible to set and unset lock keys
12227 * programmatically for other parts of the program to check and act
12228 * on. Programmers using Evas would check for lock keys on key event
12229 * callbacks using evas_key_lock_is_set().
12230 *
12231 * @see evas_key_lock_get
12232 * @see evas_key_lock_del
12233 * @see evas_key_lock_on
12234 * @see evas_key_lock_off
12235 * @see evas_key_lock_is_set
12236 *
12237 * @note If the programmer instantiates the canvas by means of the
12238 * ecore_evas_new() family of helper functions, Ecore will take
12239 * care of registering on it all standard lock keys: "Caps_Lock",
12240 * "Num_Lock", "Scroll_Lock".
12241 */
12242EAPI void evas_key_lock_add (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12243
12244/**
12245 * Removes the @p keyname key from the current list of lock keys on
12246 * canvas @e.
12247 *
12248 * @param e The pointer to the Evas canvas
12249 * @param keyname The name of the key to remove from the locks list.
12250 *
12251 * @see evas_key_lock_get
12252 * @see evas_key_lock_add
12253 * @see evas_key_lock_on
12254 * @see evas_key_lock_off
12255 */
12256EAPI void evas_key_lock_del (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12257
12258
12259/**
12260 * Enables or turns on programmatically the modifier key with name @p
12261 * keyname.
12262 *
12263 * @param e The pointer to the Evas canvas
12264 * @param keyname The name of the modifier to enable.
12265 *
12266 * The effect will be as if the key was pressed for the whole time
12267 * between this call and a matching evas_key_modifier_off().
12268 *
12269 * @see evas_key_modifier_add
12270 * @see evas_key_modifier_get
12271 * @see evas_key_modifier_off
12272 * @see evas_key_modifier_is_set
12273 */
12274EAPI void evas_key_modifier_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12275
12276/**
12277 * Disables or turns off programmatically the modifier key with name
12278 * @p keyname.
12279 *
12280 * @param e The pointer to the Evas canvas
12281 * @param keyname The name of the modifier to disable.
12282 *
12283 * @see evas_key_modifier_add
12284 * @see evas_key_modifier_get
12285 * @see evas_key_modifier_on
12286 * @see evas_key_modifier_is_set
12287 */
12288EAPI void evas_key_modifier_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12289
12290/**
12291 * Enables or turns on programmatically the lock key with name @p
12292 * keyname.
12293 *
12294 * @param e The pointer to the Evas canvas
12295 * @param keyname The name of the lock to enable.
12296 *
12297 * The effect will be as if the key was put on its active state after
12298 * this call.
12299 *
12300 * @see evas_key_lock_get
12301 * @see evas_key_lock_add
12302 * @see evas_key_lock_del
12303 * @see evas_key_lock_off
12304 */
12305EAPI void evas_key_lock_on (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12306
12307/**
12308 * Disables or turns off programmatically the lock key with name @p
12309 * keyname.
12310 *
12311 * @param e The pointer to the Evas canvas
12312 * @param keyname The name of the lock to disable.
12313 *
12314 * The effect will be as if the key was put on its inactive state
12315 * after this call.
12316 *
12317 * @see evas_key_lock_get
12318 * @see evas_key_lock_add
12319 * @see evas_key_lock_del
12320 * @see evas_key_lock_on
12321 */
12322EAPI void evas_key_lock_off (Evas *e, const char *keyname) EINA_ARG_NONNULL(1, 2);
12323
12324
12325/**
12326 * Creates a bit mask from the @p keyname @b modifier key. Values
12327 * returned from different calls to it may be ORed together,
12328 * naturally.
12329 *
12330 * @param e The canvas whom to query the bit mask from.
12331 * @param keyname The name of the modifier key to create the mask for.
12332 *
12333 * @returns the bit mask or 0 if the @p keyname key wasn't registered as a
12334 * modifier for canvas @p e.
12335 *
12336 * This function is meant to be using in conjunction with
12337 * evas_object_key_grab()/evas_object_key_ungrab(). Go check their
12338 * documentation for more information.
12339 *
12340 * @see evas_key_modifier_add
12341 * @see evas_key_modifier_get
12342 * @see evas_key_modifier_on
12343 * @see evas_key_modifier_off
12344 * @see evas_key_modifier_is_set
12345 * @see evas_object_key_grab
12346 * @see evas_object_key_ungrab
12347 */
12348EAPI Evas_Modifier_Mask evas_key_modifier_mask_get (const Evas *e, const char *keyname) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1, 2);
12349
12350
12351/**
12352 * Requests @p keyname key events be directed to @p obj.
12353 *
12354 * @param obj the object to direct @p keyname events to.
12355 * @param keyname the key to request events for.
12356 * @param modifiers a mask of modifiers that must be present to
12357 * trigger the event.
12358 * @param not_modifiers a mask of modifiers that must @b not be present
12359 * to trigger the event.
12360 * @param exclusive request that the @p obj is the only object
12361 * receiving the @p keyname events.
12362 * @return @c EINA_TRUE, if the call succeeded, @c EINA_FALSE otherwise.
12363 *
12364 * Key grabs allow one or more objects to receive key events for
12365 * specific key strokes even if other objects have focus. Whenever a
12366 * key is grabbed, only the objects grabbing it will get the events
12367 * for the given keys.
12368 *
12369 * @p keyname is a platform dependent symbolic name for the key
12370 * pressed (see @ref Evas_Keys for more information).
12371 *
12372 * @p modifiers and @p not_modifiers are bit masks of all the
12373 * modifiers that must and mustn't, respectively, be pressed along
12374 * with @p keyname key in order to trigger this new key
12375 * grab. Modifiers can be things such as Shift and Ctrl as well as
12376 * user defined types via evas_key_modifier_add(). Retrieve them with
12377 * evas_key_modifier_mask_get() or use @c 0 for empty masks.
12378 *
12379 * @p exclusive will make the given object the only one permitted to
12380 * grab the given key. If given @c EINA_TRUE, subsequent calls on this
12381 * function with different @p obj arguments will fail, unless the key
12382 * is ungrabbed again.
12383 *
12384 * Example code follows.
12385 * @dontinclude evas-events.c
12386 * @skip if (d.focus)
12387 * @until else
12388 *
12389 * See the full example @ref Example_Evas_Events "here".
12390 *
12391 * @see evas_object_key_ungrab
12392 * @see evas_object_focus_set
12393 * @see evas_object_focus_get
12394 * @see evas_focus_get
12395 * @see evas_key_modifier_add
12396 */
12397EAPI 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);
12398
12399/**
12400 * Removes the grab on @p keyname key events by @p obj.
12401 *
12402 * @param obj the object that has an existing key grab.
12403 * @param keyname the key the grab is set for.
12404 * @param modifiers a mask of modifiers that must be present to
12405 * trigger the event.
12406 * @param not_modifiers a mask of modifiers that must not not be
12407 * present to trigger the event.
12408 *
12409 * Removes a key grab on @p obj if @p keyname, @p modifiers, and @p
12410 * not_modifiers match.
12411 *
12412 * Example code follows.
12413 * @dontinclude evas-events.c
12414 * @skip got here by key grabs
12415 * @until }
12416 *
12417 * See the full example @ref Example_Evas_Events "here".
12418 *
12419 * @see evas_object_key_grab
12420 * @see evas_object_focus_set
12421 * @see evas_object_focus_get
12422 * @see evas_focus_get
12423 */
12424EAPI 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);
12425
12426/**
12427 * @}
12428 */
12429
12430/**
12431 * @defgroup Evas_Touch_Point_List Touch Point List Functions
12432 *
12433 * Functions to get information of touched points in the Evas.
12434 *
12435 * Evas maintains list of touched points on the canvas. Each point has
12436 * its co-ordinates, id and state. You can get the number of touched
12437 * points and information of each point using evas_touch_point_list
12438 * functions.
12439 *
12440 * @ingroup Evas_Canvas
12441 */
12442
12443/**
12444 * @addtogroup Evas_Touch_Point_List
12445 * @{
12446 */
12447
12448/**
12449 * Get the number of touched point in the evas.
12450 *
12451 * @param e The pointer to the Evas canvas.
12452 * @return The number of touched point on the evas.
12453 *
12454 * New touched point is added to the list whenever touching the evas
12455 * and point is removed whenever removing touched point from the evas.
12456 *
12457 * Example:
12458 * @code
12459 * extern Evas *evas;
12460 * int count;
12461 *
12462 * count = evas_touch_point_list_count(evas);
12463 * printf("The count of touch points: %i\n", count);
12464 * @endcode
12465 *
12466 * @see evas_touch_point_list_nth_xy_get()
12467 * @see evas_touch_point_list_nth_id_get()
12468 * @see evas_touch_point_list_nth_state_get()
12469 */
12470EAPI unsigned int evas_touch_point_list_count(Evas *e) EINA_ARG_NONNULL(1);
12471
12472/**
12473 * This function returns the nth touch point's co-ordinates.
12474 *
12475 * @param e The pointer to the Evas canvas.
12476 * @param n The number of the touched point (0 being the first).
12477 * @param x The pointer to a Evas_Coord to be filled in.
12478 * @param y The pointer to a Evas_Coord to be filled in.
12479 *
12480 * Touch point's co-ordinates is updated whenever moving that point
12481 * on the canvas.
12482 *
12483 * Example:
12484 * @code
12485 * extern Evas *evas;
12486 * Evas_Coord x, y;
12487 *
12488 * if (evas_touch_point_list_count(evas))
12489 * {
12490 * evas_touch_point_nth_xy_get(evas, 0, &x, &y);
12491 * printf("The first touch point's co-ordinate: (%i, %i)\n", x, y);
12492 * }
12493 * @endcode
12494 *
12495 * @see evas_touch_point_list_count()
12496 * @see evas_touch_point_list_nth_id_get()
12497 * @see evas_touch_point_list_nth_state_get()
12498 */
12499EAPI void evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y) EINA_ARG_NONNULL(1);
12500
12501/**
12502 * This function returns the @p id of nth touch point.
12503 *
12504 * @param e The pointer to the Evas canvas.
12505 * @param n The number of the touched point (0 being the first).
12506 * @return id of nth touch point, if the call succeeded, -1 otherwise.
12507 *
12508 * The point which comes from Mouse Event has @p id 0 and The point
12509 * which comes from Multi Event has @p id that is same as Multi
12510 * Event's device id.
12511 *
12512 * Example:
12513 * @code
12514 * extern Evas *evas;
12515 * int id;
12516 *
12517 * if (evas_touch_point_list_count(evas))
12518 * {
12519 * id = evas_touch_point_nth_id_get(evas, 0);
12520 * printf("The first touch point's id: %i\n", id);
12521 * }
12522 * @endcode
12523 *
12524 * @see evas_touch_point_list_count()
12525 * @see evas_touch_point_list_nth_xy_get()
12526 * @see evas_touch_point_list_nth_state_get()
12527 */
12528EAPI int evas_touch_point_list_nth_id_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1);
12529
12530/**
12531 * This function returns the @p state of nth touch point.
12532 *
12533 * @param e The pointer to the Evas canvas.
12534 * @param n The number of the touched point (0 being the first).
12535 * @return @p state of nth touch point, if the call succeeded,
12536 * EVAS_TOUCH_POINT_CANCEL otherwise.
12537 *
12538 * The point's @p state is EVAS_TOUCH_POINT_DOWN when pressed,
12539 * EVAS_TOUCH_POINT_STILL when the point is not moved after pressed,
12540 * EVAS_TOUCH_POINT_MOVE when moved at least once after pressed and
12541 * EVAS_TOUCH_POINT_UP when released.
12542 *
12543 * Example:
12544 * @code
12545 * extern Evas *evas;
12546 * Evas_Touch_Point_State state;
12547 *
12548 * if (evas_touch_point_list_count(evas))
12549 * {
12550 * state = evas_touch_point_nth_state_get(evas, 0);
12551 * printf("The first touch point's state: %i\n", state);
12552 * }
12553 * @endcode
12554 *
12555 * @see evas_touch_point_list_count()
12556 * @see evas_touch_point_list_nth_xy_get()
12557 * @see evas_touch_point_list_nth_id_get()
12558 */
12559EAPI Evas_Touch_Point_State evas_touch_point_list_nth_state_get(Evas *e, unsigned int n) EINA_ARG_NONNULL(1);
12560
12561/**
12562 * @}
12563 */
12564
12565#ifdef __cplusplus
12566}
12567#endif
12568
12569#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 @@
1#ifndef _EVAS_GL_H
2#define _EVAS_GL_H
3
4#include <Evas.h>
5//#include <GL/gl.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11typedef struct _Evas_GL Evas_GL;
12typedef struct _Evas_GL_Surface Evas_GL_Surface;
13typedef struct _Evas_GL_Context Evas_GL_Context;
14typedef struct _Evas_GL_Config Evas_GL_Config;
15typedef struct _Evas_GL_API Evas_GL_API;
16typedef void *Evas_GL_Func;
17typedef void *EvasGLImage;
18
19typedef enum _Evas_GL_Color_Format
20{
21 EVAS_GL_RGB_888 = 0,
22 EVAS_GL_RGBA_8888 = 1
23} Evas_GL_Color_Format;
24
25typedef enum _Evas_GL_Depth_Bits
26{
27 EVAS_GL_DEPTH_NONE = 0,
28 EVAS_GL_DEPTH_BIT_8 = 1,
29 EVAS_GL_DEPTH_BIT_16 = 2,
30 EVAS_GL_DEPTH_BIT_24 = 3,
31 EVAS_GL_DEPTH_BIT_32 = 4
32} Evas_GL_Depth_Bits;
33
34typedef enum _Evas_GL_Stencil_Bits
35{
36 EVAS_GL_STENCIL_NONE = 0,
37 EVAS_GL_STENCIL_BIT_1 = 1,
38 EVAS_GL_STENCIL_BIT_2 = 2,
39 EVAS_GL_STENCIL_BIT_4 = 3,
40 EVAS_GL_STENCIL_BIT_8 = 4,
41 EVAS_GL_STENCIL_BIT_16 = 5
42} Evas_GL_Stencil_Bits;
43
44typedef enum _Evas_GL_Options_Bits
45{
46 EVAS_GL_OPTIONS_NONE = 0,
47 EVAS_GL_OPTIONS_DIRECT = (1<<0)
48} Evas_GL_Options_Bits;
49
50struct _Evas_GL_Config
51{
52 Evas_GL_Color_Format color_format;
53 Evas_GL_Depth_Bits depth_bits;
54 Evas_GL_Stencil_Bits stencil_bits;
55 Evas_GL_Options_Bits options_bits;
56};
57
58#define EVAS_GL_EXTENSIONS 1
59
60
61/**
62 * @defgroup Evas_GL Rendering GL on Evas
63 *
64 * Functions that are used to do OpenGL rendering on Evas. Evas allows you
65 * to use OpenGL to render to specially set up image objects (which act as
66 * render target surfaces).
67 *
68 * Below is an illlustrative example of how to use OpenGL to render to an
69 * object in Evas.
70 *
71 * @code
72// Simple Evas_GL example
73#include <Ecore_Evas.h>
74#include <Ecore.h>
75#include <Evas_GL.h>
76#include <stdio.h>
77
78// GL related data here..
79typedef struct _GLData
80{
81 Evas_GL_Context *ctx;
82 Evas_GL_Surface *sfc;
83 Evas_GL_Config *cfg;
84 Evas_GL *evasgl;
85 Evas_GL_API *glapi;
86 GLuint program;
87 GLuint vtx_shader;
88 GLuint fgmt_shader;
89 Eina_Bool initialized : 1;
90} GLData;
91
92// callbacks we want to handle deletion on the object and updates/draws
93static void on_del (void *data, Evas *e, Evas_Object *obj, void *event_info);
94static void on_pixels (void *data, Evas_Object *obj);
95// demo - animator just to keep ticking over saying to draw the image
96static Eina_Bool on_animate (void *data);
97// gl stuff
98static int init_shaders (GLData *gld);
99static GLuint load_shader (GLData *gld, GLenum type, const char *shader_src);
100
101int
102main(int argc, char **argv)
103{
104 // a size by default
105 int w = 256, h = 256;
106 // some variables we will use
107 Ecore_Evas *ee;
108 Evas *canvas;
109 Evas_Object *r1;
110 Evas_Native_Surface ns;
111 GLData *gld = NULL;
112
113 // regular low-leve EFL (ecore+ecore-evas) init. elm is simpler
114 ecore_init();
115 ecore_evas_init();
116 ee = ecore_evas_gl_x11_new(NULL, 0, 0, 0, 512, 512);
117 ecore_evas_title_set(ee, "Ecore_Evas Template");
118 canvas = ecore_evas_get(ee);
119
120 // alloc a data struct to hold our relevant gl info in
121 if (!(gld = calloc(1, sizeof(GLData)))) return 0;
122
123 //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL)
124 //-//
125 // get the evas gl handle for doing gl things
126 gld->evasgl = evas_gl_new(canvas);
127 gld->glapi = evas_gl_api_get(gld->evasgl);
128
129 // Set a surface config
130 gld->cfg = evas_gl_config_new();
131 gld->cfg->color_format = EVAS_GL_RGBA_8888;
132 //gld->cfg->depth_bits = EVAS_GL_DEPTH_NONE; // Othe config options
133 //gld->cfg->stencil_bits = EVAS_GL_STENCIL_NONE;
134 //gld->cfg->options_bits = EVAS_GL_OPTIONS_NONE;
135
136 // create a surface and context
137 gld->sfc = evas_gl_surface_create(gld->evasgl, gld->cfg, w, h);
138 gld->ctx = evas_gl_context_create(gld->evasgl, NULL);
139 //-//
140 //-//-//-// END GL INIT BLOB
141
142 // set up the image object. a filled one by default
143 r1 = evas_object_image_filled_add(canvas);
144 // attach important data we need to the object using key names. this just
145 // avoids some global variables and means we can do nice cleanup. you can
146 // avoid this if you are lazy
147 evas_object_data_set(r1, "..gld", gld);
148 // when the object is deleted - call the on_del callback. like the above,
149 // this is just being clean
150 evas_object_event_callback_add(r1, EVAS_CALLBACK_DEL, on_del, NULL);
151 // set up an actual pixel size fot the buffer data. it may be different
152 // to the output size. any windowing system has something like this, just
153 // evas has 2 sizes, a pixel size and the output object size
154 evas_object_image_size_set(r1, w, h);
155 // set up the native surface info to use the context and surface created
156 // above
157
158 //-//-//-// THIS IS WHERE GL INIT STUFF HAPPENS (ALA EGL)
159 //-//
160 evas_gl_native_surface_get(gld->evasgl, gld->sfc, &ns);
161 evas_object_image_native_surface_set(r1, &ns);
162 evas_object_image_pixels_get_callback_set(r1, on_pixels, r1);
163 //-//
164 //-//-//-// END GL INIT BLOB
165
166 // move the image object somewhere, resize it and show it. any windowing
167 // system would need this kind of thing - place a child "window"
168 evas_object_move(r1, 128, 128);
169 evas_object_resize(r1, w, h);
170 evas_object_show(r1);
171
172 // animating - just a demo. as long as you trigger an update on the image
173 // object via evas_object_image_pixels_dirty_set(). any display system,
174 // mainloop siztem etc. will have something of this kind unless it's making
175 // you spin infinitely yourself and invent your own animation mechanism
176 //
177 // NOTE: if you delete r1, this animator will keep running trying to access
178 // r1 so you'd better delete this animator with ecore_animator_del() or
179 // structure how you do animation differently. you can also attach it like
180 // evasgl, sfc, etc. etc. if this animator is specific to this object
181 // only and delete it in the del handler for the obj.
182 ecore_animator_add(on_animate, r1);
183
184 // finally show the window for the world to see. windowing system generic
185 ecore_evas_show(ee);
186
187 // begin the mainloop and tick over the animator, handle events etc.
188 // also windowing system generic
189 ecore_main_loop_begin();
190
191 // standard EFL shutdown stuff - generic for most systems, EFL or not
192 ecore_evas_shutdown();
193 ecore_shutdown();
194 return 0;
195}
196
197static void
198on_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
199{
200 // on delete of our object clean up some things that don't get auto
201 // celeted for us as they are not intrinsically bound to the image
202 // object as such (you could use the same context and surface across
203 // multiple image objects and re-use the evasgl handle too multiple times.
204 // here we bind them to 1 object only though by doing this.
205 GLData *gld = evas_object_data_get(obj, "..gld");
206 if (!gld) return;
207 Evas_GL_API *gl = gld->glapi;
208
209 evas_object_data_del(obj, "..gld");
210
211 // Do a make_current before deleting all the GL stuff.
212 evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx);
213 gl->glDeleteShader(gld->vtx_shader);
214 gl->glDeleteShader(gld->fgmt_shader);
215 gl->glDeleteProgram(gld->program);
216
217 evas_gl_surface_destroy(gld->evasgl, gld->sfc);
218 evas_gl_context_destroy(gld->evasgl, gld->ctx);
219 evas_gl_config_free(gld->cfg);
220 evas_gl_free(gld->evasgl);
221 free(gld);
222}
223
224static void
225on_pixels(void *data, Evas_Object *obj)
226{
227 // get some variable we need from the object data keys
228 GLData *gld = evas_object_data_get(obj, "..gld");
229 if (!gld) return;
230 Evas_GL_API *gl = gld->glapi;
231 GLfloat vVertices[] =
232 {
233 0.0f, 0.5f, 0.0f,
234 -0.5f, -0.5f, 0.0f,
235 0.5f, -0.5f, 0.0f
236 };
237 int w, h;
238
239 // get the image size in case it changed with evas_object_image_size_set()
240 evas_object_image_size_get(obj, &w, &h);
241 // set up the context and surface as the current one
242 evas_gl_make_current(gld->evasgl, gld->sfc, gld->ctx);
243
244 if (!gld->initialized)
245 {
246 if (!init_shaders(gld)) printf("Error Initializing Shaders\n");
247 gld->initialized = EINA_TRUE;
248 }
249
250 // GL Viewport stuff. you can avoid doing this if viewport is all the
251 // same as last frame if you want
252 gl->glViewport(0, 0, w, h);
253
254 // Clear the buffer
255 gl->glClearColor(1.0, 0.0, 0.0, 1);
256 gl->glClear(GL_COLOR_BUFFER_BIT);
257
258 // Draw a Triangle
259 gl->glEnable(GL_BLEND);
260
261 gl->glUseProgram(gld->program);
262
263 gl->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, vVertices);
264 gl->glEnableVertexAttribArray(0);
265
266 gl->glDrawArrays(GL_TRIANGLES, 0, 3);
267
268 // Optional - Flush the GL pipeline
269 gl->glFlush();
270}
271
272static Eina_Bool
273on_animate(void *data)
274{
275 // just a demo - animate here whenever an animation tick happens and then
276 // mark the image as "dirty" meaning it needs an update next time evas
277 // renders. it will call the pixel get callback then.
278 evas_object_image_pixels_dirty_set(data, EINA_TRUE);
279 return EINA_TRUE; // keep looping
280}
281
282static GLuint
283load_shader(GLData *gld, GLenum type, const char *shader_src)
284{
285 Evas_GL_API *gl = gld->glapi;
286 GLuint shader;
287 GLint compiled = 0;
288
289 // Create the shader object
290 if (!(shader = gl->glCreateShader(type))) return 0;
291 gl->glShaderSource(shader, 1, &shader_src, NULL);
292 // Compile the shader
293 gl->glCompileShader(shader);
294 gl->glGetShaderiv(shader, GL_COMPILE_STATUS, &compiled);
295
296 if (!compiled)
297 {
298 GLint len = 0;
299
300 gl->glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &len);
301 if (len > 1)
302 {
303 char *info = malloc(sizeof(char) * len);
304
305 if (info)
306 {
307 gl->glGetShaderInfoLog(shader, len, NULL, info);
308 printf("Error compiling shader:\n"
309 "%s\n", info);
310 free(info);
311 }
312 }
313 gl->glDeleteShader(shader);
314 return 0;
315 }
316 return shader;
317}
318
319// Initialize the shader and program object
320static int
321init_shaders(GLData *gld)
322{
323 Evas_GL_API *gl = gld->glapi;
324 const char vShaderStr[] =
325 "attribute vec4 vPosition; \n"
326 "void main() \n"
327 "{ \n"
328 " gl_Position = vPosition; \n"
329 "} \n";
330 const char fShaderStr[] =
331 "precision mediump float; \n"
332 "void main() \n"
333 "{ \n"
334 " gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n"
335 "} \n";
336 GLint linked = 0;
337
338 // Load the vertex/fragment shaders
339 gld->vtx_shader = load_shader(gld, GL_VERTEX_SHADER, vShaderStr);
340 gld->fgmt_shader = load_shader(gld, GL_FRAGMENT_SHADER, fShaderStr);
341
342 // Create the program object
343 if (!(gld->program = gl->glCreateProgram())) return 0;
344
345 gl->glAttachShader(gld->program, gld->vtx_shader);
346 gl->glAttachShader(gld->program, gld->fgmt_shader);
347
348 // Bind vPosition to attribute 0
349 gl->glBindAttribLocation(gld->program, 0, "vPosition");
350 // Link the program
351 gl->glLinkProgram(gld->program);
352 gl->glGetProgramiv(gld->program, GL_LINK_STATUS, &linked);
353
354 if (!linked)
355 {
356 GLint len = 0;
357
358 gl->glGetProgramiv(gld->program, GL_INFO_LOG_LENGTH, &len);
359 if (len > 1)
360 {
361 char *info = malloc(sizeof(char) * len);
362
363 if (info)
364 {
365 gl->glGetProgramInfoLog(gld->program, len, NULL, info);
366 printf("Error linking program:\n"
367 "%s\n", info);
368 free(info);
369 }
370 }
371 gl->glDeleteProgram(gld->program);
372 return 0;
373 }
374 return 1;
375}
376 * @endcode
377 *
378 * @ingroup Evas_Canvas
379 */
380
381/**
382 * @addtogroup Evas_GL
383 * @{
384 */
385
386/**
387 * Creates a new Evas_GL object and returns a handle for gl rendering on efl.
388 *
389 * @param e The given evas canvas OpenGL is to be used on.
390 * @return The created evas_gl object, or NULl on fasilure.
391 */
392EAPI Evas_GL *evas_gl_new (Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
393
394/**
395 * Frees the created Evas_GL object.
396 *
397 * @param evas_gl The given Evas_GL object.
398 */
399EAPI void evas_gl_free (Evas_GL *evas_gl) EINA_ARG_NONNULL(1);
400
401/**
402 * Allocates a new config object for the user to fill out.
403 *
404 * As long as the Evas creates a config object for the user, it takes care
405 * of the backward compatibility issue.
406 */
407EAPI Evas_GL_Config *evas_gl_config_new (void);
408
409/**
410 * Frees a config object created from evas_gl_config_new.
411 *
412 * As long as the Evas creates a config object for the user, it takes care
413 * of the backward compatibility issue.
414 */
415EAPI void evas_gl_config_free (Evas_GL_Config *cfg) EINA_ARG_NONNULL(1);
416
417/**
418 * Creates and returns new Evas_GL_Surface object for GL Rendering.
419 *
420 * @param evas_gl The given Evas_GL object.
421 * @param config The pixel format and configuration of the rendering surface.
422 * @param width The width of the surface.
423 * @param height The height of the surface.
424 * @return The created GL surface object, or NULL on failure.
425 */
426EAPI 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);
427
428/**
429 * Destroys the created Evas GL Surface.
430 *
431 * @param evas_gl The given Evas_GL object.
432 * @param surf The given GL surface object.
433 */
434EAPI void evas_gl_surface_destroy (Evas_GL *evas_gl, Evas_GL_Surface *surf) EINA_ARG_NONNULL(1,2);
435
436/**
437 * Creates and returns a new Evas GL context object
438 *
439 * @param evas_gl The given Evas_GL object.
440 * @return The created context, or NULL on failure.
441 */
442EAPI Evas_GL_Context *evas_gl_context_create (Evas_GL *evas_gl, Evas_GL_Context *share_ctx) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1);
443
444/**
445 * Destroys the given Evas GL context object
446 *
447 * @param evas_gl The given Evas_GL object.
448 * @param ctx The given Evas GL context.
449 */
450EAPI void evas_gl_context_destroy (Evas_GL *evas_gl, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2);
451
452/**
453 * Sets the given context as a current context for the given surface
454 *
455 * @param evas_gl The given Evas_GL object.
456 * @param surf The given Evas GL surface.
457 * @param ctx The given Evas GL context.
458 * @return EINA_TRUE if successful, EINA_FALSE if not.
459 */
460EAPI Eina_Bool evas_gl_make_current (Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx) EINA_ARG_NONNULL(1,2);
461
462/**
463 * Returns a pointer to a static, zero-terminated string describing some aspect of evas_gl.
464 *
465 * @param evas_gl The given Evas_GL object.
466 * @param name Specifies a symbolic constant, one of EVAS_GL_EXTENSIONS...
467 */
468EAPI const char *evas_gl_string_query (Evas_GL *evas_gl, int name) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_PURE;
469
470/**
471 * Returns a GL or the Glue Layer's extension function.
472 *
473 * @param evas_gl The given Evas_GL object.
474 * @param name The name of the function to return.
475 */
476EAPI 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;
477
478/**
479 * Fills in the Native Surface information from the given Evas GL surface.
480 *
481 * @param evas_gl The given Evas_GL object.
482 * @param surf The given Evas GL surface to retrieve the Native Surface info from.
483 * @param ns The native surface structure that the function fills in.
484 * @return EINA_TRUE if successful, EINA_FALSE if not.
485 */
486EAPI 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);
487
488/**
489 * Get the API for rendering using OpenGL
490 *
491 * @param evas_gl The given Eva_GL object.
492 * @return The API to use.
493 *
494 * This returns a structure that contains all the OpenGL functions you can
495 * use to render in Evas. These functions consist of all the standard
496 * OpenGL-ES2.0 functions and any extra ones Evas has decided to provide in
497 * addition. This means that if you have your code ported to OpenGL-ES2.0,
498 * it will be easy to render to Evas.
499 *
500 */
501EAPI Evas_GL_API *evas_gl_api_get (Evas_GL *evas_gl) EINA_ARG_NONNULL(1);
502
503#if !defined(__gl_h_) && !defined(__gl2_h_)
504# define __gl_h_
505# define __gl2_h_
506
507/*
508 * This document is licensed under the SGI Free Software B License Version
509 * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ .
510 */
511
512/*-------------------------------------------------------------------------
513 * Data type definitions
514 *-----------------------------------------------------------------------*/
515
516typedef void GLvoid;
517typedef unsigned int GLenum;
518typedef unsigned char GLboolean;
519typedef unsigned int GLbitfield;
520typedef signed char GLbyte; // Changed khronos_int8_t
521typedef short GLshort;
522typedef int GLint;
523typedef int GLsizei;
524typedef unsigned char GLubyte; // Changed khronos_uint8_t
525typedef unsigned short GLushort;
526typedef unsigned int GLuint;
527typedef float GLfloat; // Changed khronos_float_t
528typedef float GLclampf; // Changed khronos_float_t
529typedef signed int GLfixed; // Changed khronos_int32_t
530
531/* GL types for handling large vertex buffer objects */
532typedef signed long int GLintptr; // Changed khronos_intptr_t
533typedef signed long int GLsizeiptr; // Changed khronos_ssize_t
534
535//#if (!defined(__gl2_h_) && !defined(__gl_h_))
536
537/* OpenGL ES core versions */
538//#define GL_ES_VERSION_2_0 1
539
540/* ClearBufferMask */
541#define GL_DEPTH_BUFFER_BIT 0x00000100
542#define GL_STENCIL_BUFFER_BIT 0x00000400
543#define GL_COLOR_BUFFER_BIT 0x00004000
544
545/* Boolean */
546#define GL_FALSE 0
547#define GL_TRUE 1
548
549/* BeginMode */
550#define GL_POINTS 0x0000
551#define GL_LINES 0x0001
552#define GL_LINE_LOOP 0x0002
553#define GL_LINE_STRIP 0x0003
554#define GL_TRIANGLES 0x0004
555#define GL_TRIANGLE_STRIP 0x0005
556#define GL_TRIANGLE_FAN 0x0006
557
558/* AlphaFunction (not supported in ES20) */
559/* GL_NEVER */
560/* GL_LESS */
561/* GL_EQUAL */
562/* GL_LEQUAL */
563/* GL_GREATER */
564/* GL_NOTEQUAL */
565/* GL_GEQUAL */
566/* GL_ALWAYS */
567
568/* BlendingFactorDest */
569#define GL_ZERO 0
570#define GL_ONE 1
571#define GL_SRC_COLOR 0x0300
572#define GL_ONE_MINUS_SRC_COLOR 0x0301
573#define GL_SRC_ALPHA 0x0302
574#define GL_ONE_MINUS_SRC_ALPHA 0x0303
575#define GL_DST_ALPHA 0x0304
576#define GL_ONE_MINUS_DST_ALPHA 0x0305
577
578/* BlendingFactorSrc */
579/* GL_ZERO */
580/* GL_ONE */
581#define GL_DST_COLOR 0x0306
582#define GL_ONE_MINUS_DST_COLOR 0x0307
583#define GL_SRC_ALPHA_SATURATE 0x0308
584/* GL_SRC_ALPHA */
585/* GL_ONE_MINUS_SRC_ALPHA */
586/* GL_DST_ALPHA */
587/* GL_ONE_MINUS_DST_ALPHA */
588
589/* BlendEquationSeparate */
590#define GL_FUNC_ADD 0x8006
591#define GL_BLEND_EQUATION 0x8009
592#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */
593#define GL_BLEND_EQUATION_ALPHA 0x883D
594
595/* BlendSubtract */
596#define GL_FUNC_SUBTRACT 0x800A
597#define GL_FUNC_REVERSE_SUBTRACT 0x800B
598
599/* Separate Blend Functions */
600#define GL_BLEND_DST_RGB 0x80C8
601#define GL_BLEND_SRC_RGB 0x80C9
602#define GL_BLEND_DST_ALPHA 0x80CA
603#define GL_BLEND_SRC_ALPHA 0x80CB
604#define GL_CONSTANT_COLOR 0x8001
605#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
606#define GL_CONSTANT_ALPHA 0x8003
607#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
608#define GL_BLEND_COLOR 0x8005
609
610/* Buffer Objects */
611#define GL_ARRAY_BUFFER 0x8892
612#define GL_ELEMENT_ARRAY_BUFFER 0x8893
613#define GL_ARRAY_BUFFER_BINDING 0x8894
614#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
615
616#define GL_STREAM_DRAW 0x88E0
617#define GL_STATIC_DRAW 0x88E4
618#define GL_DYNAMIC_DRAW 0x88E8
619
620#define GL_BUFFER_SIZE 0x8764
621#define GL_BUFFER_USAGE 0x8765
622
623#define GL_CURRENT_VERTEX_ATTRIB 0x8626
624
625/* CullFaceMode */
626#define GL_FRONT 0x0404
627#define GL_BACK 0x0405
628#define GL_FRONT_AND_BACK 0x0408
629
630/* DepthFunction */
631/* GL_NEVER */
632/* GL_LESS */
633/* GL_EQUAL */
634/* GL_LEQUAL */
635/* GL_GREATER */
636/* GL_NOTEQUAL */
637/* GL_GEQUAL */
638/* GL_ALWAYS */
639
640/* EnableCap */
641#define GL_TEXTURE_2D 0x0DE1
642#define GL_CULL_FACE 0x0B44
643#define GL_BLEND 0x0BE2
644#define GL_DITHER 0x0BD0
645#define GL_STENCIL_TEST 0x0B90
646#define GL_DEPTH_TEST 0x0B71
647#define GL_SCISSOR_TEST 0x0C11
648#define GL_POLYGON_OFFSET_FILL 0x8037
649#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
650#define GL_SAMPLE_COVERAGE 0x80A0
651
652/* ErrorCode */
653#define GL_NO_ERROR 0
654#define GL_INVALID_ENUM 0x0500
655#define GL_INVALID_VALUE 0x0501
656#define GL_INVALID_OPERATION 0x0502
657#define GL_OUT_OF_MEMORY 0x0505
658
659/* FrontFaceDirection */
660#define GL_CW 0x0900
661#define GL_CCW 0x0901
662
663/* GetPName */
664#define GL_LINE_WIDTH 0x0B21
665#define GL_ALIASED_POINT_SIZE_RANGE 0x846D
666#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
667#define GL_CULL_FACE_MODE 0x0B45
668#define GL_FRONT_FACE 0x0B46
669#define GL_DEPTH_RANGE 0x0B70
670#define GL_DEPTH_WRITEMASK 0x0B72
671#define GL_DEPTH_CLEAR_VALUE 0x0B73
672#define GL_DEPTH_FUNC 0x0B74
673#define GL_STENCIL_CLEAR_VALUE 0x0B91
674#define GL_STENCIL_FUNC 0x0B92
675#define GL_STENCIL_FAIL 0x0B94
676#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
677#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
678#define GL_STENCIL_REF 0x0B97
679#define GL_STENCIL_VALUE_MASK 0x0B93
680#define GL_STENCIL_WRITEMASK 0x0B98
681#define GL_STENCIL_BACK_FUNC 0x8800
682#define GL_STENCIL_BACK_FAIL 0x8801
683#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
684#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
685#define GL_STENCIL_BACK_REF 0x8CA3
686#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
687#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
688#define GL_VIEWPORT 0x0BA2
689#define GL_SCISSOR_BOX 0x0C10
690/* GL_SCISSOR_TEST */
691#define GL_COLOR_CLEAR_VALUE 0x0C22
692#define GL_COLOR_WRITEMASK 0x0C23
693#define GL_UNPACK_ALIGNMENT 0x0CF5
694#define GL_PACK_ALIGNMENT 0x0D05
695#define GL_MAX_TEXTURE_SIZE 0x0D33
696#define GL_MAX_VIEWPORT_DIMS 0x0D3A
697#define GL_SUBPIXEL_BITS 0x0D50
698#define GL_RED_BITS 0x0D52
699#define GL_GREEN_BITS 0x0D53
700#define GL_BLUE_BITS 0x0D54
701#define GL_ALPHA_BITS 0x0D55
702#define GL_DEPTH_BITS 0x0D56
703#define GL_STENCIL_BITS 0x0D57
704#define GL_POLYGON_OFFSET_UNITS 0x2A00
705/* GL_POLYGON_OFFSET_FILL */
706#define GL_POLYGON_OFFSET_FACTOR 0x8038
707#define GL_TEXTURE_BINDING_2D 0x8069
708#define GL_SAMPLE_BUFFERS 0x80A8
709#define GL_SAMPLES 0x80A9
710#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
711#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
712
713/* GetTextureParameter */
714/* GL_TEXTURE_MAG_FILTER */
715/* GL_TEXTURE_MIN_FILTER */
716/* GL_TEXTURE_WRAP_S */
717/* GL_TEXTURE_WRAP_T */
718
719#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
720#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
721
722/* HintMode */
723#define GL_DONT_CARE 0x1100
724#define GL_FASTEST 0x1101
725#define GL_NICEST 0x1102
726
727/* HintTarget */
728#define GL_GENERATE_MIPMAP_HINT 0x8192
729
730/* DataType */
731#define GL_BYTE 0x1400
732#define GL_UNSIGNED_BYTE 0x1401
733#define GL_SHORT 0x1402
734#define GL_UNSIGNED_SHORT 0x1403
735#define GL_INT 0x1404
736#define GL_UNSIGNED_INT 0x1405
737#define GL_FLOAT 0x1406
738#define GL_FIXED 0x140C
739
740/* PixelFormat */
741#define GL_DEPTH_COMPONENT 0x1902
742#define GL_ALPHA 0x1906
743#define GL_RGB 0x1907
744#define GL_RGBA 0x1908
745#define GL_LUMINANCE 0x1909
746#define GL_LUMINANCE_ALPHA 0x190A
747
748/* PixelType */
749/* GL_UNSIGNED_BYTE */
750#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
751#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
752#define GL_UNSIGNED_SHORT_5_6_5 0x8363
753
754/* Shaders */
755#define GL_FRAGMENT_SHADER 0x8B30
756#define GL_VERTEX_SHADER 0x8B31
757#define GL_MAX_VERTEX_ATTRIBS 0x8869
758#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
759#define GL_MAX_VARYING_VECTORS 0x8DFC
760#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
761#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
762#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
763#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
764#define GL_SHADER_TYPE 0x8B4F
765#define GL_DELETE_STATUS 0x8B80
766#define GL_LINK_STATUS 0x8B82
767#define GL_VALIDATE_STATUS 0x8B83
768#define GL_ATTACHED_SHADERS 0x8B85
769#define GL_ACTIVE_UNIFORMS 0x8B86
770#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
771#define GL_ACTIVE_ATTRIBUTES 0x8B89
772#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
773#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
774#define GL_CURRENT_PROGRAM 0x8B8D
775
776/* StencilFunction */
777#define GL_NEVER 0x0200
778#define GL_LESS 0x0201
779#define GL_EQUAL 0x0202
780#define GL_LEQUAL 0x0203
781#define GL_GREATER 0x0204
782#define GL_NOTEQUAL 0x0205
783#define GL_GEQUAL 0x0206
784#define GL_ALWAYS 0x0207
785
786/* StencilOp */
787/* GL_ZERO */
788#define GL_KEEP 0x1E00
789#define GL_REPLACE 0x1E01
790#define GL_INCR 0x1E02
791#define GL_DECR 0x1E03
792#define GL_INVERT 0x150A
793#define GL_INCR_WRAP 0x8507
794#define GL_DECR_WRAP 0x8508
795
796/* StringName */
797#define GL_VENDOR 0x1F00
798#define GL_RENDERER 0x1F01
799#define GL_VERSION 0x1F02
800#define GL_EXTENSIONS 0x1F03
801
802/* TextureMagFilter */
803#define GL_NEAREST 0x2600
804#define GL_LINEAR 0x2601
805
806/* TextureMinFilter */
807/* GL_NEAREST */
808/* GL_LINEAR */
809#define GL_NEAREST_MIPMAP_NEAREST 0x2700
810#define GL_LINEAR_MIPMAP_NEAREST 0x2701
811#define GL_NEAREST_MIPMAP_LINEAR 0x2702
812#define GL_LINEAR_MIPMAP_LINEAR 0x2703
813
814/* TextureParameterName */
815#define GL_TEXTURE_MAG_FILTER 0x2800
816#define GL_TEXTURE_MIN_FILTER 0x2801
817#define GL_TEXTURE_WRAP_S 0x2802
818#define GL_TEXTURE_WRAP_T 0x2803
819
820/* TextureTarget */
821/* GL_TEXTURE_2D */
822#define GL_TEXTURE 0x1702
823
824#define GL_TEXTURE_CUBE_MAP 0x8513
825#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
826#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
827#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
828#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
829#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
830#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
831#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
832#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
833
834/* TextureUnit */
835#define GL_TEXTURE0 0x84C0
836#define GL_TEXTURE1 0x84C1
837#define GL_TEXTURE2 0x84C2
838#define GL_TEXTURE3 0x84C3
839#define GL_TEXTURE4 0x84C4
840#define GL_TEXTURE5 0x84C5
841#define GL_TEXTURE6 0x84C6
842#define GL_TEXTURE7 0x84C7
843#define GL_TEXTURE8 0x84C8
844#define GL_TEXTURE9 0x84C9
845#define GL_TEXTURE10 0x84CA
846#define GL_TEXTURE11 0x84CB
847#define GL_TEXTURE12 0x84CC
848#define GL_TEXTURE13 0x84CD
849#define GL_TEXTURE14 0x84CE
850#define GL_TEXTURE15 0x84CF
851#define GL_TEXTURE16 0x84D0
852#define GL_TEXTURE17 0x84D1
853#define GL_TEXTURE18 0x84D2
854#define GL_TEXTURE19 0x84D3
855#define GL_TEXTURE20 0x84D4
856#define GL_TEXTURE21 0x84D5
857#define GL_TEXTURE22 0x84D6
858#define GL_TEXTURE23 0x84D7
859#define GL_TEXTURE24 0x84D8
860#define GL_TEXTURE25 0x84D9
861#define GL_TEXTURE26 0x84DA
862#define GL_TEXTURE27 0x84DB
863#define GL_TEXTURE28 0x84DC
864#define GL_TEXTURE29 0x84DD
865#define GL_TEXTURE30 0x84DE
866#define GL_TEXTURE31 0x84DF
867#define GL_ACTIVE_TEXTURE 0x84E0
868
869/* TextureWrapMode */
870#define GL_REPEAT 0x2901
871#define GL_CLAMP_TO_EDGE 0x812F
872#define GL_MIRRORED_REPEAT 0x8370
873
874/* Uniform Types */
875#define GL_FLOAT_VEC2 0x8B50
876#define GL_FLOAT_VEC3 0x8B51
877#define GL_FLOAT_VEC4 0x8B52
878#define GL_INT_VEC2 0x8B53
879#define GL_INT_VEC3 0x8B54
880#define GL_INT_VEC4 0x8B55
881#define GL_BOOL 0x8B56
882#define GL_BOOL_VEC2 0x8B57
883#define GL_BOOL_VEC3 0x8B58
884#define GL_BOOL_VEC4 0x8B59
885#define GL_FLOAT_MAT2 0x8B5A
886#define GL_FLOAT_MAT3 0x8B5B
887#define GL_FLOAT_MAT4 0x8B5C
888#define GL_SAMPLER_2D 0x8B5E
889#define GL_SAMPLER_CUBE 0x8B60
890
891/* Vertex Arrays */
892#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
893#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
894#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
895#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
896#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
897#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
898#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
899
900/* Read Format */
901#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
902#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
903
904/* Shader Source */
905#define GL_COMPILE_STATUS 0x8B81
906#define GL_INFO_LOG_LENGTH 0x8B84
907#define GL_SHADER_SOURCE_LENGTH 0x8B88
908#define GL_SHADER_COMPILER 0x8DFA
909
910/* Shader Binary */
911#define GL_SHADER_BINARY_FORMATS 0x8DF8
912#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
913
914/* Shader Precision-Specified Types */
915#define GL_LOW_FLOAT 0x8DF0
916#define GL_MEDIUM_FLOAT 0x8DF1
917#define GL_HIGH_FLOAT 0x8DF2
918#define GL_LOW_INT 0x8DF3
919#define GL_MEDIUM_INT 0x8DF4
920#define GL_HIGH_INT 0x8DF5
921
922/* Framebuffer Object. */
923#define GL_FRAMEBUFFER 0x8D40
924#define GL_RENDERBUFFER 0x8D41
925
926#define GL_RGBA4 0x8056
927#define GL_RGB5_A1 0x8057
928#define GL_RGB565 0x8D62
929#define GL_DEPTH_COMPONENT16 0x81A5
930#define GL_STENCIL_INDEX 0x1901
931#define GL_STENCIL_INDEX8 0x8D48
932
933#define GL_RENDERBUFFER_WIDTH 0x8D42
934#define GL_RENDERBUFFER_HEIGHT 0x8D43
935#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
936#define GL_RENDERBUFFER_RED_SIZE 0x8D50
937#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
938#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
939#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
940#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
941#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
942
943#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
944#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
945#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
946#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
947
948#define GL_COLOR_ATTACHMENT0 0x8CE0
949#define GL_DEPTH_ATTACHMENT 0x8D00
950#define GL_STENCIL_ATTACHMENT 0x8D20
951
952#define GL_NONE 0
953
954#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
955#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
956#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
957#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
958#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
959
960#define GL_FRAMEBUFFER_BINDING 0x8CA6
961#define GL_RENDERBUFFER_BINDING 0x8CA7
962#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
963
964#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
965
966//---------------------------//
967// GLES extension defines
968
969/* GL_OES_compressed_ETC1_RGB8_texture */
970#define GL_ETC1_RGB8_OES 0x8D64
971
972/* GL_OES_compressed_paletted_texture */
973#define GL_PALETTE4_RGB8_OES 0x8B90
974#define GL_PALETTE4_RGBA8_OES 0x8B91
975#define GL_PALETTE4_R5_G6_B5_OES 0x8B92
976#define GL_PALETTE4_RGBA4_OES 0x8B93
977#define GL_PALETTE4_RGB5_A1_OES 0x8B94
978#define GL_PALETTE8_RGB8_OES 0x8B95
979#define GL_PALETTE8_RGBA8_OES 0x8B96
980#define GL_PALETTE8_R5_G6_B5_OES 0x8B97
981#define GL_PALETTE8_RGBA4_OES 0x8B98
982#define GL_PALETTE8_RGB5_A1_OES 0x8B99
983
984/* GL_OES_depth24 */
985#define GL_DEPTH_COMPONENT24_OES 0x81A6
986
987/* GL_OES_depth32 */
988#define GL_DEPTH_COMPONENT32_OES 0x81A7
989
990/* GL_OES_get_program_binary */
991#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741
992#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE
993#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF
994
995/* GL_OES_mapbuffer */
996#define GL_WRITE_ONLY_OES 0x88B9
997#define GL_BUFFER_ACCESS_OES 0x88BB
998#define GL_BUFFER_MAPPED_OES 0x88BC
999#define GL_BUFFER_MAP_POINTER_OES 0x88BD
1000
1001/* GL_OES_packed_depth_stencil */
1002#define GL_DEPTH_STENCIL_OES 0x84F9
1003#define GL_UNSIGNED_INT_24_8_OES 0x84FA
1004#define GL_DEPTH24_STENCIL8_OES 0x88F0
1005
1006/* GL_OES_rgb8_rgba8 */
1007#define GL_RGB8_OES 0x8051
1008#define GL_RGBA8_OES 0x8058
1009
1010/* GL_OES_standard_derivatives */
1011#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B
1012
1013/* GL_OES_stencil1 */
1014#define GL_STENCIL_INDEX1_OES 0x8D46
1015
1016/* GL_OES_stencil4 */
1017#define GL_STENCIL_INDEX4_OES 0x8D47
1018
1019/* GL_OES_texture_3D */
1020#define GL_TEXTURE_WRAP_R_OES 0x8072
1021#define GL_TEXTURE_3D_OES 0x806F
1022#define GL_TEXTURE_BINDING_3D_OES 0x806A
1023#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073
1024#define GL_SAMPLER_3D_OES 0x8B5F
1025#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4
1026
1027/* GL_OES_texture_float */
1028/* No new tokens introduced by this extension. */
1029
1030/* GL_OES_texture_float_linear */
1031/* No new tokens introduced by this extension. */
1032
1033/* GL_OES_texture_half_float */
1034#define GL_HALF_FLOAT_OES 0x8D61
1035
1036/* GL_OES_texture_half_float_linear */
1037/* No new tokens introduced by this extension. */
1038
1039/* GL_OES_texture_npot */
1040/* No new tokens introduced by this extension. */
1041
1042/* GL_OES_vertex_half_float */
1043/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */
1044
1045/* GL_OES_vertex_type_10_10_10_2 */
1046#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6
1047#define GL_INT_10_10_10_2_OES 0x8DF7
1048
1049/*------------------------------------------------------------------------*
1050 * AMD extension tokens
1051 *------------------------------------------------------------------------*/
1052
1053/* GL_AMD_compressed_3DC_texture */
1054#define GL_3DC_X_AMD 0x87F9
1055#define GL_3DC_XY_AMD 0x87FA
1056
1057/* GL_AMD_compressed_ATC_texture */
1058#define GL_ATC_RGB_AMD 0x8C92
1059#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93
1060#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE
1061
1062/* GL_AMD_performance_monitor */
1063#define GL_COUNTER_TYPE_AMD 0x8BC0
1064#define GL_COUNTER_RANGE_AMD 0x8BC1
1065#define GL_UNSIGNED_INT64_AMD 0x8BC2
1066#define GL_PERCENTAGE_AMD 0x8BC3
1067#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
1068#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
1069#define GL_PERFMON_RESULT_AMD 0x8BC6
1070
1071/* GL_AMD_program_binary_Z400 */
1072#define GL_Z400_BINARY_AMD 0x8740
1073
1074/*------------------------------------------------------------------------*
1075 * EXT extension tokens
1076 *------------------------------------------------------------------------*/
1077
1078/* GL_EXT_blend_minmax */
1079#define GL_MIN_EXT 0x8007
1080#define GL_MAX_EXT 0x8008
1081
1082/* GL_EXT_discard_framebuffer */
1083#define GL_COLOR_EXT 0x1800
1084#define GL_DEPTH_EXT 0x1801
1085#define GL_STENCIL_EXT 0x1802
1086
1087/* GL_EXT_multi_draw_arrays */
1088/* No new tokens introduced by this extension. */
1089
1090/* GL_EXT_read_format_bgra */
1091#define GL_BGRA_EXT 0x80E1
1092#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365
1093#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
1094
1095/* GL_EXT_texture_filter_anisotropic */
1096#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
1097#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
1098
1099/* GL_EXT_texture_format_BGRA8888 */
1100#define GL_BGRA_EXT 0x80E1
1101
1102/* GL_EXT_texture_type_2_10_10_10_REV */
1103#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
1104
1105/*------------------------------------------------------------------------*
1106 * IMG extension tokens
1107 *------------------------------------------------------------------------*/
1108
1109/* GL_IMG_program_binary */
1110#define GL_SGX_PROGRAM_BINARY_IMG 0x9130
1111
1112/* GL_IMG_read_format */
1113#define GL_BGRA_IMG 0x80E1
1114#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365
1115
1116/* GL_IMG_shader_binary */
1117#define GL_SGX_BINARY_IMG 0x8C0A
1118
1119/* GL_IMG_texture_compression_pvrtc */
1120#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00
1121#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01
1122#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02
1123#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
1124
1125/*------------------------------------------------------------------------*
1126 * NV extension tokens
1127 *------------------------------------------------------------------------*/
1128
1129/* GL_NV_fence */
1130#define GL_ALL_COMPLETED_NV 0x84F2
1131#define GL_FENCE_STATUS_NV 0x84F3
1132#define GL_FENCE_CONDITION_NV 0x84F4
1133
1134/*------------------------------------------------------------------------*
1135 * QCOM extension tokens
1136 *------------------------------------------------------------------------*/
1137
1138/* GL_QCOM_driver_control */
1139/* No new tokens introduced by this extension. */
1140
1141/* GL_QCOM_extended_get */
1142#define GL_TEXTURE_WIDTH_QCOM 0x8BD2
1143#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3
1144#define GL_TEXTURE_DEPTH_QCOM 0x8BD4
1145#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5
1146#define GL_TEXTURE_FORMAT_QCOM 0x8BD6
1147#define GL_TEXTURE_TYPE_QCOM 0x8BD7
1148#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8
1149#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9
1150#define GL_TEXTURE_TARGET_QCOM 0x8BDA
1151#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB
1152#define GL_STATE_RESTORE 0x8BDC
1153
1154/* GL_QCOM_extended_get2 */
1155/* No new tokens introduced by this extension. */
1156
1157/* GL_QCOM_perfmon_global_mode */
1158#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0
1159
1160/* GL_QCOM_writeonly_rendering */
1161#define GL_WRITEONLY_RENDERING_QCOM 0x8823
1162
1163/*------------------------------------------------------------------------*
1164 * End of extension tokens, start of corresponding extension functions
1165 *------------------------------------------------------------------------*/
1166
1167/* EvasGL_KHR_image */
1168#define EVAS_GL_NATIVE_PIXMAP 0x30B0 /* evasglCreateImage target */
1169
1170/* EvasGL_KHR_vg_parent_image */
1171#define EVAS_VG_PARENT_IMAGE 0x30BA /* evasglCreateImage target */
1172
1173/* EvasGL_KHR_gl_texture_2D_image */
1174#define EVAS_GL_TEXTURE_2D 0x30B1 /* evasglCreateImage target */
1175#define EVAS_GL_TEXTURE_LEVEL 0x30BC /* evasglCreateImage attribute */
1176
1177/* EvasGL_KHR_gl_texture_cubemap_image */
1178#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 /* evasglCreateImage target */
1179#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 /* evasglCreateImage target */
1180#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 /* evasglCreateImage target */
1181#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 /* evasglCreateImage target */
1182#define EVAS_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 /* evasglCreateImage target */
1183#define EVAS_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 /* evasglCreateImage target */
1184
1185/* EvasGL_KHR_gl_texture_3D_image */
1186#define EVAS_GL_TEXTURE_3D 0x30B2 /* evasglCreateImage target */
1187#define EVAS_GL_TEXTURE_ZOFFSET 0x30BD /* evasglCreateImage attribute */
1188
1189/* EvasGL_KHR_gl_renderbuffer_image */
1190#define EVAS_GL_RENDERBUFFER 0x30B9 /* evasglCreateImage target */
1191
1192#else
1193# ifndef EVAS_GL_NO_GL_H_CHECK
1194# 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."
1195# endif
1196#endif
1197
1198#define EVAS_GL_API_VERSION 1
1199struct _Evas_GL_API
1200{
1201 int version;
1202
1203 /* version 1: */
1204 /*------- GLES 2.0 -------*/
1205 void (*glActiveTexture) (GLenum texture);
1206 void (*glAttachShader) (GLuint program, GLuint shader);
1207 void (*glBindAttribLocation) (GLuint program, GLuint index, const char* name);
1208 void (*glBindBuffer) (GLenum target, GLuint buffer);
1209 void (*glBindFramebuffer) (GLenum target, GLuint framebuffer);
1210 void (*glBindRenderbuffer) (GLenum target, GLuint renderbuffer);
1211 void (*glBindTexture) (GLenum target, GLuint texture);
1212 void (*glBlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
1213 void (*glBlendEquation) ( GLenum mode );
1214 void (*glBlendEquationSeparate) (GLenum modeRGB, GLenum modeAlpha);
1215 void (*glBlendFunc) (GLenum sfactor, GLenum dfactor);
1216 void (*glBlendFuncSeparate) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
1217 void (*glBufferData) (GLenum target, GLsizeiptr size, const void* data, GLenum usage);
1218 void (*glBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const void* data);
1219 GLenum (*glCheckFramebufferStatus) (GLenum target);
1220 void (*glClear) (GLbitfield mask);
1221 void (*glClearColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
1222 void (*glClearDepthf) (GLclampf depth);
1223 void (*glClearStencil) (GLint s);
1224 void (*glColorMask) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
1225 void (*glCompileShader) (GLuint shader);
1226 void (*glCompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
1227 void (*glCompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
1228 void (*glCopyTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
1229 void (*glCopyTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1230 GLuint (*glCreateProgram) (void);
1231 GLuint (*glCreateShader) (GLenum type);
1232 void (*glCullFace) (GLenum mode);
1233 void (*glDeleteBuffers) (GLsizei n, const GLuint* buffers);
1234 void (*glDeleteFramebuffers) (GLsizei n, const GLuint* framebuffers);
1235 void (*glDeleteProgram) (GLuint program);
1236 void (*glDeleteRenderbuffers) (GLsizei n, const GLuint* renderbuffers);
1237 void (*glDeleteShader) (GLuint shader);
1238 void (*glDeleteTextures) (GLsizei n, const GLuint* textures);
1239 void (*glDepthFunc) (GLenum func);
1240 void (*glDepthMask) (GLboolean flag);
1241 void (*glDepthRangef) (GLclampf zNear, GLclampf zFar);
1242 void (*glDetachShader) (GLuint program, GLuint shader);
1243 void (*glDisable) (GLenum cap);
1244 void (*glDisableVertexAttribArray) (GLuint index);
1245 void (*glDrawArrays) (GLenum mode, GLint first, GLsizei count);
1246 void (*glDrawElements) (GLenum mode, GLsizei count, GLenum type, const void* indices);
1247 void (*glEnable) (GLenum cap);
1248 void (*glEnableVertexAttribArray) (GLuint index);
1249 void (*glFinish) (void);
1250 void (*glFlush) (void);
1251 void (*glFramebufferRenderbuffer) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
1252 void (*glFramebufferTexture2D) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
1253 void (*glFrontFace) (GLenum mode);
1254 void (*glGenBuffers) (GLsizei n, GLuint* buffers);
1255 void (*glGenerateMipmap) (GLenum target);
1256 void (*glGenFramebuffers) (GLsizei n, GLuint* framebuffers);
1257 void (*glGenRenderbuffers) (GLsizei n, GLuint* renderbuffers);
1258 void (*glGenTextures) (GLsizei n, GLuint* textures);
1259 void (*glGetActiveAttrib) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
1260 void (*glGetActiveUniform) (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
1261 void (*glGetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
1262 int (*glGetAttribLocation) (GLuint program, const char* name);
1263 void (*glGetBooleanv) (GLenum pname, GLboolean* params);
1264 void (*glGetBufferParameteriv) (GLenum target, GLenum pname, GLint* params);
1265 GLenum (*glGetError) (void);
1266 void (*glGetFloatv) (GLenum pname, GLfloat* params);
1267 void (*glGetFramebufferAttachmentParameteriv) (GLenum target, GLenum attachment, GLenum pname, GLint* params);
1268 void (*glGetIntegerv) (GLenum pname, GLint* params);
1269 void (*glGetProgramiv) (GLuint program, GLenum pname, GLint* params);
1270 void (*glGetProgramInfoLog) (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
1271 void (*glGetRenderbufferParameteriv) (GLenum target, GLenum pname, GLint* params);
1272 void (*glGetShaderiv) (GLuint shader, GLenum pname, GLint* params);
1273 void (*glGetShaderInfoLog) (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
1274 void (*glGetShaderPrecisionFormat) (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
1275 void (*glGetShaderSource) (GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
1276 const GLubyte* (*glGetString) (GLenum name);
1277 void (*glGetTexParameterfv) (GLenum target, GLenum pname, GLfloat* params);
1278 void (*glGetTexParameteriv) (GLenum target, GLenum pname, GLint* params);
1279 void (*glGetUniformfv) (GLuint program, GLint location, GLfloat* params);
1280 void (*glGetUniformiv) (GLuint program, GLint location, GLint* params);
1281 int (*glGetUniformLocation) (GLuint program, const char* name);
1282 void (*glGetVertexAttribfv) (GLuint index, GLenum pname, GLfloat* params);
1283 void (*glGetVertexAttribiv) (GLuint index, GLenum pname, GLint* params);
1284 void (*glGetVertexAttribPointerv) (GLuint index, GLenum pname, void** pointer);
1285 void (*glHint) (GLenum target, GLenum mode);
1286 GLboolean (*glIsBuffer) (GLuint buffer);
1287 GLboolean (*glIsEnabled) (GLenum cap);
1288 GLboolean (*glIsFramebuffer) (GLuint framebuffer);
1289 GLboolean (*glIsProgram) (GLuint program);
1290 GLboolean (*glIsRenderbuffer) (GLuint renderbuffer);
1291 GLboolean (*glIsShader) (GLuint shader);
1292 GLboolean (*glIsTexture) (GLuint texture);
1293 void (*glLineWidth) (GLfloat width);
1294 void (*glLinkProgram) (GLuint program);
1295 void (*glPixelStorei) (GLenum pname, GLint param);
1296 void (*glPolygonOffset) (GLfloat factor, GLfloat units);
1297 void (*glReadPixels) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void* pixels);
1298 void (*glReleaseShaderCompiler) (void);
1299 void (*glRenderbufferStorage) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
1300 void (*glSampleCoverage) (GLclampf value, GLboolean invert);
1301 void (*glScissor) (GLint x, GLint y, GLsizei width, GLsizei height);
1302 void (*glShaderBinary) (GLsizei n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLsizei length);
1303 void (*glShaderSource) (GLuint shader, GLsizei count, const char** string, const GLint* length);
1304 void (*glStencilFunc) (GLenum func, GLint ref, GLuint mask);
1305 void (*glStencilFuncSeparate) (GLenum face, GLenum func, GLint ref, GLuint mask);
1306 void (*glStencilMask) (GLuint mask);
1307 void (*glStencilMaskSeparate) (GLenum face, GLuint mask);
1308 void (*glStencilOp) (GLenum fail, GLenum zfail, GLenum zpass);
1309 void (*glStencilOpSeparate) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
1310 void (*glTexImage2D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void* pixels);
1311 void (*glTexParameterf) (GLenum target, GLenum pname, GLfloat param);
1312 void (*glTexParameterfv) (GLenum target, GLenum pname, const GLfloat* params);
1313 void (*glTexParameteri) (GLenum target, GLenum pname, GLint param);
1314 void (*glTexParameteriv) (GLenum target, GLenum pname, const GLint* params);
1315 void (*glTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
1316 void (*glUniform1f) (GLint location, GLfloat x);
1317 void (*glUniform1fv) (GLint location, GLsizei count, const GLfloat* v);
1318 void (*glUniform1i) (GLint location, GLint x);
1319 void (*glUniform1iv) (GLint location, GLsizei count, const GLint* v);
1320 void (*glUniform2f) (GLint location, GLfloat x, GLfloat y);
1321 void (*glUniform2fv) (GLint location, GLsizei count, const GLfloat* v);
1322 void (*glUniform2i) (GLint location, GLint x, GLint y);
1323 void (*glUniform2iv) (GLint location, GLsizei count, const GLint* v);
1324 void (*glUniform3f) (GLint location, GLfloat x, GLfloat y, GLfloat z);
1325 void (*glUniform3fv) (GLint location, GLsizei count, const GLfloat* v);
1326 void (*glUniform3i) (GLint location, GLint x, GLint y, GLint z);
1327 void (*glUniform3iv) (GLint location, GLsizei count, const GLint* v);
1328 void (*glUniform4f) (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1329 void (*glUniform4fv) (GLint location, GLsizei count, const GLfloat* v);
1330 void (*glUniform4i) (GLint location, GLint x, GLint y, GLint z, GLint w);
1331 void (*glUniform4iv) (GLint location, GLsizei count, const GLint* v);
1332 void (*glUniformMatrix2fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
1333 void (*glUniformMatrix3fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
1334 void (*glUniformMatrix4fv) (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
1335 void (*glUseProgram) (GLuint program);
1336 void (*glValidateProgram) (GLuint program);
1337 void (*glVertexAttrib1f) (GLuint indx, GLfloat x);
1338 void (*glVertexAttrib1fv) (GLuint indx, const GLfloat* values);
1339 void (*glVertexAttrib2f) (GLuint indx, GLfloat x, GLfloat y);
1340 void (*glVertexAttrib2fv) (GLuint indx, const GLfloat* values);
1341 void (*glVertexAttrib3f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z);
1342 void (*glVertexAttrib3fv) (GLuint indx, const GLfloat* values);
1343 void (*glVertexAttrib4f) (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1344 void (*glVertexAttrib4fv) (GLuint indx, const GLfloat* values);
1345 void (*glVertexAttribPointer) (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
1346 void (*glViewport) (GLint x, GLint y, GLsizei width, GLsizei height);
1347
1348 /*------- GLES 2.0 Extensions -------*/
1349 // Notice these two names have been changed to fit Evas GL and not EGL!
1350 /* GL_OES_EvasGL_image */
1351 void (*glEvasGLImageTargetTexture2DOES) (GLenum target, EvasGLImage image);
1352 void (*glEvasGLImageTargetRenderbufferStorageOES) (GLenum target, EvasGLImage image);
1353
1354 /* GL_OES_get_program_binary */
1355 void (*glGetProgramBinaryOES) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
1356 void (*glProgramBinaryOES) (GLuint program, GLenum binaryFormat, const void *binary, GLint length);
1357 /* GL_OES_mapbuffer */
1358 void* (*glMapBufferOES) (GLenum target, GLenum access);
1359 GLboolean (*glUnmapBufferOES) (GLenum target);
1360 void (*glGetBufferPointervOES) (GLenum target, GLenum pname, void** params);
1361 /* GL_OES_texture_3D */
1362 void (*glTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void* pixels);
1363 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);
1364 void (*glCopyTexSubImage3DOES) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1365 void (*glCompressedTexImage3DOES) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void* data);
1366 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);
1367 void (*glFramebufferTexture3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
1368
1369 /* AMD_performance_monitor */
1370 void (*glGetPerfMonitorGroupsAMD) (GLint* numGroups, GLsizei groupsSize, GLuint* groups);
1371 void (*glGetPerfMonitorCountersAMD) (GLuint group, GLint* numCounters, GLint* maxActiveCounters, GLsizei counterSize, GLuint* counters);
1372 void (*glGetPerfMonitorGroupStringAMD) (GLuint group, GLsizei bufSize, GLsizei* length, char* groupString);
1373 void (*glGetPerfMonitorCounterStringAMD) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei* length, char* counterString);
1374 void (*glGetPerfMonitorCounterInfoAMD) (GLuint group, GLuint counter, GLenum pname, void* data);
1375 void (*glGenPerfMonitorsAMD) (GLsizei n, GLuint* monitors);
1376 void (*glDeletePerfMonitorsAMD) (GLsizei n, GLuint* monitors);
1377 void (*glSelectPerfMonitorCountersAMD) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint* countersList);
1378 void (*glBeginPerfMonitorAMD) (GLuint monitor);
1379 void (*glEndPerfMonitorAMD) (GLuint monitor);
1380 void (*glGetPerfMonitorCounterDataAMD) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint* data, GLint* bytesWritten);
1381
1382 /* GL_EXT_discard_framebuffer */
1383 void (*glDiscardFramebufferEXT) (GLenum target, GLsizei numAttachments, const GLenum* attachments);
1384
1385 /* GL_EXT_multi_draw_arrays */
1386 void (*glMultiDrawArraysEXT) (GLenum mode, GLint* first, GLsizei* count, GLsizei primcount);
1387 void (*glMultiDrawElementsEXT) (GLenum mode, const GLsizei* count, GLenum type, const GLvoid** indices, GLsizei primcount);
1388
1389 /* GL_NV_fence */
1390 void (*glDeleteFencesNV) (GLsizei n, const GLuint* fences);
1391 void (*glGenFencesNV) (GLsizei n, GLuint* fences);
1392 GLboolean (*glIsFenceNV) (GLuint fence);
1393 GLboolean (*glTestFenceNV) (GLuint fence);
1394 void (*glGetFenceivNV) (GLuint fence, GLenum pname, GLint* params);
1395 void (*glFinishFenceNV) (GLuint fence);
1396 void (*glSetFenceNV) (GLuint, GLenum);
1397
1398 /* GL_QCOM_driver_control */
1399 void (*glGetDriverControlsQCOM) (GLint* num, GLsizei size, GLuint* driverControls);
1400 void (*glGetDriverControlStringQCOM) (GLuint driverControl, GLsizei bufSize, GLsizei* length, char* driverControlString);
1401 void (*glEnableDriverControlQCOM) (GLuint driverControl);
1402 void (*glDisableDriverControlQCOM) (GLuint driverControl);
1403
1404 /* GL_QCOM_extended_get */
1405 void (*glExtGetTexturesQCOM) (GLuint* textures, GLint maxTextures, GLint* numTextures);
1406 void (*glExtGetBuffersQCOM) (GLuint* buffers, GLint maxBuffers, GLint* numBuffers);
1407 void (*glExtGetRenderbuffersQCOM) (GLuint* renderbuffers, GLint maxRenderbuffers, GLint* numRenderbuffers);
1408 void (*glExtGetFramebuffersQCOM) (GLuint* framebuffers, GLint maxFramebuffers, GLint* numFramebuffers);
1409 void (*glExtGetTexLevelParameterivQCOM) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint* params);
1410 void (*glExtTexObjectStateOverrideiQCOM) (GLenum target, GLenum pname, GLint param);
1411 void (*glExtGetTexSubImageQCOM) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void* texels);
1412 void (*glExtGetBufferPointervQCOM) (GLenum target, void** params);
1413
1414
1415 /* GL_QCOM_extended_get2 */
1416 void (*glExtGetShadersQCOM) (GLuint* shaders, GLint maxShaders, GLint* numShaders);
1417 void (*glExtGetProgramsQCOM) (GLuint* programs, GLint maxPrograms, GLint* numPrograms);
1418 GLboolean (*glExtIsProgramBinaryQCOM) (GLuint program);
1419 void (*glExtGetProgramBinarySourceQCOM) (GLuint program, GLenum shadertype, char* source, GLint* length);
1420
1421 //------- EGL Related Extensions -------//
1422 /* EvasGL_KHR_image */
1423 EvasGLImage (*evasglCreateImage) (int target, void* buffer, int* attrib_list);
1424 void (*evasglDestroyImage) (EvasGLImage image);
1425
1426 /* future calls will be added down here for expansion */
1427 /* version 2: */
1428};
1429
1430
1431#ifdef __cplusplus
1432}
1433#endif
1434
1435#endif
1436/**
1437 * @}
1438 */
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3SUBDIRS = canvas cache cserve file engines include
4EVAS_STATIC_MODULE =
5EVAS_STATIC_LIBADD =
6
7if EVAS_STATIC_BUILD_SOFTWARE_GENERIC
8SUBDIRS += ../modules/engines/software_generic/
9EVAS_STATIC_MODULE += ../modules/engines/software_generic/libevas_engine_software_generic.la
10endif
11if EVAS_STATIC_BUILD_BUFFER
12SUBDIRS += ../modules/engines/buffer/
13EVAS_STATIC_MODULE += ../modules/engines/buffer/libevas_engine_buffer.la
14endif
15if EVAS_STATIC_BUILD_DIRECT3D
16SUBDIRS += ../modules/engines/direct3d/
17EVAS_STATIC_MODULE += ../modules/engines/direct3d/libevas_engine_direct3d.la
18EVAS_STATIC_LIBADD += @evas_engine_direct3d_libs@
19endif
20if EVAS_STATIC_BUILD_DIRECTFB
21SUBDIRS += ../modules/engines/directfb/
22EVAS_STATIC_MODULE += ../modules/engines/directfb/libevas_engine_directfb.la
23EVAS_STATIC_LIBADD += @evas_engine_directfb_libs@
24endif
25if EVAS_STATIC_BUILD_FB
26SUBDIRS += ../modules/engines/fb/
27EVAS_STATIC_MODULE += ../modules/engines/fb/libevas_engine_fb.la
28EVAS_STATIC_LIBADD += @evas_engine_fb_libs@
29endif
30if EVAS_STATIC_BUILD_GL_X11
31SUBDIRS += \
32 ../modules/engines/gl_common \
33 ../modules/engines/gl_x11
34EVAS_STATIC_MODULE += \
35 ../modules/engines/gl_x11/libevas_engine_gl_x11.la
36EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_xlib_libs@
37endif
38if EVAS_STATIC_BUILD_GL_SDL
39SUBDIRS += \
40 ../modules/engines/gl_common \
41 ../modules/engines/gl_sdl
42EVAS_STATIC_MODULE += \
43 ../modules/engines/gl_sdl/libevas_engine_gl_sdl.la
44EVAS_STATIC_LIBADD += @evas_engine_gl_common_libs@ @evas_engine_gl_sdl_libs@
45endif
46if EVAS_STATIC_BUILD_PSL1GHT
47SUBDIRS += ../modules/engines/psl1ght/
48EVAS_STATIC_MODULE += ../modules/engines/psl1ght/libevas_engine_psl1ght.la
49EVAS_STATIC_LIBADD += @evas_engine_psl1ght_libs@
50endif
51if EVAS_STATIC_BUILD_SOFTWARE_16
52SUBDIRS += ../modules/engines/software_16/
53EVAS_STATIC_MODULE += ../modules/engines/software_16/libevas_engine_software_16.la
54endif
55if EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
56SUBDIRS += ../modules/engines/software_16_ddraw/
57EVAS_STATIC_MODULE += ../modules/engines/software_16_ddraw/libevas_engine_software_16_ddraw.la
58EVAS_STATIC_LIBADD += @evas_engine_software_16_ddraw_libs@
59endif
60if EVAS_STATIC_BUILD_SOFTWARE_16_WINCE
61SUBDIRS += ../modules/engines/software_16_wince/
62EVAS_STATIC_MODULE += ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la
63EVAS_STATIC_LIBADD += @evas_engine_software_16_wince_libs@
64endif
65if EVAS_STATIC_BUILD_SOFTWARE_16_X11
66SUBDIRS += ../modules/engines/software_16_x11/
67EVAS_STATIC_MODULE += ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la
68EVAS_STATIC_LIBADD += @evas_engine_software_16_x11_libs@
69endif
70if EVAS_STATIC_BUILD_SOFTWARE_8
71SUBDIRS += ../modules/engines/software_8/
72EVAS_STATIC_MODULE += ../modules/engines/software_8/libevas_engine_software_8.la
73endif
74if EVAS_STATIC_BUILD_SOFTWARE_8_X11
75SUBDIRS += ../modules/engines/software_8_x11/
76EVAS_STATIC_MODULE += ../modules/engines/software_8_x11/libevas_engine_software_8_x11.la
77EVAS_STATIC_LIBADD += @evas_engine_software_8_x11_libs@
78endif
79if EVAS_STATIC_BUILD_SOFTWARE_16_SDL
80SUBDIRS += \
81 ../modules/engines/software_16_sdl/
82EVAS_STATIC_MODULE += \
83 ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la
84EVAS_STATIC_LIBADD += @SDL_LIBS@
85endif
86if EVAS_STATIC_BUILD_SOFTWARE_DDRAW
87SUBDIRS += ../modules/engines/software_ddraw/
88EVAS_STATIC_MODULE += ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la
89EVAS_STATIC_LIBADD += @evas_engine_software_ddraw_libs@
90endif
91if EVAS_STATIC_BUILD_SOFTWARE_GDI
92SUBDIRS += ../modules/engines/software_gdi/
93EVAS_STATIC_MODULE += ../modules/engines/software_gdi/libevas_engine_software_gdi.la
94EVAS_STATIC_LIBADD += @evas_engine_software_gdi_libs@
95endif
96if EVAS_STATIC_BUILD_SOFTWARE_X11
97SUBDIRS += ../modules/engines/software_x11/
98EVAS_STATIC_MODULE += ../modules/engines/software_x11/libevas_engine_software_x11.la
99EVAS_STATIC_LIBADD += @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@
100endif
101if EVAS_STATIC_BUILD_WAYLAND_SHM
102SUBDIRS += ../modules/engines/wayland_shm/
103EVAS_STATIC_MODULE += ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la
104EVAS_STATIC_LIBADD += @evas_engine_wayland_shm_libs@
105endif
106if EVAS_STATIC_BUILD_BMP
107SUBDIRS += ../modules/loaders/bmp
108EVAS_STATIC_MODULE += ../modules/loaders/bmp/libevas_loader_bmp.la
109EVAS_STATIC_LIBADD += @evas_image_loader_bmp_libs@
110endif
111if EVAS_STATIC_BUILD_EDB
112SUBDIRS += ../modules/savers/edb ../modules/loaders/edb
113EVAS_STATIC_MODULE += ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la
114EVAS_STATIC_LIBADD += @evas_image_loader_edb_libs@
115endif
116if EVAS_STATIC_BUILD_EET
117SUBDIRS += ../modules/savers/eet ../modules/loaders/eet
118EVAS_STATIC_MODULE += ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la
119EVAS_STATIC_LIBADD += @evas_image_loader_eet_libs@
120endif
121if EVAS_STATIC_BUILD_GENERIC
122SUBDIRS += ../modules/loaders/generic
123EVAS_STATIC_MODULE += ../modules/loaders/generic/libevas_loader_generic.la
124EVAS_STATIC_LIBADD += @evas_image_loader_generic_libs@
125endif
126if EVAS_STATIC_BUILD_GIF
127SUBDIRS += ../modules/loaders/gif
128EVAS_STATIC_MODULE += ../modules/loaders/gif/libevas_loader_gif.la
129EVAS_STATIC_LIBADD += @evas_image_loader_gif_libs@
130endif
131if EVAS_STATIC_BUILD_ICO
132SUBDIRS += ../modules/loaders/ico
133EVAS_STATIC_MODULE += ../modules/loaders/ico/libevas_loader_ico.la
134EVAS_STATIC_LIBADD += @evas_image_loader_ico_libs@
135endif
136if EVAS_STATIC_BUILD_JPEG
137SUBDIRS += ../modules/loaders/jpeg
138EVAS_STATIC_MODULE += ../modules/loaders/jpeg/libevas_loader_jpeg.la
139if BUILD_SAVER_JPEG
140SUBDIRS += ../modules/savers/jpeg
141EVAS_STATIC_MODULE += ../modules/savers/jpeg/libevas_saver_jpeg.la
142endif
143EVAS_STATIC_LIBADD += @evas_image_loader_jpeg_libs@
144endif
145if EVAS_STATIC_BUILD_PMAPS
146SUBDIRS += ../modules/loaders/pmaps
147EVAS_STATIC_MODULE += ../modules/loaders/pmaps/libevas_loader_pmaps.la
148EVAS_STATIC_LIBADD += @evas_image_loader_pmaps_libs@
149endif
150if EVAS_STATIC_BUILD_PNG
151SUBDIRS += ../modules/savers/png ../modules/loaders/png
152EVAS_STATIC_MODULE += ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la
153EVAS_STATIC_LIBADD += @evas_image_loader_png_libs@
154endif
155if EVAS_STATIC_BUILD_PSD
156SUBDIRS += ../modules/loaders/psd
157EVAS_STATIC_MODULE += ../modules/loaders/psd/libevas_loader_psd.la
158EVAS_STATIC_LIBADD += @evas_image_loader_psd_libs@
159endif
160if EVAS_STATIC_BUILD_SVG
161SUBDIRS += ../modules/loaders/svg
162EVAS_STATIC_MODULE += ../modules/loaders/svg/libevas_loader_svg.la
163EVAS_STATIC_LIBADD += @evas_image_loader_svg_libs@
164endif
165if EVAS_STATIC_BUILD_TGA
166SUBDIRS += ../modules/loaders/tga
167EVAS_STATIC_MODULE += ../modules/loaders/tga/libevas_loader_tga.la
168EVAS_STATIC_LIBADD += @evas_image_loader_tga_libs@
169endif
170if EVAS_STATIC_BUILD_TIFF
171SUBDIRS += ../modules/savers/tiff ../modules/loaders/tiff
172EVAS_STATIC_MODULE += ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la
173EVAS_STATIC_LIBADD += @evas_image_loader_tiff_libs@
174endif
175if EVAS_STATIC_BUILD_WBMP
176SUBDIRS += ../modules/loaders/wbmp
177EVAS_STATIC_MODULE += ../modules/loaders/wbmp/libevas_loader_wbmp.la
178EVAS_STATIC_LIBADD += @evas_image_loader_wbmp_libs@
179endif
180if EVAS_STATIC_BUILD_XPM
181SUBDIRS += ../modules/loaders/xpm
182EVAS_STATIC_MODULE += ../modules/loaders/xpm/libevas_loader_xpm.la
183EVAS_STATIC_LIBADD += @evas_image_loader_xpm_libs@
184endif
185
186AM_CPPFLAGS = \
187-I. \
188-I$(top_srcdir)/src/lib \
189-I$(top_srcdir)/src/lib/include \
190-DPACKAGE_BIN_DIR=\"$(bindir)\" \
191-DPACKAGE_LIB_DIR=\"$(libdir)\" \
192-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
193@EINA_CFLAGS@ \
194@FREETYPE_CFLAGS@ \
195@FRIBIDI_CFLAGS@ \
196@HARFBUZZ_CFLAGS@ \
197@EET_CFLAGS@ \
198@FONTCONFIG_CFLAGS@ \
199@pthread_cflags@ \
200@PIXMAN_CFLAGS@
201
202lib_LTLIBRARIES = libevas.la
203
204includes_HEADERS = Evas.h Evas_GL.h
205includesdir = $(includedir)/evas-@VMAJ@
206
207libevas_la_SOURCES = main.c
208
209if EVAS_CSERVE
210
211libevas_cserve_la = cserve/libevas_cserve.la
212
213endif
214
215libevas_la_LIBADD = \
216canvas/libevas_canvas.la \
217file/libevas_file.la \
218cache/libevas_cache.la \
219$(libevas_cserve_la) \
220engines/common/libevas_engine_common.la \
221@FREETYPE_LIBS@ \
222@FRIBIDI_LIBS@ \
223@HARFBUZZ_LIBS@ \
224@EET_LIBS@ \
225@FONTCONFIG_LIBS@ \
226@pthread_libs@ \
227@EINA_LIBS@ \
228$(EVAS_STATIC_MODULE) \
229$(EVAS_STATIC_LIBADD) \
230@PIXMAN_LIBS@ \
231-lm
232
233libevas_la_DEPENDENCIES = \
234canvas/libevas_canvas.la \
235file/libevas_file.la \
236cache/libevas_cache.la \
237$(libevas_cserve_la) \
238engines/common/libevas_engine_common.la \
239$(EVAS_STATIC_MODULE)
240
241if BUILD_ENGINE_SOFTWARE_16
242
243libevas_la_LIBADD += engines/common_16/libevas_engine_common_16.la
244libevas_la_DEPENDENCIES += engines/common_16/libevas_engine_common_16.la
245
246endif
247
248if BUILD_ENGINE_SOFTWARE_8
249
250libevas_la_LIBADD += engines/common_8/libevas_engine_common_8.la
251libevas_la_DEPENDENCIES += engines/common_8/libevas_engine_common_8.la
252
253endif
254
255libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
256
257### Evas_GL we are still using it in our code, so just don't install it.
258EXTRA_DIST=Evas_GL.h
259
260DIST_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18
19VPATH = @srcdir@
20pkgdatadir = $(datadir)/@PACKAGE@
21pkgincludedir = $(includedir)/@PACKAGE@
22pkglibdir = $(libdir)/@PACKAGE@
23pkglibexecdir = $(libexecdir)/@PACKAGE@
24am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
25install_sh_DATA = $(install_sh) -c -m 644
26install_sh_PROGRAM = $(install_sh) -c
27install_sh_SCRIPT = $(install_sh) -c
28INSTALL_HEADER = $(INSTALL_DATA)
29transform = $(program_transform_name)
30NORMAL_INSTALL = :
31PRE_INSTALL = :
32POST_INSTALL = :
33NORMAL_UNINSTALL = :
34PRE_UNINSTALL = :
35POST_UNINSTALL = :
36build_triplet = @build@
37host_triplet = @host@
38@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_1 = ../modules/engines/software_generic/
39@EVAS_STATIC_BUILD_SOFTWARE_GENERIC_TRUE@am__append_2 = ../modules/engines/software_generic/libevas_engine_software_generic.la
40@EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_3 = ../modules/engines/buffer/
41@EVAS_STATIC_BUILD_BUFFER_TRUE@am__append_4 = ../modules/engines/buffer/libevas_engine_buffer.la
42@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_5 = ../modules/engines/direct3d/
43@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_6 = ../modules/engines/direct3d/libevas_engine_direct3d.la
44@EVAS_STATIC_BUILD_DIRECT3D_TRUE@am__append_7 = @evas_engine_direct3d_libs@
45@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_8 = ../modules/engines/directfb/
46@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_9 = ../modules/engines/directfb/libevas_engine_directfb.la
47@EVAS_STATIC_BUILD_DIRECTFB_TRUE@am__append_10 = @evas_engine_directfb_libs@
48@EVAS_STATIC_BUILD_FB_TRUE@am__append_11 = ../modules/engines/fb/
49@EVAS_STATIC_BUILD_FB_TRUE@am__append_12 = ../modules/engines/fb/libevas_engine_fb.la
50@EVAS_STATIC_BUILD_FB_TRUE@am__append_13 = @evas_engine_fb_libs@
51@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_14 = \
52@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_common \
53@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11
54
55@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_15 = \
56@EVAS_STATIC_BUILD_GL_X11_TRUE@ ../modules/engines/gl_x11/libevas_engine_gl_x11.la
57
58@EVAS_STATIC_BUILD_GL_X11_TRUE@am__append_16 = @evas_engine_gl_common_libs@ @evas_engine_gl_xlib_libs@
59@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_17 = \
60@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_common \
61@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl
62
63@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_18 = \
64@EVAS_STATIC_BUILD_GL_SDL_TRUE@ ../modules/engines/gl_sdl/libevas_engine_gl_sdl.la
65
66@EVAS_STATIC_BUILD_GL_SDL_TRUE@am__append_19 = @evas_engine_gl_common_libs@ @evas_engine_gl_sdl_libs@
67@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_20 = ../modules/engines/psl1ght/
68@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_21 = ../modules/engines/psl1ght/libevas_engine_psl1ght.la
69@EVAS_STATIC_BUILD_PSL1GHT_TRUE@am__append_22 = @evas_engine_psl1ght_libs@
70@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_23 = ../modules/engines/software_16/
71@EVAS_STATIC_BUILD_SOFTWARE_16_TRUE@am__append_24 = ../modules/engines/software_16/libevas_engine_software_16.la
72@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_25 = ../modules/engines/software_16_ddraw/
73@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_26 = ../modules/engines/software_16_ddraw/libevas_engine_software_16_ddraw.la
74@EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW_TRUE@am__append_27 = @evas_engine_software_16_ddraw_libs@
75@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_28 = ../modules/engines/software_16_wince/
76@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_29 = ../modules/engines/software_16_wince/libevas_engine_software_16_wince.la
77@EVAS_STATIC_BUILD_SOFTWARE_16_WINCE_TRUE@am__append_30 = @evas_engine_software_16_wince_libs@
78@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_31 = ../modules/engines/software_16_x11/
79@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_32 = ../modules/engines/software_16_x11/libevas_engine_software_16_x11.la
80@EVAS_STATIC_BUILD_SOFTWARE_16_X11_TRUE@am__append_33 = @evas_engine_software_16_x11_libs@
81@EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_34 = ../modules/engines/software_8/
82@EVAS_STATIC_BUILD_SOFTWARE_8_TRUE@am__append_35 = ../modules/engines/software_8/libevas_engine_software_8.la
83@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_36 = ../modules/engines/software_8_x11/
84@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_37 = ../modules/engines/software_8_x11/libevas_engine_software_8_x11.la
85@EVAS_STATIC_BUILD_SOFTWARE_8_X11_TRUE@am__append_38 = @evas_engine_software_8_x11_libs@
86@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_39 = \
87@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@ ../modules/engines/software_16_sdl/
88
89@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_40 = \
90@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@ ../modules/engines/software_16_sdl/libevas_engine_software_16_sdl.la
91
92@EVAS_STATIC_BUILD_SOFTWARE_16_SDL_TRUE@am__append_41 = @SDL_LIBS@
93@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_42 = ../modules/engines/software_ddraw/
94@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_43 = ../modules/engines/software_ddraw/libevas_engine_software_ddraw.la
95@EVAS_STATIC_BUILD_SOFTWARE_DDRAW_TRUE@am__append_44 = @evas_engine_software_ddraw_libs@
96@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_45 = ../modules/engines/software_gdi/
97@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_46 = ../modules/engines/software_gdi/libevas_engine_software_gdi.la
98@EVAS_STATIC_BUILD_SOFTWARE_GDI_TRUE@am__append_47 = @evas_engine_software_gdi_libs@
99@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_48 = ../modules/engines/software_x11/
100@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_49 = ../modules/engines/software_x11/libevas_engine_software_x11.la
101@EVAS_STATIC_BUILD_SOFTWARE_X11_TRUE@am__append_50 = @evas_engine_software_xlib_libs@ @evas_engine_software_xcb_libs@
102@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_51 = ../modules/engines/wayland_shm/
103@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_52 = ../modules/engines/wayland_shm/libevas_engine_wayland_shm.la
104@EVAS_STATIC_BUILD_WAYLAND_SHM_TRUE@am__append_53 = @evas_engine_wayland_shm_libs@
105@EVAS_STATIC_BUILD_BMP_TRUE@am__append_54 = ../modules/loaders/bmp
106@EVAS_STATIC_BUILD_BMP_TRUE@am__append_55 = ../modules/loaders/bmp/libevas_loader_bmp.la
107@EVAS_STATIC_BUILD_BMP_TRUE@am__append_56 = @evas_image_loader_bmp_libs@
108@EVAS_STATIC_BUILD_EDB_TRUE@am__append_57 = ../modules/savers/edb ../modules/loaders/edb
109@EVAS_STATIC_BUILD_EDB_TRUE@am__append_58 = ../modules/savers/edb/libevas_saver_edb.la ../modules/loaders/edb/libevas_loader_edb.la
110@EVAS_STATIC_BUILD_EDB_TRUE@am__append_59 = @evas_image_loader_edb_libs@
111@EVAS_STATIC_BUILD_EET_TRUE@am__append_60 = ../modules/savers/eet ../modules/loaders/eet
112@EVAS_STATIC_BUILD_EET_TRUE@am__append_61 = ../modules/savers/eet/libevas_saver_eet.la ../modules/loaders/eet/libevas_loader_eet.la
113@EVAS_STATIC_BUILD_EET_TRUE@am__append_62 = @evas_image_loader_eet_libs@
114@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_63 = ../modules/loaders/generic
115@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_64 = ../modules/loaders/generic/libevas_loader_generic.la
116@EVAS_STATIC_BUILD_GENERIC_TRUE@am__append_65 = @evas_image_loader_generic_libs@
117@EVAS_STATIC_BUILD_GIF_TRUE@am__append_66 = ../modules/loaders/gif
118@EVAS_STATIC_BUILD_GIF_TRUE@am__append_67 = ../modules/loaders/gif/libevas_loader_gif.la
119@EVAS_STATIC_BUILD_GIF_TRUE@am__append_68 = @evas_image_loader_gif_libs@
120@EVAS_STATIC_BUILD_ICO_TRUE@am__append_69 = ../modules/loaders/ico
121@EVAS_STATIC_BUILD_ICO_TRUE@am__append_70 = ../modules/loaders/ico/libevas_loader_ico.la
122@EVAS_STATIC_BUILD_ICO_TRUE@am__append_71 = @evas_image_loader_ico_libs@
123@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_72 = ../modules/loaders/jpeg
124@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_73 = ../modules/loaders/jpeg/libevas_loader_jpeg.la
125@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_74 = ../modules/savers/jpeg
126@BUILD_SAVER_JPEG_TRUE@@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_75 = ../modules/savers/jpeg/libevas_saver_jpeg.la
127@EVAS_STATIC_BUILD_JPEG_TRUE@am__append_76 = @evas_image_loader_jpeg_libs@
128@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_77 = ../modules/loaders/pmaps
129@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_78 = ../modules/loaders/pmaps/libevas_loader_pmaps.la
130@EVAS_STATIC_BUILD_PMAPS_TRUE@am__append_79 = @evas_image_loader_pmaps_libs@
131@EVAS_STATIC_BUILD_PNG_TRUE@am__append_80 = ../modules/savers/png ../modules/loaders/png
132@EVAS_STATIC_BUILD_PNG_TRUE@am__append_81 = ../modules/savers/png/libevas_saver_png.la ../modules/loaders/png/libevas_loader_png.la
133@EVAS_STATIC_BUILD_PNG_TRUE@am__append_82 = @evas_image_loader_png_libs@
134@EVAS_STATIC_BUILD_PSD_TRUE@am__append_83 = ../modules/loaders/psd
135@EVAS_STATIC_BUILD_PSD_TRUE@am__append_84 = ../modules/loaders/psd/libevas_loader_psd.la
136@EVAS_STATIC_BUILD_PSD_TRUE@am__append_85 = @evas_image_loader_psd_libs@
137@EVAS_STATIC_BUILD_SVG_TRUE@am__append_86 = ../modules/loaders/svg
138@EVAS_STATIC_BUILD_SVG_TRUE@am__append_87 = ../modules/loaders/svg/libevas_loader_svg.la
139@EVAS_STATIC_BUILD_SVG_TRUE@am__append_88 = @evas_image_loader_svg_libs@
140@EVAS_STATIC_BUILD_TGA_TRUE@am__append_89 = ../modules/loaders/tga
141@EVAS_STATIC_BUILD_TGA_TRUE@am__append_90 = ../modules/loaders/tga/libevas_loader_tga.la
142@EVAS_STATIC_BUILD_TGA_TRUE@am__append_91 = @evas_image_loader_tga_libs@
143@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_92 = ../modules/savers/tiff ../modules/loaders/tiff
144@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_93 = ../modules/savers/tiff/libevas_saver_tiff.la ../modules/loaders/tiff/libevas_loader_tiff.la
145@EVAS_STATIC_BUILD_TIFF_TRUE@am__append_94 = @evas_image_loader_tiff_libs@
146@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_95 = ../modules/loaders/wbmp
147@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_96 = ../modules/loaders/wbmp/libevas_loader_wbmp.la
148@EVAS_STATIC_BUILD_WBMP_TRUE@am__append_97 = @evas_image_loader_wbmp_libs@
149@EVAS_STATIC_BUILD_XPM_TRUE@am__append_98 = ../modules/loaders/xpm
150@EVAS_STATIC_BUILD_XPM_TRUE@am__append_99 = ../modules/loaders/xpm/libevas_loader_xpm.la
151@EVAS_STATIC_BUILD_XPM_TRUE@am__append_100 = @evas_image_loader_xpm_libs@
152@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_101 = engines/common_16/libevas_engine_common_16.la
153@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_102 = engines/common_16/libevas_engine_common_16.la
154@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_103 = engines/common_8/libevas_engine_common_8.la
155@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_104 = engines/common_8/libevas_engine_common_8.la
156subdir = src/lib
157DIST_COMMON = $(includes_HEADERS) $(srcdir)/Makefile.am \
158 $(srcdir)/Makefile.in
159ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
160am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
161 $(top_srcdir)/m4/efl_coverage.m4 \
162 $(top_srcdir)/m4/efl_doxygen.m4 \
163 $(top_srcdir)/m4/efl_fnmatch.m4 \
164 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
165 $(top_srcdir)/m4/evas_check_engine.m4 \
166 $(top_srcdir)/m4/evas_check_loader.m4 \
167 $(top_srcdir)/m4/evas_converter.m4 \
168 $(top_srcdir)/m4/evas_dither.m4 \
169 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
170 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
171 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
172 $(top_srcdir)/configure.ac
173am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
174 $(ACLOCAL_M4)
175mkinstalldirs = $(install_sh) -d
176CONFIG_HEADER = $(top_builddir)/config.h
177CONFIG_CLEAN_FILES =
178CONFIG_CLEAN_VPATH_FILES =
179am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
180am__vpath_adj = case $$p in \
181 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
182 *) f=$$p;; \
183 esac;
184am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
185am__install_max = 40
186am__nobase_strip_setup = \
187 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
188am__nobase_strip = \
189 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
190am__nobase_list = $(am__nobase_strip_setup); \
191 for p in $$list; do echo "$$p $$p"; done | \
192 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
193 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
194 if (++n[$$2] == $(am__install_max)) \
195 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
196 END { for (dir in files) print dir, files[dir] }'
197am__base_list = \
198 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
199 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
200am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"
201LTLIBRARIES = $(lib_LTLIBRARIES)
202am__DEPENDENCIES_1 =
203am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
204 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
205 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
206 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
207 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
208 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
209 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
210 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
211 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
212 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
213 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
214 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
215 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
216 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
217 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
218am_libevas_la_OBJECTS = main.lo
219libevas_la_OBJECTS = $(am_libevas_la_OBJECTS)
220AM_V_lt = $(am__v_lt_$(V))
221am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
222am__v_lt_0 = --silent
223libevas_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
224 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
225 $(libevas_la_LDFLAGS) $(LDFLAGS) -o $@
226DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
227depcomp = $(SHELL) $(top_srcdir)/depcomp
228am__depfiles_maybe = depfiles
229am__mv = mv -f
230COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
231 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
232LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
233 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
234 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
235 $(AM_CFLAGS) $(CFLAGS)
236AM_V_CC = $(am__v_CC_$(V))
237am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
238am__v_CC_0 = @echo " CC " $@;
239AM_V_at = $(am__v_at_$(V))
240am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
241am__v_at_0 = @
242CCLD = $(CC)
243LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
244 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
245 $(AM_LDFLAGS) $(LDFLAGS) -o $@
246AM_V_CCLD = $(am__v_CCLD_$(V))
247am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
248am__v_CCLD_0 = @echo " CCLD " $@;
249AM_V_GEN = $(am__v_GEN_$(V))
250am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
251am__v_GEN_0 = @echo " GEN " $@;
252SOURCES = $(libevas_la_SOURCES)
253DIST_SOURCES = $(libevas_la_SOURCES)
254RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
255 html-recursive info-recursive install-data-recursive \
256 install-dvi-recursive install-exec-recursive \
257 install-html-recursive install-info-recursive \
258 install-pdf-recursive install-ps-recursive install-recursive \
259 installcheck-recursive installdirs-recursive pdf-recursive \
260 ps-recursive uninstall-recursive
261HEADERS = $(includes_HEADERS)
262RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
263 distclean-recursive maintainer-clean-recursive
264AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
265 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
266 distdir
267ETAGS = etags
268CTAGS = ctags
269DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
270am__relativize = \
271 dir0=`pwd`; \
272 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
273 sed_rest='s,^[^/]*/*,,'; \
274 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
275 sed_butlast='s,/*[^/]*$$,,'; \
276 while test -n "$$dir1"; do \
277 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
278 if test "$$first" != "."; then \
279 if test "$$first" = ".."; then \
280 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
281 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
282 else \
283 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
284 if test "$$first2" = "$$first"; then \
285 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
286 else \
287 dir2="../$$dir2"; \
288 fi; \
289 dir0="$$dir0"/"$$first"; \
290 fi; \
291 fi; \
292 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
293 done; \
294 reldir="$$dir2"
295ACLOCAL = @ACLOCAL@
296ALLOCA = @ALLOCA@
297AMTAR = @AMTAR@
298AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
299AR = @AR@
300AS = @AS@
301AUTOCONF = @AUTOCONF@
302AUTOHEADER = @AUTOHEADER@
303AUTOMAKE = @AUTOMAKE@
304AWK = @AWK@
305CC = @CC@
306CCDEPMODE = @CCDEPMODE@
307CFLAGS = @CFLAGS@
308CHECK_CFLAGS = @CHECK_CFLAGS@
309CHECK_LIBS = @CHECK_LIBS@
310CPP = @CPP@
311CPPFLAGS = @CPPFLAGS@
312CXX = @CXX@
313CXXCPP = @CXXCPP@
314CXXDEPMODE = @CXXDEPMODE@
315CXXFLAGS = @CXXFLAGS@
316CYGPATH_W = @CYGPATH_W@
317DEFS = @DEFS@
318DEPDIR = @DEPDIR@
319DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
320DIRECTFB_LIBS = @DIRECTFB_LIBS@
321DLLTOOL = @DLLTOOL@
322DSYMUTIL = @DSYMUTIL@
323DUMPBIN = @DUMPBIN@
324ECHO_C = @ECHO_C@
325ECHO_N = @ECHO_N@
326ECHO_T = @ECHO_T@
327ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
328ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
329EDB_CFLAGS = @EDB_CFLAGS@
330EDB_LIBS = @EDB_LIBS@
331EDJE_CFLAGS = @EDJE_CFLAGS@
332EDJE_LIBS = @EDJE_LIBS@
333EET_CFLAGS = @EET_CFLAGS@
334EET_LIBS = @EET_LIBS@
335EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
336EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
337EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
338EGREP = @EGREP@
339EINA_CFLAGS = @EINA_CFLAGS@
340EINA_LIBS = @EINA_LIBS@
341EVAS_CFLAGS = @EVAS_CFLAGS@
342EVAS_LIBS = @EVAS_LIBS@
343EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
344EVIL_CFLAGS = @EVIL_CFLAGS@
345EVIL_LIBS = @EVIL_LIBS@
346EXEEXT = @EXEEXT@
347EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
348EXOTIC_LIBS = @EXOTIC_LIBS@
349FGREP = @FGREP@
350FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
351FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
352FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
353FREETYPE_LIBS = @FREETYPE_LIBS@
354FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
355FRIBIDI_LIBS = @FRIBIDI_LIBS@
356GL_EET_CFLAGS = @GL_EET_CFLAGS@
357GL_EET_LIBS = @GL_EET_LIBS@
358GREP = @GREP@
359HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
360HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
361INSTALL = @INSTALL@
362INSTALL_DATA = @INSTALL_DATA@
363INSTALL_PROGRAM = @INSTALL_PROGRAM@
364INSTALL_SCRIPT = @INSTALL_SCRIPT@
365INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
366LD = @LD@
367LDFLAGS = @LDFLAGS@
368LIBOBJS = @LIBOBJS@
369LIBS = @LIBS@
370LIBTOOL = @LIBTOOL@
371LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
372LINEBREAK_LIBS = @LINEBREAK_LIBS@
373LIPO = @LIPO@
374LN_S = @LN_S@
375LTLIBOBJS = @LTLIBOBJS@
376MAKEINFO = @MAKEINFO@
377MKDIR_P = @MKDIR_P@
378MODULE_ARCH = @MODULE_ARCH@
379NM = @NM@
380NMEDIT = @NMEDIT@
381OBJC = @OBJC@
382OBJCDEPMODE = @OBJCDEPMODE@
383OBJCFLAGS = @OBJCFLAGS@
384OBJDUMP = @OBJDUMP@
385OBJEXT = @OBJEXT@
386OTOOL = @OTOOL@
387OTOOL64 = @OTOOL64@
388PACKAGE = @PACKAGE@
389PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
390PACKAGE_NAME = @PACKAGE_NAME@
391PACKAGE_STRING = @PACKAGE_STRING@
392PACKAGE_TARNAME = @PACKAGE_TARNAME@
393PACKAGE_URL = @PACKAGE_URL@
394PACKAGE_VERSION = @PACKAGE_VERSION@
395PATH_SEPARATOR = @PATH_SEPARATOR@
396PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
397PIXMAN_LIBS = @PIXMAN_LIBS@
398PKG_CONFIG = @PKG_CONFIG@
399PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
400PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
401PNG_CFLAGS = @PNG_CFLAGS@
402PNG_LIBS = @PNG_LIBS@
403RANLIB = @RANLIB@
404SDL_CFLAGS = @SDL_CFLAGS@
405SDL_LIBS = @SDL_LIBS@
406SED = @SED@
407SET_MAKE = @SET_MAKE@
408SHELL = @SHELL@
409SHM_OPEN_LINK = @SHM_OPEN_LINK@
410STRIP = @STRIP@
411SVG_CFLAGS = @SVG_CFLAGS@
412SVG_LIBS = @SVG_LIBS@
413VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
414VALGRIND_LIBS = @VALGRIND_LIBS@
415VERSION = @VERSION@
416VMAJ = @VMAJ@
417WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
418WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
419XCB_CFLAGS = @XCB_CFLAGS@
420XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
421XCB_GL_LIBS = @XCB_GL_LIBS@
422XCB_LIBS = @XCB_LIBS@
423XEXT_CFLAGS = @XEXT_CFLAGS@
424XEXT_LIBS = @XEXT_LIBS@
425XMKMF = @XMKMF@
426X_CFLAGS = @X_CFLAGS@
427X_EXTRA_LIBS = @X_EXTRA_LIBS@
428X_LIBS = @X_LIBS@
429X_PRE_LIBS = @X_PRE_LIBS@
430abs_builddir = @abs_builddir@
431abs_srcdir = @abs_srcdir@
432abs_top_builddir = @abs_top_builddir@
433abs_top_srcdir = @abs_top_srcdir@
434ac_ct_CC = @ac_ct_CC@
435ac_ct_CXX = @ac_ct_CXX@
436ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
437ac_ct_OBJC = @ac_ct_OBJC@
438altivec_cflags = @altivec_cflags@
439am__include = @am__include@
440am__leading_dot = @am__leading_dot@
441am__quote = @am__quote@
442am__tar = @am__tar@
443am__untar = @am__untar@
444bindir = @bindir@
445build = @build@
446build_alias = @build_alias@
447build_cpu = @build_cpu@
448build_os = @build_os@
449build_vendor = @build_vendor@
450builddir = @builddir@
451datadir = @datadir@
452datarootdir = @datarootdir@
453dlopen_libs = @dlopen_libs@
454docdir = @docdir@
455dvidir = @dvidir@
456edje_cc = @edje_cc@
457efl_doxygen = @efl_doxygen@
458efl_have_doxygen = @efl_have_doxygen@
459evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
460evas_engine_buffer_libs = @evas_engine_buffer_libs@
461evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
462evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
463evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
464evas_engine_directfb_libs = @evas_engine_directfb_libs@
465evas_engine_fb_cflags = @evas_engine_fb_cflags@
466evas_engine_fb_libs = @evas_engine_fb_libs@
467evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
468evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
469evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
470evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
471evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
472evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
473evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
474evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
475evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
476evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
477evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
478evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
479evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
480evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
481evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
482evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
483evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
484evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
485evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
486evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
487evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
488evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
489evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
490evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
491evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
492evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
493evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
494evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
495evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
496evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
497evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
498evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
499evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
500evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
501evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
502evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
503evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
504evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
505evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
506evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
507evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
508evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
509evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
510evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
511evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
512evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
513evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
514evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
515evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
516evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
517evas_image_loader_png_libs = @evas_image_loader_png_libs@
518evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
519evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
520evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
521evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
522evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
523evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
524evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
525evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
526evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
527evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
528evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
529evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
530exec_prefix = @exec_prefix@
531have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
532have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
533have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
534have_evas_engine_software_x11 = @have_evas_engine_software_x11@
535have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
536have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
537have_lcov = @have_lcov@
538host = @host@
539host_alias = @host_alias@
540host_cpu = @host_cpu@
541host_os = @host_os@
542host_vendor = @host_vendor@
543htmldir = @htmldir@
544includedir = @includedir@
545infodir = @infodir@
546install_sh = @install_sh@
547libdir = @libdir@
548libexecdir = @libexecdir@
549localedir = @localedir@
550localstatedir = @localstatedir@
551lt_ECHO = @lt_ECHO@
552lt_enable_auto_import = @lt_enable_auto_import@
553mandir = @mandir@
554mkdir_p = @mkdir_p@
555oldincludedir = @oldincludedir@
556pdfdir = @pdfdir@
557pkgconfig_requires_private = @pkgconfig_requires_private@
558prefix = @prefix@
559program_transform_name = @program_transform_name@
560psdir = @psdir@
561pthread_cflags = @pthread_cflags@
562pthread_libs = @pthread_libs@
563release_info = @release_info@
564requirement_evas = @requirement_evas@
565sbindir = @sbindir@
566sharedstatedir = @sharedstatedir@
567srcdir = @srcdir@
568sysconfdir = @sysconfdir@
569target_alias = @target_alias@
570top_build_prefix = @top_build_prefix@
571top_builddir = @top_builddir@
572top_srcdir = @top_srcdir@
573version_info = @version_info@
574MAINTAINERCLEANFILES = Makefile.in
575SUBDIRS = canvas cache cserve file engines include $(am__append_1) \
576 $(am__append_3) $(am__append_5) $(am__append_8) \
577 $(am__append_11) $(am__append_14) $(am__append_17) \
578 $(am__append_20) $(am__append_23) $(am__append_25) \
579 $(am__append_28) $(am__append_31) $(am__append_34) \
580 $(am__append_36) $(am__append_39) $(am__append_42) \
581 $(am__append_45) $(am__append_48) $(am__append_51) \
582 $(am__append_54) $(am__append_57) $(am__append_60) \
583 $(am__append_63) $(am__append_66) $(am__append_69) \
584 $(am__append_72) $(am__append_74) $(am__append_77) \
585 $(am__append_80) $(am__append_83) $(am__append_86) \
586 $(am__append_89) $(am__append_92) $(am__append_95) \
587 $(am__append_98)
588EVAS_STATIC_MODULE = $(am__append_2) $(am__append_4) $(am__append_6) \
589 $(am__append_9) $(am__append_12) $(am__append_15) \
590 $(am__append_18) $(am__append_21) $(am__append_24) \
591 $(am__append_26) $(am__append_29) $(am__append_32) \
592 $(am__append_35) $(am__append_37) $(am__append_40) \
593 $(am__append_43) $(am__append_46) $(am__append_49) \
594 $(am__append_52) $(am__append_55) $(am__append_58) \
595 $(am__append_61) $(am__append_64) $(am__append_67) \
596 $(am__append_70) $(am__append_73) $(am__append_75) \
597 $(am__append_78) $(am__append_81) $(am__append_84) \
598 $(am__append_87) $(am__append_90) $(am__append_93) \
599 $(am__append_96) $(am__append_99)
600EVAS_STATIC_LIBADD = $(am__append_7) $(am__append_10) $(am__append_13) \
601 $(am__append_16) $(am__append_19) $(am__append_22) \
602 $(am__append_27) $(am__append_30) $(am__append_33) \
603 $(am__append_38) $(am__append_41) $(am__append_44) \
604 $(am__append_47) $(am__append_50) $(am__append_53) \
605 $(am__append_56) $(am__append_59) $(am__append_62) \
606 $(am__append_65) $(am__append_68) $(am__append_71) \
607 $(am__append_76) $(am__append_79) $(am__append_82) \
608 $(am__append_85) $(am__append_88) $(am__append_91) \
609 $(am__append_94) $(am__append_97) $(am__append_100)
610AM_CPPFLAGS = \
611-I. \
612-I$(top_srcdir)/src/lib \
613-I$(top_srcdir)/src/lib/include \
614-DPACKAGE_BIN_DIR=\"$(bindir)\" \
615-DPACKAGE_LIB_DIR=\"$(libdir)\" \
616-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
617@EINA_CFLAGS@ \
618@FREETYPE_CFLAGS@ \
619@FRIBIDI_CFLAGS@ \
620@HARFBUZZ_CFLAGS@ \
621@EET_CFLAGS@ \
622@FONTCONFIG_CFLAGS@ \
623@pthread_cflags@ \
624@PIXMAN_CFLAGS@
625
626lib_LTLIBRARIES = libevas.la
627includes_HEADERS = Evas.h Evas_GL.h
628includesdir = $(includedir)/evas-@VMAJ@
629libevas_la_SOURCES = main.c
630@EVAS_CSERVE_TRUE@libevas_cserve_la = cserve/libevas_cserve.la
631libevas_la_LIBADD = canvas/libevas_canvas.la file/libevas_file.la \
632 cache/libevas_cache.la $(libevas_cserve_la) \
633 engines/common/libevas_engine_common.la @FREETYPE_LIBS@ \
634 @FRIBIDI_LIBS@ @HARFBUZZ_LIBS@ @EET_LIBS@ @FONTCONFIG_LIBS@ \
635 @pthread_libs@ @EINA_LIBS@ $(EVAS_STATIC_MODULE) \
636 $(EVAS_STATIC_LIBADD) @PIXMAN_LIBS@ -lm $(am__append_101) \
637 $(am__append_103)
638libevas_la_DEPENDENCIES = canvas/libevas_canvas.la \
639 file/libevas_file.la cache/libevas_cache.la \
640 $(libevas_cserve_la) engines/common/libevas_engine_common.la \
641 $(EVAS_STATIC_MODULE) $(am__append_102) $(am__append_104)
642libevas_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @release_info@
643
644### Evas_GL we are still using it in our code, so just don't install it.
645EXTRA_DIST = Evas_GL.h
646DIST_SUBDIRS = canvas cache cserve file engines include
647all: all-recursive
648
649.SUFFIXES:
650.SUFFIXES: .c .lo .o .obj
651$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
652 @for dep in $?; do \
653 case '$(am__configure_deps)' in \
654 *$$dep*) \
655 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
656 && { if test -f $@; then exit 0; else break; fi; }; \
657 exit 1;; \
658 esac; \
659 done; \
660 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/Makefile'; \
661 $(am__cd) $(top_srcdir) && \
662 $(AUTOMAKE) --gnu src/lib/Makefile
663.PRECIOUS: Makefile
664Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
665 @case '$?' in \
666 *config.status*) \
667 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
668 *) \
669 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
670 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
671 esac;
672
673$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
674 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
675
676$(top_srcdir)/configure: $(am__configure_deps)
677 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
678$(ACLOCAL_M4): $(am__aclocal_m4_deps)
679 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
680$(am__aclocal_m4_deps):
681install-libLTLIBRARIES: $(lib_LTLIBRARIES)
682 @$(NORMAL_INSTALL)
683 test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
684 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
685 list2=; for p in $$list; do \
686 if test -f $$p; then \
687 list2="$$list2 $$p"; \
688 else :; fi; \
689 done; \
690 test -z "$$list2" || { \
691 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
692 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
693 }
694
695uninstall-libLTLIBRARIES:
696 @$(NORMAL_UNINSTALL)
697 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
698 for p in $$list; do \
699 $(am__strip_dir) \
700 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
701 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
702 done
703
704clean-libLTLIBRARIES:
705 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
706 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
707 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
708 test "$$dir" != "$$p" || dir=.; \
709 echo "rm -f \"$${dir}/so_locations\""; \
710 rm -f "$${dir}/so_locations"; \
711 done
712libevas.la: $(libevas_la_OBJECTS) $(libevas_la_DEPENDENCIES)
713 $(AM_V_CCLD)$(libevas_la_LINK) -rpath $(libdir) $(libevas_la_OBJECTS) $(libevas_la_LIBADD) $(LIBS)
714
715mostlyclean-compile:
716 -rm -f *.$(OBJEXT)
717
718distclean-compile:
719 -rm -f *.tab.c
720
721@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@
722
723.c.o:
724@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
725@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
726@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
727@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
728@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
729@am__fastdepCC_FALSE@ $(COMPILE) -c $<
730
731.c.obj:
732@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
733@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
734@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
735@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
736@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
737@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
738
739.c.lo:
740@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
741@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
742@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
743@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
744@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
745@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
746
747mostlyclean-libtool:
748 -rm -f *.lo
749
750clean-libtool:
751 -rm -rf .libs _libs
752install-includesHEADERS: $(includes_HEADERS)
753 @$(NORMAL_INSTALL)
754 test -z "$(includesdir)" || $(MKDIR_P) "$(DESTDIR)$(includesdir)"
755 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
756 for p in $$list; do \
757 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
758 echo "$$d$$p"; \
759 done | $(am__base_list) | \
760 while read files; do \
761 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includesdir)'"; \
762 $(INSTALL_HEADER) $$files "$(DESTDIR)$(includesdir)" || exit $$?; \
763 done
764
765uninstall-includesHEADERS:
766 @$(NORMAL_UNINSTALL)
767 @list='$(includes_HEADERS)'; test -n "$(includesdir)" || list=; \
768 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
769 test -n "$$files" || exit 0; \
770 echo " ( cd '$(DESTDIR)$(includesdir)' && rm -f" $$files ")"; \
771 cd "$(DESTDIR)$(includesdir)" && rm -f $$files
772
773# This directory's subdirectories are mostly independent; you can cd
774# into them and run `make' without going through this Makefile.
775# To change the values of `make' variables: instead of editing Makefiles,
776# (1) if the variable is set in `config.status', edit `config.status'
777# (which will cause the Makefiles to be regenerated when you run `make');
778# (2) otherwise, pass the desired values on the `make' command line.
779$(RECURSIVE_TARGETS):
780 @fail= failcom='exit 1'; \
781 for f in x $$MAKEFLAGS; do \
782 case $$f in \
783 *=* | --[!k]*);; \
784 *k*) failcom='fail=yes';; \
785 esac; \
786 done; \
787 dot_seen=no; \
788 target=`echo $@ | sed s/-recursive//`; \
789 list='$(SUBDIRS)'; for subdir in $$list; do \
790 echo "Making $$target in $$subdir"; \
791 if test "$$subdir" = "."; then \
792 dot_seen=yes; \
793 local_target="$$target-am"; \
794 else \
795 local_target="$$target"; \
796 fi; \
797 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
798 || eval $$failcom; \
799 done; \
800 if test "$$dot_seen" = "no"; then \
801 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
802 fi; test -z "$$fail"
803
804$(RECURSIVE_CLEAN_TARGETS):
805 @fail= failcom='exit 1'; \
806 for f in x $$MAKEFLAGS; do \
807 case $$f in \
808 *=* | --[!k]*);; \
809 *k*) failcom='fail=yes';; \
810 esac; \
811 done; \
812 dot_seen=no; \
813 case "$@" in \
814 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
815 *) list='$(SUBDIRS)' ;; \
816 esac; \
817 rev=''; for subdir in $$list; do \
818 if test "$$subdir" = "."; then :; else \
819 rev="$$subdir $$rev"; \
820 fi; \
821 done; \
822 rev="$$rev ."; \
823 target=`echo $@ | sed s/-recursive//`; \
824 for subdir in $$rev; do \
825 echo "Making $$target in $$subdir"; \
826 if test "$$subdir" = "."; then \
827 local_target="$$target-am"; \
828 else \
829 local_target="$$target"; \
830 fi; \
831 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
832 || eval $$failcom; \
833 done && test -z "$$fail"
834tags-recursive:
835 list='$(SUBDIRS)'; for subdir in $$list; do \
836 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
837 done
838ctags-recursive:
839 list='$(SUBDIRS)'; for subdir in $$list; do \
840 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
841 done
842
843ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
844 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
845 unique=`for i in $$list; do \
846 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
847 done | \
848 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
849 END { if (nonempty) { for (i in files) print i; }; }'`; \
850 mkid -fID $$unique
851tags: TAGS
852
853TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
854 $(TAGS_FILES) $(LISP)
855 set x; \
856 here=`pwd`; \
857 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
858 include_option=--etags-include; \
859 empty_fix=.; \
860 else \
861 include_option=--include; \
862 empty_fix=; \
863 fi; \
864 list='$(SUBDIRS)'; for subdir in $$list; do \
865 if test "$$subdir" = .; then :; else \
866 test ! -f $$subdir/TAGS || \
867 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
868 fi; \
869 done; \
870 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
871 unique=`for i in $$list; do \
872 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
873 done | \
874 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
875 END { if (nonempty) { for (i in files) print i; }; }'`; \
876 shift; \
877 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
878 test -n "$$unique" || unique=$$empty_fix; \
879 if test $$# -gt 0; then \
880 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
881 "$$@" $$unique; \
882 else \
883 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
884 $$unique; \
885 fi; \
886 fi
887ctags: CTAGS
888CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
889 $(TAGS_FILES) $(LISP)
890 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
891 unique=`for i in $$list; do \
892 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
893 done | \
894 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
895 END { if (nonempty) { for (i in files) print i; }; }'`; \
896 test -z "$(CTAGS_ARGS)$$unique" \
897 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
898 $$unique
899
900GTAGS:
901 here=`$(am__cd) $(top_builddir) && pwd` \
902 && $(am__cd) $(top_srcdir) \
903 && gtags -i $(GTAGS_ARGS) "$$here"
904
905distclean-tags:
906 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
907
908distdir: $(DISTFILES)
909 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
910 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
911 list='$(DISTFILES)'; \
912 dist_files=`for file in $$list; do echo $$file; done | \
913 sed -e "s|^$$srcdirstrip/||;t" \
914 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
915 case $$dist_files in \
916 */*) $(MKDIR_P) `echo "$$dist_files" | \
917 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
918 sort -u` ;; \
919 esac; \
920 for file in $$dist_files; do \
921 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
922 if test -d $$d/$$file; then \
923 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
924 if test -d "$(distdir)/$$file"; then \
925 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
926 fi; \
927 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
928 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
929 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
930 fi; \
931 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
932 else \
933 test -f "$(distdir)/$$file" \
934 || cp -p $$d/$$file "$(distdir)/$$file" \
935 || exit 1; \
936 fi; \
937 done
938 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
939 if test "$$subdir" = .; then :; else \
940 test -d "$(distdir)/$$subdir" \
941 || $(MKDIR_P) "$(distdir)/$$subdir" \
942 || exit 1; \
943 fi; \
944 done
945 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
946 if test "$$subdir" = .; then :; else \
947 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
948 $(am__relativize); \
949 new_distdir=$$reldir; \
950 dir1=$$subdir; dir2="$(top_distdir)"; \
951 $(am__relativize); \
952 new_top_distdir=$$reldir; \
953 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
954 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
955 ($(am__cd) $$subdir && \
956 $(MAKE) $(AM_MAKEFLAGS) \
957 top_distdir="$$new_top_distdir" \
958 distdir="$$new_distdir" \
959 am__remove_distdir=: \
960 am__skip_length_check=: \
961 am__skip_mode_fix=: \
962 distdir) \
963 || exit 1; \
964 fi; \
965 done
966check-am: all-am
967check: check-recursive
968all-am: Makefile $(LTLIBRARIES) $(HEADERS)
969installdirs: installdirs-recursive
970installdirs-am:
971 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includesdir)"; do \
972 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
973 done
974install: install-recursive
975install-exec: install-exec-recursive
976install-data: install-data-recursive
977uninstall: uninstall-recursive
978
979install-am: all-am
980 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
981
982installcheck: installcheck-recursive
983install-strip:
984 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
985 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
986 `test -z '$(STRIP)' || \
987 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
988mostlyclean-generic:
989
990clean-generic:
991
992distclean-generic:
993 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
994 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
995
996maintainer-clean-generic:
997 @echo "This command is intended for maintainers to use"
998 @echo "it deletes files that may require special tools to rebuild."
999 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
1000clean: clean-recursive
1001
1002clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
1003 mostlyclean-am
1004
1005distclean: distclean-recursive
1006 -rm -rf ./$(DEPDIR)
1007 -rm -f Makefile
1008distclean-am: clean-am distclean-compile distclean-generic \
1009 distclean-tags
1010
1011dvi: dvi-recursive
1012
1013dvi-am:
1014
1015html: html-recursive
1016
1017html-am:
1018
1019info: info-recursive
1020
1021info-am:
1022
1023install-data-am: install-includesHEADERS
1024
1025install-dvi: install-dvi-recursive
1026
1027install-dvi-am:
1028
1029install-exec-am: install-libLTLIBRARIES
1030
1031install-html: install-html-recursive
1032
1033install-html-am:
1034
1035install-info: install-info-recursive
1036
1037install-info-am:
1038
1039install-man:
1040
1041install-pdf: install-pdf-recursive
1042
1043install-pdf-am:
1044
1045install-ps: install-ps-recursive
1046
1047install-ps-am:
1048
1049installcheck-am:
1050
1051maintainer-clean: maintainer-clean-recursive
1052 -rm -rf ./$(DEPDIR)
1053 -rm -f Makefile
1054maintainer-clean-am: distclean-am maintainer-clean-generic
1055
1056mostlyclean: mostlyclean-recursive
1057
1058mostlyclean-am: mostlyclean-compile mostlyclean-generic \
1059 mostlyclean-libtool
1060
1061pdf: pdf-recursive
1062
1063pdf-am:
1064
1065ps: ps-recursive
1066
1067ps-am:
1068
1069uninstall-am: uninstall-includesHEADERS uninstall-libLTLIBRARIES
1070
1071.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
1072 install-am install-strip tags-recursive
1073
1074.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
1075 all all-am check check-am clean clean-generic \
1076 clean-libLTLIBRARIES clean-libtool ctags ctags-recursive \
1077 distclean distclean-compile distclean-generic \
1078 distclean-libtool distclean-tags distdir dvi dvi-am html \
1079 html-am info info-am install install-am install-data \
1080 install-data-am install-dvi install-dvi-am install-exec \
1081 install-exec-am install-html install-html-am \
1082 install-includesHEADERS install-info install-info-am \
1083 install-libLTLIBRARIES install-man install-pdf install-pdf-am \
1084 install-ps install-ps-am install-strip installcheck \
1085 installcheck-am installdirs installdirs-am maintainer-clean \
1086 maintainer-clean-generic mostlyclean mostlyclean-compile \
1087 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
1088 tags tags-recursive uninstall uninstall-am \
1089 uninstall-includesHEADERS uninstall-libLTLIBRARIES
1090
1091
1092# Tell versions [3.59,3.63) of GNU make to not export all variables.
1093# Otherwise a system limit (for SysV at least) may be exceeded.
1094.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 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = -I. \
5 -I$(top_srcdir)/src/lib \
6 -I$(top_srcdir)/src/lib/include \
7 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
8 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
9 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
10 @EVIL_CFLAGS@ \
11 @FREETYPE_CFLAGS@ \
12 @PIXMAN_CFLAGS@ \
13 @EINA_CFLAGS@ \
14 @PIXMAN_CFLAGS@
15
16noinst_LTLIBRARIES = libevas_cache.la
17libevas_cache_la_SOURCES = \
18evas_cache_image.c \
19evas_cache_engine_image.c \
20evas_preload.c
21
22libevas_cache_la_LIBAD = @EVIL_LIBS@
23
24libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h
25
26EXTRA_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/cache
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_cache_la_LIBADD =
61am_libevas_cache_la_OBJECTS = evas_cache_image.lo \
62 evas_cache_engine_image.lo evas_preload.lo
63libevas_cache_la_OBJECTS = $(am_libevas_cache_la_OBJECTS)
64AM_V_lt = $(am__v_lt_$(V))
65am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
66am__v_lt_0 = --silent
67DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
68depcomp = $(SHELL) $(top_srcdir)/depcomp
69am__depfiles_maybe = depfiles
70am__mv = mv -f
71COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
72 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
73LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
74 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
75 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
76 $(AM_CFLAGS) $(CFLAGS)
77AM_V_CC = $(am__v_CC_$(V))
78am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
79am__v_CC_0 = @echo " CC " $@;
80AM_V_at = $(am__v_at_$(V))
81am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
82am__v_at_0 = @
83CCLD = $(CC)
84LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
85 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
86 $(AM_LDFLAGS) $(LDFLAGS) -o $@
87AM_V_CCLD = $(am__v_CCLD_$(V))
88am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
89am__v_CCLD_0 = @echo " CCLD " $@;
90AM_V_GEN = $(am__v_GEN_$(V))
91am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
92am__v_GEN_0 = @echo " GEN " $@;
93SOURCES = $(libevas_cache_la_SOURCES)
94DIST_SOURCES = $(libevas_cache_la_SOURCES)
95ETAGS = etags
96CTAGS = ctags
97DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
98ACLOCAL = @ACLOCAL@
99ALLOCA = @ALLOCA@
100AMTAR = @AMTAR@
101AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
102AR = @AR@
103AS = @AS@
104AUTOCONF = @AUTOCONF@
105AUTOHEADER = @AUTOHEADER@
106AUTOMAKE = @AUTOMAKE@
107AWK = @AWK@
108CC = @CC@
109CCDEPMODE = @CCDEPMODE@
110CFLAGS = @CFLAGS@
111CHECK_CFLAGS = @CHECK_CFLAGS@
112CHECK_LIBS = @CHECK_LIBS@
113CPP = @CPP@
114CPPFLAGS = @CPPFLAGS@
115CXX = @CXX@
116CXXCPP = @CXXCPP@
117CXXDEPMODE = @CXXDEPMODE@
118CXXFLAGS = @CXXFLAGS@
119CYGPATH_W = @CYGPATH_W@
120DEFS = @DEFS@
121DEPDIR = @DEPDIR@
122DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
123DIRECTFB_LIBS = @DIRECTFB_LIBS@
124DLLTOOL = @DLLTOOL@
125DSYMUTIL = @DSYMUTIL@
126DUMPBIN = @DUMPBIN@
127ECHO_C = @ECHO_C@
128ECHO_N = @ECHO_N@
129ECHO_T = @ECHO_T@
130ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
131ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
132EDB_CFLAGS = @EDB_CFLAGS@
133EDB_LIBS = @EDB_LIBS@
134EDJE_CFLAGS = @EDJE_CFLAGS@
135EDJE_LIBS = @EDJE_LIBS@
136EET_CFLAGS = @EET_CFLAGS@
137EET_LIBS = @EET_LIBS@
138EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
139EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
140EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
141EGREP = @EGREP@
142EINA_CFLAGS = @EINA_CFLAGS@
143EINA_LIBS = @EINA_LIBS@
144EVAS_CFLAGS = @EVAS_CFLAGS@
145EVAS_LIBS = @EVAS_LIBS@
146EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
147EVIL_CFLAGS = @EVIL_CFLAGS@
148EVIL_LIBS = @EVIL_LIBS@
149EXEEXT = @EXEEXT@
150EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
151EXOTIC_LIBS = @EXOTIC_LIBS@
152FGREP = @FGREP@
153FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
154FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
155FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
156FREETYPE_LIBS = @FREETYPE_LIBS@
157FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
158FRIBIDI_LIBS = @FRIBIDI_LIBS@
159GL_EET_CFLAGS = @GL_EET_CFLAGS@
160GL_EET_LIBS = @GL_EET_LIBS@
161GREP = @GREP@
162HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
163HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
164INSTALL = @INSTALL@
165INSTALL_DATA = @INSTALL_DATA@
166INSTALL_PROGRAM = @INSTALL_PROGRAM@
167INSTALL_SCRIPT = @INSTALL_SCRIPT@
168INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
169LD = @LD@
170LDFLAGS = @LDFLAGS@
171LIBOBJS = @LIBOBJS@
172LIBS = @LIBS@
173LIBTOOL = @LIBTOOL@
174LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
175LINEBREAK_LIBS = @LINEBREAK_LIBS@
176LIPO = @LIPO@
177LN_S = @LN_S@
178LTLIBOBJS = @LTLIBOBJS@
179MAKEINFO = @MAKEINFO@
180MKDIR_P = @MKDIR_P@
181MODULE_ARCH = @MODULE_ARCH@
182NM = @NM@
183NMEDIT = @NMEDIT@
184OBJC = @OBJC@
185OBJCDEPMODE = @OBJCDEPMODE@
186OBJCFLAGS = @OBJCFLAGS@
187OBJDUMP = @OBJDUMP@
188OBJEXT = @OBJEXT@
189OTOOL = @OTOOL@
190OTOOL64 = @OTOOL64@
191PACKAGE = @PACKAGE@
192PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
193PACKAGE_NAME = @PACKAGE_NAME@
194PACKAGE_STRING = @PACKAGE_STRING@
195PACKAGE_TARNAME = @PACKAGE_TARNAME@
196PACKAGE_URL = @PACKAGE_URL@
197PACKAGE_VERSION = @PACKAGE_VERSION@
198PATH_SEPARATOR = @PATH_SEPARATOR@
199PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
200PIXMAN_LIBS = @PIXMAN_LIBS@
201PKG_CONFIG = @PKG_CONFIG@
202PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
203PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
204PNG_CFLAGS = @PNG_CFLAGS@
205PNG_LIBS = @PNG_LIBS@
206RANLIB = @RANLIB@
207SDL_CFLAGS = @SDL_CFLAGS@
208SDL_LIBS = @SDL_LIBS@
209SED = @SED@
210SET_MAKE = @SET_MAKE@
211SHELL = @SHELL@
212SHM_OPEN_LINK = @SHM_OPEN_LINK@
213STRIP = @STRIP@
214SVG_CFLAGS = @SVG_CFLAGS@
215SVG_LIBS = @SVG_LIBS@
216VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
217VALGRIND_LIBS = @VALGRIND_LIBS@
218VERSION = @VERSION@
219VMAJ = @VMAJ@
220WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
221WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
222XCB_CFLAGS = @XCB_CFLAGS@
223XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
224XCB_GL_LIBS = @XCB_GL_LIBS@
225XCB_LIBS = @XCB_LIBS@
226XEXT_CFLAGS = @XEXT_CFLAGS@
227XEXT_LIBS = @XEXT_LIBS@
228XMKMF = @XMKMF@
229X_CFLAGS = @X_CFLAGS@
230X_EXTRA_LIBS = @X_EXTRA_LIBS@
231X_LIBS = @X_LIBS@
232X_PRE_LIBS = @X_PRE_LIBS@
233abs_builddir = @abs_builddir@
234abs_srcdir = @abs_srcdir@
235abs_top_builddir = @abs_top_builddir@
236abs_top_srcdir = @abs_top_srcdir@
237ac_ct_CC = @ac_ct_CC@
238ac_ct_CXX = @ac_ct_CXX@
239ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
240ac_ct_OBJC = @ac_ct_OBJC@
241altivec_cflags = @altivec_cflags@
242am__include = @am__include@
243am__leading_dot = @am__leading_dot@
244am__quote = @am__quote@
245am__tar = @am__tar@
246am__untar = @am__untar@
247bindir = @bindir@
248build = @build@
249build_alias = @build_alias@
250build_cpu = @build_cpu@
251build_os = @build_os@
252build_vendor = @build_vendor@
253builddir = @builddir@
254datadir = @datadir@
255datarootdir = @datarootdir@
256dlopen_libs = @dlopen_libs@
257docdir = @docdir@
258dvidir = @dvidir@
259edje_cc = @edje_cc@
260efl_doxygen = @efl_doxygen@
261efl_have_doxygen = @efl_have_doxygen@
262evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
263evas_engine_buffer_libs = @evas_engine_buffer_libs@
264evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
265evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
266evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
267evas_engine_directfb_libs = @evas_engine_directfb_libs@
268evas_engine_fb_cflags = @evas_engine_fb_cflags@
269evas_engine_fb_libs = @evas_engine_fb_libs@
270evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
271evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
272evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
273evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
274evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
275evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
276evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
277evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
278evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
279evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
280evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
281evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
282evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
283evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
284evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
285evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
286evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
287evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
288evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
289evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
290evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
291evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
292evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
293evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
294evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
295evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
296evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
297evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
298evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
299evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
300evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
301evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
302evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
303evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
304evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
305evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
306evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
307evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
308evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
309evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
310evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
311evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
312evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
313evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
314evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
315evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
316evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
317evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
318evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
319evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
320evas_image_loader_png_libs = @evas_image_loader_png_libs@
321evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
322evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
323evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
324evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
325evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
326evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
327evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
328evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
329evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
330evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
331evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
332evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
333exec_prefix = @exec_prefix@
334have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
335have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
336have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
337have_evas_engine_software_x11 = @have_evas_engine_software_x11@
338have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
339have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
340have_lcov = @have_lcov@
341host = @host@
342host_alias = @host_alias@
343host_cpu = @host_cpu@
344host_os = @host_os@
345host_vendor = @host_vendor@
346htmldir = @htmldir@
347includedir = @includedir@
348infodir = @infodir@
349install_sh = @install_sh@
350libdir = @libdir@
351libexecdir = @libexecdir@
352localedir = @localedir@
353localstatedir = @localstatedir@
354lt_ECHO = @lt_ECHO@
355lt_enable_auto_import = @lt_enable_auto_import@
356mandir = @mandir@
357mkdir_p = @mkdir_p@
358oldincludedir = @oldincludedir@
359pdfdir = @pdfdir@
360pkgconfig_requires_private = @pkgconfig_requires_private@
361prefix = @prefix@
362program_transform_name = @program_transform_name@
363psdir = @psdir@
364pthread_cflags = @pthread_cflags@
365pthread_libs = @pthread_libs@
366release_info = @release_info@
367requirement_evas = @requirement_evas@
368sbindir = @sbindir@
369sharedstatedir = @sharedstatedir@
370srcdir = @srcdir@
371sysconfdir = @sysconfdir@
372target_alias = @target_alias@
373top_build_prefix = @top_build_prefix@
374top_builddir = @top_builddir@
375top_srcdir = @top_srcdir@
376version_info = @version_info@
377MAINTAINERCLEANFILES = Makefile.in
378AM_CPPFLAGS = -I. \
379 -I$(top_srcdir)/src/lib \
380 -I$(top_srcdir)/src/lib/include \
381 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
382 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
383 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
384 @EVIL_CFLAGS@ \
385 @FREETYPE_CFLAGS@ \
386 @PIXMAN_CFLAGS@ \
387 @EINA_CFLAGS@ \
388 @PIXMAN_CFLAGS@
389
390noinst_LTLIBRARIES = libevas_cache.la
391libevas_cache_la_SOURCES = \
392evas_cache_image.c \
393evas_cache_engine_image.c \
394evas_preload.c
395
396libevas_cache_la_LIBAD = @EVIL_LIBS@
397libevas_cache_la_DEPENDENCIES = $(top_builddir)/config.h
398EXTRA_DIST = evas_cache.h
399all: all-am
400
401.SUFFIXES:
402.SUFFIXES: .c .lo .o .obj
403$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
404 @for dep in $?; do \
405 case '$(am__configure_deps)' in \
406 *$$dep*) \
407 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
408 && { if test -f $@; then exit 0; else break; fi; }; \
409 exit 1;; \
410 esac; \
411 done; \
412 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cache/Makefile'; \
413 $(am__cd) $(top_srcdir) && \
414 $(AUTOMAKE) --gnu src/lib/cache/Makefile
415.PRECIOUS: Makefile
416Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
417 @case '$?' in \
418 *config.status*) \
419 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
420 *) \
421 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
422 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
423 esac;
424
425$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
426 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
427
428$(top_srcdir)/configure: $(am__configure_deps)
429 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
430$(ACLOCAL_M4): $(am__aclocal_m4_deps)
431 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
432$(am__aclocal_m4_deps):
433
434clean-noinstLTLIBRARIES:
435 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
436 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
437 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
438 test "$$dir" != "$$p" || dir=.; \
439 echo "rm -f \"$${dir}/so_locations\""; \
440 rm -f "$${dir}/so_locations"; \
441 done
442libevas_cache.la: $(libevas_cache_la_OBJECTS) $(libevas_cache_la_DEPENDENCIES)
443 $(AM_V_CCLD)$(LINK) $(libevas_cache_la_OBJECTS) $(libevas_cache_la_LIBADD) $(LIBS)
444
445mostlyclean-compile:
446 -rm -f *.$(OBJEXT)
447
448distclean-compile:
449 -rm -f *.tab.c
450
451@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_engine_image.Plo@am__quote@
452@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cache_image.Plo@am__quote@
453@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_preload.Plo@am__quote@
454
455.c.o:
456@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
457@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
458@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
459@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
460@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
461@am__fastdepCC_FALSE@ $(COMPILE) -c $<
462
463.c.obj:
464@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
465@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
466@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
467@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
468@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
469@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
470
471.c.lo:
472@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
473@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
474@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
475@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
476@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
477@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
478
479mostlyclean-libtool:
480 -rm -f *.lo
481
482clean-libtool:
483 -rm -rf .libs _libs
484
485ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
486 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
487 unique=`for i in $$list; do \
488 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
489 done | \
490 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
491 END { if (nonempty) { for (i in files) print i; }; }'`; \
492 mkid -fID $$unique
493tags: TAGS
494
495TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
496 $(TAGS_FILES) $(LISP)
497 set x; \
498 here=`pwd`; \
499 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
500 unique=`for i in $$list; do \
501 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
502 done | \
503 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
504 END { if (nonempty) { for (i in files) print i; }; }'`; \
505 shift; \
506 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
507 test -n "$$unique" || unique=$$empty_fix; \
508 if test $$# -gt 0; then \
509 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
510 "$$@" $$unique; \
511 else \
512 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
513 $$unique; \
514 fi; \
515 fi
516ctags: CTAGS
517CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
518 $(TAGS_FILES) $(LISP)
519 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
520 unique=`for i in $$list; do \
521 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
522 done | \
523 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
524 END { if (nonempty) { for (i in files) print i; }; }'`; \
525 test -z "$(CTAGS_ARGS)$$unique" \
526 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
527 $$unique
528
529GTAGS:
530 here=`$(am__cd) $(top_builddir) && pwd` \
531 && $(am__cd) $(top_srcdir) \
532 && gtags -i $(GTAGS_ARGS) "$$here"
533
534distclean-tags:
535 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
536
537distdir: $(DISTFILES)
538 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
539 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
540 list='$(DISTFILES)'; \
541 dist_files=`for file in $$list; do echo $$file; done | \
542 sed -e "s|^$$srcdirstrip/||;t" \
543 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
544 case $$dist_files in \
545 */*) $(MKDIR_P) `echo "$$dist_files" | \
546 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
547 sort -u` ;; \
548 esac; \
549 for file in $$dist_files; do \
550 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
551 if test -d $$d/$$file; then \
552 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
553 if test -d "$(distdir)/$$file"; then \
554 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
555 fi; \
556 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
557 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
558 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
559 fi; \
560 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
561 else \
562 test -f "$(distdir)/$$file" \
563 || cp -p $$d/$$file "$(distdir)/$$file" \
564 || exit 1; \
565 fi; \
566 done
567check-am: all-am
568check: check-am
569all-am: Makefile $(LTLIBRARIES)
570installdirs:
571install: install-am
572install-exec: install-exec-am
573install-data: install-data-am
574uninstall: uninstall-am
575
576install-am: all-am
577 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
578
579installcheck: installcheck-am
580install-strip:
581 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
582 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
583 `test -z '$(STRIP)' || \
584 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
585mostlyclean-generic:
586
587clean-generic:
588
589distclean-generic:
590 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
591 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
592
593maintainer-clean-generic:
594 @echo "This command is intended for maintainers to use"
595 @echo "it deletes files that may require special tools to rebuild."
596 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
597clean: clean-am
598
599clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
600 mostlyclean-am
601
602distclean: distclean-am
603 -rm -rf ./$(DEPDIR)
604 -rm -f Makefile
605distclean-am: clean-am distclean-compile distclean-generic \
606 distclean-tags
607
608dvi: dvi-am
609
610dvi-am:
611
612html: html-am
613
614html-am:
615
616info: info-am
617
618info-am:
619
620install-data-am:
621
622install-dvi: install-dvi-am
623
624install-dvi-am:
625
626install-exec-am:
627
628install-html: install-html-am
629
630install-html-am:
631
632install-info: install-info-am
633
634install-info-am:
635
636install-man:
637
638install-pdf: install-pdf-am
639
640install-pdf-am:
641
642install-ps: install-ps-am
643
644install-ps-am:
645
646installcheck-am:
647
648maintainer-clean: maintainer-clean-am
649 -rm -rf ./$(DEPDIR)
650 -rm -f Makefile
651maintainer-clean-am: distclean-am maintainer-clean-generic
652
653mostlyclean: mostlyclean-am
654
655mostlyclean-am: mostlyclean-compile mostlyclean-generic \
656 mostlyclean-libtool
657
658pdf: pdf-am
659
660pdf-am:
661
662ps: ps-am
663
664ps-am:
665
666uninstall-am:
667
668.MAKE: install-am install-strip
669
670.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
671 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
672 distclean-compile distclean-generic distclean-libtool \
673 distclean-tags distdir dvi dvi-am html html-am info info-am \
674 install install-am install-data install-data-am install-dvi \
675 install-dvi-am install-exec install-exec-am install-html \
676 install-html-am install-info install-info-am install-man \
677 install-pdf install-pdf-am install-ps install-ps-am \
678 install-strip installcheck installcheck-am installdirs \
679 maintainer-clean maintainer-clean-generic mostlyclean \
680 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
681 pdf pdf-am ps ps-am tags uninstall uninstall-am
682
683
684# Tell versions [3.59,3.63) of GNU make to not export all variables.
685# Otherwise a system limit (for SysV at least) may be exceeded.
686.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 @@
1#ifndef _EVAS_CACHE_H
2#define _EVAS_CACHE_H
3
4
5typedef struct _Evas_Cache_Image Evas_Cache_Image;
6typedef struct _Evas_Cache_Image_Func Evas_Cache_Image_Func;
7typedef struct _Evas_Cache_Engine_Image Evas_Cache_Engine_Image;
8typedef struct _Evas_Cache_Engine_Image_Func Evas_Cache_Engine_Image_Func;
9
10
11struct _Evas_Cache_Image_Func
12{
13 Image_Entry *(*alloc)(void);
14 void (*dealloc)(Image_Entry *im);
15
16 /* The cache provide some helpers for surface manipulation. */
17 int (*surface_alloc)(Image_Entry *im, unsigned int w, unsigned int h);
18 void (*surface_delete)(Image_Entry *im);
19 DATA32 *(*surface_pixels)(Image_Entry *im);
20
21 /* The cache is doing the allocation and deallocation, you must just do the rest. */
22 int (*constructor)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */
23 void (*destructor)(Image_Entry *im);
24
25 void (*dirty_region)(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
26 /* Only called when references > 0. Need to provide a fresh copie of im. */
27 /* The destination surface does have a surface, but no allocated pixel data. */
28 int (*dirty)(Image_Entry *dst, const Image_Entry *src);
29 /* Only called when references == 1. We will call drop on `im'. */
30 /* The destination surface does not have any surface. */
31 int (*size_set)(Image_Entry *dst, const Image_Entry *src, unsigned int w, unsigned int h);
32
33 /* The destination surface does not have any surface. */
34 int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
35 /* The destination surface does not have any surface. */
36 int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
37 int (*color_space)(Image_Entry *dst, int cspace);
38
39 /* This function need to update im->w and im->h. */
40 int (*load)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */
41 int (*mem_size_get)(Image_Entry *im);
42 void (*debug)(const char *context, Image_Entry *im);
43};
44
45struct _Evas_Cache_Image
46{
47 Evas_Cache_Image_Func func;
48
49 Eina_List *preload;
50 Eina_List *pending;
51
52 Eina_Inlist *dirty;
53
54 Eina_Inlist *lru;
55 Eina_Inlist *lru_nodata;
56 Eina_Hash *inactiv;
57 Eina_Hash *activ;
58 void *data;
59
60 int usage;
61 unsigned int limit;
62 int references;
63#ifdef EVAS_FRAME_QUEUING
64 LK(lock);
65#endif
66};
67
68struct _Evas_Cache_Engine_Image_Func
69{
70 /* Must return a char* allocated with eina_stringshare_add. */
71 char* (*key)(Image_Entry *im, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error);
72
73 Engine_Image_Entry* (*alloc)(void);
74 void (*dealloc)(Engine_Image_Entry *eim);
75
76 int (*constructor)(Engine_Image_Entry *eim, void* data);
77 void (*destructor)(Engine_Image_Entry *eim);
78
79 void (*dirty_region)(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
80 /* Only called when references > 0. Need to provide a fresh copie of im. */
81 int (*dirty)(Engine_Image_Entry *dst, const Engine_Image_Entry *src);
82 /* Only called when references == 1. We will call drop on `im'. */
83 int (*size_set)(Engine_Image_Entry *dst, const Engine_Image_Entry *src);
84
85 int (*update_data)(Engine_Image_Entry* dst, void* data);
86
87 void (*load)(Engine_Image_Entry *eim, const Image_Entry* im);
88 int (*mem_size_get)(Engine_Image_Entry *eim);
89 void (*debug)(const char* context, Engine_Image_Entry *eim);
90};
91
92struct _Evas_Cache_Engine_Image
93{
94 Evas_Cache_Engine_Image_Func func;
95
96 Eina_Inlist* dirty;
97
98 Eina_Hash* activ;
99 Eina_Hash* inactiv;
100 Eina_Inlist* lru;
101
102 Evas_Cache_Image* parent;
103 Evas_Cache_Engine_Image* brother;
104
105 int usage;
106 int limit;
107
108 int references;
109};
110
111
112#ifdef __cplusplus
113extern "C" {
114#endif
115
116
117EAPI Evas_Cache_Image* evas_cache_image_init(const Evas_Cache_Image_Func *cb);
118EAPI void evas_cache_image_shutdown(Evas_Cache_Image *cache);
119EAPI Image_Entry* evas_cache_image_request(Evas_Cache_Image *cache, const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error);
120EAPI void evas_cache_image_drop(Image_Entry *im);
121EAPI void evas_cache_image_data_not_needed(Image_Entry *im);
122EAPI int evas_cache_image_flush(Evas_Cache_Image *cache);
123EAPI void evas_cache_private_set(Evas_Cache_Image *cache, const void *data);
124EAPI void* evas_cache_private_get(Evas_Cache_Image *cache);
125EAPI void* evas_cache_private_from_image_entry_get(Image_Entry *im);
126
127EAPI int evas_cache_image_usage_get(Evas_Cache_Image *cache);
128EAPI int evas_cache_image_get(Evas_Cache_Image *cache);
129EAPI void evas_cache_image_set(Evas_Cache_Image *cache, unsigned int size);
130
131EAPI Image_Entry* evas_cache_image_alone(Image_Entry *im);
132EAPI Image_Entry* evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
133EAPI int evas_cache_image_load_data(Image_Entry *im);
134EAPI void evas_cache_image_unload_data(Image_Entry *im);
135EAPI Eina_Bool evas_cache_image_is_loaded(Image_Entry *im);
136EAPI void evas_cache_image_unload_all(Evas_Cache_Image *cache);
137EAPI void evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h);
138EAPI DATA32* evas_cache_image_pixels(Image_Entry *im);
139EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
140EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
141EAPI void evas_cache_image_colorspace(Image_Entry *im, int cspace);
142EAPI Image_Entry* evas_cache_image_empty(Evas_Cache_Image *cache);
143EAPI Image_Entry* evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h);
144
145EAPI Evas_Cache_Engine_Image* evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent);
146EAPI void evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache);
147
148EAPI int evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache);
149EAPI int evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache);
150EAPI void evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit);
151
152EAPI 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);
153EAPI void evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim);
154EAPI Engine_Image_Entry* evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data);
155EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim);
156EAPI Engine_Image_Entry* evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data);
157EAPI Engine_Image_Entry* evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
158EAPI 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);
159EAPI 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);
160EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data);
161EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h);
162
163EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim);
164
165EAPI void evas_cache_image_preload_data(Image_Entry *im, const void *target);
166EAPI void evas_cache_image_preload_cancel(Image_Entry *im, const void *target);
167
168EAPI void evas_cache_image_wakeup(void);
169
170#ifdef __cplusplus
171}
172#endif
173
174
175#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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <assert.h>
6
7#include "evas_common.h"
8#include "evas_private.h"
9
10static void
11_evas_cache_engine_image_make_dirty(Evas_Cache_Engine_Image *cache,
12 Engine_Image_Entry *eim)
13{
14 eim->flags.cached = 1;
15 eim->flags.dirty = 1;
16 eim->flags.loaded = 1;
17 eim->flags.activ = 0;
18 cache->dirty = eina_inlist_prepend(cache->dirty, EINA_INLIST_GET(eim));
19}
20
21static void
22_evas_cache_engine_image_make_active(Evas_Cache_Engine_Image *cache,
23 Engine_Image_Entry *eim,
24 const char *key)
25{
26 eim->flags.cached = 1;
27 eim->flags.activ = 1;
28 eim->flags.dirty = 0;
29 eina_hash_add(cache->activ, key, eim);
30}
31
32static void
33_evas_cache_engine_image_make_inactive(Evas_Cache_Engine_Image *cache,
34 Engine_Image_Entry *eim,
35 const char *key)
36{
37 eim->flags.cached = 1;
38 eim->flags.dirty = 0;
39 eim->flags.activ = 0;
40 eina_hash_add(cache->inactiv, key, eim);
41 cache->lru = eina_inlist_prepend(cache->lru, EINA_INLIST_GET(eim));
42 cache->usage += cache->func.mem_size_get(eim);
43}
44
45static void
46_evas_cache_engine_image_remove_activ(Evas_Cache_Engine_Image *cache,
47 Engine_Image_Entry *eim)
48{
49 if (eim->flags.cached)
50 {
51 if (eim->flags.dirty)
52 {
53 cache->dirty = eina_inlist_remove(cache->dirty, EINA_INLIST_GET(eim));
54 }
55 else
56 if (eim->flags.activ)
57 {
58 eina_hash_del(cache->activ, eim->cache_key, eim);
59 }
60 else
61 {
62 cache->usage -= cache->func.mem_size_get(eim);
63 eina_hash_del(cache->inactiv, eim->cache_key, eim);
64 cache->lru = eina_inlist_remove(cache->lru, EINA_INLIST_GET(eim));
65 }
66 eim->flags.cached = 0;
67 eim->flags.dirty = 0;
68 eim->flags.activ = 0;
69 }
70}
71
72static Engine_Image_Entry *
73_evas_cache_engine_image_alloc(Evas_Cache_Engine_Image *cache,
74 Image_Entry *ie,
75 const char *hkey)
76{
77 Engine_Image_Entry *eim;
78
79 assert(cache);
80
81 if (cache->func.alloc)
82 eim = cache->func.alloc();
83 else
84 eim = malloc(sizeof (Engine_Image_Entry));
85
86 if (!eim) goto on_error;
87 memset(eim, 0, sizeof (Engine_Image_Entry));
88
89 eim->cache = cache;
90 if (ie)
91 {
92 eim->w = ie->w;
93 eim->h = ie->h;
94 eim->src = ie;
95 eim->flags.need_parent = 1;
96 }
97 else
98 {
99 eim->w = -1;
100 eim->h = -1;
101 eim->flags.need_parent = 0;
102 eim->src = NULL;
103 }
104
105 eim->flags.cached = 0;
106 eim->references = 0;
107 eim->cache_key = hkey;
108
109 if (hkey)
110 _evas_cache_engine_image_make_active(cache, eim, hkey);
111 else
112 _evas_cache_engine_image_make_dirty(cache, eim);
113
114 return eim;
115
116 on_error:
117 if (eim)
118 evas_cache_engine_image_drop(eim);
119 eina_stringshare_del(hkey);
120 evas_cache_image_drop(ie);
121 return NULL;
122}
123
124static void
125_evas_cache_engine_image_dealloc(Evas_Cache_Engine_Image *cache, Engine_Image_Entry *eim)
126{
127 Image_Entry *im;
128
129 if (cache->func.debug) cache->func.debug("delete", eim);
130
131 _evas_cache_engine_image_remove_activ(cache, eim);
132
133 im = eim->src;
134 cache->func.destructor(eim);
135 if (im) evas_cache_image_drop(im);
136
137 if (cache->func.dealloc)
138 {
139 cache->func.dealloc(eim);
140 }
141 else
142 {
143 memset(eim, 0, sizeof (Engine_Image_Entry));
144 free(eim);
145 }
146}
147
148EAPI int
149evas_cache_engine_image_usage_get(Evas_Cache_Engine_Image *cache)
150{
151 assert(cache != NULL);
152
153 return cache->usage;
154}
155
156EAPI int
157evas_cache_engine_image_get(Evas_Cache_Engine_Image *cache)
158{
159 assert(cache != NULL);
160
161 return cache->limit;
162}
163
164EAPI void
165evas_cache_engine_image_set(Evas_Cache_Engine_Image *cache, int limit)
166{
167 assert(cache != NULL);
168
169 cache->limit = limit;
170}
171
172EAPI Evas_Cache_Engine_Image *
173evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent)
174{
175 Evas_Cache_Engine_Image *new;
176
177 new = malloc(sizeof (Evas_Cache_Engine_Image));
178 if (!new)
179 return NULL;
180
181 new->func = *cb;
182
183 new->limit = 0;
184 new->usage = 0;
185
186 new->dirty = NULL;
187 new->lru = NULL;
188 new->activ = eina_hash_string_superfast_new(NULL);
189 new->inactiv = eina_hash_string_superfast_new(NULL);
190
191 new->parent = parent;
192 parent->references++;
193
194 new->brother = NULL;
195
196 return new;
197}
198
199EAPI Evas_Cache_Engine_Image *
200evas_cache_engine_image_dup(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Engine_Image *brother)
201{
202 Evas_Cache_Engine_Image *new;
203
204 new = calloc(1, sizeof (Evas_Cache_Engine_Image));
205 if (!new)
206 return NULL;
207
208 new->func = brother->func;
209
210#define ORD(Func) if (cb->Func) new->func.Func = cb->Func;
211
212 ORD(key);
213 ORD(constructor);
214 ORD(destructor);
215 ORD(dirty_region);
216 ORD(dirty);
217 ORD(size_set);
218 ORD(update_data);
219 ORD(load);
220 ORD(mem_size_get);
221 ORD(debug);
222
223#undef ORD
224
225 new->limit = -1;
226 new->usage = 0;
227 new->references = 1;
228
229 new->dirty = NULL;
230 new->activ = NULL;
231
232 new->parent = brother->parent;
233 new->parent->references++;
234
235 new->brother = brother;
236 brother->references++;
237
238 return new;
239}
240
241static Eina_Bool
242_evas_cache_engine_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata)
243{
244 Eina_List **delete_list = fdata;
245
246 *delete_list = eina_list_prepend(*delete_list, data);
247
248 return EINA_TRUE;
249}
250
251EAPI void
252evas_cache_engine_image_flush(Evas_Cache_Engine_Image *cache)
253{
254 assert(cache != NULL);
255
256 while ((cache->lru) && (cache->limit < cache->usage))
257 {
258 Engine_Image_Entry *eim;
259
260 eim = (Engine_Image_Entry *) cache->lru->last;
261 _evas_cache_engine_image_dealloc(cache, eim);
262 }
263}
264
265EAPI void
266evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache)
267{
268 Engine_Image_Entry *eim;
269 Eina_List *delete_list = NULL;
270
271 assert(cache != NULL);
272
273 if (cache->func.debug) cache->func.debug("shutdown-engine", NULL);
274
275 eina_hash_foreach(cache->inactiv, _evas_cache_engine_image_free_cb, &delete_list);
276 eina_hash_foreach(cache->activ, _evas_cache_engine_image_free_cb, &delete_list);
277
278 while (delete_list)
279 {
280 _evas_cache_engine_image_dealloc(cache, eina_list_data_get(delete_list));
281 delete_list = eina_list_remove_list(delete_list, delete_list);
282 }
283
284 eina_hash_free(cache->inactiv);
285 eina_hash_free(cache->activ);
286
287 /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */
288 while (cache->dirty)
289 {
290 eim = (Engine_Image_Entry *) cache->dirty;
291 _evas_cache_engine_image_dealloc(cache, eim);
292 }
293
294
295 evas_cache_image_shutdown(cache->parent);
296 if (cache->brother)
297 evas_cache_engine_image_shutdown(cache->brother);
298 free(cache);
299}
300
301EAPI Engine_Image_Entry *
302evas_cache_engine_image_request(Evas_Cache_Engine_Image *cache,
303 const char *file, const char *key,
304 RGBA_Image_Loadopts *lo, void *data, int *error)
305{
306 Engine_Image_Entry *eim;
307 Image_Entry *im;
308 const char *ekey;
309
310 assert(cache != NULL);
311
312 *error = EVAS_LOAD_ERROR_NONE;
313
314 ekey = NULL;
315 eim = NULL;
316
317 im = evas_cache_image_request(cache->parent, file, key, lo, error);
318 if (!im)
319 goto on_error;
320
321 if (cache->func.key)
322 ekey = cache->func.key(im, file, key, lo, data);
323 else
324 ekey = eina_stringshare_add(im->cache_key);
325 if (!ekey)
326 {
327 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
328 goto on_error;
329 }
330
331 eim = eina_hash_find(cache->activ, ekey);
332 if (eim)
333 {
334 evas_cache_image_drop(im);
335 goto on_ok;
336 }
337
338 eim = eina_hash_find(cache->inactiv, ekey);
339 if (eim)
340 {
341 _evas_cache_engine_image_remove_activ(cache, eim);
342 _evas_cache_engine_image_make_active(cache, eim, ekey);
343 evas_cache_image_drop(im);
344 goto on_ok;
345 }
346
347 eim = _evas_cache_engine_image_alloc(cache, im, ekey);
348 if (!eim)
349 {
350 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
351 return NULL;
352 }
353
354 *error = cache->func.constructor(eim, data);
355 if (*error != EVAS_LOAD_ERROR_NONE) goto on_error;
356 if (cache->func.debug)
357 cache->func.debug("constructor-engine", eim);
358
359 on_ok:
360 eim->references++;
361 return eim;
362
363 on_error:
364 if (!eim)
365 {
366 if (im) evas_cache_image_drop(im);
367 if (ekey) eina_stringshare_del(ekey);
368 }
369 else
370 {
371 _evas_cache_engine_image_dealloc(cache, eim);
372 }
373
374 return NULL;
375}
376
377EAPI void
378evas_cache_engine_image_drop(Engine_Image_Entry *eim)
379{
380 Evas_Cache_Engine_Image *cache;
381
382 assert(eim);
383 assert(eim->cache);
384
385 eim->references--;
386 cache = eim->cache;
387
388 if (eim->flags.dirty)
389 {
390 _evas_cache_engine_image_dealloc(cache, eim);
391 return ;
392 }
393
394 if (eim->references == 0)
395 {
396 _evas_cache_engine_image_remove_activ(cache, eim);
397 _evas_cache_engine_image_make_inactive(cache, eim, eim->cache_key);
398 evas_cache_engine_image_flush(cache);
399 return ;
400 }
401}
402
403EAPI Engine_Image_Entry *
404evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h)
405{
406 Engine_Image_Entry *eim_dirty = eim;
407 Image_Entry *im_dirty = NULL;
408 Image_Entry *im;
409 Evas_Cache_Engine_Image *cache;
410 unsigned char alloc_eim;
411
412 assert(eim);
413 assert(eim->cache);
414
415 cache = eim->cache;
416 if (!(eim->flags.dirty))
417 {
418 alloc_eim = 0;
419
420 if (eim->flags.need_parent == 1)
421 {
422 im = eim->src;
423 im_dirty = evas_cache_image_dirty(im, x, y, w, h);
424
425 /* If im == im_dirty, this meens that we have only one reference to the eim. */
426 if (im != im_dirty)
427 {
428 if (eim->references == 1)
429 {
430 _evas_cache_engine_image_remove_activ(cache, eim);
431 _evas_cache_engine_image_make_dirty(cache, eim);
432
433 eim->src = im_dirty;
434 }
435 else
436 alloc_eim = 1;
437 }
438 }
439 else
440 if (eim->references > 1)
441 {
442 alloc_eim = 1;
443 }
444 else
445 {
446 _evas_cache_engine_image_remove_activ(cache, eim_dirty);
447 _evas_cache_engine_image_make_dirty(cache, eim_dirty);
448 }
449
450 if (alloc_eim == 1)
451 {
452 int error;
453
454 eim_dirty = _evas_cache_engine_image_alloc(cache, im_dirty, NULL);
455 if (!eim_dirty) goto on_error;
456
457 eim_dirty->w = eim->w;
458 eim_dirty->h = eim->h;
459 eim_dirty->references = 1;
460
461 error = cache->func.dirty(eim_dirty, eim);
462 if (cache->func.debug)
463 cache->func.debug("dirty-engine", eim_dirty);
464
465 if (error != 0) goto on_error;
466
467 evas_cache_engine_image_drop(eim);
468 }
469 }
470
471 if (cache->func.dirty_region)
472 cache->func.dirty_region(eim_dirty, x, y, w, h);
473 if (cache->func.debug)
474 cache->func.debug("dirty-region-engine", eim_dirty);
475
476 return eim_dirty;
477
478 on_error:
479 if (eim) evas_cache_engine_image_drop(eim);
480 if (eim_dirty && eim_dirty != eim)
481 evas_cache_engine_image_drop(eim_dirty);
482 else
483 if (im_dirty) evas_cache_image_drop(im_dirty);
484
485 return NULL;
486}
487
488EAPI Engine_Image_Entry *
489evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data)
490{
491 Evas_Cache_Engine_Image *cache;
492 Image_Entry *im;
493
494
495 assert(eim);
496 assert(eim->cache);
497
498 cache = eim->cache;
499 im = evas_cache_image_alone(eim->src);
500 if (im != eim->src)
501 {
502 eim = _evas_cache_engine_image_alloc(cache, im, NULL);
503 if (!eim) goto on_error;
504
505 eim->references = 1;
506
507 if (cache->func.constructor(eim, data) != EVAS_LOAD_ERROR_NONE)
508 goto on_error;
509 }
510 /* FIXME */
511 return eim;
512
513 on_error:
514 evas_cache_image_drop(im);
515 return NULL;
516}
517
518static Engine_Image_Entry *
519_evas_cache_engine_image_push_dirty(Evas_Cache_Engine_Image *cache, Image_Entry *im, void *engine_data)
520{
521 Engine_Image_Entry *eim;
522 int error;
523
524 eim = _evas_cache_engine_image_alloc(cache, im, NULL);
525 if (!eim) goto on_error;
526 eim->references = 1;
527
528 error = cache->func.update_data(eim, engine_data);
529 if (cache->func.debug)
530 cache->func.debug("dirty-update_data-engine", eim);
531 if (error != 0) goto on_error;
532
533 return eim;
534
535 on_error:
536 if (eim)
537 evas_cache_engine_image_drop(eim);
538 return NULL;
539}
540
541EAPI Engine_Image_Entry *
542evas_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)
543{
544 Image_Entry *im;
545
546 assert(cache);
547
548 im = evas_cache_image_copied_data(cache->parent, w, h, image_data, alpha, cspace);
549
550 return _evas_cache_engine_image_push_dirty(cache, im, engine_data);
551}
552
553EAPI Engine_Image_Entry *
554evas_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)
555{
556 Image_Entry *im;
557
558 assert(cache);
559
560 im = evas_cache_image_data(cache->parent, w, h, image_data, alpha, cspace);
561
562 return _evas_cache_engine_image_push_dirty(cache, im, engine_data);
563}
564
565EAPI Engine_Image_Entry *
566evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h)
567{
568 Evas_Cache_Engine_Image *cache;
569 Engine_Image_Entry *new;
570 Image_Entry *im;
571 const char *hkey;
572 int error;
573
574 assert(eim);
575 assert(eim->cache);
576 assert(eim->references > 0);
577
578 im = NULL;
579 cache = eim->cache;
580
581 if (eim->flags.need_parent == 1)
582 {
583 assert(eim->src);
584
585 if (eim->src->w == w
586 && eim->src->h == h)
587 return eim;
588
589 im = evas_cache_image_size_set(eim->src, w, h);
590 /* FIXME: Good idea to call update_data ? */
591 if (im == eim->src) return eim;
592 eim->src = NULL;
593 }
594
595 hkey = (eim->references > 1 ) ? eina_stringshare_add(eim->cache_key) : NULL;
596
597 new = _evas_cache_engine_image_alloc(cache, im, hkey);
598 if (!new) goto on_error;
599
600 new->w = w;
601 new->h = h;
602 new->references = 1;
603
604 error = cache->func.size_set(new, eim);
605 if (error) goto on_error;
606
607 evas_cache_engine_image_drop(eim);
608 return new;
609
610 on_error:
611 if (new)
612 evas_cache_engine_image_drop(new);
613 else
614 if (im)
615 evas_cache_image_drop(im);
616 evas_cache_engine_image_drop(eim);
617
618 return NULL;
619}
620
621EAPI void
622evas_cache_engine_image_load_data(Engine_Image_Entry *eim)
623{
624 Evas_Cache_Engine_Image *cache;
625 int size = 0;
626
627 assert(eim);
628 assert(eim->src);
629 assert(eim->cache);
630
631 if (eim->flags.loaded) return;
632
633 if (eim->src)
634 evas_cache_image_load_data(eim->src);
635
636 cache = eim->cache;
637 if (cache->func.debug)
638 cache->func.debug("load-engine", eim);
639
640 if (eim->flags.dirty)
641 size = cache->func.mem_size_get(eim);
642 cache = eim->cache;
643 cache->func.load(eim, eim->src);
644 if (eim->flags.dirty)
645 cache->usage += cache->func.mem_size_get(eim) - size;
646
647 eim->flags.loaded = 1;
648}
649
650EAPI Engine_Image_Entry *
651evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data)
652{
653 Engine_Image_Entry *eim;
654 Image_Entry *ie;
655 int error;
656
657 ie = evas_cache_image_empty(cache->parent);
658 if (!ie) return NULL;
659
660 eim = _evas_cache_engine_image_alloc(cache, ie, NULL);
661 if (!eim) goto on_error;
662 eim->references = 1;
663
664 error = cache->func.update_data(eim, engine_data);
665 if (cache->func.debug)
666 cache->func.debug("update_data-engine", eim);
667
668 if (error != 0) goto on_error;
669
670 return eim;
671
672 on_error:
673 if (!eim)
674 evas_cache_image_drop(ie);
675 else
676 evas_cache_engine_image_drop(eim);
677
678 return NULL;
679}
680
681EAPI void
682evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data)
683{
684 Evas_Cache_Engine_Image *cache = eim->cache;
685
686 assert(cache);
687
688 cache->func.destructor(eim);
689 evas_cache_image_colorspace(eim->src, cspace);
690 cache->func.constructor(eim, engine_data);
691 if (cache->func.debug)
692 cache->func.debug("cosntructor-colorspace-engine", eim);
693}
694
695EAPI void
696evas_cache_engine_parent_not_needed(Engine_Image_Entry *eim)
697{
698 assert(eim);
699 assert(eim->cache);
700
701 eim->flags.need_parent = 0;
702 evas_cache_image_data_not_needed(eim->src);
703}
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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdlib.h>
6#include <assert.h>
7#include <sys/types.h>
8#include <sys/stat.h>
9#include <errno.h>
10
11#ifdef HAVE_EVIL
12# include <Evil.h>
13#endif
14
15#include "evas_common.h"
16#include "evas_private.h"
17
18//#define CACHEDUMP 1
19
20#ifdef EVAS_CSERVE
21// FIXME: cache server and threaded preload clash badly atm - disable
22//#undef BUILD_ASYNC_PRELOAD
23#endif
24
25#ifdef BUILD_ASYNC_PRELOAD
26typedef struct _Evas_Cache_Preload Evas_Cache_Preload;
27
28struct _Evas_Cache_Preload
29{
30 EINA_INLIST;
31 Image_Entry *ie;
32};
33
34static LK(engine_lock);
35static LK(wakeup);
36static int _evas_cache_mutex_init = 0;
37
38static Eina_Condition cond_wakeup;
39
40static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target);
41#endif
42
43#define FREESTRC(Var) \
44 if (Var) \
45{ \
46 eina_stringshare_del(Var); \
47 Var = NULL; \
48}
49
50static void _evas_cache_image_dirty_add(Image_Entry *im);
51static void _evas_cache_image_dirty_del(Image_Entry *im);
52static void _evas_cache_image_activ_add(Image_Entry *im);
53static void _evas_cache_image_activ_del(Image_Entry *im);
54static void _evas_cache_image_lru_add(Image_Entry *im);
55static void _evas_cache_image_lru_del(Image_Entry *im);
56static void _evas_cache_image_lru_nodata_add(Image_Entry *im);
57static void _evas_cache_image_lru_nodata_del(Image_Entry *im);
58
59static void
60_evas_cache_image_dirty_add(Image_Entry *im)
61{
62 if (im->flags.dirty) return;
63 _evas_cache_image_activ_del(im);
64 _evas_cache_image_lru_del(im);
65 _evas_cache_image_lru_nodata_del(im);
66 im->flags.dirty = 1;
67 im->flags.cached = 1;
68#ifdef EVAS_FRAME_QUEUING
69 LKL(im->cache->lock);
70#endif
71 im->cache->dirty = eina_inlist_prepend(im->cache->dirty, EINA_INLIST_GET(im));
72#ifdef EVAS_FRAME_QUEUING
73 LKU(im->cache->lock);
74#endif
75 if (im->cache_key)
76 {
77 eina_stringshare_del(im->cache_key);
78 im->cache_key = NULL;
79 }
80}
81
82static void
83_evas_cache_image_dirty_del(Image_Entry *im)
84{
85 if (!im->flags.dirty) return;
86 im->flags.dirty = 0;
87 im->flags.cached = 0;
88#ifdef EVAS_FRAME_QUEUING
89 LKL(im->cache->lock);
90#endif
91 im->cache->dirty = eina_inlist_remove(im->cache->dirty, EINA_INLIST_GET(im));
92#ifdef EVAS_FRAME_QUEUING
93 LKU(im->cache->lock);
94#endif
95}
96
97static void
98_evas_cache_image_activ_add(Image_Entry *im)
99{
100 if (im->flags.activ) return;
101 _evas_cache_image_dirty_del(im);
102 _evas_cache_image_lru_del(im);
103 _evas_cache_image_lru_nodata_del(im);
104 if (!im->cache_key) return;
105 im->flags.activ = 1;
106 im->flags.cached = 1;
107#ifdef EVAS_FRAME_QUEUING
108 LKL(im->cache->lock);
109#endif
110 eina_hash_direct_add(im->cache->activ, im->cache_key, im);
111#ifdef EVAS_FRAME_QUEUING
112 LKU(im->cache->lock);
113#endif
114}
115
116static void
117_evas_cache_image_activ_del(Image_Entry *im)
118{
119 if (!im->flags.activ) return;
120 if (!im->cache_key) return;
121 im->flags.activ = 0;
122 im->flags.cached = 0;
123#ifdef EVAS_FRAME_QUEUING
124 LKL(im->cache->lock);
125#endif
126 eina_hash_del(im->cache->activ, im->cache_key, im);
127#ifdef EVAS_FRAME_QUEUING
128 LKU(im->cache->lock);
129#endif
130}
131
132static void
133_evas_cache_image_lru_add(Image_Entry *im)
134{
135 if (im->flags.lru) return;
136 _evas_cache_image_dirty_del(im);
137 _evas_cache_image_activ_del(im);
138 _evas_cache_image_lru_nodata_del(im);
139 if (!im->cache_key) return;
140 im->flags.lru = 1;
141 im->flags.cached = 1;
142#ifdef EVAS_FRAME_QUEUING
143 LKL(im->cache->lock);
144#endif
145 eina_hash_direct_add(im->cache->inactiv, im->cache_key, im);
146 im->cache->lru = eina_inlist_prepend(im->cache->lru, EINA_INLIST_GET(im));
147 im->cache->usage += im->cache->func.mem_size_get(im);
148#ifdef EVAS_FRAME_QUEUING
149 LKU(im->cache->lock);
150#endif
151}
152
153static void
154_evas_cache_image_lru_del(Image_Entry *im)
155{
156 if (!im->flags.lru) return;
157 if (!im->cache_key) return;
158 im->flags.lru = 0;
159 im->flags.cached = 0;
160#ifdef EVAS_FRAME_QUEUING
161 LKL(im->cache->lock);
162#endif
163 eina_hash_del(im->cache->inactiv, im->cache_key, im);
164 im->cache->lru = eina_inlist_remove(im->cache->lru, EINA_INLIST_GET(im));
165 im->cache->usage -= im->cache->func.mem_size_get(im);
166#ifdef EVAS_FRAME_QUEUING
167 LKU(im->cache->lock);
168#endif
169}
170
171static void
172_evas_cache_image_lru_nodata_add(Image_Entry *im)
173{
174 if (im->flags.lru_nodata) return;
175 _evas_cache_image_dirty_del(im);
176 _evas_cache_image_activ_del(im);
177 _evas_cache_image_lru_del(im);
178 im->flags.lru = 1;
179 im->flags.cached = 1;
180#ifdef EVAS_FRAME_QUEUING
181 LKL(im->cache->lock);
182#endif
183 im->cache->lru_nodata = eina_inlist_prepend(im->cache->lru_nodata, EINA_INLIST_GET(im));
184#ifdef EVAS_FRAME_QUEUING
185 LKU(im->cache->lock);
186#endif
187}
188
189static void
190_evas_cache_image_lru_nodata_del(Image_Entry *im)
191{
192 if (!im->flags.lru_nodata) return;
193 im->flags.lru = 0;
194 im->flags.cached = 0;
195#ifdef EVAS_FRAME_QUEUING
196 LKL(im->cache->lock);
197#endif
198 im->cache->lru_nodata = eina_inlist_remove(im->cache->lru_nodata, EINA_INLIST_GET(im));
199#ifdef EVAS_FRAME_QUEUING
200 LKU(im->cache->lock);
201#endif
202}
203
204static void
205_evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie)
206{
207 if (!ie) return;
208 if (cache->func.debug) cache->func.debug("deleting", ie);
209#ifdef BUILD_ASYNC_PRELOAD
210 if (ie->flags.delete_me == 1) return;
211 if (ie->preload)
212 {
213 ie->flags.delete_me = 1;
214 _evas_cache_image_entry_preload_remove(ie, NULL);
215 return;
216 }
217#endif
218
219 _evas_cache_image_dirty_del(ie);
220 _evas_cache_image_activ_del(ie);
221 _evas_cache_image_lru_del(ie);
222 _evas_cache_image_lru_nodata_del(ie);
223
224 cache->func.destructor(ie);
225 FREESTRC(ie->cache_key);
226 FREESTRC(ie->file);
227 FREESTRC(ie->key);
228 ie->cache = NULL;
229 cache->func.surface_delete(ie);
230
231#ifdef BUILD_ASYNC_PRELOAD
232 LKD(ie->lock);
233 LKD(ie->lock_cancel);
234#endif
235#ifdef EVAS_FRAME_QUEUING
236 LKD(ie->lock_references);
237#endif
238 cache->func.dealloc(ie);
239}
240
241static Eina_Bool
242_timestamp_compare(Image_Timestamp *tstamp, struct stat *st)
243{
244 if (tstamp->mtime != st->st_mtime) return EINA_FALSE;
245 if (tstamp->size != st->st_size) return EINA_FALSE;
246 if (tstamp->ino != st->st_ino) return EINA_FALSE;
247#ifdef _STAT_VER_LINUX
248#if (defined __USE_MISC && defined st_mtime)
249 if (tstamp->mtime_nsec != (unsigned long int)st->st_mtim.tv_nsec)
250 return EINA_FALSE;
251#else
252 if (tstamp->mtime_nsec != (unsigned long int)st->st_mtimensec)
253 return EINA_FALSE;
254#endif
255#endif
256 return EINA_TRUE;
257}
258
259static void
260_timestamp_build(Image_Timestamp *tstamp, struct stat *st)
261{
262 tstamp->mtime = st->st_mtime;
263 tstamp->size = st->st_size;
264 tstamp->ino = st->st_ino;
265#ifdef _STAT_VER_LINUX
266#if (defined __USE_MISC && defined st_mtime)
267 tstamp->mtime_nsec = (unsigned long int)st->st_mtim.tv_nsec;
268#else
269 tstamp->mtime_nsec = (unsigned long int)st->st_mtimensec;
270#endif
271#endif
272}
273
274static Image_Entry *
275_evas_cache_image_entry_new(Evas_Cache_Image *cache,
276 const char *hkey,
277 Image_Timestamp *tstamp,
278 const char *file,
279 const char *key,
280 RGBA_Image_Loadopts *lo,
281 int *error)
282{
283 Image_Entry *ie;
284
285 ie = cache->func.alloc();
286 if (!ie)
287 {
288 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
289 return NULL;
290 }
291 ie->cache = cache;
292 if (hkey) ie->cache_key = eina_stringshare_add(hkey);
293 ie->flags.need_data = 1;
294 ie->space = EVAS_COLORSPACE_ARGB8888;
295 ie->w = -1;
296 ie->h = -1;
297 ie->scale = 1;
298 if (file) ie->file = eina_stringshare_add(file);
299 if (key) ie->key = eina_stringshare_add(key);
300 if (tstamp) ie->tstamp = *tstamp;
301 else memset(&ie->tstamp, 0, sizeof(Image_Timestamp));
302
303#ifdef EVAS_FRAME_QUEUING
304 LKI(ie->lock_references);
305#endif
306#ifdef BUILD_ASYNC_PRELOAD
307 LKI(ie->lock);
308 LKI(ie->lock_cancel);
309#endif
310
311 if (lo) ie->load_opts = *lo;
312 if (ie->file)
313 {
314 *error = cache->func.constructor(ie);
315 if (*error != EVAS_LOAD_ERROR_NONE)
316 {
317 _evas_cache_image_entry_delete(cache, ie);
318 return NULL;
319 }
320 }
321 if (cache->func.debug) cache->func.debug("build", ie);
322 if (ie->cache_key) _evas_cache_image_activ_add(ie);
323 else _evas_cache_image_dirty_add(ie);
324 return ie;
325}
326
327static void
328_evas_cache_image_entry_surface_alloc__locked(Evas_Cache_Image *cache,
329 Image_Entry *ie,
330 unsigned int wmin,
331 unsigned int hmin)
332{
333 if ((ie->allocated.w == wmin) && (ie->allocated.h == hmin)) return;
334 if (cache->func.surface_alloc(ie, wmin, hmin))
335 {
336 wmin = 0;
337 hmin = 0;
338 }
339 ie->w = wmin;
340 ie->h = hmin;
341 ie->allocated.w = wmin;
342 ie->allocated.h = hmin;
343}
344
345static void
346_evas_cache_image_entry_surface_alloc(Evas_Cache_Image *cache,
347 Image_Entry *ie, int w, int h)
348{
349 int wmin = w > 0 ? w : 1;
350 int hmin = h > 0 ? h : 1;
351#ifdef BUILD_ASYNC_PRELOAD
352 LKL(engine_lock);
353#endif
354 _evas_cache_image_entry_surface_alloc__locked(cache, ie, wmin, hmin);
355#ifdef BUILD_ASYNC_PRELOAD
356 LKU(engine_lock);
357#endif
358}
359
360#ifdef BUILD_ASYNC_PRELOAD
361static void
362_evas_cache_image_async_heavy(void *data)
363{
364 Evas_Cache_Image *cache;
365 Image_Entry *current;
366 int error;
367 int pchannel;
368
369 current = data;
370
371 LKL(current->lock);
372 pchannel = current->channel;
373 current->channel++;
374 cache = current->cache;
375
376 if ((!current->flags.loaded) &&
377 ((Evas_Image_Load_Func*) current->info.module)->threadable)
378 {
379 error = cache->func.load(current);
380 if (cache->func.debug) cache->func.debug("load", current);
381 current->load_error = error;
382 if (error != EVAS_LOAD_ERROR_NONE)
383 {
384 current->flags.loaded = 0;
385 _evas_cache_image_entry_surface_alloc(cache, current,
386 current->w, current->h);
387 }
388 else
389 {
390 current->flags.loaded = 1;
391 }
392 }
393 current->channel = pchannel;
394 // check the unload cancel flag
395 LKL(current->lock_cancel);
396 if (current->unload_cancel)
397 {
398 current->unload_cancel = EINA_FALSE;
399 cache->func.surface_delete(current);
400 current->flags.loaded = 0;
401 current->flags.preload_done = 0;
402 }
403 LKU(current->lock_cancel);
404 LKU(current->lock);
405}
406
407static void
408_evas_cache_image_async_end(void *data)
409{
410 Image_Entry *ie = (Image_Entry *)data;
411 Evas_Cache_Target *tmp;
412
413 ie->cache->preload = eina_list_remove(ie->cache->preload, ie);
414 ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
415 ie->preload = NULL;
416 ie->flags.preload_done = ie->flags.loaded;
417 while ((tmp = ie->targets))
418 {
419 evas_object_inform_call_image_preloaded((Evas_Object*) tmp->target);
420 ie->targets = (Evas_Cache_Target *)
421 eina_inlist_remove(EINA_INLIST_GET(ie->targets),
422 EINA_INLIST_GET(ie->targets));
423 free(tmp);
424 }
425}
426
427static void
428_evas_cache_image_async_cancel(void *data)
429{
430 Evas_Cache_Image *cache = NULL;
431 Image_Entry *ie = (Image_Entry *)data;
432
433 ie->preload = NULL;
434 ie->cache->pending = eina_list_remove(ie->cache->pending, ie);
435 if ((ie->flags.delete_me) || (ie->flags.dirty))
436 {
437 ie->flags.delete_me = 0;
438 _evas_cache_image_entry_delete(ie->cache, ie);
439 return;
440 }
441 if (ie->flags.loaded) _evas_cache_image_async_end(ie);
442#ifdef EVAS_FRAME_QUEUING
443 LKL(ie->lock_references);
444#endif
445 if (ie->references == 0)
446 {
447 _evas_cache_image_lru_add(ie);
448 cache = ie->cache;
449 }
450#ifdef EVAS_FRAME_QUEUING
451 LKU(ie->lock_references);
452#endif
453 if (cache) evas_cache_image_flush(cache);
454}
455
456// note - preload_add assumes a target is ONLY added ONCE to the image
457// entry. make sure you only add once, or remove first, then add
458static int
459_evas_cache_image_entry_preload_add(Image_Entry *ie, const void *target)
460{
461 Evas_Cache_Target *tg;
462
463 if (ie->flags.preload_done) return 0;
464
465 tg = malloc(sizeof (Evas_Cache_Target));
466 if (!tg) return 0;
467
468 tg->target = target;
469 ie->targets = (Evas_Cache_Target *)
470 eina_inlist_append(EINA_INLIST_GET(ie->targets), EINA_INLIST_GET(tg));
471 if (!ie->preload)
472 {
473 ie->cache->preload = eina_list_append(ie->cache->preload, ie);
474 ie->flags.pending = 0;
475 ie->preload = evas_preload_thread_run(_evas_cache_image_async_heavy,
476 _evas_cache_image_async_end,
477 _evas_cache_image_async_cancel,
478 ie);
479 }
480 return 1;
481}
482
483static void
484_evas_cache_image_entry_preload_remove(Image_Entry *ie, const void *target)
485{
486 if (target)
487 {
488 Evas_Cache_Target *tg;
489
490 EINA_INLIST_FOREACH(ie->targets, tg)
491 {
492 if (tg->target == target)
493 {
494 // FIXME: No callback when we cancel only for one target ?
495 ie->targets = (Evas_Cache_Target *)
496 eina_inlist_remove(EINA_INLIST_GET(ie->targets),
497 EINA_INLIST_GET(tg));
498 free(tg);
499 break;
500 }
501 }
502 }
503 else
504 {
505 Evas_Cache_Target *tg;
506
507 while (ie->targets)
508 {
509 tg = ie->targets;
510 ie->targets = (Evas_Cache_Target *)
511 eina_inlist_remove(EINA_INLIST_GET(ie->targets),
512 EINA_INLIST_GET(tg));
513 free(tg);
514 }
515 }
516
517 if ((!ie->targets) && (ie->preload) && (!ie->flags.pending))
518 {
519 ie->cache->preload = eina_list_remove(ie->cache->preload, ie);
520 ie->cache->pending = eina_list_append(ie->cache->pending, ie);
521 ie->flags.pending = 1;
522 evas_preload_thread_cancel(ie->preload);
523 }
524}
525#endif
526
527EAPI int
528evas_cache_image_usage_get(Evas_Cache_Image *cache)
529{
530 return cache->usage;
531}
532
533EAPI int
534evas_cache_image_get(Evas_Cache_Image *cache)
535{
536 return cache->limit;
537}
538
539EAPI void
540evas_cache_image_set(Evas_Cache_Image *cache, unsigned int limit)
541{
542#ifdef EVAS_FRAME_QUEUING
543 LKL(cache->lock);
544#endif
545 if (cache->limit == limit)
546 {
547#ifdef EVAS_FRAME_QUEUING
548 LKU(cache->lock);
549#endif
550 return;
551 }
552 cache->limit = limit;
553#ifdef EVAS_FRAME_QUEUING
554 LKU(cache->lock);
555#endif
556 evas_cache_image_flush(cache);
557}
558
559EAPI Evas_Cache_Image *
560evas_cache_image_init(const Evas_Cache_Image_Func *cb)
561{
562 Evas_Cache_Image *cache;
563
564#ifdef BUILD_ASYNC_PRELOAD
565 if (_evas_cache_mutex_init++ == 0)
566 {
567 LKI(engine_lock);
568 LKI(wakeup);
569 eina_condition_new(&cond_wakeup, &wakeup);
570 }
571#endif
572
573 cache = calloc(1, sizeof(Evas_Cache_Image));
574 if (!cache) return NULL;
575 cache->func = *cb;
576 cache->inactiv = eina_hash_string_superfast_new(NULL);
577 cache->activ = eina_hash_string_superfast_new(NULL);
578 cache->references = 1;
579#ifdef EVAS_FRAME_QUEUING
580 LKI(cache->lock);
581#endif
582 return cache;
583}
584
585static Eina_Bool
586_evas_cache_image_free_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata)
587{
588 Eina_List **delete_list = fdata;
589 *delete_list = eina_list_prepend(*delete_list, data);
590 return EINA_TRUE;
591}
592
593EAPI void
594evas_cache_image_shutdown(Evas_Cache_Image *cache)
595{
596 Eina_List *delete_list;
597 Image_Entry *im;
598
599#ifdef EVAS_FRAME_QUEUING
600 LKL(cache->lock);
601#endif
602 cache->references--;
603 if (cache->references != 0)
604 {
605#ifdef EVAS_FRAME_QUEUING
606 LKU(cache->lock);
607#endif
608 return;
609 }
610#ifdef EVAS_FRAME_QUEUING
611 /* Release and destroy lock early ! */
612 LKU(cache->lock);
613 LKD(cache->lock);
614#endif
615
616#ifdef BUILD_ASYNC_PRELOAD
617 EINA_LIST_FREE(cache->preload, im)
618 {
619 /* By doing that we are protecting us from destroying image when the cache is no longer available. */
620 im->flags.delete_me = 1;
621 _evas_cache_image_entry_preload_remove(im, NULL);
622 }
623 evas_async_events_process();
624#endif
625 while (cache->lru)
626 {
627 im = (Image_Entry *)cache->lru;
628 _evas_cache_image_entry_delete(cache, im);
629 }
630 while (cache->lru_nodata)
631 {
632 im = (Image_Entry *)cache->lru_nodata;
633 _evas_cache_image_entry_delete(cache, im);
634 }
635 /* This is mad, I am about to destroy image still alive, but we need to prevent leak. */
636 while (cache->dirty)
637 {
638 im = (Image_Entry *)cache->dirty;
639 _evas_cache_image_entry_delete(cache, im);
640 }
641 delete_list = NULL;
642 eina_hash_foreach(cache->activ, _evas_cache_image_free_cb, &delete_list);
643 while (delete_list)
644 {
645 _evas_cache_image_entry_delete(cache, eina_list_data_get(delete_list));
646 delete_list = eina_list_remove_list(delete_list, delete_list);
647 }
648
649#ifdef BUILD_ASYNC_PRELOAD
650 /* Now wait for all pending image to die */
651 while (cache->pending)
652 {
653 evas_async_events_process();
654 LKL(wakeup);
655 // the lazy bum who did eain threads and converted this code
656 // didn't bother to worry about Eina_Lock being a different type
657 // to a pthread mutex.
658 if (cache->pending) eina_condition_wait(&cond_wakeup);
659 LKU(wakeup);
660 }
661#endif
662 eina_hash_free(cache->activ);
663 eina_hash_free(cache->inactiv);
664 free(cache);
665
666#ifdef BUILD_ASYNC_PRELOAD
667 if (--_evas_cache_mutex_init == 0)
668 {
669 eina_condition_free(&cond_wakeup);
670 LKD(engine_lock);
671 LKD(wakeup);
672 }
673#endif
674}
675
676EAPI Image_Entry *
677evas_cache_image_request(Evas_Cache_Image *cache, const char *file,
678 const char *key, RGBA_Image_Loadopts *lo, int *error)
679{
680 const char *ckey = "(null)";
681 char *hkey;
682 Image_Entry *im;
683 Evas_Image_Load_Opts prevent = { 0, 0.0, 0, 0, 0, { 0, 0, 0, 0 }, EINA_FALSE };
684 size_t size;
685 int stat_done = 0, stat_failed = 0;
686 size_t file_length;
687 size_t key_length;
688 struct stat st;
689 Image_Timestamp tstamp;
690
691 if ((!file) || ((!file) && (!key)))
692 {
693 *error = EVAS_LOAD_ERROR_GENERIC;
694 return NULL;
695 }
696
697 /* generate hkey from file+key+load opts */
698 file_length = strlen(file);
699 key_length = key ? strlen(key) : 6;
700 size = file_length + key_length + 132;
701 hkey = alloca(sizeof (char) * size);
702 memcpy(hkey, file, file_length);
703 size = file_length;
704 memcpy(hkey + size, "//://", 5);
705 size += 5;
706 if (key) ckey = key;
707 memcpy(hkey + size, ckey, key_length);
708 size += key_length;
709 if ((!lo) ||
710 (lo &&
711 (lo->scale_down_by == 0) &&
712 (lo->dpi == 0.0) &&
713 ((lo->w == 0) || (lo->h == 0)) &&
714 ((lo->region.w == 0) || (lo->region.h == 0)) &&
715 (lo->orientation == 0)
716 ))
717 {
718 lo = &prevent;
719 }
720 else
721 {
722 memcpy(hkey + size, "//@/", 4);
723 size += 4;
724 size += eina_convert_xtoa(lo->scale_down_by, hkey + size);
725 hkey[size] = '/';
726 size += 1;
727 size += eina_convert_dtoa(lo->dpi, hkey + size);
728 hkey[size] = '/';
729 size += 1;
730 size += eina_convert_xtoa(lo->w, hkey + size);
731 hkey[size] = 'x';
732 size += 1;
733 size += eina_convert_xtoa(lo->h, hkey + size);
734 hkey[size] = '/';
735 size += 1;
736 size += eina_convert_xtoa(lo->region.x, hkey + size);
737 hkey[size] = '+';
738 size += 1;
739 size += eina_convert_xtoa(lo->region.y, hkey + size);
740 hkey[size] = '.';
741 size += 1;
742 size += eina_convert_xtoa(lo->region.w, hkey + size);
743 hkey[size] = 'x';
744 size += 1;
745 size += eina_convert_xtoa(lo->region.h, hkey + size);
746
747 if (lo->orientation)
748 {
749 hkey[size] = '/';
750 size += 1;
751 hkey[size] = 'o';
752 size += 1;
753 }
754 }
755 hkey[size] = '\0';
756
757 /* find image by key in active hash */
758#ifdef EVAS_FRAME_QUEUING
759 LKL(cache->lock);
760#endif
761 im = eina_hash_find(cache->activ, hkey);
762#ifdef EVAS_FRAME_QUEUING
763 LKU(cache->lock);
764#endif
765 if (im)
766 {
767 int ok = 1;
768
769 stat_done = 1;
770 if (stat(file, &st) < 0)
771 {
772 stat_failed = 1;
773 ok = 0;
774 }
775 else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0;
776 if (ok) goto on_ok;
777 /* image we found doesn't match what's on disk (stat info wise)
778 * so dirty the active cache entry so we never find it again. this
779 * also implicitly guarantees that we only have 1 active copy
780 * of an image at a given key. we wither find it and keep re-reffing
781 * it or we dirty it and get it out */
782 _evas_cache_image_dirty_add(im);
783 im = NULL;
784 }
785
786 /* find image by key in inactive/lru hash */
787#ifdef EVAS_FRAME_QUEUING
788 LKL(cache->lock);
789#endif
790 im = eina_hash_find(cache->inactiv, hkey);
791#ifdef EVAS_FRAME_QUEUING
792 LKU(cache->lock);
793#endif
794 if (im)
795 {
796 int ok = 1;
797
798 if (!stat_done)
799 {
800 stat_done = 1;
801 if (stat(file, &st) < 0)
802 {
803 stat_failed = 1;
804 ok = 0;
805 }
806 else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0;
807 }
808 else if (!_timestamp_compare(&(im->tstamp), &st)) ok = 0;
809
810 if (ok)
811 {
812 /* remove from lru and make it active again */
813 _evas_cache_image_lru_del(im);
814 _evas_cache_image_activ_add(im);
815 goto on_ok;
816 }
817 /* as avtive cache find - if we match in lru and its invalid, dirty */
818 _evas_cache_image_dirty_add(im);
819 /* this image never used, so it have to be deleted */
820 _evas_cache_image_entry_delete(cache, im);
821 im = NULL;
822 }
823 if (stat_failed) goto on_stat_error;
824
825 if (!stat_done)
826 {
827 if (stat(file, &st) < 0) goto on_stat_error;
828 }
829 _timestamp_build(&tstamp, &st);
830 im = _evas_cache_image_entry_new(cache, hkey, &tstamp, file, key,
831 lo, error);
832 if (!im) goto on_stat_error;
833 if (cache->func.debug) cache->func.debug("request", im);
834
835on_ok:
836 *error = EVAS_LOAD_ERROR_NONE;
837#ifdef EVAS_FRAME_QUEUING
838 LKL(im->lock_references);
839#endif
840 im->references++;
841#ifdef EVAS_FRAME_QUEUING
842 LKU(im->lock_references);
843#endif
844 return im;
845
846on_stat_error:
847#ifndef _WIN32
848 if ((errno == ENOENT) || (errno == ENOTDIR) ||
849 (errno == ENAMETOOLONG) || (errno == ELOOP))
850#else
851 if (errno == ENOENT)
852#endif
853 *error = EVAS_LOAD_ERROR_DOES_NOT_EXIST;
854#ifndef _WIN32
855 else if ((errno == ENOMEM) || (errno == EOVERFLOW))
856#else
857 else if (errno == ENOMEM)
858#endif
859 *error = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
860 else if (errno == EACCES)
861 *error = EVAS_LOAD_ERROR_PERMISSION_DENIED;
862 else
863 *error = EVAS_LOAD_ERROR_GENERIC;
864
865 if (im) _evas_cache_image_entry_delete(cache, im);
866 return NULL;
867}
868
869EAPI void
870evas_cache_image_drop(Image_Entry *im)
871{
872 Evas_Cache_Image *cache;
873 int references;
874
875#ifdef EVAS_FRAME_QUEUING
876 LKL(im->lock_references);
877#endif
878 im->references--;
879 if (im->references < 0) im->references = 0;
880 references = im->references;
881#ifdef EVAS_FRAME_QUEUING
882 LKU(im->lock_references);
883#endif
884
885 cache = im->cache;
886
887 if (references == 0)
888 {
889#ifdef EVAS_FRAME_QUEUING
890 LKL(im->ref_fq_add);
891 LKL(im->ref_fq_del);
892 if (im->ref_fq[0] != im->ref_fq[1])
893 {
894 LKU(im->ref_fq_add);
895 LKU(im->ref_fq_del);
896 return;
897 }
898 LKU(im->ref_fq_add);
899 LKU(im->ref_fq_del);
900#endif
901
902#ifdef BUILD_ASYNC_PRELOAD
903 if (im->preload)
904 {
905 _evas_cache_image_entry_preload_remove(im, NULL);
906 return;
907 }
908#endif
909
910 if (im->flags.dirty)
911 {
912 _evas_cache_image_entry_delete(cache, im);
913 return;
914 }
915 _evas_cache_image_lru_add(im);
916 if (cache) evas_cache_image_flush(cache);
917 }
918}
919
920EAPI void
921evas_cache_image_data_not_needed(Image_Entry *im)
922{
923 int references;
924
925#ifdef EVAS_FRAME_QUEUING
926 LKL(im->lock_references);
927#endif
928 references = im->references;
929#ifdef EVAS_FRAME_QUEUING
930 LKU(im->lock_references);
931#endif
932 if (references > 1) return;
933 if ((im->flags.dirty) || (!im->flags.need_data)) return;
934 _evas_cache_image_lru_nodata_add(im);
935}
936
937EAPI Image_Entry *
938evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h)
939{
940 Image_Entry *im_dirty = im;
941 Evas_Cache_Image *cache;
942
943 cache = im->cache;
944 if (!(im->flags.dirty))
945 {
946#ifndef EVAS_CSERVE
947 int references;
948#ifdef EVAS_FRAME_QUEUING
949 LKL(im->lock_references);
950#endif
951 references = im->references;
952#ifdef EVAS_FRAME_QUEUING
953 LKU(im->lock_references);
954#endif
955 // if ref 1 also copy if using shared cache as its read-only
956 if (references == 1) im_dirty = im;
957 else
958#endif
959 {
960 im_dirty =
961 evas_cache_image_copied_data(cache, im->w, im->h,
962 evas_cache_image_pixels(im),
963 im->flags.alpha, im->space);
964 if (!im_dirty) goto on_error;
965 if (cache->func.debug) cache->func.debug("dirty-src", im);
966 cache->func.dirty(im_dirty, im);
967 if (cache->func.debug) cache->func.debug("dirty-out", im_dirty);
968#ifdef EVAS_FRAME_QUEUING
969 LKL(im_dirty->lock_references);
970#endif
971 im_dirty->references = 1;
972#ifdef EVAS_FRAME_QUEUING
973 LKU(im_dirty->lock_references);
974#endif
975 evas_cache_image_drop(im);
976 }
977 _evas_cache_image_dirty_add(im_dirty);
978 }
979
980 if (cache->func.debug) cache->func.debug("dirty-region", im_dirty);
981 if (cache->func.dirty_region)
982 cache->func.dirty_region(im_dirty, x, y, w, h);
983 return im_dirty;
984
985on_error:
986 if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty);
987 evas_cache_image_drop(im);
988 return NULL;
989}
990
991EAPI Image_Entry *
992evas_cache_image_alone(Image_Entry *im)
993{
994 Evas_Cache_Image *cache;
995 Image_Entry *im_dirty = im;
996 int references;
997
998 cache = im->cache;
999#ifdef EVAS_FRAME_QUEUING
1000 LKL(im->lock_references);
1001#endif
1002 references = im->references;
1003#ifdef EVAS_FRAME_QUEUING
1004 LKU(im->lock_references);
1005#endif
1006
1007 if (references <= 1)
1008 {
1009 if (!im->flags.dirty) _evas_cache_image_dirty_add(im);
1010 }
1011 else
1012 {
1013 im_dirty = evas_cache_image_copied_data(cache, im->w, im->h,
1014 evas_cache_image_pixels(im),
1015 im->flags.alpha,
1016 im->space);
1017 if (!im_dirty) goto on_error;
1018 if (cache->func.debug) cache->func.debug("dirty-src", im);
1019 cache->func.dirty(im_dirty, im);
1020 if (cache->func.debug) cache->func.debug("dirty-out", im_dirty);
1021#ifdef EVAS_FRAME_QUEUING
1022 LKL(im_dirty->lock_references);
1023#endif
1024 im_dirty->references = 1;
1025#ifdef EVAS_FRAME_QUEUING
1026 LKU(im_dirty->lock_references);
1027#endif
1028 evas_cache_image_drop(im);
1029 }
1030 return im_dirty;
1031
1032on_error:
1033 if (im_dirty) _evas_cache_image_entry_delete(cache, im_dirty);
1034 evas_cache_image_drop(im);
1035 return NULL;
1036}
1037
1038EAPI Image_Entry *
1039evas_cache_image_copied_data(Evas_Cache_Image *cache,
1040 unsigned int w, unsigned int h,
1041 DATA32 *image_data, int alpha, int cspace)
1042{
1043 Image_Entry *im;
1044
1045 if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) ||
1046 (cspace == EVAS_COLORSPACE_YCBCR422P709_PL) ||
1047 (cspace == EVAS_COLORSPACE_YCBCR422601_PL))
1048 w &= ~0x1;
1049
1050 im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL);
1051 if (!im) return NULL;
1052 im->space = cspace;
1053 im->flags.alpha = alpha;
1054 _evas_cache_image_entry_surface_alloc(cache, im, w, h);
1055 if (cache->func.copied_data(im, w, h, image_data, alpha, cspace) != 0)
1056 {
1057 _evas_cache_image_entry_delete(cache, im);
1058 return NULL;
1059 }
1060#ifdef EVAS_FRAME_QUEUING
1061 LKL(im->lock_references);
1062#endif
1063 im->references = 1;
1064#ifdef EVAS_FRAME_QUEUING
1065 LKU(im->lock_references);
1066#endif
1067 if (cache->func.debug) cache->func.debug("copied-data", im);
1068 return im;
1069}
1070
1071EAPI Image_Entry *
1072evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace)
1073{
1074 Image_Entry *im;
1075
1076 if ((cspace == EVAS_COLORSPACE_YCBCR422P601_PL) ||
1077 (cspace == EVAS_COLORSPACE_YCBCR422P709_PL) ||
1078 (cspace == EVAS_COLORSPACE_YCBCR422601_PL))
1079 w &= ~0x1;
1080
1081 im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL);
1082 if (!im) return NULL;
1083 im->w = w;
1084 im->h = h;
1085 im->flags.alpha = alpha;
1086 if (cache->func.data(im, w, h, image_data, alpha, cspace) != 0)
1087 {
1088 _evas_cache_image_entry_delete(cache, im);
1089 return NULL;
1090 }
1091#ifdef EVAS_FRAME_QUEUING
1092 LKL(im->lock_references);
1093#endif
1094 im->references = 1;
1095#ifdef EVAS_FRAME_QUEUING
1096 LKU(im->lock_references);
1097#endif
1098 if (cache->func.debug) cache->func.debug("data", im);
1099 return im;
1100}
1101
1102EAPI void
1103evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h)
1104{
1105 Evas_Cache_Image *cache = im->cache;
1106
1107 if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
1108 (im->space == EVAS_COLORSPACE_YCBCR422P709_PL) ||
1109 (im->space == EVAS_COLORSPACE_YCBCR422601_PL))
1110 w &= ~0x1;
1111
1112 _evas_cache_image_entry_surface_alloc(cache, im, w, h);
1113 if (cache->func.debug) cache->func.debug("surface-alloc", im);
1114}
1115
1116EAPI Image_Entry *
1117evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h)
1118{
1119 Evas_Cache_Image *cache;
1120 Image_Entry *im2 = NULL;
1121 int error;
1122
1123 if ((im->space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
1124 (im->space == EVAS_COLORSPACE_YCBCR422P709_PL) ||
1125 (im->space == EVAS_COLORSPACE_YCBCR422601_PL))
1126 w &= ~0x1;
1127 if ((im->w == w) && (im->h == h)) return im;
1128
1129 cache = im->cache;
1130 im2 = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, &error);
1131 if (!im2) goto on_error;
1132
1133 im2->flags.alpha = im->flags.alpha;
1134 im2->space = im->space;
1135 im2->load_opts = im->load_opts;
1136 _evas_cache_image_entry_surface_alloc(cache, im2, w, h);
1137 error = cache->func.size_set(im2, im, w, h);
1138 if (error != 0) goto on_error;
1139#ifdef EVAS_FRAME_QUEUING
1140 LKL(im2->lock_references);
1141#endif
1142 im2->references = 1;
1143#ifdef EVAS_FRAME_QUEUING
1144 LKU(im2->lock_references);
1145#endif
1146 evas_cache_image_drop(im);
1147 if (cache->func.debug) cache->func.debug("size_set", im2);
1148 return im2;
1149
1150on_error:
1151 if (im2) _evas_cache_image_entry_delete(cache, im2);
1152 evas_cache_image_drop(im);
1153 return NULL;
1154}
1155
1156EAPI int
1157evas_cache_image_load_data(Image_Entry *im)
1158{
1159#ifdef BUILD_ASYNC_PRELOAD
1160 Eina_Bool preload = EINA_FALSE;
1161#endif
1162 int error = EVAS_LOAD_ERROR_NONE;
1163
1164 if ((im->flags.loaded) && (!im->flags.animated)) return error;
1165#ifdef BUILD_ASYNC_PRELOAD
1166 if (im->preload)
1167 {
1168 preload = EINA_TRUE;
1169 if (!im->flags.pending)
1170 {
1171 im->cache->preload = eina_list_remove(im->cache->preload, im);
1172 im->cache->pending = eina_list_append(im->cache->pending, im);
1173 im->flags.pending = 1;
1174 evas_preload_thread_cancel(im->preload);
1175 }
1176 evas_async_events_process();
1177 LKL(wakeup);
1178 while (im->preload)
1179 {
1180 eina_condition_wait(&cond_wakeup);
1181 LKU(wakeup);
1182 evas_async_events_process();
1183 LKL(wakeup);
1184 }
1185 LKU(wakeup);
1186 }
1187
1188 if ((im->flags.loaded) && (!im->flags.animated)) return error;
1189 LKL(im->lock);
1190#endif
1191 im->flags.in_progress = EINA_TRUE;
1192 error = im->cache->func.load(im);
1193 im->flags.in_progress = EINA_FALSE;
1194#ifdef BUILD_ASYNC_PRELOAD
1195 LKU(im->lock);
1196#endif
1197 im->flags.loaded = 1;
1198 if (im->cache->func.debug) im->cache->func.debug("load", im);
1199 if (error != EVAS_LOAD_ERROR_NONE)
1200 {
1201 _evas_cache_image_entry_surface_alloc(im->cache, im, im->w, im->h);
1202 im->flags.loaded = 0;
1203 }
1204#ifdef BUILD_ASYNC_PRELOAD
1205 if (preload) _evas_cache_image_async_end(im);
1206#endif
1207 return error;
1208}
1209
1210EAPI void
1211evas_cache_image_unload_data(Image_Entry *im)
1212{
1213 if (im->flags.in_progress) return;
1214 evas_cache_image_preload_cancel(im, NULL);
1215#ifdef BUILD_ASYNC_PRELOAD
1216 LKL(im->lock_cancel);
1217 if (LKT(im->lock) == EINA_FALSE) /* can't get image lock - busy async load */
1218 {
1219 im->unload_cancel = EINA_TRUE;
1220 LKU(im->lock_cancel);
1221 return;
1222 }
1223 LKU(im->lock_cancel);
1224#endif
1225 if ((!im->flags.loaded) || (!im->file) || (!im->info.module) ||
1226 (im->flags.dirty))
1227 {
1228#ifdef BUILD_ASYNC_PRELOAD
1229 LKU(im->lock);
1230#endif
1231 return;
1232 }
1233 im->cache->func.destructor(im);
1234#ifdef BUILD_ASYNC_PRELOAD
1235 LKU(im->lock);
1236#endif
1237 //FIXME: imagedataunload - inform owners
1238}
1239
1240static Eina_Bool
1241_evas_cache_image_unload_cb(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, __UNUSED__ void *fdata)
1242{
1243 evas_cache_image_unload_data(data);
1244 return EINA_TRUE;
1245}
1246
1247EAPI void
1248evas_cache_image_unload_all(Evas_Cache_Image *cache)
1249{
1250 Image_Entry *im;
1251
1252 EINA_INLIST_FOREACH(cache->lru, im) evas_cache_image_unload_data(im);
1253 EINA_INLIST_FOREACH(cache->lru_nodata, im) evas_cache_image_unload_data(im);
1254 eina_hash_foreach(cache->activ, _evas_cache_image_unload_cb, NULL);
1255 eina_hash_foreach(cache->inactiv, _evas_cache_image_unload_cb, NULL);
1256}
1257
1258EAPI Eina_Bool
1259evas_cache_image_is_loaded(Image_Entry *im)
1260{
1261 if (im->flags.loaded) return EINA_TRUE;
1262 return EINA_FALSE;
1263}
1264
1265EAPI void
1266evas_cache_image_preload_data(Image_Entry *im, const void *target)
1267{
1268#ifdef BUILD_ASYNC_PRELOAD
1269 RGBA_Image *img = (RGBA_Image *)im;
1270
1271 if ((im->flags.loaded) && (img->image.data))
1272 {
1273 evas_object_inform_call_image_preloaded((Evas_Object *)target);
1274 return;
1275 }
1276 im->flags.loaded = 0;
1277 if (!_evas_cache_image_entry_preload_add(im, target))
1278 evas_object_inform_call_image_preloaded((Evas_Object *)target);
1279#else
1280 evas_cache_image_load_data(im);
1281 evas_object_inform_call_image_preloaded((Evas_Object *)target);
1282#endif
1283}
1284
1285EAPI void
1286evas_cache_image_preload_cancel(Image_Entry *im, const void *target)
1287{
1288#ifdef BUILD_ASYNC_PRELOAD
1289 if (!target) return;
1290 _evas_cache_image_entry_preload_remove(im, target);
1291#else
1292 (void)im;
1293 (void)target;
1294#endif
1295}
1296
1297#ifdef CACHEDUMP
1298static int total = 0;
1299
1300static void
1301_dump_img(Image_Entry *im, const char *type)
1302{
1303 total += im->cache->func.mem_size_get(im);
1304 printf("%s: %4i: %4ib, %4ix%4i alloc[%4ix%4i] [%s] [%s]\n",
1305 type,
1306 im->references,
1307 im->cache->func.mem_size_get(im),
1308 im->w, im->h, im->allocated.w, im->allocated.h,
1309 im->file, im->key);
1310}
1311
1312static Eina_Bool
1313_dump_cache_active(__UNUSED__ const Eina_Hash *hash, __UNUSED__ const void *key, void *data, void *fdata __UNUSED__)
1314{
1315 Image_Entry *im = data;
1316 _dump_img(im, "ACTIVE");
1317 return EINA_TRUE;
1318}
1319
1320static void
1321_dump_cache(Evas_Cache_Image *cache)
1322{
1323 Image_Entry *im;
1324
1325 printf("--CACHE DUMP----------------------------------------------------\n");
1326 printf("cache: %ikb / %ikb\n",
1327 cache->usage / 1024,
1328 cache->limit / 1024);
1329 printf("................................................................\n");
1330 total = 0;
1331 EINA_INLIST_FOREACH(cache->lru_nodata, im)
1332 _dump_img(im, "NODATA");
1333 EINA_INLIST_FOREACH(cache->lru, im)
1334 _dump_img(im, "DATA ");
1335 printf("tot: %i\n"
1336 "usg: %i\n",
1337 total,
1338 cache->usage);
1339 eina_hash_foreach(cache->activ, _dump_cache_active, NULL);
1340}
1341#endif
1342
1343EAPI int
1344evas_cache_image_flush(Evas_Cache_Image *cache)
1345{
1346#ifdef CACHEDUMP
1347 _dump_cache(cache);
1348#endif
1349 if (cache->limit == (unsigned int)-1) return -1;
1350
1351 while ((cache->lru) && (cache->limit < (unsigned int)cache->usage))
1352 {
1353 Image_Entry *im;
1354
1355 im = (Image_Entry *)cache->lru->last;
1356 _evas_cache_image_entry_delete(cache, im);
1357 }
1358
1359 while ((cache->lru_nodata) && (cache->limit < (unsigned int)cache->usage))
1360 {
1361 Image_Entry *im;
1362
1363 im = (Image_Entry *) cache->lru_nodata->last;
1364 _evas_cache_image_lru_nodata_del(im);
1365 cache->func.surface_delete(im);
1366 im->flags.loaded = 0;
1367 }
1368
1369 return cache->usage;
1370}
1371
1372EAPI Image_Entry *
1373evas_cache_image_empty(Evas_Cache_Image *cache)
1374{
1375 Image_Entry *im;
1376
1377 im = _evas_cache_image_entry_new(cache, NULL, NULL, NULL, NULL, NULL, NULL);
1378 if (!im) return NULL;
1379#ifdef EVAS_FRAME_QUEUING
1380 LKL(im->lock_references);
1381#endif
1382 im->references = 1;
1383#ifdef EVAS_FRAME_QUEUING
1384 LKU(im->lock_references);
1385#endif
1386 return im;
1387}
1388
1389EAPI void
1390evas_cache_image_colorspace(Image_Entry *im, int cspace)
1391{
1392 if (im->space == cspace) return;
1393 im->space = cspace;
1394 im->cache->func.color_space(im, cspace);
1395}
1396
1397EAPI void *
1398evas_cache_private_from_image_entry_get(Image_Entry *im)
1399{
1400 return (void *)im->cache->data;
1401}
1402
1403EAPI void *
1404evas_cache_private_get(Evas_Cache_Image *cache)
1405{
1406 return cache->data;
1407}
1408
1409EAPI void
1410evas_cache_private_set(Evas_Cache_Image *cache, const void *data)
1411{
1412 cache->data = (void *)data;
1413}
1414
1415EAPI DATA32 *
1416evas_cache_image_pixels(Image_Entry *im)
1417{
1418 return im->cache->func.surface_pixels(im);
1419}
1420
1421EAPI void
1422evas_cache_image_wakeup(void)
1423{
1424#ifdef BUILD_ASYNC_PRELOAD
1425 if (_evas_cache_mutex_init > 0)
1426 eina_condition_broadcast(&cond_wakeup);
1427#endif
1428}
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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#ifdef HAVE_EVIL
6# include <Evil.h>
7#endif
8
9#ifdef BUILD_ASYNC_PRELOAD
10# include <pthread.h>
11# ifdef __linux__
12# include <sys/syscall.h>
13# endif
14#endif
15
16#include "evas_common.h"
17#include "evas_private.h"
18#include "Evas.h"
19
20#ifdef BUILD_ASYNC_PRELOAD
21
22static int _threads_max = 0;
23
24typedef struct _Evas_Preload_Pthread_Worker Evas_Preload_Pthread_Worker;
25typedef struct _Evas_Preload_Pthread_Data Evas_Preload_Pthread_Data;
26
27typedef void (*_evas_preload_pthread_func)(void *data);
28
29struct _Evas_Preload_Pthread_Worker
30{
31 EINA_INLIST;
32
33 _evas_preload_pthread_func func_heavy;
34 _evas_preload_pthread_func func_end;
35 _evas_preload_pthread_func func_cancel;
36 void *data;
37 Eina_Bool cancel : 1;
38};
39
40struct _Evas_Preload_Pthread_Data
41{
42 pthread_t thread;
43};
44
45static int _threads_count = 0;
46static Evas_Preload_Pthread_Worker *_workers = NULL;
47
48static LK(_mutex);
49
50static void
51_evas_preload_thread_end(void *data)
52{
53 Evas_Preload_Pthread_Data *pth = data;
54 Evas_Preload_Pthread_Data *p = NULL;
55
56 if (pthread_join(pth->thread, (void **)&p) == 0) free(p);
57 else return;
58 eina_threads_shutdown();
59}
60
61static void
62_evas_preload_thread_done(void *target __UNUSED__, Evas_Callback_Type type __UNUSED__, void *event_info)
63{
64 Evas_Preload_Pthread_Worker *work = event_info;
65 if (work->cancel)
66 {
67 if (work->func_cancel) work->func_cancel(work->data);
68 }
69 else
70 work->func_end(work->data);
71
72 free(work);
73}
74
75static void *
76_evas_preload_thread_worker(void *data)
77{
78 Evas_Preload_Pthread_Data *pth = data;
79 Evas_Preload_Pthread_Worker *work;
80
81 eina_sched_prio_drop();
82 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
83 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
84on_error:
85 for (;;)
86 {
87 LKL(_mutex);
88 if (!_workers)
89 {
90 LKU(_mutex);
91 break;
92 }
93
94 work = _workers;
95 _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers),
96 EINA_INLIST_GET(_workers)),
97 Evas_Preload_Pthread_Worker);
98 LKU(_mutex);
99
100 if (work->func_heavy) work->func_heavy(work->data);
101 evas_async_events_put(pth, 0, work, _evas_preload_thread_done);
102 }
103
104 LKL(_mutex);
105 if (_workers)
106 {
107 LKU(_mutex);
108 goto on_error;
109 }
110 _threads_count--;
111 LKU(_mutex);
112
113 // dummy worker to wake things up
114 work = malloc(sizeof(Evas_Preload_Pthread_Worker));
115 if (!work) return NULL;
116
117 work->data = pth;
118 work->func_heavy = NULL;
119 work->func_end = (_evas_preload_pthread_func) _evas_preload_thread_end;
120 work->func_cancel = NULL;
121 work->cancel = EINA_FALSE;
122
123 evas_async_events_put(pth, 0, work, _evas_preload_thread_done);
124 return pth;
125}
126#endif
127
128void
129_evas_preload_thread_init(void)
130{
131#ifdef BUILD_ASYNC_PRELOAD
132 _threads_max = eina_cpu_count();
133 if (_threads_max < 1) _threads_max = 1;
134
135 LKI(_mutex);
136#endif
137}
138
139void
140_evas_preload_thread_shutdown(void)
141{
142 /* FIXME: If function are still running in the background, should we kill them ? */
143#ifdef BUILD_ASYNC_PRELOAD
144 Evas_Preload_Pthread_Worker *work;
145
146 /* Force processing of async events. */
147 evas_async_events_process();
148 LKL(_mutex);
149 while (_workers)
150 {
151 work = _workers;
152 _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers),
153 EINA_INLIST_GET(_workers)),
154 Evas_Preload_Pthread_Worker);
155 if (work->func_cancel) work->func_cancel(work->data);
156 free(work);
157 }
158 LKU(_mutex);
159
160 LKD(_mutex);
161#endif
162}
163
164Evas_Preload_Pthread *
165evas_preload_thread_run(void (*func_heavy) (void *data),
166 void (*func_end) (void *data),
167 void (*func_cancel) (void *data),
168 const void *data)
169{
170#ifdef BUILD_ASYNC_PRELOAD
171 Evas_Preload_Pthread_Worker *work;
172 Evas_Preload_Pthread_Data *pth;
173
174 work = malloc(sizeof(Evas_Preload_Pthread_Worker));
175 if (!work)
176 {
177 func_cancel((void *)data);
178 return NULL;
179 }
180
181 work->func_heavy = func_heavy;
182 work->func_end = func_end;
183 work->func_cancel = func_cancel;
184 work->cancel = EINA_FALSE;
185 work->data = (void *)data;
186
187 LKL(_mutex);
188 _workers = (Evas_Preload_Pthread_Worker *)eina_inlist_append(EINA_INLIST_GET(_workers), EINA_INLIST_GET(work));
189 if (_threads_count == _threads_max)
190 {
191 LKU(_mutex);
192 return (Evas_Preload_Pthread *)work;
193 }
194 LKU(_mutex);
195
196 /* One more thread could be created. */
197 pth = malloc(sizeof(Evas_Preload_Pthread_Data));
198 if (!pth) goto on_error;
199
200 eina_threads_init();
201
202 if (pthread_create(&pth->thread, NULL, _evas_preload_thread_worker, pth) == 0)
203 {
204 LKL(_mutex);
205 _threads_count++;
206 LKU(_mutex);
207 return (Evas_Preload_Pthread*)work;
208 }
209
210 eina_threads_shutdown();
211
212 on_error:
213 LKL(_mutex);
214 if (_threads_count == 0)
215 {
216 LKU(_mutex);
217 if (work->func_cancel) work->func_cancel(work->data);
218 free(work);
219 return NULL;
220 }
221 LKU(_mutex);
222 return NULL;
223#else
224 /*
225 If no thread and as we don't want to break app that rely on this
226 facility, we will lock the interface until we are done.
227 */
228 (void)func_cancel;
229 func_heavy((void *)data);
230 func_end((void *)data);
231 return (void *)1;
232#endif
233}
234
235Eina_Bool
236evas_preload_thread_cancel(Evas_Preload_Pthread *thread)
237{
238#ifdef BUILD_ASYNC_PRELOAD
239 Evas_Preload_Pthread_Worker *work;
240
241 if (!thread) return EINA_TRUE;
242 LKL(_mutex);
243 EINA_INLIST_FOREACH(_workers, work)
244 {
245 if (work == (Evas_Preload_Pthread_Worker *)thread)
246 {
247 _workers = EINA_INLIST_CONTAINER_GET(eina_inlist_remove(EINA_INLIST_GET(_workers),
248 EINA_INLIST_GET(work)),
249 Evas_Preload_Pthread_Worker);
250 LKU(_mutex);
251 if (work->func_cancel) work->func_cancel(work->data);
252 free(work);
253 return EINA_TRUE;
254 }
255 }
256 LKU(_mutex);
257
258 /* Delay the destruction */
259 work = (Evas_Preload_Pthread_Worker *)thread;
260 work->cancel = EINA_TRUE;
261 return EINA_FALSE;
262#else
263 (void) thread;
264 return EINA_TRUE;
265#endif
266}
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I. \
5-I$(top_srcdir)/src/lib \
6-I$(top_srcdir)/src/lib/include \
7-I$(top_srcdir)/src/lib/cserve \
8-DPACKAGE_BIN_DIR=\"$(bindir)\" \
9-DPACKAGE_LIB_DIR=\"$(libdir)\" \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11@FREETYPE_CFLAGS@ \
12@EET_CFLAGS@ \
13@FONTCONFIG_CFLAGS@ \
14@EVAS_CFLAGS@ \
15@EINA_CFLAGS@ \
16@EVIL_CFLAGS@ \
17@PIXMAN_CFLAGS@
18
19noinst_LTLIBRARIES = libevas_canvas.la
20libevas_canvas_la_SOURCES = \
21evas_callbacks.c \
22evas_clip.c \
23evas_data.c \
24evas_events.c \
25evas_filter.c \
26evas_focus.c \
27evas_key.c \
28evas_key_grab.c \
29evas_layer.c \
30evas_main.c \
31evas_name.c \
32evas_object_image.c \
33evas_object_main.c \
34evas_object_inform.c \
35evas_object_intercept.c \
36evas_object_line.c \
37evas_object_polygon.c \
38evas_object_rectangle.c \
39evas_object_smart.c \
40evas_object_smart_clipped.c \
41evas_object_box.c \
42evas_object_table.c \
43evas_object_text.c \
44evas_object_textblock.c \
45evas_object_grid.c \
46evas_font_dir.c \
47evas_rectangle.c \
48evas_render.c \
49evas_smart.c \
50evas_stack.c \
51evas_async_events.c \
52evas_stats.c \
53evas_touch_point.c \
54evas_map.c \
55evas_gl.c
56
57#evas_object_textgrid.c
58
59libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@
60
61if EVAS_USE_LINEBREAK
62AM_CPPFLAGS += @LINEBREAK_CFLAGS@
63libevas_canvas_la_LIBADD += @LINEBREAK_LIBS@
64endif
65
66clean-local:
67 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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37@EVAS_USE_LINEBREAK_TRUE@am__append_1 = @LINEBREAK_CFLAGS@
38@EVAS_USE_LINEBREAK_TRUE@am__append_2 = @LINEBREAK_LIBS@
39subdir = src/lib/canvas
40DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
41ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
42am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
43 $(top_srcdir)/m4/efl_coverage.m4 \
44 $(top_srcdir)/m4/efl_doxygen.m4 \
45 $(top_srcdir)/m4/efl_fnmatch.m4 \
46 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
47 $(top_srcdir)/m4/evas_check_engine.m4 \
48 $(top_srcdir)/m4/evas_check_loader.m4 \
49 $(top_srcdir)/m4/evas_converter.m4 \
50 $(top_srcdir)/m4/evas_dither.m4 \
51 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
52 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
53 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
54 $(top_srcdir)/configure.ac
55am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
56 $(ACLOCAL_M4)
57mkinstalldirs = $(install_sh) -d
58CONFIG_HEADER = $(top_builddir)/config.h
59CONFIG_CLEAN_FILES =
60CONFIG_CLEAN_VPATH_FILES =
61LTLIBRARIES = $(noinst_LTLIBRARIES)
62am__DEPENDENCIES_1 =
63libevas_canvas_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
64am_libevas_canvas_la_OBJECTS = evas_callbacks.lo evas_clip.lo \
65 evas_data.lo evas_events.lo evas_filter.lo evas_focus.lo \
66 evas_key.lo evas_key_grab.lo evas_layer.lo evas_main.lo \
67 evas_name.lo evas_object_image.lo evas_object_main.lo \
68 evas_object_inform.lo evas_object_intercept.lo \
69 evas_object_line.lo evas_object_polygon.lo \
70 evas_object_rectangle.lo evas_object_smart.lo \
71 evas_object_smart_clipped.lo evas_object_box.lo \
72 evas_object_table.lo evas_object_text.lo \
73 evas_object_textblock.lo evas_object_grid.lo evas_font_dir.lo \
74 evas_rectangle.lo evas_render.lo evas_smart.lo evas_stack.lo \
75 evas_async_events.lo evas_stats.lo evas_touch_point.lo \
76 evas_map.lo evas_gl.lo
77libevas_canvas_la_OBJECTS = $(am_libevas_canvas_la_OBJECTS)
78AM_V_lt = $(am__v_lt_$(V))
79am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
80am__v_lt_0 = --silent
81DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
82depcomp = $(SHELL) $(top_srcdir)/depcomp
83am__depfiles_maybe = depfiles
84am__mv = mv -f
85COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
86 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
87LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
88 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
89 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
90 $(AM_CFLAGS) $(CFLAGS)
91AM_V_CC = $(am__v_CC_$(V))
92am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
93am__v_CC_0 = @echo " CC " $@;
94AM_V_at = $(am__v_at_$(V))
95am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
96am__v_at_0 = @
97CCLD = $(CC)
98LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
99 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
100 $(AM_LDFLAGS) $(LDFLAGS) -o $@
101AM_V_CCLD = $(am__v_CCLD_$(V))
102am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
103am__v_CCLD_0 = @echo " CCLD " $@;
104AM_V_GEN = $(am__v_GEN_$(V))
105am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
106am__v_GEN_0 = @echo " GEN " $@;
107SOURCES = $(libevas_canvas_la_SOURCES)
108DIST_SOURCES = $(libevas_canvas_la_SOURCES)
109ETAGS = etags
110CTAGS = ctags
111DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
112ACLOCAL = @ACLOCAL@
113ALLOCA = @ALLOCA@
114AMTAR = @AMTAR@
115AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
116AR = @AR@
117AS = @AS@
118AUTOCONF = @AUTOCONF@
119AUTOHEADER = @AUTOHEADER@
120AUTOMAKE = @AUTOMAKE@
121AWK = @AWK@
122CC = @CC@
123CCDEPMODE = @CCDEPMODE@
124CFLAGS = @CFLAGS@
125CHECK_CFLAGS = @CHECK_CFLAGS@
126CHECK_LIBS = @CHECK_LIBS@
127CPP = @CPP@
128CPPFLAGS = @CPPFLAGS@
129CXX = @CXX@
130CXXCPP = @CXXCPP@
131CXXDEPMODE = @CXXDEPMODE@
132CXXFLAGS = @CXXFLAGS@
133CYGPATH_W = @CYGPATH_W@
134DEFS = @DEFS@
135DEPDIR = @DEPDIR@
136DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
137DIRECTFB_LIBS = @DIRECTFB_LIBS@
138DLLTOOL = @DLLTOOL@
139DSYMUTIL = @DSYMUTIL@
140DUMPBIN = @DUMPBIN@
141ECHO_C = @ECHO_C@
142ECHO_N = @ECHO_N@
143ECHO_T = @ECHO_T@
144ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
145ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
146EDB_CFLAGS = @EDB_CFLAGS@
147EDB_LIBS = @EDB_LIBS@
148EDJE_CFLAGS = @EDJE_CFLAGS@
149EDJE_LIBS = @EDJE_LIBS@
150EET_CFLAGS = @EET_CFLAGS@
151EET_LIBS = @EET_LIBS@
152EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
153EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
154EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
155EGREP = @EGREP@
156EINA_CFLAGS = @EINA_CFLAGS@
157EINA_LIBS = @EINA_LIBS@
158EVAS_CFLAGS = @EVAS_CFLAGS@
159EVAS_LIBS = @EVAS_LIBS@
160EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
161EVIL_CFLAGS = @EVIL_CFLAGS@
162EVIL_LIBS = @EVIL_LIBS@
163EXEEXT = @EXEEXT@
164EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
165EXOTIC_LIBS = @EXOTIC_LIBS@
166FGREP = @FGREP@
167FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
168FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
169FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
170FREETYPE_LIBS = @FREETYPE_LIBS@
171FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
172FRIBIDI_LIBS = @FRIBIDI_LIBS@
173GL_EET_CFLAGS = @GL_EET_CFLAGS@
174GL_EET_LIBS = @GL_EET_LIBS@
175GREP = @GREP@
176HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
177HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
178INSTALL = @INSTALL@
179INSTALL_DATA = @INSTALL_DATA@
180INSTALL_PROGRAM = @INSTALL_PROGRAM@
181INSTALL_SCRIPT = @INSTALL_SCRIPT@
182INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
183LD = @LD@
184LDFLAGS = @LDFLAGS@
185LIBOBJS = @LIBOBJS@
186LIBS = @LIBS@
187LIBTOOL = @LIBTOOL@
188LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
189LINEBREAK_LIBS = @LINEBREAK_LIBS@
190LIPO = @LIPO@
191LN_S = @LN_S@
192LTLIBOBJS = @LTLIBOBJS@
193MAKEINFO = @MAKEINFO@
194MKDIR_P = @MKDIR_P@
195MODULE_ARCH = @MODULE_ARCH@
196NM = @NM@
197NMEDIT = @NMEDIT@
198OBJC = @OBJC@
199OBJCDEPMODE = @OBJCDEPMODE@
200OBJCFLAGS = @OBJCFLAGS@
201OBJDUMP = @OBJDUMP@
202OBJEXT = @OBJEXT@
203OTOOL = @OTOOL@
204OTOOL64 = @OTOOL64@
205PACKAGE = @PACKAGE@
206PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
207PACKAGE_NAME = @PACKAGE_NAME@
208PACKAGE_STRING = @PACKAGE_STRING@
209PACKAGE_TARNAME = @PACKAGE_TARNAME@
210PACKAGE_URL = @PACKAGE_URL@
211PACKAGE_VERSION = @PACKAGE_VERSION@
212PATH_SEPARATOR = @PATH_SEPARATOR@
213PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
214PIXMAN_LIBS = @PIXMAN_LIBS@
215PKG_CONFIG = @PKG_CONFIG@
216PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
217PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
218PNG_CFLAGS = @PNG_CFLAGS@
219PNG_LIBS = @PNG_LIBS@
220RANLIB = @RANLIB@
221SDL_CFLAGS = @SDL_CFLAGS@
222SDL_LIBS = @SDL_LIBS@
223SED = @SED@
224SET_MAKE = @SET_MAKE@
225SHELL = @SHELL@
226SHM_OPEN_LINK = @SHM_OPEN_LINK@
227STRIP = @STRIP@
228SVG_CFLAGS = @SVG_CFLAGS@
229SVG_LIBS = @SVG_LIBS@
230VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
231VALGRIND_LIBS = @VALGRIND_LIBS@
232VERSION = @VERSION@
233VMAJ = @VMAJ@
234WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
235WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
236XCB_CFLAGS = @XCB_CFLAGS@
237XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
238XCB_GL_LIBS = @XCB_GL_LIBS@
239XCB_LIBS = @XCB_LIBS@
240XEXT_CFLAGS = @XEXT_CFLAGS@
241XEXT_LIBS = @XEXT_LIBS@
242XMKMF = @XMKMF@
243X_CFLAGS = @X_CFLAGS@
244X_EXTRA_LIBS = @X_EXTRA_LIBS@
245X_LIBS = @X_LIBS@
246X_PRE_LIBS = @X_PRE_LIBS@
247abs_builddir = @abs_builddir@
248abs_srcdir = @abs_srcdir@
249abs_top_builddir = @abs_top_builddir@
250abs_top_srcdir = @abs_top_srcdir@
251ac_ct_CC = @ac_ct_CC@
252ac_ct_CXX = @ac_ct_CXX@
253ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
254ac_ct_OBJC = @ac_ct_OBJC@
255altivec_cflags = @altivec_cflags@
256am__include = @am__include@
257am__leading_dot = @am__leading_dot@
258am__quote = @am__quote@
259am__tar = @am__tar@
260am__untar = @am__untar@
261bindir = @bindir@
262build = @build@
263build_alias = @build_alias@
264build_cpu = @build_cpu@
265build_os = @build_os@
266build_vendor = @build_vendor@
267builddir = @builddir@
268datadir = @datadir@
269datarootdir = @datarootdir@
270dlopen_libs = @dlopen_libs@
271docdir = @docdir@
272dvidir = @dvidir@
273edje_cc = @edje_cc@
274efl_doxygen = @efl_doxygen@
275efl_have_doxygen = @efl_have_doxygen@
276evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
277evas_engine_buffer_libs = @evas_engine_buffer_libs@
278evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
279evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
280evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
281evas_engine_directfb_libs = @evas_engine_directfb_libs@
282evas_engine_fb_cflags = @evas_engine_fb_cflags@
283evas_engine_fb_libs = @evas_engine_fb_libs@
284evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
285evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
286evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
287evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
288evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
289evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
290evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
291evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
292evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
293evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
294evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
295evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
296evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
297evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
298evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
299evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
300evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
301evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
302evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
303evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
304evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
305evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
306evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
307evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
308evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
309evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
310evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
311evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
312evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
313evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
314evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
315evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
316evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
317evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
318evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
319evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
320evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
321evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
322evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
323evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
324evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
325evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
326evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
327evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
328evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
329evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
330evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
331evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
332evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
333evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
334evas_image_loader_png_libs = @evas_image_loader_png_libs@
335evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
336evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
337evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
338evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
339evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
340evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
341evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
342evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
343evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
344evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
345evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
346evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
347exec_prefix = @exec_prefix@
348have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
349have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
350have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
351have_evas_engine_software_x11 = @have_evas_engine_software_x11@
352have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
353have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
354have_lcov = @have_lcov@
355host = @host@
356host_alias = @host_alias@
357host_cpu = @host_cpu@
358host_os = @host_os@
359host_vendor = @host_vendor@
360htmldir = @htmldir@
361includedir = @includedir@
362infodir = @infodir@
363install_sh = @install_sh@
364libdir = @libdir@
365libexecdir = @libexecdir@
366localedir = @localedir@
367localstatedir = @localstatedir@
368lt_ECHO = @lt_ECHO@
369lt_enable_auto_import = @lt_enable_auto_import@
370mandir = @mandir@
371mkdir_p = @mkdir_p@
372oldincludedir = @oldincludedir@
373pdfdir = @pdfdir@
374pkgconfig_requires_private = @pkgconfig_requires_private@
375prefix = @prefix@
376program_transform_name = @program_transform_name@
377psdir = @psdir@
378pthread_cflags = @pthread_cflags@
379pthread_libs = @pthread_libs@
380release_info = @release_info@
381requirement_evas = @requirement_evas@
382sbindir = @sbindir@
383sharedstatedir = @sharedstatedir@
384srcdir = @srcdir@
385sysconfdir = @sysconfdir@
386target_alias = @target_alias@
387top_build_prefix = @top_build_prefix@
388top_builddir = @top_builddir@
389top_srcdir = @top_srcdir@
390version_info = @version_info@
391MAINTAINERCLEANFILES = Makefile.in
392AM_CPPFLAGS = -I. -I$(top_srcdir)/src/lib \
393 -I$(top_srcdir)/src/lib/include -I$(top_srcdir)/src/lib/cserve \
394 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
395 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
396 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" @FREETYPE_CFLAGS@ \
397 @EET_CFLAGS@ @FONTCONFIG_CFLAGS@ @EVAS_CFLAGS@ @EINA_CFLAGS@ \
398 @EVIL_CFLAGS@ @PIXMAN_CFLAGS@ $(am__append_1)
399noinst_LTLIBRARIES = libevas_canvas.la
400libevas_canvas_la_SOURCES = \
401evas_callbacks.c \
402evas_clip.c \
403evas_data.c \
404evas_events.c \
405evas_filter.c \
406evas_focus.c \
407evas_key.c \
408evas_key_grab.c \
409evas_layer.c \
410evas_main.c \
411evas_name.c \
412evas_object_image.c \
413evas_object_main.c \
414evas_object_inform.c \
415evas_object_intercept.c \
416evas_object_line.c \
417evas_object_polygon.c \
418evas_object_rectangle.c \
419evas_object_smart.c \
420evas_object_smart_clipped.c \
421evas_object_box.c \
422evas_object_table.c \
423evas_object_text.c \
424evas_object_textblock.c \
425evas_object_grid.c \
426evas_font_dir.c \
427evas_rectangle.c \
428evas_render.c \
429evas_smart.c \
430evas_stack.c \
431evas_async_events.c \
432evas_stats.c \
433evas_touch_point.c \
434evas_map.c \
435evas_gl.c
436
437
438#evas_object_textgrid.c
439libevas_canvas_la_LIBADD = @EVAS_LIBS@ @EVIL_LIBS@ $(am__append_2)
440all: all-am
441
442.SUFFIXES:
443.SUFFIXES: .c .lo .o .obj
444$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
445 @for dep in $?; do \
446 case '$(am__configure_deps)' in \
447 *$$dep*) \
448 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
449 && { if test -f $@; then exit 0; else break; fi; }; \
450 exit 1;; \
451 esac; \
452 done; \
453 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/canvas/Makefile'; \
454 $(am__cd) $(top_srcdir) && \
455 $(AUTOMAKE) --gnu src/lib/canvas/Makefile
456.PRECIOUS: Makefile
457Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
458 @case '$?' in \
459 *config.status*) \
460 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
461 *) \
462 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
463 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
464 esac;
465
466$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
467 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
468
469$(top_srcdir)/configure: $(am__configure_deps)
470 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
471$(ACLOCAL_M4): $(am__aclocal_m4_deps)
472 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
473$(am__aclocal_m4_deps):
474
475clean-noinstLTLIBRARIES:
476 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
477 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
478 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
479 test "$$dir" != "$$p" || dir=.; \
480 echo "rm -f \"$${dir}/so_locations\""; \
481 rm -f "$${dir}/so_locations"; \
482 done
483libevas_canvas.la: $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_DEPENDENCIES)
484 $(AM_V_CCLD)$(LINK) $(libevas_canvas_la_OBJECTS) $(libevas_canvas_la_LIBADD) $(LIBS)
485
486mostlyclean-compile:
487 -rm -f *.$(OBJEXT)
488
489distclean-compile:
490 -rm -f *.tab.c
491
492@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_async_events.Plo@am__quote@
493@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_callbacks.Plo@am__quote@
494@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_clip.Plo@am__quote@
495@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_data.Plo@am__quote@
496@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_events.Plo@am__quote@
497@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_filter.Plo@am__quote@
498@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_focus.Plo@am__quote@
499@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_dir.Plo@am__quote@
500@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_gl.Plo@am__quote@
501@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key.Plo@am__quote@
502@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_key_grab.Plo@am__quote@
503@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_layer.Plo@am__quote@
504@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_main.Plo@am__quote@
505@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map.Plo@am__quote@
506@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_name.Plo@am__quote@
507@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_box.Plo@am__quote@
508@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_grid.Plo@am__quote@
509@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_image.Plo@am__quote@
510@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_inform.Plo@am__quote@
511@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_intercept.Plo@am__quote@
512@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_line.Plo@am__quote@
513@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_main.Plo@am__quote@
514@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_polygon.Plo@am__quote@
515@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_rectangle.Plo@am__quote@
516@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart.Plo@am__quote@
517@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_smart_clipped.Plo@am__quote@
518@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_table.Plo@am__quote@
519@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_text.Plo@am__quote@
520@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_object_textblock.Plo@am__quote@
521@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle.Plo@am__quote@
522@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_render.Plo@am__quote@
523@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_smart.Plo@am__quote@
524@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stack.Plo@am__quote@
525@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_stats.Plo@am__quote@
526@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_touch_point.Plo@am__quote@
527
528.c.o:
529@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
530@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
531@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
532@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
533@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
534@am__fastdepCC_FALSE@ $(COMPILE) -c $<
535
536.c.obj:
537@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
538@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
539@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
540@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
541@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
542@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
543
544.c.lo:
545@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
546@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
547@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
548@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
549@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
550@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
551
552mostlyclean-libtool:
553 -rm -f *.lo
554
555clean-libtool:
556 -rm -rf .libs _libs
557
558ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
559 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
560 unique=`for i in $$list; do \
561 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
562 done | \
563 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
564 END { if (nonempty) { for (i in files) print i; }; }'`; \
565 mkid -fID $$unique
566tags: TAGS
567
568TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
569 $(TAGS_FILES) $(LISP)
570 set x; \
571 here=`pwd`; \
572 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
573 unique=`for i in $$list; do \
574 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
575 done | \
576 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
577 END { if (nonempty) { for (i in files) print i; }; }'`; \
578 shift; \
579 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
580 test -n "$$unique" || unique=$$empty_fix; \
581 if test $$# -gt 0; then \
582 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
583 "$$@" $$unique; \
584 else \
585 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
586 $$unique; \
587 fi; \
588 fi
589ctags: CTAGS
590CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
591 $(TAGS_FILES) $(LISP)
592 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
593 unique=`for i in $$list; do \
594 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
595 done | \
596 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
597 END { if (nonempty) { for (i in files) print i; }; }'`; \
598 test -z "$(CTAGS_ARGS)$$unique" \
599 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
600 $$unique
601
602GTAGS:
603 here=`$(am__cd) $(top_builddir) && pwd` \
604 && $(am__cd) $(top_srcdir) \
605 && gtags -i $(GTAGS_ARGS) "$$here"
606
607distclean-tags:
608 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
609
610distdir: $(DISTFILES)
611 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
612 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
613 list='$(DISTFILES)'; \
614 dist_files=`for file in $$list; do echo $$file; done | \
615 sed -e "s|^$$srcdirstrip/||;t" \
616 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
617 case $$dist_files in \
618 */*) $(MKDIR_P) `echo "$$dist_files" | \
619 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
620 sort -u` ;; \
621 esac; \
622 for file in $$dist_files; do \
623 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
624 if test -d $$d/$$file; then \
625 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
626 if test -d "$(distdir)/$$file"; then \
627 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
628 fi; \
629 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
630 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
631 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
632 fi; \
633 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
634 else \
635 test -f "$(distdir)/$$file" \
636 || cp -p $$d/$$file "$(distdir)/$$file" \
637 || exit 1; \
638 fi; \
639 done
640check-am: all-am
641check: check-am
642all-am: Makefile $(LTLIBRARIES)
643installdirs:
644install: install-am
645install-exec: install-exec-am
646install-data: install-data-am
647uninstall: uninstall-am
648
649install-am: all-am
650 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
651
652installcheck: installcheck-am
653install-strip:
654 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
655 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
656 `test -z '$(STRIP)' || \
657 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
658mostlyclean-generic:
659
660clean-generic:
661
662distclean-generic:
663 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
664 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
665
666maintainer-clean-generic:
667 @echo "This command is intended for maintainers to use"
668 @echo "it deletes files that may require special tools to rebuild."
669 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
670clean: clean-am
671
672clean-am: clean-generic clean-libtool clean-local \
673 clean-noinstLTLIBRARIES mostlyclean-am
674
675distclean: distclean-am
676 -rm -rf ./$(DEPDIR)
677 -rm -f Makefile
678distclean-am: clean-am distclean-compile distclean-generic \
679 distclean-tags
680
681dvi: dvi-am
682
683dvi-am:
684
685html: html-am
686
687html-am:
688
689info: info-am
690
691info-am:
692
693install-data-am:
694
695install-dvi: install-dvi-am
696
697install-dvi-am:
698
699install-exec-am:
700
701install-html: install-html-am
702
703install-html-am:
704
705install-info: install-info-am
706
707install-info-am:
708
709install-man:
710
711install-pdf: install-pdf-am
712
713install-pdf-am:
714
715install-ps: install-ps-am
716
717install-ps-am:
718
719installcheck-am:
720
721maintainer-clean: maintainer-clean-am
722 -rm -rf ./$(DEPDIR)
723 -rm -f Makefile
724maintainer-clean-am: distclean-am maintainer-clean-generic
725
726mostlyclean: mostlyclean-am
727
728mostlyclean-am: mostlyclean-compile mostlyclean-generic \
729 mostlyclean-libtool
730
731pdf: pdf-am
732
733pdf-am:
734
735ps: ps-am
736
737ps-am:
738
739uninstall-am:
740
741.MAKE: install-am install-strip
742
743.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
744 clean-libtool clean-local clean-noinstLTLIBRARIES ctags \
745 distclean distclean-compile distclean-generic \
746 distclean-libtool distclean-tags distdir dvi dvi-am html \
747 html-am info info-am install install-am install-data \
748 install-data-am install-dvi install-dvi-am install-exec \
749 install-exec-am install-html install-html-am install-info \
750 install-info-am install-man install-pdf install-pdf-am \
751 install-ps install-ps-am install-strip installcheck \
752 installcheck-am installdirs maintainer-clean \
753 maintainer-clean-generic mostlyclean mostlyclean-compile \
754 mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
755 tags uninstall uninstall-am
756
757
758clean-local:
759 rm -rf *.gcno
760
761# Tell versions [3.59,3.63) of GNU make to not export all variables.
762# Otherwise a system limit (for SysV at least) may be exceeded.
763.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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#ifdef BUILD_ASYNC_EVENTS
6
7# ifndef _MSC_VER
8# include <unistd.h>
9# endif
10# include <fcntl.h>
11# include <errno.h>
12
13#endif
14
15#include "evas_common.h"
16#include "evas_private.h"
17
18#ifdef BUILD_ASYNC_EVENTS
19
20static int _fd_write = -1;
21static int _fd_read = -1;
22
23static int _init_evas_event = 0;
24
25typedef struct _Evas_Event_Async Evas_Event_Async;
26
27struct _Evas_Event_Async
28{
29 const void *target;
30 void *event_info;
31 Evas_Async_Events_Put_Cb func;
32 Evas_Callback_Type type;
33};
34
35int
36evas_async_events_init(void)
37{
38 int filedes[2];
39
40 _init_evas_event++;
41 if (_init_evas_event > 1) return _init_evas_event;
42
43 if (pipe(filedes) == -1)
44 {
45 _init_evas_event = 0;
46 return 0;
47 }
48
49 _fd_read = filedes[0];
50 _fd_write = filedes[1];
51
52 fcntl(_fd_read, F_SETFL, O_NONBLOCK);
53
54 return _init_evas_event;
55}
56
57int
58evas_async_events_shutdown(void)
59{
60 _init_evas_event--;
61 if (_init_evas_event > 0) return _init_evas_event;
62
63 close(_fd_read);
64 close(_fd_write);
65 _fd_read = -1;
66 _fd_write = -1;
67
68 return _init_evas_event;
69}
70
71#endif
72
73EAPI int
74evas_async_events_fd_get(void)
75{
76#ifdef BUILD_ASYNC_EVENTS
77 return _fd_read;
78#else
79 return -1;
80#endif
81}
82
83EAPI int
84evas_async_events_process(void)
85{
86#ifdef BUILD_ASYNC_EVENTS
87 Evas_Event_Async *ev;
88 int check;
89 int count = 0;
90
91 if (_fd_read == -1) return 0;
92
93 do
94 {
95 check = read(_fd_read, &ev, sizeof (Evas_Event_Async *));
96
97 if (check == sizeof (Evas_Event_Async *))
98 {
99 if (ev->func) ev->func((void *)ev->target, ev->type, ev->event_info);
100 free(ev);
101 count++;
102 }
103 }
104 while (check > 0);
105
106 evas_cache_image_wakeup();
107
108 if (check < 0)
109 {
110 switch (errno)
111 {
112 case EBADF:
113 case EINVAL:
114 case EIO:
115 case EISDIR:
116 _fd_read = -1;
117 }
118 }
119
120 return count;
121#else
122 return 0;
123#endif
124}
125
126EAPI Eina_Bool
127evas_async_events_put(const void *target, Evas_Callback_Type type, void *event_info, Evas_Async_Events_Put_Cb func)
128{
129#ifdef BUILD_ASYNC_EVENTS
130 Evas_Event_Async *ev;
131 ssize_t check;
132 Eina_Bool result = EINA_FALSE;
133
134 if (!func) return 0;
135 if (_fd_write == -1) return 0;
136
137 ev = calloc(1, sizeof (Evas_Event_Async));
138 if (!ev) return 0;
139
140 ev->func = func;
141 ev->target = target;
142 ev->type = type;
143 ev->event_info = event_info;
144
145 do
146 {
147 check = write(_fd_write, &ev, sizeof (Evas_Event_Async*));
148 }
149 while ((check != sizeof (Evas_Event_Async*)) &&
150 ((errno == EINTR) || (errno == EAGAIN)));
151
152 evas_cache_image_wakeup();
153
154 if (check == sizeof (Evas_Event_Async*))
155 result = EINA_TRUE;
156 else
157 {
158 switch (errno)
159 {
160 case EBADF:
161 case EINVAL:
162 case EIO:
163 case EPIPE:
164 _fd_write = -1;
165 }
166 }
167
168 return result;
169#else
170 func((void*) target, type, event_info);
171 return EINA_TRUE;
172#endif
173}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4static void evas_object_event_callback_clear(Evas_Object *obj);
5static void evas_event_callback_clear(Evas *e);
6int _evas_event_counter = 0;
7
8EVAS_MEMPOOL(_mp_fn);
9EVAS_MEMPOOL(_mp_cb);
10EVAS_MEMPOOL(_mp_pc);
11
12void
13_evas_post_event_callback_call(Evas *e)
14{
15 Evas_Post_Callback *pc;
16 int skip = 0;
17
18 if (e->delete_me) return;
19 _evas_walk(e);
20 EINA_LIST_FREE(e->post_events, pc)
21 {
22 if ((!skip) && (!e->delete_me) && (!pc->delete_me))
23 {
24 if (!pc->func((void*)pc->data, e)) skip = 1;
25 }
26 EVAS_MEMPOOL_FREE(_mp_pc, pc);
27 }
28 _evas_unwalk(e);
29}
30
31void
32_evas_post_event_callback_free(Evas *e)
33{
34 Evas_Post_Callback *pc;
35
36 EINA_LIST_FREE(e->post_events, pc)
37 {
38 EVAS_MEMPOOL_FREE(_mp_pc, pc);
39 }
40 _evas_unwalk(e);
41}
42
43void
44evas_event_callback_list_post_free(Eina_Inlist **list)
45{
46 Eina_Inlist *l;
47
48 /* MEM OK */
49 for (l = *list; l;)
50 {
51 Evas_Func_Node *fn;
52
53 fn = (Evas_Func_Node *)l;
54 l = l->next;
55 if (fn->delete_me)
56 {
57 *list = eina_inlist_remove(*list, EINA_INLIST_GET(fn));
58 EVAS_MEMPOOL_FREE(_mp_fn, fn);
59 }
60 }
61}
62
63static void
64evas_object_event_callback_clear(Evas_Object *obj)
65{
66 if (!obj->callbacks) return;
67 if (!obj->callbacks->deletions_waiting) return;
68 obj->callbacks->deletions_waiting = 0;
69 evas_event_callback_list_post_free(&obj->callbacks->callbacks);
70 if (!obj->callbacks->callbacks)
71 {
72 EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks);
73 obj->callbacks = NULL;
74 }
75}
76
77static void
78evas_event_callback_clear(Evas *e)
79{
80 if (!e->callbacks) return;
81 if (!e->callbacks->deletions_waiting) return;
82 e->callbacks->deletions_waiting = 0;
83 evas_event_callback_list_post_free(&e->callbacks->callbacks);
84 if (!e->callbacks->callbacks)
85 {
86 EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks);
87 e->callbacks = NULL;
88 }
89}
90
91void
92evas_object_event_callback_all_del(Evas_Object *obj)
93{
94 Evas_Func_Node *fn;
95
96 if (!obj->callbacks) return;
97 EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn)
98 fn->delete_me = 1;
99}
100
101void
102evas_object_event_callback_cleanup(Evas_Object *obj)
103{
104 /* MEM OK */
105 if (!obj->callbacks) return;
106 evas_event_callback_list_post_free(&obj->callbacks->callbacks);
107 EVAS_MEMPOOL_FREE(_mp_cb, obj->callbacks);
108 obj->callbacks = NULL;
109}
110
111void
112evas_event_callback_all_del(Evas *e)
113{
114 Evas_Func_Node *fn;
115
116 if (!e->callbacks) return;
117 EINA_INLIST_FOREACH(e->callbacks->callbacks, fn)
118 fn->delete_me = 1;
119}
120
121void
122evas_event_callback_cleanup(Evas *e)
123{
124 /* MEM OK */
125 if (!e->callbacks) return;
126 evas_event_callback_list_post_free(&e->callbacks->callbacks);
127 EVAS_MEMPOOL_FREE(_mp_cb, e->callbacks);
128 e->callbacks = NULL;
129}
130
131void
132evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info)
133{
134 Eina_Inlist **l_mod = NULL, *l;
135
136 _evas_walk(e);
137 if (e->callbacks)
138 {
139 l_mod = &e->callbacks->callbacks;
140 e->callbacks->walking_list++;
141 for (l = *l_mod; l; l = l->next)
142 {
143 Evas_Func_Node *fn;
144
145 fn = (Evas_Func_Node *)l;
146 if ((fn->type == type) && (!fn->delete_me))
147 {
148 Evas_Event_Cb func = fn->func;
149 if (func)
150 func(fn->data, e, event_info);
151 }
152 if (e->delete_me) break;
153 }
154 e->callbacks->walking_list--;
155 if (!e->callbacks->walking_list)
156 {
157 evas_event_callback_clear(e);
158 l_mod = NULL;
159 }
160 }
161 _evas_unwalk(e);
162}
163
164void
165evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id)
166{
167 /* MEM OK */
168 Eina_Inlist **l_mod = NULL, *l;
169 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
170 Evas *e;
171
172 if ((obj->delete_me) || (!obj->layer)) return;
173 if ((obj->last_event == event_id) &&
174 (obj->last_event_type == type)) return;
175 if (obj->last_event > event_id)
176 {
177 if ((obj->last_event_type == EVAS_CALLBACK_MOUSE_OUT) &&
178 ((type >= EVAS_CALLBACK_MOUSE_DOWN) &&
179 (type <= EVAS_CALLBACK_MULTI_MOVE)))
180 {
181 return;
182 }
183 }
184 obj->last_event = event_id;
185 obj->last_event_type = type;
186 if (!(e = obj->layer->evas)) return;
187
188 _evas_walk(e);
189 if (obj->callbacks)
190 {
191 l_mod = &obj->callbacks->callbacks;
192 switch (type)
193 {
194 case EVAS_CALLBACK_MOUSE_DOWN:
195 {
196 Evas_Event_Mouse_Down *ev = event_info;
197
198 flags = ev->flags;
199 if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
200 {
201 if (obj->last_mouse_down_counter < (e->last_mouse_down_counter - 1))
202 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
203 }
204 obj->last_mouse_down_counter = e->last_mouse_down_counter;
205 break;
206 }
207 case EVAS_CALLBACK_MOUSE_UP:
208 {
209 Evas_Event_Mouse_Up *ev = event_info;
210
211 flags = ev->flags;
212 if (ev->flags & (EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK))
213 {
214 if (obj->last_mouse_up_counter < (e->last_mouse_up_counter - 1))
215 ev->flags &= ~(EVAS_BUTTON_DOUBLE_CLICK | EVAS_BUTTON_TRIPLE_CLICK);
216 }
217 obj->last_mouse_up_counter = e->last_mouse_up_counter;
218 break;
219 }
220 default:
221 break;
222 }
223 obj->callbacks->walking_list++;
224 for (l = *l_mod; l; l = l->next)
225 {
226 Evas_Func_Node *fn;
227
228 fn = (Evas_Func_Node *)l;
229 if ((fn->type == type) && (!fn->delete_me))
230 {
231 Evas_Object_Event_Cb func = fn->func;
232 if (func)
233 func(fn->data, obj->layer->evas, obj, event_info);
234 }
235 if (obj->delete_me) break;
236 }
237 obj->callbacks->walking_list--;
238 if (!obj->callbacks->walking_list)
239 {
240 evas_object_event_callback_clear(obj);
241 l_mod = NULL;
242 }
243
244 if (type == EVAS_CALLBACK_MOUSE_DOWN)
245 {
246 Evas_Event_Mouse_Down *ev = event_info;
247 ev->flags = flags;
248 }
249 else if (type == EVAS_CALLBACK_MOUSE_UP)
250 {
251 Evas_Event_Mouse_Up *ev = event_info;
252 ev->flags = flags;
253 }
254 }
255
256 if (!((obj->no_propagate) && (l_mod) && (*l_mod)))
257 {
258 if (!obj->no_propagate)
259 {
260 if ((obj->smart.parent) && (type != EVAS_CALLBACK_FREE) &&
261 (type <= EVAS_CALLBACK_KEY_UP))
262 evas_object_event_callback_call(obj->smart.parent, type, event_info, event_id);
263 }
264 }
265 _evas_unwalk(e);
266}
267
268static int
269_callback_priority_cmp(const void *_a, const void *_b)
270{
271 const Evas_Func_Node *a, *b;
272 a = EINA_INLIST_CONTAINER_GET(_a, Evas_Func_Node);
273 b = EINA_INLIST_CONTAINER_GET(_b, Evas_Func_Node);
274 if (a->priority < b->priority)
275 return -1;
276 else
277 return 1;
278}
279
280EAPI void
281evas_object_event_callback_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
282{
283 evas_object_event_callback_priority_add(obj, type,
284 EVAS_CALLBACK_PRIORITY_DEFAULT, func, data);
285}
286
287EAPI void
288evas_object_event_callback_priority_add(Evas_Object *obj, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Object_Event_Cb func, const void *data)
289{
290 /* MEM OK */
291 Evas_Func_Node *fn;
292
293 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
294 return;
295 MAGIC_CHECK_END();
296
297 if (!func) return;
298
299 if (!obj->callbacks)
300 {
301 EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, );
302 obj->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks);
303 if (!obj->callbacks) return;
304 EVAS_MEMPOOL_PREP(_mp_cb, obj->callbacks, Evas_Callbacks);
305 }
306
307 EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, );
308 fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node);
309 if (!fn) return;
310 EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node);
311 fn->func = func;
312 fn->data = (void *)data;
313 fn->type = type;
314 fn->priority = priority;
315
316 obj->callbacks->callbacks =
317 eina_inlist_sorted_insert(obj->callbacks->callbacks, EINA_INLIST_GET(fn),
318 _callback_priority_cmp);
319}
320
321EAPI void *
322evas_object_event_callback_del(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func)
323{
324 /* MEM OK */
325 Evas_Func_Node *fn;
326
327 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
328 return NULL;
329 MAGIC_CHECK_END();
330
331 if (!func) return NULL;
332
333 if (!obj->callbacks) return NULL;
334
335 EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn)
336 {
337 if ((fn->func == func) && (fn->type == type) && (!fn->delete_me))
338 {
339 void *tmp;
340
341 tmp = fn->data;
342 fn->delete_me = 1;
343 obj->callbacks->deletions_waiting = 1;
344 if (!obj->callbacks->walking_list)
345 evas_object_event_callback_clear(obj);
346 return tmp;
347 }
348 }
349 return NULL;
350}
351
352EAPI void *
353evas_object_event_callback_del_full(Evas_Object *obj, Evas_Callback_Type type, Evas_Object_Event_Cb func, const void *data)
354{
355 /* MEM OK */
356 Evas_Func_Node *fn;
357
358 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
359 return NULL;
360 MAGIC_CHECK_END();
361
362 if (!func) return NULL;
363
364 if (!obj->callbacks) return NULL;
365
366 EINA_INLIST_FOREACH(obj->callbacks->callbacks, fn)
367 {
368 if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me))
369 {
370 void *tmp;
371
372 tmp = fn->data;
373 fn->delete_me = 1;
374 obj->callbacks->deletions_waiting = 1;
375 if (!obj->callbacks->walking_list)
376 evas_object_event_callback_clear(obj);
377 return tmp;
378 }
379 }
380 return NULL;
381}
382
383EAPI void
384evas_event_callback_add(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
385{
386 evas_event_callback_priority_add(e, type, EVAS_CALLBACK_PRIORITY_DEFAULT,
387 func, data);
388}
389
390EAPI void
391evas_event_callback_priority_add(Evas *e, Evas_Callback_Type type, Evas_Callback_Priority priority, Evas_Event_Cb func, const void *data)
392{
393 /* MEM OK */
394 Evas_Func_Node *fn;
395
396 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
397 return;
398 MAGIC_CHECK_END();
399
400 if (!func) return;
401
402 if (!e->callbacks)
403 {
404 EVAS_MEMPOOL_INIT(_mp_cb, "evas_callbacks", Evas_Callbacks, 512, );
405 e->callbacks = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Callbacks);
406 if (!e->callbacks) return;
407 EVAS_MEMPOOL_PREP(_mp_cb, e->callbacks, Evas_Callbacks);
408 }
409
410 EVAS_MEMPOOL_INIT(_mp_fn, "evas_func_node", Evas_Func_Node, 2048, );
411 fn = EVAS_MEMPOOL_ALLOC(_mp_fn, Evas_Func_Node);
412 if (!fn) return;
413 EVAS_MEMPOOL_PREP(_mp_fn, fn, Evas_Func_Node);
414 fn->func = func;
415 fn->data = (void *)data;
416 fn->type = type;
417 fn->priority = priority;
418
419 e->callbacks->callbacks = eina_inlist_sorted_insert(e->callbacks->callbacks,
420 EINA_INLIST_GET(fn), _callback_priority_cmp);
421}
422
423EAPI void *
424evas_event_callback_del(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func)
425{
426 /* MEM OK */
427 Evas_Func_Node *fn;
428
429 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
430 return NULL;
431 MAGIC_CHECK_END();
432
433 if (!func) return NULL;
434
435 if (!e->callbacks) return NULL;
436
437 EINA_INLIST_FOREACH(e->callbacks->callbacks, fn)
438 {
439 if ((fn->func == func) && (fn->type == type) && (!fn->delete_me))
440 {
441 void *data;
442
443 data = fn->data;
444 fn->delete_me = 1;
445 e->callbacks->deletions_waiting = 1;
446 if (!e->callbacks->walking_list)
447 evas_event_callback_clear(e);
448 return data;
449 }
450 }
451 return NULL;
452}
453
454EAPI void *
455evas_event_callback_del_full(Evas *e, Evas_Callback_Type type, Evas_Event_Cb func, const void *data)
456{
457 /* MEM OK */
458 Evas_Func_Node *fn;
459
460 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
461 return NULL;
462 MAGIC_CHECK_END();
463
464 if (!func) return NULL;
465
466 if (!e->callbacks) return NULL;
467
468 EINA_INLIST_FOREACH(e->callbacks->callbacks, fn)
469 {
470 if ((fn->func == func) && (fn->type == type) && (fn->data == data) && (!fn->delete_me))
471 {
472 void *tmp;
473
474 tmp = fn->data;
475 fn->delete_me = 1;
476 e->callbacks->deletions_waiting = 1;
477 if (!e->callbacks->walking_list)
478 evas_event_callback_clear(e);
479 return tmp;
480 }
481 }
482 return NULL;
483}
484
485EAPI void
486evas_post_event_callback_push(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
487{
488 Evas_Post_Callback *pc;
489
490 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
491 return;
492 MAGIC_CHECK_END();
493
494 EVAS_MEMPOOL_INIT(_mp_pc, "evas_post_callback", Evas_Post_Callback, 64, );
495 pc = EVAS_MEMPOOL_ALLOC(_mp_pc, Evas_Post_Callback);
496 if (!pc) return;
497 EVAS_MEMPOOL_PREP(_mp_pc, pc, Evas_Post_Callback);
498 if (e->delete_me) return;
499
500 pc->func = func;
501 pc->data = data;
502 e->post_events = eina_list_prepend(e->post_events, pc);
503}
504
505EAPI void
506evas_post_event_callback_remove(Evas *e, Evas_Object_Event_Post_Cb func)
507{
508 Evas_Post_Callback *pc;
509 Eina_List *l;
510
511 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
512 return;
513 MAGIC_CHECK_END();
514
515 EINA_LIST_FOREACH(e->post_events, l, pc)
516 {
517 if (pc->func == func)
518 {
519 pc->delete_me = 1;
520 return;
521 }
522 }
523}
524
525EAPI void
526evas_post_event_callback_remove_full(Evas *e, Evas_Object_Event_Post_Cb func, const void *data)
527{
528 Evas_Post_Callback *pc;
529 Eina_List *l;
530
531 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
532 return;
533 MAGIC_CHECK_END();
534
535 EINA_LIST_FOREACH(e->post_events, l, pc)
536 {
537 if ((pc->func == func) && (pc->data == data))
538 {
539 pc->delete_me = 1;
540 return;
541 }
542 }
543}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4void
5evas_object_clip_dirty(Evas_Object *obj)
6{
7 Eina_List *l;
8 Evas_Object *data;
9
10 if (obj->cur.cache.clip.dirty) return ;
11
12 obj->cur.cache.clip.dirty = 1;
13 EINA_LIST_FOREACH(obj->clip.clipees, l, data)
14 evas_object_clip_dirty(data);
15}
16
17void
18evas_object_recalc_clippees(Evas_Object *obj)
19{
20 Eina_List *l;
21 Evas_Object *data;
22
23 if (obj->cur.cache.clip.dirty)
24 {
25 evas_object_clip_recalc(obj);
26 EINA_LIST_FOREACH(obj->clip.clipees, l, data)
27 evas_object_recalc_clippees(data);
28 }
29}
30
31int
32evas_object_clippers_was_visible(Evas_Object *obj)
33{
34 if (obj->prev.visible)
35 {
36 if (obj->prev.clipper)
37 return evas_object_clippers_is_visible(obj->prev.clipper);
38 return 1;
39 }
40 return 0;
41}
42
43/* aaaaargh (pirate voice) ... notes!
44 *
45 * we have a big problem until now that's gone undetected... until yesterday.
46 * that problem involves clips and maps and smart objects. hooray! 3 of the
47 * more complex bits of evas - and maps and smart objects being one of the
48 * nastiest ones.
49 *
50 * what is the problem? when a clip crosses a map boundary. that is to say
51 * that when the clipper and clippee are not within the child tree of the
52 * mapped object. in this case "bad stuff" happens. basically as clips are
53 * then used to render objects, but they no longer apply as you'd expect as
54 * the map transfomr the objects to-be-clipped separately from the objects
55 * that clip them and this whole relationship is broken by maps. it somehow
56 * managed to not break with the advent of smart objects. lucky me... but
57 * maps killed it. now... what do we do? that is a good question. detect
58 * such a broken link and "turn off clipping" in that event - sure. but this
59 * isn't going to be cheap as ANY addition or deletion of a map to an object
60 * or any change in clipper of an object or any change in smart object
61 * membership needs to walk the obj tree both up and down from the changed
62 * object and probably walk entire object trees to find these and mark them.
63 * thats silly-expensive and i was about to fix it that way but it has since
64 * dawned on me that that is just going to kill performance in some critical
65 * areas like during object setup and manipulation, as well as teardown.
66 *
67 * aaaaagh! best for now is to document this as a "don't do it damnit!" thing
68 * and have the apps avoid it. but even then - how to do this? this is not
69 * easy. everywhere i turn so far i come up to either expensive operations,
70 * breaks in logic, or nasty re-work of apps or4 the whole concept of clipping,
71 * smart objects and maps... and that will have to wait for evas 2.0
72 *
73 * the below does clip fixups etc. in the even a clip spans a map boundary.
74 * not pretty, but necessary.
75 */
76
77#define MAP_ACROSS 1
78static void
79evas_object_child_map_across_mark(Evas_Object *obj, Evas_Object *map_obj, Eina_Bool force)
80{
81#ifdef MAP_ACROSS
82 if ((obj->cur.map_parent != map_obj) || force)
83 {
84 obj->cur.map_parent = map_obj;
85 obj->cur.cache.clip.dirty = 1;
86 evas_object_clip_recalc(obj);
87 if (obj->smart.smart)
88 {
89 Evas_Object *obj2;
90
91 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
92 {
93 // if obj has its own map - skip it. already done
94 if ((obj2->cur.map) && (obj2->cur.usemap)) continue;
95 evas_object_child_map_across_mark(obj2, map_obj, force);
96 }
97 }
98 else if (obj->clip.clipees)
99 {
100 Eina_List *l;
101 Evas_Object *obj2;
102
103 EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
104 evas_object_child_map_across_mark(obj2, map_obj, force);
105 }
106 }
107#endif
108}
109
110void
111evas_object_clip_across_check(Evas_Object *obj)
112{
113#ifdef MAP_ACROSS
114 if (!obj->cur.clipper) return;
115 if (obj->cur.clipper->cur.map_parent != obj->cur.map_parent)
116 evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1);
117#endif
118}
119
120void
121evas_object_clip_across_clippees_check(Evas_Object *obj)
122{
123#ifdef MAP_ACROSS
124 Eina_List *l;
125 Evas_Object *obj2;
126
127 if (!obj->clip.clipees) return;
128// schloooooooooooow:
129// evas_object_child_map_across_mark(obj, obj->cur.map_parent, 1);
130// buggy:
131 evas_object_child_map_across_mark(obj, obj->cur.map_parent, 0);
132 if (obj->cur.cache.clip.dirty)
133 {
134 EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
135 evas_object_clip_across_clippees_check(obj2);
136 }
137#endif
138}
139
140// this function is called on an object when map is enabled or disabled on it
141// thus creating a "map boundary" at that point.
142//
143// FIXME: flip2 test broken in elm - might be show/hide of clips
144void
145evas_object_mapped_clip_across_mark(Evas_Object *obj)
146{
147#ifdef MAP_ACROSS
148 if ((obj->cur.map) && (obj->cur.usemap))
149 evas_object_child_map_across_mark(obj, obj, 0);
150 else
151 {
152 if (obj->smart.parent)
153 evas_object_child_map_across_mark
154 (obj, obj->smart.parent->cur.map_parent, 0);
155 else
156 evas_object_child_map_across_mark(obj, NULL, 0);
157 }
158#endif
159}
160
161/* public functions */
162extern const char *o_rect_type;
163
164EAPI void
165evas_object_clip_set(Evas_Object *obj, Evas_Object *clip)
166{
167 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
168 return;
169 MAGIC_CHECK_END();
170 if (!clip)
171 {
172 evas_object_clip_unset(obj);
173 return;
174 }
175 MAGIC_CHECK(clip, Evas_Object, MAGIC_OBJ);
176 return;
177 MAGIC_CHECK_END();
178 if (obj->cur.clipper == clip) return;
179 if (obj == clip) return;
180 if (evas_object_intercept_call_clip_set(obj, clip)) return;
181 // illegal to set anything but a rect as a clip
182 if (clip->type != o_rect_type)
183 {
184 ERR("For now a clip on other object than a rectangle is disabled");
185 return;
186 }
187 if (obj->smart.smart)
188 {
189 if (obj->smart.smart->smart_class->clip_set)
190 obj->smart.smart->smart_class->clip_set(obj, clip);
191 }
192 if (obj->cur.clipper)
193 {
194 /* unclip */
195 obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj);
196 if (!obj->cur.clipper->clip.clipees)
197 {
198 obj->cur.clipper->cur.have_clipees = 0;
199 if (obj->cur.clipper->cur.visible)
200 evas_damage_rectangle_add(obj->cur.clipper->layer->evas,
201 obj->cur.clipper->cur.geometry.x,
202 obj->cur.clipper->cur.geometry.y,
203 obj->cur.clipper->cur.geometry.w,
204 obj->cur.clipper->cur.geometry.h);
205 }
206 evas_object_change(obj->cur.clipper);
207 evas_object_change(obj);
208 obj->cur.clipper = NULL;
209 }
210 /* clip me */
211 if ((!clip->clip.clipees) && (clip->cur.visible))
212 {
213 /* Basically it just went invisible */
214 clip->changed = 1;
215 clip->layer->evas->changed = 1;
216 evas_damage_rectangle_add(clip->layer->evas,
217 clip->cur.geometry.x, clip->cur.geometry.y,
218 clip->cur.geometry.w, clip->cur.geometry.h);
219 }
220 obj->cur.clipper = clip;
221 clip->clip.clipees = eina_list_append(clip->clip.clipees, obj);
222 if (clip->clip.clipees) clip->cur.have_clipees = 1;
223
224 /* If it's NOT a rectangle set the mask bits too */
225 /* FIXME: Optmz ths chck */
226 if (strcmp(evas_object_type_get(clip),"rectangle") == 0)
227 obj->cur.mask = NULL;
228 else
229 {
230 void *engdata;
231 obj->cur.mask = clip;
232 engdata = clip->func->engine_data_get(clip);
233 /* FIXME: Images only */
234 clip->layer->evas->engine.func->image_mask_create(
235 clip->layer->evas->engine.data.output,
236 engdata);
237 }
238 evas_object_change(clip);
239 evas_object_change(obj);
240 evas_object_clip_dirty(obj);
241 evas_object_recalc_clippees(obj);
242 if ((!obj->smart.smart) &&
243 (!((obj->cur.map) && (obj->cur.usemap))))
244 {
245 if (evas_object_is_in_output_rect(obj,
246 obj->layer->evas->pointer.x,
247 obj->layer->evas->pointer.y, 1, 1))
248 evas_event_feed_mouse_move(obj->layer->evas,
249 obj->layer->evas->pointer.x,
250 obj->layer->evas->pointer.y,
251 obj->layer->evas->last_timestamp,
252 NULL);
253 }
254 evas_object_clip_across_check(obj);
255}
256
257EAPI Evas_Object *
258evas_object_clip_get(const Evas_Object *obj)
259{
260 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
261 return NULL;
262 MAGIC_CHECK_END();
263 return obj->cur.clipper;
264}
265
266EAPI void
267evas_object_clip_unset(Evas_Object *obj)
268{
269 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
270 return;
271 MAGIC_CHECK_END();
272 if (!obj->cur.clipper) return;
273 /* unclip */
274 if (evas_object_intercept_call_clip_unset(obj)) return;
275 if (obj->smart.smart)
276 {
277 if (obj->smart.smart->smart_class->clip_unset)
278 obj->smart.smart->smart_class->clip_unset(obj);
279 }
280 if (obj->cur.clipper)
281 {
282 obj->cur.clipper->clip.clipees = eina_list_remove(obj->cur.clipper->clip.clipees, obj);
283 if (!obj->cur.clipper->clip.clipees)
284 {
285 obj->cur.clipper->cur.have_clipees = 0;
286 if (obj->cur.clipper->cur.visible)
287 evas_damage_rectangle_add(obj->cur.clipper->layer->evas,
288 obj->cur.clipper->cur.geometry.x,
289 obj->cur.clipper->cur.geometry.y,
290 obj->cur.clipper->cur.geometry.w,
291 obj->cur.clipper->cur.geometry.h);
292 }
293 evas_object_change(obj->cur.clipper);
294 }
295 obj->cur.clipper = NULL;
296 evas_object_change(obj);
297 evas_object_clip_dirty(obj);
298 evas_object_recalc_clippees(obj);
299 if ((!obj->smart.smart) &&
300 (!((obj->cur.map) && (obj->cur.usemap))))
301 {
302 if (evas_object_is_in_output_rect(obj,
303 obj->layer->evas->pointer.x,
304 obj->layer->evas->pointer.y, 1, 1))
305 evas_event_feed_mouse_move(obj->layer->evas,
306 obj->layer->evas->pointer.x,
307 obj->layer->evas->pointer.y,
308 obj->layer->evas->last_timestamp,
309 NULL);
310 }
311 evas_object_clip_across_check(obj);
312}
313
314EAPI const Eina_List *
315evas_object_clipees_get(const Evas_Object *obj)
316{
317 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
318 return NULL;
319 MAGIC_CHECK_END();
320 return obj->clip.clipees;
321}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4
5EAPI void
6evas_object_data_set(Evas_Object *obj, const char *key, const void *data)
7{
8 Evas_Data_Node *node;
9
10 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
11 return;
12 MAGIC_CHECK_END();
13 if (!key) return;
14
15 evas_object_data_del(obj, key);
16 if (!data) return;
17 node = malloc(sizeof(Evas_Data_Node) + strlen(key) + 1);
18 node->key = (char *)node + sizeof(Evas_Data_Node);
19 strcpy(node->key, key);
20 node->data = (void *)data;
21 obj->data.elements = eina_list_prepend(obj->data.elements, node);
22}
23
24EAPI void *
25evas_object_data_get(const Evas_Object *obj, const char *key)
26{
27 Eina_List *l;
28 Evas_Data_Node *node;
29
30 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
31 return NULL;
32 MAGIC_CHECK_END();
33 if (!key) return NULL;
34
35 EINA_LIST_FOREACH(obj->data.elements, l, node)
36 {
37 if (!strcmp(node->key, key))
38 {
39 Eina_List *lst;
40 lst = obj->data.elements;
41 lst = eina_list_promote_list(lst, l);
42 ((Evas_Object *)obj)->data.elements = lst;
43 return node->data;
44 }
45 }
46 return NULL;
47}
48
49EAPI void *
50evas_object_data_del(Evas_Object *obj, const char *key)
51{
52 Eina_List *l;
53 Evas_Data_Node *node;
54
55 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
56 return NULL;
57 MAGIC_CHECK_END();
58 if (!key) return NULL;
59 EINA_LIST_FOREACH(obj->data.elements, l, node)
60 {
61 if (!strcmp(node->key, key))
62 {
63 void *data;
64
65 data = node->data;
66 obj->data.elements = eina_list_remove_list(obj->data.elements, l);
67 free(node);
68 return data;
69 }
70 }
71 return NULL;
72}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4static Eina_List *
5_evas_event_object_list_in_get(Evas *e, Eina_List *in,
6 const Eina_Inlist *list, Evas_Object *stop,
7 int x, int y, int *no_rep);
8
9static void
10_evas_event_havemap_adjust(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Eina_Bool mouse_grabbed)
11{
12 if (obj->smart.parent)
13 _evas_event_havemap_adjust(obj->smart.parent, x, y, mouse_grabbed);
14
15 if ((!obj->cur.usemap) || (!obj->cur.map) || (!obj->cur.map->count == 4))
16 return;
17
18 evas_map_coords_get(obj->cur.map, *x, *y, x, y, mouse_grabbed);
19 *x += obj->cur.geometry.x;
20 *y += obj->cur.geometry.y;
21}
22
23static Eina_List *
24_evas_event_object_list_raw_in_get(Evas *e, Eina_List *in,
25 const Eina_Inlist *list, Evas_Object *stop,
26 int x, int y, int *no_rep)
27{
28 Evas_Object *obj;
29 int inside;
30
31 if (!list) return in;
32 for (obj = _EINA_INLIST_CONTAINER(obj, list);
33 obj;
34 obj = _EINA_INLIST_CONTAINER(obj, EINA_INLIST_GET(obj)->prev))
35 {
36 if (obj == stop)
37 {
38 *no_rep = 1;
39 return in;
40 }
41 if (evas_event_passes_through(obj)) continue;
42 if ((obj->cur.visible) && (obj->delete_me == 0) &&
43 (!obj->clip.clipees) &&
44 (evas_object_clippers_is_visible(obj)))
45 {
46 if (obj->smart.smart)
47 {
48 int norep = 0;
49
50 if ((obj->cur.usemap) && (obj->cur.map) &&
51 (obj->cur.map->count == 4))
52 {
53 inside = evas_object_is_in_output_rect(obj, x, y, 1, 1);
54 if (inside)
55 {
56 if (!evas_map_coords_get(obj->cur.map, x, y,
57 &(obj->cur.map->mx),
58 &(obj->cur.map->my), 0))
59 {
60 inside = 0;
61 }
62 else
63 {
64 in = _evas_event_object_list_in_get
65 (e, in,
66 evas_object_smart_members_get_direct(obj),
67 stop,
68 obj->cur.geometry.x + obj->cur.map->mx,
69 obj->cur.geometry.y + obj->cur.map->my,
70 &norep);
71 }
72 }
73 }
74 else
75 {
76 in = _evas_event_object_list_in_get
77 (e, in, evas_object_smart_members_get_direct(obj),
78 stop, x, y, &norep);
79 }
80 if (norep)
81 {
82 if (!obj->repeat_events)
83 {
84 *no_rep = 1;
85 return in;
86 }
87 }
88 }
89 else
90 {
91 inside = evas_object_is_in_output_rect(obj, x, y, 1, 1);
92
93 if ((obj->cur.usemap) && (obj->cur.map) &&
94 (obj->cur.map->count == 4))
95 {
96 if ((inside) &&
97 (!evas_map_coords_get(obj->cur.map, x, y,
98 &(obj->cur.map->mx),
99 &(obj->cur.map->my), 0)))
100 {
101 inside = 0;
102 }
103 }
104
105 if (inside && ((!obj->precise_is_inside) ||
106 (evas_object_is_inside(obj, x, y))))
107 {
108 if (!evas_event_freezes_through(obj))
109 in = eina_list_append(in, obj);
110 if (!obj->repeat_events)
111 {
112 *no_rep = 1;
113 return in;
114 }
115 }
116 }
117 }
118 }
119 *no_rep = 0;
120 return in;
121}
122
123static Eina_List *
124_evas_event_object_list_in_get(Evas *e, Eina_List *in,
125 const Eina_Inlist *list, Evas_Object *stop,
126 int x, int y, int *no_rep)
127{
128 if (!list) return NULL;
129 return _evas_event_object_list_raw_in_get(e, in, list->last, stop,
130 x, y, no_rep);
131}
132
133Eina_List *
134evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y)
135{
136 Evas_Layer *lay;
137 Eina_List *in = NULL;
138
139 if ((!e->layers) || (e->events_frozen > 0)) return NULL;
140 EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
141 {
142 int norep = 0;
143 in = _evas_event_object_list_in_get(e, in,
144 EINA_INLIST_GET(lay->objects),
145 stop, x, y, &norep);
146 if (norep) return in;
147 }
148 return in;
149}
150
151static Eina_List *
152evas_event_list_copy(Eina_List *list)
153{
154 Eina_List *l, *new_l = NULL;
155 const void *data;
156
157 EINA_LIST_FOREACH(list, l, data)
158 new_l = eina_list_append(new_l, data);
159 return new_l;
160}
161/* public functions */
162
163EAPI void
164evas_event_default_flags_set(Evas *e, Evas_Event_Flags flags)
165{
166 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
167 return;
168 MAGIC_CHECK_END();
169 e->default_event_flags = flags;
170}
171
172EAPI Evas_Event_Flags
173evas_event_default_flags_get(const Evas *e)
174{
175 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
176 return EVAS_EVENT_FLAG_ON_HOLD;
177 MAGIC_CHECK_END();
178 return e->default_event_flags;
179}
180
181EAPI void
182evas_event_freeze(Evas *e)
183{
184 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
185 return;
186 MAGIC_CHECK_END();
187 e->events_frozen++;
188}
189
190EAPI void
191evas_event_thaw(Evas *e)
192{
193 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
194 return;
195 MAGIC_CHECK_END();
196 e->events_frozen--;
197 if (e->events_frozen == 0)
198 {
199 Evas_Layer *lay;
200
201 EINA_INLIST_FOREACH((EINA_INLIST_GET(e->layers)), lay)
202 {
203 Evas_Object *obj;
204
205 EINA_INLIST_FOREACH(lay->objects, obj)
206 {
207 evas_object_clip_recalc(obj);
208 evas_object_recalc_clippees(obj);
209 }
210 }
211 }
212 if (e->events_frozen < 0)
213 evas_debug_generic(" Thaw of events when already thawed!!!\n");
214}
215
216EAPI int
217evas_event_freeze_get(const Evas *e)
218{
219 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
220 return 0;
221 MAGIC_CHECK_END();
222 return e->events_frozen;
223}
224
225EAPI void
226evas_event_thaw_eval(Evas *e)
227{
228 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
229 return;
230 MAGIC_CHECK_END();
231 if (e->events_frozen != 0) return;
232
233 evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y,
234 e->last_timestamp, NULL);
235}
236
237EAPI void
238evas_event_feed_mouse_down(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
239{
240 Eina_List *l, *copy;
241 Evas_Event_Mouse_Down ev;
242 Evas_Object *obj;
243 int addgrab = 0;
244 int event_id = 0;
245
246 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
247 return;
248 MAGIC_CHECK_END();
249
250 if ((b < 1) || (b > 32)) return;
251
252 e->pointer.button |= (1 << (b - 1));
253 e->pointer.downs++;
254
255 if (e->events_frozen > 0) return;
256 e->last_timestamp = timestamp;
257
258 _evas_object_event_new();
259
260 event_id = _evas_event_counter;
261 ev.button = b;
262 ev.output.x = e->pointer.x;
263 ev.output.y = e->pointer.y;
264 ev.canvas.x = e->pointer.x;
265 ev.canvas.y = e->pointer.y;
266 ev.data = (void *)data;
267 ev.modifiers = &(e->modifiers);
268 ev.locks = &(e->locks);
269 ev.flags = flags;
270 ev.timestamp = timestamp;
271 ev.event_flags = e->default_event_flags;
272
273 _evas_walk(e);
274 /* append new touch point to the touch point list */
275 _evas_touch_point_append(e, 0, e->pointer.x, e->pointer.y);
276 /* If this is the first finger down, i.e no other fingers pressed,
277 * get a new event list, otherwise, keep the current grabbed list. */
278 if (e->pointer.mouse_grabbed == 0)
279 {
280 Eina_List *ins = evas_event_objects_event_list(e,
281 NULL,
282 e->pointer.x,
283 e->pointer.y);
284 /* free our old list of ins */
285 e->pointer.object.in = eina_list_free(e->pointer.object.in);
286 /* and set up the new one */
287 e->pointer.object.in = ins;
288 /* adjust grabbed count by the nuymber of currently held down
289 * fingers/buttons */
290 if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1;
291 }
292 copy = evas_event_list_copy(e->pointer.object.in);
293 EINA_LIST_FOREACH(copy, l, obj)
294 {
295 if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
296 (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN))
297 {
298 obj->mouse_grabbed += addgrab + 1;
299 e->pointer.mouse_grabbed += addgrab + 1;
300 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
301 {
302 e->pointer.nogrep++;
303 break;
304 }
305 }
306 }
307 EINA_LIST_FOREACH(copy, l, obj)
308 {
309 if (obj->delete_me) continue;
310 ev.canvas.x = e->pointer.x;
311 ev.canvas.y = e->pointer.y;
312 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
313
314 if (e->events_frozen <= 0)
315 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_DOWN, &ev, event_id);
316 if (e->delete_me) break;
317 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
318 break;
319 }
320 if (copy) eina_list_free(copy);
321 e->last_mouse_down_counter++;
322 _evas_post_event_callback_call(e);
323 /* update touch point's state to EVAS_TOUCH_POINT_STILL */
324 _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_STILL);
325 _evas_unwalk(e);
326}
327
328static int
329_post_up_handle(Evas *e, unsigned int timestamp, const void *data)
330{
331 Eina_List *l, *copy, *ins, *ll;
332 Evas_Event_Mouse_Out ev;
333 Evas_Object *obj;
334 int post_called = 0;
335 int event_id = 0;
336
337 _evas_object_event_new();
338
339 event_id = _evas_event_counter;
340 ev.buttons = e->pointer.button;
341 ev.output.x = e->pointer.x;
342 ev.output.y = e->pointer.y;
343 ev.canvas.x = e->pointer.x;
344 ev.canvas.y = e->pointer.y;
345 ev.data = (void *)data;
346 ev.modifiers = &(e->modifiers);
347 ev.locks = &(e->locks);
348 ev.timestamp = timestamp;
349 ev.event_flags = e->default_event_flags;
350
351 /* get new list of ins */
352 ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
353 /* go thru old list of in objects */
354 copy = evas_event_list_copy(e->pointer.object.in);
355 EINA_LIST_FOREACH(copy, ll, obj)
356 {
357 ev.canvas.x = e->pointer.x;
358 ev.canvas.y = e->pointer.y;
359 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
360 if ((!eina_list_data_find(ins, obj)) ||
361 (!e->pointer.inside))
362 {
363 if (obj->mouse_in)
364 {
365 obj->mouse_in = 0;
366 if (e->events_frozen <= 0)
367 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
368 }
369 }
370 if (e->delete_me) break;
371 }
372 _evas_post_event_callback_call(e);
373
374 if (copy) copy = eina_list_free(copy);
375 if (e->pointer.inside)
376 {
377 Evas_Event_Mouse_In ev_in;
378 Evas_Object *obj_itr;
379
380 _evas_object_event_new();
381
382 event_id = _evas_event_counter;
383 ev_in.buttons = e->pointer.button;
384 ev_in.output.x = e->pointer.x;
385 ev_in.output.y = e->pointer.y;
386 ev_in.canvas.x = e->pointer.x;
387 ev_in.canvas.y = e->pointer.y;
388 ev_in.data = (void *)data;
389 ev_in.modifiers = &(e->modifiers);
390 ev_in.locks = &(e->locks);
391 ev_in.timestamp = timestamp;
392 ev_in.event_flags = e->default_event_flags;
393
394 EINA_LIST_FOREACH(ins, l, obj_itr)
395 {
396 ev_in.canvas.x = e->pointer.x;
397 ev_in.canvas.y = e->pointer.y;
398 _evas_event_havemap_adjust(obj_itr, &ev_in.canvas.x, &ev_in.canvas.y, obj_itr->mouse_grabbed);
399 if (!eina_list_data_find(e->pointer.object.in, obj_itr))
400 {
401 if (!obj_itr->mouse_in)
402 {
403 obj_itr->mouse_in = 1;
404 if (e->events_frozen <= 0)
405 evas_object_event_callback_call(obj_itr, EVAS_CALLBACK_MOUSE_IN, &ev_in, event_id);
406 }
407 }
408 if (e->delete_me) break;
409 }
410 post_called = 1;
411 _evas_post_event_callback_call(e);
412 }
413 else
414 {
415 ins = eina_list_free(ins);
416 }
417
418 if (e->pointer.mouse_grabbed == 0)
419 {
420 /* free our old list of ins */
421 eina_list_free(e->pointer.object.in);
422 /* and set up the new one */
423 e->pointer.object.in = ins;
424 }
425 else
426 {
427 /* free our cur ins */
428 eina_list_free(ins);
429 }
430 if (e->pointer.inside)
431 evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
432 return post_called;
433}
434
435EAPI void
436evas_event_feed_mouse_up(Evas *e, int b, Evas_Button_Flags flags, unsigned int timestamp, const void *data)
437{
438 Eina_List *l, *copy;
439
440 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
441 return;
442 MAGIC_CHECK_END();
443
444 if ((b < 1) || (b > 32)) return;
445
446 e->pointer.button &= ~(1 << (b - 1));
447 e->pointer.downs--;
448
449 if (e->events_frozen > 0) return;
450 e->last_timestamp = timestamp;
451
452 {
453 Evas_Event_Mouse_Up ev;
454 Evas_Object *obj;
455 int event_id = 0;
456
457 _evas_object_event_new();
458
459 event_id = _evas_event_counter;
460 ev.button = b;
461 ev.output.x = e->pointer.x;
462 ev.output.y = e->pointer.y;
463 ev.canvas.x = e->pointer.x;
464 ev.canvas.y = e->pointer.y;
465 ev.data = (void *)data;
466 ev.modifiers = &(e->modifiers);
467 ev.locks = &(e->locks);
468 ev.flags = flags;
469 ev.timestamp = timestamp;
470 ev.event_flags = e->default_event_flags;
471
472 _evas_walk(e);
473 /* update released touch point */
474 _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_UP);
475 copy = evas_event_list_copy(e->pointer.object.in);
476 EINA_LIST_FOREACH(copy, l, obj)
477 {
478 ev.canvas.x = e->pointer.x;
479 ev.canvas.y = e->pointer.y;
480 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
481 if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) &&
482 (obj->mouse_grabbed > 0))
483 {
484 obj->mouse_grabbed--;
485 e->pointer.mouse_grabbed--;
486 }
487 if (!obj->delete_me)
488 {
489 if ((e->events_frozen <= 0) &&
490 (!evas_event_freezes_through(obj)))
491 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_UP, &ev, event_id);
492 }
493 if (e->delete_me) break;
494 if (obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)
495 {
496 if (e->pointer.nogrep > 0) e->pointer.nogrep--;
497 break;
498 }
499 }
500 if (copy) copy = eina_list_free(copy);
501 e->last_mouse_up_counter++;
502 _evas_post_event_callback_call(e);
503 }
504
505 if (e->pointer.mouse_grabbed == 0)
506 {
507 _post_up_handle(e, timestamp, data);
508 }
509
510 if (e->pointer.mouse_grabbed < 0)
511 {
512 ERR("BUG? e->pointer.mouse_grabbed (=%d) < 0!",
513 e->pointer.mouse_grabbed);
514 }
515 /* remove released touch point from the touch point list */
516 _evas_touch_point_remove(e, 0);
517
518 _evas_unwalk(e);
519}
520
521EAPI void
522evas_event_feed_mouse_cancel(Evas *e, unsigned int timestamp, const void *data)
523{
524 int i;
525
526 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
527 return;
528 MAGIC_CHECK_END();
529
530 if (e->events_frozen > 0) return;
531
532 _evas_walk(e);
533 for (i = 0; i < 32; i++)
534 {
535 if ((e->pointer.button & (1 << i)))
536 evas_event_feed_mouse_up(e, i + 1, 0, timestamp, data);
537 }
538 // FIXME: multi cancel too?
539 _evas_unwalk(e);
540}
541
542EAPI void
543evas_event_feed_mouse_wheel(Evas *e, int direction, int z, unsigned int timestamp, const void *data)
544{
545 Eina_List *l, *copy;
546 Evas_Event_Mouse_Wheel ev;
547 Evas_Object *obj;
548 int event_id = 0;
549
550 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
551 return;
552 MAGIC_CHECK_END();
553
554 if (e->events_frozen > 0) return;
555 e->last_timestamp = timestamp;
556
557 _evas_object_event_new();
558
559 event_id = _evas_event_counter;
560 ev.direction = direction;
561 ev.z = z;
562 ev.output.x = e->pointer.x;
563 ev.output.y = e->pointer.y;
564 ev.canvas.x = e->pointer.x;
565 ev.canvas.y = e->pointer.y;
566 ev.data = (void *) data;
567 ev.modifiers = &(e->modifiers);
568 ev.locks = &(e->locks);
569 ev.timestamp = timestamp;
570 ev.event_flags = e->default_event_flags;
571
572 _evas_walk(e);
573 copy = evas_event_list_copy(e->pointer.object.in);
574
575 EINA_LIST_FOREACH(copy, l, obj)
576 {
577 ev.canvas.x = e->pointer.x;
578 ev.canvas.y = e->pointer.y;
579 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
580 if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj))
581 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_WHEEL, &ev, event_id);
582 if (e->delete_me) break;
583 }
584 if (copy) copy = eina_list_free(copy);
585 _evas_post_event_callback_call(e);
586
587 _evas_unwalk(e);
588}
589
590EAPI void
591evas_event_feed_mouse_move(Evas *e, int x, int y, unsigned int timestamp, const void *data)
592{
593 Evas_Object *nogrep_obj = NULL;
594 int px, py;
595//// Evas_Coord pcx, pcy;
596
597 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
598 return;
599 MAGIC_CHECK_END();
600
601 px = e->pointer.x;
602 py = e->pointer.y;
603//// pcx = e->pointer.canvas_x;
604//// pcy = e->pointer.canvas_y;
605
606 if (e->events_frozen > 0) return;
607 e->last_timestamp = timestamp;
608
609 e->pointer.x = x;
610 e->pointer.y = y;
611//// e->pointer.canvas_x = x;
612//// e->pointer.canvas_y = y;
613//// e->pointer.canvas_x = evas_coord_screen_x_to_world(e, x);
614//// e->pointer.canvas_y = evas_coord_screen_y_to_world(e, y);
615 if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return;
616 _evas_walk(e);
617 /* update moved touch point */
618 if ((px != x) || (py != y))
619 _evas_touch_point_update(e, 0, e->pointer.x, e->pointer.y, EVAS_TOUCH_POINT_MOVE);
620 /* if our mouse button is grabbed to any objects */
621 if (e->pointer.mouse_grabbed > 0)
622 {
623 /* go thru old list of in objects */
624 Eina_List *outs = NULL;
625 Eina_List *l, *copy;
626
627 {
628 Evas_Event_Mouse_Move ev;
629 Evas_Object *obj;
630 int event_id = 0;
631
632 _evas_object_event_new();
633
634 event_id = _evas_event_counter;
635 ev.buttons = e->pointer.button;
636 ev.cur.output.x = e->pointer.x;
637 ev.cur.output.y = e->pointer.y;
638 ev.cur.canvas.x = e->pointer.x;
639 ev.cur.canvas.y = e->pointer.y;
640 ev.prev.output.x = px;
641 ev.prev.output.y = py;
642 ev.prev.canvas.x = px;
643 ev.prev.canvas.y = py;
644 ev.data = (void *)data;
645 ev.modifiers = &(e->modifiers);
646 ev.locks = &(e->locks);
647 ev.timestamp = timestamp;
648 ev.event_flags = e->default_event_flags;
649 copy = evas_event_list_copy(e->pointer.object.in);
650 EINA_LIST_FOREACH(copy, l, obj)
651 {
652 ev.cur.canvas.x = e->pointer.x;
653 ev.cur.canvas.y = e->pointer.y;
654 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x,
655 &ev.cur.canvas.y,
656 obj->mouse_grabbed);
657 if ((e->events_frozen <= 0) &&
658 (evas_object_clippers_is_visible(obj) ||
659 obj->mouse_grabbed) &&
660 (!evas_event_passes_through(obj)) &&
661 (!evas_event_freezes_through(obj)) &&
662 (!obj->clip.clipees))
663 {
664 if ((px != x) || (py != y))
665 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
666 }
667 else
668 outs = eina_list_append(outs, obj);
669 if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN) &&
670 (e->pointer.nogrep > 0))
671 {
672 eina_list_free(copy);
673 nogrep_obj = obj;
674 goto nogrep;
675 }
676 if (e->delete_me) break;
677 }
678 _evas_post_event_callback_call(e);
679 }
680 {
681 Evas_Event_Mouse_Out ev;
682 int event_id = 0;
683
684 _evas_object_event_new();
685
686 event_id = _evas_event_counter;
687 ev.buttons = e->pointer.button;
688 ev.output.x = e->pointer.x;
689 ev.output.y = e->pointer.y;
690 ev.canvas.x = e->pointer.x;
691 ev.canvas.y = e->pointer.y;
692 ev.data = (void *)data;
693 ev.modifiers = &(e->modifiers);
694 ev.locks = &(e->locks);
695 ev.timestamp = timestamp;
696 ev.event_flags = e->default_event_flags;
697
698 if (copy) eina_list_free(copy);
699 while (outs)
700 {
701 Evas_Object *obj;
702
703 obj = outs->data;
704 outs = eina_list_remove(outs, obj);
705 if ((obj->mouse_grabbed == 0) && (!e->delete_me))
706 {
707 ev.canvas.x = e->pointer.x;
708 ev.canvas.y = e->pointer.y;
709 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
710 e->pointer.object.in = eina_list_remove(e->pointer.object.in, obj);
711 if (obj->mouse_in)
712 {
713 obj->mouse_in = 0;
714 if (!obj->delete_me)
715 {
716 if (e->events_frozen <= 0)
717 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
718 }
719 }
720 }
721 }
722 _evas_post_event_callback_call(e);
723 }
724 }
725 else
726 {
727 Eina_List *ins;
728 Eina_List *l, *copy;
729 Evas_Event_Mouse_Move ev;
730 Evas_Event_Mouse_Out ev2;
731 Evas_Event_Mouse_In ev3;
732 Evas_Object *obj;
733 int event_id = 0, event_id2 = 0;
734
735 _evas_object_event_new();
736
737 event_id = _evas_event_counter;
738 ev.buttons = e->pointer.button;
739 ev.cur.output.x = e->pointer.x;
740 ev.cur.output.y = e->pointer.y;
741 ev.cur.canvas.x = e->pointer.x;
742 ev.cur.canvas.y = e->pointer.y;
743 ev.prev.output.x = px;
744 ev.prev.output.y = py;
745 ev.prev.canvas.x = px;
746 ev.prev.canvas.y = py;
747 ev.data = (void *)data;
748 ev.modifiers = &(e->modifiers);
749 ev.locks = &(e->locks);
750 ev.timestamp = timestamp;
751 ev.event_flags = e->default_event_flags;
752
753 ev2.buttons = e->pointer.button;
754 ev2.output.x = e->pointer.x;
755 ev2.output.y = e->pointer.y;
756 ev2.canvas.x = e->pointer.x;
757 ev2.canvas.y = e->pointer.y;
758 ev2.data = (void *)data;
759 ev2.modifiers = &(e->modifiers);
760 ev2.locks = &(e->locks);
761 ev2.timestamp = timestamp;
762 ev2.event_flags = e->default_event_flags;
763
764 ev3.buttons = e->pointer.button;
765 ev3.output.x = e->pointer.x;
766 ev3.output.y = e->pointer.y;
767 ev3.canvas.x = e->pointer.x;
768 ev3.canvas.y = e->pointer.y;
769 ev3.data = (void *)data;
770 ev3.modifiers = &(e->modifiers);
771 ev3.locks = &(e->locks);
772 ev3.timestamp = timestamp;
773 ev3.event_flags = e->default_event_flags;
774
775 /* get all new in objects */
776 ins = evas_event_objects_event_list(e, NULL, x, y);
777 /* go thru old list of in objects */
778 copy = evas_event_list_copy(e->pointer.object.in);
779 EINA_LIST_FOREACH(copy, l, obj)
780 {
781 /* if its under the pointer and its visible and its in the new */
782 /* in list */
783 // FIXME: i don't think we need this
784 // evas_object_clip_recalc(obj);
785 if ((e->events_frozen <= 0) &&
786 evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
787 (evas_object_clippers_is_visible(obj) ||
788 obj->mouse_grabbed) &&
789 eina_list_data_find(ins, obj) &&
790 (!evas_event_passes_through(obj)) &&
791 (!evas_event_freezes_through(obj)) &&
792 (!obj->clip.clipees) &&
793 ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y))
794 )
795 {
796 if ((px != x) || (py != y))
797 {
798 ev.cur.canvas.x = e->pointer.x;
799 ev.cur.canvas.y = e->pointer.y;
800 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
801 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
802 }
803 }
804 /* otherwise it has left the object */
805 else
806 {
807 if (obj->mouse_in)
808 {
809 obj->mouse_in = 0;
810 ev2.canvas.x = e->pointer.x;
811 ev2.canvas.y = e->pointer.y;
812 _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed);
813 if (e->events_frozen <= 0)
814 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
815 }
816 }
817 if (e->delete_me) break;
818 }
819 _evas_post_event_callback_call(e);
820
821 _evas_object_event_new();
822
823 event_id2 = _evas_event_counter;
824 if (copy) copy = eina_list_free(copy);
825 /* go thru our current list of ins */
826 EINA_LIST_FOREACH(ins, l, obj)
827 {
828 ev3.canvas.x = e->pointer.x;
829 ev3.canvas.y = e->pointer.y;
830 _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed);
831 /* if its not in the old list of ins send an enter event */
832 if (!eina_list_data_find(e->pointer.object.in, obj))
833 {
834 if (!obj->mouse_in)
835 {
836 obj->mouse_in = 1;
837 if (e->events_frozen <= 0)
838 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
839 }
840 }
841 if (e->delete_me) break;
842 }
843 if (e->pointer.mouse_grabbed == 0)
844 {
845 /* free our old list of ins */
846 eina_list_free(e->pointer.object.in);
847 /* and set up the new one */
848 e->pointer.object.in = ins;
849 }
850 else
851 {
852 /* free our cur ins */
853 eina_list_free(ins);
854 }
855 _evas_post_event_callback_call(e);
856 }
857 _evas_unwalk(e);
858 return;
859nogrep:
860 {
861 Eina_List *ins = NULL;
862 Eina_List *newin = NULL;
863 Eina_List *l, *copy, *lst = NULL;
864 Evas_Event_Mouse_Move ev;
865 Evas_Event_Mouse_Out ev2;
866 Evas_Event_Mouse_In ev3;
867 Evas_Object *obj, *below_obj;
868 int event_id = 0, event_id2 = 0;
869 int norep = 0, breaknext = 0;
870
871 _evas_object_event_new();
872
873 event_id = _evas_event_counter;
874 ev.buttons = e->pointer.button;
875 ev.cur.output.x = e->pointer.x;
876 ev.cur.output.y = e->pointer.y;
877 ev.cur.canvas.x = e->pointer.x;
878 ev.cur.canvas.y = e->pointer.y;
879 ev.prev.output.x = px;
880 ev.prev.output.y = py;
881 ev.prev.canvas.x = px;
882 ev.prev.canvas.y = py;
883 ev.data = (void *)data;
884 ev.modifiers = &(e->modifiers);
885 ev.locks = &(e->locks);
886 ev.timestamp = timestamp;
887 ev.event_flags = e->default_event_flags;
888
889 ev2.buttons = e->pointer.button;
890 ev2.output.x = e->pointer.x;
891 ev2.output.y = e->pointer.y;
892 ev2.canvas.x = e->pointer.x;
893 ev2.canvas.y = e->pointer.y;
894 ev2.data = (void *)data;
895 ev2.modifiers = &(e->modifiers);
896 ev2.locks = &(e->locks);
897 ev2.timestamp = timestamp;
898 ev2.event_flags = e->default_event_flags;
899
900 ev3.buttons = e->pointer.button;
901 ev3.output.x = e->pointer.x;
902 ev3.output.y = e->pointer.y;
903 ev3.canvas.x = e->pointer.x;
904 ev3.canvas.y = e->pointer.y;
905 ev3.data = (void *)data;
906 ev3.modifiers = &(e->modifiers);
907 ev3.locks = &(e->locks);
908 ev3.timestamp = timestamp;
909 ev3.event_flags = e->default_event_flags;
910
911 /* go thru old list of in objects */
912 copy = evas_event_list_copy(e->pointer.object.in);
913 EINA_LIST_FOREACH(copy, l, obj)
914 {
915 if (breaknext)
916 {
917 lst = l;
918 break;
919 }
920 if (obj == nogrep_obj) breaknext = 1;
921 }
922
923 /* get all new in objects */
924 below_obj = evas_object_below_get(nogrep_obj);
925 if (below_obj)
926 ins = _evas_event_object_list_raw_in_get(e, NULL,
927 EINA_INLIST_GET(below_obj), NULL,
928 e->pointer.x, e->pointer.y,
929 &norep);
930 EINA_LIST_FOREACH(copy, l, obj)
931 {
932 newin = eina_list_append(newin, obj);
933 if (obj == nogrep_obj) break;
934 }
935 EINA_LIST_FOREACH(ins, l, obj)
936 {
937 newin = eina_list_append(newin, obj);
938 }
939
940 EINA_LIST_FOREACH(lst, l, obj)
941 {
942 /* if its under the pointer and its visible and its in the new */
943 /* in list */
944 // FIXME: i don't think we need this
945 // evas_object_clip_recalc(obj);
946 if ((e->events_frozen <= 0) &&
947 evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
948 (evas_object_clippers_is_visible(obj) ||
949 obj->mouse_grabbed) &&
950 eina_list_data_find(newin, obj) &&
951 (!evas_event_passes_through(obj)) &&
952 (!evas_event_freezes_through(obj)) &&
953 (!obj->clip.clipees) &&
954 ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y))
955 )
956 {
957 if ((px != x) || (py != y))
958 {
959 ev.cur.canvas.x = e->pointer.x;
960 ev.cur.canvas.y = e->pointer.y;
961 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
962 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_MOVE, &ev, event_id);
963 }
964 }
965 /* otherwise it has left the object */
966 else
967 {
968 if (obj->mouse_in)
969 {
970 obj->mouse_in = 0;
971 ev2.canvas.x = e->pointer.x;
972 ev2.canvas.y = e->pointer.y;
973 _evas_event_havemap_adjust(obj, &ev2.canvas.x, &ev2.canvas.y, obj->mouse_grabbed);
974 if (e->events_frozen <= 0)
975 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev2, event_id);
976 }
977 }
978 if (e->delete_me) break;
979 }
980 _evas_post_event_callback_call(e);
981
982 _evas_object_event_new();
983
984 event_id2 = _evas_event_counter;
985 if (copy) copy = eina_list_free(copy);
986 /* go thru our current list of ins */
987 EINA_LIST_FOREACH(newin, l, obj)
988 {
989 ev3.canvas.x = e->pointer.x;
990 ev3.canvas.y = e->pointer.y;
991 _evas_event_havemap_adjust(obj, &ev3.canvas.x, &ev3.canvas.y, obj->mouse_grabbed);
992 /* if its not in the old list of ins send an enter event */
993 if (!eina_list_data_find(e->pointer.object.in, obj))
994 {
995 if (!obj->mouse_in)
996 {
997 obj->mouse_in = 1;
998 if (e->events_frozen <= 0)
999 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev3, event_id2);
1000 }
1001 }
1002 if (e->delete_me) break;
1003 }
1004 /* free our old list of ins */
1005 eina_list_free(e->pointer.object.in);
1006 /* and set up the new one */
1007 e->pointer.object.in = newin;
1008
1009 _evas_post_event_callback_call(e);
1010 }
1011 _evas_unwalk(e);
1012}
1013
1014EAPI void
1015evas_event_feed_mouse_in(Evas *e, unsigned int timestamp, const void *data)
1016{
1017 Eina_List *ins;
1018 Eina_List *l;
1019 Evas_Event_Mouse_In ev;
1020 Evas_Object *obj;
1021 int event_id = 0;
1022
1023 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1024 return;
1025 MAGIC_CHECK_END();
1026 e->pointer.inside = 1;
1027
1028 if (e->events_frozen > 0) return;
1029 e->last_timestamp = timestamp;
1030
1031 if (e->pointer.mouse_grabbed != 0) return;
1032
1033 _evas_object_event_new();
1034
1035 event_id = _evas_event_counter;
1036 ev.buttons = e->pointer.button;
1037 ev.output.x = e->pointer.x;
1038 ev.output.y = e->pointer.y;
1039 ev.canvas.x = e->pointer.x;
1040 ev.canvas.y = e->pointer.y;
1041 ev.data = (void *)data;
1042 ev.modifiers = &(e->modifiers);
1043 ev.locks = &(e->locks);
1044 ev.timestamp = timestamp;
1045 ev.event_flags = e->default_event_flags;
1046
1047 _evas_walk(e);
1048 /* get new list of ins */
1049 ins = evas_event_objects_event_list(e, NULL, e->pointer.x, e->pointer.y);
1050 EINA_LIST_FOREACH(ins, l, obj)
1051 {
1052 ev.canvas.x = e->pointer.x;
1053 ev.canvas.y = e->pointer.y;
1054 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
1055 if (!eina_list_data_find(e->pointer.object.in, obj))
1056 {
1057 if (!obj->mouse_in)
1058 {
1059 obj->mouse_in = 1;
1060 if (e->events_frozen <= 0)
1061 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_IN, &ev, event_id);
1062 }
1063 }
1064 if (e->delete_me) break;
1065 }
1066 /* free our old list of ins */
1067 e->pointer.object.in = eina_list_free(e->pointer.object.in);
1068 /* and set up the new one */
1069 e->pointer.object.in = ins;
1070 _evas_post_event_callback_call(e);
1071 evas_event_feed_mouse_move(e, e->pointer.x, e->pointer.y, timestamp, data);
1072 _evas_unwalk(e);
1073}
1074
1075EAPI void
1076evas_event_feed_mouse_out(Evas *e, unsigned int timestamp, const void *data)
1077{
1078 Evas_Event_Mouse_Out ev;
1079 int event_id = 0;
1080
1081 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1082 return;
1083 MAGIC_CHECK_END();
1084 e->pointer.inside = 0;
1085
1086 if (e->events_frozen > 0) return;
1087 e->last_timestamp = timestamp;
1088
1089 _evas_object_event_new();
1090
1091 event_id = _evas_event_counter;
1092 ev.buttons = e->pointer.button;
1093 ev.output.x = e->pointer.x;
1094 ev.output.y = e->pointer.y;
1095 ev.canvas.x = e->pointer.x;
1096 ev.canvas.y = e->pointer.y;
1097 ev.data = (void *)data;
1098 ev.modifiers = &(e->modifiers);
1099 ev.locks = &(e->locks);
1100 ev.timestamp = timestamp;
1101 ev.event_flags = e->default_event_flags;
1102
1103 _evas_walk(e);
1104 /* if our mouse button is inside any objects */
1105 {
1106 /* go thru old list of in objects */
1107 Eina_List *l, *copy;
1108 Evas_Object *obj;
1109
1110 copy = evas_event_list_copy(e->pointer.object.in);
1111 EINA_LIST_FOREACH(copy, l, obj)
1112 {
1113 ev.canvas.x = e->pointer.x;
1114 ev.canvas.y = e->pointer.y;
1115 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
1116 if (obj->mouse_in)
1117 {
1118 obj->mouse_in = 0;
1119 if (!obj->delete_me)
1120 {
1121 if (e->events_frozen <= 0)
1122 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev, event_id);
1123 }
1124 obj->mouse_grabbed = 0;
1125 }
1126 if (e->delete_me) break;
1127 }
1128 if (copy) copy = eina_list_free(copy);
1129 /* free our old list of ins */
1130 e->pointer.object.in = eina_list_free(e->pointer.object.in);
1131 e->pointer.mouse_grabbed = 0;
1132 _evas_post_event_callback_call(e);
1133 }
1134 _evas_unwalk(e);
1135}
1136
1137EAPI void
1138evas_event_feed_multi_down(Evas *e,
1139 int d, int x, int y,
1140 double rad, double radx, double rady,
1141 double pres, double ang,
1142 double fx, double fy,
1143 Evas_Button_Flags flags, unsigned int timestamp,
1144 const void *data)
1145{
1146 Eina_List *l, *copy;
1147 Evas_Event_Multi_Down ev;
1148 Evas_Object *obj;
1149 int addgrab = 0;
1150 int event_id = 0;
1151
1152 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1153 return;
1154 MAGIC_CHECK_END();
1155
1156 e->pointer.downs++;
1157 if (e->events_frozen > 0) return;
1158 e->last_timestamp = timestamp;
1159
1160 _evas_object_event_new();
1161
1162 event_id = _evas_event_counter;
1163 ev.device = d;
1164 ev.output.x = x;
1165 ev.output.y = y;
1166 ev.canvas.x = x;
1167 ev.canvas.y = y;
1168 ev.radius = rad;
1169 ev.radius_x = radx;
1170 ev.radius_y = rady;
1171 ev.pressure = pres;
1172 ev.angle = ang;
1173 ev.canvas.xsub = fx;
1174 ev.canvas.ysub = fy;
1175 ev.data = (void *)data;
1176 ev.modifiers = &(e->modifiers);
1177 ev.locks = &(e->locks);
1178 ev.flags = flags;
1179 ev.timestamp = timestamp;
1180 ev.event_flags = e->default_event_flags;
1181
1182 _evas_walk(e);
1183 /* append new touch point to the touch point list */
1184 _evas_touch_point_append(e, d, x, y);
1185 if (e->pointer.mouse_grabbed == 0)
1186 {
1187 if (e->pointer.downs > 1) addgrab = e->pointer.downs - 1;
1188 }
1189 copy = evas_event_list_copy(e->pointer.object.in);
1190 EINA_LIST_FOREACH(copy, l, obj)
1191 {
1192 if (obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB)
1193 {
1194 obj->mouse_grabbed += addgrab + 1;
1195 e->pointer.mouse_grabbed += addgrab + 1;
1196 }
1197 }
1198 EINA_LIST_FOREACH(copy, l, obj)
1199 {
1200 ev.canvas.x = x;
1201 ev.canvas.y = y;
1202 ev.canvas.xsub = fx;
1203 ev.canvas.ysub = fy;
1204 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
1205 if (x != ev.canvas.x)
1206 ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
1207 if (y != ev.canvas.y)
1208 ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
1209 if (e->events_frozen <= 0)
1210 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_DOWN, &ev, event_id);
1211 if (e->delete_me) break;
1212 }
1213 if (copy) eina_list_free(copy);
1214 _evas_post_event_callback_call(e);
1215 /* update touch point's state to EVAS_TOUCH_POINT_STILL */
1216 _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_STILL);
1217 _evas_unwalk(e);
1218}
1219
1220EAPI void
1221evas_event_feed_multi_up(Evas *e,
1222 int d, int x, int y,
1223 double rad, double radx, double rady,
1224 double pres, double ang,
1225 double fx, double fy,
1226 Evas_Button_Flags flags, unsigned int timestamp,
1227 const void *data)
1228{
1229 Eina_List *l, *copy;
1230 Evas_Event_Multi_Up ev;
1231 Evas_Object *obj;
1232 int event_id = 0;
1233
1234 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1235 return;
1236 MAGIC_CHECK_END();
1237
1238 e->pointer.downs--;
1239 if (e->events_frozen > 0) return;
1240 e->last_timestamp = timestamp;
1241
1242 _evas_object_event_new();
1243
1244 event_id = _evas_event_counter;
1245 ev.device = d;
1246 ev.output.x = x;
1247 ev.output.y = y;
1248 ev.canvas.x = x;
1249 ev.canvas.y = y;
1250 ev.radius = rad;
1251 ev.radius_x = radx;
1252 ev.radius_y = rady;
1253 ev.pressure = pres;
1254 ev.angle = ang;
1255 ev.canvas.xsub = fx;
1256 ev.canvas.ysub = fy;
1257 ev.data = (void *)data;
1258 ev.modifiers = &(e->modifiers);
1259 ev.locks = &(e->locks);
1260 ev.flags = flags;
1261 ev.timestamp = timestamp;
1262 ev.event_flags = e->default_event_flags;
1263
1264 _evas_walk(e);
1265 /* update released touch point */
1266 _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_UP);
1267 copy = evas_event_list_copy(e->pointer.object.in);
1268 EINA_LIST_FOREACH(copy, l, obj)
1269 {
1270 ev.canvas.x = x;
1271 ev.canvas.y = y;
1272 ev.canvas.xsub = fx;
1273 ev.canvas.ysub = fy;
1274 _evas_event_havemap_adjust(obj, &ev.canvas.x, &ev.canvas.y, obj->mouse_grabbed);
1275 if (x != ev.canvas.x)
1276 ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
1277 if (y != ev.canvas.y)
1278 ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
1279 if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
1280 (obj->mouse_grabbed > 0))
1281 {
1282 obj->mouse_grabbed--;
1283 e->pointer.mouse_grabbed--;
1284 }
1285 if (e->events_frozen <= 0)
1286 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_UP, &ev, event_id);
1287 if (e->delete_me) break;
1288 }
1289 if (copy) copy = eina_list_free(copy);
1290 if ((e->pointer.mouse_grabbed == 0) && !_post_up_handle(e, timestamp, data))
1291 _evas_post_event_callback_call(e);
1292 /* remove released touch point from the touch point list */
1293 _evas_touch_point_remove(e, d);
1294 _evas_unwalk(e);
1295}
1296
1297EAPI void
1298evas_event_feed_multi_move(Evas *e,
1299 int d, int x, int y,
1300 double rad, double radx, double rady,
1301 double pres, double ang,
1302 double fx, double fy,
1303 unsigned int timestamp, const void *data)
1304{
1305 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1306 return;
1307 MAGIC_CHECK_END();
1308
1309 if (e->events_frozen > 0) return;
1310 e->last_timestamp = timestamp;
1311
1312 if ((!e->pointer.inside) && (e->pointer.mouse_grabbed == 0)) return;
1313
1314 _evas_walk(e);
1315 /* update moved touch point */
1316 _evas_touch_point_update(e, d, x, y, EVAS_TOUCH_POINT_MOVE);
1317 /* if our mouse button is grabbed to any objects */
1318 if (e->pointer.mouse_grabbed > 0)
1319 {
1320 /* go thru old list of in objects */
1321 Eina_List *l, *copy;
1322 Evas_Event_Multi_Move ev;
1323 Evas_Object *obj;
1324 int event_id = 0;
1325
1326 _evas_object_event_new();
1327
1328 event_id = _evas_event_counter;
1329 ev.device = d;
1330 ev.cur.output.x = x;
1331 ev.cur.output.y = y;
1332 ev.cur.canvas.x = x;
1333 ev.cur.canvas.y = y;
1334 ev.radius = rad;
1335 ev.radius_x = radx;
1336 ev.radius_y = rady;
1337 ev.pressure = pres;
1338 ev.angle = ang;
1339 ev.cur.canvas.xsub = fx;
1340 ev.cur.canvas.ysub = fy;
1341 ev.data = (void *)data;
1342 ev.modifiers = &(e->modifiers);
1343 ev.locks = &(e->locks);
1344 ev.timestamp = timestamp;
1345 ev.event_flags = e->default_event_flags;
1346
1347 copy = evas_event_list_copy(e->pointer.object.in);
1348 EINA_LIST_FOREACH(copy, l, obj)
1349 {
1350 if ((e->events_frozen <= 0) &&
1351 (evas_object_clippers_is_visible(obj) || obj->mouse_grabbed) &&
1352 (!evas_event_passes_through(obj)) &&
1353 (!evas_event_freezes_through(obj)) &&
1354 (!obj->clip.clipees))
1355 {
1356 ev.cur.canvas.x = x;
1357 ev.cur.canvas.y = y;
1358 ev.cur.canvas.xsub = fx;
1359 ev.cur.canvas.ysub = fy;
1360 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
1361 if (x != ev.cur.canvas.x)
1362 ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision
1363 if (y != ev.cur.canvas.y)
1364 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
1365 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
1366 }
1367 if (e->delete_me) break;
1368 }
1369 _evas_post_event_callback_call(e);
1370 }
1371 else
1372 {
1373 Eina_List *ins;
1374 Eina_List *l, *copy;
1375 Evas_Event_Multi_Move ev;
1376 Evas_Object *obj;
1377 int event_id = 0;
1378
1379 _evas_object_event_new();
1380
1381 event_id = _evas_event_counter;
1382 ev.device = d;
1383 ev.cur.output.x = x;
1384 ev.cur.output.y = y;
1385 ev.cur.canvas.x = x;
1386 ev.cur.canvas.y = y;
1387 ev.radius = rad;
1388 ev.radius_x = radx;
1389 ev.radius_y = rady;
1390 ev.pressure = pres;
1391 ev.angle = ang;
1392 ev.cur.canvas.xsub = fx;
1393 ev.cur.canvas.ysub = fy;
1394 ev.data = (void *)data;
1395 ev.modifiers = &(e->modifiers);
1396 ev.locks = &(e->locks);
1397 ev.timestamp = timestamp;
1398 ev.event_flags = e->default_event_flags;
1399
1400 /* get all new in objects */
1401 ins = evas_event_objects_event_list(e, NULL, x, y);
1402 /* go thru old list of in objects */
1403 copy = evas_event_list_copy(e->pointer.object.in);
1404 EINA_LIST_FOREACH(copy, l, obj)
1405 {
1406 /* if its under the pointer and its visible and its in the new */
1407 /* in list */
1408 // FIXME: i don't think we need this
1409 // evas_object_clip_recalc(obj);
1410 if ((e->events_frozen <= 0) &&
1411 evas_object_is_in_output_rect(obj, x, y, 1, 1) &&
1412 (evas_object_clippers_is_visible(obj) ||
1413 obj->mouse_grabbed) &&
1414 eina_list_data_find(ins, obj) &&
1415 (!evas_event_passes_through(obj)) &&
1416 (!evas_event_freezes_through(obj)) &&
1417 (!obj->clip.clipees) &&
1418 ((!obj->precise_is_inside) || evas_object_is_inside(obj, x, y))
1419 )
1420 {
1421 ev.cur.canvas.x = x;
1422 ev.cur.canvas.y = y;
1423 ev.cur.canvas.xsub = fx;
1424 ev.cur.canvas.ysub = fy;
1425 _evas_event_havemap_adjust(obj, &ev.cur.canvas.x, &ev.cur.canvas.y, obj->mouse_grabbed);
1426 if (x != ev.cur.canvas.x)
1427 ev.cur.canvas.xsub = ev.cur.canvas.x; // fixme - lost precision
1428 if (y != ev.cur.canvas.y)
1429 ev.cur.canvas.ysub = ev.cur.canvas.y; // fixme - lost precision
1430 evas_object_event_callback_call(obj, EVAS_CALLBACK_MULTI_MOVE, &ev, event_id);
1431 }
1432 if (e->delete_me) break;
1433 }
1434 if (copy) copy = eina_list_free(copy);
1435 if (e->pointer.mouse_grabbed == 0)
1436 {
1437 /* free our old list of ins */
1438 eina_list_free(e->pointer.object.in);
1439 /* and set up the new one */
1440 e->pointer.object.in = ins;
1441 }
1442 else
1443 {
1444 /* free our cur ins */
1445 eina_list_free(ins);
1446 }
1447 _evas_post_event_callback_call(e);
1448 }
1449 _evas_unwalk(e);
1450}
1451
1452EAPI void
1453evas_event_feed_key_down(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
1454{
1455 int event_id = 0;
1456 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1457 return;
1458 MAGIC_CHECK_END();
1459
1460 if (!keyname) return;
1461 if (e->events_frozen > 0) return;
1462 e->last_timestamp = timestamp;
1463 _evas_walk(e);
1464
1465 Evas_Event_Key_Down ev;
1466 Eina_Bool exclusive;
1467
1468 _evas_object_event_new();
1469
1470 event_id = _evas_event_counter;
1471 exclusive = EINA_FALSE;
1472 ev.keyname = (char *)keyname;
1473 ev.data = (void *)data;
1474 ev.modifiers = &(e->modifiers);
1475 ev.locks = &(e->locks);
1476 ev.key = key;
1477 ev.string = string;
1478 ev.compose = compose;
1479 ev.timestamp = timestamp;
1480 ev.event_flags = e->default_event_flags;
1481
1482 if (e->grabs)
1483 {
1484 Eina_List *l;
1485 Evas_Key_Grab *g;
1486
1487 e->walking_grabs++;
1488 EINA_LIST_FOREACH(e->grabs, l, g)
1489 {
1490 if (g->just_added)
1491 {
1492 g->just_added = EINA_FALSE;
1493 continue;
1494 }
1495 if (g->delete_me) continue;
1496 if (((e->modifiers.mask & g->modifiers) ||
1497 (g->modifiers == e->modifiers.mask)) &&
1498 (!strcmp(keyname, g->keyname)))
1499 {
1500 if (!(e->modifiers.mask & g->not_modifiers))
1501 {
1502 if (e->events_frozen <= 0 &&
1503 !evas_event_freezes_through(g->object))
1504 evas_object_event_callback_call(g->object,
1505 EVAS_CALLBACK_KEY_DOWN,
1506 &ev, event_id);
1507 if (g->exclusive) exclusive = EINA_TRUE;
1508 }
1509 }
1510 if (e->delete_me) break;
1511 }
1512 e->walking_grabs--;
1513 if (e->walking_grabs <= 0)
1514 {
1515 while (e->delete_grabs > 0)
1516 {
1517 e->delete_grabs--;
1518 for (l = e->grabs; l;)
1519 {
1520 g = eina_list_data_get(l);
1521 l = eina_list_next(l);
1522 if (g->delete_me)
1523 evas_key_grab_free(g->object, g->keyname, g->modifiers,
1524 g->not_modifiers);
1525 }
1526 }
1527 }
1528 }
1529 if ((e->focused) && (!exclusive))
1530 {
1531 if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused))
1532 evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_DOWN,
1533 &ev, event_id);
1534 }
1535 _evas_post_event_callback_call(e);
1536 _evas_unwalk(e);
1537}
1538
1539EAPI void
1540evas_event_feed_key_up(Evas *e, const char *keyname, const char *key, const char *string, const char *compose, unsigned int timestamp, const void *data)
1541{
1542 int event_id = 0;
1543 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1544 return;
1545 MAGIC_CHECK_END();
1546 if (!keyname) return;
1547 if (e->events_frozen > 0) return;
1548 e->last_timestamp = timestamp;
1549 _evas_walk(e);
1550
1551 Evas_Event_Key_Up ev;
1552 Eina_Bool exclusive;
1553
1554 _evas_object_event_new();
1555
1556 event_id = _evas_event_counter;
1557 exclusive = EINA_FALSE;
1558 ev.keyname = (char *)keyname;
1559 ev.data = (void *)data;
1560 ev.modifiers = &(e->modifiers);
1561 ev.locks = &(e->locks);
1562 ev.key = key;
1563 ev.string = string;
1564 ev.compose = compose;
1565 ev.timestamp = timestamp;
1566 ev.event_flags = e->default_event_flags;
1567
1568 if (e->grabs)
1569 {
1570 Eina_List *l;
1571 Evas_Key_Grab *g;
1572
1573 e->walking_grabs++;
1574 EINA_LIST_FOREACH(e->grabs, l, g)
1575 {
1576 if (g->just_added)
1577 {
1578 g->just_added = EINA_FALSE;
1579 continue;
1580 }
1581 if (g->delete_me) continue;
1582 if (((e->modifiers.mask & g->modifiers) ||
1583 (g->modifiers == e->modifiers.mask)) &&
1584 (!((e->modifiers.mask & g->not_modifiers) ||
1585 (g->not_modifiers == ~e->modifiers.mask))) &&
1586 (!strcmp(keyname, g->keyname)))
1587 {
1588 if (e->events_frozen <= 0 &&
1589 !evas_event_freezes_through(g->object))
1590 evas_object_event_callback_call(g->object,
1591 EVAS_CALLBACK_KEY_UP, &ev, event_id);
1592 if (g->exclusive) exclusive = EINA_TRUE;
1593 }
1594 if (e->delete_me) break;
1595 }
1596 e->walking_grabs--;
1597 if (e->walking_grabs <= 0)
1598 {
1599 while (e->delete_grabs > 0)
1600 {
1601 Eina_List *ll, *l_next;
1602 Evas_Key_Grab *gr;
1603
1604 e->delete_grabs--;
1605 EINA_LIST_FOREACH_SAFE(e->grabs, ll, l_next, gr)
1606 {
1607 if (gr->delete_me)
1608 evas_key_grab_free(gr->object, gr->keyname,
1609 gr->modifiers, gr->not_modifiers);
1610 }
1611 }
1612 }
1613 }
1614 if ((e->focused) && (!exclusive))
1615 {
1616 if (e->events_frozen <= 0 && !evas_event_freezes_through(e->focused))
1617 evas_object_event_callback_call(e->focused, EVAS_CALLBACK_KEY_UP,
1618 &ev, event_id);
1619 }
1620 _evas_post_event_callback_call(e);
1621 _evas_unwalk(e);
1622}
1623
1624EAPI void
1625evas_event_feed_hold(Evas *e, int hold, unsigned int timestamp, const void *data)
1626{
1627 Eina_List *l, *copy;
1628 Evas_Event_Hold ev;
1629 Evas_Object *obj;
1630 int event_id = 0;
1631
1632 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1633 return;
1634 MAGIC_CHECK_END();
1635
1636 if (e->events_frozen > 0) return;
1637 e->last_timestamp = timestamp;
1638
1639 _evas_object_event_new();
1640
1641 event_id = _evas_event_counter;
1642 ev.hold = hold;
1643 ev.data = (void *)data;
1644 ev.timestamp = timestamp;
1645 ev.event_flags = e->default_event_flags;
1646
1647 _evas_walk(e);
1648 copy = evas_event_list_copy(e->pointer.object.in);
1649 EINA_LIST_FOREACH(copy, l, obj)
1650 {
1651 if ((e->events_frozen <= 0) && !evas_event_freezes_through(obj))
1652 evas_object_event_callback_call(obj, EVAS_CALLBACK_HOLD, &ev, event_id);
1653 if (e->delete_me) break;
1654 }
1655 if (copy) copy = eina_list_free(copy);
1656 _evas_post_event_callback_call(e);
1657 _evas_unwalk(e);
1658 _evas_object_event_new();
1659}
1660
1661EAPI void
1662evas_object_freeze_events_set(Evas_Object *obj, Eina_Bool freeze)
1663{
1664 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1665 return;
1666 MAGIC_CHECK_END();
1667
1668 freeze = !!freeze;
1669 if (obj->freeze_events == freeze) return;
1670 obj->freeze_events = freeze;
1671 evas_object_smart_member_cache_invalidate(obj, EINA_FALSE, EINA_TRUE);
1672}
1673
1674EAPI Eina_Bool
1675evas_object_freeze_events_get(const Evas_Object *obj)
1676{
1677 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1678 return EINA_FALSE;
1679 MAGIC_CHECK_END();
1680 return obj->freeze_events;
1681}
1682
1683EAPI void
1684evas_object_pass_events_set(Evas_Object *obj, Eina_Bool pass)
1685{
1686 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1687 return;
1688 MAGIC_CHECK_END();
1689 pass = !!pass;
1690 if (obj->pass_events == pass) return;
1691 obj->pass_events = pass;
1692 evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_FALSE);
1693 if (evas_object_is_in_output_rect(obj,
1694 obj->layer->evas->pointer.x,
1695 obj->layer->evas->pointer.y, 1, 1) &&
1696 ((!obj->precise_is_inside) ||
1697 (evas_object_is_inside(obj,
1698 obj->layer->evas->pointer.x,
1699 obj->layer->evas->pointer.y))))
1700 evas_event_feed_mouse_move(obj->layer->evas,
1701 obj->layer->evas->pointer.x,
1702 obj->layer->evas->pointer.y,
1703 obj->layer->evas->last_timestamp,
1704 NULL);
1705}
1706
1707EAPI Eina_Bool
1708evas_object_pass_events_get(const Evas_Object *obj)
1709{
1710 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1711 return EINA_FALSE;
1712 MAGIC_CHECK_END();
1713 return obj->pass_events;
1714}
1715
1716EAPI void
1717evas_object_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
1718{
1719 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1720 return;
1721 MAGIC_CHECK_END();
1722 repeat = !!repeat;
1723 if (obj->repeat_events == repeat) return;
1724 obj->repeat_events = repeat;
1725 if (evas_object_is_in_output_rect(obj,
1726 obj->layer->evas->pointer.x,
1727 obj->layer->evas->pointer.y, 1, 1) &&
1728 ((!obj->precise_is_inside) ||
1729 (evas_object_is_inside(obj,
1730 obj->layer->evas->pointer.x,
1731 obj->layer->evas->pointer.y))))
1732 evas_event_feed_mouse_move(obj->layer->evas,
1733 obj->layer->evas->pointer.x,
1734 obj->layer->evas->pointer.y,
1735 obj->layer->evas->last_timestamp,
1736 NULL);
1737}
1738
1739EAPI Eina_Bool
1740evas_object_repeat_events_get(const Evas_Object *obj)
1741{
1742 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1743 return EINA_FALSE;
1744 MAGIC_CHECK_END();
1745 return obj->repeat_events;
1746}
1747
1748EAPI void
1749evas_object_propagate_events_set(Evas_Object *obj, Eina_Bool prop)
1750{
1751 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1752 return;
1753 MAGIC_CHECK_END();
1754 obj->no_propagate = !prop;
1755}
1756
1757EAPI Eina_Bool
1758evas_object_propagate_events_get(const Evas_Object *obj)
1759{
1760 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1761 return EINA_FALSE;
1762 MAGIC_CHECK_END();
1763 return !(obj->no_propagate);
1764}
1765
1766EAPI void
1767evas_object_pointer_mode_set(Evas_Object *obj, Evas_Object_Pointer_Mode setting)
1768{
1769 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1770 return;
1771 MAGIC_CHECK_END();
1772 obj->pointer_mode = setting;
1773}
1774
1775EAPI Evas_Object_Pointer_Mode
1776evas_object_pointer_mode_get(const Evas_Object *obj)
1777{
1778 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1779 return EVAS_OBJECT_POINTER_MODE_AUTOGRAB;
1780 MAGIC_CHECK_END();
1781 return obj->pointer_mode;
1782}
1783
1784EAPI void
1785evas_event_refeed_event(Evas *e, void *event_copy, Evas_Callback_Type event_type)
1786{
1787 switch (event_type)
1788 {
1789 case EVAS_CALLBACK_MOUSE_IN:
1790 {
1791 Evas_Event_Mouse_In *ev = event_copy;
1792 evas_event_feed_mouse_in(e, ev->timestamp, ev->data);
1793 break;
1794 }
1795 case EVAS_CALLBACK_MOUSE_OUT:
1796 {
1797 Evas_Event_Mouse_Out *ev = event_copy;
1798 evas_event_feed_mouse_out(e, ev->timestamp, ev->data);
1799 break;
1800 }
1801 case EVAS_CALLBACK_MOUSE_DOWN:
1802 {
1803 Evas_Event_Mouse_Down *ev = event_copy;
1804 evas_event_feed_mouse_down(e, ev->button, ev->flags, ev-> timestamp, ev->data);
1805 break;
1806 }
1807 case EVAS_CALLBACK_MOUSE_UP:
1808 {
1809 Evas_Event_Mouse_Up *ev = event_copy;
1810 evas_event_feed_mouse_up(e, ev->button, ev->flags, ev-> timestamp, ev->data);
1811 break;
1812 }
1813 case EVAS_CALLBACK_MOUSE_MOVE:
1814 {
1815 Evas_Event_Mouse_Move *ev = event_copy;
1816 evas_event_feed_mouse_move(e, ev->cur.canvas.x, ev->cur.canvas.y, ev->timestamp, ev->data);
1817 break;
1818 }
1819 case EVAS_CALLBACK_MOUSE_WHEEL:
1820 {
1821 Evas_Event_Mouse_Wheel *ev = event_copy;
1822 evas_event_feed_mouse_wheel(e, ev->direction, ev-> z, ev->timestamp, ev->data);
1823 break;
1824 }
1825 case EVAS_CALLBACK_MULTI_DOWN:
1826 {
1827 Evas_Event_Multi_Down *ev = event_copy;
1828 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);
1829 break;
1830 }
1831 case EVAS_CALLBACK_MULTI_UP:
1832 {
1833 Evas_Event_Multi_Up *ev = event_copy;
1834 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);
1835 break;
1836 }
1837 case EVAS_CALLBACK_MULTI_MOVE:
1838 {
1839 Evas_Event_Multi_Move *ev = event_copy;
1840 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);
1841 break;
1842 }
1843 case EVAS_CALLBACK_KEY_DOWN:
1844 {
1845 Evas_Event_Key_Down *ev = event_copy;
1846 evas_event_feed_key_down(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data);
1847 break;
1848 }
1849 case EVAS_CALLBACK_KEY_UP:
1850 {
1851 Evas_Event_Key_Up *ev = event_copy;
1852 evas_event_feed_key_up(e, ev->keyname, ev->key, ev->string, ev->compose, ev->timestamp, ev->data);
1853 break;
1854 }
1855 default: /* All non-input events are not handeled */
1856 break;
1857 }
1858}
1859
1860EAPI int
1861evas_event_down_count_get(const Evas *e)
1862{
1863 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1864 return 0;
1865 MAGIC_CHECK_END();
1866 return e->pointer.downs;
1867}
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 @@
1/*
2 * Filter implementation for evas
3 */
4
5#if 0 // filtering disabled
6typedef enum
7{
8 /** Apply any filter effects to this object (Default) */
9 EVAS_FILTER_MODE_OBJECT,
10 /** Filter all objects beneath this object on the canvas */
11 EVAS_FILTER_MODE_BELOW,
12} Evas_Filter_Mode;
13typedef enum
14{
15 /** No filter: Default */
16 EVAS_FILTER_NONE,
17 /** A blur filter. Params are quality (float), and radius (int). */
18 EVAS_FILTER_BLUR,
19 /** Negates the colors of an image. Also called solarize */
20 EVAS_FILTER_INVERT,
21 EVAS_FILTER_SOLARIZE = EVAS_FILTER_INVERT,
22 /** Makes a sepia version of the image. */
23 EVAS_FILTER_SEPIA,
24 /** Makes a greyscale version of the image. Params are 'red',
25 * 'green', 'blue' (all floats) which must add to 1. The defaults are
26 * 0.3, 0.59 and 0.11 which approximates human vision. Setting 'all'
27 * sets rgb to the same value. */
28 EVAS_FILTER_GREYSCALE,
29 EVAS_FILTER_GRAYSCALE = EVAS_FILTER_GREYSCALE,
30 /** Brighten (or darken) image. Param 'adjust' float (-1.0 to 1.0)
31 * amount to adjust. */
32 EVAS_FILTER_BRIGHTNESS,
33 /** Enhance contrast on image. Param 'adjust' float (-1.0 to 1.0)
34 * amount to adjust. */
35 EVAS_FILTER_CONTRAST,
36
37 EVAS_FILTER_LAST = EVAS_FILTER_CONTRAST
38} Evas_Filter;
39
40/**
41 * Set the filter mode for an object.
42 *
43 * There are two valid filtering modes currently:
44 * - EVAS_FILTER_MODE_OBJECT: which applies the filter to the object itself
45 * - EVAS_FILTER_MODE_BELOW: which makes the object invisible and filters
46 * what is below the object.
47 *
48 * The default filter mode is EVAS_FILTER_MODE_OBJECT.
49 *
50 * @param o Object to set filter mode on.
51 * @param mode Mode to set.
52 * @return EINA_TRUE on success, EINA_FALSE otherwise.
53 */
54 EAPI Eina_Bool evas_object_filter_mode_set (Evas_Object *o, Evas_Filter_Mode mode);
55
56/**
57 * Get the current filtering mode for an object.
58 *
59 * By default all objects are in object filtering mode, even if no filter is
60 * set.
61 *
62 * @param o Object to get filter mode of.
63 * @return Filter mode (default EVAS_FILTER_MODE_OBJECT)
64 */
65 EAPI Evas_Filter_Mode evas_object_filter_mode_get (Evas_Object *o);
66
67/**
68 * Set the current filter type.
69 *
70 * This sets the filter type, whether a blur, color filter or some other type
71 * of filter. This is normally the only filter call necessary, although some
72 * filters require additional parameters.
73 *
74 * If the object has a filter already, and existing parameters will be
75 * cleared.
76 *
77 * Setting the blur to EVAS_FILTER_NONE removes any filter.
78 *
79 * @param o Object to set the filter on.
80 * @param filter Filter to set.
81 * @return EINA_TRUE On success
82 */
83 EAPI Eina_Bool evas_object_filter_set (Evas_Object *o, Evas_Filter filter);
84
85/**
86 * Get the current filter.
87 *
88 * @param o Object to get filter of.
89 * @return The filter if set, or EVAS_FILTER_NONE.
90 */
91 EAPI Evas_Filter evas_object_filter_get (Evas_Object *o);
92
93/**
94 * Set an integer parameter of a filter.
95 *
96 * This sets an integer parameter of a filter, if such parameter is known to
97 * the filter. Note that some parameters may actually set multiple fields.
98 * The individual filters define the specific parameters available.
99 *
100 * It should be noted that filter parameters are lost after the filter type
101 * changes, so set the filter type, then the parameters.
102 *
103 * @param o Object to set parameter on.
104 * @param param Name of parameter to set.
105 * @param val Value to set.
106 * @return EINA_TRUE if at least one parameter was set, EINA_FALSE
107 * otherwise.
108 */
109 EAPI Eina_Bool evas_object_filter_param_int_set (Evas_Object *o, const char *param, int val);
110
111/**
112 * Get an integer value parameter from a filter.
113 *
114 * Gets the first matching parameter for a filter. Note there is no way to
115 * later fields if they do not have their own accessor name.
116 *
117 * Also note that there is no way to tell the difference between a -1 as a
118 * value, and the error code. Ask your filter writer to use a different
119 * range.
120 *
121 * @param o The object.
122 * @Param param Name of the parameter to get.
123 * @return The value, or -1 on error.
124 */
125 EAPI int evas_object_filter_param_int_get (Evas_Object *o, const char *param);
126
127/**
128 * Set a string parameter on a filter
129 *
130 * Currently unimplemented as no filters use this yet
131 */
132 EAPI Eina_Bool evas_object_filter_param_str_set (Evas_Object *o, const char *param, const char *val);
133
134/**
135 * Get a string parameter from a filter
136 *
137 * Currently unimplemented as no filters use this yet
138 */
139 EAPI const char *evas_object_filter_param_str_get (Evas_Object *o, const char *param);
140
141/**
142 * Set an object parameter on a filter
143 *
144 * Currently unimplemented as no filters use this yet
145 */
146 EAPI Eina_Bool evas_object_filter_param_obj_set (Evas_Object *o, const char *param, Evas_Object *val);
147
148/**
149 * get an object parameter from a filter
150 *
151 * Currently unimplemented as no filters use this yet
152 */
153 EAPI Evas_Object *evas_object_filter_param_obj_get (Evas_Object *o, const char *param);
154
155/**
156 * Set a float parameter of a filter.
157 *
158 * This is the same as evas_object_filter_param_int_set(), but for floating
159 * point values.
160 *
161 * @param o Object to set value on.
162 * @param param Name of the parameter to set.
163 * @param EINA_TRUE if at least one parameter was set, EINA_FALSE otherwise.
164 */
165 EAPI Eina_Bool evas_object_filter_param_float_set(Evas_Object *o, const char *param, double val);
166
167/**
168 * Get a float parameter of a filter.
169 *
170 * This is the same as evas_object_filter_param_int_get(), but for floating
171 * point values.
172 *
173 * @param o Object to set value on.
174 * @param param Name of the parameter to set.
175 * @return The value, or -1 on error.
176 */
177 EAPI double evas_object_filter_param_float_get(Evas_Object *o, const char *param);
178
179#include <stddef.h> // offsetof
180
181#include "evas_common.h"
182#include "evas_private.h"
183
184#include <assert.h>
185/* disable neon - even after fixes:
186 * Error: ARM register expected -- vdup.u32 q14,$0xff000000'
187 * not going to fix now
188#ifdef BUILD_NEON
189# define BUILD_NEON0 1
190#else
191# define BUILD_NEON0 0
192#endif
193*/
194
195#define BUILD_NEON0 0
196
197typedef struct Evas_Filter_Info_Blur
198{
199 double quality;
200 int radius;
201} Evas_Filter_Info_Blur;
202
203typedef struct Evas_Filter_Info_GreyScale
204{
205 double r,g,b;
206} Evas_Filter_Info_GreyScale;
207
208typedef struct Evas_Filter_Info_Brightness
209{
210 double adjust;
211} Evas_Filter_Info_Brightness;
212
213typedef struct Evas_Filter_Info_Contrast
214{
215 double adjust;
216} Evas_Filter_Info_Contrast;
217
218typedef int (*Filter_Size_FN)(Evas_Filter_Info *,int,int,int*,int*,Eina_Bool);
219typedef uint8_t *(*Key_FN)(const Evas_Filter_Info *, uint32_t *);
220
221struct fieldinfo
222{
223 const char *field;
224 int type;
225 size_t offset;
226};
227
228struct filterinfo
229{
230 Evas_Software_Filter_Fn filter;
231 const size_t datasize;
232 Filter_Size_FN sizefn;
233 Key_FN keyfn;
234 Eina_Bool alwaysalpha;
235};
236
237enum
238{
239 TYPE_INT,
240 TYPE_FLOAT
241};
242
243static int blur_size_get(Evas_Filter_Info*, int, int, int *, int *, Eina_Bool);
244static uint8_t *gaussian_key_get(const Evas_Filter_Info *, uint32_t *);
245
246static Eina_Bool gaussian_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
247static Eina_Bool negation_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
248static Eina_Bool sepia_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
249static Eina_Bool greyscale_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*);
250static Eina_Bool brightness_filter(Evas_Filter_Info*, RGBA_Image*, RGBA_Image*);
251static Eina_Bool contrast_filter(Evas_Filter_Info *, RGBA_Image*, RGBA_Image*);
252
253struct filterinfo filterinfo[] =
254{
255 /* None */
256 { NULL, 0, NULL, NULL, EINA_FALSE},
257 /* Blur */
258 { gaussian_filter, sizeof(Evas_Filter_Info_Blur), blur_size_get, gaussian_key_get, EINA_TRUE },
259 /* Negation */
260 { negation_filter, 0, NULL, NULL, EINA_FALSE },
261 /* Sepia */
262 { sepia_filter, 0, NULL, NULL, EINA_FALSE },
263 /* Greyscale */
264 { greyscale_filter, sizeof(Evas_Filter_Info_GreyScale), NULL, NULL, EINA_FALSE },
265 /* Brightness */
266 { brightness_filter, sizeof(Evas_Filter_Info_Brightness), NULL, NULL, EINA_FALSE },
267 /* Contrast */
268 { contrast_filter, sizeof(Evas_Filter_Info_Contrast), NULL, NULL, EINA_FALSE},
269};
270
271
272static struct fieldinfo blurfields[] =
273{
274 { "quality", TYPE_FLOAT, offsetof(Evas_Filter_Info_Blur, quality) },
275 { "radius", TYPE_INT, offsetof(Evas_Filter_Info_Blur, radius) },
276 { NULL, 0, 0 },
277};
278
279static struct fieldinfo greyfields[] =
280{
281 { "red", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) },
282 { "green", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) },
283 { "blue", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) },
284
285 { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, r) },
286 { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, g) },
287 { "all", TYPE_FLOAT, offsetof(Evas_Filter_Info_GreyScale, b) },
288 { NULL, 0, 0 },
289};
290
291static struct fieldinfo brightnessfields[] =
292{
293 { "adjust", TYPE_FLOAT, offsetof(Evas_Filter_Info_Brightness, adjust) },
294 { NULL, 0, 0 },
295};
296
297static struct fieldinfo contrastfields[] =
298{
299 { "adjust", TYPE_FLOAT, offsetof(Evas_Filter_Info_Contrast, adjust) },
300 { NULL, 0, 0 },
301};
302
303static struct fieldinfo *filterfields[] =
304{
305 NULL,
306 blurfields,
307 NULL,
308 NULL,
309 greyfields,
310 brightnessfields,
311 contrastfields,
312};
313
314static Evas_Filter_Info *filter_alloc(Evas_Object *o);
315
316EAPI Eina_Bool
317evas_object_filter_mode_set(Evas_Object *o, Evas_Filter_Mode mode)
318{
319 Evas_Filter_Info *info;
320
321 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
322 return EINA_FALSE;
323 MAGIC_CHECK_END();
324
325 if ((mode != EVAS_FILTER_MODE_OBJECT) && (mode != EVAS_FILTER_MODE_BELOW))
326 return EINA_FALSE;
327
328 if (!o->filter)
329 {
330 filter_alloc(o);
331 }
332 if (!o->filter) return EINA_FALSE;
333 info = o->filter;
334
335 if (info->mode == mode) return EINA_TRUE; /* easy case */
336 info->mode = mode;
337 info->dirty = 1;
338 return EINA_TRUE;
339}
340
341EAPI Evas_Filter_Mode
342evas_object_filter_mode_get(Evas_Object *o)
343{
344 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
345 return EVAS_FILTER_MODE_OBJECT;
346 MAGIC_CHECK_END();
347
348 if (!o->filter) return EVAS_FILTER_MODE_OBJECT;
349 return o->filter->mode;
350}
351
352EAPI Eina_Bool
353evas_object_filter_set(Evas_Object *o, Evas_Filter filter)
354{
355 Evas_Filter_Info *info;
356 struct filterinfo *finfo;
357
358 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
359 return EINA_FALSE;
360 MAGIC_CHECK_END();
361
362 /* force filter to be signed: else gcc complains, but enums may always be
363 * signed */
364 if (((int)filter < (int)EVAS_FILTER_NONE) || (filter > EVAS_FILTER_LAST))
365 return EINA_FALSE;
366
367 /* Don't alloc on no-op */
368 if (!o-filter && filter == EVAS_FILTER_NONE) return EINA_TRUE;
369
370 if (!o->filter) filter_alloc(o);
371 if (!o->filter) return EINA_FALSE;
372
373 info = o->filter;
374
375 if (info->filter == filter) return EINA_TRUE;
376
377 finfo = filterinfo + filter;
378 info->filter = filter;
379 info->dirty = 1;
380 if (info->data)
381 {
382 if (info->data_free)
383 info->data_free(info->data);
384 else
385 free(info->data);
386 }
387 info->datalen = finfo->datasize;
388 if (finfo->datasize)
389 {
390 info->data = calloc(1, finfo->datasize);
391 if (!info->data)
392 {
393 o->filter = EVAS_FILTER_NONE;
394 return EINA_FALSE;
395 }
396 }
397 else
398 info->data = NULL;
399 info->data_free = NULL;
400
401 return EINA_TRUE;
402}
403
404EAPI Evas_Filter
405evas_object_filter_get(Evas_Object *o)
406{
407 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
408 return EVAS_FILTER_NONE;
409 MAGIC_CHECK_END();
410
411 if (!o->filter) return EVAS_FILTER_NONE;
412 return o->filter->filter;
413}
414
415EAPI Eina_Bool
416evas_object_filter_param_int_set(Evas_Object *o, const char *param, int val)
417{
418 char *data;
419 const struct fieldinfo *fields;
420 Eina_Bool found;
421 int i;
422
423 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
424 return EINA_FALSE;
425 MAGIC_CHECK_END();
426
427 if ((!o->filter) || (!o->filter->data)) return EINA_FALSE;
428
429 fields = filterfields[o->filter->filter];
430 data = o->filter->data;
431 found = EINA_FALSE;
432 for (i = 0; fields[i].field; i++)
433 {
434 if (!strcmp(fields[i].field, param))
435 {
436 if (fields[i].type != TYPE_INT) continue;
437 *(int *)(data + fields[i].offset) = val;
438 o->filter->dirty = 1;
439 evas_object_change(o);
440 found = EINA_TRUE;
441 }
442 }
443 return found;
444}
445
446EAPI int
447evas_object_filter_param_int_get(Evas_Object *o, const char *param)
448{
449 char *data;
450 const struct fieldinfo *fields;
451 int val;
452 int i;
453
454 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
455 return -1;
456 MAGIC_CHECK_END();
457
458 if ((!o->filter) || (!o->filter->data)) return -1;
459
460 fields = filterfields[o->filter->filter];
461 if (!fields) return -1;
462 data = o->filter->data;
463
464 for (i = 0; fields[i].field; i++)
465 {
466 if (!strcmp(fields[i].field, param))
467 {
468 if (fields[i].type != TYPE_INT) continue;
469 val = *(int *)(data + fields[i].offset);
470 return val;
471 }
472 }
473 return -1;
474}
475
476EAPI Eina_Bool
477evas_object_filter_param_str_set(Evas_Object *o __UNUSED__,
478 const char *param __UNUSED__,
479 const char *val __UNUSED__)
480{
481 return EINA_FALSE;
482}
483
484EAPI const char *
485evas_object_filter_param_str_get(Evas_Object *o __UNUSED__,
486 const char *param __UNUSED__)
487{
488 return NULL;
489}
490
491EAPI Eina_Bool
492evas_object_filter_param_obj_set(Evas_Object *o __UNUSED__,
493 const char *param __UNUSED__,
494 Evas_Object *val __UNUSED__)
495{
496 return EINA_FALSE;
497}
498
499EAPI Evas_Object *
500evas_object_filter_param_obj_get(Evas_Object *o __UNUSED__,
501 const char *param __UNUSED__)
502{
503 return NULL;
504}
505
506EAPI Eina_Bool
507evas_object_filter_param_float_set(Evas_Object *o, const char *param,
508 double val)
509{
510 char *data;
511 const struct fieldinfo *fields;
512 int i;
513 Eina_Bool rv;
514
515 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
516 return EINA_FALSE;
517 MAGIC_CHECK_END();
518
519 if ((!o->filter) || (!o->filter->data)) return EINA_FALSE;
520
521 rv = EINA_FALSE;
522 fields = filterfields[o->filter->filter];
523 if (!fields) return EINA_FALSE;
524
525 data = o->filter->data;
526
527 for (i = 0; fields[i].field; i++)
528 {
529 if (!strcmp(fields[i].field, param))
530 {
531 if (fields[i].type != TYPE_FLOAT) continue;
532 *(double *)(data + fields[i].offset) = val;
533 o->filter->dirty = 1;
534 o->changed = 1;
535 evas_object_change(o);
536 rv = EINA_TRUE;
537 }
538 }
539 return rv;
540}
541
542EAPI double
543evas_object_filter_param_float_get(Evas_Object *o, const char *param)
544{
545 char *data;
546 const struct fieldinfo *fields;
547 double val;
548 int i;
549
550 MAGIC_CHECK(o, Evas_Object, MAGIC_OBJ);
551 return -1;
552 MAGIC_CHECK_END();
553
554 if ((!o->filter) || (!o->filter->data)) return -1;
555
556 fields = filterfields[o->filter->filter];
557 if (!fields) return -1;
558 data = o->filter->data;
559
560 for (i = 0; fields[i].field; i++)
561 {
562 if (!strcmp(fields[i].field, param))
563 {
564 if (fields[i].type != TYPE_FLOAT) continue;
565 val = *(double *)(data + fields[i].offset);
566 return val;
567 }
568 }
569 return -1;
570}
571
572
573
574
575
576/*
577 * Internal call
578 */
579int
580evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
581 int *outw, int *outh, Eina_Bool inv)
582{
583 if (!info) return -1;
584 if ((!outw) && (!outh)) return 0;
585
586 if (filterinfo[info->filter].sizefn)
587 return filterinfo[info->filter].sizefn(info, inw, inh, outw, outh, inv);
588
589 if (outw) *outw = inw;
590 if (outh) *outh = inh;
591 return 0;
592}
593
594Eina_Bool
595evas_filter_always_alpha(Evas_Filter_Info *info)
596{
597 if (!info) return EINA_FALSE;
598 return filterinfo[info->filter].alwaysalpha;
599}
600
601/*
602 * Another internal call:
603 * Given a filterinfo, generate a unique key for it
604 *
605 * For simple filters, it's just the filter type.
606 * for more complex filters, it's the type, with it's params.
607 *
608 * Note management of the key data is up to the caller, that is it should
609 * probably be freed after use.
610 *
611 * Note the automatic fallback generation places the single byte at the end so
612 * the memcpy will be aligned. Micro-optimisations FTW!
613 *
614 * @param info Filter info to generate from
615 * @param len Length of the buffer returned.
616 * @return key Key buffer
617 */
618uint8_t *
619evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp)
620{
621 struct filterinfo *finfo;
622 uint8_t *key;
623 int len;
624
625 if (!info) return NULL;
626
627 finfo = filterinfo + info->filter;
628 if (finfo->keyfn) return finfo->keyfn(info, lenp);
629
630 len = 1 + finfo->datasize;
631 key = malloc(len);
632 if (!key) return NULL;
633 if (finfo->datasize) memcpy(key, info->data, finfo->datasize);
634 key[finfo->datasize] = info->filter;
635 if (lenp) *lenp = len;
636 return key;
637}
638
639Evas_Software_Filter_Fn
640evas_filter_software_get(Evas_Filter_Info *info)
641{
642 return filterinfo[info->filter].filter;
643}
644
645void
646evas_filter_free(Evas_Object *o)
647{
648 if (!o->filter) return;
649 if (o->filter->key) free(o->filter->key);
650 free(o->filter);
651 o->filter = NULL;
652}
653
654
655
656
657/*
658 * Private calls
659 */
660static Evas_Filter_Info *
661filter_alloc(Evas_Object *o)
662{
663 Evas_Filter_Info *info;
664
665 if (!o) return NULL;
666 info = calloc(1,sizeof(struct Evas_Filter_Info));
667 if (!info) return NULL;
668 info->dirty = 1;
669 info->filter = EVAS_FILTER_NONE;
670 info->mode = EVAS_FILTER_MODE_OBJECT;
671 info->datalen = 0;
672
673 o->filter = info;
674
675 return info;
676}
677
678static int
679blur_size_get(Evas_Filter_Info *info, int inw, int inh, int *outw, int *outh,
680 Eina_Bool inv)
681{
682 Evas_Filter_Info_Blur *blur = info->data;
683
684 if (inv)
685 {
686 if (outw) *outw = MAX(inw - (blur->radius * 2), 0);
687 if (outh) *outh = MAX(inh - (blur->radius * 2), 0);
688 }
689 else
690 {
691 if (outw) *outw = inw + (blur->radius * 2);
692 if (outh) *outh = inh + (blur->radius * 2);
693 }
694 return 0;
695}
696
697/*
698 * Generate a key for the Gaussian generator.
699 *
700 * The size is:
701 * - 1 byte for the type (blur)
702 * - 1 byte for the quality (0-1 -> 0-255)
703 * - 2 bytes for radius (max is 508 anyway)
704 *
705 * @param info Filter info
706 * @param len Length of the returned buffer
707 * @return new buffer
708 */
709static uint8_t *
710gaussian_key_get(const Evas_Filter_Info *info, uint32_t *lenp)
711{
712 struct Evas_Filter_Info_Blur *blur;
713 uint8_t *key;
714
715 if ((!info) || (!info->data)) return NULL;
716 blur = info->data;
717
718 if (lenp) *lenp = 4;
719 key = malloc(4);
720 if (!key) return NULL;
721 key[0] = EVAS_FILTER_BLUR;
722 key[1] = blur->quality * 255;
723 key[2] = blur->radius >> 8;
724 key[3] = blur->radius;
725
726 return key;
727}
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747/**
748 * Software implementations
749 */
750#define all(OP, A, R, G, B, W, I) \
751 do { \
752 A OP A_VAL(I) * W; \
753 R OP R_VAL(I) * W; \
754 G OP G_VAL(I) * W; \
755 B OP B_VAL(I) * W; \
756 } while (0)
757#define wavg(x,n) (((x) / (n)) & 0xff)
758#define wavgd(x,n) ((uint32_t)((x) / (n)) & 0xff)
759
760typedef int (*FilterH)(int, uint32_t *, int, uint32_t *);
761typedef int (*FilterV)(int, uint32_t *, int, int, uint32_t *);
762
763static int gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out);
764static int gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out);
765static int gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out);
766static int gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out);
767static int gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out);
768static int gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out);
769static const uint32_t *gaussian_row_get(int row, int *npoints, uint32_t *weight);
770static const uint64_t *gaussian_row_get64(int row, int *npoints, uint64_t *weight);
771static const double *gaussian_row_getd(int row, int *npoints, double *weight);
772
773static Eina_Bool
774gaussian_filter(Evas_Filter_Info *filter, RGBA_Image *src, RGBA_Image *dst)
775{
776 int i;
777 uint32_t nw, nh;
778 uint32_t *in, *tmp, *out;
779 FilterV filter_v = gaussian_filter_v;
780 FilterH filter_h = gaussian_filter_h;
781 Evas_Filter_Info_Blur *blur;
782 int w, h;
783
784 blur = filter->data;
785
786 /* Use 64 bit version if we are going to overflow */
787 if (blur->radius > 508) /** too big for doubles: Bail out */
788 return EINA_FALSE;
789 else if (blur->radius > 28)
790 {
791 filter_v = gaussian_filter_vd;
792 filter_h = gaussian_filter_hd;
793 }
794 else if (blur->radius > 12)
795 {
796 filter_v = gaussian_filter_v64;
797 filter_h = gaussian_filter_h64;
798 }
799
800 w = src->cache_entry.w;
801 h = src->cache_entry.h;
802 in = src->image.data;
803
804 if (!in) return EINA_FALSE;
805
806 nw = w + (2 * blur->radius);
807 nh = h + (2 * blur->radius);
808
809 out = dst->image.data;
810 if (!out) return EINA_FALSE;
811 tmp = malloc(nw * h * sizeof(uint32_t));
812
813 for (i = 0; i < h; i++)
814 filter_h(blur->radius,in + (i * w), w, tmp + (i * nw));
815
816 for (i = 0; i < (int)nw; i++)
817 filter_v(blur->radius,tmp + i, h, nw, out + i);
818
819 free(tmp);
820 return EINA_TRUE;
821}
822
823/* Blur only horizontally */
824static int
825gaussian_filter_h(int rad, uint32_t *in, int w, uint32_t *out)
826{
827 const uint32_t *points;
828 int npoints = 0;
829 uint32_t weight = 0;
830 int i = 0, k = 0;
831 uint32_t r, g, b, a;
832
833 /* Get twice the radius: even rows have 1 element */
834 points = gaussian_row_get(rad * 2, &npoints, &weight);
835 for (i = -rad; i < (w + rad); i++)
836 {
837 r = g = b = a = 0;
838 for (k = -rad; k <= rad; k++)
839 {
840 if ((k + i) < 0) continue;
841 if ((k + i) >= w) continue;
842 all(+=, a, r, g, b, points[k + rad], in + k + i);
843 }
844 *(out) = ARGB_JOIN(wavg(a, weight),
845 wavg(r, weight),
846 wavg(g, weight),
847 wavg(b, weight));
848 out++;
849 }
850 return 0;
851}
852
853/* Blur only horizontally */
854static int
855gaussian_filter_hd(int rad, uint32_t *in, int w, uint32_t *out)
856{
857 const double *points;
858 int npoints = 0;
859 double weight = 0.0;
860 int i = 0, k = 0;
861 double r, g, b, a;
862
863 /* Get twice the radius: even rows have 1 element */
864 points = gaussian_row_getd(rad * 2, &npoints, &weight);
865 for (i = -rad; i < (w + rad); i++)
866 {
867 r = g = b = a = 0;
868 for (k = -rad; k <= rad; k++)
869 {
870 if ((k + i) < 0) continue;
871 if ((k + i) >= w) continue;
872 all(+=, a, r, g, b, points[k + rad], in + k + i);
873 }
874 *(out) = ARGB_JOIN(wavgd(a, weight),
875 wavgd(r, weight),
876 wavgd(g, weight),
877 wavgd(b, weight));
878 out++;
879 }
880 return 0;
881}
882
883
884/* Blur only horizontally */
885static int
886gaussian_filter_h64(int rad, uint32_t *in, int w, uint32_t *out)
887{
888 const uint64_t *points;
889 int npoints = 0;
890 uint64_t weight = 0;
891 int i = 0, k = 0;
892 uint64_t r, g, b, a;
893
894 /* Get twice the radius: even rows have 1 element */
895 points = gaussian_row_get64(rad * 2, &npoints, &weight);
896 for (i = -rad ; i < w + rad; i ++){
897 r = g = b = a = 0;
898 for (k = -rad ; k <= rad ; k ++){
899 if ((k + i) < 0) continue;
900 if ((k + i) >= w) continue;
901 all(+=, a, r, g, b, points[k + rad], in + k + i);
902 }
903 *(out) = ARGB_JOIN(wavg(a, weight),
904 wavg(r, weight),
905 wavg(g, weight),
906 wavg(b, weight));
907 out++;
908 }
909 return 0;
910}
911
912static int
913gaussian_filter_v(int rad, uint32_t *in, int h, int skip, uint32_t *out)
914{
915 const uint32_t *points;
916 int npoints = 0;
917 uint32_t weight = 0;
918 int i = 0, k = 0;
919 uint32_t r, g, b, a;
920
921 /* Get twice the radius: even rows have 1 element */
922 points = gaussian_row_get(rad * 2, &npoints, &weight);
923 weight = 0;
924 for (i = 0; i < npoints; i++) weight += points[i];
925
926 for (i = -rad; i < (h + rad); i++)
927 {
928 r = g = b = a = 0;
929 for (k = -rad; k <= rad; k++)
930 {
931 if ((k + i) < 0) continue;
932 if ((k + i) >= h) continue;
933 all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i)));
934 }
935 *(out) = ARGB_JOIN(wavg(a, weight),
936 wavg(r, weight),
937 wavg(g, weight),
938 wavg(b, weight));
939 out += skip;
940 }
941 return 0;
942}
943
944static int
945gaussian_filter_v64(int rad, uint32_t *in, int h, int skip, uint32_t *out)
946{
947 const uint64_t *points;
948 int npoints = 0;
949 uint64_t weight;
950 int i = 0, k = 0;
951 uint64_t r, g, b, a;
952
953 /* Get twice the radius: even rows have 1 element */
954 points = gaussian_row_get64(rad * 2, &npoints, &weight);
955 weight = 0;
956 for (i = 0; i < npoints; i++) weight += points[i];
957
958 for (i = -rad; i < (h + rad); i++)
959 {
960 r = g = b = a = 0;
961 for (k = -rad ; k <= rad ; k++)
962 {
963 if ((k + i) < 0) continue;
964 if ((k + i) >= h) continue;
965 all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i)));
966 }
967 *(out) = ARGB_JOIN(wavg(a, weight),
968 wavg(r, weight),
969 wavg(g, weight),
970 wavg(b, weight));
971 out += skip;
972 }
973 return 0;
974}
975
976static int
977gaussian_filter_vd(int rad, uint32_t *in, int h, int skip, uint32_t *out)
978{
979 const double *points;
980 int npoints = 0;
981 double weight = 0.0;
982 int i = 0, k = 0;
983 double r, g, b, a;
984
985 /* Get twice the radius: even rows have 1 element */
986 points = gaussian_row_getd(rad * 2, &npoints, &weight);
987 weight = 0;
988 for (i = 0 ; i < npoints ; i ++) weight += points[i];
989
990 for (i = -rad ; i < h + rad; i ++)
991 {
992 r = g = b = a = 0;
993 for (k = -rad ; k <= rad ; k ++)
994 {
995 if ((k + i) < 0) continue;
996 if ((k + i) >= h) continue;
997 all(+=, a, r, g, b, points[k + rad], in + (skip * (k + i)));
998 }
999 *(out) = ARGB_JOIN(wavgd(a, weight),
1000 wavgd(r, weight),
1001 wavgd(g, weight),
1002 wavgd(b, weight));
1003 out += skip;
1004 }
1005 return 0;
1006}
1007
1008static const uint32_t *
1009gaussian_row_get(int row, int *npoints, uint32_t *weight)
1010{
1011 static uint32_t *points = NULL;
1012 static int last = -1;
1013 static uint32_t lastweight = -1;
1014 int c, k;
1015
1016 if (row < 0) return NULL;
1017
1018 if (npoints) *npoints = row + 1;
1019
1020 if (last == row)
1021 {
1022 if (weight) *weight = lastweight;
1023 return points;
1024 }
1025 if (points) free(points);
1026
1027 points = malloc((row + 1) * sizeof(uint32_t));
1028 if (!points)
1029 {
1030 last = -1;
1031 return NULL;
1032 }
1033 last = row;
1034
1035 c = 1;
1036 for (k = 0; k <= row; k++)
1037 {
1038 points[k] = c;
1039 c = c * (row - k) / (k + 1);
1040 }
1041
1042 for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k];
1043 if (weight) *weight = lastweight;
1044 return points;
1045}
1046
1047static const uint64_t *
1048gaussian_row_get64(int row, int *npoints, uint64_t *weight)
1049{
1050 static uint64_t *points = NULL;
1051 static int last = -1;
1052 static uint64_t lastweight = -1;
1053 uint64_t c;
1054 int k;
1055
1056 if (row < 0) return NULL;
1057
1058 if (npoints) *npoints = row + 1;
1059 if (last == row)
1060 {
1061 if (weight) *weight = lastweight;
1062 return points;
1063 }
1064 if (points) free(points);
1065
1066 points = malloc((row + 1) * sizeof(uint64_t));
1067 if (!points)
1068 {
1069 last = -1;
1070 return NULL;
1071 }
1072 last = row;
1073
1074 c = 1;
1075 for (k = 0; k <= row; k++)
1076 {
1077 points[k] = c;
1078 c = c * (row - k) / (k + 1);
1079 }
1080
1081 for (k = 0, lastweight = 0; k <= row; k ++) lastweight += points[k];
1082 if (weight) *weight = lastweight;
1083
1084 return points;
1085}
1086
1087static const double *
1088gaussian_row_getd(int row, int *npoints, double *weight)
1089{
1090 static double *points = NULL;
1091 static int last = -1;
1092 static double lastweight = -1;
1093 double c;
1094 int k;
1095
1096 if (row < 0) return NULL;
1097
1098 if (last == row)
1099 {
1100 if (weight) *weight = lastweight;
1101 return points;
1102 }
1103
1104 if (points) free(points);
1105 points = malloc((row + 1) * sizeof(double));
1106 if (!points)
1107 {
1108 last = -1;
1109 return NULL;
1110 }
1111 last = row;
1112
1113 if (npoints) *npoints = row + 1;
1114
1115 c = 1;
1116 for (k = 0; k <= row; k++)
1117 {
1118 points[k] = c;
1119 c = c * (row - k) / (k + 1);
1120 }
1121
1122 for (k = 0, lastweight = 0; k <= row; k++) lastweight += points[k];
1123 if (weight) *weight = lastweight;
1124
1125 return points;
1126}
1127
1128#if BUILD_NEON0
1129static Eina_Bool
1130negation_filter_neon(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst)
1131{
1132 uint32_t tmp;
1133
1134 if (src->cache_entry.flags.alpha)
1135 {
1136 // FIXME: not implemented
1137 }
1138 else
1139 {
1140 /* No alpha */
1141#define AP "NEG_FILTER_NA"
1142 asm volatile (
1143
1144 ".fpu neon \n\t"
1145 "vdup.u32 q14, $0xff000000 \n\t"
1146 "vmvn.u32 q15, q1 \n\t"
1147
1148 // fixme: do check for small loops
1149 AP"loopinit: \n\t"
1150 "sub %[tmp], %[e], #31 \n\t"
1151
1152 AP"loop: \n\t"
1153 "vldm %[s]!, {d0,d1,d2,d3} \n\t"
1154 "vand q2, q0, q15 \n\t"
1155 "vand q3, q1, q15 \n\t"
1156 "vand q4, q0, q14 \n\t"
1157 "vand q5, q1, q14 \n\t"
1158 // fixme: can i do this with xor
1159 "cmp %[tmp], %[s] \n\t"
1160
1161 "vmvn q6, q2 \n\t"
1162 "vmvn q7, q3 \n\t"
1163
1164 "vorr q0, q6,q4 \n\t"
1165 "vorr q1, q7,q5 \n\t"
1166
1167 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
1168
1169 "bhi "AP"loop \n\t"
1170
1171 : // no out
1172 : // input
1173 [e] "r" (src->image.data+ src->cache_entry.w*src->cache_entry.h),
1174 [s] "r" (src->image.data),
1175 [tmp] "r" (tmp),
1176 [d] "r" (dst->image.data)
1177 : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q14", "q15",
1178 "memory"
1179 );
1180#undef AP
1181 }
1182 return EINA_TRUE;
1183}
1184#endif
1185
1186static Eina_Bool
1187negation_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst)
1188{
1189 uint32_t *in, *out;
1190 int i,j;
1191 int w,h;
1192 uint32_t a;
1193 uint8_t r,g,b;
1194
1195#if BUILD_NEON0
1196 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON) &&
1197 (!src->cache_entry.flags.alpha))
1198 return negation_filter_neon(info, src, dst);
1199#endif
1200
1201 in = src->image.data;
1202 out = dst->image.data;
1203 w = src->cache_entry.w;
1204 h = src->cache_entry.h;
1205
1206 if (src->cache_entry.flags.alpha)
1207 {
1208 for (i = 0; i < h; i++)
1209 {
1210 for (j = 0; j < w; j++)
1211 {
1212 a = A_VAL(in);
1213 r = R_VAL(in);
1214 g = G_VAL(in);
1215 b = B_VAL(in);
1216 *out = ARGB_JOIN(a, a - r, a - g, a - b);
1217 out++;
1218 in++;
1219 }
1220 }
1221 }
1222 else
1223 {
1224 for (i = 0; i < h; i++)
1225 {
1226 for (j = 0; j < w; j++)
1227 {
1228 a = A_VAL(in);
1229 r = R_VAL(in);
1230 g = G_VAL(in);
1231 b = B_VAL(in);
1232 *out = ARGB_JOIN(a, ~r, ~g, ~b);
1233 out++;
1234 in++;
1235 }
1236 }
1237 }
1238 return EINA_TRUE;
1239 info = NULL;
1240}
1241
1242static Eina_Bool
1243sepia_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst)
1244{
1245 uint32_t *in, *out;
1246 int i, j;
1247 int w, h;
1248 uint32_t a, r, g, b, nr, ng, nb;
1249
1250 in = src->image.data;
1251 out = dst->image.data;
1252 w = src->cache_entry.w;
1253 h = src->cache_entry.h;
1254
1255 for (i = 0; i < h; i++)
1256 {
1257 for (j = 0; j < w; j++)
1258 {
1259 a = A_VAL(in);
1260 r = R_VAL(in);
1261 g = G_VAL(in);
1262 b = B_VAL(in);
1263 nr = ((uint32_t)((r * 0.393) + (g * 0.769) + (b * 0.189)));
1264 ng = ((uint32_t)((r * 0.349) + (g * 0.686) + (b * 0.168)));
1265 nb = ((uint32_t)((r * 0.272) + (g * 0.534) + (b * 0.131)));
1266 if (nr > 255) nr = 255;
1267 if (ng > 255) ng = 255;
1268 if (nb > 255) nb = 255;
1269 *out = ARGB_JOIN(a, nr, ng, nb);
1270 out++;
1271 in++;
1272 }
1273 }
1274
1275 return EINA_TRUE;
1276
1277}
1278
1279static Eina_Bool
1280greyscale_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst)
1281{
1282 uint32_t *in, *out;
1283 int i, j;
1284 int w, h;
1285 uint32_t cur;
1286 uint32_t a, r, g, b;
1287
1288 in = src->image.data;
1289 out = dst->image.data;
1290 w = src->cache_entry.w;
1291 h = src->cache_entry.h;
1292
1293 if (src->cache_entry.flags.alpha)
1294 {
1295 for (i = 0; i < h; i++)
1296 {
1297 for (j = 0; j < w; j++)
1298 {
1299 a = A_VAL(in);
1300 r = R_VAL(in);
1301 g = G_VAL(in);
1302 b = B_VAL(in);
1303 cur = (r * 0.3) + (g * 0.59) + (b * 0.11);
1304 *out = ARGB_JOIN(a, r, g, b);
1305 out++;
1306 in++;
1307 }
1308 }
1309 }
1310 else
1311 {
1312 for (i = 0 ; i < h ; i ++)
1313 {
1314 for (j = 0; j < w ; j ++)
1315 {
1316 r = R_VAL(in);
1317 g = G_VAL(in);
1318 b = B_VAL(in);
1319 cur = r * 0.3 + g * 0.59 + b * 0.11;
1320 *out = ARGB_JOIN(255, r, g, b);
1321 out++;
1322 in++;
1323 }
1324 }
1325 }
1326 return EINA_TRUE;
1327}
1328
1329static Eina_Bool
1330brightness_filter(Evas_Filter_Info *info, RGBA_Image *src, RGBA_Image *dst)
1331{
1332 uint32_t *in, *out;
1333 int i, j;
1334 int w, h;
1335 int a,r,g,b;
1336 int delta;
1337 int adjdelta;
1338 Evas_Filter_Info_Brightness *bness;
1339
1340 in = src->image.data;
1341 out = dst->image.data;
1342 w = src->cache_entry.w;
1343 h = src->cache_entry.h;
1344 bness = info->data;
1345
1346 delta = bness->adjust * 255;
1347 if (delta > 255)
1348 delta = 255;
1349 else if (delta < -255)
1350 delta = -255;
1351
1352 /* Note we could optimise the -255, 0 and 255 cases, but why would people
1353 * be doing that */
1354 if (delta >= 0)
1355 {
1356 for (i = 0; i < h; i++)
1357 {
1358 for (j = 0; j < w; j++)
1359 {
1360 a = A_VAL(in);
1361 r = R_VAL(in);
1362 g = G_VAL(in);
1363 b = B_VAL(in);
1364 adjdelta = (a * delta) >> 8;
1365 r = MIN(r + adjdelta, a);
1366 g = MIN(g + adjdelta, a);
1367 b = MIN(b + adjdelta, a);
1368 *out = ARGB_JOIN(a, r ,g, b);
1369 out++;
1370 in++;
1371 }
1372 }
1373 }
1374 else
1375 {
1376 /* Delta negative */
1377 for (i = 0; i < h; i++)
1378 {
1379 for (j = 0; j < w; j++)
1380 {
1381 a = A_VAL(in);
1382 r = R_VAL(in);
1383 g = G_VAL(in);
1384 b = B_VAL(in);
1385 adjdelta = (a * delta) >> 8;
1386 r = MAX(r + adjdelta, 0);
1387 g = MAX(g + adjdelta, 0);
1388 b = MAX(b + adjdelta, 0);
1389 *out = ARGB_JOIN(a, r ,g, b);
1390 out++;
1391 in++;
1392 }
1393 }
1394 }
1395
1396 return EINA_TRUE;
1397
1398}
1399
1400static Eina_Bool
1401contrast_filter(Evas_Filter_Info *info __UNUSED__, RGBA_Image *src, RGBA_Image *dst)
1402{
1403 uint32_t *in, *out;
1404 int i, j;
1405 int w, h;
1406
1407 in = src->image.data;
1408 out = dst->image.data;
1409 w = src->cache_entry.w;
1410 h = src->cache_entry.h;
1411
1412 for (i = 0; i < h; i++)
1413 {
1414 for (j = 0; j < w; j++)
1415 {
1416 // FIXME: not even implemented
1417 out++;
1418 in++;
1419 }
1420 }
1421
1422 return EINA_TRUE;
1423
1424}
1425#endif
1426
1427/* 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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* private calls */
5
6/* local calls */
7
8/* public calls */
9
10EAPI void
11evas_object_focus_set(Evas_Object *obj, Eina_Bool focus)
12{
13 int event_id = 0;
14 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
15 return;
16 MAGIC_CHECK_END();
17
18 _evas_object_event_new();
19
20 event_id = _evas_event_counter;
21 if (focus)
22 {
23 if (obj->focused) goto end;
24 if (obj->layer->evas->focused)
25 evas_object_focus_set(obj->layer->evas->focused, 0);
26 obj->focused = 1;
27 obj->layer->evas->focused = obj;
28 evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_IN, NULL, event_id);
29 evas_event_callback_call(obj->layer->evas,
30 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_IN, obj);
31 }
32 else
33 {
34 if (!obj->focused) goto end;
35 obj->focused = 0;
36 obj->layer->evas->focused = NULL;
37 evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, event_id);
38 evas_event_callback_call(obj->layer->evas,
39 EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT, obj);
40 }
41 end:
42 _evas_post_event_callback_call(obj->layer->evas);
43}
44
45EAPI Eina_Bool
46evas_object_focus_get(const Evas_Object *obj)
47{
48 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
49 return 0;
50 MAGIC_CHECK_END();
51 return obj->focused;
52}
53
54EAPI Evas_Object *
55evas_focus_get(const Evas *e)
56{
57 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
58 return NULL;
59 MAGIC_CHECK_END();
60 return e->focused;
61}
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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#ifdef HAVE_EVIL
6# include <Evil.h>
7#endif
8
9#ifdef BUILD_FONT_LOADER_EET
10#include <Eet.h>
11#endif
12
13#ifdef HAVE_FONTCONFIG
14#include <fontconfig/fontconfig.h>
15#endif
16
17#include "evas_common.h"
18#include "evas_private.h"
19
20/* font dir cache */
21static Eina_Hash *font_dirs = NULL;
22static Eina_List *fonts_cache = NULL;
23static Eina_List *fonts_zero = NULL;
24
25typedef struct _Fndat Fndat;
26
27struct _Fndat
28{
29 Evas_Font_Description *fdesc;
30 const char *source;
31 Evas_Font_Size size;
32 Evas_Font_Set *font;
33 int ref;
34 Font_Rend_Flags wanted_rend;
35
36#ifdef HAVE_FONTCONFIG
37 FcFontSet *set;
38 FcPattern *p_nm;
39#endif
40};
41
42/* private methods for font dir cache */
43static Eina_Bool font_cache_dir_free(const Eina_Hash *hash, const void *key, void *data, void *fdata);
44static Evas_Font_Dir *object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd);
45static Evas_Font *object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font);
46static Evas_Font *object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font);
47static Evas_Font *object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font);
48static Evas_Font *object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font);
49static Evas_Font_Dir *object_text_font_cache_dir_add(char *dir);
50static void object_text_font_cache_dir_del(char *dir, Evas_Font_Dir *fd);
51static int evas_object_text_font_string_parse(char *buffer, char dest[14][256]);
52
53#ifdef HAVE_FONTCONFIG
54static int fc_init = 0;
55#endif
56
57void
58evas_font_dir_cache_free(void)
59{
60 if (!font_dirs) return;
61
62 eina_hash_foreach(font_dirs, font_cache_dir_free, NULL);
63 eina_hash_free(font_dirs);
64 font_dirs = NULL;
65
66#ifdef HAVE_FONTCONFIG
67/* this is bad i got a:
68 * fccache.c:512: FcCacheFini: Assertion fcCacheChains[i] == ((void *)0)' failed.
69 *
70 * all i can do for now is shut this puppy down. butthat breaks, so disable
71 * it as in reality - there is little reason to care about the memory not
72 * being freed etc.
73 *
74 * fc_init--;
75 * if (fc_init == 0) FcFini();
76 */
77#endif
78}
79
80const char *
81evas_font_dir_cache_find(char *dir, char *font)
82{
83 Evas_Font_Dir *fd = NULL;
84
85 if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL);
86 else fd = eina_hash_find(font_dirs, dir);
87 fd = object_text_font_cache_dir_update(dir, fd);
88 if (fd)
89 {
90 Evas_Font *fn;
91
92 fn = object_text_font_cache_font_find(fd, font);
93 if (fn)
94 {
95 return fn->path;
96 }
97 }
98 return NULL;
99}
100
101static Eina_List *
102evas_font_set_get(const char *name)
103{
104 Eina_List *fonts = NULL;
105 char *p;
106
107 p = strchr(name, ',');
108 if (!p)
109 {
110 fonts = eina_list_append(fonts, eina_stringshare_add(name));
111 }
112 else
113 {
114 const char *pp;
115 char *nm;
116
117 pp = name;
118 while (p)
119 {
120 nm = alloca(p - pp + 1);
121 strncpy(nm, pp, p - pp);
122 nm[p - pp] = 0;
123 fonts = eina_list_append(fonts, eina_stringshare_add(nm));
124 pp = p + 1;
125 p = strchr(pp, ',');
126 if (!p) fonts = eina_list_append(fonts, eina_stringshare_add(pp));
127 }
128 }
129 return fonts;
130}
131
132void
133evas_fonts_zero_free(Evas *evas)
134{
135 Fndat *fd;
136
137 EINA_LIST_FREE(fonts_zero, fd)
138 {
139 if (fd->fdesc) evas_font_desc_unref(fd->fdesc);
140 if (fd->source) eina_stringshare_del(fd->source);
141 evas->engine.func->font_free(evas->engine.data.output, fd->font);
142#ifdef HAVE_FONTCONFIG
143 if (fd->set) FcFontSetDestroy(fd->set);
144 if (fd->p_nm) FcPatternDestroy(fd->p_nm);
145#endif
146 free(fd);
147 }
148}
149
150void
151evas_fonts_zero_presure(Evas *evas)
152{
153 Fndat *fd;
154
155 while (fonts_zero
156 && eina_list_count(fonts_zero) > 4) /* 4 is arbitrary */
157 {
158 fd = eina_list_data_get(fonts_zero);
159
160 if (fd->ref != 0) break;
161 fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
162
163 if (fd->fdesc) evas_font_desc_unref(fd->fdesc);
164 if (fd->source) eina_stringshare_del(fd->source);
165 evas->engine.func->font_free(evas->engine.data.output, fd->font);
166#ifdef HAVE_FONTCONFIG
167 if (fd->set) FcFontSetDestroy(fd->set);
168 if (fd->p_nm) FcPatternDestroy(fd->p_nm);
169#endif
170 free(fd);
171
172 if (eina_list_count(fonts_zero) < 5) break;
173 }
174}
175
176void
177evas_font_free(Evas *evas, void *font)
178{
179 Eina_List *l;
180 Fndat *fd;
181
182 EINA_LIST_FOREACH(fonts_cache, l, fd)
183 {
184 if (fd->font == font)
185 {
186 fd->ref--;
187 if (fd->ref == 0)
188 {
189 fonts_cache = eina_list_remove_list(fonts_cache, l);
190 fonts_zero = eina_list_append(fonts_zero, fd);
191 }
192 break;
193 }
194 }
195 while (fonts_zero
196 && eina_list_count(fonts_zero) > 42) /* 42 is arbitrary */
197 {
198 fd = eina_list_data_get(fonts_zero);
199
200 if (fd->ref != 0) break;
201 fonts_zero = eina_list_remove_list(fonts_zero, fonts_zero);
202
203 if (fd->fdesc) evas_font_desc_unref(fd->fdesc);
204 if (fd->source) eina_stringshare_del(fd->source);
205 evas->engine.func->font_free(evas->engine.data.output, fd->font);
206#ifdef HAVE_FONTCONFIG
207 if (fd->set) FcFontSetDestroy(fd->set);
208 if (fd->p_nm) FcPatternDestroy(fd->p_nm);
209#endif
210 free(fd);
211
212 if (eina_list_count(fonts_zero) < 43) break;
213 }
214}
215
216static void
217evas_font_init(void)
218{
219 static int done = 0;
220 if (done) return;
221 done = 1;
222#ifdef HAVE_FONTCONFIG
223 fc_init++;
224 if (fc_init == 1)
225 {
226 FcInit();
227 FcConfigEnableHome(1);
228 }
229#endif
230}
231
232#ifdef HAVE_FONTCONFIG
233static Evas_Font_Set *
234evas_load_fontconfig(Evas *evas, FcFontSet *set, int size,
235 Font_Rend_Flags wanted_rend)
236{
237 Evas_Font_Set *font = NULL;
238 int i;
239
240 /* Do loading for all in family */
241 for (i = 0; i < set->nfont; i++)
242 {
243 FcValue filename;
244
245 FcPatternGet(set->fonts[i], FC_FILE, 0, &filename);
246
247 if (font)
248 evas->engine.func->font_add(evas->engine.data.output, font, (char *)filename.u.s, size, wanted_rend);
249 else
250 font = evas->engine.func->font_load(evas->engine.data.output, (char *)filename.u.s, size, wanted_rend);
251 }
252
253 return font;
254}
255#endif
256
257#ifdef HAVE_FONTCONFIG
258/* In sync with Evas_Font_Style, Evas_Font_Weight and Evas_Font_Width */
259static int _fc_slant_map[] =
260{
261 FC_SLANT_ROMAN,
262 FC_SLANT_OBLIQUE,
263 FC_SLANT_ITALIC
264};
265
266static int _fc_weight_map[] =
267{
268 FC_WEIGHT_NORMAL,
269 FC_WEIGHT_THIN,
270 FC_WEIGHT_ULTRALIGHT,
271 FC_WEIGHT_LIGHT,
272 FC_WEIGHT_BOOK,
273 FC_WEIGHT_MEDIUM,
274 FC_WEIGHT_SEMIBOLD,
275 FC_WEIGHT_BOLD,
276 FC_WEIGHT_ULTRABOLD,
277 FC_WEIGHT_BLACK,
278 FC_WEIGHT_EXTRABLACK
279};
280
281# ifdef FC_WIDTH
282static int _fc_width_map[] =
283{
284 FC_WIDTH_NORMAL,
285 FC_WIDTH_ULTRACONDENSED,
286 FC_WIDTH_EXTRACONDENSED,
287 FC_WIDTH_CONDENSED,
288 FC_WIDTH_SEMICONDENSED,
289 FC_WIDTH_SEMIEXPANDED,
290 FC_WIDTH_EXPANDED,
291 FC_WIDTH_EXTRAEXPANDED,
292 FC_WIDTH_ULTRAEXPANDED
293};
294# endif
295
296#endif
297
298struct _Style_Map
299{
300 const char *name;
301 int type;
302};
303typedef struct _Style_Map Style_Map;
304
305static Style_Map _style_width_map[] =
306{
307 {"normal", EVAS_FONT_WIDTH_NORMAL},
308 {"ultracondensed", EVAS_FONT_WIDTH_ULTRACONDENSED},
309 {"extracondensed", EVAS_FONT_WIDTH_EXTRACONDENSED},
310 {"condensed", EVAS_FONT_WIDTH_CONDENSED},
311 {"semicondensed", EVAS_FONT_WIDTH_SEMICONDENSED},
312 {"semiexpanded", EVAS_FONT_WIDTH_SEMIEXPANDED},
313 {"expanded", EVAS_FONT_WIDTH_EXPANDED},
314 {"extraexpanded", EVAS_FONT_WIDTH_EXTRAEXPANDED},
315 {"ultraexpanded", EVAS_FONT_WIDTH_ULTRAEXPANDED},
316};
317
318static Style_Map _style_weight_map[] =
319{
320 {"normal", EVAS_FONT_WEIGHT_NORMAL},
321 {"thin", EVAS_FONT_WEIGHT_THIN},
322 {"ultralight", EVAS_FONT_WEIGHT_ULTRALIGHT},
323 {"light", EVAS_FONT_WEIGHT_LIGHT},
324 {"book", EVAS_FONT_WEIGHT_BOOK},
325 {"medium", EVAS_FONT_WEIGHT_MEDIUM},
326 {"semibold", EVAS_FONT_WEIGHT_SEMIBOLD},
327 {"bold", EVAS_FONT_WEIGHT_BOLD},
328 {"ultrabold", EVAS_FONT_WEIGHT_ULTRABOLD},
329 {"black", EVAS_FONT_WEIGHT_BLACK},
330 {"extrablack", EVAS_FONT_WEIGHT_EXTRABLACK}
331};
332
333static Style_Map _style_slant_map[] =
334{
335 {"normal", EVAS_FONT_SLANT_NORMAL},
336 {"oblique", EVAS_FONT_SLANT_OBLIQUE},
337 {"italic", EVAS_FONT_SLANT_ITALIC}
338};
339
340#define _STYLE_MAP_LEN(x) (sizeof(x) / sizeof(*(x)))
341/**
342 * @internal
343 * Find a certain attribute from the map in the style.
344 * @return the index of the found one.
345 */
346static int
347_evas_font_style_find_internal(const char *style, const char *style_end,
348 Style_Map _map[], size_t map_len)
349{
350 size_t i;
351 while (style < style_end)
352 {
353 for (i = 0 ; i < map_len ; i++)
354 {
355 size_t len;
356 const char *cur = _map[i].name;
357 len = strlen(cur);
358 if (!strncasecmp(style, cur, len) &&
359 (!cur[len] || (cur[len] == ' ')))
360 {
361 return _map[i].type;
362 }
363 }
364 style = strchr(style, ' ');
365 if (!style)
366 break;
367
368 while (*style && (*style == ' '))
369 style++;
370 }
371 return 0;
372}
373
374int
375evas_font_style_find(const char *start, const char *end,
376 Evas_Font_Style style)
377{
378#define _RET_STYLE(x) \
379 return _evas_font_style_find_internal(start, end, \
380 _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map));
381 switch (style)
382 {
383 case EVAS_FONT_STYLE_SLANT:
384 _RET_STYLE(slant);
385 case EVAS_FONT_STYLE_WEIGHT:
386 _RET_STYLE(weight);
387 case EVAS_FONT_STYLE_WIDTH:
388 _RET_STYLE(width);
389 default:
390 return 0;
391 }
392#undef _RET_STYLE
393}
394
395void
396evas_font_desc_unref(Evas_Font_Description *fdesc)
397{
398 if (--(fdesc->ref) == 0)
399 {
400 eina_stringshare_del(fdesc->name);
401 eina_stringshare_del(fdesc->fallbacks);
402 eina_stringshare_del(fdesc->lang);
403 free(fdesc);
404 }
405}
406
407Evas_Font_Description *
408evas_font_desc_ref(Evas_Font_Description *fdesc)
409{
410 fdesc->ref++;
411 return fdesc;
412}
413
414Evas_Font_Description *
415evas_font_desc_new(void)
416{
417 Evas_Font_Description *fdesc;
418 fdesc = calloc(1, sizeof(*fdesc));
419 fdesc->ref = 1;
420 fdesc->is_new = EINA_TRUE;
421
422 return fdesc;
423}
424
425Evas_Font_Description *
426evas_font_desc_dup(const Evas_Font_Description *fdesc)
427{
428 Evas_Font_Description *new;
429 new = evas_font_desc_new();
430 memcpy(new, fdesc, sizeof(*new));
431 new->ref = 1;
432 new->is_new = EINA_TRUE;
433 new->name = eina_stringshare_ref(new->name);
434
435 return new;
436}
437
438int
439evas_font_desc_cmp(const Evas_Font_Description *a,
440 const Evas_Font_Description *b)
441{
442 /* FIXME: Do actual comparison, i.e less than and bigger than. */
443 return !((a->name == b->name) && (a->weight == b->weight) &&
444 (a->slant == b->slant) && (a->width == b->width) &&
445 (a->lang == b->lang));
446}
447
448void
449evas_font_name_parse(Evas_Font_Description *fdesc, const char *name)
450{
451 const char *end;
452
453 end = strchr(name, ':');
454 if (!end)
455 eina_stringshare_replace(&(fdesc->name), name);
456 else
457 eina_stringshare_replace_length(&(fdesc->name), name, end - name);
458
459 while (end)
460 {
461 const char *tend;
462 name = end;
463 end = strchr(end + 1, ':');
464 if (!end)
465 tend = name + strlen(name);
466 else
467 tend = end;
468
469 if (!strncmp(name, ":style=", 7))
470 {
471#define _SET_STYLE(x) \
472 fdesc->x = _evas_font_style_find_internal(name + 7, tend, \
473 _style_##x##_map, _STYLE_MAP_LEN(_style_##x##_map));
474 _SET_STYLE(slant);
475 _SET_STYLE(weight);
476 _SET_STYLE(width);
477#undef _SET_STYLE
478 }
479 else if (!strncmp(name, ":lang=", 6))
480 {
481 const char *tmp = name + 6;
482 eina_stringshare_replace_length(&(fdesc->lang), tmp, tend - tmp);
483 }
484 }
485}
486
487void *
488evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size)
489{
490#ifdef HAVE_FONTCONFIG
491 FcPattern *p_nm = NULL;
492 FcFontSet *set = NULL;
493#endif
494
495 Evas_Font_Set *font = NULL;
496 Eina_List *fonts, *l;
497 Fndat *fd;
498 char *nm;
499 Font_Rend_Flags wanted_rend = 0;
500
501 if (!fdesc) return NULL;
502 fdesc->is_new = EINA_FALSE;
503
504 if (fdesc->slant != EVAS_FONT_SLANT_NORMAL)
505 wanted_rend |= FONT_REND_SLANT;
506 if (fdesc->weight == EVAS_FONT_WEIGHT_BOLD)
507 wanted_rend |= FONT_REND_WEIGHT;
508
509 evas_font_init();
510
511 EINA_LIST_FOREACH(fonts_cache, l, fd)
512 {
513 if (!evas_font_desc_cmp(fdesc, fd->fdesc))
514 {
515 if (((!source) && (!fd->source)) ||
516 ((source) && (fd->source) && (!strcmp(source, fd->source))))
517 {
518 if ((size == fd->size) &&
519 (wanted_rend == fd->wanted_rend))
520 {
521 fonts_cache = eina_list_promote_list(fonts_cache, l);
522 fd->ref++;
523 return fd->font;
524 }
525#ifdef HAVE_FONTCONFIG
526 else if (fd->set && fd->p_nm)
527 {
528 font = evas_load_fontconfig(evas, fd->set, size,
529 wanted_rend);
530 goto on_find;
531 }
532#endif
533 }
534 }
535 }
536
537 EINA_LIST_FOREACH(fonts_zero, l, fd)
538 {
539 if (!evas_font_desc_cmp(fdesc, fd->fdesc))
540 {
541 if (((!source) && (!fd->source)) ||
542 ((source) && (fd->source) && (!strcmp(source, fd->source))))
543 {
544 if ((size == fd->size) &&
545 (wanted_rend == fd->wanted_rend))
546 {
547 fonts_zero = eina_list_remove_list(fonts_zero, l);
548 fonts_cache = eina_list_prepend(fonts_cache, fd);
549 fd->ref++;
550 return fd->font;
551 }
552#ifdef HAVE_FONTCONFIG
553 else if (fd->set && fd->p_nm)
554 {
555 font = evas_load_fontconfig(evas, fd->set, size,
556 wanted_rend);
557 goto on_find;
558 }
559#endif
560 }
561 }
562 }
563
564 fonts = evas_font_set_get(fdesc->name);
565 EINA_LIST_FOREACH(fonts, l, nm) /* Load each font in append */
566 {
567 if (l == fonts || !font) /* First iteration OR no font */
568 {
569#ifdef BUILD_FONT_LOADER_EET
570 if (source) /* Load Font from "eet" source */
571 {
572 Eet_File *ef;
573 char *fake_name;
574
575 fake_name = evas_file_path_join(source, nm);
576 if (fake_name)
577 {
578 font = evas->engine.func->font_load(evas->engine.data.output, fake_name, size, wanted_rend);
579 if (!font) /* Load from fake name failed, probably not cached */
580 {
581 /* read original!!! */
582 ef = eet_open(source, EET_FILE_MODE_READ);
583 if (ef)
584 {
585 void *fdata;
586 int fsize = 0;
587
588 fdata = eet_read(ef, nm, &fsize);
589 if ((fdata) && (fsize > 0))
590 {
591 font = evas->engine.func->font_memory_load(evas->engine.data.output, fake_name, size, fdata, fsize, wanted_rend);
592 free(fdata);
593 }
594 eet_close(ef);
595 }
596 }
597 free(fake_name);
598 }
599 }
600 if (!font) /* Source load failed */
601 {
602#endif
603 if (evas_file_path_is_full_path((char *)nm)) /* Try filename */
604 font = evas->engine.func->font_load(evas->engine.data.output, (char *)nm, size, wanted_rend);
605 else /* search font path */
606 {
607 Eina_List *ll;
608 char *dir;
609
610 EINA_LIST_FOREACH(evas->font_path, ll, dir)
611 {
612 const char *f_file;
613
614 f_file = evas_font_dir_cache_find(dir, (char *)nm);
615 if (f_file)
616 {
617 font = evas->engine.func->font_load(evas->engine.data.output, f_file, size, wanted_rend);
618 if (font) break;
619 }
620 }
621 }
622#ifdef BUILD_FONT_LOADER_EET
623 }
624#endif
625 }
626 else /* Base font loaded, append others */
627 {
628#ifdef BUILD_FONT_LOADER_EET
629 void *ok = NULL;
630
631 if (source)
632 {
633 Eet_File *ef;
634 char *fake_name;
635
636 fake_name = evas_file_path_join(source, nm);
637 if (fake_name)
638 {
639 /* FIXME: make an engine func */
640 if (!evas->engine.func->font_add(evas->engine.data.output, font, fake_name, size, wanted_rend))
641 {
642 /* read original!!! */
643 ef = eet_open(source, EET_FILE_MODE_READ);
644 if (ef)
645 {
646 void *fdata;
647 int fsize = 0;
648
649 fdata = eet_read(ef, nm, &fsize);
650 if ((fdata) && (fsize > 0))
651 {
652 ok = evas->engine.func->font_memory_add(evas->engine.data.output, font, fake_name, size, fdata, fsize, wanted_rend);
653 free(fdata);
654 }
655 eet_close(ef);
656 }
657 }
658 else
659 ok = (void *)1;
660 free(fake_name);
661 }
662 }
663 if (!ok)
664 {
665#endif
666 if (evas_file_path_is_full_path((char *)nm))
667 evas->engine.func->font_add(evas->engine.data.output, font, (char *)nm, size, wanted_rend);
668 else
669 {
670 Eina_List *ll;
671 char *dir;
672
673 EINA_LIST_FOREACH(evas->font_path, ll, dir)
674 {
675 const char *f_file;
676
677 f_file = evas_font_dir_cache_find(dir, (char *)nm);
678 if (f_file)
679 {
680 if (evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, wanted_rend))
681 break;
682 }
683 }
684 }
685#ifdef BUILD_FONT_LOADER_EET
686 }
687#endif
688 }
689 eina_stringshare_del(nm);
690 }
691 fonts = eina_list_free(fonts);
692
693#ifdef HAVE_FONTCONFIG
694 if (!font) /* Search using fontconfig */
695 {
696 FcResult res;
697
698 p_nm = FcPatternBuild (NULL,
699 FC_WEIGHT, FcTypeInteger, _fc_weight_map[fdesc->weight],
700 FC_SLANT, FcTypeInteger, _fc_slant_map[fdesc->slant],
701#ifdef FC_WIDTH
702 FC_WIDTH, FcTypeInteger, _fc_width_map[fdesc->width],
703#endif
704 NULL);
705 FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) fdesc->name);
706
707 /* Handle font fallbacks */
708 if (fdesc->fallbacks)
709 {
710 while (1)
711 {
712 const char *start, *end;
713 start = fdesc->fallbacks;
714 end = strchr(start, ',');
715 if (end)
716 {
717 char *tmp = alloca((end - start) + 1);
718 strncpy(tmp, start, end - start);
719 tmp[end - start] = 0;
720 FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) tmp);
721 }
722 else
723 {
724 FcPatternAddString (p_nm, FC_FAMILY, (FcChar8*) start);
725 break;
726 }
727 }
728 }
729
730 if (fdesc->lang)
731 FcPatternAddString (p_nm, FC_LANG, (FcChar8 *) fdesc->lang);
732
733 FcConfigSubstitute(NULL, p_nm, FcMatchPattern);
734 FcDefaultSubstitute(p_nm);
735
736 /* do matching */
737 set = FcFontSort(NULL, p_nm, FcTrue, NULL, &res);
738 if (!set)
739 {
740 ERR("No fontconfig font matches '%s'. It was the last resource, no font found!", fdesc->name);
741 FcPatternDestroy(p_nm);
742 p_nm = NULL;
743 }
744 else
745 {
746 font = evas_load_fontconfig(evas, set, size, wanted_rend);
747 }
748 }
749#endif
750
751#ifdef HAVE_FONTCONFIG
752 on_find:
753#endif
754 fd = calloc(1, sizeof(Fndat));
755 if (fd)
756 {
757 fd->fdesc = evas_font_desc_ref(fdesc);
758 if (source) fd->source = eina_stringshare_add(source);
759 fd->font = font;
760 fd->wanted_rend = wanted_rend;
761 fd->size = size;
762 fd->ref = 1;
763 fonts_cache = eina_list_prepend(fonts_cache, fd);
764#ifdef HAVE_FONTCONFIG
765 fd->set = set;
766 fd->p_nm = p_nm;
767#endif
768 }
769
770 if (font)
771 evas->engine.func->font_hinting_set(evas->engine.data.output, font,
772 evas->hinting);
773 return font;
774}
775
776void
777evas_font_load_hinting_set(Evas *evas, void *font, int hinting)
778{
779 evas->engine.func->font_hinting_set(evas->engine.data.output, font,
780 hinting);
781}
782
783Eina_List *
784evas_font_dir_available_list(const Evas *evas)
785{
786 Eina_List *l;
787 Eina_List *ll;
788 Eina_List *available = NULL;
789 char *dir;
790
791#ifdef HAVE_FONTCONFIG
792 /* Add font config fonts */
793 FcPattern *p;
794 FcFontSet *set = NULL;
795 FcObjectSet *os;
796 int i;
797
798 evas_font_init();
799
800 p = FcPatternCreate();
801 os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL);
802
803 if (p && os) set = FcFontList(NULL, p, os);
804
805 if (p) FcPatternDestroy(p);
806 if (os) FcObjectSetDestroy(os);
807
808 if (set)
809 {
810 for (i = 0; i < set->nfont; i++)
811 {
812 char *font;
813
814 font = (char *)FcNameUnparse(set->fonts[i]);
815 available = eina_list_append(available, eina_stringshare_add(font));
816 free(font);
817 }
818
819 FcFontSetDestroy(set);
820 }
821#endif
822
823 /* Add fonts in evas font_path*/
824 if (!evas->font_path)
825 return available;
826
827 if (!font_dirs) font_dirs = eina_hash_string_superfast_new(NULL);
828
829 EINA_LIST_FOREACH(evas->font_path, l, dir)
830 {
831 Evas_Font_Dir *fd;
832
833 fd = eina_hash_find(font_dirs, dir);
834 fd = object_text_font_cache_dir_update(dir, fd);
835 if (fd && fd->aliases)
836 {
837 Evas_Font_Alias *fa;
838
839 EINA_LIST_FOREACH(fd->aliases, ll, fa)
840 available = eina_list_append(available, eina_stringshare_add((char *)fa->alias));
841 }
842 }
843
844 return available;
845}
846
847void
848evas_font_dir_available_list_free(Eina_List *available)
849{
850 while (available)
851 {
852 eina_stringshare_del(available->data);
853 available = eina_list_remove(available, available->data);
854 }
855}
856
857/* private stuff */
858static Eina_Bool
859font_cache_dir_free(const Eina_Hash *hash __UNUSED__, const void *key, void *data, void *fdata __UNUSED__)
860{
861 object_text_font_cache_dir_del((char *) key, data);
862 return 1;
863}
864
865static Evas_Font_Dir *
866object_text_font_cache_dir_update(char *dir, Evas_Font_Dir *fd)
867{
868 DATA64 mt;
869 char *tmp;
870
871 if (fd)
872 {
873 mt = evas_file_modified_time(dir);
874 if (mt != fd->dir_mod_time)
875 {
876 object_text_font_cache_dir_del(dir, fd);
877 eina_hash_del(font_dirs, dir, fd);
878 }
879 else
880 {
881 tmp = evas_file_path_join(dir, "fonts.dir");
882 if (tmp)
883 {
884 mt = evas_file_modified_time(tmp);
885 free(tmp);
886 if (mt != fd->fonts_dir_mod_time)
887 {
888 object_text_font_cache_dir_del(dir, fd);
889 eina_hash_del(font_dirs, dir, fd);
890 }
891 else
892 {
893 tmp = evas_file_path_join(dir, "fonts.alias");
894 if (tmp)
895 {
896 mt = evas_file_modified_time(tmp);
897 free(tmp);
898 }
899 if (mt != fd->fonts_alias_mod_time)
900 {
901 object_text_font_cache_dir_del(dir, fd);
902 eina_hash_del(font_dirs, dir, fd);
903 }
904 else
905 return fd;
906 }
907 }
908 }
909 }
910 return object_text_font_cache_dir_add(dir);
911}
912
913static Evas_Font *
914object_text_font_cache_font_find_x(Evas_Font_Dir *fd, char *font)
915{
916 Eina_List *l;
917 char font_prop[14][256];
918 int num;
919 Evas_Font *fn;
920
921 num = evas_object_text_font_string_parse(font, font_prop);
922 if (num != 14) return NULL;
923 EINA_LIST_FOREACH(fd->fonts, l, fn)
924 {
925 if (fn->type == 1)
926 {
927 int i;
928 int match = 0;
929
930 for (i = 0; i < 14; i++)
931 {
932 if ((font_prop[i][0] == '*') && (font_prop[i][1] == 0))
933 match++;
934 else
935 {
936 if (!strcasecmp(font_prop[i], fn->x.prop[i])) match++;
937 else break;
938 }
939 }
940 if (match == 14) return fn;
941 }
942 }
943 return NULL;
944}
945
946static Evas_Font *
947object_text_font_cache_font_find_file(Evas_Font_Dir *fd, char *font)
948{
949 Eina_List *l;
950 Evas_Font *fn;
951
952 EINA_LIST_FOREACH(fd->fonts, l, fn)
953 {
954 if (fn->type == 0)
955 {
956 if (!strcasecmp(font, fn->simple.name)) return fn;
957 }
958 }
959 return NULL;
960}
961
962static Evas_Font *
963object_text_font_cache_font_find_alias(Evas_Font_Dir *fd, char *font)
964{
965 Eina_List *l;
966 Evas_Font_Alias *fa;
967
968 EINA_LIST_FOREACH(fd->aliases, l, fa)
969 if (!strcasecmp(fa->alias, font)) return fa->fn;
970 return NULL;
971}
972
973static Evas_Font *
974object_text_font_cache_font_find(Evas_Font_Dir *fd, char *font)
975{
976 Evas_Font *fn;
977
978 fn = eina_hash_find(fd->lookup, font);
979 if (fn) return fn;
980 fn = object_text_font_cache_font_find_alias(fd, font);
981 if (!fn) fn = object_text_font_cache_font_find_x(fd, font);
982 if (!fn) fn = object_text_font_cache_font_find_file(fd, font);
983 if (!fn) return NULL;
984 eina_hash_add(fd->lookup, font, fn);
985 return fn;
986}
987
988static Evas_Font_Dir *
989object_text_font_cache_dir_add(char *dir)
990{
991 Evas_Font_Dir *fd;
992 char *tmp, *tmp2;
993 Eina_List *fdir;
994 Evas_Font *fn;
995
996 fd = calloc(1, sizeof(Evas_Font_Dir));
997 if (!fd) return NULL;
998 fd->lookup = eina_hash_string_superfast_new(NULL);
999
1000 eina_hash_add(font_dirs, dir, fd);
1001
1002 /* READ fonts.alias, fonts.dir and directory listing */
1003
1004 /* fonts.dir */
1005 tmp = evas_file_path_join(dir, "fonts.dir");
1006 if (tmp)
1007 {
1008 FILE *f;
1009
1010 f = fopen(tmp, "rb");
1011 if (f)
1012 {
1013 int num;
1014 char fname[4096], fdef[4096];
1015
1016 if (fscanf(f, "%i\n", &num) != 1) goto cant_read;
1017 /* read font lines */
1018 while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2)
1019 {
1020 char font_prop[14][256];
1021 int i;
1022
1023 /* skip comments */
1024 if ((fdef[0] == '!') || (fdef[0] == '#')) continue;
1025 /* parse font def */
1026 num = evas_object_text_font_string_parse((char *)fdef, font_prop);
1027 if (num == 14)
1028 {
1029 fn = calloc(1, sizeof(Evas_Font));
1030 if (fn)
1031 {
1032 fn->type = 1;
1033 for (i = 0; i < 14; i++)
1034 fn->x.prop[i] = eina_stringshare_add(font_prop[i]);
1035 tmp2 = evas_file_path_join(dir, fname);
1036 if (tmp2)
1037 {
1038 fn->path = eina_stringshare_add(tmp2);
1039 free(tmp2);
1040 }
1041 fd->fonts = eina_list_append(fd->fonts, fn);
1042 }
1043 }
1044 }
1045 cant_read: ;
1046 fclose(f);
1047 }
1048 free(tmp);
1049 }
1050
1051 /* directoy listing */
1052 fdir = evas_file_path_list(dir, "*.ttf", 0);
1053 while (fdir)
1054 {
1055 tmp = evas_file_path_join(dir, fdir->data);
1056 if (tmp)
1057 {
1058 fn = calloc(1, sizeof(Evas_Font));
1059 if (fn)
1060 {
1061 char *p;
1062
1063 fn->type = 0;
1064 tmp2 = alloca(strlen(fdir->data) + 1);
1065 strcpy(tmp2, fdir->data);
1066 p = strrchr(tmp2, '.');
1067 if (p) *p = 0;
1068 fn->simple.name = eina_stringshare_add(tmp2);
1069 tmp2 = evas_file_path_join(dir, fdir->data);
1070 if (tmp2)
1071 {
1072 fn->path = eina_stringshare_add(tmp2);
1073 free(tmp2);
1074 }
1075 fd->fonts = eina_list_append(fd->fonts, fn);
1076 }
1077 free(tmp);
1078 }
1079 free(fdir->data);
1080 fdir = eina_list_remove(fdir, fdir->data);
1081 }
1082
1083 /* fonts.alias */
1084 tmp = evas_file_path_join(dir, "fonts.alias");
1085 if (tmp)
1086 {
1087 FILE *f;
1088
1089 f = fopen(tmp, "rb");
1090 if (f)
1091 {
1092 char fname[4096], fdef[4096];
1093
1094 /* read font alias lines */
1095 while (fscanf(f, "%4090s %[^\n]\n", fname, fdef) == 2)
1096 {
1097 Evas_Font_Alias *fa;
1098
1099 /* skip comments */
1100 if ((fname[0] == '!') || (fname[0] == '#')) continue;
1101 fa = calloc(1, sizeof(Evas_Font_Alias));
1102 if (fa)
1103 {
1104 fa->alias = eina_stringshare_add(fname);
1105 fa->fn = object_text_font_cache_font_find_x(fd, fdef);
1106 if ((!fa->alias) || (!fa->fn))
1107 {
1108 if (fa->alias) eina_stringshare_del(fa->alias);
1109 free(fa);
1110 }
1111 else
1112 fd->aliases = eina_list_append(fd->aliases, fa);
1113 }
1114 }
1115 fclose(f);
1116 }
1117 free(tmp);
1118 }
1119
1120 fd->dir_mod_time = evas_file_modified_time(dir);
1121 tmp = evas_file_path_join(dir, "fonts.dir");
1122 if (tmp)
1123 {
1124 fd->fonts_dir_mod_time = evas_file_modified_time(tmp);
1125 free(tmp);
1126 }
1127 tmp = evas_file_path_join(dir, "fonts.alias");
1128 if (tmp)
1129 {
1130 fd->fonts_alias_mod_time = evas_file_modified_time(tmp);
1131 free(tmp);
1132 }
1133
1134 return fd;
1135}
1136
1137static void
1138object_text_font_cache_dir_del(char *dir __UNUSED__, Evas_Font_Dir *fd)
1139{
1140 if (fd->lookup) eina_hash_free(fd->lookup);
1141 while (fd->fonts)
1142 {
1143 Evas_Font *fn;
1144 int i;
1145
1146 fn = fd->fonts->data;
1147 fd->fonts = eina_list_remove(fd->fonts, fn);
1148 for (i = 0; i < 14; i++)
1149 {
1150 if (fn->x.prop[i]) eina_stringshare_del(fn->x.prop[i]);
1151 }
1152 if (fn->simple.name) eina_stringshare_del(fn->simple.name);
1153 if (fn->path) eina_stringshare_del(fn->path);
1154 free(fn);
1155 }
1156 while (fd->aliases)
1157 {
1158 Evas_Font_Alias *fa;
1159
1160 fa = fd->aliases->data;
1161 fd->aliases = eina_list_remove(fd->aliases, fa);
1162 if (fa->alias) eina_stringshare_del(fa->alias);
1163 free(fa);
1164 }
1165 free(fd);
1166}
1167
1168static int
1169evas_object_text_font_string_parse(char *buffer, char dest[14][256])
1170{
1171 char *p;
1172 int n, m, i;
1173
1174 n = 0;
1175 m = 0;
1176 p = buffer;
1177 if (p[0] != '-') return 0;
1178 i = 1;
1179 while (p[i])
1180 {
1181 dest[n][m] = p[i];
1182 if ((p[i] == '-') || (m == 255))
1183 {
1184 dest[n][m] = 0;
1185 n++;
1186 m = -1;
1187 }
1188 i++;
1189 m++;
1190 if (n == 14) return n;
1191 }
1192 dest[n][m] = 0;
1193 n++;
1194 return n;
1195}
1196
1197EAPI void
1198evas_font_path_clear(Evas *e)
1199{
1200 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1201 return;
1202 MAGIC_CHECK_END();
1203 while (e->font_path)
1204 {
1205 eina_stringshare_del(e->font_path->data);
1206 e->font_path = eina_list_remove(e->font_path, e->font_path->data);
1207 }
1208}
1209
1210EAPI void
1211evas_font_path_append(Evas *e, const char *path)
1212{
1213 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1214 return;
1215 MAGIC_CHECK_END();
1216
1217 if (!path) return;
1218 e->font_path = eina_list_append(e->font_path, eina_stringshare_add(path));
1219}
1220
1221EAPI void
1222evas_font_path_prepend(Evas *e, const char *path)
1223{
1224 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1225 return;
1226 MAGIC_CHECK_END();
1227
1228 if (!path) return;
1229 e->font_path = eina_list_prepend(e->font_path, eina_stringshare_add(path));
1230}
1231
1232EAPI const Eina_List *
1233evas_font_path_list(const Evas *e)
1234{
1235 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1236 return NULL;
1237 MAGIC_CHECK_END();
1238 return e->font_path;
1239}
1240
1241static void
1242evas_font_object_rehint(Evas_Object *obj)
1243{
1244 if (obj->smart.smart)
1245 {
1246 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj)
1247 evas_font_object_rehint(obj);
1248 }
1249 else
1250 {
1251 if (!strcmp(obj->type, "text"))
1252 _evas_object_text_rehint(obj);
1253 if (!strcmp(obj->type, "textblock"))
1254 _evas_object_textblock_rehint(obj);
1255 }
1256}
1257
1258EAPI void
1259evas_font_hinting_set(Evas *e, Evas_Font_Hinting_Flags hinting)
1260{
1261 Evas_Layer *lay;
1262
1263 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1264 return;
1265 MAGIC_CHECK_END();
1266 if (e->hinting == hinting) return;
1267 e->hinting = hinting;
1268
1269 EINA_INLIST_FOREACH(e->layers, lay)
1270 {
1271 Evas_Object *obj;
1272
1273 EINA_INLIST_FOREACH(lay->objects, obj)
1274 evas_font_object_rehint(obj);
1275 }
1276}
1277
1278EAPI Evas_Font_Hinting_Flags
1279evas_font_hinting_get(const Evas *e)
1280{
1281 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1282 return EVAS_FONT_HINTING_BYTECODE;
1283 MAGIC_CHECK_END();
1284 return e->hinting;
1285}
1286
1287EAPI Eina_Bool
1288evas_font_hinting_can_hint(const Evas *e, Evas_Font_Hinting_Flags hinting)
1289{
1290 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1291 return 0;
1292 MAGIC_CHECK_END();
1293 if (e->engine.func->font_hinting_can_hint)
1294 return e->engine.func->font_hinting_can_hint(e->engine.data.output,
1295 hinting);
1296 return EINA_FALSE;
1297}
1298
1299EAPI void
1300evas_font_cache_flush(Evas *e)
1301{
1302 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1303 return;
1304 MAGIC_CHECK_END();
1305
1306 e->engine.func->font_cache_flush(e->engine.data.output);
1307}
1308
1309EAPI void
1310evas_font_cache_set(Evas *e, int size)
1311{
1312 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1313 return;
1314 MAGIC_CHECK_END();
1315
1316 if (size < 0) size = 0;
1317 e->engine.func->font_cache_set(e->engine.data.output, size);
1318}
1319
1320EAPI int
1321evas_font_cache_get(const Evas *e)
1322{
1323 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1324 return 0;
1325 MAGIC_CHECK_END();
1326
1327 return e->engine.func->font_cache_get(e->engine.data.output);
1328}
1329
1330EAPI Eina_List *
1331evas_font_available_list(const Evas *e)
1332{
1333 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1334 return NULL;
1335 MAGIC_CHECK_END();
1336
1337 return evas_font_dir_available_list(e);
1338}
1339
1340EAPI void
1341evas_font_available_list_free(Evas *e, Eina_List *available)
1342{
1343 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1344 return;
1345 MAGIC_CHECK_END();
1346
1347 evas_font_dir_available_list_free(available);
1348}
1349
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 @@
1/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
2#include "evas_common.h"
3#include "evas_private.h"
4#include "Evas_GL.h"
5
6struct _Evas_GL
7{
8 DATA32 magic;
9 Evas *evas;
10
11 Eina_List *contexts;
12 Eina_List *surfaces;
13};
14
15struct _Evas_GL_Context
16{
17 void *data;
18};
19
20struct _Evas_GL_Surface
21{
22 void *data;
23};
24
25EAPI Evas_GL *
26evas_gl_new(Evas *e)
27{
28 Evas_GL *evas_gl;
29
30 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
31 return NULL;
32 MAGIC_CHECK_END();
33
34 evas_gl = calloc(1, sizeof(Evas_GL));
35 if (!evas_gl) return NULL;
36
37 evas_gl->magic = MAGIC_EVAS_GL;
38 evas_gl->evas = e;
39
40 if (!evas_gl->evas->engine.func->gl_context_create)
41 {
42 ERR("GL engine not available\n");
43 free(evas_gl);
44 return NULL;
45 }
46
47 return evas_gl;
48}
49
50EAPI void
51evas_gl_free(Evas_GL *evas_gl)
52{
53 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
54 return;
55 MAGIC_CHECK_END();
56
57
58 // Delete undeleted surfaces
59 while (evas_gl->surfaces)
60 evas_gl_surface_destroy(evas_gl, evas_gl->surfaces->data);
61
62 // Delete undeleted contexts
63 while (evas_gl->contexts)
64 evas_gl_context_destroy(evas_gl, evas_gl->contexts->data);
65
66 evas_gl->magic = 0;
67 free(evas_gl);
68}
69
70EAPI Evas_GL_Config *
71evas_gl_config_new()
72{
73 Evas_GL_Config *cfg;
74
75 cfg = calloc(1, sizeof(Evas_GL_Config));
76
77 if (!cfg) return NULL;
78
79 return cfg;
80}
81
82EAPI void
83evas_gl_config_free(Evas_GL_Config *cfg)
84{
85 if (cfg) free(cfg);
86}
87
88EAPI Evas_GL_Surface *
89evas_gl_surface_create(Evas_GL *evas_gl, Evas_GL_Config *config, int width, int height)
90{
91 Evas_GL_Surface *surf;
92
93 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
94 return NULL;
95 MAGIC_CHECK_END();
96
97 if (!config)
98 {
99 ERR("Invalid Config\n");
100 return NULL;
101 }
102
103 surf = calloc(1, sizeof(Evas_GL_Surface));
104
105 if (!surf) return NULL;
106
107 surf->data = evas_gl->evas->engine.func->gl_surface_create(evas_gl->evas->engine.data.output, config, width, height);
108
109 if (!surf->data)
110 {
111 ERR("Failed creating a surface from the engine\n");
112 free(surf);
113 return NULL;
114 }
115
116 // Keep track of the surface creations
117 evas_gl->surfaces = eina_list_prepend(evas_gl->surfaces, surf);
118
119 return surf;
120}
121
122EAPI void
123evas_gl_surface_destroy(Evas_GL *evas_gl, Evas_GL_Surface *surf)
124{
125 // Magic
126 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
127 return;
128 MAGIC_CHECK_END();
129
130 if (!surf)
131 {
132 ERR("Trying to destroy a NULL surface pointer!\n");
133 return;
134 }
135
136 // Call Engine's Surface Destroy
137 evas_gl->evas->engine.func->gl_surface_destroy(evas_gl->evas->engine.data.output, surf->data);
138
139 // Remove it from the list
140 evas_gl->surfaces = eina_list_remove(evas_gl->surfaces, surf);
141
142 // Delete the object
143 free(surf);
144 surf = NULL;
145}
146
147EAPI Evas_GL_Context *
148evas_gl_context_create(Evas_GL *evas_gl, Evas_GL_Context *share_ctx)
149{
150 Evas_GL_Context *ctx;
151
152 // Magic
153 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
154 return NULL;
155 MAGIC_CHECK_END();
156
157 // Allocate a context object
158 ctx = calloc(1, sizeof(Evas_GL_Context));
159 if (!ctx)
160 {
161 ERR("Unable to create a Evas_GL_Context object\n");
162 return NULL;
163 }
164
165 // Call engine->gl_create_context
166 if (share_ctx)
167 {
168 ctx->data = evas_gl->evas->engine.func->gl_context_create(evas_gl->evas->engine.data.output, share_ctx->data);
169 }
170 else
171 {
172 ctx->data = evas_gl->evas->engine.func->gl_context_create(evas_gl->evas->engine.data.output, NULL);
173 }
174
175 // Set a few variables
176 if (!ctx->data)
177 {
178 ERR("Failed creating a context from the engine\n");
179 free(ctx);
180 return NULL;
181 }
182
183 // Keep track of the context creations
184 evas_gl->contexts = eina_list_prepend(evas_gl->contexts, ctx);
185
186 return ctx;
187
188}
189
190EAPI void
191evas_gl_context_destroy(Evas_GL *evas_gl, Evas_GL_Context *ctx)
192{
193
194 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
195 return;
196 MAGIC_CHECK_END();
197
198 if (!ctx)
199 {
200 ERR("Trying to destroy a NULL context pointer!\n");
201 return;
202 }
203
204 // Call Engine's destroy
205 evas_gl->evas->engine.func->gl_context_destroy(evas_gl->evas->engine.data.output, ctx->data);
206
207 // Remove it from the list
208 evas_gl->contexts = eina_list_remove(evas_gl->contexts, ctx);
209
210 // Delete the object
211 free(ctx);
212 ctx = NULL;
213}
214
215EAPI Eina_Bool
216evas_gl_make_current(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_GL_Context *ctx)
217{
218 Eina_Bool ret;
219
220 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
221 return EINA_FALSE;
222 MAGIC_CHECK_END();
223
224 if ((!surf) || (!ctx))
225 ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, NULL, NULL);
226 else
227 ret = (Eina_Bool)evas_gl->evas->engine.func->gl_make_current(evas_gl->evas->engine.data.output, surf->data, ctx->data);
228
229 return ret;
230}
231
232EAPI const char *
233evas_gl_string_query(Evas_GL *evas_gl, int name)
234{
235 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
236 return EINA_FALSE;
237 MAGIC_CHECK_END();
238
239 return (const char *)evas_gl->evas->engine.func->gl_string_query(evas_gl->evas->engine.data.output, name);
240}
241
242EAPI Evas_GL_Func
243evas_gl_proc_address_get(Evas_GL *evas_gl, const char *name)
244{
245 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
246 return EINA_FALSE;
247 MAGIC_CHECK_END();
248
249 return (Evas_GL_Func)evas_gl->evas->engine.func->gl_proc_address_get(evas_gl->evas->engine.data.output, name);
250}
251
252EAPI Eina_Bool
253evas_gl_native_surface_get(Evas_GL *evas_gl, Evas_GL_Surface *surf, Evas_Native_Surface *ns)
254{
255 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
256 return EINA_FALSE;
257 MAGIC_CHECK_END();
258
259 return (Eina_Bool)evas_gl->evas->engine.func->gl_native_surface_get(evas_gl->evas->engine.data.output, surf->data, ns);
260}
261
262
263EAPI Evas_GL_API *
264evas_gl_api_get(Evas_GL *evas_gl)
265{
266 MAGIC_CHECK(evas_gl, Evas_GL, MAGIC_EVAS_GL);
267 return NULL;
268 MAGIC_CHECK_END();
269
270 return (Evas_GL_API*)evas_gl->evas->engine.func->gl_api_get(evas_gl->evas->engine.data.output);
271
272}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* private calls */
5
6static int
7evas_key_modifier_number(const Evas_Modifier *m, const char *keyname)
8{
9 int i;
10
11 for (i = 0; i < m->mod.count; i++)
12 {
13 if (!strcmp(m->mod.list[i], keyname)) return i;
14 }
15 return -1;
16}
17
18static int
19evas_key_lock_number(const Evas_Lock *l, const char *keyname)
20{
21 int i;
22
23 for (i = 0; i < l->lock.count; i++)
24 {
25 if (!strcmp(l->lock.list[i], keyname)) return i;
26 }
27 return -1;
28}
29
30/* local calls */
31
32/* public calls */
33
34EAPI const Evas_Modifier *
35evas_key_modifier_get(const Evas *e)
36{
37 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
38 return NULL;
39 MAGIC_CHECK_END();
40 return &(e->modifiers);
41}
42
43EAPI const Evas_Lock *
44evas_key_lock_get(const Evas *e)
45{
46 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
47 return NULL;
48 MAGIC_CHECK_END();
49 return &(e->locks);
50}
51
52EAPI Eina_Bool
53evas_key_modifier_is_set(const Evas_Modifier *m, const char *keyname)
54{
55 Evas_Modifier_Mask num;
56 int n;
57
58 if (!m) return 0;
59 if (!keyname) return 0;
60 n = evas_key_modifier_number(m, keyname);
61 if (n < 0) return 0;
62 num = (Evas_Modifier_Mask)n;
63 num = 1 << num;
64 if (m->mask & num) return 1;
65 return 0;
66}
67
68EAPI Eina_Bool
69evas_key_lock_is_set(const Evas_Lock *l, const char *keyname)
70{
71 Evas_Modifier_Mask num;
72 int n;
73
74 if (!l) return 0;
75 if (!keyname) return 0;
76 n = evas_key_lock_number(l, keyname);
77 if (n < 0) return 0;
78 num = (Evas_Modifier_Mask)n;
79 num = 1 << num;
80 if (l->mask & num) return 1;
81 return 0;
82}
83
84EAPI void
85evas_key_modifier_add(Evas *e, const char *keyname)
86{
87 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
88 return;
89 MAGIC_CHECK_END();
90 if (!keyname) return;
91 if (e->modifiers.mod.count >= 64) return;
92 evas_key_modifier_del(e, keyname);
93 e->modifiers.mod.count++;
94 e->modifiers.mod.list = realloc(e->modifiers.mod.list, e->modifiers.mod.count * sizeof(char *));
95 e->modifiers.mod.list[e->modifiers.mod.count - 1] = strdup(keyname);
96 e->modifiers.mask = 0;
97}
98
99EAPI void
100evas_key_modifier_del(Evas *e, const char *keyname)
101{
102 int i;
103
104 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
105 return;
106 MAGIC_CHECK_END();
107 if (!keyname) return;
108 for (i = 0; i < e->modifiers.mod.count; i++)
109 {
110 if (!strcmp(e->modifiers.mod.list[i], keyname))
111 {
112 int j;
113
114 free(e->modifiers.mod.list[i]);
115 e->modifiers.mod.count--;
116 for (j = i; j < e->modifiers.mod.count; j++)
117 e->modifiers.mod.list[j] = e->modifiers.mod.list[j + 1];
118 e->modifiers.mask = 0;
119 return;
120 }
121 }
122}
123
124EAPI void
125evas_key_lock_add(Evas *e, const char *keyname)
126{
127 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
128 return;
129 MAGIC_CHECK_END();
130 if (!keyname) return;
131 if (e->locks.lock.count >= 64) return;
132 evas_key_lock_del(e, keyname);
133 e->locks.lock.count++;
134 e->locks.lock.list = realloc(e->locks.lock.list, e->locks.lock.count * sizeof(char *));
135 e->locks.lock.list[e->locks.lock.count - 1] = strdup(keyname);
136 e->locks.mask = 0;
137}
138
139EAPI void
140evas_key_lock_del(Evas *e, const char *keyname)
141{
142 int i;
143
144 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
145 return;
146 MAGIC_CHECK_END();
147 if (!keyname) return;
148 e->locks.mask = 0;
149 for (i = 0; i < e->locks.lock.count; i++)
150 {
151 if (!strcmp(e->locks.lock.list[i], keyname))
152 {
153 int j;
154
155 free(e->locks.lock.list[i]);
156 e->locks.lock.count--;
157 for (j = i; j < e->locks.lock.count; j++)
158 e->locks.lock.list[j] = e->locks.lock.list[j + 1];
159 e->locks.mask = 0;
160 return;
161 }
162 }
163}
164
165EAPI void
166evas_key_modifier_on(Evas *e, const char *keyname)
167{
168 Evas_Modifier_Mask num;
169 int n;
170
171 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
172 return;
173 MAGIC_CHECK_END();
174 n = (Evas_Modifier_Mask)evas_key_modifier_number(&(e->modifiers), keyname);
175 if (n < 0) return;
176 num = (Evas_Modifier_Mask)n;
177 num = 1 << num;
178 e->modifiers.mask |= num;
179}
180
181EAPI void
182evas_key_modifier_off(Evas *e, const char *keyname)
183{
184 Evas_Modifier_Mask num;
185 int n;
186
187 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
188 return;
189 MAGIC_CHECK_END();
190 n = evas_key_modifier_number(&(e->modifiers), keyname);
191 if (n < 0) return;
192 num = (Evas_Modifier_Mask)n;
193 num = 1 << num;
194 e->modifiers.mask &= ~num;
195}
196
197EAPI void
198evas_key_lock_on(Evas *e, const char *keyname)
199{
200 Evas_Modifier_Mask num;
201 int n;
202
203 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
204 return;
205 MAGIC_CHECK_END();
206 n = evas_key_lock_number(&(e->locks), keyname);
207 if (n < 0) return;
208 num = (Evas_Modifier_Mask)n;
209 num = 1 << num;
210 e->locks.mask |= num;
211}
212
213EAPI void
214evas_key_lock_off(Evas *e, const char *keyname)
215{
216 Evas_Modifier_Mask num;
217 int n;
218
219 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
220 return;
221 MAGIC_CHECK_END();
222 n = evas_key_lock_number(&(e->locks), keyname);
223 if (n < 0) return;
224 num = (Evas_Modifier_Mask)n;
225 num = 1 << num;
226 e->locks.mask &= ~num;
227}
228
229/* errr need to add key grabbing/ungrabbing calls - missing modifier stuff. */
230
231EAPI Evas_Modifier_Mask
232evas_key_modifier_mask_get(const Evas *e, const char *keyname)
233{
234 Evas_Modifier_Mask num;
235 int n;
236
237 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
238 return 0;
239 MAGIC_CHECK_END();
240 if (!keyname) return 0;
241 n = evas_key_modifier_number(&(e->modifiers), keyname);
242 if (n < 0) return 0;
243 num = (Evas_Modifier_Mask)n;
244 return 1 << num;
245}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* private calls */
5
6/* FIXME: this is not optimal, but works. i should have a hash of keys per */
7/* Evas and then a linked lists of grabs for that key and what */
8/* modifiers/not_modifers they use */
9
10static 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);
11static 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);
12
13static Evas_Key_Grab *
14evas_key_grab_new(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
15{
16 /* MEM OK */
17 Evas_Key_Grab *g;
18
19 g = evas_mem_calloc(sizeof(Evas_Key_Grab));
20 if (!g) return NULL;
21 g->object = obj;
22 g->modifiers = modifiers;
23 g->not_modifiers = not_modifiers;
24 g->exclusive = exclusive;
25 g->keyname = strdup(keyname);
26 if (obj->layer->evas->walking_grabs)
27 g->just_added = EINA_TRUE;
28 if (!g->keyname)
29 {
30 if (!evas_mem_free(strlen(keyname) + 1))
31 {
32 free(g);
33 return NULL;
34 }
35 g->keyname = strdup(keyname);
36 if (!g->keyname)
37 {
38 free(g);
39 return NULL;
40 }
41 }
42 g->object->grabs = eina_list_append(g->object->grabs, g);
43 if (eina_error_get())
44 {
45 MERR_BAD();
46 evas_mem_free(sizeof(Eina_List));
47 g->object->grabs = eina_list_append(g->object->grabs, g);
48 if (eina_error_get())
49 {
50 MERR_FATAL();
51 free(g->keyname);
52 free(g);
53 return NULL;
54 }
55 }
56 obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g);
57 if (eina_error_get())
58 {
59 MERR_BAD();
60 evas_mem_free(sizeof(Eina_List));
61 obj->layer->evas->grabs = eina_list_append(obj->layer->evas->grabs, g);
62 if (eina_error_get())
63 {
64 MERR_FATAL();
65 g->object->grabs = eina_list_remove(g->object->grabs, g);
66 free(g->keyname);
67 free(g);
68 return NULL;
69 }
70 }
71 return g;
72}
73
74static Evas_Key_Grab *
75evas_key_grab_find(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
76{
77 /* MEM OK */
78 Eina_List *l;
79 Evas_Key_Grab *g;
80
81 EINA_LIST_FOREACH(obj->layer->evas->grabs, l, g)
82 {
83 if ((g->modifiers == modifiers) &&
84 (g->not_modifiers == not_modifiers) &&
85 (!strcmp(g->keyname, keyname)))
86 {
87 if ((exclusive) || (obj == g->object)) return g;
88 }
89 }
90 return NULL;
91}
92
93/* local calls */
94
95void
96evas_object_grabs_cleanup(Evas_Object *obj)
97{
98 if (obj->layer->evas->walking_grabs)
99 {
100 Eina_List *l;
101 Evas_Key_Grab *g;
102
103 EINA_LIST_FOREACH(obj->grabs, l, g)
104 g->delete_me = EINA_TRUE;
105 }
106 else
107 {
108 while (obj->grabs)
109 {
110 Evas_Key_Grab *g = obj->grabs->data;
111 if (g->keyname) free(g->keyname);
112 free(g);
113 obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs,
114 g);
115 obj->grabs = eina_list_remove(obj->grabs, g);
116 }
117 }
118}
119
120void
121evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
122{
123 /* MEM OK */
124 Evas_Key_Grab *g;
125
126 g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0);
127 if (!g) return;
128 g->object->grabs = eina_list_remove(g->object->grabs, g);
129 obj->layer->evas->grabs = eina_list_remove(obj->layer->evas->grabs, g);
130 if (g->keyname) free(g->keyname);
131 free(g);
132}
133
134/* public calls */
135
136EAPI Eina_Bool
137evas_object_key_grab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Eina_Bool exclusive)
138{
139 /* MEM OK */
140 Evas_Key_Grab *g;
141
142 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
143 return EINA_FALSE;
144 MAGIC_CHECK_END();
145 if (!keyname) return EINA_FALSE;
146 if (exclusive)
147 {
148 g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers,
149 exclusive);
150 if (g) return EINA_FALSE;
151 }
152 g = evas_key_grab_new(obj, keyname, modifiers, not_modifiers, exclusive);
153 if (!g) return EINA_FALSE;
154 return EINA_TRUE;
155}
156
157EAPI void
158evas_object_key_ungrab(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers)
159{
160 /* MEM OK */
161 Evas_Key_Grab *g;
162
163 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
164 return;
165 MAGIC_CHECK_END();
166 if (!keyname) return;
167 g = evas_key_grab_find(obj, keyname, modifiers, not_modifiers, 0);
168 if (!g) return;
169 if (g->object->layer->evas->walking_grabs)
170 {
171 if (!g->delete_me)
172 {
173 g->object->layer->evas->delete_grabs++;
174 g->delete_me = EINA_TRUE;
175 }
176 }
177 else
178 evas_key_grab_free(g->object, keyname, modifiers, not_modifiers);
179}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4static void _evas_layer_free(Evas_Layer *lay);
5
6void
7evas_object_inject(Evas_Object *obj, Evas *e)
8{
9 Evas_Layer *lay;
10
11 if (obj->in_layer) return;
12 lay = evas_layer_find(e, obj->cur.layer);
13 if (!lay)
14 {
15 lay = evas_layer_new(e);
16 lay->layer = obj->cur.layer;
17 evas_layer_add(lay);
18 }
19 lay->objects = (Evas_Object *)eina_inlist_append(EINA_INLIST_GET(lay->objects), EINA_INLIST_GET(obj));
20 lay->usage++;
21 obj->layer = lay;
22 obj->in_layer = 1;
23}
24
25void
26evas_object_release(Evas_Object *obj, int clean_layer)
27{
28 if (!obj->in_layer) return;
29 obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
30 obj->layer->usage--;
31 if (clean_layer)
32 {
33 if (obj->layer->usage <= 0)
34 {
35 evas_layer_del(obj->layer);
36 _evas_layer_free(obj->layer);
37 }
38 }
39 obj->layer = NULL;
40 obj->in_layer = 0;
41}
42
43Evas_Layer *
44evas_layer_new(Evas *e)
45{
46 Evas_Layer *lay;
47
48 lay = calloc(1, sizeof(Evas_Layer));
49 if (!lay) return NULL;
50 lay->evas = e;
51 return lay;
52}
53
54static void
55_evas_layer_free(Evas_Layer *lay)
56{
57 free(lay);
58}
59
60void
61evas_layer_pre_free(Evas_Layer *lay)
62{
63 Evas_Object *obj;
64
65 EINA_INLIST_FOREACH(lay->objects, obj)
66 {
67 if ((!obj->smart.parent) && (!obj->delete_me))
68 evas_object_del(obj);
69 }
70}
71
72void
73evas_layer_free_objects(Evas_Layer *lay)
74{
75 while (lay->objects)
76 {
77 Evas_Object *obj;
78
79 obj = (Evas_Object *)lay->objects;
80 evas_object_free(obj, 0);
81 }
82}
83
84void
85evas_layer_clean(Evas *e)
86{
87 Evas_Layer *tmp;
88
89 while (e->layers)
90 {
91 tmp = e->layers;
92 evas_layer_del(tmp);
93 _evas_layer_free(tmp);
94 }
95}
96
97Evas_Layer *
98evas_layer_find(Evas *e, short layer_num)
99{
100 Evas_Layer *layer;
101
102 EINA_INLIST_FOREACH(e->layers, layer)
103 {
104 if (layer->layer == layer_num) return layer;
105 }
106 return NULL;
107}
108
109void
110evas_layer_add(Evas_Layer *lay)
111{
112 Evas_Layer *layer;
113
114 EINA_INLIST_FOREACH(lay->evas->layers, layer)
115 {
116 if (layer->layer > lay->layer)
117 {
118 lay->evas->layers = (Evas_Layer *)eina_inlist_prepend_relative(EINA_INLIST_GET(lay->evas->layers),
119 EINA_INLIST_GET(lay),
120 EINA_INLIST_GET(layer));
121 return;
122 }
123 }
124 lay->evas->layers = (Evas_Layer *)eina_inlist_append(EINA_INLIST_GET(lay->evas->layers), EINA_INLIST_GET(lay));
125}
126
127void
128evas_layer_del(Evas_Layer *lay)
129{
130 Evas *e;
131
132 e = lay->evas;
133 e->layers = (Evas_Layer *)eina_inlist_remove(EINA_INLIST_GET(e->layers), EINA_INLIST_GET(lay));
134}
135
136/* public functions */
137
138EAPI void
139evas_object_layer_set(Evas_Object *obj, short l)
140{
141 Evas *e;
142
143 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
144 return;
145 MAGIC_CHECK_END();
146 if (obj->delete_me) return;
147 if (evas_object_intercept_call_layer_set(obj, l)) return;
148 if (obj->smart.parent) return;
149 if (obj->cur.layer == l)
150 {
151 evas_object_raise(obj);
152 return;
153 }
154 e = obj->layer->evas;
155 evas_object_release(obj, 1);
156 obj->cur.layer = l;
157 evas_object_inject(obj, e);
158 obj->restack = 1;
159 evas_object_change(obj);
160 if (obj->clip.clipees)
161 {
162 evas_object_inform_call_restack(obj);
163 return;
164 }
165 evas_object_change(obj);
166 if (!obj->smart.smart)
167 {
168 if (evas_object_is_in_output_rect(obj,
169 obj->layer->evas->pointer.x,
170 obj->layer->evas->pointer.y, 1, 1) &&
171 obj->cur.visible)
172 if (eina_list_data_find(obj->layer->evas->pointer.object.in, obj))
173 evas_event_feed_mouse_move(obj->layer->evas,
174 obj->layer->evas->pointer.x,
175 obj->layer->evas->pointer.y,
176 obj->layer->evas->last_timestamp,
177 NULL);
178 }
179 evas_object_inform_call_restack(obj);
180}
181
182EAPI short
183evas_object_layer_get(const Evas_Object *obj)
184{
185 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
186 return 0;
187 MAGIC_CHECK_END();
188 if (obj->smart.parent)
189 {
190 return obj->smart.parent->cur.layer;
191 }
192 return obj->cur.layer;
193}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3#include "evas_cs.h"
4
5#ifdef LKDEBUG
6EAPI Eina_Bool lockdebug = EINA_FALSE;
7EAPI int lockmax = 0;
8#endif
9
10static int _evas_init_count = 0;
11int _evas_log_dom_global = -1;
12EAPI int
13evas_init(void)
14{
15 if (++_evas_init_count != 1)
16 return _evas_init_count;
17
18#ifdef LKDEBUG
19 if (getenv("EVAS_LOCK_DEBUG"))
20 {
21 lockdebug = EINA_TRUE;
22 lockmax = atoi(getenv("EVAS_LOCK_DEBUG"));
23 }
24#endif
25
26#ifdef HAVE_EVIL
27 if (!evil_init())
28 return --_evas_init_count;
29#endif
30
31 if (!eina_init())
32 goto shutdown_evil;
33
34 _evas_log_dom_global = eina_log_domain_register
35 ("evas_main", EVAS_DEFAULT_LOG_COLOR);
36 if (_evas_log_dom_global < 0)
37 {
38 EINA_LOG_ERR("Can not create a module log domain.");
39 goto shutdown_eina;
40 }
41
42 evas_module_init();
43#ifdef BUILD_ASYNC_EVENTS
44 if (!evas_async_events_init())
45 goto shutdown_module;
46#endif
47#ifdef EVAS_CSERVE
48 if (getenv("EVAS_CSERVE")) evas_cserve_init();
49#endif
50#ifdef BUILD_ASYNC_PRELOAD
51 _evas_preload_thread_init();
52#endif
53#ifdef EVAS_FRAME_QUEUING
54 evas_common_frameq_init();
55#endif
56
57 return _evas_init_count;
58
59#ifdef BUILD_ASYNC_EVENTS
60 shutdown_module:
61 evas_module_shutdown();
62 eina_log_domain_unregister(_evas_log_dom_global);
63#endif
64 shutdown_eina:
65 eina_shutdown();
66 shutdown_evil:
67#ifdef HAVE_EVIL
68 evil_shutdown();
69#endif
70
71 return --_evas_init_count;
72}
73
74EAPI int
75evas_shutdown(void)
76{
77 if (--_evas_init_count != 0)
78 return _evas_init_count;
79
80#ifdef EVAS_FRAME_QUEUING
81 if (evas_common_frameq_enabled())
82 {
83 evas_common_frameq_finish();
84 evas_common_frameq_destroy();
85 }
86#endif
87#ifdef BUILD_ASYNC_EVENTS
88 _evas_preload_thread_shutdown();
89#endif
90#ifdef EVAS_CSERVE
91 if (getenv("EVAS_CSERVE")) evas_cserve_shutdown();
92#endif
93#ifdef BUILD_ASYNC_EVENTS
94 evas_async_events_shutdown();
95#endif
96 evas_font_dir_cache_free();
97 evas_common_shutdown();
98 evas_module_shutdown();
99 eina_log_domain_unregister(_evas_log_dom_global);
100 eina_shutdown();
101#ifdef HAVE_EVIL
102 evil_shutdown();
103#endif
104
105 return _evas_init_count;
106}
107
108
109EAPI Evas *
110evas_new(void)
111{
112 Evas *e;
113
114 e = calloc(1, sizeof(Evas));
115 if (!e) return NULL;
116
117 e->magic = MAGIC_EVAS;
118 e->output.render_method = RENDER_METHOD_INVALID;
119 e->viewport.w = 1;
120 e->viewport.h = 1;
121 e->framespace.x = 0;
122 e->framespace.y = 0;
123 e->framespace.w = 0;
124 e->framespace.h = 0;
125 e->hinting = EVAS_FONT_HINTING_BYTECODE;
126 e->name_hash = eina_hash_string_superfast_new(NULL);
127 eina_clist_init(&e->calc_list);
128 eina_clist_init(&e->calc_done);
129
130#define EVAS_ARRAY_SET(E, Array) \
131 eina_array_step_set(&E->Array, sizeof (E->Array), 4096);
132
133 EVAS_ARRAY_SET(e, delete_objects);
134 EVAS_ARRAY_SET(e, active_objects);
135 EVAS_ARRAY_SET(e, restack_objects);
136 EVAS_ARRAY_SET(e, render_objects);
137 EVAS_ARRAY_SET(e, pending_objects);
138 EVAS_ARRAY_SET(e, obscuring_objects);
139 EVAS_ARRAY_SET(e, temporary_objects);
140 EVAS_ARRAY_SET(e, calculate_objects);
141 EVAS_ARRAY_SET(e, clip_changes);
142
143#undef EVAS_ARRAY_SET
144
145 return e;
146}
147
148EAPI void
149evas_free(Evas *e)
150{
151 Eina_Rectangle *r;
152 Evas_Coord_Touch_Point *touch_point;
153 Evas_Layer *lay;
154 int i;
155 int del;
156
157 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
158 return;
159 MAGIC_CHECK_END();
160
161#ifdef EVAS_FRAME_QUEUING
162 evas_common_frameq_flush();
163#endif
164
165 if (e->walking_list == 0) evas_render_idle_flush(e);
166
167 if (e->walking_list > 0) return;
168
169 if (e->callbacks)
170 {
171 if (e->callbacks->deletions_waiting) return;
172
173 e->callbacks->deletions_waiting = 0;
174 evas_event_callback_list_post_free(&e->callbacks->callbacks);
175 if (!e->callbacks->callbacks)
176 {
177 free(e->callbacks);
178 e->callbacks = NULL;
179 }
180
181 _evas_post_event_callback_free(e);
182 }
183
184 del = 1;
185 e->walking_list++;
186 e->cleanup = 1;
187 while (del)
188 {
189 del = 0;
190 EINA_INLIST_FOREACH(e->layers, lay)
191 {
192 Evas_Object *o;
193
194 evas_layer_pre_free(lay);
195
196 EINA_INLIST_FOREACH(lay->objects, o)
197 {
198 if ((o->callbacks) && (o->callbacks->walking_list))
199 {
200 /* Defer free */
201 e->delete_me = 1;
202 e->walking_list--;
203 return;
204 }
205 if (!o->delete_me)
206 del = 1;
207 }
208 }
209 }
210 EINA_INLIST_FOREACH(e->layers, lay)
211 evas_layer_free_objects(lay);
212 evas_layer_clean(e);
213
214 e->walking_list--;
215
216 evas_font_path_clear(e);
217 e->pointer.object.in = eina_list_free(e->pointer.object.in);
218
219 if (e->name_hash) eina_hash_free(e->name_hash);
220 e->name_hash = NULL;
221
222 EINA_LIST_FREE(e->damages, r)
223 eina_rectangle_free(r);
224 EINA_LIST_FREE(e->obscures, r)
225 eina_rectangle_free(r);
226
227 evas_fonts_zero_free(e);
228
229 evas_event_callback_all_del(e);
230 evas_event_callback_cleanup(e);
231
232 if (e->engine.func)
233 {
234 e->engine.func->context_free(e->engine.data.output, e->engine.data.context);
235 e->engine.func->output_free(e->engine.data.output);
236 e->engine.func->info_free(e, e->engine.info);
237 }
238
239 for (i = 0; i < e->modifiers.mod.count; i++)
240 free(e->modifiers.mod.list[i]);
241 if (e->modifiers.mod.list) free(e->modifiers.mod.list);
242
243 for (i = 0; i < e->locks.lock.count; i++)
244 free(e->locks.lock.list[i]);
245 if (e->locks.lock.list) free(e->locks.lock.list);
246
247 if (e->engine.module) evas_module_unref(e->engine.module);
248
249 eina_array_flush(&e->delete_objects);
250 eina_array_flush(&e->active_objects);
251 eina_array_flush(&e->restack_objects);
252 eina_array_flush(&e->render_objects);
253 eina_array_flush(&e->pending_objects);
254 eina_array_flush(&e->obscuring_objects);
255 eina_array_flush(&e->temporary_objects);
256 eina_array_flush(&e->calculate_objects);
257 eina_array_flush(&e->clip_changes);
258
259 EINA_LIST_FREE(e->touch_points, touch_point)
260 free(touch_point);
261
262 e->magic = 0;
263 free(e);
264}
265
266EAPI void
267evas_output_method_set(Evas *e, int render_method)
268{
269 Evas_Module *em;
270
271 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
272 return;
273 MAGIC_CHECK_END();
274
275 /* if our engine to set it to is invalid - abort */
276 if (render_method == RENDER_METHOD_INVALID) return;
277 /* if the engine is already set up - abort */
278 if (e->output.render_method != RENDER_METHOD_INVALID) return;
279 /* Request the right engine. */
280 em = evas_module_engine_get(render_method);
281 if (!em) return ;
282 if (em->id_engine != render_method) return;
283 if (!evas_module_load(em)) return;
284
285 /* set the correct render */
286 e->output.render_method = render_method;
287 e->engine.func = (em->functions);
288 evas_module_use(em);
289 if (e->engine.module) evas_module_unref(e->engine.module);
290 e->engine.module = em;
291 evas_module_ref(em);
292 /* get the engine info struct */
293 if (e->engine.func->info) e->engine.info = e->engine.func->info(e);
294 return;
295}
296
297EAPI int
298evas_output_method_get(const Evas *e)
299{
300 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
301 return RENDER_METHOD_INVALID;
302 MAGIC_CHECK_END();
303
304 return e->output.render_method;
305}
306
307EAPI Evas_Engine_Info *
308evas_engine_info_get(const Evas *e)
309{
310 Evas_Engine_Info *info;
311
312 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
313 return NULL;
314 MAGIC_CHECK_END();
315
316 if (!e->engine.info) return NULL;
317
318 info = e->engine.info;
319 ((Evas *)e)->engine.info_magic = info->magic;
320
321 return info;
322}
323
324EAPI Eina_Bool
325evas_engine_info_set(Evas *e, Evas_Engine_Info *info)
326{
327 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
328 return EINA_FALSE;
329 MAGIC_CHECK_END();
330 if (!info) return EINA_FALSE;
331 if (info != e->engine.info) return EINA_FALSE;
332 if (info->magic != e->engine.info_magic) return EINA_FALSE;
333 return (Eina_Bool)e->engine.func->setup(e, info);
334}
335
336EAPI void
337evas_output_size_set(Evas *e, int w, int h)
338{
339 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
340 return;
341 MAGIC_CHECK_END();
342
343 if ((w == e->output.w) && (h == e->output.h)) return;
344 if (w < 1) w = 1;
345 if (h < 1) h = 1;
346
347#ifdef EVAS_FRAME_QUEUING
348 evas_common_frameq_flush();
349#endif
350
351 e->output.w = w;
352 e->output.h = h;
353 e->output.changed = 1;
354 e->output_validity++;
355 e->changed = 1;
356 evas_render_invalidate(e);
357}
358
359EAPI void
360evas_output_size_get(const Evas *e, int *w, int *h)
361{
362 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
363 if (w) *w = 0;
364 if (h) *h = 0;
365 return;
366 MAGIC_CHECK_END();
367
368 if (w) *w = e->output.w;
369 if (h) *h = e->output.h;
370}
371
372EAPI void
373evas_output_viewport_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
374{
375 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
376 return;
377 MAGIC_CHECK_END();
378
379 if ((x == e->viewport.x) && (y == e->viewport.y) &&
380 (w == e->viewport.w) && (h == e->viewport.h)) return;
381 if (w <= 0) return;
382 if (h <= 0) return;
383 if ((x != 0) || (y != 0))
384 {
385 ERR("Compat error. viewport x,y != 0,0 not supported");
386 x = 0;
387 y = 0;
388 }
389 e->viewport.x = x;
390 e->viewport.y = y;
391 e->viewport.w = w;
392 e->viewport.h = h;
393 e->viewport.changed = 1;
394 e->output_validity++;
395 e->changed = 1;
396}
397
398EAPI void
399evas_output_viewport_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
400{
401 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
402 if (x) *x = 0;
403 if (y) *y = 0;
404 if (w) *w = 0;
405 if (h) *h = 0;
406 return;
407 MAGIC_CHECK_END();
408
409 if (x) *x = e->viewport.x;
410 if (y) *y = e->viewport.y;
411 if (w) *w = e->viewport.w;
412 if (h) *h = e->viewport.h;
413}
414
415EAPI void
416evas_output_framespace_set(Evas *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
417{
418 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
419 return;
420 MAGIC_CHECK_END();
421
422 if ((x == e->framespace.x) && (y == e->framespace.y) &&
423 (w == e->framespace.w) && (h == e->framespace.h)) return;
424 e->framespace.x = x;
425 e->framespace.y = y;
426 e->framespace.w = w;
427 e->framespace.h = h;
428 e->framespace.changed = 1;
429 e->output_validity++;
430 e->changed = 1;
431}
432
433EAPI void
434evas_output_framespace_get(const Evas *e, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
435{
436 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
437 if (x) *x = 0;
438 if (y) *y = 0;
439 if (w) *w = 0;
440 if (h) *h = 0;
441 return;
442 MAGIC_CHECK_END();
443
444 if (x) *x = e->framespace.x;
445 if (y) *y = e->framespace.y;
446 if (w) *w = e->framespace.w;
447 if (h) *h = e->framespace.h;
448}
449
450EAPI Evas_Coord
451evas_coord_screen_x_to_world(const Evas *e, int x)
452{
453 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
454 return 0;
455 MAGIC_CHECK_END();
456 if (e->output.w == e->viewport.w) return e->viewport.x + x;
457 return (long long)e->viewport.x + (((long long)x * (long long)e->viewport.w) / (long long)e->output.w);
458}
459
460EAPI Evas_Coord
461evas_coord_screen_y_to_world(const Evas *e, int y)
462{
463 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
464 return 0;
465 MAGIC_CHECK_END();
466 if (e->output.h == e->viewport.h) return e->viewport.y + y;
467 return (long long)e->viewport.y + (((long long)y * (long long)e->viewport.h) / (long long)e->output.h);
468}
469
470EAPI int
471evas_coord_world_x_to_screen(const Evas *e, Evas_Coord x)
472{
473 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
474 return 0;
475 MAGIC_CHECK_END();
476 if (e->output.w == e->viewport.w) return x - e->viewport.x;
477 return (int)((((long long)x - (long long)e->viewport.x) * (long long)e->output.w) / (long long)e->viewport.w);
478}
479
480EAPI int
481evas_coord_world_y_to_screen(const Evas *e, Evas_Coord y)
482{
483 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
484 return 0;
485 MAGIC_CHECK_END();
486 if (e->output.h == e->viewport.h) return y - e->viewport.y;
487 return (int)((((long long)y - (long long)e->viewport.y) * (long long)e->output.h) / (long long)e->viewport.h);
488}
489
490EAPI int
491evas_render_method_lookup(const char *name)
492{
493 Evas_Module *em;
494
495 if (!name) return RENDER_METHOD_INVALID;
496 /* search on the engines list for the name */
497 em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name);
498 if (!em) return RENDER_METHOD_INVALID;
499
500 return em->id_engine;
501}
502
503EAPI Eina_List *
504evas_render_method_list(void)
505{
506 return evas_module_engine_list();
507}
508
509EAPI void
510evas_render_method_list_free(Eina_List *list)
511{
512 eina_list_free(list);
513}
514
515EAPI Eina_Bool
516evas_object_image_extension_can_load_get(const char *file)
517{
518 const char *tmp;
519 Eina_Bool result;
520
521 tmp = eina_stringshare_add(file);
522 result = evas_common_extension_can_load_get(tmp);
523 eina_stringshare_del(tmp);
524
525 return result;
526}
527
528EAPI Eina_Bool
529evas_object_image_extension_can_load_fast_get(const char *file)
530{
531 return evas_common_extension_can_load_get(file);
532}
533
534EAPI void
535evas_pointer_output_xy_get(const Evas *e, int *x, int *y)
536{
537 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
538 if (x) *x = 0;
539 if (y) *y = 0;
540 return;
541 MAGIC_CHECK_END();
542 if (x) *x = e->pointer.x;
543 if (y) *y = e->pointer.y;
544}
545
546EAPI void
547evas_pointer_canvas_xy_get(const Evas *e, Evas_Coord *x, Evas_Coord *y)
548{
549 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
550 if (x) *x = 0;
551 if (y) *y = 0;
552 return;
553 MAGIC_CHECK_END();
554 if (x) *x = e->pointer.x;
555 if (y) *y = e->pointer.y;
556}
557
558EAPI int
559evas_pointer_button_down_mask_get(const Evas *e)
560{
561 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
562 return 0;
563 MAGIC_CHECK_END();
564 return (int)e->pointer.button;
565}
566
567EAPI Eina_Bool
568evas_pointer_inside_get(const Evas *e)
569{
570 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
571 return 0;
572 MAGIC_CHECK_END();
573 return (int)e->pointer.inside;
574}
575
576EAPI void
577evas_data_attach_set(Evas *e, void *data)
578{
579 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
580 return;
581 MAGIC_CHECK_END();
582 e->attach_data = data;
583}
584
585EAPI void *
586evas_data_attach_get(const Evas *e)
587{
588 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
589 return NULL;
590 MAGIC_CHECK_END();
591 return e->attach_data;
592}
593
594EAPI void
595evas_focus_in(Evas *e)
596{
597 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
598 return;
599 MAGIC_CHECK_END();
600 if (e->focus) return;
601 e->focus = 1;
602 evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_IN, NULL);
603}
604
605EAPI void
606evas_focus_out(Evas *e)
607{
608 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
609 return;
610 MAGIC_CHECK_END();
611 if (!e->focus) return;
612 e->focus = 0;
613 evas_event_callback_call(e, EVAS_CALLBACK_CANVAS_FOCUS_OUT, NULL);
614}
615
616EAPI Eina_Bool
617evas_focus_state_get(const Evas *e)
618{
619 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
620 return 0;
621 MAGIC_CHECK_END();
622 return e->focus;
623}
624
625EAPI void
626evas_nochange_push(Evas *e)
627{
628 e->nochange++;
629}
630
631EAPI void
632evas_nochange_pop(Evas *e)
633{
634 e->nochange--;
635}
636
637void
638_evas_walk(Evas *e)
639{
640 e->walking_list++;
641}
642
643void
644_evas_unwalk(Evas *e)
645{
646 e->walking_list--;
647 if ((e->walking_list == 0) && (e->delete_me)) evas_free(e);
648}
649
650EAPI const char *
651evas_load_error_str(Evas_Load_Error error)
652{
653 switch (error)
654 {
655 case EVAS_LOAD_ERROR_NONE:
656 return "No error on load";
657 case EVAS_LOAD_ERROR_GENERIC:
658 return "A non-specific error occurred";
659 case EVAS_LOAD_ERROR_DOES_NOT_EXIST:
660 return "File (or file path) does not exist";
661 case EVAS_LOAD_ERROR_PERMISSION_DENIED:
662 return "Permission deinied to an existing file (or path)";
663 case EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED:
664 return "Allocation of resources failure prevented load";
665 case EVAS_LOAD_ERROR_CORRUPT_FILE:
666 return "File corrupt (but was detected as a known format)";
667 case EVAS_LOAD_ERROR_UNKNOWN_FORMAT:
668 return "File is not a known format";
669 default:
670 return "Unknown error";
671 }
672}
673
674EAPI void
675evas_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
676{
677 evas_common_convert_color_hsv_to_rgb(h, s, v, r, g, b);
678}
679
680EAPI void
681evas_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)
682{
683 evas_common_convert_color_rgb_to_hsv(r, g, b, h, s, v);
684}
685
686EAPI void
687evas_color_argb_premul(int a, int *r, int *g, int *b)
688{
689 evas_common_convert_color_argb_premul(a, r, g, b);
690}
691
692EAPI void
693evas_color_argb_unpremul(int a, int *r, int *g, int *b)
694{
695 evas_common_convert_color_argb_unpremul(a, r, g, b);
696}
697
698EAPI void
699evas_data_argb_premul(unsigned int *data, unsigned int len)
700{
701 if (!data || (len < 1)) return;
702 evas_common_convert_argb_premul(data, len);
703}
704
705EAPI void
706evas_data_argb_unpremul(unsigned int *data, unsigned int len)
707{
708 if (!data || (len < 1)) return;
709 evas_common_convert_argb_unpremul(data, len);
710}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3#include <math.h>
4
5static void
6_evas_map_calc_geom_change(Evas_Object *obj)
7{
8 int is, was = 0, pass = 0;
9
10 evas_object_change(obj);
11 evas_object_clip_dirty(obj);
12 if (obj->layer->evas->events_frozen <= 0)
13 {
14 evas_object_recalc_clippees(obj);
15 if (!pass)
16 {
17 if (!obj->smart.smart)
18 {
19 is = evas_object_is_in_output_rect(obj,
20 obj->layer->evas->pointer.x,
21 obj->layer->evas->pointer.y, 1, 1);
22 if ((is ^ was) && obj->cur.visible)
23 evas_event_feed_mouse_move(obj->layer->evas,
24 obj->layer->evas->pointer.x,
25 obj->layer->evas->pointer.y,
26 obj->layer->evas->last_timestamp,
27 NULL);
28 }
29 }
30 }
31 evas_object_inform_call_move(obj);
32 evas_object_inform_call_resize(obj);
33}
34
35static void
36_evas_map_calc_map_geometry(Evas_Object *obj)
37{
38 Evas_Coord x1, x2, yy1, yy2;
39 const Evas_Map_Point *p, *p_end;
40 Eina_Bool ch = EINA_FALSE;
41
42 if (!obj->cur.map) return;
43
44 // WARN: Do not merge below code to SLP until it is fixed.
45 // It has an infinite loop bug.
46 if (obj->prev.map)
47 {
48 // FIXME: this causes an infinite loop somewhere... hard to debug
49 if (obj->prev.map->count == obj->cur.map->count)
50 {
51 const Evas_Map_Point *p2;
52
53 p = obj->cur.map->points;
54 p_end = p + obj->cur.map->count;
55 p2 = obj->prev.map->points;
56
57 for (; p < p_end; p++, p2++)
58 {
59 if ((p->a != p2->a) ||
60 (p->r != p2->r) ||
61 (p->g != p2->g) ||
62 (p->b != p2->b))
63 {
64 ch = 1;
65 break;
66 }
67 if ((p->x != p2->x) ||
68 (p->y != p2->y) ||
69 (p->z != p2->z))
70 {
71 ch = 1;
72 break;
73 }
74 }
75 }
76 else
77 ch = 1;
78 }
79 else
80 ch = 1;
81
82 p = obj->cur.map->points;
83 p_end = p + obj->cur.map->count;
84 x1 = x2 = lround(p->x);
85 yy1 = yy2 = lround(p->y);
86 p++;
87 for (; p < p_end; p++)
88 {
89 Evas_Coord x, y;
90
91 x = lround(p->x);
92 y = lround(p->y);
93 if (x < x1) x1 = x;
94 if (x > x2) x2 = x;
95 if (y < yy1) yy1 = y;
96 if (y > yy2) yy2 = y;
97 }
98// this causes clip-out bugs now mapped objs canbe opaque!!!
99// // add 1 pixel of fuzz around the map region to ensure updates are correct
100// x1 -= 1; yy1 -= 1;
101// x2 += 1; yy2 += 1;
102 if (obj->cur.map->normal_geometry.x != x1) ch = 1;
103 if (obj->cur.map->normal_geometry.y != yy1) ch = 1;
104 if (obj->cur.map->normal_geometry.w != (x2 - x1)) ch = 1;
105 if (obj->cur.map->normal_geometry.h != (yy2 - yy1)) ch = 1;
106 obj->cur.map->normal_geometry.x = x1;
107 obj->cur.map->normal_geometry.y = yy1;
108 obj->cur.map->normal_geometry.w = (x2 - x1);
109 obj->cur.map->normal_geometry.h = (yy2 - yy1);
110 if (ch) _evas_map_calc_geom_change(obj);
111}
112
113static inline Evas_Map *
114_evas_map_new(int count)
115{
116 int i;
117 int alloc;
118 Evas_Map *m;
119
120 /* Adjust allocation such that: at least 4 points, and always an even
121 * number: this allows the software engine to work efficiently */
122 alloc = (count < 4) ? 4 : count;
123 if (alloc & 0x1) alloc ++;
124
125 m = calloc(1, sizeof(Evas_Map) + (alloc * sizeof(Evas_Map_Point)));
126 if (!m) return NULL;
127 m->count = count;
128 m->persp.foc = 0;
129 m->alpha = 1;
130 m->smooth = 1;
131 m->magic = MAGIC_MAP;
132 for (i = 0; i < count; i++)
133 {
134 m->points[i].r = 255;
135 m->points[i].g = 255;
136 m->points[i].b = 255;
137 m->points[i].a = 255;
138 }
139 return m;
140}
141
142static inline Eina_Bool
143_evas_map_copy(Evas_Map *dst, const Evas_Map *src)
144{
145 if (dst->count != src->count)
146 {
147 ERR("cannot copy map of different sizes: dst=%i, src=%i", dst->count, src->count);
148 return EINA_FALSE;
149 }
150 memcpy(dst->points, src->points, src->count * sizeof(Evas_Map_Point));
151 dst->smooth = src->smooth;
152 dst->alpha = src->alpha;
153 dst->persp = src->persp;
154 return EINA_TRUE;
155}
156
157static inline Evas_Map *
158_evas_map_dup(const Evas_Map *orig)
159{
160 Evas_Map *copy = _evas_map_new(orig->count);
161 if (!copy) return NULL;
162 memcpy(copy->points, orig->points, orig->count * sizeof(Evas_Map_Point));
163 copy->smooth = orig->smooth;
164 copy->alpha = orig->alpha;
165 copy->persp = orig->persp;
166 return copy;
167}
168
169static inline void
170_evas_map_free(Evas_Object *obj, Evas_Map *m)
171{
172 if (obj)
173 {
174 if (m->surface)
175 obj->layer->evas->engine.func->image_map_surface_free
176 (obj->layer->evas->engine.data.output, m->surface);
177 }
178 m->magic = 0;
179 free(m);
180}
181
182/****************************************************************************/
183/* util functions for manipulating maps, so you don't need to know the math */
184/****************************************************************************/
185static inline void
186_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)
187{
188 Evas_Map_Point *p = m->points;
189 int i;
190
191 p[0].x = x;
192 p[0].y = y;
193 p[0].z = z;
194 p[0].u = 0.0;
195 p[0].v = 0.0;
196
197 p[1].x = x + w;
198 p[1].y = y;
199 p[1].z = z;
200 p[1].u = w;
201 p[1].v = 0.0;
202
203 p[2].x = x + w;
204 p[2].y = y + h;
205 p[2].z = z;
206 p[2].u = w;
207 p[2].v = h;
208
209 p[3].x = x;
210 p[3].y = y + h;
211 p[3].z = z;
212 p[3].u = 0.0;
213 p[3].v = h;
214
215 for (i = 0; i < 4; i++)
216 {
217 p[i].px = p[i].x;
218 p[i].py = p[i].y;
219 }
220}
221
222Eina_Bool
223evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y,
224 Evas_Coord *mx, Evas_Coord *my, int grab)
225{
226 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
227 return EINA_FALSE;
228 MAGIC_CHECK_END();
229
230 int i, j, edges, edge[m->count][2], douv;
231 Evas_Coord xe[2];
232 double u[2] = { 0.0, 0.0 };
233 double v[2] = { 0.0, 0.0 };
234
235 if (m->count < 4) return 0;
236 // FIXME need to handle grab mode and extrapolte coords outside
237 // map
238 if (grab)
239 {
240 Evas_Coord ymin, ymax;
241
242 ymin = m->points[0].y;
243 ymax = m->points[0].y;
244 for (i = 1; i < m->count; i++)
245 {
246 if (m->points[i].y < ymin) ymin = m->points[i].y;
247 else if (m->points[i].y > ymax) ymax = m->points[i].y;
248 }
249 if (y <= ymin) y = ymin + 1;
250 if (y >= ymax) y = ymax - 1;
251 }
252 edges = 0;
253 for (i = 0; i < m->count; i++)
254 {
255 j = (i + 1) % m->count;
256 if ((m->points[i].y <= y) && (m->points[j].y > y))
257 {
258 edge[edges][0] = i;
259 edge[edges][1] = j;
260 edges++;
261 }
262 else if ((m->points[j].y <= y) && (m->points[i].y > y))
263 {
264 edge[edges][0] = j;
265 edge[edges][1] = i;
266 edges++;
267 }
268 }
269 douv = 0;
270 if ((mx) || (my)) douv = 1;
271 for (i = 0; i < (edges - 1); i+= 2)
272 {
273 Evas_Coord yp, yd;
274
275 j = i + 1;
276 yd = m->points[edge[i][1]].y - m->points[edge[i][0]].y;
277 if (yd > 0)
278 {
279 yp = y - m->points[edge[i][0]].y;
280 xe[0] = m->points[edge[i][1]].x - m->points[edge[i][0]].x;
281 xe[0] = m->points[edge[i][0]].x + ((xe[0] * yp) / yd);
282 if (douv)
283 {
284 u[0] = m->points[edge[i][1]].u - m->points[edge[i][0]].u;
285 u[0] = m->points[edge[i][0]].u + ((u[0] * yp) / yd);
286 v[0] = m->points[edge[i][1]].v - m->points[edge[i][0]].v;
287 v[0] = m->points[edge[i][0]].v + ((v[0] * yp) / yd);
288 }
289 }
290 else
291 {
292 xe[0] = m->points[edge[i][0]].x;
293 if (douv)
294 {
295 u[0] = m->points[edge[i][0]].u;
296 v[0] = m->points[edge[i][0]].v;
297 }
298 }
299 yd = m->points[edge[j][1]].y - m->points[edge[j][0]].y;
300 if (yd > 0)
301 {
302 yp = y - m->points[edge[j][0]].y;
303 xe[1] = m->points[edge[j][1]].x - m->points[edge[j][0]].x;
304 xe[1] = m->points[edge[j][0]].x + ((xe[1] * yp) / yd);
305 if (douv)
306 {
307 u[1] = m->points[edge[j][1]].u - m->points[edge[j][0]].u;
308 u[1] = m->points[edge[j][0]].u + ((u[1] * yp) / yd);
309 v[1] = m->points[edge[j][1]].v - m->points[edge[j][0]].v;
310 v[1] = m->points[edge[j][0]].v + ((v[1] * yp) / yd);
311 }
312 }
313 else
314 {
315 xe[1] = m->points[edge[j][0]].x;
316 if (douv)
317 {
318 u[1] = m->points[edge[j][0]].u;
319 v[1] = m->points[edge[j][0]].v;
320 }
321 }
322 if (xe[0] > xe[1])
323 {
324 int ti;
325
326 ti = xe[0]; xe[0] = xe[1]; xe[1] = ti;
327 if (douv)
328 {
329 double td;
330
331 td = u[0]; u[0] = u[1]; u[1] = td;
332 td = v[0]; v[0] = v[1]; v[1] = td;
333 }
334 }
335 if ((x >= xe[0]) && (x < xe[1]))
336 {
337 if (douv)
338 {
339 if (mx)
340 *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) /
341 (xe[1] - xe[0]));
342 if (my)
343 *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) /
344 (xe[1] - xe[0]));
345 }
346 return EINA_TRUE;
347 }
348 if (grab)
349 {
350 if (douv)
351 {
352 if (mx)
353 *mx = u[0] + (((x - xe[0]) * (u[1] - u[0])) /
354 (xe[1] - xe[0]));
355 if (my)
356 *my = v[0] + (((x - xe[0]) * (v[1] - v[0])) /
357 (xe[1] - xe[0]));
358 }
359 return EINA_TRUE;
360 }
361 }
362 return EINA_FALSE;
363}
364
365Eina_Bool
366evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y)
367{
368 return evas_map_coords_get(m, x, y, NULL, NULL, 0);
369}
370
371EAPI void
372evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled)
373{
374 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
375 return;
376 MAGIC_CHECK_END();
377 Eina_Bool pchange = EINA_FALSE;
378
379 enabled = !!enabled;
380 if (obj->cur.usemap == enabled) return;
381 pchange = obj->changed;
382 obj->cur.usemap = enabled;
383 if (enabled)
384 {
385 if (!obj->cur.map)
386 obj->cur.map = _evas_map_new(4);
387 evas_object_mapped_clip_across_mark(obj);
388// obj->cur.map->normal_geometry = obj->cur.geometry;
389 }
390 else
391 {
392 if (obj->cur.map)
393 {
394 _evas_map_calc_geom_change(obj);
395 evas_object_mapped_clip_across_mark(obj);
396 //FIXME: Since the last frame is not updated when map is
397 //disabled, afterimage problem is happened in s/w rendering.
398 //Need to find out the fundamental reason then fix it.
399 evas_damage_rectangle_add(obj->layer->evas,
400 0,
401 0,
402 obj->layer->evas->output.w,
403 obj->layer->evas->output.h);
404 }
405 }
406 _evas_map_calc_map_geometry(obj);
407 /* This is a bit heavy handed, but it fixes the case of same geometry, but
408 * changed colour or UV settings. */
409 evas_object_change(obj);
410 if (!obj->changed_pchange) obj->changed_pchange = pchange;
411 obj->changed_map = EINA_TRUE;
412}
413
414EAPI Eina_Bool
415evas_object_map_enable_get(const Evas_Object *obj)
416{
417 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
418 return EINA_FALSE;
419 MAGIC_CHECK_END();
420 return obj->cur.usemap;
421}
422
423
424EAPI void
425evas_object_map_source_set(Evas_Object *obj, Evas_Object *src)
426{
427 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
428 return;
429 MAGIC_CHECK_END();
430 (void)src; /* method still needs to be implemented. */
431}
432
433EAPI Evas_Object *
434evas_object_map_source_get(const Evas_Object *obj)
435{
436 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
437 return NULL;
438 MAGIC_CHECK_END();
439 return NULL;
440}
441
442EAPI void
443evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
444{
445 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
446 return;
447 MAGIC_CHECK_END();
448
449 if (!map)
450 {
451 if (obj->cur.map)
452 {
453 if (obj->cur.map->surface)
454 {
455 obj->layer->evas->engine.func->image_map_surface_free
456 (obj->layer->evas->engine.data.output,
457 obj->cur.map->surface);
458 obj->cur.map->surface = NULL;
459 }
460 obj->prev.geometry = obj->cur.map->normal_geometry;
461 if (!obj->prev.map)
462 {
463 _evas_map_free(obj, obj->cur.map);
464 obj->cur.map = NULL;
465 evas_object_mapped_clip_across_mark(obj);
466 return;
467 }
468 _evas_map_free(obj, obj->cur.map);
469 obj->cur.map = NULL;
470 if (!obj->cur.usemap) _evas_map_calc_geom_change(obj);
471 else _evas_map_calc_map_geometry(obj);
472 if (obj->cur.usemap)
473 {
474 evas_object_mapped_clip_across_mark(obj);
475 //FIXME: Since the last frame is not updated when map is
476 //disabled, afterimage problem is happened in s/w
477 //rendering. Need to find out the fundamental reason
478 //then fix it.
479 evas_damage_rectangle_add(obj->layer->evas,
480 0,
481 0,
482 obj->layer->evas->output.w,
483 obj->layer->evas->output.h);
484 }
485 }
486 return;
487 }
488
489 if ((obj->cur.map) && (obj->cur.map->count == map->count))
490 {
491 Evas_Map *omap = obj->cur.map;
492 obj->cur.map = _evas_map_new(map->count);
493 memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (map->count * sizeof(Evas_Map_Point)));
494 _evas_map_copy(obj->cur.map, map);
495 if (obj->prev.map == omap) obj->prev.map = NULL;
496 free(omap);
497 }
498 else
499 {
500 if (obj->cur.map) evas_map_free(obj->cur.map);
501 obj->cur.map = _evas_map_dup(map);
502 if (obj->cur.usemap)
503 evas_object_mapped_clip_across_mark(obj);
504 }
505 _evas_map_calc_map_geometry(obj);
506}
507
508EAPI const Evas_Map *
509evas_object_map_get(const Evas_Object *obj)
510{
511 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
512 return NULL;
513 MAGIC_CHECK_END();
514
515 return obj->cur.map;
516}
517
518EAPI Evas_Map *
519evas_map_new(int count)
520{
521 if (count != 4)
522 {
523 ERR("map point count (%i) != 4 is unsupported!", count);
524 return NULL;
525 }
526
527 return _evas_map_new(count);
528}
529
530EAPI void
531evas_map_smooth_set(Evas_Map *m, Eina_Bool enabled)
532{
533 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
534 return;
535 MAGIC_CHECK_END();
536
537 m->smooth = enabled;
538}
539
540EAPI Eina_Bool
541evas_map_smooth_get(const Evas_Map *m)
542{
543 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
544 return EINA_FALSE;
545 MAGIC_CHECK_END();
546
547 return m->smooth;
548}
549
550EAPI void
551evas_map_alpha_set(Evas_Map *m, Eina_Bool enabled)
552{
553 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
554 return;
555 MAGIC_CHECK_END();
556
557 m->alpha = enabled;
558}
559
560EAPI Eina_Bool
561evas_map_alpha_get(const Evas_Map *m)
562{
563 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
564 return EINA_FALSE;
565 MAGIC_CHECK_END();
566
567 return m->alpha;
568}
569
570EAPI Evas_Map *
571evas_map_dup(const Evas_Map *m)
572{
573 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
574 return NULL;
575 MAGIC_CHECK_END();
576
577 return _evas_map_dup(m);
578}
579
580EAPI void
581evas_map_free(Evas_Map *m)
582{
583 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
584 return;
585 MAGIC_CHECK_END();
586
587 _evas_map_free(NULL, m);
588}
589
590EAPI int
591evas_map_count_get(const Evas_Map *m)
592{
593 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
594 return -1;
595 MAGIC_CHECK_END();
596
597 return m->count;
598}
599
600EAPI void
601evas_map_point_coord_set(Evas_Map *m, int idx, Evas_Coord x, Evas_Coord y, Evas_Coord z)
602{
603 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
604 return;
605 MAGIC_CHECK_END();
606
607 Evas_Map_Point *p;
608
609 if (idx >= m->count) return;
610 p = m->points + idx;
611 p->x = p->px = x;
612 p->y = p->py = y;
613 p->z = z;
614}
615
616EAPI void
617evas_map_point_coord_get(const Evas_Map *m, int idx, Evas_Coord *x, Evas_Coord *y, Evas_Coord *z)
618{
619 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
620 goto error;
621 MAGIC_CHECK_END();
622
623 const Evas_Map_Point *p;
624
625 if (idx >= m->count) goto error;
626 p = m->points + idx;
627 if (x) *x = p->x;
628 if (y) *y = p->y;
629 if (z) *z = p->z;
630 return;
631
632 error:
633 if (x) *x = 0;
634 if (y) *y = 0;
635 if (z) *z = 0;
636}
637
638EAPI void
639evas_map_point_image_uv_set(Evas_Map *m, int idx, double u, double v)
640{
641 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
642 return;
643 MAGIC_CHECK_END();
644
645 Evas_Map_Point *p;
646
647 if (idx >= m->count) return;
648 p = m->points + idx;
649 p->u = u;
650 p->v = v;
651}
652
653EAPI void
654evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v)
655{
656 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
657 goto error;
658 MAGIC_CHECK_END();
659
660 const Evas_Map_Point *p;
661
662 if (idx >= m->count) goto error;
663 p = m->points + idx;
664 if (u) *u = p->u;
665 if (v) *v = p->v;
666 return;
667
668 error:
669 if (u) *u = 0.0;
670 if (v) *v = 0.0;
671}
672
673EAPI void
674evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a)
675{
676 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
677 return;
678 MAGIC_CHECK_END();
679
680 Evas_Map_Point *p;
681
682 if (idx >= m->count) return;
683 p = m->points + idx;
684 p->r = r;
685 p->g = g;
686 p->b = b;
687 p->a = a;
688}
689
690EAPI void
691evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a)
692{
693 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
694 return;
695 MAGIC_CHECK_END();
696
697 const Evas_Map_Point *p;
698
699 if (idx >= m->count) return;
700 p = m->points + idx;
701 if (r) *r = p->r;
702 if (g) *g = p->g;
703 if (b) *b = p->b;
704 if (a) *a = p->a;
705}
706
707EAPI void
708evas_map_util_points_populate_from_object_full(Evas_Map *m, const Evas_Object *obj, Evas_Coord z)
709{
710 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
711 return;
712 MAGIC_CHECK_END();
713
714 if (m->count != 4)
715 {
716 ERR("map has count=%d where 4 was expected.", m->count);
717 return;
718 }
719 _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y,
720 obj->cur.geometry.w, obj->cur.geometry.h, z);
721}
722
723EAPI void
724evas_map_util_points_populate_from_object(Evas_Map *m, const Evas_Object *obj)
725{
726 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
727 return;
728 MAGIC_CHECK_END();
729
730 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
731 return;
732 MAGIC_CHECK_END();
733
734 if (m->count != 4)
735 {
736 ERR("map has count=%d where 4 was expected.", m->count);
737 return;
738 }
739 _evas_map_util_points_populate(m, obj->cur.geometry.x, obj->cur.geometry.y,
740 obj->cur.geometry.w, obj->cur.geometry.h, 0);
741}
742
743EAPI void
744evas_map_util_points_populate_from_geometry(Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Coord z)
745{
746 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
747 return;
748 MAGIC_CHECK_END();
749
750 if (m->count != 4)
751 {
752 ERR("map has count=%d where 4 was expected.", m->count);
753 return;
754 }
755 _evas_map_util_points_populate(m, x, y, w, h, z);
756}
757
758EAPI void
759evas_map_util_points_color_set(Evas_Map *m, int r, int g, int b, int a)
760{
761 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
762 return;
763 MAGIC_CHECK_END();
764
765 Evas_Map_Point *p, *p_end;
766
767 p = m->points;
768 p_end = p + m->count;
769 for (; p < p_end; p++)
770 {
771 p->r = r;
772 p->g = g;
773 p->b = b;
774 p->a = a;
775 }
776}
777
778EAPI void
779evas_map_util_rotate(Evas_Map *m, double degrees, Evas_Coord cx, Evas_Coord cy)
780{
781 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
782 return;
783 MAGIC_CHECK_END();
784
785 double r = (degrees * M_PI) / 180.0;
786 Evas_Map_Point *p, *p_end;
787
788 p = m->points;
789 p_end = p + m->count;
790
791 for (; p < p_end; p++)
792 {
793 double x, y, xx, yy;
794
795 x = p->x - cx;
796 y = p->y - cy;
797
798 xx = x * cos(r);
799 yy = x * sin(r);
800 x = xx - (y * sin(r));
801 y = yy + (y * cos(r));
802
803 p->px = p->x = x + cx;
804 p->py = p->y = y + cy;
805 }
806}
807
808EAPI void
809evas_map_util_zoom(Evas_Map *m, double zoomx, double zoomy, Evas_Coord cx, Evas_Coord cy)
810{
811 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
812 return;
813 MAGIC_CHECK_END();
814
815 Evas_Map_Point *p, *p_end;
816
817 p = m->points;
818 p_end = p + m->count;
819
820 for (; p < p_end; p++)
821 {
822 double x, y;
823
824 x = p->x - cx;
825 y = p->y - cy;
826
827 x = (((double)x) * zoomx);
828 y = (((double)y) * zoomy);
829
830 p->px = p->x = x + cx;
831 p->py = p->y = y + cy;
832 }
833}
834
835EAPI void
836evas_map_util_3d_rotate(Evas_Map *m, double dx, double dy, double dz,
837 Evas_Coord cx, Evas_Coord cy, Evas_Coord cz)
838{
839 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
840 return;
841 MAGIC_CHECK_END();
842
843 double rz = (dz * M_PI) / 180.0;
844 double rx = (dx * M_PI) / 180.0;
845 double ry = (dy * M_PI) / 180.0;
846 Evas_Map_Point *p, *p_end;
847
848 p = m->points;
849 p_end = p + m->count;
850
851 for (; p < p_end; p++)
852 {
853 double x, y, z, xx, yy, zz;
854
855 x = p->x - cx;
856 y = p->y - cy;
857 z = p->z - cz;
858
859 if (rz != 0.0)
860 {
861 xx = x * cos(rz);
862 yy = x * sin(rz);
863 x = xx - (y * sin(rz));
864 y = yy + (y * cos(rz));
865 }
866
867 if (ry != 0.0)
868 {
869 xx = x * cos(ry);
870 zz = x * sin(ry);
871 x = xx - (z * sin(ry));
872 z = zz + (z * cos(ry));
873 }
874
875 if (rx != 0.0)
876 {
877 zz = z * cos(rx);
878 yy = z * sin(rx);
879 z = zz - (y * sin(rx));
880 y = yy + (y * cos(rx));
881 }
882
883 p->px = p->x = x + cx;
884 p->py = p->y = y + cy;
885 p->z = z + cz;
886 }
887}
888
889EAPI void
890evas_map_util_3d_lighting(Evas_Map *m,
891 Evas_Coord lx, Evas_Coord ly, Evas_Coord lz,
892 int lr, int lg, int lb, int ar, int ag, int ab)
893{
894 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
895 return;
896 MAGIC_CHECK_END();
897
898 int i;
899
900 for (i = 0; i < m->count; i++)
901 {
902 double x, y, z;
903 double nx, ny, nz, x1, yy1, z1, x2, yy2, z2, ln, br;
904 int h, j, mr, mg, mb;
905
906 x = m->points[i].x;
907 y = m->points[i].y;
908 z = m->points[i].z;
909 // calc normal
910 h = (i - 1 + 4) % 4 + (i & ~0x3); // prev point
911 j = (i + 1) % 4 + (i & ~0x3); // next point
912
913 x1 = m->points[h].x - x;
914 yy1 = m->points[h].y - y;
915 z1 = m->points[h].z - z;
916
917 x2 = m->points[j].x - x;
918 yy2 = m->points[j].y - y;
919 z2 = m->points[j].z - z;
920 nx = (yy1 * z2) - (z1 * yy2);
921 ny = (z1 * x2) - (x1 * z2);
922 nz = (x1 * yy2) - (yy1 * x2);
923
924 ln = (nx * nx) + (ny * ny) + (nz * nz);
925 ln = sqrt(ln);
926
927 if (ln != 0.0)
928 {
929 nx /= ln;
930 ny /= ln;
931 nz /= ln;
932 }
933
934 // calc point -> light vector
935 x = lx - x;
936 y = ly - y;
937 z = lz - z;
938
939 ln = (x * x) + (y * y) + (z * z);
940 ln = sqrt(ln);
941
942 if (ln != 0.0)
943 {
944 x /= ln;
945 y /= ln;
946 z /= ln;
947 }
948
949 // brightness - tan (0.0 -> 1.0 brightness really)
950 br = (nx * x) + (ny * y) + (nz * z);
951 if (br < 0.0) br = 0.0;
952
953 mr = ar + ((lr - ar) * br);
954 mg = ag + ((lg - ag) * br);
955 mb = ab + ((lb - ab) * br);
956 if (m->points[i].a != 255)
957 {
958 mr = (mr * m->points[i].a) / 255;
959 mg = (mg * m->points[i].a) / 255;
960 mb = (mb * m->points[i].a) / 255;
961 }
962 m->points[i].r = (m->points[i].r * mr) / 255;
963 m->points[i].g = (m->points[i].g * mg) / 255;
964 m->points[i].b = (m->points[i].b * mb) / 255;
965 }
966}
967
968EAPI void
969evas_map_util_3d_perspective(Evas_Map *m,
970 Evas_Coord px, Evas_Coord py,
971 Evas_Coord z0, Evas_Coord foc)
972{
973 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
974 return;
975 MAGIC_CHECK_END();
976
977 Evas_Map_Point *p, *p_end;
978
979 p = m->points;
980 p_end = p + m->count;
981
982 m->persp.px = px;
983 m->persp.py = py;
984 m->persp.z0 = z0;
985 m->persp.foc = foc;
986
987 if (foc <= 0) return;
988
989 for (; p < p_end; p++)
990 {
991 double x, y, zz;
992
993 x = p->x - px;
994 y = p->y - py;
995
996 zz = ((p->z - z0) + foc);
997
998 if (zz > 0)
999 {
1000 x = (x * foc) / zz;
1001 y = (y * foc) / zz;
1002 }
1003
1004 p->x = px + x;
1005 p->y = py + y;
1006 }
1007}
1008
1009EAPI Eina_Bool
1010evas_map_util_clockwise_get(Evas_Map *m)
1011{
1012 MAGIC_CHECK(m, Evas_Map, MAGIC_MAP);
1013 return EINA_FALSE;
1014 MAGIC_CHECK_END();
1015
1016 int i, j, k, count;
1017 long long c;
1018
1019 if (m->count < 3) return EINA_FALSE;
1020
1021 count = 0;
1022 for (i = 0; i < m->count; i++)
1023 {
1024 j = (i + 1) % m->count;
1025 k = (i + 2) % m->count;
1026 c =
1027 ((m->points[j].x - m->points[i].x) *
1028 (m->points[k].y - m->points[j].y))
1029 -
1030 ((m->points[j].y - m->points[i].y) *
1031 (m->points[k].x - m->points[j].x));
1032 if (c < 0) count--;
1033 else if (c > 0) count++;
1034 }
1035 if (count > 0) return EINA_TRUE;
1036 return EINA_FALSE;
1037}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4EAPI void
5evas_object_name_set(Evas_Object *obj, const char *name)
6{
7 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
8 return;
9 MAGIC_CHECK_END();
10 if (obj->name)
11 {
12 eina_hash_del(obj->layer->evas->name_hash, obj->name, obj);
13 free(obj->name);
14 }
15 if (!name) obj->name = NULL;
16 else
17 {
18 obj->name = strdup(name);
19 eina_hash_add(obj->layer->evas->name_hash, obj->name, obj);
20 }
21}
22
23EAPI const char *
24evas_object_name_get(const Evas_Object *obj)
25{
26 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
27 return NULL;
28 MAGIC_CHECK_END();
29 return obj->name;
30}
31
32EAPI Evas_Object *
33evas_object_name_find(const Evas *e, const char *name)
34{
35 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
36 return NULL;
37 MAGIC_CHECK_END();
38 if (!name) return NULL;
39 return (Evas_Object *)eina_hash_find(e->name_hash, name);
40}
41
42static Evas_Object *
43_evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse)
44{
45 const Eina_Inlist *lst;
46 Evas_Object *child;
47
48 if (!obj->smart.smart) return NULL;
49 lst = evas_object_smart_members_get_direct(obj);
50 EINA_INLIST_FOREACH(lst, child)
51 {
52 if (child->delete_me) continue;
53 if (!child->name) continue;
54 if (!strcmp(name, child->name)) return child;
55 if (recurse != 0)
56 {
57 if ((obj = _evas_object_name_child_find(child, name, recurse - 1)))
58 return (Evas_Object *)obj;
59 }
60 }
61 return NULL;
62}
63
64EAPI Evas_Object *
65evas_object_name_child_find(const Evas_Object *obj, const char *name, int recurse)
66{
67 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
68 return NULL;
69 MAGIC_CHECK_END();
70 if (!name) return NULL;
71 return _evas_object_name_child_find(obj, name, recurse);
72}
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 @@
1#include "evas_common.h"
2
3#ifdef _WIN32_WCE
4# undef remove
5#endif
6
7typedef struct _Evas_Object_Box_Iterator Evas_Object_Box_Iterator;
8typedef struct _Evas_Object_Box_Accessor Evas_Object_Box_Accessor;
9
10struct _Evas_Object_Box_Iterator
11{
12 Eina_Iterator iterator;
13
14 Eina_Iterator *real_iterator;
15 const Evas_Object *box;
16};
17
18struct _Evas_Object_Box_Accessor
19{
20 Eina_Accessor accessor;
21
22 Eina_Accessor *real_accessor;
23 const Evas_Object *box;
24};
25
26#define _evas_object_box_type "Evas_Object_Box"
27#define SIG_CHILD_ADDED "child,added"
28#define SIG_CHILD_REMOVED "child,removed"
29
30static const Evas_Smart_Cb_Description _signals[] =
31{
32 {SIG_CHILD_ADDED, ""},
33 {SIG_CHILD_REMOVED, ""},
34 {NULL, NULL}
35};
36
37
38static void _sizing_eval(Evas_Object *obj);
39
40#define EVAS_OBJECT_BOX_DATA_GET(o, ptr) \
41 Evas_Object_Box_Data *ptr = evas_object_smart_data_get(o)
42
43#define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, ptr) \
44 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
45 if (!ptr) \
46 { \
47 CRIT("no widget data for object %p (%s)", \
48 o, evas_object_type_get(o)); \
49 fflush(stderr); \
50 abort(); \
51 return; \
52}
53
54#define EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
55 EVAS_OBJECT_BOX_DATA_GET(o, ptr); \
56 if (!ptr) \
57 { \
58 CRIT("no widget data for object %p (%s)", \
59 o, evas_object_type_get(o)); \
60 fflush(stderr); \
61 abort(); \
62 return val; \
63 }
64
65EVAS_SMART_SUBCLASS_NEW(_evas_object_box_type, _evas_object_box,
66 Evas_Object_Box_Api, Evas_Smart_Class,
67 evas_object_smart_clipped_class_get, NULL)
68
69static Eina_Bool
70_evas_object_box_iterator_next(Evas_Object_Box_Iterator *it, void **data)
71{
72 Evas_Object_Box_Option *opt;
73
74 if (!eina_iterator_next(it->real_iterator, (void **)&opt))
75 return EINA_FALSE;
76 if (data) *data = opt->obj;
77 return EINA_TRUE;
78}
79
80static Evas_Object *
81_evas_object_box_iterator_get_container(Evas_Object_Box_Iterator *it)
82{
83 return (Evas_Object *)it->box;
84}
85
86static void
87_evas_object_box_iterator_free(Evas_Object_Box_Iterator *it)
88{
89 eina_iterator_free(it->real_iterator);
90 free(it);
91}
92
93static Eina_Bool
94_evas_object_box_accessor_get_at(Evas_Object_Box_Accessor *it, unsigned int idx, void **data)
95{
96 Evas_Object_Box_Option *opt = NULL;
97
98 if (!eina_accessor_data_get(it->real_accessor, idx, (void *)&opt))
99 return EINA_FALSE;
100 if (data) *data = opt->obj;
101 return EINA_TRUE;
102}
103
104static Evas_Object *
105_evas_object_box_accessor_get_container(Evas_Object_Box_Accessor *it)
106{
107 return (Evas_Object *)it->box;
108}
109
110static void
111_evas_object_box_accessor_free(Evas_Object_Box_Accessor *it)
112{
113 eina_accessor_free(it->real_accessor);
114 free(it);
115}
116
117static void
118_on_child_resize(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__)
119{
120 Evas_Object *box = data;
121 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv);
122 if (!priv->layouting) evas_object_smart_changed(box);
123}
124
125static void
126_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *o, void *einfo __UNUSED__)
127{
128 const Evas_Object_Box_Api *api;
129 Evas_Object *box = data;
130
131 EVAS_OBJECT_BOX_DATA_GET(box, priv);
132 api = priv->api;
133
134 if ((!api) || (!api->remove))
135 {
136 ERR("no api->remove");
137 return;
138 }
139
140 if (!api->remove(box, priv, o))
141 ERR("child removal failed");
142 evas_object_smart_changed(box);
143}
144
145static void
146_on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *o __UNUSED__, void *einfo __UNUSED__)
147{
148 Evas_Object *box = data;
149 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(box, priv);
150 if (!priv->layouting) evas_object_smart_changed(box);
151}
152
153static void
154_on_hints_changed(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *o , void *einfo __UNUSED__)
155{
156 _sizing_eval(o);
157}
158
159static Evas_Object_Box_Option *
160_evas_object_box_option_new(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child)
161{
162 Evas_Object_Box_Option *opt;
163 const Evas_Object_Box_Api *api;
164
165 api = priv->api;
166 if ((!api) || (!api->option_new))
167 {
168 ERR("no api->option_new");
169 return NULL;
170 }
171
172 opt = api->option_new(o, priv, child);
173 if (!opt)
174 {
175 ERR("option_new failed");
176 return NULL;
177 }
178
179 return opt;
180}
181
182static void
183_evas_object_box_child_callbacks_unregister(Evas_Object *obj)
184{
185 evas_object_event_callback_del
186 (obj, EVAS_CALLBACK_RESIZE, _on_child_resize);
187 evas_object_event_callback_del
188 (obj, EVAS_CALLBACK_FREE, _on_child_del);
189 evas_object_event_callback_del
190 (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed);
191}
192
193static Evas_Object_Box_Option *
194_evas_object_box_option_callbacks_register(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object_Box_Option *opt)
195{
196 const Evas_Object_Box_Api *api;
197 Evas_Object *obj = opt->obj;
198
199 api = priv->api;
200
201 if ((!api) || (!api->option_free))
202 {
203 WRN("api->option_free not set (may cause memory leaks, segfaults)");
204 return NULL;
205 }
206
207 evas_object_event_callback_add
208 (obj, EVAS_CALLBACK_RESIZE, _on_child_resize, o);
209 evas_object_event_callback_add
210 (obj, EVAS_CALLBACK_FREE, _on_child_del, o);
211 evas_object_event_callback_add
212 (obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o);
213
214 return opt;
215}
216
217static Evas_Object_Box_Option *
218_evas_object_box_option_new_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object *child)
219{
220 Evas_Object_Box_Option *opt;
221
222 opt = (Evas_Object_Box_Option *)malloc(sizeof(*opt));
223 if (!opt)
224 return NULL;
225
226 opt->obj = child;
227
228 return opt;
229}
230
231static void
232_evas_object_box_option_free_default(Evas_Object *o __UNUSED__, Evas_Object_Box_Data *priv __UNUSED__, Evas_Object_Box_Option *opt)
233{
234 free(opt);
235}
236
237static Evas_Object_Box_Option *
238_evas_object_box_append_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child)
239{
240 Evas_Object_Box_Option *opt;
241
242 opt = _evas_object_box_option_new(o, priv, child);
243 if (!opt)
244 return NULL;
245
246 priv->children = eina_list_append(priv->children, opt);
247 priv->children_changed = EINA_TRUE;
248 evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt);
249
250 return opt;
251}
252
253static Evas_Object_Box_Option *
254_evas_object_box_prepend_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child)
255{
256 Evas_Object_Box_Option *opt;
257
258 opt = _evas_object_box_option_new(o, priv, child);
259 if (!opt)
260 return NULL;
261
262 priv->children = eina_list_prepend(priv->children, opt);
263 priv->children_changed = EINA_TRUE;
264 evas_object_smart_callback_call(o, SIG_CHILD_ADDED, opt);
265
266 return opt;
267}
268
269static Evas_Object_Box_Option *
270_evas_object_box_insert_before_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference)
271{
272 Eina_List *l;
273 Evas_Object_Box_Option *opt;
274
275 EINA_LIST_FOREACH(priv->children, l, opt)
276 {
277 if (opt->obj == reference)
278 {
279 Evas_Object_Box_Option *new_opt;
280
281 new_opt = _evas_object_box_option_new(o, priv, child);
282 if (!new_opt)
283 return NULL;
284
285 priv->children = eina_list_prepend_relative
286 (priv->children, new_opt, opt);
287 priv->children_changed = EINA_TRUE;
288 evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt);
289 return new_opt;
290 }
291 }
292
293 return NULL;
294}
295
296static Evas_Object_Box_Option *
297_evas_object_box_insert_after_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, const Evas_Object *reference)
298{
299 Eina_List *l;
300 Evas_Object_Box_Option *opt;
301
302 EINA_LIST_FOREACH(priv->children, l, opt)
303 {
304 if (opt->obj == reference)
305 {
306 Evas_Object_Box_Option *new_opt;
307
308 new_opt = _evas_object_box_option_new(o, priv, child);
309 if (!new_opt)
310 return NULL;
311
312 priv->children = eina_list_append_relative
313 (priv->children, new_opt, opt);
314 priv->children_changed = EINA_TRUE;
315 evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt);
316 return new_opt;
317 }
318 }
319
320 return NULL;
321}
322
323static Evas_Object_Box_Option *
324_evas_object_box_insert_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child, unsigned int pos)
325{
326 Eina_List *l;
327 unsigned int i;
328
329 if ((pos == 0) && (eina_list_count(priv->children) == 0))
330 {
331 Evas_Object_Box_Option *new_opt;
332
333 new_opt = _evas_object_box_option_new(o, priv, child);
334 if (!new_opt)
335 return NULL;
336
337 priv->children = eina_list_prepend(priv->children, new_opt);
338 priv->children_changed = EINA_TRUE;
339 evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt);
340 return new_opt;
341 }
342
343 for (l = priv->children, i = 0; l; l = l->next, i++)
344 {
345 Evas_Object_Box_Option *opt = l->data;
346
347 if (i == pos)
348 {
349 Evas_Object_Box_Option *new_opt;
350
351 new_opt = _evas_object_box_option_new(o, priv, child);
352 if (!new_opt)
353 return NULL;
354
355 priv->children = eina_list_prepend_relative
356 (priv->children, new_opt, opt);
357 priv->children_changed = EINA_TRUE;
358 evas_object_smart_callback_call(o, SIG_CHILD_ADDED, new_opt);
359 return new_opt;
360 }
361 }
362
363 return NULL;
364}
365
366static Evas_Object *
367_evas_object_box_remove_default(Evas_Object *o, Evas_Object_Box_Data *priv, Evas_Object *child)
368{
369 const Evas_Object_Box_Api *api;
370 Evas_Object_Box_Option *opt;
371 Eina_List *l;
372
373 api = priv->api;
374
375 if ((!api) || (!api->option_free))
376 {
377 ERR("api->option_free not set (may cause memory leaks, segfaults)");
378 return NULL;
379 }
380
381 EINA_LIST_FOREACH(priv->children, l, opt)
382 {
383 Evas_Object *obj = opt->obj;
384
385 if (obj == child)
386 {
387 priv->children = eina_list_remove(priv->children, opt);
388 api->option_free(o, priv, opt);
389 priv->children_changed = EINA_TRUE;
390 evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj);
391
392 return obj;
393 }
394 }
395
396 return NULL;
397}
398
399static Evas_Object *
400_evas_object_box_remove_at_default(Evas_Object *o, Evas_Object_Box_Data *priv, unsigned int pos)
401{
402 const Evas_Object_Box_Api *api;
403 Eina_List *node;
404 Evas_Object_Box_Option *opt;
405 Evas_Object *obj;
406
407 api = priv->api;
408
409 if ((!api) || (!api->option_free))
410 {
411 WRN("api->option_free not set (may cause memory leaks, segfaults)");
412 return NULL;
413 }
414
415 node = eina_list_nth_list(priv->children, pos);
416 if (!node)
417 {
418 ERR("No item to be removed at position %d", pos);
419 return NULL;
420 }
421
422 opt = node->data;
423 obj = opt->obj;
424
425 priv->children = eina_list_remove_list(priv->children, node);
426 api->option_free(o, priv, opt);
427 priv->children_changed = EINA_TRUE;
428 evas_object_smart_callback_call(o, SIG_CHILD_REMOVED, obj);
429 return obj;
430}
431
432static void
433_evas_object_box_smart_add(Evas_Object *o)
434{
435 Evas_Object_Box_Data *priv;
436
437 priv = evas_object_smart_data_get(o);
438 if (!priv)
439 {
440 const Evas_Smart *smart;
441 const Evas_Smart_Class *sc;
442
443 priv = (Evas_Object_Box_Data *)calloc(1, sizeof(*priv));
444 if (!priv)
445 {
446 ERR("Could not allocate object private data.");
447 return;
448 }
449
450 smart = evas_object_smart_smart_get(o);
451 sc = evas_smart_class_get(smart);
452 priv->api = (const Evas_Object_Box_Api *)sc;
453
454 evas_object_smart_data_set(o, priv);
455 }
456 _evas_object_box_parent_sc->add(o);
457
458
459 evas_object_event_callback_add
460 (o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_hints_changed, o);
461 priv->children = NULL;
462 priv->align.h = 0.5;
463 priv->align.v = 0.5;
464 priv->pad.h = 0;
465 priv->pad.v = 0;
466 priv->layout.cb = evas_object_box_layout_horizontal;
467 priv->layout.data = NULL;
468 priv->layout.free_data = NULL;
469}
470
471static void
472_evas_object_box_smart_del(Evas_Object *o)
473{
474 const Evas_Object_Box_Api *api;
475 Eina_List *l;
476
477 EVAS_OBJECT_BOX_DATA_GET(o, priv);
478
479 api = priv->api;
480 if ((!api) || (!api->option_free))
481 {
482 WRN("api->option_free not set (may cause memory leaks, segfaults)");
483 return;
484 }
485
486 l = priv->children;
487 while (l)
488 {
489 Evas_Object_Box_Option *opt = l->data;
490
491 _evas_object_box_child_callbacks_unregister(opt->obj);
492 api->option_free(o, priv, opt);
493 l = eina_list_remove_list(l, l);
494 }
495
496 if (priv->layout.data && priv->layout.free_data)
497 priv->layout.free_data(priv->layout.data);
498
499 _evas_object_box_parent_sc->del(o);
500}
501
502static void
503_evas_object_box_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
504{
505 Evas_Coord ow, oh;
506 evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
507 if ((ow == w) && (oh == h)) return;
508 evas_object_smart_changed(o);
509}
510
511static void
512_evas_object_box_smart_calculate(Evas_Object *o)
513{
514 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv);
515 if (priv->layout.cb)
516 {
517 priv->layouting = 1;
518 priv->layout.cb(o, priv, priv->layout.data);
519 priv->layouting = 0;
520 priv->children_changed = EINA_FALSE;
521 }
522 else
523 ERR("No layout function set for %p box.", o);
524}
525
526static void
527_evas_object_box_smart_set_user(Evas_Object_Box_Api *api)
528{
529 api->base.add = _evas_object_box_smart_add;
530 api->base.del = _evas_object_box_smart_del;
531 api->base.resize = _evas_object_box_smart_resize;
532 api->base.calculate = _evas_object_box_smart_calculate;
533 api->base.callbacks = _signals;
534
535 api->append = _evas_object_box_append_default;
536 api->prepend = _evas_object_box_prepend_default;
537 api->insert_before = _evas_object_box_insert_before_default;
538 api->insert_after = _evas_object_box_insert_after_default;
539 api->insert_at = _evas_object_box_insert_at_default;
540 api->remove = _evas_object_box_remove_default;
541 api->remove_at = _evas_object_box_remove_at_default;
542 api->option_new = _evas_object_box_option_new_default;
543 api->option_free = _evas_object_box_option_free_default;
544}
545
546EAPI Evas_Object *
547evas_object_box_add(Evas *evas)
548{
549 return evas_object_smart_add(evas, _evas_object_box_smart_class_new());
550}
551
552EAPI Evas_Object *
553evas_object_box_add_to(Evas_Object *parent)
554{
555 Evas *evas;
556 Evas_Object *o;
557
558 evas = evas_object_evas_get(parent);
559 o = evas_object_box_add(evas);
560 evas_object_smart_member_add(o, parent);
561 return o;
562}
563
564EAPI void
565evas_object_box_smart_set(Evas_Object_Box_Api *api)
566{
567 if (!api)
568 return;
569 _evas_object_box_smart_set(api);
570}
571
572EAPI const Evas_Object_Box_Api *
573evas_object_box_smart_class_get(void)
574{
575 static Evas_Object_Box_Api _sc =
576 EVAS_OBJECT_BOX_API_INIT_NAME_VERSION(_evas_object_box_type);
577 static const Evas_Object_Box_Api *class = NULL;
578
579 if (class)
580 return class;
581
582 evas_object_box_smart_set(&_sc);
583 class = &_sc;
584
585 return class;
586}
587
588EAPI void
589evas_object_box_layout_set(Evas_Object *o, Evas_Object_Box_Layout cb, const void *data, void (*free_data)(void *data))
590{
591 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv);
592
593 if ((priv->layout.cb == cb) && (priv->layout.data == data) &&
594 (priv->layout.free_data == free_data))
595 return;
596
597 if (priv->layout.data && priv->layout.free_data)
598 priv->layout.free_data(priv->layout.data);
599
600 priv->layout.cb = cb;
601 priv->layout.data = (void *)data;
602 priv->layout.free_data = free_data;
603 evas_object_smart_changed(o);
604}
605
606static void
607_fixed_point_divide_and_decompose_integer(int dividend, int divisor, int *int_part, int *frac_part)
608{
609 int quotient = (long long)(dividend << 16) / divisor;
610 *frac_part = quotient & 0xffff;
611 *int_part = quotient >> 16;
612}
613
614static void
615_layout_dimension_change_min_max_cell_bound(int dim, int *new_dim, int min_d, int max_d, int cell_sz)
616{
617 if (dim > cell_sz)
618 {
619 if ((min_d != 0) && (cell_sz < min_d))
620 *new_dim = min_d;
621 else
622 *new_dim = cell_sz;
623 }
624 else
625 {
626 if ((max_d != -1) && (cell_sz > max_d))
627 *new_dim = max_d;
628 else
629 *new_dim = cell_sz;
630 }
631}
632
633static void
634_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)
635{
636 if (align >= 0.0)
637 {
638 *new_dim = dim;
639 *offset = (space_sz - (dim + pad_before + pad_after)) * align
640 + pad_before;
641 }
642 else
643 {
644 if ((max_dim != -1) && (space_sz > max_dim))
645 {
646 *new_dim = max_dim;
647 *offset = (space_sz - (max_dim + pad_before + pad_after)) * 0.5
648 + pad_before;
649 }
650 else
651 {
652 *new_dim = space_sz;
653 *offset = 0;
654 }
655 }
656}
657
658static void
659_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)
660{
661 if (align >= 0.0)
662 {
663 *new_dim = dim;
664 *offset =
665 (cell_sz - (dim + pad_before + pad_after)) * align + pad_before;
666 }
667 else
668 {
669 *offset = pad_before;
670 _layout_dimension_change_min_max_cell_bound
671 (dim, new_dim, min_dim, max_dim, cell_sz - pad_before - pad_after);
672 }
673}
674
675static void
676_sizing_eval(Evas_Object *obj)
677{
678 Evas_Coord minw, minh, maxw, maxh;
679 Evas_Coord w, h;
680
681 evas_object_size_hint_min_get(obj, &minw, &minh);
682 evas_object_size_hint_max_get(obj, &maxw, &maxh);
683 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
684
685 if (w < minw) w = minw;
686 if (h < minh) h = minh;
687 if ((maxw >= 0) && (w > maxw)) w = maxw;
688 if ((maxh >= 0) && (h > maxh)) h = maxh;
689
690 evas_object_resize(obj, w, h);
691}
692
693static int
694_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)
695{
696 int rem_diff = 0;
697 int i;
698
699 for (i = 0; i < n_objects; i++)
700 {
701 Evas_Object_Box_Option *opt = objects[i];
702 Evas_Object *o = opt->obj;
703 int h;
704
705 evas_object_geometry_get(o, NULL, NULL, NULL, &h);
706
707 if (remaining <= 0)
708 {
709 int min_w;
710
711 evas_object_size_hint_min_get(o, &min_w, NULL);
712 evas_object_resize(o, min_w, h);
713 }
714 else
715 {
716 double normal_weight, weight_x;
717 int target_size;
718 int max_w;
719
720 evas_object_size_hint_weight_get(o, &weight_x, NULL);
721 normal_weight = weight_x / weight_total;
722 target_size = (int)((double)remaining * normal_weight);
723
724 evas_object_size_hint_max_get(o, &max_w, NULL);
725 if ((max_w != -1) && (target_size > max_w))
726 {
727 evas_object_resize(o, max_w, h);
728 rem_diff += max_w;
729 objects[i] = objects[n_objects - 1];
730 weight_total -= weight_x;
731 n_objects--;
732 return _evas_object_box_layout_horizontal_weight_apply
733 (priv, objects, n_objects, remaining - rem_diff,
734 weight_total);
735 }
736 else
737 {
738 evas_object_resize(o, target_size, h);
739 rem_diff += target_size;
740 }
741 }
742 }
743
744 return remaining - rem_diff;
745}
746
747EAPI void
748evas_object_box_layout_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
749{
750 int pad_inc = 0, sub_pixel = 0;
751 int req_w, global_pad, remaining, top_h = 0;
752 double weight_total = 0.0;
753 int weight_use = 0;
754 int x, y, w, h;
755 int n_children;
756 Evas_Object_Box_Option *opt;
757 Evas_Object_Box_Option **objects;
758 Eina_List *l;
759
760 n_children = eina_list_count(priv->children);
761 if (!n_children)
762 return;
763
764 objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children);
765 if (!objects)
766 return;
767
768 evas_object_geometry_get(o, &x, &y, &w, &h);
769 global_pad = priv->pad.h;
770 req_w = global_pad * (n_children - 1);
771
772 EINA_LIST_FOREACH(priv->children, l, opt)
773 {
774 int padding_l, padding_r;
775 double weight_x;
776
777 _sizing_eval(opt->obj);
778 evas_object_size_hint_weight_get(opt->obj, &weight_x, NULL);
779 evas_object_size_hint_padding_get
780 (opt->obj, &padding_l, &padding_r, NULL, NULL);
781 req_w += padding_l + padding_r;
782
783 if (!weight_x)
784 {
785 int child_w;
786
787 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL);
788 req_w += child_w;
789 }
790 else
791 {
792 objects[weight_use] = opt;
793 weight_use++;
794 weight_total += weight_x;
795 }
796 }
797
798 remaining = w - req_w;
799
800 if (weight_use)
801 remaining = _evas_object_box_layout_horizontal_weight_apply
802 (priv, objects, weight_use, remaining, weight_total);
803
804 if (priv->align.h >= 0.0)
805 x += remaining * priv->align.h;
806 else if (n_children == 1)
807 x += remaining / 2;
808 else
809 { /* justified */
810 _fixed_point_divide_and_decompose_integer
811 (remaining, n_children - 1, &global_pad, &pad_inc);
812 global_pad += priv->pad.h;
813 }
814
815 EINA_LIST_FOREACH(priv->children, l, opt)
816 {
817 int child_w, child_h, max_h, new_h, off_x, off_y;
818 int padding_l, padding_r, padding_t, padding_b;
819 double align_y;
820
821 evas_object_size_hint_align_get(opt->obj, NULL, &align_y);
822 evas_object_size_hint_padding_get
823 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
824 evas_object_size_hint_max_get(opt->obj, NULL, &max_h);
825
826 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
827
828 off_x = padding_l;
829 new_h = child_h;
830 if (new_h > top_h) top_h = new_h;
831
832 _layout_set_offset_and_expand_dimension_space_max_bounded
833 (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b);
834
835 if (new_h != child_h)
836 evas_object_resize(opt->obj, child_w, new_h);
837 evas_object_move(opt->obj, x + off_x, y + off_y);
838
839 x += child_w + padding_l + padding_r + global_pad;
840 sub_pixel += pad_inc;
841 if (sub_pixel >= 1 << 16)
842 {
843 x++;
844 sub_pixel -= 1 << 16;
845 }
846 }
847
848 evas_object_size_hint_min_set(o, req_w, top_h);
849}
850
851static int
852_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)
853{
854 int rem_diff = 0;
855 int i;
856
857 for (i = 0; i < n_objects; i++)
858 {
859 Evas_Object_Box_Option *opt = objects[i];
860 Evas_Object *o = opt->obj;
861 int w;
862
863 evas_object_geometry_get(o, NULL, NULL, &w, NULL);
864
865 if (remaining <= 0)
866 {
867 int min_h;
868
869 evas_object_size_hint_min_get(o, NULL, &min_h);
870 evas_object_resize(o, w, min_h);
871 }
872 else
873 {
874 double normal_weight, weight_y;
875 int target_size;
876 int max_h;
877
878 evas_object_size_hint_weight_get(o, NULL, &weight_y);
879 normal_weight = weight_y / weight_total;
880 target_size = (int)((double)remaining * normal_weight);
881
882 evas_object_size_hint_max_get(o, NULL, &max_h);
883 if ((max_h != -1) && (target_size > max_h))
884 {
885 evas_object_resize(o, w, max_h);
886 rem_diff += max_h;
887 objects[i] = objects[n_objects - 1];
888 weight_total -= weight_y;
889 n_objects--;
890 return _evas_object_box_layout_vertical_weight_apply
891 (priv, objects, n_objects, remaining - rem_diff,
892 weight_total);
893 }
894 else
895 {
896 evas_object_resize(o, w, target_size);
897 rem_diff += target_size;
898 }
899 }
900 }
901
902 return remaining - rem_diff;
903}
904
905EAPI void
906evas_object_box_layout_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
907{
908 int pad_inc = 0, sub_pixel = 0;
909 int req_h, global_pad, remaining, top_w = 0;
910 double weight_total = 0.0;
911 int weight_use = 0;
912 int x, y, w, h;
913 int n_children;
914 Evas_Object_Box_Option *opt;
915 Evas_Object_Box_Option **objects;
916 Eina_List *l;
917
918 n_children = eina_list_count(priv->children);
919 if (!n_children)
920 return;
921
922 objects = (Evas_Object_Box_Option **)alloca(sizeof(Evas_Object_Box_Option *) * n_children);
923 if (!objects)
924 return;
925
926 evas_object_geometry_get(o, &x, &y, &w, &h);
927 global_pad = priv->pad.v;
928 req_h = global_pad * (n_children - 1);
929
930 EINA_LIST_FOREACH(priv->children, l, opt)
931 {
932 int padding_t, padding_b;
933 double weight_y;
934
935 _sizing_eval(opt->obj);
936 evas_object_size_hint_weight_get(opt->obj, NULL, &weight_y);
937 evas_object_size_hint_padding_get
938 (opt->obj, NULL, NULL, &padding_t, &padding_b);
939 req_h += padding_t + padding_b;
940
941 if (!weight_y)
942 {
943 int child_h;
944
945 evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h);
946 req_h += child_h;
947 }
948 else
949 {
950 objects[weight_use] = opt;
951 weight_use++;
952 weight_total += weight_y;
953 }
954 }
955
956 remaining = h - req_h;
957
958 if (weight_use)
959 remaining = _evas_object_box_layout_vertical_weight_apply
960 (priv, objects, weight_use, remaining, weight_total);
961
962 if (priv->align.v >= 0.0)
963 y += remaining * priv->align.v;
964 else if (n_children == 1)
965 y += remaining / 2;
966 else
967 { /* justified */
968 _fixed_point_divide_and_decompose_integer
969 (remaining, n_children - 1, &global_pad, &pad_inc);
970 global_pad += priv->pad.v;
971 }
972
973 EINA_LIST_FOREACH(priv->children, l, opt)
974 {
975 int child_w, child_h, max_w, new_w, off_x, off_y;
976 int padding_l, padding_r, padding_t, padding_b;
977 double align_x;
978
979 evas_object_size_hint_align_get(opt->obj, &align_x, NULL);
980 evas_object_size_hint_padding_get
981 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
982 evas_object_size_hint_max_get(opt->obj, &max_w, NULL);
983
984 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
985
986 off_y = padding_t;
987 new_w = child_w;
988
989 _layout_set_offset_and_expand_dimension_space_max_bounded
990 (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r);
991
992 if (new_w > top_w) top_w = new_w;
993
994 if (new_w != child_w)
995 evas_object_resize(opt->obj, new_w, child_h);
996 evas_object_move(opt->obj, x + off_x, y + off_y);
997
998 y += child_h + padding_t + padding_b + global_pad;
999 sub_pixel += pad_inc;
1000 if (sub_pixel >= 1 << 16)
1001 {
1002 y++;
1003 sub_pixel -= 1 << 16;
1004 }
1005 }
1006
1007 evas_object_size_hint_min_set(o, top_w, req_h);
1008}
1009
1010EAPI void
1011evas_object_box_layout_homogeneous_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
1012{
1013 int cell_sz, share, inc;
1014 int sub_pixel = 0;
1015 int x, y, w, h;
1016 int n_children;
1017 Evas_Object_Box_Option *opt;
1018 Eina_List *l;
1019
1020 n_children = eina_list_count(priv->children);
1021 if (!n_children)
1022 return;
1023
1024 evas_object_geometry_get(o, &x, &y, &w, &h);
1025
1026 share = w - priv->pad.h * (n_children - 1);
1027 _fixed_point_divide_and_decompose_integer
1028 (share, n_children, &cell_sz, &inc);
1029
1030 EINA_LIST_FOREACH(priv->children, l, opt)
1031 {
1032 int child_w, child_h, max_h, min_w, max_w, new_w, new_h, off_x, off_y;
1033 int padding_l, padding_r, padding_t, padding_b;
1034 double align_x, align_y;
1035
1036 evas_object_size_hint_align_get(opt->obj, &align_x, &align_y);
1037 evas_object_size_hint_padding_get
1038 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
1039 evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
1040 evas_object_size_hint_min_get(opt->obj, &min_w, NULL);
1041
1042 _sizing_eval(opt->obj);
1043 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
1044
1045 new_w = child_w;
1046 new_h = child_h;
1047
1048 _layout_set_offset_and_expand_dimension_space_max_bounded
1049 (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b);
1050
1051 _layout_set_offset_and_change_dimension_min_max_cell_bounded
1052 (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x,
1053 padding_l, padding_r);
1054
1055 if ((new_w != child_w) || (new_h != child_h))
1056 evas_object_resize(opt->obj, new_w, new_h);
1057 evas_object_move(opt->obj, x + off_x, y + off_y);
1058
1059 x += cell_sz + priv->pad.h;
1060 sub_pixel += inc;
1061 if (sub_pixel >= 1 << 16)
1062 {
1063 x++;
1064 sub_pixel -= 1 << 16;
1065 }
1066 }
1067
1068 evas_object_size_hint_min_set(o, w, h);
1069}
1070
1071EAPI void
1072evas_object_box_layout_homogeneous_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
1073{
1074 int cell_sz, share, inc;
1075 int sub_pixel = 0;
1076 int x, y, w, h;
1077 int n_children;
1078 Evas_Object_Box_Option *opt;
1079 Eina_List *l;
1080
1081 n_children = eina_list_count(priv->children);
1082 if (!n_children)
1083 return;
1084
1085 evas_object_geometry_get(o, &x, &y, &w, &h);
1086
1087 share = h - priv->pad.v * (n_children - 1);
1088 _fixed_point_divide_and_decompose_integer
1089 (share, n_children, &cell_sz, &inc);
1090
1091 EINA_LIST_FOREACH(priv->children, l, opt)
1092 {
1093 int child_w, child_h, max_w, min_h, max_h, new_w, new_h, off_x, off_y;
1094 int padding_l, padding_r, padding_t, padding_b;
1095 double align_x, align_y;
1096
1097 evas_object_size_hint_align_get(opt->obj, &align_x, &align_y);
1098 evas_object_size_hint_padding_get
1099 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
1100 evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
1101 evas_object_size_hint_min_get(opt->obj, NULL, &min_h);
1102
1103 _sizing_eval(opt->obj);
1104 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
1105 new_w = child_w;
1106 new_h = child_h;
1107
1108 _layout_set_offset_and_expand_dimension_space_max_bounded
1109 (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r);
1110
1111 _layout_set_offset_and_change_dimension_min_max_cell_bounded
1112 (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y,
1113 padding_t, padding_b);
1114
1115 if ((new_w != child_w) || (new_h != child_h))
1116 evas_object_resize(opt->obj, new_w, new_h);
1117 evas_object_move(opt->obj, x + off_x, y + off_y);
1118
1119 y += cell_sz + priv->pad.v;
1120 sub_pixel += inc;
1121 if (sub_pixel >= 1 << 16)
1122 {
1123 y++;
1124 sub_pixel -= 1 << 16;
1125 }
1126 }
1127
1128 evas_object_size_hint_min_set(o, w, h);
1129}
1130
1131EAPI void
1132evas_object_box_layout_homogeneous_max_size_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
1133{
1134 int remaining, global_pad, pad_inc = 0, sub_pixel = 0;
1135 int cell_sz = 0;
1136 int x, y, w, h;
1137 int top_h = 0;
1138 int n_children;
1139 Evas_Object_Box_Option *opt;
1140 Eina_List *l;
1141
1142 n_children = eina_list_count(priv->children);
1143 if (!n_children)
1144 return;
1145
1146 evas_object_geometry_get(o, &x, &y, &w, &h);
1147
1148 EINA_LIST_FOREACH(priv->children, l, opt)
1149 {
1150 int child_w, padding_l, padding_r;
1151
1152 _sizing_eval(opt->obj);
1153 evas_object_size_hint_padding_get
1154 (opt->obj, &padding_l, &padding_r, NULL, NULL);
1155 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, NULL);
1156 if (child_w + padding_l + padding_r > cell_sz)
1157 cell_sz = child_w + padding_l + padding_r;
1158 }
1159
1160 global_pad = priv->pad.h;
1161 remaining = w - n_children * cell_sz - global_pad * (n_children - 1);
1162
1163 if (priv->align.h >= 0.0)
1164 x += remaining * priv->align.h;
1165 else if (n_children == 1)
1166 x += remaining / 2;
1167 else
1168 { /* justified */
1169 _fixed_point_divide_and_decompose_integer
1170 (remaining, n_children - 1, &global_pad, &pad_inc);
1171 global_pad += priv->pad.h;
1172 }
1173
1174 EINA_LIST_FOREACH(priv->children, l, opt)
1175 {
1176 int child_w, child_h, min_w, max_w, max_h, new_w, new_h, off_x, off_y;
1177 int padding_l, padding_r, padding_t, padding_b;
1178 double align_x, align_y;
1179
1180 evas_object_size_hint_align_get(opt->obj, &align_x, &align_y);
1181 evas_object_size_hint_padding_get
1182 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
1183 evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
1184 evas_object_size_hint_min_get(opt->obj, &min_w, NULL);
1185
1186 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
1187
1188 new_w = child_w;
1189 new_h = child_h;
1190 if (new_h > top_h) top_h = new_h;
1191
1192 _layout_set_offset_and_expand_dimension_space_max_bounded
1193 (child_h, &new_h, h, max_h, &off_y, align_y, padding_t, padding_b);
1194
1195 _layout_set_offset_and_change_dimension_min_max_cell_bounded
1196 (child_w, &new_w, min_w, max_w, cell_sz, &off_x, align_x,
1197 padding_l, padding_r);
1198
1199 if ((new_w != child_w) || (new_h != child_h))
1200 evas_object_resize(opt->obj, new_w, new_h);
1201 evas_object_move(opt->obj, x + off_x, y + off_y);
1202
1203 x += cell_sz + global_pad;
1204 sub_pixel += pad_inc;
1205 if (sub_pixel >= 1 << 16)
1206 {
1207 x++;
1208 sub_pixel -= 1 << 16;
1209 }
1210 }
1211
1212 evas_object_size_hint_min_set(o, x, top_h);
1213}
1214
1215EAPI void
1216evas_object_box_layout_homogeneous_max_size_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
1217{
1218 int remaining, global_pad, pad_inc = 0, sub_pixel = 0;
1219 int cell_sz = 0;
1220 int x, y, w, h;
1221 int top_w = 0;
1222 int n_children;
1223 Evas_Object_Box_Option *opt;
1224 Eina_List *l;
1225
1226 n_children = eina_list_count(priv->children);
1227 if (!n_children)
1228 return;
1229
1230 evas_object_geometry_get(o, &x, &y, &w, &h);
1231
1232 EINA_LIST_FOREACH(priv->children, l, opt)
1233 {
1234 int child_h, padding_t, padding_b;
1235
1236 _sizing_eval(opt->obj);
1237 evas_object_size_hint_padding_get
1238 (opt->obj, NULL, NULL, &padding_t, &padding_b);
1239 evas_object_geometry_get(opt->obj, NULL, NULL, NULL, &child_h);
1240 if (child_h + padding_t + padding_b > cell_sz)
1241 cell_sz = child_h + padding_t + padding_b;
1242 }
1243
1244 global_pad = priv->pad.v;
1245 remaining = h - n_children * cell_sz - global_pad * (n_children - 1);
1246
1247 if (priv->align.v >= 0.0)
1248 y += remaining * priv->align.v;
1249 else if (n_children == 1)
1250 y += remaining / 2;
1251 else
1252 { /* justified */
1253 _fixed_point_divide_and_decompose_integer
1254 (remaining, n_children - 1, &global_pad, &pad_inc);
1255 global_pad += priv->pad.v;
1256 }
1257
1258 EINA_LIST_FOREACH(priv->children, l, opt)
1259 {
1260 int child_w, child_h, max_h, min_h, max_w, new_w, new_h, off_x, off_y;
1261 int padding_l, padding_r, padding_t, padding_b;
1262 double align_x, align_y;
1263
1264 evas_object_size_hint_align_get(opt->obj, &align_x, &align_y);
1265 evas_object_size_hint_padding_get
1266 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
1267 evas_object_size_hint_max_get(opt->obj, &max_w, &max_h);
1268 evas_object_size_hint_min_get(opt->obj, NULL, &min_h);
1269
1270 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
1271
1272 new_w = child_w;
1273 new_h = child_h;
1274 if (new_w > top_w) top_w = new_w;
1275
1276 _layout_set_offset_and_expand_dimension_space_max_bounded
1277 (child_w, &new_w, w, max_w, &off_x, align_x, padding_l, padding_r);
1278
1279 _layout_set_offset_and_change_dimension_min_max_cell_bounded
1280 (child_h, &new_h, min_h, max_h, cell_sz, &off_y, align_y,
1281 padding_t, padding_b);
1282
1283 if ((new_w != child_w) || (new_h != child_h))
1284 evas_object_resize(opt->obj, new_w, new_h);
1285 evas_object_move(opt->obj, x + off_x, y + off_y);
1286
1287 y += cell_sz + global_pad;
1288 sub_pixel += pad_inc;
1289 if (sub_pixel >= 1 << 16)
1290 {
1291 y++;
1292 sub_pixel -= 1 << 16;
1293 }
1294 }
1295
1296 evas_object_size_hint_min_set(o, top_w, y);
1297}
1298
1299static void
1300_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)
1301{
1302 int i, remain_w = box_w, start_i = 0;
1303 int off_y = 0, max_h = 0, n_rows = 0;
1304 Eina_List *l;
1305
1306 for (i = 0, l = priv->children; l; i++, l = l->next)
1307 {
1308 Evas_Object_Box_Option *opt = l->data;
1309 int padding_l, padding_r, padding_t, padding_b;
1310 int child_w, child_h, off_x = 0;
1311
1312 evas_object_size_hint_padding_get
1313 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
1314
1315 _sizing_eval(opt->obj);
1316 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
1317
1318 child_w += padding_l + padding_r + priv->pad.h;
1319 child_h += padding_t + padding_b;
1320
1321 remain_w -= child_w;
1322 if (remain_w + priv->pad.h >= 0)
1323 { /* continue "line" */
1324 if (child_h > max_h)
1325 max_h = child_h;
1326
1327 off_x += child_w;
1328 row_width[n_rows] += child_w;
1329 }
1330 else
1331 { /* break line */
1332 if (i == start_i)
1333 { /* obj goes to actual line */
1334 max_h = child_h;
1335 row_width[n_rows] = child_w;
1336 }
1337 else
1338 { /* obj goes to next line */
1339 row_max_h[n_rows] = max_h;
1340 row_break[n_rows] = i - 1;
1341 n_rows++;
1342
1343 off_x = child_w;
1344 off_y += max_h;
1345 max_h = child_h;
1346
1347 row_width[n_rows] = child_w;
1348 start_i = i;
1349
1350 remain_w = box_w - off_x;
1351 }
1352 }
1353 }
1354
1355 row_break[n_rows] = i - 1;
1356 row_max_h[n_rows] = max_h;
1357
1358 *row_count = n_rows;
1359 *off_y_ret = off_y;
1360 *max_h_ret = max_h;
1361}
1362
1363EAPI void
1364evas_object_box_layout_flow_horizontal(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
1365{
1366 int n_children;
1367 int r, row_count = 0;
1368 int min_w = 0, min_h = 0;
1369 int max_h, inc_y;
1370 int remain_y, i;
1371 int x, y, w, h;
1372 Eina_List *l;
1373 int *row_max_h;
1374 int *row_break;
1375 int *row_width;
1376 int offset_y;
1377
1378 n_children = eina_list_count(priv->children);
1379 if (!n_children)
1380 return;
1381
1382 /* *per row* arrays */
1383 row_max_h = (int *)alloca(sizeof(int) * n_children);
1384 if (!row_max_h)
1385 return;
1386 row_break = (int *)alloca(sizeof(int) * n_children);
1387 if (!row_break)
1388 return;
1389 row_width = (int *)alloca(sizeof(int) * n_children);
1390 if (!row_width)
1391 return;
1392
1393 memset(row_width, 0, sizeof(row_width));
1394
1395 evas_object_geometry_get(o, &x, &y, &w, &h);
1396
1397 _evas_object_box_layout_flow_horizontal_row_info_collect
1398 (priv, w, &row_count, row_max_h, row_break, row_width, &offset_y, &max_h);
1399
1400 inc_y = 0;
1401 remain_y = h - (offset_y + max_h);
1402
1403 if (remain_y > 0)
1404 {
1405 if (priv->align.v >= 0.0)
1406 inc_y = priv->align.v * remain_y;
1407 else if (row_count == 0)
1408 y += remain_y / 2;
1409 else /* y-justified */
1410 inc_y = remain_y / row_count;
1411 }
1412
1413 inc_y += priv->pad.v;
1414
1415 for (i = 0, r = 0, l = priv->children; r <= row_count; r++)
1416 {
1417 int row_justify = 0, just_inc = 0, sub_pixel = 0;
1418 int row_size, remain_x;
1419
1420 row_size = row_break[r] - i;
1421 remain_x = (w - row_width[r]);
1422
1423 if (priv->align.h < 0.0)
1424 {
1425 if (row_size == 0)
1426 x += remain_x / 2;
1427 else
1428 _fixed_point_divide_and_decompose_integer
1429 (remain_x, row_size, &row_justify, &just_inc);
1430 }
1431
1432 row_justify += priv->pad.h;
1433
1434 for (; i <= row_break[r]; i++, l = l->next)
1435 {
1436 Evas_Object_Box_Option *opt = l->data;
1437 int off_x, off_y, y_remain;
1438 int padding_l, padding_r;
1439 int child_w, child_h;
1440 double align_y;
1441
1442 evas_object_size_hint_align_get(opt->obj, NULL, &align_y);
1443 evas_object_size_hint_padding_get
1444 (opt->obj, &padding_l, &padding_r, NULL, NULL);
1445
1446 evas_object_geometry_get
1447 (opt->obj, NULL, NULL, &child_w, &child_h);
1448
1449 y_remain = row_max_h[r] - child_h;
1450
1451 off_x = padding_l;
1452 if (priv->align.h >= 0.0)
1453 off_x += remain_x * priv->align.h;
1454 off_y = y_remain * align_y;
1455
1456 evas_object_move(opt->obj, x + off_x, y + off_y);
1457
1458 x += child_w + padding_l + padding_r + row_justify;
1459
1460 sub_pixel += just_inc;
1461 if (sub_pixel >= 1 << 16)
1462 {
1463 x++;
1464 sub_pixel -= 1 << 16;
1465 }
1466 }
1467
1468 evas_object_geometry_get(o, &x, NULL, NULL, NULL);
1469 if (min_w < row_width[r])
1470 min_w = row_width[r];
1471 min_h += row_max_h[r];
1472 y += row_max_h[r] + inc_y;
1473 }
1474
1475 evas_object_size_hint_min_set(o, min_w, min_h);
1476}
1477
1478static void
1479_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)
1480{
1481 int i, remain_h = box_h, start_i = 0;
1482 int off_x = 0, max_w = 0, n_cols = 0;
1483 Eina_List *l;
1484
1485 for (i = 0, l = priv->children; l; i++, l = l->next)
1486 {
1487 Evas_Object_Box_Option *opt = l->data;
1488 int padding_l, padding_r, padding_t, padding_b;
1489 int child_w, child_h, off_y = 0;
1490
1491 evas_object_size_hint_padding_get
1492 (opt->obj, &padding_l, &padding_r, &padding_t, &padding_b);
1493
1494 _sizing_eval(opt->obj);
1495 evas_object_geometry_get(opt->obj, NULL, NULL, &child_w, &child_h);
1496
1497 child_w += padding_l + padding_r;
1498 child_h += padding_t + padding_b + priv->pad.v;
1499
1500 remain_h -= child_h;
1501 if (remain_h + priv->pad.v >= 0)
1502 { /* continue "col" */
1503 if (child_w > max_w)
1504 max_w = child_w;
1505
1506 off_y += child_h;
1507 col_height[n_cols] += child_h;
1508 }
1509 else
1510 {
1511 /* break col */
1512 if (i == start_i)
1513 { /* obj goes to actual col */
1514 max_w = child_w;
1515 col_height[n_cols] = child_h;
1516 }
1517 else
1518 { /* obj goes to next col */
1519 col_max_w[n_cols] = max_w;
1520 col_break[n_cols] = i - 1;
1521 n_cols++;
1522
1523 off_x += max_w;
1524 off_y = child_h;
1525 max_w = child_w;
1526
1527 col_height[n_cols] = child_h;
1528 start_i = i;
1529
1530 remain_h = box_h - off_y;
1531 }
1532 }
1533 }
1534
1535 col_break[n_cols] = i - 1;
1536 col_max_w[n_cols] = max_w;
1537
1538 *col_count = n_cols;
1539 *off_x_ret = off_x;
1540 *max_w_ret = max_w;
1541}
1542
1543EAPI void
1544evas_object_box_layout_flow_vertical(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
1545{
1546 int n_children;
1547 int c, col_count;
1548 int min_w = 0, min_h = 0;
1549 int max_w, inc_x;
1550 int remain_x, i;
1551 int x, y, w, h;
1552 Eina_List *l;
1553 int *col_max_w;
1554 int *col_break;
1555 int *col_height;
1556 int offset_x;
1557
1558 n_children = eina_list_count(priv->children);
1559 if (!n_children)
1560 return;
1561
1562 /* *per col* arrays */
1563 col_max_w = (int *)alloca(sizeof(int) * n_children);
1564 if (!col_max_w)
1565 return;
1566 col_break = (int *)alloca(sizeof(int) * n_children);
1567 if (!col_break)
1568 return;
1569 col_height = (int *)alloca(sizeof(int) * n_children);
1570 if (!col_height)
1571 return;
1572
1573 memset(col_height, 0, sizeof(col_height));
1574
1575 evas_object_geometry_get(o, &x, &y, &w, &h);
1576
1577 _evas_object_box_layout_flow_vertical_col_info_collect
1578 (priv, h, &col_count, col_max_w, col_break, col_height, &offset_x, &max_w);
1579
1580 inc_x = 0;
1581 remain_x = w - (offset_x + max_w);
1582
1583 if (remain_x > 0)
1584 {
1585 if (priv->align.h >= 0)
1586 inc_x = priv->align.h * remain_x;
1587 else if (col_count == 0)
1588 x += remain_x / 2;
1589 else /* x-justified */
1590 inc_x = remain_x / col_count;
1591 }
1592
1593 inc_x += priv->pad.h;
1594
1595 for (i = 0, c = 0, l = priv->children; c <= col_count; c++)
1596 {
1597 int col_justify = 0, just_inc = 0, sub_pixel = 0;
1598 int col_size, remain_y;
1599
1600 col_size = col_break[c] - i;
1601 remain_y = (h - col_height[c]);
1602
1603 if (priv->align.v < 0.0)
1604 {
1605 if (col_size == 0)
1606 y += remain_y / 2;
1607 else
1608 _fixed_point_divide_and_decompose_integer
1609 (remain_y, col_size, &col_justify, &just_inc);
1610 }
1611
1612 col_justify += priv->pad.v;
1613
1614 for (; i <= col_break[c]; i++, l = l->next)
1615 {
1616 Evas_Object_Box_Option *opt = l->data;
1617 int off_x, off_y, x_remain;
1618 int padding_t, padding_b;
1619 int child_w, child_h;
1620 double align_x;
1621
1622 evas_object_size_hint_align_get(opt->obj, &align_x, NULL);
1623 evas_object_size_hint_padding_get
1624 (opt->obj, NULL, NULL, &padding_t, &padding_b);
1625
1626 evas_object_geometry_get
1627 (opt->obj, NULL, NULL, &child_w, &child_h);
1628
1629 x_remain = col_max_w[c] - child_w;
1630
1631 off_x = x_remain * align_x;
1632 off_y = padding_t;
1633 if (priv->align.v >= 0.0)
1634 off_y += remain_y * priv->align.v;
1635
1636 evas_object_move(opt->obj, x + off_x, y + off_y);
1637
1638 y += child_h + padding_t + padding_b + col_justify;
1639
1640 sub_pixel += just_inc;
1641 if (sub_pixel >= 1 << 16)
1642 {
1643 y++;
1644 sub_pixel -= 1 << 16;
1645 }
1646 }
1647
1648 evas_object_geometry_get(o, NULL, &y, NULL, NULL);
1649 min_w += col_max_w[c];
1650 if (min_h < col_height[c])
1651 min_h = col_height[c];
1652 x += col_max_w[c] + inc_x;
1653 }
1654
1655 evas_object_size_hint_min_set(o, min_w, min_h);
1656}
1657
1658EAPI void
1659evas_object_box_layout_stack(Evas_Object *o, Evas_Object_Box_Data *priv, void *data __UNUSED__)
1660{
1661 Eina_List *l;
1662 Evas_Coord ox, oy, ow, oh;
1663 Evas_Coord top_w = 0, top_h = 0;
1664 Evas_Object_Box_Option *opt;
1665 Evas_Object *old_child = NULL;
1666
1667 evas_object_geometry_get(o, &ox, &oy, &ow, &oh);
1668
1669 EINA_LIST_FOREACH(priv->children, l, opt)
1670 {
1671 Evas_Object *child = opt->obj;
1672 Evas_Coord max_w, max_h, min_w, min_h, pad_l, pad_r, pad_t, pad_b,
1673 child_w, child_h, new_w, new_h, off_x, off_y;
1674 double align_x, align_y;
1675
1676 evas_object_size_hint_align_get(child, &align_x, &align_y);
1677 evas_object_size_hint_padding_get
1678 (child, &pad_l, &pad_r, &pad_t, &pad_b);
1679 evas_object_size_hint_max_get(child, &max_w, &max_h);
1680 evas_object_size_hint_min_get(child, &min_w, &min_h);
1681
1682 _sizing_eval(opt->obj);
1683 evas_object_geometry_get(child, NULL, NULL, &child_w, &child_h);
1684 new_w = child_w;
1685 new_h = child_h;
1686 if (new_w > top_w) top_w = new_w;
1687 if (new_h > top_h) top_h = new_h;
1688
1689 _layout_set_offset_and_change_dimension_min_max_cell_bounded
1690 (child_w, &new_w, min_w, max_w, ow, &off_x, align_x, pad_l, pad_r);
1691 _layout_set_offset_and_change_dimension_min_max_cell_bounded
1692 (child_h, &new_h, min_h, max_h, oh, &off_y, align_y, pad_t, pad_b);
1693
1694 if ((new_w != child_w) || (new_h != child_h))
1695 evas_object_resize(child, new_w, new_h);
1696 evas_object_move(child, ox + off_x, oy + off_y);
1697
1698 if (old_child)
1699 evas_object_stack_above(child, old_child);
1700 old_child = child;
1701 }
1702
1703 evas_object_size_hint_min_set(o, top_w, top_h);
1704}
1705
1706EAPI void
1707evas_object_box_align_set(Evas_Object *o, double horizontal, double vertical)
1708{
1709 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv);
1710 if (priv->align.h == horizontal && priv->align.v == vertical)
1711 return;
1712 priv->align.h = horizontal;
1713 priv->align.v = vertical;
1714 evas_object_smart_changed(o);
1715}
1716
1717EAPI void
1718evas_object_box_align_get(const Evas_Object *o, double *horizontal, double *vertical)
1719{
1720 EVAS_OBJECT_BOX_DATA_GET(o, priv);
1721 if (priv)
1722 {
1723 if (horizontal) *horizontal = priv->align.h;
1724 if (vertical) *vertical = priv->align.v;
1725 }
1726 else
1727 {
1728 if (horizontal) *horizontal = 0.5;
1729 if (vertical) *vertical = 0.5;
1730 }
1731}
1732
1733EAPI void
1734evas_object_box_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
1735{
1736 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN(o, priv);
1737 if (priv->pad.h == horizontal && priv->pad.v == vertical)
1738 return;
1739 priv->pad.h = horizontal;
1740 priv->pad.v = vertical;
1741 evas_object_smart_changed(o);
1742}
1743
1744EAPI void
1745evas_object_box_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
1746{
1747 EVAS_OBJECT_BOX_DATA_GET(o, priv);
1748 if (priv)
1749 {
1750 if (horizontal) *horizontal = priv->pad.h;
1751 if (vertical) *vertical = priv->pad.v;
1752 }
1753 else
1754 {
1755 if (horizontal) *horizontal = 0;
1756 if (vertical) *vertical = 0;
1757 }
1758}
1759
1760EAPI Evas_Object_Box_Option *
1761evas_object_box_append(Evas_Object *o, Evas_Object *child)
1762{
1763 Evas_Object_Box_Option *opt;
1764 const Evas_Object_Box_Api *api;
1765
1766 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1767 if (!child)
1768 return NULL;
1769
1770 api = priv->api;
1771 if ((!api) || (!api->append))
1772 return NULL;
1773
1774 opt = api->append(o, priv, child);
1775
1776 if (opt)
1777 {
1778 evas_object_smart_member_add(child, o);
1779 evas_object_smart_changed(o);
1780 return _evas_object_box_option_callbacks_register(o, priv, opt);
1781 }
1782
1783 return NULL;
1784}
1785
1786EAPI Evas_Object_Box_Option *
1787evas_object_box_prepend(Evas_Object *o, Evas_Object *child)
1788{
1789 Evas_Object_Box_Option *opt;
1790 const Evas_Object_Box_Api *api;
1791
1792 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1793 if (!child)
1794 return NULL;
1795
1796 api = priv->api;
1797 if ((!api) || (!api->prepend))
1798 return NULL;
1799
1800 opt = api->prepend(o, priv, child);
1801
1802 if (opt)
1803 {
1804 evas_object_smart_member_add(child, o);
1805 evas_object_smart_changed(o);
1806 return _evas_object_box_option_callbacks_register(o, priv, opt);
1807 }
1808
1809 return NULL;
1810}
1811
1812EAPI Evas_Object_Box_Option *
1813evas_object_box_insert_before(Evas_Object *o, Evas_Object *child, const Evas_Object *reference)
1814{
1815 Evas_Object_Box_Option *opt;
1816 const Evas_Object_Box_Api *api;
1817
1818 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1819 if (!child)
1820 return NULL;
1821
1822 api = priv->api;
1823 if ((!api) || (!api->insert_before))
1824 return NULL;
1825
1826 opt = api->insert_before(o, priv, child, reference);
1827
1828 if (opt)
1829 {
1830 evas_object_smart_member_add(child, o);
1831 evas_object_smart_changed(o);
1832 return _evas_object_box_option_callbacks_register(o, priv, opt);
1833 }
1834
1835 return NULL;
1836}
1837
1838EAPI Evas_Object_Box_Option *
1839evas_object_box_insert_after(Evas_Object *o, Evas_Object *child, const Evas_Object *reference)
1840{
1841 Evas_Object_Box_Option *opt;
1842 const Evas_Object_Box_Api *api;
1843
1844 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
1845 if (!child)
1846 return NULL;
1847
1848 api = priv->api;
1849 if ((!api) || (!api->insert_after))
1850 return NULL;
1851
1852 opt = api->insert_after(o, priv, child, reference);
1853
1854 if (opt)
1855 {
1856 evas_object_smart_member_add(child, o);
1857 evas_object_smart_changed(o);
1858 return _evas_object_box_option_callbacks_register(o, priv, opt);
1859 }
1860
1861 return NULL;
1862}
1863
1864EAPI Evas_Object_Box_Option *
1865evas_object_box_insert_at(Evas_Object *o, Evas_Object *child, unsigned int pos)
1866{
1867 Evas_Object_Box_Option *opt;
1868 const Evas_Object_Box_Api *api;
1869
1870 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1871 if (!child)
1872 return NULL;
1873
1874 api = priv->api;
1875 if ((!api) || (!api->insert_at))
1876 return NULL;
1877
1878 opt = api->insert_at(o, priv, child, pos);
1879
1880 if (opt)
1881 {
1882 evas_object_smart_member_add(child, o);
1883 evas_object_smart_changed(o);
1884 return _evas_object_box_option_callbacks_register(o, priv, opt);
1885 }
1886
1887 return NULL;
1888}
1889
1890EAPI Eina_Bool
1891evas_object_box_remove(Evas_Object *o, Evas_Object *child)
1892{
1893 const Evas_Object_Box_Api *api;
1894 Evas_Object *obj;
1895
1896 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1897 if (!child) return EINA_FALSE;
1898
1899 api = priv->api;
1900 if ((!api) || (!api->remove))
1901 return 0;
1902
1903 obj = api->remove(o, priv, child);
1904
1905 if (obj)
1906 {
1907 _evas_object_box_child_callbacks_unregister(obj);
1908 evas_object_smart_member_del(obj);
1909 evas_object_smart_changed(o);
1910 return EINA_TRUE;
1911 }
1912
1913 return EINA_FALSE;
1914}
1915
1916EAPI Eina_Bool
1917evas_object_box_remove_at(Evas_Object *o, unsigned int pos)
1918{
1919 const Evas_Object_Box_Api *api;
1920 Evas_Object *obj;
1921
1922 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1923 api = priv->api;
1924 if ((!api) || (!api->remove_at)) return EINA_FALSE;
1925
1926 obj = api->remove_at(o, priv, pos);
1927
1928 if (obj)
1929 {
1930 _evas_object_box_child_callbacks_unregister(obj);
1931 evas_object_smart_member_del(obj);
1932 evas_object_smart_changed(o);
1933 return EINA_TRUE;
1934 }
1935
1936 return EINA_FALSE;
1937}
1938
1939EAPI Eina_Bool
1940evas_object_box_remove_all(Evas_Object *o, Eina_Bool clear)
1941{
1942 const Evas_Object_Box_Api *api;
1943
1944 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1945
1946 api = priv->api;
1947 if ((!api) || (!api->remove)) return EINA_FALSE;
1948
1949 evas_object_smart_changed(o);
1950
1951 while (priv->children)
1952 {
1953 Evas_Object_Box_Option *opt = priv->children->data;
1954 Evas_Object *obj;
1955
1956 obj = api->remove(o, priv, opt->obj);
1957 if (obj)
1958 {
1959 _evas_object_box_child_callbacks_unregister(obj);
1960 evas_object_smart_member_del(obj);
1961 if (clear)
1962 evas_object_del(obj);
1963 }
1964 else return EINA_FALSE;
1965 }
1966
1967 return EINA_TRUE;
1968}
1969
1970EAPI Eina_Iterator *
1971evas_object_box_iterator_new(const Evas_Object *o)
1972{
1973 Evas_Object_Box_Iterator *it;
1974
1975 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
1976
1977 if (!priv->children) return NULL;
1978
1979 it = calloc(1, sizeof(Evas_Object_Box_Iterator));
1980 if (!it) return NULL;
1981
1982 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
1983
1984 it->real_iterator = eina_list_iterator_new(priv->children);
1985 it->box = o;
1986
1987 it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_box_iterator_next);
1988 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_box_iterator_get_container);
1989 it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_box_iterator_free);
1990
1991 return &it->iterator;
1992}
1993
1994EAPI Eina_Accessor *
1995evas_object_box_accessor_new(const Evas_Object *o)
1996{
1997 Evas_Object_Box_Accessor *it;
1998
1999 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
2000
2001 if (!priv->children) return NULL;
2002
2003 it = calloc(1, sizeof(Evas_Object_Box_Accessor));
2004 if (!it) return NULL;
2005
2006 EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
2007
2008 it->real_accessor = eina_list_accessor_new(priv->children);
2009 it->box = o;
2010
2011 it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_box_accessor_get_at);
2012 it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_box_accessor_get_container);
2013 it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_box_accessor_free);
2014
2015 return &it->accessor;
2016}
2017
2018EAPI Eina_List *
2019evas_object_box_children_get(const Evas_Object *o)
2020{
2021 Eina_List *new_list = NULL, *l;
2022 Evas_Object_Box_Option *opt;
2023
2024 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
2025
2026 EINA_LIST_FOREACH(priv->children, l, opt)
2027 new_list = eina_list_append(new_list, opt->obj);
2028
2029 return new_list;
2030}
2031
2032EAPI const char *
2033evas_object_box_option_property_name_get(Evas_Object *o, int property)
2034{
2035 const Evas_Object_Box_Api *api;
2036
2037 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
2038
2039 if (property < 0)
2040 return NULL;
2041
2042 api = priv->api;
2043 if ((!api) || (!api->property_name_get))
2044 return NULL;
2045
2046 return api->property_name_get(o, property);
2047}
2048
2049EAPI int
2050evas_object_box_option_property_id_get(Evas_Object *o, const char *name)
2051{
2052 const Evas_Object_Box_Api *api;
2053
2054 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, -1);
2055
2056 if (!name)
2057 return -1;
2058
2059 api = priv->api;
2060 if ((!api) || (!api->property_id_get))
2061 return -1;
2062
2063 return api->property_id_get(o, name);
2064}
2065
2066EAPI Eina_Bool
2067evas_object_box_option_property_set(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...)
2068{
2069 Eina_Bool ret;
2070 va_list args;
2071
2072 va_start(args, property);
2073 ret = evas_object_box_option_property_vset(o, opt, property, args);
2074 va_end(args);
2075
2076 return ret;
2077}
2078
2079
2080EAPI Eina_Bool
2081evas_object_box_option_property_vset(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
2082{
2083 const Evas_Object_Box_Api *api;
2084
2085 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
2086
2087 if (!opt) return EINA_FALSE;
2088
2089 api = priv->api;
2090 if ((!api) || (!api->property_set))
2091 return EINA_FALSE;
2092
2093 if (!api->property_set(o, opt, property, args))
2094 return EINA_FALSE;
2095
2096 evas_object_smart_changed(o);
2097 return EINA_TRUE;
2098}
2099
2100EAPI Eina_Bool
2101evas_object_box_option_property_get(Evas_Object *o, Evas_Object_Box_Option *opt, int property, ...)
2102{
2103 Eina_Bool ret;
2104 va_list args;
2105
2106 va_start(args, property);
2107 ret = evas_object_box_option_property_vget(o, opt, property, args);
2108 va_end(args);
2109
2110 return ret;
2111}
2112
2113EAPI Eina_Bool
2114evas_object_box_option_property_vget(Evas_Object *o, Evas_Object_Box_Option *opt, int property, va_list args)
2115{
2116 const Evas_Object_Box_Api *api;
2117
2118 EVAS_OBJECT_BOX_DATA_GET_OR_RETURN_VAL(o, priv, 0);
2119
2120 if (!opt) return EINA_FALSE;
2121
2122 api = priv->api;
2123 if ((!api) || (!api->property_get))
2124 return EINA_FALSE;
2125
2126 return api->property_get(o, opt, property, args);
2127}
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 @@
1#include "evas_common.h"
2#include <errno.h>
3
4typedef struct _Evas_Object_Grid_Data Evas_Object_Grid_Data;
5typedef struct _Evas_Object_Grid_Option Evas_Object_Grid_Option;
6typedef struct _Evas_Object_Grid_Iterator Evas_Object_Grid_Iterator;
7typedef struct _Evas_Object_Grid_Accessor Evas_Object_Grid_Accessor;
8
9struct _Evas_Object_Grid_Option
10{
11 Evas_Object *obj;
12 Eina_List *l;
13 int x, y, w, h;
14};
15
16struct _Evas_Object_Grid_Data
17{
18 Evas_Object_Smart_Clipped_Data base;
19 Eina_List *children;
20 struct {
21 int w, h;
22 } size;
23 Eina_Bool is_mirrored : 1;
24};
25
26struct _Evas_Object_Grid_Iterator
27{
28 Eina_Iterator iterator;
29
30 Eina_Iterator *real_iterator;
31 const Evas_Object *grid;
32};
33
34struct _Evas_Object_Grid_Accessor
35{
36 Eina_Accessor accessor;
37
38 Eina_Accessor *real_accessor;
39 const Evas_Object *grid;
40};
41
42#define EVAS_OBJECT_GRID_DATA_GET(o, ptr) \
43 Evas_Object_Grid_Data *ptr = evas_object_smart_data_get(o)
44
45#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, ptr) \
46 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
47 if (!ptr) \
48 { \
49 CRIT("no widget data for object %p (%s)", \
50 o, evas_object_type_get(o)); \
51 abort(); \
52 return; \
53 }
54
55#define EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
56 EVAS_OBJECT_GRID_DATA_GET(o, ptr); \
57 if (!ptr) \
58 { \
59 CRIT("No widget data for object %p (%s)", \
60 o, evas_object_type_get(o)); \
61 abort(); \
62 return val; \
63 }
64
65static const char EVAS_OBJECT_GRID_OPTION_KEY[] = "|EvGd";
66
67static Eina_Bool
68_evas_object_grid_iterator_next(Evas_Object_Grid_Iterator *it, void **data)
69{
70 Evas_Object_Grid_Option *opt;
71
72 if (!eina_iterator_next(it->real_iterator, (void **)&opt))
73 return EINA_FALSE;
74 if (data) *data = opt->obj;
75 return EINA_TRUE;
76}
77
78static Evas_Object *
79_evas_object_grid_iterator_get_container(Evas_Object_Grid_Iterator *it)
80{
81 return (Evas_Object *)it->grid;
82}
83
84static void
85_evas_object_grid_iterator_free(Evas_Object_Grid_Iterator *it)
86{
87 eina_iterator_free(it->real_iterator);
88 free(it);
89}
90
91static Eina_Bool
92_evas_object_grid_accessor_get_at(Evas_Object_Grid_Accessor *it, unsigned int idx, void **data)
93{
94 Evas_Object_Grid_Option *opt = NULL;
95
96 if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt))
97 return EINA_FALSE;
98 if (data) *data = opt->obj;
99 return EINA_TRUE;
100}
101
102static Evas_Object *
103_evas_object_grid_accessor_get_container(Evas_Object_Grid_Accessor *it)
104{
105 return (Evas_Object *)it->grid;
106}
107
108static void
109_evas_object_grid_accessor_free(Evas_Object_Grid_Accessor *it)
110{
111 eina_accessor_free(it->real_accessor);
112 free(it);
113}
114
115static Evas_Object_Grid_Option *
116_evas_object_grid_option_get(Evas_Object *o)
117{
118 return evas_object_data_get(o, EVAS_OBJECT_GRID_OPTION_KEY);
119}
120
121static void
122_evas_object_grid_option_set(Evas_Object *o, const Evas_Object_Grid_Option *opt)
123{
124 evas_object_data_set(o, EVAS_OBJECT_GRID_OPTION_KEY, opt);
125}
126
127static Evas_Object_Grid_Option *
128_evas_object_grid_option_del(Evas_Object *o)
129{
130 return evas_object_data_del(o, EVAS_OBJECT_GRID_OPTION_KEY);
131}
132
133static void
134_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__)
135{
136 Evas_Object *grid = data;
137 evas_object_grid_unpack(grid, child);
138}
139
140static void
141_evas_object_grid_child_connect(Evas_Object *o, Evas_Object *child)
142{
143 evas_object_event_callback_add
144 (child, EVAS_CALLBACK_DEL, _on_child_del, o);
145}
146
147static void
148_evas_object_grid_child_disconnect(Evas_Object *o, Evas_Object *child)
149{
150 evas_object_event_callback_del_full
151 (child, EVAS_CALLBACK_DEL, _on_child_del, o);
152}
153
154EVAS_SMART_SUBCLASS_NEW("Evas_Object_Grid", _evas_object_grid,
155 Evas_Smart_Class, Evas_Smart_Class,
156 evas_object_smart_clipped_class_get, NULL)
157
158static void
159_evas_object_grid_smart_add(Evas_Object *o)
160{
161 EVAS_SMART_DATA_ALLOC(o, Evas_Object_Grid_Data)
162
163 priv->size.w = 100;
164 priv->size.h = 100;
165
166 _evas_object_grid_parent_sc->add(o);
167}
168
169static void
170_evas_object_grid_smart_del(Evas_Object *o)
171{
172 EVAS_OBJECT_GRID_DATA_GET(o, priv);
173 Eina_List *l;
174
175 l = priv->children;
176 while (l)
177 {
178 Evas_Object_Grid_Option *opt = l->data;
179 _evas_object_grid_child_disconnect(o, opt->obj);
180 _evas_object_grid_option_del(opt->obj);
181 free(opt);
182 l = eina_list_remove_list(l, l);
183 }
184 _evas_object_grid_parent_sc->del(o);
185}
186
187static void
188_evas_object_grid_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
189{
190 Evas_Coord ow, oh;
191 evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
192 if ((ow == w) && (oh == h)) return;
193 evas_object_smart_changed(o);
194}
195
196static void
197_evas_object_grid_smart_calculate(Evas_Object *o)
198{
199 Eina_List *l;
200 Evas_Object_Grid_Option *opt;
201 Evas_Coord x, y, w, h, vw, vh, t;
202 Eina_Bool mirror;
203
204 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
205 if (!priv) return;
206 if (!priv->children) return;
207 evas_object_geometry_get(o, &x, &y, &w, &h);
208 mirror = priv->is_mirrored;
209 vw = priv->size.w;
210 vh = priv->size.h;
211 EINA_LIST_FOREACH(priv->children, l, opt)
212 {
213 Evas_Coord x1, y1, x2, y2;
214
215 x1 = x + ((w * opt->x) / vw);
216 y1 = y + ((h * opt->y) / vh);
217 x2 = x + ((w * (opt->x + opt->w)) / vw);
218 y2 = y + ((h * (opt->y + opt->h)) / vh);
219 if (mirror)
220 {
221 t = x1; x1 = x2; x2 = t;
222 t = y1; y1 = y2; y2 = t;
223 }
224 evas_object_move(opt->obj, x1, y1);
225 evas_object_resize(opt->obj, x2 - x1, y2 - y1);
226 }
227}
228
229static void
230_evas_object_grid_smart_set_user(Evas_Smart_Class *sc)
231{
232 sc->add = _evas_object_grid_smart_add;
233 sc->del = _evas_object_grid_smart_del;
234 sc->resize = _evas_object_grid_smart_resize;
235 sc->calculate = _evas_object_grid_smart_calculate;
236}
237
238EAPI Evas_Object *
239evas_object_grid_add(Evas *evas)
240{
241 return evas_object_smart_add(evas, _evas_object_grid_smart_class_new());
242}
243
244EAPI Evas_Object *
245evas_object_grid_add_to(Evas_Object *parent)
246{
247 Evas *evas;
248 Evas_Object *o;
249
250 evas = evas_object_evas_get(parent);
251 o = evas_object_grid_add(evas);
252 evas_object_smart_member_add(o, parent);
253 return o;
254}
255
256EAPI void
257evas_object_grid_size_set(Evas_Object *o, int w, int h)
258{
259 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
260 if ((priv->size.w == w) && (priv->size.h == h)) return;
261 priv->size.w = w;
262 priv->size.h = h;
263 evas_object_smart_changed(o);
264}
265
266EAPI void
267evas_object_grid_size_get(const Evas_Object *o, int *w, int *h)
268{
269 if (w) *w = 0;
270 if (h) *h = 0;
271 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
272 if (w) *w = priv->size.w;
273 if (h) *h = priv->size.h;
274}
275
276EAPI Eina_Bool
277evas_object_grid_pack(Evas_Object *o, Evas_Object *child, int x, int y, int w, int h)
278{
279 Evas_Object_Grid_Option *opt;
280 Eina_Bool newobj = EINA_FALSE;
281
282 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
283
284 opt = _evas_object_grid_option_get(child);
285 if (!opt)
286 {
287 opt = malloc(sizeof(*opt));
288 if (!opt)
289 {
290 ERR("could not allocate grid option data.");
291 return EINA_FALSE;
292 }
293 newobj = EINA_TRUE;
294 }
295
296 opt->x = x;
297 opt->y = y;
298 opt->w = w;
299 opt->h = h;
300
301 if (newobj)
302 {
303 opt->obj = child;
304 priv->children = eina_list_append(priv->children, opt);
305 opt->l = eina_list_last(priv->children);
306 _evas_object_grid_option_set(child, opt);
307 evas_object_smart_member_add(child, o);
308 _evas_object_grid_child_connect(o, child);
309 }
310 // FIXME: we could keep a changed list
311 evas_object_smart_changed(o);
312 return EINA_TRUE;
313}
314
315static void
316_evas_object_grid_remove_opt(Evas_Object_Grid_Data *priv, Evas_Object_Grid_Option *opt)
317{
318 priv->children = eina_list_remove_list(priv->children, opt->l);
319 opt->l = NULL;
320}
321
322EAPI Eina_Bool
323evas_object_grid_unpack(Evas_Object *o, Evas_Object *child)
324{
325 Evas_Object_Grid_Option *opt;
326
327 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
328
329 if (o != evas_object_smart_parent_get(child))
330 {
331 ERR("cannot unpack child from incorrect grid!");
332 return EINA_FALSE;
333 }
334
335 opt = _evas_object_grid_option_del(child);
336 if (!opt)
337 {
338 ERR("cannot unpack child with no packing option!");
339 return EINA_FALSE;
340 }
341
342 _evas_object_grid_child_disconnect(o, child);
343 _evas_object_grid_remove_opt(priv, opt);
344 evas_object_smart_member_del(child);
345 free(opt);
346 return EINA_TRUE;
347}
348
349EAPI void
350evas_object_grid_clear(Evas_Object *o, Eina_Bool clear)
351{
352 Evas_Object_Grid_Option *opt;
353
354 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(o, priv);
355
356 EINA_LIST_FREE(priv->children, opt)
357 {
358 _evas_object_grid_child_disconnect(o, opt->obj);
359 _evas_object_grid_option_del(opt->obj);
360 evas_object_smart_member_del(opt->obj);
361 if (clear)
362 evas_object_del(opt->obj);
363 free(opt);
364 }
365}
366
367EAPI Eina_Bool
368evas_object_grid_pack_get(Evas_Object *o, Evas_Object *child, int *x, int *y, int *w, int *h)
369{
370 Evas_Object_Grid_Option *opt;
371
372 if (x) *x = 0;
373 if (y) *y = 0;
374 if (w) *w = 0;
375 if (h) *h = 0;
376 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, 0);
377 opt = _evas_object_grid_option_get(child);
378 if (!opt) return 0;
379 if (x) *x = opt->x;
380 if (y) *y = opt->y;
381 if (w) *w = opt->w;
382 if (h) *h = opt->h;
383 return 1;
384}
385
386EAPI Eina_Iterator *
387evas_object_grid_iterator_new(const Evas_Object *o)
388{
389 Evas_Object_Grid_Iterator *it;
390
391 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
392
393 if (!priv->children) return NULL;
394
395 it = calloc(1, sizeof(Evas_Object_Grid_Iterator));
396 if (!it) return NULL;
397
398 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
399
400 it->real_iterator = eina_list_iterator_new(priv->children);
401 it->grid = o;
402
403 it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_grid_iterator_next);
404 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_grid_iterator_get_container);
405 it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_grid_iterator_free);
406
407 return &it->iterator;
408}
409
410EAPI Eina_Accessor *
411evas_object_grid_accessor_new(const Evas_Object *o)
412{
413 Evas_Object_Grid_Accessor *it;
414
415 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
416
417 if (!priv->children) return NULL;
418
419 it = calloc(1, sizeof(Evas_Object_Grid_Accessor));
420 if (!it) return NULL;
421
422 EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
423
424 it->real_accessor = eina_list_accessor_new(priv->children);
425 it->grid = o;
426
427 it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_grid_accessor_get_at);
428 it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_grid_accessor_get_container);
429 it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_grid_accessor_free);
430
431 return &it->accessor;
432}
433
434EAPI Eina_List *
435evas_object_grid_children_get(const Evas_Object *o)
436{
437 Eina_List *new_list = NULL, *l;
438 Evas_Object_Grid_Option *opt;
439
440 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
441
442 EINA_LIST_FOREACH(priv->children, l, opt)
443 new_list = eina_list_append(new_list, opt->obj);
444
445 return new_list;
446}
447
448EAPI Eina_Bool
449evas_object_grid_mirrored_get(const Evas_Object *obj)
450{
451 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE);
452 return priv->is_mirrored;
453}
454
455EAPI void
456evas_object_grid_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
457{
458 EVAS_OBJECT_GRID_DATA_GET_OR_RETURN(obj, priv);
459 mirrored = !!mirrored;
460 if (priv->is_mirrored != mirrored)
461 {
462 priv->is_mirrored = mirrored;
463 _evas_object_grid_smart_calculate(obj);
464 }
465}
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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h" /* so that EAPI in Evas.h is correctly defined */
3#endif
4
5#include <sys/types.h>
6#include <unistd.h>
7#include <stdlib.h>
8#ifdef HAVE_SYS_MMAN_H
9# include <sys/mman.h>
10#endif
11#include <math.h>
12
13#include "evas_common.h"
14#include "evas_private.h"
15#include "../engines/common/evas_convert_color.h"
16#include "../engines/common/evas_convert_colorspace.h"
17#include "../engines/common/evas_convert_yuv.h"
18
19#define VERBOSE_PROXY_ERROR 1
20
21/* private magic number for image objects */
22static const char o_type[] = "image";
23
24/* private struct for rectangle object internal data */
25typedef struct _Evas_Object_Image Evas_Object_Image;
26
27struct _Evas_Object_Image
28{
29 DATA32 magic;
30
31 struct {
32 int spread;
33 Evas_Coord_Rectangle fill;
34 struct {
35 short w, h, stride;
36 } image;
37 struct {
38 short l, r, t, b;
39 unsigned char fill;
40 double scale;
41 } border;
42
43 Evas_Object *source;
44 Evas_Map *defmap;
45 const char *file;
46 const char *key;
47 int frame;
48 Evas_Colorspace cspace;
49
50 unsigned char smooth_scale : 1;
51 unsigned char has_alpha :1;
52 unsigned char opaque :1;
53 unsigned char opaque_valid :1;
54 } cur, prev;
55
56 int pixels_checked_out;
57 int load_error;
58 Eina_List *pixel_updates;
59
60 struct {
61 unsigned char scale_down_by;
62 double dpi;
63 short w, h;
64 struct {
65 short x, y, w, h;
66 } region;
67 Eina_Bool orientation : 1;
68 } load_opts;
69
70 struct {
71 Evas_Object_Image_Pixels_Get_Cb get_pixels;
72 void *get_pixels_data;
73 } func;
74
75 Evas_Video_Surface video;
76
77 const char *tmpf;
78 int tmpf_fd;
79
80 Evas_Image_Scale_Hint scale_hint;
81 Evas_Image_Content_Hint content_hint;
82
83 void *engine_data;
84
85 unsigned char changed : 1;
86 unsigned char dirty_pixels : 1;
87 unsigned char filled : 1;
88 unsigned char proxyrendering : 1;
89 unsigned char preloading : 1;
90 unsigned char video_rendering : 1;
91 unsigned char video_surface : 1;
92 unsigned char video_visible : 1;
93 unsigned char created : 1;
94};
95
96/* private methods for image objects */
97static void evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty);
98static void evas_object_image_load(Evas_Object *obj);
99static Evas_Coord evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret);
100static Evas_Coord evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret);
101
102static void evas_object_image_init(Evas_Object *obj);
103static void *evas_object_image_new(void);
104static void evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
105static void evas_object_image_free(Evas_Object *obj);
106static void evas_object_image_render_pre(Evas_Object *obj);
107static void evas_object_image_render_post(Evas_Object *obj);
108
109static unsigned int evas_object_image_id_get(Evas_Object *obj);
110static unsigned int evas_object_image_visual_id_get(Evas_Object *obj);
111static void *evas_object_image_engine_data_get(Evas_Object *obj);
112
113static int evas_object_image_is_opaque(Evas_Object *obj);
114static int evas_object_image_was_opaque(Evas_Object *obj);
115static int evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
116static int evas_object_image_has_opaque_rect(Evas_Object *obj);
117static int evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
118static int evas_object_image_can_map(Evas_Object *obj);
119
120static void *evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace);
121static void evas_object_image_filled_resize_listener(void *data, Evas *e, Evas_Object *obj, void *einfo);
122
123static void _proxy_unset(Evas_Object *proxy);
124static void _proxy_set(Evas_Object *proxy, Evas_Object *src);
125static void _proxy_error(Evas_Object *proxy, void *context, void *output, void *surface, int x, int y);
126
127static void _cleanup_tmpf(Evas_Object *obj);
128
129static const Evas_Object_Func object_func =
130{
131 /* methods (compulsory) */
132 evas_object_image_free,
133 evas_object_image_render,
134 evas_object_image_render_pre,
135 evas_object_image_render_post,
136 evas_object_image_id_get,
137 evas_object_image_visual_id_get,
138 evas_object_image_engine_data_get,
139 /* these are optional. NULL = nothing */
140 NULL,
141 NULL,
142 NULL,
143 NULL,
144 evas_object_image_is_opaque,
145 evas_object_image_was_opaque,
146 evas_object_image_is_inside,
147 NULL,
148 NULL,
149 NULL,
150 evas_object_image_has_opaque_rect,
151 evas_object_image_get_opaque_rect,
152 evas_object_image_can_map
153};
154
155EVAS_MEMPOOL(_mp_obj);
156
157static void
158_evas_object_image_cleanup(Evas_Object *obj, Evas_Object_Image *o)
159{
160 if ((o->preloading) && (o->engine_data))
161 {
162 o->preloading = 0;
163 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
164 o->engine_data,
165 obj);
166 }
167 if (o->tmpf) _cleanup_tmpf(obj);
168 if (o->cur.source) _proxy_unset(obj);
169}
170
171EAPI Evas_Object *
172evas_object_image_add(Evas *e)
173{
174 Evas_Object *obj;
175 Evas_Object_Image *o;
176
177 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
178 return NULL;
179 MAGIC_CHECK_END();
180 obj = evas_object_new(e);
181 evas_object_image_init(obj);
182 evas_object_inject(obj, e);
183 o = (Evas_Object_Image *)(obj->object_data);
184 o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output,
185 o->engine_data);
186 return obj;
187}
188
189EAPI Evas_Object *
190evas_object_image_filled_add(Evas *e)
191{
192 Evas_Object *obj;
193 obj = evas_object_image_add(e);
194 evas_object_image_filled_set(obj, 1);
195 return obj;
196}
197
198static void
199_cleanup_tmpf(Evas_Object *obj)
200{
201#ifdef HAVE_SYS_MMAN_H
202 Evas_Object_Image *o;
203
204 o = (Evas_Object_Image *)(obj->object_data);
205 if (!o->tmpf) return;
206#ifdef __linux__
207#else
208 unlink(o->tmpf);
209#endif
210 if (o->tmpf_fd >= 0) close(o->tmpf_fd);
211 eina_stringshare_del(o->tmpf);
212 o->tmpf_fd = -1;
213 o->tmpf = NULL;
214#else
215 (void) obj;
216#endif
217}
218
219static void
220_create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__)
221{
222#ifdef HAVE_SYS_MMAN_H
223 Evas_Object_Image *o;
224 char buf[4096];
225 void *dst;
226 int fd = -1;
227
228 o = (Evas_Object_Image *)(obj->object_data);
229#ifdef __linux__
230 snprintf(buf, sizeof(buf), "/dev/shm/.evas-tmpf-%i-%p-%i-XXXXXX",
231 (int)getpid(), data, (int)size);
232 fd = mkstemp(buf);
233#endif
234 if (fd < 0)
235 {
236 snprintf(buf, sizeof(buf), "/tmp/.evas-tmpf-%i-%p-%i-XXXXXX",
237 (int)getpid(), data, (int)size);
238 fd = mkstemp(buf);
239 }
240 if (fd < 0) return;
241 if (ftruncate(fd, size) < 0)
242 {
243 unlink(buf);
244 close(fd);
245 return;
246 }
247 unlink(buf);
248
249 eina_mmap_safety_enabled_set(EINA_TRUE);
250
251 dst = mmap(NULL, size,
252 PROT_READ | PROT_WRITE,
253 MAP_SHARED,
254 fd, 0);
255 if (dst == MAP_FAILED)
256 {
257 close(fd);
258 return;
259 }
260 o->tmpf_fd = fd;
261#ifdef __linux__
262 snprintf(buf, sizeof(buf), "/proc/%li/fd/%i", (long)getpid(), fd);
263#endif
264 o->tmpf = eina_stringshare_add(buf);
265 memcpy(dst, data, size);
266 munmap(dst, size);
267#else
268 (void) obj;
269 (void) data;
270 (void) size;
271 (void) format;
272#endif
273}
274
275EAPI void
276evas_object_image_memfile_set(Evas_Object *obj, void *data, int size, char *format, char *key)
277{
278 Evas_Object_Image *o;
279
280 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
281 return;
282 MAGIC_CHECK_END();
283 o = (Evas_Object_Image *)(obj->object_data);
284 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
285 return;
286 MAGIC_CHECK_END();
287 _cleanup_tmpf(obj);
288 evas_object_image_file_set(obj, NULL, NULL);
289 // invalidate the cache effectively
290 evas_object_image_alpha_set(obj, !o->cur.has_alpha);
291 evas_object_image_alpha_set(obj, !o->cur.has_alpha);
292
293 if ((size < 1) || (!data)) return;
294
295 _create_tmpf(obj, data, size, format);
296 evas_object_image_file_set(obj, o->tmpf, key);
297 if (!o->engine_data)
298 {
299 ERR("unable to load '%s' from memory", o->tmpf);
300 _cleanup_tmpf(obj);
301 return;
302 }
303}
304
305EAPI void
306evas_object_image_file_set(Evas_Object *obj, const char *file, const char *key)
307{
308 Evas_Object_Image *o;
309 Evas_Image_Load_Opts lo;
310
311 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
312 return;
313 MAGIC_CHECK_END();
314 o = (Evas_Object_Image *)(obj->object_data);
315 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
316 return;
317 MAGIC_CHECK_END();
318 if ((o->tmpf) && (file != o->tmpf)) _cleanup_tmpf(obj);
319 if ((o->cur.file) && (file) && (!strcmp(o->cur.file, file)))
320 {
321 if ((!o->cur.key) && (!key))
322 return;
323 if ((o->cur.key) && (key) && (!strcmp(o->cur.key, key)))
324 return;
325 }
326/*
327 * WTF? why cancel a null image preload? this is just silly (tm)
328 if (!o->engine_data)
329 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
330 o->engine_data,
331 obj);
332 */
333 if (o->cur.source) _proxy_unset(obj);
334 if (o->cur.file) eina_stringshare_del(o->cur.file);
335 if (o->cur.key) eina_stringshare_del(o->cur.key);
336 if (file) o->cur.file = eina_stringshare_add(file);
337 else o->cur.file = NULL;
338 if (key) o->cur.key = eina_stringshare_add(key);
339 else o->cur.key = NULL;
340 o->prev.file = NULL;
341 o->prev.key = NULL;
342 if (o->engine_data)
343 {
344 if (o->preloading)
345 {
346 o->preloading = 0;
347 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
348 o->engine_data,
349 obj);
350 }
351 obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output,
352 o->engine_data);
353 }
354 o->load_error = EVAS_LOAD_ERROR_NONE;
355 lo.scale_down_by = o->load_opts.scale_down_by;
356 lo.dpi = o->load_opts.dpi;
357 lo.w = o->load_opts.w;
358 lo.h = o->load_opts.h;
359 lo.region.x = o->load_opts.region.x;
360 lo.region.y = o->load_opts.region.y;
361 lo.region.w = o->load_opts.region.w;
362 lo.region.h = o->load_opts.region.h;
363 lo.orientation = o->load_opts.orientation;
364 o->engine_data = obj->layer->evas->engine.func->image_load(obj->layer->evas->engine.data.output,
365 o->cur.file,
366 o->cur.key,
367 &o->load_error,
368 &lo);
369 if (o->engine_data)
370 {
371 int w, h;
372 int stride;
373
374 obj->layer->evas->engine.func->image_size_get(obj->layer->evas->engine.data.output,
375 o->engine_data, &w, &h);
376 if (obj->layer->evas->engine.func->image_stride_get)
377 obj->layer->evas->engine.func->image_stride_get(obj->layer->evas->engine.data.output,
378 o->engine_data, &stride);
379 else
380 stride = w * 4;
381 o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get(obj->layer->evas->engine.data.output,
382 o->engine_data);
383 o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get(obj->layer->evas->engine.data.output,
384 o->engine_data);
385 o->cur.image.w = w;
386 o->cur.image.h = h;
387 o->cur.image.stride = stride;
388 }
389 else
390 {
391 if (o->load_error == EVAS_LOAD_ERROR_NONE)
392 o->load_error = EVAS_LOAD_ERROR_GENERIC;
393 o->cur.has_alpha = 1;
394 o->cur.cspace = EVAS_COLORSPACE_ARGB8888;
395 o->cur.image.w = 0;
396 o->cur.image.h = 0;
397 o->cur.image.stride = 0;
398 }
399 o->changed = 1;
400 evas_object_change(obj);
401}
402
403EAPI void
404evas_object_image_file_get(const Evas_Object *obj, const char **file, const char **key)
405{
406 Evas_Object_Image *o;
407
408 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
409 if (file) *file = NULL;
410 if (key) *key = NULL;
411 return;
412 MAGIC_CHECK_END();
413 o = (Evas_Object_Image *)(obj->object_data);
414 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
415 if (file) *file = NULL;
416 if (key) *key = NULL;
417 return;
418 MAGIC_CHECK_END();
419 if (file) *file = o->cur.file;
420 if (key) *key = o->cur.key;
421}
422
423EAPI Eina_Bool
424evas_object_image_source_set(Evas_Object *obj, Evas_Object *src)
425{
426 Evas_Object_Image *o;
427
428 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
429 return EINA_FALSE;
430 MAGIC_CHECK_END();
431 o = obj->object_data;
432 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
433 return EINA_FALSE;
434 MAGIC_CHECK_END();
435
436 if (src == obj) return EINA_FALSE;
437 if (o->cur.source == src) return EINA_TRUE;
438
439 _evas_object_image_cleanup(obj, o);
440 /* Kill the image if any */
441 if (o->cur.file || o->cur.key)
442 evas_object_image_file_set(obj, NULL, NULL);
443
444 if (src)
445 {
446 _proxy_set(obj, src);
447 }
448
449 return EINA_TRUE;
450}
451
452
453EAPI Evas_Object *
454evas_object_image_source_get(Evas_Object *obj)
455{
456 Evas_Object_Image *o;
457
458 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
459 return NULL;
460 MAGIC_CHECK_END();
461 o = obj->object_data;
462 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
463 return NULL;
464 MAGIC_CHECK_END();
465
466 return o->cur.source;
467}
468
469EAPI Eina_Bool
470evas_object_image_source_unset(Evas_Object *obj)
471{
472 return evas_object_image_source_set(obj, NULL);
473}
474
475EAPI void
476evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b)
477{
478 Evas_Object_Image *o;
479
480 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
481 return;
482 MAGIC_CHECK_END();
483 o = (Evas_Object_Image *)(obj->object_data);
484 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
485 return;
486 MAGIC_CHECK_END();
487 if (l < 0) l = 0;
488 if (r < 0) r = 0;
489 if (t < 0) t = 0;
490 if (b < 0) b = 0;
491 if ((o->cur.border.l == l) &&
492 (o->cur.border.r == r) &&
493 (o->cur.border.t == t) &&
494 (o->cur.border.b == b)) return;
495 o->cur.border.l = l;
496 o->cur.border.r = r;
497 o->cur.border.t = t;
498 o->cur.border.b = b;
499 o->cur.opaque_valid = 0;
500 o->changed = 1;
501 evas_object_change(obj);
502}
503
504EAPI void
505evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
506{
507 Evas_Object_Image *o;
508
509 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
510 if (l) *l = 0;
511 if (r) *r = 0;
512 if (t) *t = 0;
513 if (b) *b = 0;
514 return;
515 MAGIC_CHECK_END();
516 o = (Evas_Object_Image *)(obj->object_data);
517 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
518 if (l) *l = 0;
519 if (r) *r = 0;
520 if (t) *t = 0;
521 if (b) *b = 0;
522 return;
523 MAGIC_CHECK_END();
524 if (l) *l = o->cur.border.l;
525 if (r) *r = o->cur.border.r;
526 if (t) *t = o->cur.border.t;
527 if (b) *b = o->cur.border.b;
528}
529
530EAPI void
531evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border_Fill_Mode fill)
532{
533 Evas_Object_Image *o;
534
535 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
536 return;
537 MAGIC_CHECK_END();
538 o = (Evas_Object_Image *)(obj->object_data);
539 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
540 return;
541 MAGIC_CHECK_END();
542 if (fill == o->cur.border.fill) return;
543 o->cur.border.fill = fill;
544 o->changed = 1;
545 evas_object_change(obj);
546}
547
548EAPI Evas_Border_Fill_Mode
549evas_object_image_border_center_fill_get(const Evas_Object *obj)
550{
551 Evas_Object_Image *o;
552
553 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
554 return 0;
555 MAGIC_CHECK_END();
556 o = (Evas_Object_Image *)(obj->object_data);
557 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
558 return 0;
559 MAGIC_CHECK_END();
560 return o->cur.border.fill;
561}
562
563EAPI void
564evas_object_image_filled_set(Evas_Object *obj, Eina_Bool setting)
565{
566 Evas_Object_Image *o;
567
568 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
569 return;
570 MAGIC_CHECK_END();
571 o = (Evas_Object_Image *)(obj->object_data);
572 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
573 return;
574 MAGIC_CHECK_END();
575
576 setting = !!setting;
577 if (o->filled == setting) return;
578
579 o->filled = setting;
580 if (!o->filled)
581 evas_object_event_callback_del(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener);
582 else
583 {
584 Evas_Coord w, h;
585
586 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
587 evas_object_image_fill_set(obj, 0, 0, w, h);
588
589 evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener, NULL);
590 }
591}
592
593EAPI Eina_Bool
594evas_object_image_filled_get(const Evas_Object *obj)
595{
596 Evas_Object_Image *o;
597
598 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
599 return 0;
600 MAGIC_CHECK_END();
601 o = (Evas_Object_Image *)(obj->object_data);
602 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
603 return 0;
604 MAGIC_CHECK_END();
605
606 return o->filled;
607}
608
609EAPI void
610evas_object_image_border_scale_set(Evas_Object *obj, double scale)
611{
612 Evas_Object_Image *o;
613
614 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
615 return;
616 MAGIC_CHECK_END();
617 o = (Evas_Object_Image *)(obj->object_data);
618 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
619 return;
620 MAGIC_CHECK_END();
621 if (scale == o->cur.border.scale) return;
622 o->cur.border.scale = scale;
623 o->changed = 1;
624 evas_object_change(obj);
625}
626
627EAPI double
628evas_object_image_border_scale_get(const Evas_Object *obj)
629{
630 Evas_Object_Image *o;
631
632 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
633 return 1.0;
634 MAGIC_CHECK_END();
635 o = (Evas_Object_Image *)(obj->object_data);
636 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
637 return 1.0;
638 MAGIC_CHECK_END();
639 return o->cur.border.scale;
640}
641
642EAPI void
643evas_object_image_fill_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
644{
645 Evas_Object_Image *o;
646
647 if (w < 0) w = -w;
648 if (h < 0) h = -h;
649 if (w == 0) return;
650 if (h == 0) return;
651 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
652 return;
653 MAGIC_CHECK_END();
654 o = (Evas_Object_Image *)(obj->object_data);
655 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
656 return;
657 MAGIC_CHECK_END();
658 if ((o->cur.fill.x == x) &&
659 (o->cur.fill.y == y) &&
660 (o->cur.fill.w == w) &&
661 (o->cur.fill.h == h)) return;
662 o->cur.fill.x = x;
663 o->cur.fill.y = y;
664 o->cur.fill.w = w;
665 o->cur.fill.h = h;
666 o->cur.opaque_valid = 0;
667 o->changed = 1;
668 evas_object_change(obj);
669}
670
671EAPI void
672evas_object_image_fill_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
673{
674 Evas_Object_Image *o;
675
676 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
677 if (x) *x = 0;
678 if (y) *y = 0;
679 if (w) *w = 0;
680 if (h) *h = 0;
681 return;
682 MAGIC_CHECK_END();
683 o = (Evas_Object_Image *)(obj->object_data);
684 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
685 if (x) *x = 0;
686 if (y) *y = 0;
687 if (w) *w = 0;
688 if (h) *h = 0;
689 return;
690 MAGIC_CHECK_END();
691 if (x) *x = o->cur.fill.x;
692 if (y) *y = o->cur.fill.y;
693 if (w) *w = o->cur.fill.w;
694 if (h) *h = o->cur.fill.h;
695}
696
697
698EAPI void
699evas_object_image_fill_spread_set(Evas_Object *obj, Evas_Fill_Spread spread)
700{
701 Evas_Object_Image *o;
702
703 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
704 return;
705 MAGIC_CHECK_END();
706 o = (Evas_Object_Image *)(obj->object_data);
707 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
708 return;
709 MAGIC_CHECK_END();
710 if (spread == (Evas_Fill_Spread)o->cur.spread) return;
711 o->cur.spread = spread;
712 o->changed = 1;
713 evas_object_change(obj);
714}
715
716EAPI Evas_Fill_Spread
717evas_object_image_fill_spread_get(const Evas_Object *obj)
718{
719 Evas_Object_Image *o;
720
721 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
722 return EVAS_TEXTURE_REPEAT;
723 MAGIC_CHECK_END();
724 o = (Evas_Object_Image *)(obj->object_data);
725 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
726 return EVAS_TEXTURE_REPEAT;
727 MAGIC_CHECK_END();
728 return (Evas_Fill_Spread)o->cur.spread;
729}
730
731EAPI void
732evas_object_image_size_set(Evas_Object *obj, int w, int h)
733{
734 Evas_Object_Image *o;
735 int stride = 0;
736
737 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
738 return;
739 MAGIC_CHECK_END();
740 o = (Evas_Object_Image *)(obj->object_data);
741 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
742 return;
743 MAGIC_CHECK_END();
744 _evas_object_image_cleanup(obj, o);
745 if (w < 1) w = 1;
746 if (h < 1) h = 1;
747 if (w > 32768) return;
748 if (h > 32768) return;
749 if ((w == o->cur.image.w) &&
750 (h == o->cur.image.h)) return;
751 o->cur.image.w = w;
752 o->cur.image.h = h;
753 if (o->engine_data)
754 o->engine_data = obj->layer->evas->engine.func->image_size_set(obj->layer->evas->engine.data.output,
755 o->engine_data,
756 w, h);
757 else
758 o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data
759 (obj->layer->evas->engine.data.output, w, h, NULL, o->cur.has_alpha,
760 o->cur.cspace);
761
762 if (o->engine_data)
763 {
764 if (obj->layer->evas->engine.func->image_scale_hint_set)
765 obj->layer->evas->engine.func->image_scale_hint_set
766 (obj->layer->evas->engine.data.output,
767 o->engine_data, o->scale_hint);
768 if (obj->layer->evas->engine.func->image_content_hint_set)
769 obj->layer->evas->engine.func->image_content_hint_set
770 (obj->layer->evas->engine.data.output,
771 o->engine_data, o->content_hint);
772 if (obj->layer->evas->engine.func->image_stride_get)
773 obj->layer->evas->engine.func->image_stride_get
774 (obj->layer->evas->engine.data.output,
775 o->engine_data, &stride);
776 else
777 stride = w * 4;
778 }
779 else
780 stride = w * 4;
781 o->cur.image.stride = stride;
782
783/* FIXME - in engine call above
784 if (o->engine_data)
785 o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
786 o->engine_data,
787 o->cur.has_alpha);
788*/
789 EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o);
790 o->changed = 1;
791 evas_object_change(obj);
792}
793
794EAPI void
795evas_object_image_size_get(const Evas_Object *obj, int *w, int *h)
796{
797 Evas_Object_Image *o;
798
799 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
800 if (w) *w = 0;
801 if (h) *h = 0;
802 return;
803 MAGIC_CHECK_END();
804 o = (Evas_Object_Image *)(obj->object_data);
805 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
806 if (w) *w = 0;
807 if (h) *h = 0;
808 return;
809 MAGIC_CHECK_END();
810 if (w) *w = o->cur.image.w;
811 if (h) *h = o->cur.image.h;
812}
813
814EAPI int
815evas_object_image_stride_get(const Evas_Object *obj)
816{
817 Evas_Object_Image *o;
818
819 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
820 return 0;
821 MAGIC_CHECK_END();
822 o = (Evas_Object_Image *)(obj->object_data);
823 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
824 return 0;
825 MAGIC_CHECK_END();
826 return o->cur.image.stride;
827}
828
829EAPI Evas_Load_Error
830evas_object_image_load_error_get(const Evas_Object *obj)
831{
832 Evas_Object_Image *o;
833
834 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
835 return 0;
836 MAGIC_CHECK_END();
837 o = (Evas_Object_Image *)(obj->object_data);
838 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
839 return 0;
840 MAGIC_CHECK_END();
841 return o->load_error;
842}
843
844EAPI void *
845evas_object_image_data_convert(Evas_Object *obj, Evas_Colorspace to_cspace)
846{
847 Evas_Object_Image *o;
848 DATA32 *data;
849
850 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
851 return NULL;
852 MAGIC_CHECK_END();
853 o = (Evas_Object_Image *)(obj->object_data);
854 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
855 return NULL;
856 MAGIC_CHECK_END();
857 if ((o->preloading) && (o->engine_data))
858 {
859 o->preloading = 0;
860 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
861 o->engine_data,
862 obj);
863 }
864 if (!o->engine_data) return NULL;
865 if (o->video_surface)
866 o->video.update_pixels(o->video.data, obj, &o->video);
867 if (o->cur.cspace == to_cspace) return NULL;
868 data = NULL;
869 o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
870 o->engine_data,
871 0,
872 &data,
873 &o->load_error);
874 return evas_object_image_data_convert_internal(o, data, to_cspace);
875}
876
877EAPI void
878evas_object_image_data_set(Evas_Object *obj, void *data)
879{
880 Evas_Object_Image *o;
881 void *p_data;
882
883 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
884 return;
885 MAGIC_CHECK_END();
886 o = (Evas_Object_Image *)(obj->object_data);
887 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
888 return;
889 MAGIC_CHECK_END();
890 _evas_object_image_cleanup(obj, o);
891#ifdef EVAS_FRAME_QUEUING
892 if (o->engine_data)
893 evas_common_pipe_op_image_flush(o->engine_data);
894#endif
895 p_data = o->engine_data;
896 if (data)
897 {
898 if (o->engine_data)
899 o->engine_data = obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
900 o->engine_data,
901 data);
902 else
903 o->engine_data = obj->layer->evas->engine.func->image_new_from_data(obj->layer->evas->engine.data.output,
904 o->cur.image.w,
905 o->cur.image.h,
906 data,
907 o->cur.has_alpha,
908 o->cur.cspace);
909 if (o->engine_data)
910 {
911 int stride = 0;
912
913 if (obj->layer->evas->engine.func->image_scale_hint_set)
914 obj->layer->evas->engine.func->image_scale_hint_set
915 (obj->layer->evas->engine.data.output,
916 o->engine_data, o->scale_hint);
917 if (obj->layer->evas->engine.func->image_content_hint_set)
918 obj->layer->evas->engine.func->image_content_hint_set
919 (obj->layer->evas->engine.data.output,
920 o->engine_data, o->content_hint);
921 if (obj->layer->evas->engine.func->image_stride_get)
922 obj->layer->evas->engine.func->image_stride_get
923 (obj->layer->evas->engine.data.output,
924 o->engine_data, &stride);
925 else
926 stride = o->cur.image.w * 4;
927 o->cur.image.stride = stride;
928 }
929 }
930 else
931 {
932 if (o->engine_data)
933 obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output,
934 o->engine_data);
935 o->load_error = EVAS_LOAD_ERROR_NONE;
936 o->cur.image.w = 0;
937 o->cur.image.h = 0;
938 o->cur.image.stride = 0;
939 o->engine_data = NULL;
940 }
941/* FIXME - in engine call above
942 if (o->engine_data)
943 o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
944 o->engine_data,
945 o->cur.has_alpha);
946*/
947 if (o->pixels_checked_out > 0) o->pixels_checked_out--;
948 if (p_data != o->engine_data)
949 {
950 EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o);
951 o->pixels_checked_out = 0;
952 }
953 o->changed = 1;
954 evas_object_change(obj);
955}
956
957EAPI void *
958evas_object_image_data_get(const Evas_Object *obj, Eina_Bool for_writing)
959{
960 Evas_Object_Image *o;
961 DATA32 *data;
962
963 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
964 return NULL;
965 MAGIC_CHECK_END();
966 o = (Evas_Object_Image *)(obj->object_data);
967 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
968 return NULL;
969 MAGIC_CHECK_END();
970 if (!o->engine_data) return NULL;
971#ifdef EVAS_FRAME_QUEUING
972 evas_common_pipe_op_image_flush(o->engine_data);
973#endif
974
975 data = NULL;
976 if (obj->layer->evas->engine.func->image_scale_hint_set)
977 obj->layer->evas->engine.func->image_scale_hint_set
978 (obj->layer->evas->engine.data.output,
979 o->engine_data, o->scale_hint);
980 if (obj->layer->evas->engine.func->image_content_hint_set)
981 obj->layer->evas->engine.func->image_content_hint_set
982 (obj->layer->evas->engine.data.output,
983 o->engine_data, o->content_hint);
984 o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
985 o->engine_data,
986 for_writing,
987 &data,
988 &o->load_error);
989
990 /* if we fail to get engine_data, we have to return NULL */
991 if (!o->engine_data) return NULL;
992
993 if (o->engine_data)
994 {
995 int stride = 0;
996
997 if (obj->layer->evas->engine.func->image_stride_get)
998 obj->layer->evas->engine.func->image_stride_get
999 (obj->layer->evas->engine.data.output,
1000 o->engine_data, &stride);
1001 else
1002 stride = o->cur.image.w * 4;
1003 o->cur.image.stride = stride;
1004 }
1005 o->pixels_checked_out++;
1006 if (for_writing)
1007 {
1008 EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o);
1009 }
1010
1011 return data;
1012}
1013
1014EAPI void
1015evas_object_image_preload(Evas_Object *obj, Eina_Bool cancel)
1016{
1017 Evas_Object_Image *o;
1018
1019 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1020 return ;
1021 MAGIC_CHECK_END();
1022 o = (Evas_Object_Image *)(obj->object_data);
1023 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1024 return ;
1025 MAGIC_CHECK_END();
1026 if (!o->engine_data)
1027 {
1028 o->preloading = 1;
1029 evas_object_inform_call_image_preloaded(obj);
1030 return;
1031 }
1032 // FIXME: if already busy preloading, then dont request again until
1033 // preload done
1034 if (cancel)
1035 {
1036 if (o->preloading)
1037 {
1038 o->preloading = 0;
1039 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
1040 o->engine_data,
1041 obj);
1042 }
1043 }
1044 else
1045 {
1046 if (!o->preloading)
1047 {
1048 o->preloading = 1;
1049 obj->layer->evas->engine.func->image_data_preload_request(obj->layer->evas->engine.data.output,
1050 o->engine_data,
1051 obj);
1052 }
1053 }
1054}
1055
1056EAPI void
1057evas_object_image_data_copy_set(Evas_Object *obj, void *data)
1058{
1059 Evas_Object_Image *o;
1060
1061 if (!data) return;
1062 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1063 return;
1064 MAGIC_CHECK_END();
1065 o = (Evas_Object_Image *)(obj->object_data);
1066 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1067 return;
1068 MAGIC_CHECK_END();
1069 _evas_object_image_cleanup(obj, o);
1070 if ((o->cur.image.w <= 0) ||
1071 (o->cur.image.h <= 0)) return;
1072 if (o->engine_data)
1073 obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output,
1074 o->engine_data);
1075 o->engine_data = obj->layer->evas->engine.func->image_new_from_copied_data(obj->layer->evas->engine.data.output,
1076 o->cur.image.w,
1077 o->cur.image.h,
1078 data,
1079 o->cur.has_alpha,
1080 o->cur.cspace);
1081 if (o->engine_data)
1082 {
1083 int stride = 0;
1084
1085 o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
1086 o->engine_data,
1087 o->cur.has_alpha);
1088 if (obj->layer->evas->engine.func->image_scale_hint_set)
1089 obj->layer->evas->engine.func->image_scale_hint_set
1090 (obj->layer->evas->engine.data.output,
1091 o->engine_data, o->scale_hint);
1092 if (obj->layer->evas->engine.func->image_content_hint_set)
1093 obj->layer->evas->engine.func->image_content_hint_set
1094 (obj->layer->evas->engine.data.output,
1095 o->engine_data, o->content_hint);
1096 if (obj->layer->evas->engine.func->image_stride_get)
1097 obj->layer->evas->engine.func->image_stride_get
1098 (obj->layer->evas->engine.data.output,
1099 o->engine_data, &stride);
1100 else
1101 stride = o->cur.image.w * 4;
1102 o->cur.image.stride = stride;
1103 }
1104 o->pixels_checked_out = 0;
1105 EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o);
1106}
1107
1108EAPI void
1109evas_object_image_data_update_add(Evas_Object *obj, int x, int y, int w, int h)
1110{
1111 Evas_Object_Image *o;
1112 Eina_Rectangle *r;
1113
1114 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1115 return;
1116 MAGIC_CHECK_END();
1117 o = (Evas_Object_Image *)(obj->object_data);
1118 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1119 return;
1120 MAGIC_CHECK_END();
1121 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, o->cur.image.w, o->cur.image.h);
1122 if ((w <= 0) || (h <= 0)) return;
1123 NEW_RECT(r, x, y, w, h);
1124 if (r) o->pixel_updates = eina_list_append(o->pixel_updates, r);
1125 o->changed = 1;
1126 evas_object_change(obj);
1127}
1128
1129EAPI void
1130evas_object_image_alpha_set(Evas_Object *obj, Eina_Bool has_alpha)
1131{
1132 Evas_Object_Image *o;
1133
1134 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1135 return;
1136 MAGIC_CHECK_END();
1137 o = (Evas_Object_Image *)(obj->object_data);
1138 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1139 return;
1140 MAGIC_CHECK_END();
1141 if ((o->preloading) && (o->engine_data))
1142 {
1143 o->preloading = 0;
1144 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
1145 o->engine_data,
1146 obj);
1147 }
1148 if (((has_alpha) && (o->cur.has_alpha)) ||
1149 ((!has_alpha) && (!o->cur.has_alpha)))
1150 return;
1151 o->cur.has_alpha = has_alpha;
1152 if (o->engine_data)
1153 {
1154 int stride = 0;
1155
1156#ifdef EVAS_FRAME_QUEUING
1157 evas_common_pipe_op_image_flush(o->engine_data);
1158#endif
1159 o->engine_data = obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
1160 o->engine_data,
1161 o->cur.has_alpha);
1162 if (obj->layer->evas->engine.func->image_scale_hint_set)
1163 obj->layer->evas->engine.func->image_scale_hint_set
1164 (obj->layer->evas->engine.data.output,
1165 o->engine_data, o->scale_hint);
1166 if (obj->layer->evas->engine.func->image_content_hint_set)
1167 obj->layer->evas->engine.func->image_content_hint_set
1168 (obj->layer->evas->engine.data.output,
1169 o->engine_data, o->content_hint);
1170 if (obj->layer->evas->engine.func->image_stride_get)
1171 obj->layer->evas->engine.func->image_stride_get
1172 (obj->layer->evas->engine.data.output,
1173 o->engine_data, &stride);
1174 else
1175 stride = o->cur.image.w * 4;
1176 o->cur.image.stride = stride;
1177 }
1178 evas_object_image_data_update_add(obj, 0, 0, o->cur.image.w, o->cur.image.h);
1179 EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o);
1180}
1181
1182
1183EAPI Eina_Bool
1184evas_object_image_alpha_get(const Evas_Object *obj)
1185{
1186 Evas_Object_Image *o;
1187
1188 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1189 return 0;
1190 MAGIC_CHECK_END();
1191 o = (Evas_Object_Image *)(obj->object_data);
1192 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1193 return 0;
1194 MAGIC_CHECK_END();
1195 return o->cur.has_alpha;
1196}
1197
1198EAPI void
1199evas_object_image_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth_scale)
1200{
1201 Evas_Object_Image *o;
1202
1203 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1204 return;
1205 MAGIC_CHECK_END();
1206 o = (Evas_Object_Image *)(obj->object_data);
1207 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1208 return;
1209 MAGIC_CHECK_END();
1210 if (((smooth_scale) && (o->cur.smooth_scale)) ||
1211 ((!smooth_scale) && (!o->cur.smooth_scale)))
1212 return;
1213 o->cur.smooth_scale = smooth_scale;
1214 o->changed = 1;
1215 evas_object_change(obj);
1216}
1217
1218EAPI Eina_Bool
1219evas_object_image_smooth_scale_get(const Evas_Object *obj)
1220{
1221 Evas_Object_Image *o;
1222
1223 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1224 return 0;
1225 MAGIC_CHECK_END();
1226 o = (Evas_Object_Image *)(obj->object_data);
1227 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1228 return 0;
1229 MAGIC_CHECK_END();
1230 return o->cur.smooth_scale;
1231}
1232
1233EAPI void
1234evas_object_image_reload(Evas_Object *obj)
1235{
1236 Evas_Object_Image *o;
1237
1238 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1239 return;
1240 MAGIC_CHECK_END();
1241 o = (Evas_Object_Image *)(obj->object_data);
1242 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1243 return;
1244 MAGIC_CHECK_END();
1245 if ((o->preloading) && (o->engine_data))
1246 {
1247 o->preloading = 0;
1248 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
1249 o->engine_data,
1250 obj);
1251 }
1252 if ((!o->cur.file) ||
1253 (o->pixels_checked_out > 0)) return;
1254 if (o->engine_data)
1255 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);
1256 evas_object_image_unload(obj, 1);
1257 evas_object_inform_call_image_unloaded(obj);
1258 evas_object_image_load(obj);
1259 o->prev.file = NULL;
1260 o->prev.key = NULL;
1261 o->changed = 1;
1262 evas_object_change(obj);
1263}
1264
1265EAPI Eina_Bool
1266evas_object_image_save(const Evas_Object *obj, const char *file, const char *key, const char *flags)
1267{
1268 Evas_Object_Image *o;
1269 DATA32 *data = NULL;
1270 int quality = 80, compress = 9, ok = 0;
1271 RGBA_Image *im;
1272
1273 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1274 return 0;
1275 MAGIC_CHECK_END();
1276 o = (Evas_Object_Image *)(obj->object_data);
1277 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1278 return 0;
1279 MAGIC_CHECK_END();
1280
1281 if (!o->engine_data) return 0;
1282 o->engine_data = obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
1283 o->engine_data,
1284 0,
1285 &data,
1286 &o->load_error);
1287 if (flags)
1288 {
1289 char *p, *pp;
1290 char *tflags;
1291
1292 tflags = alloca(strlen(flags) + 1);
1293 strcpy(tflags, flags);
1294 p = tflags;
1295 while (p)
1296 {
1297 pp = strchr(p, ' ');
1298 if (pp) *pp = 0;
1299 sscanf(p, "quality=%i", &quality);
1300 sscanf(p, "compress=%i", &compress);
1301 if (pp) p = pp + 1;
1302 else break;
1303 }
1304 }
1305 im = (RGBA_Image*) evas_cache_image_data(evas_common_image_cache_get(),
1306 o->cur.image.w,
1307 o->cur.image.h,
1308 data,
1309 o->cur.has_alpha,
1310 EVAS_COLORSPACE_ARGB8888);
1311 if (im)
1312 {
1313 if (o->cur.cspace == EVAS_COLORSPACE_ARGB8888)
1314 im->image.data = data;
1315 else
1316 im->image.data = evas_object_image_data_convert_internal(o,
1317 data,
1318 EVAS_COLORSPACE_ARGB8888);
1319 if (im->image.data)
1320 {
1321 ok = evas_common_save_image_to_file(im, file, key, quality, compress);
1322
1323 if (o->cur.cspace != EVAS_COLORSPACE_ARGB8888)
1324 free(im->image.data);
1325 }
1326
1327 evas_cache_image_drop(&im->cache_entry);
1328 }
1329 return ok;
1330}
1331
1332EAPI Eina_Bool
1333evas_object_image_pixels_import(Evas_Object *obj, Evas_Pixel_Import_Source *pixels)
1334{
1335 Evas_Object_Image *o;
1336
1337 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1338 return 0;
1339 MAGIC_CHECK_END();
1340 o = (Evas_Object_Image *)(obj->object_data);
1341 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1342 return 0;
1343 MAGIC_CHECK_END();
1344 _evas_object_image_cleanup(obj, o);
1345 if ((pixels->w != o->cur.image.w) || (pixels->h != o->cur.image.h)) return 0;
1346 switch (pixels->format)
1347 {
1348#if 0
1349 case EVAS_PIXEL_FORMAT_ARGB32:
1350 {
1351 if (o->engine_data)
1352 {
1353 DATA32 *image_pixels = NULL;
1354
1355 o->engine_data =
1356 obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
1357 o->engine_data,
1358 1,
1359 &image_pixels,
1360 &o->load_error);
1361/* FIXME: need to actualyl support this */
1362/* memcpy(image_pixels, pixels->rows, o->cur.image.w * o->cur.image.h * 4);*/
1363 if (o->engine_data)
1364 o->engine_data =
1365 obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
1366 o->engine_data,
1367 image_pixels);
1368 if (o->engine_data)
1369 o->engine_data =
1370 obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
1371 o->engine_data,
1372 o->cur.has_alpha);
1373 o->changed = 1;
1374 evas_object_change(obj);
1375 }
1376 }
1377 break;
1378#endif
1379#ifdef BUILD_CONVERT_YUV
1380 case EVAS_PIXEL_FORMAT_YUV420P_601:
1381 {
1382 if (o->engine_data)
1383 {
1384 DATA32 *image_pixels = NULL;
1385
1386 o->engine_data =
1387 obj->layer->evas->engine.func->image_data_get(obj->layer->evas->engine.data.output,
1388 o->engine_data,
1389 1,
1390 &image_pixels,
1391 &o->load_error);
1392 if (image_pixels)
1393 evas_common_convert_yuv_420p_601_rgba((DATA8 **) pixels->rows,
1394 (DATA8 *) image_pixels,
1395 o->cur.image.w,
1396 o->cur.image.h);
1397 if (o->engine_data)
1398 o->engine_data =
1399 obj->layer->evas->engine.func->image_data_put(obj->layer->evas->engine.data.output,
1400 o->engine_data,
1401 image_pixels);
1402 if (o->engine_data)
1403 o->engine_data =
1404 obj->layer->evas->engine.func->image_alpha_set(obj->layer->evas->engine.data.output,
1405 o->engine_data,
1406 o->cur.has_alpha);
1407 o->changed = 1;
1408 evas_object_change(obj);
1409 }
1410 }
1411 break;
1412#endif
1413 default:
1414 return 0;
1415 break;
1416 }
1417 return 1;
1418}
1419
1420EAPI void
1421evas_object_image_pixels_get_callback_set(Evas_Object *obj, Evas_Object_Image_Pixels_Get_Cb func, void *data)
1422{
1423 Evas_Object_Image *o;
1424
1425 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1426 return;
1427 MAGIC_CHECK_END();
1428 o = (Evas_Object_Image *)(obj->object_data);
1429 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1430 return;
1431 MAGIC_CHECK_END();
1432 o->func.get_pixels = func;
1433 o->func.get_pixels_data = data;
1434}
1435
1436EAPI void
1437evas_object_image_pixels_dirty_set(Evas_Object *obj, Eina_Bool dirty)
1438{
1439 Evas_Object_Image *o;
1440
1441 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1442 return;
1443 MAGIC_CHECK_END();
1444 o = (Evas_Object_Image *)(obj->object_data);
1445 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1446 return;
1447 MAGIC_CHECK_END();
1448 if (dirty) o->dirty_pixels = 1;
1449 else o->dirty_pixels = 0;
1450 o->changed = 1;
1451 evas_object_change(obj);
1452}
1453
1454EAPI Eina_Bool
1455evas_object_image_pixels_dirty_get(const Evas_Object *obj)
1456{
1457 Evas_Object_Image *o;
1458
1459 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1460 return 0;
1461 MAGIC_CHECK_END();
1462 o = (Evas_Object_Image *)(obj->object_data);
1463 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1464 return 0;
1465 MAGIC_CHECK_END();
1466 if (o->dirty_pixels) return 1;
1467 return 0;
1468}
1469
1470EAPI void
1471evas_object_image_load_dpi_set(Evas_Object *obj, double dpi)
1472{
1473 Evas_Object_Image *o;
1474
1475 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1476 return;
1477 MAGIC_CHECK_END();
1478 o = (Evas_Object_Image *)(obj->object_data);
1479 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1480 return;
1481 MAGIC_CHECK_END();
1482 if (dpi == o->load_opts.dpi) return;
1483 o->load_opts.dpi = dpi;
1484 if (o->cur.file)
1485 {
1486 evas_object_image_unload(obj, 0);
1487 evas_object_inform_call_image_unloaded(obj);
1488 evas_object_image_load(obj);
1489 o->changed = 1;
1490 evas_object_change(obj);
1491 }
1492}
1493
1494EAPI double
1495evas_object_image_load_dpi_get(const Evas_Object *obj)
1496{
1497 Evas_Object_Image *o;
1498
1499 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1500 return 0.0;
1501 MAGIC_CHECK_END();
1502 o = (Evas_Object_Image *)(obj->object_data);
1503 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1504 return 0.0;
1505 MAGIC_CHECK_END();
1506 return o->load_opts.dpi;
1507}
1508
1509EAPI void
1510evas_object_image_load_size_set(Evas_Object *obj, int w, int h)
1511{
1512 Evas_Object_Image *o;
1513
1514 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1515 return;
1516 MAGIC_CHECK_END();
1517 o = (Evas_Object_Image *)(obj->object_data);
1518 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1519 return;
1520 MAGIC_CHECK_END();
1521 if ((o->load_opts.w == w) && (o->load_opts.h == h)) return;
1522 o->load_opts.w = w;
1523 o->load_opts.h = h;
1524 if (o->cur.file)
1525 {
1526 evas_object_image_unload(obj, 0);
1527 evas_object_inform_call_image_unloaded(obj);
1528 evas_object_image_load(obj);
1529 o->changed = 1;
1530 evas_object_change(obj);
1531 }
1532}
1533
1534EAPI void
1535evas_object_image_load_size_get(const Evas_Object *obj, int *w, int *h)
1536{
1537 Evas_Object_Image *o;
1538
1539 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1540 return;
1541 MAGIC_CHECK_END();
1542 o = (Evas_Object_Image *)(obj->object_data);
1543 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1544 return;
1545 MAGIC_CHECK_END();
1546 if (w) *w = o->load_opts.w;
1547 if (h) *h = o->load_opts.h;
1548}
1549
1550EAPI void
1551evas_object_image_load_scale_down_set(Evas_Object *obj, int scale_down)
1552{
1553 Evas_Object_Image *o;
1554
1555 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1556 return;
1557 MAGIC_CHECK_END();
1558 o = (Evas_Object_Image *)(obj->object_data);
1559 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1560 return;
1561 MAGIC_CHECK_END();
1562 if (o->load_opts.scale_down_by == scale_down) return;
1563 o->load_opts.scale_down_by = scale_down;
1564 if (o->cur.file)
1565 {
1566 evas_object_image_unload(obj, 0);
1567 evas_object_inform_call_image_unloaded(obj);
1568 evas_object_image_load(obj);
1569 o->changed = 1;
1570 evas_object_change(obj);
1571 }
1572}
1573
1574EAPI int
1575evas_object_image_load_scale_down_get(const Evas_Object *obj)
1576{
1577 Evas_Object_Image *o;
1578
1579 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1580 return 0;
1581 MAGIC_CHECK_END();
1582 o = (Evas_Object_Image *)(obj->object_data);
1583 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1584 return 0;
1585 MAGIC_CHECK_END();
1586 return o->load_opts.scale_down_by;
1587}
1588
1589EAPI void
1590evas_object_image_load_region_set(Evas_Object *obj, int x, int y, int w, int h)
1591{
1592 Evas_Object_Image *o;
1593
1594 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1595 return;
1596 MAGIC_CHECK_END();
1597 o = (Evas_Object_Image *)(obj->object_data);
1598 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1599 return;
1600 MAGIC_CHECK_END();
1601 if ((o->load_opts.region.x == x) && (o->load_opts.region.y == y) &&
1602 (o->load_opts.region.w == w) && (o->load_opts.region.h == h)) return;
1603 o->load_opts.region.x = x;
1604 o->load_opts.region.y = y;
1605 o->load_opts.region.w = w;
1606 o->load_opts.region.h = h;
1607 if (o->cur.file)
1608 {
1609 evas_object_image_unload(obj, 0);
1610 evas_object_inform_call_image_unloaded(obj);
1611 evas_object_image_load(obj);
1612 o->changed = 1;
1613 evas_object_change(obj);
1614 }
1615}
1616
1617EAPI void
1618evas_object_image_load_region_get(const Evas_Object *obj, int *x, int *y, int *w, int *h)
1619{
1620 Evas_Object_Image *o;
1621
1622 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1623 return;
1624 MAGIC_CHECK_END();
1625 o = (Evas_Object_Image *)(obj->object_data);
1626 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1627 return;
1628 MAGIC_CHECK_END();
1629 if (x) *x = o->load_opts.region.x;
1630 if (y) *y = o->load_opts.region.y;
1631 if (w) *w = o->load_opts.region.w;
1632 if (h) *h = o->load_opts.region.h;
1633}
1634
1635EAPI void
1636evas_object_image_load_orientation_set(Evas_Object *obj, Eina_Bool enable)
1637{
1638 Evas_Object_Image *o;
1639
1640 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1641 return;
1642 MAGIC_CHECK_END();
1643 o = (Evas_Object_Image *)(obj->object_data);
1644 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1645 return;
1646 MAGIC_CHECK_END();
1647 o->load_opts.orientation = !!enable;
1648}
1649
1650EAPI Eina_Bool
1651evas_object_image_load_orientation_get(const Evas_Object *obj)
1652{
1653 Evas_Object_Image *o;
1654
1655 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1656 return EINA_FALSE;
1657 MAGIC_CHECK_END();
1658 o = (Evas_Object_Image *)(obj->object_data);
1659 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1660 return EINA_FALSE;
1661 MAGIC_CHECK_END();
1662 return o->load_opts.orientation;
1663}
1664
1665EAPI void
1666evas_object_image_colorspace_set(Evas_Object *obj, Evas_Colorspace cspace)
1667{
1668 Evas_Object_Image *o;
1669
1670 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1671 return;
1672 MAGIC_CHECK_END();
1673 o = (Evas_Object_Image *)(obj->object_data);
1674 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1675 return;
1676 MAGIC_CHECK_END();
1677
1678 _evas_object_image_cleanup(obj, o);
1679#ifdef EVAS_FRAME_QUEUING
1680 if ((Evas_Colorspace)o->cur.cspace != cspace)
1681 {
1682 if (o->engine_data)
1683 evas_common_pipe_op_image_flush(o->engine_data);
1684 }
1685#endif
1686
1687 o->cur.cspace = cspace;
1688 if (o->engine_data)
1689 obj->layer->evas->engine.func->image_colorspace_set(obj->layer->evas->engine.data.output,
1690 o->engine_data,
1691 cspace);
1692}
1693
1694EAPI Evas_Colorspace
1695evas_object_image_colorspace_get(const Evas_Object *obj)
1696{
1697 Evas_Object_Image *o;
1698
1699 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1700 return EVAS_COLORSPACE_ARGB8888;
1701 MAGIC_CHECK_END();
1702 o = (Evas_Object_Image *)(obj->object_data);
1703 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1704 return EVAS_COLORSPACE_ARGB8888;
1705 MAGIC_CHECK_END();
1706 return o->cur.cspace;
1707}
1708
1709EAPI void
1710evas_object_image_video_surface_set(Evas_Object *obj, Evas_Video_Surface *surf)
1711{
1712 Evas_Object_Image *o;
1713
1714 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1715 return;
1716 MAGIC_CHECK_END();
1717 o = (Evas_Object_Image *)(obj->object_data);
1718 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1719 return;
1720 MAGIC_CHECK_END();
1721 _evas_object_image_cleanup(obj, o);
1722 if (o->video_surface)
1723 {
1724 o->video_surface = 0;
1725 obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj);
1726 }
1727
1728 if (surf)
1729 {
1730 if (surf->version != EVAS_VIDEO_SURFACE_VERSION) return ;
1731
1732 if (!surf->update_pixels ||
1733 !surf->move ||
1734 !surf->resize ||
1735 !surf->hide ||
1736 !surf->show)
1737 return ;
1738
1739 o->created = EINA_TRUE;
1740 o->video_surface = 1;
1741 o->video = *surf;
1742
1743 obj->layer->evas->video_objects = eina_list_append(obj->layer->evas->video_objects, obj);
1744 }
1745 else
1746 {
1747 o->video_surface = 0;
1748 o->video.update_pixels = NULL;
1749 o->video.move = NULL;
1750 o->video.resize = NULL;
1751 o->video.hide = NULL;
1752 o->video.show = NULL;
1753 o->video.data = NULL;
1754 }
1755}
1756
1757EAPI const Evas_Video_Surface *
1758evas_object_image_video_surface_get(const Evas_Object *obj)
1759{
1760 Evas_Object_Image *o;
1761
1762 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1763 return NULL;
1764 MAGIC_CHECK_END();
1765 o = (Evas_Object_Image *)(obj->object_data);
1766 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1767 return NULL;
1768 MAGIC_CHECK_END();
1769 if (!o->video_surface) return NULL;
1770 return &o->video;
1771}
1772
1773EAPI void
1774evas_object_image_native_surface_set(Evas_Object *obj, Evas_Native_Surface *surf)
1775{
1776 Evas_Object_Image *o;
1777
1778 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1779 return;
1780 MAGIC_CHECK_END();
1781 o = (Evas_Object_Image *)(obj->object_data);
1782 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1783 return;
1784 MAGIC_CHECK_END();
1785 _evas_object_image_cleanup(obj, o);
1786 if (!obj->layer->evas->engine.func->image_native_set) return;
1787 if ((surf) &&
1788 ((surf->version < 2) ||
1789 (surf->version > EVAS_NATIVE_SURFACE_VERSION))) return;
1790 o->engine_data =
1791 obj->layer->evas->engine.func->image_native_set(obj->layer->evas->engine.data.output,
1792 o->engine_data,
1793 surf);
1794}
1795
1796EAPI Evas_Native_Surface *
1797evas_object_image_native_surface_get(const Evas_Object *obj)
1798{
1799 Evas_Object_Image *o;
1800
1801 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1802 return NULL;
1803 MAGIC_CHECK_END();
1804 o = (Evas_Object_Image *)(obj->object_data);
1805 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1806 return NULL;
1807 MAGIC_CHECK_END();
1808 if (!obj->layer->evas->engine.func->image_native_get) return NULL;
1809 return obj->layer->evas->engine.func->image_native_get(obj->layer->evas->engine.data.output,
1810 o->engine_data);
1811}
1812
1813EAPI void
1814evas_object_image_scale_hint_set(Evas_Object *obj, Evas_Image_Scale_Hint hint)
1815{
1816 Evas_Object_Image *o;
1817
1818 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1819 return;
1820 MAGIC_CHECK_END();
1821 o = (Evas_Object_Image *)(obj->object_data);
1822 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1823 return;
1824 MAGIC_CHECK_END();
1825 if (o->scale_hint == hint) return;
1826#ifdef EVAS_FRAME_QUEUING
1827 if (o->engine_data)
1828 evas_common_pipe_op_image_flush(o->engine_data);
1829#endif
1830 o->scale_hint = hint;
1831 if (o->engine_data)
1832 {
1833 int stride = 0;
1834
1835 if (obj->layer->evas->engine.func->image_scale_hint_set)
1836 obj->layer->evas->engine.func->image_scale_hint_set
1837 (obj->layer->evas->engine.data.output,
1838 o->engine_data, o->scale_hint);
1839 if (obj->layer->evas->engine.func->image_stride_get)
1840 obj->layer->evas->engine.func->image_stride_get
1841 (obj->layer->evas->engine.data.output,
1842 o->engine_data, &stride);
1843 else
1844 stride = o->cur.image.w * 4;
1845 o->cur.image.stride = stride;
1846 }
1847}
1848
1849EAPI Evas_Image_Scale_Hint
1850evas_object_image_scale_hint_get(const Evas_Object *obj)
1851{
1852 Evas_Object_Image *o;
1853
1854 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1855 return EVAS_IMAGE_SCALE_HINT_NONE;
1856 MAGIC_CHECK_END();
1857 o = (Evas_Object_Image *)(obj->object_data);
1858 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1859 return EVAS_IMAGE_SCALE_HINT_NONE;
1860 MAGIC_CHECK_END();
1861 return o->scale_hint;
1862}
1863
1864EAPI void
1865evas_object_image_content_hint_set(Evas_Object *obj, Evas_Image_Content_Hint hint)
1866{
1867 Evas_Object_Image *o;
1868
1869 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1870 return;
1871 MAGIC_CHECK_END();
1872 o = (Evas_Object_Image *)(obj->object_data);
1873 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1874 return;
1875 MAGIC_CHECK_END();
1876 if (o->content_hint == hint) return;
1877#ifdef EVAS_FRAME_QUEUING
1878 if (o->engine_data)
1879 evas_common_pipe_op_image_flush(o->engine_data);
1880#endif
1881 o->content_hint = hint;
1882 if (o->engine_data)
1883 {
1884 int stride = 0;
1885
1886 if (obj->layer->evas->engine.func->image_content_hint_set)
1887 obj->layer->evas->engine.func->image_content_hint_set
1888 (obj->layer->evas->engine.data.output,
1889 o->engine_data, o->content_hint);
1890 if (obj->layer->evas->engine.func->image_stride_get)
1891 obj->layer->evas->engine.func->image_stride_get
1892 (obj->layer->evas->engine.data.output,
1893 o->engine_data, &stride);
1894 else
1895 stride = o->cur.image.w * 4;
1896 o->cur.image.stride = stride;
1897 }
1898}
1899
1900EAPI void
1901evas_object_image_alpha_mask_set(Evas_Object *obj, Eina_Bool ismask)
1902{
1903 Evas_Object_Image *o;
1904
1905 if (!ismask) return;
1906
1907 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1908 return;
1909 MAGIC_CHECK_END();
1910 o = (Evas_Object_Image *)(obj->object_data);
1911 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1912 return;
1913 MAGIC_CHECK_END();
1914
1915 /* Convert to A8 if not already */
1916
1917 /* done */
1918
1919}
1920
1921#define FRAME_MAX 1024
1922EAPI Evas_Image_Content_Hint
1923evas_object_image_content_hint_get(const Evas_Object *obj)
1924{
1925 Evas_Object_Image *o;
1926
1927 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1928 return EVAS_IMAGE_CONTENT_HINT_NONE;
1929 MAGIC_CHECK_END();
1930 o = (Evas_Object_Image *)(obj->object_data);
1931 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1932 return EVAS_IMAGE_CONTENT_HINT_NONE;
1933 MAGIC_CHECK_END();
1934 return o->content_hint;
1935}
1936
1937EAPI Eina_Bool
1938evas_object_image_region_support_get(const Evas_Object *obj)
1939{
1940 Evas_Object_Image *o;
1941
1942 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1943 return EINA_FALSE;
1944 MAGIC_CHECK_END();
1945 o = (Evas_Object_Image *) (obj->object_data);
1946 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1947 return EINA_FALSE;
1948 MAGIC_CHECK_END();
1949
1950 return obj->layer->evas->engine.func->image_can_region_get(
1951 obj->layer->evas->engine.data.output,
1952 o->engine_data);
1953}
1954
1955/* animated feature */
1956EAPI Eina_Bool
1957evas_object_image_animated_get(const Evas_Object *obj)
1958{
1959 Evas_Object_Image *o;
1960
1961 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1962 return EINA_FALSE;
1963 MAGIC_CHECK_END();
1964 o = (Evas_Object_Image *)(obj->object_data);
1965 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1966 return EINA_FALSE;
1967 MAGIC_CHECK_END();
1968
1969 if (obj->layer->evas->engine.func->image_animated_get)
1970 return obj->layer->evas->engine.func->image_animated_get(obj->layer->evas->engine.data.output, o->engine_data);
1971 return EINA_FALSE;
1972}
1973
1974EAPI int
1975evas_object_image_animated_frame_count_get(const Evas_Object *obj)
1976{
1977 Evas_Object_Image *o;
1978
1979 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1980 return -1;
1981 MAGIC_CHECK_END();
1982 o = (Evas_Object_Image *)(obj->object_data);
1983 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
1984 return -1;
1985 MAGIC_CHECK_END();
1986
1987 if (!evas_object_image_animated_get(obj)) return -1;
1988 if (obj->layer->evas->engine.func->image_animated_frame_count_get)
1989 return obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data);
1990 return -1;
1991}
1992
1993EAPI Evas_Image_Animated_Loop_Hint
1994evas_object_image_animated_loop_type_get(const Evas_Object *obj)
1995{
1996 Evas_Object_Image *o;
1997
1998 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1999 return EVAS_IMAGE_ANIMATED_HINT_NONE;
2000 MAGIC_CHECK_END();
2001 o = (Evas_Object_Image *)(obj->object_data);
2002 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
2003 return EVAS_IMAGE_ANIMATED_HINT_NONE;
2004 MAGIC_CHECK_END();
2005
2006 if (!evas_object_image_animated_get(obj)) return EVAS_IMAGE_ANIMATED_HINT_NONE;
2007
2008 if (obj->layer->evas->engine.func->image_animated_loop_type_get)
2009 return obj->layer->evas->engine.func->image_animated_loop_type_get(obj->layer->evas->engine.data.output, o->engine_data);
2010 return EVAS_IMAGE_ANIMATED_HINT_NONE;
2011}
2012
2013EAPI int
2014evas_object_image_animated_loop_count_get(const Evas_Object *obj)
2015{
2016 Evas_Object_Image *o;
2017
2018 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
2019 return -1;
2020 MAGIC_CHECK_END();
2021 o = (Evas_Object_Image *)(obj->object_data);
2022 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
2023 return -1;
2024 MAGIC_CHECK_END();
2025
2026 if (!evas_object_image_animated_get(obj)) return -1;
2027
2028 if (obj->layer->evas->engine.func->image_animated_loop_count_get)
2029 return obj->layer->evas->engine.func->image_animated_loop_count_get(obj->layer->evas->engine.data.output, o->engine_data);
2030 return -1;
2031}
2032
2033EAPI double
2034evas_object_image_animated_frame_duration_get(const Evas_Object *obj, int start_frame, int frame_num)
2035{
2036 Evas_Object_Image *o;
2037 int frame_count = 0;
2038
2039 if (start_frame < 1) return -1;
2040 if (frame_num < 0) return -1;
2041
2042 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
2043 return -1;
2044 MAGIC_CHECK_END();
2045 o = (Evas_Object_Image *)(obj->object_data);
2046 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
2047 return -1;
2048 MAGIC_CHECK_END();
2049
2050 if (!evas_object_image_animated_get(obj)) return -1;
2051
2052 if (!obj->layer->evas->engine.func->image_animated_frame_count_get) return -1;
2053
2054 frame_count = obj->layer->evas->engine.func->image_animated_frame_count_get(obj->layer->evas->engine.data.output, o->engine_data);
2055
2056 if ((start_frame + frame_num) > frame_count) return -1;
2057 if (obj->layer->evas->engine.func->image_animated_frame_duration_get)
2058 return obj->layer->evas->engine.func->image_animated_frame_duration_get(obj->layer->evas->engine.data.output, o->engine_data, start_frame, frame_num);
2059 return -1;
2060}
2061
2062EAPI void
2063evas_object_image_animated_frame_set(Evas_Object *obj, int frame_index)
2064{
2065 Evas_Object_Image *o;
2066 int frame_count = 0;
2067
2068 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
2069 return;
2070 MAGIC_CHECK_END();
2071 o = (Evas_Object_Image *)(obj->object_data);
2072 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
2073 return;
2074 MAGIC_CHECK_END();
2075
2076 if (!o->cur.file) return;
2077 if (o->cur.frame == frame_index) return;
2078
2079 if (!evas_object_image_animated_get(obj)) return;
2080
2081 frame_count = evas_object_image_animated_frame_count_get(obj);
2082
2083 /* limit the size of frame to FRAME_MAX */
2084 if ((frame_count > FRAME_MAX) || (frame_count < 0) || (frame_index > frame_count))
2085 return;
2086
2087 if (!obj->layer->evas->engine.func->image_animated_frame_set) return;
2088 if (!obj->layer->evas->engine.func->image_animated_frame_set(obj->layer->evas->engine.data.output, o->engine_data, frame_index))
2089 return;
2090
2091 o->prev.frame = o->cur.frame;
2092 o->cur.frame = frame_index;
2093
2094 o->changed = 1;
2095 evas_object_change(obj);
2096
2097}
2098
2099EAPI void
2100evas_image_cache_flush(Evas *e)
2101{
2102 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
2103 return;
2104 MAGIC_CHECK_END();
2105
2106 e->engine.func->image_cache_flush(e->engine.data.output);
2107}
2108
2109EAPI void
2110evas_image_cache_reload(Evas *e)
2111{
2112 Evas_Layer *layer;
2113
2114 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
2115 return;
2116 MAGIC_CHECK_END();
2117
2118 evas_image_cache_flush(e);
2119 EINA_INLIST_FOREACH(e->layers, layer)
2120 {
2121 Evas_Object *obj;
2122
2123 EINA_INLIST_FOREACH(layer->objects, obj)
2124 {
2125 Evas_Object_Image *o;
2126
2127 o = (Evas_Object_Image *)(obj->object_data);
2128 if (o->magic == MAGIC_OBJ_IMAGE)
2129 {
2130 evas_object_image_unload(obj, 1);
2131 evas_object_inform_call_image_unloaded(obj);
2132 }
2133 }
2134 }
2135 evas_image_cache_flush(e);
2136 EINA_INLIST_FOREACH(e->layers, layer)
2137 {
2138 Evas_Object *obj;
2139
2140 EINA_INLIST_FOREACH(layer->objects, obj)
2141 {
2142 Evas_Object_Image *o;
2143
2144 o = (Evas_Object_Image *)(obj->object_data);
2145 if (o->magic == MAGIC_OBJ_IMAGE)
2146 {
2147 evas_object_image_load(obj);
2148 o->changed = 1;
2149 evas_object_change(obj);
2150 }
2151 }
2152 }
2153 evas_image_cache_flush(e);
2154}
2155
2156EAPI void
2157evas_image_cache_set(Evas *e, int size)
2158{
2159 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
2160 return;
2161 MAGIC_CHECK_END();
2162
2163 if (size < 0) size = 0;
2164 e->engine.func->image_cache_set(e->engine.data.output, size);
2165}
2166
2167EAPI int
2168evas_image_cache_get(const Evas *e)
2169{
2170 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
2171 return 0;
2172 MAGIC_CHECK_END();
2173
2174 return e->engine.func->image_cache_get(e->engine.data.output);
2175}
2176
2177EAPI Eina_Bool
2178evas_image_max_size_get(const Evas *e, int *maxw, int *maxh)
2179{
2180 int w = 0, h = 0;
2181 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
2182 return EINA_FALSE;
2183 MAGIC_CHECK_END();
2184
2185 if (maxw) *maxw = 0xffff;
2186 if (maxh) *maxh = 0xffff;
2187 if (!e->engine.func->image_max_size_get) return EINA_FALSE;
2188 e->engine.func->image_max_size_get(e->engine.data.output, &w, &h);
2189 if (maxw) *maxw = w;
2190 if (maxh) *maxh = h;
2191 return EINA_TRUE;
2192}
2193
2194/* all nice and private */
2195static void
2196_proxy_unset(Evas_Object *proxy)
2197{
2198 Evas_Object_Image *o;
2199
2200 o = proxy->object_data;
2201 if (!o->cur.source) return;
2202
2203 o->cur.source->proxy.proxies = eina_list_remove(o->cur.source->proxy.proxies, proxy);
2204
2205 o->cur.source = NULL;
2206 if (o->cur.defmap)
2207 {
2208 evas_map_free(o->cur.defmap);
2209 o->cur.defmap = NULL;
2210 }
2211}
2212
2213
2214static void
2215_proxy_set(Evas_Object *proxy, Evas_Object *src)
2216{
2217 Evas_Object_Image *o;
2218
2219 o = proxy->object_data;
2220
2221 evas_object_image_file_set(proxy, NULL, NULL);
2222
2223 o->cur.source = src;
2224
2225 src->proxy.proxies = eina_list_append(src->proxy.proxies, proxy);
2226 src->proxy.redraw = EINA_TRUE;
2227}
2228
2229/* Some moron just set a proxy on a proxy.
2230 * Give them some pixels. A random color
2231 */
2232static void
2233_proxy_error(Evas_Object *proxy, void *context, void *output, void *surface,
2234 int x, int y)
2235{
2236 Evas_Func *func;
2237 int r = rand() % 255;
2238 int g = rand() % 255;
2239 int b = rand() % 255;
2240
2241 /* XXX: Eina log error or something I'm sure
2242 * If it bugs you, just fix it. Don't tell me */
2243 if (VERBOSE_PROXY_ERROR) printf("Err: Argh! Recursive proxies.\n");
2244
2245 func = proxy->layer->evas->engine.func;
2246 func->context_color_set(output, context, r, g, b, 255);
2247 func->context_multiplier_unset(output, context);
2248 func->context_render_op_set(output, context, proxy->cur.render_op);
2249 func->rectangle_draw(output, context, surface, proxy->cur.geometry.x + x,
2250 proxy->cur.geometry.y + y,
2251 proxy->cur.geometry.w,
2252 proxy->cur.geometry.h);
2253 return;
2254}
2255
2256/*
2257static void
2258_proxy_subrender_recurse(Evas_Object *obj, Evas_Object *clip, void *output, void *surface, void *ctx, int x, int y)
2259{
2260 Evas_Object *obj2;
2261 Evas *e = obj->layer->evas;
2262
2263 if (obj->clip.clipees) return;
2264 if (!obj->cur.visible) return;
2265 if ((!clip) || (clip != obj->cur.clipper))
2266 {
2267 if (!obj->cur.cache.clip.visible) return;
2268 if ((obj->cur.cache.clip.a == 0) &&
2269 (obj->cur.render_op == EVAS_RENDER_BLEND)) return;
2270 }
2271 if ((obj->func->is_visible) && (!obj->func->is_visible(obj))) return;
2272
2273 if (!obj->pre_render_done)
2274 obj->func->render_pre(obj);
2275 ctx = e->engine.func->context_new(output);
2276 if (obj->smart.smart)
2277 {
2278 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
2279 {
2280 _proxy_subrender_recurse(obj2, clip, output, surface, ctx, x, y);
2281 }
2282 }
2283 else
2284 {
2285 obj->func->render(obj, output, ctx, surface, x, y);
2286 }
2287 e->engine.func->context_free(output, ctx);
2288}
2289*/
2290
2291/**
2292 * Render the source object when a proxy is set.
2293 *
2294 * Used to force a draw if necessary, else just makes sures it's available.
2295 */
2296static void
2297_proxy_subrender(Evas *e, Evas_Object *source)
2298{
2299 void *ctx;
2300/* Evas_Object *obj2, *clip;*/
2301 int w, h;
2302
2303 if (!source) return;
2304
2305 w = source->cur.geometry.w;
2306 h = source->cur.geometry.h;
2307
2308 source->proxy.redraw = EINA_FALSE;
2309
2310 /* We need to redraw surface then */
2311 if ((source->proxy.surface) &&
2312 ((source->proxy.w != w) || (source->proxy.h != h)))
2313 {
2314 e->engine.func->image_map_surface_free(e->engine.data.output,
2315 source->proxy.surface);
2316 source->proxy.surface = NULL;
2317 }
2318
2319 /* FIXME: Hardcoded alpha 'on' */
2320 /* FIXME (cont): Should see if the object has alpha */
2321 if (!source->proxy.surface)
2322 {
2323 source->proxy.surface = e->engine.func->image_map_surface_new
2324 (e->engine.data.output, w, h, 1);
2325 source->proxy.w = w;
2326 source->proxy.h = h;
2327 }
2328
2329 ctx = e->engine.func->context_new(e->engine.data.output);
2330 e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 0, 0, 0);
2331 e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY);
2332 e->engine.func->rectangle_draw(e->engine.data.output, ctx,
2333 source->proxy.surface, 0, 0, w, h);
2334 e->engine.func->context_free(e->engine.data.output, ctx);
2335
2336 ctx = e->engine.func->context_new(e->engine.data.output);
2337 evas_render_mapped(e, source, ctx, source->proxy.surface,
2338 -source->cur.geometry.x,
2339 -source->cur.geometry.y,
2340 1, 0, 0, e->output.w, e->output.h);
2341 e->engine.func->context_free(e->engine.data.output, ctx);
2342 source->proxy.surface = e->engine.func->image_dirty_region
2343 (e->engine.data.output, source->proxy.surface, 0, 0, w, h);
2344/*
2345 ctx = e->engine.func->context_new(e->engine.data.output);
2346 if (source->smart.smart)
2347 {
2348 clip = evas_object_smart_clipped_clipper_get(source);
2349 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(source), obj2)
2350 {
2351 _proxy_subrender_recurse(obj2, clip, e->engine.data.output,
2352 source->proxy.surface,
2353 ctx,
2354 -source->cur.geometry.x,
2355 -source->cur.geometry.y);
2356 }
2357 }
2358 else
2359 {
2360 if (!source->pre_render_done)
2361 source->func->render_pre(source);
2362 source->func->render(source, e->engine.data.output, ctx,
2363 source->proxy.surface,
2364 -source->cur.geometry.x,
2365 -source->cur.geometry.y);
2366 }
2367
2368 e->engine.func->context_free(e->engine.data.output, ctx);
2369 source->proxy.surface = e->engine.func->image_dirty_region
2370 (e->engine.data.output, source->proxy.surface, 0, 0, w, h);
2371 */
2372}
2373
2374#if 0 // filtering disabled
2375/*
2376 *
2377 * Note that this is similar to proxy_subrender_recurse. It should be
2378 * possible to merge I guess
2379 */
2380static void
2381image_filter_draw_under_recurse(Evas *e, Evas_Object *obj, Evas_Object *stop,
2382 void *output, void *ctx, void *surface,
2383 int x, int y)
2384{
2385 Evas_Object *obj2;
2386
2387 if (obj->clip.clipees) return;
2388 /* FIXME: Doing bounding box test */
2389 if (!evas_object_is_in_output_rect(obj, stop->cur.geometry.x,
2390 stop->cur.geometry.y,
2391 stop->cur.geometry.w,
2392 stop->cur.geometry.h))
2393 return;
2394
2395 if (!evas_object_is_visible(obj)) return;
2396 obj->pre_render_done = 1;
2397 ctx = e->engine.func->context_new(output);
2398
2399 if (obj->smart.smart)
2400 {
2401 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
2402 {
2403 if (obj2 == stop) return;
2404 image_filter_draw_under_recurse(e, obj2, stop, output, surface,
2405 ctx, x, y);
2406 }
2407 }
2408 else
2409 obj->func->render(obj, output, ctx, surface, x ,y);
2410 e->engine.func->context_free(output, ctx);
2411}
2412
2413/*
2414 * Draw all visible objects intersecting an object which are _beneath_ it.
2415 */
2416static void
2417image_filter_draw_under(Evas *e, Evas_Object *stop, void *output, void *ctx, void *surface, int dx, int dy)
2418{
2419 Evas_Layer *lay;
2420 int x, y;
2421
2422 x = stop->cur.geometry.x - dx;
2423 y = stop->cur.geometry.y - dy;
2424
2425 EINA_INLIST_FOREACH(e->layers, lay)
2426 {
2427 Evas_Object *obj;
2428 EINA_INLIST_FOREACH(lay->objects, obj)
2429 {
2430 if (obj->delete_me) continue;
2431 if (obj == stop) return;
2432 /* FIXME: Do bounding box check */
2433 image_filter_draw_under_recurse(e, obj, stop, output, ctx,
2434 surface, -x, -y);
2435 }
2436 }
2437 e->engine.func->image_dirty_region(output, surface, 0, 0, 300, 300);
2438 e->engine.func->output_flush(output);
2439}
2440
2441/*
2442 * Update the filtered object.
2443 *
2444 * Creates a new context, and renders stuff (filtered) onto that.
2445 */
2446Filtered_Image *
2447image_filter_update(Evas *e, Evas_Object *obj, void *src, int imagew, int imageh, int *outw, int *outh)
2448{
2449 int w, h;
2450 void *ctx;
2451 Evas_Filter_Info *info;
2452 void *surface;
2453 Eina_Bool alpha;
2454
2455 info = obj->filter;
2456
2457 if (info->mode == EVAS_FILTER_MODE_BELOW)
2458 {
2459 w = obj->cur.geometry.w;
2460 h = obj->cur.geometry.h;
2461 evas_filter_get_size(info, w, h, &imagew, &imageh, EINA_TRUE);
2462 alpha = EINA_FALSE;
2463 }
2464 else
2465 {
2466 evas_filter_get_size(info, imagew, imageh, &w, &h, EINA_FALSE);
2467 alpha = e->engine.func->image_alpha_get(e->engine.data.output, src);
2468 }
2469
2470 /* Certain filters may make alpha images anyway */
2471 if (alpha == EINA_FALSE) alpha = evas_filter_always_alpha(info);
2472
2473 surface = e->engine.func->image_map_surface_new(e->engine.data.output, w, h,
2474 alpha);
2475
2476 if (info->mode == EVAS_FILTER_MODE_BELOW)
2477 {
2478 void *subsurface;
2479 int disw, dish;
2480 int dx, dy;
2481 disw = obj->cur.geometry.w;
2482 dish = obj->cur.geometry.h;
2483 dx = (imagew - w) >> 1;
2484 dy = (imageh - h) >> 1;
2485 subsurface = e->engine.func->image_map_surface_new
2486 (e->engine.data.output, imagew, imageh, 1);
2487 ctx = e->engine.func->context_new(e->engine.data.output);
2488 e->engine.func->context_color_set(e->engine.data.output, ctx, 0, 255, 0, 255);
2489 e->engine.func->context_render_op_set(e->engine.data.output, ctx, EVAS_RENDER_COPY);
2490 e->engine.func->rectangle_draw(e->engine.data.output, ctx,
2491 subsurface, 0, 0, imagew, imageh);
2492
2493 image_filter_draw_under(e, obj, e->engine.data.output, ctx,
2494 subsurface, dx, dy);
2495
2496 e->engine.func->context_free(e->engine.data.output, ctx);
2497
2498 ctx = e->engine.func->context_new(e->engine.data.output);
2499
2500 e->engine.func->image_draw_filtered(e->engine.data.output,
2501 ctx, surface, subsurface, info);
2502
2503 e->engine.func->context_free(e->engine.data.output, ctx);
2504
2505 e->engine.func->image_map_surface_free(e->engine.data.output,
2506 subsurface);
2507 }
2508 else
2509 {
2510 ctx = e->engine.func->context_new(e->engine.data.output);
2511 e->engine.func->image_draw_filtered(e->engine.data.output,
2512 ctx, surface, src, info);
2513 e->engine.func->context_free(e->engine.data.output, ctx);
2514 }
2515
2516 e->engine.func->image_dirty_region(e->engine.data.output, surface,
2517 0, 0, w, h);
2518 if (outw) *outw = w;
2519 if (outh) *outh = h;
2520 return e->engine.func->image_filtered_save(src, surface,
2521 obj->filter->key,
2522 obj->filter->len);
2523}
2524#endif
2525
2526static void
2527evas_object_image_unload(Evas_Object *obj, Eina_Bool dirty)
2528{
2529 Evas_Object_Image *o;
2530
2531 o = (Evas_Object_Image *)(obj->object_data);
2532
2533 if ((!o->cur.file) ||
2534 (o->pixels_checked_out > 0)) return;
2535 if (dirty)
2536 {
2537 if (o->engine_data)
2538 o->engine_data = obj->layer->evas->engine.func->image_dirty_region
2539 (obj->layer->evas->engine.data.output,
2540 o->engine_data,
2541 0, 0,
2542 o->cur.image.w, o->cur.image.h);
2543 }
2544 if (o->engine_data)
2545 {
2546 if (o->preloading)
2547 {
2548 o->preloading = 0;
2549 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
2550 o->engine_data,
2551 obj);
2552 }
2553 obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output,
2554 o->engine_data);
2555 }
2556 o->engine_data = NULL;
2557 o->load_error = EVAS_LOAD_ERROR_NONE;
2558 o->cur.has_alpha = 1;
2559 o->cur.cspace = EVAS_COLORSPACE_ARGB8888;
2560 o->cur.image.w = 0;
2561 o->cur.image.h = 0;
2562 o->cur.image.stride = 0;
2563}
2564
2565static void
2566evas_object_image_load(Evas_Object *obj)
2567{
2568 Evas_Object_Image *o;
2569 Evas_Image_Load_Opts lo;
2570
2571 o = (Evas_Object_Image *)(obj->object_data);
2572 if (o->engine_data) return;
2573
2574 lo.scale_down_by = o->load_opts.scale_down_by;
2575 lo.dpi = o->load_opts.dpi;
2576 lo.w = o->load_opts.w;
2577 lo.h = o->load_opts.h;
2578 lo.region.x = o->load_opts.region.x;
2579 lo.region.y = o->load_opts.region.y;
2580 lo.region.w = o->load_opts.region.w;
2581 lo.region.h = o->load_opts.region.h;
2582 lo.orientation = o->load_opts.orientation;
2583 o->engine_data = obj->layer->evas->engine.func->image_load
2584 (obj->layer->evas->engine.data.output,
2585 o->cur.file,
2586 o->cur.key,
2587 &o->load_error,
2588 &lo);
2589 if (o->engine_data)
2590 {
2591 int w, h;
2592 int stride = 0;
2593
2594 obj->layer->evas->engine.func->image_size_get
2595 (obj->layer->evas->engine.data.output,
2596 o->engine_data, &w, &h);
2597 if (obj->layer->evas->engine.func->image_stride_get)
2598 obj->layer->evas->engine.func->image_stride_get
2599 (obj->layer->evas->engine.data.output,
2600 o->engine_data, &stride);
2601 else
2602 stride = w * 4;
2603 o->cur.has_alpha = obj->layer->evas->engine.func->image_alpha_get
2604 (obj->layer->evas->engine.data.output,
2605 o->engine_data);
2606 o->cur.cspace = obj->layer->evas->engine.func->image_colorspace_get
2607 (obj->layer->evas->engine.data.output,
2608 o->engine_data);
2609 o->cur.image.w = w;
2610 o->cur.image.h = h;
2611 o->cur.image.stride = stride;
2612 }
2613 else
2614 {
2615 o->load_error = EVAS_LOAD_ERROR_GENERIC;
2616 }
2617}
2618
2619static Evas_Coord
2620evas_object_image_figure_x_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret)
2621{
2622 Evas_Coord w;
2623
2624 w = ((size * obj->layer->evas->output.w) /
2625 (Evas_Coord)obj->layer->evas->viewport.w);
2626 if (size <= 0) size = 1;
2627 if (start > 0)
2628 {
2629 while (start - size > 0) start -= size;
2630 }
2631 else if (start < 0)
2632 {
2633 while (start < 0) start += size;
2634 }
2635 start = ((start * obj->layer->evas->output.w) /
2636 (Evas_Coord)obj->layer->evas->viewport.w);
2637 *size_ret = w;
2638 return start;
2639}
2640
2641static Evas_Coord
2642evas_object_image_figure_y_fill(Evas_Object *obj, Evas_Coord start, Evas_Coord size, Evas_Coord *size_ret)
2643{
2644 Evas_Coord h;
2645
2646 h = ((size * obj->layer->evas->output.h) /
2647 (Evas_Coord)obj->layer->evas->viewport.h);
2648 if (size <= 0) size = 1;
2649 if (start > 0)
2650 {
2651 while (start - size > 0) start -= size;
2652 }
2653 else if (start < 0)
2654 {
2655 while (start < 0) start += size;
2656 }
2657 start = ((start * obj->layer->evas->output.h) /
2658 (Evas_Coord)obj->layer->evas->viewport.h);
2659 *size_ret = h;
2660 return start;
2661}
2662
2663static void
2664evas_object_image_init(Evas_Object *obj)
2665{
2666 /* alloc image ob, setup methods and default values */
2667 obj->object_data = evas_object_image_new();
2668 /* set up default settings for this kind of object */
2669 obj->cur.color.r = 255;
2670 obj->cur.color.g = 255;
2671 obj->cur.color.b = 255;
2672 obj->cur.color.a = 255;
2673 obj->cur.geometry.x = 0;
2674 obj->cur.geometry.y = 0;
2675 obj->cur.geometry.w = 0;
2676 obj->cur.geometry.h = 0;
2677 obj->cur.layer = 0;
2678 obj->cur.anti_alias = 0;
2679 obj->cur.render_op = EVAS_RENDER_BLEND;
2680 /* set up object-specific settings */
2681 obj->prev = obj->cur;
2682 /* set up methods (compulsory) */
2683 obj->func = &object_func;
2684 obj->type = o_type;
2685}
2686
2687static void *
2688evas_object_image_new(void)
2689{
2690 Evas_Object_Image *o;
2691
2692 /* alloc obj private data */
2693 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_image", Evas_Object_Image, 256, NULL);
2694 o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Image);
2695 if (!o) return NULL;
2696 EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Image);
2697 o->magic = MAGIC_OBJ_IMAGE;
2698 o->cur.fill.w = 0;
2699 o->cur.fill.h = 0;
2700 o->cur.smooth_scale = 1;
2701 o->cur.border.fill = 1;
2702 o->cur.border.scale = 1.0;
2703 o->cur.cspace = EVAS_COLORSPACE_ARGB8888;
2704 o->cur.spread = EVAS_TEXTURE_REPEAT;
2705 o->cur.opaque_valid = 0;
2706 o->cur.source = NULL;
2707 o->prev = o->cur;
2708 o->tmpf_fd = -1;
2709 return o;
2710}
2711
2712static void
2713evas_object_image_free(Evas_Object *obj)
2714{
2715 Evas_Object_Image *o;
2716 Eina_Rectangle *r;
2717
2718 /* frees private object data. very simple here */
2719 o = (Evas_Object_Image *)(obj->object_data);
2720 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
2721 return;
2722 MAGIC_CHECK_END();
2723 /* free obj */
2724 _cleanup_tmpf(obj);
2725 if (o->cur.file) eina_stringshare_del(o->cur.file);
2726 if (o->cur.key) eina_stringshare_del(o->cur.key);
2727 if (o->cur.source) _proxy_unset(obj);
2728 if (o->engine_data)
2729 {
2730 if (o->preloading)
2731 {
2732 o->preloading = 0;
2733 obj->layer->evas->engine.func->image_data_preload_cancel(obj->layer->evas->engine.data.output,
2734 o->engine_data,
2735 obj);
2736 }
2737 obj->layer->evas->engine.func->image_free(obj->layer->evas->engine.data.output,
2738 o->engine_data);
2739 }
2740 if (o->video_surface)
2741 {
2742 o->video_surface = 0;
2743 obj->layer->evas->video_objects = eina_list_remove(obj->layer->evas->video_objects, obj);
2744 }
2745 o->engine_data = NULL;
2746 o->magic = 0;
2747 EINA_LIST_FREE(o->pixel_updates, r)
2748 eina_rectangle_free(r);
2749 EVAS_MEMPOOL_FREE(_mp_obj, o);
2750}
2751
2752static void
2753evas_object_image_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
2754{
2755 Evas_Object_Image *o;
2756 int imagew, imageh, uvw, uvh;
2757 void *pixels;
2758
2759 /* render object to surface with context, and offset by x,y */
2760 o = (Evas_Object_Image *)(obj->object_data);
2761
2762 if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1))
2763 return; /* no error message, already printed in pre_render */
2764
2765 /* Proxy sanity */
2766 if (o->proxyrendering)
2767 {
2768 _proxy_error(obj, context, output, surface, x, y);
2769 return;
2770 }
2771
2772 /* We are displaying the overlay */
2773 if (o->video_visible)
2774 {
2775 /* Create a transparent rectangle */
2776 obj->layer->evas->engine.func->context_color_set(output,
2777 context,
2778 0, 0, 0, 0);
2779 obj->layer->evas->engine.func->context_multiplier_unset(output,
2780 context);
2781 obj->layer->evas->engine.func->context_render_op_set(output, context,
2782 EVAS_RENDER_COPY);
2783 obj->layer->evas->engine.func->rectangle_draw(output,
2784 context,
2785 surface,
2786 obj->cur.geometry.x + x,
2787 obj->cur.geometry.y + y,
2788 obj->cur.geometry.w,
2789 obj->cur.geometry.h);
2790
2791 return ;
2792 }
2793
2794 obj->layer->evas->engine.func->context_color_set(output,
2795 context,
2796 255, 255, 255, 255);
2797
2798 if ((obj->cur.cache.clip.r == 255) &&
2799 (obj->cur.cache.clip.g == 255) &&
2800 (obj->cur.cache.clip.b == 255) &&
2801 (obj->cur.cache.clip.a == 255))
2802 {
2803 obj->layer->evas->engine.func->context_multiplier_unset(output,
2804 context);
2805 }
2806 else
2807 obj->layer->evas->engine.func->context_multiplier_set(output,
2808 context,
2809 obj->cur.cache.clip.r,
2810 obj->cur.cache.clip.g,
2811 obj->cur.cache.clip.b,
2812 obj->cur.cache.clip.a);
2813
2814 obj->layer->evas->engine.func->context_render_op_set(output, context,
2815 obj->cur.render_op);
2816
2817 if (!o->cur.source)
2818 {
2819 pixels = o->engine_data;
2820 imagew = o->cur.image.w;
2821 imageh = o->cur.image.h;
2822 uvw = imagew;
2823 uvh = imageh;
2824 }
2825 else if (o->cur.source->proxy.surface && !o->cur.source->proxy.redraw)
2826 {
2827 pixels = o->cur.source->proxy.surface;
2828 imagew = o->cur.source->proxy.w;
2829 imageh = o->cur.source->proxy.h;
2830 uvw = imagew;
2831 uvh = imageh;
2832 }
2833 else if (o->cur.source->type == o_type &&
2834 ((Evas_Object_Image *)o->cur.source->object_data)->engine_data)
2835 {
2836 Evas_Object_Image *oi;
2837 oi = o->cur.source->object_data;
2838 pixels = oi->engine_data;
2839 imagew = oi->cur.image.w;
2840 imageh = oi->cur.image.h;
2841 uvw = o->cur.source->cur.geometry.w;
2842 uvh = o->cur.source->cur.geometry.h;
2843 }
2844 else
2845 {
2846 o->proxyrendering = 1;
2847 _proxy_subrender(obj->layer->evas, o->cur.source);
2848 pixels = o->cur.source->proxy.surface;
2849 imagew = o->cur.source->proxy.w;
2850 imageh = o->cur.source->proxy.h;
2851 uvw = imagew;
2852 uvh = imageh;
2853 o->proxyrendering = 0;
2854 }
2855
2856#if 0 // filtering disabled
2857 /* Now check/update filter */
2858 if (obj->filter && obj->filter->filter)
2859 {
2860 Filtered_Image *fi = NULL;
2861 //printf("%p has filter: %s\n", obj,obj->filter->dirty?"dirty":"clean");
2862 if (obj->filter->dirty)
2863 {
2864 if (obj->filter->mode != EVAS_FILTER_MODE_BELOW)
2865 {
2866 uint32_t len;
2867 uint8_t *key;
2868
2869 if (obj->filter->key) free(obj->filter->key);
2870 obj->filter->key = NULL;
2871 obj->filter->len = 0;
2872 key = evas_filter_key_get(obj->filter, &len);
2873 if (key)
2874 {
2875 obj->filter->key = key;
2876 obj->filter->len = len;
2877 fi = obj->layer->evas->engine.func->image_filtered_get
2878 (o->engine_data, key, len);
2879 if (obj->filter->cached && fi != obj->filter->cached)
2880 {
2881 obj->layer->evas->engine.func->image_filtered_free
2882 (o->engine_data, obj->filter->cached);
2883 obj->filter->cached = NULL;
2884 }
2885 }
2886 }
2887 else if (obj->filter->cached)
2888 {
2889 obj->layer->evas->engine.func->image_filtered_free
2890 (o->engine_data, obj->filter->cached);
2891 }
2892 if (!fi)
2893 fi = image_filter_update(obj->layer->evas, obj, pixels,
2894 imagew, imageh, &imagew, &imageh);
2895 pixels = fi->image;
2896 obj->filter->dirty = 0;
2897 obj->filter->cached = fi;
2898 }
2899 else
2900 {
2901 fi = obj->filter->cached;
2902 pixels = fi->image;
2903 }
2904 }
2905#endif
2906
2907 if (pixels)
2908 {
2909 Evas_Coord idw, idh, idx, idy;
2910 int ix, iy, iw, ih;
2911 int img_set = 0;
2912
2913 if (o->dirty_pixels)
2914 {
2915 if (o->func.get_pixels)
2916 {
2917 // Set img object for direct rendering optimization
2918 // Check for image w/h against image geometry w/h
2919 // Check for image color r,g,b,a = {255,255,255,255}
2920 // Check and make sure that there are no maps.
2921 if ( (obj->cur.geometry.w == o->cur.image.w) &&
2922 (obj->cur.geometry.h == o->cur.image.h) &&
2923 (obj->cur.color.r == 255) &&
2924 (obj->cur.color.g == 255) &&
2925 (obj->cur.color.b == 255) &&
2926 (obj->cur.color.a == 255) &&
2927 (!obj->cur.map) )
2928 {
2929 if (obj->layer->evas->engine.func->gl_img_obj_set)
2930 {
2931 obj->layer->evas->engine.func->gl_img_obj_set(output, obj, o->cur.has_alpha);
2932 img_set = 1;
2933 }
2934 }
2935
2936 o->func.get_pixels(o->func.get_pixels_data, obj);
2937 if (o->engine_data != pixels)
2938 pixels = o->engine_data;
2939 o->engine_data = obj->layer->evas->engine.func->image_dirty_region
2940 (obj->layer->evas->engine.data.output, o->engine_data,
2941 0, 0, o->cur.image.w, o->cur.image.h);
2942 }
2943 o->dirty_pixels = 0;
2944 }
2945 if ((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap))
2946 {
2947 const Evas_Map_Point *p, *p_end;
2948 RGBA_Map_Point pts[obj->cur.map->count], *pt;
2949
2950 p = obj->cur.map->points;
2951 p_end = p + obj->cur.map->count;
2952 pt = pts;
2953
2954 pts[0].px = obj->cur.map->persp.px << FP;
2955 pts[0].py = obj->cur.map->persp.py << FP;
2956 pts[0].foc = obj->cur.map->persp.foc << FP;
2957 pts[0].z0 = obj->cur.map->persp.z0 << FP;
2958 // draw geom +x +y
2959 for (; p < p_end; p++, pt++)
2960 {
2961 pt->x = (lround(p->x) + x) * FP1;
2962 pt->y = (lround(p->y) + y) * FP1;
2963 pt->z = (lround(p->z) ) * FP1;
2964 pt->fx = p->px;
2965 pt->fy = p->py;
2966 pt->fz = p->z;
2967 pt->u = ((lround(p->u) * imagew) / uvw) * FP1;
2968 pt->v = ((lround(p->v) * imageh) / uvh) * FP1;
2969 if (pt->u < 0) pt->u = 0;
2970 else if (pt->u > (imagew * FP1)) pt->u = (imagew * FP1);
2971 if (pt->v < 0) pt->v = 0;
2972 else if (pt->v > (imageh * FP1)) pt->v = (imageh * FP1);
2973 pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b);
2974 }
2975 if (obj->cur.map->count & 0x1)
2976 {
2977 pts[obj->cur.map->count] = pts[obj->cur.map->count -1];
2978 }
2979
2980 obj->layer->evas->engine.func->image_map_draw
2981 (output, context, surface, pixels, obj->cur.map->count,
2982 pts, o->cur.smooth_scale | obj->cur.map->smooth, 0);
2983 }
2984 else
2985 {
2986 obj->layer->evas->engine.func->image_scale_hint_set(output,
2987 pixels,
2988 o->scale_hint);
2989 /* This is technically a bug here: If the value is recreated
2990 * (which is returned)it may be a new object, however exactly 0
2991 * of all the evas engines do this. */
2992 obj->layer->evas->engine.func->image_border_set(output, pixels,
2993 o->cur.border.l, o->cur.border.r,
2994 o->cur.border.t, o->cur.border.b);
2995 idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
2996 idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh);
2997 if (idw < 1) idw = 1;
2998 if (idh < 1) idh = 1;
2999 if (idx > 0) idx -= idw;
3000 if (idy > 0) idy -= idh;
3001 while ((int)idx < obj->cur.geometry.w)
3002 {
3003 Evas_Coord ydy;
3004 int dobreak_w = 0;
3005
3006 ydy = idy;
3007 ix = idx;
3008 if ((o->cur.fill.w == obj->cur.geometry.w) &&
3009 (o->cur.fill.x == 0))
3010 {
3011 dobreak_w = 1;
3012 iw = obj->cur.geometry.w;
3013 }
3014 else
3015 iw = ((int)(idx + idw)) - ix;
3016 while ((int)idy < obj->cur.geometry.h)
3017 {
3018 int dobreak_h = 0;
3019
3020 iy = idy;
3021 if ((o->cur.fill.h == obj->cur.geometry.h) &&
3022 (o->cur.fill.y == 0))
3023 {
3024 ih = obj->cur.geometry.h;
3025 dobreak_h = 1;
3026 }
3027 else
3028 ih = ((int)(idy + idh)) - iy;
3029 if ((o->cur.border.l == 0) &&
3030 (o->cur.border.r == 0) &&
3031 (o->cur.border.t == 0) &&
3032 (o->cur.border.b == 0) &&
3033 (o->cur.border.fill != 0))
3034 obj->layer->evas->engine.func->image_draw(output,
3035 context,
3036 surface,
3037 pixels,
3038 0, 0,
3039 imagew,
3040 imageh,
3041 obj->cur.geometry.x + ix + x,
3042 obj->cur.geometry.y + iy + y,
3043 iw, ih,
3044 o->cur.smooth_scale);
3045 else
3046 {
3047 int inx, iny, inw, inh, outx, outy, outw, outh;
3048 int bl, br, bt, bb, bsl, bsr, bst, bsb;
3049 int imw, imh, ox, oy;
3050
3051 ox = obj->cur.geometry.x + ix + x;
3052 oy = obj->cur.geometry.y + iy + y;
3053 imw = imagew;
3054 imh = imageh;
3055 bl = o->cur.border.l;
3056 br = o->cur.border.r;
3057 bt = o->cur.border.t;
3058 bb = o->cur.border.b;
3059 if ((bl + br) > iw)
3060 {
3061 bl = iw / 2;
3062 br = iw - bl;
3063 }
3064 if ((bl + br) > imw)
3065 {
3066 bl = imw / 2;
3067 br = imw - bl;
3068 }
3069 if ((bt + bb) > ih)
3070 {
3071 bt = ih / 2;
3072 bb = ih - bt;
3073 }
3074 if ((bt + bb) > imh)
3075 {
3076 bt = imh / 2;
3077 bb = imh - bt;
3078 }
3079 if (o->cur.border.scale != 1.0)
3080 {
3081 bsl = ((double)bl * o->cur.border.scale);
3082 bsr = ((double)br * o->cur.border.scale);
3083 bst = ((double)bt * o->cur.border.scale);
3084 bsb = ((double)bb * o->cur.border.scale);
3085 }
3086 else
3087 {
3088 bsl = bl; bsr = br; bst = bt; bsb = bb;
3089 }
3090 // #--
3091 // |
3092 inx = 0; iny = 0;
3093 inw = bl; inh = bt;
3094 outx = ox; outy = oy;
3095 outw = bsl; outh = bst;
3096 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3097 // .##
3098 // |
3099 inx = bl; iny = 0;
3100 inw = imw - bl - br; inh = bt;
3101 outx = ox + bsl; outy = oy;
3102 outw = iw - bsl - bsr; outh = bst;
3103 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3104 // --#
3105 // |
3106 inx = imw - br; iny = 0;
3107 inw = br; inh = bt;
3108 outx = ox + iw - bsr; outy = oy;
3109 outw = bsr; outh = bst;
3110 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3111 // .--
3112 // #
3113 inx = 0; iny = bt;
3114 inw = bl; inh = imh - bt - bb;
3115 outx = ox; outy = oy + bst;
3116 outw = bsl; outh = ih - bst - bsb;
3117 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3118 // .--.
3119 // |##|
3120 if (o->cur.border.fill > EVAS_BORDER_FILL_NONE)
3121 {
3122 inx = bl; iny = bt;
3123 inw = imw - bl - br; inh = imh - bt - bb;
3124 outx = ox + bsl; outy = oy + bst;
3125 outw = iw - bsl - bsr; outh = ih - bst - bsb;
3126 if ((o->cur.border.fill == EVAS_BORDER_FILL_SOLID) &&
3127 (obj->cur.cache.clip.a == 255) &&
3128 (obj->cur.render_op == EVAS_RENDER_BLEND))
3129 {
3130 obj->layer->evas->engine.func->context_render_op_set(output, context,
3131 EVAS_RENDER_COPY);
3132 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3133 obj->layer->evas->engine.func->context_render_op_set(output, context,
3134 obj->cur.render_op);
3135 }
3136 else
3137 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3138 }
3139 // --.
3140 // #
3141 inx = imw - br; iny = bt;
3142 inw = br; inh = imh - bt - bb;
3143 outx = ox + iw - bsr; outy = oy + bst;
3144 outw = bsr; outh = ih - bst - bsb;
3145 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3146 // |
3147 // #--
3148 inx = 0; iny = imh - bb;
3149 inw = bl; inh = bb;
3150 outx = ox; outy = oy + ih - bsb;
3151 outw = bsl; outh = bsb;
3152 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3153 // |
3154 // .##
3155 inx = bl; iny = imh - bb;
3156 inw = imw - bl - br; inh = bb;
3157 outx = ox + bsl; outy = oy + ih - bsb;
3158 outw = iw - bsl - bsr; outh = bsb;
3159 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3160 // |
3161 // --#
3162 inx = imw - br; iny = imh - bb;
3163 inw = br; inh = bb;
3164 outx = ox + iw - bsr; outy = oy + ih - bsb;
3165 outw = bsr; outh = bsb;
3166 obj->layer->evas->engine.func->image_draw(output, context, surface, pixels, inx, iny, inw, inh, outx, outy, outw, outh, o->cur.smooth_scale);
3167 }
3168 idy += idh;
3169 if (dobreak_h) break;
3170 }
3171 idx += idw;
3172 idy = ydy;
3173 if (dobreak_w) break;
3174 }
3175 }
3176
3177 // Unset img object
3178 if (img_set)
3179 {
3180 if (obj->layer->evas->engine.func->gl_img_obj_set)
3181 {
3182 obj->layer->evas->engine.func->gl_img_obj_set(output, NULL, 0);
3183 img_set = 0;
3184 }
3185 }
3186 }
3187}
3188
3189static void
3190evas_object_image_render_pre(Evas_Object *obj)
3191{
3192 Evas_Object_Image *o;
3193 int is_v = 0, was_v = 0;
3194 Evas *e;
3195
3196 /* dont pre-render the obj twice! */
3197 if (obj->pre_render_done) return;
3198 obj->pre_render_done = 1;
3199 /* pre-render phase. this does anything an object needs to do just before */
3200 /* rendering. this could mean loading the image data, retrieving it from */
3201 /* elsewhere, decoding video etc. */
3202 /* then when this is done the object needs to figure if it changed and */
3203 /* if so what and where and add the appropriate redraw rectangles */
3204 o = (Evas_Object_Image *)(obj->object_data);
3205 e = obj->layer->evas;
3206
3207 if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1))
3208 {
3209 ERR("%p has invalid fill size: %dx%d. Ignored",
3210 obj, o->cur.fill.w, o->cur.fill.h);
3211 return;
3212 }
3213
3214 /* if someone is clipping this obj - go calculate the clipper */
3215 if (obj->cur.clipper)
3216 {
3217 if (obj->cur.cache.clip.dirty)
3218 evas_object_clip_recalc(obj->cur.clipper);
3219 obj->cur.clipper->func->render_pre(obj->cur.clipper);
3220 }
3221 /* Proxy: Do it early */
3222 if (o->cur.source &&
3223 (o->cur.source->proxy.redraw || o->cur.source->changed))
3224 {
3225 /* XXX: Do I need to sort out the map here? */
3226 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3227 goto done;
3228 }
3229
3230 /* now figure what changed and add draw rects */
3231 /* if it just became visible or invisible */
3232 is_v = evas_object_is_visible(obj);
3233 was_v = evas_object_was_visible(obj);
3234 if (is_v != was_v)
3235 {
3236 evas_object_render_pre_visible_change(&e->clip_changes, obj, is_v, was_v);
3237 if (!o->pixel_updates) goto done;
3238 }
3239 if ((obj->cur.map != obj->prev.map) ||
3240 (obj->cur.usemap != obj->prev.usemap))
3241 {
3242 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3243 goto done;
3244 }
3245 /* it's not visible - we accounted for it appearing or not so just abort */
3246 if (!is_v) goto done;
3247 /* clipper changed this is in addition to anything else for obj */
3248 evas_object_render_pre_clipper_change(&e->clip_changes, obj);
3249 /* if we restacked (layer or just within a layer) and don't clip anyone */
3250 if (obj->restack)
3251 {
3252 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3253 if (!o->pixel_updates) goto done;
3254 }
3255 /* if it changed color */
3256 if ((obj->cur.color.r != obj->prev.color.r) ||
3257 (obj->cur.color.g != obj->prev.color.g) ||
3258 (obj->cur.color.b != obj->prev.color.b) ||
3259 (obj->cur.color.a != obj->prev.color.a))
3260 {
3261 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3262 if (!o->pixel_updates) goto done;
3263 }
3264 /* if it changed render op */
3265 if (obj->cur.render_op != obj->prev.render_op)
3266 {
3267 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3268 if (!o->pixel_updates) goto done;
3269 }
3270 /* if it changed anti_alias */
3271 if (obj->cur.anti_alias != obj->prev.anti_alias)
3272 {
3273 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3274 if (!o->pixel_updates) goto done;
3275 }
3276 if (o->changed)
3277 {
3278 if (((o->cur.file) && (!o->prev.file)) ||
3279 ((!o->cur.file) && (o->prev.file)) ||
3280 ((o->cur.key) && (!o->prev.key)) ||
3281 ((!o->cur.key) && (o->prev.key))
3282 )
3283 {
3284 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3285 if (!o->pixel_updates) goto done;
3286 }
3287 if ((o->cur.image.w != o->prev.image.w) ||
3288 (o->cur.image.h != o->prev.image.h) ||
3289 (o->cur.has_alpha != o->prev.has_alpha) ||
3290 (o->cur.cspace != o->prev.cspace) ||
3291 (o->cur.smooth_scale != o->prev.smooth_scale))
3292 {
3293 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3294 if (!o->pixel_updates) goto done;
3295 }
3296 if ((o->cur.border.l != o->prev.border.l) ||
3297 (o->cur.border.r != o->prev.border.r) ||
3298 (o->cur.border.t != o->prev.border.t) ||
3299 (o->cur.border.b != o->prev.border.b) ||
3300 (o->cur.border.fill != o->prev.border.fill) ||
3301 (o->cur.border.scale != o->prev.border.scale))
3302 {
3303 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3304 if (!o->pixel_updates) goto done;
3305 }
3306 if (o->dirty_pixels)
3307 {
3308 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3309 if (!o->pixel_updates) goto done;
3310 }
3311 if (o->cur.frame != o->prev.frame)
3312 {
3313 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3314 if (!o->pixel_updates) goto done;
3315 }
3316
3317 }
3318 /* if it changed geometry - and obviously not visibility or color */
3319 /* calculate differences since we have a constant color fill */
3320 /* we really only need to update the differences */
3321#if 0 // XXX: maybe buggy?
3322 if (((obj->cur.geometry.x != obj->prev.geometry.x) ||
3323 (obj->cur.geometry.y != obj->prev.geometry.y) ||
3324 (obj->cur.geometry.w != obj->prev.geometry.w) ||
3325 (obj->cur.geometry.h != obj->prev.geometry.h)) &&
3326 (o->cur.fill.w == o->prev.fill.w) &&
3327 (o->cur.fill.h == o->prev.fill.h) &&
3328 ((o->cur.fill.x + obj->cur.geometry.x) == (o->prev.fill.x + obj->prev.geometry.x)) &&
3329 ((o->cur.fill.y + obj->cur.geometry.y) == (o->prev.fill.y + obj->prev.geometry.y)) &&
3330 (!o->pixel_updates)
3331 )
3332 {
3333 evas_rects_return_difference_rects(&e->clip_changes,
3334 obj->cur.geometry.x,
3335 obj->cur.geometry.y,
3336 obj->cur.geometry.w,
3337 obj->cur.geometry.h,
3338 obj->prev.geometry.x,
3339 obj->prev.geometry.y,
3340 obj->prev.geometry.w,
3341 obj->prev.geometry.h);
3342 if (!o->pixel_updates) goto done;
3343 }
3344#endif
3345 if (((obj->cur.geometry.x != obj->prev.geometry.x) ||
3346 (obj->cur.geometry.y != obj->prev.geometry.y) ||
3347 (obj->cur.geometry.w != obj->prev.geometry.w) ||
3348 (obj->cur.geometry.h != obj->prev.geometry.h))
3349 )
3350 {
3351 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3352 if (!o->pixel_updates) goto done;
3353 }
3354 if (o->changed)
3355 {
3356 if ((o->cur.fill.x != o->prev.fill.x) ||
3357 (o->cur.fill.y != o->prev.fill.y) ||
3358 (o->cur.fill.w != o->prev.fill.w) ||
3359 (o->cur.fill.h != o->prev.fill.h))
3360 {
3361 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3362 if (!o->pixel_updates) goto done;
3363 }
3364 if (o->pixel_updates)
3365 {
3366 if ((o->cur.border.l == 0) &&
3367 (o->cur.border.r == 0) &&
3368 (o->cur.border.t == 0) &&
3369 (o->cur.border.b == 0) &&
3370 (o->cur.image.w > 0) &&
3371 (o->cur.image.h > 0) &&
3372 (!((obj->cur.map) && (obj->cur.usemap))))
3373 {
3374 Eina_Rectangle *rr;
3375
3376 EINA_LIST_FREE(o->pixel_updates, rr)
3377 {
3378 Evas_Coord idw, idh, idx, idy;
3379 int x, y, w, h;
3380
3381 e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, rr->x, rr->y, rr->w, rr->h);
3382
3383 idx = evas_object_image_figure_x_fill(obj, o->cur.fill.x, o->cur.fill.w, &idw);
3384 idy = evas_object_image_figure_y_fill(obj, o->cur.fill.y, o->cur.fill.h, &idh);
3385
3386 if (idw < 1) idw = 1;
3387 if (idh < 1) idh = 1;
3388 if (idx > 0) idx -= idw;
3389 if (idy > 0) idy -= idh;
3390 while (idx < obj->cur.geometry.w)
3391 {
3392 Evas_Coord ydy;
3393
3394 ydy = idy;
3395 x = idx;
3396 w = ((int)(idx + idw)) - x;
3397 while (idy < obj->cur.geometry.h)
3398 {
3399 Eina_Rectangle r;
3400
3401 y = idy;
3402 h = ((int)(idy + idh)) - y;
3403
3404 r.x = (rr->x * w) / o->cur.image.w;
3405 r.y = (rr->y * h) / o->cur.image.h;
3406 r.w = ((rr->w * w) + (o->cur.image.w * 2) - 1) / o->cur.image.w;
3407 r.h = ((rr->h * h) + (o->cur.image.h * 2) - 1) / o->cur.image.h;
3408 r.x += obj->cur.geometry.x + x;
3409 r.y += obj->cur.geometry.y + y;
3410 RECTS_CLIP_TO_RECT(r.x, r.y, r.w, r.h,
3411 obj->cur.cache.clip.x, obj->cur.cache.clip.y,
3412 obj->cur.cache.clip.w, obj->cur.cache.clip.h);
3413 evas_add_rect(&e->clip_changes, r.x, r.y, r.w, r.h);
3414 idy += h;
3415 }
3416 idx += idw;
3417 idy = ydy;
3418 }
3419 eina_rectangle_free(rr);
3420 }
3421 goto done;
3422 }
3423 else
3424 {
3425 Eina_Rectangle *r;
3426
3427 EINA_LIST_FREE(o->pixel_updates, r)
3428 eina_rectangle_free(r);
3429 e->engine.func->image_dirty_region(e->engine.data.output, o->engine_data, 0, 0, o->cur.image.w, o->cur.image.h);
3430 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3431 goto done;
3432 }
3433 }
3434 }
3435#if 0 // filtering disabled
3436 if (obj->filter && obj->filter->dirty)
3437 {
3438 evas_object_render_pre_prev_cur_add(&e->clip_changes, obj);
3439 }
3440#endif
3441 /* it obviously didn't change - add a NO obscure - this "unupdates" this */
3442 /* area so if there were updates for it they get wiped. don't do it if we */
3443 /* aren't fully opaque and we are visible */
3444 if (evas_object_is_visible(obj) &&
3445 evas_object_is_opaque(obj))
3446 {
3447 Evas_Coord x, y, w, h;
3448
3449 x = obj->cur.cache.clip.x;
3450 y = obj->cur.cache.clip.y;
3451 w = obj->cur.cache.clip.w;
3452 h = obj->cur.cache.clip.h;
3453 if (obj->cur.clipper)
3454 {
3455 RECTS_CLIP_TO_RECT(x, y, w, h,
3456 obj->cur.clipper->cur.cache.clip.x,
3457 obj->cur.clipper->cur.cache.clip.y,
3458 obj->cur.clipper->cur.cache.clip.w,
3459 obj->cur.clipper->cur.cache.clip.h);
3460 }
3461 e->engine.func->output_redraws_rect_del(e->engine.data.output,
3462 x, y, w, h);
3463 }
3464 done:
3465 evas_object_render_pre_effect_updates(&e->clip_changes, obj, is_v, was_v);
3466}
3467
3468static void
3469evas_object_image_render_post(Evas_Object *obj)
3470{
3471 Evas_Object_Image *o;
3472 Eina_Rectangle *r;
3473
3474 /* this moves the current data to the previous state parts of the object */
3475 /* in whatever way is safest for the object. also if we don't need object */
3476 /* data anymore we can free it if the object deems this is a good idea */
3477 o = (Evas_Object_Image *)(obj->object_data);
3478 /* remove those pesky changes */
3479 evas_object_clip_changes_clean(obj);
3480 EINA_LIST_FREE(o->pixel_updates, r)
3481 eina_rectangle_free(r);
3482 /* move cur to prev safely for object data */
3483 obj->prev = obj->cur;
3484 o->prev = o->cur;
3485 o->changed = 0;
3486 /* FIXME: copy strings across */
3487}
3488
3489static unsigned int evas_object_image_id_get(Evas_Object *obj)
3490{
3491 Evas_Object_Image *o;
3492
3493 o = (Evas_Object_Image *)(obj->object_data);
3494 if (!o) return 0;
3495 return MAGIC_OBJ_IMAGE;
3496}
3497
3498static unsigned int evas_object_image_visual_id_get(Evas_Object *obj)
3499{
3500 Evas_Object_Image *o;
3501
3502 o = (Evas_Object_Image *)(obj->object_data);
3503 if (!o) return 0;
3504 return MAGIC_OBJ_IMAGE;
3505}
3506
3507static void *evas_object_image_engine_data_get(Evas_Object *obj)
3508{
3509 Evas_Object_Image *o;
3510
3511 o = (Evas_Object_Image *)(obj->object_data);
3512 if (!o) return NULL;
3513 return o->engine_data;
3514}
3515
3516static int
3517evas_object_image_is_opaque(Evas_Object *obj)
3518{
3519 Evas_Object_Image *o;
3520
3521 /* this returns 1 if the internal object data implies that the object is */
3522 /* currently fully opaque over the entire rectangle it occupies */
3523 o = (Evas_Object_Image *)(obj->object_data);
3524/* disable caching due tyo maps screwing with this
3525 o->cur.opaque_valid = 0;
3526 if (o->cur.opaque_valid)
3527 {
3528 if (!o->cur.opaque) return 0;
3529 }
3530 else
3531*/
3532 {
3533 o->cur.opaque = 0;
3534/* disable caching */
3535/* o->cur.opaque_valid = 1; */
3536 if ((o->cur.fill.w < 1) || (o->cur.fill.h < 1))
3537 return o->cur.opaque;
3538 if (((o->cur.border.l != 0) ||
3539 (o->cur.border.r != 0) ||
3540 (o->cur.border.t != 0) ||
3541 (o->cur.border.b != 0)) &&
3542 (!o->cur.border.fill)) return o->cur.opaque;
3543 if (!o->engine_data) return o->cur.opaque;
3544 o->cur.opaque = 1;
3545 }
3546 // FIXME: use proxy
3547 if (o->cur.source)
3548 {
3549 o->cur.opaque = evas_object_is_opaque(o->cur.source);
3550 return o->cur.opaque; /* FIXME: Should go poke at the object */
3551 }
3552 if (o->cur.has_alpha)
3553 {
3554 o->cur.opaque = 0;
3555 return o->cur.opaque;
3556 }
3557 if ((obj->cur.map) && (obj->cur.usemap))
3558 {
3559 Evas_Map *m = obj->cur.map;
3560
3561 if ((m->points[0].a == 255) &&
3562 (m->points[1].a == 255) &&
3563 (m->points[2].a == 255) &&
3564 (m->points[3].a == 255))
3565 {
3566 if (
3567 ((m->points[0].x == m->points[3].x) &&
3568 (m->points[1].x == m->points[2].x) &&
3569 (m->points[0].y == m->points[1].y) &&
3570 (m->points[2].y == m->points[3].y))
3571 ||
3572 ((m->points[0].x == m->points[1].x) &&
3573 (m->points[2].x == m->points[3].x) &&
3574 (m->points[0].y == m->points[3].y) &&
3575 (m->points[1].y == m->points[2].y))
3576 )
3577 {
3578 if ((m->points[0].x == obj->cur.geometry.x) &&
3579 (m->points[0].y == obj->cur.geometry.y) &&
3580 (m->points[2].x == (obj->cur.geometry.x + obj->cur.geometry.w)) &&
3581 (m->points[2].y == (obj->cur.geometry.y + obj->cur.geometry.h)))
3582 return o->cur.opaque;
3583 }
3584 }
3585 o->cur.opaque = 0;
3586 return o->cur.opaque;
3587 }
3588 if (obj->cur.render_op == EVAS_RENDER_COPY) return o->cur.opaque;
3589 return o->cur.opaque;
3590}
3591
3592static int
3593evas_object_image_was_opaque(Evas_Object *obj)
3594{
3595 Evas_Object_Image *o;
3596
3597 /* this returns 1 if the internal object data implies that the object was */
3598 /* previously fully opaque over the entire rectangle it occupies */
3599 o = (Evas_Object_Image *)(obj->object_data);
3600 if (o->prev.opaque_valid)
3601 {
3602 if (!o->prev.opaque) return 0;
3603 }
3604 else
3605 {
3606 o->prev.opaque = 0;
3607 o->prev.opaque_valid = 1;
3608 if ((o->prev.fill.w < 1) || (o->prev.fill.h < 1))
3609 return 0;
3610 if (((o->prev.border.l != 0) ||
3611 (o->prev.border.r != 0) ||
3612 (o->prev.border.t != 0) ||
3613 (o->prev.border.b != 0)) &&
3614 (!o->prev.border.fill)) return 0;
3615 if (!o->engine_data) return 0;
3616 o->prev.opaque = 1;
3617 }
3618 // FIXME: use proxy
3619 if (o->prev.source) return 0; /* FIXME: Should go poke at the object */
3620 if (obj->prev.usemap) return 0;
3621 if (obj->prev.render_op == EVAS_RENDER_COPY) return 1;
3622 if (o->prev.has_alpha) return 0;
3623 if (obj->prev.render_op != EVAS_RENDER_BLEND) return 0;
3624 return 1;
3625}
3626
3627static int
3628evas_object_image_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
3629{
3630 Evas_Object_Image *o;
3631 DATA32 *data;
3632 int w, h, stride, iw, ih;
3633 int a;
3634
3635 o = (Evas_Object_Image *)(obj->object_data);
3636
3637 x -= obj->cur.cache.clip.x;
3638 y -= obj->cur.cache.clip.y;
3639 w = obj->cur.cache.clip.w;
3640 h = obj->cur.cache.clip.h;
3641 iw = o->cur.image.w;
3642 ih = o->cur.image.h;
3643
3644 if ((x < 0) || (y < 0) || (x >= w) || (y >= h)) return 0;
3645 if (!o->cur.has_alpha) return 1;
3646
3647 // FIXME: proxy needs to be honored
3648 if (obj->cur.map)
3649 {
3650 x = obj->cur.map->mx;
3651 y = obj->cur.map->my;
3652 }
3653 else
3654 {
3655 int bl, br, bt, bb, bsl, bsr, bst, bsb;
3656
3657 bl = o->cur.border.l;
3658 br = o->cur.border.r;
3659 bt = o->cur.border.t;
3660 bb = o->cur.border.b;
3661 if ((bl + br) > iw)
3662 {
3663 bl = iw / 2;
3664 br = iw - bl;
3665 }
3666 if ((bl + br) > iw)
3667 {
3668 bl = iw / 2;
3669 br = iw - bl;
3670 }
3671 if ((bt + bb) > ih)
3672 {
3673 bt = ih / 2;
3674 bb = ih - bt;
3675 }
3676 if ((bt + bb) > ih)
3677 {
3678 bt = ih / 2;
3679 bb = ih - bt;
3680 }
3681 if (o->cur.border.scale != 1.0)
3682 {
3683 bsl = ((double)bl * o->cur.border.scale);
3684 bsr = ((double)br * o->cur.border.scale);
3685 bst = ((double)bt * o->cur.border.scale);
3686 bsb = ((double)bb * o->cur.border.scale);
3687 }
3688 else
3689 {
3690 bsl = bl; bsr = br; bst = bt; bsb = bb;
3691 }
3692
3693 w = o->cur.fill.w;
3694 h = o->cur.fill.h;
3695 x -= o->cur.fill.x;
3696 y -= o->cur.fill.y;
3697 x %= w;
3698 y %= h;
3699
3700 if (x < 0) x += w;
3701 if (y < 0) y += h;
3702
3703 if (o->cur.border.fill != EVAS_BORDER_FILL_DEFAULT)
3704 {
3705 if ((x > bsl) && (x < (w - bsr)) &&
3706 (y > bst) && (y < (h - bsb)))
3707 {
3708 if (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) return 1;
3709 return 0;
3710 }
3711 }
3712
3713 if (x < bsl) x = (x * bl) / bsl;
3714 else if (x > (w - bsr)) x = iw - (((w - x) * br) / bsr);
3715 else if ((bsl + bsr) < w) x = bl + (((x - bsl) * (iw - bl - br)) / (w - bsl - bsr));
3716 else return 1;
3717
3718 if (y < bst) y = (y * bt) / bst;
3719 else if (y > (h - bsb)) y = ih - (((h - y) * bb) / bsb);
3720 else if ((bst + bsb) < h) y = bt + (((y - bst) * (ih - bt - bb)) / (h - bst - bsb));
3721 else return 1;
3722 }
3723
3724 if (x < 0) x = 0;
3725 if (y < 0) y = 0;
3726 if (x >= iw) x = iw - 1;
3727 if (y >= ih) y = ih - 1;
3728
3729 stride = o->cur.image.stride;
3730
3731 o->engine_data = obj->layer->evas->engine.func->image_data_get
3732 (obj->layer->evas->engine.data.output,
3733 o->engine_data,
3734 0,
3735 &data,
3736 &o->load_error);
3737 if (!data)
3738 return 0;
3739
3740 switch (o->cur.cspace)
3741 {
3742 case EVAS_COLORSPACE_ARGB8888:
3743 data = ((DATA32*)(data) + ((y * (stride >> 2)) + x));
3744 a = (*((DATA32*)(data)) >> 24) & 0xff;
3745 break;
3746 case EVAS_COLORSPACE_RGB565_A5P:
3747 data = (void*) ((DATA16*)(data) + (h * (stride >> 1)));
3748 data = (void*) ((DATA8*)(data) + ((y * (stride >> 1)) + x));
3749 a = (*((DATA8*)(data))) & 0x1f;
3750 break;
3751 default:
3752 return 1;
3753 break;
3754 }
3755
3756 return (a != 0);
3757}
3758
3759static int
3760evas_object_image_has_opaque_rect(Evas_Object *obj)
3761{
3762 Evas_Object_Image *o;
3763
3764 o = (Evas_Object_Image *)(obj->object_data);
3765 if ((obj->cur.map) && (obj->cur.usemap)) return 0;
3766 if (((o->cur.border.l | o->cur.border.r | o->cur.border.t | o->cur.border.b) != 0) &&
3767 (o->cur.border.fill == EVAS_BORDER_FILL_SOLID) &&
3768 (obj->cur.render_op == EVAS_RENDER_BLEND) &&
3769 (obj->cur.cache.clip.a == 255) &&
3770 (o->cur.fill.x == 0) &&
3771 (o->cur.fill.y == 0) &&
3772 (o->cur.fill.w == obj->cur.geometry.w) &&
3773 (o->cur.fill.h == obj->cur.geometry.h)
3774 ) return 1;
3775 return 0;
3776}
3777
3778static int
3779evas_object_image_get_opaque_rect(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
3780{
3781 Evas_Object_Image *o;
3782
3783 o = (Evas_Object_Image *)(obj->object_data);
3784 if (o->cur.border.scale == 1.0)
3785 {
3786 *x = obj->cur.geometry.x + o->cur.border.l;
3787 *y = obj->cur.geometry.y + o->cur.border.t;
3788 *w = obj->cur.geometry.w - (o->cur.border.l + o->cur.border.r);
3789 if (*w < 0) *w = 0;
3790 *h = obj->cur.geometry.h - (o->cur.border.t + o->cur.border.b);
3791 if (*h < 0) *h = 0;
3792 }
3793 else
3794 {
3795 *x = obj->cur.geometry.x + (o->cur.border.l * o->cur.border.scale);
3796 *y = obj->cur.geometry.y + (o->cur.border.t * o->cur.border.scale);
3797 *w = obj->cur.geometry.w - ((o->cur.border.l * o->cur.border.scale) + (o->cur.border.r * o->cur.border.scale));
3798 if (*w < 0) *w = 0;
3799 *h = obj->cur.geometry.h - ((o->cur.border.t * o->cur.border.scale) + (o->cur.border.b * o->cur.border.scale));
3800 if (*h < 0) *h = 0;
3801 }
3802 return 1;
3803}
3804
3805static int
3806evas_object_image_can_map(Evas_Object *obj __UNUSED__)
3807{
3808 return 1;
3809}
3810
3811static void *
3812evas_object_image_data_convert_internal(Evas_Object_Image *o, void *data, Evas_Colorspace to_cspace)
3813{
3814 void *out = NULL;
3815
3816 if (!data)
3817 return NULL;
3818
3819 switch (o->cur.cspace)
3820 {
3821 case EVAS_COLORSPACE_ARGB8888:
3822 out = evas_common_convert_argb8888_to(data,
3823 o->cur.image.w,
3824 o->cur.image.h,
3825 o->cur.image.stride >> 2,
3826 o->cur.has_alpha,
3827 to_cspace);
3828 break;
3829 case EVAS_COLORSPACE_RGB565_A5P:
3830 out = evas_common_convert_rgb565_a5p_to(data,
3831 o->cur.image.w,
3832 o->cur.image.h,
3833 o->cur.image.stride >> 1,
3834 o->cur.has_alpha,
3835 to_cspace);
3836 break;
3837 case EVAS_COLORSPACE_YCBCR422601_PL:
3838 out = evas_common_convert_yuv_422_601_to(data,
3839 o->cur.image.w,
3840 o->cur.image.h,
3841 to_cspace);
3842 break;
3843 case EVAS_COLORSPACE_YCBCR422P601_PL:
3844 out = evas_common_convert_yuv_422P_601_to(data,
3845 o->cur.image.w,
3846 o->cur.image.h,
3847 to_cspace);
3848 break;
3849 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
3850 out = evas_common_convert_yuv_420_601_to(data,
3851 o->cur.image.w,
3852 o->cur.image.h,
3853 to_cspace);
3854 break;
3855 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
3856 out = evas_common_convert_yuv_420T_601_to(data,
3857 o->cur.image.w,
3858 o->cur.image.h,
3859 to_cspace);
3860 break;
3861 default:
3862 WRN("unknow colorspace: %i\n", o->cur.cspace);
3863 break;
3864 }
3865
3866 return out;
3867}
3868
3869static void
3870evas_object_image_filled_resize_listener(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *einfo __UNUSED__)
3871{
3872 Evas_Coord w, h;
3873
3874 evas_object_geometry_get(obj, NULL, NULL, &w, &h);
3875 evas_object_image_fill_set(obj, 0, 0, w, h);
3876}
3877
3878
3879Eina_Bool
3880_evas_object_image_preloading_get(const Evas_Object *obj)
3881{
3882 Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data);
3883 if (!o) return EINA_FALSE;
3884 MAGIC_CHECK(o, Evas_Object_Image, MAGIC_OBJ_IMAGE);
3885 return EINA_FALSE;
3886 MAGIC_CHECK_END();
3887 return o->preloading;
3888}
3889
3890void
3891_evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading)
3892{
3893 Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data);
3894 o->preloading = preloading;
3895}
3896
3897void
3898_evas_object_image_preloading_check(Evas_Object *obj)
3899{
3900 Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data);
3901 if (obj->layer->evas->engine.func->image_load_error_get)
3902 o->load_error = obj->layer->evas->engine.func->image_load_error_get
3903 (obj->layer->evas->engine.data.output, o->engine_data);
3904}
3905
3906Evas_Object *
3907_evas_object_image_video_parent_get(Evas_Object *obj)
3908{
3909 Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data);
3910
3911 return o->video_surface ? o->video.parent : NULL;
3912}
3913
3914void
3915_evas_object_image_video_overlay_show(Evas_Object *obj)
3916{
3917 Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data);
3918
3919 if (obj->cur.cache.clip.x != obj->prev.cache.clip.x ||
3920 obj->cur.cache.clip.y != obj->prev.cache.clip.y ||
3921 o->created || !o->video_visible)
3922 o->video.move(o->video.data, obj, &o->video, obj->cur.cache.clip.x, obj->cur.cache.clip.y);
3923 if (obj->cur.cache.clip.w != obj->prev.cache.clip.w ||
3924 obj->cur.cache.clip.h != obj->prev.cache.clip.h ||
3925 o->created || !o->video_visible)
3926 o->video.resize(o->video.data, obj, &o->video, obj->cur.cache.clip.w, obj->cur.cache.clip.h);
3927 if (!o->video_visible || o->created)
3928 {
3929 o->video.show(o->video.data, obj, &o->video);
3930 }
3931 else
3932 {
3933 /* Cancel dirty on the image */
3934 Eina_Rectangle *r;
3935
3936 o->dirty_pixels = 0;
3937 EINA_LIST_FREE(o->pixel_updates, r)
3938 eina_rectangle_free(r);
3939 }
3940 o->video_visible = EINA_TRUE;
3941 o->created = EINA_FALSE;
3942}
3943
3944void
3945_evas_object_image_video_overlay_hide(Evas_Object *obj)
3946{
3947 Evas_Object_Image *o = (Evas_Object_Image *)(obj->object_data);
3948
3949 if (o->video_visible || o->created)
3950 o->video.hide(o->video.data, obj, &o->video);
3951 if (evas_object_is_visible(obj))
3952 o->video.update_pixels(o->video.data, obj, &o->video);
3953 o->video_visible = EINA_FALSE;
3954 o->created = EINA_FALSE;
3955}
3956
3957/* 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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* local calls */
5
6void
7evas_object_inform_call_show(Evas_Object *obj)
8{
9 _evas_object_event_new();
10
11 evas_object_event_callback_call(obj, EVAS_CALLBACK_SHOW, NULL, _evas_event_counter);
12 _evas_post_event_callback_call(obj->layer->evas);
13}
14
15void
16evas_object_inform_call_hide(Evas_Object *obj)
17{
18 _evas_object_event_new();
19
20 evas_object_event_callback_call(obj, EVAS_CALLBACK_HIDE, NULL, _evas_event_counter);
21 _evas_post_event_callback_call(obj->layer->evas);
22}
23
24void
25evas_object_inform_call_move(Evas_Object *obj)
26{
27 _evas_object_event_new();
28
29 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOVE, NULL, _evas_event_counter);
30 _evas_post_event_callback_call(obj->layer->evas);
31}
32
33void
34evas_object_inform_call_resize(Evas_Object *obj)
35{
36 _evas_object_event_new();
37
38 evas_object_event_callback_call(obj, EVAS_CALLBACK_RESIZE, NULL, _evas_event_counter);
39 _evas_post_event_callback_call(obj->layer->evas);
40}
41
42void
43evas_object_inform_call_restack(Evas_Object *obj)
44{
45 _evas_object_event_new();
46
47 evas_object_event_callback_call(obj, EVAS_CALLBACK_RESTACK, NULL, _evas_event_counter);
48 _evas_post_event_callback_call(obj->layer->evas);
49}
50
51void
52evas_object_inform_call_changed_size_hints(Evas_Object *obj)
53{
54 _evas_object_event_new();
55
56 evas_object_event_callback_call(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, NULL, _evas_event_counter);
57 _evas_post_event_callback_call(obj->layer->evas);
58}
59
60void
61evas_object_inform_call_image_preloaded(Evas_Object *obj)
62{
63 if (!_evas_object_image_preloading_get(obj)) return;
64 _evas_object_image_preloading_check(obj);
65 _evas_object_image_preloading_set(obj, 0);
66 _evas_object_event_new();
67
68 evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_PRELOADED, NULL, _evas_event_counter);
69 _evas_post_event_callback_call(obj->layer->evas);
70}
71
72void
73evas_object_inform_call_image_unloaded(Evas_Object *obj)
74{
75 _evas_object_event_new();
76
77 evas_object_event_callback_call(obj, EVAS_CALLBACK_IMAGE_UNLOADED, NULL, _evas_event_counter);
78 _evas_post_event_callback_call(obj->layer->evas);
79}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* local calls */
5
6static void evas_object_intercept_init(Evas_Object *obj);
7static void evas_object_intercept_deinit(Evas_Object *obj);
8
9static void
10evas_object_intercept_init(Evas_Object *obj)
11{
12 if (!obj->interceptors)
13 obj->interceptors = evas_mem_calloc(sizeof(Evas_Intercept_Func));
14}
15
16static void
17evas_object_intercept_deinit(Evas_Object *obj)
18{
19 if (!obj->interceptors) return;
20 if ((obj->interceptors->show.func) ||
21 (obj->interceptors->hide.func) ||
22 (obj->interceptors->move.func) ||
23 (obj->interceptors->resize.func) ||
24 (obj->interceptors->raise.func) ||
25 (obj->interceptors->lower.func) ||
26 (obj->interceptors->stack_above.func) ||
27 (obj->interceptors->stack_below.func) ||
28 (obj->interceptors->layer_set.func) ||
29 (obj->interceptors->color_set.func) ||
30 (obj->interceptors->clip_set.func) ||
31 (obj->interceptors->clip_unset.func))
32 return;
33 free(obj->interceptors);
34 obj->interceptors = NULL;
35}
36
37/* private calls */
38
39void
40evas_object_intercept_cleanup(Evas_Object *obj)
41{
42 if (obj->interceptors) free(obj->interceptors);
43}
44
45int
46evas_object_intercept_call_show(Evas_Object *obj)
47{
48 int ret;
49
50 if (!obj->interceptors) return 0;
51 if (obj->intercepted) return 0;
52 obj->intercepted = EINA_TRUE;
53 ret = !!(obj->interceptors->show.func);
54 if (ret)
55 obj->interceptors->show.func(obj->interceptors->show.data, obj);
56 obj->intercepted = EINA_FALSE;
57 return ret;
58}
59
60int
61evas_object_intercept_call_hide(Evas_Object *obj)
62{
63 int ret;
64
65 if (!obj->interceptors) return 0;
66 if (obj->intercepted) return 0;
67 obj->intercepted = EINA_TRUE;
68 ret = !!(obj->interceptors->hide.func);
69 if (ret)
70 obj->interceptors->hide.func(obj->interceptors->hide.data, obj);
71 obj->intercepted = EINA_FALSE;
72 return ret;
73}
74
75int
76evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
77{
78 int ret;
79
80 if (!obj->interceptors) return 0;
81 if (obj->intercepted) return 0;
82 obj->intercepted = EINA_TRUE;
83 ret = !!(obj->interceptors->move.func);
84 if (ret)
85 obj->interceptors->move.func(obj->interceptors->move.data, obj, x, y);
86 obj->intercepted = EINA_FALSE;
87 return ret;
88}
89
90int
91evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
92{
93 int ret;
94
95 if (!obj->interceptors) return 0;
96 if (obj->intercepted) return 0;
97 obj->intercepted = EINA_TRUE;
98 ret = !!(obj->interceptors->resize.func);
99 if (ret)
100 obj->interceptors->resize.func(obj->interceptors->resize.data, obj, w, h);
101 obj->intercepted = EINA_FALSE;
102 return ret;
103}
104
105int
106evas_object_intercept_call_raise(Evas_Object *obj)
107{
108 int ret;
109
110 if (!obj->interceptors) return 0;
111 if (obj->intercepted) return 0;
112 obj->intercepted = EINA_TRUE;
113 ret = !!(obj->interceptors->raise.func);
114 if (ret)
115 obj->interceptors->raise.func(obj->interceptors->raise.data, obj);
116 obj->intercepted = EINA_FALSE;
117 return ret;
118}
119
120int
121evas_object_intercept_call_lower(Evas_Object *obj)
122{
123 int ret;
124
125 if (!obj->interceptors) return 0;
126 if (obj->intercepted) return 0;
127 obj->intercepted = EINA_TRUE;
128 ret = !!(obj->interceptors->lower.func);
129 if (ret)
130 obj->interceptors->lower.func(obj->interceptors->lower.data, obj);
131 obj->intercepted = EINA_FALSE;
132 return ret;
133}
134
135int
136evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above)
137{
138 int ret;
139
140 if (!obj->interceptors) return 0;
141 if (obj->intercepted) return 0;
142 obj->intercepted = EINA_TRUE;
143 ret = !!(obj->interceptors->stack_above.func);
144 if (ret)
145 obj->interceptors->stack_above.func(obj->interceptors->stack_above.data, obj, above);
146 obj->intercepted = EINA_FALSE;
147 return ret;
148}
149
150int
151evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below)
152{
153 int ret;
154
155 if (!obj->interceptors) return 0;
156 if (obj->intercepted) return 0;
157 obj->intercepted = EINA_TRUE;
158 ret = !!(obj->interceptors->stack_below.func);
159 if (ret)
160 obj->interceptors->stack_below.func(obj->interceptors->stack_below.data, obj, below);
161 obj->intercepted = EINA_FALSE;
162 return ret;
163}
164
165int
166evas_object_intercept_call_layer_set(Evas_Object *obj, int l)
167{
168 int ret;
169
170 if (!obj->interceptors) return 0;
171 if (obj->intercepted) return 0;
172 obj->intercepted = EINA_TRUE;
173 ret = !!(obj->interceptors->layer_set.func);
174 if (ret)
175 obj->interceptors->layer_set.func(obj->interceptors->layer_set.data, obj, l);
176 obj->intercepted = EINA_FALSE;
177 return ret;
178}
179
180int
181evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a)
182{
183 int ret;
184
185 if (!obj->interceptors) return 0;
186 if (obj->intercepted) return 0;
187 obj->intercepted = EINA_TRUE;
188 ret = !!(obj->interceptors->color_set.func);
189 if (ret)
190 obj->interceptors->color_set.func(obj->interceptors->color_set.data, obj, r, g, b, a);
191 obj->intercepted = EINA_FALSE;
192 return ret;
193}
194
195int
196evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip)
197{
198 int ret;
199
200 if (!obj->interceptors) return 0;
201 if (obj->intercepted) return 0;
202 obj->intercepted = EINA_TRUE;
203 ret = !!(obj->interceptors->clip_set.func);
204 if (ret)
205 obj->interceptors->clip_set.func(obj->interceptors->clip_set.data, obj, clip);
206 obj->intercepted = EINA_FALSE;
207 return ret;
208}
209
210int
211evas_object_intercept_call_clip_unset(Evas_Object *obj)
212{
213 int ret;
214
215 if (!obj->interceptors) return 0;
216 if (obj->intercepted) return 0;
217 obj->intercepted = EINA_TRUE;
218 ret = !!(obj->interceptors->clip_unset.func);
219 if (ret)
220 obj->interceptors->clip_unset.func(obj->interceptors->clip_unset.data, obj);
221 obj->intercepted = EINA_FALSE;
222 return ret;
223}
224
225/* public calls */
226
227EAPI void
228evas_object_intercept_show_callback_add(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func, const void *data)
229{
230 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
231 return;
232 MAGIC_CHECK_END();
233 if (!func) return;
234 evas_object_intercept_init(obj);
235 if (!obj->interceptors) return;
236 obj->interceptors->show.func = func;
237 obj->interceptors->show.data = (void *)data;
238}
239
240EAPI void *
241evas_object_intercept_show_callback_del(Evas_Object *obj, Evas_Object_Intercept_Show_Cb func)
242{
243 void *data;
244
245 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
246 return NULL;
247 MAGIC_CHECK_END();
248 if (!func) return NULL;
249 if (!obj->interceptors) return NULL;
250 obj->interceptors->show.func = NULL;
251 data = obj->interceptors->show.data;
252 obj->interceptors->show.data = NULL;
253 evas_object_intercept_deinit(obj);
254 return data;
255}
256
257EAPI void
258evas_object_intercept_hide_callback_add(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func, const void *data)
259{
260 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
261 return;
262 MAGIC_CHECK_END();
263 if (!func) return;
264 evas_object_intercept_init(obj);
265 if (!obj->interceptors) return;
266 obj->interceptors->hide.func = func;
267 obj->interceptors->hide.data = (void *)data;
268}
269
270EAPI void *
271evas_object_intercept_hide_callback_del(Evas_Object *obj, Evas_Object_Intercept_Hide_Cb func)
272{
273 void *data;
274
275 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
276 return NULL;
277 MAGIC_CHECK_END();
278 if (!func) return NULL;
279 if (!obj->interceptors) return NULL;
280 obj->interceptors->hide.func = NULL;
281 data = obj->interceptors->hide.data;
282 obj->interceptors->hide.data = NULL;
283 evas_object_intercept_deinit(obj);
284 return data;
285}
286
287EAPI void
288evas_object_intercept_move_callback_add(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func, const void *data)
289{
290 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
291 return;
292 MAGIC_CHECK_END();
293 if (!func) return;
294 evas_object_intercept_init(obj);
295 if (!obj->interceptors) return;
296 obj->interceptors->move.func = func;
297 obj->interceptors->move.data = (void *)data;
298}
299
300EAPI void *
301evas_object_intercept_move_callback_del(Evas_Object *obj, Evas_Object_Intercept_Move_Cb func)
302{
303 void *data;
304
305 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
306 return NULL;
307 MAGIC_CHECK_END();
308 if (!func) return NULL;
309 if (!obj->interceptors) return NULL;
310 obj->interceptors->move.func = NULL;
311 data = obj->interceptors->move.data;
312 obj->interceptors->move.data = NULL;
313 evas_object_intercept_deinit(obj);
314 return data;
315}
316
317EAPI void
318evas_object_intercept_resize_callback_add(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func, const void *data)
319{
320 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
321 return;
322 MAGIC_CHECK_END();
323 if (!func) return;
324 evas_object_intercept_init(obj);
325 if (!obj->interceptors) return;
326 obj->interceptors->resize.func = func;
327 obj->interceptors->resize.data = (void *)data;
328}
329
330EAPI void *
331evas_object_intercept_resize_callback_del(Evas_Object *obj, Evas_Object_Intercept_Resize_Cb func)
332{
333 void *data;
334
335 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
336 return NULL;
337 MAGIC_CHECK_END();
338 if (!func) return NULL;
339 if (!obj->interceptors) return NULL;
340 obj->interceptors->resize.func = NULL;
341 data = obj->interceptors->resize.data;
342 obj->interceptors->resize.data = NULL;
343 evas_object_intercept_deinit(obj);
344 return data;
345}
346
347EAPI void
348evas_object_intercept_raise_callback_add(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func, const void *data)
349{
350 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
351 return;
352 MAGIC_CHECK_END();
353 if (!func) return;
354 evas_object_intercept_init(obj);
355 if (!obj->interceptors) return;
356 obj->interceptors->raise.func = func;
357 obj->interceptors->raise.data = (void *)data;
358}
359
360EAPI void *
361evas_object_intercept_raise_callback_del(Evas_Object *obj, Evas_Object_Intercept_Raise_Cb func)
362{
363 void *data;
364
365 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
366 return NULL;
367 MAGIC_CHECK_END();
368 if (!func) return NULL;
369 if (!obj->interceptors) return NULL;
370 obj->interceptors->raise.func = NULL;
371 data = obj->interceptors->raise.data;
372 obj->interceptors->raise.data = NULL;
373 evas_object_intercept_deinit(obj);
374 return data;
375}
376
377EAPI void
378evas_object_intercept_lower_callback_add(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func, const void *data)
379{
380 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
381 return;
382 MAGIC_CHECK_END();
383 if (!func) return;
384 evas_object_intercept_init(obj);
385 if (!obj->interceptors) return;
386 obj->interceptors->lower.func = func;
387 obj->interceptors->lower.data = (void *)data;
388}
389
390EAPI void *
391evas_object_intercept_lower_callback_del(Evas_Object *obj, Evas_Object_Intercept_Lower_Cb func)
392{
393 void *data;
394
395 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
396 return NULL;
397 MAGIC_CHECK_END();
398 if (!func) return NULL;
399 if (!obj->interceptors) return NULL;
400 obj->interceptors->lower.func = NULL;
401 data = obj->interceptors->lower.data;
402 obj->interceptors->lower.data = NULL;
403 evas_object_intercept_deinit(obj);
404 return data;
405}
406
407EAPI void
408evas_object_intercept_stack_above_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func, const void *data)
409{
410 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
411 return;
412 MAGIC_CHECK_END();
413 if (!func) return;
414 evas_object_intercept_init(obj);
415 if (!obj->interceptors) return;
416 obj->interceptors->stack_above.func = func;
417 obj->interceptors->stack_above.data = (void *)data;
418}
419
420EAPI void *
421evas_object_intercept_stack_above_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Above_Cb func)
422{
423 void *data;
424
425 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
426 return NULL;
427 MAGIC_CHECK_END();
428 if (!func) return NULL;
429 if (!obj->interceptors) return NULL;
430 obj->interceptors->stack_above.func = NULL;
431 data = obj->interceptors->stack_above.data;
432 obj->interceptors->stack_above.data = NULL;
433 evas_object_intercept_deinit(obj);
434 return data;
435}
436
437EAPI void
438evas_object_intercept_stack_below_callback_add(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func, const void *data)
439{
440 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
441 return;
442 MAGIC_CHECK_END();
443 if (!func) return;
444 evas_object_intercept_init(obj);
445 if (!obj->interceptors) return;
446 obj->interceptors->stack_below.func = func;
447 obj->interceptors->stack_below.data = (void *)data;
448}
449
450EAPI void *
451evas_object_intercept_stack_below_callback_del(Evas_Object *obj, Evas_Object_Intercept_Stack_Below_Cb func)
452{
453 void *data;
454
455 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
456 return NULL;
457 MAGIC_CHECK_END();
458 if (!func) return NULL;
459 if (!obj->interceptors) return NULL;
460 obj->interceptors->stack_below.func = NULL;
461 data = obj->interceptors->stack_below.data;
462 obj->interceptors->stack_below.data = NULL;
463 evas_object_intercept_deinit(obj);
464 return data;
465}
466
467EAPI void
468evas_object_intercept_layer_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func, const void *data)
469{
470 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
471 return;
472 MAGIC_CHECK_END();
473 if (!func) return;
474 evas_object_intercept_init(obj);
475 if (!obj->interceptors) return;
476 obj->interceptors->layer_set.func = func;
477 obj->interceptors->layer_set.data = (void *)data;
478}
479
480EAPI void *
481evas_object_intercept_layer_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Layer_Set_Cb func)
482{
483 void *data;
484
485 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
486 return NULL;
487 MAGIC_CHECK_END();
488 if (!func) return NULL;
489 if (!obj->interceptors) return NULL;
490 obj->interceptors->layer_set.func = NULL;
491 data = obj->interceptors->layer_set.data;
492 obj->interceptors->layer_set.data = NULL;
493 evas_object_intercept_deinit(obj);
494 return data;
495}
496
497EAPI void
498evas_object_intercept_color_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func, const void *data)
499{
500 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
501 return;
502 MAGIC_CHECK_END();
503 if (!func) return;
504 evas_object_intercept_init(obj);
505 if (!obj->interceptors) return;
506 obj->interceptors->color_set.func = func;
507 obj->interceptors->color_set.data = (void *)data;
508}
509
510EAPI void *
511evas_object_intercept_color_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Color_Set_Cb func)
512{
513 void *data;
514
515 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
516 return NULL;
517 MAGIC_CHECK_END();
518 if (!func) return NULL;
519 if (!obj->interceptors) return NULL;
520 obj->interceptors->color_set.func = NULL;
521 data = obj->interceptors->color_set.data;
522 obj->interceptors->color_set.data = NULL;
523 evas_object_intercept_deinit(obj);
524 return data;
525}
526
527EAPI void
528evas_object_intercept_clip_set_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func, const void *data)
529{
530 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
531 return;
532 MAGIC_CHECK_END();
533 if (!func) return;
534 evas_object_intercept_init(obj);
535 if (!obj->interceptors) return;
536 obj->interceptors->clip_set.func = func;
537 obj->interceptors->clip_set.data = (void *)data;
538}
539
540EAPI void *
541evas_object_intercept_clip_set_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Set_Cb func)
542{
543 void *data;
544
545 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
546 return NULL;
547 MAGIC_CHECK_END();
548 if (!func) return NULL;
549 if (!obj->interceptors) return NULL;
550 obj->interceptors->clip_set.func = NULL;
551 data = obj->interceptors->clip_set.data;
552 obj->interceptors->clip_set.data = NULL;
553 evas_object_intercept_deinit(obj);
554 return data;
555}
556
557EAPI void
558evas_object_intercept_clip_unset_callback_add(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func, const void *data)
559{
560 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
561 return;
562 MAGIC_CHECK_END();
563 if (!func) return;
564 evas_object_intercept_init(obj);
565 if (!obj->interceptors) return;
566 obj->interceptors->clip_unset.func = func;
567 obj->interceptors->clip_unset.data = (void *)data;
568}
569
570EAPI void *
571evas_object_intercept_clip_unset_callback_del(Evas_Object *obj, Evas_Object_Intercept_Clip_Unset_Cb func)
572{
573 void *data;
574
575 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
576 return NULL;
577 MAGIC_CHECK_END();
578 if (!func) return NULL;
579 if (!obj->interceptors) return NULL;
580 obj->interceptors->clip_unset.func = NULL;
581 data = obj->interceptors->clip_unset.data;
582 obj->interceptors->clip_unset.data = NULL;
583 evas_object_intercept_deinit(obj);
584 return data;
585}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* private magic number for line objects */
5static const char o_type[] = "line";
6
7/* private struct for line object internal data */
8typedef struct _Evas_Object_Line Evas_Object_Line;
9
10struct _Evas_Object_Line
11{
12 DATA32 magic;
13 struct {
14 struct {
15 int x1, y1, x2, y2;
16 struct {
17 Evas_Coord w, h;
18 } object;
19 } cache;
20 Evas_Coord x1, y1, x2, y2;
21 } cur, prev;
22
23 void *engine_data;
24
25 char changed : 1;
26};
27
28/* private methods for line objects */
29static void evas_object_line_init(Evas_Object *obj);
30static void *evas_object_line_new(void);
31static void evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
32static void evas_object_line_free(Evas_Object *obj);
33static void evas_object_line_render_pre(Evas_Object *obj);
34static void evas_object_line_render_post(Evas_Object *obj);
35
36static unsigned int evas_object_line_id_get(Evas_Object *obj);
37static unsigned int evas_object_line_visual_id_get(Evas_Object *obj);
38static void *evas_object_line_engine_data_get(Evas_Object *obj);
39
40static int evas_object_line_is_opaque(Evas_Object *obj);
41static int evas_object_line_was_opaque(Evas_Object *obj);
42static int evas_object_line_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
43static int evas_object_line_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
44static void evas_object_line_coords_recalc(Evas_Object *obj);
45
46static const Evas_Object_Func object_func =
47{
48 /* methods (compulsory) */
49 evas_object_line_free,
50 evas_object_line_render,
51 evas_object_line_render_pre,
52 evas_object_line_render_post,
53 evas_object_line_id_get,
54 evas_object_line_visual_id_get,
55 evas_object_line_engine_data_get,
56 /* these are optional. NULL = nothing */
57 NULL,
58 NULL,
59 NULL,
60 NULL,
61 evas_object_line_is_opaque,
62 evas_object_line_was_opaque,
63 evas_object_line_is_inside,
64 evas_object_line_was_inside,
65 evas_object_line_coords_recalc,
66 NULL,
67 NULL,
68 NULL,
69 NULL
70};
71
72/* the actual api call to add a rect */
73/* it has no other api calls as all properties are standard */
74
75EVAS_MEMPOOL(_mp_obj);
76
77EAPI Evas_Object *
78evas_object_line_add(Evas *e)
79{
80 Evas_Object *obj;
81
82 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
83 return NULL;
84 MAGIC_CHECK_END();
85 obj = evas_object_new(e);
86 evas_object_line_init(obj);
87 evas_object_inject(obj, e);
88 return obj;
89}
90
91EAPI void
92evas_object_line_xy_set(Evas_Object *obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2)
93{
94 Evas_Object_Line *o;
95 Evas_Coord min_x, max_x, min_y, max_y;
96 int is, was = 0;
97
98 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
99 return;
100 MAGIC_CHECK_END();
101 o = (Evas_Object_Line *)(obj->object_data);
102 MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE);
103 return;
104 MAGIC_CHECK_END();
105 if ((x1 == o->cur.x1) && (y1 == o->cur.y1) &&
106 (x2 == o->cur.x2) && (y2 == o->cur.y2)) return;
107 if (obj->layer->evas->events_frozen <= 0)
108 {
109 if (!evas_event_passes_through(obj) &&
110 !evas_event_freezes_through(obj))
111 was = evas_object_is_in_output_rect(obj,
112 obj->layer->evas->pointer.x,
113 obj->layer->evas->pointer.y,
114 1, 1);
115 }
116 if (x1 < x2)
117 {
118 min_x = x1;
119 max_x = x2;
120 }
121 else
122 {
123 min_x = x2;
124 max_x = x1;
125 }
126 if (y1 < y2)
127 {
128 min_y = y1;
129 max_y = y2;
130 }
131 else
132 {
133 min_y = y2;
134 max_y = y1;
135 }
136 obj->cur.geometry.x = min_x;
137 obj->cur.geometry.y = min_y;
138 obj->cur.geometry.w = max_x - min_x + 2;
139 obj->cur.geometry.h = max_y - min_y + 2;
140//// obj->cur.cache.geometry.validity = 0;
141 o->cur.x1 = x1 - min_x;
142 o->cur.y1 = y1 - min_y;
143 o->cur.x2 = x2 - min_x;
144 o->cur.y2 = y2 - min_y;
145 o->changed = 1;
146 evas_object_change(obj);
147 evas_object_coords_recalc(obj);
148 evas_object_clip_dirty(obj);
149 if (obj->layer->evas->events_frozen <= 0)
150 {
151 is = evas_object_is_in_output_rect(obj,
152 obj->layer->evas->pointer.x,
153 obj->layer->evas->pointer.y, 1, 1);
154 if (!evas_event_passes_through(obj) &&
155 !evas_event_freezes_through(obj))
156 {
157 if ((is ^ was) && obj->cur.visible)
158 evas_event_feed_mouse_move(obj->layer->evas,
159 obj->layer->evas->pointer.x,
160 obj->layer->evas->pointer.y,
161 obj->layer->evas->last_timestamp,
162 NULL);
163 }
164 }
165 evas_object_inform_call_move(obj);
166 evas_object_inform_call_resize(obj);
167}
168
169EAPI void
170evas_object_line_xy_get(const Evas_Object *obj, Evas_Coord *x1, Evas_Coord *y1, Evas_Coord *x2, Evas_Coord *y2)
171{
172 Evas_Object_Line *o;
173
174 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
175 if (x1) *x1 = 0;
176 if (y1) *y1 = 0;
177 if (x2) *x2 = 0;
178 if (y2) *y2 = 0;
179 return;
180 MAGIC_CHECK_END();
181 o = (Evas_Object_Line *)(obj->object_data);
182 MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE);
183 if (x1) *x1 = 0;
184 if (y1) *y1 = 0;
185 if (x2) *x2 = 0;
186 if (y2) *y2 = 0;
187 return;
188 MAGIC_CHECK_END();
189 if (x1) *x1 = obj->cur.geometry.x + o->cur.x1;
190 if (y1) *y1 = obj->cur.geometry.y + o->cur.y1;
191 if (x2) *x2 = obj->cur.geometry.x + o->cur.x2;
192 if (y2) *y2 = obj->cur.geometry.y + o->cur.y2;
193}
194
195/* all nice and private */
196static void
197evas_object_line_init(Evas_Object *obj)
198{
199 /* alloc image ob, setup methods and default values */
200 obj->object_data = evas_object_line_new();
201 /* set up default settings for this kind of object */
202 obj->cur.color.r = 255;
203 obj->cur.color.g = 255;
204 obj->cur.color.b = 255;
205 obj->cur.color.a = 255;
206 obj->cur.geometry.x = 0;
207 obj->cur.geometry.y = 0;
208 obj->cur.geometry.w = 0;
209 obj->cur.geometry.h = 0;
210 obj->cur.layer = 0;
211 obj->cur.anti_alias = 1;
212 obj->cur.render_op = EVAS_RENDER_BLEND;
213 /* set up object-specific settings */
214 obj->prev = obj->cur;
215 /* set up methods (compulsory) */
216 obj->func = &object_func;
217 obj->type = o_type;
218}
219
220static void *
221evas_object_line_new(void)
222{
223 Evas_Object_Line *o;
224
225 /* alloc obj private data */
226 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_line", Evas_Object_Line, 16, NULL);
227 o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Line);
228 if (!o) return NULL;
229 EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Line);
230 o->magic = MAGIC_OBJ_LINE;
231 o->cur.x1 = 0;
232 o->cur.y1 = 0;
233 o->cur.x2 = 31;
234 o->cur.y2 = 31;
235 o->prev = o->cur;
236 return o;
237}
238
239static void
240evas_object_line_free(Evas_Object *obj)
241{
242 Evas_Object_Line *o;
243
244 /* frees private object data. very simple here */
245 o = (Evas_Object_Line *)(obj->object_data);
246 MAGIC_CHECK(o, Evas_Object_Line, MAGIC_OBJ_LINE);
247 return;
248 MAGIC_CHECK_END();
249 /* free obj */
250 o->magic = 0;
251 EVAS_MEMPOOL_FREE(_mp_obj, o);
252}
253
254static void
255evas_object_line_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
256{
257 Evas_Object_Line *o;
258
259 /* render object to surface with context, and offxet by x,y */
260 o = (Evas_Object_Line *)(obj->object_data);
261 obj->layer->evas->engine.func->context_color_set(output,
262 context,
263 obj->cur.cache.clip.r,
264 obj->cur.cache.clip.g,
265 obj->cur.cache.clip.b,
266 obj->cur.cache.clip.a);
267 obj->layer->evas->engine.func->context_multiplier_unset(output,
268 context);
269 obj->layer->evas->engine.func->context_anti_alias_set(output, context,
270 obj->cur.anti_alias);
271 obj->layer->evas->engine.func->context_render_op_set(output, context,
272 obj->cur.render_op);
273 obj->layer->evas->engine.func->line_draw(output,
274 context,
275 surface,
276 o->cur.cache.x1 + x,
277 o->cur.cache.y1 + y,
278 o->cur.cache.x2 + x,
279 o->cur.cache.y2 + y);
280}
281
282static void
283evas_object_line_render_pre(Evas_Object *obj)
284{
285 Evas_Object_Line *o;
286 int is_v, was_v;
287
288 /* dont pre-render the obj twice! */
289 if (obj->pre_render_done) return;
290 obj->pre_render_done = 1;
291 /* pre-render phase. this does anything an object needs to do just before */
292 /* rendering. this could mean loading the image data, retrieving it from */
293 /* elsewhere, decoding video etc. */
294 /* then when this is done the object needs to figure if it changed and */
295 /* if so what and where and add the appropriate redraw lines */
296 o = (Evas_Object_Line *)(obj->object_data);
297 /* if someone is clipping this obj - go calculate the clipper */
298 if (obj->cur.clipper)
299 {
300 if (obj->cur.cache.clip.dirty)
301 evas_object_clip_recalc(obj->cur.clipper);
302 obj->cur.clipper->func->render_pre(obj->cur.clipper);
303 }
304 /* now figure what changed and add draw rects */
305 /* if it just became visible or invisible */
306 is_v = evas_object_is_visible(obj);
307 was_v = evas_object_was_visible(obj);
308 if (is_v != was_v)
309 {
310 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
311 goto done;
312 }
313 if ((obj->cur.map != obj->prev.map) ||
314 (obj->cur.usemap != obj->prev.usemap))
315 {
316 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
317 goto done;
318 }
319 /* it's not visible - we accounted for it appearing or not so just abort */
320 if (!is_v) goto done;
321 /* clipper changed this is in addition to anything else for obj */
322 evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
323 /* if we restacked (layer or just within a layer) */
324 if (obj->restack)
325 {
326 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
327 goto done;
328 }
329 /* if it changed anti_alias */
330 if (obj->cur.anti_alias != obj->prev.anti_alias)
331 {
332 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
333 goto done;
334 }
335 /* if it changed render op */
336 if (obj->cur.render_op != obj->prev.render_op)
337 {
338 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
339 goto done;
340 }
341 /* if it changed color */
342 if ((obj->cur.color.r != obj->prev.color.r) ||
343 (obj->cur.color.g != obj->prev.color.g) ||
344 (obj->cur.color.b != obj->prev.color.b) ||
345 (obj->cur.color.a != obj->prev.color.a))
346 {
347 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
348 goto done;
349 }
350 /* if it changed geometry - and obviously not visibility or color */
351 /* calculate differences since we have a constant color fill */
352 /* we really only need to update the differences */
353 if ((obj->cur.geometry.x != obj->prev.geometry.x) ||
354 (obj->cur.geometry.y != obj->prev.geometry.y) ||
355 (obj->cur.geometry.w != obj->prev.geometry.w) ||
356 (obj->cur.geometry.h != obj->prev.geometry.h) ||
357 ((o->changed) &&
358 ((o->cur.x1 != o->prev.x1) ||
359 (o->cur.y1 != o->prev.y1) ||
360 (o->cur.x2 != o->prev.x2) ||
361 (o->cur.y2 != o->prev.y2)))
362 )
363 {
364 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
365 goto done;
366 }
367 done:
368 evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
369}
370
371static void
372evas_object_line_render_post(Evas_Object *obj)
373{
374 Evas_Object_Line *o;
375
376 /* this moves the current data to the previous state parts of the object */
377 /* in whatever way is safest for the object. also if we don't need object */
378 /* data anymore we can free it if the object deems this is a good idea */
379 o = (Evas_Object_Line *)(obj->object_data);
380 /* remove those pesky changes */
381 evas_object_clip_changes_clean(obj);
382 /* move cur to prev safely for object data */
383 obj->prev = obj->cur;
384 o->prev = o->cur;
385 o->changed = 0;
386}
387
388static unsigned int evas_object_line_id_get(Evas_Object *obj)
389{
390 Evas_Object_Line *o;
391
392 o = (Evas_Object_Line *)(obj->object_data);
393 if (!o) return 0;
394 return MAGIC_OBJ_LINE;
395}
396
397static unsigned int evas_object_line_visual_id_get(Evas_Object *obj)
398{
399 Evas_Object_Line *o;
400
401 o = (Evas_Object_Line *)(obj->object_data);
402 if (!o) return 0;
403 return MAGIC_OBJ_SHAPE;
404}
405
406static void *evas_object_line_engine_data_get(Evas_Object *obj)
407{
408 Evas_Object_Line *o;
409
410 o = (Evas_Object_Line *)(obj->object_data);
411 if (!o) return NULL;
412 return o->engine_data;
413}
414
415static int
416evas_object_line_is_opaque(Evas_Object *obj __UNUSED__)
417{
418 /* this returns 1 if the internal object data implies that the object is */
419 /* currently fully opaque over the entire line it occupies */
420 return 0;
421}
422
423static int
424evas_object_line_was_opaque(Evas_Object *obj __UNUSED__)
425{
426 /* this returns 1 if the internal object data implies that the object was */
427 /* previously fully opaque over the entire line it occupies */
428 return 0;
429}
430
431static int
432evas_object_line_is_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__)
433{
434 /* this returns 1 if the canvas co-ordinates are inside the object based */
435 /* on object private data. not much use for rects, but for polys, images */
436 /* and other complex objects it might be */
437 return 1;
438}
439
440static int
441evas_object_line_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__)
442{
443 /* this returns 1 if the canvas co-ordinates were inside the object based */
444 /* on object private data. not much use for rects, but for polys, images */
445 /* and other complex objects it might be */
446 return 1;
447}
448
449static void
450evas_object_line_coords_recalc(Evas_Object *obj)
451{
452 Evas_Object_Line *o;
453
454 o = (Evas_Object_Line *)(obj->object_data);
455 o->cur.cache.x1 = obj->cur.geometry.x + o->cur.x1;
456 o->cur.cache.y1 = obj->cur.geometry.y + o->cur.y1;
457 o->cur.cache.x2 = obj->cur.geometry.x + o->cur.x2;
458 o->cur.cache.y2 = obj->cur.geometry.y + o->cur.y2;
459 o->cur.cache.object.w = obj->cur.geometry.w;
460 o->cur.cache.object.h = obj->cur.geometry.h;
461}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4EVAS_MEMPOOL(_mp_obj);
5EVAS_MEMPOOL(_mp_sh);
6
7static Eina_Inlist *
8get_layer_objects(Evas_Layer *l)
9{
10 if ((!l) || (!l->objects)) return NULL;
11 return (EINA_INLIST_GET(l->objects));
12}
13
14/* evas internal stuff */
15Evas_Object *
16evas_object_new(Evas *e __UNUSED__)
17{
18 Evas_Object *obj;
19
20 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object", Evas_Object, 512, NULL);
21 obj = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object);
22 if (!obj) return NULL;
23 EVAS_MEMPOOL_PREP(_mp_obj, obj, Evas_Object);
24
25 obj->magic = MAGIC_OBJ;
26 obj->cur.scale = 1.0;
27 obj->prev.scale = 1.0;
28 obj->is_frame = EINA_FALSE;
29
30 return obj;
31}
32
33void
34evas_object_free(Evas_Object *obj, int clean_layer)
35{
36 int was_smart_child = 0;
37
38#if 0 // filtering disabled
39 evas_filter_free(obj);
40#endif
41 if (!strcmp(obj->type, "image")) evas_object_image_video_surface_set(obj, NULL);
42 evas_object_map_set(obj, NULL);
43 evas_object_grabs_cleanup(obj);
44 evas_object_intercept_cleanup(obj);
45 if (obj->smart.parent) was_smart_child = 1;
46 evas_object_smart_cleanup(obj);
47 obj->func->free(obj);
48 if (!was_smart_child) evas_object_release(obj, clean_layer);
49 if (obj->clip.clipees)
50 eina_list_free(obj->clip.clipees);
51 evas_object_clip_changes_clean(obj);
52 evas_object_event_callback_all_del(obj);
53 evas_object_event_callback_cleanup(obj);
54 while (obj->data.elements)
55 {
56 Evas_Data_Node *node;
57
58 node = obj->data.elements->data;
59 obj->data.elements = eina_list_remove(obj->data.elements, node);
60 free(node);
61 }
62 obj->magic = 0;
63 if (obj->size_hints)
64 {
65 EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints);
66 }
67 EVAS_MEMPOOL_FREE(_mp_obj, obj);
68}
69
70void
71evas_object_change(Evas_Object *obj)
72{
73 Eina_List *l;
74 Evas_Object *obj2;
75 Eina_Bool movch = 0;
76
77 if (obj->layer->evas->nochange)
78 {
79// printf("nochange %p\n", obj);
80 return;
81 }
82// else
83// printf("ch %p\n", obj);
84 obj->layer->evas->changed = 1;
85 if (obj->changed_move)
86 {
87 movch = 1;
88 obj->changed_move = 0;
89 if (!obj->changed_nomove) obj->changed_move_only = 1;
90 if (obj->changed) return;
91 }
92 else
93 {
94 obj->changed_move_only = 0;
95 obj->changed_nomove = 1;
96 if (obj->changed) return;
97 }
98// obj->changed = 1;
99 evas_render_object_recalc(obj);
100 /* set changed flag on all objects this one clips too */
101 if (!((movch) && (obj->is_static_clip)))
102 {
103 EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
104 evas_object_change(obj2);
105 }
106 EINA_LIST_FOREACH(obj->proxy.proxies, l, obj2)
107 {
108 evas_object_change(obj2);
109 }
110 if (obj->smart.parent) evas_object_change(obj->smart.parent);
111}
112
113void
114evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v)
115{
116 if (obj->smart.smart) return;
117 if (is_v == was_v) return;
118 if (is_v)
119 {
120 evas_add_rect(rects,
121 obj->cur.cache.clip.x,
122 obj->cur.cache.clip.y,
123 obj->cur.cache.clip.w,
124 obj->cur.cache.clip.h);
125 }
126 else
127 {
128 evas_add_rect(rects,
129 obj->prev.cache.clip.x,
130 obj->prev.cache.clip.y,
131 obj->prev.cache.clip.w,
132 obj->prev.cache.clip.h);
133 }
134}
135
136void
137evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj)
138{
139 if (obj->smart.smart) return;
140 if (obj->cur.clipper == obj->prev.clipper) return;
141 if ((obj->cur.clipper) && (obj->prev.clipper))
142 {
143 /* get difference rects between clippers */
144 evas_rects_return_difference_rects(rects,
145 obj->cur.clipper->cur.cache.clip.x,
146 obj->cur.clipper->cur.cache.clip.y,
147 obj->cur.clipper->cur.cache.clip.w,
148 obj->cur.clipper->cur.cache.clip.h,
149 obj->prev.clipper->prev.cache.clip.x,
150 obj->prev.clipper->prev.cache.clip.y,
151 obj->prev.clipper->prev.cache.clip.w,
152 obj->prev.clipper->prev.cache.clip.h);
153 }
154 else if (obj->cur.clipper)
155 {
156 evas_rects_return_difference_rects(rects,
157 obj->cur.geometry.x,
158 obj->cur.geometry.y,
159 obj->cur.geometry.w,
160 obj->cur.geometry.h,
161//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
162//// obj->cur.cache.geometry.y,
163//// obj->cur.cache.geometry.w,
164//// obj->cur.cache.geometry.h,
165 obj->cur.clipper->cur.cache.clip.x,
166 obj->cur.clipper->cur.cache.clip.y,
167 obj->cur.clipper->cur.cache.clip.w,
168 obj->cur.clipper->cur.cache.clip.h);
169 }
170 else if (obj->prev.clipper)
171 {
172 evas_rects_return_difference_rects(rects,
173 obj->prev.geometry.x,
174 obj->prev.geometry.y,
175 obj->prev.geometry.w,
176 obj->prev.geometry.h,
177//// rl = evas_rects_return_difference_rects(obj->prev.cache.geometry.x,
178//// obj->prev.cache.geometry.y,
179//// obj->prev.cache.geometry.w,
180//// obj->prev.cache.geometry.h,
181 obj->prev.clipper->prev.cache.clip.x,
182 obj->prev.clipper->prev.cache.clip.y,
183 obj->prev.clipper->prev.cache.clip.w,
184 obj->prev.clipper->prev.cache.clip.h);
185 }
186}
187
188void
189evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj)
190{
191 evas_add_rect(rects,
192 obj->cur.cache.clip.x,
193 obj->cur.cache.clip.y,
194 obj->cur.cache.clip.w,
195 obj->cur.cache.clip.h);
196 evas_add_rect(rects,
197 obj->prev.cache.clip.x,
198 obj->prev.cache.clip.y,
199 obj->prev.cache.clip.w,
200 obj->prev.cache.clip.h);
201/*
202 evas_add_rect(rects,
203 obj->cur.geometry.x,
204 obj->cur.geometry.y,
205 obj->cur.geometry.w,
206 obj->cur.geometry.h);
207//// obj->cur.cache.geometry.x,
208//// obj->cur.cache.geometry.y,
209//// obj->cur.cache.geometry.w,
210//// obj->cur.cache.geometry.h);
211 evas_add_rect(rects,
212 obj->prev.geometry.x,
213 obj->prev.geometry.y,
214 obj->prev.geometry.w,
215 obj->prev.geometry.h);
216//// obj->prev.cache.geometry.x,
217//// obj->prev.cache.geometry.y,
218//// obj->prev.cache.geometry.w,
219//// obj->prev.cache.geometry.h);
220*/
221}
222
223void
224evas_object_clip_changes_clean(Evas_Object *obj)
225{
226 Eina_Rectangle *r;
227
228 EINA_LIST_FREE(obj->clip.changes, r)
229 eina_rectangle_free(r);
230}
231
232void
233evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v __UNUSED__)
234{
235 Eina_Rectangle *r;
236 Evas_Object *clipper;
237 Eina_List *l;
238 unsigned int i;
239 Eina_Array_Iterator it;
240 int x, y, w, h;
241
242 if (obj->smart.smart) goto end;
243 /* FIXME: was_v isn't used... why? */
244 if (!obj->clip.clipees)
245 {
246 EINA_ARRAY_ITER_NEXT(rects, i, r, it)
247 {
248 /* get updates and clip to current clip */
249 x = r->x;
250 y = r->y;
251 w = r->w;
252 h = r->h;
253 RECTS_CLIP_TO_RECT(x, y, w, h,
254 obj->cur.cache.clip.x,
255 obj->cur.cache.clip.y,
256 obj->cur.cache.clip.w,
257 obj->cur.cache.clip.h);
258 if ((w > 0) && (h > 0))
259 obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
260 x, y, w, h);
261 /* get updates and clip to previous clip */
262 x = r->x;
263 y = r->y;
264 w = r->w;
265 h = r->h;
266 RECTS_CLIP_TO_RECT(x, y, w, h,
267 obj->prev.cache.clip.x,
268 obj->prev.cache.clip.y,
269 obj->prev.cache.clip.w,
270 obj->prev.cache.clip.h);
271 if ((w > 0) && (h > 0))
272 obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
273 x, y, w, h);
274 }
275 /* if the object is actually visible, take any parent clip changes */
276 if (is_v)
277 {
278 clipper = obj->cur.clipper;
279 while (clipper)
280 {
281 EINA_LIST_FOREACH(clipper->clip.changes, l, r)
282 {
283 /* get updates and clip to current clip */
284 x = r->x; y = r->y; w = r->w; h = r->h;
285 RECTS_CLIP_TO_RECT(x, y, w, h,
286 obj->cur.cache.clip.x,
287 obj->cur.cache.clip.y,
288 obj->cur.cache.clip.w,
289 obj->cur.cache.clip.h);
290 if ((w > 0) && (h > 0))
291 obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
292 x, y, w, h);
293 /* get updates and clip to previous clip */
294 x = r->x; y = r->y; w = r->w; h = r->h;
295 RECTS_CLIP_TO_RECT(x, y, w, h,
296 obj->prev.cache.clip.x,
297 obj->prev.cache.clip.y,
298 obj->prev.cache.clip.w,
299 obj->prev.cache.clip.h);
300 if ((w > 0) && (h > 0))
301 obj->layer->evas->engine.func->output_redraws_rect_add(obj->layer->evas->engine.data.output,
302 x, y, w, h);
303 }
304 clipper = clipper->cur.clipper;
305 }
306 }
307 }
308 else
309 {
310 evas_object_clip_changes_clean(obj);
311 EINA_ARRAY_ITER_NEXT(rects, i, r, it)
312 obj->clip.changes = eina_list_append(obj->clip.changes, r);
313 eina_array_clean(rects);
314 }
315
316 end:
317 EINA_ARRAY_ITER_NEXT(rects, i, r, it)
318 eina_rectangle_free(r);
319 eina_array_clean(rects);
320}
321
322int
323evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h)
324{
325 if (obj->smart.smart) return 0;
326 /* assumes coords have been recalced */
327 if ((RECTS_INTERSECT(x, y, w, h,
328 obj->prev.cache.clip.x,
329 obj->prev.cache.clip.y,
330 obj->prev.cache.clip.w,
331 obj->prev.cache.clip.h)))
332 return 1;
333 return 0;
334}
335
336int
337evas_object_was_opaque(Evas_Object *obj)
338{
339 if (obj->smart.smart) return 0;
340 if (obj->prev.cache.clip.a == 255)
341 {
342 if (obj->func->was_opaque)
343 return obj->func->was_opaque(obj);
344 return 1;
345 }
346 return 0;
347}
348
349int
350evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
351{
352 if (obj->smart.smart) return 0;
353 if (obj->func->is_inside)
354 return obj->func->is_inside(obj, x, y);
355 return 0;
356}
357
358int
359evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
360{
361 if (obj->smart.smart) return 0;
362 if (obj->func->was_inside)
363 return obj->func->was_inside(obj, x, y);
364 return 0;
365}
366/* routines apps will call */
367
368EAPI void
369evas_object_ref(Evas_Object *obj)
370{
371 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
372 return;
373 MAGIC_CHECK_END();
374 obj->ref++;
375 if (obj->ref == 0) obj->ref--;
376}
377
378EAPI void
379evas_object_unref(Evas_Object *obj)
380{
381 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
382 return;
383 MAGIC_CHECK_END();
384 if (obj->ref == 0) return;
385 obj->ref--;
386 if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(obj);
387}
388
389EAPI void
390evas_object_del(Evas_Object *obj)
391{
392 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
393 return;
394 MAGIC_CHECK_END();
395
396 if (obj->delete_me) return;
397
398 if (obj->ref > 0)
399 {
400 obj->del_ref = 1;
401 return;
402 }
403#ifdef EVAS_FRAME_QUEUING
404 evas_common_frameq_flush();
405#endif
406
407 evas_object_hide(obj);
408 if (obj->focused)
409 {
410 obj->focused = 0;
411 obj->layer->evas->focused = NULL;
412 _evas_object_event_new();
413 evas_object_event_callback_call(obj, EVAS_CALLBACK_FOCUS_OUT, NULL, _evas_event_counter);
414 _evas_post_event_callback_call(obj->layer->evas);
415 }
416 _evas_object_event_new();
417 evas_object_event_callback_call(obj, EVAS_CALLBACK_DEL, NULL, _evas_event_counter);
418 _evas_post_event_callback_call(obj->layer->evas);
419 if (obj->mouse_grabbed > 0)
420 obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
421 if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
422 obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
423 obj->mouse_grabbed = 0;
424 obj->mouse_in = 0;
425 if (obj->name) evas_object_name_set(obj, NULL);
426 if (!obj->layer)
427 {
428 evas_object_free(obj, 1);
429 return;
430 }
431 evas_object_grabs_cleanup(obj);
432 while (obj->clip.clipees)
433 evas_object_clip_unset(obj->clip.clipees->data);
434 while (obj->proxy.proxies)
435 evas_object_image_source_unset(obj->proxy.proxies->data);
436 if (obj->cur.clipper) evas_object_clip_unset(obj);
437 if (obj->smart.smart) evas_object_smart_del(obj);
438 evas_object_map_set(obj, NULL);
439 _evas_object_event_new();
440 evas_object_event_callback_call(obj, EVAS_CALLBACK_FREE, NULL, _evas_event_counter);
441 _evas_post_event_callback_call(obj->layer->evas);
442 evas_object_smart_cleanup(obj);
443 obj->delete_me = 1;
444 evas_object_change(obj);
445}
446
447EAPI void
448evas_object_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
449{
450 int is, was = 0, pass = 0, freeze = 0;
451 int nx = 0, ny = 0;
452
453 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
454 return;
455 MAGIC_CHECK_END();
456 if (obj->delete_me) return;
457
458 nx = x;
459 ny = y;
460
461 if (!obj->is_frame)
462 {
463 int fx, fy;
464
465 evas_output_framespace_get(obj->layer->evas, &fx, &fy, NULL, NULL);
466 if (!obj->smart.parent)
467 {
468 nx += fx;
469 ny += fy;
470 }
471 }
472
473 if (evas_object_intercept_call_move(obj, nx, ny)) return;
474
475 if (obj->doing.in_move > 0)
476 {
477 WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj);
478 return;
479 }
480
481 if ((obj->cur.geometry.x == nx) && (obj->cur.geometry.y == ny)) return;
482
483 if (obj->layer->evas->events_frozen <= 0)
484 {
485 pass = evas_event_passes_through(obj);
486 freeze = evas_event_freezes_through(obj);
487 if ((!pass) && (!freeze))
488 was = evas_object_is_in_output_rect(obj,
489 obj->layer->evas->pointer.x,
490 obj->layer->evas->pointer.y, 1, 1);
491 }
492 obj->doing.in_move++;
493
494 if (obj->smart.smart)
495 {
496 if (obj->smart.smart->smart_class->move)
497 obj->smart.smart->smart_class->move(obj, nx, ny);
498 }
499
500 obj->cur.geometry.x = nx;
501 obj->cur.geometry.y = ny;
502
503//// obj->cur.cache.geometry.validity = 0;
504 obj->changed_move = 1;
505 evas_object_change(obj);
506 evas_object_clip_dirty(obj);
507 obj->doing.in_move--;
508 if (obj->layer->evas->events_frozen <= 0)
509 {
510 evas_object_recalc_clippees(obj);
511 if (!pass)
512 {
513 if (!obj->smart.smart)
514 {
515 is = evas_object_is_in_output_rect(obj,
516 obj->layer->evas->pointer.x,
517 obj->layer->evas->pointer.y, 1, 1);
518 if ((is ^ was) && obj->cur.visible)
519 evas_event_feed_mouse_move(obj->layer->evas,
520 obj->layer->evas->pointer.x,
521 obj->layer->evas->pointer.y,
522 obj->layer->evas->last_timestamp,
523 NULL);
524 }
525 }
526 }
527 evas_object_inform_call_move(obj);
528}
529
530EAPI void
531evas_object_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
532{
533 int is, was = 0, pass = 0, freeze =0;
534 int nw = 0, nh = 0;
535
536 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
537 return;
538 MAGIC_CHECK_END();
539 if (obj->delete_me) return;
540 if (w < 0) w = 0; if (h < 0) h = 0;
541
542 nw = w;
543 nh = h;
544 if (!obj->is_frame)
545 {
546 int fw, fh;
547
548 evas_output_framespace_get(obj->layer->evas, NULL, NULL, &fw, &fh);
549 if (!obj->smart.parent)
550 {
551 nw = w - fw;
552 nh = h - fh;
553 if (nw < 0) nw = 0;
554 if (nh < 0) nh = 0;
555 }
556 }
557
558 if (evas_object_intercept_call_resize(obj, nw, nh)) return;
559
560 if (obj->doing.in_resize > 0)
561 {
562 WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj);
563 return;
564 }
565
566 if ((obj->cur.geometry.w == nw) && (obj->cur.geometry.h == nh)) return;
567
568 if (obj->layer->evas->events_frozen <= 0)
569 {
570 pass = evas_event_passes_through(obj);
571 freeze = evas_event_freezes_through(obj);
572 if ((!pass) && (!freeze))
573 was = evas_object_is_in_output_rect(obj,
574 obj->layer->evas->pointer.x,
575 obj->layer->evas->pointer.y, 1, 1);
576 }
577 obj->doing.in_resize++;
578
579 if (obj->smart.smart)
580 {
581 if (obj->smart.smart->smart_class->resize)
582 obj->smart.smart->smart_class->resize(obj, nw, nh);
583 }
584
585 obj->cur.geometry.w = nw;
586 obj->cur.geometry.h = nh;
587
588//// obj->cur.cache.geometry.validity = 0;
589 evas_object_change(obj);
590 evas_object_clip_dirty(obj);
591 obj->doing.in_resize--;
592 /* NB: evas_object_recalc_clippees was here previously ( < 08/07/2009) */
593 if (obj->layer->evas->events_frozen <= 0)
594 {
595 /* NB: If this creates glitches on screen then move to above position */
596 evas_object_recalc_clippees(obj);
597
598 // if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
599 if (!pass)
600 {
601 if (!obj->smart.smart)
602 {
603 is = evas_object_is_in_output_rect(obj,
604 obj->layer->evas->pointer.x,
605 obj->layer->evas->pointer.y, 1, 1);
606 if ((is ^ was) && (obj->cur.visible))
607 evas_event_feed_mouse_move(obj->layer->evas,
608 obj->layer->evas->pointer.x,
609 obj->layer->evas->pointer.y,
610 obj->layer->evas->last_timestamp,
611 NULL);
612 }
613 }
614 }
615 evas_object_inform_call_resize(obj);
616}
617
618EAPI void
619evas_object_geometry_get(const Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
620{
621 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
622 if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
623 return;
624 MAGIC_CHECK_END();
625 if (obj->delete_me)
626 {
627 if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
628 return;
629 }
630
631 if (x) *x = obj->cur.geometry.x;
632 if (y) *y = obj->cur.geometry.y;
633 if (w) *w = obj->cur.geometry.w;
634 if (h) *h = obj->cur.geometry.h;
635}
636
637static void
638_evas_object_size_hint_alloc(Evas_Object *obj)
639{
640 if (obj->size_hints) return;
641
642 EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 512, );
643 obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints);
644 if (!obj->size_hints) return;
645 EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints);
646 obj->size_hints->max.w = -1;
647 obj->size_hints->max.h = -1;
648 obj->size_hints->align.x = 0.5;
649 obj->size_hints->align.y = 0.5;
650}
651
652EAPI void
653evas_object_size_hint_min_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
654{
655 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
656 if (w) *w = 0; if (h) *h = 0;
657 return;
658 MAGIC_CHECK_END();
659 if ((!obj->size_hints) || obj->delete_me)
660 {
661 if (w) *w = 0; if (h) *h = 0;
662 return;
663 }
664 if (w) *w = obj->size_hints->min.w;
665 if (h) *h = obj->size_hints->min.h;
666}
667
668EAPI void
669evas_object_size_hint_min_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
670{
671 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
672 return;
673 MAGIC_CHECK_END();
674 if (obj->delete_me)
675 return;
676 _evas_object_size_hint_alloc(obj);
677 if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return;
678 obj->size_hints->min.w = w;
679 obj->size_hints->min.h = h;
680
681 evas_object_inform_call_changed_size_hints(obj);
682}
683
684EAPI void
685evas_object_size_hint_max_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
686{
687 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
688 if (w) *w = -1; if (h) *h = -1;
689 return;
690 MAGIC_CHECK_END();
691 if ((!obj->size_hints) || obj->delete_me)
692 {
693 if (w) *w = -1; if (h) *h = -1;
694 return;
695 }
696 if (w) *w = obj->size_hints->max.w;
697 if (h) *h = obj->size_hints->max.h;
698}
699
700EAPI void
701evas_object_size_hint_max_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
702{
703 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
704 return;
705 MAGIC_CHECK_END();
706 if (obj->delete_me)
707 return;
708 _evas_object_size_hint_alloc(obj);
709 if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return;
710 obj->size_hints->max.w = w;
711 obj->size_hints->max.h = h;
712
713 evas_object_inform_call_changed_size_hints(obj);
714}
715
716EAPI void
717evas_object_size_hint_request_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
718{
719 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
720 if (w) *w = 0; if (h) *h = 0;
721 return;
722 MAGIC_CHECK_END();
723 if ((!obj->size_hints) || obj->delete_me)
724 {
725 if (w) *w = 0; if (h) *h = 0;
726 return;
727 }
728 if (w) *w = obj->size_hints->request.w;
729 if (h) *h = obj->size_hints->request.h;
730}
731
732EAPI void
733evas_object_size_hint_request_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
734{
735 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
736 return;
737 MAGIC_CHECK_END();
738 if (obj->delete_me)
739 return;
740 _evas_object_size_hint_alloc(obj);
741 if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return;
742 obj->size_hints->request.w = w;
743 obj->size_hints->request.h = h;
744
745 evas_object_inform_call_changed_size_hints(obj);
746}
747
748EAPI void
749evas_object_size_hint_aspect_get(const Evas_Object *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h)
750{
751 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
752 if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
753 if (w) *w = 0; if (h) *h = 0;
754 return;
755 MAGIC_CHECK_END();
756 if ((!obj->size_hints) || obj->delete_me)
757 {
758 if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
759 if (w) *w = 0; if (h) *h = 0;
760 return;
761 }
762 if (aspect) *aspect = obj->size_hints->aspect.mode;
763 if (w) *w = obj->size_hints->aspect.size.w;
764 if (h) *h = obj->size_hints->aspect.size.h;
765}
766
767EAPI void
768evas_object_size_hint_aspect_set(Evas_Object *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
769{
770 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
771 return;
772 MAGIC_CHECK_END();
773 if (obj->delete_me)
774 return;
775 _evas_object_size_hint_alloc(obj);
776 if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return;
777 obj->size_hints->aspect.mode = aspect;
778 obj->size_hints->aspect.size.w = w;
779 obj->size_hints->aspect.size.h = h;
780
781 evas_object_inform_call_changed_size_hints(obj);
782}
783
784EAPI void
785evas_object_size_hint_align_get(const Evas_Object *obj, double *x, double *y)
786{
787 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
788 if (x) *x = 0.5; if (y) *y = 0.5;
789 return;
790 MAGIC_CHECK_END();
791 if ((!obj->size_hints) || obj->delete_me)
792 {
793 if (x) *x = 0.5; if (y) *y = 0.5;
794 return;
795 }
796 if (x) *x = obj->size_hints->align.x;
797 if (y) *y = obj->size_hints->align.y;
798}
799
800EAPI void
801evas_object_size_hint_align_set(Evas_Object *obj, double x, double y)
802{
803 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
804 return;
805 MAGIC_CHECK_END();
806 if (obj->delete_me)
807 return;
808 _evas_object_size_hint_alloc(obj);
809 if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return;
810 obj->size_hints->align.x = x;
811 obj->size_hints->align.y = y;
812
813 evas_object_inform_call_changed_size_hints(obj);
814}
815
816EAPI void
817evas_object_size_hint_weight_get(const Evas_Object *obj, double *x, double *y)
818{
819 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
820 if (x) *x = 0.0; if (y) *y = 0.0;
821 return;
822 MAGIC_CHECK_END();
823 if ((!obj->size_hints) || obj->delete_me)
824 {
825 if (x) *x = 0.0; if (y) *y = 0.0;
826 return;
827 }
828 if (x) *x = obj->size_hints->weight.x;
829 if (y) *y = obj->size_hints->weight.y;
830}
831
832EAPI void
833evas_object_size_hint_weight_set(Evas_Object *obj, double x, double y)
834{
835 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
836 return;
837 MAGIC_CHECK_END();
838 if (obj->delete_me)
839 return;
840 _evas_object_size_hint_alloc(obj);
841 if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return;
842 obj->size_hints->weight.x = x;
843 obj->size_hints->weight.y = y;
844
845 evas_object_inform_call_changed_size_hints(obj);
846}
847
848EAPI void
849evas_object_size_hint_padding_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
850{
851 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
852 if (l) *l = 0; if (r) *r = 0;
853 if (t) *t = 0; if (b) *b = 0;
854 return;
855 MAGIC_CHECK_END();
856 if ((!obj->size_hints) || obj->delete_me)
857 {
858 if (l) *l = 0; if (r) *r = 0;
859 if (t) *t = 0; if (b) *b = 0;
860 return;
861 }
862 if (l) *l = obj->size_hints->padding.l;
863 if (r) *r = obj->size_hints->padding.r;
864 if (t) *t = obj->size_hints->padding.t;
865 if (b) *b = obj->size_hints->padding.b;
866}
867
868EAPI void
869evas_object_size_hint_padding_set(Evas_Object *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b)
870{
871 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
872 return;
873 MAGIC_CHECK_END();
874 if (obj->delete_me)
875 return;
876 _evas_object_size_hint_alloc(obj);
877 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;
878 obj->size_hints->padding.l = l;
879 obj->size_hints->padding.r = r;
880 obj->size_hints->padding.t = t;
881 obj->size_hints->padding.b = b;
882
883 evas_object_inform_call_changed_size_hints(obj);
884}
885
886EAPI void
887evas_object_show(Evas_Object *obj)
888{
889 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
890 return;
891 MAGIC_CHECK_END();
892 if (obj->delete_me) return;
893 if (evas_object_intercept_call_show(obj)) return;
894 if (obj->smart.smart)
895 {
896 if (obj->smart.smart->smart_class->show)
897 obj->smart.smart->smart_class->show(obj);
898 }
899 if (obj->cur.visible)
900 {
901 return;
902 }
903 obj->cur.visible = 1;
904 evas_object_change(obj);
905 evas_object_clip_dirty(obj);
906 if (obj->layer->evas->events_frozen <= 0)
907 {
908 evas_object_clip_across_clippees_check(obj);
909 evas_object_recalc_clippees(obj);
910 if ((!evas_event_passes_through(obj)) &&
911 (!evas_event_freezes_through(obj)))
912 {
913 if (!obj->smart.smart)
914 {
915 if (evas_object_is_in_output_rect(obj,
916 obj->layer->evas->pointer.x,
917 obj->layer->evas->pointer.y, 1, 1))
918 evas_event_feed_mouse_move(obj->layer->evas,
919 obj->layer->evas->pointer.x,
920 obj->layer->evas->pointer.y,
921 obj->layer->evas->last_timestamp,
922 NULL);
923 }
924 }
925 }
926 evas_object_inform_call_show(obj);
927}
928
929EAPI void
930evas_object_hide(Evas_Object *obj)
931{
932 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
933 return;
934 MAGIC_CHECK_END();
935 if (obj->delete_me) return;
936 if (evas_object_intercept_call_hide(obj)) return;
937 if (obj->smart.smart)
938 {
939 if (obj->smart.smart->smart_class->hide)
940 obj->smart.smart->smart_class->hide(obj);
941 }
942 if (!obj->cur.visible)
943 {
944 return;
945 }
946 obj->cur.visible = 0;
947 evas_object_change(obj);
948 evas_object_clip_dirty(obj);
949 if (obj->layer->evas->events_frozen <= 0)
950 {
951 evas_object_clip_across_clippees_check(obj);
952 evas_object_recalc_clippees(obj);
953 if ((!evas_event_passes_through(obj)) &&
954 (!evas_event_freezes_through(obj)))
955 {
956 if ((!obj->smart.smart) ||
957 ((obj->cur.map) && (obj->cur.map->count == 4) && (obj->cur.usemap)))
958 {
959 if (!obj->mouse_grabbed)
960 {
961 if (evas_object_is_in_output_rect(obj,
962 obj->layer->evas->pointer.x,
963 obj->layer->evas->pointer.y, 1, 1))
964 evas_event_feed_mouse_move(obj->layer->evas,
965 obj->layer->evas->pointer.x,
966 obj->layer->evas->pointer.y,
967 obj->layer->evas->last_timestamp,
968 NULL);
969 }
970/* this is at odds to handling events when an obj is moved out of the mouse
971 * ore resized out or clipped out. if mouse is grabbed - regardless of
972 * visibility, mouse move events should keep happening and mouse up.
973 * for better or worse it's at least consistent.
974 if (obj->delete_me) return;
975 if (obj->mouse_grabbed > 0)
976 obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
977 if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
978 obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
979 obj->mouse_grabbed = 0;
980 if (obj->layer->evas->events_frozen > 0)
981 {
982 obj->mouse_in = 0;
983 return;
984 }
985 if (obj->mouse_in)
986 {
987 Evas_Event_Mouse_Out ev;
988
989 _evas_object_event_new();
990
991 obj->mouse_in = 0;
992 ev.buttons = obj->layer->evas->pointer.button;
993 ev.output.x = obj->layer->evas->pointer.x;
994 ev.output.y = obj->layer->evas->pointer.y;
995 ev.canvas.x = obj->layer->evas->pointer.x;
996 ev.canvas.y = obj->layer->evas->pointer.y;
997 ev.data = NULL;
998 ev.modifiers = &(obj->layer->evas->modifiers);
999 ev.locks = &(obj->layer->evas->locks);
1000 ev.timestamp = obj->layer->evas->last_timestamp;
1001 ev.event_flags = EVAS_EVENT_FLAG_NONE;
1002 evas_object_event_callback_call(obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
1003 _evas_post_event_callback_call(obj->layer->evas);
1004 }
1005 */
1006 }
1007 }
1008 }
1009 else
1010 {
1011/*
1012 if (obj->mouse_grabbed > 0)
1013 obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
1014 if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
1015 obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, obj);
1016 obj->mouse_grabbed = 0;
1017 obj->mouse_in = 0;
1018 */
1019 }
1020 evas_object_inform_call_hide(obj);
1021}
1022
1023EAPI Eina_Bool
1024evas_object_visible_get(const Evas_Object *obj)
1025{
1026 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1027 return 0;
1028 MAGIC_CHECK_END();
1029 if (obj->delete_me) return 0;
1030 return obj->cur.visible;
1031}
1032
1033EAPI void
1034evas_object_color_set(Evas_Object *obj, int r, int g, int b, int a)
1035{
1036 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1037 return;
1038 MAGIC_CHECK_END();
1039 if (obj->delete_me) return;
1040 if (r > 255) r = 255; if (r < 0) r = 0;
1041 if (g > 255) g = 255; if (g < 0) g = 0;
1042 if (b > 255) b = 255; if (b < 0) b = 0;
1043 if (a > 255) a = 255; if (a < 0) a = 0;
1044 if (r > a)
1045 {
1046 r = a;
1047 ERR("Evas only handle pre multiplied color !");
1048 }
1049 if (g > a)
1050 {
1051 g = a;
1052 ERR("Evas only handle pre multiplied color !");
1053 }
1054 if (b > a)
1055 {
1056 b = a;
1057 ERR("Evas only handle pre multiplied color !");
1058 }
1059
1060 if (evas_object_intercept_call_color_set(obj, r, g, b, a)) return;
1061 if (obj->smart.smart)
1062 {
1063 if (obj->smart.smart->smart_class->color_set)
1064 obj->smart.smart->smart_class->color_set(obj, r, g, b, a);
1065 }
1066 if ((obj->cur.color.r == r) &&
1067 (obj->cur.color.g == g) &&
1068 (obj->cur.color.b == b) &&
1069 (obj->cur.color.a == a)) return;
1070 obj->cur.color.r = r;
1071 obj->cur.color.g = g;
1072 obj->cur.color.b = b;
1073 evas_object_clip_dirty(obj);
1074 if ((obj->cur.color.a == 0) && (a == 0) && (obj->cur.render_op == EVAS_RENDER_BLEND)) return;
1075 obj->cur.color.a = a;
1076 evas_object_change(obj);
1077}
1078
1079EAPI void
1080evas_object_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
1081{
1082 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1083 if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
1084 return;
1085 MAGIC_CHECK_END();
1086 if (obj->delete_me)
1087 {
1088 if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
1089 return;
1090 }
1091 if (r) *r = obj->cur.color.r;
1092 if (g) *g = obj->cur.color.g;
1093 if (b) *b = obj->cur.color.b;
1094 if (a) *a = obj->cur.color.a;
1095}
1096
1097EAPI void
1098evas_object_anti_alias_set(Evas_Object *obj, Eina_Bool anti_alias)
1099{
1100 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1101 return;
1102 MAGIC_CHECK_END();
1103 if (obj->delete_me) return;
1104 anti_alias = !!anti_alias;
1105 if (obj->cur.anti_alias == anti_alias)return;
1106 obj->cur.anti_alias = anti_alias;
1107 evas_object_change(obj);
1108}
1109
1110EAPI Eina_Bool
1111evas_object_anti_alias_get(const Evas_Object *obj)
1112{
1113 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1114 return 0;
1115 MAGIC_CHECK_END();
1116 if (obj->delete_me) return 0;
1117 return obj->cur.anti_alias;
1118}
1119
1120EAPI void
1121evas_object_scale_set(Evas_Object *obj, double scale)
1122{
1123 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1124 return;
1125 MAGIC_CHECK_END();
1126 if (obj->delete_me) return;
1127 if (obj->cur.scale == scale) return;
1128 obj->cur.scale = scale;
1129 evas_object_change(obj);
1130 if (obj->func->scale_update) obj->func->scale_update(obj);
1131}
1132
1133EAPI double
1134evas_object_scale_get(const Evas_Object *obj)
1135{
1136 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1137 return 0;
1138 MAGIC_CHECK_END();
1139 if (obj->delete_me) return 1.0;
1140 return obj->cur.scale;
1141}
1142
1143EAPI void
1144evas_object_render_op_set(Evas_Object *obj, Evas_Render_Op render_op)
1145{
1146 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1147 return;
1148 MAGIC_CHECK_END();
1149 if (obj->delete_me) return;
1150 if (obj->cur.render_op == render_op) return;
1151 obj->cur.render_op = render_op;
1152 evas_object_change(obj);
1153}
1154
1155EAPI Evas_Render_Op
1156evas_object_render_op_get(const Evas_Object *obj)
1157{
1158 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1159 return 0;
1160 MAGIC_CHECK_END();
1161 if (obj->delete_me) return EVAS_RENDER_BLEND;
1162 return obj->cur.render_op;
1163}
1164
1165EAPI Evas *
1166evas_object_evas_get(const Evas_Object *obj)
1167{
1168 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1169 return NULL;
1170 MAGIC_CHECK_END();
1171 if (obj->delete_me) return NULL;
1172 return obj->layer->evas;
1173}
1174
1175EAPI Evas_Object *
1176evas_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)
1177{
1178 Evas_Layer *lay;
1179 int xx, yy;
1180
1181 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1182 return NULL;
1183 MAGIC_CHECK_END();
1184 xx = x;
1185 yy = y;
1186//// xx = evas_coord_world_x_to_screen(e, x);
1187//// yy = evas_coord_world_y_to_screen(e, y);
1188 EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1189 {
1190 Evas_Object *obj;
1191
1192 EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1193 {
1194 if (obj->delete_me) continue;
1195 if ((!include_pass_events_objects) &&
1196 (evas_event_passes_through(obj))) continue;
1197 if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1198 evas_object_clip_recalc(obj);
1199 if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
1200 (!obj->clip.clipees))
1201 return obj;
1202 }
1203 }
1204 return NULL;
1205}
1206
1207EAPI Evas_Object *
1208evas_object_top_at_pointer_get(const Evas *e)
1209{
1210 return evas_object_top_at_xy_get(e, e->pointer.x, e->pointer.y, EINA_TRUE,
1211 EINA_TRUE);
1212}
1213
1214EAPI Evas_Object *
1215evas_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)
1216{
1217 Evas_Layer *lay;
1218 int xx, yy, ww, hh;
1219
1220 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1221 return NULL;
1222 MAGIC_CHECK_END();
1223 xx = x;
1224 yy = y;
1225 ww = w;
1226 hh = h;
1227//// xx = evas_coord_world_x_to_screen(e, x);
1228//// yy = evas_coord_world_y_to_screen(e, y);
1229//// ww = evas_coord_world_x_to_screen(e, w);
1230//// hh = evas_coord_world_y_to_screen(e, h);
1231 if (ww < 1) ww = 1;
1232 if (hh < 1) hh = 1;
1233 EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1234 {
1235 Evas_Object *obj;
1236
1237 EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1238 {
1239 if (obj->delete_me) continue;
1240 if ((!include_pass_events_objects) &&
1241 (evas_event_passes_through(obj))) continue;
1242 if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1243 evas_object_clip_recalc(obj);
1244 if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
1245 (!obj->clip.clipees))
1246 return obj;
1247 }
1248 }
1249 return NULL;
1250}
1251
1252EAPI Eina_List *
1253evas_objects_at_xy_get(const Evas *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
1254{
1255 Eina_List *in = NULL;
1256 Evas_Layer *lay;
1257 int xx, yy;
1258
1259 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1260 return NULL;
1261 MAGIC_CHECK_END();
1262 xx = x;
1263 yy = y;
1264//// xx = evas_coord_world_x_to_screen(e, x);
1265//// yy = evas_coord_world_y_to_screen(e, y);
1266 EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1267 {
1268 Evas_Object *obj;
1269
1270 EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1271 {
1272 if (obj->delete_me) continue;
1273 if ((!include_pass_events_objects) &&
1274 (evas_event_passes_through(obj))) continue;
1275 if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1276 evas_object_clip_recalc(obj);
1277 if ((evas_object_is_in_output_rect(obj, xx, yy, 1, 1)) &&
1278 (!obj->clip.clipees))
1279 in = eina_list_prepend(in, obj);
1280 }
1281 }
1282 return in;
1283}
1284
1285/**
1286 * Retrieves the objects in the given rectangle region
1287 * @param e The given evas object.
1288 * @param x The horizontal coordinate.
1289 * @param y The vertical coordinate.
1290 * @param w The width size.
1291 * @param h The height size.
1292 * @param include_pass_events_objects Boolean Flag to include or not pass events objects
1293 * @param include_hidden_objects Boolean Flag to include or not hidden objects
1294 * @return The list of evas object in the rectangle region.
1295 *
1296 */
1297EAPI Eina_List *
1298evas_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)
1299{
1300 Eina_List *in = NULL;
1301 Evas_Layer *lay;
1302 int xx, yy, ww, hh;
1303
1304 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1305 return NULL;
1306 MAGIC_CHECK_END();
1307 xx = x;
1308 yy = y;
1309 ww = w;
1310 hh = h;
1311//// xx = evas_coord_world_x_to_screen(e, x);
1312//// yy = evas_coord_world_y_to_screen(e, y);
1313//// ww = evas_coord_world_x_to_screen(e, w);
1314//// hh = evas_coord_world_y_to_screen(e, h);
1315 if (ww < 1) ww = 1;
1316 if (hh < 1) hh = 1;
1317 EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
1318 {
1319 Evas_Object *obj;
1320
1321 EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
1322 {
1323 if (obj->delete_me) continue;
1324 if ((!include_pass_events_objects) &&
1325 (evas_event_passes_through(obj))) continue;
1326 if ((!include_hidden_objects) && (!obj->cur.visible)) continue;
1327 evas_object_clip_recalc(obj);
1328 if ((evas_object_is_in_output_rect(obj, xx, yy, ww, hh)) &&
1329 (!obj->clip.clipees))
1330 in = eina_list_prepend(in, obj);
1331 }
1332 }
1333 return in;
1334}
1335
1336EAPI const char *
1337evas_object_type_get(const Evas_Object *obj)
1338{
1339 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1340 return NULL;
1341 MAGIC_CHECK_END();
1342 if (obj->delete_me) return "";
1343 return obj->type;
1344}
1345
1346EAPI void
1347evas_object_precise_is_inside_set(Evas_Object *obj, Eina_Bool precise)
1348{
1349 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1350 return;
1351 MAGIC_CHECK_END();
1352 obj->precise_is_inside = precise;
1353}
1354
1355EAPI Eina_Bool
1356evas_object_precise_is_inside_get(const Evas_Object *obj)
1357{
1358 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1359 return 0;
1360 MAGIC_CHECK_END();
1361 return obj->precise_is_inside;
1362}
1363
1364EAPI void
1365evas_object_static_clip_set(Evas_Object *obj, Eina_Bool is_static_clip)
1366{
1367 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1368 return;
1369 MAGIC_CHECK_END();
1370 obj->is_static_clip = is_static_clip;
1371}
1372
1373EAPI Eina_Bool
1374evas_object_static_clip_get(const Evas_Object *obj)
1375{
1376 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1377 return 0;
1378 MAGIC_CHECK_END();
1379 return obj->is_static_clip;
1380}
1381
1382EAPI void
1383evas_object_is_frame_object_set(Evas_Object *obj, Eina_Bool is_frame)
1384{
1385 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1386 return;
1387 MAGIC_CHECK_END();
1388 obj->is_frame = is_frame;
1389}
1390
1391EAPI Eina_Bool
1392evas_object_is_frame_object_get(Evas_Object *obj)
1393{
1394 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1395 return EINA_FALSE;
1396 MAGIC_CHECK_END();
1397 return obj->is_frame;
1398}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* private magic number for polygon objects */
5static const char o_type[] = "polygon";
6
7/* private struct for line object internal data */
8typedef struct _Evas_Object_Polygon Evas_Object_Polygon;
9typedef struct _Evas_Polygon_Point Evas_Polygon_Point;
10
11struct _Evas_Object_Polygon
12{
13 DATA32 magic;
14 Eina_List *points;
15 void *engine_data;
16 struct {
17 int x, y;
18 } offset;
19 Evas_Coord_Rectangle geometry;
20 char changed : 1;
21};
22
23struct _Evas_Polygon_Point
24{
25 Evas_Coord x, y;
26};
27
28/* private methods for polygon objects */
29static void evas_object_polygon_init(Evas_Object *obj);
30static void *evas_object_polygon_new(void);
31static void evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
32static void evas_object_polygon_free(Evas_Object *obj);
33static void evas_object_polygon_render_pre(Evas_Object *obj);
34static void evas_object_polygon_render_post(Evas_Object *obj);
35
36static unsigned int evas_object_polygon_id_get(Evas_Object *obj);
37static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj);
38static void *evas_object_polygon_engine_data_get(Evas_Object *obj);
39
40static int evas_object_polygon_is_opaque(Evas_Object *obj);
41static int evas_object_polygon_was_opaque(Evas_Object *obj);
42static int evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
43static int evas_object_polygon_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
44
45static const Evas_Object_Func object_func =
46{
47 /* methods (compulsory) */
48 evas_object_polygon_free,
49 evas_object_polygon_render,
50 evas_object_polygon_render_pre,
51 evas_object_polygon_render_post,
52 evas_object_polygon_id_get,
53 evas_object_polygon_visual_id_get,
54 evas_object_polygon_engine_data_get,
55 /* these are optional. NULL = nothing */
56 NULL,
57 NULL,
58 NULL,
59 NULL,
60 evas_object_polygon_is_opaque,
61 evas_object_polygon_was_opaque,
62 evas_object_polygon_is_inside,
63 evas_object_polygon_was_inside,
64 NULL,
65 NULL,
66 NULL,
67 NULL,
68 NULL
69};
70
71/* the actual api call to add a rect */
72/* it has no other api calls as all properties are standard */
73
74EVAS_MEMPOOL(_mp_obj);
75
76EAPI Evas_Object *
77evas_object_polygon_add(Evas *e)
78{
79 Evas_Object *obj;
80
81 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
82 return NULL;
83 MAGIC_CHECK_END();
84 obj = evas_object_new(e);
85 evas_object_polygon_init(obj);
86 evas_object_inject(obj, e);
87 return obj;
88}
89
90EAPI void
91evas_object_polygon_point_add(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
92{
93 Evas_Object_Polygon *o;
94 Evas_Polygon_Point *p;
95 Evas_Coord min_x, max_x, min_y, max_y;
96 int is, was = 0;
97
98 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
99 return;
100 MAGIC_CHECK_END();
101 o = (Evas_Object_Polygon *)(obj->object_data);
102 MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON);
103 return;
104 MAGIC_CHECK_END();
105
106 if (obj->layer->evas->events_frozen <= 0)
107 {
108 if (!evas_event_passes_through(obj) &&
109 !evas_event_freezes_through(obj))
110 was = evas_object_is_in_output_rect(obj,
111 obj->layer->evas->pointer.x,
112 obj->layer->evas->pointer.y,
113 1, 1);
114 }
115 if (!o->points)
116 {
117 o->offset.x = obj->cur.geometry.x;
118 o->offset.y = obj->cur.geometry.y;
119 }
120 else
121 {
122 /* Update all points and take offset into account. */
123 Eina_List *over;
124
125 EINA_LIST_FOREACH(o->points, over, p)
126 {
127 p->x += o->offset.x;
128 p->y += o->offset.y;
129 }
130 }
131
132 p = malloc(sizeof(Evas_Polygon_Point));
133 if (!p) return;
134 p->x = x + o->offset.x;
135 p->y = y + o->offset.y;
136
137 if (!o->points)
138 {
139 obj->cur.geometry.x = p->x;
140 obj->cur.geometry.y = p->y;
141 obj->cur.geometry.w = 2;
142 obj->cur.geometry.h = 2;
143 }
144 else
145 {
146 if (p->x < obj->cur.geometry.x) min_x = p->x;
147 else min_x = obj->cur.geometry.x;
148 if (p->x > (obj->cur.geometry.x + obj->cur.geometry.w - 2))
149 max_x = p->x;
150 else max_x = obj->cur.geometry.x + obj->cur.geometry.w - 2;
151 if (p->y < obj->cur.geometry.y) min_y = p->y;
152 else min_y = obj->cur.geometry.y;
153 if (p->y > (obj->cur.geometry.y + obj->cur.geometry.h - 2))
154 max_y = p->y;
155 else max_y = obj->cur.geometry.y + obj->cur.geometry.h - 2;
156 obj->cur.geometry.x = min_x;
157 obj->cur.geometry.y = min_y;
158 obj->cur.geometry.w = max_x - min_x + 2;
159 obj->cur.geometry.h = max_y - min_y + 2;
160 }
161 o->points = eina_list_append(o->points, p);
162
163 o->geometry = obj->cur.geometry;
164 o->offset.x = 0;
165 o->offset.y = 0;
166
167 //// obj->cur.cache.geometry.validity = 0;
168 o->changed = EINA_TRUE;
169 evas_object_change(obj);
170 evas_object_clip_dirty(obj);
171 evas_object_coords_recalc(obj);
172 if (obj->layer->evas->events_frozen <= 0)
173 {
174 is = evas_object_is_in_output_rect(obj,
175 obj->layer->evas->pointer.x,
176 obj->layer->evas->pointer.y, 1, 1);
177 if (!evas_event_passes_through(obj) &&
178 !evas_event_freezes_through(obj) )
179 {
180 if ((is ^ was) && obj->cur.visible)
181 evas_event_feed_mouse_move(obj->layer->evas,
182 obj->layer->evas->pointer.x,
183 obj->layer->evas->pointer.y,
184 obj->layer->evas->last_timestamp,
185 NULL);
186 }
187 }
188 evas_object_inform_call_move(obj);
189 evas_object_inform_call_resize(obj);
190}
191
192EAPI void
193evas_object_polygon_points_clear(Evas_Object *obj)
194{
195 Evas_Object_Polygon *o;
196 int is, was;
197
198 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
199 return;
200 MAGIC_CHECK_END();
201 o = (Evas_Object_Polygon *)(obj->object_data);
202 MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON);
203 return;
204 MAGIC_CHECK_END();
205 was = evas_object_is_in_output_rect(obj,
206 obj->layer->evas->pointer.x,
207 obj->layer->evas->pointer.y, 1, 1);
208 while (o->points)
209 {
210 free(o->points->data);
211 o->points = eina_list_remove(o->points, o->points->data);
212 }
213 obj->cur.geometry.x = 0;
214 obj->cur.geometry.y = 0;
215 obj->cur.geometry.w = 0;
216 obj->cur.geometry.h = 0;
217 //// obj->cur.cache.geometry.validity = 0;
218 o->changed = EINA_TRUE;
219 evas_object_change(obj);
220 evas_object_clip_dirty(obj);
221 evas_object_coords_recalc(obj);
222 is = evas_object_is_in_output_rect(obj,
223 obj->layer->evas->pointer.x,
224 obj->layer->evas->pointer.y, 1, 1);
225 if ((is || was) && obj->cur.visible)
226 evas_event_feed_mouse_move(obj->layer->evas,
227 obj->layer->evas->pointer.x,
228 obj->layer->evas->pointer.y,
229 obj->layer->evas->last_timestamp,
230 NULL);
231 evas_object_inform_call_move(obj);
232 evas_object_inform_call_resize(obj);
233}
234
235/* all nice and private */
236static void
237evas_object_polygon_init(Evas_Object *obj)
238{
239 /* alloc image ob, setup methods and default values */
240 obj->object_data = evas_object_polygon_new();
241 /* set up default settings for this kind of object */
242 obj->cur.color.r = 255;
243 obj->cur.color.g = 255;
244 obj->cur.color.b = 255;
245 obj->cur.color.a = 255;
246 obj->cur.geometry.x = 0;
247 obj->cur.geometry.y = 0;
248 obj->cur.geometry.w = 0;
249 obj->cur.geometry.h = 0;
250 obj->cur.layer = 0;
251 /* set up object-specific settings */
252 obj->prev = obj->cur;
253 /* set up methods (compulsory) */
254 obj->func = &object_func;
255 obj->type = o_type;
256}
257
258static void *
259evas_object_polygon_new(void)
260{
261 Evas_Object_Polygon *o;
262
263 /* alloc obj private data */
264 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_polygon", Evas_Object_Polygon, 32, NULL);
265 o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Polygon);
266 if (!o) return NULL;
267 EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Polygon);
268 o->magic = MAGIC_OBJ_POLYGON;
269 return o;
270}
271
272static void
273evas_object_polygon_free(Evas_Object *obj)
274{
275 Evas_Object_Polygon *o;
276
277 /* frees private object data. very simple here */
278 o = (Evas_Object_Polygon *)(obj->object_data);
279 MAGIC_CHECK(o, Evas_Object_Polygon, MAGIC_OBJ_POLYGON);
280 return;
281 MAGIC_CHECK_END();
282 /* free obj */
283 while (o->points)
284 {
285 free(o->points->data);
286 o->points = eina_list_remove(o->points, o->points->data);
287 }
288 o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
289 obj->layer->evas->engine.data.context,
290 o->engine_data);
291 o->magic = 0;
292 EVAS_MEMPOOL_FREE(_mp_obj, o);
293}
294
295static void
296evas_object_polygon_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
297{
298 Evas_Object_Polygon *o;
299 Eina_List *l;
300 Evas_Polygon_Point *p;
301
302 /* render object to surface with context, and offxet by x,y */
303 o = (Evas_Object_Polygon *)(obj->object_data);
304 obj->layer->evas->engine.func->context_color_set(output,
305 context,
306 obj->cur.cache.clip.r,
307 obj->cur.cache.clip.g,
308 obj->cur.cache.clip.b,
309 obj->cur.cache.clip.a);
310 obj->layer->evas->engine.func->context_multiplier_unset(output,
311 context);
312 obj->layer->evas->engine.func->context_render_op_set(output, context,
313 obj->cur.render_op);
314 if (o->changed)
315 {
316 o->engine_data = obj->layer->evas->engine.func->polygon_points_clear(obj->layer->evas->engine.data.output,
317 obj->layer->evas->engine.data.context,
318 o->engine_data);
319 EINA_LIST_FOREACH(o->points, l, p)
320 {
321 //px = evas_coord_world_x_to_screen(obj->layer->evas, p->x);
322 //py = evas_coord_world_y_to_screen(obj->layer->evas, p->y);
323 o->engine_data = obj->layer->evas->engine.func->polygon_point_add(obj->layer->evas->engine.data.output,
324 obj->layer->evas->engine.data.context,
325 o->engine_data,
326 p->x, p->y);
327 }
328 }
329
330 if (o->engine_data)
331 obj->layer->evas->engine.func->polygon_draw(output,
332 context,
333 surface,
334 o->engine_data,
335 o->offset.x + x, o->offset.y + y);
336}
337
338static void
339evas_object_polygon_render_pre(Evas_Object *obj)
340{
341 Evas_Object_Polygon *o;
342 int is_v, was_v;
343
344 /* dont pre-render the obj twice! */
345 if (obj->pre_render_done) return;
346 obj->pre_render_done = 1;
347 /* pre-render phase. this does anything an object needs to do just before */
348 /* rendering. this could mean loading the image data, retrieving it from */
349 /* elsewhere, decoding video etc. */
350 /* then when this is done the object needs to figure if it changed and */
351 /* if so what and where and add the appropriate redraw lines */
352 o = (Evas_Object_Polygon *)(obj->object_data);
353 /* if someone is clipping this obj - go calculate the clipper */
354 if (obj->cur.clipper)
355 {
356 if (obj->cur.cache.clip.dirty)
357 evas_object_clip_recalc(obj->cur.clipper);
358 obj->cur.clipper->func->render_pre(obj->cur.clipper);
359 }
360 /* now figure what changed and add draw rects */
361 /* if it just became visible or invisible */
362 is_v = evas_object_is_visible(obj);
363 was_v = evas_object_was_visible(obj);
364 if (is_v != was_v)
365 {
366 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
367 goto done;
368 }
369 if ((obj->cur.map != obj->prev.map) ||
370 (obj->cur.usemap != obj->prev.usemap))
371 {
372 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
373 goto done;
374 }
375 /* it's not visible - we accounted for it appearing or not so just abort */
376 if (!is_v) goto done;
377 /* clipper changed this is in addition to anything else for obj */
378 evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
379 /* if we restacked (layer or just within a layer) */
380 if (obj->restack)
381 {
382 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
383 goto done;
384 }
385 /* if it changed render op */
386 if (obj->cur.render_op != obj->prev.render_op)
387 {
388 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
389 goto done;
390 }
391 /* if it changed color */
392 if ((obj->cur.color.r != obj->prev.color.r) ||
393 (obj->cur.color.g != obj->prev.color.g) ||
394 (obj->cur.color.b != obj->prev.color.b) ||
395 (obj->cur.color.a != obj->prev.color.a))
396 {
397 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
398 goto done;
399 }
400 /* if it changed geometry - and obviously not visibility or color */
401 /* calculate differences since we have a constant color fill */
402 /* we really only need to update the differences */
403 if ((obj->cur.geometry.x != obj->prev.geometry.x) ||
404 (obj->cur.geometry.y != obj->prev.geometry.y) ||
405 (obj->cur.geometry.w != obj->prev.geometry.w) ||
406 (obj->cur.geometry.h != obj->prev.geometry.h) ||
407 (o->changed))
408 {
409 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
410 goto done;
411 }
412 done:
413 if ((obj->cur.geometry.x != obj->prev.geometry.x) ||
414 (obj->cur.geometry.y != obj->prev.geometry.y))
415 {
416 if (!o->changed)
417 {
418 o->offset.x += obj->cur.geometry.x - obj->prev.geometry.x;
419 o->offset.y += obj->cur.geometry.y - obj->prev.geometry.y;
420 }
421 else
422 {
423 o->offset.x += obj->cur.geometry.x - o->geometry.x;
424 o->offset.y += obj->cur.geometry.y - o->geometry.y;
425 }
426 }
427 evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
428}
429
430static void
431evas_object_polygon_render_post(Evas_Object *obj)
432{
433 Evas_Object_Polygon *o;
434
435 /* this moves the current data to the previous state parts of the object */
436 /* in whatever way is safest for the object. also if we don't need object */
437 /* data anymore we can free it if the object deems this is a good idea */
438 o = (Evas_Object_Polygon *)(obj->object_data);
439 /* remove those pesky changes */
440 evas_object_clip_changes_clean(obj);
441 /* move cur to prev safely for object data */
442 obj->prev = obj->cur;
443 o->changed = 0;
444}
445
446static unsigned int evas_object_polygon_id_get(Evas_Object *obj)
447{
448 Evas_Object_Polygon *o;
449
450 o = (Evas_Object_Polygon *)(obj->object_data);
451 if (!o) return 0;
452 return MAGIC_OBJ_POLYGON;
453}
454
455static unsigned int evas_object_polygon_visual_id_get(Evas_Object *obj)
456{
457 Evas_Object_Polygon *o;
458
459 o = (Evas_Object_Polygon *)(obj->object_data);
460 if (!o) return 0;
461 return MAGIC_OBJ_SHAPE;
462}
463
464static void *evas_object_polygon_engine_data_get(Evas_Object *obj)
465{
466 Evas_Object_Polygon *o;
467
468 o = (Evas_Object_Polygon *)(obj->object_data);
469 if (!o) return NULL;
470 return o->engine_data;
471}
472
473static int
474evas_object_polygon_is_opaque(Evas_Object *obj __UNUSED__)
475{
476 /* this returns 1 if the internal object data implies that the object is */
477 /* currently fully opaque over the entire line it occupies */
478 return 0;
479}
480
481static int
482evas_object_polygon_was_opaque(Evas_Object *obj __UNUSED__)
483{
484 /* this returns 1 if the internal object data implies that the object was */
485 /* previously fully opaque over the entire line it occupies */
486 return 0;
487}
488
489/* We count the number of edges a "ray" 90 degs upwards from our point
490 * intersects with. If it's even, we are outside of the polygon, if it's odd,
491 * we are inside of it. */
492static int
493evas_object_polygon_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
494{
495 Evas_Object_Polygon *o;
496 int num_edges = 0; /* Number of edges we crossed */
497 Eina_List *itr;
498 Evas_Polygon_Point *p;
499
500 o = (Evas_Object_Polygon *)(obj->object_data);
501 if (!o) return 0;
502 if (!o->points) return 0;
503
504 /* Adjust X and Y according to current geometry */
505 x -= o->offset.x;
506 y -= o->offset.y;
507
508 if (eina_list_count(o->points) == 1)
509 {
510 p = eina_list_data_get(o->points);
511 return ((p->x == x) && (p->y == y));
512 }
513
514 EINA_LIST_FOREACH(o->points, itr, p)
515 {
516 Evas_Coord line_y;
517 Eina_List *next = eina_list_next(itr);
518 Evas_Polygon_Point *p_next;
519 /* Get the next, or if there's no next, take the first */
520 if (next)
521 {
522 p_next = eina_list_data_get(next);
523 }
524 else
525 {
526 p_next = eina_list_data_get(o->points);
527 }
528
529 /* Make sure that we are directly below the edge,
530 * and that p->x != p_next->x */
531 if (((p->x < p_next->x) && (p->x <= x) && (x < p_next->x)) ||
532 ((p->x > p_next->x) && (p_next->x < x) && (x <= p->x)))
533 {
534 line_y = ((double) (p->y - p_next->y) /
535 (double) (p->x - p_next->x)) *
536 (x - p_next->x) + p_next->y;
537 /* We crossed that edge if the line is directly above us */
538 if (line_y < y)
539 num_edges++;
540 }
541 }
542
543 /* Return true if num_edges is odd */
544 return ((num_edges % 2) == 1);
545}
546
547static int
548evas_object_polygon_was_inside(Evas_Object *obj __UNUSED__, Evas_Coord x __UNUSED__, Evas_Coord y __UNUSED__)
549{
550 /* this returns 1 if the canvas co-ordinates were inside the object based */
551 /* on object private data. not much use for rects, but for polys, images */
552 /* and other complex objects it might be */
553 return 1;
554}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4/* private magic number for rectangle objects */
5static const char o_type[] = "rectangle";
6
7const char *o_rect_type = o_type;
8
9/* private struct for rectangle object internal data */
10typedef struct _Evas_Object_Rectangle Evas_Object_Rectangle;
11
12struct _Evas_Object_Rectangle
13{
14 DATA32 magic;
15 void *engine_data;
16};
17
18/* private methods for rectangle objects */
19static void evas_object_rectangle_init(Evas_Object *obj);
20static void *evas_object_rectangle_new(void);
21static void evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
22static void evas_object_rectangle_free(Evas_Object *obj);
23static void evas_object_rectangle_render_pre(Evas_Object *obj);
24static void evas_object_rectangle_render_post(Evas_Object *obj);
25
26static unsigned int evas_object_rectangle_id_get(Evas_Object *obj);
27static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj);
28static void *evas_object_rectangle_engine_data_get(Evas_Object *obj);
29
30static int evas_object_rectangle_is_opaque(Evas_Object *obj);
31static int evas_object_rectangle_was_opaque(Evas_Object *obj);
32
33#if 0 /* usless calls for a rect object. much more useful for images etc. */
34static void evas_object_rectangle_store(Evas_Object *obj);
35static void evas_object_rectangle_unstore(Evas_Object *obj);
36static int evas_object_rectangle_is_visible(Evas_Object *obj);
37static int evas_object_rectangle_was_visible(Evas_Object *obj);
38static int evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y);
39static int evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y);
40#endif
41
42static const Evas_Object_Func object_func =
43{
44 /* methods (compulsory) */
45 evas_object_rectangle_free,
46 evas_object_rectangle_render,
47 evas_object_rectangle_render_pre,
48 evas_object_rectangle_render_post,
49 evas_object_rectangle_id_get,
50 evas_object_rectangle_visual_id_get,
51 evas_object_rectangle_engine_data_get,
52 /* these are optional. NULL = nothing */
53 NULL,
54 NULL,
55 NULL,
56 NULL,
57 evas_object_rectangle_is_opaque,
58 evas_object_rectangle_was_opaque,
59 NULL,
60 NULL,
61 NULL,
62 NULL,
63 NULL,
64 NULL,
65 NULL
66};
67
68/* the actual api call to add a rect */
69/* it has no other api calls as all properties are standard */
70
71EVAS_MEMPOOL(_mp_obj);
72
73EAPI Evas_Object *
74evas_object_rectangle_add(Evas *e)
75{
76 Evas_Object *obj;
77
78 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
79 return NULL;
80 MAGIC_CHECK_END();
81 obj = evas_object_new(e);
82 evas_object_rectangle_init(obj);
83 evas_object_inject(obj, e);
84 return obj;
85}
86
87/* all nice and private */
88static void
89evas_object_rectangle_init(Evas_Object *obj)
90{
91 /* alloc image ob, setup methods and default values */
92 obj->object_data = evas_object_rectangle_new();
93 /* set up default settings for this kind of object */
94 obj->cur.color.r = 255;
95 obj->cur.color.g = 255;
96 obj->cur.color.b = 255;
97 obj->cur.color.a = 255;
98 obj->cur.geometry.x = 0;
99 obj->cur.geometry.y = 0;
100 obj->cur.geometry.w = 0;
101 obj->cur.geometry.h = 0;
102 obj->cur.layer = 0;
103 obj->cur.render_op = EVAS_RENDER_BLEND;
104 /* set up object-specific settings */
105 obj->prev = obj->cur;
106 /* set up methods (compulsory) */
107 obj->func = &object_func;
108 obj->type = o_type;
109}
110
111static void *
112evas_object_rectangle_new(void)
113{
114 Evas_Object_Rectangle *o;
115
116 /* alloc obj private data */
117 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_rectangle", Evas_Object_Rectangle, 256, NULL);
118 o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Rectangle);
119 if (!o) return NULL;
120 EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Rectangle);
121 o->magic = MAGIC_OBJ_RECTANGLE;
122 return o;
123}
124
125static void
126evas_object_rectangle_free(Evas_Object *obj)
127{
128 Evas_Object_Rectangle *o;
129
130 /* frees private object data. very simple here */
131 o = (Evas_Object_Rectangle *)(obj->object_data);
132 MAGIC_CHECK(o, Evas_Object_Rectangle, MAGIC_OBJ_RECTANGLE);
133 return;
134 MAGIC_CHECK_END();
135 /* free obj */
136 o->magic = 0;
137 EVAS_MEMPOOL_FREE(_mp_obj, o);
138}
139
140static void
141evas_object_rectangle_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
142{
143 /* render object to surface with context, and offxet by x,y */
144 obj->layer->evas->engine.func->context_color_set(output,
145 context,
146 obj->cur.cache.clip.r,
147 obj->cur.cache.clip.g,
148 obj->cur.cache.clip.b,
149 obj->cur.cache.clip.a);
150 obj->layer->evas->engine.func->context_multiplier_unset(output,
151 context);
152 obj->layer->evas->engine.func->context_render_op_set(output, context,
153 obj->cur.render_op);
154 obj->layer->evas->engine.func->rectangle_draw(output,
155 context,
156 surface,
157 obj->cur.geometry.x + x,
158 obj->cur.geometry.y + y,
159 obj->cur.geometry.w,
160 obj->cur.geometry.h);
161//// obj->cur.cache.geometry.x + x,
162//// obj->cur.cache.geometry.y + y,
163//// obj->cur.cache.geometry.w,
164//// obj->cur.cache.geometry.h);
165}
166
167static void
168evas_object_rectangle_render_pre(Evas_Object *obj)
169{
170 int is_v, was_v;
171
172 /* dont pre-render the obj twice! */
173 if (obj->pre_render_done) return;
174 obj->pre_render_done = 1;
175 /* pre-render phase. this does anything an object needs to do just before */
176 /* rendering. this could mean loading the image data, retrieving it from */
177 /* elsewhere, decoding video etc. */
178 /* then when this is done the object needs to figure if it changed and */
179 /* if so what and where and add the appropriate redraw rectangles */
180 /* if someone is clipping this obj - go calculate the clipper */
181 if (obj->cur.clipper)
182 {
183 if (obj->cur.cache.clip.dirty)
184 evas_object_clip_recalc(obj->cur.clipper);
185 obj->cur.clipper->func->render_pre(obj->cur.clipper);
186 }
187 /* now figure what changed and add draw rects */
188 /* if it just became visible or invisible */
189 is_v = evas_object_is_visible(obj);
190 was_v = evas_object_was_visible(obj);
191 if (!(is_v | was_v)) goto done;
192 if (is_v != was_v)
193 {
194 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
195 goto done;
196 }
197 if ((obj->cur.map != obj->prev.map) ||
198 (obj->cur.usemap != obj->prev.usemap))
199 {
200 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
201 goto done;
202 }
203 /* it's not visible - we accounted for it appearing or not so just abort */
204 if (!is_v) goto done;
205 /* clipper changed this is in addition to anything else for obj */
206 evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
207 /* if we restacked (layer or just within a layer) and don't clip anyone */
208 if ((obj->restack) && (!obj->clip.clipees))
209 {
210 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
211 goto done;
212 }
213 /* if it changed render op */
214 if (obj->cur.render_op != obj->prev.render_op)
215 {
216 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
217 goto done;
218 }
219 /* if it changed color */
220 if ((obj->cur.color.r != obj->prev.color.r) ||
221 (obj->cur.color.g != obj->prev.color.g) ||
222 (obj->cur.color.b != obj->prev.color.b) ||
223 (obj->cur.color.a != obj->prev.color.a))
224 {
225 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
226 goto done;
227 }
228 /* if it changed geometry - and obviously not visibility or color */
229 /* calculate differences since we have a constant color fill */
230 /* we really only need to update the differences */
231 if ((obj->cur.geometry.x != obj->prev.geometry.x) ||
232 (obj->cur.geometry.y != obj->prev.geometry.y) ||
233 (obj->cur.geometry.w != obj->prev.geometry.w) ||
234 (obj->cur.geometry.h != obj->prev.geometry.h))
235 {
236 evas_rects_return_difference_rects(&obj->layer->evas->clip_changes,
237 obj->cur.geometry.x,
238 obj->cur.geometry.y,
239 obj->cur.geometry.w,
240 obj->cur.geometry.h,
241 obj->prev.geometry.x,
242 obj->prev.geometry.y,
243 obj->prev.geometry.w,
244 obj->prev.geometry.h);
245//// rl = evas_rects_return_difference_rects(obj->cur.cache.geometry.x,
246//// obj->cur.cache.geometry.y,
247//// obj->cur.cache.geometry.w,
248//// obj->cur.cache.geometry.h,
249//// obj->prev.cache.geometry.x,
250//// obj->prev.cache.geometry.y,
251//// obj->prev.cache.geometry.w,
252//// obj->prev.cache.geometry.h);
253 goto done;
254 }
255 /* it obviously didn't change - add a NO obscure - this "unupdates" this */
256 /* area so if there were updates for it they get wiped. don't do it if we */
257 /* arent fully opaque and we are visible */
258 /*
259 if (evas_object_is_visible(obj) &&
260 evas_object_is_opaque(obj) &&
261 (!obj->clip.clipees))
262 obj->layer->evas->engine.func->output_redraws_rect_del(obj->layer->evas->engine.data.output,
263 obj->cur.cache.clip.x,
264 obj->cur.cache.clip.y,
265 obj->cur.cache.clip.w,
266 obj->cur.cache.clip.h);
267 */
268 done:
269 evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
270}
271
272static void
273evas_object_rectangle_render_post(Evas_Object *obj)
274{
275
276 /* this moves the current data to the previous state parts of the object */
277 /* in whatever way is safest for the object. also if we don't need object */
278 /* data anymore we can free it if the object deems this is a good idea */
279 /* remove those pesky changes */
280 evas_object_clip_changes_clean(obj);
281 /* move cur to prev safely for object data */
282 obj->prev = obj->cur;
283}
284
285static int
286evas_object_rectangle_is_opaque(Evas_Object *obj)
287{
288 /* this returns 1 if the internal object data implies that the object is */
289 /* currently fully opaque over the entire rectangle it occupies */
290 if ((obj->cur.map) && (obj->cur.usemap)) return 0;
291 if (obj->cur.render_op == EVAS_RENDER_COPY)
292 return 1;
293 if (obj->cur.render_op != EVAS_RENDER_BLEND)
294 return 0;
295 return 1;
296}
297
298static int
299evas_object_rectangle_was_opaque(Evas_Object *obj)
300{
301 /* this returns 1 if the internal object data implies that the object was */
302 /* previously fully opaque over the entire rectangle it occupies */
303 if (obj->prev.render_op == EVAS_RENDER_COPY)
304 return 1;
305 if (obj->prev.render_op != EVAS_RENDER_BLEND)
306 return 0;
307 return 1;
308}
309
310static unsigned int evas_object_rectangle_id_get(Evas_Object *obj)
311{
312 Evas_Object_Rectangle *o;
313
314 o = (Evas_Object_Rectangle *)(obj->object_data);
315 if (!o) return 0;
316 return MAGIC_OBJ_RECTANGLE;
317}
318
319static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *obj)
320{
321 Evas_Object_Rectangle *o;
322
323 o = (Evas_Object_Rectangle *)(obj->object_data);
324 if (!o) return 0;
325 return MAGIC_OBJ_SHAPE;
326}
327
328static void *evas_object_rectangle_engine_data_get(Evas_Object *obj)
329{
330 Evas_Object_Rectangle *o;
331
332 o = (Evas_Object_Rectangle *)(obj->object_data);
333 if (!o) return NULL;
334 return o->engine_data;
335}
336
337
338#if 0 /* usless calls for a rect object. much more useful for images etc. */
339static void
340evas_object_rectangle_store(Evas_Object *obj)
341{
342 /* store... nothing for rectangle objects... it's a bit silly */
343 /* but for others that may have expensive caluclations to do to */
344 /* generate the object data, hint that they might want to be pre-calced */
345 /* once and stored */
346}
347
348static void
349evas_object_rectangle_unstore(Evas_Object *obj)
350{
351 /* store... nothing for rectangle objects... it's a bit silly */
352}
353
354static int
355evas_object_rectangle_is_visible(Evas_Object *obj)
356{
357 /* this returns 1 if the internal object data would imply that it is */
358 /* visible (ie drawing it draws something. this is not to do with events */
359 return 1;
360}
361
362static int
363evas_object_rectangle_was_visible(Evas_Object *obj)
364{
365 /* this returns 1 if the internal object data would imply that it was */
366 /* visible (ie drawing it draws something. this is not to do with events */
367 return 1;
368}
369
370static int
371evas_object_rectangle_is_inside(Evas_Object *obj, double x, double y)
372{
373 /* this returns 1 if the canvas co-ordinates are inside the object based */
374 /* on object private data. not much use for rects, but for polys, images */
375 /* and other complex objects it might be */
376 return 1;
377}
378
379static int
380evas_object_rectangle_was_inside(Evas_Object *obj, double x, double y)
381{
382 /* this returns 1 if the canvas co-ordinates were inside the object based */
383 /* on object private data. not much use for rects, but for polys, images */
384 /* and other complex objects it might be */
385 return 1;
386}
387#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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4typedef struct _Evas_Object_Smart Evas_Object_Smart;
5typedef struct _Evas_Smart_Callback Evas_Smart_Callback;
6
7struct _Evas_Object_Smart
8{
9 DATA32 magic;
10 void *engine_data;
11 void *data;
12 Eina_List *callbacks;
13 Eina_Inlist *contained;
14 Evas_Smart_Cb_Description_Array callbacks_descriptions;
15 int walking_list;
16 Eina_Bool deletions_waiting : 1;
17 Eina_Bool need_recalculate : 1;
18};
19
20struct _Evas_Smart_Callback
21{
22 const char *event;
23 Evas_Smart_Cb func;
24 void *func_data;
25 Evas_Callback_Priority priority;
26 char delete_me : 1;
27};
28
29/* private methods for smart objects */
30static void evas_object_smart_callbacks_clear(Evas_Object *obj);
31static void evas_object_smart_init(Evas_Object *obj);
32static void *evas_object_smart_new(void);
33static void evas_object_smart_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
34static void evas_object_smart_free(Evas_Object *obj);
35static void evas_object_smart_render_pre(Evas_Object *obj);
36static void evas_object_smart_render_post(Evas_Object *obj);
37
38static unsigned int evas_object_smart_id_get(Evas_Object *obj);
39static unsigned int evas_object_smart_visual_id_get(Evas_Object *obj);
40static void *evas_object_smart_engine_data_get(Evas_Object *obj);
41
42static const Evas_Object_Func object_func =
43{
44 /* methods (compulsory) */
45 evas_object_smart_free,
46 evas_object_smart_render,
47 evas_object_smart_render_pre,
48 evas_object_smart_render_post,
49 evas_object_smart_id_get,
50 evas_object_smart_visual_id_get,
51 evas_object_smart_engine_data_get,
52 /* these are optional. NULL = nothing */
53 NULL,
54 NULL,
55 NULL,
56 NULL,
57 NULL,
58 NULL,
59 NULL,
60 NULL,
61 NULL,
62 NULL,
63 NULL,
64 NULL,
65 NULL
66};
67
68EVAS_MEMPOOL(_mp_obj);
69EVAS_MEMPOOL(_mp_cb);
70
71/* public funcs */
72EAPI void
73evas_object_smart_data_set(Evas_Object *obj, void *data)
74{
75 Evas_Object_Smart *o;
76
77 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
78 return;
79 MAGIC_CHECK_END();
80 o = (Evas_Object_Smart *)(obj->object_data);
81 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
82 return;
83 MAGIC_CHECK_END();
84 o->data = data;
85}
86
87EAPI void *
88evas_object_smart_data_get(const Evas_Object *obj)
89{
90 Evas_Object_Smart *o;
91
92 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
93 return NULL;
94 MAGIC_CHECK_END();
95 o = (Evas_Object_Smart *)(obj->object_data);
96 if (!o) return NULL;
97 return o->data;
98}
99
100EAPI Evas_Smart *
101evas_object_smart_smart_get(const Evas_Object *obj)
102{
103 Evas_Object_Smart *o;
104
105 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
106 return NULL;
107 MAGIC_CHECK_END();
108 o = (Evas_Object_Smart *)(obj->object_data);
109 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
110 return NULL;
111 MAGIC_CHECK_END();
112 return obj->smart.smart;
113}
114
115EAPI void
116evas_object_smart_member_add(Evas_Object *obj, Evas_Object *smart_obj)
117{
118 Evas_Object_Smart *o;
119
120 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
121 return;
122 MAGIC_CHECK_END();
123 MAGIC_CHECK(smart_obj, Evas_Object, MAGIC_OBJ);
124 return;
125 MAGIC_CHECK_END();
126 o = (Evas_Object_Smart *)(smart_obj->object_data);
127 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
128 return;
129 MAGIC_CHECK_END();
130
131 if (obj->delete_me)
132 {
133 CRIT("Adding deleted object %p to smart obj %p", obj, smart_obj);
134 abort();
135 return;
136 }
137 if (smart_obj->delete_me)
138 {
139 CRIT("Adding object %p to deleted smart obj %p", obj, smart_obj);
140 abort();
141 return;
142 }
143 if (!smart_obj->layer)
144 {
145 CRIT("No evas surface associated with smart object (%p)", smart_obj);
146 abort();
147 return;
148 }
149 if ((obj->layer && smart_obj->layer) &&
150 (obj->layer->evas != smart_obj->layer->evas))
151 {
152 CRIT("Adding object %p from Evas (%p) from another Evas (%p)", obj, obj->layer->evas, smart_obj->layer->evas);
153 abort();
154 return;
155 }
156
157 if (obj->smart.parent == smart_obj) return;
158
159 if (obj->smart.parent) evas_object_smart_member_del(obj);
160
161 evas_object_release(obj, 1);
162 obj->layer = smart_obj->layer;
163 obj->cur.layer = obj->layer->layer;
164 obj->layer->usage++;
165 obj->smart.parent = smart_obj;
166 o->contained = eina_inlist_append(o->contained, EINA_INLIST_GET(obj));
167 evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_TRUE);
168 obj->restack = 1;
169 evas_object_change(obj);
170 evas_object_mapped_clip_across_mark(obj);
171 if (smart_obj->smart.smart->smart_class->member_add)
172 smart_obj->smart.smart->smart_class->member_add(smart_obj, obj);
173}
174
175EAPI void
176evas_object_smart_member_del(Evas_Object *obj)
177{
178 Evas_Object_Smart *o;
179 Evas_Object *smart_obj;
180
181 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
182 return;
183 MAGIC_CHECK_END();
184
185 if (!obj->smart.parent) return;
186
187 smart_obj = obj->smart.parent;
188 if (smart_obj->smart.smart->smart_class->member_del)
189 smart_obj->smart.smart->smart_class->member_del(smart_obj, obj);
190
191 o = (Evas_Object_Smart *)(obj->smart.parent->object_data);
192 o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(obj));
193 obj->smart.parent = NULL;
194 evas_object_smart_member_cache_invalidate(obj, EINA_TRUE, EINA_TRUE);
195 obj->layer->usage--;
196 obj->cur.layer = obj->layer->layer;
197 evas_object_inject(obj, obj->layer->evas);
198 obj->restack = 1;
199 evas_object_change(obj);
200 evas_object_mapped_clip_across_mark(obj);
201}
202
203EAPI Evas_Object *
204evas_object_smart_parent_get(const Evas_Object *obj)
205{
206 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
207 return NULL;
208 MAGIC_CHECK_END();
209
210 return obj->smart.parent;
211}
212
213EAPI Eina_Bool
214evas_object_smart_type_check(const Evas_Object *obj, const char *type)
215{
216 const Evas_Smart_Class *sc;
217
218 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
219 return EINA_FALSE;
220 MAGIC_CHECK_END();
221
222 if (!obj->smart.smart)
223 return EINA_FALSE;
224 sc = obj->smart.smart->smart_class;
225 while (sc)
226 {
227 if (!strcmp(sc->name, type))
228 return EINA_TRUE;
229 sc = sc->parent;
230 }
231
232 return EINA_FALSE;
233}
234
235EAPI Eina_Bool
236evas_object_smart_type_check_ptr(const Evas_Object *obj, const char *type)
237{
238 const Evas_Smart_Class *sc;
239
240 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
241 return EINA_FALSE;
242 MAGIC_CHECK_END();
243
244 if (!obj->smart.smart)
245 return EINA_FALSE;
246 sc = obj->smart.smart->smart_class;
247 while (sc)
248 {
249 if (sc->name == type)
250 return EINA_TRUE;
251 sc = sc->parent;
252 }
253
254 return EINA_FALSE;
255}
256
257EAPI Eina_List *
258evas_object_smart_members_get(const Evas_Object *obj)
259{
260 Evas_Object_Smart *o;
261 Eina_List *members;
262 Eina_Inlist *member;
263
264 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
265 return NULL;
266 MAGIC_CHECK_END();
267 o = (Evas_Object_Smart *)(obj->object_data);
268 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
269 return NULL;
270 MAGIC_CHECK_END();
271
272 members = NULL;
273 for (member = o->contained; member; member = member->next)
274 members = eina_list_append(members, member);
275
276 return members;
277}
278
279const Eina_Inlist *
280evas_object_smart_members_get_direct(const Evas_Object *obj)
281{
282 Evas_Object_Smart *o;
283
284 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
285 return NULL;
286 MAGIC_CHECK_END();
287 o = (Evas_Object_Smart *)(obj->object_data);
288 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
289 return NULL;
290 MAGIC_CHECK_END();
291 return o->contained;
292}
293
294void
295_evas_object_smart_members_all_del(Evas_Object *obj)
296{
297 Evas_Object_Smart *o = (Evas_Object_Smart *)(obj->object_data);
298 while (o->contained)
299 evas_object_del((Evas_Object *)(o->contained));
300}
301
302EAPI Evas_Object *
303evas_object_smart_add(Evas *e, Evas_Smart *s)
304{
305 Evas_Object *obj;
306
307 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
308 return NULL;
309 MAGIC_CHECK_END();
310 MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
311 return NULL;
312 MAGIC_CHECK_END();
313
314 obj = evas_object_new(e);
315 if (!obj) return NULL;
316 obj->smart.smart = s;
317 obj->type = s->smart_class->name;
318 evas_object_smart_init(obj);
319 evas_object_inject(obj, e);
320
321 evas_object_smart_use(s);
322
323 if (s->smart_class->add) s->smart_class->add(obj);
324
325 return obj;
326}
327
328static int
329_callback_priority_cmp(const void *_a, const void *_b)
330{
331 const Evas_Smart_Callback *a, *b;
332 a = (const Evas_Smart_Callback *) _a;
333 b = (const Evas_Smart_Callback *) _b;
334 if (a->priority < b->priority)
335 return -1;
336 else
337 return 1;
338}
339
340EAPI void
341evas_object_smart_callback_add(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data)
342{
343 evas_object_smart_callback_priority_add(obj, event,
344 EVAS_CALLBACK_PRIORITY_DEFAULT, func, data);
345}
346
347EAPI void
348evas_object_smart_callback_priority_add(Evas_Object *obj, const char *event, Evas_Callback_Priority priority, Evas_Smart_Cb func, const void *data)
349{
350 Evas_Object_Smart *o;
351 Evas_Smart_Callback *cb;
352
353 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
354 return;
355 MAGIC_CHECK_END();
356 o = (Evas_Object_Smart *)(obj->object_data);
357 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
358 return;
359 MAGIC_CHECK_END();
360 if (!event) return;
361 if (!func) return;
362 EVAS_MEMPOOL_INIT(_mp_cb, "evas_smart_callback", Evas_Smart_Callback, 512, );
363 cb = EVAS_MEMPOOL_ALLOC(_mp_cb, Evas_Smart_Callback);
364 if (!cb) return;
365 EVAS_MEMPOOL_PREP(_mp_cb, cb, Evas_Smart_Callback);
366 cb->event = eina_stringshare_add(event);
367 cb->func = func;
368 cb->func_data = (void *)data;
369 cb->priority = priority;
370 o->callbacks = eina_list_sorted_insert(o->callbacks, _callback_priority_cmp,
371 cb);
372}
373
374EAPI void *
375evas_object_smart_callback_del(Evas_Object *obj, const char *event, Evas_Smart_Cb func)
376{
377 Evas_Object_Smart *o;
378 Eina_List *l;
379 Evas_Smart_Callback *cb;
380
381 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
382 return NULL;
383 MAGIC_CHECK_END();
384 o = (Evas_Object_Smart *)(obj->object_data);
385 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
386 return NULL;
387 MAGIC_CHECK_END();
388 if (!event) return NULL;
389 EINA_LIST_FOREACH(o->callbacks, l, cb)
390 {
391 if ((!strcmp(cb->event, event)) && (cb->func == func))
392 {
393 void *data;
394
395 data = cb->func_data;
396 cb->delete_me = 1;
397 o->deletions_waiting = 1;
398 evas_object_smart_callbacks_clear(obj);
399 return data;
400 }
401 }
402 return NULL;
403}
404
405EAPI void *
406evas_object_smart_callback_del_full(Evas_Object *obj, const char *event, Evas_Smart_Cb func, const void *data)
407{
408 Evas_Object_Smart *o;
409 Eina_List *l;
410 Evas_Smart_Callback *cb;
411
412 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
413 return NULL;
414 MAGIC_CHECK_END();
415 o = (Evas_Object_Smart *)(obj->object_data);
416 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
417 return NULL;
418 MAGIC_CHECK_END();
419 if (!event) return NULL;
420 EINA_LIST_FOREACH(o->callbacks, l, cb)
421 {
422 if ((!strcmp(cb->event, event)) && (cb->func == func) && (cb->func_data == data))
423 {
424 void *ret;
425
426 ret = cb->func_data;
427 cb->delete_me = 1;
428 o->deletions_waiting = 1;
429 evas_object_smart_callbacks_clear(obj);
430 return ret;
431 }
432 }
433 return NULL;
434}
435
436EAPI void
437evas_object_smart_callback_call(Evas_Object *obj, const char *event, void *event_info)
438{
439 Evas_Object_Smart *o;
440 Eina_List *l;
441 Evas_Smart_Callback *cb;
442 const char *strshare;
443
444 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
445 return;
446 MAGIC_CHECK_END();
447 o = (Evas_Object_Smart *)(obj->object_data);
448 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
449 return;
450 MAGIC_CHECK_END();
451 if (!event) return;
452 if (obj->delete_me) return;
453 o->walking_list++;
454 strshare = eina_stringshare_add(event);
455 EINA_LIST_FOREACH(o->callbacks, l, cb)
456 {
457 if (!cb->delete_me)
458 {
459 if (cb->event == strshare)
460 cb->func(cb->func_data, obj, event_info);
461 }
462 if (obj->delete_me)
463 break;
464 }
465 eina_stringshare_del(strshare);
466 o->walking_list--;
467 evas_object_smart_callbacks_clear(obj);
468}
469
470EAPI Eina_Bool
471evas_object_smart_callbacks_descriptions_set(Evas_Object *obj, const Evas_Smart_Cb_Description *descriptions)
472{
473 const Evas_Smart_Cb_Description *d;
474 Evas_Object_Smart *o;
475 unsigned int i, count = 0;
476
477 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
478 return EINA_FALSE;
479 MAGIC_CHECK_END();
480 o = (Evas_Object_Smart *)(obj->object_data);
481 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
482 return EINA_FALSE;
483 MAGIC_CHECK_END();
484
485 if ((!descriptions) || (!descriptions->name))
486 {
487 evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
488 return EINA_TRUE;
489 }
490
491 for (count = 0, d = descriptions; d->name; d++)
492 count++;
493
494 evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, count);
495 if (count == 0) return EINA_TRUE;
496
497 for (i = 0, d = descriptions; i < count; d++, i++)
498 o->callbacks_descriptions.array[i] = d;
499
500 evas_smart_cb_descriptions_fix(&o->callbacks_descriptions);
501
502 return EINA_TRUE;
503}
504
505EAPI void
506evas_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)
507{
508 Evas_Object_Smart *o;
509
510 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
511 if (class_descriptions) *class_descriptions = NULL;
512 if (class_count) *class_count = 0;
513 if (instance_descriptions) *instance_descriptions = NULL;
514 if (instance_count) *instance_count = 0;
515 return;
516 MAGIC_CHECK_END();
517 o = (Evas_Object_Smart *)(obj->object_data);
518 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
519 if (class_descriptions) *class_descriptions = NULL;
520 if (class_count) *class_count = 0;
521 if (instance_descriptions) *instance_descriptions = NULL;
522 if (instance_count) *instance_count = 0;
523 return;
524 MAGIC_CHECK_END();
525
526 if (class_descriptions)
527 *class_descriptions = obj->smart.smart->callbacks.array;
528 if (class_count)
529 *class_count = obj->smart.smart->callbacks.size;
530
531 if (instance_descriptions)
532 *instance_descriptions = o->callbacks_descriptions.array;
533 if (instance_count)
534 *instance_count = o->callbacks_descriptions.size;
535}
536
537EAPI void
538evas_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)
539{
540 Evas_Object_Smart *o;
541
542 if (!name)
543 {
544 if (class_description) *class_description = NULL;
545 if (instance_description) *instance_description = NULL;
546 return;
547 }
548
549 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
550 if (class_description) *class_description = NULL;
551 if (instance_description) *instance_description = NULL;
552 return;
553 MAGIC_CHECK_END();
554 o = (Evas_Object_Smart *)(obj->object_data);
555 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
556 if (class_description) *class_description = NULL;
557 if (instance_description) *instance_description = NULL;
558 return;
559 MAGIC_CHECK_END();
560
561 if (class_description)
562 *class_description = evas_smart_cb_description_find
563 (&obj->smart.smart->callbacks, name);
564
565 if (instance_description)
566 *instance_description = evas_smart_cb_description_find
567 (&o->callbacks_descriptions, name);
568}
569
570EAPI void
571evas_object_smart_need_recalculate_set(Evas_Object *obj, Eina_Bool value)
572{
573 Evas_Object_Smart *o;
574 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
575 return;
576 MAGIC_CHECK_END();
577 o = obj->object_data;
578 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
579 return;
580 MAGIC_CHECK_END();
581
582 // XXX: do i need this?
583 if (obj->delete_me) return;
584
585 /* remove this entry from calc_list or processed list */
586 if (eina_clist_element_is_linked(&obj->calc_entry))
587 eina_clist_remove(&obj->calc_entry);
588
589 value = !!value;
590 if (value)
591 eina_clist_add_tail(&obj->layer->evas->calc_list, &obj->calc_entry);
592 else
593 eina_clist_add_tail(&obj->layer->evas->calc_done, &obj->calc_entry);
594
595 if (o->need_recalculate == value) return;
596
597 if (obj->recalculate_cycle > 254)
598 {
599 ERR("Object %p is not stable during recalc loop", obj);
600 return;
601 }
602 if (obj->layer->evas->in_smart_calc) obj->recalculate_cycle++;
603 o->need_recalculate = value;
604}
605
606EAPI Eina_Bool
607evas_object_smart_need_recalculate_get(const Evas_Object *obj)
608{
609 Evas_Object_Smart *o;
610 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
611 return EINA_FALSE;
612 MAGIC_CHECK_END();
613 o = obj->object_data;
614 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
615 return EINA_FALSE;
616 MAGIC_CHECK_END();
617
618 return o->need_recalculate;
619}
620
621EAPI void
622evas_object_smart_calculate(Evas_Object *obj)
623{
624 Evas_Object_Smart *o;
625 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
626 return;
627 MAGIC_CHECK_END();
628 o = obj->object_data;
629 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
630 return;
631 MAGIC_CHECK_END();
632
633 if (!obj->smart.smart->smart_class->calculate)
634 return;
635
636 o->need_recalculate = 0;
637 obj->smart.smart->smart_class->calculate(obj);
638}
639
640EAPI void
641evas_smart_objects_calculate(Evas *e)
642{
643 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
644 return;
645 MAGIC_CHECK_END();
646 evas_call_smarts_calculate(e);
647}
648
649EAPI int
650evas_smart_objects_calculate_count_get(const Evas *e)
651{
652 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
653 return 0;
654 MAGIC_CHECK_END();
655 return e->smart_calc_count;
656}
657
658/**
659 * Call calculate() on all smart objects that need_recalculate.
660 *
661 * @internal
662 */
663void
664evas_call_smarts_calculate(Evas *e)
665{
666 Eina_Clist *elem;
667 Evas_Object *obj;
668
669// printf("+CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALC-----------v\n");
670 evas_event_freeze(e);
671 e->in_smart_calc++;
672
673 while (NULL != (elem = eina_clist_head(&e->calc_list)))
674 {
675 Evas_Object_Smart *o;
676
677 /* move the item to the processed list */
678 obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry);
679 eina_clist_remove(&obj->calc_entry);
680 if (obj->delete_me) continue;
681 eina_clist_add_tail(&e->calc_done, &obj->calc_entry);
682
683 o = obj->object_data;
684
685 if (o->need_recalculate)
686 {
687 o->need_recalculate = 0;
688 obj->smart.smart->smart_class->calculate(obj);
689 }
690 }
691
692 while (NULL != (elem = eina_clist_head(&e->calc_done)))
693 {
694 obj = EINA_CLIST_ENTRY(elem, Evas_Object, calc_entry);
695 obj->recalculate_cycle = 0;
696 eina_clist_remove(&obj->calc_entry);
697 }
698
699 e->in_smart_calc--;
700 if (e->in_smart_calc == 0) e->smart_calc_count++;
701 evas_event_thaw(e);
702 evas_event_thaw_eval(e);
703}
704
705EAPI void
706evas_object_smart_changed(Evas_Object *obj)
707{
708 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
709 return;
710 MAGIC_CHECK_END();
711 evas_object_change(obj);
712 evas_object_smart_need_recalculate_set(obj, 1);
713}
714
715/* internal calls */
716static void
717evas_object_smart_callbacks_clear(Evas_Object *obj)
718{
719 Evas_Object_Smart *o;
720 Eina_List *l;
721 Evas_Smart_Callback *cb;
722
723 o = (Evas_Object_Smart *)(obj->object_data);
724
725 if (o->walking_list) return;
726 if (!o->deletions_waiting) return;
727 for (l = o->callbacks; l;)
728 {
729 cb = eina_list_data_get(l);
730 l = eina_list_next(l);
731 if (cb->delete_me)
732 {
733 o->callbacks = eina_list_remove(o->callbacks, cb);
734 if (cb->event) eina_stringshare_del(cb->event);
735 EVAS_MEMPOOL_FREE(_mp_cb, cb);
736 }
737 }
738}
739
740void
741evas_object_smart_del(Evas_Object *obj)
742{
743 Evas_Smart *s;
744
745 if (obj->delete_me) return;
746 s = obj->smart.smart;
747 if ((s) && (s->smart_class->del)) s->smart_class->del(obj);
748 if (obj->smart.parent) evas_object_smart_member_del(obj);
749 if (s) evas_object_smart_unuse(s);
750}
751
752void
753evas_object_smart_cleanup(Evas_Object *obj)
754{
755 Evas_Object_Smart *o;
756
757 if (obj->smart.parent)
758 evas_object_smart_member_del(obj);
759
760 o = (Evas_Object_Smart *)(obj->object_data);
761 if (o->magic == MAGIC_OBJ_SMART)
762 {
763 if (obj->calc_entry.next)
764 eina_clist_remove(&obj->calc_entry);
765
766 while (o->contained)
767 evas_object_smart_member_del((Evas_Object *)o->contained);
768
769 while (o->callbacks)
770 {
771 Evas_Smart_Callback *cb = o->callbacks->data;
772 o->callbacks = eina_list_remove(o->callbacks, cb);
773 if (cb->event) eina_stringshare_del(cb->event);
774 EVAS_MEMPOOL_FREE(_mp_cb, cb);
775 }
776
777 evas_smart_cb_descriptions_resize(&o->callbacks_descriptions, 0);
778 o->data = NULL;
779 }
780
781 obj->smart.parent = NULL;
782 obj->smart.smart = NULL;
783}
784
785void
786evas_object_smart_member_cache_invalidate(Evas_Object *obj,
787 Eina_Bool pass_events,
788 Eina_Bool freeze_events)
789{
790 Evas_Object_Smart *o;
791 Evas_Object *member;
792
793 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
794 return;
795 MAGIC_CHECK_END();
796
797 if (pass_events)
798 obj->parent_cache.pass_events_valid = EINA_FALSE;
799 if (freeze_events)
800 obj->parent_cache.freeze_events_valid = EINA_FALSE;
801
802 o = obj->object_data;
803 if (o->magic != MAGIC_OBJ_SMART) return;
804
805 EINA_INLIST_FOREACH(o->contained, member)
806 evas_object_smart_member_cache_invalidate(member,
807 pass_events,
808 freeze_events);
809}
810
811void
812evas_object_smart_member_raise(Evas_Object *member)
813{
814 Evas_Object_Smart *o;
815
816 o = (Evas_Object_Smart *)(member->smart.parent->object_data);
817 o->contained = eina_inlist_demote(o->contained, EINA_INLIST_GET(member));
818}
819
820void
821evas_object_smart_member_lower(Evas_Object *member)
822{
823 Evas_Object_Smart *o;
824
825 o = (Evas_Object_Smart *)(member->smart.parent->object_data);
826 o->contained = eina_inlist_promote(o->contained, EINA_INLIST_GET(member));
827}
828
829void
830evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other)
831{
832 Evas_Object_Smart *o;
833
834 o = (Evas_Object_Smart *)(member->smart.parent->object_data);
835 o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member));
836 o->contained = eina_inlist_append_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other));
837}
838
839void
840evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other)
841{
842 Evas_Object_Smart *o;
843
844 o = (Evas_Object_Smart *)(member->smart.parent->object_data);
845 o->contained = eina_inlist_remove(o->contained, EINA_INLIST_GET(member));
846 o->contained = eina_inlist_prepend_relative(o->contained, EINA_INLIST_GET(member), EINA_INLIST_GET(other));
847}
848
849/* all nice and private */
850static void
851evas_object_smart_init(Evas_Object *obj)
852{
853 /* alloc smart obj, setup methods and default values */
854 obj->object_data = evas_object_smart_new();
855 /* set up default settings for this kind of object */
856 obj->cur.color.r = 255;
857 obj->cur.color.g = 255;
858 obj->cur.color.b = 255;
859 obj->cur.color.a = 255;
860 obj->cur.geometry.x = 0;
861 obj->cur.geometry.y = 0;
862 obj->cur.geometry.w = 0;
863 obj->cur.geometry.h = 0;
864 obj->cur.layer = 0;
865 /* set up object-specific settings */
866 obj->prev = obj->cur;
867 /* set up methods (compulsory) */
868 obj->func = &object_func;
869}
870
871static void *
872evas_object_smart_new(void)
873{
874 Evas_Object_Smart *o;
875
876 /* alloc obj private data */
877 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_smart", Evas_Object_Smart, 256, NULL);
878 o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Smart);
879 if (!o) return NULL;
880 EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Smart);
881 o->magic = MAGIC_OBJ_SMART;
882 return o;
883}
884
885static void
886evas_object_smart_free(Evas_Object *obj)
887{
888 Evas_Object_Smart *o;
889
890 /* frees private object data. very simple here */
891 o = (Evas_Object_Smart *)(obj->object_data);
892 MAGIC_CHECK(o, Evas_Object_Smart, MAGIC_OBJ_SMART);
893 return;
894 MAGIC_CHECK_END();
895 /* free obj */
896 o->magic = 0;
897 EVAS_MEMPOOL_FREE(_mp_obj, o);
898}
899
900static void
901evas_object_smart_render(Evas_Object *obj __UNUSED__, void *output __UNUSED__, void *context __UNUSED__, void *surface __UNUSED__, int x __UNUSED__, int y __UNUSED__)
902{
903 return;
904}
905
906static void
907evas_object_smart_render_pre(Evas_Object *obj)
908{
909 if (obj->pre_render_done) return;
910 if ((obj->cur.map != obj->prev.map) ||
911 (obj->cur.usemap != obj->prev.usemap))
912 {
913 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
914 goto done;
915 }
916done:
917 obj->pre_render_done = 1;
918}
919
920static void
921evas_object_smart_render_post(Evas_Object *obj)
922{
923 obj->prev = obj->cur;
924}
925
926static unsigned int evas_object_smart_id_get(Evas_Object *obj)
927{
928 Evas_Object_Smart *o;
929
930 o = (Evas_Object_Smart *)(obj->object_data);
931 if (!o) return 0;
932 return MAGIC_OBJ_SMART;
933}
934
935static unsigned int evas_object_smart_visual_id_get(Evas_Object *obj)
936{
937 Evas_Object_Smart *o;
938
939 o = (Evas_Object_Smart *)(obj->object_data);
940 if (!o) return 0;
941 return MAGIC_OBJ_CONTAINER;
942}
943
944static void *evas_object_smart_engine_data_get(Evas_Object *obj)
945{
946 Evas_Object_Smart *o;
947
948 o = (Evas_Object_Smart *)(obj->object_data);
949 if (!o) return NULL;
950 return o->engine_data;
951}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4#define CSO_DATA_GET_OR_RETURN(obj, ptr) \
5 Evas_Object_Smart_Clipped_Data *ptr = evas_object_smart_data_get(obj); \
6 if (!ptr) return;
7
8EAPI void
9evas_object_smart_move_children_relative(Evas_Object *obj, Evas_Coord dx, Evas_Coord dy)
10{
11 const Eina_Inlist *lst;
12 Evas_Object *child;
13
14 if ((dx == 0) && (dy == 0))
15 return;
16
17 lst = evas_object_smart_members_get_direct(obj);
18 EINA_INLIST_FOREACH(lst, child)
19 {
20 Evas_Coord orig_x, orig_y;
21
22// shortcut as we are in evas
23// evas_object_geometry_get(child, &orig_x, &orig_y, NULL, NULL);
24 if (child->delete_me) continue;
25 if (child->is_static_clip) continue;
26 orig_x = child->cur.geometry.x;
27 orig_y = child->cur.geometry.y;
28 evas_object_move(child, orig_x + dx, orig_y + dy);
29 }
30}
31
32EAPI Evas_Object *
33evas_object_smart_clipped_clipper_get(Evas_Object *obj)
34{
35 Evas_Object_Smart_Clipped_Data *cso = evas_object_smart_data_get(obj);
36 if (!cso)
37 return NULL;
38
39 return cso->clipper;
40}
41
42static void
43evas_object_smart_clipped_smart_add(Evas_Object *obj)
44{
45 Evas_Object_Smart_Clipped_Data *cso;
46 Evas_Object *clipper;
47
48 cso = evas_object_smart_data_get(obj);
49 if (!cso)
50 cso = calloc(1, sizeof(*cso)); /* users can provide it or realloc() later */
51
52 cso->evas = evas_object_evas_get(obj);
53 clipper = evas_object_rectangle_add(cso->evas);
54 evas_object_static_clip_set(clipper, 1);
55 cso->clipper = NULL;
56 evas_object_smart_member_add(clipper, obj);
57 cso->clipper = clipper;
58 evas_object_color_set(cso->clipper, 255, 255, 255, 255);
59 evas_object_move(cso->clipper, -100000, -100000);
60 evas_object_resize(cso->clipper, 200000, 200000);
61 evas_object_pass_events_set(cso->clipper, 1);
62 evas_object_hide(cso->clipper); /* show when have something clipped to it */
63
64 evas_object_smart_data_set(obj, cso);
65}
66
67static void
68evas_object_smart_clipped_smart_del(Evas_Object *obj)
69{
70 CSO_DATA_GET_OR_RETURN(obj, cso);
71
72 if (cso->clipper)
73 {
74 Evas_Object *clipper = cso->clipper;
75 cso->clipper = NULL;
76 evas_object_del(clipper);
77 }
78
79 _evas_object_smart_members_all_del(obj);
80
81 free(cso);
82 evas_object_smart_data_set(obj, NULL);
83}
84
85static void
86evas_object_smart_clipped_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
87{
88 Evas_Coord orig_x, orig_y;
89
90 evas_object_geometry_get(obj, &orig_x, &orig_y, NULL, NULL);
91 evas_object_smart_move_children_relative(obj, x - orig_x, y - orig_y);
92}
93
94static void
95evas_object_smart_clipped_smart_show(Evas_Object *obj)
96{
97 CSO_DATA_GET_OR_RETURN(obj, cso);
98 if (evas_object_clipees_get(cso->clipper))
99 evas_object_show(cso->clipper); /* just show if clipper being used */
100}
101
102static void
103evas_object_smart_clipped_smart_hide(Evas_Object *obj)
104{
105 CSO_DATA_GET_OR_RETURN(obj, cso);
106 evas_object_hide(cso->clipper);
107}
108
109static void
110evas_object_smart_clipped_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
111{
112 CSO_DATA_GET_OR_RETURN(obj, cso);
113 evas_object_color_set(cso->clipper, r, g, b, a);
114}
115
116static void
117evas_object_smart_clipped_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
118{
119 CSO_DATA_GET_OR_RETURN(obj, cso);
120 evas_object_clip_set(cso->clipper, clip);
121}
122
123static void
124evas_object_smart_clipped_smart_clip_unset(Evas_Object *obj)
125{
126 CSO_DATA_GET_OR_RETURN(obj, cso);
127 evas_object_clip_unset(cso->clipper);
128}
129
130static void
131evas_object_smart_clipped_smart_member_add(Evas_Object *obj, Evas_Object *member)
132{
133 CSO_DATA_GET_OR_RETURN(obj, cso);
134 if (!cso->clipper)
135 return;
136 evas_object_clip_set(member, cso->clipper);
137 if (evas_object_visible_get(obj))
138 evas_object_show(cso->clipper);
139}
140
141static void
142evas_object_smart_clipped_smart_member_del(Evas_Object *obj, Evas_Object *member)
143{
144 CSO_DATA_GET_OR_RETURN(obj, cso);
145 if (!cso->clipper)
146 return;
147 evas_object_clip_unset(member);
148 if (!evas_object_clipees_get(cso->clipper))
149 evas_object_hide(cso->clipper);
150}
151
152EAPI void
153evas_object_smart_clipped_smart_set(Evas_Smart_Class *sc)
154{
155 if (!sc)
156 return;
157
158 sc->add = evas_object_smart_clipped_smart_add;
159 sc->del = evas_object_smart_clipped_smart_del;
160 sc->move = evas_object_smart_clipped_smart_move;
161 sc->show = evas_object_smart_clipped_smart_show;
162 sc->hide = evas_object_smart_clipped_smart_hide;
163 sc->color_set = evas_object_smart_clipped_smart_color_set;
164 sc->clip_set = evas_object_smart_clipped_smart_clip_set;
165 sc->clip_unset = evas_object_smart_clipped_smart_clip_unset;
166 sc->calculate = NULL;
167 sc->member_add = evas_object_smart_clipped_smart_member_add;
168 sc->member_del = evas_object_smart_clipped_smart_member_del;
169}
170
171EAPI const Evas_Smart_Class *
172evas_object_smart_clipped_class_get(void)
173{
174 static Evas_Smart_Class _sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("EvasObjectSmartClipped");
175 static const Evas_Smart_Class *class = NULL;
176
177 if (class)
178 return class;
179
180 evas_object_smart_clipped_smart_set(&_sc);
181 class = &_sc;
182 return class;
183}
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 @@
1#include "evas_common.h"
2#include <errno.h>
3
4typedef struct _Evas_Object_Table_Data Evas_Object_Table_Data;
5typedef struct _Evas_Object_Table_Option Evas_Object_Table_Option;
6typedef struct _Evas_Object_Table_Cache Evas_Object_Table_Cache;
7typedef struct _Evas_Object_Table_Iterator Evas_Object_Table_Iterator;
8typedef struct _Evas_Object_Table_Accessor Evas_Object_Table_Accessor;
9
10struct _Evas_Object_Table_Option
11{
12 Evas_Object *obj;
13 unsigned short col, row, colspan, rowspan, end_col, end_row;
14 struct {
15 Evas_Coord w, h;
16 } min, max;
17 struct {
18 double h, v;
19 } align;
20 struct {
21 Evas_Coord l, r, t, b;
22 } pad;
23 Eina_Bool expand_h : 1; /* XXX required? */
24 Eina_Bool expand_v : 1; /* XXX required? */
25 Eina_Bool fill_h : 1;
26 Eina_Bool fill_v : 1;
27};
28
29struct _Evas_Object_Table_Cache
30{
31 struct {
32 struct {
33 double h, v;
34 } weights;
35 struct {
36 int h, v;
37 } expands;
38 struct {
39 Evas_Coord w, h;
40 } min;
41 } total;
42 struct {
43 double *h, *v;
44 } weights;
45 struct {
46 Evas_Coord *h, *v;
47 } sizes;
48 struct {
49 Eina_Bool *h, *v;
50 } expands;
51 double ___pad; // padding to make sure doubles at end can be aligned
52};
53
54struct _Evas_Object_Table_Data
55{
56 Evas_Object_Smart_Clipped_Data base;
57 Eina_List *children;
58 struct {
59 Evas_Coord h, v;
60 } pad;
61 struct {
62 double h, v;
63 } align;
64 struct {
65 int cols, rows;
66 } size;
67 Evas_Object_Table_Cache *cache;
68 Evas_Object_Table_Homogeneous_Mode homogeneous;
69 Eina_Bool hints_changed : 1;
70 Eina_Bool expand_h : 1;
71 Eina_Bool expand_v : 1;
72 Eina_Bool is_mirrored : 1;
73};
74
75struct _Evas_Object_Table_Iterator
76{
77 Eina_Iterator iterator;
78
79 Eina_Iterator *real_iterator;
80 const Evas_Object *table;
81};
82
83struct _Evas_Object_Table_Accessor
84{
85 Eina_Accessor accessor;
86
87 Eina_Accessor *real_accessor;
88 const Evas_Object *table;
89};
90
91#define EVAS_OBJECT_TABLE_DATA_GET(o, ptr) \
92 Evas_Object_Table_Data *ptr = evas_object_smart_data_get(o)
93
94#define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, ptr) \
95 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
96 if (!ptr) \
97 { \
98 CRIT("no widget data for object %p (%s)", \
99 o, evas_object_type_get(o)); \
100 abort(); \
101 return; \
102}
103
104#define EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, ptr, val) \
105 EVAS_OBJECT_TABLE_DATA_GET(o, ptr); \
106 if (!ptr) \
107 { \
108 CRIT("No widget data for object %p (%s)", \
109 o, evas_object_type_get(o)); \
110 abort(); \
111 return val; \
112 }
113
114static const char EVAS_OBJECT_TABLE_OPTION_KEY[] = "|EvTb";
115
116static Eina_Bool
117_evas_object_table_iterator_next(Evas_Object_Table_Iterator *it, void **data)
118{
119 Evas_Object_Table_Option *opt;
120
121 if (!eina_iterator_next(it->real_iterator, (void **)&opt))
122 return EINA_FALSE;
123 if (data) *data = opt->obj;
124 return EINA_TRUE;
125}
126
127static Evas_Object *
128_evas_object_table_iterator_get_container(Evas_Object_Table_Iterator *it)
129{
130 return (Evas_Object *)it->table;
131}
132
133static void
134_evas_object_table_iterator_free(Evas_Object_Table_Iterator *it)
135{
136 eina_iterator_free(it->real_iterator);
137 free(it);
138}
139
140static Eina_Bool
141_evas_object_table_accessor_get_at(Evas_Object_Table_Accessor *it, unsigned int idx, void **data)
142{
143 Evas_Object_Table_Option *opt = NULL;
144
145 if (!eina_accessor_data_get(it->real_accessor, idx, (void **)&opt))
146 return EINA_FALSE;
147 if (data) *data = opt->obj;
148 return EINA_TRUE;
149}
150
151static Evas_Object *
152_evas_object_table_accessor_get_container(Evas_Object_Table_Accessor *it)
153{
154 return (Evas_Object *)it->table;
155}
156
157static void
158_evas_object_table_accessor_free(Evas_Object_Table_Accessor *it)
159{
160 eina_accessor_free(it->real_accessor);
161 free(it);
162}
163
164static Evas_Object_Table_Cache *
165_evas_object_table_cache_alloc(int cols, int rows)
166{
167 Evas_Object_Table_Cache *cache;
168 int size;
169
170 size = sizeof(Evas_Object_Table_Cache) +
171 ((cols + rows) *
172 (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool)));
173 cache = malloc(size);
174 if (!cache)
175 {
176 ERR("Could not allocate table cache %dx%d (%d bytes): %s",
177 cols, rows, size, strerror(errno));
178 return NULL;
179 }
180
181 cache->weights.h = (double *)(cache + 1);
182 cache->weights.v = (double *)(cache->weights.h + cols);
183 cache->sizes.h = (Evas_Coord *)(cache->weights.v + rows);
184 cache->sizes.v = (Evas_Coord *)(cache->sizes.h + cols);
185 cache->expands.h = (Eina_Bool *)(cache->sizes.v + rows);
186 cache->expands.v = (Eina_Bool *)(cache->expands.h + cols);
187
188 return cache;
189}
190
191static void
192_evas_object_table_cache_free(Evas_Object_Table_Cache *cache)
193{
194 free(cache);
195}
196
197static void
198_evas_object_table_cache_reset(Evas_Object_Table_Data *priv)
199{
200 Evas_Object_Table_Cache *c = priv->cache;
201 int size;
202
203 c->total.expands.v = 0;
204 c->total.expands.h = 0;
205 c->total.min.w = 0;
206 c->total.min.h = 0;
207
208 size = ((priv->size.rows + priv->size.cols) *
209 (sizeof(double) + sizeof(Evas_Coord) + sizeof(Eina_Bool)));
210 memset(c + 1, 0, size);
211}
212
213static void
214_evas_object_table_cache_invalidate(Evas_Object_Table_Data *priv)
215{
216 priv->hints_changed = 1;
217 if (priv->cache)
218 {
219 _evas_object_table_cache_free(priv->cache);
220 priv->cache = NULL;
221 }
222}
223
224static Evas_Object_Table_Option *
225_evas_object_table_option_get(Evas_Object *o)
226{
227 return evas_object_data_get(o, EVAS_OBJECT_TABLE_OPTION_KEY);
228}
229
230static void
231_evas_object_table_option_set(Evas_Object *o, const Evas_Object_Table_Option *opt)
232{
233 evas_object_data_set(o, EVAS_OBJECT_TABLE_OPTION_KEY, opt);
234}
235
236static Evas_Object_Table_Option *
237_evas_object_table_option_del(Evas_Object *o)
238{
239 return evas_object_data_del(o, EVAS_OBJECT_TABLE_OPTION_KEY);
240}
241
242static void
243_on_child_del(void *data, Evas *evas __UNUSED__, Evas_Object *child, void *einfo __UNUSED__)
244{
245 Evas_Object *table = data;
246 evas_object_table_unpack(table, child);
247}
248
249static void
250_on_child_hints_changed(void *data, Evas *evas __UNUSED__, Evas_Object *child __UNUSED__, void *einfo __UNUSED__)
251{
252 Evas_Object *table = data;
253 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(table, priv);
254 _evas_object_table_cache_invalidate(priv);
255 evas_object_smart_changed(table);
256}
257
258static void
259_evas_object_table_child_connect(Evas_Object *o, Evas_Object *child)
260{
261 evas_object_event_callback_add
262 (child, EVAS_CALLBACK_DEL, _on_child_del, o);
263 evas_object_event_callback_add
264 (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o);
265}
266
267static void
268_evas_object_table_child_disconnect(Evas_Object *o, Evas_Object *child)
269{
270 evas_object_event_callback_del_full
271 (child, EVAS_CALLBACK_DEL, _on_child_del, o);
272 evas_object_event_callback_del_full
273 (child, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _on_child_hints_changed, o);
274}
275
276static void
277_evas_object_table_calculate_cell(const Evas_Object_Table_Option *opt, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
278{
279 Evas_Coord cw, ch;
280
281 *w -= opt->pad.l + opt->pad.r;
282 if (*w < opt->min.w)
283 cw = opt->min.w;
284 else if ((opt->max.w > -1) && (*w > opt->max.w))
285 cw = opt->max.w;
286 else if (opt->fill_h)
287 cw = *w;
288 else
289 cw = opt->min.w;
290
291 *h -= opt->pad.t + opt->pad.b;
292 if (*h < opt->min.h)
293 ch = opt->min.h;
294 else if ((opt->max.h > -1) && (*h > opt->max.h))
295 ch = opt->max.h;
296 else if (opt->fill_v)
297 ch = *h;
298 else
299 ch = opt->min.h;
300
301 *x += opt->pad.l;
302 if (cw != *w)
303 {
304 *x += (*w - cw) * opt->align.h;
305 *w = cw;
306 }
307
308 *y += opt->pad.t;
309 if (ch != *h)
310 {
311 *y += (*h - ch) * opt->align.v;
312 *h = ch;
313 }
314}
315
316static void
317_evas_object_table_calculate_hints_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv)
318{
319 Eina_List *l;
320 Evas_Object_Table_Option *opt;
321 Evas_Coord minw, minh, o_minw, o_minh;
322 Eina_Bool expand_h, expand_v;
323
324 o_minw = 0;
325 o_minh = 0;
326 minw = 0;
327 minh = 0;
328 expand_h = 0;
329 expand_v = 0;
330
331 EINA_LIST_FOREACH(priv->children, l, opt)
332 {
333 Evas_Object *child = opt->obj;
334 Evas_Coord child_minw, child_minh, cell_minw, cell_minh;
335 double weightw, weighth;
336
337 evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h);
338 evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
339 evas_object_size_hint_padding_get
340 (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
341 evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v);
342 evas_object_size_hint_weight_get(child, &weightw, &weighth);
343
344 child_minw = opt->min.w + opt->pad.l + opt->pad.r;
345 child_minh = opt->min.h + opt->pad.t + opt->pad.b;
346
347 cell_minw = (child_minw + opt->colspan - 1) / opt->colspan;
348 cell_minh = (child_minh + opt->rowspan - 1) / opt->rowspan;
349
350 opt->expand_h = 0;
351 if ((weightw > 0.0) &&
352 ((opt->max.w < 0) ||
353 ((opt->max.w > -1) && (opt->min.w < opt->max.w))))
354 {
355 opt->expand_h = 1;
356 expand_h = 1;
357 }
358
359 opt->expand_v = 0;
360 if ((weighth > 0.0) &&
361 ((opt->max.h < 0) ||
362 ((opt->max.h > -1) && (opt->min.h < opt->max.h))))
363 {
364 opt->expand_v = 1;
365 expand_v = 1;
366 }
367
368 opt->fill_h = 0;
369 if (opt->align.h < 0.0)
370 {
371 opt->align.h = 0.5;
372 opt->fill_h = 1;
373 }
374 opt->fill_v = 0;
375 if (opt->align.v < 0.0)
376 {
377 opt->align.v = 0.5;
378 opt->fill_v = 1;
379 }
380
381 /* greatest mininum values, with paddings */
382 if (minw < cell_minw)
383 minw = cell_minw;
384 if (minh < cell_minh)
385 minh = cell_minh;
386 /* greatest mininum values, without paddings */
387 if (o_minw < opt->min.w)
388 o_minw = opt->min.w;
389 if (o_minh < opt->min.h)
390 o_minh = opt->min.h;
391 }
392
393 if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM)
394 {
395 if (o_minw < 1)
396 {
397 ERR("homogeneous table based on item size but no "
398 "horizontal mininum size specified! Using expand.");
399 expand_h = 1;
400 }
401 if (o_minh < 1)
402 {
403 ERR("homogeneous table based on item size but no "
404 "vertical mininum size specified! Using expand.");
405 expand_v = 1;
406 }
407 }
408
409 minw = priv->size.cols * (minw + priv->pad.h) - priv->pad.h;
410 minh = priv->size.rows * (minh + priv->pad.v) - priv->pad.v;
411
412 priv->hints_changed = 0;
413 priv->expand_h = expand_h;
414 priv->expand_v = expand_v;
415
416 if ((minw > 0 ) || (minh > 0))
417 evas_object_size_hint_min_set(o, minw, minh);
418
419 // XXX hint max?
420}
421
422static void
423_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)
424{
425 Evas_Coord minw, minh;
426 Eina_Bool expand_h, expand_v;
427
428 evas_object_size_hint_min_get(o, &minw, &minh);
429 expand_h = priv->expand_h;
430 expand_v = priv->expand_v;
431
432 if (*w < minw)
433 expand_h = 0;
434 if (!expand_h)
435 {
436 *x += (*w - minw) * priv->align.h;
437 *w = minw;
438 }
439
440 if (*h < minh)
441 expand_v = 0;
442 if (!expand_v)
443 {
444 *y += (*h - minh) * priv->align.v;
445 *h = minh;
446 }
447}
448
449static void
450_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)
451{
452 evas_object_geometry_get(o, x, y, w, h);
453 if (priv->homogeneous == EVAS_OBJECT_TABLE_HOMOGENEOUS_ITEM)
454 _evas_object_table_calculate_layout_homogeneous_sizes_item
455 (o, priv, x, y, w, h);
456
457 *cellw = (*w + priv->size.cols - 1) / priv->size.cols;
458 *cellh = (*h + priv->size.rows - 1) / priv->size.rows;
459}
460
461static void
462_evas_object_table_calculate_layout_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv)
463{
464 Evas_Coord x = 0, y = 0, w = 0, h = 0, ww, hh, cellw = 0, cellh = 0;
465 Eina_List *l;
466 Evas_Object_Table_Option *opt;
467
468 _evas_object_table_calculate_layout_homogeneous_sizes
469 (o, priv, &x, &y, &w, &h, &cellw, &cellh);
470
471 ww = w - ((priv->size.cols - 1) * priv->pad.h);
472 hh = h - ((priv->size.rows - 1) * priv->pad.v);
473
474 if (ww < 0) ww = 0;
475 if (ww < 0) ww = 0;
476
477 EINA_LIST_FOREACH(priv->children, l, opt)
478 {
479 Evas_Object *child = opt->obj;
480 Evas_Coord cx, cy, cw, ch, cox, coy, cow, coh;
481
482 cx = x + ((opt->col * ww) / priv->size.cols);
483 cw = x + (((opt->col + opt->colspan) * ww) / priv->size.cols) - cx;
484 cy = y + ((opt->row * hh) / priv->size.rows);
485 ch = y + (((opt->row + opt->rowspan) * hh) / priv->size.rows) - cy;
486
487 cx += (opt->col) * priv->pad.h;
488 cy += (opt->row) * priv->pad.v;
489
490 cox = cx;
491 coy = cy;
492 cow = cw;
493 coh = ch;
494
495 _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch);
496 if (cw > cow)
497 {
498 cx = cox;
499 cw = cow;
500 }
501 if (ch > coh)
502 {
503 cy = coy;
504 ch = coh;
505 }
506
507 if (priv->is_mirrored)
508 {
509 evas_object_move(opt->obj, x + w - (cx - x + cw), cy);
510 }
511 else
512 {
513 evas_object_move(child, cx, cy);
514 }
515 evas_object_resize(child, cw, ch);
516 }
517}
518
519static void
520_evas_object_table_smart_calculate_homogeneous(Evas_Object *o, Evas_Object_Table_Data *priv)
521{
522 if (priv->hints_changed)
523 _evas_object_table_calculate_hints_homogeneous(o, priv);
524 _evas_object_table_calculate_layout_homogeneous(o, priv);
525}
526
527static int
528_evas_object_table_count_expands(const Eina_Bool *expands, int start, int end)
529{
530 const Eina_Bool *itr = expands + start, *itr_end = expands + end;
531 int count = 0;
532
533 for (; itr < itr_end; itr++)
534 {
535 if (*itr)
536 count++;
537 }
538
539 return count;
540}
541
542static Evas_Coord
543_evas_object_table_sum_sizes(const Evas_Coord *sizes, int start, int end)
544{
545 const Evas_Coord *itr = sizes + start, *itr_end = sizes + end;
546 Evas_Coord sum = 0;
547
548 for (; itr < itr_end; itr++)
549 sum += *itr;
550
551 return sum;
552}
553
554static void
555_evas_object_table_sizes_calc_noexpand(Evas_Coord *sizes, int start, int end, Evas_Coord space)
556{
557 Evas_Coord *itr = sizes + start, *itr_end = sizes + end - 1;
558 Evas_Coord step;
559 int units;
560
561 /* XXX move to fixed point math and spread errors among cells */
562 units = end - start;
563 step = space / units;
564 for (; itr < itr_end; itr++)
565 *itr += step;
566
567 *itr += space - step * (units - 1);
568}
569
570static void
571_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)
572{
573 Evas_Coord *itr = sizes + start, *itr_end = sizes + end;
574 const Eina_Bool *itr_expand = expands + start;
575 Evas_Coord step = 0, last_space = 0;
576 int total = 0, i = start;
577
578 /* XXX move to fixed point math and spread errors among cells */
579 if (weighttot > 0.0)
580 {
581 step = space / expand_count;
582 last_space = space - step * (expand_count - 1);
583 }
584
585 for (; itr < itr_end; itr++, itr_expand++, i++)
586 {
587 if (weighttot <= 0.0)
588 {
589 if (*itr_expand)
590 {
591 expand_count--;
592 if (expand_count > 0)
593 *itr += step;
594 else
595 {
596 *itr += last_space;
597 break;
598 }
599 }
600 }
601 else
602 {
603 if (*itr_expand)
604 {
605 expand_count--;
606 if (expand_count > 0)
607 {
608 step = (weights[i] / weighttot) * space;
609 *itr += step;
610 total += step;
611 }
612 else
613 {
614 *itr += space - total;
615 break;
616 }
617 }
618 }
619 }
620}
621
622static void
623_evas_object_table_calculate_hints_regular(Evas_Object *o, Evas_Object_Table_Data *priv)
624{
625 Evas_Object_Table_Option *opt;
626 Evas_Object_Table_Cache *c;
627 Eina_List *l;
628 double totweightw = 0.0, totweighth = 0.0;
629 int i;
630
631 if (!priv->cache)
632 {
633 priv->cache = _evas_object_table_cache_alloc
634 (priv->size.cols, priv->size.rows);
635 if (!priv->cache)
636 return;
637 }
638 c = priv->cache;
639 _evas_object_table_cache_reset(priv);
640
641 /* cache interesting data */
642 memset(c->expands.h, 1, priv->size.cols);
643 memset(c->expands.v, 1, priv->size.rows);
644 memset(c->weights.h, 0, priv->size.cols);
645 memset(c->weights.v, 0, priv->size.rows);
646 EINA_LIST_FOREACH(priv->children, l, opt)
647 {
648 Evas_Object *child = opt->obj;
649 double weightw, weighth;
650
651 evas_object_size_hint_min_get(child, &opt->min.w, &opt->min.h);
652 evas_object_size_hint_max_get(child, &opt->max.w, &opt->max.h);
653 evas_object_size_hint_padding_get
654 (child, &opt->pad.l, &opt->pad.r, &opt->pad.t, &opt->pad.b);
655 evas_object_size_hint_align_get(child, &opt->align.h, &opt->align.v);
656 evas_object_size_hint_weight_get(child, &weightw, &weighth);
657
658 opt->expand_h = 0;
659 if ((weightw > 0.0) &&
660 ((opt->max.w < 0) ||
661 ((opt->max.w > -1) && (opt->min.w < opt->max.w))))
662 opt->expand_h = 1;
663
664 opt->expand_v = 0;
665 if ((weighth > 0.0) &&
666 ((opt->max.h < 0) ||
667 ((opt->max.h > -1) && (opt->min.h < opt->max.h))))
668 opt->expand_v = 1;
669
670 opt->fill_h = 0;
671 if (opt->align.h < 0.0)
672 {
673 opt->align.h = 0.5;
674 opt->fill_h = 1;
675 }
676 opt->fill_v = 0;
677 if (opt->align.v < 0.0)
678 {
679 opt->align.v = 0.5;
680 opt->fill_v = 1;
681 }
682
683 if (!opt->expand_h)
684 memset(c->expands.h + opt->col, 0, opt->colspan);
685 else
686 {
687 for (i = opt->col; i < opt->col + opt->colspan; i++)
688 c->weights.h[i] += (weightw / (double)opt->colspan);
689 }
690 if (!opt->expand_v)
691 memset(c->expands.v + opt->row, 0, opt->rowspan);
692 else
693 {
694 for (i = opt->row; i < opt->row + opt->rowspan; i++)
695 c->weights.v[i] += (weighth / (double)opt->rowspan);
696 }
697 }
698 for (i = 0; i < priv->size.cols; i++) totweightw += c->weights.h[i];
699 for (i = 0; i < priv->size.rows; i++) totweighth += c->weights.v[i];
700
701 /* calculate sizes for each row and column */
702 EINA_LIST_FOREACH(priv->children, l, opt)
703 {
704 Evas_Coord tot, need;
705
706 /* handle horizontal */
707 tot = _evas_object_table_sum_sizes(c->sizes.h, opt->col, opt->end_col);
708 need = opt->min.w + opt->pad.l + opt->pad.r;
709 if (tot < need)
710 {
711 Evas_Coord space = need - tot;
712 int count;
713
714 count = _evas_object_table_count_expands
715 (c->expands.h, opt->col, opt->end_col);
716
717 if (count > 0)
718 _evas_object_table_sizes_calc_expand
719 (c->sizes.h, opt->col, opt->end_col, space,
720 c->expands.h, count, c->weights.h, totweightw);
721 else
722 _evas_object_table_sizes_calc_noexpand
723 (c->sizes.h, opt->col, opt->end_col, space);
724 }
725
726 /* handle vertical */
727 tot = _evas_object_table_sum_sizes(c->sizes.v, opt->row, opt->end_row);
728 need = opt->min.h + opt->pad.t + opt->pad.b;
729 if (tot < opt->min.h)
730 {
731 Evas_Coord space = need - tot;
732 int count;
733
734 count = _evas_object_table_count_expands
735 (c->expands.v, opt->row, opt->end_row);
736
737 if (count > 0)
738 _evas_object_table_sizes_calc_expand
739 (c->sizes.v, opt->row, opt->end_row, space,
740 c->expands.v, count, c->weights.v, totweighth);
741 else
742 _evas_object_table_sizes_calc_noexpand
743 (c->sizes.v, opt->row, opt->end_row, space);
744 }
745 }
746
747 c->total.weights.h = totweightw;
748 c->total.weights.v = totweighth;
749
750 c->total.expands.h = _evas_object_table_count_expands
751 (c->expands.h, 0, priv->size.cols);
752 c->total.expands.v = _evas_object_table_count_expands
753 (c->expands.v, 0, priv->size.rows);
754
755 c->total.min.w = _evas_object_table_sum_sizes
756 (c->sizes.h, 0, priv->size.cols);
757 c->total.min.h = _evas_object_table_sum_sizes
758 (c->sizes.v, 0, priv->size.rows);
759
760 c->total.min.w += priv->pad.h * (priv->size.cols - 1);
761 c->total.min.h += priv->pad.v * (priv->size.rows - 1);
762
763 if ((c->total.min.w > 0) || (c->total.min.h > 0))
764 evas_object_size_hint_min_set(o, c->total.min.w, c->total.min.h);
765
766 // XXX hint max?
767}
768
769static void
770_evas_object_table_calculate_layout_regular(Evas_Object *o, Evas_Object_Table_Data *priv)
771{
772 Evas_Object_Table_Option *opt;
773 Evas_Object_Table_Cache *c;
774 Eina_List *l;
775 Evas_Coord *cols = NULL, *rows = NULL;
776 Evas_Coord x, y, w, h;
777
778 evas_object_geometry_get(o, &x, &y, &w, &h);
779 c = priv->cache;
780
781 /* handle horizontal */
782 if ((c->total.expands.h <= 0) || (c->total.min.w >= w))
783 {
784 x += (w - c->total.min.w) * priv->align.h;
785 w = c->total.min.w;
786 cols = c->sizes.h;
787 }
788 else
789 {
790 int size = priv->size.cols * sizeof(Evas_Coord);
791 cols = malloc(size);
792 if (!cols)
793 {
794 ERR("Could not allocate temp columns (%d bytes): %s",
795 size, strerror(errno));
796 goto end;
797 }
798 memcpy(cols, c->sizes.h, size);
799 _evas_object_table_sizes_calc_expand
800 (cols, 0, priv->size.cols, w - c->total.min.w,
801 c->expands.h, c->total.expands.h, c->weights.h, c->total.weights.h);
802 }
803
804 /* handle vertical */
805 if ((c->total.expands.v <= 0) || (c->total.min.h >= h))
806 {
807 y += (h - c->total.min.h) * priv->align.v;
808 h = c->total.min.h;
809 rows = c->sizes.v;
810 }
811 else
812 {
813 int size = priv->size.rows * sizeof(Evas_Coord);
814 rows = malloc(size);
815 if (!rows)
816 {
817 ERR("could not allocate temp rows (%d bytes): %s",
818 size, strerror(errno));
819 goto end;
820 }
821 memcpy(rows, c->sizes.v, size);
822 _evas_object_table_sizes_calc_expand
823 (rows, 0, priv->size.rows, h - c->total.min.h,
824 c->expands.v, c->total.expands.v, c->weights.v, c->total.weights.v);
825 }
826
827 EINA_LIST_FOREACH(priv->children, l, opt)
828 {
829 Evas_Object *child = opt->obj;
830 Evas_Coord cx, cy, cw, ch;
831
832 cx = x + opt->col * (priv->pad.h);
833 cx += _evas_object_table_sum_sizes(cols, 0, opt->col);
834 cw = _evas_object_table_sum_sizes(cols, opt->col, opt->end_col);
835
836 cy = y + opt->row * (priv->pad.v);
837 cy += _evas_object_table_sum_sizes(rows, 0, opt->row);
838 ch = _evas_object_table_sum_sizes(rows, opt->row, opt->end_row);
839
840 _evas_object_table_calculate_cell(opt, &cx, &cy, &cw, &ch);
841
842 if (priv->is_mirrored)
843 {
844 evas_object_move(opt->obj, x + w - (cx - x + cw), cy);
845 }
846 else
847 {
848 evas_object_move(child, cx, cy);
849 }
850 evas_object_resize(child, cw, ch);
851 }
852
853 end:
854 if (cols != c->sizes.h)
855 {
856 if (cols) free(cols);
857 }
858 if (rows != c->sizes.v)
859 {
860 if (rows) free(rows);
861 }
862}
863
864static void
865_evas_object_table_smart_calculate_regular(Evas_Object *o, Evas_Object_Table_Data *priv)
866{
867 if (priv->hints_changed)
868 _evas_object_table_calculate_hints_regular(o, priv);
869 _evas_object_table_calculate_layout_regular(o, priv);
870}
871
872EVAS_SMART_SUBCLASS_NEW("Evas_Object_Table", _evas_object_table,
873 Evas_Smart_Class, Evas_Smart_Class,
874 evas_object_smart_clipped_class_get, NULL)
875
876static void
877_evas_object_table_smart_add(Evas_Object *o)
878{
879 EVAS_SMART_DATA_ALLOC(o, Evas_Object_Table_Data)
880
881 priv->pad.h = 0;
882 priv->pad.v = 0;
883 priv->align.h = 0.5;
884 priv->align.v = 0.5;
885 priv->size.cols = 0;
886 priv->size.rows = 0;
887 priv->cache = NULL;
888 priv->homogeneous = EVAS_OBJECT_TABLE_HOMOGENEOUS_NONE;
889 priv->hints_changed = 1;
890 priv->expand_h = 0;
891 priv->expand_v = 0;
892
893 _evas_object_table_parent_sc->add(o);
894}
895
896static void
897_evas_object_table_smart_del(Evas_Object *o)
898{
899 EVAS_OBJECT_TABLE_DATA_GET(o, priv);
900 Eina_List *l;
901
902 l = priv->children;
903 while (l)
904 {
905 Evas_Object_Table_Option *opt = l->data;
906 _evas_object_table_child_disconnect(o, opt->obj);
907 _evas_object_table_option_del(opt->obj);
908 free(opt);
909 l = eina_list_remove_list(l, l);
910 }
911
912 if (priv->cache)
913 {
914 _evas_object_table_cache_free(priv->cache);
915 priv->cache = NULL;
916 }
917
918 _evas_object_table_parent_sc->del(o);
919}
920
921static void
922_evas_object_table_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
923{
924 Evas_Coord ow, oh;
925 evas_object_geometry_get(o, NULL, NULL, &ow, &oh);
926 if ((ow == w) && (oh == h)) return;
927 evas_object_smart_changed(o);
928}
929
930static void
931_evas_object_table_smart_calculate(Evas_Object *o)
932{
933 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
934
935 if ((priv->size.cols < 1) || (priv->size.rows < 1))
936 {
937 DBG("Nothing to do: cols=%d, rows=%d",
938 priv->size.cols, priv->size.rows);
939 return;
940 }
941
942 if (priv->homogeneous)
943 _evas_object_table_smart_calculate_homogeneous(o, priv);
944 else
945 _evas_object_table_smart_calculate_regular(o, priv);
946}
947
948static void
949_evas_object_table_smart_set_user(Evas_Smart_Class *sc)
950{
951 sc->add = _evas_object_table_smart_add;
952 sc->del = _evas_object_table_smart_del;
953 sc->resize = _evas_object_table_smart_resize;
954 sc->calculate = _evas_object_table_smart_calculate;
955}
956
957EAPI Evas_Object *
958evas_object_table_add(Evas *evas)
959{
960 return evas_object_smart_add(evas, _evas_object_table_smart_class_new());
961}
962
963EAPI Evas_Object *
964evas_object_table_add_to(Evas_Object *parent)
965{
966 Evas *evas;
967 Evas_Object *o;
968
969 evas = evas_object_evas_get(parent);
970 o = evas_object_table_add(evas);
971 evas_object_smart_member_add(o, parent);
972 return o;
973}
974
975EAPI void
976evas_object_table_homogeneous_set(Evas_Object *o, Evas_Object_Table_Homogeneous_Mode homogeneous)
977{
978 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
979 if (priv->homogeneous == homogeneous)
980 return;
981 priv->homogeneous = homogeneous;
982 _evas_object_table_cache_invalidate(priv);
983 evas_object_smart_changed(o);
984}
985
986EAPI Evas_Object_Table_Homogeneous_Mode
987evas_object_table_homogeneous_get(const Evas_Object *o)
988{
989 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
990 return priv->homogeneous;
991}
992
993EAPI void
994evas_object_table_align_set(Evas_Object *o, double horizontal, double vertical)
995{
996 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
997 if (priv->align.h == horizontal && priv->align.v == vertical)
998 return;
999 priv->align.h = horizontal;
1000 priv->align.v = vertical;
1001 evas_object_smart_changed(o);
1002}
1003
1004EAPI void
1005evas_object_table_align_get(const Evas_Object *o, double *horizontal, double *vertical)
1006{
1007 EVAS_OBJECT_TABLE_DATA_GET(o, priv);
1008 if (priv)
1009 {
1010 if (horizontal) *horizontal = priv->align.h;
1011 if (vertical) *vertical = priv->align.v;
1012 }
1013 else
1014 {
1015 if (horizontal) *horizontal = 0.5;
1016 if (vertical) *vertical = 0.5;
1017 }
1018}
1019
1020EAPI void
1021evas_object_table_padding_set(Evas_Object *o, Evas_Coord horizontal, Evas_Coord vertical)
1022{
1023 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
1024 if (priv->pad.h == horizontal && priv->pad.v == vertical)
1025 return;
1026 priv->pad.h = horizontal;
1027 priv->pad.v = vertical;
1028 _evas_object_table_cache_invalidate(priv);
1029 evas_object_smart_changed(o);
1030}
1031
1032EAPI void
1033evas_object_table_padding_get(const Evas_Object *o, Evas_Coord *horizontal, Evas_Coord *vertical)
1034{
1035 EVAS_OBJECT_TABLE_DATA_GET(o, priv);
1036 if (priv)
1037 {
1038 if (horizontal) *horizontal = priv->pad.h;
1039 if (vertical) *vertical = priv->pad.v;
1040 }
1041 else
1042 {
1043 if (horizontal) *horizontal = 0;
1044 if (vertical) *vertical = 0;
1045 }
1046}
1047
1048EAPI Eina_Bool
1049evas_object_table_pack_get(Evas_Object *o, Evas_Object *child, unsigned short *col, unsigned short *row, unsigned short *colspan, unsigned short *rowspan)
1050{
1051 Evas_Object_Table_Option *opt;
1052
1053 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1054 opt = _evas_object_table_option_get(child);
1055 if (!opt)
1056 {
1057 if (col) *col = 0;
1058 if (row) *row = 0;
1059 if (colspan) *colspan = 0;
1060 if (rowspan) *rowspan = 0;
1061 return EINA_FALSE;
1062 }
1063 if (col) *col = opt->col;
1064 if (row) *row = opt->row;
1065 if (colspan) *colspan = opt->colspan;
1066 if (rowspan) *rowspan = opt->rowspan;
1067 return EINA_TRUE;
1068}
1069
1070EAPI Eina_Bool
1071evas_object_table_pack(Evas_Object *o, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
1072{
1073 Evas_Object_Table_Option *opt;
1074
1075 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1076
1077 if (rowspan < 1)
1078 {
1079 ERR("rowspan < 1");
1080 return EINA_FALSE;
1081 }
1082 if (colspan < 1)
1083 {
1084 ERR("colspan < 1");
1085 return EINA_FALSE;
1086 }
1087
1088 opt = _evas_object_table_option_get(child);
1089 if (!opt)
1090 {
1091 opt = malloc(sizeof(*opt));
1092 if (!opt)
1093 {
1094 ERR("could not allocate table option data.");
1095 return EINA_FALSE;
1096 }
1097 }
1098
1099 opt->obj = child;
1100 opt->col = col;
1101 opt->row = row;
1102 opt->colspan = colspan;
1103 opt->rowspan = rowspan;
1104 opt->end_col = col + colspan;
1105 opt->end_row = row + rowspan;
1106
1107 if (evas_object_smart_parent_get(child) == o)
1108 {
1109 Eina_Bool need_shrink = EINA_FALSE;
1110
1111 if (priv->size.cols < opt->end_col)
1112 priv->size.cols = opt->end_col;
1113 else
1114 need_shrink = EINA_TRUE;
1115 if (priv->size.rows < opt->end_row)
1116 priv->size.rows = opt->end_row;
1117 else
1118 need_shrink = EINA_TRUE;
1119
1120 if (need_shrink)
1121 {
1122 Eina_List *l;
1123 Evas_Object_Table_Option *opt2;
1124 int max_row = 0, max_col = 0;
1125
1126 EINA_LIST_FOREACH(priv->children, l, opt2)
1127 {
1128 if (max_col < opt2->end_col) max_col = opt2->end_col;
1129 if (max_row < opt2->end_row) max_row = opt2->end_row;
1130 }
1131 priv->size.cols = max_col;
1132 priv->size.rows = max_row;
1133 }
1134 }
1135 else
1136 {
1137 opt->min.w = 0;
1138 opt->min.h = 0;
1139 opt->max.w = 0;
1140 opt->max.h = 0;
1141 opt->align.h = 0.5;
1142 opt->align.v = 0.5;
1143 opt->pad.l = 0;
1144 opt->pad.r = 0;
1145 opt->pad.t = 0;
1146 opt->pad.b = 0;
1147 opt->expand_h = 0;
1148 opt->expand_v = 0;
1149
1150 priv->children = eina_list_append(priv->children, opt);
1151
1152 if (priv->size.cols < opt->end_col)
1153 priv->size.cols = opt->end_col;
1154 if (priv->size.rows < opt->end_row)
1155 priv->size.rows = opt->end_row;
1156
1157 _evas_object_table_option_set(child, opt);
1158 evas_object_smart_member_add(child, o);
1159 _evas_object_table_child_connect(o, child);
1160 }
1161 _evas_object_table_cache_invalidate(priv);
1162 evas_object_smart_changed(o);
1163 return EINA_TRUE;
1164}
1165
1166static void
1167_evas_object_table_remove_opt(Evas_Object_Table_Data *priv, Evas_Object_Table_Option *opt)
1168{
1169 Eina_List *l;
1170 int max_row, max_col, was_greatest;
1171
1172 max_row = 0;
1173 max_col = 0;
1174 was_greatest = 0;
1175 l = priv->children;
1176 while (l)
1177 {
1178 Evas_Object_Table_Option *cur_opt = l->data;
1179
1180 if (cur_opt != opt)
1181 {
1182 if (max_col < cur_opt->end_col)
1183 max_col = cur_opt->end_col;
1184 if (max_row < cur_opt->end_row)
1185 max_row = cur_opt->end_row;
1186
1187 l = l->next;
1188 }
1189 else
1190 {
1191 Eina_List *tmp = l->next;
1192 priv->children = eina_list_remove_list(priv->children, l);
1193
1194 if ((priv->size.cols > opt->end_col) &&
1195 (priv->size.rows > opt->end_row))
1196 break;
1197 else
1198 {
1199 was_greatest = 1;
1200 l = tmp;
1201 }
1202 }
1203 }
1204
1205 if (was_greatest)
1206 {
1207 priv->size.cols = max_col;
1208 priv->size.rows = max_row;
1209 }
1210}
1211
1212EAPI Eina_Bool
1213evas_object_table_unpack(Evas_Object *o, Evas_Object *child)
1214{
1215 Evas_Object_Table_Option *opt;
1216
1217 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, 0);
1218
1219 if (o != evas_object_smart_parent_get(child))
1220 {
1221 ERR("cannot unpack child from incorrect table!");
1222 return EINA_FALSE;
1223 }
1224
1225 opt = _evas_object_table_option_del(child);
1226 if (!opt)
1227 {
1228 ERR("cannot unpack child with no packing option!");
1229 return EINA_FALSE;
1230 }
1231
1232 _evas_object_table_child_disconnect(o, child);
1233 _evas_object_table_remove_opt(priv, opt);
1234 evas_object_smart_member_del(child);
1235 free(opt);
1236 _evas_object_table_cache_invalidate(priv);
1237 evas_object_smart_changed(o);
1238
1239 return EINA_TRUE;
1240}
1241
1242EAPI void
1243evas_object_table_clear(Evas_Object *o, Eina_Bool clear)
1244{
1245 Evas_Object_Table_Option *opt;
1246
1247 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(o, priv);
1248
1249 EINA_LIST_FREE(priv->children, opt)
1250 {
1251 _evas_object_table_child_disconnect(o, opt->obj);
1252 _evas_object_table_option_del(opt->obj);
1253 evas_object_smart_member_del(opt->obj);
1254 if (clear)
1255 evas_object_del(opt->obj);
1256 free(opt);
1257 }
1258 priv->size.cols = 0;
1259 priv->size.rows = 0;
1260 _evas_object_table_cache_invalidate(priv);
1261 evas_object_smart_changed(o);
1262}
1263
1264EAPI void
1265evas_object_table_col_row_size_get(const Evas_Object *o, int *cols, int *rows)
1266{
1267 EVAS_OBJECT_TABLE_DATA_GET(o, priv);
1268 if (priv)
1269 {
1270 if (cols) *cols = priv->size.cols;
1271 if (rows) *rows = priv->size.rows;
1272 }
1273 else
1274 {
1275 if (cols) *cols = -1;
1276 if (rows) *rows = -1;
1277 }
1278}
1279
1280EAPI Eina_Iterator *
1281evas_object_table_iterator_new(const Evas_Object *o)
1282{
1283 Evas_Object_Table_Iterator *it;
1284
1285 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
1286
1287 if (!priv->children) return NULL;
1288
1289 it = calloc(1, sizeof(Evas_Object_Table_Iterator));
1290 if (!it) return NULL;
1291
1292 EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
1293
1294 it->real_iterator = eina_list_iterator_new(priv->children);
1295 it->table = o;
1296
1297 it->iterator.next = FUNC_ITERATOR_NEXT(_evas_object_table_iterator_next);
1298 it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_evas_object_table_iterator_get_container);
1299 it->iterator.free = FUNC_ITERATOR_FREE(_evas_object_table_iterator_free);
1300
1301 return &it->iterator;
1302}
1303
1304EAPI Eina_Accessor *
1305evas_object_table_accessor_new(const Evas_Object *o)
1306{
1307 Evas_Object_Table_Accessor *it;
1308
1309 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
1310
1311 if (!priv->children) return NULL;
1312
1313 it = calloc(1, sizeof(Evas_Object_Table_Accessor));
1314 if (!it) return NULL;
1315
1316 EINA_MAGIC_SET(&it->accessor, EINA_MAGIC_ACCESSOR);
1317
1318 it->real_accessor = eina_list_accessor_new(priv->children);
1319 it->table = o;
1320
1321 it->accessor.get_at = FUNC_ACCESSOR_GET_AT(_evas_object_table_accessor_get_at);
1322 it->accessor.get_container = FUNC_ACCESSOR_GET_CONTAINER(_evas_object_table_accessor_get_container);
1323 it->accessor.free = FUNC_ACCESSOR_FREE(_evas_object_table_accessor_free);
1324
1325 return &it->accessor;
1326}
1327
1328EAPI Eina_List *
1329evas_object_table_children_get(const Evas_Object *o)
1330{
1331 Eina_List *new_list = NULL, *l;
1332 Evas_Object_Table_Option *opt;
1333
1334 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
1335
1336 EINA_LIST_FOREACH(priv->children, l, opt)
1337 new_list = eina_list_append(new_list, opt->obj);
1338
1339 return new_list;
1340}
1341
1342Evas_Object *
1343evas_object_table_child_get(const Evas_Object *o, unsigned short col, unsigned short row)
1344{
1345 Eina_List *l;
1346 Evas_Object_Table_Option *opt;
1347
1348 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(o, priv, NULL);
1349
1350 EINA_LIST_FOREACH(priv->children, l, opt)
1351 if (opt->col == col && opt->row == row)
1352 return opt->obj;
1353 return NULL;
1354}
1355
1356EAPI Eina_Bool
1357evas_object_table_mirrored_get(const Evas_Object *obj)
1358{
1359 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN_VAL(obj, priv, EINA_FALSE);
1360
1361 return priv->is_mirrored;
1362}
1363
1364EAPI void
1365evas_object_table_mirrored_set(Evas_Object *obj, Eina_Bool mirrored)
1366{
1367 EVAS_OBJECT_TABLE_DATA_GET_OR_RETURN(obj, priv);
1368 if (priv->is_mirrored != mirrored)
1369 {
1370 priv->is_mirrored = mirrored;
1371 _evas_object_table_smart_calculate(obj);
1372 }
1373}
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 @@
1#include "evas_common.h" /* Includes evas_bidi_utils stuff. */
2#include "evas_private.h"
3
4/* save typing */
5#define ENFN obj->layer->evas->engine.func
6#define ENDT obj->layer->evas->engine.data.output
7
8/* private magic number for text objects */
9static const char o_type[] = "text";
10
11/* private struct for text object internal data */
12typedef struct _Evas_Object_Text Evas_Object_Text;
13typedef struct _Evas_Object_Text_Item Evas_Object_Text_Item;
14
15struct _Evas_Object_Text
16{
17 DATA32 magic;
18
19 struct {
20 const char *utf8_text; /* The text exposed to the API */
21 const char *font;
22 Evas_Font_Description *fdesc;
23 const char *source;
24 Evas_Font_Size size;
25 struct {
26 unsigned char r, g, b, a;
27 } outline, shadow, glow, glow2;
28
29 unsigned char style;
30 } cur, prev;
31
32 float ascent, descent;
33 float max_ascent, max_descent;
34 Evas_BiDi_Paragraph_Props *bidi_par_props;
35 const char *bidi_delimiters;
36 Evas_Object_Text_Item *items;
37
38 Evas_Font_Set *font;
39
40 char changed : 1;
41};
42
43struct _Evas_Object_Text_Item
44{
45 EINA_INLIST;
46
47 size_t text_pos;
48 size_t visual_pos;
49 Evas_Text_Props text_props;
50 Evas_Coord x, w, h, adv;
51};
52
53/* private methods for text objects */
54static void evas_object_text_init(Evas_Object *obj);
55static void *evas_object_text_new(void);
56static void evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
57static void evas_object_text_free(Evas_Object *obj);
58static void evas_object_text_render_pre(Evas_Object *obj);
59static void evas_object_text_render_post(Evas_Object *obj);
60
61static unsigned int evas_object_text_id_get(Evas_Object *obj);
62static unsigned int evas_object_text_visual_id_get(Evas_Object *obj);
63static void *evas_object_text_engine_data_get(Evas_Object *obj);
64
65static int evas_object_text_is_opaque(Evas_Object *obj);
66static int evas_object_text_was_opaque(Evas_Object *obj);
67
68static void evas_object_text_scale_update(Evas_Object *obj);
69static void _evas_object_text_recalc(Evas_Object *obj);
70
71static const Evas_Object_Func object_func =
72{
73 /* methods (compulsory) */
74 evas_object_text_free,
75 evas_object_text_render,
76 evas_object_text_render_pre,
77 evas_object_text_render_post,
78 evas_object_text_id_get,
79 evas_object_text_visual_id_get,
80 evas_object_text_engine_data_get,
81 /* these are optional. NULL = nothing */
82 NULL,
83 NULL,
84 NULL,
85 NULL,
86 evas_object_text_is_opaque,
87 evas_object_text_was_opaque,
88 NULL,
89 NULL,
90 NULL,
91 evas_object_text_scale_update,
92 NULL,
93 NULL,
94 NULL
95};
96
97/* the actual api call to add a rect */
98/* it has no other api calls as all properties are standard */
99
100EVAS_MEMPOOL(_mp_obj);
101
102static int
103_evas_object_text_char_coords_get(const Evas_Object *obj,
104 const Evas_Object_Text *o,
105 size_t pos, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
106{
107 Evas_Object_Text_Item *it;
108
109 EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
110 {
111 if ((it->text_pos <= pos) &&
112 (pos < (it->text_pos + it->text_props.text_len)))
113 {
114 int ret;
115 ret = ENFN->font_char_coords_get(ENDT, o->font,
116 &it->text_props, pos - it->text_pos, x, y, w, h);
117 if (x) *x += it->x;
118 return ret;
119 }
120 }
121 return 0;
122}
123
124static void
125_evas_object_text_item_clean(Evas_Object_Text_Item *it)
126{
127 evas_common_text_props_content_unref(&it->text_props);
128}
129
130static void
131_evas_object_text_items_clear(Evas_Object_Text *o)
132{
133 Evas_Object_Text_Item *it;
134
135 while (o->items)
136 {
137 it = o->items;
138 o->items = (Evas_Object_Text_Item *) eina_inlist_remove(
139 EINA_INLIST_GET(o->items),
140 EINA_INLIST_GET(it));
141 _evas_object_text_item_clean(it);
142 free(it);
143 }
144}
145
146#ifdef BIDI_SUPPORT
147static int
148_evas_object_text_it_compare_logical(const void *_it1, const void *_it2)
149{
150 const Evas_Object_Text_Item *it1 = _it1, *it2 = _it2;
151 if (it1->text_pos < it2->text_pos)
152 return -1;
153 else if (it1->text_pos == it2->text_pos)
154 return 0;
155 else
156 return 1;
157
158}
159#endif
160
161static int
162_evas_object_text_last_up_to_pos(const Evas_Object *obj,
163 const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy)
164{
165 Evas_Object_Text_Item *it;
166
167#ifdef BIDI_SUPPORT
168 /*FIXME: not very efficient, sort the items arrays. */
169 /* Reorder if it's a bidi text */
170 if (o->bidi_par_props)
171 {
172 Eina_List *logical_it = NULL;
173 Evas_Object_Text_Item *i;
174 Eina_List *itr;
175 Evas_Coord x = 0;
176 /* Insert all to the logical list */
177 EINA_INLIST_FOREACH(o->items, i)
178 {
179 logical_it = eina_list_sorted_insert(logical_it,
180 _evas_object_text_it_compare_logical, i);
181 }
182 EINA_LIST_FOREACH(logical_it, itr, it)
183 {
184 if ((x <= cx) && (cx < x + it->adv))
185 {
186 return it->text_pos + ENFN->font_last_up_to_pos(ENDT,
187 o->font,
188 &it->text_props,
189 cx - x,
190 cy);
191 }
192 x += it->adv;
193 }
194 eina_list_free(logical_it);
195 }
196 else
197#endif
198 {
199 EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
200 {
201 if ((it->x <= cx) && (cx < it->x + it->adv))
202 {
203 return it->text_pos + ENFN->font_last_up_to_pos(ENDT,
204 o->font,
205 &it->text_props,
206 cx - it->x,
207 cy);
208 }
209 }
210 }
211 return -1;
212}
213
214static int
215_evas_object_text_char_at_coords(const Evas_Object *obj,
216 const Evas_Object_Text *o, Evas_Coord cx, Evas_Coord cy,
217 Evas_Coord *rx, Evas_Coord *ry, Evas_Coord *rw, Evas_Coord *rh)
218{
219 Evas_Object_Text_Item *it;
220
221 EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
222 {
223 if ((it->x <= cx) && (cx < it->x + it->adv))
224 {
225 return it->text_pos + ENFN->font_char_at_coords_get(ENDT,
226 o->font,
227 &it->text_props,
228 cx - it->x,
229 cy,
230 rx, ry,
231 rw, rh);
232 }
233 }
234 return -1;
235}
236
237static Evas_Coord
238_evas_object_text_horiz_advance_get(const Evas_Object *obj,
239 const Evas_Object_Text *o)
240{
241 Evas_Object_Text_Item *it;
242 Evas_Coord adv;
243 (void) obj;
244
245 adv = 0;
246 EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
247 {
248 adv += it->adv;
249 }
250 return adv;
251}
252
253static Evas_Coord
254_evas_object_text_vert_advance_get(const Evas_Object *obj __UNUSED__,
255 const Evas_Object_Text *o)
256{
257 return o->max_ascent + o->max_descent;
258}
259
260EAPI Evas_Object *
261evas_object_text_add(Evas *e)
262{
263 Evas_Object *obj;
264
265 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
266 return NULL;
267 MAGIC_CHECK_END();
268 obj = evas_object_new(e);
269 evas_object_text_init(obj);
270 evas_object_inject(obj, e);
271 return obj;
272}
273
274EAPI void
275evas_object_text_font_source_set(Evas_Object *obj, const char *font_source)
276{
277 Evas_Object_Text *o;
278
279 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
280 return;
281 MAGIC_CHECK_END();
282 o = (Evas_Object_Text *)(obj->object_data);
283 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
284 return;
285 MAGIC_CHECK_END();
286
287 if ((o->cur.source) && (font_source) &&
288 (!strcmp(o->cur.source, font_source)))
289 return;
290 /*
291 if (o->cur.source) eina_stringshare_del(o->cur.source);
292 if (font_source) o->cur.source = eina_stringshare_add(font_source);
293 else o->cur.source = NULL;
294 */
295 eina_stringshare_replace(&o->cur.source, font_source);
296}
297
298EAPI const char *
299evas_object_text_font_source_get(const Evas_Object *obj)
300{
301 Evas_Object_Text *o;
302
303 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
304 return NULL;
305 MAGIC_CHECK_END();
306 o = (Evas_Object_Text *)(obj->object_data);
307 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
308 return NULL;
309 MAGIC_CHECK_END();
310 return o->cur.source;
311}
312
313EAPI void
314evas_object_text_font_set(Evas_Object *obj, const char *font, Evas_Font_Size size)
315{
316 Evas_Object_Text *o;
317 int is, was = 0, pass = 0, freeze = 0;
318 Evas_Font_Description *fdesc;
319
320 if ((!font) || (size <= 0)) return;
321 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
322 return;
323 MAGIC_CHECK_END();
324 o = (Evas_Object_Text *)(obj->object_data);
325 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
326 return;
327 MAGIC_CHECK_END();
328
329 fdesc = evas_font_desc_new();
330 evas_font_name_parse(fdesc, font);
331 if (o->cur.fdesc && !evas_font_desc_cmp(fdesc, o->cur.fdesc) &&
332 (size == o->cur.size))
333 {
334 evas_font_desc_unref(fdesc);
335 return;
336 }
337
338 if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc);
339 o->cur.fdesc = fdesc;
340
341 o->cur.size = size;
342 eina_stringshare_replace(&o->cur.font, font);
343 o->prev.font = NULL;
344
345 if (obj->layer->evas->events_frozen <= 0)
346 {
347 pass = evas_event_passes_through(obj);
348 freeze = evas_event_freezes_through(obj);
349 if ((!pass) && (!freeze))
350 was = evas_object_is_in_output_rect(obj,
351 obj->layer->evas->pointer.x,
352 obj->layer->evas->pointer.y, 1, 1);
353 }
354
355#ifdef EVAS_FRAME_QUEUING
356 if (o->font)
357 evas_common_pipe_op_text_flush((RGBA_Font *) o->font);
358#endif
359
360 /* DO IT */
361 if (o->font)
362 {
363 evas_font_free(obj->layer->evas, o->font);
364 o->font = NULL;
365 }
366
367 o->font = evas_font_load(obj->layer->evas, o->cur.fdesc, o->cur.source,
368 (int)(((double) o->cur.size) * obj->cur.scale));
369 if (o->font)
370 {
371 o->ascent = ENFN->font_ascent_get(ENDT, o->font);
372 o->descent = ENFN->font_descent_get(ENDT, o->font);
373 o->max_ascent = ENFN->font_max_ascent_get(ENDT, o->font);
374 o->max_descent = ENFN->font_max_descent_get(ENDT, o->font);
375 }
376 else
377 {
378 o->ascent = 0;
379 o->descent = 0;
380 o->max_ascent = 0;
381 o->max_descent = 0;
382 }
383 _evas_object_text_recalc(obj);
384 o->changed = 1;
385 evas_object_change(obj);
386 evas_object_clip_dirty(obj);
387 evas_object_coords_recalc(obj);
388 if (obj->layer->evas->events_frozen <= 0)
389 {
390 if ((!pass) && (!freeze))
391 {
392 is = evas_object_is_in_output_rect(obj,
393 obj->layer->evas->pointer.x,
394 obj->layer->evas->pointer.y,
395 1, 1);
396 if ((is ^ was) && obj->cur.visible)
397 evas_event_feed_mouse_move(obj->layer->evas,
398 obj->layer->evas->pointer.x,
399 obj->layer->evas->pointer.y,
400 obj->layer->evas->last_timestamp,
401 NULL);
402 }
403 }
404 evas_object_inform_call_resize(obj);
405}
406
407EAPI void
408evas_object_text_font_get(const Evas_Object *obj, const char **font, Evas_Font_Size *size)
409{
410 Evas_Object_Text *o;
411
412 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
413 if (font) *font = "";
414 if (size) *size = 0;
415 return;
416 MAGIC_CHECK_END();
417 o = (Evas_Object_Text *)(obj->object_data);
418 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
419 if (font) *font = "";
420 if (size) *size = 0;
421 return;
422 MAGIC_CHECK_END();
423 if (font) *font = o->cur.font;
424 if (size) *size = o->cur.size;
425}
426
427
428/**
429 * @internal
430 * Create a new text layout item from the string and the format.
431 *
432 * @param c the context to work on - Not NULL.
433 * @param fmt the format to use.
434 * @param str the string to use.
435 */
436static Evas_Object_Text_Item *
437_evas_object_text_item_new(Evas_Object *obj, Evas_Object_Text *o,
438 Evas_Font_Instance *fi, const Eina_Unicode *str, Evas_Script_Type script,
439 size_t pos, size_t visual_pos, size_t len)
440{
441 Evas_Object_Text_Item *it;
442
443 it = calloc(1, sizeof(Evas_Object_Text_Item));
444 it->text_pos = pos;
445 it->visual_pos = visual_pos;
446 evas_common_text_props_bidi_set(&it->text_props, o->bidi_par_props,
447 it->text_pos);
448 evas_common_text_props_script_set(&it->text_props, script);
449
450 if (fi)
451 {
452 ENFN->font_text_props_info_create(ENDT,
453 fi, str + pos, &it->text_props,
454 o->bidi_par_props, it->text_pos, len);
455
456 ENFN->font_string_size_get(ENDT,
457 o->font,
458 &it->text_props,
459 &it->w, &it->h);
460 it->adv = ENFN->font_h_advance_get(ENDT, o->font,
461 &it->text_props);
462 }
463 o->items = (Evas_Object_Text_Item *)
464 eina_inlist_append(EINA_INLIST_GET(o->items), EINA_INLIST_GET(it));
465 return it;
466}
467
468/**
469 * @internal
470 * Orders o->items according to the visual position.
471 *
472 * @param obj the evas object
473 * @param o the text object
474 */
475static void
476_evas_object_text_item_order(Evas_Object *obj, Evas_Object_Text *o)
477{
478 (void) obj;
479#ifdef BIDI_SUPPORT
480 /*FIXME: not very efficient, sort the items arrays. */
481 /* Reorder if it's a bidi text */
482 if (o->bidi_par_props)
483 {
484 Evas_Object_Text_Item *i, *j, *min;
485 i = o->items;
486 while (i)
487 {
488 min = i;
489 EINA_INLIST_FOREACH(i, j)
490 {
491 if (j->visual_pos < min->visual_pos)
492 {
493 min = j;
494 }
495 }
496 if (min != i)
497 {
498 o->items = (Evas_Object_Text_Item *) eina_inlist_remove(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min));
499 o->items = (Evas_Object_Text_Item *) eina_inlist_prepend_relative(EINA_INLIST_GET(o->items), EINA_INLIST_GET(min), EINA_INLIST_GET(i));
500 }
501
502 i = (Evas_Object_Text_Item *) EINA_INLIST_GET(min)->next;
503 }
504 }
505#endif
506
507 /* calculate the positions according to the order. */
508 {
509 Evas_Object_Text_Item *it = o->items;
510 Evas_Coord x = 0;
511
512 while (it)
513 {
514 it->x = x;
515 x += it->adv;
516 it = (Evas_Object_Text_Item *) EINA_INLIST_GET(it)->next;
517 }
518 }
519}
520
521/**
522 * @internal
523 * Populates o->items with the items of the text according to text
524 *
525 * @param obj the evas object
526 * @param o the text object
527 * @param text the text to layout
528 */
529static void
530_evas_object_text_layout(Evas_Object *obj, Evas_Object_Text *o, const Eina_Unicode *text)
531{
532 EvasBiDiStrIndex *v_to_l = NULL;
533 size_t pos, visual_pos;
534 int len = eina_unicode_strlen(text);
535#ifdef BIDI_SUPPORT
536 int par_len = len;
537 int *segment_idxs = NULL;
538 if (o->bidi_delimiters)
539 segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters);
540 evas_bidi_paragraph_props_unref(o->bidi_par_props);
541 o->bidi_par_props = evas_bidi_paragraph_props_get(text, len, segment_idxs);
542 evas_bidi_props_reorder_line(NULL, 0, len, o->bidi_par_props, &v_to_l);
543 if (segment_idxs) free(segment_idxs);
544#endif
545 visual_pos = pos = 0;
546
547 while (len > 0)
548 {
549 Evas_Font_Instance *script_fi = NULL;
550 int script_len = len, tmp_cut;
551 Evas_Script_Type script;
552 tmp_cut = evas_common_language_script_end_of_run_get(
553 text + pos,
554 o->bidi_par_props,
555 pos, len);
556 if (tmp_cut > 0)
557 script_len = tmp_cut;
558
559 script = evas_common_language_script_type_get(text, script_len);
560
561 while (script_len > 0)
562 {
563 Evas_Font_Instance *cur_fi = NULL;
564 int run_len = script_len;
565 if (o->font)
566 {
567 run_len = ENFN->font_run_end_get(ENDT,
568 o->font, &script_fi, &cur_fi,
569 script, text + pos, script_len);
570 }
571#ifdef BIDI_SUPPORT
572 visual_pos = evas_bidi_position_logical_to_visual(
573 v_to_l, par_len, pos);
574#else
575 visual_pos = pos;
576#endif
577 _evas_object_text_item_new(obj, o, cur_fi, text, script,
578 pos, visual_pos, run_len);
579
580 pos += run_len;
581 script_len -= run_len;
582 len -= run_len;
583 }
584 }
585
586 _evas_object_text_item_order(obj, o);
587
588 if (v_to_l) free(v_to_l);
589}
590
591
592EAPI void
593evas_object_text_text_set(Evas_Object *obj, const char *_text)
594{
595 Evas_Object_Text *o;
596 int is, was, len;
597 Eina_Unicode *text;
598
599 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
600 return;
601 MAGIC_CHECK_END();
602 o = (Evas_Object_Text *)(obj->object_data);
603 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
604 return;
605 MAGIC_CHECK_END();
606
607 if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text)))
608 return;
609 text = eina_unicode_utf8_to_unicode(_text, &len);
610
611 if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING);
612 was = evas_object_is_in_output_rect(obj,
613 obj->layer->evas->pointer.x,
614 obj->layer->evas->pointer.y, 1, 1);
615 /* DO II */
616 /*Update bidi_props*/
617
618 if (o->items) _evas_object_text_items_clear(o);
619
620 if ((text) && (*text))
621 {
622 _evas_object_text_layout(obj, o, text);
623 eina_stringshare_replace(&o->cur.utf8_text, _text);
624 o->prev.utf8_text = NULL;
625 }
626 else
627 {
628 eina_stringshare_replace(&o->cur.utf8_text, NULL);
629 }
630 if (text)
631 {
632 free(text);
633 text = NULL;
634 }
635 _evas_object_text_recalc(obj);
636 o->changed = 1;
637 evas_object_change(obj);
638 evas_object_clip_dirty(obj);
639 evas_object_coords_recalc(obj);
640 is = evas_object_is_in_output_rect(obj,
641 obj->layer->evas->pointer.x,
642 obj->layer->evas->pointer.y, 1, 1);
643 if ((is || was) && obj->cur.visible)
644 evas_event_feed_mouse_move(obj->layer->evas,
645 obj->layer->evas->pointer.x,
646 obj->layer->evas->pointer.y,
647 obj->layer->evas->last_timestamp,
648 NULL);
649 evas_object_inform_call_resize(obj);
650 if (text) free(text);
651}
652
653EAPI void
654evas_object_text_bidi_delimiters_set(Evas_Object *obj, const char *delim)
655{
656 Evas_Object_Text *o;
657
658 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
659 return;
660 MAGIC_CHECK_END();
661 o = (Evas_Object_Text *)(obj->object_data);
662 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
663 return;
664 MAGIC_CHECK_END();
665
666 eina_stringshare_replace(&o->bidi_delimiters, delim);
667}
668
669EAPI const char *
670evas_object_text_bidi_delimiters_get(const Evas_Object *obj)
671{
672 Evas_Object_Text *o;
673
674 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
675 return NULL;
676 MAGIC_CHECK_END();
677 o = (Evas_Object_Text *)(obj->object_data);
678 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
679 return NULL;
680 MAGIC_CHECK_END();
681
682 return o->bidi_delimiters;
683}
684
685
686EAPI const char *
687evas_object_text_text_get(const Evas_Object *obj)
688{
689 Evas_Object_Text *o;
690
691 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
692 return NULL;
693 MAGIC_CHECK_END();
694 o = (Evas_Object_Text *)(obj->object_data);
695 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
696 return NULL;
697 MAGIC_CHECK_END();
698 return o->cur.utf8_text;
699}
700
701EAPI Evas_BiDi_Direction
702evas_object_text_direction_get(const Evas_Object *obj)
703{
704 Evas_Object_Text *o;
705
706 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
707 return EVAS_BIDI_DIRECTION_NEUTRAL;
708 MAGIC_CHECK_END();
709 o = (Evas_Object_Text *)(obj->object_data);
710 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
711 return EVAS_BIDI_DIRECTION_NEUTRAL;
712 MAGIC_CHECK_END();
713 if (o->items)
714 {
715 return o->items->text_props.bidi.dir;
716 }
717 return EVAS_BIDI_DIRECTION_NEUTRAL;
718}
719
720EAPI Evas_Coord
721evas_object_text_ascent_get(const Evas_Object *obj)
722{
723 Evas_Object_Text *o;
724
725 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
726 return 0;
727 MAGIC_CHECK_END();
728 o = (Evas_Object_Text *)(obj->object_data);
729 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
730 return 0;
731 MAGIC_CHECK_END();
732 return o->ascent;
733}
734
735EAPI Evas_Coord
736evas_object_text_descent_get(const Evas_Object *obj)
737{
738 Evas_Object_Text *o;
739
740 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
741 return 0;
742 MAGIC_CHECK_END();
743 o = (Evas_Object_Text *)(obj->object_data);
744 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
745 return 0;
746 MAGIC_CHECK_END();
747 return o->descent;
748}
749
750EAPI Evas_Coord
751evas_object_text_max_ascent_get(const Evas_Object *obj)
752{
753 Evas_Object_Text *o;
754
755 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
756 return 0;
757 MAGIC_CHECK_END();
758 o = (Evas_Object_Text *)(obj->object_data);
759 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
760 return 0;
761 MAGIC_CHECK_END();
762 return o->max_ascent;
763}
764
765EAPI Evas_Coord
766evas_object_text_max_descent_get(const Evas_Object *obj)
767{
768 Evas_Object_Text *o;
769
770 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
771 return 0;
772 MAGIC_CHECK_END();
773 o = (Evas_Object_Text *)(obj->object_data);
774 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
775 return 0;
776 MAGIC_CHECK_END();
777 return o->max_descent;
778}
779
780EAPI Evas_Coord
781evas_object_text_inset_get(const Evas_Object *obj)
782{
783 Evas_Object_Text *o;
784
785 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
786 return 0;
787 MAGIC_CHECK_END();
788 o = (Evas_Object_Text *)(obj->object_data);
789 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
790 return 0;
791 MAGIC_CHECK_END();
792 if (!o->font) return 0;
793 if (!o->items) return 0;
794 return ENFN->font_inset_get(ENDT, o->font, &o->items->text_props);
795}
796
797EAPI Evas_Coord
798evas_object_text_horiz_advance_get(const Evas_Object *obj)
799{
800 Evas_Object_Text *o;
801
802 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
803 return 0;
804 MAGIC_CHECK_END();
805 o = (Evas_Object_Text *)(obj->object_data);
806 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
807 return 0;
808 MAGIC_CHECK_END();
809 if (!o->font) return 0;
810 if (!o->items) return 0;
811 return _evas_object_text_horiz_advance_get(obj, o);
812}
813
814EAPI Evas_Coord
815evas_object_text_vert_advance_get(const Evas_Object *obj)
816{
817 Evas_Object_Text *o;
818
819 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
820 return 0;
821 MAGIC_CHECK_END();
822 o = (Evas_Object_Text *)(obj->object_data);
823 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
824 return 0;
825 MAGIC_CHECK_END();
826 if (!o->font) return 0;
827 if (!o->items) return o->ascent + o->descent;
828 return _evas_object_text_vert_advance_get(obj, o);
829}
830
831EAPI Eina_Bool
832evas_object_text_char_pos_get(const Evas_Object *obj, int pos, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
833{
834 Evas_Object_Text *o;
835 int l = 0, r = 0, t = 0, b = 0;
836 int ret, x = 0, y = 0, w = 0, h = 0;
837
838 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
839 return EINA_FALSE;
840 MAGIC_CHECK_END();
841 o = (Evas_Object_Text *)(obj->object_data);
842 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
843 return EINA_FALSE;
844 MAGIC_CHECK_END();
845 if (!o->font) return EINA_FALSE;
846 if (!o->items || (pos < 0)) return EINA_FALSE;
847 ret = _evas_object_text_char_coords_get(obj, o, (size_t) pos,
848 &x, &y, &w, &h);
849 evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
850 y += o->max_ascent - t;
851 x -= l;
852 if (x < 0)
853 {
854 w += x;
855 x = 0;
856 }
857 if ((x + w) > obj->cur.geometry.w) w = obj->cur.geometry.w - x;
858 if (w < 0) w = 0;
859 if (y < 0)
860 {
861 h += y;
862 y = 0;
863 }
864 if ((y + h) > obj->cur.geometry.h) h = obj->cur.geometry.h - y;
865 if (h < 0) h = 0;
866 if (cx) *cx = x;
867 if (cy) *cy = y;
868 if (cw) *cw = w + l + r;
869 if (ch) *ch = h + t + b;
870 return ret;
871}
872
873
874EAPI int
875evas_object_text_last_up_to_pos(const Evas_Object *obj, Evas_Coord x, Evas_Coord y)
876{
877 Evas_Object_Text *o;
878
879 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
880 return -1;
881 MAGIC_CHECK_END();
882 o = (Evas_Object_Text *)(obj->object_data);
883 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
884 return -1;
885 MAGIC_CHECK_END();
886 if (!o->font) return -1;
887 if (!o->items) return -1;
888 return _evas_object_text_last_up_to_pos(obj, o, x, y - o->max_ascent);
889}
890
891EAPI int
892evas_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)
893{
894 Evas_Object_Text *o;
895 int l = 0, r = 0, t = 0, b = 0;
896 int ret, rx = 0, ry = 0, rw = 0, rh = 0;
897
898 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
899 return -1;
900 MAGIC_CHECK_END();
901 o = (Evas_Object_Text *)(obj->object_data);
902 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
903 return -1;
904 MAGIC_CHECK_END();
905 if (!o->font) return -1;
906 if (!o->items) return -1;
907 ret = _evas_object_text_char_at_coords(obj, o, x, y - o->max_ascent,
908 &rx, &ry, &rw, &rh);
909 evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
910 ry += o->max_ascent - t;
911 rx -= l;
912 if (rx < 0)
913 {
914 rw += rx;
915 rx = 0;
916 }
917 if ((rx + rw) > obj->cur.geometry.w) rw = obj->cur.geometry.w - rx;
918 if (rw < 0) rw = 0;
919 if (ry < 0)
920 {
921 rh += ry;
922 ry = 0;
923 }
924 if ((ry + rh) > obj->cur.geometry.h) rh = obj->cur.geometry.h - ry;
925 if (rh < 0) rh = 0;
926 if (cx) *cx = rx;
927 if (cy) *cy = ry;
928 if (cw) *cw = rw + l + r;
929 if (ch) *ch = rh + t + b;
930 return ret;
931}
932
933EAPI void
934evas_object_text_style_set(Evas_Object *obj, Evas_Text_Style_Type style)
935{
936 Evas_Object_Text *o;
937 int pl = 0, pr = 0, pt = 0, pb = 0, l = 0, r = 0, t = 0, b = 0;
938
939 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
940 return;
941 MAGIC_CHECK_END();
942 o = (Evas_Object_Text *)(obj->object_data);
943 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
944 return;
945 MAGIC_CHECK_END();
946 if (o->cur.style == style) return;
947 evas_text_style_pad_get(o->cur.style, &pl, &pr, &pt, &pb);
948 o->cur.style = style;
949 evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
950 if (o->items)
951 obj->cur.geometry.w += (l - pl) + (r - pr);
952 else
953 obj->cur.geometry.w = 0;
954 obj->cur.geometry.h += (t - pt) + (b - pb);
955 evas_object_change(obj);
956 evas_object_clip_dirty(obj);
957}
958
959EAPI Evas_Text_Style_Type
960evas_object_text_style_get(const Evas_Object *obj)
961{
962 Evas_Object_Text *o;
963
964 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
965 return EVAS_TEXT_STYLE_PLAIN;
966 MAGIC_CHECK_END();
967 o = (Evas_Object_Text *)(obj->object_data);
968 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
969 return EVAS_TEXT_STYLE_PLAIN;
970 MAGIC_CHECK_END();
971 return o->cur.style;
972}
973
974EAPI void
975evas_object_text_shadow_color_set(Evas_Object *obj, int r, int g, int b, int a)
976{
977 Evas_Object_Text *o;
978
979 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
980 return;
981 MAGIC_CHECK_END();
982 o = (Evas_Object_Text *)(obj->object_data);
983 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
984 return;
985 MAGIC_CHECK_END();
986 if ((o->cur.shadow.r == r) && (o->cur.shadow.g == g) &&
987 (o->cur.shadow.b == b) && (o->cur.shadow.a == a))
988 return;
989 o->cur.shadow.r = r;
990 o->cur.shadow.g = g;
991 o->cur.shadow.b = b;
992 o->cur.shadow.a = a;
993 o->changed = 1;
994 evas_object_change(obj);
995}
996
997EAPI void
998evas_object_text_shadow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
999{
1000 Evas_Object_Text *o;
1001
1002 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1003 if (r) *r = 0;
1004 if (g) *g = 0;
1005 if (b) *b = 0;
1006 if (a) *a = 0;
1007 return;
1008 MAGIC_CHECK_END();
1009 o = (Evas_Object_Text *)(obj->object_data);
1010 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1011 if (r) *r = 0;
1012 if (g) *g = 0;
1013 if (b) *b = 0;
1014 if (a) *a = 0;
1015 return;
1016 MAGIC_CHECK_END();
1017 if (r) *r = o->cur.shadow.r;
1018 if (g) *g = o->cur.shadow.g;
1019 if (b) *b = o->cur.shadow.b;
1020 if (a) *a = o->cur.shadow.a;
1021}
1022
1023EAPI void
1024evas_object_text_glow_color_set(Evas_Object *obj, int r, int g, int b, int a)
1025{
1026 Evas_Object_Text *o;
1027
1028 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1029 return;
1030 MAGIC_CHECK_END();
1031 o = (Evas_Object_Text *)(obj->object_data);
1032 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1033 return;
1034 MAGIC_CHECK_END();
1035 if ((o->cur.glow.r == r) && (o->cur.glow.g == g) &&
1036 (o->cur.glow.b == b) && (o->cur.glow.a == a))
1037 return;
1038 o->cur.glow.r = r;
1039 o->cur.glow.g = g;
1040 o->cur.glow.b = b;
1041 o->cur.glow.a = a;
1042 o->changed = 1;
1043 evas_object_change(obj);
1044}
1045
1046EAPI void
1047evas_object_text_glow_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
1048{
1049 Evas_Object_Text *o;
1050
1051 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1052 if (r) *r = 0;
1053 if (g) *g = 0;
1054 if (b) *b = 0;
1055 if (a) *a = 0;
1056 return;
1057 MAGIC_CHECK_END();
1058 o = (Evas_Object_Text *)(obj->object_data);
1059 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1060 if (r) *r = 0;
1061 if (g) *g = 0;
1062 if (b) *b = 0;
1063 if (a) *a = 0;
1064 return;
1065 MAGIC_CHECK_END();
1066 if (r) *r = o->cur.glow.r;
1067 if (g) *g = o->cur.glow.g;
1068 if (b) *b = o->cur.glow.b;
1069 if (a) *a = o->cur.glow.a;
1070}
1071
1072EAPI void
1073evas_object_text_glow2_color_set(Evas_Object *obj, int r, int g, int b, int a)
1074{
1075 Evas_Object_Text *o;
1076
1077 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1078 return;
1079 MAGIC_CHECK_END();
1080 o = (Evas_Object_Text *)(obj->object_data);
1081 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1082 return;
1083 MAGIC_CHECK_END();
1084 if ((o->cur.glow2.r == r) && (o->cur.glow2.g == g) &&
1085 (o->cur.glow2.b == b) && (o->cur.glow2.a == a))
1086 return;
1087 o->cur.glow2.r = r;
1088 o->cur.glow2.g = g;
1089 o->cur.glow2.b = b;
1090 o->cur.glow2.a = a;
1091 o->changed = 1;
1092 evas_object_change(obj);
1093}
1094
1095EAPI void
1096evas_object_text_glow2_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
1097{
1098 Evas_Object_Text *o;
1099
1100 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1101 if (r) *r = 0;
1102 if (g) *g = 0;
1103 if (b) *b = 0;
1104 if (a) *a = 0;
1105 return;
1106 MAGIC_CHECK_END();
1107 o = (Evas_Object_Text *)(obj->object_data);
1108 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1109 if (r) *r = 0;
1110 if (g) *g = 0;
1111 if (b) *b = 0;
1112 if (a) *a = 0;
1113 return;
1114 MAGIC_CHECK_END();
1115 if (r) *r = o->cur.glow2.r;
1116 if (g) *g = o->cur.glow2.g;
1117 if (b) *b = o->cur.glow2.b;
1118 if (a) *a = o->cur.glow2.a;
1119}
1120
1121EAPI void
1122evas_object_text_outline_color_set(Evas_Object *obj, int r, int g, int b, int a)
1123{
1124 Evas_Object_Text *o;
1125
1126 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1127 return;
1128 MAGIC_CHECK_END();
1129 o = (Evas_Object_Text *)(obj->object_data);
1130 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1131 return;
1132 MAGIC_CHECK_END();
1133 if ((o->cur.outline.r == r) && (o->cur.outline.g == g) &&
1134 (o->cur.outline.b == b) && (o->cur.outline.a == a))
1135 return;
1136 o->cur.outline.r = r;
1137 o->cur.outline.g = g;
1138 o->cur.outline.b = b;
1139 o->cur.outline.a = a;
1140 o->changed = 1;
1141 evas_object_change(obj);
1142}
1143
1144EAPI void
1145evas_object_text_outline_color_get(const Evas_Object *obj, int *r, int *g, int *b, int *a)
1146{
1147 Evas_Object_Text *o;
1148
1149 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1150 if (r) *r = 0;
1151 if (g) *g = 0;
1152 if (b) *b = 0;
1153 if (a) *a = 0;
1154 return;
1155 MAGIC_CHECK_END();
1156 o = (Evas_Object_Text *)(obj->object_data);
1157 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1158 if (r) *r = 0;
1159 if (g) *g = 0;
1160 if (b) *b = 0;
1161 if (a) *a = 0;
1162 return;
1163 MAGIC_CHECK_END();
1164 if (r) *r = o->cur.outline.r;
1165 if (g) *g = o->cur.outline.g;
1166 if (b) *b = o->cur.outline.b;
1167 if (a) *a = o->cur.outline.a;
1168}
1169
1170EAPI void
1171evas_object_text_style_pad_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
1172{
1173 int sl = 0, sr = 0, st = 0, sb = 0;
1174 Evas_Object_Text *o;
1175
1176 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1177 if (l) *l = 0;
1178 if (r) *r = 0;
1179 if (t) *t = 0;
1180 if (b) *b = 0;
1181 return;
1182 MAGIC_CHECK_END();
1183 o = (Evas_Object_Text *)(obj->object_data);
1184 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1185 if (l) *l = 0;
1186 if (r) *r = 0;
1187 if (t) *t = 0;
1188 if (b) *b = 0;
1189 return;
1190 MAGIC_CHECK_END();
1191 /* use temps to be certain we have initialized values */
1192 evas_text_style_pad_get(o->cur.style, &sl, &sr, &st, &sb);
1193 if (l) *l = sl;
1194 if (r) *r = sr;
1195 if (t) *t = st;
1196 if (b) *b = sb;
1197}
1198
1199
1200
1201
1202EAPI int
1203evas_string_char_next_get(const char *str, int pos, int *decoded)
1204{
1205 int p, d;
1206
1207 if (decoded) *decoded = 0;
1208 if ((!str) || (pos < 0)) return 0;
1209 p = pos;
1210 d = eina_unicode_utf8_get_next(str, &p);
1211 if (decoded) *decoded = d;
1212 return p;
1213}
1214
1215EAPI int
1216evas_string_char_prev_get(const char *str, int pos, int *decoded)
1217{
1218 int p, d;
1219
1220 if (decoded) *decoded = 0;
1221 if ((!str) || (pos < 1)) return 0;
1222 p = pos;
1223 d = eina_unicode_utf8_get_prev(str, &p);
1224 if (decoded) *decoded = d;
1225 return p;
1226}
1227
1228EAPI int
1229evas_string_char_len_get(const char *str)
1230{
1231 if (!str) return 0;
1232 return eina_unicode_utf8_get_len(str);
1233}
1234
1235void
1236evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b)
1237{
1238 int sl = 0, sr = 0, st = 0, sb = 0;
1239
1240 /* Don't calc anything if there's no style. */
1241 if (style != EVAS_TEXT_STYLE_PLAIN)
1242 {
1243 int shad_sz = 0, shad_dst = 0, out_sz = 0;
1244 int dx = 0, minx = 0, maxx = 0;
1245 int dy = 0, miny = 0, maxy = 0;
1246 Eina_Bool have_shadow = EINA_FALSE;
1247
1248 switch (style & EVAS_TEXT_STYLE_MASK_BASIC)
1249 {
1250 case EVAS_TEXT_STYLE_SHADOW:
1251 shad_dst = 1;
1252 have_shadow = EINA_TRUE;
1253 break;
1254 case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
1255 case EVAS_TEXT_STYLE_FAR_SHADOW:
1256 shad_dst = 2;
1257 out_sz = 1;
1258 have_shadow = EINA_TRUE;
1259 break;
1260 case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
1261 shad_dst = 1;
1262 shad_sz = 2;
1263 out_sz = 1;
1264 have_shadow = EINA_TRUE;
1265 break;
1266 case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
1267 shad_dst = 2;
1268 shad_sz = 2;
1269 have_shadow = EINA_TRUE;
1270 break;
1271 case EVAS_TEXT_STYLE_SOFT_SHADOW:
1272 shad_dst = 1;
1273 shad_sz = 2;
1274 have_shadow = EINA_TRUE;
1275 break;
1276 case EVAS_TEXT_STYLE_GLOW:
1277 case EVAS_TEXT_STYLE_SOFT_OUTLINE:
1278 out_sz = 2;
1279 break;
1280 case EVAS_TEXT_STYLE_OUTLINE:
1281 out_sz = 1;
1282 break;
1283 default:
1284 break;
1285 }
1286
1287 minx = -out_sz;
1288 maxx = out_sz;
1289 miny = -out_sz;
1290 maxy = out_sz;
1291 if (have_shadow)
1292 {
1293 int shx1, shx2, shy1, shy2;
1294 switch (style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
1295 {
1296 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
1297 dx = 1;
1298 dy = 1;
1299 break;
1300 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
1301 dx = 0;
1302 dy = 1;
1303 break;
1304 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
1305 dx = -1;
1306 dy = 1;
1307 break;
1308 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
1309 dx = -1;
1310 dy = 0;
1311 break;
1312 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
1313 dx = -1;
1314 dy = -1;
1315 break;
1316 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
1317 dx = 0;
1318 dy = -1;
1319 break;
1320 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
1321 dx = 1;
1322 dy = -1;
1323 break;
1324 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
1325 dx = 1;
1326 dy = 0;
1327 default:
1328 break;
1329 }
1330 shx1 = dx * shad_dst;
1331 shx1 -= shad_sz;
1332 shx2 = dx * shad_dst;
1333 shx2 += shad_sz;
1334 if (shx1 < minx) minx = shx1;
1335 if (shx2 > maxx) maxx = shx2;
1336
1337 shy1 = dy * shad_dst;
1338 shy1 -= shad_sz;
1339 shy2 = dy * shad_dst;
1340 shy2 += shad_sz;
1341 if (shy1 < miny) miny = shy1;
1342 if (shy2 > maxy) maxy = shy2;
1343 }
1344
1345 if (l) sl = *l;
1346 if (r) sr = *r;
1347 if (t) st = *t;
1348 if (b) sb = *b;
1349
1350 if (sr < maxx) sr = maxx;
1351 if (sl < -minx) sl = -minx;
1352 if (sb < maxy) sb = maxy;
1353 if (st < -miny) st = -miny;
1354 }
1355
1356 if (l) *l = sl;
1357 if (r) *r = sr;
1358 if (t) *t = st;
1359 if (b) *b = sb;
1360}
1361
1362/* all nice and private */
1363static void
1364evas_object_text_init(Evas_Object *obj)
1365{
1366 /* alloc text ob, setup methods and default values */
1367 obj->object_data = evas_object_text_new();
1368 /* set up default settings for this kind of object */
1369 obj->cur.color.r = 255;
1370 obj->cur.color.g = 255;
1371 obj->cur.color.b = 255;
1372 obj->cur.color.a = 255;
1373 obj->cur.geometry.x = 0;
1374 obj->cur.geometry.y = 0;
1375 obj->cur.geometry.w = 0;
1376 obj->cur.geometry.h = 0;
1377 obj->cur.layer = 0;
1378 /* set up object-specific settings */
1379 obj->prev = obj->cur;
1380 /* set up methods (compulsory) */
1381 obj->func = &object_func;
1382 obj->type = o_type;
1383}
1384
1385static void *
1386evas_object_text_new(void)
1387{
1388 Evas_Object_Text *o;
1389
1390 /* alloc obj private data */
1391 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_text", Evas_Object_Text, 128, NULL);
1392 o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Text);
1393 if (!o) return NULL;
1394 EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Text);
1395 o->magic = MAGIC_OBJ_TEXT;
1396 o->prev = o->cur;
1397#ifdef BIDI_SUPPORT
1398 o->bidi_par_props = evas_bidi_paragraph_props_new();
1399#endif
1400 return o;
1401}
1402
1403static void
1404evas_object_text_free(Evas_Object *obj)
1405{
1406 Evas_Object_Text *o;
1407
1408 /* frees private object data. very simple here */
1409 o = (Evas_Object_Text *)(obj->object_data);
1410 MAGIC_CHECK(o, Evas_Object_Text, MAGIC_OBJ_TEXT);
1411 return;
1412 MAGIC_CHECK_END();
1413 /* free obj */
1414 if (o->items) _evas_object_text_items_clear(o);
1415 if (o->cur.utf8_text) eina_stringshare_del(o->cur.utf8_text);
1416 if (o->cur.font) eina_stringshare_del(o->cur.font);
1417 if (o->cur.fdesc) evas_font_desc_unref(o->cur.fdesc);
1418 if (o->cur.source) eina_stringshare_del(o->cur.source);
1419 if (o->font) evas_font_free(obj->layer->evas, o->font);
1420#ifdef BIDI_SUPPORT
1421 evas_bidi_paragraph_props_unref(o->bidi_par_props);
1422#endif
1423 o->magic = 0;
1424 EVAS_MEMPOOL_FREE(_mp_obj, o);
1425}
1426
1427static void
1428evas_object_text_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
1429{
1430 int i, j;
1431 Evas_Object_Text *o;
1432 Evas_Object_Text_Item *it;
1433 const char vals[5][5] =
1434 {
1435 {0, 1, 2, 1, 0},
1436 {1, 3, 4, 3, 1},
1437 {2, 4, 5, 4, 2},
1438 {1, 3, 4, 3, 1},
1439 {0, 1, 2, 1, 0}
1440 };
1441 int sl = 0, st = 0;
1442 int shad_dst, shad_sz, dx, dy, haveshad;
1443
1444 /* render object to surface with context, and offxet by x,y */
1445 o = (Evas_Object_Text *)(obj->object_data);
1446 evas_text_style_pad_get(o->cur.style, &sl, NULL, &st, NULL);
1447 ENFN->context_multiplier_unset(output, context);
1448 ENFN->context_render_op_set(output, context, obj->cur.render_op);
1449 /* FIXME: This clipping is just until we fix inset handling correctly. */
1450 ENFN->context_clip_clip(output, context,
1451 obj->cur.geometry.x + x,
1452 obj->cur.geometry.y + y,
1453 obj->cur.geometry.w,
1454 obj->cur.geometry.h);
1455/*
1456 ENFN->context_color_set(output,
1457 context,
1458 230, 160, 30, 100);
1459 ENFN->rectangle_draw(output,
1460 context,
1461 surface,
1462 obj->cur.geometry.x + x,
1463 obj->cur.geometry.y + y,
1464 obj->cur.geometry.w,
1465 obj->cur.geometry.h);
1466 */
1467#define COLOR_ONLY_SET(object, sub, col) \
1468 ENFN->context_color_set(output, context, \
1469 object->sub.col.r, \
1470 object->sub.col.g, \
1471 object->sub.col.b, \
1472 object->sub.col.a);
1473
1474#define COLOR_SET(object, sub, col) \
1475 if (obj->cur.clipper)\
1476 ENFN->context_color_set(output, context, \
1477 ((int)object->sub.col.r * ((int)obj->cur.clipper->cur.cache.clip.r + 1)) >> 8, \
1478 ((int)object->sub.col.g * ((int)obj->cur.clipper->cur.cache.clip.g + 1)) >> 8, \
1479 ((int)object->sub.col.b * ((int)obj->cur.clipper->cur.cache.clip.b + 1)) >> 8, \
1480 ((int)object->sub.col.a * ((int)obj->cur.clipper->cur.cache.clip.a + 1)) >> 8); \
1481 else\
1482 ENFN->context_color_set(output, context, \
1483 object->sub.col.r, \
1484 object->sub.col.g, \
1485 object->sub.col.b, \
1486 object->sub.col.a);
1487
1488#define COLOR_SET_AMUL(object, sub, col, amul) \
1489 if (obj->cur.clipper) \
1490 ENFN->context_color_set(output, context, \
1491 (((int)object->sub.col.r) * ((int)obj->cur.clipper->cur.cache.clip.r) * (amul)) / 65025, \
1492 (((int)object->sub.col.g) * ((int)obj->cur.clipper->cur.cache.clip.g) * (amul)) / 65025, \
1493 (((int)object->sub.col.b) * ((int)obj->cur.clipper->cur.cache.clip.b) * (amul)) / 65025, \
1494 (((int)object->sub.col.a) * ((int)obj->cur.clipper->cur.cache.clip.a) * (amul)) / 65025); \
1495 else \
1496 ENFN->context_color_set(output, context, \
1497 (((int)object->sub.col.r) * (amul)) / 255, \
1498 (((int)object->sub.col.g) * (amul)) / 255, \
1499 (((int)object->sub.col.b) * (amul)) / 255, \
1500 (((int)object->sub.col.a) * (amul)) / 255);
1501
1502#define DRAW_TEXT(ox, oy) \
1503 if ((o->font) && (it->text_props.len > 0)) \
1504 ENFN->font_draw(output, \
1505 context, \
1506 surface, \
1507 o->font, \
1508 obj->cur.geometry.x + x + sl + ox + it->x, \
1509 obj->cur.geometry.y + y + st + oy + \
1510 (int) \
1511 (((o->max_ascent * obj->cur.geometry.h) / obj->cur.geometry.h) - 0.5), \
1512 obj->cur.geometry.w, \
1513 obj->cur.geometry.h, \
1514 obj->cur.geometry.w, \
1515 obj->cur.geometry.h, \
1516 &it->text_props);
1517
1518 /* shadows */
1519 shad_dst = shad_sz = dx = dy = haveshad = 0;
1520 switch (o->cur.style & EVAS_TEXT_STYLE_MASK_BASIC)
1521 {
1522 case EVAS_TEXT_STYLE_SHADOW:
1523 case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
1524 shad_dst = 1;
1525 haveshad = 1;
1526 break;
1527 case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
1528 case EVAS_TEXT_STYLE_FAR_SHADOW:
1529 shad_dst = 2;
1530 haveshad = 1;
1531 break;
1532 case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
1533 shad_dst = 2;
1534 shad_sz = 2;
1535 haveshad = 1;
1536 break;
1537 case EVAS_TEXT_STYLE_SOFT_SHADOW:
1538 shad_dst = 1;
1539 shad_sz = 2;
1540 haveshad = 1;
1541 break;
1542 default:
1543 break;
1544 }
1545 if (haveshad)
1546 {
1547 if (shad_dst > 0)
1548 {
1549 switch (o->cur.style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
1550 {
1551 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
1552 dx = 1;
1553 dy = 1;
1554 break;
1555 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
1556 dx = 0;
1557 dy = 1;
1558 break;
1559 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
1560 dx = -1;
1561 dy = 1;
1562 break;
1563 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
1564 dx = -1;
1565 dy = 0;
1566 break;
1567 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
1568 dx = -1;
1569 dy = -1;
1570 break;
1571 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
1572 dx = 0;
1573 dy = -1;
1574 break;
1575 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
1576 dx = 1;
1577 dy = -1;
1578 break;
1579 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
1580 dx = 1;
1581 dy = 0;
1582 default:
1583 break;
1584 }
1585 dx *= shad_dst;
1586 dy *= shad_dst;
1587 }
1588 }
1589 EINA_INLIST_FOREACH(EINA_INLIST_GET(o->items), it)
1590 {
1591 /* Shadows */
1592 if (haveshad)
1593 {
1594 switch (shad_sz)
1595 {
1596 case 0:
1597 COLOR_SET(o, cur, shadow);
1598 DRAW_TEXT(dx, dy);
1599 break;
1600 case 2:
1601 for (j = 0; j < 5; j++)
1602 {
1603 for (i = 0; i < 5; i++)
1604 {
1605 if (vals[i][j] != 0)
1606 {
1607 COLOR_SET_AMUL(o, cur, shadow, vals[i][j] * 50);
1608 DRAW_TEXT(i - 2 + dx, j - 2 + dy);
1609 }
1610 }
1611 }
1612 break;
1613 default:
1614 break;
1615 }
1616 }
1617
1618 /* glows */
1619 if (o->cur.style == EVAS_TEXT_STYLE_GLOW)
1620 {
1621 for (j = 0; j < 5; j++)
1622 {
1623 for (i = 0; i < 5; i++)
1624 {
1625 if (vals[i][j] != 0)
1626 {
1627 COLOR_SET_AMUL(o, cur, glow, vals[i][j] * 50);
1628 DRAW_TEXT(i - 2, j - 2);
1629 }
1630 }
1631 }
1632 COLOR_SET(o, cur, glow2);
1633 DRAW_TEXT(-1, 0);
1634 DRAW_TEXT(1, 0);
1635 DRAW_TEXT(0, -1);
1636 DRAW_TEXT(0, 1);
1637 }
1638
1639 /* outlines */
1640 if ((o->cur.style == EVAS_TEXT_STYLE_OUTLINE) ||
1641 (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) ||
1642 (o->cur.style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW))
1643 {
1644 COLOR_SET(o, cur, outline);
1645 DRAW_TEXT(-1, 0);
1646 DRAW_TEXT(1, 0);
1647 DRAW_TEXT(0, -1);
1648 DRAW_TEXT(0, 1);
1649 }
1650 else if (o->cur.style == EVAS_TEXT_STYLE_SOFT_OUTLINE)
1651 {
1652 for (j = 0; j < 5; j++)
1653 {
1654 for (i = 0; i < 5; i++)
1655 {
1656 if (((i != 2) || (j != 2)) && (vals[i][j] != 0))
1657 {
1658 COLOR_SET_AMUL(o, cur, outline, vals[i][j] * 50);
1659 DRAW_TEXT(i - 2, j - 2);
1660 }
1661 }
1662 }
1663 }
1664
1665 /* normal text */
1666 COLOR_ONLY_SET(obj, cur.cache, clip);
1667 DRAW_TEXT(0, 0);
1668 }
1669}
1670
1671static void
1672evas_object_text_render_pre(Evas_Object *obj)
1673{
1674 Evas_Object_Text *o;
1675 int is_v, was_v;
1676
1677 /* dont pre-render the obj twice! */
1678 if (obj->pre_render_done) return;
1679 obj->pre_render_done = 1;
1680 /* pre-render phase. this does anything an object needs to do just before
1681 rendering. This could mean loading the image data, retrieving it from
1682 elsewhere, decoding video etc.
1683 Then when this is done the object needs to figure if it changed and
1684 if so what and where and add the appropriate redraw rectangles */
1685 o = (Evas_Object_Text *)(obj->object_data);
1686 /* if someone is clipping this obj - go calculate the clipper */
1687 if (obj->cur.clipper)
1688 {
1689 if (obj->cur.cache.clip.dirty)
1690 evas_object_clip_recalc(obj->cur.clipper);
1691 obj->cur.clipper->func->render_pre(obj->cur.clipper);
1692 }
1693 /* now figure what changed and add draw rects
1694 if it just became visible or invisible */
1695 is_v = evas_object_is_visible(obj);
1696 was_v = evas_object_was_visible(obj);
1697 if (is_v != was_v)
1698 {
1699 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes,
1700 obj, is_v, was_v);
1701 goto done;
1702 }
1703 if ((obj->cur.map != obj->prev.map) ||
1704 (obj->cur.usemap != obj->prev.usemap))
1705 {
1706 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
1707 obj);
1708 goto done;
1709 }
1710 /* its not visible - we accounted for it appearing or not so just abort */
1711 if (!is_v) goto done;
1712 /* clipper changed this is in addition to anything else for obj */
1713 evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
1714 /* if we restacked (layer or just within a layer) and dont clip anyone */
1715 if (obj->restack)
1716 {
1717 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
1718 obj);
1719 goto done;
1720 }
1721 /* if it changed color */
1722 if ((obj->cur.color.r != obj->prev.color.r) ||
1723 (obj->cur.color.g != obj->prev.color.g) ||
1724 (obj->cur.color.b != obj->prev.color.b) ||
1725 (obj->cur.color.a != obj->prev.color.a))
1726 {
1727 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
1728 obj);
1729 goto done;
1730 }
1731 /* if it changed geometry - and obviously not visibility or color
1732 calculate differences since we have a constant color fill
1733 we really only need to update the differences */
1734 if ((obj->cur.geometry.x != obj->prev.geometry.x) ||
1735 (obj->cur.geometry.y != obj->prev.geometry.y) ||
1736 (obj->cur.geometry.w != obj->prev.geometry.w) ||
1737 (obj->cur.geometry.h != obj->prev.geometry.h))
1738 {
1739 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
1740 obj);
1741 goto done;
1742 }
1743 if (obj->cur.render_op != obj->prev.render_op)
1744 {
1745 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
1746 obj);
1747 goto done;
1748 }
1749 if (obj->cur.scale != obj->prev.scale)
1750 {
1751 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
1752 obj);
1753 goto done;
1754 }
1755 if (o->changed)
1756 {
1757 if ((o->cur.size != o->prev.size) ||
1758 ((o->cur.font != o->prev.font)) ||
1759 ((o->cur.utf8_text != o->prev.utf8_text)) ||
1760 ((o->cur.style != o->prev.style)) ||
1761 ((o->cur.shadow.r != o->prev.shadow.r)) ||
1762 ((o->cur.shadow.g != o->prev.shadow.g)) ||
1763 ((o->cur.shadow.b != o->prev.shadow.b)) ||
1764 ((o->cur.shadow.a != o->prev.shadow.a)) ||
1765 ((o->cur.outline.r != o->prev.outline.r)) ||
1766 ((o->cur.outline.g != o->prev.outline.g)) ||
1767 ((o->cur.outline.b != o->prev.outline.b)) ||
1768 ((o->cur.outline.a != o->prev.outline.a)) ||
1769 ((o->cur.glow.r != o->prev.glow.r)) ||
1770 ((o->cur.glow.g != o->prev.glow.g)) ||
1771 ((o->cur.glow.b != o->prev.glow.b)) ||
1772 ((o->cur.glow.a != o->prev.glow.a)) ||
1773 ((o->cur.glow2.r != o->prev.glow2.r)) ||
1774 ((o->cur.glow2.g != o->prev.glow2.g)) ||
1775 ((o->cur.glow2.b != o->prev.glow2.b)) ||
1776 ((o->cur.glow2.a != o->prev.glow2.a)))
1777 {
1778 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
1779 obj);
1780 goto done;
1781 }
1782 }
1783 done:
1784 evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes,
1785 obj, is_v, was_v);
1786}
1787
1788static void
1789evas_object_text_render_post(Evas_Object *obj)
1790{
1791 Evas_Object_Text *o;
1792
1793 /* this moves the current data to the previous state parts of the object
1794 in whatever way is safest for the object. also if we don't need object
1795 data anymore we can free it if the object deems this is a good idea */
1796 o = (Evas_Object_Text *)(obj->object_data);
1797 /* remove those pesky changes */
1798 evas_object_clip_changes_clean(obj);
1799 /* move cur to prev safely for object data */
1800 obj->prev = obj->cur;
1801 o->prev = o->cur;
1802 o->changed = 0;
1803}
1804
1805static unsigned int
1806evas_object_text_id_get(Evas_Object *obj)
1807{
1808 Evas_Object_Text *o;
1809
1810 o = (Evas_Object_Text *)(obj->object_data);
1811 if (!o) return 0;
1812 return MAGIC_OBJ_TEXT;
1813}
1814
1815static unsigned int
1816evas_object_text_visual_id_get(Evas_Object *obj)
1817{
1818 Evas_Object_Text *o;
1819
1820 o = (Evas_Object_Text *)(obj->object_data);
1821 if (!o) return 0;
1822 return MAGIC_OBJ_SHAPE;
1823}
1824
1825static void *
1826evas_object_text_engine_data_get(Evas_Object *obj)
1827{
1828 Evas_Object_Text *o;
1829
1830 o = (Evas_Object_Text *)(obj->object_data);
1831 if (!o) return NULL;
1832 return o->font;
1833}
1834
1835static int
1836evas_object_text_is_opaque(Evas_Object *obj __UNUSED__)
1837{
1838 /* this returns 1 if the internal object data implies that the object is
1839 currently fully opaque over the entire gradient it occupies */
1840 return 0;
1841}
1842
1843static int
1844evas_object_text_was_opaque(Evas_Object *obj __UNUSED__)
1845{
1846 /* this returns 1 if the internal object data implies that the object was
1847 currently fully opaque over the entire gradient it occupies */
1848 return 0;
1849}
1850
1851static void
1852evas_object_text_scale_update(Evas_Object *obj)
1853{
1854 Evas_Object_Text *o;
1855 int size;
1856 const char *font;
1857
1858 o = (Evas_Object_Text *)(obj->object_data);
1859 font = eina_stringshare_add(o->cur.font);
1860 size = o->cur.size;
1861 if (o->cur.font) eina_stringshare_del(o->cur.font);
1862 o->cur.font = NULL;
1863 o->prev.font = NULL;
1864 o->cur.size = 0;
1865 o->prev.size = 0;
1866 evas_object_text_font_set(obj, font, size);
1867}
1868
1869void
1870_evas_object_text_rehint(Evas_Object *obj)
1871{
1872 Evas_Object_Text *o;
1873 int is, was;
1874
1875 o = (Evas_Object_Text *)(obj->object_data);
1876 if (!o->font) return;
1877#ifdef EVAS_FRAME_QUEUING
1878 evas_common_pipe_op_text_flush((RGBA_Font *) o->font);
1879#endif
1880 evas_font_load_hinting_set(obj->layer->evas, o->font,
1881 obj->layer->evas->hinting);
1882 was = evas_object_is_in_output_rect(obj,
1883 obj->layer->evas->pointer.x,
1884 obj->layer->evas->pointer.y, 1, 1);
1885 /* DO II */
1886 _evas_object_text_recalc(obj);
1887 o->changed = 1;
1888 evas_object_change(obj);
1889 evas_object_clip_dirty(obj);
1890 evas_object_coords_recalc(obj);
1891 is = evas_object_is_in_output_rect(obj,
1892 obj->layer->evas->pointer.x,
1893 obj->layer->evas->pointer.y, 1, 1);
1894 if ((is || was) && obj->cur.visible)
1895 evas_event_feed_mouse_move(obj->layer->evas,
1896 obj->layer->evas->pointer.x,
1897 obj->layer->evas->pointer.y,
1898 obj->layer->evas->last_timestamp,
1899 NULL);
1900 evas_object_inform_call_resize(obj);
1901}
1902
1903static void
1904_evas_object_text_recalc(Evas_Object *obj)
1905{
1906 Evas_Object_Text *o;
1907 Eina_Unicode *text = NULL;
1908 o = (Evas_Object_Text *)(obj->object_data);
1909
1910 if (o->items) _evas_object_text_items_clear(o);
1911 if (o->cur.utf8_text)
1912 text = eina_unicode_utf8_to_unicode(o->cur.utf8_text,
1913 NULL);
1914
1915 if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING);
1916
1917 _evas_object_text_layout(obj, o, text);
1918
1919 if (text) free(text);
1920
1921 if ((o->font) && (o->items))
1922 {
1923 int w, h;
1924 int l = 0, r = 0, t = 0, b = 0;
1925
1926 w = _evas_object_text_horiz_advance_get(obj, o);
1927 h = _evas_object_text_vert_advance_get(obj, o);
1928 evas_text_style_pad_get(o->cur.style, &l, &r, &t, &b);
1929 obj->cur.geometry.w = w + l + r;
1930 obj->cur.geometry.h = h + t + b;
1931//// obj->cur.cache.geometry.validity = 0;
1932 }
1933 else
1934 {
1935 int t = 0, b = 0;
1936
1937 evas_text_style_pad_get(o->cur.style, NULL, NULL, &t, &b);
1938 obj->cur.geometry.w = 0;
1939 obj->cur.geometry.h = o->max_ascent + o->max_descent + t + b;
1940//// obj->cur.cache.geometry.validity = 0;
1941 }
1942}
1943
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 @@
1/**
2 * @internal
3 * @section Evas_Object_Textblock_Internal Internal Textblock Object Tutorial
4 *
5 * This explains the internal design of the Evas Textblock Object, it's assumed
6 * that the reader of this section has already read @ref Evas_Object_Textblock_Tutorial "Textblock's usage docs.".
7 *
8 * @subsection textblock_internal_intro Introduction
9 * There are two main parts to the textblock object, the first being the node
10 * system, and the second being the layout system. The former is just an
11 * internal representation of the markup text, while the latter is the internal
12 * visual representation of the text (i.e positioning, sizing, fonts and etc).
13 *
14 * @subsection textblock_nodes The Nodes system
15 * The nodes mechanism consists of two main data types:
16 * ::Evas_Object_Textblock_Node_Text and ::Evas_Object_Textblock_Node_Format
17 * the former is for Text nodes and the latter is for format nodes.
18 * There's always at least one text node, even if there are only formats.
19 *
20 * @subsection textblock_nodes_text Text nodes
21 * Each text node is essentially a paragraph, it includes an @ref Eina_UStrbuf
22 * that stores the actual paragraph text, a utf8 string to store the paragraph
23 * text in utf8 (which is not used internally at all), A pointer to it's
24 * main @ref textblock_nodes_format_internal "Format Node" and the paragraph's
25 * @ref evas_bidi_props "BiDi properties". The pointer to the format node may be
26 * NULL if there's no format node anywhere before the end of the text node,
27 * not even in previous text nodes. If not NULL, it points to the first format
28 * node pointing to text inside of the text node, or if there is none, it points
29 * to the previous's text nodes format node. Each paragraph has a format node
30 * representing a paragraph separator pointing to it's last position except
31 * for the last paragraph, which has no such constraint. This constraint
32 * happens because text nodes are paragraphs and paragraphs are delimited by
33 * paragraph separators.
34 *
35 * @subsection textblock_nodes_format_internal Format Nodes - Internal
36 * Each format node stores a group of format information, for example the
37 * markup: \<font=Vera,Kochi font_size=10 align=left\> will all be inserted
38 * inside the same format node, altohugh it consists of different formatting
39 * commands.
40 * Each node has a pointer to it's text node, this pointer is NEVER NULL, even
41 * if there's only one format, and no text, a text node is created. Each format
42 * node includes an offset from the last format node of the same text node. For
43 * example, the markup "0<b>12</b>" will create two format nodes, the first
44 * having an offset of 1 and the second an offset of 2. Each format node also
45 * includes a @ref Eina_Strbuf that includes the textual representation of the
46 * format, and a boolean stating if the format is a visible format or not, see
47 * @ref textblock_nodes_format_visible
48 *
49 * @subsection textblock_nodes_format_visible Visible Format Nodes
50 * There are two types of format nodes, visible and invisible. They are the same
51 * in every way, except for the representation in the text node. While invisible
52 * format nodes have no representation in the text node, the visible ones do.
53 * The Uniceode object replacement character (0xFFFC) is inserted to every place
54 * a visible format node points to. This makes it very easy to treat visible
55 * formats as items in the text, both for BiDi purposes and cursor handling
56 * purposes.
57 * Here are a few example visible an invisible formats:
58 * Visible: newline char, tab, paragraph separator and an embedded item.
59 * Invisible: setting the color, font or alignment of the text.
60 *
61 * @subsection textblock_layout The layout system
62 * @todo write @ref textblock_layout
63 */
64#include "evas_common.h"
65#include "evas_private.h"
66#include <stdlib.h>
67
68#ifdef HAVE_LINEBREAK
69#include "linebreak.h"
70#include "wordbreak.h"
71#endif
72
73/* save typing */
74#define ENFN obj->layer->evas->engine.func
75#define ENDT obj->layer->evas->engine.data.output
76
77/* private magic number for textblock objects */
78static const char o_type[] = "textblock";
79
80/* The char to be inserted instead of visible formats */
81#define _REPLACEMENT_CHAR 0xFFFC
82#define _PARAGRAPH_SEPARATOR 0x2029
83#define _NEWLINE '\n'
84#define _TAB '\t'
85
86#define _REPLACEMENT_CHAR_UTF8 "\xEF\xBF\xBC"
87#define _PARAGRAPH_SEPARATOR_UTF8 "\xE2\x80\xA9"
88#define _NEWLINE_UTF8 "\n"
89#define _TAB_UTF8 "\t"
90#define EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(ch) \
91 (((ch) == _REPLACEMENT_CHAR) || \
92 ((ch) == _NEWLINE) || \
93 ((ch) == _TAB) || \
94 ((ch) == _PARAGRAPH_SEPARATOR))
95
96/* private struct for textblock object internal data */
97/**
98 * @internal
99 * @typedef Evas_Object_Textblock
100 * The actual textblock object.
101 */
102typedef struct _Evas_Object_Textblock Evas_Object_Textblock;
103/**
104 * @internal
105 * @typedef Evas_Object_Style_Tag
106 * The structure used for finding style tags.
107 */
108typedef struct _Evas_Object_Style_Tag Evas_Object_Style_Tag;
109/**
110 * @internal
111 * @typedef Evas_Object_Style_Tag
112 * The structure used for finding style tags.
113 */
114typedef struct _Evas_Object_Style_Tag_Base Evas_Object_Style_Tag_Base;
115/**
116 * @internal
117 * @typedef Evas_Object_Textblock_Node_Text
118 * A text node.
119 */
120typedef struct _Evas_Object_Textblock_Node_Text Evas_Object_Textblock_Node_Text;
121/*
122 * Defined in Evas.h
123typedef struct _Evas_Object_Textblock_Node_Format Evas_Object_Textblock_Node_Format;
124*/
125
126/**
127 * @internal
128 * @typedef Evas_Object_Textblock_Paragraph
129 * A layouting paragraph.
130 */
131typedef struct _Evas_Object_Textblock_Paragraph Evas_Object_Textblock_Paragraph;
132/**
133 * @internal
134 * @typedef Evas_Object_Textblock_Line
135 * A layouting line.
136 */
137typedef struct _Evas_Object_Textblock_Line Evas_Object_Textblock_Line;
138/**
139 * @internal
140 * @typedef Evas_Object_Textblock_Item
141 * A layouting item.
142 */
143typedef struct _Evas_Object_Textblock_Item Evas_Object_Textblock_Item;
144/**
145 * @internal
146 * @typedef Evas_Object_Textblock_Item
147 * A layouting text item.
148 */
149typedef struct _Evas_Object_Textblock_Text_Item Evas_Object_Textblock_Text_Item;
150/**
151 * @internal
152 * @typedef Evas_Object_Textblock_Format_Item
153 * A layouting format item.
154 */
155typedef struct _Evas_Object_Textblock_Format_Item Evas_Object_Textblock_Format_Item;
156/**
157 * @internal
158 * @typedef Evas_Object_Textblock_Format
159 * A textblock format.
160 */
161typedef struct _Evas_Object_Textblock_Format Evas_Object_Textblock_Format;
162
163/**
164 * @internal
165 * @def IS_AT_END(ti, ind)
166 * Return true if ind is at the end of the text item, false otherwise.
167 */
168#define IS_AT_END(ti, ind) (ind == ti->text_props.text_len)
169
170/**
171 * @internal
172 * @def MOVE_PREV_UNTIL(limit, ind)
173 * This decrements ind as long as ind > limit.
174 */
175#define MOVE_PREV_UNTIL(limit, ind) \
176 do \
177 { \
178 if ((limit) < (ind)) \
179 (ind)--; \
180 } \
181 while (0)
182
183/**
184 * @internal
185 * @def MOVE_NEXT_UNTIL(limit, ind)
186 * This increments ind as long as ind < limit
187 */
188#define MOVE_NEXT_UNTIL(limit, ind) \
189 do \
190 { \
191 if ((ind) < (limit)) \
192 (ind)++; \
193 } \
194 while (0)
195
196/**
197 * @internal
198 * @def GET_ITEM_TEXT(ti)
199 * Returns a const reference to the text of the ti (not null terminated).
200 */
201#define GET_ITEM_TEXT(ti) \
202 (((ti)->parent.text_node) ? \
203 (eina_ustrbuf_string_get((ti)->parent.text_node->unicode) + \
204 (ti)->parent.text_pos) : EINA_UNICODE_EMPTY_STRING)
205/**
206 * @internal
207 * @def _FORMAT_IS_CLOSER_OF(base, closer, closer_len)
208 * Returns true if closer is the closer of base.
209 */
210#define _FORMAT_IS_CLOSER_OF(base, closer, closer_len) \
211 (!strncmp(base, closer, closer_len) && \
212 (!base[closer_len] || \
213 (base[closer_len] == '=') || \
214 _is_white(base[closer_len])))
215
216/*FIXME: document the structs and struct items. */
217struct _Evas_Object_Style_Tag_Base
218{
219 char *tag;
220 char *replace;
221 size_t tag_len;
222 size_t replace_len;
223};
224
225struct _Evas_Object_Style_Tag
226{
227 EINA_INLIST;
228 Evas_Object_Style_Tag_Base tag;
229};
230
231struct _Evas_Object_Textblock_Node_Text
232{
233 EINA_INLIST;
234 Eina_UStrbuf *unicode;
235 char *utf8;
236 Evas_Object_Textblock_Node_Format *format_node;
237 Evas_Object_Textblock_Paragraph *par;
238 Eina_Bool dirty : 1;
239 Eina_Bool is_new : 1;
240};
241
242struct _Evas_Object_Textblock_Node_Format
243{
244 EINA_INLIST;
245 const char *format;
246 const char *orig_format;
247 Evas_Object_Textblock_Node_Text *text_node;
248 size_t offset;
249 unsigned char anchor : 2;
250 Eina_Bool opener : 1;
251 Eina_Bool own_closer : 1;
252 Eina_Bool visible : 1;
253 Eina_Bool format_change : 1;
254 Eina_Bool is_new : 1;
255};
256
257/* The default tags to use */
258static const Evas_Object_Style_Tag_Base default_tags[] = {
259 { "b", "+ font_weight=Bold", 1, 18 },
260 { "i", "+ font_style=Italic", 1, 19 }};
261
262#define ANCHOR_NONE 0
263#define ANCHOR_A 1
264#define ANCHOR_ITEM 2
265
266/**
267 * @internal
268 * @def _NODE_TEXT(x)
269 * A convinience macro for casting to a text node.
270 */
271#define _NODE_TEXT(x) ((Evas_Object_Textblock_Node_Text *) (x))
272/**
273 * @internal
274 * @def _NODE_FORMAT(x)
275 * A convinience macro for casting to a format node.
276 */
277#define _NODE_FORMAT(x) ((Evas_Object_Textblock_Node_Format *) (x))
278/**
279 * @internal
280 * @def _ITEM(x)
281 * A convinience macro for casting to a generic item.
282 */
283#define _ITEM(x) ((Evas_Object_Textblock_Item *) (x))
284/**
285 * @internal
286 * @def _ITEM_TEXT(x)
287 * A convinience macro for casting to a text item.
288 */
289#define _ITEM_TEXT(x) ((Evas_Object_Textblock_Text_Item *) (x))
290/**
291 * @internal
292 * @def _ITEM_FORMAT(x)
293 * A convinience macro for casting to a format item.
294 */
295#define _ITEM_FORMAT(x) ((Evas_Object_Textblock_Format_Item *) (x))
296
297struct _Evas_Object_Textblock_Paragraph
298{
299 EINA_INLIST;
300 Evas_Object_Textblock_Line *lines;
301 Evas_Object_Textblock_Node_Text *text_node;
302 Eina_List *logical_items;
303 Evas_BiDi_Paragraph_Props *bidi_props; /* Only valid during layout */
304 Evas_BiDi_Direction direction;
305 Evas_Coord y, w, h;
306 int line_no;
307 Eina_Bool is_bidi : 1;
308 Eina_Bool visible : 1;
309 Eina_Bool rendered : 1;
310};
311
312struct _Evas_Object_Textblock_Line
313{
314 EINA_INLIST;
315 Evas_Object_Textblock_Item *items;
316 Evas_Object_Textblock_Paragraph *par;
317 Evas_Coord x, y, w, h;
318 int baseline;
319 int line_no;
320};
321
322typedef enum _Evas_Textblock_Item_Type
323{
324 EVAS_TEXTBLOCK_ITEM_TEXT,
325 EVAS_TEXTBLOCK_ITEM_FORMAT,
326} Evas_Textblock_Item_Type;
327
328struct _Evas_Object_Textblock_Item
329{
330 EINA_INLIST;
331 Evas_Textblock_Item_Type type;
332 Evas_Object_Textblock_Node_Text *text_node;
333 Evas_Object_Textblock_Format *format;
334 size_t text_pos;
335#ifdef BIDI_SUPPORT
336 size_t visual_pos;
337#endif
338 Evas_Coord adv, x, w, h;
339 Eina_Bool merge : 1; /* Indicates whether this
340 item should merge to the
341 previous item or not */
342 Eina_Bool visually_deleted : 1;
343 /* Indicates whether this
344 item is used in the visual
345 layout or not. */
346};
347
348struct _Evas_Object_Textblock_Text_Item
349{
350 Evas_Object_Textblock_Item parent;
351 Evas_Text_Props text_props;
352 Evas_Coord inset;
353 Evas_Coord x_adjustment; /* Used to indicate by how
354 much we adjusted sizes */
355};
356
357struct _Evas_Object_Textblock_Format_Item
358{
359 Evas_Object_Textblock_Item parent;
360 Evas_BiDi_Direction bidi_dir;
361 const char *item;
362 int y;
363 unsigned char vsize : 2;
364 unsigned char size : 2;
365 Eina_Bool formatme : 1;
366};
367
368struct _Evas_Object_Textblock_Format
369{
370 Evas_Object_Textblock_Node_Format *fnode;
371 double halign;
372 double valign;
373 struct {
374 Evas_Font_Description *fdesc;
375 const char *source;
376 Evas_Font_Set *font;
377 Evas_Font_Size size;
378 } font;
379 struct {
380 struct {
381 unsigned char r, g, b, a;
382 } normal, underline, underline2, underline_dash, outline, shadow, glow, glow2, backing,
383 strikethrough;
384 } color;
385 struct {
386 int l, r;
387 } margin;
388 int ref;
389 int tabstops;
390 int linesize;
391 int linegap;
392 int underline_dash_width;
393 int underline_dash_gap;
394 double linerelsize;
395 double linerelgap;
396 double linefill;
397 double ellipsis;
398 unsigned char style;
399 Eina_Bool wrap_word : 1;
400 Eina_Bool wrap_char : 1;
401 Eina_Bool wrap_mixed : 1;
402 Eina_Bool underline : 1;
403 Eina_Bool underline2 : 1;
404 Eina_Bool underline_dash : 1;
405 Eina_Bool strikethrough : 1;
406 Eina_Bool backing : 1;
407 Eina_Bool password : 1;
408 Eina_Bool halign_auto : 1;
409};
410
411struct _Evas_Textblock_Style
412{
413 const char *style_text;
414 char *default_tag;
415 Evas_Object_Style_Tag *tags;
416 Eina_List *objects;
417 Eina_Bool delete_me : 1;
418};
419
420struct _Evas_Textblock_Cursor
421{
422 Evas_Object *obj;
423 size_t pos;
424 Evas_Object_Textblock_Node_Text *node;
425};
426
427/* Size of the index array */
428#define TEXTBLOCK_PAR_INDEX_SIZE 10
429struct _Evas_Object_Textblock
430{
431 DATA32 magic;
432 Evas_Textblock_Style *style;
433 Evas_Textblock_Style *style_user;
434 Evas_Textblock_Cursor *cursor;
435 Eina_List *cursors;
436 Evas_Object_Textblock_Node_Text *text_nodes;
437 Evas_Object_Textblock_Node_Format *format_nodes;
438
439 int num_paragraphs;
440 Evas_Object_Textblock_Paragraph *paragraphs;
441 Evas_Object_Textblock_Paragraph *par_index[TEXTBLOCK_PAR_INDEX_SIZE];
442
443 Evas_Object_Textblock_Text_Item *ellip_ti;
444 Eina_List *anchors_a;
445 Eina_List *anchors_item;
446 int last_w, last_h;
447 struct {
448 int l, r, t, b;
449 } style_pad;
450 double valign;
451 char *markup_text;
452 void *engine_data;
453 const char *repch;
454 const char *bidi_delimiters;
455 struct {
456 int w, h;
457 Eina_Bool valid : 1;
458 } formatted, native;
459 Eina_Bool redraw : 1;
460 Eina_Bool changed : 1;
461 Eina_Bool content_changed : 1;
462 Eina_Bool format_changed : 1;
463 Eina_Bool have_ellipsis : 1;
464 Eina_Bool legacy_newline : 1;
465};
466
467/* private methods for textblock objects */
468static void evas_object_textblock_init(Evas_Object *obj);
469static void *evas_object_textblock_new(void);
470static void evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
471static void evas_object_textblock_free(Evas_Object *obj);
472static void evas_object_textblock_render_pre(Evas_Object *obj);
473static void evas_object_textblock_render_post(Evas_Object *obj);
474
475static unsigned int evas_object_textblock_id_get(Evas_Object *obj);
476static unsigned int evas_object_textblock_visual_id_get(Evas_Object *obj);
477static void *evas_object_textblock_engine_data_get(Evas_Object *obj);
478
479static int evas_object_textblock_is_opaque(Evas_Object *obj);
480static int evas_object_textblock_was_opaque(Evas_Object *obj);
481
482static void evas_object_textblock_coords_recalc(Evas_Object *obj);
483
484static void evas_object_textblock_scale_update(Evas_Object *obj);
485
486static const Evas_Object_Func object_func =
487{
488 /* methods (compulsory) */
489 evas_object_textblock_free,
490 evas_object_textblock_render,
491 evas_object_textblock_render_pre,
492 evas_object_textblock_render_post,
493 evas_object_textblock_id_get,
494 evas_object_textblock_visual_id_get,
495 evas_object_textblock_engine_data_get,
496 /* these are optional. NULL = nothing */
497 NULL,
498 NULL,
499 NULL,
500 NULL,
501 evas_object_textblock_is_opaque,
502 evas_object_textblock_was_opaque,
503 NULL,
504 NULL,
505 evas_object_textblock_coords_recalc,
506 evas_object_textblock_scale_update,
507 NULL,
508 NULL,
509 NULL
510};
511
512/* the actual api call to add a textblock */
513
514#define TB_HEAD() \
515 Evas_Object_Textblock *o; \
516 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \
517 return; \
518 MAGIC_CHECK_END(); \
519 o = (Evas_Object_Textblock *)(obj->object_data); \
520 MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \
521 return; \
522 MAGIC_CHECK_END();
523
524#define TB_HEAD_RETURN(x) \
525 Evas_Object_Textblock *o; \
526 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); \
527 return (x); \
528 MAGIC_CHECK_END(); \
529 o = (Evas_Object_Textblock *)(obj->object_data); \
530 MAGIC_CHECK(o, Evas_Object_Textblock, MAGIC_OBJ_TEXTBLOCK); \
531 return (x); \
532 MAGIC_CHECK_END();
533
534
535
536static Eina_Bool _evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur);
537static void _evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n);
538static void _evas_textblock_node_text_remove_formats_between(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n, int start, int end);
539static Evas_Object_Textblock_Node_Format *_evas_textblock_cursor_node_format_before_or_at_pos_get(const Evas_Textblock_Cursor *cur);
540static size_t _evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt);
541static void _evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n, int visual_adjustment);
542static void _evas_textblock_node_format_free(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n);
543static void _evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n);
544static void _evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj);
545static void _evas_textblock_invalidate_all(Evas_Object_Textblock *o);
546static void _evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Text *n, size_t start, int offset);
547static void _evas_textblock_cursors_set_node(Evas_Object_Textblock *o, const Evas_Object_Textblock_Node_Text *n, Evas_Object_Textblock_Node_Text *new_node);
548
549/* styles */
550/**
551 * @internal
552 * Clears the textblock style passed except for the style_text which is replaced.
553 * @param ts The ts to be cleared. Must not be NULL.
554 * @param style_text the style's text.
555 */
556static void
557_style_replace(Evas_Textblock_Style *ts, const char *style_text)
558{
559 eina_stringshare_replace(&ts->style_text, style_text);
560 if (ts->default_tag) free(ts->default_tag);
561 while (ts->tags)
562 {
563 Evas_Object_Style_Tag *tag;
564
565 tag = (Evas_Object_Style_Tag *)ts->tags;
566 ts->tags = (Evas_Object_Style_Tag *)eina_inlist_remove(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag));
567 free(tag->tag.tag);
568 free(tag->tag.replace);
569 free(tag);
570 }
571 ts->default_tag = NULL;
572 ts->tags = NULL;
573}
574
575/**
576 * @internal
577 * Clears the textblock style passed.
578 * @param ts The ts to be cleared. Must not be NULL.
579 */
580static void
581_style_clear(Evas_Textblock_Style *ts)
582{
583 _style_replace(ts, NULL);
584}
585
586/**
587 * @internal
588 * Searches inside the tags stored in the style for the tag matching s.
589 * @param ts The ts to be cleared. Must not be NULL.
590 * @param s The tag to be matched.
591 * @param tag_len the length of the tag string.
592 * @param[out] replace_len The length of the replcaement found. - Must not be NULL.
593 * @return The replacement string found.
594 */
595static inline const char *
596_style_match_tag(const Evas_Textblock_Style *ts, const char *s, size_t tag_len, size_t *replace_len)
597{
598 Evas_Object_Style_Tag *tag;
599
600 /* Try the style tags */
601 EINA_INLIST_FOREACH(ts->tags, tag)
602 {
603 if (tag->tag.tag_len != tag_len) continue;
604 if (!strncmp(tag->tag.tag, s, tag_len))
605 {
606 *replace_len = tag->tag.replace_len;
607 return tag->tag.replace;
608 }
609 }
610
611 /* Try the default tags */
612 {
613 size_t i;
614 const Evas_Object_Style_Tag_Base *btag;
615 for (btag = default_tags, i = 0 ;
616 i < (sizeof(default_tags) / sizeof(default_tags[0])) ;
617 btag++, i++)
618 {
619 if (btag->tag_len != tag_len) continue;
620 if (!strncmp(btag->tag, s, tag_len))
621 {
622 *replace_len = btag->replace_len;
623 return btag->replace;
624 }
625 }
626 }
627
628 *replace_len = 0;
629 return NULL;
630}
631
632/**
633 * @internal
634 * Clears all the nodes (text and format) of the textblock object.
635 * @param obj The evas object, must not be NULL.
636 */
637static void
638_nodes_clear(const Evas_Object *obj)
639{
640 Evas_Object_Textblock *o;
641
642 o = (Evas_Object_Textblock *)(obj->object_data);
643 while (o->text_nodes)
644 {
645 Evas_Object_Textblock_Node_Text *n;
646
647 n = o->text_nodes;
648 o->text_nodes = _NODE_TEXT(eina_inlist_remove(
649 EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n)));
650 _evas_textblock_node_text_free(n);
651 }
652 while (o->format_nodes)
653 {
654 Evas_Object_Textblock_Node_Format *n;
655
656 n = o->format_nodes;
657 o->format_nodes = _NODE_FORMAT(eina_inlist_remove(EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n)));
658 _evas_textblock_node_format_free(o, n);
659 }
660}
661
662/**
663 * @internal
664 * Unrefs and frees (if needed) a textblock format.
665 * @param obj The Evas_Object, Must not be NULL.
666 * @param fmt the format to be cleaned, must not be NULL.
667 */
668static void
669_format_unref_free(const Evas_Object *obj, Evas_Object_Textblock_Format *fmt)
670{
671 fmt->ref--;
672 if (fmt->ref > 0) return;
673 if (fmt->font.fdesc) evas_font_desc_unref(fmt->font.fdesc);
674 if (fmt->font.source) eina_stringshare_del(fmt->font.source);
675 evas_font_free(obj->layer->evas, fmt->font.font);
676 free(fmt);
677}
678
679/**
680 * @internal
681 * Free a layout item
682 * @param obj The evas object, must not be NULL.
683 * @param ln the layout line on which the item is in, must not be NULL.
684 * @param it the layout item to be freed
685 */
686static void
687_item_free(const Evas_Object *obj, Evas_Object_Textblock_Line *ln, Evas_Object_Textblock_Item *it)
688{
689 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
690 {
691 Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
692
693 evas_common_text_props_content_unref(&ti->text_props);
694 }
695 else
696 {
697 Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
698
699 if (fi->item) eina_stringshare_del(fi->item);
700 }
701 _format_unref_free(obj, it->format);
702 if (ln)
703 {
704 ln->items = (Evas_Object_Textblock_Item *) eina_inlist_remove(
705 EINA_INLIST_GET(ln->items), EINA_INLIST_GET(ln->items));
706 }
707 free(it);
708}
709
710/**
711 * @internal
712 * Free a layout line.
713 * @param obj The evas object, must not be NULL.
714 * @param ln the layout line to be freed, must not be NULL.
715 */
716static void
717_line_free(Evas_Object_Textblock_Line *ln)
718{
719 /* Items are freed from the logical list, except for the ellip item */
720 if (ln) free(ln);
721}
722
723/* table of html escapes (that i can find) this should be ordered with the
724 * most common first as it's a linear search to match - no hash for this.
725 *
726 * these are stored as one large string and one additional array that
727 * contains the offsets to the tokens for space efficiency.
728 */
729/**
730 * @internal
731 * @var escape_strings[]
732 * This string consists of NULL terminated pairs of strings, the first of
733 * every pair is an escape and the second is the value of the escape.
734 */
735static const char escape_strings[] =
736/* most common escaped stuff */
737"&quot;\0" "\x22\0"
738"&amp;\0" "\x26\0"
739"&lt;\0" "\x3c\0"
740"&gt;\0" "\x3e\0"
741/* all the rest */
742"&nbsp;\0" "\xc2\xa0\0"
743"&iexcl;\0" "\xc2\xa1\0"
744"&cent;\0" "\xc2\xa2\0"
745"&pound;\0" "\xc2\xa3\0"
746"&curren;\0" "\xc2\xa4\0"
747"&yen;\0" "\xc2\xa5\0"
748"&brvbar;\0" "\xc2\xa6\0"
749"&sect;\0" "\xc2\xa7\0"
750"&uml;\0" "\xc2\xa8\0"
751"&copy;\0" "\xc2\xa9\0"
752"&ordf;\0" "\xc2\xaa\0"
753"&laquo;\0" "\xc2\xab\0"
754"&not;\0" "\xc2\xac\0"
755"&reg;\0" "\xc2\xae\0"
756"&macr;\0" "\xc2\xaf\0"
757"&deg;\0" "\xc2\xb0\0"
758"&plusmn;\0" "\xc2\xb1\0"
759"&sup2;\0" "\xc2\xb2\0"
760"&sup3;\0" "\xc2\xb3\0"
761"&acute;\0" "\xc2\xb4\0"
762"&micro;\0" "\xc2\xb5\0"
763"&para;\0" "\xc2\xb6\0"
764"&middot;\0" "\xc2\xb7\0"
765"&cedil;\0" "\xc2\xb8\0"
766"&sup1;\0" "\xc2\xb9\0"
767"&ordm;\0" "\xc2\xba\0"
768"&raquo;\0" "\xc2\xbb\0"
769"&frac14;\0" "\xc2\xbc\0"
770"&frac12;\0" "\xc2\xbd\0"
771"&frac34;\0" "\xc2\xbe\0"
772"&iquest;\0" "\xc2\xbf\0"
773"&Agrave;\0" "\xc3\x80\0"
774"&Aacute;\0" "\xc3\x81\0"
775"&Acirc;\0" "\xc3\x82\0"
776"&Atilde;\0" "\xc3\x83\0"
777"&Auml;\0" "\xc3\x84\0"
778"&Aring;\0" "\xc3\x85\0"
779"&Aelig;\0" "\xc3\x86\0"
780"&Ccedil;\0" "\xc3\x87\0"
781"&Egrave;\0" "\xc3\x88\0"
782"&Eacute;\0" "\xc3\x89\0"
783"&Ecirc;\0" "\xc3\x8a\0"
784"&Euml;\0" "\xc3\x8b\0"
785"&Igrave;\0" "\xc3\x8c\0"
786"&Iacute;\0" "\xc3\x8d\0"
787"&Icirc;\0" "\xc3\x8e\0"
788"&Iuml;\0" "\xc3\x8f\0"
789"&Eth;\0" "\xc3\x90\0"
790"&Ntilde;\0" "\xc3\x91\0"
791"&Ograve;\0" "\xc3\x92\0"
792"&Oacute;\0" "\xc3\x93\0"
793"&Ocirc;\0" "\xc3\x94\0"
794"&Otilde;\0" "\xc3\x95\0"
795"&Ouml;\0" "\xc3\x96\0"
796"&times;\0" "\xc3\x97\0"
797"&Oslash;\0" "\xc3\x98\0"
798"&Ugrave;\0" "\xc3\x99\0"
799"&Uacute;\0" "\xc3\x9a\0"
800"&Ucirc;\0" "\xc3\x9b\0"
801"&Yacute;\0" "\xc3\x9d\0"
802"&Thorn;\0" "\xc3\x9e\0"
803"&szlig;\0" "\xc3\x9f\0"
804"&agrave;\0" "\xc3\xa0\0"
805"&aacute;\0" "\xc3\xa1\0"
806"&acirc;\0" "\xc3\xa2\0"
807"&atilde;\0" "\xc3\xa3\0"
808"&auml;\0" "\xc3\xa4\0"
809"&aring;\0" "\xc3\xa5\0"
810"&aelig;\0" "\xc3\xa6\0"
811"&ccedil;\0" "\xc3\xa7\0"
812"&egrave;\0" "\xc3\xa8\0"
813"&eacute;\0" "\xc3\xa9\0"
814"&ecirc;\0" "\xc3\xaa\0"
815"&euml;\0" "\xc3\xab\0"
816"&igrave;\0" "\xc3\xac\0"
817"&iacute;\0" "\xc3\xad\0"
818"&icirc;\0" "\xc3\xae\0"
819"&iuml;\0" "\xc3\xaf\0"
820"&eth;\0" "\xc3\xb0\0"
821"&ntilde;\0" "\xc3\xb1\0"
822"&ograve;\0" "\xc3\xb2\0"
823"&oacute;\0" "\xc3\xb3\0"
824"&ocirc;\0" "\xc3\xb4\0"
825"&otilde;\0" "\xc3\xb5\0"
826"&ouml;\0" "\xc3\xb6\0"
827"&divide;\0" "\xc3\xb7\0"
828"&oslash;\0" "\xc3\xb8\0"
829"&ugrave;\0" "\xc3\xb9\0"
830"&uacute;\0" "\xc3\xba\0"
831"&ucirc;\0" "\xc3\xbb\0"
832"&uuml;\0" "\xc3\xbc\0"
833"&yacute;\0" "\xc3\xbd\0"
834"&thorn;\0" "\xc3\xbe\0"
835"&yuml;\0" "\xc3\xbf\0"
836"&alpha;\0" "\xce\x91\0"
837"&beta;\0" "\xce\x92\0"
838"&gamma;\0" "\xce\x93\0"
839"&delta;\0" "\xce\x94\0"
840"&epsilon;\0" "\xce\x95\0"
841"&zeta;\0" "\xce\x96\0"
842"&eta;\0" "\xce\x97\0"
843"&theta;\0" "\xce\x98\0"
844"&iota;\0" "\xce\x99\0"
845"&kappa;\0" "\xce\x9a\0"
846"&lambda;\0" "\xce\x9b\0"
847"&mu;\0" "\xce\x9c\0"
848"&nu;\0" "\xce\x9d\0"
849"&xi;\0" "\xce\x9e\0"
850"&omicron;\0" "\xce\x9f\0"
851"&pi;\0" "\xce\xa0\0"
852"&rho;\0" "\xce\xa1\0"
853"&sigma;\0" "\xce\xa3\0"
854"&tau;\0" "\xce\xa4\0"
855"&upsilon;\0" "\xce\xa5\0"
856"&phi;\0" "\xce\xa6\0"
857"&chi;\0" "\xce\xa7\0"
858"&psi;\0" "\xce\xa8\0"
859"&omega;\0" "\xce\xa9\0"
860"&hellip;\0" "\xe2\x80\xa6\0"
861"&euro;\0" "\xe2\x82\xac\0"
862"&larr;\0" "\xe2\x86\x90\0"
863"&uarr;\0" "\xe2\x86\x91\0"
864"&rarr;\0" "\xe2\x86\x92\0"
865"&darr;\0" "\xe2\x86\x93\0"
866"&harr;\0" "\xe2\x86\x94\0"
867"&larr;\0" "\xe2\x87\x90\0"
868"&rarr;\0" "\xe2\x87\x92\0"
869"&forall;\0" "\xe2\x88\x80\0"
870"&exist;\0" "\xe2\x88\x83\0"
871"&nabla;\0" "\xe2\x88\x87\0"
872"&prod;\0" "\xe2\x88\x8f\0"
873"&sum;\0" "\xe2\x88\x91\0"
874"&and;\0" "\xe2\x88\xa7\0"
875"&or;\0" "\xe2\x88\xa8\0"
876"&int;\0" "\xe2\x88\xab\0"
877"&ne;\0" "\xe2\x89\xa0\0"
878"&equiv;\0" "\xe2\x89\xa1\0"
879"&oplus;\0" "\xe2\x8a\x95\0"
880"&perp;\0" "\xe2\x8a\xa5\0"
881"&dagger;\0" "\xe2\x80\xa0\0"
882"&Dagger;\0" "\xe2\x80\xa1\0"
883"&bull;\0" "\xe2\x80\xa2\0"
884;
885
886EVAS_MEMPOOL(_mp_obj);
887
888/**
889 * @internal
890 * Checks if a char is a whitespace.
891 * @param c the unicode codepoint.
892 * @return EINA_TRUE if the unicode codepoint is a whitespace, EINA_FALSE otherwise.
893 */
894static Eina_Bool
895_is_white(Eina_Unicode c)
896{
897 /*
898 * unicode list of whitespace chars
899 *
900 * 0009..000D <control-0009>..<control-000D>
901 * 0020 SPACE
902 * 0085 <control-0085>
903 * 00A0 NO-BREAK SPACE
904 * 1680 OGHAM SPACE MARK
905 * 180E MONGOLIAN VOWEL SEPARATOR
906 * 2000..200A EN QUAD..HAIR SPACE
907 * 2028 LINE SEPARATOR
908 * 2029 PARAGRAPH SEPARATOR
909 * 202F NARROW NO-BREAK SPACE
910 * 205F MEDIUM MATHEMATICAL SPACE
911 * 3000 IDEOGRAPHIC SPACE
912 */
913 if (
914 (c == 0x20) ||
915 ((c >= 0x9) && (c <= 0xd)) ||
916 (c == 0x85) ||
917 (c == 0xa0) ||
918 (c == 0x1680) ||
919 (c == 0x180e) ||
920 ((c >= 0x2000) && (c <= 0x200a)) ||
921 (c == 0x2028) ||
922 (c == 0x2029) ||
923 (c == 0x202f) ||
924 (c == 0x205f) ||
925 (c == 0x3000)
926 )
927 return EINA_TRUE;
928 return EINA_FALSE;
929}
930
931/**
932 * @internal
933 * Prepends the text between s and p to the main cursor of the object.
934 *
935 * @param cur the cursor to prepend to.
936 * @param[in] s start of the string
937 * @param[in] p end of the string
938 */
939static void
940_prepend_text_run(Evas_Textblock_Cursor *cur, const char *s, const char *p)
941{
942 if ((s) && (p > s))
943 {
944 char *ts;
945
946 ts = alloca(p - s + 1);
947 strncpy(ts, s, p - s);
948 ts[p - s] = 0;
949 evas_textblock_cursor_text_prepend(cur, ts);
950 }
951}
952
953
954/**
955 * @internal
956 * Returns the numeric value of HEX chars for example for ch = 'A'
957 * the function will return 10.
958 *
959 * @param ch The HEX char.
960 * @return numeric value of HEX.
961 */
962static int
963_hex_string_get(char ch)
964{
965 if ((ch >= '0') && (ch <= '9')) return (ch - '0');
966 else if ((ch >= 'A') && (ch <= 'F')) return (ch - 'A' + 10);
967 else if ((ch >= 'a') && (ch <= 'f')) return (ch - 'a' + 10);
968 return 0;
969}
970
971/**
972 * @internal
973 * Parses a string of one of the formas:
974 * 1. "#RRGGBB"
975 * 2. "#RRGGBBAA"
976 * 3. "#RGB"
977 * 4. "#RGBA"
978 * To the rgba values.
979 *
980 * @param[in] str The string to parse - NOT NULL.
981 * @param[out] r The Red value - NOT NULL.
982 * @param[out] g The Green value - NOT NULL.
983 * @param[out] b The Blue value - NOT NULL.
984 * @param[out] a The Alpha value - NOT NULL.
985 */
986static void
987_format_color_parse(const char *str, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a)
988{
989 int slen;
990
991 slen = strlen(str);
992 *r = *g = *b = *a = 0;
993
994 if (slen == 7) /* #RRGGBB */
995 {
996 *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2]));
997 *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4]));
998 *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6]));
999 *a = 0xff;
1000 }
1001 else if (slen == 9) /* #RRGGBBAA */
1002 {
1003 *r = (_hex_string_get(str[1]) << 4) | (_hex_string_get(str[2]));
1004 *g = (_hex_string_get(str[3]) << 4) | (_hex_string_get(str[4]));
1005 *b = (_hex_string_get(str[5]) << 4) | (_hex_string_get(str[6]));
1006 *a = (_hex_string_get(str[7]) << 4) | (_hex_string_get(str[8]));
1007 }
1008 else if (slen == 4) /* #RGB */
1009 {
1010 *r = _hex_string_get(str[1]);
1011 *r = (*r << 4) | *r;
1012 *g = _hex_string_get(str[2]);
1013 *g = (*g << 4) | *g;
1014 *b = _hex_string_get(str[3]);
1015 *b = (*b << 4) | *b;
1016 *a = 0xff;
1017 }
1018 else if (slen == 5) /* #RGBA */
1019 {
1020 *r = _hex_string_get(str[1]);
1021 *r = (*r << 4) | *r;
1022 *g = _hex_string_get(str[2]);
1023 *g = (*g << 4) | *g;
1024 *b = _hex_string_get(str[3]);
1025 *b = (*b << 4) | *b;
1026 *a = _hex_string_get(str[4]);
1027 *a = (*a << 4) | *a;
1028 }
1029 *r = (*r * *a) / 255;
1030 *g = (*g * *a) / 255;
1031 *b = (*b * *a) / 255;
1032}
1033
1034/* The refcount for the formats. */
1035static int format_refcount = 0;
1036/* Holders for the stringshares */
1037static const char *fontstr = NULL;
1038static const char *font_fallbacksstr = NULL;
1039static const char *font_sizestr = NULL;
1040static const char *font_sourcestr = NULL;
1041static const char *font_weightstr = NULL;
1042static const char *font_stylestr = NULL;
1043static const char *font_widthstr = NULL;
1044static const char *langstr = NULL;
1045static const char *colorstr = NULL;
1046static const char *underline_colorstr = NULL;
1047static const char *underline2_colorstr = NULL;
1048static const char *underline_dash_colorstr = NULL;
1049static const char *outline_colorstr = NULL;
1050static const char *shadow_colorstr = NULL;
1051static const char *glow_colorstr = NULL;
1052static const char *glow2_colorstr = NULL;
1053static const char *backing_colorstr = NULL;
1054static const char *strikethrough_colorstr = NULL;
1055static const char *alignstr = NULL;
1056static const char *valignstr = NULL;
1057static const char *wrapstr = NULL;
1058static const char *left_marginstr = NULL;
1059static const char *right_marginstr = NULL;
1060static const char *underlinestr = NULL;
1061static const char *strikethroughstr = NULL;
1062static const char *backingstr = NULL;
1063static const char *stylestr = NULL;
1064static const char *tabstopsstr = NULL;
1065static const char *linesizestr = NULL;
1066static const char *linerelsizestr = NULL;
1067static const char *linegapstr = NULL;
1068static const char *linerelgapstr = NULL;
1069static const char *itemstr = NULL;
1070static const char *linefillstr = NULL;
1071static const char *ellipsisstr = NULL;
1072static const char *passwordstr = NULL;
1073static const char *underline_dash_widthstr = NULL;
1074static const char *underline_dash_gapstr = NULL;
1075
1076/**
1077 * @internal
1078 * Init the format strings.
1079 */
1080static void
1081_format_command_init(void)
1082{
1083 if (format_refcount == 0)
1084 {
1085 fontstr = eina_stringshare_add("font");
1086 font_fallbacksstr = eina_stringshare_add("font_fallbacks");
1087 font_sizestr = eina_stringshare_add("font_size");
1088 font_sourcestr = eina_stringshare_add("font_source");
1089 font_weightstr = eina_stringshare_add("font_weight");
1090 font_stylestr = eina_stringshare_add("font_style");
1091 font_widthstr = eina_stringshare_add("font_width");
1092 langstr = eina_stringshare_add("lang");
1093 colorstr = eina_stringshare_add("color");
1094 underline_colorstr = eina_stringshare_add("underline_color");
1095 underline2_colorstr = eina_stringshare_add("underline2_color");
1096 underline_dash_colorstr = eina_stringshare_add("underline_dash_color");
1097 outline_colorstr = eina_stringshare_add("outline_color");
1098 shadow_colorstr = eina_stringshare_add("shadow_color");
1099 glow_colorstr = eina_stringshare_add("glow_color");
1100 glow2_colorstr = eina_stringshare_add("glow2_color");
1101 backing_colorstr = eina_stringshare_add("backing_color");
1102 strikethrough_colorstr = eina_stringshare_add("strikethrough_color");
1103 alignstr = eina_stringshare_add("align");
1104 valignstr = eina_stringshare_add("valign");
1105 wrapstr = eina_stringshare_add("wrap");
1106 left_marginstr = eina_stringshare_add("left_margin");
1107 right_marginstr = eina_stringshare_add("right_margin");
1108 underlinestr = eina_stringshare_add("underline");
1109 strikethroughstr = eina_stringshare_add("strikethrough");
1110 backingstr = eina_stringshare_add("backing");
1111 stylestr = eina_stringshare_add("style");
1112 tabstopsstr = eina_stringshare_add("tabstops");
1113 linesizestr = eina_stringshare_add("linesize");
1114 linerelsizestr = eina_stringshare_add("linerelsize");
1115 linegapstr = eina_stringshare_add("linegap");
1116 linerelgapstr = eina_stringshare_add("linerelgap");
1117 itemstr = eina_stringshare_add("item");
1118 linefillstr = eina_stringshare_add("linefill");
1119 ellipsisstr = eina_stringshare_add("ellipsis");
1120 passwordstr = eina_stringshare_add("password");
1121 underline_dash_widthstr = eina_stringshare_add("underline_dash_width");
1122 underline_dash_gapstr = eina_stringshare_add("underline_dash_gap");
1123 }
1124 format_refcount++;
1125}
1126
1127/**
1128 * @internal
1129 * Shutdown the format strings.
1130 */
1131static void
1132_format_command_shutdown(void)
1133{
1134 if (--format_refcount > 0) return;
1135
1136 eina_stringshare_del(fontstr);
1137 eina_stringshare_del(font_fallbacksstr);
1138 eina_stringshare_del(font_sizestr);
1139 eina_stringshare_del(font_sourcestr);
1140 eina_stringshare_del(font_weightstr);
1141 eina_stringshare_del(font_stylestr);
1142 eina_stringshare_del(font_widthstr);
1143 eina_stringshare_del(langstr);
1144 eina_stringshare_del(colorstr);
1145 eina_stringshare_del(underline_colorstr);
1146 eina_stringshare_del(underline2_colorstr);
1147 eina_stringshare_del(underline_dash_colorstr);
1148 eina_stringshare_del(outline_colorstr);
1149 eina_stringshare_del(shadow_colorstr);
1150 eina_stringshare_del(glow_colorstr);
1151 eina_stringshare_del(glow2_colorstr);
1152 eina_stringshare_del(backing_colorstr);
1153 eina_stringshare_del(strikethrough_colorstr);
1154 eina_stringshare_del(alignstr);
1155 eina_stringshare_del(valignstr);
1156 eina_stringshare_del(wrapstr);
1157 eina_stringshare_del(left_marginstr);
1158 eina_stringshare_del(right_marginstr);
1159 eina_stringshare_del(underlinestr);
1160 eina_stringshare_del(strikethroughstr);
1161 eina_stringshare_del(backingstr);
1162 eina_stringshare_del(stylestr);
1163 eina_stringshare_del(tabstopsstr);
1164 eina_stringshare_del(linesizestr);
1165 eina_stringshare_del(linerelsizestr);
1166 eina_stringshare_del(linegapstr);
1167 eina_stringshare_del(linerelgapstr);
1168 eina_stringshare_del(itemstr);
1169 eina_stringshare_del(linefillstr);
1170 eina_stringshare_del(ellipsisstr);
1171 eina_stringshare_del(passwordstr);
1172 eina_stringshare_del(underline_dash_widthstr);
1173 eina_stringshare_del(underline_dash_gapstr);
1174}
1175
1176/**
1177 * @internal
1178 * Copies str to dst while removing the \\ char, i.e unescape the escape sequences.
1179 *
1180 * @param[out] dst the destination string - Should not be NULL.
1181 * @param[in] src the source string - Should not be NULL.
1182 */
1183static void
1184_format_clean_param(char *dst, const char *src)
1185{
1186 const char *ss;
1187 char *ds;
1188
1189 ds = dst;
1190 for (ss = src; *ss; ss++, ds++)
1191 {
1192 if ((*ss == '\\') && *(ss + 1)) ss++;
1193 *ds = *ss;
1194 }
1195 *ds = 0;
1196}
1197
1198/**
1199 * @internal
1200 * Parses the cmd and parameter and adds the parsed format to fmt.
1201 *
1202 * @param obj the evas object - should not be NULL.
1203 * @param fmt The format to populate - should not be NULL.
1204 * @param[in] cmd the command to process, should be stringshared.
1205 * @param[in] param the parameter of the command.
1206 */
1207static void
1208_format_command(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *cmd, const char *param)
1209{
1210 int len;
1211 char *tmp_param;
1212
1213 len = strlen(param);
1214 tmp_param = alloca(len + 1);
1215
1216 _format_clean_param(tmp_param, param);
1217
1218 /* If we are changing the font, create the fdesc. */
1219 if ((cmd == font_weightstr) || (cmd == font_widthstr) ||
1220 (cmd == font_stylestr) || (cmd == langstr) ||
1221 (cmd == fontstr) || (cmd == font_fallbacksstr))
1222 {
1223 if (!fmt->font.fdesc)
1224 {
1225 fmt->font.fdesc = evas_font_desc_new();
1226 }
1227 else if (!fmt->font.fdesc->is_new)
1228 {
1229 Evas_Font_Description *old = fmt->font.fdesc;
1230 fmt->font.fdesc = evas_font_desc_dup(fmt->font.fdesc);
1231 if (old) evas_font_desc_unref(old);
1232 }
1233 }
1234
1235
1236 if (cmd == fontstr)
1237 {
1238 evas_font_name_parse(fmt->font.fdesc, tmp_param);
1239 }
1240 else if (cmd == font_fallbacksstr)
1241 {
1242 eina_stringshare_replace(&(fmt->font.fdesc->fallbacks), tmp_param);
1243 }
1244 else if (cmd == font_sizestr)
1245 {
1246 int v;
1247
1248 v = atoi(tmp_param);
1249 if (v != fmt->font.size)
1250 {
1251 fmt->font.size = v;
1252 }
1253 }
1254 else if (cmd == font_sourcestr)
1255 {
1256 if ((!fmt->font.source) ||
1257 ((fmt->font.source) && (strcmp(fmt->font.source, tmp_param))))
1258 {
1259 if (fmt->font.source) eina_stringshare_del(fmt->font.source);
1260 fmt->font.source = eina_stringshare_add(tmp_param);
1261 }
1262 }
1263 else if (cmd == font_weightstr)
1264 {
1265 fmt->font.fdesc->weight = evas_font_style_find(tmp_param,
1266 tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WEIGHT);
1267 }
1268 else if (cmd == font_stylestr)
1269 {
1270 fmt->font.fdesc->slant = evas_font_style_find(tmp_param,
1271 tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_SLANT);
1272 }
1273 else if (cmd == font_widthstr)
1274 {
1275 fmt->font.fdesc->width = evas_font_style_find(tmp_param,
1276 tmp_param + strlen(tmp_param), EVAS_FONT_STYLE_WIDTH);
1277 }
1278 else if (cmd == langstr)
1279 {
1280 eina_stringshare_replace(&(fmt->font.fdesc->lang), tmp_param);
1281 }
1282 else if (cmd == colorstr)
1283 _format_color_parse(tmp_param,
1284 &(fmt->color.normal.r), &(fmt->color.normal.g),
1285 &(fmt->color.normal.b), &(fmt->color.normal.a));
1286 else if (cmd == underline_colorstr)
1287 _format_color_parse(tmp_param,
1288 &(fmt->color.underline.r), &(fmt->color.underline.g),
1289 &(fmt->color.underline.b), &(fmt->color.underline.a));
1290 else if (cmd == underline2_colorstr)
1291 _format_color_parse(tmp_param,
1292 &(fmt->color.underline2.r), &(fmt->color.underline2.g),
1293 &(fmt->color.underline2.b), &(fmt->color.underline2.a));
1294 else if (cmd == underline_dash_colorstr)
1295 _format_color_parse(tmp_param,
1296 &(fmt->color.underline_dash.r), &(fmt->color.underline_dash.g),
1297 &(fmt->color.underline_dash.b), &(fmt->color.underline_dash.a));
1298 else if (cmd == outline_colorstr)
1299 _format_color_parse(tmp_param,
1300 &(fmt->color.outline.r), &(fmt->color.outline.g),
1301 &(fmt->color.outline.b), &(fmt->color.outline.a));
1302 else if (cmd == shadow_colorstr)
1303 _format_color_parse(tmp_param,
1304 &(fmt->color.shadow.r), &(fmt->color.shadow.g),
1305 &(fmt->color.shadow.b), &(fmt->color.shadow.a));
1306 else if (cmd == glow_colorstr)
1307 _format_color_parse(tmp_param,
1308 &(fmt->color.glow.r), &(fmt->color.glow.g),
1309 &(fmt->color.glow.b), &(fmt->color.glow.a));
1310 else if (cmd == glow2_colorstr)
1311 _format_color_parse(tmp_param,
1312 &(fmt->color.glow2.r), &(fmt->color.glow2.g),
1313 &(fmt->color.glow2.b), &(fmt->color.glow2.a));
1314 else if (cmd == backing_colorstr)
1315 _format_color_parse(tmp_param,
1316 &(fmt->color.backing.r), &(fmt->color.backing.g),
1317 &(fmt->color.backing.b), &(fmt->color.backing.a));
1318 else if (cmd == strikethrough_colorstr)
1319 _format_color_parse(tmp_param,
1320 &(fmt->color.strikethrough.r), &(fmt->color.strikethrough.g),
1321 &(fmt->color.strikethrough.b), &(fmt->color.strikethrough.a));
1322 else if (cmd == alignstr)
1323 {
1324 if (!strcmp(tmp_param, "auto"))
1325 {
1326 fmt->halign_auto = EINA_TRUE;
1327 }
1328 else
1329 {
1330 if (!strcmp(tmp_param, "middle")) fmt->halign = 0.5;
1331 else if (!strcmp(tmp_param, "center")) fmt->halign = 0.5;
1332 else if (!strcmp(tmp_param, "left")) fmt->halign = 0.0;
1333 else if (!strcmp(tmp_param, "right")) fmt->halign = 1.0;
1334 else
1335 {
1336 char *endptr = NULL;
1337 double val = strtod(tmp_param, &endptr);
1338 if (endptr)
1339 {
1340 while (*endptr && _is_white(*endptr))
1341 endptr++;
1342 if (*endptr == '%')
1343 val /= 100.0;
1344 }
1345 fmt->halign = val;
1346 if (fmt->halign < 0.0) fmt->halign = 0.0;
1347 else if (fmt->halign > 1.0) fmt->halign = 1.0;
1348 }
1349 fmt->halign_auto = EINA_FALSE;
1350 }
1351 }
1352 else if (cmd == valignstr)
1353 {
1354 if (!strcmp(tmp_param, "top")) fmt->valign = 0.0;
1355 else if (!strcmp(tmp_param, "middle")) fmt->valign = 0.5;
1356 else if (!strcmp(tmp_param, "center")) fmt->valign = 0.5;
1357 else if (!strcmp(tmp_param, "bottom")) fmt->valign = 1.0;
1358 else if (!strcmp(tmp_param, "baseline")) fmt->valign = -1.0;
1359 else if (!strcmp(tmp_param, "base")) fmt->valign = -1.0;
1360 else
1361 {
1362 char *endptr = NULL;
1363 double val = strtod(tmp_param, &endptr);
1364 if (endptr)
1365 {
1366 while (*endptr && _is_white(*endptr))
1367 endptr++;
1368 if (*endptr == '%')
1369 val /= 100.0;
1370 }
1371 fmt->valign = val;
1372 if (fmt->valign < 0.0) fmt->valign = 0.0;
1373 else if (fmt->valign > 1.0) fmt->valign = 1.0;
1374 }
1375 }
1376 else if (cmd == wrapstr)
1377 {
1378 if (!strcmp(tmp_param, "word"))
1379 {
1380 fmt->wrap_word = 1;
1381 fmt->wrap_char = fmt->wrap_mixed = 0;
1382 }
1383 else if (!strcmp(tmp_param, "char"))
1384 {
1385 fmt->wrap_word = fmt->wrap_mixed = 0;
1386 fmt->wrap_char = 1;
1387 }
1388 else if (!strcmp(tmp_param, "mixed"))
1389 {
1390 fmt->wrap_word = fmt->wrap_char = 0;
1391 fmt->wrap_mixed = 1;
1392 }
1393 else
1394 {
1395 fmt->wrap_word = fmt->wrap_mixed = fmt->wrap_char = 0;
1396 }
1397 }
1398 else if (cmd == left_marginstr)
1399 {
1400 if (!strcmp(tmp_param, "reset"))
1401 fmt->margin.l = 0;
1402 else
1403 {
1404 if (tmp_param[0] == '+')
1405 fmt->margin.l += atoi(&(tmp_param[1]));
1406 else if (tmp_param[0] == '-')
1407 fmt->margin.l -= atoi(&(tmp_param[1]));
1408 else
1409 fmt->margin.l = atoi(tmp_param);
1410 if (fmt->margin.l < 0) fmt->margin.l = 0;
1411 }
1412 }
1413 else if (cmd == right_marginstr)
1414 {
1415 if (!strcmp(tmp_param, "reset"))
1416 fmt->margin.r = 0;
1417 else
1418 {
1419 if (tmp_param[0] == '+')
1420 fmt->margin.r += atoi(&(tmp_param[1]));
1421 else if (tmp_param[0] == '-')
1422 fmt->margin.r -= atoi(&(tmp_param[1]));
1423 else
1424 fmt->margin.r = atoi(tmp_param);
1425 if (fmt->margin.r < 0) fmt->margin.r = 0;
1426 }
1427 }
1428 else if (cmd == underlinestr)
1429 {
1430 if (!strcmp(tmp_param, "off"))
1431 {
1432 fmt->underline = 0;
1433 fmt->underline2 = 0;
1434 }
1435 else if ((!strcmp(tmp_param, "on")) ||
1436 (!strcmp(tmp_param, "single")))
1437 {
1438 fmt->underline = 1;
1439 fmt->underline2 = 0;
1440 }
1441 else if (!strcmp(tmp_param, "double"))
1442 {
1443 fmt->underline = 1;
1444 fmt->underline2 = 1;
1445 }
1446 else if (!strcmp(tmp_param, "dashed"))
1447 fmt->underline_dash = 1;
1448 }
1449 else if (cmd == strikethroughstr)
1450 {
1451 if (!strcmp(tmp_param, "off"))
1452 fmt->strikethrough = 0;
1453 else if (!strcmp(tmp_param, "on"))
1454 fmt->strikethrough = 1;
1455 }
1456 else if (cmd == backingstr)
1457 {
1458 if (!strcmp(tmp_param, "off"))
1459 fmt->backing = 0;
1460 else if (!strcmp(tmp_param, "on"))
1461 fmt->backing = 1;
1462 }
1463 else if (cmd == stylestr)
1464 {
1465 char *p1, *p2, *p, *pp;
1466
1467 p1 = alloca(len + 1);
1468 *p1 = 0;
1469 p2 = alloca(len + 1);
1470 *p2 = 0;
1471 /* no comma */
1472 if (!strstr(tmp_param, ",")) p1 = tmp_param;
1473 else
1474 {
1475 /* split string "str1,str2" into p1 and p2 (if we have more than
1476 * 1 str2 eg "str1,str2,str3,str4" then we don't care. p2 just
1477 * ends up being the last one as right now it's only valid to have
1478 * 1 comma and 2 strings */
1479 pp = p1;
1480 for (p = tmp_param; *p; p++)
1481 {
1482 if (*p == ',')
1483 {
1484 *pp = 0;
1485 pp = p2;
1486 continue;
1487 }
1488 *pp = *p;
1489 pp++;
1490 }
1491 *pp = 0;
1492 }
1493 if (!strcmp(p1, "off")) fmt->style = EVAS_TEXT_STYLE_PLAIN;
1494 else if (!strcmp(p1, "none")) fmt->style = EVAS_TEXT_STYLE_PLAIN;
1495 else if (!strcmp(p1, "plain")) fmt->style = EVAS_TEXT_STYLE_PLAIN;
1496 else if (!strcmp(p1, "shadow")) fmt->style = EVAS_TEXT_STYLE_SHADOW;
1497 else if (!strcmp(p1, "outline")) fmt->style = EVAS_TEXT_STYLE_OUTLINE;
1498 else if (!strcmp(p1, "soft_outline")) fmt->style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
1499 else if (!strcmp(p1, "outline_shadow")) fmt->style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
1500 else if (!strcmp(p1, "outline_soft_shadow")) fmt->style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
1501 else if (!strcmp(p1, "glow")) fmt->style = EVAS_TEXT_STYLE_GLOW;
1502 else if (!strcmp(p1, "far_shadow")) fmt->style = EVAS_TEXT_STYLE_FAR_SHADOW;
1503 else if (!strcmp(p1, "soft_shadow")) fmt->style = EVAS_TEXT_STYLE_SOFT_SHADOW;
1504 else if (!strcmp(p1, "far_soft_shadow")) fmt->style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
1505 else fmt->style = EVAS_TEXT_STYLE_PLAIN;
1506
1507 if (*p2)
1508 {
1509 if (!strcmp(p2, "bottom_right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT);
1510 else if (!strcmp(p2, "bottom")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM);
1511 else if (!strcmp(p2, "bottom_left")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT);
1512 else if (!strcmp(p2, "left")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT);
1513 else if (!strcmp(p2, "top_left")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT);
1514 else if (!strcmp(p2, "top")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP);
1515 else if (!strcmp(p2, "top_right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT);
1516 else if (!strcmp(p2, "right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT);
1517 else EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT);
1518 }
1519 }
1520 else if (cmd == tabstopsstr)
1521 {
1522 fmt->tabstops = atoi(tmp_param);
1523 if (fmt->tabstops < 1) fmt->tabstops = 1;
1524 }
1525 else if (cmd == linesizestr)
1526 {
1527 fmt->linesize = atoi(tmp_param);
1528 fmt->linerelsize = 0.0;
1529 }
1530 else if (cmd == linerelsizestr)
1531 {
1532 char *endptr = NULL;
1533 double val = strtod(tmp_param, &endptr);
1534 if (endptr)
1535 {
1536 while (*endptr && _is_white(*endptr))
1537 endptr++;
1538 if (*endptr == '%')
1539 {
1540 fmt->linerelsize = val / 100.0;
1541 fmt->linesize = 0;
1542 if (fmt->linerelsize < 0.0) fmt->linerelsize = 0.0;
1543 }
1544 }
1545 }
1546 else if (cmd == linegapstr)
1547 {
1548 fmt->linegap = atoi(tmp_param);
1549 fmt->linerelgap = 0.0;
1550 }
1551 else if (cmd == linerelgapstr)
1552 {
1553 char *endptr = NULL;
1554 double val = strtod(tmp_param, &endptr);
1555 if (endptr)
1556 {
1557 while (*endptr && _is_white(*endptr))
1558 endptr++;
1559 if (*endptr == '%')
1560 {
1561 fmt->linerelgap = val / 100.0;
1562 fmt->linegap = 0;
1563 if (fmt->linerelgap < 0.0) fmt->linerelgap = 0.0;
1564 }
1565 }
1566 }
1567 else if (cmd == itemstr)
1568 {
1569 // itemstr == replacement object items in textblock - inline imges
1570 // for example
1571 }
1572 else if (cmd == linefillstr)
1573 {
1574 char *endptr = NULL;
1575 double val = strtod(tmp_param, &endptr);
1576 if (endptr)
1577 {
1578 while (*endptr && _is_white(*endptr))
1579 endptr++;
1580 if (*endptr == '%')
1581 {
1582 fmt->linefill = val / 100.0;
1583 if (fmt->linefill < 0.0) fmt->linefill = 0.0;
1584 }
1585 }
1586 }
1587 else if (cmd == ellipsisstr)
1588 {
1589 char *endptr = NULL;
1590 fmt->ellipsis = strtod(tmp_param, &endptr);
1591 if ((fmt->ellipsis < 0.0) || (fmt->ellipsis > 1.0))
1592 fmt->ellipsis = -1.0;
1593 else
1594 {
1595 Evas_Object_Textblock *o;
1596
1597 o = (Evas_Object_Textblock *)(obj->object_data);
1598 o->have_ellipsis = 1;
1599 }
1600 }
1601 else if (cmd == passwordstr)
1602 {
1603 if (!strcmp(tmp_param, "off"))
1604 fmt->password = 0;
1605 else if (!strcmp(tmp_param, "on"))
1606 fmt->password = 1;
1607 }
1608 else if (cmd == underline_dash_widthstr)
1609 {
1610 fmt->underline_dash_width = atoi(tmp_param);
1611 if (fmt->underline_dash_width <= 0) fmt->underline_dash_width = 1;
1612 }
1613 else if (cmd == underline_dash_gapstr)
1614 {
1615 fmt->underline_dash_gap = atoi(tmp_param);
1616 if (fmt->underline_dash_gap <= 0) fmt->underline_dash_gap = 1;
1617 }
1618}
1619
1620/**
1621 * @internal
1622 * Returns #EINA_TRUE if the item is a format parameter, #EINA_FALSE otherwise.
1623 *
1624 * @param[in] item the item to check - Not NULL.
1625 */
1626static Eina_Bool
1627_format_is_param(const char *item)
1628{
1629 if (strchr(item, '=')) return EINA_TRUE;
1630 return EINA_FALSE;
1631}
1632
1633/**
1634 * @internal
1635 * Parse the format item and populate key and val with the stringshares that
1636 * corrospond to the formats parsed.
1637 * It expects item to be of the structure:
1638 * "key=val"
1639 *
1640 * @param[in] item the item to parse - Not NULL.
1641 * @param[out] key where to store the key at - Not NULL.
1642 * @param[out] val where to store the value at - Not NULL.
1643 */
1644static void
1645_format_param_parse(const char *item, const char **key, const char **val)
1646{
1647 const char *start, *end, *quote;
1648
1649 start = strchr(item, '=');
1650 *key = eina_stringshare_add_length(item, start - item);
1651 start++; /* Advance after the '=' */
1652 /* If we can find a quote, our new delimiter is a quote, not a space. */
1653 if ((quote = strchr(start, '\'')))
1654 {
1655 start = quote + 1;
1656 end = strchr(start, '\'');
1657 }
1658 else
1659 {
1660 end = strchr(start, ' ');
1661 }
1662
1663 /* Null terminate before the spaces */
1664 if (end)
1665 {
1666 *val = eina_stringshare_add_length(start, end - start);
1667 }
1668 else
1669 {
1670 *val = eina_stringshare_add(start);
1671 }
1672}
1673
1674/**
1675 * @internal
1676 * This function parses the format passed in *s and advances s to point to the
1677 * next format item, while returning the current one as the return value.
1678 * @param s The current and returned position in the format string.
1679 * @return the current item parsed from the string.
1680 */
1681static const char *
1682_format_parse(const char **s)
1683{
1684 const char *p;
1685 const char *s1 = NULL, *s2 = NULL;
1686 Eina_Bool quote = EINA_FALSE;;
1687
1688 p = *s;
1689 if (*p == 0) return NULL;
1690 for (;;)
1691 {
1692 if (!s1)
1693 {
1694 if (*p != ' ') s1 = p;
1695 if (*p == 0) break;
1696 }
1697 else if (!s2)
1698 {
1699 if (*p == '\'')
1700 {
1701 quote = !quote;
1702 }
1703
1704 if ((p > *s) && (p[-1] != '\\') && (!quote))
1705 {
1706 if (*p == ' ') s2 = p;
1707 }
1708 if (*p == 0) s2 = p;
1709 }
1710 p++;
1711 if (s1 && s2)
1712 {
1713 *s = s2;
1714 return s1;
1715 }
1716 }
1717 *s = p;
1718 return NULL;
1719}
1720
1721/**
1722 * @internal
1723 * Parse the format str and populate fmt with the formats found.
1724 *
1725 * @param obj The evas object - Not NULL.
1726 * @param[out] fmt The format to populate - Not NULL.
1727 * @param[in] str the string to parse.- Not NULL.
1728 */
1729static void
1730_format_fill(Evas_Object *obj, Evas_Object_Textblock_Format *fmt, const char *str)
1731{
1732 const char *s;
1733 const char *item;
1734
1735 s = str;
1736
1737 /* get rid of any spaces at the start of the string */
1738 while (*s == ' ') s++;
1739
1740 while ((item = _format_parse(&s)))
1741 {
1742 if (_format_is_param(item))
1743 {
1744 const char *key = NULL, *val = NULL;
1745
1746 _format_param_parse(item, &key, &val);
1747 _format_command(obj, fmt, key, val);
1748 eina_stringshare_del(key);
1749 eina_stringshare_del(val);
1750 }
1751 else
1752 {
1753 /* immediate - not handled here */
1754 }
1755 }
1756}
1757
1758/**
1759 * @internal
1760 * Duplicate a format and return the duplicate.
1761 *
1762 * @param obj The evas object - Not NULL.
1763 * @param[in] fmt The format to duplicate - Not NULL.
1764 * @return the copy of the format.
1765 */
1766static Evas_Object_Textblock_Format *
1767_format_dup(Evas_Object *obj, const Evas_Object_Textblock_Format *fmt)
1768{
1769 Evas_Object_Textblock_Format *fmt2;
1770
1771 fmt2 = calloc(1, sizeof(Evas_Object_Textblock_Format));
1772 memcpy(fmt2, fmt, sizeof(Evas_Object_Textblock_Format));
1773 fmt2->ref = 1;
1774 fmt2->font.fdesc = evas_font_desc_ref(fmt->font.fdesc);
1775
1776 if (fmt->font.source) fmt2->font.source = eina_stringshare_add(fmt->font.source);
1777
1778 /* FIXME: just ref the font here... */
1779 fmt2->font.font = evas_font_load(obj->layer->evas, fmt2->font.fdesc,
1780 fmt2->font.source, (int)(((double) fmt2->font.size) * obj->cur.scale));
1781 return fmt2;
1782}
1783
1784
1785
1786
1787/**
1788 * @internal
1789 * @typedef Ctxt
1790 *
1791 * A pack of information that needed to be passed around in the layout engine,
1792 * packed for easier access.
1793 */
1794typedef struct _Ctxt Ctxt;
1795
1796struct _Ctxt
1797{
1798 Evas_Object *obj;
1799 Evas_Object_Textblock *o;
1800
1801 Evas_Object_Textblock_Paragraph *paragraphs;
1802 Evas_Object_Textblock_Paragraph *par;
1803 Evas_Object_Textblock_Line *ln;
1804
1805
1806 Eina_List *format_stack;
1807 Evas_Object_Textblock_Format *fmt;
1808
1809 int x, y;
1810 int w, h;
1811 int wmax, hmax;
1812 int maxascent, maxdescent;
1813 int marginl, marginr;
1814 int line_no;
1815 int underline_extend;
1816 int have_underline, have_underline2;
1817 double align, valign;
1818 Eina_Bool align_auto : 1;
1819 Eina_Bool width_changed : 1;
1820};
1821
1822static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, Eina_List *rel);
1823static void _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti);
1824static 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);
1825/**
1826 * @internal
1827 * Adjust the ascent/descent of the format and context.
1828 *
1829 * @param maxascent The ascent to update - Not NUL.
1830 * @param maxdescent The descent to update - Not NUL.
1831 * @param fmt The format to adjust - NOT NULL.
1832 */
1833static void
1834_layout_format_ascent_descent_adjust(const Evas_Object *obj,
1835 Evas_Coord *maxascent, Evas_Coord *maxdescent,
1836 Evas_Object_Textblock_Format *fmt)
1837{
1838 int ascent, descent;
1839
1840 if (fmt->font.font)
1841 {
1842 // ascent = c->ENFN->font_max_ascent_get(c->ENDT, fmt->font.font);
1843 // descent = c->ENFN->font_max_descent_get(c->ENDT, fmt->font.font);
1844 ascent = ENFN->font_ascent_get(ENDT, fmt->font.font);
1845 descent = ENFN->font_descent_get(ENDT, fmt->font.font);
1846 if (fmt->linesize > 0)
1847 {
1848 if ((ascent + descent) < fmt->linesize)
1849 {
1850 ascent = ((fmt->linesize * ascent) / (ascent + descent));
1851 descent = fmt->linesize - ascent;
1852 }
1853 }
1854 else if (fmt->linerelsize > 0.0)
1855 {
1856 descent = descent * fmt->linerelsize;
1857 ascent = ascent * fmt->linerelsize;
1858 }
1859 descent += fmt->linegap;
1860 descent += ((ascent + descent) * fmt->linerelgap);
1861 if (*maxascent < ascent) *maxascent = ascent;
1862 if (*maxdescent < descent) *maxdescent = descent;
1863 if (fmt->linefill > 0.0)
1864 {
1865 int dh;
1866
1867 dh = obj->cur.geometry.h - (*maxascent + *maxdescent);
1868 if (dh < 0) dh = 0;
1869 dh = fmt->linefill * dh;
1870 *maxdescent += dh / 2;
1871 *maxascent += dh - (dh / 2);
1872 // FIXME: set flag that says "if heigh changes - reformat"
1873 }
1874 }
1875}
1876
1877/**
1878 * @internal
1879 * Create a new line using the info from the format and update the format
1880 * and context.
1881 *
1882 * @param c The context to work on - Not NULL.
1883 * @param fmt The format to use info from - NOT NULL.
1884 */
1885static void
1886_layout_line_new(Ctxt *c, Evas_Object_Textblock_Format *fmt)
1887{
1888 c->ln = calloc(1, sizeof(Evas_Object_Textblock_Line));
1889 c->align = fmt->halign;
1890 c->align_auto = fmt->halign_auto;
1891 c->marginl = fmt->margin.l;
1892 c->marginr = fmt->margin.r;
1893 c->par->lines = (Evas_Object_Textblock_Line *)eina_inlist_append(EINA_INLIST_GET(c->par->lines), EINA_INLIST_GET(c->ln));
1894 c->x = 0;
1895 c->maxascent = c->maxdescent = 0;
1896 c->ln->line_no = -1;
1897 c->ln->par = c->par;
1898}
1899
1900static inline Evas_Object_Textblock_Paragraph *
1901_layout_find_paragraph_by_y(Evas_Object_Textblock *o, Evas_Coord y)
1902{
1903 Evas_Object_Textblock_Paragraph *start, *par;
1904 int i;
1905
1906 start = o->paragraphs;
1907
1908 for (i = 0 ; i < TEXTBLOCK_PAR_INDEX_SIZE ; i++)
1909 {
1910 if (!o->par_index[i] || (o->par_index[i]->y > y))
1911 {
1912 break;
1913 }
1914 start = o->par_index[i];
1915 }
1916
1917 EINA_INLIST_FOREACH(start, par)
1918 {
1919 if ((par->y <= y) && (y < par->y + par->h))
1920 return par;
1921 }
1922
1923 return NULL;
1924}
1925
1926static inline Evas_Object_Textblock_Paragraph *
1927_layout_find_paragraph_by_line_no(Evas_Object_Textblock *o, int line_no)
1928{
1929 Evas_Object_Textblock_Paragraph *start, *par;
1930 int i;
1931
1932 start = o->paragraphs;
1933
1934 for (i = 0 ; i < TEXTBLOCK_PAR_INDEX_SIZE ; i++)
1935 {
1936 if (!o->par_index[i] || (o->par_index[i]->line_no > line_no))
1937 {
1938 break;
1939 }
1940 start = o->par_index[i];
1941 }
1942
1943 EINA_INLIST_FOREACH(start, par)
1944 {
1945 Evas_Object_Textblock_Paragraph *npar =
1946 (Evas_Object_Textblock_Paragraph *) EINA_INLIST_GET(par)->next;
1947 if ((par->line_no <= line_no) &&
1948 (!npar || (line_no < npar->line_no)))
1949 return par;
1950 }
1951
1952 return NULL;
1953}
1954/* End of rbtree index functios */
1955
1956/**
1957 * @internal
1958 * Create a new layout paragraph.
1959 * If c->par is not NULL, the paragraph is appended/prepended according
1960 * to the append parameter. If it is NULL, the paragraph is appended at
1961 * the end of the list.
1962 *
1963 * @param c The context to work on - Not NULL.
1964 * @param n the associated text node
1965 * @param append true to append, false to prpend.
1966 */
1967static void
1968_layout_paragraph_new(Ctxt *c, Evas_Object_Textblock_Node_Text *n,
1969 Eina_Bool append)
1970{
1971 Evas_Object_Textblock_Paragraph *rel_par = c->par;
1972 c->par = calloc(1, sizeof(Evas_Object_Textblock_Paragraph));
1973 if (append || !rel_par)
1974 c->paragraphs = (Evas_Object_Textblock_Paragraph *)
1975 eina_inlist_append_relative(EINA_INLIST_GET(c->paragraphs),
1976 EINA_INLIST_GET(c->par),
1977 EINA_INLIST_GET(rel_par));
1978 else
1979 c->paragraphs = (Evas_Object_Textblock_Paragraph *)
1980 eina_inlist_prepend_relative(EINA_INLIST_GET(c->paragraphs),
1981 EINA_INLIST_GET(c->par),
1982 EINA_INLIST_GET(rel_par));
1983
1984 c->ln = NULL;
1985 c->par->text_node = n;
1986 if (n)
1987 n->par = c->par;
1988 c->par->line_no = -1;
1989 c->par->visible = 1;
1990 c->o->num_paragraphs++;
1991}
1992
1993#ifdef BIDI_SUPPORT
1994/**
1995 * @internal
1996 * Update bidi paragraph props.
1997 *
1998 * @param par The paragraph to update
1999 */
2000static inline void
2001_layout_update_bidi_props(const Evas_Object_Textblock *o,
2002 Evas_Object_Textblock_Paragraph *par)
2003{
2004 if (par->text_node)
2005 {
2006 const Eina_Unicode *text;
2007 int *segment_idxs = NULL;
2008 text = eina_ustrbuf_string_get(par->text_node->unicode);
2009
2010 if (o->bidi_delimiters)
2011 segment_idxs = evas_bidi_segment_idxs_get(text, o->bidi_delimiters);
2012
2013 evas_bidi_paragraph_props_unref(par->bidi_props);
2014 par->bidi_props = evas_bidi_paragraph_props_get(text,
2015 eina_ustrbuf_length_get(par->text_node->unicode),
2016 segment_idxs);
2017 par->direction = EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(par->bidi_props) ?
2018 EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
2019 par->is_bidi = !!par->bidi_props;
2020 if (segment_idxs) free(segment_idxs);
2021 }
2022}
2023#endif
2024
2025
2026/**
2027 * @internal
2028 * Free the visual lines in the paragraph (logical items are kept)
2029 */
2030static void
2031_paragraph_clear(const Evas_Object *obj __UNUSED__,
2032 Evas_Object_Textblock_Paragraph *par)
2033{
2034 while (par->lines)
2035 {
2036 Evas_Object_Textblock_Line *ln;
2037
2038 ln = (Evas_Object_Textblock_Line *) par->lines;
2039 par->lines = (Evas_Object_Textblock_Line *)eina_inlist_remove(EINA_INLIST_GET(par->lines), EINA_INLIST_GET(par->lines));
2040 _line_free(ln);
2041 }
2042}
2043
2044/**
2045 * @internal
2046 * Free the layout paragraph and all of it's lines and logical items.
2047 */
2048static void
2049_paragraph_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *par)
2050{
2051 Evas_Object_Textblock *o;
2052 o = (Evas_Object_Textblock *)(obj->object_data);
2053 _paragraph_clear(obj, par);
2054
2055 {
2056 Eina_List *i, *i_prev;
2057 Evas_Object_Textblock_Item *it;
2058 EINA_LIST_FOREACH_SAFE(par->logical_items, i, i_prev, it)
2059 {
2060 _item_free(obj, NULL, it);
2061 }
2062 eina_list_free(par->logical_items);
2063 }
2064#ifdef BIDI_SUPPORT
2065 if (par->bidi_props)
2066 evas_bidi_paragraph_props_unref(par->bidi_props);
2067#endif
2068 /* If we are the active par of the text node, set to NULL */
2069 if (par->text_node && (par->text_node->par == par))
2070 par->text_node->par = NULL;
2071
2072 o->num_paragraphs--;
2073
2074 free(par);
2075}
2076
2077/**
2078 * @internal
2079 * Clear all the paragraphs from the inlist pars.
2080 *
2081 * @param obj the evas object - Not NULL.
2082 * @param pars the paragraphs to clean - Not NULL.
2083 */
2084static void
2085_paragraphs_clear(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *pars)
2086{
2087 Evas_Object_Textblock_Paragraph *par;
2088
2089 EINA_INLIST_FOREACH(EINA_INLIST_GET(pars), par)
2090 {
2091 _paragraph_clear(obj, par);
2092 }
2093}
2094
2095/**
2096 * @internal
2097 * Free the paragraphs from the inlist pars, the difference between this and
2098 * _paragraphs_clear is that the latter keeps the logical items and the par
2099 * items, while the former frees them as well.
2100 *
2101 * @param obj the evas object - Not NULL.
2102 * @param pars the paragraphs to clean - Not NULL.
2103 */
2104static void
2105_paragraphs_free(const Evas_Object *obj, Evas_Object_Textblock_Paragraph *pars)
2106{
2107 Evas_Object_Textblock *o;
2108 o = (Evas_Object_Textblock *)(obj->object_data);
2109
2110 o->num_paragraphs = 0;
2111
2112 while (pars)
2113 {
2114 Evas_Object_Textblock_Paragraph *par;
2115
2116 par = (Evas_Object_Textblock_Paragraph *) pars;
2117 pars = (Evas_Object_Textblock_Paragraph *)eina_inlist_remove(EINA_INLIST_GET(pars), EINA_INLIST_GET(par));
2118 _paragraph_free(obj, par);
2119 }
2120}
2121
2122/**
2123 * @internal
2124 * Push fmt to the format stack, if fmt is NULL, will fush a default item.
2125 *
2126 * @param c the context to work on - Not NULL.
2127 * @param fmt the format to push.
2128 * @see _layout_format_pop()
2129 */
2130static Evas_Object_Textblock_Format *
2131_layout_format_push(Ctxt *c, Evas_Object_Textblock_Format *fmt,
2132 Evas_Object_Textblock_Node_Format *fnode)
2133{
2134 if (fmt)
2135 {
2136 fmt = _format_dup(c->obj, fmt);
2137 c->format_stack = eina_list_prepend(c->format_stack, fmt);
2138 fmt->fnode = fnode;
2139 }
2140 else
2141 {
2142 fmt = calloc(1, sizeof(Evas_Object_Textblock_Format));
2143 c->format_stack = eina_list_prepend(c->format_stack, fmt);
2144 fmt->ref = 1;
2145 fmt->halign = 0.0;
2146 fmt->halign_auto = EINA_TRUE;
2147 fmt->valign = -1.0;
2148 fmt->style = EVAS_TEXT_STYLE_PLAIN;
2149 fmt->tabstops = 32;
2150 fmt->linesize = 0;
2151 fmt->linerelsize = 0.0;
2152 fmt->linegap = 0;
2153 fmt->underline_dash_width = 6;
2154 fmt->underline_dash_gap = 2;
2155 fmt->linerelgap = 0.0;
2156 fmt->password = 1;
2157 }
2158 return fmt;
2159}
2160
2161/**
2162 * @internal
2163 * Pop fmt to the format stack, if there's something in the stack free fmt
2164 * and set it to point to the next item instead, else return fmt.
2165 *
2166 * @param c the context to work on - Not NULL.
2167 * @param format - the text of the format to free (assured to start with '-').
2168 * @return the next format in the stack, or format if there's none.
2169 * @see _layout_format_push()
2170 */
2171static Evas_Object_Textblock_Format *
2172_layout_format_pop(Ctxt *c, const char *format)
2173{
2174 Evas_Object_Textblock_Format *fmt = eina_list_data_get(c->format_stack);
2175
2176 if ((c->format_stack) && (c->format_stack->next))
2177 {
2178 Eina_List *redo_nodes = NULL;
2179
2180 /* Generic pop, should just pop. */
2181 if (((format[0] == ' ') && !format[1]) ||
2182 !format[0])
2183 {
2184 _format_unref_free(c->obj, fmt);
2185 c->format_stack =
2186 eina_list_remove_list(c->format_stack, c->format_stack);
2187 }
2188 else
2189 {
2190 size_t len = strlen(format);
2191 Eina_List *i, *i_next;
2192 /* Remove only the matching format. */
2193 EINA_LIST_FOREACH_SAFE(c->format_stack, i, i_next, fmt)
2194 {
2195 /* Stop when we reach the base item */
2196 if (!i_next)
2197 break;
2198
2199 c->format_stack =
2200 eina_list_remove_list(c->format_stack, c->format_stack);
2201
2202 /* Make sure the ending tag matches the starting tag.
2203 * I.e whole of the ending tag matches the start of the
2204 * starting tag, and the starting tag's next char is either
2205 * NULL or white. Skip the starting '+'. */
2206 if (_FORMAT_IS_CLOSER_OF(
2207 fmt->fnode->orig_format, format, len))
2208 {
2209 _format_unref_free(c->obj, fmt);
2210 break;
2211 }
2212 else
2213 {
2214 redo_nodes = eina_list_prepend(redo_nodes, fmt->fnode);
2215 _format_unref_free(c->obj, fmt);
2216 }
2217 }
2218 }
2219
2220 /* Redo all the nodes needed to be redone */
2221 {
2222 Evas_Object_Textblock_Node_Format *fnode;
2223 Eina_List *i, *i_next;
2224
2225 EINA_LIST_FOREACH_SAFE(redo_nodes, i, i_next, fnode)
2226 {
2227 /* FIXME: Actually do something with the new acquired padding,
2228 * the can be different and affect our padding! */
2229 Evas_Coord style_pad_l, style_pad_r, style_pad_t, style_pad_b;
2230 style_pad_l = style_pad_r = style_pad_t = style_pad_b = 0;
2231 redo_nodes = eina_list_remove_list(redo_nodes, i);
2232 fmt = eina_list_data_get(c->format_stack);
2233 _layout_do_format(c->obj, c, &fmt, fnode,
2234 &style_pad_l, &style_pad_r,
2235 &style_pad_t, &style_pad_b, EINA_FALSE);
2236 }
2237 }
2238
2239 fmt = eina_list_data_get(c->format_stack);
2240 }
2241 return fmt;
2242}
2243
2244/**
2245 * @internal
2246 * Parse item and fill fmt with the item.
2247 *
2248 * @param c the context to work on - Not NULL.
2249 * @param fmt the format to fill - not null.
2250 */
2251static void
2252_layout_format_value_handle(Ctxt *c, Evas_Object_Textblock_Format *fmt, const char *item)
2253{
2254 const char *key = NULL, *val = NULL;
2255
2256 _format_param_parse(item, &key, &val);
2257 if ((key) && (val)) _format_command(c->obj, fmt, key, val);
2258 if (key) eina_stringshare_del(key);
2259 if (val) eina_stringshare_del(val);
2260 c->align = fmt->halign;
2261 c->align_auto = fmt->halign_auto;
2262 c->marginl = fmt->margin.l;
2263 c->marginr = fmt->margin.r;
2264}
2265
2266#define VSIZE_FULL 0
2267#define VSIZE_ASCENT 1
2268
2269#define SIZE 0
2270#define SIZE_ABS 1
2271#define SIZE_REL 2
2272
2273/**
2274 * @internal
2275 * Get the current line's alignment from the context.
2276 *
2277 * @param c the context to work on - Not NULL.
2278 */
2279static inline double
2280_layout_line_align_get(Ctxt *c)
2281{
2282#ifdef BIDI_SUPPORT
2283 if (c->align_auto && c->ln)
2284 {
2285 if (c->ln->items && c->ln->items->text_node &&
2286 (c->ln->par->direction == EVAS_BIDI_DIRECTION_RTL))
2287 {
2288 /* Align right*/
2289 return 1.0;
2290 }
2291 else
2292 {
2293 /* Align left */
2294 return 0.0;
2295 }
2296 }
2297#endif
2298 return c->align;
2299}
2300
2301#ifdef BIDI_SUPPORT
2302/**
2303 * @internal
2304 * Reorder the items in visual order
2305 *
2306 * @param line the line to reorder
2307 */
2308static void
2309_layout_line_reorder(Evas_Object_Textblock_Line *line)
2310{
2311 /*FIXME: do it a bit more efficient - not very efficient ATM. */
2312 Evas_Object_Textblock_Item *it;
2313 EvasBiDiStrIndex *v_to_l = NULL;
2314 Evas_Coord x;
2315 size_t start, end;
2316 size_t len;
2317
2318 if (line->items && line->items->text_node &&
2319 line->par->bidi_props)
2320 {
2321 Evas_BiDi_Paragraph_Props *props;
2322 props = line->par->bidi_props;
2323 start = end = line->items->text_pos;
2324
2325 /* Find the first and last positions in the line */
2326
2327 EINA_INLIST_FOREACH(line->items, it)
2328 {
2329 if (it->text_pos < start)
2330 {
2331 start = it->text_pos;
2332 }
2333 else
2334 {
2335 int tlen;
2336 tlen = (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ?
2337 _ITEM_TEXT(it)->text_props.text_len : 1;
2338 if (it->text_pos + tlen > end)
2339 {
2340 end = it->text_pos + tlen;
2341 }
2342 }
2343 }
2344
2345 len = end - start;
2346 evas_bidi_props_reorder_line(NULL, start, len, props, &v_to_l);
2347
2348 /* Update visual pos */
2349 {
2350 Evas_Object_Textblock_Item *i;
2351 i = line->items;
2352 while (i)
2353 {
2354 i->visual_pos = evas_bidi_position_logical_to_visual(
2355 v_to_l, len, i->text_pos - start);
2356 i = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(i)->next;
2357 }
2358 }
2359
2360 /*FIXME: not very efficient, sort the items arrays. Anyhow, should only
2361 * reorder if it's a bidi paragraph */
2362 {
2363 Evas_Object_Textblock_Item *i, *j, *min;
2364 i = line->items;
2365 while (i)
2366 {
2367 min = i;
2368 EINA_INLIST_FOREACH(i, j)
2369 {
2370 if (j->visual_pos < min->visual_pos)
2371 {
2372 min = j;
2373 }
2374 }
2375 if (min != i)
2376 {
2377 line->items = (Evas_Object_Textblock_Item *) eina_inlist_remove(EINA_INLIST_GET(line->items), EINA_INLIST_GET(min));
2378 line->items = (Evas_Object_Textblock_Item *) eina_inlist_prepend_relative(EINA_INLIST_GET(line->items), EINA_INLIST_GET(min), EINA_INLIST_GET(i));
2379 }
2380
2381 i = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(min)->next;
2382 }
2383 }
2384 }
2385
2386 if (v_to_l) free(v_to_l);
2387 x = 0;
2388 EINA_INLIST_FOREACH(line->items, it)
2389 {
2390 it->x = x;
2391 x += it->adv;
2392 }
2393}
2394#endif
2395
2396/* FIXME: doc */
2397static void
2398_layout_calculate_format_item_size(const Evas_Object *obj,
2399 const Evas_Object_Textblock_Format_Item *fi,
2400 Evas_Coord *maxascent, Evas_Coord *maxdescent,
2401 Evas_Coord *_y, Evas_Coord *_w, Evas_Coord *_h)
2402{
2403 /* Adjust sizes according to current line height/scale */
2404 Evas_Coord w, h;
2405 const char *p, *s;
2406
2407 s = fi->item;
2408 w = fi->parent.w;
2409 h = fi->parent.h;
2410 switch (fi->size)
2411 {
2412 case SIZE:
2413 p = strstr(s, " size=");
2414 if (p)
2415 {
2416 p += 6;
2417 if (sscanf(p, "%ix%i", &w, &h) == 2)
2418 {
2419 w = w * obj->cur.scale;
2420 h = h * obj->cur.scale;
2421 }
2422 }
2423 break;
2424 case SIZE_REL:
2425 p = strstr((char *) s, " relsize=");
2426 p += 9;
2427 if (sscanf(p, "%ix%i", &w, &h) == 2)
2428 {
2429 int sz = 1;
2430 if (fi->vsize == VSIZE_FULL)
2431 {
2432 sz = *maxdescent + *maxascent;
2433 }
2434 else if (fi->vsize == VSIZE_ASCENT)
2435 {
2436 sz = *maxascent;
2437 }
2438 w = (w * sz) / h;
2439 h = sz;
2440 }
2441 break;
2442 case SIZE_ABS:
2443 /* Nothing to do */
2444 default:
2445 break;
2446 }
2447
2448 switch (fi->size)
2449 {
2450 case SIZE:
2451 case SIZE_ABS:
2452 switch (fi->vsize)
2453 {
2454 case VSIZE_FULL:
2455 if (h > (*maxdescent + *maxascent))
2456 {
2457 *maxascent += h - (*maxdescent + *maxascent);
2458 *_y = -*maxascent;
2459 }
2460 else
2461 *_y = -(h - *maxdescent);
2462 break;
2463 case VSIZE_ASCENT:
2464 if (h > *maxascent)
2465 {
2466 *maxascent = h;
2467 *_y = -h;
2468 }
2469 else
2470 *_y = -h;
2471 break;
2472 default:
2473 break;
2474 }
2475 break;
2476 case SIZE_REL:
2477 switch (fi->vsize)
2478 {
2479 case VSIZE_FULL:
2480 case VSIZE_ASCENT:
2481 *_y = -*maxascent;
2482 break;
2483 default:
2484 break;
2485 }
2486 break;
2487 default:
2488 break;
2489 }
2490
2491 *_w = w;
2492 *_h = h;
2493}
2494
2495/**
2496 * @internal
2497 * Order the items in the line, update it's properties and update it's
2498 * corresponding paragraph.
2499 *
2500 * @param c the context to work on - Not NULL.
2501 * @param fmt the format to use.
2502 * @param add_line true if we should create a line, false otherwise.
2503 */
2504static void
2505_layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt)
2506{
2507 Evas_Object_Textblock_Item *it;
2508 Evas_Coord x = 0;
2509
2510 /* If there are no text items yet, calc ascent/descent
2511 * according to the current format. */
2512 if (c->maxascent + c->maxdescent == 0)
2513 _layout_format_ascent_descent_adjust(c->obj, &c->maxascent,
2514 &c->maxdescent, fmt);
2515
2516 /* Adjust all the item sizes according to the final line size,
2517 * and update the x positions of all the items of the line. */
2518 EINA_INLIST_FOREACH(c->ln->items, it)
2519 {
2520 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
2521 {
2522 Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
2523 if (!fi->formatme) goto loop_advance;
2524 _layout_calculate_format_item_size(c->obj, fi, &c->maxascent,
2525 &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h);
2526 fi->parent.adv = fi->parent.w;
2527 }
2528
2529loop_advance:
2530 it->x = x;
2531 x += it->adv;
2532
2533 if ((it->x + it->adv) > c->ln->w) c->ln->w = it->x + it->adv;
2534 }
2535
2536 c->ln->y = (c->y - c->par->y) + c->o->style_pad.t;
2537 c->ln->h = c->maxascent + c->maxdescent;
2538 c->ln->baseline = c->maxascent;
2539 if (c->have_underline2)
2540 {
2541 if (c->maxdescent < 4) c->underline_extend = 4 - c->maxdescent;
2542 }
2543 else if (c->have_underline)
2544 {
2545 if (c->maxdescent < 2) c->underline_extend = 2 - c->maxdescent;
2546 }
2547 c->ln->line_no = c->line_no - c->ln->par->line_no;
2548 c->line_no++;
2549 c->y += c->maxascent + c->maxdescent;
2550 if (c->w >= 0)
2551 {
2552 c->ln->x = c->marginl + c->o->style_pad.l +
2553 ((c->w - c->ln->w -
2554 c->o->style_pad.l - c->o->style_pad.r -
2555 c->marginl - c->marginr) * _layout_line_align_get(c));
2556 }
2557 else
2558 {
2559 c->ln->x = c->marginl + c->o->style_pad.l;
2560 }
2561
2562 c->par->h = c->ln->y + c->ln->h;
2563 if (c->ln->w > c->par->w)
2564 c->par->w = c->ln->w;
2565
2566 {
2567 Evas_Coord new_wmax = c->ln->w +
2568 c->marginl + c->marginr - (c->o->style_pad.l + c->o->style_pad.r);
2569 if (new_wmax > c->wmax)
2570 c->wmax = new_wmax;
2571 }
2572}
2573
2574/**
2575 * @internal
2576 * Create a new line and append it to the lines in the context.
2577 *
2578 * @param c the context to work on - Not NULL.
2579 * @param fmt the format to use.
2580 * @param add_line true if we should create a line, false otherwise.
2581 */
2582static void
2583_layout_line_advance(Ctxt *c, Evas_Object_Textblock_Format *fmt)
2584{
2585 _layout_line_finalize(c, fmt);
2586 _layout_line_new(c, fmt);
2587}
2588
2589/**
2590 * @internal
2591 * Create a new text layout item from the string and the format.
2592 *
2593 * @param c the context to work on - Not NULL.
2594 * @param fmt the format to use.
2595 * @param str the string to use.
2596 * @param len the length of the string.
2597 */
2598static Evas_Object_Textblock_Text_Item *
2599_layout_text_item_new(Ctxt *c __UNUSED__, Evas_Object_Textblock_Format *fmt)
2600{
2601 Evas_Object_Textblock_Text_Item *ti;
2602
2603 ti = calloc(1, sizeof(Evas_Object_Textblock_Text_Item));
2604 ti->parent.format = fmt;
2605 ti->parent.format->ref++;
2606 ti->parent.type = EVAS_TEXTBLOCK_ITEM_TEXT;
2607 return ti;
2608}
2609
2610/**
2611 * @internal
2612 * Return the cutoff of the text in the text item.
2613 *
2614 * @param c the context to work on - Not NULL.
2615 * @param fmt the format to use. - Not NULL.
2616 * @param it the item to check - Not null.
2617 * @return -1 if there is no cutoff (either because there is really none,
2618 * or because of an error), cutoff index on success.
2619 */
2620static int
2621_layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt,
2622 const Evas_Object_Textblock_Text_Item *ti)
2623{
2624 if (fmt->font.font)
2625 {
2626 Evas_Coord x;
2627 x = c->w - c->o->style_pad.l - c->o->style_pad.r - c->marginl -
2628 c->marginr - c->x - ti->x_adjustment;
2629 if (x < 0)
2630 x = 0;
2631 return c->ENFN->font_last_up_to_pos(c->ENDT, fmt->font.font,
2632 &ti->text_props, x, 0);
2633 }
2634 return -1;
2635}
2636
2637/**
2638 * @internal
2639 * Split before cut, and strip if str[cut - 1] is a whitespace.
2640 *
2641 * @param c the context to work on - Not NULL.
2642 * @param ti the item to cut - not null.
2643 * @param lti the logical list item of the item.
2644 * @param cut the cut index.
2645 * @return the second (newly created) item.
2646 */
2647static Evas_Object_Textblock_Text_Item *
2648_layout_item_text_split_strip_white(Ctxt *c,
2649 Evas_Object_Textblock_Text_Item *ti, Eina_List *lti, size_t cut)
2650{
2651 const Eina_Unicode *ts;
2652 Evas_Object_Textblock_Text_Item *new_ti = NULL, *white_ti = NULL;
2653
2654 ts = GET_ITEM_TEXT(ti);
2655
2656 if (!IS_AT_END(ti, cut) && (ti->text_props.text_len > 0))
2657 {
2658 new_ti = _layout_text_item_new(c, ti->parent.format);
2659 new_ti->parent.text_node = ti->parent.text_node;
2660 new_ti->parent.text_pos = ti->parent.text_pos + cut;
2661 new_ti->parent.merge = EINA_TRUE;
2662
2663 evas_common_text_props_split(&ti->text_props,
2664 &new_ti->text_props, cut);
2665 _layout_text_add_logical_item(c, new_ti, lti);
2666 }
2667
2668 /* Strip the previous white if needed */
2669 if ((cut >= 1) && _is_white(ts[cut - 1]) && (ti->text_props.text_len > 0))
2670 {
2671 if (cut - 1 > 0)
2672 {
2673 size_t white_cut = cut - 1;
2674 white_ti = _layout_text_item_new(c, ti->parent.format);
2675 white_ti->parent.text_node = ti->parent.text_node;
2676 white_ti->parent.text_pos = ti->parent.text_pos + white_cut;
2677 white_ti->parent.merge = EINA_TRUE;
2678 white_ti->parent.visually_deleted = EINA_TRUE;
2679
2680 evas_common_text_props_split(&ti->text_props,
2681 &white_ti->text_props, white_cut);
2682 _layout_text_add_logical_item(c, white_ti, lti);
2683 }
2684 else
2685 {
2686 /* Mark this one as the visually deleted. */
2687 ti->parent.visually_deleted = EINA_TRUE;
2688 }
2689 }
2690
2691 if (new_ti || white_ti)
2692 {
2693 _text_item_update_sizes(c, ti);
2694 }
2695 return new_ti;
2696}
2697
2698/**
2699 * @internal
2700 * Merge item2 into item1 and free item2.
2701 *
2702 * @param c the context to work on - Not NULL.
2703 * @param item1 the item to copy to
2704 * @param item2 the item to copy from
2705 */
2706static void
2707_layout_item_merge_and_free(Ctxt *c,
2708 Evas_Object_Textblock_Text_Item *item1,
2709 Evas_Object_Textblock_Text_Item *item2)
2710{
2711 evas_common_text_props_merge(&item1->text_props,
2712 &item2->text_props);
2713
2714 _text_item_update_sizes(c, item1);
2715
2716 item1->parent.merge = EINA_FALSE;
2717 item1->parent.visually_deleted = EINA_FALSE;
2718
2719 _item_free(c->obj, NULL, _ITEM(item2));
2720}
2721
2722/**
2723 * @internal
2724 * Calculates an item's size.
2725 *
2726 * @param c the context
2727 * @param it the item itself.
2728 */
2729static void
2730_text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti)
2731{
2732 int tw, th, inset, advw;
2733 const Evas_Object_Textblock_Format *fmt = ti->parent.format;
2734 int shad_sz = 0, shad_dst = 0, out_sz = 0;
2735 int dx = 0, minx = 0, maxx = 0, shx1, shx2;
2736
2737 tw = th = 0;
2738 if (fmt->font.font)
2739 c->ENFN->font_string_size_get(c->ENDT, fmt->font.font,
2740 &ti->text_props, &tw, &th);
2741 inset = 0;
2742 if (fmt->font.font)
2743 inset = c->ENFN->font_inset_get(c->ENDT, fmt->font.font,
2744 &ti->text_props);
2745 advw = 0;
2746 if (fmt->font.font)
2747 advw = c->ENFN->font_h_advance_get(c->ENDT, fmt->font.font,
2748 &ti->text_props);
2749
2750
2751 /* These adjustments are calculated and thus heavily linked to those in
2752 * textblock_render!!! Don't change one without the other. */
2753
2754 switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_BASIC)
2755 {
2756 case EVAS_TEXT_STYLE_SHADOW:
2757 shad_dst = 1;
2758 break;
2759 case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
2760 case EVAS_TEXT_STYLE_FAR_SHADOW:
2761 shad_dst = 2;
2762 out_sz = 1;
2763 break;
2764 case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
2765 shad_dst = 1;
2766 shad_sz = 2;
2767 out_sz = 1;
2768 break;
2769 case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
2770 shad_dst = 2;
2771 shad_sz = 2;
2772 break;
2773 case EVAS_TEXT_STYLE_SOFT_SHADOW:
2774 shad_dst = 1;
2775 shad_sz = 2;
2776 break;
2777 case EVAS_TEXT_STYLE_GLOW:
2778 case EVAS_TEXT_STYLE_SOFT_OUTLINE:
2779 out_sz = 2;
2780 break;
2781 case EVAS_TEXT_STYLE_OUTLINE:
2782 out_sz = 1;
2783 break;
2784 default:
2785 break;
2786 }
2787 switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
2788 {
2789 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
2790 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
2791 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
2792 dx = -1;
2793 break;
2794 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
2795 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
2796 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
2797 dx = 1;
2798 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
2799 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
2800 default:
2801 dx = 0;
2802 break;
2803 }
2804 minx = -out_sz;
2805 maxx = out_sz;
2806 shx1 = dx * shad_dst;
2807 shx1 -= shad_sz;
2808 shx2 = dx * shad_dst;
2809 shx2 += shad_sz;
2810 if (shx1 < minx) minx = shx1;
2811 if (shx2 > maxx) maxx = shx2;
2812 inset += -minx;
2813 ti->x_adjustment = maxx - minx;
2814
2815 ti->inset = inset;
2816 ti->parent.w = tw + ti->x_adjustment;
2817 ti->parent.h = th;
2818 ti->parent.adv = advw;
2819 ti->parent.x = 0;
2820}
2821
2822/**
2823 * @internal
2824 * Adds the item to the list, updates the item's properties (e.g, x,w,h)
2825 *
2826 * @param c the context
2827 * @param it the item itself.
2828 * @param rel item ti will be appened after, NULL = last.
2829 */
2830static void
2831_layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti,
2832 Eina_List *rel)
2833{
2834 _text_item_update_sizes(c, ti);
2835
2836 c->par->logical_items = eina_list_append_relative_list(
2837 c->par->logical_items, ti, rel);
2838}
2839
2840/**
2841 * @internal
2842 * Appends the text from node n starting at start ending at off to the layout.
2843 * It uses the fmt for the formatting.
2844 *
2845 * @param c the current context- NOT NULL.
2846 * @param fmt the format to use.
2847 * @param n the text node. - Not null.
2848 * @param start the start position. - in range.
2849 * @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.
2850 * @param repch a replacement char to print instead of the original string, for example, * when working with passwords.
2851 */
2852static void
2853_layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Textblock_Node_Text *n, int start, int off, const char *repch)
2854{
2855 const Eina_Unicode *str = EINA_UNICODE_EMPTY_STRING;
2856 const Eina_Unicode *tbase;
2857 Evas_Object_Textblock_Text_Item *ti;
2858 size_t cur_len = 0;
2859 Eina_Unicode urepch = 0;
2860
2861 /* prepare a working copy of the string, either filled by the repch or
2862 * filled with the true values */
2863 if (n)
2864 {
2865 int len;
2866 int orig_off = off;
2867
2868 /* Figure out if we want to bail, work with an empty string,
2869 * or continue with a slice of the passed string */
2870 len = eina_ustrbuf_length_get(n->unicode);
2871 if (off == 0) return;
2872 else if (off < 0) off = len - start;
2873
2874 if (start < 0)
2875 {
2876 start = 0;
2877 }
2878 else if ((start == 0) && (off == 0) && (orig_off == -1))
2879 {
2880 /* Special case that means that we need to add an empty
2881 * item */
2882 str = EINA_UNICODE_EMPTY_STRING;
2883 goto skip;
2884 }
2885 else if ((start >= len) || (start + off > len))
2886 {
2887 return;
2888 }
2889
2890 /* If we work with a replacement char, create a string which is the same
2891 * but with replacement chars instead of regular chars. */
2892 if ((fmt->password) && (repch) && (eina_ustrbuf_length_get(n->unicode)))
2893 {
2894 int i, ind;
2895 Eina_Unicode *ptr;
2896
2897 tbase = str = ptr = alloca((off + 1) * sizeof(Eina_Unicode));
2898 ind = 0;
2899 urepch = eina_unicode_utf8_get_next(repch, &ind);
2900 for (i = 0 ; i < off; ptr++, i++)
2901 *ptr = urepch;
2902 *ptr = 0;
2903 }
2904 /* Use the string, just cut the relevant parts */
2905 else
2906 {
2907 str = eina_ustrbuf_string_get(n->unicode) + start;
2908 }
2909
2910 cur_len = off;
2911 }
2912
2913skip:
2914 tbase = str;
2915
2916 /* If there's no parent text node, only create an empty item */
2917 if (!n)
2918 {
2919 ti = _layout_text_item_new(c, fmt);
2920 ti->parent.text_node = NULL;
2921 ti->parent.text_pos = 0;
2922 _layout_text_add_logical_item(c, ti, NULL);
2923
2924 return;
2925 }
2926
2927 while (cur_len > 0)
2928 {
2929 Evas_Font_Instance *script_fi = NULL;
2930 int script_len, tmp_cut;
2931 Evas_Script_Type script;
2932
2933 script_len = cur_len;
2934
2935 tmp_cut = evas_common_language_script_end_of_run_get(str,
2936 c->par->bidi_props, start + str - tbase, script_len);
2937 if (tmp_cut > 0)
2938 {
2939 script_len = tmp_cut;
2940 }
2941 cur_len -= script_len;
2942
2943 script = evas_common_language_script_type_get(str, script_len);
2944
2945
2946 while (script_len > 0)
2947 {
2948 Evas_Font_Instance *cur_fi = NULL;
2949 int run_len = script_len;
2950 ti = _layout_text_item_new(c, fmt);
2951 ti->parent.text_node = n;
2952 ti->parent.text_pos = start + str - tbase;
2953
2954 if (ti->parent.format->font.font)
2955 {
2956 run_len = c->ENFN->font_run_end_get(c->ENDT,
2957 ti->parent.format->font.font, &script_fi, &cur_fi,
2958 script, str, script_len);
2959 }
2960
2961 evas_common_text_props_bidi_set(&ti->text_props,
2962 c->par->bidi_props, ti->parent.text_pos);
2963 evas_common_text_props_script_set(&ti->text_props, script);
2964
2965 if (cur_fi)
2966 {
2967 c->ENFN->font_text_props_info_create(c->ENDT,
2968 cur_fi, str, &ti->text_props, c->par->bidi_props,
2969 ti->parent.text_pos, run_len);
2970 }
2971 str += run_len;
2972 script_len -= run_len;
2973
2974 _layout_text_add_logical_item(c, ti, NULL);
2975 }
2976 }
2977}
2978
2979/**
2980 * @internal
2981 * Add a format item from the format node n and the item item.
2982 *
2983 * @param c the current context- NOT NULL.
2984 * @param n the source format node - not null.
2985 * @param item the format text.
2986 *
2987 * @return the new format item.
2988 */
2989static Evas_Object_Textblock_Format_Item *
2990_layout_format_item_add(Ctxt *c, Evas_Object_Textblock_Node_Format *n, const char *item, Evas_Object_Textblock_Format *fmt)
2991{
2992 Evas_Object_Textblock_Format_Item *fi;
2993
2994 fi = calloc(1, sizeof(Evas_Object_Textblock_Format_Item));
2995 fi->item = eina_stringshare_add(item);
2996 fi->parent.type = EVAS_TEXTBLOCK_ITEM_FORMAT;
2997 fi->parent.format = fmt;
2998 fi->parent.format->ref++;
2999 c->par->logical_items = eina_list_append(c->par->logical_items, fi);
3000 if (n)
3001 {
3002 fi->parent.text_node = n->text_node;
3003 /* FIXME: make it more efficient */
3004 fi->parent.text_pos = _evas_textblock_node_format_pos_get(n);
3005#ifdef BIDI_SUPPORT
3006 fi->bidi_dir = (evas_bidi_is_rtl_char(
3007 c->par->bidi_props,
3008 0,
3009 fi->parent.text_pos)) ?
3010 EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
3011#else
3012 fi->bidi_dir = EVAS_BIDI_DIRECTION_LTR;
3013#endif
3014 }
3015 return fi;
3016}
3017
3018/**
3019 * @internal
3020 * Should be call after we finish filling a format.
3021 * FIXME: doc.
3022 */
3023static void
3024_format_finalize(Evas_Object *obj, Evas_Object_Textblock_Format *fmt)
3025{
3026 void *of;
3027
3028 of = fmt->font.font;
3029
3030 fmt->font.font = evas_font_load(obj->layer->evas, fmt->font.fdesc,
3031 fmt->font.source, (int)(((double) fmt->font.size) * obj->cur.scale));
3032 if (of) evas_font_free(obj->layer->evas, of);
3033}
3034
3035/**
3036 * @internal
3037 * Returns true if the item is a tab
3038 * @def _IS_TAB(item)
3039 */
3040#define _IS_TAB(item) \
3041 (!strcmp(item, "tab") || !strcmp(item, "\t") || !strcmp(item, "\\t"))
3042/**
3043 * @internal
3044 * Returns true if the item is a line spearator, false otherwise
3045 * @def _IS_LINE_SEPARATOR(item)
3046 */
3047#define _IS_LINE_SEPARATOR(item) \
3048 (!strcmp(item, "br") || !strcmp(item, "\n") || !strcmp(item, "\\n"))
3049/**
3050 * @internal
3051 * Returns true if the item is a paragraph separator, false otherwise
3052 * @def _IS_PARAGRAPH_SEPARATOR(item)
3053 */
3054#define _IS_PARAGRAPH_SEPARATOR_SIMPLE(item) \
3055 (!strcmp(item, "ps"))
3056/**
3057 * @internal
3058 * Returns true if the item is a paragraph separator, false otherwise
3059 * takes legacy mode into account.
3060 * @def _IS_PARAGRAPH_SEPARATOR(item)
3061 */
3062#define _IS_PARAGRAPH_SEPARATOR(o, item) \
3063 (_IS_PARAGRAPH_SEPARATOR_SIMPLE(item) || \
3064 (o->legacy_newline && _IS_LINE_SEPARATOR(item))) /* Paragraph separator */
3065
3066/**
3067 * @internal
3068 * Handles a format by processing a format node. It returns the relevant format
3069 * through _fmt and updates the padding through style_pad_*. If needed,
3070 * it creates a format item.
3071 *
3072 * @param obj the evas object - NOT NULL.
3073 * @param c the current context- NOT NULL.
3074 * @param _fmt the format that holds the result.
3075 * @param n the source format node - not null.
3076 * @param style_pad_l the pad to update.
3077 * @param style_pad_r the pad to update.
3078 * @param style_pad_t the pad to update.
3079 * @param style_pad_b the pad to update.
3080 * @param create_item Create a new format item if true, only process otherwise.
3081 */
3082static void
3083_layout_do_format(const Evas_Object *obj __UNUSED__, Ctxt *c,
3084 Evas_Object_Textblock_Format **_fmt, Evas_Object_Textblock_Node_Format *n,
3085 int *style_pad_l, int *style_pad_r, int *style_pad_t, int *style_pad_b,
3086 Eina_Bool create_item)
3087{
3088 Evas_Object_Textblock_Format *fmt = *_fmt;
3089 /* FIXME: comment the algo */
3090
3091 const char *s;
3092 const char *item;
3093 int handled = 0;
3094
3095 s = n->format;
3096 if (!strncmp(s, "item ", 5))
3097 {
3098 // one of:
3099 // item size=20x10 href=name
3100 // item relsize=20x10 href=name
3101 // item abssize=20x10 href=name
3102 //
3103 // optional arguments:
3104 // vsize=full
3105 // vsize=ascent
3106 //
3107 // size == item size (modifies line size) - can be multiplied by
3108 // scale factor
3109 // relsize == relative size (height is current font height, width
3110 // modified accordingly keeping aspect)
3111 // abssize == absolute size (modifies line size) - never mulitplied by
3112 // scale factor
3113 // href == name of item - to be found and matched later and used for
3114 // positioning
3115 Evas_Object_Textblock_Format_Item *fi;
3116 int w = 1, h = 1;
3117 int vsize = 0, size = 0;
3118 char *p;
3119
3120 // don't care
3121 //href = strstr(s, " href=");
3122 p = strstr(s, " vsize=");
3123 if (p)
3124 {
3125 p += 7;
3126 if (!strncmp(p, "full", 4)) vsize = VSIZE_FULL;
3127 else if (!strncmp(p, "ascent", 6)) vsize = VSIZE_ASCENT;
3128 }
3129 p = strstr(s, " size=");
3130 if (p)
3131 {
3132 p += 6;
3133 if (sscanf(p, "%ix%i", &w, &h) == 2)
3134 {
3135 /* this is handled somewhere else because it depends
3136 * on the current scaling factor of the object which
3137 * may change and break because the results of this
3138 * function are cached */
3139 size = SIZE;
3140 }
3141 }
3142 else
3143 {
3144 p = strstr(s, " absize=");
3145 if (p)
3146 {
3147 p += 8;
3148 if (sscanf(p, "%ix%i", &w, &h) == 2)
3149 {
3150 size = SIZE_ABS;
3151 }
3152 }
3153 else
3154 {
3155 p = strstr(s, " relsize=");
3156 if (p)
3157 {
3158 /* this is handled somewhere else because it depends
3159 * on the line it resides in, which is not defined
3160 * at this point and will change anyway, which will
3161 * break because the results of this function are
3162 * cached */
3163 size = SIZE_REL;
3164 }
3165 }
3166 }
3167
3168 if (create_item)
3169 {
3170 fi = _layout_format_item_add(c, n, s, fmt);
3171 fi->vsize = vsize;
3172 fi->size = size;
3173 fi->formatme = 1;
3174 /* For formats items it's usually
3175 the same, we don't handle the
3176 special cases yet. */
3177 fi->parent.w = fi->parent.adv = w;
3178 fi->parent.h = h;
3179 }
3180 /* Not sure if it's the best handling, but will do it for now. */
3181 fmt = _layout_format_push(c, fmt, n);
3182 handled = 1;
3183 }
3184
3185 if (!handled)
3186 {
3187 Eina_Bool push_fmt = EINA_FALSE;
3188 if (n->opener && !n->own_closer)
3189 {
3190 fmt = _layout_format_push(c, fmt, n);
3191 push_fmt = EINA_TRUE;
3192 }
3193 else if (!n->opener)
3194 {
3195 fmt = _layout_format_pop(c, n->orig_format);
3196 }
3197 while ((item = _format_parse(&s)))
3198 {
3199 if (_format_is_param(item))
3200 {
3201 /* Only handle it if it's a push format, otherwise,
3202 * don't let overwrite the format stack.. */
3203 if (push_fmt)
3204 {
3205 _layout_format_value_handle(c, fmt, item);
3206 }
3207 }
3208 else if (create_item)
3209 {
3210 if ((_IS_PARAGRAPH_SEPARATOR(c->o, item)) ||
3211 (_IS_LINE_SEPARATOR(item)))
3212 {
3213 Evas_Object_Textblock_Format_Item *fi;
3214
3215 fi = _layout_format_item_add(c, n, item, fmt);
3216
3217 fi->parent.w = fi->parent.adv = 0;
3218 }
3219 else if (_IS_TAB(item))
3220 {
3221 Evas_Object_Textblock_Format_Item *fi;
3222
3223 fi = _layout_format_item_add(c, n, item, fmt);
3224 fi->parent.w = fi->parent.adv = fmt->tabstops;
3225 fi->formatme = 1;
3226 }
3227 }
3228 }
3229 _format_finalize(c->obj, fmt);
3230 }
3231
3232 {
3233 Evas_Coord pad_l, pad_r, pad_t, pad_b;
3234 pad_l = pad_r = pad_t = pad_b = 0;
3235 evas_text_style_pad_get(fmt->style, &pad_l, &pad_r, &pad_t, &pad_b);
3236 if (pad_l > *style_pad_l) *style_pad_l = pad_l;
3237 if (pad_r > *style_pad_r) *style_pad_r = pad_r;
3238 if (pad_t > *style_pad_t) *style_pad_t = pad_t;
3239 if (pad_b > *style_pad_b) *style_pad_b = pad_b;
3240 }
3241
3242 if (fmt->underline2)
3243 c->have_underline2 = 1;
3244 else if (fmt->underline || fmt->underline_dash)
3245 c->have_underline = 1;
3246 *_fmt = fmt;
3247}
3248
3249static void
3250_layout_update_par(Ctxt *c)
3251{
3252 Evas_Object_Textblock_Paragraph *last_par;
3253 last_par = (Evas_Object_Textblock_Paragraph *)
3254 EINA_INLIST_GET(c->par)->prev;
3255 if (last_par)
3256 {
3257 c->par->y = last_par->y + last_par->h;
3258 }
3259 else
3260 {
3261 c->par->y = 0;
3262 }
3263}
3264
3265/* -1 means no wrap */
3266static int
3267_layout_get_charwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
3268 const Evas_Object_Textblock_Item *it, size_t line_start,
3269 const char *breaks)
3270{
3271 int wrap;
3272 size_t uwrap;
3273 size_t len = eina_ustrbuf_length_get(it->text_node->unicode);
3274 /* Currently not being used, because it doesn't contain relevant
3275 * information */
3276 (void) breaks;
3277
3278 {
3279 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
3280 wrap = 0;
3281 else
3282 wrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it));
3283
3284 if (wrap < 0)
3285 return -1;
3286 uwrap = (size_t) wrap + it->text_pos;
3287 }
3288
3289
3290 if ((uwrap == line_start) && (it->type == EVAS_TEXTBLOCK_ITEM_TEXT))
3291 {
3292 uwrap = it->text_pos +
3293 (size_t) evas_common_text_props_cluster_next(
3294 &_ITEM_TEXT(it)->text_props, wrap);
3295 }
3296 if ((uwrap <= line_start) || (uwrap > len))
3297 return -1;
3298
3299 return uwrap;
3300}
3301
3302/* -1 means no wrap */
3303#ifdef HAVE_LINEBREAK
3304
3305/* Allow break means: if we can break after the current char */
3306#define ALLOW_BREAK(i) \
3307 (breaks[i] <= LINEBREAK_ALLOWBREAK)
3308
3309#else
3310
3311#define ALLOW_BREAK(i) \
3312 (_is_white(str[i]))
3313
3314#endif
3315static int
3316_layout_get_word_mixwrap_common(Ctxt *c, Evas_Object_Textblock_Format *fmt,
3317 const Evas_Object_Textblock_Item *it, Eina_Bool mixed_wrap,
3318 size_t line_start, const char *breaks)
3319{
3320 Eina_Bool wrap_after = EINA_FALSE;
3321 size_t wrap;
3322 size_t orig_wrap;
3323 const Eina_Unicode *str = eina_ustrbuf_string_get(
3324 it->text_node->unicode);
3325 int item_start = it->text_pos;
3326 size_t len = eina_ustrbuf_length_get(it->text_node->unicode);
3327#ifndef HAVE_LINEBREAK
3328 /* Not used without liblinebreak ATM. */
3329 (void) breaks;
3330#endif
3331
3332 {
3333 int swrap = -1;
3334 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
3335 swrap = 0;
3336 else
3337 swrap = _layout_text_cutoff_get(c, fmt, _ITEM_TEXT(it));
3338 /* Avoiding too small textblocks to even contain one char.
3339 * FIXME: This can cause breaking inside ligatures. */
3340
3341 if (swrap < 0)
3342 return -1;
3343
3344 orig_wrap = wrap = swrap + item_start;
3345 }
3346
3347 if (wrap > line_start)
3348 {
3349 /* The wrapping point found is the first char of the next string
3350 the rest works on the last char of the previous string.
3351 If it's a whitespace, then it's ok, and no need to go back
3352 because we'll remove it anyway. */
3353 if (!_is_white(str[wrap]))
3354 MOVE_PREV_UNTIL(line_start, wrap);
3355 /* If there's a breakable point inside the text, scan backwards until
3356 * we find it */
3357 while (wrap > line_start)
3358 {
3359 if (ALLOW_BREAK(wrap))
3360 break;
3361 wrap--;
3362 }
3363
3364 if ((wrap > line_start) ||
3365 ((wrap == line_start) && (ALLOW_BREAK(wrap)) && (wrap < len)))
3366 {
3367 /* We found a suitable wrapping point, break here. */
3368 MOVE_NEXT_UNTIL(len, wrap);
3369 return wrap;
3370 }
3371 else
3372 {
3373 if (mixed_wrap)
3374 {
3375 return ((orig_wrap >= line_start) && (orig_wrap < len)) ?
3376 ((int) orig_wrap) : -1;
3377 }
3378 else
3379 {
3380 /* Scan forward to find the next wrapping point */
3381 wrap = orig_wrap;
3382 wrap_after = EINA_TRUE;
3383 }
3384 }
3385 }
3386
3387 /* If we need to find the position after the cutting point */
3388 if ((wrap == line_start) || (wrap_after))
3389 {
3390 if (mixed_wrap)
3391 {
3392 return _layout_get_charwrap(c, fmt, it,
3393 line_start, breaks);
3394 }
3395 else
3396 {
3397 while (wrap < len)
3398 {
3399 if (ALLOW_BREAK(wrap))
3400 break;
3401 wrap++;
3402 }
3403
3404
3405 if ((wrap < len) && (wrap > line_start))
3406 {
3407 MOVE_NEXT_UNTIL(len, wrap);
3408 return wrap;
3409 }
3410 else
3411 {
3412 return -1;
3413 }
3414 }
3415 }
3416
3417 return -1;
3418}
3419
3420/* -1 means no wrap */
3421static int
3422_layout_get_wordwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
3423 const Evas_Object_Textblock_Item *it, size_t line_start,
3424 const char *breaks)
3425{
3426 return _layout_get_word_mixwrap_common(c, fmt, it, EINA_FALSE, line_start,
3427 breaks);
3428}
3429
3430/* -1 means no wrap */
3431static int
3432_layout_get_mixedwrap(Ctxt *c, Evas_Object_Textblock_Format *fmt,
3433 const Evas_Object_Textblock_Item *it, size_t line_start,
3434 const char *breaks)
3435{
3436 return _layout_get_word_mixwrap_common(c, fmt, it, EINA_TRUE, line_start,
3437 breaks);
3438}
3439
3440/* Should be moved inside _layout_ellipsis_item_new once we fix the hack in
3441 * textblock render */
3442static const Eina_Unicode _ellip_str[2] = { 0x2026, '\0' };
3443
3444static Evas_Object_Textblock_Text_Item *
3445_layout_ellipsis_item_new(Ctxt *c, const Evas_Object_Textblock_Item *cur_it)
3446{
3447 Evas_Object_Textblock_Text_Item *ellip_ti;
3448 Evas_Script_Type script;
3449 Evas_Font_Instance *script_fi = NULL, *cur_fi;
3450 size_t len = 1; /* The length of _ellip_str */
3451
3452 /* We can free it here, cause there's only one ellipsis item per tb. */
3453 if (c->o->ellip_ti) _item_free(c->obj, NULL, _ITEM(c->o->ellip_ti));
3454 c->o->ellip_ti = ellip_ti = _layout_text_item_new(c,
3455 eina_list_data_get(eina_list_last(c->format_stack)));
3456 ellip_ti->parent.text_node = cur_it->text_node;
3457 ellip_ti->parent.text_pos = cur_it->text_pos;
3458 script = evas_common_language_script_type_get(_ellip_str, len);
3459
3460 evas_common_text_props_bidi_set(&ellip_ti->text_props,
3461 c->par->bidi_props, ellip_ti->parent.text_pos);
3462 evas_common_text_props_script_set (&ellip_ti->text_props, script);
3463
3464 if (ellip_ti->parent.format->font.font)
3465 {
3466 /* It's only 1 char anyway, we don't need the run end. */
3467 (void) c->ENFN->font_run_end_get(c->ENDT,
3468 ellip_ti->parent.format->font.font, &script_fi, &cur_fi,
3469 script, _ellip_str, len);
3470
3471 c->ENFN->font_text_props_info_create(c->ENDT,
3472 cur_fi, _ellip_str, &ellip_ti->text_props,
3473 c->par->bidi_props, ellip_ti->parent.text_pos, len);
3474 }
3475
3476 _text_item_update_sizes(c, ellip_ti);
3477
3478 if (cur_it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
3479 {
3480 ellip_ti->parent.text_pos += _ITEM_TEXT(cur_it)->text_props.text_len
3481 - 1;
3482 }
3483 else
3484 {
3485 ellip_ti->parent.text_pos++;
3486 }
3487
3488 return ellip_ti;
3489}
3490
3491/**
3492 * @internel
3493 * Handle ellipsis
3494 */
3495static inline void
3496_layout_handle_ellipsis(Ctxt *c, Evas_Object_Textblock_Item *it, Eina_List *i)
3497{
3498 Evas_Object_Textblock_Text_Item *ellip_ti;
3499 Evas_Object_Textblock_Item *last_it;
3500 Evas_Coord save_cx;
3501 int wrap;
3502 ellip_ti = _layout_ellipsis_item_new(c, it);
3503 last_it = it;
3504
3505 save_cx = c->x;
3506 c->w -= ellip_ti->parent.w;
3507
3508 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
3509 {
3510 Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
3511
3512 wrap = _layout_text_cutoff_get(c, last_it->format, ti);
3513 if ((wrap > 0) && !IS_AT_END(ti, (size_t) wrap))
3514 {
3515 _layout_item_text_split_strip_white(c, ti, i, wrap);
3516 }
3517 else if ((wrap == 0) && (c->ln->items))
3518 {
3519 last_it = _ITEM(EINA_INLIST_GET(c->ln->items)->last);
3520 }
3521 }
3522 else if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
3523 {
3524 /* We don't want to add this format item. */
3525 last_it = NULL;
3526 }
3527
3528 c->x = save_cx;
3529 c->w += ellip_ti->parent.w;
3530 /* If we should add this item, do it */
3531 if (last_it == it)
3532 {
3533 c->ln->items = (Evas_Object_Textblock_Item *)
3534 eina_inlist_append(EINA_INLIST_GET(c->ln->items),
3535 EINA_INLIST_GET(it));
3536 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
3537 {
3538 Evas_Object_Textblock_Format_Item *fi;
3539 fi = _ITEM_FORMAT(it);
3540 fi->y = c->y;
3541 }
3542 }
3543 c->ln->items = (Evas_Object_Textblock_Item *)
3544 eina_inlist_append(EINA_INLIST_GET(c->ln->items),
3545 EINA_INLIST_GET(_ITEM(ellip_ti)));
3546 _layout_line_finalize(c, ellip_ti->parent.format);
3547}
3548
3549#ifdef BIDI_SUPPORT
3550static void
3551_layout_paragraph_reorder_lines(Evas_Object_Textblock_Paragraph *par)
3552{
3553 Evas_Object_Textblock_Line *ln;
3554
3555 EINA_INLIST_FOREACH(EINA_INLIST_GET(par->lines), ln)
3556 {
3557 _layout_line_reorder(ln);
3558 }
3559}
3560#endif
3561
3562static void
3563_layout_paragraph_render(Evas_Object_Textblock *o,
3564 Evas_Object_Textblock_Paragraph *par)
3565{
3566 if (par->rendered)
3567 return;
3568 par->rendered = EINA_TRUE;
3569
3570#ifdef BIDI_SUPPORT
3571 if (par->is_bidi)
3572 {
3573 _layout_update_bidi_props(o, par);
3574 _layout_paragraph_reorder_lines(par);
3575 /* Clear the bidi props because we don't need them anymore. */
3576 if (par->bidi_props)
3577 {
3578 evas_bidi_paragraph_props_unref(par->bidi_props);
3579 par->bidi_props = NULL;
3580 }
3581 }
3582#else
3583 (void) o;
3584#endif
3585}
3586
3587/* 0 means go ahead, 1 means break without an error, 2 means
3588 * break with an error, should probably clean this a bit (enum/macro)
3589 * FIXME ^ */
3590static int
3591_layout_par(Ctxt *c)
3592{
3593 Evas_Object_Textblock_Item *it;
3594 Eina_List *i;
3595 int ret = 0;
3596 int wrap = -1;
3597 char *line_breaks = NULL;
3598
3599 if (!c->par->logical_items)
3600 return 2;
3601
3602 /* We want to show it. */
3603 c->par->visible = 1;
3604
3605 /* Check if we need to skip this paragraph because it's already layouted
3606 * correctly, and mark handled nodes as dirty. */
3607 c->par->line_no = c->line_no;
3608
3609 if (c->par->text_node)
3610 {
3611 /* Skip this paragraph if width is the same, there is no ellipsis
3612 * and we aren't just calculating. */
3613 if (!c->par->text_node->is_new && !c->par->text_node->dirty &&
3614 !c->width_changed && c->par->lines &&
3615 !c->o->have_ellipsis)
3616 {
3617 Evas_Object_Textblock_Line *ln;
3618 /* Update c->line_no */
3619 ln = (Evas_Object_Textblock_Line *)
3620 EINA_INLIST_GET(c->par->lines)->last;
3621 if (ln)
3622 c->line_no = c->par->line_no + ln->line_no + 1;
3623 return 0;
3624 }
3625 c->par->text_node->dirty = EINA_FALSE;
3626 c->par->text_node->is_new = EINA_FALSE;
3627 c->par->rendered = EINA_FALSE;
3628
3629 /* Merge back and clear the paragraph */
3630 {
3631 Eina_List *itr, *itr_next;
3632 Evas_Object_Textblock_Item *ititr, *prev_it = NULL;
3633 _paragraph_clear(c->obj, c->par);
3634 EINA_LIST_FOREACH_SAFE(c->par->logical_items, itr, itr_next, ititr)
3635 {
3636 if (ititr->merge && prev_it &&
3637 (prev_it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
3638 (ititr->type == EVAS_TEXTBLOCK_ITEM_TEXT))
3639 {
3640 _layout_item_merge_and_free(c, _ITEM_TEXT(prev_it),
3641 _ITEM_TEXT(ititr));
3642 c->par->logical_items =
3643 eina_list_remove_list(c->par->logical_items, itr);
3644 }
3645 else
3646 {
3647 prev_it = ititr;
3648 }
3649 }
3650 }
3651 }
3652
3653 c->y = c->par->y;
3654
3655 it = _ITEM(eina_list_data_get(c->par->logical_items));
3656 _layout_line_new(c, it->format);
3657 /* We walk on our own because we want to be able to add items from
3658 * inside the list and then walk them on the next iteration. */
3659 for (i = c->par->logical_items ; i ; )
3660 {
3661 int adv_line = 0;
3662 int redo_item = 0;
3663 it = _ITEM(eina_list_data_get(i));
3664 /* Skip visually deleted items */
3665 if (it->visually_deleted)
3666 {
3667 i = eina_list_next(i);
3668 continue;
3669 }
3670
3671 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
3672 {
3673 Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
3674 _layout_format_ascent_descent_adjust(c->obj, &c->maxascent,
3675 &c->maxdescent, ti->parent.format);
3676 }
3677 else
3678 {
3679 Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
3680 if (fi->formatme)
3681 {
3682 /* If there are no text items yet, calc ascent/descent
3683 * according to the current format. */
3684 if (c->maxascent + c->maxdescent == 0)
3685 _layout_format_ascent_descent_adjust(c->obj, &c->maxascent,
3686 &c->maxdescent, it->format);
3687
3688 _layout_calculate_format_item_size(c->obj, fi, &c->maxascent,
3689 &c->maxdescent, &fi->y, &fi->parent.w, &fi->parent.h);
3690 fi->parent.adv = fi->parent.w;
3691 }
3692 }
3693
3694
3695 /* Check if we need to wrap, i.e the text is bigger than the width,
3696 or we already found a wrap point. */
3697 if ((c->w >= 0) &&
3698 (((c->x + it->adv) >
3699 (c->w - c->o->style_pad.l - c->o->style_pad.r -
3700 c->marginl - c->marginr)) || (wrap > 0)))
3701 {
3702 /* Handle ellipsis here. If we don't have more width left
3703 * and no height left, or no more width left and no wrapping. */
3704 if ((it->format->ellipsis == 1.0) && (c->h >= 0) &&
3705 ((2 * it->h + c->y >
3706 c->h - c->o->style_pad.t - c->o->style_pad.b) ||
3707 (!it->format->wrap_word && !it->format->wrap_char &&
3708 !it->format->wrap_mixed)))
3709 {
3710 _layout_handle_ellipsis(c, it, i);
3711 ret = 1;
3712 goto end;
3713 }
3714 /* If we want to wrap and it's worth checking for wrapping
3715 * (i.e there's actually text). */
3716 else if ((it->format->wrap_word || it->format->wrap_char ||
3717 it->format->wrap_mixed) && it->text_node)
3718 {
3719 size_t line_start;
3720 size_t it_len;
3721
3722 it_len = (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) ?
3723 1 : _ITEM_TEXT(it)->text_props.text_len;
3724
3725
3726#ifdef HAVE_LINEBREAK
3727 /* If we haven't calculated the linebreaks yet,
3728 * do */
3729 if (!line_breaks)
3730 {
3731 /* Only relevant in those cases */
3732 if (it->format->wrap_word || it->format->wrap_mixed)
3733 {
3734 const char *lang;
3735 lang = (it->format->font.fdesc) ?
3736 it->format->font.fdesc->lang : "";
3737 size_t len =
3738 eina_ustrbuf_length_get(
3739 it->text_node->unicode);
3740 line_breaks = malloc(len);
3741 set_linebreaks_utf32((const utf32_t *)
3742 eina_ustrbuf_string_get(
3743 it->text_node->unicode),
3744 len, lang, line_breaks);
3745 }
3746 }
3747#endif
3748 if (c->ln->items)
3749 line_start = c->ln->items->text_pos;
3750 else
3751 line_start = it->text_pos;
3752
3753 adv_line = 1;
3754 /* If we don't already have a wrap point from before */
3755 if (wrap < 0)
3756 {
3757 if (it->format->wrap_word)
3758 wrap = _layout_get_wordwrap(c, it->format, it,
3759 line_start, line_breaks);
3760 else if (it->format->wrap_char)
3761 wrap = _layout_get_charwrap(c, it->format, it,
3762 line_start, line_breaks);
3763 else if (it->format->wrap_mixed)
3764 wrap = _layout_get_mixedwrap(c, it->format, it,
3765 line_start, line_breaks);
3766 else
3767 wrap = -1;
3768 }
3769
3770 /* If it's before the item, rollback and apply.
3771 if it's in the item, cut.
3772 If it's after the item, delay the cut */
3773 if (wrap > 0)
3774 {
3775 size_t uwrap = (size_t) wrap;
3776 if (uwrap < it->text_pos)
3777 {
3778 /* Rollback latest additions, and cut that
3779 item */
3780 i = eina_list_prev(i);
3781 it = eina_list_data_get(i);
3782 while (uwrap < it->text_pos)
3783 {
3784 c->ln->items = _ITEM(
3785 eina_inlist_remove(
3786 EINA_INLIST_GET(c->ln->items),
3787 EINA_INLIST_GET(it)));
3788 i = eina_list_prev(i);
3789 it = eina_list_data_get(i);
3790 }
3791 c->x = it->x;
3792 c->ln->items = _ITEM(
3793 eina_inlist_remove(
3794 EINA_INLIST_GET(c->ln->items),
3795 EINA_INLIST_GET(it)));
3796 continue;
3797 }
3798 /* If it points to the end, it means the previous
3799 * char is a whitespace we should remove, so this
3800 * is a wanted cutting point. */
3801 else if (uwrap > it->text_pos + it_len)
3802 {
3803 /* FIXME: Should redo the ellipsis handling.
3804 * If we can do ellipsis, just cut here. */
3805 if (it->format->ellipsis == 1.0)
3806 {
3807 _layout_handle_ellipsis(c, it, i);
3808 ret = 1;
3809 goto end;
3810 }
3811 else
3812 {
3813 /* Delay the cut in a smart way i.e use the
3814 item_pos as the line_start, because
3815 there's already no cut before*/
3816 wrap = -1;
3817 }
3818 }
3819 else
3820 wrap -= it->text_pos; /* Cut here */
3821 }
3822
3823 if (wrap > 0)
3824 {
3825 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
3826 {
3827 _layout_item_text_split_strip_white(c,
3828 _ITEM_TEXT(it), i, wrap);
3829 }
3830 }
3831 else if (wrap == 0)
3832 {
3833 /* Should wrap before the item */
3834 adv_line = 0;
3835 redo_item = 1;
3836 _layout_line_advance(c, it->format);
3837 }
3838 /* Reset wrap */
3839 wrap = -1;
3840 }
3841 }
3842
3843 if (!redo_item && !it->visually_deleted)
3844 {
3845 c->ln->items = (Evas_Object_Textblock_Item *)
3846 eina_inlist_append(EINA_INLIST_GET(c->ln->items),
3847 EINA_INLIST_GET(it));
3848 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
3849 {
3850 Evas_Object_Textblock_Format_Item *fi;
3851 fi = _ITEM_FORMAT(it);
3852 fi->y = c->y;
3853 /* If it's a newline, and we are not in newline compat
3854 * mode, or we are in newline compat mode, and this is
3855 * not used as a paragraph separator, advance */
3856 if (fi->item && _IS_LINE_SEPARATOR(fi->item) &&
3857 (!c->o->legacy_newline ||
3858 eina_list_next(i)))
3859 {
3860 adv_line = 1;
3861 }
3862 }
3863 c->x += it->adv;
3864 i = eina_list_next(i);
3865 }
3866 if (adv_line)
3867 {
3868 /* Each line is according to the first item in it, and here
3869 * i is already the next item (or the current if we redo it) */
3870 if (i)
3871 {
3872 it = _ITEM(eina_list_data_get(i));
3873 }
3874 _layout_line_advance(c, it->format);
3875 }
3876 }
3877 if (c->ln->items)
3878 {
3879 /* Here 'it' is the last format used */
3880 _layout_line_finalize(c, it->format);
3881 }
3882
3883end:
3884#ifdef HAVE_LINEBREAK
3885 if (line_breaks)
3886 free(line_breaks);
3887#endif
3888
3889 return ret;
3890}
3891
3892/**
3893 * @internal
3894 * Invalidate text nodes according to format changes
3895 * This goes through all the new format changes and marks the text nodes
3896 * that should be invalidated because of format changes.
3897 *
3898 * @param c the working context.
3899 */
3900static inline void
3901_format_changes_invalidate_text_nodes(Ctxt *c)
3902{
3903 Evas_Object_Textblock_Node_Format *fnode = c->o->format_nodes;
3904 Evas_Object_Textblock_Node_Text *start_n = NULL;
3905 Eina_List *fstack = NULL;
3906 int balance = 0;
3907 while (fnode)
3908 {
3909 if (fnode->is_new)
3910 {
3911 const char *fstr = fnode->orig_format;
3912 /* balance < 0 means we gave up and everything should be
3913 * invalidated */
3914 if (fnode->opener && !fnode->own_closer)
3915 {
3916 balance++;
3917 if (!fstack)
3918 start_n = fnode->text_node;
3919 fstack = eina_list_prepend(fstack, fnode);
3920 }
3921 else if (!fnode->opener)
3922 {
3923 size_t fstr_len;
3924 fstr_len = strlen(fstr);
3925 /* Generic popper, just pop */
3926 if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0])
3927 {
3928 fstack = eina_list_remove_list(fstack, fstack);
3929 balance--;
3930 }
3931 /* Find the matching format and pop it, if the matching format
3932 * is out format, i.e the last one, pop and break. */
3933 else
3934 {
3935 Eina_List *i;
3936 Evas_Object_Textblock_Node_Format *fnode2;
3937 EINA_LIST_FOREACH(fstack, i, fnode2)
3938 {
3939 if (_FORMAT_IS_CLOSER_OF(
3940 fnode2->orig_format, fstr, fstr_len))
3941 {
3942 fstack = eina_list_remove_list(fstack, i);
3943 break;
3944 }
3945 }
3946 balance--;
3947 }
3948
3949 if (!fstack)
3950 {
3951 Evas_Object_Textblock_Node_Text *f_tnode =
3952 fnode->text_node;
3953 while (start_n)
3954 {
3955 start_n->dirty = EINA_TRUE;
3956 if (start_n == f_tnode)
3957 break;
3958 start_n =
3959 _NODE_TEXT(EINA_INLIST_GET(start_n)->next);
3960 }
3961 start_n = NULL;
3962 }
3963 }
3964 else if (!fnode->visible)
3965 balance = -1;
3966
3967 if (balance < 0)
3968 {
3969 /* if we don't already have a starting point, use the
3970 * current paragraph. */
3971 if (!start_n)
3972 start_n = fnode->text_node;
3973 break;
3974 }
3975 }
3976 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
3977 }
3978
3979 if (balance != 0)
3980 {
3981 while (start_n)
3982 {
3983 start_n->dirty = EINA_TRUE;
3984 start_n = _NODE_TEXT(EINA_INLIST_GET(start_n)->next);
3985 }
3986 }
3987}
3988
3989
3990/** FIXME: Document */
3991static void
3992_layout_pre(Ctxt *c, int *style_pad_l, int *style_pad_r, int *style_pad_t,
3993 int *style_pad_b)
3994{
3995 Evas_Object *obj = c->obj;
3996 Evas_Object_Textblock *o = c->o;
3997 /* Mark text nodes as dirty if format have changed. */
3998 if (c->o->format_changed)
3999 {
4000 _format_changes_invalidate_text_nodes(c);
4001 }
4002
4003 if (o->content_changed)
4004 {
4005 Evas_Object_Textblock_Node_Text *n;
4006 c->o->have_ellipsis = 0;
4007 c->par = c->paragraphs = o->paragraphs;
4008 /* Go through all the text nodes to create the logical layout */
4009 EINA_INLIST_FOREACH(c->o->text_nodes, n)
4010 {
4011 Evas_Object_Textblock_Node_Format *fnode;
4012 size_t start;
4013 int off;
4014
4015 /* If it's not a new paragraph, either update it or skip it.
4016 * Remove all the paragraphs that were deleted */
4017 if (!n->is_new)
4018 {
4019 /* Remove all the deleted paragraphs at this point */
4020 while (c->par->text_node != n)
4021 {
4022 Evas_Object_Textblock_Paragraph *tmp_par =
4023 (Evas_Object_Textblock_Paragraph *)
4024 EINA_INLIST_GET(c->par)->next;
4025
4026 c->paragraphs = (Evas_Object_Textblock_Paragraph *)
4027 eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
4028 EINA_INLIST_GET(c->par));
4029 _paragraph_free(obj, c->par);
4030
4031 c->par = tmp_par;
4032 }
4033
4034 /* If it's dirty, remove and recreate, if it's clean,
4035 * skip to the next. */
4036 if (n->dirty)
4037 {
4038 Evas_Object_Textblock_Paragraph *prev_par = c->par;
4039
4040 _layout_paragraph_new(c, n, EINA_TRUE);
4041
4042 c->paragraphs = (Evas_Object_Textblock_Paragraph *)
4043 eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
4044 EINA_INLIST_GET(prev_par));
4045 _paragraph_free(obj, prev_par);
4046 }
4047 else
4048 {
4049 c->par = (Evas_Object_Textblock_Paragraph *)
4050 EINA_INLIST_GET(c->par)->next;
4051
4052 /* Update the format stack according to the node's
4053 * formats */
4054 fnode = n->format_node;
4055 while (fnode && (fnode->text_node == n))
4056 {
4057 /* Only do this if this actually changes format */
4058 if (fnode->format_change)
4059 _layout_do_format(obj, c, &c->fmt, fnode,
4060 style_pad_l, style_pad_r,
4061 style_pad_t, style_pad_b, EINA_FALSE);
4062 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
4063 }
4064 continue;
4065 }
4066 }
4067 else
4068 {
4069 /* If it's a new paragraph, just add it. */
4070 _layout_paragraph_new(c, n, EINA_FALSE);
4071 }
4072
4073#ifdef BIDI_SUPPORT
4074 _layout_update_bidi_props(c->o, c->par);
4075#endif
4076
4077 /* For each text node to thorugh all of it's format nodes
4078 * append text from the start to the offset of the next format
4079 * using the last format got. if needed it also creates format
4080 * items this is the core algorithm of the layout mechanism.
4081 * Skip the unicode replacement chars when there are because
4082 * we don't want to print them. */
4083 fnode = n->format_node;
4084 start = off = 0;
4085 while (fnode && (fnode->text_node == n))
4086 {
4087 off += fnode->offset;
4088 /* No need to skip on the first run, or a non-visible one */
4089 _layout_text_append(c, c->fmt, n, start, off, o->repch);
4090 _layout_do_format(obj, c, &c->fmt, fnode, style_pad_l,
4091 style_pad_r, style_pad_t, style_pad_b, EINA_TRUE);
4092 if ((c->have_underline2) || (c->have_underline))
4093 {
4094 if (*style_pad_b < c->underline_extend)
4095 *style_pad_b = c->underline_extend;
4096 c->have_underline = 0;
4097 c->have_underline2 = 0;
4098 c->underline_extend = 0;
4099 }
4100 start += off;
4101 if (fnode->visible)
4102 {
4103 off = -1;
4104 start++;
4105 }
4106 else
4107 {
4108 off = 0;
4109 }
4110 fnode->is_new = EINA_FALSE;
4111 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
4112 }
4113 _layout_text_append(c, c->fmt, n, start, -1, o->repch);
4114#ifdef BIDI_SUPPORT
4115 /* Clear the bidi props because we don't need them anymore. */
4116 if (c->par->bidi_props)
4117 {
4118 evas_bidi_paragraph_props_unref(c->par->bidi_props);
4119 c->par->bidi_props = NULL;
4120 }
4121#endif
4122 c->par = (Evas_Object_Textblock_Paragraph *)
4123 EINA_INLIST_GET(c->par)->next;
4124 }
4125
4126 /* Delete the rest of the layout paragraphs */
4127 while (c->par)
4128 {
4129 Evas_Object_Textblock_Paragraph *tmp_par =
4130 (Evas_Object_Textblock_Paragraph *)
4131 EINA_INLIST_GET(c->par)->next;
4132
4133 c->paragraphs = (Evas_Object_Textblock_Paragraph *)
4134 eina_inlist_remove(EINA_INLIST_GET(c->paragraphs),
4135 EINA_INLIST_GET(c->par));
4136 _paragraph_free(obj, c->par);
4137
4138 c->par = tmp_par;
4139 }
4140 o->paragraphs = c->paragraphs;
4141 c->par = NULL;
4142 }
4143
4144}
4145
4146/**
4147 * @internal
4148 * Create the layout from the nodes.
4149 *
4150 * @param obj the evas object - NOT NULL.
4151 * @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.
4152 * @param w the object's w, -1 means no wrapping (i.e infinite size)
4153 * @param h the object's h, -1 means inifinte size.
4154 * @param w_ret the object's calculated w.
4155 * @param h_ret the object's calculated h.
4156 */
4157static void
4158_layout(const Evas_Object *obj, int w, int h, int *w_ret, int *h_ret)
4159{
4160 Evas_Object_Textblock *o;
4161 Ctxt ctxt, *c;
4162 int style_pad_l = 0, style_pad_r = 0, style_pad_t = 0, style_pad_b = 0;
4163
4164 /* setup context */
4165 o = (Evas_Object_Textblock *)(obj->object_data);
4166 c = &ctxt;
4167 c->obj = (Evas_Object *)obj;
4168 c->o = o;
4169 c->paragraphs = c->par = NULL;
4170 c->format_stack = NULL;
4171 c->fmt = NULL;
4172 c->x = c->y = 0;
4173 c->w = w;
4174 c->h = h;
4175 c->wmax = c->hmax = 0;
4176 c->maxascent = c->maxdescent = 0;
4177 c->marginl = c->marginr = 0;
4178 c->have_underline = 0;
4179 c->have_underline2 = 0;
4180 c->underline_extend = 0;
4181 c->line_no = 0;
4182 c->align = 0.0;
4183 c->align_auto = EINA_TRUE;
4184 c->ln = NULL;
4185 c->width_changed = (obj->cur.geometry.w != o->last_w);
4186
4187 /* Start of logical layout creation */
4188 /* setup default base style */
4189 {
4190 Eina_Bool finalize = EINA_FALSE;
4191 if ((c->o->style) && (c->o->style->default_tag))
4192 {
4193 c->fmt = _layout_format_push(c, NULL, NULL);
4194 _format_fill(c->obj, c->fmt, c->o->style->default_tag);
4195 finalize = EINA_TRUE;
4196 }
4197
4198 if ((c->o->style_user) && (c->o->style_user->default_tag))
4199 {
4200 if (!c->fmt)
4201 {
4202 c->fmt = _layout_format_push(c, NULL, NULL);
4203 }
4204 _format_fill(c->obj, c->fmt, c->o->style_user->default_tag);
4205 finalize = EINA_TRUE;
4206 }
4207
4208 if (finalize)
4209 _format_finalize(c->obj, c->fmt);
4210 }
4211 if (!c->fmt)
4212 {
4213 if (w_ret) *w_ret = 0;
4214 if (h_ret) *h_ret = 0;
4215 return;
4216 }
4217
4218 _layout_pre(c, &style_pad_l, &style_pad_r, &style_pad_t, &style_pad_b);
4219 c->paragraphs = o->paragraphs;
4220
4221 /* If there are no paragraphs, create the minimum needed,
4222 * if the last paragraph has no lines/text, create that as well */
4223 if (!c->paragraphs)
4224 {
4225 _layout_paragraph_new(c, NULL, EINA_TRUE);
4226 o->paragraphs = c->paragraphs;
4227 }
4228 c->par = (Evas_Object_Textblock_Paragraph *)
4229 EINA_INLIST_GET(c->paragraphs)->last;
4230 if (!c->par->logical_items)
4231 {
4232 Evas_Object_Textblock_Text_Item *ti;
4233 ti = _layout_text_item_new(c, c->fmt);
4234 ti->parent.text_node = c->par->text_node;
4235 ti->parent.text_pos = 0;
4236 _layout_text_add_logical_item(c, ti, NULL);
4237 }
4238
4239 /* End of logical layout creation */
4240
4241 /* Start of visual layout creation */
4242 {
4243 Evas_Object_Textblock_Paragraph *last_vis_par = NULL;
4244 int par_index_step = o->num_paragraphs / TEXTBLOCK_PAR_INDEX_SIZE;
4245 int par_count = 1; /* Force it to take the first one */
4246 int par_index_pos = 0;
4247
4248 if (par_index_step == 0) par_index_step = 1;
4249
4250 /* Clear all of the index */
4251 memset(o->par_index, 0, sizeof(o->par_index));
4252
4253 EINA_INLIST_FOREACH(c->paragraphs, c->par)
4254 {
4255 _layout_update_par(c);
4256
4257 /* Break if we should stop here. */
4258 if (_layout_par(c))
4259 {
4260 last_vis_par = c->par;
4261 break;
4262 }
4263
4264 if ((par_index_pos < TEXTBLOCK_PAR_INDEX_SIZE) && (--par_count == 0))
4265 {
4266 par_count = par_index_step;
4267
4268 o->par_index[par_index_pos++] = c->par;
4269 }
4270 }
4271
4272 /* Mark all the rest of the paragraphs as invisible */
4273 if (c->par)
4274 {
4275 c->par = (Evas_Object_Textblock_Paragraph *)
4276 EINA_INLIST_GET(c->par)->next;
4277 while (c->par)
4278 {
4279 c->par->visible = 0;
4280 c->par = (Evas_Object_Textblock_Paragraph *)
4281 EINA_INLIST_GET(c->par)->next;
4282 }
4283 }
4284
4285 /* Get the last visible paragraph in the layout */
4286 if (!last_vis_par && c->paragraphs)
4287 last_vis_par = (Evas_Object_Textblock_Paragraph *)
4288 EINA_INLIST_GET(c->paragraphs)->last;
4289
4290 if (last_vis_par)
4291 c->hmax = last_vis_par->y + last_vis_par->h;
4292 }
4293
4294 /* Clean the rest of the format stack */
4295 while (c->format_stack)
4296 {
4297 c->fmt = c->format_stack->data;
4298 c->format_stack = eina_list_remove_list(c->format_stack, c->format_stack);
4299 _format_unref_free(c->obj, c->fmt);
4300 }
4301
4302 if (w_ret) *w_ret = c->wmax;
4303 if (h_ret) *h_ret = c->hmax;
4304
4305 /* Vertically align the textblock */
4306 if ((o->valign > 0.0) && (c->h > c->hmax))
4307 {
4308 Evas_Coord adjustment = (c->h - c->hmax) * o->valign;
4309 Evas_Object_Textblock_Paragraph *par;
4310 EINA_INLIST_FOREACH(c->paragraphs, par)
4311 {
4312 par->y += adjustment;
4313 }
4314 }
4315
4316 if ((o->style_pad.l != style_pad_l) || (o->style_pad.r != style_pad_r) ||
4317 (o->style_pad.t != style_pad_t) || (o->style_pad.b != style_pad_b))
4318 {
4319 o->style_pad.l = style_pad_l;
4320 o->style_pad.r = style_pad_r;
4321 o->style_pad.t = style_pad_t;
4322 o->style_pad.b = style_pad_b;
4323 _paragraphs_clear(obj, c->paragraphs);
4324 _layout(obj, w, h, w_ret, h_ret);
4325 }
4326}
4327
4328/*
4329 * @internal
4330 * Relayout the object according to current object size.
4331 *
4332 * @param obj the evas object - NOT NULL.
4333 */
4334static void
4335_relayout(const Evas_Object *obj)
4336{
4337 Evas_Object_Textblock *o;
4338
4339 o = (Evas_Object_Textblock *)(obj->object_data);
4340 _layout(obj, obj->cur.geometry.w, obj->cur.geometry.h,
4341 &o->formatted.w, &o->formatted.h);
4342 o->formatted.valid = 1;
4343 o->last_w = obj->cur.geometry.w;
4344 o->last_h = obj->cur.geometry.h;
4345 o->changed = 0;
4346 o->content_changed = 0;
4347 o->format_changed = EINA_FALSE;
4348 o->redraw = 1;
4349}
4350
4351/**
4352 * @internal
4353 * Find the layout item and line that match the text node and position passed.
4354 *
4355 * @param obj the evas object - NOT NULL.
4356 * @param n the text node - Not null.
4357 * @param pos the position to look for - valid.
4358 * @param[out] lnr the line found - not null.
4359 * @param[out] tir the item found - not null.
4360 * @see _find_layout_format_item_line_match()
4361 */
4362static void
4363_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)
4364{
4365 Evas_Object_Textblock_Paragraph *found_par;
4366 Evas_Object_Textblock_Line *ln;
4367 Evas_Object_Textblock *o;
4368
4369 o = (Evas_Object_Textblock *)(obj->object_data);
4370 if (!o->formatted.valid) _relayout(obj);
4371
4372 found_par = n->par;
4373 if (found_par)
4374 {
4375 _layout_paragraph_render(o, found_par);
4376 EINA_INLIST_FOREACH(found_par->lines, ln)
4377 {
4378 Evas_Object_Textblock_Item *it;
4379
4380 EINA_INLIST_FOREACH(ln->items, it)
4381 {
4382 /* FIXME: p should be size_t, same goes for pos */
4383 int p = (int) it->text_pos;
4384
4385 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
4386 {
4387 Evas_Object_Textblock_Text_Item *ti =
4388 _ITEM_TEXT(it);
4389
4390 p += (int) ti->text_props.text_len;
4391 }
4392 else
4393 {
4394 p++;
4395 }
4396
4397 if (((pos >= (int) it->text_pos) && (pos < p)))
4398 {
4399 *lnr = ln;
4400 *itr = it;
4401 return;
4402 }
4403 else if (p == pos)
4404 {
4405 *lnr = ln;
4406 *itr = it;
4407 }
4408 }
4409 }
4410 }
4411}
4412
4413/**
4414 * @internal
4415 * Return the line number 'line'.
4416 *
4417 * @param obj the evas object - NOT NULL.
4418 * @param line the line to find
4419 * @return the line of line number or NULL if no line found.
4420 */
4421static Evas_Object_Textblock_Line *
4422_find_layout_line_num(const Evas_Object *obj, int line)
4423{
4424 Evas_Object_Textblock_Paragraph *par;
4425 Evas_Object_Textblock_Line *ln;
4426 Evas_Object_Textblock *o;
4427
4428 o = (Evas_Object_Textblock *)(obj->object_data);
4429
4430 par = _layout_find_paragraph_by_line_no(o, line);
4431 if (par)
4432 {
4433 _layout_paragraph_render(o, par);
4434 EINA_INLIST_FOREACH(par->lines, ln)
4435 {
4436 if (par->line_no + ln->line_no == line) return ln;
4437 }
4438 }
4439 return NULL;
4440}
4441
4442EAPI Evas_Object *
4443evas_object_textblock_add(Evas *e)
4444{
4445 Evas_Object *obj;
4446
4447 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
4448 return NULL;
4449 MAGIC_CHECK_END();
4450 obj = evas_object_new(e);
4451 evas_object_textblock_init(obj);
4452 evas_object_inject(obj, e);
4453 return obj;
4454}
4455
4456EAPI Evas_Textblock_Style *
4457evas_textblock_style_new(void)
4458{
4459 Evas_Textblock_Style *ts;
4460
4461 ts = calloc(1, sizeof(Evas_Textblock_Style));
4462 return ts;
4463}
4464
4465EAPI void
4466evas_textblock_style_free(Evas_Textblock_Style *ts)
4467{
4468 if (!ts) return;
4469 if (ts->objects)
4470 {
4471 ts->delete_me = 1;
4472 return;
4473 }
4474 _style_clear(ts);
4475 free(ts);
4476}
4477
4478EAPI void
4479evas_textblock_style_set(Evas_Textblock_Style *ts, const char *text)
4480{
4481 Eina_List *l;
4482 Evas_Object *obj;
4483
4484 if (!ts) return;
4485 /* If the style wasn't really changed, abort. */
4486 if ((!ts->style_text && !text) ||
4487 (ts->style_text && text && !strcmp(text, ts->style_text)))
4488 return;
4489
4490 EINA_LIST_FOREACH(ts->objects, l, obj)
4491 {
4492 Evas_Object_Textblock *o;
4493
4494 o = (Evas_Object_Textblock *)(obj->object_data);
4495 _evas_textblock_invalidate_all(o);
4496 _evas_textblock_changed(o, obj);
4497 }
4498
4499 _style_replace(ts, text);
4500
4501 if (ts->style_text)
4502 {
4503 // format MUST be KEY='VALUE'[KEY='VALUE']...
4504 const char *p;
4505 const char *key_start, *key_stop, *val_start;
4506
4507 key_start = key_stop = val_start = NULL;
4508 p = ts->style_text;
4509 while (*p)
4510 {
4511 if (!key_start)
4512 {
4513 if (!isspace((unsigned char)(*p)))
4514 key_start = p;
4515 }
4516 else if (!key_stop)
4517 {
4518 if ((*p == '=') || (isspace((unsigned char)(*p))))
4519 key_stop = p;
4520 }
4521 else if (!val_start)
4522 {
4523 if (((*p) == '\'') && (*(p + 1)))
4524 {
4525 val_start = ++p;
4526 }
4527 }
4528 if ((key_start) && (key_stop) && (val_start))
4529 {
4530 char *tags, *replaces = NULL;
4531 Evas_Object_Style_Tag *tag;
4532 const char *val_stop = NULL;
4533 size_t tag_len;
4534 size_t replace_len;
4535
4536 {
4537 Eina_Strbuf *buf = eina_strbuf_new();
4538 val_stop = val_start;
4539 while(*p)
4540 {
4541 if (*p == '\'')
4542 {
4543 /* Break if we found the tag end */
4544 if (p[-1] != '\\')
4545 {
4546 eina_strbuf_append_length(buf, val_stop,
4547 p - val_stop);
4548 break;
4549 }
4550 else
4551 {
4552 eina_strbuf_append_length(buf, val_stop,
4553 p - val_stop - 1);
4554 eina_strbuf_append_char(buf, '\'');
4555 val_stop = p + 1;
4556 }
4557 }
4558 p++;
4559 }
4560 replaces = eina_strbuf_string_steal(buf);
4561 eina_strbuf_free(buf);
4562 }
4563 /* If we didn't find an end, just aboart. */
4564 if (!*p)
4565 {
4566 if (replaces) free(replaces);
4567 break;
4568 }
4569
4570 tag_len = key_stop - key_start;
4571 replace_len = val_stop - val_start;
4572
4573 tags = malloc(tag_len + 1);
4574 if (tags)
4575 {
4576 memcpy(tags, key_start, tag_len);
4577 tags[tag_len] = 0;
4578 }
4579
4580 if ((tags) && (replaces))
4581 {
4582 if (!strcmp(tags, "DEFAULT"))
4583 {
4584 ts->default_tag = replaces;
4585 free(tags);
4586 }
4587 else
4588 {
4589 tag = calloc(1, sizeof(Evas_Object_Style_Tag));
4590 if (tag)
4591 {
4592 tag->tag.tag = tags;
4593 tag->tag.replace = replaces;
4594 tag->tag.tag_len = tag_len;
4595 tag->tag.replace_len = replace_len;
4596 ts->tags = (Evas_Object_Style_Tag *)eina_inlist_append(EINA_INLIST_GET(ts->tags), EINA_INLIST_GET(tag));
4597 }
4598 else
4599 {
4600 free(tags);
4601 free(replaces);
4602 }
4603 }
4604 }
4605 else
4606 {
4607 if (tags) free(tags);
4608 if (replaces) free(replaces);
4609 }
4610 key_start = key_stop = val_start = NULL;
4611 }
4612 p++;
4613 }
4614 }
4615}
4616
4617EAPI const char *
4618evas_textblock_style_get(const Evas_Textblock_Style *ts)
4619{
4620 if (!ts) return NULL;
4621 return ts->style_text;
4622}
4623
4624/* textblock styles */
4625
4626static void
4627_textblock_style_generic_set(Evas_Object *obj, Evas_Textblock_Style *ts,
4628 Evas_Textblock_Style **obj_ts)
4629{
4630 TB_HEAD();
4631 if (ts == *obj_ts) return;
4632 if ((ts) && (ts->delete_me)) return;
4633 if (*obj_ts)
4634 {
4635 Evas_Textblock_Style *old_ts;
4636 if (o->markup_text)
4637 {
4638 free(o->markup_text);
4639 o->markup_text = NULL;
4640 }
4641
4642 old_ts = *obj_ts;
4643 old_ts->objects = eina_list_remove(old_ts->objects, obj);
4644 if ((old_ts->delete_me) && (!old_ts->objects))
4645 evas_textblock_style_free(old_ts);
4646 }
4647 if (ts)
4648 {
4649 ts->objects = eina_list_append(ts->objects, obj);
4650 }
4651 *obj_ts = ts;
4652
4653 _evas_textblock_invalidate_all(o);
4654 _evas_textblock_changed(o, obj);
4655}
4656
4657EAPI void
4658evas_object_textblock_style_set(Evas_Object *obj, Evas_Textblock_Style *ts)
4659{
4660 TB_HEAD();
4661 _textblock_style_generic_set(obj, ts, &(o->style));
4662}
4663
4664EAPI const Evas_Textblock_Style *
4665evas_object_textblock_style_get(const Evas_Object *obj)
4666{
4667 TB_HEAD_RETURN(NULL);
4668 return o->style;
4669}
4670
4671EAPI void
4672evas_object_textblock_style_user_push(Evas_Object *obj, Evas_Textblock_Style *ts)
4673{
4674 TB_HEAD();
4675 _textblock_style_generic_set(obj, ts, &(o->style_user));
4676}
4677
4678EAPI const Evas_Textblock_Style *
4679evas_object_textblock_style_user_peek(const Evas_Object *obj)
4680{
4681 TB_HEAD_RETURN(NULL);
4682 return o->style_user;
4683}
4684
4685EAPI void
4686evas_object_textblock_style_user_pop(Evas_Object *obj)
4687{
4688 TB_HEAD();
4689 _textblock_style_generic_set(obj, NULL, &(o->style_user));
4690}
4691
4692EAPI void
4693evas_object_textblock_replace_char_set(Evas_Object *obj, const char *ch)
4694{
4695 TB_HEAD();
4696 if (o->repch) eina_stringshare_del(o->repch);
4697 if (ch) o->repch = eina_stringshare_add(ch);
4698 else o->repch = NULL;
4699 _evas_textblock_invalidate_all(o);
4700 _evas_textblock_changed(o, obj);
4701}
4702
4703EAPI void
4704evas_object_textblock_legacy_newline_set(Evas_Object *obj, Eina_Bool mode)
4705{
4706 TB_HEAD();
4707 if (o->legacy_newline == mode)
4708 return;
4709
4710 o->legacy_newline = mode;
4711 /* FIXME: Should recreate all the textnodes... For now, it's just
4712 * for new text inserted. */
4713}
4714
4715EAPI Eina_Bool
4716evas_object_textblock_legacy_newline_get(const Evas_Object *obj)
4717{
4718 TB_HEAD_RETURN(EINA_FALSE);
4719 return o->legacy_newline;
4720}
4721
4722EAPI void
4723evas_object_textblock_valign_set(Evas_Object *obj, double align)
4724{
4725 TB_HEAD();
4726 if (align < 0.0) align = 0.0;
4727 else if (align > 1.0) align = 1.0;
4728 if (o->valign == align) return;
4729 o->valign = align;
4730 _evas_textblock_changed(o, obj);
4731}
4732
4733EAPI double
4734evas_object_textblock_valign_get(const Evas_Object *obj)
4735{
4736 TB_HEAD_RETURN(0.0);
4737 return o->valign;
4738}
4739
4740EAPI void
4741evas_object_textblock_bidi_delimiters_set(Evas_Object *obj, const char *delim)
4742{
4743 TB_HEAD();
4744 eina_stringshare_replace(&o->bidi_delimiters, delim);
4745}
4746
4747EAPI const char *
4748evas_object_textblock_bidi_delimiters_get(const Evas_Object *obj)
4749{
4750 TB_HEAD_RETURN(NULL);
4751 return o->bidi_delimiters;
4752}
4753
4754EAPI const char *
4755evas_object_textblock_replace_char_get(Evas_Object *obj)
4756{
4757 TB_HEAD_RETURN(NULL);
4758 return o->repch;
4759}
4760
4761/**
4762 * @internal
4763 * Advance p_buff to point after the end of the string. It's used with the
4764 * @ref escaped_strings[] variable.
4765 *
4766 * @param p_buff the pointer to the current string.
4767 */
4768static inline void
4769_escaped_advance_after_end_of_string(const char **p_buf)
4770{
4771 while (**p_buf != 0) (*p_buf)++;
4772 (*p_buf)++;
4773}
4774
4775/**
4776 * @internal
4777 * Advance p_buff to point after the end of the string. It's used with the
4778 * @ref escaped_strings[] variable. Also chec if matches.
4779 * FIXME: doc.
4780 *
4781 * @param p_buff the pointer to the current string.
4782 */
4783static inline int
4784_escaped_is_eq_and_advance(const char *s, const char *s_end,
4785 const char **p_m, const char *m_end)
4786{
4787 Eina_Bool reached_end;
4788 for (;((s < s_end) && (*p_m < m_end)); s++, (*p_m)++)
4789 {
4790 if (*s != **p_m)
4791 {
4792 _escaped_advance_after_end_of_string(p_m);
4793 return 0;
4794 }
4795 }
4796
4797 reached_end = !**p_m;
4798 if (*p_m < m_end)
4799 _escaped_advance_after_end_of_string(p_m);
4800
4801 return ((s == s_end) && reached_end);
4802}
4803
4804/**
4805 * @internal
4806 *
4807 * @param s the string to match
4808 */
4809static inline const char *
4810_escaped_char_match(const char *s, int *adv)
4811{
4812 const char *map_itr, *map_end, *mc, *sc;
4813
4814 map_itr = escape_strings;
4815 map_end = map_itr + sizeof(escape_strings);
4816
4817 while (map_itr < map_end)
4818 {
4819 const char *escape;
4820 int match;
4821
4822 escape = map_itr;
4823 _escaped_advance_after_end_of_string(&map_itr);
4824 if (map_itr >= map_end) break;
4825
4826 mc = map_itr;
4827 sc = s;
4828 match = 1;
4829 while ((*mc) && (*sc))
4830 {
4831 if ((unsigned char)*sc < (unsigned char)*mc) return NULL;
4832 if (*sc != *mc)
4833 {
4834 match = 0;
4835 break;
4836 }
4837 mc++;
4838 sc++;
4839 }
4840 if (match)
4841 {
4842 *adv = mc - map_itr;
4843 return escape;
4844 }
4845 _escaped_advance_after_end_of_string(&map_itr);
4846 }
4847 return NULL;
4848}
4849
4850/**
4851 * @internal
4852 * FIXME: TBD.
4853 *
4854 * @param s the string to match
4855 */
4856static inline const char *
4857_escaped_char_get(const char *s, const char *s_end)
4858{
4859 /* Handle numeric escape codes. */
4860 if (s[1] == '#')
4861 {
4862 static char utf8_escape[7]; /* Support up to 6 bytes utf8 */
4863 char ustr[10];
4864 Eina_Unicode uchar[2] = { 0, 0 };
4865 char *utf8_char;
4866 size_t len = 0;
4867 int base = 10;
4868 s += 2; /* Skip "&#" */
4869
4870 if (tolower((unsigned char)(*s)) == 'x')
4871 {
4872 s++;
4873 base = 16;
4874 }
4875
4876 len = s_end - s;
4877 if (len >= sizeof(ustr) + 1)
4878 len = sizeof(ustr);
4879
4880 memcpy(ustr, s, len);
4881 ustr[len] = '\0';
4882 uchar[0] = strtol(ustr, NULL, base);
4883
4884 if (uchar[0] == 0)
4885 return NULL;
4886
4887 utf8_char = eina_unicode_unicode_to_utf8(uchar, NULL);
4888 strcpy(utf8_escape, utf8_char);
4889 free(utf8_char);
4890
4891 return utf8_escape;
4892 }
4893 else
4894 {
4895 const char *map_itr, *map_end;
4896
4897 map_itr = escape_strings;
4898 map_end = map_itr + sizeof(escape_strings);
4899
4900 while (map_itr < map_end)
4901 {
4902 if (_escaped_is_eq_and_advance(s, s_end, &map_itr, map_end))
4903 return map_itr;
4904 if (map_itr < map_end)
4905 _escaped_advance_after_end_of_string(&map_itr);
4906 }
4907 }
4908
4909 return NULL;
4910}
4911
4912EAPI const char *
4913evas_textblock_escape_string_get(const char *escape)
4914{
4915 /* &amp; -> & */
4916 return _escaped_char_get(escape, escape + strlen(escape));
4917}
4918
4919EAPI const char *
4920evas_textblock_escape_string_range_get(const char *escape_start, const char *escape_end)
4921{
4922 return _escaped_char_get(escape_start, escape_end);
4923}
4924
4925EAPI const char *
4926evas_textblock_string_escape_get(const char *string, int *len_ret)
4927{
4928 /* & -> &amp; */
4929 return _escaped_char_match(string, len_ret);
4930}
4931
4932/**
4933 * @internal
4934 * Appends the escaped char beteewn s and s_end to the curosr
4935 *
4936 *
4937 * @param s the start of the string
4938 * @param s_end the end of the string.
4939 */
4940static inline void
4941_append_escaped_char(Evas_Textblock_Cursor *cur, const char *s,
4942 const char *s_end)
4943{
4944 const char *escape;
4945
4946 escape = _escaped_char_get(s, s_end);
4947 if (escape)
4948 evas_textblock_cursor_text_append(cur, escape);
4949}
4950
4951/**
4952 * @internal
4953 * prepends the escaped char beteewn s and s_end to the curosr
4954 *
4955 *
4956 * @param s the start of the string
4957 * @param s_end the end of the string.
4958 */
4959static inline void
4960_prepend_escaped_char(Evas_Textblock_Cursor *cur, const char *s,
4961 const char *s_end)
4962{
4963 const char *escape;
4964
4965 escape = _escaped_char_get(s, s_end);
4966 if (escape)
4967 evas_textblock_cursor_text_prepend(cur, escape);
4968}
4969
4970
4971EAPI void
4972evas_object_textblock_text_markup_set(Evas_Object *obj, const char *text)
4973{
4974 TB_HEAD();
4975 if ((text != o->markup_text) && (o->markup_text))
4976 {
4977 free(o->markup_text);
4978 o->markup_text = NULL;
4979 }
4980 _nodes_clear(obj);
4981 if (!o->style && !o->style_user)
4982 {
4983 if (text != o->markup_text)
4984 {
4985 if (text) o->markup_text = strdup(text);
4986 }
4987 return;
4988 }
4989 evas_textblock_cursor_paragraph_first(o->cursor);
4990
4991 evas_object_textblock_text_markup_prepend(o->cursor, text);
4992 /* Point all the cursors to the starrt */
4993 {
4994 Eina_List *l;
4995 Evas_Textblock_Cursor *data;
4996
4997 evas_textblock_cursor_paragraph_first(o->cursor);
4998 EINA_LIST_FOREACH(o->cursors, l, data)
4999 evas_textblock_cursor_paragraph_first(data);
5000 }
5001}
5002
5003EAPI void
5004evas_object_textblock_text_markup_prepend(Evas_Textblock_Cursor *cur, const char *text)
5005{
5006 Evas_Object *obj = cur->obj;
5007 TB_HEAD();
5008 if (text)
5009 {
5010 char *s, *p;
5011 char *tag_start, *tag_end, *esc_start, *esc_end;
5012
5013 tag_start = tag_end = esc_start = esc_end = NULL;
5014 p = (char *)text;
5015 s = p;
5016 /* This loop goes through all of the mark up text until it finds format
5017 * tags, escape sequences or the terminating NULL. When it finds either
5018 * of those, it appends the text found up until that point to the textblock
5019 * proccesses whatever found. It repeats itself until the termainating
5020 * NULL is reached. */
5021 for (;;)
5022 {
5023 size_t text_len;
5024 /* If we got to the end of string or just finished/started tag
5025 * or escape sequence handling. */
5026 if ((*p == 0) ||
5027 (tag_end) || (esc_end) ||
5028 (tag_start) || (esc_start))
5029 {
5030 if (tag_end)
5031 {
5032 /* If we reached to a tag ending, analyze the tag */
5033 char *ttag;
5034 size_t ttag_len = tag_end - tag_start;
5035
5036
5037 ttag = malloc(ttag_len + 1);
5038 if (ttag)
5039 {
5040 memcpy(ttag, tag_start, ttag_len);
5041 ttag[ttag_len] = 0;
5042 evas_textblock_cursor_format_prepend(cur, ttag);
5043 free(ttag);
5044 }
5045 tag_start = tag_end = NULL;
5046 }
5047 else if (esc_end)
5048 {
5049 _prepend_escaped_char(cur, esc_start, esc_end + 1);
5050 esc_start = esc_end = NULL;
5051 }
5052 else if (*p == 0)
5053 {
5054 _prepend_text_run(cur, s, p);
5055 s = NULL;
5056 }
5057 if (*p == 0)
5058 break;
5059 }
5060 if (*p == '<')
5061 {
5062 if (!esc_start)
5063 {
5064 /* Append the text prior to this to the textblock and mark
5065 * the start of the tag */
5066 tag_start = p;
5067 tag_end = NULL;
5068 _prepend_text_run(cur, s, p);
5069 s = NULL;
5070 }
5071 }
5072 else if (*p == '>')
5073 {
5074 if (tag_start)
5075 {
5076 tag_end = p + 1;
5077 s = p + 1;
5078 }
5079 }
5080 else if (*p == '&')
5081 {
5082 if (!tag_start)
5083 {
5084 /* Append the text prior to this to the textblock and mark
5085 * the start of the escape sequence */
5086 esc_start = p;
5087 esc_end = NULL;
5088 _prepend_text_run(cur, s, p);
5089 s = NULL;
5090 }
5091 }
5092 else if (*p == ';')
5093 {
5094 if (esc_start)
5095 {
5096 esc_end = p;
5097 s = p + 1;
5098 }
5099 }
5100 /* Unicode object replcament char */
5101 else if (!strncmp(_REPLACEMENT_CHAR_UTF8, p,
5102 text_len = strlen(_REPLACEMENT_CHAR_UTF8)) ||
5103 !strncmp(_NEWLINE_UTF8, p,
5104 text_len = strlen(_NEWLINE_UTF8)) ||
5105 !strncmp(_TAB_UTF8, p,
5106 text_len = strlen(_TAB_UTF8)) ||
5107 !strncmp(_PARAGRAPH_SEPARATOR_UTF8, p,
5108 text_len = strlen(_PARAGRAPH_SEPARATOR_UTF8)))
5109 {
5110 /*FIXME: currently just remove them, maybe do something
5111 * fancier in the future, atm it breaks if this char
5112 * is inside <> */
5113 _prepend_text_run(cur, s, p);
5114 /* it's also advanced later in this loop need +text_len
5115 in total*/
5116 p += text_len - 1;
5117 s = p + 1; /* One after the end of the replacement char */
5118 }
5119 p++;
5120 }
5121 }
5122 _evas_textblock_changed(o, obj);
5123}
5124
5125
5126/**
5127 * @internal
5128 * An helper function to markup get. Appends the format from fnode to the strbugf txt.
5129 *
5130 * @param o the textblock object.
5131 * @param txt the strbuf to append to.
5132 * @param fnode the format node to process.
5133 */
5134static void
5135_markup_get_format_append(Eina_Strbuf *txt, Evas_Object_Textblock_Node_Format *fnode)
5136{
5137 eina_strbuf_append_char(txt, '<');
5138 {
5139 const char *s;
5140
5141 // FIXME: need to escape
5142 s = fnode->orig_format;
5143 if (!fnode->opener && !fnode->own_closer)
5144 eina_strbuf_append_char(txt, '/');
5145 eina_strbuf_append(txt, s);
5146 if (fnode->own_closer)
5147 eina_strbuf_append_char(txt, '/');
5148 }
5149 eina_strbuf_append_char(txt, '>');
5150}
5151
5152/**
5153 * @internal
5154 * An helper function to markup get. Appends the text in text.
5155 *
5156 * @param txt the strbuf to append to.
5157 * @param text the text to process.
5158 */
5159static void
5160_markup_get_text_append(Eina_Strbuf *txt, const Eina_Unicode *text)
5161{
5162 char *p = eina_unicode_unicode_to_utf8(text, NULL);
5163 char *base = p;
5164 while (*p)
5165 {
5166 const char *escape;
5167 int adv;
5168
5169 escape = _escaped_char_match(p, &adv);
5170 if (escape)
5171 {
5172 p += adv;
5173 eina_strbuf_append(txt, escape);
5174 }
5175 else
5176 {
5177 eina_strbuf_append_char(txt, *p);
5178 p++;
5179 }
5180 }
5181 free(base);
5182}
5183EAPI const char *
5184evas_object_textblock_text_markup_get(const Evas_Object *obj)
5185{
5186 Evas_Object_Textblock_Node_Text *n;
5187 Eina_Strbuf *txt = NULL;
5188
5189 TB_HEAD_RETURN(NULL);
5190 if (o->markup_text) return(o->markup_text);
5191 txt = eina_strbuf_new();
5192 EINA_INLIST_FOREACH(o->text_nodes, n)
5193 {
5194 Evas_Object_Textblock_Node_Format *fnode;
5195 Eina_Unicode *text_base, *text;
5196 int off;
5197
5198 /* For each text node to thorugh all of it's format nodes
5199 * append text from the start to the offset of the next format
5200 * using the last format got. if needed it also creates format items
5201 * this is the core algorithm of the layout mechanism.
5202 * Skip the unicode replacement chars when there are because
5203 * we don't want to print them. */
5204 text_base = text =
5205 eina_unicode_strndup(eina_ustrbuf_string_get(n->unicode),
5206 eina_ustrbuf_length_get(n->unicode));
5207 fnode = n->format_node;
5208 off = 0;
5209 while (fnode && (fnode->text_node == n))
5210 {
5211 Eina_Unicode tmp_ch;
5212 off += fnode->offset;
5213 /* No need to skip on the first run */
5214 tmp_ch = text[off];
5215 text[off] = 0; /* Null terminate the part of the string */
5216 _markup_get_text_append(txt, text);
5217 _markup_get_format_append(txt, fnode);
5218 text[off] = tmp_ch; /* Restore the char */
5219 text += off;
5220 if (fnode->visible)
5221 {
5222 off = -1;
5223 text++;
5224 }
5225 else
5226 {
5227 off = 0;
5228 }
5229 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
5230 }
5231 /* Add the rest, skip replacement */
5232 _markup_get_text_append(txt, text);
5233 free(text_base);
5234 }
5235
5236
5237 o->markup_text = eina_strbuf_string_steal(txt);
5238 eina_strbuf_free(txt);
5239 return o->markup_text;
5240}
5241
5242EAPI char *
5243evas_textblock_text_markup_to_utf8(const Evas_Object *obj, const char *text)
5244{
5245 /* FIXME: Redundant and awful, should be merged with markup_prepend */
5246 Eina_Strbuf *sbuf;
5247 char *s, *p, *ret;
5248 char *tag_start, *tag_end, *esc_start, *esc_end;
5249
5250 if (!text) return NULL;
5251
5252
5253 tag_start = tag_end = esc_start = esc_end = NULL;
5254 sbuf = eina_strbuf_new();
5255 p = (char *)text;
5256 s = p;
5257 /* This loop goes through all of the mark up text until it finds format
5258 * tags, escape sequences or the terminating NULL. When it finds either
5259 * of those, it appends the text found up until that point to the textblock
5260 * proccesses whatever found. It repeats itself until the termainating
5261 * NULL is reached. */
5262 for (;;)
5263 {
5264 /* If we got to the end of string or just finished/started tag
5265 * or escape sequence handling. */
5266 if ((*p == 0) ||
5267 (tag_end) || (esc_end) ||
5268 (tag_start) || (esc_start))
5269 {
5270 if (tag_end)
5271 {
5272 /* If we reached to a tag ending, analyze the tag */
5273 char *ttag;
5274 size_t ttag_len;
5275
5276 tag_start++; /* Skip the < */
5277 tag_end--; /* Skip the > */
5278 if ((tag_end > tag_start) && (*(tag_end - 1) == '/'))
5279 {
5280 tag_end --; /* Skip the terminating '/' */
5281 while (*(tag_end - 1) == ' ')
5282 tag_end--; /* skip trailing ' ' */
5283 }
5284
5285 ttag_len = tag_end - tag_start;
5286
5287 ttag = malloc(ttag_len + 1);
5288 if (ttag)
5289 {
5290 const char *match = NULL;
5291 size_t replace_len;
5292 memcpy(ttag, tag_start, ttag_len);
5293 ttag[ttag_len] = 0;
5294
5295
5296 if (obj)
5297 {
5298 match = _style_match_tag(
5299 evas_object_textblock_style_get(obj),
5300 ttag, ttag_len, &replace_len);
5301 }
5302
5303 if (!match) match = ttag;
5304
5305 if (_IS_PARAGRAPH_SEPARATOR_SIMPLE(match))
5306 eina_strbuf_append(sbuf, _PARAGRAPH_SEPARATOR_UTF8);
5307 else if (_IS_LINE_SEPARATOR(match))
5308 eina_strbuf_append(sbuf, _NEWLINE_UTF8);
5309 else if (_IS_TAB(match))
5310 eina_strbuf_append(sbuf, _TAB_UTF8);
5311 else if (!strncmp(match, "item", 4))
5312 eina_strbuf_append(sbuf, _REPLACEMENT_CHAR_UTF8);
5313
5314 free(ttag);
5315 }
5316 tag_start = tag_end = NULL;
5317 }
5318 else if (esc_end)
5319 {
5320 const char *escape;
5321
5322 escape = _escaped_char_get(esc_start, esc_end + 1);
5323 if (escape) eina_strbuf_append(sbuf, escape);
5324 esc_start = esc_end = NULL;
5325 }
5326 else if (*p == 0)
5327 {
5328 eina_strbuf_append_length(sbuf, s, p - s);
5329 s = NULL;
5330 }
5331 if (*p == 0)
5332 break;
5333 }
5334 if (*p == '<')
5335 {
5336 if (!esc_start)
5337 {
5338 /* Append the text prior to this to the textblock and
5339 * mark the start of the tag */
5340 tag_start = p;
5341 tag_end = NULL;
5342 eina_strbuf_append_length(sbuf, s, p - s);
5343 s = NULL;
5344 }
5345 }
5346 else if (*p == '>')
5347 {
5348 if (tag_start)
5349 {
5350 tag_end = p + 1;
5351 s = p + 1;
5352 }
5353 }
5354 else if (*p == '&')
5355 {
5356 if (!tag_start)
5357 {
5358 /* Append the text prior to this to the textblock and mark
5359 * the start of the escape sequence */
5360 esc_start = p;
5361 esc_end = NULL;
5362 eina_strbuf_append_length(sbuf, s, p - s);
5363 s = NULL;
5364 }
5365 }
5366 else if (*p == ';')
5367 {
5368 if (esc_start)
5369 {
5370 esc_end = p;
5371 s = p + 1;
5372 }
5373 }
5374 p++;
5375 }
5376
5377 ret = eina_strbuf_string_steal(sbuf);
5378 eina_strbuf_free(sbuf);
5379 return ret;
5380}
5381
5382EAPI char *
5383evas_textblock_text_utf8_to_markup(const Evas_Object *obj, const char *text)
5384{
5385 Eina_Strbuf *sbuf;
5386 char *str = NULL;
5387 int ch, pos = 0, pos2 = 0;
5388
5389 (void) obj;
5390
5391 if (!text) return NULL;
5392
5393 sbuf = eina_strbuf_new();
5394
5395 for (;;)
5396 {
5397 pos = pos2;
5398 pos2 = evas_string_char_next_get(text, pos2, &ch);
5399 if ((ch <= 0) || (pos2 <= 0)) break;
5400
5401 if (ch == _NEWLINE)
5402 eina_strbuf_append(sbuf, "<br/>");
5403 else if (ch == _TAB)
5404 eina_strbuf_append(sbuf, "<tab/>");
5405 else if (ch == '<')
5406 eina_strbuf_append(sbuf, "&lt;");
5407 else if (ch == '>')
5408 eina_strbuf_append(sbuf, "&gt;");
5409 else if (ch == '&')
5410 eina_strbuf_append(sbuf, "&amp;");
5411 else if (ch == _PARAGRAPH_SEPARATOR)
5412 eina_strbuf_append(sbuf, "<ps/>");
5413 else if (ch == _REPLACEMENT_CHAR)
5414 eina_strbuf_append(sbuf, "&#xfffc;");
5415 else
5416 {
5417 eina_strbuf_append_length(sbuf, text + pos, pos2 - pos);
5418 }
5419 }
5420 str = eina_strbuf_string_steal(sbuf);
5421 eina_strbuf_free(sbuf);
5422 return str;
5423
5424}
5425
5426/* cursors */
5427
5428/**
5429 * @internal
5430 * Merge the current node with the next, no need to remove PS, already
5431 * not there.
5432 *
5433 * @param o the text block object.
5434 * @param to merge into to.
5435 */
5436static void
5437_evas_textblock_nodes_merge(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *to)
5438{
5439 Evas_Object_Textblock_Node_Format *itr;
5440 Evas_Object_Textblock_Node_Format *pnode;
5441 Evas_Object_Textblock_Node_Text *from;
5442 const Eina_Unicode *text;
5443 int to_len, len;
5444
5445 if (!to) return;
5446 from = _NODE_TEXT(EINA_INLIST_GET(to)->next);
5447
5448 to_len = eina_ustrbuf_length_get(to->unicode);
5449 text = eina_ustrbuf_string_get(from->unicode);
5450 len = eina_ustrbuf_length_get(from->unicode);
5451 eina_ustrbuf_append_length(to->unicode, text, len);
5452
5453 itr = from->format_node;
5454 if (itr && (itr->text_node == from))
5455 {
5456 pnode = _NODE_FORMAT(EINA_INLIST_GET(itr)->prev);
5457 if (pnode && (pnode->text_node == to))
5458 {
5459 itr->offset += to_len - _evas_textblock_node_format_pos_get(pnode);
5460 }
5461 else
5462 {
5463 itr->offset += to_len;
5464 }
5465 }
5466
5467 while (itr && (itr->text_node == from))
5468 {
5469 itr->text_node = to;
5470 itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next);
5471 }
5472 if (!to->format_node || (to->format_node->text_node != to))
5473 {
5474 to->format_node = from->format_node;
5475 }
5476
5477 /* When it comes to how we handle it, merging is like removing both nodes
5478 * and creating a new one, se we need to do the needed cleanups. */
5479 if (to->par)
5480 to->par->text_node = NULL;
5481 to->par = NULL;
5482
5483 to->is_new = EINA_TRUE;
5484
5485 _evas_textblock_cursors_set_node(o, from, to);
5486 _evas_textblock_node_text_remove(o, from);
5487}
5488
5489/**
5490 * @internal
5491 * Merge the current node with the next, no need to remove PS, already
5492 * not there.
5493 *
5494 * @param cur the cursor that points to the current node
5495 */
5496static void
5497_evas_textblock_cursor_nodes_merge(Evas_Textblock_Cursor *cur)
5498{
5499 Evas_Object_Textblock_Node_Text *nnode;
5500 Evas_Object_Textblock *o;
5501 int len;
5502 if (!cur) return;
5503
5504 len = eina_ustrbuf_length_get(cur->node->unicode);
5505
5506 o = (Evas_Object_Textblock *)(cur->obj->object_data);
5507 nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next);
5508 _evas_textblock_nodes_merge(o, cur->node);
5509 _evas_textblock_cursors_update_offset(cur, nnode, 0, len);
5510 _evas_textblock_cursors_set_node(o, nnode, cur->node);
5511 if (nnode == o->cursor->node)
5512 {
5513 o->cursor->node = cur->node;
5514 o->cursor->pos += len;
5515 }
5516}
5517
5518/**
5519 * @internal
5520 * Return the format at a specific position.
5521 *
5522 * @param cur the cursor to the position.
5523 * @return the format node at the specific position or NULL if not found.
5524 */
5525static Evas_Object_Textblock_Node_Format *
5526_evas_textblock_cursor_node_format_at_pos_get(const Evas_Textblock_Cursor *cur)
5527{
5528 Evas_Object_Textblock_Node_Format *node;
5529 Evas_Object_Textblock_Node_Format *itr;
5530 int position = 0;
5531
5532 if (!cur->node) return NULL;
5533
5534 node = cur->node->format_node;
5535 if (!node) return NULL;
5536 /* If there is no exclusive format node to this paragraph return the
5537 * previous's node */
5538 /* Find the main format node */
5539 EINA_INLIST_FOREACH(node, itr)
5540 {
5541 if (itr->text_node != cur->node)
5542 {
5543 return NULL;
5544 }
5545 if ((position + itr->offset) == cur->pos)
5546 {
5547 return itr;
5548 }
5549 position += itr->offset;
5550 }
5551 return NULL;
5552}
5553
5554/**
5555 * @internal
5556 * Return the last format node at the position of the format node n.
5557 *
5558 * @param n a format node at the position.
5559 * @return the last format node at the position of n.
5560 */
5561static Evas_Object_Textblock_Node_Format *
5562_evas_textblock_node_format_last_at_off(const Evas_Object_Textblock_Node_Format *n)
5563{
5564 const Evas_Object_Textblock_Node_Format *nnode;
5565 const Evas_Object_Textblock_Node_Text *tnode;
5566 if (!n) return NULL;
5567 nnode = n;
5568 tnode = n->text_node;
5569 do
5570 {
5571 n = nnode;
5572 nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next);
5573 }
5574 while (nnode && (nnode->text_node == tnode) && (nnode->offset == 0));
5575
5576 return (Evas_Object_Textblock_Node_Format *) n;
5577}
5578
5579/**
5580 * @internal
5581 * Returns the visible format at a specific location.
5582 *
5583 * @param n a format at the specific position.
5584 * @return the format node at the specific position or NULL if not found.
5585 */
5586static Evas_Object_Textblock_Node_Format *
5587_evas_textblock_node_visible_at_pos_get(const Evas_Object_Textblock_Node_Format *n)
5588{
5589 const Evas_Object_Textblock_Node_Format *nnode;
5590 if (!n) return NULL;
5591 /* The visible format is the last one, because it inserts a replacement
5592 * char that advances the next formats. */
5593
5594 nnode = n;
5595 do
5596 {
5597 n = nnode;
5598 if (n->visible) return (Evas_Object_Textblock_Node_Format *) n;
5599 nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next);
5600 }
5601 while (nnode && (nnode->offset == 0));
5602
5603 return NULL;
5604}
5605
5606/**
5607 * @internal
5608 * Return the last format that applies to a specific cursor or at the specific
5609 * position the cursor points to. This means either a cursor at or before the
5610 * position of the cursor in the text node is returned or the previous's text
5611 * node's format node.
5612 *
5613 * @param cur the position to look at.
5614 * @return the format node found.
5615 */
5616static Evas_Object_Textblock_Node_Format *
5617_evas_textblock_cursor_node_format_before_or_at_pos_get(const Evas_Textblock_Cursor *cur)
5618{
5619 Evas_Object_Textblock_Node_Format *node, *pitr = NULL;
5620 Evas_Object_Textblock_Node_Format *itr;
5621 size_t position = 0;
5622
5623 if (!cur->node) return NULL;
5624
5625 node = cur->node->format_node;
5626 if (!node) return NULL;
5627 /* If there is no exclusive format node to this paragraph return the
5628 * previous's node */
5629 if (node->text_node != cur->node)
5630 {
5631 return node;
5632 }
5633 else if (node->offset > cur->pos)
5634 {
5635 return _NODE_FORMAT(EINA_INLIST_GET(node)->prev);
5636 }
5637 /* Find the main format node */
5638 pitr = _NODE_FORMAT(EINA_INLIST_GET(node)->prev);
5639 EINA_INLIST_FOREACH(node, itr)
5640 {
5641 if ((itr->text_node != cur->node) ||
5642 ((position + itr->offset) > cur->pos))
5643 {
5644 return pitr;
5645 }
5646 else if ((position + itr->offset) == cur->pos)
5647 {
5648 return itr;
5649 }
5650 pitr = itr;
5651 position += itr->offset;
5652 }
5653 return pitr;
5654}
5655
5656/**
5657 * @internal
5658 * Find the layout item and line that match the cursor.
5659 *
5660 * @param cur the cursor we are currently at. - NOT NULL.
5661 * @param[out] lnr the line found - not null.
5662 * @param[out] itr the item found - not null.
5663 * @return EINA_TRUE if we matched the previous format, EINA_FALSE otherwise.
5664 */
5665static Eina_Bool
5666_find_layout_item_match(const Evas_Textblock_Cursor *cur, Evas_Object_Textblock_Line **lnr, Evas_Object_Textblock_Item **itr)
5667{
5668 Evas_Textblock_Cursor cur2;
5669 Eina_Bool previous_format = EINA_FALSE;
5670
5671 cur2.obj = cur->obj;
5672 evas_textblock_cursor_copy(cur, &cur2);
5673 if (cur2.pos > 0)
5674 {
5675 cur2.pos--;
5676 }
5677
5678 if (_evas_textblock_cursor_is_at_the_end(cur) &&
5679 evas_textblock_cursor_format_is_visible_get(&cur2))
5680 {
5681 _find_layout_item_line_match(cur2.obj, cur2.node, cur2.pos, lnr, itr);
5682 previous_format = EINA_TRUE;
5683 }
5684 else
5685 {
5686 _find_layout_item_line_match(cur->obj, cur->node, cur->pos, lnr, itr);
5687 }
5688 return previous_format;
5689}
5690
5691EAPI Evas_Textblock_Cursor *
5692evas_object_textblock_cursor_get(const Evas_Object *obj)
5693{
5694 TB_HEAD_RETURN(NULL);
5695 return o->cursor;
5696}
5697
5698EAPI Evas_Textblock_Cursor *
5699evas_object_textblock_cursor_new(const Evas_Object *obj)
5700{
5701 Evas_Textblock_Cursor *cur;
5702
5703 TB_HEAD_RETURN(NULL);
5704 cur = calloc(1, sizeof(Evas_Textblock_Cursor));
5705 cur->obj = (Evas_Object *) obj;
5706 cur->node = o->text_nodes;
5707 cur->pos = 0;
5708
5709 o->cursors = eina_list_append(o->cursors, cur);
5710 return cur;
5711}
5712
5713EAPI void
5714evas_textblock_cursor_free(Evas_Textblock_Cursor *cur)
5715{
5716 Evas_Object_Textblock *o;
5717
5718 if (!cur) return;
5719 o = (Evas_Object_Textblock *)(cur->obj->object_data);
5720 if (cur == o->cursor) return;
5721 o->cursors = eina_list_remove(o->cursors, cur);
5722 free(cur);
5723}
5724
5725EAPI Eina_Bool
5726evas_textblock_cursor_is_format(const Evas_Textblock_Cursor *cur)
5727{
5728 if (!cur || !cur->node) return EINA_FALSE;
5729 return (_evas_textblock_cursor_node_format_at_pos_get(cur)) ?
5730 EINA_TRUE : EINA_FALSE;
5731}
5732
5733EAPI const Eina_List *
5734evas_textblock_node_format_list_get(const Evas_Object *obj, const char *anchor)
5735{
5736 TB_HEAD_RETURN(NULL);
5737 if (!strcmp(anchor, "a"))
5738 return o->anchors_a;
5739 else if (!strcmp(anchor, "item"))
5740 return o->anchors_item;
5741
5742 return NULL;
5743}
5744
5745EAPI const Evas_Object_Textblock_Node_Format *
5746evas_textblock_node_format_first_get(const Evas_Object *obj)
5747{
5748 TB_HEAD_RETURN(NULL);
5749 return o->format_nodes;
5750}
5751
5752EAPI const Evas_Object_Textblock_Node_Format *
5753evas_textblock_node_format_last_get(const Evas_Object *obj)
5754{
5755 TB_HEAD_RETURN(NULL);
5756 if (o->format_nodes)
5757 {
5758 return _NODE_FORMAT(EINA_INLIST_GET(o->format_nodes)->last);
5759 }
5760 return NULL;
5761}
5762
5763EAPI const Evas_Object_Textblock_Node_Format *
5764evas_textblock_node_format_next_get(const Evas_Object_Textblock_Node_Format *n)
5765{
5766 return _NODE_FORMAT(EINA_INLIST_GET(n)->next);
5767}
5768
5769EAPI const Evas_Object_Textblock_Node_Format *
5770evas_textblock_node_format_prev_get(const Evas_Object_Textblock_Node_Format *n)
5771{
5772 return _NODE_FORMAT(EINA_INLIST_GET(n)->prev);
5773}
5774
5775EAPI void
5776evas_textblock_node_format_remove_pair(Evas_Object *obj,
5777 Evas_Object_Textblock_Node_Format *n)
5778{
5779 Evas_Object_Textblock_Node_Text *tnode1;
5780 Evas_Object_Textblock_Node_Format *fmt, *found_node = NULL;
5781 Eina_List *fstack = NULL;
5782 TB_HEAD();
5783
5784 if (!n) return;
5785
5786 fmt = n;
5787
5788 do
5789 {
5790 const char *fstr = fmt->orig_format;
5791
5792 if (fmt->opener && !fmt->own_closer)
5793 {
5794 fstack = eina_list_prepend(fstack, fmt);
5795 }
5796 else if (fstr && !fmt->opener)
5797 {
5798 size_t fstr_len;
5799 fstr_len = strlen(fstr);
5800 /* Generic popper, just pop */
5801 if (((fstr[0] == ' ') && !fstr[1]) || !fstr[0])
5802 {
5803 fstack = eina_list_remove_list(fstack, fstack);
5804 if (!fstack)
5805 {
5806 found_node = fmt;
5807 goto found;
5808 }
5809 }
5810 /* Find the matching format and pop it, if the matching format
5811 * is out format, i.e the last one, pop and break. */
5812 else
5813 {
5814 Eina_List *i;
5815 Evas_Object_Textblock_Node_Format *fnode;
5816 EINA_LIST_FOREACH(fstack, i, fnode)
5817 {
5818 if (_FORMAT_IS_CLOSER_OF(
5819 fnode->orig_format, fstr, fstr_len))
5820 {
5821 /* Last one, this is our item! */
5822 if (!eina_list_next(i))
5823 {
5824 found_node = fmt;
5825 goto found;
5826 }
5827 fstack = eina_list_remove_list(fstack, i);
5828 break;
5829 }
5830 }
5831 }
5832 }
5833
5834 fmt = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next);
5835 }
5836 while (fmt && fstack);
5837
5838found:
5839
5840 fstack = eina_list_free(fstack);
5841
5842 if (n->visible)
5843 {
5844 size_t ind = _evas_textblock_node_format_pos_get(n);
5845 const char *format = n->format;
5846 Evas_Textblock_Cursor cur;
5847 cur.obj = obj;
5848
5849 eina_ustrbuf_remove(n->text_node->unicode, ind, ind + 1);
5850 if (format && _IS_PARAGRAPH_SEPARATOR(o, format))
5851 {
5852 evas_textblock_cursor_at_format_set(&cur, n);
5853 _evas_textblock_cursor_nodes_merge(&cur);
5854 }
5855 _evas_textblock_cursors_update_offset(&cur, n->text_node, ind, -1);
5856 }
5857 tnode1 = n->text_node;
5858 _evas_textblock_node_format_remove(o, n, 0);
5859 if (found_node && (found_node != n))
5860 {
5861 Evas_Object_Textblock_Node_Text *tnode2;
5862 tnode2 = found_node->text_node;
5863 /* found_node can never be visible! (it's the closing format) */
5864 _evas_textblock_node_format_remove(o, found_node, 0);
5865
5866 /* FIXME: Should be unified in the layout, for example, added to a list
5867 * that checks this kind of removals. But until then, this is very fast
5868 * and works. */
5869 /* Mark all the text nodes in between the removed formats as dirty. */
5870 while (tnode1)
5871 {
5872 tnode1->dirty = EINA_TRUE;
5873 if (tnode1 == tnode2)
5874 break;
5875 tnode1 =
5876 _NODE_TEXT(EINA_INLIST_GET(tnode1)->next);
5877 }
5878 }
5879
5880 _evas_textblock_changed(o, obj);
5881}
5882
5883EAPI void
5884evas_textblock_cursor_paragraph_first(Evas_Textblock_Cursor *cur)
5885{
5886 Evas_Object_Textblock *o;
5887 if (!cur) return;
5888 o = (Evas_Object_Textblock *)(cur->obj->object_data);
5889 cur->node = o->text_nodes;
5890 cur->pos = 0;
5891
5892}
5893
5894EAPI void
5895evas_textblock_cursor_paragraph_last(Evas_Textblock_Cursor *cur)
5896{
5897 Evas_Object_Textblock *o;
5898 Evas_Object_Textblock_Node_Text *node;
5899
5900 if (!cur) return;
5901 o = (Evas_Object_Textblock *)(cur->obj->object_data);
5902 node = o->text_nodes;
5903 if (node)
5904 {
5905 node = _NODE_TEXT(EINA_INLIST_GET(node)->last);
5906 cur->node = node;
5907 cur->pos = 0;
5908
5909 evas_textblock_cursor_paragraph_char_last(cur);
5910 }
5911 else
5912 {
5913 cur->node = NULL;
5914 cur->pos = 0;
5915
5916 }
5917}
5918
5919EAPI Eina_Bool
5920evas_textblock_cursor_paragraph_next(Evas_Textblock_Cursor *cur)
5921{
5922 if (!cur) return EINA_FALSE;
5923 if (!cur->node) return EINA_FALSE;
5924 /* If there is a current text node, return the next text node (if exists)
5925 * otherwise, just return False. */
5926 if (cur->node)
5927 {
5928 Evas_Object_Textblock_Node_Text *nnode;
5929 nnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->next);
5930 if (nnode)
5931 {
5932 cur->node = nnode;
5933 cur->pos = 0;
5934
5935 return EINA_TRUE;
5936 }
5937 }
5938 return EINA_FALSE;
5939}
5940
5941EAPI Eina_Bool
5942evas_textblock_cursor_paragraph_prev(Evas_Textblock_Cursor *cur)
5943{
5944 Evas_Object_Textblock_Node_Text *node;
5945 if (!cur) return EINA_FALSE;
5946 if (!cur->node) return EINA_FALSE;
5947 /* If the current node is a text node, just get the prev if any,
5948 * if it's a format, get the current text node out of the format and return
5949 * the prev text node if any. */
5950 node = cur->node;
5951 /* If there is a current text node, return the prev text node
5952 * (if exists) otherwise, just return False. */
5953 if (node)
5954 {
5955 Evas_Object_Textblock_Node_Text *pnode;
5956 pnode = _NODE_TEXT(EINA_INLIST_GET(cur->node)->prev);
5957 if (pnode)
5958 {
5959 cur->node = pnode;
5960 evas_textblock_cursor_paragraph_char_last(cur);
5961 return EINA_TRUE;
5962 }
5963 }
5964 return EINA_FALSE;
5965}
5966
5967EAPI void
5968evas_textblock_cursor_set_at_format(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *n)
5969{
5970 evas_textblock_cursor_at_format_set(cur, n);
5971}
5972
5973EAPI Eina_Bool
5974evas_textblock_cursor_format_next(Evas_Textblock_Cursor *cur)
5975{
5976 Evas_Object_Textblock_Node_Format *node;
5977
5978 if (!cur) return EINA_FALSE;
5979 if (!cur->node) return EINA_FALSE;
5980 /* If the current node is a format node, just get the next if any,
5981 * if it's a text, get the current format node out of the text and return
5982 * the next format node if any. */
5983 node = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur);
5984 node = _evas_textblock_node_format_last_at_off(node);
5985 if (!node)
5986 {
5987 if (cur->node->format_node)
5988 {
5989 cur->pos = _evas_textblock_node_format_pos_get(node);
5990 return EINA_TRUE;
5991 }
5992 }
5993 /* If there is a current text node, return the next format node (if exists)
5994 * otherwise, just return False. */
5995 else
5996 {
5997 Evas_Object_Textblock_Node_Format *nnode;
5998 nnode = _NODE_FORMAT(EINA_INLIST_GET(node)->next);
5999 if (nnode)
6000 {
6001 cur->node = nnode->text_node;
6002 cur->pos = _evas_textblock_node_format_pos_get(nnode);
6003
6004 return EINA_TRUE;
6005 }
6006 }
6007 return EINA_FALSE;
6008}
6009
6010EAPI Eina_Bool
6011evas_textblock_cursor_format_prev(Evas_Textblock_Cursor *cur)
6012{
6013 const Evas_Object_Textblock_Node_Format *node;
6014 if (!cur) return EINA_FALSE;
6015 if (!cur->node) return EINA_FALSE;
6016 node = evas_textblock_cursor_format_get(cur);
6017 if (!node)
6018 {
6019 node = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur);
6020 if (node)
6021 {
6022 cur->node = node->text_node;
6023 cur->pos = _evas_textblock_node_format_pos_get(node);
6024
6025 return EINA_TRUE;
6026 }
6027 }
6028 /* If there is a current text node, return the next text node (if exists)
6029 * otherwise, just return False. */
6030 if (node)
6031 {
6032 Evas_Object_Textblock_Node_Format *pnode;
6033 pnode = _NODE_FORMAT(EINA_INLIST_GET(node)->prev);
6034 if (pnode)
6035 {
6036 cur->node = pnode->text_node;
6037 cur->pos = _evas_textblock_node_format_pos_get(pnode);
6038
6039 return EINA_TRUE;
6040 }
6041 }
6042 return EINA_FALSE;
6043}
6044
6045#ifdef HAVE_LINEBREAK
6046
6047/* BREAK_AFTER: true if we can break after the current char.
6048 * Both macros assume str[i] is not the terminating nul */
6049#define BREAK_AFTER(i) \
6050 (breaks[i] == WORDBREAK_BREAK)
6051
6052#else
6053
6054#define BREAK_AFTER(i) \
6055 ((!text[i + 1]) || \
6056 (_is_white(text[i]) && !_is_white(text[i + 1])) || \
6057 (!_is_white(text[i]) && _is_white(text[i + 1])))
6058
6059#endif
6060
6061EAPI Eina_Bool
6062evas_textblock_cursor_word_start(Evas_Textblock_Cursor *cur)
6063{
6064 const Eina_Unicode *text;
6065 size_t i;
6066#ifdef HAVE_LINEBREAK
6067 char *breaks;
6068#endif
6069
6070 if (!cur) return EINA_FALSE;
6071 if (!cur->node) return EINA_FALSE;
6072
6073 text = eina_ustrbuf_string_get(cur->node->unicode);
6074
6075#ifdef HAVE_LINEBREAK
6076 {
6077 const char *lang = ""; /* FIXME: get lang */
6078 size_t len = eina_ustrbuf_length_get(cur->node->unicode);
6079 breaks = malloc(len);
6080 set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
6081 }
6082#endif
6083
6084 i = cur->pos;
6085
6086 /* Skip the first one. This ensures we don't point to the nul, and also
6087 * we just don't care about it anyway. */
6088 if (i > 0) i--;
6089
6090 for ( ; i > 0 ; i--)
6091 {
6092 if (BREAK_AFTER(i))
6093 {
6094 /* Advance to the current char */
6095 i++;
6096 break;
6097 }
6098 }
6099
6100 cur->pos = i;
6101
6102#ifdef HAVE_LINEBREAK
6103 free(breaks);
6104#endif
6105 return EINA_TRUE;
6106}
6107
6108EAPI Eina_Bool
6109evas_textblock_cursor_word_end(Evas_Textblock_Cursor *cur)
6110{
6111 const Eina_Unicode *text;
6112 size_t i;
6113#ifdef HAVE_LINEBREAK
6114 char *breaks;
6115#endif
6116
6117 if (!cur) return EINA_FALSE;
6118 if (!cur->node) return EINA_FALSE;
6119
6120 text = eina_ustrbuf_string_get(cur->node->unicode);
6121
6122#ifdef HAVE_LINEBREAK
6123 {
6124 const char *lang = ""; /* FIXME: get lang */
6125 size_t len = eina_ustrbuf_length_get(cur->node->unicode);
6126 breaks = malloc(len);
6127 set_wordbreaks_utf32((const utf32_t *) text, len, lang, breaks);
6128 }
6129#endif
6130
6131 i = cur->pos;
6132
6133 for ( ; text[i] ; i++)
6134 {
6135 if (BREAK_AFTER(i))
6136 {
6137 /* This is the one to break after. */
6138 break;
6139 }
6140 }
6141
6142 cur->pos = i;
6143
6144#ifdef HAVE_LINEBREAK
6145 free(breaks);
6146#endif
6147 return EINA_TRUE;;
6148}
6149
6150EAPI Eina_Bool
6151evas_textblock_cursor_char_next(Evas_Textblock_Cursor *cur)
6152{
6153 int ind;
6154 const Eina_Unicode *text;
6155
6156 if (!cur) return EINA_FALSE;
6157 if (!cur->node) return EINA_FALSE;
6158
6159 ind = cur->pos;
6160 text = eina_ustrbuf_string_get(cur->node->unicode);
6161 if (text[ind]) ind++;
6162 /* Only allow pointing a null if it's the last paragraph.
6163 * because we don't have a PS there. */
6164 if (text[ind])
6165 {
6166 cur->pos = ind;
6167 return EINA_TRUE;
6168 }
6169 else
6170 {
6171 if (!evas_textblock_cursor_paragraph_next(cur))
6172 {
6173 /* If we already were at the end, that means we don't have
6174 * where to go next we should return FALSE */
6175 if (cur->pos == (size_t) ind)
6176 return EINA_FALSE;
6177
6178 cur->pos = ind;
6179 return EINA_TRUE;
6180 }
6181 else
6182 {
6183 return EINA_TRUE;
6184 }
6185 }
6186}
6187
6188EAPI Eina_Bool
6189evas_textblock_cursor_char_prev(Evas_Textblock_Cursor *cur)
6190{
6191 if (!cur) return EINA_FALSE;
6192 if (!cur->node) return EINA_FALSE;
6193
6194 if (cur->pos != 0)
6195 {
6196 cur->pos--;
6197 return EINA_TRUE;
6198 }
6199 return evas_textblock_cursor_paragraph_prev(cur);
6200}
6201
6202EAPI void
6203evas_textblock_cursor_paragraph_char_first(Evas_Textblock_Cursor *cur)
6204{
6205 if (!cur) return;
6206 cur->pos = 0;
6207
6208}
6209
6210EAPI void
6211evas_textblock_cursor_paragraph_char_last(Evas_Textblock_Cursor *cur)
6212{
6213 int ind;
6214
6215 if (!cur) return;
6216 if (!cur->node) return;
6217 ind = eina_ustrbuf_length_get(cur->node->unicode);
6218 /* If it's not the last paragraph, go back one, because we want to point
6219 * to the PS, not the NULL */
6220 if (EINA_INLIST_GET(cur->node)->next)
6221 ind--;
6222
6223 if (ind >= 0)
6224 cur->pos = ind;
6225 else
6226 cur->pos = 0;
6227
6228}
6229
6230EAPI void
6231evas_textblock_cursor_line_char_first(Evas_Textblock_Cursor *cur)
6232{
6233 Evas_Object_Textblock *o;
6234 Evas_Object_Textblock_Line *ln = NULL;
6235 Evas_Object_Textblock_Item *it = NULL;
6236
6237 if (!cur) return;
6238 if (!cur->node) return;
6239 o = (Evas_Object_Textblock *)(cur->obj->object_data);
6240 if (!o->formatted.valid) _relayout(cur->obj);
6241
6242 _find_layout_item_match(cur, &ln, &it);
6243
6244 if (!ln) return;
6245 if (ln->items)
6246 {
6247 Evas_Object_Textblock_Item *i;
6248 it = ln->items;
6249 EINA_INLIST_FOREACH(ln->items, i)
6250 {
6251 if (it->text_pos > i->text_pos)
6252 {
6253 it = i;
6254 }
6255 }
6256 }
6257 if (it)
6258 {
6259 cur->pos = it->text_pos;
6260 cur->node = it->text_node;
6261 }
6262}
6263
6264EAPI void
6265evas_textblock_cursor_line_char_last(Evas_Textblock_Cursor *cur)
6266{
6267 Evas_Object_Textblock *o;
6268 Evas_Object_Textblock_Line *ln = NULL;
6269 Evas_Object_Textblock_Item *it = NULL;
6270
6271 if (!cur) return;
6272 if (!cur->node) return;
6273 o = (Evas_Object_Textblock *)(cur->obj->object_data);
6274 if (!o->formatted.valid) _relayout(cur->obj);
6275
6276 _find_layout_item_match(cur, &ln, &it);
6277
6278 if (!ln) return;
6279 if (ln->items)
6280 {
6281 Evas_Object_Textblock_Item *i;
6282 it = ln->items;
6283 EINA_INLIST_FOREACH(ln->items, i)
6284 {
6285 if (it->text_pos < i->text_pos)
6286 {
6287 it = i;
6288 }
6289 }
6290 }
6291 if (it)
6292 {
6293 size_t ind;
6294
6295 cur->node = it->text_node;
6296 cur->pos = it->text_pos;
6297 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
6298 {
6299 ind = _ITEM_TEXT(it)->text_props.text_len - 1;
6300 if (!IS_AT_END(_ITEM_TEXT(it), ind)) ind++;
6301 cur->pos += ind;
6302 }
6303 else if (!EINA_INLIST_GET(ln)->next && !EINA_INLIST_GET(ln->par)->next)
6304 {
6305 cur->pos++;
6306 }
6307 }
6308}
6309
6310/**
6311 * @internal
6312 * checks if a format (as a string) is visible/changes format and sets the
6313 * fnode properties accordingly.
6314 *
6315 * @param fnode the format node
6316 * @param s the string.
6317 */
6318static void
6319_evas_textblock_format_is_visible(Evas_Object_Textblock_Node_Format *fnode,
6320 const char *s)
6321{
6322 const char *item;
6323 Eina_Bool is_opener = EINA_TRUE;
6324
6325 fnode->visible = fnode->format_change = EINA_FALSE;
6326 fnode->anchor = ANCHOR_NONE;
6327 if (!s) return;
6328
6329 if (!fnode->own_closer)
6330 {
6331 is_opener = fnode->opener;
6332 fnode->format_change = EINA_TRUE;
6333 }
6334
6335 while ((item = _format_parse(&s)))
6336 {
6337 int itlen = s - item;
6338 /* We care about all of the formats even after a - except for
6339 * item which we don't care after a - because it's just a standard
6340 * closing */
6341 if ((!strncmp(item, "\n", itlen) || !strncmp(item, "\\n", itlen)) ||
6342 (!strncmp(item, "\t", itlen) || !strncmp(item, "\\t", itlen)) ||
6343 (!strncmp(item, "br", itlen) && (itlen >= 2)) ||
6344 (!strncmp(item, "tab", itlen) && (itlen >= 3)) ||
6345 (!strncmp(item, "ps", itlen) && (itlen >= 2)) ||
6346 (!strncmp(item, "item", itlen) && (itlen >= 4) && is_opener))
6347 {
6348 fnode->visible = EINA_TRUE;
6349 }
6350
6351 if (is_opener && !strncmp(item, "a", itlen))
6352 {
6353 fnode->anchor = ANCHOR_A;
6354 }
6355 else if (is_opener && !strncmp(item, "item", itlen) && (itlen >= 4))
6356 {
6357 fnode->anchor = ANCHOR_ITEM;
6358 }
6359 }
6360}
6361
6362/**
6363 * Sets the cursor to the position of where the fmt points to.
6364 *
6365 * @param cur the cursor to update.
6366 * @param fmt the format to set according to.
6367 * @return nothing.
6368 */
6369static void __UNUSED__
6370_evas_textblock_cursor_node_text_at_format(Evas_Textblock_Cursor *cur, Evas_Object_Textblock_Node_Format *fmt)
6371{
6372 Evas_Object_Textblock_Node_Text *text;
6373 Evas_Object_Textblock_Node_Format *base_format;
6374 Evas_Object_Textblock_Node_Format *itr;
6375 size_t position = 0;
6376
6377 if (!cur || !fmt) return;
6378 /* Find the main format node */
6379 text = fmt->text_node;
6380 cur->node = text;
6381 base_format = text->format_node;
6382 EINA_INLIST_FOREACH(base_format, itr)
6383 {
6384 if (itr == fmt)
6385 {
6386 break;
6387 }
6388 position += itr->offset;
6389 }
6390 cur->pos = position;
6391
6392}
6393
6394
6395/**
6396 * @internal
6397 * Remove pairs of + and - formats and also remove formats without + or -
6398 * i.e formats that pair to themselves. Only removes invisible formats
6399 * that pair themselves, if you want to remove invisible formats that pair
6400 * themselves, please first change fmt->visible to EINA_FALSE.
6401 *
6402 * @param o the textblock object.
6403 * @param fmt the current format.
6404 */
6405static void
6406_evas_textblock_node_format_remove_matching(Evas_Object_Textblock *o,
6407 Evas_Object_Textblock_Node_Format *fmt)
6408{
6409 Evas_Object_Textblock_Node_Text *tnode;
6410 Eina_List *formats = NULL;
6411 size_t offset = 0;
6412
6413 if (!fmt) return;
6414
6415 tnode = fmt->text_node;
6416
6417 do
6418 {
6419 Evas_Object_Textblock_Node_Format *nnode;
6420 const char *fstr = fmt->orig_format;
6421
6422 nnode = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next);
6423 if (nnode)
6424 {
6425 offset = nnode->offset;
6426 }
6427
6428
6429 if (fmt->opener && !fmt->own_closer)
6430 {
6431 formats = eina_list_prepend(formats, fmt);
6432 }
6433 else if (fstr && !fmt->opener)
6434 {
6435 Evas_Object_Textblock_Node_Format *fnode;
6436 size_t fstr_len;
6437 fstr_len = strlen(fstr);
6438 /* Generic popper, just pop (if there's anything to pop). */
6439 if (formats && (((fstr[0] == ' ') && !fstr[1]) || !fstr[0]))
6440 {
6441 fnode = eina_list_data_get(formats);
6442 formats = eina_list_remove_list(formats, formats);
6443 _evas_textblock_node_format_remove(o, fnode, 0);
6444 _evas_textblock_node_format_remove(o, fmt, 0);
6445 }
6446 /* Find the matching format and pop it, if the matching format
6447 * is our format, i.e the last one, pop and break. */
6448 else
6449 {
6450 Eina_List *i, *next;
6451 EINA_LIST_FOREACH_SAFE(formats, i, next, fnode)
6452 {
6453 if (_FORMAT_IS_CLOSER_OF(
6454 fnode->orig_format, fstr, fstr_len))
6455 {
6456 fnode = eina_list_data_get(i);
6457 formats = eina_list_remove_list(formats, i);
6458 _evas_textblock_node_format_remove(o, fnode, 0);
6459 _evas_textblock_node_format_remove(o, fmt, 0);
6460 break;
6461 }
6462 }
6463 }
6464 }
6465 else if (!fmt->visible)
6466 {
6467 _evas_textblock_node_format_remove(o, fmt, 0);
6468 }
6469 fmt = nnode;
6470 }
6471 while (fmt && (offset == 0) && (fmt->text_node == tnode));
6472 eina_list_free(formats);
6473}
6474/**
6475 * @internal
6476 * Add the offset (may be negative) to the first node after fmt which is
6477 * pointing to the text node tnode or to o->format_nodes if fmt is null
6478 * and it points to tnode.
6479 *
6480 * @param o the textblock object.
6481 * @param tnode the text node the format should point to.
6482 * @param fmt the current format.
6483 * @param offset the offest to add (may be negative).
6484 */
6485static void
6486_evas_textblock_node_format_adjust_offset(Evas_Object_Textblock *o,
6487 Evas_Object_Textblock_Node_Text *tnode,
6488 Evas_Object_Textblock_Node_Format *fmt, int offset)
6489{
6490 if (fmt)
6491 {
6492 fmt = _NODE_FORMAT(EINA_INLIST_GET(fmt)->next);
6493 }
6494 else
6495 {
6496 fmt = o->format_nodes;
6497 }
6498 if (fmt && (tnode == fmt->text_node))
6499 {
6500 fmt->offset += offset;
6501 }
6502}
6503
6504/**
6505 * @internal
6506 * Removes a format node updating the offset of the next format node and the
6507 * text nodes pointing to this node.
6508 *
6509 * @param o the textblock object.
6510 * @param n the fromat node to remove
6511 */
6512static void
6513_evas_textblock_node_format_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Format *n, int visible_adjustment)
6514{
6515 /* Update the text nodes about the change */
6516 {
6517 Evas_Object_Textblock_Node_Format *nnode;
6518 nnode = _NODE_FORMAT(EINA_INLIST_GET(n)->next);
6519 /* If there's a next node that belongs to the same text node
6520 * and the curret node was the main one, advance the format node */
6521 if (nnode && (nnode->text_node == n->text_node))
6522 {
6523 if (nnode->text_node->format_node == n)
6524 {
6525 nnode->text_node->format_node = nnode;
6526 }
6527 }
6528 else
6529 {
6530 Evas_Object_Textblock_Node_Text *tnode;
6531 /* If there's no next one update the text nodes */
6532 nnode = _NODE_FORMAT(EINA_INLIST_GET(n)->prev);
6533 tnode = n->text_node;
6534 /* Even if it's not the current text_node's main node
6535 * it can still be the next's. */
6536 if (tnode && (tnode->format_node != n))
6537 {
6538 tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next);
6539 }
6540 while (tnode && (tnode->format_node == n))
6541 {
6542 tnode->format_node = nnode;
6543 tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next);
6544 }
6545 }
6546 }
6547 _evas_textblock_node_format_adjust_offset(o, n->text_node, n,
6548 n->offset - visible_adjustment);
6549
6550 o->format_nodes = _NODE_FORMAT(eina_inlist_remove(
6551 EINA_INLIST_GET(o->format_nodes), EINA_INLIST_GET(n)));
6552 _evas_textblock_node_format_free(o, n);
6553}
6554
6555/**
6556 * @internal
6557 * Sets all the offsets of the format nodes between start and end in the text
6558 * node n to 0 and sets visibility to EINA_FALSE.
6559 * If end == -1 end means the end of the string.
6560 * Assumes there is a prev node or the current node will be preserved.
6561 *
6562 * @param n the text node the positinos refer to.
6563 * @param start the start of where to delete from.
6564 * @param end the end of the section to delete, if end == -1 it means the end of the string.
6565 * @returns #EINA_TRUE if removed a PS, false otherwise.
6566 */
6567static Eina_Bool
6568_evas_textblock_node_text_adjust_offsets_to_start(Evas_Object_Textblock *o,
6569 Evas_Object_Textblock_Node_Text *n, size_t start, int end)
6570{
6571 Evas_Object_Textblock_Node_Format *last_node, *itr;
6572 Evas_Object_Textblock_Node_Text *new_node;
6573 int use_end = 1;
6574 int delta = 0;
6575 int first = 1;
6576 int update_format_node;
6577 size_t pos = 0;
6578 int orig_end;
6579
6580 itr = n->format_node;
6581 if (!itr || (itr->text_node != n)) return EINA_FALSE;
6582
6583 orig_end = end;
6584 if ((end < 0) || ((size_t) end == eina_ustrbuf_length_get(n->unicode)))
6585 {
6586 use_end = 0;
6587 }
6588 else if (end > 0)
6589 {
6590 /* We don't want the last one */
6591 end--;
6592 }
6593
6594 /* If we are not removing the text node, all should stay in this text
6595 * node, otherwise, everything should move to the previous node */
6596 if ((start == 0) && !use_end)
6597 {
6598 new_node = _NODE_TEXT(EINA_INLIST_GET(n)->prev);
6599 if (!new_node)
6600 {
6601 new_node = n;
6602 }
6603 }
6604 else
6605 {
6606 new_node = n;
6607 }
6608
6609 /* Find the first node after start */
6610 while (itr && (itr->text_node == n))
6611 {
6612 pos += itr->offset;
6613 if (pos >= start)
6614 {
6615 break;
6616 }
6617 itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next);
6618 }
6619
6620 if (!itr || (itr->text_node != n))
6621 {
6622 return EINA_FALSE;
6623 }
6624
6625 update_format_node = ((itr == n->format_node) && (new_node != n));
6626 delta = orig_end - pos;
6627 itr->offset -= pos - start;
6628
6629 while (itr && (itr->text_node == n))
6630 {
6631 last_node = itr;
6632 itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next);
6633
6634 if (!first)
6635 {
6636 pos += last_node->offset;
6637 }
6638
6639 /* start is negative when this gets relevant */
6640 if (use_end && (pos > (size_t) end))
6641 {
6642 last_node->offset -= delta;
6643 break;
6644 }
6645
6646 delta = orig_end - pos;
6647 if (!first)
6648 {
6649 last_node->offset = 0;
6650 }
6651 else
6652 {
6653 first = 0;
6654 }
6655 last_node->visible = EINA_FALSE;
6656
6657 if (!itr || (itr && (itr->text_node != n)))
6658 {
6659 /* Remove the PS, and return since it's the end of the node */
6660 if (_IS_PARAGRAPH_SEPARATOR(o, last_node->format))
6661 {
6662 _evas_textblock_node_format_remove(o, last_node, 0);
6663 return EINA_TRUE;
6664 }
6665
6666 }
6667 last_node->text_node = new_node;
6668 if (update_format_node)
6669 {
6670 n->format_node = last_node;
6671 }
6672 }
6673
6674 return EINA_FALSE;
6675}
6676
6677/**
6678 * @internal
6679 * Removes all the format nodes between start and end in the text node n.
6680 * This function updates the offset of the next format node and the
6681 * text nodes pointing to it. if end == -1 end means the end of the string.
6682 *
6683 * @param o the textblock object.
6684 * @param n the text node the positinos refer to.
6685 * @param start the start of where to delete from.
6686 * @param end the end of the section to delete, if end == -1 it means the end of the string.
6687 */
6688static void
6689_evas_textblock_node_text_remove_formats_between(Evas_Object_Textblock *o,
6690 Evas_Object_Textblock_Node_Text *n, int start, int end)
6691{
6692 Evas_Object_Textblock_Node_Format *itr;
6693 int use_end = 1;
6694 int offset = end - start;
6695 itr = n->format_node;
6696
6697 if (itr)
6698 start -= itr->offset;
6699 if (offset < 0) offset = 0;
6700 if (end < 0) use_end = 0;
6701 while (itr && (itr->text_node == n))
6702 {
6703 Evas_Object_Textblock_Node_Format *nnode;
6704 int tmp_offset = 0;
6705
6706 /* start is negative when this gets relevant */
6707 if ((offset + start < 0) && use_end)
6708 {
6709 break;
6710 }
6711 nnode = _NODE_FORMAT(EINA_INLIST_GET(itr)->next);
6712 if (nnode)
6713 {
6714 tmp_offset = nnode->offset;
6715 }
6716 if (start <= 0)
6717 {
6718 /* Don't do visible adjustments because we are removing the visual
6719 * chars anyway and taking those into account */
6720 _evas_textblock_node_format_remove(o, itr, 0);
6721 }
6722 start -= tmp_offset;
6723 itr = nnode;
6724 }
6725}
6726
6727/**
6728 * @internal
6729 * Returns the first format in the range between start and end in the textblock
6730 * n.
6731 *
6732 * @param o the textblock object.
6733 * @param n the text node the positinos refer to.
6734 * @param start the start of where to delete from.
6735 * @param end the end of the section to delete, if end == -1 it means the end of the string.
6736 */
6737static Evas_Object_Textblock_Node_Format *
6738_evas_textblock_node_text_get_first_format_between(
6739 Evas_Object_Textblock_Node_Text *n, int start, int end)
6740{
6741 Evas_Object_Textblock_Node_Format *itr;
6742 int use_end = 1;
6743 itr = n->format_node;
6744 if (end < 0) use_end = 0;
6745 while (itr && (itr->text_node == n))
6746 {
6747 start -= itr->offset;
6748 end -= itr->offset;
6749 if ((end <= 0) && use_end)
6750 {
6751 break;
6752 }
6753 if (start <= 0)
6754 {
6755 return itr;
6756 }
6757 itr = _NODE_FORMAT(EINA_INLIST_GET(itr)->next);
6758 }
6759 return NULL;
6760}
6761
6762/**
6763 * Removes a text node and the corresponding format nodes.
6764 *
6765 * @param o the textblock objec.t
6766 * @param n the node to remove.
6767 */
6768static void
6769_evas_textblock_node_text_remove(Evas_Object_Textblock *o, Evas_Object_Textblock_Node_Text *n)
6770{
6771 _evas_textblock_node_text_adjust_offsets_to_start(o, n, 0, -1);
6772
6773 o->text_nodes = _NODE_TEXT(eina_inlist_remove(
6774 EINA_INLIST_GET(o->text_nodes), EINA_INLIST_GET(n)));
6775 _evas_textblock_node_text_free(n);
6776}
6777
6778/**
6779 * @internal
6780 * Return the position where the formats starts at.
6781 *
6782 * @param fmt the format to return the position of.
6783 * @return the position of the format in the text node it points to.
6784 */
6785static size_t
6786_evas_textblock_node_format_pos_get(const Evas_Object_Textblock_Node_Format *fmt)
6787{
6788 Evas_Object_Textblock_Node_Text *text;
6789 Evas_Object_Textblock_Node_Format *base_format;
6790 Evas_Object_Textblock_Node_Format *itr;
6791 size_t position = 0;
6792
6793 if (!fmt) return 0;
6794 /* Find the main format node */
6795 text = fmt->text_node;
6796 base_format = text->format_node;
6797 EINA_INLIST_FOREACH(base_format, itr)
6798 {
6799 if (itr == fmt)
6800 {
6801 break;
6802 }
6803 position += itr->offset;
6804 }
6805 return position + fmt->offset;
6806}
6807
6808EAPI int
6809evas_textblock_cursor_pos_get(const Evas_Textblock_Cursor *cur)
6810{
6811 Evas_Object_Textblock *o;
6812 Evas_Object_Textblock_Node_Text *n;
6813 size_t npos = 0;
6814
6815 if (!cur) return -1;
6816 if (!cur->node) return 0;
6817 o = (Evas_Object_Textblock *)(cur->obj->object_data);
6818 n = o->text_nodes;
6819 while (n != cur->node)
6820 {
6821 npos += eina_ustrbuf_length_get(n->unicode);
6822 n = _NODE_TEXT(EINA_INLIST_GET(n)->next);
6823 }
6824 return npos + cur->pos;
6825}
6826
6827EAPI void
6828evas_textblock_cursor_pos_set(Evas_Textblock_Cursor *cur, int _pos)
6829{
6830 Evas_Object_Textblock *o;
6831 Evas_Object_Textblock_Node_Text *n;
6832 size_t pos;
6833
6834 if (!cur) return;
6835 o = (Evas_Object_Textblock *)(cur->obj->object_data);
6836
6837 if (_pos < 0)
6838 {
6839 pos = 0;
6840 }
6841 else
6842 {
6843 pos = (size_t) _pos;
6844 }
6845
6846 n = o->text_nodes;
6847 while (n && (pos >= eina_ustrbuf_length_get(n->unicode)))
6848 {
6849 pos -= eina_ustrbuf_length_get(n->unicode);
6850 n = _NODE_TEXT(EINA_INLIST_GET(n)->next);
6851 }
6852
6853 if (n)
6854 {
6855 cur->node = n;
6856 cur->pos = pos;
6857 }
6858 else if (o->text_nodes)
6859 {
6860 /* In case we went pass the last node, we need to put the cursor
6861 * at the absolute end. */
6862 Evas_Object_Textblock_Node_Text *last_n;
6863
6864 last_n = _NODE_TEXT(EINA_INLIST_GET(o->text_nodes)->last);
6865 pos = eina_ustrbuf_length_get(last_n->unicode);
6866
6867 cur->node = last_n;
6868 cur->pos = pos;
6869 }
6870
6871}
6872
6873EAPI Eina_Bool
6874evas_textblock_cursor_line_set(Evas_Textblock_Cursor *cur, int line)
6875{
6876 Evas_Object_Textblock *o;
6877 Evas_Object_Textblock_Line *ln;
6878 Evas_Object_Textblock_Item *it;
6879
6880 if (!cur) return EINA_FALSE;
6881 o = (Evas_Object_Textblock *)(cur->obj->object_data);
6882 if (!o->formatted.valid) _relayout(cur->obj);
6883
6884 ln = _find_layout_line_num(cur->obj, line);
6885 if (!ln) return EINA_FALSE;
6886 it = (Evas_Object_Textblock_Item *)ln->items;
6887 if (it)
6888 {
6889 cur->pos = it->text_pos;
6890 cur->node = it->text_node;
6891 }
6892 else
6893 {
6894 cur->pos = 0;
6895
6896 cur->node = o->text_nodes;
6897 }
6898 return EINA_TRUE;
6899}
6900
6901EAPI int
6902evas_textblock_cursor_compare(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2)
6903{
6904 Eina_Inlist *l1, *l2;
6905
6906 if (!cur1) return 0;
6907 if (!cur2) return 0;
6908 if (cur1->obj != cur2->obj) return 0;
6909 if ((!cur1->node) || (!cur2->node)) return 0;
6910 if (cur1->node == cur2->node)
6911 {
6912 if (cur1->pos < cur2->pos) return -1; /* cur1 < cur2 */
6913 else if (cur1->pos > cur2->pos) return 1; /* cur2 < cur1 */
6914 return 0;
6915 }
6916 for (l1 = EINA_INLIST_GET(cur1->node),
6917 l2 = EINA_INLIST_GET(cur1->node); (l1) || (l2);)
6918 {
6919 if (l1 == EINA_INLIST_GET(cur2->node)) return 1; /* cur2 < cur 1 */
6920 else if (l2 == EINA_INLIST_GET(cur2->node)) return -1; /* cur1 < cur 2 */
6921 else if (!l1) return -1; /* cur1 < cur 2 */
6922 else if (!l2) return 1; /* cur2 < cur 1 */
6923 l1 = l1->prev;
6924 l2 = l2->next;
6925 }
6926 return 0;
6927}
6928
6929EAPI void
6930evas_textblock_cursor_copy(const Evas_Textblock_Cursor *cur, Evas_Textblock_Cursor *cur_dest)
6931{
6932 if (!cur) return;
6933 if (!cur_dest) return;
6934 if (cur->obj != cur_dest->obj) return;
6935 cur_dest->pos = cur->pos;
6936 cur_dest->node = cur->node;
6937
6938}
6939
6940
6941/* text controls */
6942/**
6943 * @internal
6944 * Free a text node. Shouldn't be used usually, it's better to use
6945 * @ref _evas_textblock_node_text_remove for most cases .
6946 *
6947 * @param n the text node to free
6948 * @see _evas_textblock_node_text_remove
6949 */
6950static void
6951_evas_textblock_node_text_free(Evas_Object_Textblock_Node_Text *n)
6952{
6953 if (!n) return;
6954 eina_ustrbuf_free(n->unicode);
6955 if (n->utf8)
6956 free(n->utf8);
6957 if (n->par)
6958 n->par->text_node = NULL;
6959 free(n);
6960}
6961
6962/**
6963 * @internal
6964 * Create a new text node
6965 *
6966 * @return the new text node.
6967 */
6968static Evas_Object_Textblock_Node_Text *
6969_evas_textblock_node_text_new(void)
6970{
6971 Evas_Object_Textblock_Node_Text *n;
6972
6973 n = calloc(1, sizeof(Evas_Object_Textblock_Node_Text));
6974 n->unicode = eina_ustrbuf_new();
6975 /* We want to layout each paragraph at least once. */
6976 n->dirty = EINA_TRUE;
6977 n->is_new = EINA_TRUE;
6978
6979 return n;
6980}
6981
6982/**
6983 * @internal
6984 * Break a paragraph. This does not add a PS but only splits the paragraph
6985 * where a ps was just added!
6986 *
6987 * @param cur the cursor to break at.
6988 * @param fnode the format node of the PS just added.
6989 * @return Returns no value.
6990 */
6991static void
6992_evas_textblock_cursor_break_paragraph(Evas_Textblock_Cursor *cur,
6993 Evas_Object_Textblock_Node_Format *fnode)
6994{
6995 Evas_Object_Textblock *o;
6996 Evas_Object_Textblock_Node_Text *n;
6997
6998 if (!cur) return;
6999 o = (Evas_Object_Textblock *)(cur->obj->object_data);
7000
7001 n = _evas_textblock_node_text_new();
7002 o->text_nodes = _NODE_TEXT(eina_inlist_append_relative(
7003 EINA_INLIST_GET(o->text_nodes),
7004 EINA_INLIST_GET(n),
7005 EINA_INLIST_GET(cur->node)));
7006 /* Handle text and format changes. */
7007 if (cur->node)
7008 {
7009 Evas_Object_Textblock_Node_Format *nnode;
7010 size_t len, start;
7011 const Eina_Unicode *text;
7012
7013 /* If there was a format node in the delete range,
7014 * make it our format and update the text_node fields,
7015 * otherwise, use the paragraph separator
7016 * of the previous paragraph. */
7017 nnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
7018 if (nnode && (nnode->text_node == cur->node))
7019 {
7020 n->format_node = nnode;
7021 nnode->offset--; /* We don't have to take the replacement char
7022 into account anymore */
7023 while (nnode && (nnode->text_node == cur->node))
7024 {
7025 nnode->text_node = n;
7026 nnode = _NODE_FORMAT(EINA_INLIST_GET(nnode)->next);
7027 }
7028 }
7029 else
7030 {
7031 n->format_node = fnode;
7032 }
7033
7034 /* cur->pos now points to the PS, move after. */
7035 start = cur->pos + 1;
7036 len = eina_ustrbuf_length_get(cur->node->unicode) - start;
7037 if (len > 0)
7038 {
7039 text = eina_ustrbuf_string_get(cur->node->unicode);
7040 eina_ustrbuf_append_length(n->unicode, text + start, len);
7041 eina_ustrbuf_remove(cur->node->unicode, start, start + len);
7042 cur->node->dirty = EINA_TRUE;
7043 }
7044 }
7045 else
7046 {
7047 fnode = o->format_nodes;
7048 if (fnode)
7049 {
7050 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->last);
7051 }
7052 n->format_node = fnode;
7053 }
7054}
7055
7056/**
7057 * @internal
7058 * Set the node and offset of all the curs after cur.
7059 *
7060 * @param cur the cursor.
7061 * @param n the current textblock node.
7062 * @param new_node the new node to set.
7063 */
7064static void
7065_evas_textblock_cursors_set_node(Evas_Object_Textblock *o,
7066 const Evas_Object_Textblock_Node_Text *n,
7067 Evas_Object_Textblock_Node_Text *new_node)
7068{
7069 Eina_List *l;
7070 Evas_Textblock_Cursor *data;
7071
7072 if (n == o->cursor->node)
7073 {
7074 o->cursor->pos = 0;
7075 o->cursor->node = new_node;
7076 }
7077 EINA_LIST_FOREACH(o->cursors, l, data)
7078 {
7079 if (n == data->node)
7080 {
7081 data->pos = 0;
7082 data->node = new_node;
7083 }
7084 }
7085}
7086
7087/**
7088 * @internal
7089 * Update the offset of all the cursors after cur.
7090 *
7091 * @param cur the cursor.
7092 * @param n the current textblock node.
7093 * @param start the starting pos.
7094 * @param offset how much to adjust (can be negative).
7095 */
7096static void
7097_evas_textblock_cursors_update_offset(const Evas_Textblock_Cursor *cur,
7098 const Evas_Object_Textblock_Node_Text *n,
7099 size_t start, int offset)
7100{
7101 Eina_List *l;
7102 Evas_Textblock_Cursor *data;
7103 Evas_Object_Textblock *o;
7104 o = (Evas_Object_Textblock *)(cur->obj->object_data);
7105
7106 if (cur != o->cursor)
7107 {
7108 if ((n == o->cursor->node) &&
7109 (o->cursor->pos > start))
7110 {
7111 if ((offset < 0) && (o->cursor->pos <= (size_t) (-1 * offset)))
7112 {
7113 o->cursor->pos = 0;
7114 }
7115 else
7116 {
7117 o->cursor->pos += offset;
7118 }
7119 }
7120 }
7121 EINA_LIST_FOREACH(o->cursors, l, data)
7122 {
7123 if (data != cur)
7124 {
7125 if ((n == data->node) &&
7126 (data->pos > start))
7127 {
7128 if ((offset < 0) && (data->pos <= (size_t) (-1 * offset)))
7129 {
7130 data->pos = 0;
7131 }
7132 else
7133 {
7134 data->pos += offset;
7135 }
7136 }
7137 else if (!data->node)
7138 {
7139 data->node = o->text_nodes;
7140 data->pos = 0;
7141 }
7142 }
7143 }
7144}
7145
7146/**
7147 * @internal
7148 * Mark that the textblock has changed.
7149 *
7150 * @param o the textblock object.
7151 * @param obj the evas object.
7152 */
7153static void
7154_evas_textblock_changed(Evas_Object_Textblock *o, Evas_Object *obj)
7155{
7156 o->formatted.valid = 0;
7157 o->native.valid = 0;
7158 o->content_changed = 1;
7159 if (o->markup_text)
7160 {
7161 free(o->markup_text);
7162 o->markup_text = NULL;
7163 }
7164
7165 evas_object_change(obj);
7166}
7167
7168static void
7169_evas_textblock_invalidate_all(Evas_Object_Textblock *o)
7170{
7171 Evas_Object_Textblock_Node_Text *n;
7172
7173 EINA_INLIST_FOREACH(o->text_nodes, n)
7174 {
7175 n->dirty = EINA_TRUE;
7176 }
7177}
7178
7179EAPI int
7180evas_textblock_cursor_text_append(Evas_Textblock_Cursor *cur, const char *_text)
7181{
7182 Evas_Object_Textblock *o;
7183 Evas_Object_Textblock_Node_Text *n;
7184 Evas_Object_Textblock_Node_Format *fnode = NULL;
7185 Eina_Unicode *text;
7186 int len = 0;
7187
7188 if (!cur) return 0;
7189 text = eina_unicode_utf8_to_unicode(_text, &len);
7190 o = (Evas_Object_Textblock *)(cur->obj->object_data);
7191
7192 n = cur->node;
7193 if (n)
7194 {
7195 Evas_Object_Textblock_Node_Format *nnode;
7196 fnode = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur);
7197 fnode = _evas_textblock_node_format_last_at_off(fnode);
7198 /* find the node after the current in the same paragraph
7199 * either we find one and then take the next, or we try to get
7200 * the first for the paragraph which must be after our position */
7201 if (fnode)
7202 {
7203 if (!evas_textblock_cursor_format_is_visible_get(cur))
7204 {
7205 nnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
7206 if (nnode && (nnode->text_node == n))
7207 {
7208 fnode = nnode;
7209 }
7210 else
7211 {
7212 fnode = NULL;
7213 }
7214 }
7215 }
7216 else
7217 {
7218 fnode = n->format_node;
7219 }
7220 }
7221 else if (o->text_nodes)
7222 {
7223 n = cur->node = o->text_nodes;
7224 cur->pos = 0;
7225 }
7226 else
7227 {
7228 n = _evas_textblock_node_text_new();
7229 o->text_nodes = _NODE_TEXT(eina_inlist_append(
7230 EINA_INLIST_GET(o->text_nodes),
7231 EINA_INLIST_GET(n)));
7232 cur->node = n;
7233 }
7234
7235 eina_ustrbuf_insert_length(n->unicode, text, len, cur->pos);
7236 /* Advance the formats */
7237 if (fnode && (fnode->text_node == cur->node))
7238 fnode->offset += len;
7239
7240 /* Update all the cursors after our position. */
7241 _evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, len);
7242
7243 _evas_textblock_changed(o, cur->obj);
7244 n->dirty = EINA_TRUE;
7245 free(text);
7246
7247 if (!o->cursor->node)
7248 o->cursor->node = o->text_nodes;
7249 return len;
7250}
7251
7252EAPI int
7253evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor *cur, const char *_text)
7254{
7255 int len;
7256 /*append is essentially prepend without advancing */
7257 len = evas_textblock_cursor_text_append(cur, _text);
7258 cur->pos += len; /*Advance */
7259 return len;
7260}
7261
7262/**
7263 * @internal
7264 * Free a format node
7265 *
7266 * @param o the textblock object
7267 * @param n the format node to free
7268 */
7269static void
7270_evas_textblock_node_format_free(Evas_Object_Textblock *o,
7271 Evas_Object_Textblock_Node_Format *n)
7272{
7273 if (!n) return;
7274 eina_stringshare_del(n->format);
7275 eina_stringshare_del(n->orig_format);
7276 if (n->anchor == ANCHOR_ITEM)
7277 o->anchors_item = eina_list_remove(o->anchors_item, n);
7278 else if (n->anchor == ANCHOR_A)
7279 o->anchors_a = eina_list_remove(o->anchors_a, n);
7280 free(n);
7281}
7282
7283/**
7284 * @internal
7285 * Create a new format node.
7286 *
7287 * @param format the text to create the format node from.
7288 * @param o the textblock object.
7289 * @return Returns the new format node
7290 */
7291static Evas_Object_Textblock_Node_Format *
7292_evas_textblock_node_format_new(Evas_Object_Textblock *o, const char *_format)
7293{
7294 Evas_Object_Textblock_Node_Format *n;
7295 const char *format = _format;
7296 const char *pre_stripped_format = NULL;
7297
7298 n = calloc(1, sizeof(Evas_Object_Textblock_Node_Format));
7299 /* Create orig_format and format */
7300 if (format[0] == '<')
7301 {
7302 const char *match;
7303 size_t format_len;
7304 size_t replace_len;
7305
7306 format++; /* Advance after '<' */
7307 format_len = strlen(format);
7308 if ((format_len > 0) && format[format_len - 1] == '>')
7309 {
7310 format_len--; /* We don't care about '>' */
7311 /* Check if it closes itself. Skip the </> case. */
7312 if ((format_len > 1) && format[format_len - 1] == '/')
7313 {
7314 format_len--; /* We don't care about '/' */
7315 n->own_closer = EINA_TRUE;
7316 }
7317 }
7318
7319 if (!o->style_user || !(match = _style_match_tag(o->style_user, format,
7320 format_len, &replace_len)))
7321 {
7322 match = _style_match_tag(o->style, format, format_len,
7323 &replace_len);
7324 }
7325
7326 if (match)
7327 {
7328 if (match[0] != '-')
7329 {
7330 n->opener = EINA_TRUE;
7331 if (match[0] != '+')
7332 {
7333 n->own_closer = EINA_TRUE;
7334 }
7335 }
7336
7337 pre_stripped_format = match;
7338 }
7339 else
7340 {
7341 if (format[0] == '/')
7342 {
7343 format++;
7344 format_len--;
7345 }
7346 else
7347 {
7348 n->opener = EINA_TRUE;
7349 }
7350 }
7351
7352 n->orig_format = eina_stringshare_add_length(format, format_len);
7353
7354 if (!pre_stripped_format)
7355 pre_stripped_format = n->orig_format;
7356 }
7357 /* Just use as is, it's a special format. */
7358 else
7359 {
7360 const char *tmp = format;
7361 if (format[0] != '-')
7362 {
7363 n->opener = EINA_TRUE;
7364 if (format[0] != '+')
7365 {
7366 n->own_closer = EINA_TRUE;
7367 }
7368 }
7369 if ((*tmp == '+') || (*tmp == '-'))
7370 {
7371 tmp++;
7372 while (*tmp == ' ') tmp++;
7373 }
7374 n->orig_format = eina_stringshare_add(tmp);
7375 pre_stripped_format = n->orig_format;
7376 }
7377
7378 /* Strip format */
7379 {
7380 const char *tmp = pre_stripped_format;
7381 if ((*tmp == '+') || (*tmp == '-'))
7382 {
7383 tmp++;
7384 while (*tmp == ' ') tmp++;
7385 }
7386 n->format = eina_stringshare_add(tmp);
7387 }
7388 format = n->format;
7389
7390 _evas_textblock_format_is_visible(n, format);
7391 if (n->anchor == ANCHOR_A)
7392 {
7393 o->anchors_a = eina_list_append(o->anchors_a, n);
7394 }
7395 else if (n->anchor == ANCHOR_ITEM)
7396 {
7397 o->anchors_item = eina_list_append(o->anchors_item, n);
7398 }
7399 n->is_new = EINA_TRUE;
7400
7401 return n;
7402}
7403
7404static Eina_Bool
7405_evas_textblock_cursor_is_at_the_end(const Evas_Textblock_Cursor *cur)
7406{
7407 const Eina_Unicode *text;
7408
7409 if (!cur) return EINA_FALSE;
7410 if (!cur->node) return EINA_FALSE;
7411 text = eina_ustrbuf_string_get(cur->node->unicode);
7412 return ((text[cur->pos] == 0) && (!EINA_INLIST_GET(cur->node)->next)) ?
7413 EINA_TRUE : EINA_FALSE;
7414}
7415
7416EAPI Eina_Bool
7417evas_textblock_cursor_format_append(Evas_Textblock_Cursor *cur, const char *format)
7418{
7419 Evas_Object_Textblock *o;
7420 Evas_Object_Textblock_Node_Format *n;
7421 Eina_Bool is_visible;
7422
7423 if (!cur) return EINA_FALSE;
7424 if ((!format) || (format[0] == 0)) return EINA_FALSE;
7425 o = (Evas_Object_Textblock *)(cur->obj->object_data);
7426 /* We should always have at least one text node */
7427 if (!o->text_nodes)
7428 {
7429 evas_textblock_cursor_text_prepend(cur, "");
7430 }
7431
7432 n = _evas_textblock_node_format_new(o, format);
7433 is_visible = n->visible;
7434 format = n->format;
7435 if (!cur->node)
7436 {
7437 o->format_nodes = _NODE_FORMAT(eina_inlist_append(
7438 EINA_INLIST_GET(o->format_nodes),
7439 EINA_INLIST_GET(n)));
7440 cur->pos = 0;
7441 n->text_node = (EINA_INLIST_GET(n)->prev) ?
7442 _NODE_FORMAT(EINA_INLIST_GET(n)->prev)->text_node :
7443 o->text_nodes;
7444 cur->node = n->text_node;
7445 }
7446 else
7447 {
7448 Evas_Object_Textblock_Node_Format *fmt;
7449 fmt = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur);
7450 n->text_node = cur->node;
7451 if (!fmt)
7452 {
7453 o->format_nodes = _NODE_FORMAT(eina_inlist_prepend(
7454 EINA_INLIST_GET(o->format_nodes),
7455 EINA_INLIST_GET(n)));
7456 n->offset = cur->pos;
7457 }
7458 else
7459 {
7460 if (evas_textblock_cursor_format_is_visible_get(cur))
7461 {
7462 o->format_nodes = _NODE_FORMAT(eina_inlist_prepend_relative(
7463 EINA_INLIST_GET(o->format_nodes),
7464 EINA_INLIST_GET(n),
7465 EINA_INLIST_GET(fmt)
7466 ));
7467 n->offset = fmt->offset;
7468 if (fmt->text_node->format_node == fmt)
7469 {
7470 fmt->text_node->format_node = n;
7471 }
7472 }
7473 else
7474 {
7475 fmt = _evas_textblock_node_format_last_at_off(fmt);
7476 o->format_nodes = _NODE_FORMAT(eina_inlist_append_relative(
7477 EINA_INLIST_GET(o->format_nodes),
7478 EINA_INLIST_GET(n),
7479 EINA_INLIST_GET(fmt)
7480 ));
7481 if (fmt->text_node != cur->node)
7482 {
7483 n->offset = cur->pos;
7484 }
7485 else
7486 {
7487 n->offset = cur->pos -
7488 _evas_textblock_node_format_pos_get(fmt);
7489 }
7490 }
7491 }
7492 /* Adjust differently if we insert a format char */
7493 if (is_visible)
7494 {
7495 _evas_textblock_node_format_adjust_offset(o, cur->node, n,
7496 -(n->offset - 1));
7497 }
7498 else
7499 {
7500 _evas_textblock_node_format_adjust_offset(o, cur->node, n,
7501 -n->offset);
7502 }
7503
7504 if (!fmt || (fmt->text_node != cur->node))
7505 {
7506 cur->node->format_node = n;
7507 }
7508 }
7509 if (is_visible && cur->node)
7510 {
7511 Eina_Unicode insert_char;
7512 /* Insert a visual representation according to the type of the
7513 format */
7514 if (_IS_PARAGRAPH_SEPARATOR(o, format))
7515 insert_char = _PARAGRAPH_SEPARATOR;
7516 else if (_IS_LINE_SEPARATOR(format))
7517 insert_char = _NEWLINE;
7518 else if (_IS_TAB(format))
7519 insert_char = _TAB;
7520 else
7521 insert_char = _REPLACEMENT_CHAR;
7522
7523 eina_ustrbuf_insert_char(cur->node->unicode, insert_char, cur->pos);
7524
7525 /* Advance all the cursors after our cursor */
7526 _evas_textblock_cursors_update_offset(cur, cur->node, cur->pos, 1);
7527 if (_IS_PARAGRAPH_SEPARATOR(o, format))
7528 {
7529 _evas_textblock_cursor_break_paragraph(cur, n);
7530 }
7531 else
7532 {
7533 /* Handle visible format nodes here */
7534 cur->node->dirty = EINA_TRUE;
7535 n->is_new = EINA_FALSE;
7536 }
7537 }
7538 else
7539 {
7540 o->format_changed = EINA_TRUE;
7541 }
7542
7543 _evas_textblock_changed(o, cur->obj);
7544
7545 if (!o->cursor->node)
7546 o->cursor->node = o->text_nodes;
7547 return is_visible;
7548}
7549
7550EAPI Eina_Bool
7551evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor *cur, const char *format)
7552{
7553 Eina_Bool is_visible;
7554 /* append is essentially prepend without advancing */
7555 is_visible = evas_textblock_cursor_format_append(cur, format);
7556 if (is_visible)
7557 {
7558 /* Advance after the replacement char */
7559 evas_textblock_cursor_char_next(cur);
7560 }
7561
7562 return is_visible;
7563}
7564
7565
7566EAPI void
7567evas_textblock_cursor_char_delete(Evas_Textblock_Cursor *cur)
7568{
7569 Evas_Object_Textblock *o;
7570 Evas_Object_Textblock_Node_Text *n, *n2;
7571 const Eina_Unicode *text;
7572 int chr, ind, ppos;
7573
7574 if (!cur || !cur->node) return;
7575 o = (Evas_Object_Textblock *)(cur->obj->object_data);
7576 n = cur->node;
7577
7578 text = eina_ustrbuf_string_get(n->unicode);
7579 ind = cur->pos;
7580 if (text[ind])
7581 chr = text[ind++];
7582 else
7583 chr = 0;
7584
7585 if (chr == 0) return;
7586 ppos = cur->pos;
7587 eina_ustrbuf_remove(n->unicode, cur->pos, ind);
7588 /* Remove a format node if needed, and remove the char only if the
7589 * fmt node is not visible */
7590 {
7591 Eina_Bool should_merge = EINA_FALSE;
7592 Evas_Object_Textblock_Node_Format *fmt, *fmt2;
7593 fmt = _evas_textblock_cursor_node_format_at_pos_get(cur);
7594 if (fmt)
7595 {
7596 const char *format = NULL;
7597 Evas_Object_Textblock_Node_Format *last_fmt;
7598 /* If there's a PS it must be the last become it delimits paragraphs */
7599 last_fmt = _evas_textblock_node_format_last_at_off(fmt);
7600 format = last_fmt->format;
7601 if (format && _IS_PARAGRAPH_SEPARATOR(o, format))
7602 {
7603 /* If it was a paragraph separator, we should merge the
7604 * current with the next, there must be a next. */
7605 should_merge = EINA_TRUE;
7606 }
7607 /* If a singnular, mark as invisible, so we'll delete it. */
7608 if (!format || last_fmt->own_closer)
7609 {
7610 last_fmt->visible = EINA_FALSE;
7611 }
7612 }
7613
7614 fmt2 = _evas_textblock_cursor_node_format_before_or_at_pos_get(cur);
7615 fmt2 = _evas_textblock_node_format_last_at_off(fmt2);
7616 _evas_textblock_node_format_adjust_offset(o, cur->node, fmt2,
7617 -(ind - cur->pos));
7618
7619 if (should_merge)
7620 {
7621 _evas_textblock_cursor_nodes_merge(cur);
7622 }
7623
7624 _evas_textblock_node_format_remove_matching(o, fmt);
7625 }
7626
7627 if (cur->pos == eina_ustrbuf_length_get(n->unicode))
7628 {
7629 n2 = _NODE_TEXT(EINA_INLIST_GET(n)->next);
7630 if (n2)
7631 {
7632 cur->node = n2;
7633 cur->pos = 0;
7634 }
7635 }
7636
7637 _evas_textblock_cursors_update_offset(cur, n, ppos, -(ind - ppos));
7638 _evas_textblock_changed(o, cur->obj);
7639 cur->node->dirty = EINA_TRUE;
7640}
7641
7642EAPI void
7643evas_textblock_cursor_range_delete(Evas_Textblock_Cursor *cur1, Evas_Textblock_Cursor *cur2)
7644{
7645 Evas_Object_Textblock_Node_Format *fnode = NULL;
7646 Evas_Object_Textblock *o;
7647 Evas_Object_Textblock_Node_Text *n1, *n2;
7648 Eina_Bool should_merge = EINA_FALSE, reset_cursor = EINA_FALSE;
7649
7650 if (!cur1 || !cur1->node) return;
7651 if (!cur2 || !cur2->node) return;
7652 if (cur1->obj != cur2->obj) return;
7653 o = (Evas_Object_Textblock *)(cur1->obj->object_data);
7654 if (evas_textblock_cursor_compare(cur1, cur2) > 0)
7655 {
7656 Evas_Textblock_Cursor *tc;
7657
7658 tc = cur1;
7659 cur1 = cur2;
7660 cur2 = tc;
7661 }
7662 n1 = cur1->node;
7663 n2 = cur2->node;
7664 if ((evas_textblock_cursor_compare(o->cursor, cur1) >= 0) &&
7665 (evas_textblock_cursor_compare(cur2, o->cursor) >= 0))
7666 {
7667 reset_cursor = EINA_TRUE;
7668 }
7669
7670
7671 if (n1 == n2)
7672 {
7673 if ((cur1->pos == 0) &&
7674 (cur2->pos == eina_ustrbuf_length_get(n1->unicode)))
7675 {
7676 _evas_textblock_node_text_remove_formats_between(o, n1, 0, -1);
7677 }
7678 else
7679 {
7680 should_merge = _evas_textblock_node_text_adjust_offsets_to_start(o,
7681 n1, cur1->pos, cur2->pos);
7682 }
7683 eina_ustrbuf_remove(n1->unicode, cur1->pos, cur2->pos);
7684 _evas_textblock_cursors_update_offset(cur1, cur1->node, cur1->pos, - (cur2->pos - cur1->pos));
7685 }
7686 else
7687 {
7688 Evas_Object_Textblock_Node_Text *n;
7689 int len;
7690 _evas_textblock_node_text_adjust_offsets_to_start(o, n1, cur1->pos, -1);
7691 n = _NODE_TEXT(EINA_INLIST_GET(n1)->next);
7692 /* Remove all the text nodes between */
7693 while (n && (n != n2))
7694 {
7695 Evas_Object_Textblock_Node_Text *nnode;
7696
7697 nnode = _NODE_TEXT(EINA_INLIST_GET(n)->next);
7698 _evas_textblock_cursors_set_node(o, n, n1);
7699 _evas_textblock_node_text_remove(o, n);
7700 n = nnode;
7701 }
7702 should_merge = _evas_textblock_node_text_adjust_offsets_to_start(o, n2,
7703 0, cur2->pos);
7704
7705 /* Remove the formats and the strings in the first and last nodes */
7706 len = eina_ustrbuf_length_get(n1->unicode);
7707 eina_ustrbuf_remove(n1->unicode, cur1->pos, len);
7708 eina_ustrbuf_remove(n2->unicode, 0, cur2->pos);
7709 /* Merge the nodes because we removed the PS */
7710 _evas_textblock_cursors_update_offset(cur1, cur1->node, cur1->pos,
7711 - cur1->pos);
7712 _evas_textblock_cursors_update_offset(cur2, cur2->node, 0, - cur2->pos);
7713 _evas_textblock_nodes_merge(o, n1);
7714 }
7715 fnode = _evas_textblock_cursor_node_format_at_pos_get(cur1);
7716
7717 n1->dirty = n2->dirty = EINA_TRUE;
7718 if (should_merge)
7719 {
7720 /* We call this function instead of the cursor one because we already
7721 * updated the cursors */
7722 _evas_textblock_nodes_merge(o, n1);
7723 }
7724 _evas_textblock_node_format_remove_matching(o, fnode);
7725
7726 evas_textblock_cursor_copy(cur1, cur2);
7727 if (reset_cursor)
7728 evas_textblock_cursor_copy(cur1, o->cursor);
7729
7730 _evas_textblock_changed(o, cur1->obj);
7731}
7732
7733
7734EAPI char *
7735evas_textblock_cursor_content_get(const Evas_Textblock_Cursor *cur)
7736{
7737 if (!cur || !cur->node) return NULL;
7738 if (evas_textblock_cursor_format_is_visible_get(cur))
7739 {
7740 Eina_Strbuf *buf;
7741 Evas_Object_Textblock_Node_Format *fnode;
7742 char *ret;
7743 fnode = _evas_textblock_node_visible_at_pos_get(
7744 evas_textblock_cursor_format_get(cur));
7745
7746 buf = eina_strbuf_new();
7747 _markup_get_format_append(buf, fnode);
7748 ret = eina_strbuf_string_steal(buf);
7749 eina_strbuf_free(buf);
7750
7751 return ret;
7752 }
7753 else
7754 {
7755 const Eina_Unicode *ustr;
7756 Eina_Unicode buf[2];
7757 char *s;
7758
7759 ustr = eina_ustrbuf_string_get(cur->node->unicode);
7760 buf[0] = ustr[cur->pos];
7761 buf[1] = 0;
7762 s = eina_unicode_unicode_to_utf8(buf, NULL);
7763
7764 return s;
7765 }
7766}
7767
7768static char *
7769_evas_textblock_cursor_range_text_markup_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2)
7770{
7771 Evas_Object_Textblock_Node_Text *tnode;
7772 Eina_Strbuf *buf;
7773 Evas_Textblock_Cursor *cur2;
7774 buf = eina_strbuf_new();
7775
7776 if (!cur1 || !cur1->node) return NULL;
7777 if (!_cur2 || !_cur2->node) return NULL;
7778 if (cur1->obj != _cur2->obj) return NULL;
7779 if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
7780 {
7781 const Evas_Textblock_Cursor *tc;
7782
7783 tc = cur1;
7784 cur1 = _cur2;
7785 _cur2 = tc;
7786 }
7787 /* Work on a local copy of the cur */
7788 cur2 = alloca(sizeof(Evas_Textblock_Cursor));
7789 cur2->obj = _cur2->obj;
7790 evas_textblock_cursor_copy(_cur2, cur2);
7791
7792 /* Parse the text between the cursors. */
7793 for (tnode = cur1->node ; tnode ;
7794 tnode = _NODE_TEXT(EINA_INLIST_GET(tnode)->next))
7795 {
7796 Evas_Object_Textblock_Node_Format *fnode;
7797 Eina_Unicode *text_base, *text;
7798 int off = 0;
7799
7800 text_base = text =
7801 eina_unicode_strndup(eina_ustrbuf_string_get(tnode->unicode),
7802 eina_ustrbuf_length_get(tnode->unicode));
7803 if (tnode == cur2->node)
7804 {
7805 fnode = _evas_textblock_node_text_get_first_format_between(tnode,
7806 cur1->pos, cur2->pos);
7807 }
7808 else if (tnode == cur1->node)
7809 {
7810 fnode = _evas_textblock_node_text_get_first_format_between(tnode,
7811 cur1->pos, -1);
7812 }
7813 else
7814 {
7815 fnode = _evas_textblock_node_text_get_first_format_between(tnode,
7816 0, -1);
7817 }
7818 /* Init the offset so the first one will count starting from cur1->pos
7819 * and not the previous format node */
7820 if (tnode == cur1->node)
7821 {
7822 if (fnode)
7823 {
7824 off = _evas_textblock_node_format_pos_get(fnode) -
7825 cur1->pos - fnode->offset;
7826 }
7827 text += cur1->pos;
7828 }
7829 else
7830 {
7831 off = 0;
7832 }
7833 while (fnode && (fnode->text_node == tnode))
7834 {
7835 Eina_Unicode tmp_ch;
7836 off += fnode->offset;
7837 if ((tnode == cur2->node) &&
7838 ((size_t) (text - text_base + off) >= cur2->pos))
7839 {
7840 break;
7841 }
7842 /* No need to skip on the first run */
7843 tmp_ch = text[off];
7844 text[off] = 0; /* Null terminate the part of the string */
7845 _markup_get_text_append(buf, text);
7846 _markup_get_format_append(buf, fnode);
7847 text[off] = tmp_ch; /* Restore the char */
7848 text += off;
7849 if (fnode->visible)
7850 {
7851 off = -1;
7852 text++;
7853 }
7854 else
7855 {
7856 off = 0;
7857 }
7858 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
7859 }
7860 /* If we got to the last node, stop and add the rest outside */
7861 if (cur2->node == tnode)
7862 {
7863 /* Add the rest, skip replacement */
7864 /* Don't go past the second cursor pos */
7865 text_base[cur2->pos] = '\0';
7866 _markup_get_text_append(buf, text);
7867 free(text_base);
7868 break;
7869 }
7870 else
7871 {
7872 /* Add the rest, skip replacement */
7873 _markup_get_text_append(buf, text);
7874 free(text_base);
7875 }
7876 }
7877 /* return the string */
7878 {
7879 char *ret;
7880 ret = eina_strbuf_string_steal(buf);
7881 eina_strbuf_free(buf);
7882 return ret;
7883 }
7884}
7885
7886static char *
7887_evas_textblock_cursor_range_text_plain_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *_cur2)
7888{
7889 Eina_UStrbuf *buf;
7890 Evas_Object_Textblock_Node_Text *n1, *n2;
7891 Evas_Textblock_Cursor *cur2;
7892
7893 buf = eina_ustrbuf_new();
7894
7895 if (!cur1 || !cur1->node) return NULL;
7896 if (!_cur2 || !_cur2->node) return NULL;
7897 if (cur1->obj != _cur2->obj) return NULL;
7898 if (evas_textblock_cursor_compare(cur1, _cur2) > 0)
7899 {
7900 const Evas_Textblock_Cursor *tc;
7901
7902 tc = cur1;
7903 cur1 = _cur2;
7904 _cur2 = tc;
7905 }
7906 n1 = cur1->node;
7907 n2 = _cur2->node;
7908 /* Work on a local copy of the cur */
7909 cur2 = alloca(sizeof(Evas_Textblock_Cursor));
7910 cur2->obj = _cur2->obj;
7911 evas_textblock_cursor_copy(_cur2, cur2);
7912
7913
7914 if (n1 == n2)
7915 {
7916 const Eina_Unicode *tmp;
7917 tmp = eina_ustrbuf_string_get(n1->unicode);
7918 eina_ustrbuf_append_length(buf, tmp + cur1->pos, cur2->pos - cur1->pos);
7919 }
7920 else
7921 {
7922 const Eina_Unicode *tmp;
7923 tmp = eina_ustrbuf_string_get(n1->unicode);
7924 eina_ustrbuf_append(buf, tmp + cur1->pos);
7925 n1 = _NODE_TEXT(EINA_INLIST_GET(n1)->next);
7926 while (n1 != n2)
7927 {
7928 tmp = eina_ustrbuf_string_get(n1->unicode);
7929 eina_ustrbuf_append_length(buf, tmp,
7930 eina_ustrbuf_length_get(n1->unicode));
7931 n1 = _NODE_TEXT(EINA_INLIST_GET(n1)->next);
7932 }
7933 tmp = eina_ustrbuf_string_get(n2->unicode);
7934 eina_ustrbuf_append_length(buf, tmp, cur2->pos);
7935 }
7936
7937 /* Free and return */
7938 {
7939 char *ret;
7940 ret = eina_unicode_unicode_to_utf8(eina_ustrbuf_string_get(buf), NULL);
7941 eina_ustrbuf_free(buf);
7942 return ret;
7943 }
7944}
7945
7946EAPI Eina_List *
7947evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2)
7948{
7949 Evas_Object *obj = cur1->obj;
7950 Eina_List *ret = NULL;
7951 Evas_Object_Textblock_Node_Text *n1, *n2;
7952 Evas_Object_Textblock_Node_Format *first, *last;
7953 TB_HEAD_RETURN(NULL);
7954 if (!cur1 || !cur1->node) return NULL;
7955 if (!cur2 || !cur2->node) return NULL;
7956 if (cur1->obj != cur2->obj) return NULL;
7957 if (evas_textblock_cursor_compare(cur1, cur2) > 0)
7958 {
7959 const Evas_Textblock_Cursor *tc;
7960
7961 tc = cur1;
7962 cur1 = cur2;
7963 cur2 = tc;
7964 }
7965 n1 = cur1->node;
7966 n2 = cur2->node;
7967
7968 /* FIXME: Change first and last getting to format_before_or_at_pos_get */
7969
7970 last = n2->format_node;
7971
7972 /* If n2->format_node is NULL, we don't have formats in the tb/range. */
7973 if (!last)
7974 return NULL;
7975 /* If the found format is on our text node, we should go to the last
7976 * one, otherwise, the one we found is good enough. */
7977 if (last->text_node == n2)
7978 {
7979 Evas_Object_Textblock_Node_Format *fnode = last;
7980 while (fnode && (fnode->text_node == n2))
7981 {
7982 last = fnode;
7983 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
7984 }
7985 }
7986
7987 /* If the first format node is within the range (i.e points to n1) or if
7988 * we have other formats in the range, go through them */
7989 first = n1->format_node;
7990 if ((first->text_node == n1) || (first != last))
7991 {
7992 Evas_Object_Textblock_Node_Format *fnode = first;
7993 /* Go to the first one in the range */
7994 if (first->text_node != n1)
7995 {
7996 first = _NODE_FORMAT(EINA_INLIST_GET(first)->next);
7997 }
7998
7999 while (fnode)
8000 {
8001 ret = eina_list_append(ret, fnode);
8002 if (fnode == last)
8003 break;
8004 fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
8005 }
8006 }
8007
8008 return ret;
8009
8010}
8011
8012EAPI char *
8013evas_textblock_cursor_range_text_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2, Evas_Textblock_Text_Type format)
8014{
8015 if (format == EVAS_TEXTBLOCK_TEXT_MARKUP)
8016 return _evas_textblock_cursor_range_text_markup_get(cur1, cur2);
8017 else if (format == EVAS_TEXTBLOCK_TEXT_PLAIN)
8018 return _evas_textblock_cursor_range_text_plain_get(cur1, cur2);
8019 else
8020 return NULL; /* Not yet supported */
8021}
8022
8023EAPI const char *
8024evas_textblock_cursor_paragraph_text_get(const Evas_Textblock_Cursor *cur)
8025{
8026 Evas_Textblock_Cursor cur1, cur2;
8027 if (!cur) return NULL;
8028 if (!cur->node) return NULL;
8029 if (cur->node->utf8)
8030 {
8031 free(cur->node->utf8);
8032 }
8033 cur1.obj = cur2.obj = cur->obj;
8034 cur1.node = cur2.node = cur->node;
8035 evas_textblock_cursor_paragraph_char_first(&cur1);
8036 evas_textblock_cursor_paragraph_char_last(&cur2);
8037
8038 cur->node->utf8 = evas_textblock_cursor_range_text_get(&cur1, &cur2,
8039 EVAS_TEXTBLOCK_TEXT_MARKUP);
8040 return cur->node->utf8;
8041}
8042
8043EAPI int
8044evas_textblock_cursor_paragraph_text_length_get(const Evas_Textblock_Cursor *cur)
8045{
8046 int len;
8047 if (!cur) return -1;
8048 if (!cur->node) return -1;
8049 len = eina_ustrbuf_length_get(cur->node->unicode);
8050
8051 if (EINA_INLIST_GET(cur->node)->next)
8052 return len - 1; /* Remove the paragraph separator */
8053 else
8054 return len;
8055}
8056
8057EAPI const Evas_Object_Textblock_Node_Format *
8058evas_textblock_cursor_format_get(const Evas_Textblock_Cursor *cur)
8059{
8060 if (!cur) return NULL;
8061 if (!cur->node) return NULL;
8062 return _evas_textblock_cursor_node_format_at_pos_get(cur);
8063}
8064
8065EAPI const char *
8066evas_textblock_node_format_text_get(const Evas_Object_Textblock_Node_Format *fmt)
8067{
8068 static char *ret = NULL;
8069 char *tmp;
8070
8071 if (!fmt) return NULL;
8072
8073 if (ret) free(ret);
8074 ret = malloc(strlen(fmt->orig_format) + 2 + 1);
8075 tmp = ret;
8076
8077 if (fmt->opener && !fmt->own_closer)
8078 {
8079 *(tmp++) = '+';
8080 *(tmp++) = ' ';
8081 }
8082 else if (!fmt->opener)
8083 {
8084 *(tmp++) = '-';
8085 *(tmp++) = ' ';
8086 }
8087 strcpy(tmp, fmt->orig_format);
8088 return ret;
8089}
8090
8091EAPI void
8092evas_textblock_cursor_at_format_set(Evas_Textblock_Cursor *cur, const Evas_Object_Textblock_Node_Format *fmt)
8093{
8094 if (!fmt || !cur) return;
8095 cur->node = fmt->text_node;
8096 cur->pos = _evas_textblock_node_format_pos_get(fmt);
8097}
8098
8099EAPI Eina_Bool
8100evas_textblock_cursor_format_is_visible_get(const Evas_Textblock_Cursor *cur)
8101{
8102 const Eina_Unicode *text;
8103
8104 if (!cur) return EINA_FALSE;
8105 if (!cur->node) return EINA_FALSE;
8106 if (!evas_textblock_cursor_is_format(cur)) return EINA_FALSE;
8107 text = eina_ustrbuf_string_get(cur->node->unicode);
8108 return EVAS_TEXTBLOCK_IS_VISIBLE_FORMAT_CHAR(text[cur->pos]);
8109}
8110
8111EAPI int
8112evas_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)
8113{
8114 int ret = -1;
8115 const Evas_Textblock_Cursor *dir_cur;
8116 Evas_Textblock_Cursor cur2;
8117 Evas_Object_Textblock *o;
8118 o = (Evas_Object_Textblock *)(cur->obj->object_data);
8119 if (!o->formatted.valid) _relayout(cur->obj);
8120
8121 dir_cur = cur;
8122 if (ctype == EVAS_TEXTBLOCK_CURSOR_UNDER)
8123 {
8124 ret = evas_textblock_cursor_pen_geometry_get(cur, cx, cy, cw, ch);
8125 }
8126 else if (ctype == EVAS_TEXTBLOCK_CURSOR_BEFORE)
8127 {
8128 /* In the case of a "before cursor", we should get the coordinates
8129 * of just after the previous char (which in bidi text may not be
8130 * just before the current char). */
8131 Evas_Coord x, y, h, w;
8132 Evas_Object_Textblock_Node_Format *fmt;
8133
8134 /* If it's at the end of the line, we want to get the position, not
8135 * the position of the previous */
8136 if ((cur->pos > 0) && !_evas_textblock_cursor_is_at_the_end(cur))
8137 {
8138#ifdef BIDI_SUPPORT
8139 Eina_Bool before_char = EINA_FALSE;
8140#endif
8141 cur2.obj = cur->obj;
8142 evas_textblock_cursor_copy(cur, &cur2);
8143 evas_textblock_cursor_char_prev(&cur2);
8144
8145 fmt = _evas_textblock_cursor_node_format_at_pos_get(&cur2);
8146
8147 if (!fmt || !_IS_LINE_SEPARATOR(fmt->format))
8148 {
8149 dir_cur = &cur2;
8150#ifdef BIDI_SUPPORT
8151 before_char = EINA_FALSE;
8152#endif
8153 }
8154#ifdef BIDI_SUPPORT
8155 else
8156 {
8157 before_char = EINA_TRUE;
8158 }
8159#endif
8160 ret = evas_textblock_cursor_pen_geometry_get(
8161 dir_cur, &x, &y, &w, &h);
8162#ifdef BIDI_SUPPORT
8163 /* Adjust if the char is an rtl char */
8164 if (ret >= 0)
8165 {
8166 Eina_Bool is_rtl = EINA_FALSE;
8167 if (dir_cur->node->par->is_bidi)
8168 {
8169 Evas_Object_Textblock_Line *ln;
8170 Evas_Object_Textblock_Item *it;
8171 _find_layout_item_match(dir_cur, &ln, &it);
8172 if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
8173 (_ITEM_TEXT(it)->text_props.bidi.dir ==
8174 EVAS_BIDI_DIRECTION_RTL))
8175 is_rtl = EINA_TRUE;
8176 else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
8177 (_ITEM_FORMAT(it)->bidi_dir ==
8178 EVAS_BIDI_DIRECTION_RTL))
8179 is_rtl = EINA_TRUE;
8180 }
8181
8182 if ((!before_char && is_rtl) ||
8183 (before_char && !is_rtl))
8184 {
8185 /* Just don't advance the width */
8186 w = 0;
8187 }
8188 }
8189#endif
8190 }
8191 else if (cur->pos == 0)
8192 {
8193 ret = evas_textblock_cursor_pen_geometry_get(
8194 dir_cur, &x, &y, &w, &h);
8195#ifdef BIDI_SUPPORT
8196 Eina_Bool is_rtl = EINA_FALSE;
8197 if (dir_cur->node && dir_cur->node->par->is_bidi)
8198 {
8199 Evas_Object_Textblock_Line *ln;
8200 Evas_Object_Textblock_Item *it;
8201 _find_layout_item_match(dir_cur, &ln, &it);
8202 if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
8203 (_ITEM_TEXT(it)->text_props.bidi.dir ==
8204 EVAS_BIDI_DIRECTION_RTL))
8205 is_rtl = EINA_TRUE;
8206 else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
8207 (_ITEM_FORMAT(it)->bidi_dir ==
8208 EVAS_BIDI_DIRECTION_RTL))
8209 is_rtl = EINA_TRUE;
8210 }
8211
8212 /* Adjust if the char is an rtl char */
8213 if ((ret >= 0) && (!is_rtl))
8214 {
8215 /* Just don't advance the width */
8216 w = 0;
8217 }
8218#endif
8219 }
8220 else
8221 {
8222 ret = evas_textblock_cursor_pen_geometry_get(
8223 dir_cur, &x, &y, &w, &h);
8224 }
8225 if (ret >= 0)
8226 {
8227 if (cx) *cx = x + w;
8228 if (cy) *cy = y;
8229 if (cw) *cw = 0;
8230 if (ch) *ch = h;
8231 }
8232 }
8233
8234 if (dir && dir_cur && dir_cur->node)
8235 {
8236#ifdef BIDI_SUPPORT
8237 Eina_Bool is_rtl = EINA_FALSE;
8238 if (dir_cur->node->par->is_bidi)
8239 {
8240 Evas_Object_Textblock_Line *ln;
8241 Evas_Object_Textblock_Item *it;
8242 _find_layout_item_match(dir_cur, &ln, &it);
8243 if ((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
8244 (_ITEM_TEXT(it)->text_props.bidi.dir ==
8245 EVAS_BIDI_DIRECTION_RTL))
8246 is_rtl = EINA_TRUE;
8247 else if ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
8248 (_ITEM_FORMAT(it)->bidi_dir ==
8249 EVAS_BIDI_DIRECTION_RTL))
8250 is_rtl = EINA_TRUE;
8251 }
8252
8253 if (_evas_textblock_cursor_is_at_the_end(dir_cur) && (dir_cur->pos > 0))
8254 {
8255 *dir = (is_rtl) ?
8256 EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
8257 }
8258 else if (dir_cur->pos > 0)
8259 {
8260 *dir = (is_rtl) ?
8261 EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
8262 }
8263 else
8264#endif
8265 {
8266 *dir = EVAS_BIDI_DIRECTION_LTR;
8267 }
8268 }
8269 return ret;
8270}
8271
8272/**
8273 * @internal
8274 * Returns the geometry/pen position (depending on query_func) of the char
8275 * at pos.
8276 *
8277 * @param cur the position of the char.
8278 * @param query_func the query function to use.
8279 * @param cx the x of the char (or pen_x in the case of pen position).
8280 * @param cy the y of the char.
8281 * @param cw the w of the char (or advance in the case pen position).
8282 * @param ch the h of the char.
8283 * @return line number of the char on success, -1 on error.
8284 */
8285static int
8286_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)
8287{
8288 Evas_Object_Textblock *o;
8289 Evas_Object_Textblock_Line *ln = NULL;
8290 Evas_Object_Textblock_Item *it = NULL;
8291 Evas_Object_Textblock_Text_Item *ti = NULL;
8292 Evas_Object_Textblock_Format_Item *fi = NULL;
8293 int x = 0, y = 0, w = 0, h = 0;
8294 int pos;
8295 Eina_Bool previous_format;
8296
8297 if (!cur) return -1;
8298 o = (Evas_Object_Textblock *)(cur->obj->object_data);
8299 if (!o->formatted.valid) _relayout(cur->obj);
8300
8301 if (!cur->node)
8302 {
8303 if (!o->text_nodes)
8304 {
8305 if (!o->paragraphs) return -1;
8306 ln = o->paragraphs->lines;
8307 if (!ln) return -1;
8308 if (cx) *cx = ln->x;
8309 if (cy) *cy = ln->par->y + ln->y;
8310 if (cw) *cw = ln->w;
8311 if (ch) *ch = ln->h;
8312 return ln->par->line_no + ln->line_no;
8313 }
8314 else
8315 return -1;
8316 }
8317
8318 previous_format = _find_layout_item_match(cur, &ln, &it);
8319 if (!it)
8320 {
8321 return -1;
8322 }
8323 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
8324 {
8325 ti = _ITEM_TEXT(it);
8326 }
8327 else
8328 {
8329 fi = _ITEM_FORMAT(it);
8330 }
8331
8332 if (ln && ti)
8333 {
8334 pos = cur->pos - ti->parent.text_pos;
8335
8336 if (pos < 0) pos = 0;
8337 if (ti->parent.format->font.font)
8338 {
8339 query_func(cur->ENDT,
8340 ti->parent.format->font.font,
8341 &ti->text_props,
8342 pos,
8343 &x, &y, &w, &h);
8344 }
8345
8346 x += ln->x + _ITEM(ti)->x;
8347
8348 if (x < ln->x)
8349 {
8350 x = ln->x;
8351 }
8352 y = ln->par->y + ln->y;
8353 h = ln->h;
8354 }
8355 else if (ln && fi)
8356 {
8357 if (previous_format)
8358 {
8359 if (_IS_LINE_SEPARATOR(fi->item))
8360 {
8361 x = 0;
8362 y = ln->par->y + ln->y + ln->h;
8363 }
8364 else
8365 {
8366#ifdef BIDI_SUPPORT
8367 if (ln->par->direction == EVAS_BIDI_DIRECTION_RTL)
8368 {
8369 x = ln->x;
8370 }
8371 else
8372#endif
8373 {
8374 x = ln->x + ln->w;
8375 }
8376 y = ln->par->y + ln->y;
8377 }
8378 w = 0;
8379 h = ln->h;
8380 }
8381 else
8382 {
8383 x = ln->x + _ITEM(fi)->x;
8384 y = ln->par->y + ln->y;
8385 w = _ITEM(fi)->w;
8386 h = ln->h;
8387 }
8388 }
8389 else
8390 {
8391 return -1;
8392 }
8393 if (cx) *cx = x;
8394 if (cy) *cy = y;
8395 if (cw) *cw = w;
8396 if (ch) *ch = h;
8397 return ln->par->line_no + ln->line_no;
8398}
8399
8400EAPI int
8401evas_textblock_cursor_char_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
8402{
8403 return _evas_textblock_cursor_char_pen_geometry_common_get(
8404 cur->ENFN->font_char_coords_get, cur, cx, cy, cw, ch);
8405}
8406
8407EAPI int
8408evas_textblock_cursor_pen_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
8409{
8410 return _evas_textblock_cursor_char_pen_geometry_common_get(
8411 cur->ENFN->font_pen_coords_get, cur, cx, cy, cw, ch);
8412}
8413
8414EAPI int
8415evas_textblock_cursor_line_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
8416{
8417 Evas_Object_Textblock *o;
8418 Evas_Object_Textblock_Line *ln = NULL;
8419 Evas_Object_Textblock_Item *it = NULL;
8420 int x, y, w, h;
8421
8422 if (!cur) return -1;
8423 o = (Evas_Object_Textblock *)(cur->obj->object_data);
8424 if (!o->formatted.valid) _relayout(cur->obj);
8425 if (!cur->node)
8426 {
8427 ln = o->paragraphs->lines;
8428 }
8429 else
8430 {
8431 _find_layout_item_match(cur, &ln, &it);
8432 }
8433 if (!ln) return -1;
8434 x = ln->x;
8435 y = ln->par->y + ln->y;
8436 w = ln->w;
8437 h = ln->h;
8438 if (cx) *cx = x;
8439 if (cy) *cy = y;
8440 if (cw) *cw = w;
8441 if (ch) *ch = h;
8442 return ln->par->line_no + ln->line_no;
8443}
8444
8445EAPI Eina_Bool
8446evas_textblock_cursor_visible_range_get(Evas_Textblock_Cursor *start, Evas_Textblock_Cursor *end)
8447{
8448 Evas *e;
8449 Evas_Coord cy, ch;
8450 Evas_Object *obj = start->obj;
8451 TB_HEAD_RETURN(EINA_FALSE);
8452 e = evas_object_evas_get(obj);
8453 cy = 0 - obj->cur.geometry.y;
8454 ch = e->viewport.h;
8455 evas_textblock_cursor_line_coord_set(start, cy);
8456 evas_textblock_cursor_line_coord_set(end, cy + ch);
8457 evas_textblock_cursor_line_char_last(end);
8458
8459 return EINA_TRUE;
8460}
8461
8462EAPI Eina_Bool
8463evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, Evas_Coord y)
8464{
8465 Evas_Object_Textblock *o;
8466 Evas_Object_Textblock_Paragraph *found_par;
8467 Evas_Object_Textblock_Line *ln;
8468 Evas_Object_Textblock_Item *it = NULL;
8469
8470 if (!cur) return EINA_FALSE;
8471 o = (Evas_Object_Textblock *)(cur->obj->object_data);
8472 if (!o->formatted.valid) _relayout(cur->obj);
8473 x += o->style_pad.l;
8474 y += o->style_pad.t;
8475
8476 found_par = _layout_find_paragraph_by_y(o, y);
8477 if (found_par)
8478 {
8479 _layout_paragraph_render(o, found_par);
8480 EINA_INLIST_FOREACH(found_par->lines, ln)
8481 {
8482 if (ln->par->y + ln->y > y) break;
8483 if ((ln->par->y + ln->y <= y) && ((ln->par->y + ln->y + ln->h) > y))
8484 {
8485 /* If before or after the line, go to start/end according
8486 * to paragraph direction. */
8487 if (x < ln->x)
8488 {
8489 cur->pos = ln->items->text_pos;
8490 cur->node = found_par->text_node;
8491 if (found_par->direction == EVAS_BIDI_DIRECTION_RTL)
8492 {
8493 evas_textblock_cursor_line_char_last(cur);
8494 }
8495 else
8496 {
8497 evas_textblock_cursor_line_char_first(cur);
8498 }
8499 return EINA_TRUE;
8500 }
8501 else if (x >= ln->x + ln->w)
8502 {
8503 cur->pos = ln->items->text_pos;
8504 cur->node = found_par->text_node;
8505 if (found_par->direction == EVAS_BIDI_DIRECTION_RTL)
8506 {
8507 evas_textblock_cursor_line_char_first(cur);
8508 }
8509 else
8510 {
8511 evas_textblock_cursor_line_char_last(cur);
8512 }
8513 return EINA_TRUE;
8514 }
8515
8516 EINA_INLIST_FOREACH(ln->items, it)
8517 {
8518 if (((it->x + ln->x) <= x) && (((it->x + ln->x) + it->adv) > x))
8519 {
8520 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
8521 {
8522 int pos;
8523 int cx, cy, cw, ch;
8524 Evas_Object_Textblock_Text_Item *ti;
8525 ti = _ITEM_TEXT(it);
8526
8527 pos = -1;
8528 if (ti->parent.format->font.font)
8529 pos = cur->ENFN->font_char_at_coords_get(
8530 cur->ENDT,
8531 ti->parent.format->font.font,
8532 &ti->text_props,
8533 x - it->x - ln->x, 0,
8534 &cx, &cy, &cw, &ch);
8535 if (pos < 0)
8536 return EINA_FALSE;
8537 cur->pos = pos + it->text_pos;
8538 cur->node = it->text_node;
8539 return EINA_TRUE;
8540 }
8541 else
8542 {
8543 Evas_Object_Textblock_Format_Item *fi;
8544 fi = _ITEM_FORMAT(it);
8545 cur->pos = fi->parent.text_pos;
8546 cur->node = found_par->text_node;
8547 return EINA_TRUE;
8548 }
8549 }
8550 }
8551 }
8552 }
8553 }
8554 else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h))
8555 {
8556 /* If we are after the last paragraph, use the last position in the
8557 * text. */
8558 evas_textblock_cursor_paragraph_last(cur);
8559 return EINA_TRUE;
8560 }
8561 else if (o->paragraphs && (y < o->paragraphs->y))
8562 {
8563 evas_textblock_cursor_paragraph_first(cur);
8564 return EINA_TRUE;
8565 }
8566
8567 return EINA_FALSE;
8568}
8569
8570EAPI int
8571evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord y)
8572{
8573 Evas_Object_Textblock *o;
8574 Evas_Object_Textblock_Paragraph *found_par;
8575 Evas_Object_Textblock_Line *ln;
8576
8577 if (!cur) return -1;
8578 o = (Evas_Object_Textblock *)(cur->obj->object_data);
8579 if (!o->formatted.valid) _relayout(cur->obj);
8580 y += o->style_pad.t;
8581
8582 found_par = _layout_find_paragraph_by_y(o, y);
8583
8584 if (found_par)
8585 {
8586 _layout_paragraph_render(o, found_par);
8587 EINA_INLIST_FOREACH(found_par->lines, ln)
8588 {
8589 if (ln->par->y + ln->y > y) break;
8590 if ((ln->par->y + ln->y <= y) && ((ln->par->y + ln->y + ln->h) > y))
8591 {
8592 evas_textblock_cursor_line_set(cur, ln->par->line_no +
8593 ln->line_no);
8594 return ln->par->line_no + ln->line_no;
8595 }
8596 }
8597 }
8598 else if (o->paragraphs && (y >= o->paragraphs->y + o->formatted.h))
8599 {
8600 int line_no = 0;
8601 /* If we are after the last paragraph, use the last position in the
8602 * text. */
8603 evas_textblock_cursor_paragraph_last(cur);
8604 if (cur->node && cur->node->par)
8605 {
8606 line_no = cur->node->par->line_no;
8607 if (cur->node->par->lines)
8608 {
8609 line_no += ((Evas_Object_Textblock_Line *)
8610 EINA_INLIST_GET(cur->node->par->lines)->last)->line_no;
8611 }
8612 }
8613 return line_no;
8614 }
8615 else if (o->paragraphs && (y < o->paragraphs->y))
8616 {
8617 int line_no = 0;
8618 evas_textblock_cursor_paragraph_first(cur);
8619 if (cur->node && cur->node->par)
8620 {
8621 line_no = cur->node->par->line_no;
8622 }
8623 return line_no;
8624 }
8625 return -1;
8626}
8627
8628/**
8629 * @internal
8630 * Updates x and w according to the text direction, position in text and
8631 * if it's a special case switch
8632 *
8633 * @param ti the text item we are working on
8634 * @param x the current x (we get) and the x we return
8635 * @param w the current w (we get) and the w we return
8636 * @param start if this is the first item or not
8637 * @param switch_items toogles item switching (rtl cases)
8638 */
8639static void
8640_evas_textblock_range_calc_x_w(const Evas_Object_Textblock_Item *it,
8641 Evas_Coord *x, Evas_Coord *w, Eina_Bool start, Eina_Bool switch_items)
8642{
8643 if ((start && !switch_items) || (!start && switch_items))
8644 {
8645#ifdef BIDI_SUPPORT
8646 if (((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
8647 _ITEM_TEXT(it)->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL)
8648 ||
8649 ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
8650 _ITEM_FORMAT(it)->bidi_dir == EVAS_BIDI_DIRECTION_RTL))
8651 {
8652 *w = *x + *w;
8653 *x = 0;
8654 }
8655 else
8656#endif
8657 {
8658 *w = it->adv - *x;
8659 }
8660 }
8661 else
8662 {
8663#ifdef BIDI_SUPPORT
8664 if (((it->type == EVAS_TEXTBLOCK_ITEM_TEXT) &&
8665 _ITEM_TEXT(it)->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL)
8666 ||
8667 ((it->type == EVAS_TEXTBLOCK_ITEM_FORMAT) &&
8668 _ITEM_FORMAT(it)->bidi_dir == EVAS_BIDI_DIRECTION_RTL))
8669 {
8670 *x = *x + *w;
8671 *w = it->adv - *x;
8672 }
8673 else
8674#endif
8675 {
8676 *w = *x;
8677 *x = 0;
8678 }
8679 }
8680
8681}
8682
8683/**
8684 * @internal
8685 * Returns the geometry of the range in line ln. Cur1 is the start cursor,
8686 * cur2 is the end cursor, NULL means from the start or to the end accordingly.
8687 * Assumes that ln is valid, and that at least one of cur1 and cur2 is not NULL.
8688 *
8689 * @param ln the line to work on.
8690 * @param cur1 the start cursor
8691 * @param cur2 the end cursor
8692 * @return Returns the geometry of the range
8693 */
8694static Eina_List *
8695_evas_textblock_cursor_range_in_line_geometry_get(
8696 const Evas_Object_Textblock_Line *ln, const Evas_Textblock_Cursor *cur1,
8697 const Evas_Textblock_Cursor *cur2)
8698{
8699 Evas_Object_Textblock_Item *it;
8700 Evas_Object_Textblock_Item *it1, *it2;
8701 Eina_List *rects = NULL;
8702 Evas_Textblock_Rectangle *tr;
8703 size_t start, end;
8704 Eina_Bool switch_items;
8705 const Evas_Textblock_Cursor *cur;
8706
8707 cur = (cur1) ? cur1 : cur2;
8708
8709 if (!cur) return NULL;
8710
8711 /* Find the first and last items */
8712 it1 = it2 = NULL;
8713 start = end = 0;
8714 EINA_INLIST_FOREACH(ln->items, it)
8715 {
8716 size_t item_len;
8717 item_len = (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ?
8718 _ITEM_TEXT(it)->text_props.text_len
8719 : 1;
8720 if ((!cur1 || (cur1->pos < it->text_pos + item_len)) &&
8721 (!cur2 || (cur2->pos >= it->text_pos)))
8722 {
8723 if (!it1)
8724 {
8725 it1 = it;
8726 start = item_len; /* start stores the first item_len */
8727 }
8728 it2 = it;
8729 end = item_len; /* end stores the last item_len */
8730 }
8731 }
8732
8733 /* If we couldn't find even one item, return */
8734 if (!it1) return NULL;
8735
8736 /* If the first item is logically before or equal the second item
8737 * we have to set start and end differently than in the other case */
8738 if (it1->text_pos <= it2->text_pos)
8739 {
8740 start = (cur1) ? (cur1->pos - it1->text_pos) : 0;
8741 end = (cur2) ? (cur2->pos - it2->text_pos) : end;
8742 switch_items = EINA_FALSE;
8743 }
8744 else
8745 {
8746 start = (cur2) ? (cur2->pos - it1->text_pos) : start;
8747 end = (cur1) ? (cur1->pos - it2->text_pos) : 0;
8748 switch_items = EINA_TRUE;
8749 }
8750
8751 /* IMPORTANT: Don't use cur1/cur2 past this point (because they probably
8752 * don't make sense anymore. That's why there are start and end),
8753 * unless you know what you are doing */
8754
8755 /* Special case when they share the same item and it's a text item */
8756 if ((it1 == it2) && (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT))
8757 {
8758 Evas_Coord x1, w1, x2, w2;
8759 Evas_Coord x, w, y, h;
8760 Evas_Object_Textblock_Text_Item *ti;
8761 int ret = 0;
8762
8763 ti = _ITEM_TEXT(it1);
8764 if (ti->parent.format->font.font)
8765 {
8766 ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
8767 ti->parent.format->font.font,
8768 &ti->text_props,
8769 start,
8770 &x1, &y, &w1, &h);
8771 }
8772 if (!ret)
8773 {
8774 return NULL;
8775 }
8776 ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
8777 ti->parent.format->font.font,
8778 &ti->text_props,
8779 end,
8780 &x2, &y, &w2, &h);
8781 if (!ret)
8782 {
8783 return NULL;
8784 }
8785
8786 /* Make x2 the one on the right */
8787 if (x2 < x1)
8788 {
8789 Evas_Coord tmp;
8790 tmp = x1;
8791 x1 = x2;
8792 x2 = tmp;
8793
8794 tmp = w1;
8795 w1 = w2;
8796 w2 = tmp;
8797 }
8798
8799#ifdef BIDI_SUPPORT
8800 if (ti->text_props.bidi.dir == EVAS_BIDI_DIRECTION_RTL)
8801 {
8802 x = x1 + w1;
8803 w = x2 + w2 - x;
8804 }
8805 else
8806#endif
8807 {
8808 x = x1;
8809 w = x2 - x1;
8810 }
8811 if (w > 0)
8812 {
8813 tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
8814 rects = eina_list_append(rects, tr);
8815 tr->x = ln->x + it1->x + x;
8816 tr->y = ln->par->y + ln->y;
8817 tr->h = ln->h;
8818 tr->w = w;
8819 }
8820 }
8821 else if (it1 != it2)
8822 {
8823 /* Get the middle items */
8824 Evas_Coord min_x, max_x;
8825 Evas_Coord x, w;
8826 it = _ITEM(EINA_INLIST_GET(it1)->next);
8827 min_x = max_x = it->x;
8828
8829 if (it1->type == EVAS_TEXTBLOCK_ITEM_TEXT)
8830 {
8831 Evas_Coord y, h;
8832 Evas_Object_Textblock_Text_Item *ti;
8833 int ret;
8834 ti = _ITEM_TEXT(it1);
8835
8836 ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
8837 ti->parent.format->font.font,
8838 &ti->text_props,
8839 start,
8840 &x, &y, &w, &h);
8841 if (!ret)
8842 {
8843 /* BUG! Skip the first item */
8844 x = w = 0;
8845 }
8846 else
8847 {
8848 _evas_textblock_range_calc_x_w(it1, &x, &w, EINA_TRUE,
8849 switch_items);
8850 }
8851 }
8852 else
8853 {
8854 x = 0;
8855 w = it1->w;
8856 _evas_textblock_range_calc_x_w(it1, &x, &w, EINA_TRUE,
8857 switch_items);
8858 }
8859 if (w > 0)
8860 {
8861 tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
8862 rects = eina_list_append(rects, tr);
8863 tr->x = ln->x + it1->x + x;
8864 tr->y = ln->par->y + ln->y;
8865 tr->h = ln->h;
8866 tr->w = w;
8867 }
8868
8869 while (it && (it != it2))
8870 {
8871 max_x = it->x + it->adv;
8872 it = (Evas_Object_Textblock_Item *) EINA_INLIST_GET(it)->next;
8873 }
8874 if (min_x != max_x)
8875 {
8876 tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
8877 rects = eina_list_append(rects, tr);
8878 tr->x = ln->x + min_x;
8879 tr->y = ln->par->y + ln->y;
8880 tr->h = ln->h;
8881 tr->w = max_x - min_x;
8882 }
8883 if (it2->type == EVAS_TEXTBLOCK_ITEM_TEXT)
8884 {
8885 Evas_Coord y, h;
8886 Evas_Object_Textblock_Text_Item *ti;
8887 int ret;
8888 ti = _ITEM_TEXT(it2);
8889
8890 ret = cur->ENFN->font_pen_coords_get(cur->ENDT,
8891 ti->parent.format->font.font,
8892 &ti->text_props,
8893 end,
8894 &x, &y, &w, &h);
8895 if (!ret)
8896 {
8897 /* BUG! skip the last item */
8898 x = w = 0;
8899 }
8900 else
8901 {
8902 _evas_textblock_range_calc_x_w(it2, &x, &w, EINA_FALSE,
8903 switch_items);
8904 }
8905 }
8906 else
8907 {
8908 x = 0;
8909 w = it2->w;
8910 _evas_textblock_range_calc_x_w(it2, &x, &w, EINA_FALSE,
8911 switch_items);
8912 }
8913 if (w > 0)
8914 {
8915 tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
8916 rects = eina_list_append(rects, tr);
8917 tr->x = ln->x + it2->x + x;
8918 tr->y = ln->par->y + ln->y;
8919 tr->h = ln->h;
8920 tr->w = w;
8921 }
8922 }
8923 return rects;
8924}
8925
8926EAPI Eina_List *
8927evas_textblock_cursor_range_geometry_get(const Evas_Textblock_Cursor *cur1, const Evas_Textblock_Cursor *cur2)
8928{
8929 Evas_Object_Textblock *o;
8930 Evas_Object_Textblock_Line *ln1, *ln2;
8931 Evas_Object_Textblock_Item *it1, *it2;
8932 Eina_List *rects = NULL;
8933 Evas_Textblock_Rectangle *tr;
8934
8935 if (!cur1 || !cur1->node) return NULL;
8936 if (!cur2 || !cur2->node) return NULL;
8937 if (cur1->obj != cur2->obj) return NULL;
8938 o = (Evas_Object_Textblock *)(cur1->obj->object_data);
8939 if (!o->formatted.valid) _relayout(cur1->obj);
8940 if (evas_textblock_cursor_compare(cur1, cur2) > 0)
8941 {
8942 const Evas_Textblock_Cursor *tc;
8943
8944 tc = cur1;
8945 cur1 = cur2;
8946 cur2 = tc;
8947 }
8948
8949 ln1 = ln2 = NULL;
8950 it1 = it2 = NULL;
8951 _find_layout_item_match(cur1, &ln1, &it1);
8952 if (!ln1 || !it1) return NULL;
8953 _find_layout_item_match(cur2, &ln2, &it2);
8954 if (!ln2 || !it2) return NULL;
8955
8956 if (ln1 == ln2)
8957 {
8958 rects = _evas_textblock_cursor_range_in_line_geometry_get(ln1,
8959 cur1, cur2);
8960 }
8961 else
8962 {
8963 Evas_Object_Textblock_Line *plni, *lni;
8964 Eina_List *rects2 = NULL;
8965 /* Handle the first line */
8966 rects = _evas_textblock_cursor_range_in_line_geometry_get(ln1,
8967 cur1, NULL);
8968
8969 /* Handle the lines between the first and the last line */
8970 lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(ln1)->next;
8971 if (!lni && (ln1->par != ln2->par))
8972 {
8973 lni = ((Evas_Object_Textblock_Paragraph *)
8974 EINA_INLIST_GET(ln1->par)->next)->lines;
8975 }
8976 while (lni && (lni != ln2))
8977 {
8978 tr = calloc(1, sizeof(Evas_Textblock_Rectangle));
8979 rects = eina_list_append(rects, tr);
8980 tr->x = lni->x;
8981 tr->y = lni->par->y + lni->y;
8982 tr->h = lni->h;
8983 tr->w = lni->w;
8984 plni = lni;
8985 lni = (Evas_Object_Textblock_Line *) EINA_INLIST_GET(lni)->next;
8986 if (!lni && (plni->par != ln2->par))
8987 {
8988 lni = ((Evas_Object_Textblock_Paragraph *)
8989 EINA_INLIST_GET(plni->par)->next)->lines;
8990 }
8991 }
8992 rects2 = _evas_textblock_cursor_range_in_line_geometry_get(ln2,
8993 NULL, cur2);
8994 rects = eina_list_merge(rects, rects2);
8995 }
8996 return rects;
8997}
8998
8999EAPI Eina_Bool
9000evas_textblock_cursor_format_item_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
9001{
9002 Evas_Object_Textblock *o;
9003 Evas_Object_Textblock_Line *ln = NULL;
9004 Evas_Object_Textblock_Format_Item *fi;
9005 Evas_Object_Textblock_Item *it = NULL;
9006 Evas_Coord x, y, w, h;
9007
9008 if (!cur || !evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE;
9009 o = (Evas_Object_Textblock *)(cur->obj->object_data);
9010 if (!o->formatted.valid) _relayout(cur->obj);
9011 if (!evas_textblock_cursor_format_is_visible_get(cur)) return EINA_FALSE;
9012 _find_layout_item_line_match(cur->obj, cur->node, cur->pos, &ln, &it);
9013 fi = _ITEM_FORMAT(it);
9014 if ((!ln) || (!fi)) return EINA_FALSE;
9015 x = ln->x + fi->parent.x;
9016 y = ln->par->y + ln->y + ln->baseline + fi->y;
9017 w = fi->parent.w;
9018 h = fi->parent.h;
9019 if (cx) *cx = x;
9020 if (cy) *cy = y;
9021 if (cw) *cw = w;
9022 if (ch) *ch = h;
9023 return EINA_TRUE;
9024}
9025
9026EAPI Eina_Bool
9027evas_textblock_cursor_eol_get(const Evas_Textblock_Cursor *cur)
9028{
9029 Eina_Bool ret = EINA_FALSE;
9030 Evas_Textblock_Cursor cur2;
9031 if (!cur) return EINA_FALSE;
9032
9033 cur2.obj = cur->obj;
9034 evas_textblock_cursor_copy(cur, &cur2);
9035 evas_textblock_cursor_line_char_last(&cur2);
9036 if (cur2.pos == cur->pos)
9037 {
9038 ret = EINA_TRUE;
9039 }
9040 return ret;
9041}
9042
9043/* general controls */
9044EAPI Eina_Bool
9045evas_object_textblock_line_number_geometry_get(const Evas_Object *obj, int line, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch)
9046{
9047 Evas_Object_Textblock_Line *ln;
9048
9049 TB_HEAD_RETURN(0);
9050 ln = _find_layout_line_num(obj, line);
9051 if (!ln) return EINA_FALSE;
9052 if (cx) *cx = ln->x;
9053 if (cy) *cy = ln->par->y + ln->y;
9054 if (cw) *cw = ln->w;
9055 if (ch) *ch = ln->h;
9056 return EINA_TRUE;
9057}
9058
9059EAPI void
9060evas_object_textblock_clear(Evas_Object *obj)
9061{
9062 Eina_List *l;
9063 Evas_Textblock_Cursor *cur;
9064
9065 TB_HEAD();
9066 if (o->paragraphs)
9067 {
9068 _paragraphs_free(obj, o->paragraphs);
9069 o->paragraphs = NULL;
9070 }
9071
9072 _nodes_clear(obj);
9073 o->cursor->node = NULL;
9074 o->cursor->pos = 0;
9075 EINA_LIST_FOREACH(o->cursors, l, cur)
9076 {
9077 cur->node = NULL;
9078 cur->pos = 0;
9079
9080 }
9081 _evas_textblock_changed(o, obj);
9082}
9083
9084EAPI void
9085evas_object_textblock_size_formatted_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
9086{
9087 TB_HEAD();
9088 if (!o->formatted.valid) _relayout(obj);
9089 if (w) *w = o->formatted.w;
9090 if (h) *h = o->formatted.h;
9091}
9092
9093static void
9094_size_native_calc_line_finalize(const Evas_Object *obj, Eina_List *items,
9095 Evas_Coord *ascent, Evas_Coord *descent, Evas_Coord *w)
9096{
9097 Evas_Object_Textblock_Item *it;
9098 Eina_List *i;
9099
9100 it = eina_list_data_get(items);
9101 *w = 0;
9102
9103 if (it)
9104 {
9105 /* If there are no text items yet, calc ascent/descent
9106 * according to the current format. */
9107 if (*ascent + *descent == 0)
9108 _layout_format_ascent_descent_adjust(obj, ascent, descent,
9109 it->format);
9110
9111 /* Add margins. */
9112 if (it->format)
9113 *w = it->format->margin.l + it->format->margin.r;
9114 }
9115
9116
9117 /* Adjust all the item sizes according to the final line size,
9118 * and update the x positions of all the items of the line. */
9119 EINA_LIST_FOREACH(items, i, it)
9120 {
9121 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
9122 {
9123 Evas_Coord fw, fh, fy;
9124
9125 Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
9126 if (!fi->formatme) goto loop_advance;
9127 _layout_calculate_format_item_size(obj, fi, ascent,
9128 descent, &fy, &fw, &fh);
9129 }
9130
9131loop_advance:
9132 *w += it->adv;
9133 }
9134}
9135
9136/* FIXME: doc */
9137static void
9138_size_native_calc_paragraph_size(const Evas_Object *obj,
9139 const Evas_Object_Textblock *o,
9140 const Evas_Object_Textblock_Paragraph *par,
9141 Evas_Coord *_w, Evas_Coord *_h)
9142{
9143 Eina_List *i;
9144 Evas_Object_Textblock_Item *it;
9145 Eina_List *line_items = NULL;
9146 Evas_Coord w = 0, y = 0, wmax = 0, h = 0, ascent = 0, descent = 0;
9147
9148 EINA_LIST_FOREACH(par->logical_items, i, it)
9149 {
9150 line_items = eina_list_append(line_items, it);
9151 if (it->type == EVAS_TEXTBLOCK_ITEM_FORMAT)
9152 {
9153 Evas_Object_Textblock_Format_Item *fi = _ITEM_FORMAT(it);
9154 if (fi->item && (_IS_LINE_SEPARATOR(fi->item) ||
9155 _IS_PARAGRAPH_SEPARATOR(o, fi->item)))
9156 {
9157 _size_native_calc_line_finalize(obj, line_items, &ascent,
9158 &descent, &w);
9159
9160 if (ascent + descent > h)
9161 h = ascent + descent;
9162
9163 y += h;
9164 if (w > wmax)
9165 wmax = w;
9166 h = 0;
9167 ascent = descent = 0;
9168 line_items = eina_list_free(line_items);
9169 }
9170 else
9171 {
9172 Evas_Coord fw, fh, fy;
9173 /* If there are no text items yet, calc ascent/descent
9174 * according to the current format. */
9175 if (it && (ascent + descent == 0))
9176 _layout_format_ascent_descent_adjust(obj, &ascent,
9177 &descent, it->format);
9178
9179 _layout_calculate_format_item_size(obj, fi, &ascent,
9180 &descent, &fy, &fw, &fh);
9181 }
9182 }
9183 else
9184 {
9185 _layout_format_ascent_descent_adjust(obj, &ascent,
9186 &descent, it->format);
9187 }
9188 }
9189
9190 _size_native_calc_line_finalize(obj, line_items, &ascent, &descent, &w);
9191
9192 line_items = eina_list_free(line_items);
9193
9194 /* Do the last addition */
9195 if (ascent + descent > h)
9196 h = ascent + descent;
9197
9198 if (w > wmax)
9199 wmax = w;
9200
9201 *_h = y + h;
9202 *_w = wmax;
9203}
9204
9205EAPI void
9206evas_object_textblock_size_native_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
9207{
9208 TB_HEAD();
9209 if (!o->native.valid)
9210 {
9211 Evas_Coord wmax = 0, hmax = 0;
9212 Evas_Object_Textblock_Paragraph *par;
9213 /* We just want the layout objects to update, should probably
9214 * split that. */
9215 if (!o->formatted.valid) _relayout(obj);
9216 EINA_INLIST_FOREACH(o->paragraphs, par)
9217 {
9218 Evas_Coord tw, th;
9219 _size_native_calc_paragraph_size(obj, o, par, &tw, &th);
9220 if (tw > wmax)
9221 wmax = tw;
9222 hmax += th;
9223 }
9224
9225 o->native.w = wmax;
9226 o->native.h = hmax;
9227
9228 o->native.valid = 1;
9229 o->content_changed = 0;
9230 o->format_changed = EINA_FALSE;
9231 }
9232 if (w) *w = o->native.w;
9233 if (h) *h = o->native.h;
9234}
9235
9236EAPI void
9237evas_object_textblock_style_insets_get(const Evas_Object *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
9238{
9239 TB_HEAD();
9240 if (!o->formatted.valid) _relayout(obj);
9241 if (l) *l = o->style_pad.l;
9242 if (r) *r = o->style_pad.r;
9243 if (t) *t = o->style_pad.t;
9244 if (b) *b = o->style_pad.b;
9245}
9246
9247/** @internal
9248 * FIXME: DELETE ME! DELETE ME!
9249 * This is an ugly workaround to get around the fact that
9250 * evas_object_textblock_coords_recalc isn't really called when it's supposed
9251 * to. When that bug is fixed please remove this. */
9252static void
9253_workaround_object_coords_recalc(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
9254{
9255 evas_object_textblock_coords_recalc(obj);
9256}
9257
9258/* all nice and private */
9259static void
9260evas_object_textblock_init(Evas_Object *obj)
9261{
9262 Evas_Object_Textblock *o;
9263#ifdef HAVE_LINEBREAK
9264 static Eina_Bool linebreak_init = EINA_FALSE;
9265 if (!linebreak_init)
9266 {
9267 linebreak_init = EINA_TRUE;
9268 init_linebreak();
9269 init_wordbreak();
9270 }
9271#endif
9272
9273 /* alloc image ob, setup methods and default values */
9274 obj->object_data = evas_object_textblock_new();
9275 /* set up default settings for this kind of object */
9276 obj->cur.color.r = 255;
9277 obj->cur.color.g = 255;
9278 obj->cur.color.b = 255;
9279 obj->cur.color.a = 255;
9280 obj->cur.geometry.x = 0.0;
9281 obj->cur.geometry.y = 0.0;
9282 obj->cur.geometry.w = 0.0;
9283 obj->cur.geometry.h = 0.0;
9284 obj->cur.layer = 0;
9285 /* set up object-specific settings */
9286 obj->prev = obj->cur;
9287 /* set up methods (compulsory) */
9288 obj->func = &object_func;
9289 obj->type = o_type;
9290
9291 o = (Evas_Object_Textblock *)(obj->object_data);
9292 o->cursor->obj = obj;
9293 o->legacy_newline = EINA_TRUE;
9294 evas_object_event_callback_priority_add(obj, EVAS_CALLBACK_RESIZE, -1000,
9295 _workaround_object_coords_recalc, NULL);
9296}
9297
9298static void *
9299evas_object_textblock_new(void)
9300{
9301 Evas_Object_Textblock *o;
9302
9303 /* alloc obj private data */
9304 EVAS_MEMPOOL_INIT(_mp_obj, "evas_object_textblock", Evas_Object_Textblock, 64, NULL);
9305 o = EVAS_MEMPOOL_ALLOC(_mp_obj, Evas_Object_Textblock);
9306 if (!o) return NULL;
9307 EVAS_MEMPOOL_PREP(_mp_obj, o, Evas_Object_Textblock);
9308 o->magic = MAGIC_OBJ_TEXTBLOCK;
9309 o->cursor = calloc(1, sizeof(Evas_Textblock_Cursor));
9310 _format_command_init();
9311 return o;
9312}
9313
9314static void
9315evas_object_textblock_free(Evas_Object *obj)
9316{
9317 Evas_Object_Textblock *o;
9318
9319 evas_object_textblock_clear(obj);
9320 evas_object_textblock_style_set(obj, NULL);
9321 while (evas_object_textblock_style_user_peek(obj))
9322 {
9323 evas_object_textblock_style_user_pop(obj);
9324 }
9325 o = (Evas_Object_Textblock *)(obj->object_data);
9326 free(o->cursor);
9327 while (o->cursors)
9328 {
9329 Evas_Textblock_Cursor *cur;
9330
9331 cur = (Evas_Textblock_Cursor *)o->cursors->data;
9332 o->cursors = eina_list_remove_list(o->cursors, o->cursors);
9333 free(cur);
9334 }
9335 if (o->repch) eina_stringshare_del(o->repch);
9336 if (o->ellip_ti) _item_free(obj, NULL, _ITEM(o->ellip_ti));
9337 o->magic = 0;
9338 EVAS_MEMPOOL_FREE(_mp_obj, o);
9339 _format_command_shutdown();
9340}
9341
9342
9343static void
9344evas_object_textblock_render(Evas_Object *obj, void *output, void *context, void *surface, int x, int y)
9345{
9346 Evas_Object_Textblock_Paragraph *par, *start = NULL;
9347 Evas_Object_Textblock_Line *ln;
9348 Evas_Object_Textblock *o;
9349 int i, j;
9350 int cx, cy, cw, ch, clip;
9351 const char vals[5][5] =
9352 {
9353 {0, 1, 2, 1, 0},
9354 {1, 3, 4, 3, 1},
9355 {2, 4, 5, 4, 2},
9356 {1, 3, 4, 3, 1},
9357 {0, 1, 2, 1, 0}
9358 };
9359
9360 /* render object to surface with context, and offxet by x,y */
9361 o = (Evas_Object_Textblock *)(obj->object_data);
9362 obj->layer->evas->engine.func->context_multiplier_unset(output,
9363 context);
9364 /* FIXME: This clipping is just until we fix inset handling correctly. */
9365 ENFN->context_clip_clip(output, context,
9366 obj->cur.geometry.x + x,
9367 obj->cur.geometry.y + y,
9368 obj->cur.geometry.w,
9369 obj->cur.geometry.h);
9370 clip = ENFN->context_clip_get(output, context, &cx, &cy, &cw, &ch);
9371 /* If there are no paragraphs and thus there are no lines,
9372 * there's nothing left to do. */
9373 if (!o->paragraphs) return;
9374
9375#define ITEM_WALK() \
9376 EINA_INLIST_FOREACH(start, par) \
9377 { \
9378 if (!par->visible) continue; \
9379 if (clip) \
9380 { \
9381 if ((obj->cur.geometry.y + y + par->y + par->h) < (cy - 20)) \
9382 continue; \
9383 if ((obj->cur.geometry.y + y + par->y) > (cy + ch + 20)) \
9384 break; \
9385 } \
9386 _layout_paragraph_render(o, par); \
9387 EINA_INLIST_FOREACH(par->lines, ln) \
9388 { \
9389 Evas_Object_Textblock_Item *itr; \
9390 \
9391 if (clip) \
9392 { \
9393 if ((obj->cur.geometry.y + y + par->y + ln->y + ln->h) < (cy - 20)) \
9394 continue; \
9395 if ((obj->cur.geometry.y + y + par->y + ln->y) > (cy + ch + 20)) \
9396 break; \
9397 } \
9398 EINA_INLIST_FOREACH(ln->items, itr) \
9399 { \
9400 Evas_Coord yoff; \
9401 yoff = ln->baseline; \
9402 if (itr->format->valign != -1.0) \
9403 { \
9404 yoff += itr->format->valign * (ln->h - itr->h); \
9405 } \
9406 if (clip) \
9407 { \
9408 if ((obj->cur.geometry.x + x + ln->x + itr->x + itr->w) < (cx - 20)) \
9409 continue; \
9410 if ((obj->cur.geometry.x + x + ln->x + itr->x) > (cx + cw + 20)) \
9411 break; \
9412 } \
9413 if ((ln->x + itr->x + itr->w) <= 0) continue; \
9414 if (ln->x + itr->x > obj->cur.geometry.w) break; \
9415 do
9416
9417#define ITEM_WALK_END() \
9418 while (0); \
9419 } \
9420 } \
9421 } \
9422 do {} while(0)
9423#define COLOR_SET(col) \
9424 ENFN->context_color_set(output, context, \
9425 (obj->cur.cache.clip.r * ti->parent.format->color.col.r) / 255, \
9426 (obj->cur.cache.clip.g * ti->parent.format->color.col.g) / 255, \
9427 (obj->cur.cache.clip.b * ti->parent.format->color.col.b) / 255, \
9428 (obj->cur.cache.clip.a * ti->parent.format->color.col.a) / 255);
9429#define COLOR_SET_AMUL(col, amul) \
9430 ENFN->context_color_set(output, context, \
9431 (obj->cur.cache.clip.r * ti->parent.format->color.col.r * (amul)) / 65025, \
9432 (obj->cur.cache.clip.g * ti->parent.format->color.col.g * (amul)) / 65025, \
9433 (obj->cur.cache.clip.b * ti->parent.format->color.col.b * (amul)) / 65025, \
9434 (obj->cur.cache.clip.a * ti->parent.format->color.col.a * (amul)) / 65025);
9435#define DRAW_TEXT(ox, oy) \
9436 if (ti->parent.format->font.font) ENFN->font_draw(output, context, surface, ti->parent.format->font.font, \
9437 obj->cur.geometry.x + ln->x + ti->parent.x + x + (ox), \
9438 obj->cur.geometry.y + ln->par->y + ln->y + yoff + y + (oy), \
9439 ti->parent.w, ti->parent.h, ti->parent.w, ti->parent.h, \
9440 &ti->text_props);
9441
9442 /* backing */
9443#define DRAW_RECT(ox, oy, ow, oh, or, og, ob, oa) \
9444 do \
9445 { \
9446 ENFN->context_color_set(output, \
9447 context, \
9448 (obj->cur.cache.clip.r * or) / 255, \
9449 (obj->cur.cache.clip.g * og) / 255, \
9450 (obj->cur.cache.clip.b * ob) / 255, \
9451 (obj->cur.cache.clip.a * oa) / 255); \
9452 ENFN->rectangle_draw(output, \
9453 context, \
9454 surface, \
9455 obj->cur.geometry.x + ln->x + x + (ox), \
9456 obj->cur.geometry.y + ln->par->y + ln->y + y + (oy), \
9457 (ow), \
9458 (oh)); \
9459 } \
9460 while (0)
9461
9462#define DRAW_FORMAT_DASHED(oname, oy, oh, dw, dp) \
9463 do \
9464 { \
9465 if (itr->format->oname) \
9466 { \
9467 unsigned char _or, _og, _ob, _oa; \
9468 int _ind, _dx = 0, _dn, _dr; \
9469 _or = itr->format->color.oname.r; \
9470 _og = itr->format->color.oname.g; \
9471 _ob = itr->format->color.oname.b; \
9472 _oa = itr->format->color.oname.a; \
9473 if (!EINA_INLIST_GET(itr)->next) \
9474 { \
9475 _dn = itr->w / (dw + dp); \
9476 _dr = itr->w % (dw + dp); \
9477 } \
9478 else \
9479 { \
9480 _dn = itr->adv / (dw + dp); \
9481 _dr = itr->adv % (dw + dp); \
9482 } \
9483 if (_dr > dw) _dr = dw; \
9484 for (_ind = 0 ; _ind < _dn ; _ind++) \
9485 { \
9486 DRAW_RECT(itr->x + _dx, oy, dw, oh, _or, _og, _ob, _oa); \
9487 _dx += dw + dp; \
9488 } \
9489 DRAW_RECT(itr->x + _dx, oy, _dr, oh, _or, _og, _ob, _oa); \
9490 } \
9491 } \
9492 while (0)
9493
9494#define DRAW_FORMAT(oname, oy, oh) \
9495 do \
9496 { \
9497 if (itr->format->oname) \
9498 { \
9499 unsigned char _or, _og, _ob, _oa; \
9500 _or = itr->format->color.oname.r; \
9501 _og = itr->format->color.oname.g; \
9502 _ob = itr->format->color.oname.b; \
9503 _oa = itr->format->color.oname.a; \
9504 if (!EINA_INLIST_GET(itr)->next) \
9505 { \
9506 DRAW_RECT(itr->x, oy, itr->w, oh, _or, _og, _ob, _oa); \
9507 } \
9508 else \
9509 { \
9510 DRAW_RECT(itr->x, oy, itr->adv, oh, _or, _og, _ob, _oa); \
9511 } \
9512 } \
9513 } \
9514 while (0)
9515
9516 {
9517 Evas_Coord look_for_y = 0 - (obj->cur.geometry.y + y);
9518 if (clip)
9519 {
9520 Evas_Coord tmp_lfy = cy - (obj->cur.geometry.y + y);
9521 if (tmp_lfy > look_for_y)
9522 look_for_y = tmp_lfy;
9523 }
9524
9525 if (look_for_y >= 0)
9526 start = _layout_find_paragraph_by_y(o, look_for_y);
9527
9528 if (!start)
9529 start = o->paragraphs;
9530 }
9531
9532 ITEM_WALK()
9533 {
9534 DRAW_FORMAT(backing, 0, ln->h);
9535 }
9536 ITEM_WALK_END();
9537
9538 /* There are size adjustments that depend on the styles drawn here back
9539 * in "_text_item_update_sizes" should not modify one without the other. */
9540
9541 /* prepare everything for text draw */
9542
9543 /* shadows */
9544 ITEM_WALK()
9545 {
9546 int shad_dst, shad_sz, dx, dy, haveshad;
9547 Evas_Object_Textblock_Text_Item *ti;
9548 ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
9549 if (!ti) continue;
9550
9551 shad_dst = shad_sz = dx = dy = haveshad = 0;
9552 switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_BASIC)
9553 {
9554 case EVAS_TEXT_STYLE_SHADOW:
9555 case EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW:
9556 shad_dst = 1;
9557 haveshad = 1;
9558 break;
9559 case EVAS_TEXT_STYLE_OUTLINE_SHADOW:
9560 case EVAS_TEXT_STYLE_FAR_SHADOW:
9561 shad_dst = 2;
9562 haveshad = 1;
9563 break;
9564 case EVAS_TEXT_STYLE_FAR_SOFT_SHADOW:
9565 shad_dst = 2;
9566 shad_sz = 2;
9567 haveshad = 1;
9568 break;
9569 case EVAS_TEXT_STYLE_SOFT_SHADOW:
9570 shad_dst = 1;
9571 shad_sz = 2;
9572 haveshad = 1;
9573 break;
9574 default:
9575 break;
9576 }
9577 if (haveshad)
9578 {
9579 if (shad_dst > 0)
9580 {
9581 switch (ti->parent.format->style & EVAS_TEXT_STYLE_MASK_SHADOW_DIRECTION)
9582 {
9583 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT:
9584 dx = 1;
9585 dy = 1;
9586 break;
9587 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM:
9588 dx = 0;
9589 dy = 1;
9590 break;
9591 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT:
9592 dx = -1;
9593 dy = 1;
9594 break;
9595 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_LEFT:
9596 dx = -1;
9597 dy = 0;
9598 break;
9599 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_LEFT:
9600 dx = -1;
9601 dy = -1;
9602 break;
9603 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP:
9604 dx = 0;
9605 dy = -1;
9606 break;
9607 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_TOP_RIGHT:
9608 dx = 1;
9609 dy = -1;
9610 break;
9611 case EVAS_TEXT_STYLE_SHADOW_DIRECTION_RIGHT:
9612 dx = 1;
9613 dy = 0;
9614 default:
9615 break;
9616 }
9617 dx *= shad_dst;
9618 dy *= shad_dst;
9619 }
9620 switch (shad_sz)
9621 {
9622 case 0:
9623 COLOR_SET(shadow);
9624 DRAW_TEXT(dx, dy);
9625 break;
9626 case 2:
9627 for (j = 0; j < 5; j++)
9628 {
9629 for (i = 0; i < 5; i++)
9630 {
9631 if (vals[i][j] != 0)
9632 {
9633 COLOR_SET_AMUL(shadow, vals[i][j] * 50);
9634 DRAW_TEXT(i - 2 + dx, j - 2 + dy);
9635 }
9636 }
9637 }
9638 break;
9639 default:
9640 break;
9641 }
9642 }
9643 }
9644 ITEM_WALK_END();
9645
9646 /* glows */
9647 ITEM_WALK()
9648 {
9649 Evas_Object_Textblock_Text_Item *ti;
9650 ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
9651 if (!ti) continue;
9652
9653 if (ti->parent.format->style == EVAS_TEXT_STYLE_GLOW)
9654 {
9655 for (j = 0; j < 5; j++)
9656 {
9657 for (i = 0; i < 5; i++)
9658 {
9659 if (vals[i][j] != 0)
9660 {
9661 COLOR_SET_AMUL(glow, vals[i][j] * 50);
9662 DRAW_TEXT(i - 2, j - 2);
9663 }
9664 }
9665 }
9666 COLOR_SET(glow2);
9667 DRAW_TEXT(-1, 0);
9668 DRAW_TEXT(1, 0);
9669 DRAW_TEXT(0, -1);
9670 DRAW_TEXT(0, 1);
9671 }
9672 }
9673 ITEM_WALK_END();
9674
9675 /* outlines */
9676 ITEM_WALK()
9677 {
9678 Evas_Object_Textblock_Text_Item *ti;
9679 ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
9680 if (!ti) continue;
9681
9682 if ((ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE) ||
9683 (ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SHADOW) ||
9684 (ti->parent.format->style == EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW))
9685 {
9686 COLOR_SET(outline);
9687 DRAW_TEXT(-1, 0);
9688 DRAW_TEXT(1, 0);
9689 DRAW_TEXT(0, -1);
9690 DRAW_TEXT(0, 1);
9691 }
9692 else if (ti->parent.format->style == EVAS_TEXT_STYLE_SOFT_OUTLINE)
9693 {
9694 for (j = 0; j < 5; j++)
9695 {
9696 for (i = 0; i < 5; i++)
9697 {
9698 if (((i != 2) || (j != 2)) && (vals[i][j] != 0))
9699 {
9700 COLOR_SET_AMUL(outline, vals[i][j] * 50);
9701 DRAW_TEXT(i - 2, j - 2);
9702 }
9703 }
9704 }
9705 }
9706 }
9707 ITEM_WALK_END();
9708
9709 /* normal text and lines */
9710 ITEM_WALK()
9711 {
9712 Evas_Object_Textblock_Text_Item *ti;
9713 ti = (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) ? _ITEM_TEXT(itr) : NULL;
9714 /* NORMAL TEXT */
9715 if (ti)
9716 {
9717 COLOR_SET(normal);
9718 DRAW_TEXT(0, 0);
9719 }
9720
9721 /* STRIKETHROUGH */
9722 DRAW_FORMAT(strikethrough, (ln->h / 2), 1);
9723
9724 /* UNDERLINE */
9725 DRAW_FORMAT(underline, ln->baseline + 1, 1);
9726
9727 /* UNDERLINE DASHED */
9728 DRAW_FORMAT_DASHED(underline_dash, ln->baseline + 1, 1,
9729 ti->parent.format->underline_dash_width,
9730 ti->parent.format->underline_dash_gap);
9731
9732 /* UNDERLINE2 */
9733 DRAW_FORMAT(underline2, ln->baseline + 3, 1);
9734 }
9735 ITEM_WALK_END();
9736}
9737
9738static void
9739evas_object_textblock_render_pre(Evas_Object *obj)
9740{
9741 Evas_Object_Textblock *o;
9742 int is_v, was_v;
9743
9744 /* dont pre-render the obj twice! */
9745 if (obj->pre_render_done) return;
9746 obj->pre_render_done = 1;
9747 /* pre-render phase. this does anything an object needs to do just before */
9748 /* rendering. this could mean loading the image data, retrieving it from */
9749 /* elsewhere, decoding video etc. */
9750 /* then when this is done the object needs to figure if it changed and */
9751 /* if so what and where and add the appropriate redraw textblocks */
9752 o = (Evas_Object_Textblock *)(obj->object_data);
9753 if ((o->changed) || (o->content_changed) || (o->format_changed) ||
9754 ((obj->cur.geometry.w != o->last_w) ||
9755 (((o->valign != 0.0) || (o->have_ellipsis)) &&
9756 (obj->cur.geometry.h != o->last_h))))
9757 {
9758 _relayout(obj);
9759 o->redraw = 0;
9760 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
9761 is_v = evas_object_is_visible(obj);
9762 was_v = evas_object_was_visible(obj);
9763 goto done;
9764 }
9765 if (o->redraw)
9766 {
9767 o->redraw = 0;
9768 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
9769 is_v = evas_object_is_visible(obj);
9770 was_v = evas_object_was_visible(obj);
9771 goto done;
9772 }
9773 /* if someone is clipping this obj - go calculate the clipper */
9774 if (obj->cur.clipper)
9775 {
9776 if (obj->cur.cache.clip.dirty)
9777 evas_object_clip_recalc(obj->cur.clipper);
9778 obj->cur.clipper->func->render_pre(obj->cur.clipper);
9779 }
9780 /* now figure what changed and add draw rects */
9781 /* if it just became visible or invisible */
9782 is_v = evas_object_is_visible(obj);
9783 was_v = evas_object_was_visible(obj);
9784 if (is_v != was_v)
9785 {
9786 evas_object_render_pre_visible_change(&obj->layer->evas->clip_changes, obj, is_v, was_v);
9787 goto done;
9788 }
9789 if ((obj->cur.map != obj->prev.map) ||
9790 (obj->cur.usemap != obj->prev.usemap))
9791 {
9792 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
9793 goto done;
9794 }
9795 /* it's not visible - we accounted for it appearing or not so just abort */
9796 if (!is_v) goto done;
9797 /* clipper changed this is in addition to anything else for obj */
9798 evas_object_render_pre_clipper_change(&obj->layer->evas->clip_changes, obj);
9799 /* if we restacked (layer or just within a layer) and don't clip anyone */
9800 if (obj->restack)
9801 {
9802 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
9803 goto done;
9804 }
9805 /* if it changed color */
9806 if ((obj->cur.color.r != obj->prev.color.r) ||
9807 (obj->cur.color.g != obj->prev.color.g) ||
9808 (obj->cur.color.b != obj->prev.color.b) ||
9809 (obj->cur.color.a != obj->prev.color.a))
9810 {
9811 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
9812 goto done;
9813 }
9814 /* if it changed geometry - and obviously not visibility or color */
9815 /* calculate differences since we have a constant color fill */
9816 /* we really only need to update the differences */
9817 if ((obj->cur.geometry.x != obj->prev.geometry.x) ||
9818 (obj->cur.geometry.y != obj->prev.geometry.y) ||
9819 (obj->cur.geometry.w != obj->prev.geometry.w) ||
9820 (obj->cur.geometry.h != obj->prev.geometry.h))
9821 {
9822 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, obj);
9823 goto done;
9824 }
9825 done:
9826 evas_object_render_pre_effect_updates(&obj->layer->evas->clip_changes, obj, is_v, was_v);
9827}
9828
9829static void
9830evas_object_textblock_render_post(Evas_Object *obj)
9831{
9832/* Evas_Object_Textblock *o; */
9833
9834 /* this moves the current data to the previous state parts of the object */
9835 /* in whatever way is safest for the object. also if we don't need object */
9836 /* data anymore we can free it if the object deems this is a good idea */
9837/* o = (Evas_Object_Textblock *)(obj->object_data); */
9838 /* remove those pesky changes */
9839 evas_object_clip_changes_clean(obj);
9840 /* move cur to prev safely for object data */
9841 obj->prev = obj->cur;
9842/* o->prev = o->cur; */
9843/* o->changed = 0; */
9844}
9845
9846static unsigned int evas_object_textblock_id_get(Evas_Object *obj)
9847{
9848 Evas_Object_Textblock *o;
9849
9850 o = (Evas_Object_Textblock *)(obj->object_data);
9851 if (!o) return 0;
9852 return MAGIC_OBJ_TEXTBLOCK;
9853}
9854
9855static unsigned int evas_object_textblock_visual_id_get(Evas_Object *obj)
9856{
9857 Evas_Object_Textblock *o;
9858
9859 o = (Evas_Object_Textblock *)(obj->object_data);
9860 if (!o) return 0;
9861 return MAGIC_OBJ_CUSTOM;
9862}
9863
9864static void *evas_object_textblock_engine_data_get(Evas_Object *obj)
9865{
9866 Evas_Object_Textblock *o;
9867
9868 o = (Evas_Object_Textblock *)(obj->object_data);
9869 if (!o) return NULL;
9870 return o->engine_data;
9871}
9872
9873static int
9874evas_object_textblock_is_opaque(Evas_Object *obj __UNUSED__)
9875{
9876 /* this returns 1 if the internal object data implies that the object is */
9877 /* currently fulyl opque over the entire gradient it occupies */
9878 return 0;
9879}
9880
9881static int
9882evas_object_textblock_was_opaque(Evas_Object *obj __UNUSED__)
9883{
9884 /* this returns 1 if the internal object data implies that the object was */
9885 /* currently fulyl opque over the entire gradient it occupies */
9886 return 0;
9887}
9888
9889static void
9890evas_object_textblock_coords_recalc(Evas_Object *obj)
9891{
9892 Evas_Object_Textblock *o;
9893
9894 o = (Evas_Object_Textblock *)(obj->object_data);
9895 if ((obj->cur.geometry.w != o->last_w) ||
9896 (((o->valign != 0.0) || (o->have_ellipsis)) &&
9897 (obj->cur.geometry.h != o->last_h)))
9898 {
9899 o->formatted.valid = 0;
9900 o->changed = 1;
9901 }
9902}
9903
9904static void
9905evas_object_textblock_scale_update(Evas_Object *obj)
9906{
9907 Evas_Object_Textblock *o;
9908
9909 o = (Evas_Object_Textblock *)(obj->object_data);
9910 _evas_textblock_invalidate_all(o);
9911 _evas_textblock_changed(o, obj);
9912}
9913
9914void
9915_evas_object_textblock_rehint(Evas_Object *obj)
9916{
9917 Evas_Object_Textblock *o;
9918 Evas_Object_Textblock_Paragraph *par;
9919 Evas_Object_Textblock_Line *ln;
9920
9921 o = (Evas_Object_Textblock *)(obj->object_data);
9922 EINA_INLIST_FOREACH(o->paragraphs, par)
9923 {
9924 EINA_INLIST_FOREACH(par->lines, ln)
9925 {
9926 Evas_Object_Textblock_Item *it;
9927
9928 EINA_INLIST_FOREACH(ln->items, it)
9929 {
9930 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
9931 {
9932 Evas_Object_Textblock_Text_Item *ti = _ITEM_TEXT(it);
9933 if (ti->parent.format->font.font)
9934 {
9935#ifdef EVAS_FRAME_QUEUING
9936 evas_common_pipe_op_text_flush((RGBA_Font *) ti->parent.format->font.font);
9937#endif
9938 evas_font_load_hinting_set(obj->layer->evas,
9939 ti->parent.format->font.font,
9940 obj->layer->evas->hinting);
9941 }
9942 }
9943 }
9944 }
9945 }
9946 _evas_textblock_invalidate_all(o);
9947 _evas_textblock_changed(o, obj);
9948}
9949
9950/**
9951 * @}
9952 */
9953
9954#ifdef HAVE_TESTS
9955/* return EINA_FALSE on error, used in unit_testing */
9956EAPI Eina_Bool
9957_evas_textblock_check_item_node_link(Evas_Object *obj)
9958{
9959 Evas_Object_Textblock *o;
9960 Evas_Object_Textblock_Paragraph *par;
9961 Evas_Object_Textblock_Line *ln;
9962 Evas_Object_Textblock_Item *it;
9963
9964 o = (Evas_Object_Textblock *)(obj->object_data);
9965 if (!o) return EINA_FALSE;
9966
9967 if (!o->formatted.valid) _relayout(obj);
9968
9969 EINA_INLIST_FOREACH(o->paragraphs, par)
9970 {
9971 EINA_INLIST_FOREACH(par->lines, ln)
9972 {
9973 EINA_INLIST_FOREACH(ln->items, it)
9974 {
9975 if (it->text_node != par->text_node)
9976 return EINA_FALSE;
9977 }
9978 }
9979 }
9980 return EINA_TRUE;
9981}
9982
9983EAPI int
9984_evas_textblock_format_offset_get(const Evas_Object_Textblock_Node_Format *n)
9985{
9986 return n->offset;
9987}
9988#endif
9989
9990#if 0
9991/* Good for debugging */
9992void
9993pfnode(Evas_Object_Textblock_Node_Format *n)
9994{
9995 printf("Format Node: %p\n", n);
9996 printf("next = %p, prev = %p, last = %p\n", EINA_INLIST_GET(n)->next, EINA_INLIST_GET(n)->prev, EINA_INLIST_GET(n)->last);
9997 printf("text_node = %p, offset = %u, visible = %d\n", n->text_node, n->offset, n->visible);
9998 printf("'%s'\n", eina_strbuf_string_get(n->format));
9999}
10000
10001void
10002ptnode(Evas_Object_Textblock_Node_Text *n)
10003{
10004 printf("Text Node: %p\n", n);
10005 printf("next = %p, prev = %p, last = %p\n", EINA_INLIST_GET(n)->next, EINA_INLIST_GET(n)->prev, EINA_INLIST_GET(n)->last);
10006 printf("format_node = %p\n", n->format_node);
10007 printf("'%ls'\n", eina_ustrbuf_string_get(n->unicode));
10008}
10009
10010void
10011pitem(Evas_Object_Textblock_Item *it)
10012{
10013 Evas_Object_Textblock_Text_Item *ti;
10014 Evas_Object_Textblock_Format_Item *fi;
10015 printf("Item: %p\n", it);
10016 printf("Type: %s (%d)\n", (it->type == EVAS_TEXTBLOCK_ITEM_TEXT) ?
10017 "TEXT" : "FORMAT", it->type);
10018 printf("Text pos: %d Visual pos: %d\n", it->text_pos,
10019#ifdef BIDI_SUPPORT
10020 it->visual_pos
10021#else
10022 it->text_pos
10023#endif
10024 );
10025 printf("Coords: x = %d w = %d adv = %d\n", (int) it->x, (int) it->w,
10026 (int) it->adv);
10027 if (it->type == EVAS_TEXTBLOCK_ITEM_TEXT)
10028 {
10029 ti = _ITEM_TEXT(it);
10030 printf("Text: '%*ls'\n", ti->text_props.text_len, GET_ITEM_TEXT(ti));
10031 }
10032 else
10033 {
10034 fi = _ITEM_FORMAT(it);
10035 printf("Format: '%s'\n", fi->item);
10036 }
10037}
10038
10039void
10040ppar(Evas_Object_Textblock_Paragraph *par)
10041{
10042 Evas_Object_Textblock_Item *it;
10043 Eina_List *i;
10044 EINA_LIST_FOREACH(par->logical_items, i, it)
10045 {
10046 printf("***********************\n");
10047 pitem(it);
10048 }
10049}
10050
10051#endif
10052
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4void
5evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh)
6{
7 if (!RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh))
8 {
9 evas_add_rect(rects, x, y, w, h);
10 evas_add_rect(rects, xx, yy, ww, hh);
11 }
12 else
13 {
14 int pt_x[4], pt_y[4], i, j;
15
16 if (x < xx)
17 {
18 pt_x[0] = x;
19 pt_x[1] = xx;
20 }
21 else
22 {
23 pt_x[0] = xx;
24 pt_x[1] = x;
25 }
26 if ((x + w) < (xx + ww))
27 {
28 pt_x[2] = x + w;
29 pt_x[3] = xx + ww;
30 }
31 else
32 {
33 pt_x[2] = xx + ww;
34 pt_x[3] = x + w;
35 }
36 if (y < yy)
37 {
38 pt_y[0] = y;
39 pt_y[1] = yy;
40 }
41 else
42 {
43 pt_y[0] = yy;
44 pt_y[1] = y;
45 }
46 if ((y + h) < (yy + hh))
47 {
48 pt_y[2] = y + h;
49 pt_y[3] = yy + hh;
50 }
51 else
52 {
53 pt_y[2] = yy + hh;
54 pt_y[3] = y + h;
55 }
56 for (j = 0; j < 3; j++)
57 {
58 for (i = 0; i < 3; i++)
59 {
60 int intsec1, intsec2;
61 int tx, ty, tw, th;
62
63 tx = pt_x[i];
64 ty = pt_y[j];
65 tw = pt_x[i + 1] - pt_x[i];
66 th = pt_y[j + 1] - pt_y[j];
67
68 intsec1 = (RECTS_INTERSECT(tx, ty, tw, th, x, y, w, h));
69 intsec2 = (RECTS_INTERSECT(tx, ty, tw, th, xx, yy, ww, hh));
70 if (intsec1 ^ intsec2)
71 {
72 evas_add_rect(rects, tx, ty, tw, th);
73 }
74 }
75 }
76/* if (tmp.count > 0) */
77/* { */
78/* unsigned int i; */
79
80/* for (i = 0; i < tmp.count; ++i) */
81/* { */
82/* if ((tmp.array[i].w > 0) && (tmp.array[i].h > 0)) */
83/* { */
84/* int intsec1, intsec2; */
85
86/* intsec1 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, x, y, w, h)); */
87/* intsec2 = (RECTS_INTERSECT(tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h, xx, yy, ww, hh)); */
88/* if (intsec1 ^ intsec2) */
89/* { */
90/* evas_add_rect(rects, tmp.array[i].x, tmp.array[i].y, tmp.array[i].w, tmp.array[i].h); */
91/* } */
92/* } */
93/* } */
94/* free(tmp.array); */
95/* } */
96
97 }
98}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3#include <math.h>
4
5// debug rendering
6/* #define REND_DGB 1 */
7/* #define STDOUT_DBG 1 */
8
9#ifdef REND_DGB
10static FILE *dbf = NULL;
11
12static void
13rend_dbg(const char *txt)
14{
15 if (!dbf)
16 {
17#ifdef STDOUT_DBG
18 dbf = stdout;
19#else
20 dbf = fopen("EVAS-RENDER-DEBUG.log", "w");
21#endif
22 if (!dbf) return;
23 }
24 fputs(txt, dbf);
25 fflush(dbf);
26}
27#define RD(args...) \
28 { \
29 char __tmpbuf[4096]; \
30 \
31 snprintf(__tmpbuf, sizeof(__tmpbuf), ##args); \
32 rend_dbg(__tmpbuf); \
33 }
34#define RDI(xxxx) \
35 { \
36 char __tmpbuf[4096]; int __tmpi; \
37 for (__tmpi = 0; __tmpi < xxxx; __tmpi++) \
38 __tmpbuf[__tmpi] = ' '; \
39 __tmpbuf[__tmpi] = 0; \
40 rend_dbg(__tmpbuf); \
41 }
42#else
43#define RD(args...)
44#define RDI(x)
45#endif
46
47static Eina_List *
48evas_render_updates_internal(Evas *e, unsigned char make_updates, unsigned char do_draw);
49
50EAPI void
51evas_damage_rectangle_add(Evas *e, int x, int y, int w, int h)
52{
53 Eina_Rectangle *r;
54
55 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
56 return;
57 MAGIC_CHECK_END();
58 NEW_RECT(r, x, y, w, h);
59 if (!r) return;
60 e->damages = eina_list_append(e->damages, r);
61 e->changed = 1;
62}
63
64EAPI void
65evas_obscured_rectangle_add(Evas *e, int x, int y, int w, int h)
66{
67 Eina_Rectangle *r;
68
69 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
70 return;
71 MAGIC_CHECK_END();
72 NEW_RECT(r, x, y, w, h);
73 if (!r) return;
74 e->obscures = eina_list_append(e->obscures, r);
75}
76
77EAPI void
78evas_obscured_clear(Evas *e)
79{
80 Eina_Rectangle *r;
81
82 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
83 return;
84 MAGIC_CHECK_END();
85 EINA_LIST_FREE(e->obscures, r)
86 {
87 eina_rectangle_free(r);
88 }
89}
90
91static Eina_Bool
92_evas_render_has_map(Evas_Object *obj)
93{
94 return ((!((obj->func->can_map) && (obj->func->can_map(obj)))) &&
95 ((obj->cur.map) && (obj->cur.usemap)));
96 // return ((obj->cur.map) && (obj->cur.usemap));
97}
98
99static Eina_Bool
100_evas_render_had_map(Evas_Object *obj)
101{
102 return ((obj->prev.map) && (obj->prev.usemap));
103 // return ((!obj->cur.map) && (obj->prev.usemap));
104}
105
106static Eina_Bool
107_evas_render_is_relevant(Evas_Object *obj)
108{
109 return ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) ||
110 (evas_object_was_visible(obj) && (!obj->prev.have_clipees)));
111}
112
113static Eina_Bool
114_evas_render_can_render(Evas_Object *obj)
115{
116 return (evas_object_is_visible(obj) && (!obj->cur.have_clipees));
117}
118
119static void
120_evas_render_prev_cur_clip_cache_add(Evas *e, Evas_Object *obj)
121{
122 e->engine.func->output_redraws_rect_add(e->engine.data.output,
123 obj->prev.cache.clip.x,
124 obj->prev.cache.clip.y,
125 obj->prev.cache.clip.w,
126 obj->prev.cache.clip.h);
127 e->engine.func->output_redraws_rect_add(e->engine.data.output,
128 obj->cur.cache.clip.x,
129 obj->cur.cache.clip.y,
130 obj->cur.cache.clip.w,
131 obj->cur.cache.clip.h);
132}
133
134static void
135_evas_render_cur_clip_cache_del(Evas *e, Evas_Object *obj)
136{
137 Evas_Coord x, y, w, h;
138
139 x = obj->cur.cache.clip.x;
140 y = obj->cur.cache.clip.y;
141 w = obj->cur.cache.clip.w;
142 h = obj->cur.cache.clip.h;
143 if (obj->cur.clipper)
144 {
145 RECTS_CLIP_TO_RECT(x, y, w, h,
146 obj->cur.clipper->cur.cache.clip.x,
147 obj->cur.clipper->cur.cache.clip.y,
148 obj->cur.clipper->cur.cache.clip.w,
149 obj->cur.clipper->cur.cache.clip.h);
150 }
151 e->engine.func->output_redraws_rect_del(e->engine.data.output,
152 x, y, w, h);
153}
154
155static void
156_evas_render_phase1_direct(Evas *e,
157 Eina_Array *active_objects,
158 Eina_Array *restack_objects __UNUSED__,
159 Eina_Array *delete_objects __UNUSED__,
160 Eina_Array *render_objects)
161{
162 unsigned int i;
163 Eina_List *l;
164 Evas_Object *proxy;
165
166 RD(" [--- PHASE 1 DIRECT\n");
167 for (i = 0; i < active_objects->count; i++)
168 {
169 Evas_Object *obj;
170
171 obj = eina_array_data_get(active_objects, i);
172 if (obj->changed)
173 {
174 /* Flag need redraw on proxy too */
175 evas_object_clip_recalc(obj);
176 if (obj->proxy.proxies)
177 {
178 EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy)
179 proxy->proxy.redraw = 1;
180 }
181 }
182 }
183 for (i = 0; i < render_objects->count; i++)
184 {
185 Evas_Object *obj;
186
187 obj = eina_array_data_get(render_objects, i);
188 RD(" OBJ [%p] changed %i\n", obj, obj->changed);
189 if (obj->changed)
190 {
191 /* Flag need redraw on proxy too */
192 evas_object_clip_recalc(obj);
193 obj->func->render_pre(obj);
194 if (obj->proxy.proxies)
195 {
196 obj->proxy.redraw = 1;
197 EINA_LIST_FOREACH(obj->proxy.proxies, l, proxy)
198 {
199 proxy->func->render_pre(proxy);
200 _evas_render_prev_cur_clip_cache_add(e, proxy);
201 }
202 }
203 else if (obj->proxy.redraw)
204 {
205 _evas_render_prev_cur_clip_cache_add(e, obj);
206 }
207 if (obj->pre_render_done)
208 {
209 RD(" pre-render-done smart:%p|%p [%p, %i] | [%p, %i] has_map:%i had_map:%i\n",
210 obj->smart.smart,
211 evas_object_smart_members_get_direct(obj),
212 obj->cur.map, obj->cur.usemap,
213 obj->prev.map, obj->prev.usemap,
214 _evas_render_has_map(obj),
215 _evas_render_had_map(obj));
216 if ((obj->smart.smart) &&
217 (_evas_render_has_map(obj)))
218 {
219 RD(" has map + smart\n");
220 _evas_render_prev_cur_clip_cache_add(e, obj);
221 }
222 }
223 else if (_evas_render_had_map(obj))
224 {
225 RD(" no pre-render done\n");
226 _evas_render_prev_cur_clip_cache_add(e, obj);
227 }
228 }
229 else
230 {
231 if (obj->smart.smart)
232 {
233 // obj->func->render_pre(obj);
234 }
235 else if ((obj->rect_del) ||
236 (evas_object_is_opaque(obj) && evas_object_is_visible(obj)))
237 {
238 RD(" rect del\n");
239 _evas_render_cur_clip_cache_del(e, obj);
240 }
241 }
242 }
243 RD(" ---]\n");
244}
245
246static Eina_Bool
247_evas_render_phase1_object_process(Evas *e, Evas_Object *obj,
248 Eina_Array *active_objects,
249 Eina_Array *restack_objects,
250 Eina_Array *delete_objects,
251 Eina_Array *render_objects,
252 int restack, int map,
253 int *redraw_all
254#ifdef REND_DGB
255 , int level
256#endif
257 )
258{
259 Eina_Bool clean_them = EINA_FALSE;
260 Evas_Object *obj2;
261 int is_active;
262 Eina_Bool hmap;
263
264 obj->rect_del = 0;
265 obj->render_pre = 0;
266
267#ifndef EVAS_FRAME_QUEUING
268 /* because of clip objects - delete 2 cycles later */
269 if (obj->delete_me == 2)
270#else
271 if (obj->delete_me == evas_common_frameq_get_frameq_sz() + 2)
272#endif
273 eina_array_push(delete_objects, obj);
274 else if (obj->delete_me != 0) obj->delete_me++;
275 /* If the object will be removed, we should not cache anything during this run. */
276 if (obj->delete_me != 0) clean_them = EINA_TRUE;
277
278 /* build active object list */
279 evas_object_clip_recalc(obj);
280 is_active = evas_object_is_active(obj);
281 obj->is_active = is_active;
282
283 RDI(level);
284 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);
285 if ((is_active) || (obj->delete_me != 0))
286 eina_array_push(active_objects, obj);
287
288#ifdef REND_DGB
289 if (!is_active)
290 {
291 RDI(level);
292 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);
293 }
294#endif
295
296 map = _evas_render_has_map(obj);
297 hmap = _evas_render_had_map(obj);
298
299 if ((restack) && (!map))
300 {
301 if (!obj->changed)
302 {
303 eina_array_push(&e->pending_objects, obj);
304 obj->changed = 1;
305 }
306 obj->restack = 1;
307 clean_them = EINA_TRUE;
308 }
309
310 if (map)
311 {
312 RDI(level);
313 RD(" obj mapped\n");
314 if (obj->changed)
315 {
316 if (map != hmap)
317 {
318 *redraw_all = 1;
319 }
320 evas_object_clip_recalc(obj);
321 if ((obj->restack) &&
322 (is_active) && (!obj->clip.clipees) &&
323 ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) ||
324 (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
325 {
326 eina_array_push(render_objects, obj);
327 _evas_render_prev_cur_clip_cache_add(e, obj);
328 obj->render_pre = 1;
329 }
330 else if ((is_active) && (!obj->clip.clipees) &&
331 ((evas_object_is_visible(obj) && (!obj->cur.have_clipees)) ||
332 (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
333 {
334 eina_array_push(render_objects, obj);
335 _evas_render_prev_cur_clip_cache_add(e, obj);
336 obj->render_pre = 1;
337 }
338 }
339 return clean_them;
340 }
341 else if (_evas_render_had_map(obj))
342 {
343 RDI(level);
344 RD(" had map - restack objs\n");
345 // eina_array_push(restack_objects, obj);
346 _evas_render_prev_cur_clip_cache_add(e, obj);
347 if (obj->changed)
348 {
349 if (hmap)
350 {
351 if (!map)
352 {
353 if ((obj->cur.map) && (obj->cur.usemap)) map = 1;
354 }
355 }
356 if (map != hmap)
357 {
358 *redraw_all = 1;
359 }
360 }
361 }
362
363 /* handle normal rendering. this object knows how to handle maps */
364 if (obj->changed)
365 {
366 if (obj->smart.smart)
367 {
368 RDI(level);
369 RD(" changed + smart - render ok\n");
370 eina_array_push(render_objects, obj);
371 obj->render_pre = 1;
372 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
373 {
374 _evas_render_phase1_object_process(e, obj2,
375 active_objects,
376 restack_objects,
377 delete_objects,
378 render_objects,
379 obj->restack,
380 map,
381 redraw_all
382#ifdef REND_DGB
383 , level + 1
384#endif
385 );
386 }
387 }
388 else
389 {
390 if ((is_active) && (!obj->clip.clipees) &&
391 _evas_render_is_relevant(obj))
392 {
393 RDI(level);
394 RD(" relevant + active\n");
395 if (obj->restack)
396 eina_array_push(restack_objects, obj);
397 else
398 {
399 eina_array_push(render_objects, obj);
400 obj->render_pre = 1;
401 }
402 }
403 else
404 {
405 RDI(level);
406 RD(" skip - not smart, not active or clippees or not relevant\n");
407 }
408 }
409 }
410 else
411 {
412 RD(" not changed... [%i] -> (%i %i %p %i) [%i]\n",
413 evas_object_is_visible(obj),
414 obj->cur.visible, obj->cur.cache.clip.visible, obj->smart.smart, obj->cur.cache.clip.a,
415 evas_object_was_visible(obj));
416 if ((!obj->clip.clipees) && (obj->delete_me == 0) &&
417 (_evas_render_can_render(obj) ||
418 (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
419 {
420 if (obj->smart.smart)
421 {
422 RDI(level);
423 RD(" smart + visible/was visible + not clip\n");
424 eina_array_push(render_objects, obj);
425 obj->render_pre = 1;
426 EINA_INLIST_FOREACH
427 (evas_object_smart_members_get_direct(obj), obj2)
428 {
429 _evas_render_phase1_object_process(e, obj2,
430 active_objects,
431 restack_objects,
432 delete_objects,
433 render_objects,
434 restack, map,
435 redraw_all
436#ifdef REND_DGB
437 , level + 1
438#endif
439 );
440 }
441 }
442 else
443 {
444 if (evas_object_is_opaque(obj) &&
445 evas_object_is_visible(obj))
446 {
447 RDI(level);
448 RD(" opaque + visible\n");
449 eina_array_push(render_objects, obj);
450 obj->rect_del = 1;
451 }
452 else if (evas_object_is_visible(obj))
453 {
454 RDI(level);
455 RD(" visible\n");
456 eina_array_push(render_objects, obj);
457 obj->render_pre = 1;
458 }
459 else
460 {
461 RDI(level);
462 RD(" skip\n");
463 }
464 }
465 }
466 /*
467 else if (obj->smart.smart)
468 {
469 RDI(level);
470 RD(" smart + mot visible/was visible\n");
471 eina_array_push(render_objects, obj);
472 obj->render_pre = 1;
473 EINA_INLIST_FOREACH
474 (evas_object_smart_members_get_direct(obj), obj2)
475 {
476 _evas_render_phase1_object_process(e, obj2,
477 active_objects,
478 restack_objects,
479 delete_objects,
480 render_objects,
481 restack, map,
482 redraw_all
483#ifdef REND_DGB
484, level + 1
485#endif
486);
487}
488}
489 */
490}
491if (!is_active) obj->restack = 0;
492RDI(level);
493RD(" ---]\n");
494return clean_them;
495}
496
497static Eina_Bool
498_evas_render_phase1_process(Evas *e,
499 Eina_Array *active_objects,
500 Eina_Array *restack_objects,
501 Eina_Array *delete_objects,
502 Eina_Array *render_objects,
503 int *redraw_all)
504{
505 Evas_Layer *lay;
506 Eina_Bool clean_them = EINA_FALSE;
507
508 RD(" [--- PHASE 1\n");
509 EINA_INLIST_FOREACH(e->layers, lay)
510 {
511 Evas_Object *obj;
512
513 EINA_INLIST_FOREACH(lay->objects, obj)
514 {
515 clean_them |= _evas_render_phase1_object_process
516 (e, obj, active_objects, restack_objects, delete_objects,
517 render_objects, 0, 0, redraw_all
518#ifdef REND_DGB
519 , 1
520#endif
521 );
522 }
523 }
524 RD(" ---]\n");
525 return clean_them;
526}
527
528static void
529_evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *e)
530{
531 unsigned int i;
532
533 for (i = 0; i < pending_objects->count; ++i)
534 {
535 Evas_Object *obj;
536 int is_active, ok = 0;
537
538 obj = eina_array_data_get(pending_objects, i);
539
540 if (!obj->layer) goto clean_stuff;
541
542 evas_object_clip_recalc(obj);
543 is_active = evas_object_is_active(obj);
544
545 if ((!is_active) && (!obj->is_active) && (!obj->render_pre) &&
546 (!obj->rect_del))
547 {
548 ok = 1;
549 goto clean_stuff;
550 }
551
552 if (obj->is_active == is_active)
553 {
554 if (obj->changed)
555 {
556 if (obj->smart.smart)
557 {
558 if (obj->render_pre || obj->rect_del) ok = 1;
559 }
560 else
561 if ((is_active) && (obj->restack) && (!obj->clip.clipees) &&
562 (_evas_render_can_render(obj) ||
563 (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
564 {
565 if (!(obj->render_pre || obj->rect_del)) ok = 1;
566 }
567 else
568 if (is_active && (!obj->clip.clipees) &&
569 (_evas_render_can_render(obj) ||
570 (evas_object_was_visible(obj) && (!obj->prev.have_clipees))))
571 {
572 if (obj->render_pre || obj->rect_del) ok = 1;
573 }
574 }
575 else
576 {
577 if ((!obj->clip.clipees) && (obj->delete_me == 0) &&
578 (!obj->cur.have_clipees || (evas_object_was_visible(obj) && (!obj->prev.have_clipees)))
579 && evas_object_is_opaque(obj) && evas_object_is_visible(obj))
580 {
581 if (obj->rect_del || obj->smart.smart) ok = 1;
582 }
583 }
584 }
585
586clean_stuff:
587 if (!ok)
588 {
589 eina_array_clean(&e->active_objects);
590 eina_array_clean(&e->render_objects);
591 eina_array_clean(&e->restack_objects);
592 eina_array_clean(&e->delete_objects);
593 e->invalidate = 1;
594 return ;
595 }
596 }
597}
598
599Eina_Bool
600pending_change(void *data, void *gdata __UNUSED__)
601{
602 Evas_Object *obj;
603
604 obj = data;
605 if (obj->delete_me) return EINA_FALSE;
606 if (obj->pre_render_done)
607 {
608 RD(" OBJ [%p] pending change %i -> 0, pre %i\n", obj, obj->changed, obj->pre_render_done);
609 obj->pre_render_done = 0;
610 //// FIXME: this wipes out changes
611 obj->changed = 0;
612 obj->changed_move_only = 0;
613 obj->changed_nomove = 0;
614 obj->changed_move = 0;
615 obj->changed_map = 0;
616 obj->changed_pchange = 0;
617 }
618 return obj->changed ? EINA_TRUE : EINA_FALSE;
619}
620/*
621 static void
622 unchange(Evas_Object *obj)
623 {
624 Evas_Object *obj2;
625
626 if (!obj->changed) return;
627 obj->changed = 0;
628 obj->changed_move_only = 0;
629 obj->changed_nomove = 0;
630 obj->changed_move = 0;
631 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
632 {
633 unchange(obj2);
634 }
635 }
636
637 static int
638 chlist(Evas_Object *obj, int i)
639 {
640 Evas_Object *obj2;
641 int j;
642 int ret = 0;
643
644 if (!obj->changed) return 0;
645 for (j = 0; j < i; j++) printf(" ");
646 printf("ch2 %p %s %i [%i %i %ix%i] v %i/%i [r%i] %p\n", obj,
647 obj->type,
648 obj->changed_move_only,
649 obj->cur.geometry.x,
650 obj->cur.geometry.y,
651 obj->cur.geometry.w,
652 obj->cur.geometry.h,
653 obj->cur.visible,
654 obj->prev.visible,
655 obj->restack,
656 obj->clip.clipees);
657 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
658 {
659 if (obj2->changed)
660 ret |= chlist(obj2, i + 1);
661 }
662 }
663 */
664static Eina_Bool
665_evas_render_can_use_overlay(Evas *e, Evas_Object *obj)
666{
667 Eina_Rectangle *r;
668 Evas_Object *tmp;
669 Eina_List *alphas = NULL;
670 Eina_List *opaques = NULL;
671 Evas_Object *video_parent = NULL;
672 Eina_Rectangle zone;
673 Evas_Coord xc1, yc1, xc2, yc2;
674 unsigned int i;
675 Eina_Bool nooverlay;
676
677 video_parent = _evas_object_image_video_parent_get(obj);
678
679 /* Check if any one is the stack make this object mapped */
680 tmp = obj;
681 while (tmp && !_evas_render_has_map(tmp))
682 tmp = tmp->smart.parent;
683
684 if (tmp && _evas_render_has_map(tmp)) return EINA_FALSE; /* we are mapped, we can't be an overlay */
685
686 if (!evas_object_is_visible(obj)) return EINA_FALSE; /* no need to update the overlay if it's not visible */
687
688 /* If any recoloring of the surface is needed, n overlay to */
689 if ((obj->cur.cache.clip.r != 255) ||
690 (obj->cur.cache.clip.g != 255) ||
691 (obj->cur.cache.clip.b != 255) ||
692 (obj->cur.cache.clip.a != 255))
693 return EINA_FALSE;
694
695 /* Check presence of transparent object on top of the video object */
696 EINA_RECTANGLE_SET(&zone,
697 obj->cur.cache.clip.x,
698 obj->cur.cache.clip.y,
699 obj->cur.cache.clip.w,
700 obj->cur.cache.clip.h);
701
702 for (i = e->active_objects.count - 1; i > 0; i--)
703 {
704 Eina_Rectangle self;
705 Eina_Rectangle *match;
706 Evas_Object *current;
707 Eina_List *l;
708 int xm1, ym1, xm2, ym2;
709
710 current = eina_array_data_get(&e->active_objects, i);
711
712 /* Did we find the video object in the stack ? */
713 if (current == video_parent || current == obj)
714 break;
715
716 EINA_RECTANGLE_SET(&self,
717 current->cur.cache.clip.x,
718 current->cur.cache.clip.y,
719 current->cur.cache.clip.w,
720 current->cur.cache.clip.h);
721
722 /* This doesn't cover the area of the video object, so don't bother with that object */
723 if (!eina_rectangles_intersect(&zone, &self))
724 continue ;
725
726 xc1 = current->cur.cache.clip.x;
727 yc1 = current->cur.cache.clip.y;
728 xc2 = current->cur.cache.clip.x + current->cur.cache.clip.w;
729 yc2 = current->cur.cache.clip.y + current->cur.cache.clip.h;
730
731 if (evas_object_is_visible(current) &&
732 (!current->clip.clipees) &&
733 (current->cur.visible) &&
734 (!current->delete_me) &&
735 (current->cur.cache.clip.visible) &&
736 (!current->smart.smart))
737 {
738 Eina_Bool included = EINA_FALSE;
739
740 if (evas_object_is_opaque(current) ||
741 ((current->func->has_opaque_rect) &&
742 (current->func->has_opaque_rect(current))))
743 {
744 /* The object is opaque */
745
746 /* Check if the opaque object is inside another opaque object */
747 EINA_LIST_FOREACH(opaques, l, match)
748 {
749 xm1 = match->x;
750 ym1 = match->y;
751 xm2 = match->x + match->w;
752 ym2 = match->y + match->h;
753
754 /* Both object are included */
755 if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2)
756 {
757 included = EINA_TRUE;
758 break;
759 }
760 }
761
762 /* Not included yet */
763 if (!included)
764 {
765 Eina_List *ln;
766 Evas_Coord xn2, yn2;
767
768 r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y,
769 current->cur.cache.clip.w, current->cur.cache.clip.h);
770
771 opaques = eina_list_append(opaques, r);
772
773 xn2 = r->x + r->w;
774 yn2 = r->y + r->h;
775
776 /* Remove all the transparent object that are covered by the new opaque object */
777 EINA_LIST_FOREACH_SAFE(alphas, l, ln, match)
778 {
779 xm1 = match->x;
780 ym1 = match->y;
781 xm2 = match->x + match->w;
782 ym2 = match->y + match->h;
783
784 if (xm1 >= r->x && ym1 >= r->y && xm2 <= xn2 && ym2 <= yn2)
785 {
786 /* The new rectangle is over some transparent object,
787 so remove the transparent object */
788 alphas = eina_list_remove_list(alphas, l);
789 }
790 }
791 }
792 }
793 else
794 {
795 /* The object has some transparency */
796
797 /* Check if the transparent object is inside any other transparent object */
798 EINA_LIST_FOREACH(alphas, l, match)
799 {
800 xm1 = match->x;
801 ym1 = match->y;
802 xm2 = match->x + match->w;
803 ym2 = match->y + match->h;
804
805 /* Both object are included */
806 if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2)
807 {
808 included = EINA_TRUE;
809 break;
810 }
811 }
812
813 /* If not check if it is inside any opaque one */
814 if (!included)
815 {
816 EINA_LIST_FOREACH(opaques, l, match)
817 {
818 xm1 = match->x;
819 ym1 = match->y;
820 xm2 = match->x + match->w;
821 ym2 = match->y + match->h;
822
823 /* Both object are included */
824 if (xc1 >= xm1 && yc1 >= ym1 && xc2 <= xm2 && yc2 <= ym2)
825 {
826 included = EINA_TRUE;
827 break;
828 }
829 }
830 }
831
832 /* No inclusion at all, so add it */
833 if (!included)
834 {
835 r = eina_rectangle_new(current->cur.cache.clip.x, current->cur.cache.clip.y,
836 current->cur.cache.clip.w, current->cur.cache.clip.h);
837
838 alphas = eina_list_append(alphas, r);
839 }
840 }
841 }
842 }
843
844 /* If there is any pending transparent object, then no overlay */
845 nooverlay = !!eina_list_count(alphas);
846
847 EINA_LIST_FREE(alphas, r)
848 eina_rectangle_free(r);
849 EINA_LIST_FREE(opaques, r)
850 eina_rectangle_free(r);
851
852 if (nooverlay)
853 return EINA_FALSE;
854
855 return EINA_TRUE;
856}
857
858Eina_Bool
859evas_render_mapped(Evas *e, Evas_Object *obj, void *context, void *surface,
860 int off_x, int off_y, int mapped,
861 int ecx, int ecy, int ecw, int ech
862#ifdef REND_DGB
863 , int level
864#endif
865 )
866{
867 void *ctx;
868 Evas_Object *obj2;
869 Eina_Bool clean_them = EINA_FALSE;
870
871 evas_object_clip_recalc(obj);
872 RDI(level);
873 RD(" { evas_render_mapped(%p, %p, %p, %p, %i, %i, %i, %i)\n", e, obj, context, surface, off_x, off_y, mapped, level);
874 if (mapped)
875 {
876 if ((!evas_object_is_visible(obj)) || (obj->clip.clipees) ||
877 (obj->cur.have_clipees))
878 {
879 RDI(level);
880 RD(" }\n");
881 return clean_them;
882 }
883 }
884 else if (!(((evas_object_is_active(obj) && (!obj->clip.clipees) &&
885 (_evas_render_can_render(obj))))
886 ))
887 {
888 RDI(level);
889 RD(" }\n");
890 return clean_them;
891 }
892
893 // set render_pre - for child objs that may not have gotten it.
894 obj->pre_render_done = 1;
895 RD(" Hasmap: %p (%d) %p %d -> %d\n",obj->func->can_map,
896 obj->func->can_map ? obj->func->can_map(obj): -1,
897 obj->cur.map, obj->cur.usemap,
898 _evas_render_has_map(obj));
899 if (_evas_render_has_map(obj))
900 {
901 const Evas_Map_Point *p, *p_end;
902 RGBA_Map_Point pts[4], *pt;
903 int sw, sh;
904 int changed = 0, rendered = 0;
905
906 clean_them = EINA_TRUE;
907
908 sw = obj->cur.geometry.w;
909 sh = obj->cur.geometry.h;
910 RDI(level);
911 RD(" mapped obj: %ix%i\n", sw, sh);
912 if ((sw <= 0) || (sh <= 0))
913 {
914 RDI(level);
915 RD(" }\n");
916 return clean_them;
917 }
918
919 pts[0].px = obj->cur.map->persp.px << FP;
920 pts[0].py = obj->cur.map->persp.py << FP;
921 pts[0].foc = obj->cur.map->persp.foc << FP;
922 pts[0].z0 = obj->cur.map->persp.z0 << FP;
923
924 p = obj->cur.map->points;
925 p_end = p + obj->cur.map->count;
926 pt = pts;
927 for (; p < p_end; p++, pt++)
928 {
929 pt->x = (lround(p->x) + off_x) * FP1;
930 pt->y = (lround(p->y) + off_y) * FP1;
931 pt->z = (lround(p->z) ) * FP1;
932 pt->fx = p->px;
933 pt->fy = p->py;
934 pt->fz = p->z;
935 pt->u = lround(p->u) * FP1;
936 pt->v = lround(p->v) * FP1;
937 if (pt->u < 0) pt->u = 0;
938 else if (pt->u > (sw * FP1)) pt->u = (sw * FP1);
939 if (pt->v < 0) pt->v = 0;
940 else if (pt->v > (sh * FP1)) pt->v = (sh * FP1);
941 pt->col = ARGB_JOIN(p->a, p->r, p->g, p->b);
942 }
943 /* Copy last for software engine */
944 if (obj->cur.map->count & 0x1)
945 {
946 pts[obj->cur.map->count] = pts[obj->cur.map->count - 1];
947 }
948
949
950 if (obj->cur.map->surface)
951 {
952 if ((obj->cur.map->surface_w != sw) ||
953 (obj->cur.map->surface_h != sh))
954 {
955 RDI(level);
956 RD(" new surf: %ix%i\n", sw, sh);
957 obj->layer->evas->engine.func->image_map_surface_free
958 (e->engine.data.output, obj->cur.map->surface);
959 obj->cur.map->surface = NULL;
960 }
961 }
962 if (!obj->cur.map->surface)
963 {
964 obj->cur.map->surface_w = sw;
965 obj->cur.map->surface_h = sh;
966
967 obj->cur.map->surface =
968 obj->layer->evas->engine.func->image_map_surface_new
969 (e->engine.data.output, obj->cur.map->surface_w,
970 obj->cur.map->surface_h,
971 obj->cur.map->alpha);
972 RDI(level);
973 RD(" fisrt surf: %ix%i\n", sw, sh);
974 changed = 1;
975 }
976 if (obj->smart.smart)
977 {
978 Evas_Object *o2;
979
980 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), o2)
981 {
982 if (!evas_object_is_visible(o2) &&
983 !evas_object_was_visible(o2))
984 {
985 o2->changed = 0;
986 o2->changed_move_only = 0;
987 o2->changed_nomove = 0;
988 o2->changed_move = 0;
989 o2->changed_map = 0;
990 o2->changed_pchange = 0;
991 continue;
992 }
993 if (o2->changed)
994 {
995 // chlist(o2, 0);
996 changed = 1;
997 o2->changed = 0;
998 o2->changed_move_only = 0;
999 o2->changed_nomove = 0;
1000 o2->changed_move = 0;
1001 o2->changed_map = 0;
1002 o2->changed_pchange = 0;
1003 break;
1004 }
1005 }
1006 // unchange(obj);
1007 obj->changed = 0;
1008 obj->changed_move_only = 0;
1009 obj->changed_nomove = 0;
1010 obj->changed_move = 0;
1011 obj->changed_map = 0;
1012 obj->changed_pchange = 0;
1013 }
1014 else
1015 {
1016 if (obj->changed)
1017 {
1018 if ((obj->changed_pchange) && (obj->changed_map))
1019 changed = 1;
1020 obj->changed = 0;
1021 obj->changed_move_only = 0;
1022 obj->changed_nomove = 0;
1023 obj->changed_move = 0;
1024 obj->changed_map = 0;
1025 obj->changed_pchange = 0;
1026 }
1027 }
1028
1029 // clear surface before re-render
1030 if ((changed) && (obj->cur.map->surface))
1031 {
1032 int off_x2, off_y2;
1033
1034 RDI(level);
1035 RD(" children redraw\n");
1036 // FIXME: calculate "changes" within map surface and only clear
1037 // and re-render those
1038 if (obj->cur.map->alpha)
1039 {
1040 ctx = e->engine.func->context_new(e->engine.data.output);
1041 e->engine.func->context_color_set
1042 (e->engine.data.output, ctx, 0, 0, 0, 0);
1043 e->engine.func->context_render_op_set
1044 (e->engine.data.output, ctx, EVAS_RENDER_COPY);
1045 e->engine.func->rectangle_draw(e->engine.data.output,
1046 ctx,
1047 obj->cur.map->surface,
1048 0, 0,
1049 obj->cur.map->surface_w,
1050 obj->cur.map->surface_h);
1051 e->engine.func->context_free(e->engine.data.output, ctx);
1052 }
1053 ctx = e->engine.func->context_new(e->engine.data.output);
1054 off_x2 = -obj->cur.geometry.x;
1055 off_y2 = -obj->cur.geometry.y;
1056 if (obj->smart.smart)
1057 {
1058 EINA_INLIST_FOREACH
1059 (evas_object_smart_members_get_direct(obj), obj2)
1060 {
1061 clean_them |= evas_render_mapped(e, obj2, ctx,
1062 obj->cur.map->surface,
1063 off_x2, off_y2, 1,
1064 ecx, ecy, ecw, ech
1065#ifdef REND_DGB
1066 , level + 1
1067#endif
1068 );
1069 }
1070 }
1071 else
1072 {
1073 int x = 0, y = 0, w = 0, h = 0;
1074
1075 w = obj->cur.map->surface_w;
1076 h = obj->cur.map->surface_h;
1077 RECTS_CLIP_TO_RECT(x, y, w, h,
1078 obj->cur.geometry.x + off_x2,
1079 obj->cur.geometry.y + off_y2,
1080 obj->cur.geometry.w,
1081 obj->cur.geometry.h);
1082
1083 e->engine.func->context_clip_set(e->engine.data.output,
1084 ctx, x, y, w, h);
1085 obj->func->render(obj, e->engine.data.output, ctx,
1086 obj->cur.map->surface, off_x2, off_y2);
1087 }
1088 e->engine.func->context_free(e->engine.data.output, ctx);
1089 rendered = 1;
1090 }
1091
1092 RDI(level);
1093 RD(" draw map\n");
1094
1095 if (rendered)
1096 {
1097 obj->cur.map->surface = e->engine.func->image_dirty_region
1098 (e->engine.data.output, obj->cur.map->surface,
1099 0, 0, obj->cur.map->surface_w, obj->cur.map->surface_h);
1100 }
1101 e->engine.func->context_clip_unset(e->engine.data.output,
1102 e->engine.data.context);
1103 if (obj->cur.map->surface)
1104 {
1105 if (obj->smart.smart)
1106 {
1107 if (obj->cur.clipper)
1108 {
1109 int x, y, w, h;
1110 Evas_Object *tobj;
1111
1112 obj->cur.cache.clip.dirty = 1;
1113 tobj = obj->cur.map_parent;
1114 obj->cur.map_parent = obj->cur.clipper->cur.map_parent;
1115 evas_object_clip_recalc(obj);
1116 obj->cur.map_parent = tobj;
1117 x = obj->cur.cache.clip.x;
1118 y = obj->cur.cache.clip.y;
1119 w = obj->cur.cache.clip.w;
1120 h = obj->cur.cache.clip.h;
1121 RECTS_CLIP_TO_RECT(x, y, w, h,
1122 obj->cur.clipper->cur.cache.clip.x,
1123 obj->cur.clipper->cur.cache.clip.y,
1124 obj->cur.clipper->cur.cache.clip.w,
1125 obj->cur.clipper->cur.cache.clip.h);
1126 e->engine.func->context_clip_set(e->engine.data.output,
1127 e->engine.data.context,
1128 x + off_x, y + off_y, w, h);
1129 }
1130 }
1131 else
1132 {
1133 if (obj->cur.clipper)
1134 {
1135 int x, y, w, h;
1136
1137 evas_object_clip_recalc(obj);
1138 x = obj->cur.cache.clip.x;
1139 y = obj->cur.cache.clip.y;
1140 w = obj->cur.cache.clip.w;
1141 h = obj->cur.cache.clip.h;
1142 RECTS_CLIP_TO_RECT(x, y, w, h,
1143 obj->cur.clipper->cur.cache.clip.x,
1144 obj->cur.clipper->cur.cache.clip.y,
1145 obj->cur.clipper->cur.cache.clip.w,
1146 obj->cur.clipper->cur.cache.clip.h);
1147 e->engine.func->context_clip_set(e->engine.data.output,
1148 e->engine.data.context,
1149 x + off_x, y + off_y, w, h);
1150 }
1151 }
1152 }
1153// if (surface == e->engine.data.output)
1154 e->engine.func->context_clip_clip(e->engine.data.output,
1155 e->engine.data.context,
1156 ecx, ecy, ecw, ech);
1157 if (obj->cur.cache.clip.visible)
1158 {
1159 obj->layer->evas->engine.func->image_map_draw
1160 (e->engine.data.output, e->engine.data.context, surface,
1161 obj->cur.map->surface, obj->cur.map->count, pts,
1162 obj->cur.map->smooth, 0);
1163 }
1164 // FIXME: needs to cache these maps and
1165 // keep them only rendering updates
1166 // obj->layer->evas->engine.func->image_map_surface_free
1167 // (e->engine.data.output, obj->cur.map->surface);
1168 // obj->cur.map->surface = NULL;
1169 }
1170 else
1171 {
1172 if (mapped)
1173 {
1174 RDI(level);
1175 RD(" draw child of mapped obj\n");
1176 ctx = e->engine.func->context_new(e->engine.data.output);
1177 if (obj->smart.smart)
1178 {
1179 EINA_INLIST_FOREACH
1180 (evas_object_smart_members_get_direct(obj), obj2)
1181 {
1182 clean_them |= evas_render_mapped(e, obj2, ctx,
1183 surface,
1184 off_x, off_y, 1,
1185 ecx, ecy, ecw, ech
1186#ifdef REND_DGB
1187 , level + 1
1188#endif
1189 );
1190 }
1191 }
1192 else
1193 {
1194 if (!obj->cur.map)
1195 {
1196 int x, y, w, h;
1197
1198 RDI(level);
1199
1200 x = obj->cur.cache.clip.x + off_x;
1201 y = obj->cur.cache.clip.y + off_y;
1202 w = obj->cur.cache.clip.w;
1203 h = obj->cur.cache.clip.h;
1204
1205 if (obj->cur.clipper)
1206 {
1207 if (_evas_render_has_map(obj))
1208 evas_object_clip_recalc(obj);
1209
1210 RD(" clipper: %i %i %ix%i\n",
1211 obj->cur.clipper->cur.cache.clip.x + off_x,
1212 obj->cur.clipper->cur.cache.clip.y + off_y,
1213 obj->cur.clipper->cur.cache.clip.w,
1214 obj->cur.clipper->cur.cache.clip.h);
1215
1216 RECTS_CLIP_TO_RECT(x, y, w, h,
1217 obj->cur.clipper->cur.cache.clip.x + off_x,
1218 obj->cur.clipper->cur.cache.clip.y + off_y,
1219 obj->cur.clipper->cur.cache.clip.w,
1220 obj->cur.clipper->cur.cache.clip.h);
1221 }
1222
1223 RD(" clip: %i %i %ix%i [%i %i %ix%i]\n",
1224 obj->cur.cache.clip.x + off_x,
1225 obj->cur.cache.clip.y + off_y,
1226 obj->cur.cache.clip.w,
1227 obj->cur.cache.clip.h,
1228 obj->cur.geometry.x + off_x,
1229 obj->cur.geometry.y + off_y,
1230 obj->cur.geometry.w,
1231 obj->cur.geometry.h);
1232 e->engine.func->context_clip_set(e->engine.data.output,
1233 ctx, x, y, w, h);
1234 }
1235 else
1236 {
1237 RDI(level);
1238 RD(" noclip\n");
1239 }
1240 obj->func->render(obj, e->engine.data.output, ctx,
1241 surface, off_x, off_y);
1242 /*
1243 obj->layer->evas->engine.func->context_color_set(e->engine.data.output,
1244 ctx,
1245 0, 30, 0, 30);
1246 obj->layer->evas->engine.func->rectangle_draw(e->engine.data.output,
1247 ctx,
1248 surface,
1249 0, 0, 9999, 9999);
1250 */
1251 }
1252 e->engine.func->context_free(e->engine.data.output, ctx);
1253 }
1254 else
1255 {
1256 if (obj->cur.clipper)
1257 {
1258 int x, y, w, h;
1259
1260 if (_evas_render_has_map(obj))
1261 evas_object_clip_recalc(obj);
1262 x = obj->cur.cache.clip.x;
1263 y = obj->cur.cache.clip.y;
1264 w = obj->cur.cache.clip.w;
1265 h = obj->cur.cache.clip.h;
1266 RECTS_CLIP_TO_RECT(x, y, w, h,
1267 obj->cur.clipper->cur.cache.clip.x,
1268 obj->cur.clipper->cur.cache.clip.y,
1269 obj->cur.clipper->cur.cache.clip.w,
1270 obj->cur.clipper->cur.cache.clip.h);
1271 e->engine.func->context_clip_set(e->engine.data.output,
1272 e->engine.data.context,
1273 x + off_x, y + off_y, w, h);
1274 e->engine.func->context_clip_clip(e->engine.data.output,
1275 e->engine.data.context,
1276 ecx, ecy, ecw, ech);
1277 }
1278
1279 RDI(level);
1280 RD(" draw normal obj\n");
1281 obj->func->render(obj, e->engine.data.output, context, surface,
1282 off_x, off_y);
1283 }
1284 }
1285 RDI(level);
1286 RD(" }\n");
1287
1288 return clean_them;
1289}
1290
1291static void
1292_evas_render_cutout_add(Evas *e, Evas_Object *obj, int off_x, int off_y)
1293{
1294 if (evas_object_is_opaque(obj))
1295 {
1296 Evas_Coord cox, coy, cow, coh;
1297
1298 cox = obj->cur.cache.clip.x;
1299 coy = obj->cur.cache.clip.y;
1300 cow = obj->cur.cache.clip.w;
1301 coh = obj->cur.cache.clip.h;
1302 if ((obj->cur.map) && (obj->cur.usemap))
1303 {
1304 Evas_Object *oo;
1305
1306 oo = obj;
1307 while (oo->cur.clipper)
1308 {
1309 if ((oo->cur.clipper->cur.map_parent
1310 != oo->cur.map_parent) &&
1311 (!((oo->cur.map) && (oo->cur.usemap))))
1312 break;
1313 RECTS_CLIP_TO_RECT(cox, coy, cow, coh,
1314 oo->cur.geometry.x,
1315 oo->cur.geometry.y,
1316 oo->cur.geometry.w,
1317 oo->cur.geometry.h);
1318 oo = oo->cur.clipper;
1319 }
1320 }
1321 e->engine.func->context_cutout_add
1322 (e->engine.data.output, e->engine.data.context,
1323 cox + off_x, coy + off_y, cow, coh);
1324 }
1325 else
1326 {
1327 if (obj->func->get_opaque_rect)
1328 {
1329 Evas_Coord obx, oby, obw, obh;
1330
1331 obj->func->get_opaque_rect(obj, &obx, &oby, &obw, &obh);
1332 if ((obw > 0) && (obh > 0))
1333 {
1334 obx += off_x;
1335 oby += off_y;
1336 RECTS_CLIP_TO_RECT(obx, oby, obw, obh,
1337 obj->cur.cache.clip.x + off_x,
1338 obj->cur.cache.clip.y + off_y,
1339 obj->cur.cache.clip.w,
1340 obj->cur.cache.clip.h);
1341 e->engine.func->context_cutout_add
1342 (e->engine.data.output, e->engine.data.context,
1343 obx, oby, obw, obh);
1344 }
1345 }
1346 }
1347}
1348
1349static Eina_List *
1350evas_render_updates_internal(Evas *e,
1351 unsigned char make_updates,
1352 unsigned char do_draw)
1353{
1354 Evas_Object *obj;
1355 Eina_List *updates = NULL;
1356 Eina_List *ll;
1357 void *surface;
1358 Eina_Bool clean_them = EINA_FALSE;
1359 Eina_Bool alpha;
1360 Eina_Rectangle *r;
1361 int ux, uy, uw, uh;
1362 int cx, cy, cw, ch;
1363 unsigned int i, j;
1364 int haveup = 0;
1365 int redraw_all = 0;
1366
1367 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1368 return NULL;
1369 MAGIC_CHECK_END();
1370 if (!e->changed) return NULL;
1371
1372 evas_call_smarts_calculate(e);
1373
1374 RD("[--- RENDER EVAS (size: %ix%i)\n", e->viewport.w, e->viewport.h);
1375
1376 evas_event_callback_call(e, EVAS_CALLBACK_RENDER_PRE, NULL);
1377
1378 /* Check if the modified object mean recalculating every thing */
1379 if (!e->invalidate)
1380 _evas_render_check_pending_objects(&e->pending_objects, e);
1381
1382 /* phase 1. add extra updates for changed objects */
1383 if (e->invalidate || e->render_objects.count <= 0)
1384 clean_them = _evas_render_phase1_process(e,
1385 &e->active_objects,
1386 &e->restack_objects,
1387 &e->delete_objects,
1388 &e->render_objects,
1389 &redraw_all);
1390
1391 /* phase 1.5. check if the video should be inlined or stay in their overlay */
1392 alpha = e->engine.func->canvas_alpha_get(e->engine.data.output,
1393 e->engine.data.context);
1394
1395 EINA_LIST_FOREACH(e->video_objects, ll, obj)
1396 {
1397 /* we need the surface to be transparent to display the underlying overlay */
1398 if (alpha && _evas_render_can_use_overlay(e, obj))
1399 _evas_object_image_video_overlay_show(obj);
1400 else
1401 _evas_object_image_video_overlay_hide(obj);
1402 }
1403
1404
1405 /* phase 1.8. pre render for proxy */
1406 _evas_render_phase1_direct(e, &e->active_objects, &e->restack_objects,
1407 &e->delete_objects, &e->render_objects);
1408
1409 /* phase 2. force updates for restacks */
1410 for (i = 0; i < e->restack_objects.count; ++i)
1411 {
1412 obj = eina_array_data_get(&e->restack_objects, i);
1413 obj->func->render_pre(obj);
1414 _evas_render_prev_cur_clip_cache_add(e, obj);
1415 }
1416 eina_array_clean(&e->restack_objects);
1417
1418 /* phase 3. add exposes */
1419 EINA_LIST_FREE(e->damages, r)
1420 {
1421 e->engine.func->output_redraws_rect_add(e->engine.data.output,
1422 r->x, r->y, r->w, r->h);
1423 eina_rectangle_free(r);
1424 }
1425
1426 /* phase 4. framespace, output & viewport changes */
1427 if (e->framespace.changed)
1428 {
1429 int fx, fy, fw, fh;
1430
1431 fx = e->viewport.x - e->framespace.x;
1432 fy = e->viewport.y - e->framespace.y;
1433 fw = e->viewport.w + e->framespace.w;
1434 fh = e->viewport.h + e->framespace.h;
1435 e->engine.func->output_redraws_rect_add(e->engine.data.output,
1436 fx, fy, fw, fh);
1437 }
1438
1439 if (e->viewport.changed)
1440 {
1441 e->engine.func->output_redraws_rect_add(e->engine.data.output,
1442 0, 0,
1443 e->output.w, e->output.h);
1444 }
1445 if (e->output.changed)
1446 {
1447 e->engine.func->output_resize(e->engine.data.output,
1448 e->output.w, e->output.h);
1449 e->engine.func->output_redraws_rect_add(e->engine.data.output,
1450 0, 0,
1451 e->output.w, e->output.h);
1452 }
1453 if ((e->output.w != e->viewport.w) || (e->output.h != e->viewport.h))
1454 {
1455 ERR("viewport size != output size!");
1456 }
1457 if (redraw_all)
1458 {
1459 e->engine.func->output_redraws_rect_add(e->engine.data.output,
1460 0, 0,
1461 e->output.w, e->output.h);
1462 }
1463
1464 /* phase 5. add obscures */
1465 EINA_LIST_FOREACH(e->obscures, ll, r)
1466 {
1467 e->engine.func->output_redraws_rect_del(e->engine.data.output,
1468 r->x, r->y, r->w, r->h);
1469 }
1470 /* build obscure objects list of active objects that obscure */
1471 for (i = 0; i < e->active_objects.count; ++i)
1472 {
1473 obj = eina_array_data_get(&e->active_objects, i);
1474 if (UNLIKELY((evas_object_is_opaque(obj) ||
1475 ((obj->func->has_opaque_rect) &&
1476 (obj->func->has_opaque_rect(obj)))) &&
1477 evas_object_is_visible(obj) &&
1478 (!obj->clip.clipees) &&
1479 (obj->cur.visible) &&
1480 (!obj->delete_me) &&
1481 (obj->cur.cache.clip.visible) &&
1482 (!obj->smart.smart)))
1483 /* obscuring_objects = eina_list_append(obscuring_objects, obj); */
1484 eina_array_push(&e->obscuring_objects, obj);
1485 }
1486
1487 /* save this list */
1488 /* obscuring_objects_orig = obscuring_objects; */
1489 /* obscuring_objects = NULL; */
1490 /* phase 6. go thru each update rect and render objects in it*/
1491 if (do_draw)
1492 {
1493 unsigned int offset = 0;
1494
1495 while ((surface =
1496 e->engine.func->output_redraws_next_update_get
1497 (e->engine.data.output,
1498 &ux, &uy, &uw, &uh,
1499 &cx, &cy, &cw, &ch)))
1500 {
1501 int off_x, off_y;
1502
1503 RD(" [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh);
1504 if (make_updates)
1505 {
1506 Eina_Rectangle *rect;
1507
1508 NEW_RECT(rect, ux, uy, uw, uh);
1509 if (rect)
1510 updates = eina_list_append(updates, rect);
1511 }
1512 haveup = 1;
1513 off_x = cx - ux;
1514 off_y = cy - uy;
1515 /* build obscuring objects list (in order from bottom to top) */
1516 if (alpha)
1517 {
1518 e->engine.func->context_clip_set(e->engine.data.output,
1519 e->engine.data.context,
1520 ux + off_x, uy + off_y, uw, uh);
1521 }
1522 for (i = 0; i < e->obscuring_objects.count; ++i)
1523 {
1524 obj = (Evas_Object *)eina_array_data_get
1525 (&e->obscuring_objects, i);
1526 if (evas_object_is_in_output_rect(obj, ux, uy, uw, uh))
1527 {
1528 eina_array_push(&e->temporary_objects, obj);
1529
1530 /* reset the background of the area if needed (using cutout and engine alpha flag to help) */
1531 if (alpha)
1532 _evas_render_cutout_add(e, obj, off_x, off_y);
1533 }
1534 }
1535 if (alpha)
1536 {
1537 e->engine.func->context_color_set(e->engine.data.output,
1538 e->engine.data.context,
1539 0, 0, 0, 0);
1540 e->engine.func->context_multiplier_unset
1541 (e->engine.data.output, e->engine.data.context);
1542 e->engine.func->context_render_op_set(e->engine.data.output,
1543 e->engine.data.context,
1544 EVAS_RENDER_COPY);
1545 e->engine.func->rectangle_draw(e->engine.data.output,
1546 e->engine.data.context,
1547 surface,
1548 cx, cy, cw, ch);
1549 e->engine.func->context_cutout_clear(e->engine.data.output,
1550 e->engine.data.context);
1551 e->engine.func->context_clip_unset(e->engine.data.output,
1552 e->engine.data.context);
1553 }
1554 /* render all object that intersect with rect */
1555 for (i = 0; i < e->active_objects.count; ++i)
1556 {
1557 obj = eina_array_data_get(&e->active_objects, i);
1558
1559 /* if it's in our outpout rect and it doesn't clip anything */
1560 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);
1561 if ((evas_object_is_in_output_rect(obj, ux, uy, uw, uh) ||
1562 (obj->smart.smart)) &&
1563 (!obj->clip.clipees) &&
1564 (obj->cur.visible) &&
1565 (!obj->delete_me) &&
1566 (obj->cur.cache.clip.visible) &&
1567// (!obj->smart.smart) &&
1568 ((obj->cur.color.a > 0 || obj->cur.render_op != EVAS_RENDER_BLEND)))
1569 {
1570 int x, y, w, h;
1571
1572 RD(" DRAW (vis: %i, a: %i, clipees: %p\n", obj->cur.visible, obj->cur.color.a, obj->clip.clipees);
1573 if ((e->temporary_objects.count > offset) &&
1574 (eina_array_data_get(&e->temporary_objects, offset) == obj))
1575 offset++;
1576 x = cx; y = cy; w = cw; h = ch;
1577 if (((w > 0) && (h > 0)) || (obj->smart.smart))
1578 {
1579 if (!obj->smart.smart)
1580 {
1581 RECTS_CLIP_TO_RECT(x, y, w, h,
1582 obj->cur.cache.clip.x + off_x,
1583 obj->cur.cache.clip.y + off_y,
1584 obj->cur.cache.clip.w,
1585 obj->cur.cache.clip.h);
1586 }
1587 if (obj->cur.mask)
1588 e->engine.func->context_mask_set(e->engine.data.output,
1589 e->engine.data.context,
1590 obj->cur.mask->func->engine_data_get(obj->cur.mask),
1591 obj->cur.mask->cur.geometry.x + off_x,
1592 obj->cur.mask->cur.geometry.y + off_y,
1593 obj->cur.mask->cur.geometry.w,
1594 obj->cur.mask->cur.geometry.h);
1595 else
1596 e->engine.func->context_mask_unset(e->engine.data.output,
1597 e->engine.data.context);
1598 e->engine.func->context_clip_set(e->engine.data.output,
1599 e->engine.data.context,
1600 x, y, w, h);
1601#if 1 /* FIXME: this can slow things down... figure out optimum... coverage */
1602 for (j = offset; j < e->temporary_objects.count; ++j)
1603 {
1604 Evas_Object *obj2;
1605
1606 obj2 = (Evas_Object *)eina_array_data_get
1607 (&e->temporary_objects, j);
1608 _evas_render_cutout_add(e, obj2, off_x, off_y);
1609 }
1610#endif
1611 clean_them |= evas_render_mapped(e, obj, e->engine.data.context,
1612 surface, off_x, off_y, 0,
1613 cx, cy, cw, ch
1614#ifdef REND_DGB
1615 , 1
1616#endif
1617 );
1618 e->engine.func->context_cutout_clear(e->engine.data.output,
1619 e->engine.data.context);
1620 }
1621 }
1622 }
1623 /* punch rect out */
1624 e->engine.func->output_redraws_next_update_push(e->engine.data.output,
1625 surface,
1626 ux, uy, uw, uh);
1627 /* free obscuring objects list */
1628 eina_array_clean(&e->temporary_objects);
1629 RD(" ---]\n");
1630 }
1631 /* flush redraws */
1632 if (haveup)
1633 {
1634 evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL);
1635 e->engine.func->output_flush(e->engine.data.output);
1636 evas_event_callback_call(e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL);
1637 }
1638 }
1639 /* clear redraws */
1640 e->engine.func->output_redraws_clear(e->engine.data.output);
1641 /* and do a post render pass */
1642 for (i = 0; i < e->active_objects.count; ++i)
1643 {
1644 obj = eina_array_data_get(&e->active_objects, i);
1645 obj->pre_render_done = 0;
1646 RD(" OBJ [%p] post... %i %i\n", obj, obj->changed, do_draw);
1647 if ((obj->changed) && (do_draw))
1648 {
1649 RD(" OBJ [%p] post... func1\n", obj);
1650 obj->func->render_post(obj);
1651 obj->restack = 0;
1652 obj->changed = 0;
1653 obj->changed_move_only = 0;
1654 obj->changed_nomove = 0;
1655 obj->changed_move = 0;
1656 obj->changed_map = 0;
1657 obj->changed_pchange = 0;
1658 }
1659 else if ((obj->cur.map != obj->prev.map) ||
1660 (obj->cur.usemap != obj->prev.usemap))
1661 {
1662 RD(" OBJ [%p] post... func2\n", obj);
1663 obj->func->render_post(obj);
1664 obj->restack = 0;
1665 obj->changed = 0;
1666 obj->changed_move_only = 0;
1667 obj->changed_nomove = 0;
1668 obj->changed_move = 0;
1669 obj->changed_map = 0;
1670 obj->changed_pchange = 0;
1671 }
1672 /* moved to other pre-process phase 1
1673 if (obj->delete_me == 2)
1674 {
1675 delete_objects = eina_list_append(delete_objects, obj);
1676 }
1677 else if (obj->delete_me != 0) obj->delete_me++;
1678 */
1679 }
1680 /* free our obscuring object list */
1681 eina_array_clean(&e->obscuring_objects);
1682
1683 /* If some object are still marked as changed, do not remove
1684 them from the pending list. */
1685 eina_array_remove(&e->pending_objects, pending_change, NULL);
1686
1687 for (i = 0; i < e->render_objects.count; ++i)
1688 {
1689 obj = eina_array_data_get(&e->render_objects, i);
1690 obj->pre_render_done = 0;
1691 }
1692
1693 /* delete all objects flagged for deletion now */
1694 for (i = 0; i < e->delete_objects.count; ++i)
1695 {
1696 obj = eina_array_data_get(&e->delete_objects, i);
1697 evas_object_free(obj, 1);
1698 }
1699 eina_array_clean(&e->delete_objects);
1700
1701 e->changed = 0;
1702 e->viewport.changed = 0;
1703 e->output.changed = 0;
1704 e->framespace.changed = 0;
1705 e->invalidate = 0;
1706
1707 // always clean... lots of mem waste!
1708 /* If their are some object to restack or some object to delete,
1709 * it's useless to keep the render object list around. */
1710 if (clean_them)
1711 {
1712 eina_array_clean(&e->active_objects);
1713 eina_array_clean(&e->render_objects);
1714 eina_array_clean(&e->restack_objects);
1715 eina_array_clean(&e->delete_objects);
1716 eina_array_clean(&e->obscuring_objects);
1717 eina_array_clean(&e->temporary_objects);
1718 eina_array_clean(&e->clip_changes);
1719/* we should flush here and have a mempool system for this
1720 eina_array_flush(&e->active_objects);
1721 eina_array_flush(&e->render_objects);
1722 eina_array_flush(&e->restack_objects);
1723 eina_array_flush(&e->delete_objects);
1724 eina_array_flush(&e->obscuring_objects);
1725 eina_array_flush(&e->temporary_objects);
1726 eina_array_flush(&e->clip_changes);
1727 */
1728 e->invalidate = 1;
1729 }
1730
1731 evas_module_clean();
1732
1733 evas_event_callback_call(e, EVAS_CALLBACK_RENDER_POST, NULL);
1734
1735 RD("---]\n");
1736
1737 return updates;
1738}
1739
1740EAPI void
1741evas_render_updates_free(Eina_List *updates)
1742{
1743 Eina_Rectangle *r;
1744
1745 EINA_LIST_FREE(updates, r)
1746 eina_rectangle_free(r);
1747}
1748
1749EAPI Eina_List *
1750evas_render_updates(Evas *e)
1751{
1752 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1753 return NULL;
1754 MAGIC_CHECK_END();
1755
1756#ifdef EVAS_FRAME_QUEUING
1757 evas_common_frameq_flush_ready ();
1758#endif
1759
1760 if (!e->changed) return NULL;
1761 return evas_render_updates_internal(e, 1, 1);
1762}
1763
1764EAPI void
1765evas_render(Evas *e)
1766{
1767 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1768 return;
1769 MAGIC_CHECK_END();
1770
1771#ifdef EVAS_FRAME_QUEUING
1772 evas_common_frameq_flush_ready ();
1773#endif
1774
1775 if (!e->changed) return;
1776 evas_render_updates_internal(e, 0, 1);
1777}
1778
1779EAPI void
1780evas_norender(Evas *e)
1781{
1782 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1783 return;
1784 MAGIC_CHECK_END();
1785
1786 // if (!e->changed) return;
1787 evas_render_updates_internal(e, 0, 0);
1788}
1789
1790EAPI void
1791evas_render_idle_flush(Evas *e)
1792{
1793 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1794 return;
1795 MAGIC_CHECK_END();
1796
1797 evas_fonts_zero_presure(e);
1798
1799 if ((e->engine.func) && (e->engine.func->output_idle_flush) &&
1800 (e->engine.data.output))
1801 e->engine.func->output_idle_flush(e->engine.data.output);
1802
1803 eina_array_flush(&e->active_objects);
1804 eina_array_flush(&e->render_objects);
1805 eina_array_flush(&e->restack_objects);
1806 eina_array_flush(&e->delete_objects);
1807 eina_array_flush(&e->obscuring_objects);
1808 eina_array_flush(&e->temporary_objects);
1809 eina_array_flush(&e->clip_changes);
1810 eina_array_flush(&e->temporary_objects);
1811
1812 e->invalidate = 1;
1813}
1814
1815EAPI void
1816evas_sync(Evas *e)
1817{
1818#ifdef EVAS_FRAME_QUEUING
1819 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1820 return;
1821 MAGIC_CHECK_END();
1822
1823 evas_common_frameq_flush();
1824#else
1825 (void) e;
1826#endif
1827}
1828
1829static void
1830_evas_render_dump_map_surfaces(Evas_Object *obj)
1831{
1832 if ((obj->cur.map) && obj->cur.map->surface)
1833 {
1834 obj->layer->evas->engine.func->image_map_surface_free
1835 (obj->layer->evas->engine.data.output, obj->cur.map->surface);
1836 obj->cur.map->surface = NULL;
1837 }
1838
1839 if (obj->smart.smart)
1840 {
1841 Evas_Object *obj2;
1842
1843 EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(obj), obj2)
1844 _evas_render_dump_map_surfaces(obj2);
1845 }
1846}
1847
1848EAPI void
1849evas_render_dump(Evas *e)
1850{
1851 Evas_Layer *lay;
1852
1853 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1854 return;
1855 MAGIC_CHECK_END();
1856
1857 EINA_INLIST_FOREACH(e->layers, lay)
1858 {
1859 Evas_Object *obj;
1860
1861 EINA_INLIST_FOREACH(lay->objects, obj)
1862 {
1863 if ((obj->type) && (!strcmp(obj->type, "image")))
1864 evas_object_inform_call_image_unloaded(obj);
1865 _evas_render_dump_map_surfaces(obj);
1866 }
1867 }
1868 if ((e->engine.func) && (e->engine.func->output_dump) &&
1869 (e->engine.data.output))
1870 e->engine.func->output_dump(e->engine.data.output);
1871}
1872
1873void
1874evas_render_invalidate(Evas *e)
1875{
1876 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
1877 return;
1878 MAGIC_CHECK_END();
1879
1880 eina_array_clean(&e->active_objects);
1881 eina_array_clean(&e->render_objects);
1882
1883 eina_array_flush(&e->restack_objects);
1884 eina_array_flush(&e->delete_objects);
1885
1886 e->invalidate = 1;
1887}
1888
1889void
1890evas_render_object_recalc(Evas_Object *obj)
1891{
1892 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
1893 return;
1894 MAGIC_CHECK_END();
1895
1896#ifndef EVAS_FRAME_QUEUING
1897 if ((!obj->changed) && (obj->delete_me < 2))
1898#else
1899 if ((!obj->changed))
1900#endif
1901 {
1902 Evas *e;
1903
1904 e = obj->layer->evas;
1905 if ((!e) || (e->cleanup)) return;
1906#ifdef EVAS_FRAME_QUEUING
1907 if (obj->delete_me >= evas_common_frameq_get_frameq_sz() + 2) return;
1908#endif
1909 eina_array_push(&e->pending_objects, obj);
1910 obj->changed = 1;
1911 }
1912}
1913
1914/* 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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4
5static void _evas_smart_class_callbacks_create(Evas_Smart *s);
6
7/* all public */
8
9EAPI void
10evas_smart_free(Evas_Smart *s)
11{
12 MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
13 return;
14 MAGIC_CHECK_END();
15 s->delete_me = 1;
16 if (s->usage > 0) return;
17 if (s->class_allocated) free((void *)s->smart_class);
18 free(s->callbacks.array);
19 free(s);
20}
21
22EAPI Evas_Smart *
23evas_smart_class_new(const Evas_Smart_Class *sc)
24{
25 Evas_Smart *s;
26
27 if (!sc) return NULL;
28
29 /* api does not match abi! for now refuse as we only have 1 version */
30 if (sc->version != EVAS_SMART_CLASS_VERSION) return NULL;
31
32 s = evas_mem_calloc(sizeof(Evas_Smart));
33 if (!s) return NULL;
34
35 s->magic = MAGIC_SMART;
36
37 s->smart_class = sc;
38 _evas_smart_class_callbacks_create(s);
39
40 return s;
41}
42
43EAPI const Evas_Smart_Class *
44evas_smart_class_get(const Evas_Smart *s)
45{
46 MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
47 return NULL;
48 MAGIC_CHECK_END();
49 return s->smart_class;
50}
51
52EAPI void *
53evas_smart_data_get(const Evas_Smart *s)
54{
55 MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
56 return NULL;
57 MAGIC_CHECK_END();
58 return (void *)s->smart_class->data;
59}
60
61EAPI const Evas_Smart_Cb_Description **
62evas_smart_callbacks_descriptions_get(const Evas_Smart *s, unsigned int *count)
63{
64 MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
65 if (count) *count = 0;
66 return NULL;
67 MAGIC_CHECK_END();
68
69 if (count) *count = s->callbacks.size;
70 return s->callbacks.array;
71}
72
73EAPI const Evas_Smart_Cb_Description *
74evas_smart_callback_description_find(const Evas_Smart *s, const char *name)
75{
76 if (!name) return NULL;
77 MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
78 return NULL;
79 MAGIC_CHECK_END();
80 return evas_smart_cb_description_find(&s->callbacks, name);
81}
82
83EAPI Eina_Bool
84evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size)
85{
86 unsigned int off;
87
88 /* api does not match abi! for now refuse as we only have 1 version */
89 if (parent_sc->version != EVAS_SMART_CLASS_VERSION) return EINA_FALSE;
90
91#define _CP(m) sc->m = parent_sc->m
92 _CP(add);
93 _CP(del);
94 _CP(move);
95 _CP(resize);
96 _CP(show);
97 _CP(hide);
98 _CP(color_set);
99 _CP(clip_set);
100 _CP(clip_unset);
101 _CP(calculate);
102 _CP(member_add);
103 _CP(member_del);
104#undef _CP
105
106 sc->parent = parent_sc;
107
108 off = sizeof(Evas_Smart_Class);
109 if (parent_sc_size == off) return EINA_TRUE;
110
111 memcpy(((char *)sc) + off, ((char *)parent_sc) + off, parent_sc_size - off);
112 return EINA_TRUE;
113}
114
115EAPI int
116evas_smart_usage_get(const Evas_Smart *s)
117{
118 MAGIC_CHECK(s, Evas_Smart, MAGIC_SMART);
119 return 0;
120 MAGIC_CHECK_END();
121 return s->usage;
122}
123
124
125/* internal funcs */
126void
127evas_object_smart_use(Evas_Smart *s)
128{
129 s->usage++;
130}
131
132void
133evas_object_smart_unuse(Evas_Smart *s)
134{
135 s->usage--;
136 if ((s->usage <= 0) && (s->delete_me)) evas_smart_free(s);
137}
138
139Eina_Bool
140evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size)
141{
142 void *tmp;
143
144 if (size == a->size)
145 return EINA_TRUE;
146
147 if (size == EINA_FALSE)
148 {
149 free(a->array);
150 a->array = NULL;
151 a->size = 0;
152 return EINA_TRUE;
153 }
154
155 tmp = realloc(a->array, (size + 1) * sizeof(Evas_Smart_Cb_Description *));
156 if (tmp)
157 {
158 a->array = tmp;
159 a->size = size;
160 a->array[size] = NULL;
161 return EINA_TRUE;
162 }
163 else
164 {
165 ERR("realloc failed!");
166 return EINA_FALSE;
167 }
168}
169
170static int
171_evas_smart_cb_description_cmp_sort(const void *p1, const void *p2)
172{
173 const Evas_Smart_Cb_Description **a = (const Evas_Smart_Cb_Description **)p1;
174 const Evas_Smart_Cb_Description **b = (const Evas_Smart_Cb_Description **)p2;
175 return strcmp((*a)->name, (*b)->name);
176}
177
178void
179evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a)
180{
181 unsigned int i, j;
182
183 if (!a)
184 {
185 ERR("no array to fix!");
186 return;
187 }
188
189 qsort(a->array, a->size, sizeof(Evas_Smart_Cb_Description *),
190 _evas_smart_cb_description_cmp_sort);
191
192 DBG("%u callbacks", a->size);
193 if (a->size)
194 DBG("%s [type=%s]", a->array[0]->name, a->array[0]->type);
195
196 for (i = 0, j = 1; j < a->size; j++)
197 {
198 const Evas_Smart_Cb_Description *cur, *prev;
199
200 cur = a->array[j];
201 prev = a->array[i];
202
203 DBG("%s [type=%s]", cur->name, cur->type);
204
205 if (strcmp(cur->name, prev->name) != 0)
206 {
207 i++;
208 if (i != j)
209 a->array[i] = a->array[j];
210 }
211 else
212 {
213 if (strcmp(cur->type, prev->type) == 0)
214 WRN("duplicated smart callback description"
215 " with name '%s' and type '%s'", cur->name, cur->type);
216 else
217 ERR("callback descriptions named '%s' differ"
218 " in type, keeping '%s', ignoring '%s'",
219 cur->name, prev->type, cur->type);
220 }
221 }
222
223 evas_smart_cb_descriptions_resize(a, i + 1);
224}
225
226static void
227_evas_smart_class_callbacks_create(Evas_Smart *s)
228{
229 const Evas_Smart_Class *sc;
230 unsigned int n = 0;
231
232 for (sc = s->smart_class; sc; sc = sc->parent)
233 {
234 const Evas_Smart_Cb_Description *d;
235 for (d = sc->callbacks; d && d->name; d++)
236 n++;
237 }
238
239 if (n == 0) return;
240 if (!evas_smart_cb_descriptions_resize(&s->callbacks, n)) return;
241 for (n = 0, sc = s->smart_class; sc; sc = sc->parent)
242 {
243 const Evas_Smart_Cb_Description *d;
244 for (d = sc->callbacks; d && d->name; d++)
245 s->callbacks.array[n++] = d;
246 }
247 evas_smart_cb_descriptions_fix(&s->callbacks);
248}
249
250static int
251_evas_smart_cb_description_cmp_search(const void *p1, const void *p2)
252{
253 const char *name = p1;
254 const Evas_Smart_Cb_Description **v = (const Evas_Smart_Cb_Description **)p2;
255 /* speed up string shares searches (same pointers) */
256 if (name == (*v)->name) return 0;
257 return strcmp(name, (*v)->name);
258}
259
260const Evas_Smart_Cb_Description *
261evas_smart_cb_description_find(const Evas_Smart_Cb_Description_Array *a, const char *name)
262{
263 if (!a->array) return NULL;
264 return bsearch(name, a->array, a->size, sizeof(Evas_Smart_Cb_Description *),
265 _evas_smart_cb_description_cmp_search);
266}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4static Evas_Object *
5evas_object_above_get_internal(const Evas_Object *obj)
6{
7 if ((EINA_INLIST_GET(obj))->next)
8 return (Evas_Object *)((EINA_INLIST_GET(obj))->next);
9 else
10 {
11 if ((EINA_INLIST_GET(((Evas_Object*)(obj))->layer))->next)
12 {
13 Evas_Layer *l;
14
15 l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->next);
16 return l->objects;
17 }
18 }
19 return NULL;
20}
21
22static Evas_Object *
23evas_object_below_get_internal(const Evas_Object *obj)
24{
25 if ((EINA_INLIST_GET(obj))->prev)
26 return (Evas_Object *)((EINA_INLIST_GET(obj))->prev);
27 else
28 {
29 if ((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev)
30 {
31 Evas_Layer *l;
32
33 l = (Evas_Layer *)((EINA_INLIST_GET((((Evas_Object *)obj)->layer)))->prev);
34 return (Evas_Object *)((EINA_INLIST_GET((l->objects)))->last);
35 }
36 }
37 return NULL;
38}
39
40EAPI void
41evas_object_raise(Evas_Object *obj)
42{
43 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
44 return;
45 MAGIC_CHECK_END();
46 if (evas_object_intercept_call_raise(obj)) return;
47 if (!((EINA_INLIST_GET(obj))->next))
48 {
49 evas_object_inform_call_restack(obj);
50 return;
51 }
52 if (obj->smart.parent)
53 evas_object_smart_member_raise(obj);
54 else
55 {
56 if (obj->in_layer)
57 obj->layer->objects = (Evas_Object *)eina_inlist_demote(EINA_INLIST_GET(obj->layer->objects), EINA_INLIST_GET(obj));
58 }
59 if (obj->clip.clipees)
60 {
61 evas_object_inform_call_restack(obj);
62 return;
63 }
64 if (obj->layer) evas_render_invalidate(obj->layer->evas);
65 obj->restack = EINA_TRUE;
66 evas_object_change(obj);
67 evas_object_inform_call_restack(obj);
68 if (obj->layer->evas->events_frozen > 0) return;
69 if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
70 {
71 if (!obj->smart.smart)
72 {
73 if (evas_object_is_in_output_rect(obj,
74 obj->layer->evas->pointer.x,
75 obj->layer->evas->pointer.y,
76 1, 1) && obj->cur.visible)
77 evas_event_feed_mouse_move(obj->layer->evas,
78 obj->layer->evas->pointer.x,
79 obj->layer->evas->pointer.y,
80 obj->layer->evas->last_timestamp,
81 NULL);
82 }
83 }
84}
85
86EAPI void
87evas_object_lower(Evas_Object *obj)
88{
89 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
90 return;
91 MAGIC_CHECK_END();
92 if (evas_object_intercept_call_lower(obj)) return;
93 if (!((EINA_INLIST_GET(obj))->prev))
94 {
95 evas_object_inform_call_restack(obj);
96 return;
97 }
98 if (obj->smart.parent)
99 evas_object_smart_member_lower(obj);
100 else
101 {
102 if (obj->in_layer)
103 obj->layer->objects = (Evas_Object *)eina_inlist_promote(EINA_INLIST_GET(obj->layer->objects),
104 EINA_INLIST_GET(obj));
105 }
106 if (obj->clip.clipees)
107 {
108 evas_object_inform_call_restack(obj);
109 return;
110 }
111 if (obj->layer) evas_render_invalidate(obj->layer->evas);
112 obj->restack = EINA_TRUE;
113 evas_object_change(obj);
114 evas_object_inform_call_restack(obj);
115 if (obj->layer->evas->events_frozen > 0) return;
116 if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
117 {
118 if (!obj->smart.smart)
119 {
120 if (evas_object_is_in_output_rect(obj,
121 obj->layer->evas->pointer.x,
122 obj->layer->evas->pointer.y,
123 1, 1) && obj->cur.visible)
124 evas_event_feed_mouse_move(obj->layer->evas,
125 obj->layer->evas->pointer.x,
126 obj->layer->evas->pointer.y,
127 obj->layer->evas->last_timestamp,
128 NULL);
129 }
130 }
131}
132
133EAPI void
134evas_object_stack_above(Evas_Object *obj, Evas_Object *above)
135{
136 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
137 return;
138 MAGIC_CHECK_END();
139 MAGIC_CHECK(above, Evas_Object, MAGIC_OBJ);
140 return;
141 MAGIC_CHECK_END();
142 if (obj == above) return;
143 if (evas_object_intercept_call_stack_above(obj, above)) return;
144 if (!above)
145 {
146 evas_object_raise(obj);
147 return;
148 }
149 if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above))
150 {
151 evas_object_inform_call_restack(obj);
152 return;
153 }
154 if (obj->smart.parent)
155 {
156 if (obj->smart.parent != above->smart.parent)
157 {
158 ERR("BITCH! evas_object_stack_above(), %p not inside same smart as %p!", obj, above);
159 return;
160 }
161 evas_object_smart_member_stack_above(obj, above);
162 }
163 else
164 {
165 if (above->smart.parent)
166 {
167 ERR("BITCH! evas_object_stack_above(), %p stack above %p, but above has smart parent, obj does not", obj, above);
168 return;
169 }
170 if (obj->layer != above->layer)
171 {
172 ERR("BITCH! evas_object_stack_above(), %p stack above %p, not matching layers", obj, above);
173 return;
174 }
175 if (obj->in_layer)
176 {
177 obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
178 EINA_INLIST_GET(obj));
179 obj->layer->objects = (Evas_Object *)eina_inlist_append_relative(EINA_INLIST_GET(obj->layer->objects),
180 EINA_INLIST_GET(obj),
181 EINA_INLIST_GET(above));
182 }
183 }
184 if (obj->clip.clipees)
185 {
186 evas_object_inform_call_restack(obj);
187 return;
188 }
189 if (obj->layer) evas_render_invalidate(obj->layer->evas);
190 obj->restack = EINA_TRUE;
191 evas_object_change(obj);
192 evas_object_inform_call_restack(obj);
193 if (obj->layer->evas->events_frozen > 0) return;
194 if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
195 {
196 if (!obj->smart.smart)
197 {
198 if (evas_object_is_in_output_rect(obj,
199 obj->layer->evas->pointer.x,
200 obj->layer->evas->pointer.y,
201 1, 1) && obj->cur.visible)
202 evas_event_feed_mouse_move(obj->layer->evas,
203 obj->layer->evas->pointer.x,
204 obj->layer->evas->pointer.y,
205 obj->layer->evas->last_timestamp,
206 NULL);
207 }
208 }
209}
210
211EAPI void
212evas_object_stack_below(Evas_Object *obj, Evas_Object *below)
213{
214 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
215 return;
216 MAGIC_CHECK_END();
217 MAGIC_CHECK(below, Evas_Object, MAGIC_OBJ);
218 return;
219 MAGIC_CHECK_END();
220 if (obj == below) return;
221 if (evas_object_intercept_call_stack_below(obj, below)) return;
222 if (!below)
223 {
224 evas_object_lower(obj);
225 return;
226 }
227 if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below))
228 {
229 evas_object_inform_call_restack(obj);
230 return;
231 }
232 if (obj->smart.parent)
233 {
234 if (obj->smart.parent != below->smart.parent)
235 {
236 ERR("BITCH! evas_object_stack_below(), %p not inside same smart as %p!", obj, below);
237 return;
238 }
239 evas_object_smart_member_stack_below(obj, below);
240 }
241 else
242 {
243 if (below->smart.parent)
244 {
245 ERR("BITCH! evas_object_stack_below(), %p stack below %p, but below has smart parent, obj does not", obj, below);
246 return;
247 }
248 if (obj->layer != below->layer)
249 {
250 ERR("BITCH! evas_object_stack_below(), %p stack below %p, not matching layers", obj, below);
251 return;
252 }
253 if (obj->in_layer)
254 {
255 obj->layer->objects = (Evas_Object *)eina_inlist_remove(EINA_INLIST_GET(obj->layer->objects),
256 EINA_INLIST_GET(obj));
257 obj->layer->objects = (Evas_Object *)eina_inlist_prepend_relative(EINA_INLIST_GET(obj->layer->objects),
258 EINA_INLIST_GET(obj),
259 EINA_INLIST_GET(below));
260 }
261 }
262 if (obj->clip.clipees)
263 {
264 evas_object_inform_call_restack(obj);
265 return;
266 }
267 if (obj->layer) evas_render_invalidate(obj->layer->evas);
268 obj->restack = EINA_TRUE;
269 evas_object_change(obj);
270 evas_object_inform_call_restack(obj);
271 if (obj->layer->evas->events_frozen > 0) return;
272 if ((!evas_event_passes_through(obj)) && (!evas_event_freezes_through(obj)))
273 {
274 if (!obj->smart.smart)
275 {
276 if (evas_object_is_in_output_rect(obj,
277 obj->layer->evas->pointer.x,
278 obj->layer->evas->pointer.y,
279 1, 1) && obj->cur.visible)
280 evas_event_feed_mouse_move(obj->layer->evas,
281 obj->layer->evas->pointer.x,
282 obj->layer->evas->pointer.y,
283 obj->layer->evas->last_timestamp,
284 NULL);
285 }
286 }
287}
288
289EAPI Evas_Object *
290evas_object_above_get(const Evas_Object *obj)
291{
292 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
293 return NULL;
294 MAGIC_CHECK_END();
295 if (obj->smart.parent)
296 {
297 do
298 {
299 obj = (Evas_Object *)((EINA_INLIST_GET(obj))->next);
300 if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj;
301 }
302 while (obj);
303 return NULL;
304 }
305 obj = evas_object_above_get_internal(obj);
306 while (obj)
307 {
308 if (!obj->delete_me) return (Evas_Object *)obj;
309 obj = evas_object_above_get_internal(obj);
310 }
311 return NULL;
312}
313
314EAPI Evas_Object *
315evas_object_below_get(const Evas_Object *obj)
316{
317 MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
318 return NULL;
319 MAGIC_CHECK_END();
320 if (obj->smart.parent)
321 {
322 do
323 {
324 obj = (Evas_Object *)((EINA_INLIST_GET(obj))->prev);
325 if ((obj) && (!obj->delete_me)) return (Evas_Object *)obj;
326 }
327 while (obj);
328 return NULL;
329 }
330 obj = evas_object_below_get_internal(obj);
331 while (obj)
332 {
333 if (!obj->delete_me) return (Evas_Object *)obj;
334 obj = evas_object_below_get_internal(obj);
335 }
336 return NULL;
337}
338
339
340
341EAPI Evas_Object *
342evas_object_bottom_get(const Evas *e)
343{
344 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
345 return NULL;
346 MAGIC_CHECK_END();
347 if (e->layers)
348 {
349 Evas_Object *obj;
350
351 obj = e->layers->objects;
352 while (obj)
353 {
354 if (!obj->delete_me) return obj;
355 obj = evas_object_above_get_internal(obj);
356 }
357 }
358 return NULL;
359}
360
361EAPI Evas_Object *
362evas_object_top_get(const Evas *e)
363{
364 Evas_Object *obj = NULL;
365 Eina_Inlist *list;
366 Evas_Layer *layer;
367
368 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
369 return NULL;
370 MAGIC_CHECK_END();
371
372 list = EINA_INLIST_GET(e->layers);
373 if (!list) return NULL;
374
375 layer = (Evas_Layer *) list->last;
376 if (!layer) return NULL;
377
378 list = EINA_INLIST_GET(layer->objects);
379 if (!list) return NULL;
380
381 obj = (Evas_Object *) list->last;
382 if (!obj) return NULL;
383
384 while (obj)
385 {
386 if (!obj->delete_me) return obj;
387 obj = evas_object_below_get_internal(obj);
388 }
389
390 return obj;
391}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3#include "evas_cs.h"
4
5EAPI Eina_Bool
6evas_cserve_want_get(void)
7{
8#ifdef EVAS_CSERVE
9 return evas_cserve_use_get();
10#endif
11 return 0;
12}
13
14EAPI Eina_Bool
15evas_cserve_connected_get(void)
16{
17#ifdef EVAS_CSERVE
18 return evas_cserve_have_get();
19#endif
20 return 0;
21}
22
23EAPI Eina_Bool
24evas_cserve_stats_get(Evas_Cserve_Stats *stats)
25{
26#ifdef EVAS_CSERVE
27 Op_Getstats_Reply st;
28
29 if (!evas_cserve_raw_stats_get(&st)) return 0;
30 if (!stats) return 1;
31 stats->saved_memory = st.saved_memory;
32 stats->wasted_memory = st.wasted_memory;
33 stats->saved_memory_peak = st.saved_memory_peak;
34 stats->wasted_memory_peak = st.wasted_memory_peak;
35 stats->saved_time_image_header_load = st.saved_time_image_header_load;
36 stats->saved_time_image_data_load = st.saved_time_image_data_load;
37 // may expand this in future
38 return 1;
39#else
40 (void) stats;
41 return 0;
42#endif
43}
44
45EAPI Eina_Bool
46evas_cserve_image_cache_contents_get(Evas_Cserve_Image_Cache *cache)
47{
48#ifdef EVAS_CSERVE
49 Op_Getinfo_Reply *info;
50 unsigned char *p;
51 int i, j;
52
53 if (!(info = evas_cserve_raw_info_get())) return 0;
54 if (!cache)
55 {
56 free(info);
57 return 1;
58 }
59 cache->active.mem_total = info->active.mem_total;
60 cache->active.count = info->active.count;
61 cache->cached.mem_total = info->cached.mem_total;
62 cache->cached.count = info->cached.count;
63 cache->images = NULL;
64 j = info->active.count + info->cached.count;
65 p = (unsigned char *)info;
66 p += sizeof(Op_Getinfo_Reply);
67 for (i = 0; i < j; i++)
68 {
69 Evas_Cserve_Image *im;
70 Op_Getinfo_Item it;
71 char *file, *key;
72
73 memcpy(&it, p, sizeof(Op_Getinfo_Item));
74 file = (char*) (p + sizeof(Op_Getinfo_Item));
75 key = file + strlen(file) + 1;
76 im = calloc(1, sizeof(Evas_Cserve_Image));
77 if (!im) continue;
78 if (file[0] != 0)
79 {
80 file = (char *)eina_stringshare_add(file);
81 if (!file)
82 {
83 free(im);
84 continue;
85 }
86 }
87 else
88 file = NULL;
89 if (key[0] != 0)
90 {
91 key = (char *)eina_stringshare_add(key);
92 if (!key)
93 {
94 if (file) eina_stringshare_del(file);
95 free(im);
96 continue;
97 }
98 }
99 else key = NULL;
100 cache->images = eina_list_append(cache->images, im);
101 im->file = file;
102 im->key = key;
103 im->w = it.w;
104 im->h = it.h;
105 im->cached_time = it.cached_time;
106 im->file_mod_time = it.file_mod_time;
107 im->file_checked_time = it.file_checked_time;
108 im->refcount = it.refcount;
109 im->data_refcount = it.data_refcount;
110 im->memory_footprint = it.memory_footprint;
111 im->head_load_time = it.head_load_time;
112 im->data_load_time = it.data_load_time;
113 im->active = it.active;
114 im->alpha = it.alpha;
115 im->data_loaded = it.data_loaded;
116 im->dead = it.dead;
117 im->useless = it.useless;
118 }
119 free(info);
120 return 1;
121#else
122 (void) cache;
123 return 0;
124#endif
125}
126
127EAPI void
128evas_cserve_image_cache_contents_clean(Evas_Cserve_Image_Cache *cache)
129{
130#ifdef EVAS_CSERVE
131 Evas_Cserve_Image *im;
132
133 EINA_LIST_FREE(cache->images, im)
134 {
135 if (im->file) eina_stringshare_del(im->file);
136 if (im->key) eina_stringshare_del(im->key);
137 free(im);
138 }
139#else
140 (void) cache;
141#endif
142}
143
144EAPI Eina_Bool
145evas_cserve_config_get(Evas_Cserve_Config *config)
146{
147#ifdef EVAS_CSERVE
148 Op_Getconfig_Reply conf;
149
150 if (!evas_cserve_raw_config_get(&conf)) return 0;
151 if (!config) return 1;
152 config->cache_max_usage = conf.cache_max_usage;
153 config->cache_item_timeout = conf.cache_item_timeout;
154 config->cache_item_timeout_check = conf.cache_item_timeout_check;
155 return 1;
156#else
157 (void) config;
158 return 0;
159#endif
160}
161
162EAPI Eina_Bool
163evas_cserve_config_set(const Evas_Cserve_Config *config)
164{
165#ifdef EVAS_CSERVE
166 Op_Setconfig conf;
167
168 if (!config) return 1;
169 conf.cache_max_usage = config->cache_max_usage;
170 conf.cache_item_timeout = config->cache_item_timeout;
171 conf.cache_item_timeout_check = config->cache_item_timeout_check;
172 return evas_cserve_raw_config_set(&conf);
173#else
174 (void) config;
175 return 0;
176#endif
177}
178
179EAPI void
180evas_cserve_disconnect(void)
181{
182#ifdef EVAS_CSERVE
183 evas_cserve_discon();
184#endif
185}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4void
5_evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y)
6{
7 Evas_Coord_Touch_Point *point;
8
9 /* create new Evas_Coord_Touch_Point */
10 point = (Evas_Coord_Touch_Point *)calloc(1, sizeof(Evas_Coord_Touch_Point));
11 point->x = x;
12 point->y = y;
13 point->id = id;
14 point->state = EVAS_TOUCH_POINT_DOWN;
15 e->touch_points = eina_list_append(e->touch_points, point);
16}
17
18void
19_evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state)
20{
21 Eina_List *l;
22 Evas_Coord_Touch_Point *point = NULL;
23
24 EINA_LIST_FOREACH(e->touch_points, l, point)
25 {
26 if (point->id == id)
27 {
28 point->x = x;
29 point->y = y;
30 point->state = state;
31 break;
32 }
33 }
34}
35
36void
37_evas_touch_point_remove(Evas *e, int id)
38{
39 Eina_List *l;
40 Evas_Coord_Touch_Point *point = NULL;
41
42 EINA_LIST_FOREACH(e->touch_points, l, point)
43 {
44 if (point->id == id)
45 {
46 e->touch_points = eina_list_remove(e->touch_points, point);
47 free(point);
48 break;
49 }
50 }
51}
52
53EAPI unsigned int
54evas_touch_point_list_count(Evas *e)
55{
56 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
57 return 0;
58 MAGIC_CHECK_END();
59 return eina_list_count(e->touch_points);
60}
61
62EAPI void
63evas_touch_point_list_nth_xy_get(Evas *e, unsigned int n, Evas_Coord *x, Evas_Coord *y)
64{
65 Evas_Coord_Touch_Point *point = NULL;
66
67 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
68 if (x) *x = 0;
69 if (y) *y = 0;
70 return;
71 MAGIC_CHECK_END();
72
73 point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
74 if (!point)
75 {
76 if (x) *x = 0;
77 if (y) *y = 0;
78 return;
79 }
80 if (x) *x = point->x;
81 if (y) *y = point->y;
82}
83
84EAPI int
85evas_touch_point_list_nth_id_get(Evas *e, unsigned int n)
86{
87 Evas_Coord_Touch_Point *point = NULL;
88
89 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
90 return -1;
91 MAGIC_CHECK_END();
92
93 point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
94 if (!point) return -1;
95 return point->id;
96}
97
98EAPI Evas_Touch_Point_State
99evas_touch_point_list_nth_state_get(Evas *e, unsigned int n)
100{
101 Evas_Coord_Touch_Point *point = NULL;
102
103 MAGIC_CHECK(e, Evas, MAGIC_EVAS);
104 return EVAS_TOUCH_POINT_CANCEL;
105 MAGIC_CHECK_END();
106
107 point = (Evas_Coord_Touch_Point *)eina_list_nth(e->touch_points, n);
108 if (!point) return EVAS_TOUCH_POINT_CANCEL;
109 return point->state;
110}
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3AM_CPPFLAGS = \
4-I. \
5-I$(top_srcdir)/src/lib \
6-I$(top_srcdir)/src/lib/include \
7-I$(top_srcdir)/src/lib/cserve \
8-DPACKAGE_BIN_DIR=\"$(bindir)\" \
9-DPACKAGE_LIB_DIR=\"$(libdir)\" \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11@EINA_CFLAGS@ \
12@FREETYPE_CFLAGS@ \
13@FRIBIDI_CFLAGS@ \
14@EET_CFLAGS@ \
15@FONTCONFIG_CFLAGS@ \
16@pthread_cflags@ \
17@PIXMAN_CFLAGS@
18
19if EVAS_CSERVE
20
21noinst_LTLIBRARIES = libevas_cserve.la
22
23endif
24
25libevas_cserve_la_SOURCES = \
26evas_cs.h \
27evas_cs_main.c \
28evas_cs_server.c \
29evas_cs_client.c \
30evas_cs_mem.c
31
32libevas_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/cserve
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_cserve_la_DEPENDENCIES =
61am_libevas_cserve_la_OBJECTS = evas_cs_main.lo evas_cs_server.lo \
62 evas_cs_client.lo evas_cs_mem.lo
63libevas_cserve_la_OBJECTS = $(am_libevas_cserve_la_OBJECTS)
64AM_V_lt = $(am__v_lt_$(V))
65am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
66am__v_lt_0 = --silent
67@EVAS_CSERVE_TRUE@am_libevas_cserve_la_rpath =
68DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
69depcomp = $(SHELL) $(top_srcdir)/depcomp
70am__depfiles_maybe = depfiles
71am__mv = mv -f
72COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
73 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
74LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
75 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
76 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
77 $(AM_CFLAGS) $(CFLAGS)
78AM_V_CC = $(am__v_CC_$(V))
79am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
80am__v_CC_0 = @echo " CC " $@;
81AM_V_at = $(am__v_at_$(V))
82am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
83am__v_at_0 = @
84CCLD = $(CC)
85LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
86 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
87 $(AM_LDFLAGS) $(LDFLAGS) -o $@
88AM_V_CCLD = $(am__v_CCLD_$(V))
89am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
90am__v_CCLD_0 = @echo " CCLD " $@;
91AM_V_GEN = $(am__v_GEN_$(V))
92am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
93am__v_GEN_0 = @echo " GEN " $@;
94SOURCES = $(libevas_cserve_la_SOURCES)
95DIST_SOURCES = $(libevas_cserve_la_SOURCES)
96ETAGS = etags
97CTAGS = ctags
98DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
99ACLOCAL = @ACLOCAL@
100ALLOCA = @ALLOCA@
101AMTAR = @AMTAR@
102AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
103AR = @AR@
104AS = @AS@
105AUTOCONF = @AUTOCONF@
106AUTOHEADER = @AUTOHEADER@
107AUTOMAKE = @AUTOMAKE@
108AWK = @AWK@
109CC = @CC@
110CCDEPMODE = @CCDEPMODE@
111CFLAGS = @CFLAGS@
112CHECK_CFLAGS = @CHECK_CFLAGS@
113CHECK_LIBS = @CHECK_LIBS@
114CPP = @CPP@
115CPPFLAGS = @CPPFLAGS@
116CXX = @CXX@
117CXXCPP = @CXXCPP@
118CXXDEPMODE = @CXXDEPMODE@
119CXXFLAGS = @CXXFLAGS@
120CYGPATH_W = @CYGPATH_W@
121DEFS = @DEFS@
122DEPDIR = @DEPDIR@
123DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
124DIRECTFB_LIBS = @DIRECTFB_LIBS@
125DLLTOOL = @DLLTOOL@
126DSYMUTIL = @DSYMUTIL@
127DUMPBIN = @DUMPBIN@
128ECHO_C = @ECHO_C@
129ECHO_N = @ECHO_N@
130ECHO_T = @ECHO_T@
131ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
132ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
133EDB_CFLAGS = @EDB_CFLAGS@
134EDB_LIBS = @EDB_LIBS@
135EDJE_CFLAGS = @EDJE_CFLAGS@
136EDJE_LIBS = @EDJE_LIBS@
137EET_CFLAGS = @EET_CFLAGS@
138EET_LIBS = @EET_LIBS@
139EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
140EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
141EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
142EGREP = @EGREP@
143EINA_CFLAGS = @EINA_CFLAGS@
144EINA_LIBS = @EINA_LIBS@
145EVAS_CFLAGS = @EVAS_CFLAGS@
146EVAS_LIBS = @EVAS_LIBS@
147EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
148EVIL_CFLAGS = @EVIL_CFLAGS@
149EVIL_LIBS = @EVIL_LIBS@
150EXEEXT = @EXEEXT@
151EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
152EXOTIC_LIBS = @EXOTIC_LIBS@
153FGREP = @FGREP@
154FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
155FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
156FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
157FREETYPE_LIBS = @FREETYPE_LIBS@
158FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
159FRIBIDI_LIBS = @FRIBIDI_LIBS@
160GL_EET_CFLAGS = @GL_EET_CFLAGS@
161GL_EET_LIBS = @GL_EET_LIBS@
162GREP = @GREP@
163HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
164HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
165INSTALL = @INSTALL@
166INSTALL_DATA = @INSTALL_DATA@
167INSTALL_PROGRAM = @INSTALL_PROGRAM@
168INSTALL_SCRIPT = @INSTALL_SCRIPT@
169INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
170LD = @LD@
171LDFLAGS = @LDFLAGS@
172LIBOBJS = @LIBOBJS@
173LIBS = @LIBS@
174LIBTOOL = @LIBTOOL@
175LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
176LINEBREAK_LIBS = @LINEBREAK_LIBS@
177LIPO = @LIPO@
178LN_S = @LN_S@
179LTLIBOBJS = @LTLIBOBJS@
180MAKEINFO = @MAKEINFO@
181MKDIR_P = @MKDIR_P@
182MODULE_ARCH = @MODULE_ARCH@
183NM = @NM@
184NMEDIT = @NMEDIT@
185OBJC = @OBJC@
186OBJCDEPMODE = @OBJCDEPMODE@
187OBJCFLAGS = @OBJCFLAGS@
188OBJDUMP = @OBJDUMP@
189OBJEXT = @OBJEXT@
190OTOOL = @OTOOL@
191OTOOL64 = @OTOOL64@
192PACKAGE = @PACKAGE@
193PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
194PACKAGE_NAME = @PACKAGE_NAME@
195PACKAGE_STRING = @PACKAGE_STRING@
196PACKAGE_TARNAME = @PACKAGE_TARNAME@
197PACKAGE_URL = @PACKAGE_URL@
198PACKAGE_VERSION = @PACKAGE_VERSION@
199PATH_SEPARATOR = @PATH_SEPARATOR@
200PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
201PIXMAN_LIBS = @PIXMAN_LIBS@
202PKG_CONFIG = @PKG_CONFIG@
203PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
204PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
205PNG_CFLAGS = @PNG_CFLAGS@
206PNG_LIBS = @PNG_LIBS@
207RANLIB = @RANLIB@
208SDL_CFLAGS = @SDL_CFLAGS@
209SDL_LIBS = @SDL_LIBS@
210SED = @SED@
211SET_MAKE = @SET_MAKE@
212SHELL = @SHELL@
213SHM_OPEN_LINK = @SHM_OPEN_LINK@
214STRIP = @STRIP@
215SVG_CFLAGS = @SVG_CFLAGS@
216SVG_LIBS = @SVG_LIBS@
217VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
218VALGRIND_LIBS = @VALGRIND_LIBS@
219VERSION = @VERSION@
220VMAJ = @VMAJ@
221WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
222WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
223XCB_CFLAGS = @XCB_CFLAGS@
224XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
225XCB_GL_LIBS = @XCB_GL_LIBS@
226XCB_LIBS = @XCB_LIBS@
227XEXT_CFLAGS = @XEXT_CFLAGS@
228XEXT_LIBS = @XEXT_LIBS@
229XMKMF = @XMKMF@
230X_CFLAGS = @X_CFLAGS@
231X_EXTRA_LIBS = @X_EXTRA_LIBS@
232X_LIBS = @X_LIBS@
233X_PRE_LIBS = @X_PRE_LIBS@
234abs_builddir = @abs_builddir@
235abs_srcdir = @abs_srcdir@
236abs_top_builddir = @abs_top_builddir@
237abs_top_srcdir = @abs_top_srcdir@
238ac_ct_CC = @ac_ct_CC@
239ac_ct_CXX = @ac_ct_CXX@
240ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
241ac_ct_OBJC = @ac_ct_OBJC@
242altivec_cflags = @altivec_cflags@
243am__include = @am__include@
244am__leading_dot = @am__leading_dot@
245am__quote = @am__quote@
246am__tar = @am__tar@
247am__untar = @am__untar@
248bindir = @bindir@
249build = @build@
250build_alias = @build_alias@
251build_cpu = @build_cpu@
252build_os = @build_os@
253build_vendor = @build_vendor@
254builddir = @builddir@
255datadir = @datadir@
256datarootdir = @datarootdir@
257dlopen_libs = @dlopen_libs@
258docdir = @docdir@
259dvidir = @dvidir@
260edje_cc = @edje_cc@
261efl_doxygen = @efl_doxygen@
262efl_have_doxygen = @efl_have_doxygen@
263evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
264evas_engine_buffer_libs = @evas_engine_buffer_libs@
265evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
266evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
267evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
268evas_engine_directfb_libs = @evas_engine_directfb_libs@
269evas_engine_fb_cflags = @evas_engine_fb_cflags@
270evas_engine_fb_libs = @evas_engine_fb_libs@
271evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
272evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
273evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
274evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
275evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
276evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
277evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
278evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
279evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
280evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
281evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
282evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
283evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
284evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
285evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
286evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
287evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
288evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
289evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
290evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
291evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
292evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
293evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
294evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
295evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
296evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
297evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
298evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
299evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
300evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
301evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
302evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
303evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
304evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
305evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
306evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
307evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
308evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
309evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
310evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
311evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
312evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
313evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
314evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
315evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
316evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
317evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
318evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
319evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
320evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
321evas_image_loader_png_libs = @evas_image_loader_png_libs@
322evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
323evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
324evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
325evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
326evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
327evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
328evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
329evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
330evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
331evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
332evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
333evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
334exec_prefix = @exec_prefix@
335have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
336have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
337have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
338have_evas_engine_software_x11 = @have_evas_engine_software_x11@
339have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
340have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
341have_lcov = @have_lcov@
342host = @host@
343host_alias = @host_alias@
344host_cpu = @host_cpu@
345host_os = @host_os@
346host_vendor = @host_vendor@
347htmldir = @htmldir@
348includedir = @includedir@
349infodir = @infodir@
350install_sh = @install_sh@
351libdir = @libdir@
352libexecdir = @libexecdir@
353localedir = @localedir@
354localstatedir = @localstatedir@
355lt_ECHO = @lt_ECHO@
356lt_enable_auto_import = @lt_enable_auto_import@
357mandir = @mandir@
358mkdir_p = @mkdir_p@
359oldincludedir = @oldincludedir@
360pdfdir = @pdfdir@
361pkgconfig_requires_private = @pkgconfig_requires_private@
362prefix = @prefix@
363program_transform_name = @program_transform_name@
364psdir = @psdir@
365pthread_cflags = @pthread_cflags@
366pthread_libs = @pthread_libs@
367release_info = @release_info@
368requirement_evas = @requirement_evas@
369sbindir = @sbindir@
370sharedstatedir = @sharedstatedir@
371srcdir = @srcdir@
372sysconfdir = @sysconfdir@
373target_alias = @target_alias@
374top_build_prefix = @top_build_prefix@
375top_builddir = @top_builddir@
376top_srcdir = @top_srcdir@
377version_info = @version_info@
378MAINTAINERCLEANFILES = Makefile.in
379AM_CPPFLAGS = \
380-I. \
381-I$(top_srcdir)/src/lib \
382-I$(top_srcdir)/src/lib/include \
383-I$(top_srcdir)/src/lib/cserve \
384-DPACKAGE_BIN_DIR=\"$(bindir)\" \
385-DPACKAGE_LIB_DIR=\"$(libdir)\" \
386-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
387@EINA_CFLAGS@ \
388@FREETYPE_CFLAGS@ \
389@FRIBIDI_CFLAGS@ \
390@EET_CFLAGS@ \
391@FONTCONFIG_CFLAGS@ \
392@pthread_cflags@ \
393@PIXMAN_CFLAGS@
394
395@EVAS_CSERVE_TRUE@noinst_LTLIBRARIES = libevas_cserve.la
396libevas_cserve_la_SOURCES = \
397evas_cs.h \
398evas_cs_main.c \
399evas_cs_server.c \
400evas_cs_client.c \
401evas_cs_mem.c
402
403libevas_cserve_la_LIBADD = @EINA_LIBS@ -lrt
404all: all-am
405
406.SUFFIXES:
407.SUFFIXES: .c .lo .o .obj
408$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
409 @for dep in $?; do \
410 case '$(am__configure_deps)' in \
411 *$$dep*) \
412 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
413 && { if test -f $@; then exit 0; else break; fi; }; \
414 exit 1;; \
415 esac; \
416 done; \
417 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/cserve/Makefile'; \
418 $(am__cd) $(top_srcdir) && \
419 $(AUTOMAKE) --gnu src/lib/cserve/Makefile
420.PRECIOUS: Makefile
421Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
422 @case '$?' in \
423 *config.status*) \
424 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
425 *) \
426 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
427 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
428 esac;
429
430$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
431 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
432
433$(top_srcdir)/configure: $(am__configure_deps)
434 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
435$(ACLOCAL_M4): $(am__aclocal_m4_deps)
436 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
437$(am__aclocal_m4_deps):
438
439clean-noinstLTLIBRARIES:
440 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
441 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
442 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
443 test "$$dir" != "$$p" || dir=.; \
444 echo "rm -f \"$${dir}/so_locations\""; \
445 rm -f "$${dir}/so_locations"; \
446 done
447libevas_cserve.la: $(libevas_cserve_la_OBJECTS) $(libevas_cserve_la_DEPENDENCIES)
448 $(AM_V_CCLD)$(LINK) $(am_libevas_cserve_la_rpath) $(libevas_cserve_la_OBJECTS) $(libevas_cserve_la_LIBADD) $(LIBS)
449
450mostlyclean-compile:
451 -rm -f *.$(OBJEXT)
452
453distclean-compile:
454 -rm -f *.tab.c
455
456@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_client.Plo@am__quote@
457@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_main.Plo@am__quote@
458@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_mem.Plo@am__quote@
459@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cs_server.Plo@am__quote@
460
461.c.o:
462@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
463@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
464@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
465@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
466@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
467@am__fastdepCC_FALSE@ $(COMPILE) -c $<
468
469.c.obj:
470@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
471@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
472@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
473@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
474@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
475@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
476
477.c.lo:
478@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
479@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
480@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
481@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
482@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
483@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
484
485mostlyclean-libtool:
486 -rm -f *.lo
487
488clean-libtool:
489 -rm -rf .libs _libs
490
491ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
492 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
493 unique=`for i in $$list; do \
494 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
495 done | \
496 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
497 END { if (nonempty) { for (i in files) print i; }; }'`; \
498 mkid -fID $$unique
499tags: TAGS
500
501TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
502 $(TAGS_FILES) $(LISP)
503 set x; \
504 here=`pwd`; \
505 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
506 unique=`for i in $$list; do \
507 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
508 done | \
509 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
510 END { if (nonempty) { for (i in files) print i; }; }'`; \
511 shift; \
512 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
513 test -n "$$unique" || unique=$$empty_fix; \
514 if test $$# -gt 0; then \
515 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
516 "$$@" $$unique; \
517 else \
518 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
519 $$unique; \
520 fi; \
521 fi
522ctags: CTAGS
523CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
524 $(TAGS_FILES) $(LISP)
525 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
526 unique=`for i in $$list; do \
527 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
528 done | \
529 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
530 END { if (nonempty) { for (i in files) print i; }; }'`; \
531 test -z "$(CTAGS_ARGS)$$unique" \
532 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
533 $$unique
534
535GTAGS:
536 here=`$(am__cd) $(top_builddir) && pwd` \
537 && $(am__cd) $(top_srcdir) \
538 && gtags -i $(GTAGS_ARGS) "$$here"
539
540distclean-tags:
541 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
542
543distdir: $(DISTFILES)
544 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
545 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
546 list='$(DISTFILES)'; \
547 dist_files=`for file in $$list; do echo $$file; done | \
548 sed -e "s|^$$srcdirstrip/||;t" \
549 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
550 case $$dist_files in \
551 */*) $(MKDIR_P) `echo "$$dist_files" | \
552 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
553 sort -u` ;; \
554 esac; \
555 for file in $$dist_files; do \
556 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
557 if test -d $$d/$$file; then \
558 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
559 if test -d "$(distdir)/$$file"; then \
560 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
561 fi; \
562 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
563 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
564 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
565 fi; \
566 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
567 else \
568 test -f "$(distdir)/$$file" \
569 || cp -p $$d/$$file "$(distdir)/$$file" \
570 || exit 1; \
571 fi; \
572 done
573check-am: all-am
574check: check-am
575all-am: Makefile $(LTLIBRARIES)
576installdirs:
577install: install-am
578install-exec: install-exec-am
579install-data: install-data-am
580uninstall: uninstall-am
581
582install-am: all-am
583 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
584
585installcheck: installcheck-am
586install-strip:
587 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
588 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
589 `test -z '$(STRIP)' || \
590 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
591mostlyclean-generic:
592
593clean-generic:
594
595distclean-generic:
596 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
597 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
598
599maintainer-clean-generic:
600 @echo "This command is intended for maintainers to use"
601 @echo "it deletes files that may require special tools to rebuild."
602 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
603clean: clean-am
604
605clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
606 mostlyclean-am
607
608distclean: distclean-am
609 -rm -rf ./$(DEPDIR)
610 -rm -f Makefile
611distclean-am: clean-am distclean-compile distclean-generic \
612 distclean-tags
613
614dvi: dvi-am
615
616dvi-am:
617
618html: html-am
619
620html-am:
621
622info: info-am
623
624info-am:
625
626install-data-am:
627
628install-dvi: install-dvi-am
629
630install-dvi-am:
631
632install-exec-am:
633
634install-html: install-html-am
635
636install-html-am:
637
638install-info: install-info-am
639
640install-info-am:
641
642install-man:
643
644install-pdf: install-pdf-am
645
646install-pdf-am:
647
648install-ps: install-ps-am
649
650install-ps-am:
651
652installcheck-am:
653
654maintainer-clean: maintainer-clean-am
655 -rm -rf ./$(DEPDIR)
656 -rm -f Makefile
657maintainer-clean-am: distclean-am maintainer-clean-generic
658
659mostlyclean: mostlyclean-am
660
661mostlyclean-am: mostlyclean-compile mostlyclean-generic \
662 mostlyclean-libtool
663
664pdf: pdf-am
665
666pdf-am:
667
668ps: ps-am
669
670ps-am:
671
672uninstall-am:
673
674.MAKE: install-am install-strip
675
676.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
677 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
678 distclean-compile distclean-generic distclean-libtool \
679 distclean-tags distdir dvi dvi-am html html-am info info-am \
680 install install-am install-data install-data-am install-dvi \
681 install-dvi-am install-exec install-exec-am install-html \
682 install-html-am install-info install-info-am install-man \
683 install-pdf install-pdf-am install-ps install-ps-am \
684 install-strip installcheck installcheck-am installdirs \
685 maintainer-clean maintainer-clean-generic mostlyclean \
686 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
687 pdf pdf-am ps ps-am tags uninstall uninstall-am
688
689
690# Tell versions [3.59,3.63) of GNU make to not export all variables.
691# Otherwise a system limit (for SysV at least) may be exceeded.
692.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 @@
1#ifndef EVAS_CS_H
2#define EVAS_CS_H 1
3
4#ifdef EVAS_CSERVE
5
6#include <sys/select.h>
7#include <sys/time.h>
8#include <sys/types.h>
9#include <sys/socket.h>
10#include <sys/mman.h>
11#include <sys/stat.h>
12#include <sys/param.h>
13#include <fcntl.h>
14#include <stdio.h>
15#include <stdlib.h>
16#include <unistd.h>
17#include <string.h>
18#include <netinet/in.h>
19#include <sys/un.h>
20#include <arpa/inet.h>
21#include <errno.h>
22
23#include "evas_common.h"
24#include "evas_private.h"
25
26#ifdef EAPI
27# undef EAPI
28#endif
29
30#ifdef _WIN32
31# ifdef EFL_EVAS_BUILD
32# ifdef DLL_EXPORT
33# define EAPI __declspec(dllexport)
34# else
35# define EAPI
36# endif /* ! DLL_EXPORT */
37# else
38# define EAPI __declspec(dllimport)
39# endif /* ! EFL_EVAS_BUILD */
40#else
41# ifdef __GNUC__
42# if __GNUC__ >= 4
43# define EAPI __attribute__ ((visibility("default")))
44# else
45# define EAPI
46# endif
47# else
48# define EAPI
49# endif
50#endif /* ! _WIN32 */
51
52#define LENGTH_OF_SOCKADDR_UN(s) (strlen((s)->sun_path) + (size_t)(((struct sockaddr_un *)NULL)->sun_path))
53
54typedef struct _Server Server;
55typedef struct _Client Client;
56typedef struct _Mem Mem;
57
58struct _Server
59{
60 char *socket_path;
61 Eina_List *clients;
62 int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data);
63 void *data;
64 pid_t pid;
65 int server_id;
66 // for channel 2;
67 struct {
68 int fd;
69 int req_from, req_to;
70 } ch[2];
71 void *main_handle;
72};
73
74struct _Client
75{
76 Server *server;
77 unsigned char *buf;
78 Client *client_main;
79 int bufsize, bufalloc;
80 int fd;
81 unsigned char *inbuf;
82 int inbufsize, inbufalloc;
83 unsigned char dead : 1;
84 void (*func) (void *fdata, Client *c);
85 void *data;
86 pid_t pid;
87 int req_from, req_to;
88 LK(lock);
89};
90
91struct _Mem
92{
93 unsigned char *data;
94 char *name;
95 int fd;
96 int id;
97 int offset;
98 int size;
99 int ref;
100 Eina_Bool write : 1;
101};
102
103//// for comms
104enum
105{
106 OP_NOP, // 0
107
108 OP_INIT, // 1
109 OP_LOAD, // 2
110 OP_UNLOAD, // 3
111 OP_LOADDATA, // 4
112 OP_UNLOADDATA, // 5
113 OP_USELESSDATA, // 6
114 OP_PRELOAD, // 7
115 OP_FORCEDUNLOAD, // 8
116
117 OP_GETCONFIG, // 9
118 OP_SETCONFIG, // 10
119 OP_GETSTATS, // 11
120 OP_GETINFO, // 12
121
122 OP_INVALID // 13
123};
124
125typedef struct
126{
127 pid_t pid;
128 int server_id;
129 void *handle;
130} Op_Init;
131typedef struct
132{
133 struct {
134 int scale_down_by;
135 double dpi;
136 int w, h;
137 struct {
138 int x, y, w, h;
139 } region;
140 Eina_Bool orientation;
141 } lopt;
142} Op_Load; // +"file""key"
143typedef struct
144{
145 void *handle;
146 int server_id;
147 struct {
148 int id;
149 int offset;
150 int size;
151 } mem;
152 struct {
153 int w, h;
154 Eina_Bool alpha : 1;
155 } image;
156} Op_Load_Reply;
157typedef struct
158{
159 void *handle;
160 int server_id;
161} Op_Unload;
162typedef struct
163{
164 void *handle;
165 int server_id;
166} Op_Unloaddata;
167typedef struct
168{
169 void *handle;
170 int server_id;
171} Op_Loaddata;
172typedef struct
173{
174 struct {
175 int id;
176 int offset;
177 int size;
178 } mem;
179} Op_Loaddata_Reply;
180typedef struct
181{
182 void *handle;
183 int server_id;
184} Op_Preload;
185typedef struct
186{
187 void *handle;
188 struct {
189 int id;
190 int offset;
191 int size;
192 } mem;
193} Op_Preload_Reply;
194typedef struct
195{
196 void *handle;
197 int server_id;
198} Op_Forcedunload;
199typedef struct
200{
201 int cache_max_usage;
202 int cache_item_timeout;
203 int cache_item_timeout_check;
204} Op_Getconfig_Reply;
205typedef struct
206{
207 int cache_max_usage;
208 int cache_item_timeout;
209 int cache_item_timeout_check;
210} Op_Setconfig;
211typedef struct
212{
213 int saved_memory;
214 int wasted_memory;
215 int saved_memory_peak;
216 int wasted_memory_peak;
217 double saved_time_image_header_load;
218 double saved_time_image_data_load;
219} Op_Getstats_Reply;
220typedef struct
221{
222 struct {
223 int mem_total;
224 int count;
225 } active, cached;
226} Op_Getinfo_Reply; // + N active Info Items + N cached items
227typedef struct
228{
229 int file_key_size;
230 int w, h;
231 time_t file_mod_time;
232 time_t file_checked_time;
233 time_t cached_time;
234 int refcount;
235 int data_refcount;
236 int memory_footprint;
237 double head_load_time;
238 double data_load_time;
239 Eina_Bool alpha : 1;
240 Eina_Bool data_loaded : 1;
241 Eina_Bool active : 1;
242 Eina_Bool dead : 1;
243 Eina_Bool useless : 1;
244} Op_Getinfo_Item; // + "file""key"
245
246
247// for clients to connect to cserve
248EAPI Eina_Bool evas_cserve_init(void);
249EAPI int evas_cserve_use_get(void);
250EAPI Eina_Bool evas_cserve_have_get(void);
251EAPI void evas_cserve_shutdown(void);
252EAPI void evas_cserve_discon(void);
253EAPI Eina_Bool evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt);
254EAPI Eina_Bool evas_cserve_image_data_load(Image_Entry *ie);
255EAPI void evas_cserve_image_unload(Image_Entry *ie);
256EAPI void evas_cserve_image_useless(Image_Entry *ie);
257EAPI void evas_cserve_image_free(Image_Entry *ie);
258EAPI Eina_Bool evas_cserve_raw_config_get(Op_Getconfig_Reply *config);
259EAPI Eina_Bool evas_cserve_raw_config_set(Op_Setconfig *config);
260EAPI Eina_Bool evas_cserve_raw_stats_get(Op_Getstats_Reply *stats);
261EAPI Op_Getinfo_Reply *evas_cserve_raw_info_get(void);
262
263// for the server
264EAPI Server *evas_cserve_server_add(void);
265EAPI void evas_cserve_server_del(Server *s);
266EAPI void evas_cserve_client_send(Client *c, int opcode, int size, unsigned char *data);
267EAPI 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);
268EAPI void evas_cserve_server_wait(Server *s, int timeout);
269
270//// for memory
271// for server
272EAPI Mem *evas_cserve_mem_new(int size, const char *name);
273EAPI void evas_cserve_mem_free(Mem *m);
274
275// for client
276EAPI Mem *evas_cserve_mem_open(int pid, int id, const char *name, int size, int do_write);
277EAPI void evas_cserve_mem_close(Mem *m);
278
279// for both
280EAPI Eina_Bool evas_cserve_mem_resize(Mem *m, int size);
281EAPI void evas_cserve_mem_del(int pid, int id);
282
283#endif
284
285#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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include <signal.h>
6
7#include "evas_cs.h"
8
9#ifdef EVAS_CSERVE
10
11static Server *cserve = NULL;
12static int csrve_init = 0;
13static int connect_num = 0;
14static int cserve_discon = 0;
15
16static void
17pipe_handler(int x __UNUSED__, siginfo_t *info __UNUSED__, void *data __UNUSED__)
18{
19}
20
21static void
22pipe_handle(int push)
23{
24 static struct sigaction old_action;
25 struct sigaction action;
26
27 if (push)
28 {
29 action.sa_handler = NULL;
30 action.sa_sigaction = pipe_handler;
31 action.sa_flags = SA_RESTART | SA_SIGINFO;
32 sigemptyset(&action.sa_mask);
33 sigaction(SIGPIPE, &action, &old_action);
34 }
35 else
36 {
37 sigaction(SIGPIPE, &old_action, &action);
38 }
39}
40
41static Server *
42server_connect(void)
43{
44 Server *s;
45 char buf[PATH_MAX];
46 int curstate = 0;
47 struct sockaddr_un socket_unix;
48 int socket_unix_len;
49
50 s = calloc(1, sizeof(Server));
51 if (!s) return NULL;
52 s->ch[0].fd = -1;
53 s->ch[1].fd = -1;
54 snprintf(buf, sizeof(buf), "/tmp/.evas-cserve-%x", getuid());
55 s->socket_path = strdup(buf);
56 if (!s->socket_path)
57 {
58 free(s);
59 return NULL;
60 }
61 s->ch[0].fd = socket(AF_UNIX, SOCK_STREAM, 0);
62 if (s->ch[0].fd < 0) goto error;
63 if (fcntl(s->ch[0].fd, F_SETFD, FD_CLOEXEC) < 0) goto error;
64 if (setsockopt(s->ch[0].fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0)
65 goto error;
66 socket_unix.sun_family = AF_UNIX;
67 strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
68 socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
69 if (connect(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) goto error;
70
71 s->ch[1].fd = socket(AF_UNIX, SOCK_STREAM, 0);
72 if (s->ch[1].fd < 0) goto error;
73 if (fcntl(s->ch[1].fd, F_SETFD, FD_CLOEXEC) < 0) goto error;
74 if (setsockopt(s->ch[1].fd, SOL_SOCKET, SO_REUSEADDR, &curstate, sizeof(curstate)) < 0)
75 goto error;
76 socket_unix.sun_family = AF_UNIX;
77 strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
78 socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
79 if (connect(s->ch[1].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) goto error;
80
81 return s;
82 error:
83 if (s->ch[0].fd >= 0) close(s->ch[0].fd);
84 if (s->ch[1].fd >= 0) close(s->ch[1].fd);
85 free(s->socket_path);
86 free(s);
87 return NULL;
88}
89
90static void
91server_disconnect(Server *s)
92{
93 close(s->ch[0].fd);
94 close(s->ch[1].fd);
95 free(s->socket_path);
96 free(s);
97}
98
99static int
100server_send(Server *s, int channel, int opcode, int size, unsigned char *data)
101{
102 int ints[3];
103 int num;
104
105 pipe_handle(1);
106 ints[0] = size;
107 ints[1] = opcode;
108 s->ch[channel].req_to++;
109 ints[2] = s->ch[channel].req_to;
110 num = write(s->ch[channel].fd, ints, (sizeof(int) * 3));
111 if (num < 0)
112 {
113 pipe_handle(0);
114 if (cserve) server_disconnect(cserve);
115 cserve = NULL;
116 return 0;
117 }
118 num = write(s->ch[channel].fd, data, size);
119 if (num < 0)
120 {
121 pipe_handle(0);
122 if (cserve) server_disconnect(cserve);
123 cserve = NULL;
124 return 0;
125 }
126 pipe_handle(0);
127 return 1;
128}
129
130static unsigned char *
131server_read(Server *s, int channel, int *opcode, int *size)
132{
133 int ints[3], num, left;
134 unsigned char *data;
135
136 num = read(s->ch[channel].fd, ints, sizeof(int) * 3);
137 if (num != (sizeof(int) * 3))
138 {
139 if (cserve) server_disconnect(cserve);
140 cserve = NULL;
141 return NULL;
142 }
143 *size = ints[0];
144 *opcode = ints[1];
145 if ((*size < 0) || (*size > (1024 * 1024))) return NULL;
146 if (ints[2] != (s->ch[channel].req_from + 1))
147 {
148 ERR("EEK! sequence number mismatch from serer with pid: %i. "
149 "---- num %i is not 1 more than %i"
150 ,
151 s->pid, ints[2], s->ch[channel].req_from);
152 return NULL;
153 }
154 s->ch[channel].req_from++;
155 data = malloc(*size);
156 if (!data) return NULL;
157 num = read(s->ch[channel].fd, data, *size);
158 if (num < 0)
159 {
160 free(data);
161 return NULL;
162 }
163 left = *size - num;
164 while (left > 0)
165 {
166 num = read(s->ch[channel].fd, data + (*size - left), left);
167 if (num < 0)
168 {
169 free(data);
170 return NULL;
171 }
172 left -= num;
173 }
174 return data;
175}
176
177static int
178server_init(Server *s)
179{
180 Op_Init msg, *rep;
181 int opcode;
182 int size;
183
184 msg.pid = getpid();
185 msg.server_id = 0;
186 msg.handle = NULL;
187 if (!server_send(s, 0, OP_INIT, sizeof(msg), (unsigned char *)(&msg)))
188 return 0;
189 rep = (Op_Init *)server_read(s, 0, &opcode, &size);
190 if ((rep) && (opcode == OP_INIT) && (size == sizeof(Op_Init)))
191 {
192 s->pid = rep->pid;
193 s->server_id = rep->server_id;
194 s->main_handle = rep->handle;
195 connect_num++;
196 msg.pid = getpid();
197 msg.server_id = 1;
198 msg.handle = rep->handle;
199 free(rep);
200 if (!server_send(s, 1, OP_INIT, sizeof(msg), (unsigned char *)(&msg)))
201 return 0;
202 rep = (Op_Init *)server_read(s, 1, &opcode, &size);
203 if ((rep) && (opcode == OP_INIT) && (size == sizeof(Op_Init)))
204 {
205 free(rep);
206 return 1;
207 }
208 if (rep) free(rep);
209 return 0;
210 }
211 if (rep) free(rep);
212 return 0;
213}
214
215EAPI Eina_Bool
216evas_cserve_init(void)
217{
218 csrve_init++;
219 if (cserve) return 1;
220 cserve = server_connect();
221 if (!cserve) return 0;
222 if (!server_init(cserve))
223 {
224 if (cserve) server_disconnect(cserve);
225 cserve = NULL;
226 return 0;
227 }
228 return 1;
229}
230
231EAPI int
232evas_cserve_use_get(void)
233{
234 return csrve_init;
235}
236
237EAPI Eina_Bool
238evas_cserve_have_get(void)
239{
240 if (cserve) return 1;
241 return 0;
242}
243
244EAPI void
245evas_cserve_shutdown(void)
246{
247 csrve_init--;
248 if (csrve_init > 0) return;
249 if (!cserve) return;
250 server_disconnect(cserve);
251 cserve = NULL;
252}
253
254EAPI void
255evas_cserve_discon(void)
256{
257 if (cserve)
258 {
259 server_disconnect(cserve);
260 cserve = NULL;
261 cserve_discon = 1;
262 }
263}
264
265static void
266server_reinit(void)
267{
268 if (cserve) return;
269 if (cserve_discon) return;
270 cserve = server_connect();
271 if (cserve)
272 {
273 if (!server_init(cserve))
274 {
275 if (cserve) server_disconnect(cserve);
276 cserve = NULL;
277 }
278 }
279}
280
281EAPI Eina_Bool
282evas_cserve_image_load(Image_Entry *ie, const char *file, const char *key, RGBA_Image_Loadopts *lopt)
283{
284 Op_Load msg;
285 Op_Load_Reply *rep;
286 unsigned char *buf;
287 char fbuf[PATH_MAX], wdb[PATH_MAX];
288 int flen, klen;
289 int opcode;
290 int size;
291
292 if (csrve_init > 0) server_reinit();
293 else return 0;
294 if (!cserve) return 0;
295 if (!key) key = "";
296 memset(&msg, 0, sizeof(msg));
297 msg.lopt.scale_down_by = lopt->scale_down_by;
298 msg.lopt.dpi = lopt->dpi;
299 msg.lopt.w = lopt->w;
300 msg.lopt.h = lopt->h;
301 msg.lopt.region.x = lopt->region.x;
302 msg.lopt.region.y = lopt->region.y;
303 msg.lopt.region.w = lopt->region.w;
304 msg.lopt.region.h = lopt->region.h;
305 msg.lopt.orientation = lopt->orientation;
306 if (file[0] != '/')
307 {
308 if (getcwd(wdb, sizeof(wdb)))
309 {
310 snprintf(fbuf, sizeof(buf), "%s/%s", wdb, file);
311 file = fbuf;
312 }
313 }
314 if (!realpath(file, wdb)) file = wdb;
315 flen = strlen(file) + 1;
316 klen = strlen(key) + 1;
317 buf = malloc(sizeof(msg) + flen + klen);
318 if (!buf) return 0;
319 memcpy(buf, &msg, sizeof(msg));
320 memcpy(buf + sizeof(msg), file, flen);
321 memcpy(buf + sizeof(msg) + flen, key, klen);
322 if (!server_send(cserve, ie->channel, OP_LOAD,
323 sizeof(msg) + flen + klen,
324 buf))
325 {
326 free(buf);
327 return 0;
328 }
329 free(buf);
330 if (!cserve) return 0;
331 rep = (Op_Load_Reply *)server_read(cserve, ie->channel, &opcode, &size);
332 if ((rep) && (opcode == OP_LOAD) && (size == sizeof(Op_Load_Reply)))
333 {
334 ie->w = rep->image.w;
335 ie->h = rep->image.h;
336 ie->flags.alpha = rep->image.alpha;
337 ie->data1 = rep->handle;
338 }
339 if (rep) free(rep);
340 if (!ie->data1) return 0;
341 ie->connect_num = connect_num;
342 if (cserve)
343 ie->server_id = cserve->server_id;
344 return 1;
345}
346
347EAPI Eina_Bool
348evas_cserve_image_data_load(Image_Entry *ie)
349{
350 Op_Loaddata msg;
351 Op_Loaddata_Reply *rep;
352 int opcode;
353 int size;
354 if (csrve_init > 0) server_reinit();
355 else return 0;
356 if (!cserve) return 0;
357 if (!ie->data1) return 0;
358 if (cserve->server_id != ie->server_id)
359 {
360 ie->data1 = NULL;
361 if (!evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts)))
362 return 0;
363 }
364 if (ie->connect_num != connect_num) return 0;
365 memset(&msg, 0, sizeof(msg));
366 msg.handle = ie->data1;
367 msg.server_id = cserve->server_id;
368 if (!server_send(cserve, ie->channel, OP_LOADDATA, sizeof(msg), (unsigned char *)(&msg)))
369 return 0;
370 if (!cserve) return 0;
371 rep = (Op_Loaddata_Reply *)server_read(cserve, ie->channel, &opcode, &size);
372 if ((rep) && (opcode == OP_LOADDATA) && (size == sizeof(Op_Loaddata_Reply)))
373 {
374 if (rep->mem.size <= 0)
375 {
376 free(rep);
377 return 0;
378 }
379 ie->data2 = evas_cserve_mem_open(cserve->pid, rep->mem.id, NULL, rep->mem.size, 0);
380 free(rep);
381 return 1;
382 }
383 if (rep) free(rep);
384 return 0;
385}
386
387EAPI void
388evas_cserve_image_free(Image_Entry *ie)
389{
390 Op_Unload msg;
391
392 if (csrve_init > 0) server_reinit();
393 else return;
394 if (!cserve) return;
395 if (!ie->data1) return;
396 memset(&msg, 0, sizeof(msg));
397 msg.handle = ie->data1;
398 msg.server_id = cserve->server_id;
399 if (ie->data2) evas_cserve_image_unload(ie);
400 if (cserve)
401 {
402 if (ie->connect_num == connect_num)
403 {
404 if (ie->server_id == cserve->server_id)
405 server_send(cserve, ie->channel, OP_UNLOAD, sizeof(msg), (unsigned char *)(&msg));
406 }
407 }
408 ie->data1 = NULL;
409 ie->data2 = NULL;
410}
411
412EAPI void
413evas_cserve_image_unload(Image_Entry *ie)
414{
415 Op_Unloaddata msg;
416
417 if (csrve_init > 0) server_reinit();
418 else return;
419 if (!cserve) return;
420 if (!ie->data1) return;
421 if (ie->connect_num != connect_num) return;
422 memset(&msg, 0, sizeof(msg));
423 msg.handle = ie->data1;
424 msg.server_id = cserve->server_id;
425 if (ie->data2) evas_cserve_mem_close(ie->data2);
426 ie->data2 = NULL;
427 if (ie->connect_num == connect_num)
428 {
429 if (ie->server_id == cserve->server_id)
430 server_send(cserve, ie->channel, OP_UNLOADDATA, sizeof(msg), (unsigned char *)(&msg));
431 }
432}
433
434EAPI void
435evas_cserve_image_useless(Image_Entry *ie)
436{
437 Op_Unloaddata msg;
438
439 if (csrve_init > 0) server_reinit();
440 else return;
441 if (!cserve) return;
442 if (!ie->data1) return;
443 if (ie->connect_num != connect_num) return;
444 memset(&msg, 0, sizeof(msg));
445 msg.handle = ie->data1;
446 msg.server_id = cserve->server_id;
447 if (ie->data2) evas_cserve_mem_close(ie->data2);
448 ie->data2 = NULL;
449 if (ie->connect_num == connect_num)
450 {
451 if (ie->server_id == cserve->server_id)
452 server_send(cserve, ie->channel, OP_USELESSDATA, sizeof(msg), (unsigned char *)(&msg));
453 }
454}
455
456EAPI Eina_Bool
457evas_cserve_raw_config_get(Op_Getconfig_Reply *config)
458{
459 Op_Getconfig_Reply *rep;
460 int opcode;
461 int size;
462 if (csrve_init > 0) server_reinit();
463 else return 0;
464 if (!cserve) return 0;
465 if (!server_send(cserve, 0, OP_GETCONFIG, 0, NULL)) return 0;
466 rep = (Op_Getconfig_Reply *)server_read(cserve, 0, &opcode, &size);
467 if ((rep) && (opcode == OP_GETCONFIG) && (size == sizeof(Op_Getconfig_Reply)))
468 {
469 memcpy(config, rep, sizeof(Op_Getconfig_Reply));
470 free(rep);
471 return 1;
472 }
473 if (rep) free(rep);
474 return 0;
475}
476
477EAPI Eina_Bool
478evas_cserve_raw_config_set(Op_Setconfig *config)
479{
480 if (csrve_init > 0) server_reinit();
481 else return 0;
482 if (!cserve) return 0;
483 if (!server_send(cserve, 0, OP_SETCONFIG, sizeof(Op_Setconfig), (unsigned char *)config)) return 0;
484 return 1;
485}
486
487EAPI Eina_Bool
488evas_cserve_raw_stats_get(Op_Getstats_Reply *stats)
489{
490 Op_Getstats_Reply *rep;
491 int opcode;
492 int size;
493 if (csrve_init > 0) server_reinit();
494 else return 0;
495 if (!cserve) return 0;
496 if (!server_send(cserve, 0, OP_GETSTATS, 0, NULL)) return 0;
497 rep = (Op_Getstats_Reply *)server_read(cserve, 0, &opcode, &size);
498 if ((rep) && (opcode == OP_GETSTATS) && (size == sizeof(Op_Getstats_Reply)))
499 {
500 memcpy(stats, rep, sizeof(Op_Getstats_Reply));
501 free(rep);
502 return 1;
503 }
504 if (rep) free(rep);
505 return 0;
506}
507
508EAPI Op_Getinfo_Reply *
509evas_cserve_raw_info_get(void)
510{
511 Op_Getinfo_Reply *rep;
512 int opcode;
513 int size;
514 if (csrve_init > 0) server_reinit();
515 else return NULL;
516 if (!cserve) return NULL;
517 if (!server_send(cserve, 0, OP_GETINFO, 0, NULL)) return NULL;
518 rep = (Op_Getinfo_Reply *)server_read(cserve, 0, &opcode, &size);
519 if ((rep) && (opcode == OP_GETINFO) &&
520 (size >= (int)sizeof(Op_Getinfo_Reply)))
521 {
522 return rep;
523 }
524 if (rep) free(rep);
525 return NULL;
526}
527
528#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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include "evas_cs.h"
6
7#ifdef EVAS_CSERVE
8
9#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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include "evas_cs.h"
6
7#ifdef EVAS_CSERVE
8
9EAPI Mem *
10evas_cserve_mem_new(int size, const char *name)
11{
12 Mem *m;
13 static int id = 0;
14 char buf[PATH_MAX];
15
16 m = calloc(1, sizeof(Mem));
17 if (!m) return NULL;
18 if (name)
19 snprintf(buf, sizeof(buf), "/evas-shm-%x.%s", getuid(), name);
20 else
21 {
22 id++;
23 snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), getpid(), id);
24 }
25 m->id = id;
26 m->offset = 0;
27 m->name = strdup(buf);
28 if (!m->name)
29 {
30 free(m);
31 return NULL;
32 }
33 m->size = size;
34 m->fd = shm_open(m->name, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
35 if (m->fd < 0)
36 {
37 free(m->name);
38 free(m);
39 return NULL;
40 }
41 if (ftruncate(m->fd, m->size) < 0)
42 {
43 shm_unlink(m->name);
44 close(m->fd);
45 free(m->name);
46 free(m);
47 return NULL;
48 }
49
50 eina_mmap_safety_enabled_set(EINA_TRUE);
51
52 m->data = mmap(NULL, m->size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0);
53 if (m->data == MAP_FAILED)
54 {
55 shm_unlink(m->name);
56 close(m->fd);
57 free(m->name);
58 free(m);
59 return NULL;
60 }
61 m->ref = 1;
62 m->write = 1;
63 return m;
64}
65
66EAPI void
67evas_cserve_mem_free(Mem *m)
68{
69 shm_unlink(m->name);
70 munmap(m->data, m->size);
71 close(m->fd);
72 free(m->name);
73 free(m);
74}
75
76EAPI Mem *
77evas_cserve_mem_open(int pid, int id, const char *name, int size, int do_write)
78{
79 Mem *m;
80 char buf[PATH_MAX];
81
82 m = calloc(1, sizeof(Mem));
83 if (!m) return NULL;
84 if (name)
85 snprintf(buf, sizeof(buf), "/evas-shm-%x.%s", getuid(), name);
86 else
87 snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), pid, id);
88 m->name = strdup(buf);
89 if (!m->name)
90 {
91 free(m);
92 return NULL;
93 }
94 m->size = size;
95 if (do_write)
96 m->fd = shm_open(m->name, O_RDWR, S_IRUSR | S_IWUSR);
97 else
98 m->fd = shm_open(m->name, O_RDONLY, S_IRUSR);
99 if (m->fd < 0)
100 {
101 free(m->name);
102 free(m);
103 return NULL;
104 }
105 m->write = do_write;
106
107 eina_mmap_safety_enabled_set(EINA_TRUE);
108
109 if (do_write)
110 m->data = mmap(NULL, m->size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0);
111 else
112 m->data = mmap(NULL, m->size, PROT_READ, MAP_SHARED, m->fd, 0);
113 if (m->data == MAP_FAILED)
114 {
115 close(m->fd);
116 free(m->name);
117 free(m);
118 return NULL;
119 }
120 m->ref = 1;
121 return m;
122}
123
124EAPI void
125evas_cserve_mem_close(Mem *m)
126{
127 munmap(m->data, m->size);
128 close(m->fd);
129 free(m->name);
130 free(m);
131}
132
133EAPI Eina_Bool
134evas_cserve_mem_resize(Mem *m, int size)
135{
136 if (m->size == size) return 1;
137 if (m->write)
138 {
139 if (ftruncate(m->fd, size) < 0) return 0;
140 munmap(m->data, m->size);
141 eina_mmap_safety_enabled_set(EINA_TRUE);
142 m->data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0);
143 }
144 else
145 {
146 munmap(m->data, m->size);
147 eina_mmap_safety_enabled_set(EINA_TRUE);
148 m->data = mmap(NULL, size, PROT_READ, MAP_SHARED, m->fd, 0);
149 }
150 if (m->data == MAP_FAILED)
151 {
152 m->data = NULL;
153 return 0;
154 }
155 m->size = size;
156 return 1;
157}
158
159EAPI void
160evas_cserve_mem_del(int pid, int id)
161{
162 char buf[PATH_MAX];
163
164 snprintf(buf, sizeof(buf), "/evas-shm-%x.%x.%x", getuid(), pid, id);
165 shm_unlink(buf);
166}
167
168#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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include "evas_cs.h"
6
7#ifdef EVAS_CSERVE
8
9EAPI Server *
10evas_cserve_server_add(void)
11{
12 Server *s;
13 char buf[PATH_MAX];
14 struct sockaddr_un socket_unix;
15 struct linger lin;
16 mode_t pmode;
17 int socket_unix_len;
18
19 s = calloc(1, sizeof(Server));
20 if (!s) return NULL;
21 s->ch[0].fd = -1;
22 snprintf(buf, sizeof(buf), "/tmp/.evas-cserve-%x", getuid());
23 s->socket_path = strdup(buf);
24 if (!s->socket_path)
25 {
26 free(s);
27 return NULL;
28 }
29 pmode = umask(~(S_IRUSR | S_IWUSR));
30 start:
31 s->ch[0].fd = socket(AF_UNIX, SOCK_STREAM, 0);
32 if (s->ch[0].fd < 0) goto error;
33 if (fcntl(s->ch[0].fd, F_SETFL, O_NONBLOCK) < 0) goto error;
34 if (fcntl(s->ch[0].fd, F_SETFD, FD_CLOEXEC) < 0) goto error;
35 lin.l_onoff = 1;
36 lin.l_linger = 0;
37 if (setsockopt(s->ch[0].fd, SOL_SOCKET, SO_LINGER, &lin, sizeof(struct linger)) < 0)
38 goto error;
39 socket_unix.sun_family = AF_UNIX;
40 strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
41 socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
42 if (bind(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
43 {
44 if ((connect(s->ch[0].fd, (struct sockaddr *)&socket_unix, socket_unix_len) < 0) &&
45 (unlink(s->socket_path) >= 0))
46 {
47 close(s->ch[0].fd);
48 goto start;
49 }
50 else
51 goto error;
52 }
53 if (listen(s->ch[0].fd, 4096) < 0) goto error;
54 umask(pmode);
55 return s;
56 error:
57 umask(pmode);
58 if (s->ch[0].fd >= 0) close(s->ch[0].fd);
59 free(s->socket_path);
60 free(s);
61 return NULL;
62}
63
64EAPI void
65evas_cserve_server_del(Server *s)
66{
67 Client *c;
68
69 EINA_LIST_FREE(s->clients, c)
70 {
71 LKL(c->lock);
72 close(c->fd);
73 if (c->buf) free(c->buf);
74 if (c->inbuf) free(c->inbuf);
75 LKD(c->lock);
76 free(c);
77 }
78 close(s->ch[0].fd);
79 unlink(s->socket_path);
80 free(s->socket_path);
81 free(s);
82}
83
84static void
85server_accept(Server *s)
86{
87 Client *c;
88 int new_fd;
89 struct sockaddr_in incoming;
90 size_t size_in;
91
92 size_in = sizeof(struct sockaddr_in);
93 new_fd = accept(s->ch[0].fd, (struct sockaddr *)&incoming, (socklen_t *)&size_in);
94 if (new_fd < 0) return;
95 fcntl(new_fd, F_SETFL, O_NONBLOCK);
96 fcntl(new_fd, F_SETFD, FD_CLOEXEC);
97 c = calloc(1, sizeof(Client));
98 if (!c)
99 {
100 close(new_fd);
101 return;
102 }
103 c->server = s;
104 c->fd = new_fd;
105 LKI(c->lock);
106 s->clients = eina_list_append(s->clients, c);
107}
108
109static void
110client_flush(Client *c)
111{
112 int num;
113
114 num = write(c->fd, c->buf, c->bufsize);
115 if (num < 0)
116 {
117 c->dead = 1;
118 return;
119 }
120 if (num < c->bufsize)
121 {
122 unsigned char *buf;
123
124 buf = malloc(c->bufsize - num);
125 if (buf)
126 {
127 memcpy(buf, c->buf + num, c->bufsize - num);
128 free(c->buf);
129 c->bufsize = c->bufsize - num;
130 c->bufalloc = c->bufsize;
131 c->buf = buf;
132 }
133 }
134 else
135 {
136 free(c->buf);
137 c->buf = NULL;
138 c->bufsize = 0;
139 c->bufalloc = 0;
140 }
141}
142
143static void
144client_buf_add(Client *c, unsigned char *data, int size)
145{
146 int newsize;
147 unsigned char *buf;
148
149 newsize = c->bufsize + size;
150 if (newsize > c->bufalloc)
151 {
152 c->bufalloc = newsize + 16384;
153 buf = realloc(c->buf, c->bufalloc);
154 if (buf) c->buf = buf;
155 else return;
156 }
157 memcpy(c->buf + c->bufsize, data, size);
158 c->bufsize += size;
159}
160
161static void
162client_write(Client *c, unsigned char *data, int size)
163{
164 int num;
165
166 if (!c->buf)
167 {
168 num = write(c->fd, data, size);
169 if (num != size)
170 client_buf_add(c, data + num, size - num);
171 }
172 else
173 {
174 client_buf_add(c, data, size);
175 }
176}
177
178EAPI void
179evas_cserve_client_send(Client *c, int opcode, int size, unsigned char *data)
180{
181 unsigned char *data2;
182 int *ints;
183
184 data2 = malloc(size + (sizeof(int) * 3));
185 if (!data2) return;
186 ints = (int *)data2;
187 ints[0] = size;
188 ints[1] = opcode;
189// LKL(c->lock);
190 c->req_to++;
191 ints[2] = c->req_to;
192 memcpy(data2 + (sizeof(int) * 3), data, size);
193 client_write(c, data2, size + (sizeof(int) * 3));
194// LKU(c->lock);
195 free(data2);
196}
197
198static void
199server_message_handle(Server *s, Client *c, int opcode, int size, unsigned char *data)
200{
201 if (s->func) s->func(s->data, s, c, opcode, size, data);
202}
203
204EAPI void
205evas_cserve_server_message_handler_set(Server *s, int (*func) (void *fdata, Server *s, Client *c, int opcode, int size, unsigned char *data), void *data)
206{
207 s->func = func;
208 s->data = data;
209}
210
211static int
212server_parse(Server *s, Client *c)
213{
214 int *ints;
215 unsigned char *data, *newbuf;
216
217 if (c->inbufsize < (int)sizeof(int)) return 0;
218 ints = (int *)((c->inbuf));
219 if ((ints[0] < 0) || (ints[0] > (1024 * 1024)))
220 return 0;
221 if (c->inbufsize < (ints[0] + ((int)sizeof(int) * 3)))
222 {
223 return 0;
224 }
225 data = c->inbuf + (sizeof(int) * 3);
226 if (ints[2] != (c->req_from + 1))
227 {
228 ERR("EEK! sequence number mismatch from client with pid: %i."
229 "---- num %i is not 1 more than %i"
230 ,
231 c->pid, ints[2], c->req_from);
232 return 0;
233 }
234 c->req_from++;
235 server_message_handle(s, c, ints[1], ints[0], data);
236 c->inbufalloc -= ints[0] + (sizeof(int) * 3);
237 if (c->inbufalloc == 0)
238 {
239 free(c->inbuf);
240 c->inbuf = NULL;
241 c->inbufsize = 0;
242 return 0;
243 }
244 newbuf = malloc(c->inbufalloc);
245 if (!newbuf)
246 {
247 c->inbufalloc += ints[0] + (sizeof(int) * 3);
248 /* fixme - bad situation */
249 return 0;
250 }
251 memcpy(newbuf, c->inbuf + ints[0] + (sizeof(int) * 3), c->inbufalloc);
252 c->inbufsize -= ints[0] + (sizeof(int) * 3);
253 free(c->inbuf);
254 c->inbuf = newbuf;
255 return 1;
256}
257
258static void
259server_data(Server *s, Client *c, unsigned char *data, int size)
260{
261 if (!c->inbuf)
262 {
263 c->inbuf = malloc(size);
264 if (c->inbuf)
265 {
266 memcpy(c->inbuf, data, size);
267 c->inbufalloc = size;
268 c->inbufsize = size;
269 }
270 else
271 {
272 /* fixme - bad situation */
273 return;
274 }
275 }
276 else
277 {
278 int size2;
279
280 size2 = c->inbufsize + size;
281 if (size2 > c->inbufalloc)
282 {
283 unsigned char *newbuf;
284
285 c->inbufalloc = size2;
286 newbuf = realloc(c->inbuf, c->inbufalloc);
287 if (newbuf) c->inbuf = newbuf;
288 else size2 = 0;
289 }
290 if (size2 > 0)
291 {
292 memcpy(c->inbuf + c->inbufsize, data, size);
293 c->inbufsize = size2;
294 }
295 else
296 {
297 /* fixme - bad situation */
298 return;
299 }
300 }
301 while (server_parse(s, c));
302}
303
304EAPI void
305evas_cserve_server_wait(Server *s, int timeout)
306{
307 fd_set rset, wset, xset;
308 int maxfd;
309 int ret;
310 struct timeval to;
311 Eina_List *l, *dead = NULL;
312 Client *c;
313
314 maxfd = 0;
315 FD_ZERO(&rset);
316 FD_ZERO(&wset);
317 FD_ZERO(&xset);
318 FD_SET(s->ch[0].fd, &rset);
319 if (s->ch[0].fd > maxfd) maxfd = s->ch[0].fd;
320 EINA_LIST_FOREACH(s->clients, l, c)
321 {
322 FD_SET(c->fd, &rset);
323 if (c->buf)
324 FD_SET(c->fd, &wset);
325 if (c->fd > maxfd) maxfd = c->fd;
326 }
327 if (timeout > 0)
328 {
329 to.tv_sec = timeout / 1000000;
330 to.tv_usec = timeout % 1000000;
331 ret = select(maxfd + 1, &rset, &wset, &xset, &to);
332 }
333 else
334 ret = select(maxfd + 1, &rset, &wset, &xset, NULL);
335 if (ret < 1) return;
336
337 EINA_LIST_FOREACH(s->clients, l, c)
338 {
339 if (c->dead) continue;
340 if (FD_ISSET(c->fd, &rset))
341 {
342 unsigned char buf[16384];
343 int num;
344
345 errno = 0;
346 num = read(c->fd, buf, sizeof(buf));
347 if (num <= 0)
348 {
349 c->dead = 1;
350 dead = eina_list_append(dead, c);
351 }
352 else if (num > 0)
353 {
354 server_data(s, c, buf, num);
355 }
356 }
357 else if (FD_ISSET(c->fd, &wset))
358 {
359 client_flush(c);
360 if (c->dead) dead = eina_list_append(dead, c);
361 }
362 }
363 if (FD_ISSET(s->ch[0].fd, &rset))
364 {
365 server_accept(s);
366 }
367 EINA_LIST_FREE(dead, c)
368 {
369 LKL(c->lock);
370 if (c->func) c->func(c->data, c);
371 s->clients = eina_list_remove(s->clients, c);
372 close(c->fd);
373 if (c->buf) free(c->buf);
374 if (c->inbuf) free(c->inbuf);
375 LKD(c->lock);
376 free(c);
377 }
378}
379
380#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 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4SUBDIRS = common
5
6if BUILD_ENGINE_SOFTWARE_16
7
8SUBDIRS += common_16
9
10endif
11
12if BUILD_ENGINE_SOFTWARE_8
13
14SUBDIRS += common_8
15
16endif
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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36@BUILD_ENGINE_SOFTWARE_16_TRUE@am__append_1 = common_16
37@BUILD_ENGINE_SOFTWARE_8_TRUE@am__append_2 = common_8
38subdir = src/lib/engines
39DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
41am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
42 $(top_srcdir)/m4/efl_coverage.m4 \
43 $(top_srcdir)/m4/efl_doxygen.m4 \
44 $(top_srcdir)/m4/efl_fnmatch.m4 \
45 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
46 $(top_srcdir)/m4/evas_check_engine.m4 \
47 $(top_srcdir)/m4/evas_check_loader.m4 \
48 $(top_srcdir)/m4/evas_converter.m4 \
49 $(top_srcdir)/m4/evas_dither.m4 \
50 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
51 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
52 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
53 $(top_srcdir)/configure.ac
54am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
55 $(ACLOCAL_M4)
56mkinstalldirs = $(install_sh) -d
57CONFIG_HEADER = $(top_builddir)/config.h
58CONFIG_CLEAN_FILES =
59CONFIG_CLEAN_VPATH_FILES =
60AM_V_GEN = $(am__v_GEN_$(V))
61am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
62am__v_GEN_0 = @echo " GEN " $@;
63AM_V_at = $(am__v_at_$(V))
64am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
65am__v_at_0 = @
66SOURCES =
67DIST_SOURCES =
68RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
69 html-recursive info-recursive install-data-recursive \
70 install-dvi-recursive install-exec-recursive \
71 install-html-recursive install-info-recursive \
72 install-pdf-recursive install-ps-recursive install-recursive \
73 installcheck-recursive installdirs-recursive pdf-recursive \
74 ps-recursive uninstall-recursive
75RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
76 distclean-recursive maintainer-clean-recursive
77AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
78 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
79 distdir
80ETAGS = etags
81CTAGS = ctags
82DIST_SUBDIRS = common common_16 common_8
83DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
84am__relativize = \
85 dir0=`pwd`; \
86 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
87 sed_rest='s,^[^/]*/*,,'; \
88 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
89 sed_butlast='s,/*[^/]*$$,,'; \
90 while test -n "$$dir1"; do \
91 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
92 if test "$$first" != "."; then \
93 if test "$$first" = ".."; then \
94 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
95 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
96 else \
97 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
98 if test "$$first2" = "$$first"; then \
99 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
100 else \
101 dir2="../$$dir2"; \
102 fi; \
103 dir0="$$dir0"/"$$first"; \
104 fi; \
105 fi; \
106 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
107 done; \
108 reldir="$$dir2"
109ACLOCAL = @ACLOCAL@
110ALLOCA = @ALLOCA@
111AMTAR = @AMTAR@
112AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
113AR = @AR@
114AS = @AS@
115AUTOCONF = @AUTOCONF@
116AUTOHEADER = @AUTOHEADER@
117AUTOMAKE = @AUTOMAKE@
118AWK = @AWK@
119CC = @CC@
120CCDEPMODE = @CCDEPMODE@
121CFLAGS = @CFLAGS@
122CHECK_CFLAGS = @CHECK_CFLAGS@
123CHECK_LIBS = @CHECK_LIBS@
124CPP = @CPP@
125CPPFLAGS = @CPPFLAGS@
126CXX = @CXX@
127CXXCPP = @CXXCPP@
128CXXDEPMODE = @CXXDEPMODE@
129CXXFLAGS = @CXXFLAGS@
130CYGPATH_W = @CYGPATH_W@
131DEFS = @DEFS@
132DEPDIR = @DEPDIR@
133DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
134DIRECTFB_LIBS = @DIRECTFB_LIBS@
135DLLTOOL = @DLLTOOL@
136DSYMUTIL = @DSYMUTIL@
137DUMPBIN = @DUMPBIN@
138ECHO_C = @ECHO_C@
139ECHO_N = @ECHO_N@
140ECHO_T = @ECHO_T@
141ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
142ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
143EDB_CFLAGS = @EDB_CFLAGS@
144EDB_LIBS = @EDB_LIBS@
145EDJE_CFLAGS = @EDJE_CFLAGS@
146EDJE_LIBS = @EDJE_LIBS@
147EET_CFLAGS = @EET_CFLAGS@
148EET_LIBS = @EET_LIBS@
149EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
150EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
151EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
152EGREP = @EGREP@
153EINA_CFLAGS = @EINA_CFLAGS@
154EINA_LIBS = @EINA_LIBS@
155EVAS_CFLAGS = @EVAS_CFLAGS@
156EVAS_LIBS = @EVAS_LIBS@
157EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
158EVIL_CFLAGS = @EVIL_CFLAGS@
159EVIL_LIBS = @EVIL_LIBS@
160EXEEXT = @EXEEXT@
161EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
162EXOTIC_LIBS = @EXOTIC_LIBS@
163FGREP = @FGREP@
164FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
165FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
166FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
167FREETYPE_LIBS = @FREETYPE_LIBS@
168FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
169FRIBIDI_LIBS = @FRIBIDI_LIBS@
170GL_EET_CFLAGS = @GL_EET_CFLAGS@
171GL_EET_LIBS = @GL_EET_LIBS@
172GREP = @GREP@
173HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
174HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
175INSTALL = @INSTALL@
176INSTALL_DATA = @INSTALL_DATA@
177INSTALL_PROGRAM = @INSTALL_PROGRAM@
178INSTALL_SCRIPT = @INSTALL_SCRIPT@
179INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
180LD = @LD@
181LDFLAGS = @LDFLAGS@
182LIBOBJS = @LIBOBJS@
183LIBS = @LIBS@
184LIBTOOL = @LIBTOOL@
185LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
186LINEBREAK_LIBS = @LINEBREAK_LIBS@
187LIPO = @LIPO@
188LN_S = @LN_S@
189LTLIBOBJS = @LTLIBOBJS@
190MAKEINFO = @MAKEINFO@
191MKDIR_P = @MKDIR_P@
192MODULE_ARCH = @MODULE_ARCH@
193NM = @NM@
194NMEDIT = @NMEDIT@
195OBJC = @OBJC@
196OBJCDEPMODE = @OBJCDEPMODE@
197OBJCFLAGS = @OBJCFLAGS@
198OBJDUMP = @OBJDUMP@
199OBJEXT = @OBJEXT@
200OTOOL = @OTOOL@
201OTOOL64 = @OTOOL64@
202PACKAGE = @PACKAGE@
203PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
204PACKAGE_NAME = @PACKAGE_NAME@
205PACKAGE_STRING = @PACKAGE_STRING@
206PACKAGE_TARNAME = @PACKAGE_TARNAME@
207PACKAGE_URL = @PACKAGE_URL@
208PACKAGE_VERSION = @PACKAGE_VERSION@
209PATH_SEPARATOR = @PATH_SEPARATOR@
210PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
211PIXMAN_LIBS = @PIXMAN_LIBS@
212PKG_CONFIG = @PKG_CONFIG@
213PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
214PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
215PNG_CFLAGS = @PNG_CFLAGS@
216PNG_LIBS = @PNG_LIBS@
217RANLIB = @RANLIB@
218SDL_CFLAGS = @SDL_CFLAGS@
219SDL_LIBS = @SDL_LIBS@
220SED = @SED@
221SET_MAKE = @SET_MAKE@
222SHELL = @SHELL@
223SHM_OPEN_LINK = @SHM_OPEN_LINK@
224STRIP = @STRIP@
225SVG_CFLAGS = @SVG_CFLAGS@
226SVG_LIBS = @SVG_LIBS@
227VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
228VALGRIND_LIBS = @VALGRIND_LIBS@
229VERSION = @VERSION@
230VMAJ = @VMAJ@
231WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
232WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
233XCB_CFLAGS = @XCB_CFLAGS@
234XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
235XCB_GL_LIBS = @XCB_GL_LIBS@
236XCB_LIBS = @XCB_LIBS@
237XEXT_CFLAGS = @XEXT_CFLAGS@
238XEXT_LIBS = @XEXT_LIBS@
239XMKMF = @XMKMF@
240X_CFLAGS = @X_CFLAGS@
241X_EXTRA_LIBS = @X_EXTRA_LIBS@
242X_LIBS = @X_LIBS@
243X_PRE_LIBS = @X_PRE_LIBS@
244abs_builddir = @abs_builddir@
245abs_srcdir = @abs_srcdir@
246abs_top_builddir = @abs_top_builddir@
247abs_top_srcdir = @abs_top_srcdir@
248ac_ct_CC = @ac_ct_CC@
249ac_ct_CXX = @ac_ct_CXX@
250ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
251ac_ct_OBJC = @ac_ct_OBJC@
252altivec_cflags = @altivec_cflags@
253am__include = @am__include@
254am__leading_dot = @am__leading_dot@
255am__quote = @am__quote@
256am__tar = @am__tar@
257am__untar = @am__untar@
258bindir = @bindir@
259build = @build@
260build_alias = @build_alias@
261build_cpu = @build_cpu@
262build_os = @build_os@
263build_vendor = @build_vendor@
264builddir = @builddir@
265datadir = @datadir@
266datarootdir = @datarootdir@
267dlopen_libs = @dlopen_libs@
268docdir = @docdir@
269dvidir = @dvidir@
270edje_cc = @edje_cc@
271efl_doxygen = @efl_doxygen@
272efl_have_doxygen = @efl_have_doxygen@
273evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
274evas_engine_buffer_libs = @evas_engine_buffer_libs@
275evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
276evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
277evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
278evas_engine_directfb_libs = @evas_engine_directfb_libs@
279evas_engine_fb_cflags = @evas_engine_fb_cflags@
280evas_engine_fb_libs = @evas_engine_fb_libs@
281evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
282evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
283evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
284evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
285evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
286evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
287evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
288evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
289evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
290evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
291evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
292evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
293evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
294evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
295evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
296evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
297evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
298evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
299evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
300evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
301evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
302evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
303evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
304evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
305evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
306evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
307evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
308evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
309evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
310evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
311evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
312evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
313evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
314evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
315evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
316evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
317evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
318evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
319evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
320evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
321evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
322evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
323evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
324evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
325evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
326evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
327evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
328evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
329evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
330evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
331evas_image_loader_png_libs = @evas_image_loader_png_libs@
332evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
333evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
334evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
335evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
336evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
337evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
338evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
339evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
340evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
341evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
342evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
343evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
344exec_prefix = @exec_prefix@
345have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
346have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
347have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
348have_evas_engine_software_x11 = @have_evas_engine_software_x11@
349have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
350have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
351have_lcov = @have_lcov@
352host = @host@
353host_alias = @host_alias@
354host_cpu = @host_cpu@
355host_os = @host_os@
356host_vendor = @host_vendor@
357htmldir = @htmldir@
358includedir = @includedir@
359infodir = @infodir@
360install_sh = @install_sh@
361libdir = @libdir@
362libexecdir = @libexecdir@
363localedir = @localedir@
364localstatedir = @localstatedir@
365lt_ECHO = @lt_ECHO@
366lt_enable_auto_import = @lt_enable_auto_import@
367mandir = @mandir@
368mkdir_p = @mkdir_p@
369oldincludedir = @oldincludedir@
370pdfdir = @pdfdir@
371pkgconfig_requires_private = @pkgconfig_requires_private@
372prefix = @prefix@
373program_transform_name = @program_transform_name@
374psdir = @psdir@
375pthread_cflags = @pthread_cflags@
376pthread_libs = @pthread_libs@
377release_info = @release_info@
378requirement_evas = @requirement_evas@
379sbindir = @sbindir@
380sharedstatedir = @sharedstatedir@
381srcdir = @srcdir@
382sysconfdir = @sysconfdir@
383target_alias = @target_alias@
384top_build_prefix = @top_build_prefix@
385top_builddir = @top_builddir@
386top_srcdir = @top_srcdir@
387version_info = @version_info@
388MAINTAINERCLEANFILES = Makefile.in
389SUBDIRS = common $(am__append_1) $(am__append_2)
390all: all-recursive
391
392.SUFFIXES:
393$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
394 @for dep in $?; do \
395 case '$(am__configure_deps)' in \
396 *$$dep*) \
397 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
398 && { if test -f $@; then exit 0; else break; fi; }; \
399 exit 1;; \
400 esac; \
401 done; \
402 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/Makefile'; \
403 $(am__cd) $(top_srcdir) && \
404 $(AUTOMAKE) --gnu src/lib/engines/Makefile
405.PRECIOUS: Makefile
406Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
407 @case '$?' in \
408 *config.status*) \
409 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
410 *) \
411 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
412 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
413 esac;
414
415$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
416 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
417
418$(top_srcdir)/configure: $(am__configure_deps)
419 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
420$(ACLOCAL_M4): $(am__aclocal_m4_deps)
421 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
422$(am__aclocal_m4_deps):
423
424mostlyclean-libtool:
425 -rm -f *.lo
426
427clean-libtool:
428 -rm -rf .libs _libs
429
430# This directory's subdirectories are mostly independent; you can cd
431# into them and run `make' without going through this Makefile.
432# To change the values of `make' variables: instead of editing Makefiles,
433# (1) if the variable is set in `config.status', edit `config.status'
434# (which will cause the Makefiles to be regenerated when you run `make');
435# (2) otherwise, pass the desired values on the `make' command line.
436$(RECURSIVE_TARGETS):
437 @fail= failcom='exit 1'; \
438 for f in x $$MAKEFLAGS; do \
439 case $$f in \
440 *=* | --[!k]*);; \
441 *k*) failcom='fail=yes';; \
442 esac; \
443 done; \
444 dot_seen=no; \
445 target=`echo $@ | sed s/-recursive//`; \
446 list='$(SUBDIRS)'; for subdir in $$list; do \
447 echo "Making $$target in $$subdir"; \
448 if test "$$subdir" = "."; then \
449 dot_seen=yes; \
450 local_target="$$target-am"; \
451 else \
452 local_target="$$target"; \
453 fi; \
454 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
455 || eval $$failcom; \
456 done; \
457 if test "$$dot_seen" = "no"; then \
458 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
459 fi; test -z "$$fail"
460
461$(RECURSIVE_CLEAN_TARGETS):
462 @fail= failcom='exit 1'; \
463 for f in x $$MAKEFLAGS; do \
464 case $$f in \
465 *=* | --[!k]*);; \
466 *k*) failcom='fail=yes';; \
467 esac; \
468 done; \
469 dot_seen=no; \
470 case "$@" in \
471 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
472 *) list='$(SUBDIRS)' ;; \
473 esac; \
474 rev=''; for subdir in $$list; do \
475 if test "$$subdir" = "."; then :; else \
476 rev="$$subdir $$rev"; \
477 fi; \
478 done; \
479 rev="$$rev ."; \
480 target=`echo $@ | sed s/-recursive//`; \
481 for subdir in $$rev; do \
482 echo "Making $$target in $$subdir"; \
483 if test "$$subdir" = "."; then \
484 local_target="$$target-am"; \
485 else \
486 local_target="$$target"; \
487 fi; \
488 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
489 || eval $$failcom; \
490 done && test -z "$$fail"
491tags-recursive:
492 list='$(SUBDIRS)'; for subdir in $$list; do \
493 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
494 done
495ctags-recursive:
496 list='$(SUBDIRS)'; for subdir in $$list; do \
497 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
498 done
499
500ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
501 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
502 unique=`for i in $$list; do \
503 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
504 done | \
505 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
506 END { if (nonempty) { for (i in files) print i; }; }'`; \
507 mkid -fID $$unique
508tags: TAGS
509
510TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
511 $(TAGS_FILES) $(LISP)
512 set x; \
513 here=`pwd`; \
514 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
515 include_option=--etags-include; \
516 empty_fix=.; \
517 else \
518 include_option=--include; \
519 empty_fix=; \
520 fi; \
521 list='$(SUBDIRS)'; for subdir in $$list; do \
522 if test "$$subdir" = .; then :; else \
523 test ! -f $$subdir/TAGS || \
524 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
525 fi; \
526 done; \
527 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
528 unique=`for i in $$list; do \
529 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
530 done | \
531 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
532 END { if (nonempty) { for (i in files) print i; }; }'`; \
533 shift; \
534 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
535 test -n "$$unique" || unique=$$empty_fix; \
536 if test $$# -gt 0; then \
537 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
538 "$$@" $$unique; \
539 else \
540 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
541 $$unique; \
542 fi; \
543 fi
544ctags: CTAGS
545CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
546 $(TAGS_FILES) $(LISP)
547 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
548 unique=`for i in $$list; do \
549 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
550 done | \
551 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
552 END { if (nonempty) { for (i in files) print i; }; }'`; \
553 test -z "$(CTAGS_ARGS)$$unique" \
554 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
555 $$unique
556
557GTAGS:
558 here=`$(am__cd) $(top_builddir) && pwd` \
559 && $(am__cd) $(top_srcdir) \
560 && gtags -i $(GTAGS_ARGS) "$$here"
561
562distclean-tags:
563 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
564
565distdir: $(DISTFILES)
566 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
567 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
568 list='$(DISTFILES)'; \
569 dist_files=`for file in $$list; do echo $$file; done | \
570 sed -e "s|^$$srcdirstrip/||;t" \
571 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
572 case $$dist_files in \
573 */*) $(MKDIR_P) `echo "$$dist_files" | \
574 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
575 sort -u` ;; \
576 esac; \
577 for file in $$dist_files; do \
578 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
579 if test -d $$d/$$file; then \
580 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
581 if test -d "$(distdir)/$$file"; then \
582 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
583 fi; \
584 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
585 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
586 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
587 fi; \
588 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
589 else \
590 test -f "$(distdir)/$$file" \
591 || cp -p $$d/$$file "$(distdir)/$$file" \
592 || exit 1; \
593 fi; \
594 done
595 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
596 if test "$$subdir" = .; then :; else \
597 test -d "$(distdir)/$$subdir" \
598 || $(MKDIR_P) "$(distdir)/$$subdir" \
599 || exit 1; \
600 fi; \
601 done
602 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
603 if test "$$subdir" = .; then :; else \
604 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
605 $(am__relativize); \
606 new_distdir=$$reldir; \
607 dir1=$$subdir; dir2="$(top_distdir)"; \
608 $(am__relativize); \
609 new_top_distdir=$$reldir; \
610 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
611 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
612 ($(am__cd) $$subdir && \
613 $(MAKE) $(AM_MAKEFLAGS) \
614 top_distdir="$$new_top_distdir" \
615 distdir="$$new_distdir" \
616 am__remove_distdir=: \
617 am__skip_length_check=: \
618 am__skip_mode_fix=: \
619 distdir) \
620 || exit 1; \
621 fi; \
622 done
623check-am: all-am
624check: check-recursive
625all-am: Makefile
626installdirs: installdirs-recursive
627installdirs-am:
628install: install-recursive
629install-exec: install-exec-recursive
630install-data: install-data-recursive
631uninstall: uninstall-recursive
632
633install-am: all-am
634 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
635
636installcheck: installcheck-recursive
637install-strip:
638 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
639 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
640 `test -z '$(STRIP)' || \
641 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
642mostlyclean-generic:
643
644clean-generic:
645
646distclean-generic:
647 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
648 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
649
650maintainer-clean-generic:
651 @echo "This command is intended for maintainers to use"
652 @echo "it deletes files that may require special tools to rebuild."
653 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
654clean: clean-recursive
655
656clean-am: clean-generic clean-libtool mostlyclean-am
657
658distclean: distclean-recursive
659 -rm -f Makefile
660distclean-am: clean-am distclean-generic distclean-tags
661
662dvi: dvi-recursive
663
664dvi-am:
665
666html: html-recursive
667
668html-am:
669
670info: info-recursive
671
672info-am:
673
674install-data-am:
675
676install-dvi: install-dvi-recursive
677
678install-dvi-am:
679
680install-exec-am:
681
682install-html: install-html-recursive
683
684install-html-am:
685
686install-info: install-info-recursive
687
688install-info-am:
689
690install-man:
691
692install-pdf: install-pdf-recursive
693
694install-pdf-am:
695
696install-ps: install-ps-recursive
697
698install-ps-am:
699
700installcheck-am:
701
702maintainer-clean: maintainer-clean-recursive
703 -rm -f Makefile
704maintainer-clean-am: distclean-am maintainer-clean-generic
705
706mostlyclean: mostlyclean-recursive
707
708mostlyclean-am: mostlyclean-generic mostlyclean-libtool
709
710pdf: pdf-recursive
711
712pdf-am:
713
714ps: ps-recursive
715
716ps-am:
717
718uninstall-am:
719
720.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
721 install-am install-strip tags-recursive
722
723.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
724 all all-am check check-am clean clean-generic clean-libtool \
725 ctags ctags-recursive distclean distclean-generic \
726 distclean-libtool distclean-tags distdir dvi dvi-am html \
727 html-am info info-am install install-am install-data \
728 install-data-am install-dvi install-dvi-am install-exec \
729 install-exec-am install-html install-html-am install-info \
730 install-info-am install-man install-pdf install-pdf-am \
731 install-ps install-ps-am install-strip installcheck \
732 installcheck-am installdirs installdirs-am maintainer-clean \
733 maintainer-clean-generic mostlyclean mostlyclean-generic \
734 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
735 uninstall uninstall-am
736
737
738# Tell versions [3.59,3.63) of GNU make to not export all variables.
739# Otherwise a system limit (for SysV at least) may be exceeded.
740.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 @@
1
2SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub
3
4MAINTAINERCLEANFILES = Makefile.in
5
6AM_CPPFLAGS = -I. \
7 -I$(top_srcdir)/src/lib \
8 -I$(top_srcdir)/src/lib/cserve \
9 -I$(top_srcdir)/src/lib/include \
10 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
11 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
12 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
13 @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
14 @PIXMAN_CFLAGS@ \
15 @EET_CFLAGS@ @pthread_cflags@ \
16 @EINA_CFLAGS@ \
17 @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
18 @PIXMAN_CFLAGS@
19
20noinst_LTLIBRARIES = libevas_engine_common.la
21libevas_engine_common_la_SOURCES = \
22evas_op_copy_main_.c \
23evas_op_blend_main_.c \
24evas_op_add_main_.c \
25evas_op_sub_main_.c \
26evas_op_mask_main_.c \
27evas_op_mul_main_.c \
28evas_blend_main.c \
29evas_blit_main.c \
30evas_convert_color.c \
31evas_convert_colorspace.c \
32evas_convert_gry_1.c \
33evas_convert_gry_4.c \
34evas_convert_gry_8.c \
35evas_convert_main.c \
36evas_convert_rgb_16.c \
37evas_convert_rgb_24.c \
38evas_convert_rgb_32.c \
39evas_convert_rgb_8.c \
40evas_convert_grypal_6.c \
41evas_convert_yuv.c \
42evas_cpu.c \
43evas_draw_main.c \
44evas_font_draw.c \
45evas_font_load.c \
46evas_font_main.c \
47evas_font_query.c \
48evas_image_load.c \
49evas_image_save.c \
50evas_image_main.c \
51evas_image_data.c \
52evas_image_scalecache.c \
53evas_line_main.c \
54evas_polygon_main.c \
55evas_rectangle_main.c \
56evas_scale_main.c \
57evas_scale_sample.c \
58evas_scale_smooth.c \
59evas_scale_span.c \
60evas_tiler.c \
61evas_regionbuf.c \
62evas_pipe.c \
63language/evas_bidi_utils.c \
64language/evas_language_utils.c \
65evas_text_utils.c \
66evas_font_ot.c \
67evas_map_image.c \
68evas_map_image.h
69
70EXTRA_DIST = \
71evas_blend.h \
72evas_blend_private.h \
73evas_convert_color.h \
74evas_convert_colorspace.h \
75evas_convert_gry_1.h \
76evas_convert_gry_4.h \
77evas_convert_gry_8.h \
78evas_convert_grypal_6.h \
79evas_convert_main.h \
80evas_convert_rgb_16.h \
81evas_convert_rgb_24.h \
82evas_convert_rgb_32.h \
83evas_convert_rgb_8.h \
84evas_convert_yuv.h \
85evas_draw.h \
86evas_font.h \
87evas_font_default_walk.x \
88evas_font_private.h \
89evas_image.h \
90evas_image_private.h \
91evas_line.h \
92evas_polygon.h \
93evas_rectangle.h \
94evas_scale_main.h \
95evas_scale_smooth.h \
96evas_scale_smooth_scaler.c \
97evas_scale_smooth_scaler_down.c \
98evas_scale_smooth_scaler_downx.c \
99evas_scale_smooth_scaler_downx_downy.c \
100evas_scale_smooth_scaler_downy.c \
101evas_scale_smooth_scaler_noscale.c \
102evas_scale_smooth_scaler_up.c \
103evas_scale_span.h \
104evas_pipe.h \
105language/evas_bidi_utils.h \
106language/evas_language_utils.h \
107language/evas_script_table.h \
108evas_text_utils.h \
109evas_font_ot.h \
110evas_map_image_internal.c \
111evas_map_image_core.c \
112evas_map_image_loop.c
113
114libevas_engine_common_la_DEPENDENCIES = \
115$(top_builddir)/config.h
116
117libevas_engine_common_la_LIBADD = \
118evas_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60am_libevas_engine_common_la_OBJECTS = evas_op_copy_main_.lo \
61 evas_op_blend_main_.lo evas_op_add_main_.lo \
62 evas_op_sub_main_.lo evas_op_mask_main_.lo \
63 evas_op_mul_main_.lo evas_blend_main.lo evas_blit_main.lo \
64 evas_convert_color.lo evas_convert_colorspace.lo \
65 evas_convert_gry_1.lo evas_convert_gry_4.lo \
66 evas_convert_gry_8.lo evas_convert_main.lo \
67 evas_convert_rgb_16.lo evas_convert_rgb_24.lo \
68 evas_convert_rgb_32.lo evas_convert_rgb_8.lo \
69 evas_convert_grypal_6.lo evas_convert_yuv.lo evas_cpu.lo \
70 evas_draw_main.lo evas_font_draw.lo evas_font_load.lo \
71 evas_font_main.lo evas_font_query.lo evas_image_load.lo \
72 evas_image_save.lo evas_image_main.lo evas_image_data.lo \
73 evas_image_scalecache.lo evas_line_main.lo \
74 evas_polygon_main.lo evas_rectangle_main.lo evas_scale_main.lo \
75 evas_scale_sample.lo evas_scale_smooth.lo evas_scale_span.lo \
76 evas_tiler.lo evas_regionbuf.lo evas_pipe.lo \
77 evas_bidi_utils.lo evas_language_utils.lo evas_text_utils.lo \
78 evas_font_ot.lo evas_map_image.lo
79libevas_engine_common_la_OBJECTS = \
80 $(am_libevas_engine_common_la_OBJECTS)
81AM_V_lt = $(am__v_lt_$(V))
82am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
83am__v_lt_0 = --silent
84DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
85depcomp = $(SHELL) $(top_srcdir)/depcomp
86am__depfiles_maybe = depfiles
87am__mv = mv -f
88COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
89 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
90LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
91 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
92 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
93 $(AM_CFLAGS) $(CFLAGS)
94AM_V_CC = $(am__v_CC_$(V))
95am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
96am__v_CC_0 = @echo " CC " $@;
97AM_V_at = $(am__v_at_$(V))
98am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
99am__v_at_0 = @
100CCLD = $(CC)
101LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
102 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
103 $(AM_LDFLAGS) $(LDFLAGS) -o $@
104AM_V_CCLD = $(am__v_CCLD_$(V))
105am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
106am__v_CCLD_0 = @echo " CCLD " $@;
107AM_V_GEN = $(am__v_GEN_$(V))
108am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
109am__v_GEN_0 = @echo " GEN " $@;
110SOURCES = $(libevas_engine_common_la_SOURCES)
111DIST_SOURCES = $(libevas_engine_common_la_SOURCES)
112RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
113 html-recursive info-recursive install-data-recursive \
114 install-dvi-recursive install-exec-recursive \
115 install-html-recursive install-info-recursive \
116 install-pdf-recursive install-ps-recursive install-recursive \
117 installcheck-recursive installdirs-recursive pdf-recursive \
118 ps-recursive uninstall-recursive
119RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
120 distclean-recursive maintainer-clean-recursive
121AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
122 $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
123 distdir
124ETAGS = etags
125CTAGS = ctags
126DIST_SUBDIRS = $(SUBDIRS)
127DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
128am__relativize = \
129 dir0=`pwd`; \
130 sed_first='s,^\([^/]*\)/.*$$,\1,'; \
131 sed_rest='s,^[^/]*/*,,'; \
132 sed_last='s,^.*/\([^/]*\)$$,\1,'; \
133 sed_butlast='s,/*[^/]*$$,,'; \
134 while test -n "$$dir1"; do \
135 first=`echo "$$dir1" | sed -e "$$sed_first"`; \
136 if test "$$first" != "."; then \
137 if test "$$first" = ".."; then \
138 dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
139 dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
140 else \
141 first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
142 if test "$$first2" = "$$first"; then \
143 dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
144 else \
145 dir2="../$$dir2"; \
146 fi; \
147 dir0="$$dir0"/"$$first"; \
148 fi; \
149 fi; \
150 dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
151 done; \
152 reldir="$$dir2"
153ACLOCAL = @ACLOCAL@
154ALLOCA = @ALLOCA@
155AMTAR = @AMTAR@
156AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
157AR = @AR@
158AS = @AS@
159AUTOCONF = @AUTOCONF@
160AUTOHEADER = @AUTOHEADER@
161AUTOMAKE = @AUTOMAKE@
162AWK = @AWK@
163CC = @CC@
164CCDEPMODE = @CCDEPMODE@
165CFLAGS = @CFLAGS@
166CHECK_CFLAGS = @CHECK_CFLAGS@
167CHECK_LIBS = @CHECK_LIBS@
168CPP = @CPP@
169CPPFLAGS = @CPPFLAGS@
170CXX = @CXX@
171CXXCPP = @CXXCPP@
172CXXDEPMODE = @CXXDEPMODE@
173CXXFLAGS = @CXXFLAGS@
174CYGPATH_W = @CYGPATH_W@
175DEFS = @DEFS@
176DEPDIR = @DEPDIR@
177DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
178DIRECTFB_LIBS = @DIRECTFB_LIBS@
179DLLTOOL = @DLLTOOL@
180DSYMUTIL = @DSYMUTIL@
181DUMPBIN = @DUMPBIN@
182ECHO_C = @ECHO_C@
183ECHO_N = @ECHO_N@
184ECHO_T = @ECHO_T@
185ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
186ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
187EDB_CFLAGS = @EDB_CFLAGS@
188EDB_LIBS = @EDB_LIBS@
189EDJE_CFLAGS = @EDJE_CFLAGS@
190EDJE_LIBS = @EDJE_LIBS@
191EET_CFLAGS = @EET_CFLAGS@
192EET_LIBS = @EET_LIBS@
193EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
194EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
195EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
196EGREP = @EGREP@
197EINA_CFLAGS = @EINA_CFLAGS@
198EINA_LIBS = @EINA_LIBS@
199EVAS_CFLAGS = @EVAS_CFLAGS@
200EVAS_LIBS = @EVAS_LIBS@
201EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
202EVIL_CFLAGS = @EVIL_CFLAGS@
203EVIL_LIBS = @EVIL_LIBS@
204EXEEXT = @EXEEXT@
205EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
206EXOTIC_LIBS = @EXOTIC_LIBS@
207FGREP = @FGREP@
208FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
209FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
210FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
211FREETYPE_LIBS = @FREETYPE_LIBS@
212FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
213FRIBIDI_LIBS = @FRIBIDI_LIBS@
214GL_EET_CFLAGS = @GL_EET_CFLAGS@
215GL_EET_LIBS = @GL_EET_LIBS@
216GREP = @GREP@
217HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
218HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
219INSTALL = @INSTALL@
220INSTALL_DATA = @INSTALL_DATA@
221INSTALL_PROGRAM = @INSTALL_PROGRAM@
222INSTALL_SCRIPT = @INSTALL_SCRIPT@
223INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
224LD = @LD@
225LDFLAGS = @LDFLAGS@
226LIBOBJS = @LIBOBJS@
227LIBS = @LIBS@
228LIBTOOL = @LIBTOOL@
229LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
230LINEBREAK_LIBS = @LINEBREAK_LIBS@
231LIPO = @LIPO@
232LN_S = @LN_S@
233LTLIBOBJS = @LTLIBOBJS@
234MAKEINFO = @MAKEINFO@
235MKDIR_P = @MKDIR_P@
236MODULE_ARCH = @MODULE_ARCH@
237NM = @NM@
238NMEDIT = @NMEDIT@
239OBJC = @OBJC@
240OBJCDEPMODE = @OBJCDEPMODE@
241OBJCFLAGS = @OBJCFLAGS@
242OBJDUMP = @OBJDUMP@
243OBJEXT = @OBJEXT@
244OTOOL = @OTOOL@
245OTOOL64 = @OTOOL64@
246PACKAGE = @PACKAGE@
247PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
248PACKAGE_NAME = @PACKAGE_NAME@
249PACKAGE_STRING = @PACKAGE_STRING@
250PACKAGE_TARNAME = @PACKAGE_TARNAME@
251PACKAGE_URL = @PACKAGE_URL@
252PACKAGE_VERSION = @PACKAGE_VERSION@
253PATH_SEPARATOR = @PATH_SEPARATOR@
254PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
255PIXMAN_LIBS = @PIXMAN_LIBS@
256PKG_CONFIG = @PKG_CONFIG@
257PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
258PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
259PNG_CFLAGS = @PNG_CFLAGS@
260PNG_LIBS = @PNG_LIBS@
261RANLIB = @RANLIB@
262SDL_CFLAGS = @SDL_CFLAGS@
263SDL_LIBS = @SDL_LIBS@
264SED = @SED@
265SET_MAKE = @SET_MAKE@
266SHELL = @SHELL@
267SHM_OPEN_LINK = @SHM_OPEN_LINK@
268STRIP = @STRIP@
269SVG_CFLAGS = @SVG_CFLAGS@
270SVG_LIBS = @SVG_LIBS@
271VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
272VALGRIND_LIBS = @VALGRIND_LIBS@
273VERSION = @VERSION@
274VMAJ = @VMAJ@
275WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
276WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
277XCB_CFLAGS = @XCB_CFLAGS@
278XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
279XCB_GL_LIBS = @XCB_GL_LIBS@
280XCB_LIBS = @XCB_LIBS@
281XEXT_CFLAGS = @XEXT_CFLAGS@
282XEXT_LIBS = @XEXT_LIBS@
283XMKMF = @XMKMF@
284X_CFLAGS = @X_CFLAGS@
285X_EXTRA_LIBS = @X_EXTRA_LIBS@
286X_LIBS = @X_LIBS@
287X_PRE_LIBS = @X_PRE_LIBS@
288abs_builddir = @abs_builddir@
289abs_srcdir = @abs_srcdir@
290abs_top_builddir = @abs_top_builddir@
291abs_top_srcdir = @abs_top_srcdir@
292ac_ct_CC = @ac_ct_CC@
293ac_ct_CXX = @ac_ct_CXX@
294ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
295ac_ct_OBJC = @ac_ct_OBJC@
296altivec_cflags = @altivec_cflags@
297am__include = @am__include@
298am__leading_dot = @am__leading_dot@
299am__quote = @am__quote@
300am__tar = @am__tar@
301am__untar = @am__untar@
302bindir = @bindir@
303build = @build@
304build_alias = @build_alias@
305build_cpu = @build_cpu@
306build_os = @build_os@
307build_vendor = @build_vendor@
308builddir = @builddir@
309datadir = @datadir@
310datarootdir = @datarootdir@
311dlopen_libs = @dlopen_libs@
312docdir = @docdir@
313dvidir = @dvidir@
314edje_cc = @edje_cc@
315efl_doxygen = @efl_doxygen@
316efl_have_doxygen = @efl_have_doxygen@
317evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
318evas_engine_buffer_libs = @evas_engine_buffer_libs@
319evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
320evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
321evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
322evas_engine_directfb_libs = @evas_engine_directfb_libs@
323evas_engine_fb_cflags = @evas_engine_fb_cflags@
324evas_engine_fb_libs = @evas_engine_fb_libs@
325evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
326evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
327evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
328evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
329evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
330evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
331evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
332evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
333evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
334evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
335evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
336evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
337evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
338evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
339evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
340evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
341evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
342evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
343evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
344evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
345evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
346evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
347evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
348evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
349evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
350evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
351evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
352evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
353evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
354evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
355evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
356evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
357evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
358evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
359evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
360evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
361evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
362evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
363evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
364evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
365evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
366evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
367evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
368evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
369evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
370evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
371evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
372evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
373evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
374evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
375evas_image_loader_png_libs = @evas_image_loader_png_libs@
376evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
377evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
378evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
379evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
380evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
381evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
382evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
383evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
384evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
385evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
386evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
387evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
388exec_prefix = @exec_prefix@
389have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
390have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
391have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
392have_evas_engine_software_x11 = @have_evas_engine_software_x11@
393have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
394have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
395have_lcov = @have_lcov@
396host = @host@
397host_alias = @host_alias@
398host_cpu = @host_cpu@
399host_os = @host_os@
400host_vendor = @host_vendor@
401htmldir = @htmldir@
402includedir = @includedir@
403infodir = @infodir@
404install_sh = @install_sh@
405libdir = @libdir@
406libexecdir = @libexecdir@
407localedir = @localedir@
408localstatedir = @localstatedir@
409lt_ECHO = @lt_ECHO@
410lt_enable_auto_import = @lt_enable_auto_import@
411mandir = @mandir@
412mkdir_p = @mkdir_p@
413oldincludedir = @oldincludedir@
414pdfdir = @pdfdir@
415pkgconfig_requires_private = @pkgconfig_requires_private@
416prefix = @prefix@
417program_transform_name = @program_transform_name@
418psdir = @psdir@
419pthread_cflags = @pthread_cflags@
420pthread_libs = @pthread_libs@
421release_info = @release_info@
422requirement_evas = @requirement_evas@
423sbindir = @sbindir@
424sharedstatedir = @sharedstatedir@
425srcdir = @srcdir@
426sysconfdir = @sysconfdir@
427target_alias = @target_alias@
428top_build_prefix = @top_build_prefix@
429top_builddir = @top_builddir@
430top_srcdir = @top_srcdir@
431version_info = @version_info@
432SUBDIRS = evas_op_add evas_op_blend evas_op_copy evas_op_mask evas_op_mul evas_op_sub
433MAINTAINERCLEANFILES = Makefile.in
434AM_CPPFLAGS = -I. \
435 -I$(top_srcdir)/src/lib \
436 -I$(top_srcdir)/src/lib/cserve \
437 -I$(top_srcdir)/src/lib/include \
438 -DPACKAGE_BIN_DIR=\"$(bindir)\" \
439 -DPACKAGE_LIB_DIR=\"$(libdir)\" \
440 -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
441 @FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
442 @PIXMAN_CFLAGS@ \
443 @EET_CFLAGS@ @pthread_cflags@ \
444 @EINA_CFLAGS@ \
445 @FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
446 @PIXMAN_CFLAGS@
447
448noinst_LTLIBRARIES = libevas_engine_common.la
449libevas_engine_common_la_SOURCES = \
450evas_op_copy_main_.c \
451evas_op_blend_main_.c \
452evas_op_add_main_.c \
453evas_op_sub_main_.c \
454evas_op_mask_main_.c \
455evas_op_mul_main_.c \
456evas_blend_main.c \
457evas_blit_main.c \
458evas_convert_color.c \
459evas_convert_colorspace.c \
460evas_convert_gry_1.c \
461evas_convert_gry_4.c \
462evas_convert_gry_8.c \
463evas_convert_main.c \
464evas_convert_rgb_16.c \
465evas_convert_rgb_24.c \
466evas_convert_rgb_32.c \
467evas_convert_rgb_8.c \
468evas_convert_grypal_6.c \
469evas_convert_yuv.c \
470evas_cpu.c \
471evas_draw_main.c \
472evas_font_draw.c \
473evas_font_load.c \
474evas_font_main.c \
475evas_font_query.c \
476evas_image_load.c \
477evas_image_save.c \
478evas_image_main.c \
479evas_image_data.c \
480evas_image_scalecache.c \
481evas_line_main.c \
482evas_polygon_main.c \
483evas_rectangle_main.c \
484evas_scale_main.c \
485evas_scale_sample.c \
486evas_scale_smooth.c \
487evas_scale_span.c \
488evas_tiler.c \
489evas_regionbuf.c \
490evas_pipe.c \
491language/evas_bidi_utils.c \
492language/evas_language_utils.c \
493evas_text_utils.c \
494evas_font_ot.c \
495evas_map_image.c \
496evas_map_image.h
497
498EXTRA_DIST = \
499evas_blend.h \
500evas_blend_private.h \
501evas_convert_color.h \
502evas_convert_colorspace.h \
503evas_convert_gry_1.h \
504evas_convert_gry_4.h \
505evas_convert_gry_8.h \
506evas_convert_grypal_6.h \
507evas_convert_main.h \
508evas_convert_rgb_16.h \
509evas_convert_rgb_24.h \
510evas_convert_rgb_32.h \
511evas_convert_rgb_8.h \
512evas_convert_yuv.h \
513evas_draw.h \
514evas_font.h \
515evas_font_default_walk.x \
516evas_font_private.h \
517evas_image.h \
518evas_image_private.h \
519evas_line.h \
520evas_polygon.h \
521evas_rectangle.h \
522evas_scale_main.h \
523evas_scale_smooth.h \
524evas_scale_smooth_scaler.c \
525evas_scale_smooth_scaler_down.c \
526evas_scale_smooth_scaler_downx.c \
527evas_scale_smooth_scaler_downx_downy.c \
528evas_scale_smooth_scaler_downy.c \
529evas_scale_smooth_scaler_noscale.c \
530evas_scale_smooth_scaler_up.c \
531evas_scale_span.h \
532evas_pipe.h \
533language/evas_bidi_utils.h \
534language/evas_language_utils.h \
535language/evas_script_table.h \
536evas_text_utils.h \
537evas_font_ot.h \
538evas_map_image_internal.c \
539evas_map_image_core.c \
540evas_map_image_loop.c
541
542libevas_engine_common_la_DEPENDENCIES = \
543$(top_builddir)/config.h
544
545libevas_engine_common_la_LIBADD = \
546evas_op_blend/libevas_engine_common_op_blend_master_sse3.la
547
548all: all-recursive
549
550.SUFFIXES:
551.SUFFIXES: .c .lo .o .obj
552$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
553 @for dep in $?; do \
554 case '$(am__configure_deps)' in \
555 *$$dep*) \
556 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
557 && { if test -f $@; then exit 0; else break; fi; }; \
558 exit 1;; \
559 esac; \
560 done; \
561 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/Makefile'; \
562 $(am__cd) $(top_srcdir) && \
563 $(AUTOMAKE) --gnu src/lib/engines/common/Makefile
564.PRECIOUS: Makefile
565Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
566 @case '$?' in \
567 *config.status*) \
568 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
569 *) \
570 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
571 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
572 esac;
573
574$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
575 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
576
577$(top_srcdir)/configure: $(am__configure_deps)
578 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
579$(ACLOCAL_M4): $(am__aclocal_m4_deps)
580 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
581$(am__aclocal_m4_deps):
582
583clean-noinstLTLIBRARIES:
584 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
585 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
586 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
587 test "$$dir" != "$$p" || dir=.; \
588 echo "rm -f \"$${dir}/so_locations\""; \
589 rm -f "$${dir}/so_locations"; \
590 done
591libevas_engine_common.la: $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_DEPENDENCIES)
592 $(AM_V_CCLD)$(LINK) $(libevas_engine_common_la_OBJECTS) $(libevas_engine_common_la_LIBADD) $(LIBS)
593
594mostlyclean-compile:
595 -rm -f *.$(OBJEXT)
596
597distclean-compile:
598 -rm -f *.tab.c
599
600@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_bidi_utils.Plo@am__quote@
601@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blend_main.Plo@am__quote@
602@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_blit_main.Plo@am__quote@
603@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_color.Plo@am__quote@
604@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_colorspace.Plo@am__quote@
605@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_1.Plo@am__quote@
606@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_4.Plo@am__quote@
607@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_gry_8.Plo@am__quote@
608@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_grypal_6.Plo@am__quote@
609@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_main.Plo@am__quote@
610@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_16.Plo@am__quote@
611@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_24.Plo@am__quote@
612@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_32.Plo@am__quote@
613@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_rgb_8.Plo@am__quote@
614@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_convert_yuv.Plo@am__quote@
615@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_cpu.Plo@am__quote@
616@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_draw_main.Plo@am__quote@
617@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_draw.Plo@am__quote@
618@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_load.Plo@am__quote@
619@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_main.Plo@am__quote@
620@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_ot.Plo@am__quote@
621@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_font_query.Plo@am__quote@
622@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_data.Plo@am__quote@
623@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_load.Plo@am__quote@
624@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_main.Plo@am__quote@
625@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_save.Plo@am__quote@
626@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_image_scalecache.Plo@am__quote@
627@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_language_utils.Plo@am__quote@
628@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_line_main.Plo@am__quote@
629@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_map_image.Plo@am__quote@
630@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_add_main_.Plo@am__quote@
631@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_blend_main_.Plo@am__quote@
632@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_copy_main_.Plo@am__quote@
633@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mask_main_.Plo@am__quote@
634@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_mul_main_.Plo@am__quote@
635@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_op_sub_main_.Plo@am__quote@
636@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_pipe.Plo@am__quote@
637@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_polygon_main.Plo@am__quote@
638@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_rectangle_main.Plo@am__quote@
639@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_regionbuf.Plo@am__quote@
640@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_main.Plo@am__quote@
641@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_sample.Plo@am__quote@
642@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_smooth.Plo@am__quote@
643@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_scale_span.Plo@am__quote@
644@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_text_utils.Plo@am__quote@
645@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_tiler.Plo@am__quote@
646
647.c.o:
648@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
649@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
650@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
651@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
652@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
653@am__fastdepCC_FALSE@ $(COMPILE) -c $<
654
655.c.obj:
656@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
657@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
658@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
659@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
660@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
661@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
662
663.c.lo:
664@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
665@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
666@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
667@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
668@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
669@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
670
671evas_bidi_utils.lo: language/evas_bidi_utils.c
672@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
673@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_bidi_utils.Tpo $(DEPDIR)/evas_bidi_utils.Plo
674@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
675@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_bidi_utils.c' object='evas_bidi_utils.lo' libtool=yes @AMDEPBACKSLASH@
676@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
677@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
678
679evas_language_utils.lo: language/evas_language_utils.c
680@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
681@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/evas_language_utils.Tpo $(DEPDIR)/evas_language_utils.Plo
682@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
683@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='language/evas_language_utils.c' object='evas_language_utils.lo' libtool=yes @AMDEPBACKSLASH@
684@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
685@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
686
687mostlyclean-libtool:
688 -rm -f *.lo
689
690clean-libtool:
691 -rm -rf .libs _libs
692
693# This directory's subdirectories are mostly independent; you can cd
694# into them and run `make' without going through this Makefile.
695# To change the values of `make' variables: instead of editing Makefiles,
696# (1) if the variable is set in `config.status', edit `config.status'
697# (which will cause the Makefiles to be regenerated when you run `make');
698# (2) otherwise, pass the desired values on the `make' command line.
699$(RECURSIVE_TARGETS):
700 @fail= failcom='exit 1'; \
701 for f in x $$MAKEFLAGS; do \
702 case $$f in \
703 *=* | --[!k]*);; \
704 *k*) failcom='fail=yes';; \
705 esac; \
706 done; \
707 dot_seen=no; \
708 target=`echo $@ | sed s/-recursive//`; \
709 list='$(SUBDIRS)'; for subdir in $$list; do \
710 echo "Making $$target in $$subdir"; \
711 if test "$$subdir" = "."; then \
712 dot_seen=yes; \
713 local_target="$$target-am"; \
714 else \
715 local_target="$$target"; \
716 fi; \
717 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
718 || eval $$failcom; \
719 done; \
720 if test "$$dot_seen" = "no"; then \
721 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
722 fi; test -z "$$fail"
723
724$(RECURSIVE_CLEAN_TARGETS):
725 @fail= failcom='exit 1'; \
726 for f in x $$MAKEFLAGS; do \
727 case $$f in \
728 *=* | --[!k]*);; \
729 *k*) failcom='fail=yes';; \
730 esac; \
731 done; \
732 dot_seen=no; \
733 case "$@" in \
734 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
735 *) list='$(SUBDIRS)' ;; \
736 esac; \
737 rev=''; for subdir in $$list; do \
738 if test "$$subdir" = "."; then :; else \
739 rev="$$subdir $$rev"; \
740 fi; \
741 done; \
742 rev="$$rev ."; \
743 target=`echo $@ | sed s/-recursive//`; \
744 for subdir in $$rev; do \
745 echo "Making $$target in $$subdir"; \
746 if test "$$subdir" = "."; then \
747 local_target="$$target-am"; \
748 else \
749 local_target="$$target"; \
750 fi; \
751 ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
752 || eval $$failcom; \
753 done && test -z "$$fail"
754tags-recursive:
755 list='$(SUBDIRS)'; for subdir in $$list; do \
756 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
757 done
758ctags-recursive:
759 list='$(SUBDIRS)'; for subdir in $$list; do \
760 test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
761 done
762
763ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
764 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
765 unique=`for i in $$list; do \
766 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
767 done | \
768 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
769 END { if (nonempty) { for (i in files) print i; }; }'`; \
770 mkid -fID $$unique
771tags: TAGS
772
773TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
774 $(TAGS_FILES) $(LISP)
775 set x; \
776 here=`pwd`; \
777 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
778 include_option=--etags-include; \
779 empty_fix=.; \
780 else \
781 include_option=--include; \
782 empty_fix=; \
783 fi; \
784 list='$(SUBDIRS)'; for subdir in $$list; do \
785 if test "$$subdir" = .; then :; else \
786 test ! -f $$subdir/TAGS || \
787 set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
788 fi; \
789 done; \
790 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
791 unique=`for i in $$list; do \
792 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
793 done | \
794 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
795 END { if (nonempty) { for (i in files) print i; }; }'`; \
796 shift; \
797 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
798 test -n "$$unique" || unique=$$empty_fix; \
799 if test $$# -gt 0; then \
800 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
801 "$$@" $$unique; \
802 else \
803 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
804 $$unique; \
805 fi; \
806 fi
807ctags: CTAGS
808CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
809 $(TAGS_FILES) $(LISP)
810 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
811 unique=`for i in $$list; do \
812 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
813 done | \
814 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
815 END { if (nonempty) { for (i in files) print i; }; }'`; \
816 test -z "$(CTAGS_ARGS)$$unique" \
817 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
818 $$unique
819
820GTAGS:
821 here=`$(am__cd) $(top_builddir) && pwd` \
822 && $(am__cd) $(top_srcdir) \
823 && gtags -i $(GTAGS_ARGS) "$$here"
824
825distclean-tags:
826 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
827
828distdir: $(DISTFILES)
829 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
830 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
831 list='$(DISTFILES)'; \
832 dist_files=`for file in $$list; do echo $$file; done | \
833 sed -e "s|^$$srcdirstrip/||;t" \
834 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
835 case $$dist_files in \
836 */*) $(MKDIR_P) `echo "$$dist_files" | \
837 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
838 sort -u` ;; \
839 esac; \
840 for file in $$dist_files; do \
841 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
842 if test -d $$d/$$file; then \
843 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
844 if test -d "$(distdir)/$$file"; then \
845 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
846 fi; \
847 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
848 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
849 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
850 fi; \
851 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
852 else \
853 test -f "$(distdir)/$$file" \
854 || cp -p $$d/$$file "$(distdir)/$$file" \
855 || exit 1; \
856 fi; \
857 done
858 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
859 if test "$$subdir" = .; then :; else \
860 test -d "$(distdir)/$$subdir" \
861 || $(MKDIR_P) "$(distdir)/$$subdir" \
862 || exit 1; \
863 fi; \
864 done
865 @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
866 if test "$$subdir" = .; then :; else \
867 dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
868 $(am__relativize); \
869 new_distdir=$$reldir; \
870 dir1=$$subdir; dir2="$(top_distdir)"; \
871 $(am__relativize); \
872 new_top_distdir=$$reldir; \
873 echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
874 echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
875 ($(am__cd) $$subdir && \
876 $(MAKE) $(AM_MAKEFLAGS) \
877 top_distdir="$$new_top_distdir" \
878 distdir="$$new_distdir" \
879 am__remove_distdir=: \
880 am__skip_length_check=: \
881 am__skip_mode_fix=: \
882 distdir) \
883 || exit 1; \
884 fi; \
885 done
886check-am: all-am
887check: check-recursive
888all-am: Makefile $(LTLIBRARIES)
889installdirs: installdirs-recursive
890installdirs-am:
891install: install-recursive
892install-exec: install-exec-recursive
893install-data: install-data-recursive
894uninstall: uninstall-recursive
895
896install-am: all-am
897 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
898
899installcheck: installcheck-recursive
900install-strip:
901 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
902 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
903 `test -z '$(STRIP)' || \
904 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
905mostlyclean-generic:
906
907clean-generic:
908
909distclean-generic:
910 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
911 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
912
913maintainer-clean-generic:
914 @echo "This command is intended for maintainers to use"
915 @echo "it deletes files that may require special tools to rebuild."
916 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
917clean: clean-recursive
918
919clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
920 mostlyclean-am
921
922distclean: distclean-recursive
923 -rm -rf ./$(DEPDIR)
924 -rm -f Makefile
925distclean-am: clean-am distclean-compile distclean-generic \
926 distclean-tags
927
928dvi: dvi-recursive
929
930dvi-am:
931
932html: html-recursive
933
934html-am:
935
936info: info-recursive
937
938info-am:
939
940install-data-am:
941
942install-dvi: install-dvi-recursive
943
944install-dvi-am:
945
946install-exec-am:
947
948install-html: install-html-recursive
949
950install-html-am:
951
952install-info: install-info-recursive
953
954install-info-am:
955
956install-man:
957
958install-pdf: install-pdf-recursive
959
960install-pdf-am:
961
962install-ps: install-ps-recursive
963
964install-ps-am:
965
966installcheck-am:
967
968maintainer-clean: maintainer-clean-recursive
969 -rm -rf ./$(DEPDIR)
970 -rm -f Makefile
971maintainer-clean-am: distclean-am maintainer-clean-generic
972
973mostlyclean: mostlyclean-recursive
974
975mostlyclean-am: mostlyclean-compile mostlyclean-generic \
976 mostlyclean-libtool
977
978pdf: pdf-recursive
979
980pdf-am:
981
982ps: ps-recursive
983
984ps-am:
985
986uninstall-am:
987
988.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
989 install-am install-strip tags-recursive
990
991.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
992 all all-am check check-am clean clean-generic clean-libtool \
993 clean-noinstLTLIBRARIES ctags ctags-recursive distclean \
994 distclean-compile distclean-generic distclean-libtool \
995 distclean-tags distdir dvi dvi-am html html-am info info-am \
996 install install-am install-data install-data-am install-dvi \
997 install-dvi-am install-exec install-exec-am install-html \
998 install-html-am install-info install-info-am install-man \
999 install-pdf install-pdf-am install-ps install-ps-am \
1000 install-strip installcheck installcheck-am installdirs \
1001 installdirs-am maintainer-clean maintainer-clean-generic \
1002 mostlyclean mostlyclean-compile mostlyclean-generic \
1003 mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
1004 uninstall uninstall-am
1005
1006
1007# Tell versions [3.59,3.63) of GNU make to not export all variables.
1008# Otherwise a system limit (for SysV at least) may be exceeded.
1009.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 @@
1#ifndef _EVAS_BLEND_H
2#define _EVAS_BLEND_H
3
4
5EAPI void evas_common_blend_init (void);
6
7
8#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 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4#if defined BUILD_MMX || defined BUILD_SSE
5#include "evas_mmx.h"
6#endif
7
8const DATA32 ALPHA_255 = 255;
9const DATA32 ALPHA_256 = 256;
10
11static void
12_composite_span_nothing(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__, int l __UNUSED__)
13{
14}
15
16static void
17_composite_pt_nothing(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d __UNUSED__)
18{
19}
20
21static RGBA_Gfx_Compositor *
22evas_gfx_compositor_get(unsigned char op)
23{
24 RGBA_Gfx_Compositor *comp;
25
26 switch (op)
27 {
28 case _EVAS_RENDER_BLEND:
29 comp = evas_common_gfx_compositor_blend_get();
30 break;
31 case _EVAS_RENDER_BLEND_REL:
32 comp = evas_common_gfx_compositor_blend_rel_get();
33 break;
34 case _EVAS_RENDER_COPY:
35 comp = evas_common_gfx_compositor_copy_get();
36 break;
37 case _EVAS_RENDER_COPY_REL:
38 comp = evas_common_gfx_compositor_copy_rel_get();
39 break;
40/*
41 case _EVAS_RENDER_ADD:
42 comp = evas_common_gfx_compositor_add_get();
43 break;
44 case _EVAS_RENDER_ADD_REL:
45 comp = evas_common_gfx_compositor_add_rel_get();
46 break;
47 case _EVAS_RENDER_SUB:
48 comp = evas_common_gfx_compositor_sub_get();
49 break;
50 case _EVAS_RENDER_SUB_REL:
51 comp = evas_common_gfx_compositor_sub_rel_get();
52 break;
53*/
54 case _EVAS_RENDER_MASK:
55 comp = evas_common_gfx_compositor_mask_get();
56 break;
57 case _EVAS_RENDER_MUL:
58 comp = evas_common_gfx_compositor_mul_get();
59 break;
60 default:
61 comp = evas_common_gfx_compositor_blend_get();
62 break;
63 }
64 return comp;
65}
66
67EAPI void
68evas_common_blend_init(void)
69{
70 static int gfx_initialised = 0;
71 static int mmx = 0;
72 static int sse = 0;
73 static int sse2 = 0;
74 RGBA_Gfx_Compositor *comp;
75
76 if (gfx_initialised) return;
77 gfx_initialised = 1;
78
79 evas_common_cpu_can_do(&mmx, &sse, &sse2);
80
81 comp = evas_common_gfx_compositor_copy_get();
82 if (comp) comp->init();
83 comp = evas_common_gfx_compositor_copy_rel_get();
84 if (comp) comp->init();
85
86 comp = evas_common_gfx_compositor_blend_get();
87 if (comp) comp->init();
88 comp = evas_common_gfx_compositor_blend_rel_get();
89 if (comp) comp->init();
90
91/*
92 comp = evas_common_gfx_compositor_add_get();
93 if (comp) comp->init();
94 comp = evas_common_gfx_compositor_add_rel_get();
95 if (comp) comp->init();
96 comp = evas_common_gfx_compositor_sub_get();
97 if (comp) comp->init();
98 comp = evas_common_gfx_compositor_sub_rel_get();
99 if (comp) comp->init();
100*/
101 comp = evas_common_gfx_compositor_mask_get();
102 if (comp) comp->init();
103
104 comp = evas_common_gfx_compositor_mul_get();
105 if (comp) comp->init();
106}
107
108void
109evas_common_blend_shutdown(void)
110{
111 RGBA_Gfx_Compositor *comp;
112
113 comp = evas_common_gfx_compositor_copy_get();
114 if (comp) comp->shutdown();
115 comp = evas_common_gfx_compositor_copy_rel_get();
116 if (comp) comp->shutdown();
117
118 comp = evas_common_gfx_compositor_blend_get();
119 if (comp) comp->shutdown();
120 comp = evas_common_gfx_compositor_blend_rel_get();
121 if (comp) comp->shutdown();
122
123/*
124 comp = evas_common_gfx_compositor_add_get();
125 if (comp) comp->shutdown();
126 comp = evas_common_gfx_compositor_add_rel_get();
127 if (comp) comp->shutdown();
128 comp = evas_common_gfx_compositor_sub_get();
129 if (comp) comp->shutdown();
130 comp = evas_common_gfx_compositor_sub_rel_get();
131 if (comp) comp->shutdown();
132*/
133 comp = evas_common_gfx_compositor_mask_get();
134 if (comp) comp->shutdown();
135
136 comp = evas_common_gfx_compositor_mul_get();
137 if (comp) comp->shutdown();
138}
139
140
141RGBA_Gfx_Func
142evas_common_gfx_func_composite_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op)
143{
144 RGBA_Gfx_Compositor *comp;
145 RGBA_Gfx_Func func = NULL;
146
147 if (src && (!src->cache_entry.flags.alpha))
148 {
149 if (op == _EVAS_RENDER_BLEND)
150 op = _EVAS_RENDER_COPY;
151 if (op == _EVAS_RENDER_BLEND_REL)
152 op = _EVAS_RENDER_COPY_REL;
153 }
154 comp = evas_gfx_compositor_get(op);
155 if (comp)
156 func = comp->composite_pixel_span_get(src, dst, pixels);
157 if (func)
158 return func;
159 return _composite_span_nothing;
160}
161
162RGBA_Gfx_Func
163evas_common_gfx_func_composite_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op)
164{
165 RGBA_Gfx_Compositor *comp;
166 RGBA_Gfx_Func func = NULL;
167
168 if ((col & 0xff000000) == 0xff000000)
169 {
170 if (op == _EVAS_RENDER_BLEND)
171 op = _EVAS_RENDER_COPY;
172 if (op == EVAS_RENDER_BLEND_REL)
173 op = _EVAS_RENDER_COPY_REL;
174 }
175
176 comp = evas_gfx_compositor_get(op);
177 if (comp)
178 func = comp->composite_color_span_get(col, dst, pixels);
179 if (func)
180 return func;
181 return _composite_span_nothing;
182}
183
184RGBA_Gfx_Func
185evas_common_gfx_func_composite_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op)
186{
187 RGBA_Gfx_Compositor *comp;
188 RGBA_Gfx_Func func = NULL;
189
190 if ((src && (!src->cache_entry.flags.alpha)) && ((col & 0xff000000) == 0xff000000))
191 {
192 if (op == _EVAS_RENDER_BLEND)
193 op = _EVAS_RENDER_COPY;
194 if (op == _EVAS_RENDER_BLEND_REL)
195 op = _EVAS_RENDER_COPY_REL;
196 }
197
198 comp = evas_gfx_compositor_get(op);
199 if (comp)
200 func = comp->composite_pixel_color_span_get(src, col, dst, pixels);
201 if (func)
202 return func;
203 return _composite_span_nothing;
204}
205
206RGBA_Gfx_Func
207evas_common_gfx_func_composite_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels, int op)
208{
209 RGBA_Gfx_Compositor *comp;
210 RGBA_Gfx_Func func = NULL;
211
212 comp = evas_gfx_compositor_get(op);
213 if (comp)
214 func = comp->composite_mask_color_span_get(col, dst, pixels);
215 if (func)
216 return func;
217 return _composite_span_nothing;
218}
219
220RGBA_Gfx_Func
221evas_common_gfx_func_composite_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels, int op)
222{
223 RGBA_Gfx_Compositor *comp;
224 RGBA_Gfx_Func func = NULL;
225
226 comp = evas_gfx_compositor_get(op);
227 if (comp)
228 func = comp->composite_pixel_mask_span_get(src, dst, pixels);
229 if (func)
230 return func;
231 return _composite_span_nothing;
232}
233
234RGBA_Gfx_Pt_Func
235evas_common_gfx_func_composite_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op)
236{
237 RGBA_Gfx_Compositor *comp;
238 RGBA_Gfx_Pt_Func func = NULL;
239
240 if (!src_flags.alpha)
241 {
242 if (op == _EVAS_RENDER_BLEND)
243 op = _EVAS_RENDER_COPY;
244 if (op == _EVAS_RENDER_BLEND_REL)
245 op = _EVAS_RENDER_COPY_REL;
246 }
247 comp = evas_gfx_compositor_get(op);
248 if (comp)
249 func = comp->composite_pixel_pt_get(src_flags, dst);
250 if (func)
251 return func;
252 return _composite_pt_nothing;
253}
254
255RGBA_Gfx_Pt_Func
256evas_common_gfx_func_composite_color_pt_get(DATA32 col, RGBA_Image *dst, int op)
257{
258 RGBA_Gfx_Compositor *comp;
259 RGBA_Gfx_Pt_Func func = NULL;
260
261 if ((col & 0xff000000) == 0xff000000)
262 {
263 if (op == _EVAS_RENDER_BLEND)
264 op = _EVAS_RENDER_COPY;
265 if (op == EVAS_RENDER_BLEND_REL)
266 op = _EVAS_RENDER_COPY_REL;
267 }
268
269 comp = evas_gfx_compositor_get(op);
270 if (comp)
271 func = comp->composite_color_pt_get(col, dst);
272 if (func)
273 return func;
274 return _composite_pt_nothing;
275}
276
277RGBA_Gfx_Pt_Func
278evas_common_gfx_func_composite_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op)
279{
280 RGBA_Gfx_Compositor *comp;
281 RGBA_Gfx_Pt_Func func = NULL;
282
283 if ((!src_flags.alpha) && ((col & 0xff000000) == 0xff000000))
284 {
285 if (op == _EVAS_RENDER_BLEND)
286 op = _EVAS_RENDER_COPY;
287 if (op == _EVAS_RENDER_BLEND_REL)
288 op = _EVAS_RENDER_COPY_REL;
289 }
290
291 comp = evas_gfx_compositor_get(op);
292 if (comp)
293 func = comp->composite_pixel_color_pt_get(src_flags, col, dst);
294 if (func)
295 return func;
296 return _composite_pt_nothing;
297}
298
299RGBA_Gfx_Pt_Func
300evas_common_gfx_func_composite_mask_color_pt_get(DATA32 col, RGBA_Image *dst, int op)
301{
302 RGBA_Gfx_Compositor *comp;
303 RGBA_Gfx_Pt_Func func = NULL;
304
305 comp = evas_gfx_compositor_get(op);
306 if (comp)
307 func = comp->composite_mask_color_pt_get(col, dst);
308 if (func)
309 return func;
310 return _composite_pt_nothing;
311}
312
313RGBA_Gfx_Pt_Func
314evas_common_gfx_func_composite_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst, int op)
315{
316 RGBA_Gfx_Compositor *comp;
317 RGBA_Gfx_Pt_Func func = NULL;
318
319 comp = evas_gfx_compositor_get(op);
320 if (comp)
321 func = comp->composite_pixel_mask_pt_get(src_flags, dst);
322 if (func)
323 return func;
324 return _composite_pt_nothing;
325}
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 @@
1#ifndef _EVAS_BLEND_PRIVATE_H
2#define _EVAS_BLEND_PRIVATE_H
3
4
5RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_get (void);
6RGBA_Gfx_Compositor *evas_common_gfx_compositor_blend_rel_get (void);
7RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_get (void);
8RGBA_Gfx_Compositor *evas_common_gfx_compositor_copy_rel_get (void);
9RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_get (void);
10RGBA_Gfx_Compositor *evas_common_gfx_compositor_add_rel_get (void);
11/*
12RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_get(void);
13RGBA_Gfx_Compositor *evas_common_gfx_compositor_sub_rel_get(void);
14*/
15RGBA_Gfx_Compositor *evas_common_gfx_compositor_mask_get (void);
16RGBA_Gfx_Compositor *evas_common_gfx_compositor_mul_get (void);
17
18RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op);
19RGBA_Gfx_Func evas_common_gfx_func_composite_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op);
20RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_color_span_get (RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels, int op);
21RGBA_Gfx_Func evas_common_gfx_func_composite_mask_color_span_get (DATA32 col, RGBA_Image *dst, int pixels, int op);
22RGBA_Gfx_Func evas_common_gfx_func_composite_pixel_mask_span_get (RGBA_Image *src, RGBA_Image *dst, int pixels, int op);
23
24RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op);
25RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_color_pt_get (DATA32 col, RGBA_Image *dst, int op);
26RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_color_pt_get (Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst, int op);
27RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_mask_color_pt_get (DATA32 col, RGBA_Image *dst, int op);
28RGBA_Gfx_Pt_Func evas_common_gfx_func_composite_pixel_mask_pt_get (Image_Entry_Flags src_flags, RGBA_Image *dst, int op);
29
30
31#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 @@
1#include "evas_common.h"
2
3#if defined BUILD_MMX || defined BUILD_SSE
4#include "evas_mmx.h"
5#endif
6
7#define ALIGN_FIX
8
9static void evas_common_copy_pixels_c (DATA32 *src, DATA32 *dst, int len);
10static void evas_common_copy_pixels_mmx (DATA32 *src, DATA32 *dst, int len);
11static void evas_common_copy_pixels_mmx2 (DATA32 *src, DATA32 *dst, int len);
12static void evas_common_copy_pixels_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len);
13
14#ifdef BUILD_NEON
15static void evas_common_copy_pixels_neon (DATA32 *src, DATA32 *dst, int len);
16static void evas_common_copy_pixels_rev_neon (DATA32 *src, DATA32 *dst, int len);
17#endif
18
19static void evas_common_copy_pixels_rev_c (DATA32 *src, DATA32 *dst, int len);
20static void evas_common_copy_pixels_rev_mmx (DATA32 *src, DATA32 *dst, int len);
21static void evas_common_copy_pixels_rev_sse/*NB*/ (DATA32 *src, DATA32 *dst, int len);
22
23static void evas_common_copy_rev_pixels_c (DATA32 *src, DATA32 *dst, int len);
24
25
26EAPI void
27evas_common_blit_init(void)
28{
29}
30
31EAPI void
32evas_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)
33{
34 int y;
35 Gfx_Func_Copy func;
36 DATA32 *src_ptr, *dst_ptr;
37
38 /* clip clip clip */
39 if (w <= 0) return;
40 if (src_x + w > (int)src->cache_entry.w) w = src->cache_entry.w - src_x;
41 if (w <= 0) return;
42 if (src_x < 0)
43 {
44 dst_x -= src_x;
45 w += src_x;
46 src_x = 0;
47 }
48 if (w <= 0) return;
49
50 if (h <= 0) return;
51 if (src_y + h > (int)src->cache_entry.h) h = src->cache_entry.h - src_y;
52 if (h <= 0) return;
53 if (src_y < 0)
54 {
55 dst_y -= src_y;
56 h += src_y;
57 src_y = 0;
58 }
59 if (h <= 0) return;
60
61 if (w <= 0) return;
62 if (dst_x + w > (int)dst->cache_entry.w) w = dst->cache_entry.w - dst_x;
63 if (w <= 0) return;
64 if (dst_x < 0)
65 {
66 src_x -= dst_x;
67 w += dst_x;
68 dst_x = 0;
69 }
70 if (w <= 0) return;
71
72 if (h <= 0) return;
73 if (dst_y + h > (int)dst->cache_entry.h) h = dst->cache_entry.h - dst_y;
74 if (h <= 0) return;
75 if (dst_y < 0)
76 {
77 src_y -= dst_y;
78 h += dst_y;
79 dst_y = 0;
80 }
81 if (h <= 0) return;
82
83 if (dst == src)
84 {
85 /* src after dst - go forward */
86 if (((src_y * src->cache_entry.w) + src_x) > ((dst_y * dst->cache_entry.w) + dst_x))
87 {
88 func = evas_common_draw_func_copy_get(w, 0);
89 for (y = 0; y < h; y++)
90 {
91 src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x;
92 dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x;
93 func(src_ptr, dst_ptr, w);
94 }
95 }
96 /* reverse */
97 else
98 {
99 func = evas_common_draw_func_copy_get(w, 1);
100 for (y = h - 1; y >= 0; y--)
101 {
102 src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x;
103 dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x;
104 func(src_ptr, dst_ptr, w);
105 }
106 }
107 }
108 else
109 {
110 func = evas_common_draw_func_copy_get(w, 0);
111 for (y = 0; y < h; y++)
112 {
113 src_ptr = src->image.data + ((y + src_y) * src->cache_entry.w) + src_x;
114 dst_ptr = dst->image.data + ((y + dst_y) * dst->cache_entry.w) + dst_x;
115 func(src_ptr, dst_ptr, w);
116 }
117 }
118}
119
120/****************************************************************************/
121
122static void
123evas_common_copy_rev_pixels_c(DATA32 *src, DATA32 *dst, int len)
124{
125 DATA32 *dst_end = dst + len;
126
127 src += len - 1;
128 while (dst < dst_end) *dst++ = *src--;
129}
130
131
132#ifdef BUILD_NEON
133static void
134evas_common_copy_pixels_rev_neon(DATA32 *src, DATA32 *dst, int len)
135{
136 uint32_t *tmp = (void *)37;
137#define AP "evas_common_copy_rev_pixels_neon_"
138 asm volatile (
139 ".fpu neon \n\t"
140 // Can we do 32 byte?
141 "andS %[tmp], %[d], $0x1f \n\t"
142 "beq "AP"quadstart \n\t"
143
144 // Can we do at least 16 byte?
145 "andS %[tmp], %[d], $0x4 \n\t"
146 "beq "AP"dualstart \n\t"
147
148 // Only once
149 AP"singleloop: \n\t"
150 "sub %[s], #4 \n\t"
151 "vld1.32 d0[0], [%[s]] \n\t"
152 "vst1.32 d0[0], [%[d]]! \n\t"
153
154 // Up to 3 times
155 AP"dualstart: \n\t"
156 "sub %[tmp], %[e], %[d] \n\t"
157 "cmp %[tmp], #31 \n\t"
158 "blt "AP"loopout \n\t"
159
160 "andS %[tmp], %[d], $0x1f \n\t"
161 "beq "AP"quadstart \n\t"
162
163 AP"dualloop: \n\t"
164 "sub %[s], #8 \n\t"
165 "vldm %[s], {d0} \n\t"
166 "vrev64.32 d1, d0 \n\t"
167 "vstm %[d]!, {d1} \n\t"
168
169 "andS %[tmp], %[d], $0x1f \n\t"
170 "bne "AP"dualloop \n\t"
171
172
173 AP"quadstart: \n\t"
174 "sub %[tmp], %[e], %[d] \n\t"
175 "cmp %[tmp], #32 \n\t"
176 "blt "AP"loopout \n\t"
177
178 "sub %[tmp],%[e],#32 \n\t"
179
180 AP "quadloop: \n\t"
181 "sub %[s], #32 \n\t"
182 "vldm %[s], {d0,d1,d2,d3} \n\t"
183
184 "vrev64.32 d7,d0 \n\t"
185 "vrev64.32 d6,d1 \n\t"
186 "vrev64.32 d5,d2 \n\t"
187 "vrev64.32 d4,d3 \n\t"
188
189 "vstm %[d]!, {d4,d5,d6,d7} \n\t"
190
191 "cmp %[tmp], %[d] \n\t"
192 "bhi "AP"quadloop \n\t"
193
194
195 AP "loopout: \n\t"
196 "cmp %[d], %[e] \n\t"
197 "beq "AP"done \n\t"
198 "sub %[tmp],%[e], %[d] \n\t"
199 "cmp %[tmp],$0x04 \n\t"
200 "beq "AP"singleloop2 \n\t"
201
202 AP "dualloop2: \n\t"
203 "sub %[tmp],%[e],$0x7 \n\t"
204 AP "dualloop2int: \n\t"
205 "sub %[s], #8 \n\t"
206 "vldm %[s], {d0} \n\t"
207 "vrev64.32 d1,d0 \n\t"
208 "vstm %[d]!, {d1} \n\t"
209
210 "cmp %[tmp], %[d] \n\t"
211 "bhi "AP"dualloop2int \n\t"
212
213 // Single ??
214 "cmp %[e], %[d] \n\t"
215 "beq "AP"done \n\t"
216
217 AP "singleloop2: \n\t"
218 "sub %[s], #4 \n\t"
219 "vld1.32 d0[0], [%[s]] \n\t"
220 "vst1.32 d0[0], [%[d]] \n\t"
221
222 AP "done:\n\t"
223
224 : // No output regs
225 // Input
226 : [s] "r" (src + len), [e] "r" (dst + len), [d] "r" (dst),[tmp] "r" (tmp)
227 // Clobbered
228 : "q0","q1","q2","q3","0","1","memory"
229 );
230#undef AP
231
232}
233#endif
234
235
236#ifdef BUILD_C
237static void
238evas_common_copy_pixels_c(DATA32 *src, DATA32 *dst, int len)
239{
240 DATA32 *dst_end = dst + len;
241
242 while (dst < dst_end) *dst++ = *src++;
243}
244#endif
245
246#ifdef BUILD_MMX
247static void
248evas_common_copy_pixels_mmx(DATA32 *src, DATA32 *dst, int len)
249{ // XXX cppcheck: [./src/lib/engines/common/evas_blit_main.c:248]: (error) Invalid number of character ({). Can't process file.
250 // so... wtf? what's wrong with this { ? or anytrhing surrounding it?
251 DATA32 *dst_end, *dst_end_pre;
252#ifdef ALIGN_FIX
253 intptr_t src_align;
254 intptr_t dst_align;
255
256 src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
257 dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
258
259 if ((src_align != dst_align) ||
260 ((src_align & 0x3) != 0))
261 {
262#ifdef BUILD_C
263 evas_common_copy_pixels_c(src, dst, len);
264 return;
265 }
266#endif
267
268 while ((src_align > 0) && (len > 0))
269 {
270 *dst++ = *src++;
271 len--;
272 src_align -= sizeof(DATA32);
273 }
274#endif /* ALIGN_FIX */
275
276 dst_end = dst + len;
277 dst_end_pre = dst + ((len / 16) * 16);
278
279 while (dst < dst_end_pre)
280 {
281 MOVE_16DWORDS_MMX(src, dst);
282 src += 16;
283 dst += 16;
284 }
285 while (dst < dst_end) *dst++ = *src++;
286}
287#endif
288
289#ifdef BUILD_MMX
290static void
291evas_common_copy_pixels_mmx2(DATA32 *src, DATA32 *dst, int len)
292{
293 DATA32 *dst_end, *dst_end_pre;
294#ifdef ALIGN_FIX
295 intptr_t src_align;
296 intptr_t dst_align;
297
298 src_align = (intptr_t)src & 0x3f; /* 64 byte alignment */
299 dst_align = (intptr_t)dst & 0x3f; /* 64 byte alignment */
300
301 if ((src_align != dst_align) ||
302 ((src_align & 0x3) != 0))
303 {
304#ifdef BUILD_C
305 evas_common_copy_pixels_c(src, dst, len);
306#endif
307 return;
308 }
309
310 while ((src_align > 0) && (len > 0))
311 {
312 *dst++ = *src++;
313 len--;
314 src_align -= sizeof(DATA32);
315 }
316#endif
317
318 dst_end = dst + len;
319 dst_end_pre = dst + ((len / 16) * 16);
320
321 while (dst < dst_end_pre)
322 {
323 MOVE_16DWORDS_MMX(src, dst);
324 src += 16;
325 dst += 16;
326 }
327 while (dst < dst_end) *dst++ = *src++;
328}
329#endif
330
331#ifdef BUILD_NEON
332static void
333evas_common_copy_pixels_neon(DATA32 *src, DATA32 *dst, int len){
334 uint32_t *e,*tmp = (void *)37;
335 e = dst + len;
336#define AP "evas_common_copy_pixels_neon_"
337 asm volatile (
338 ".fpu neon \n\t"
339 // Can we do 32 byte?
340 "andS %[tmp], %[d], $0x1f \n\t"
341 "beq "AP"quadstart \n\t"
342
343 // Can we do at least 16 byte?
344 "andS %[tmp], %[d], $0x4 \n\t"
345 "beq "AP"dualstart \n\t"
346
347 // Only once
348 AP"singleloop: \n\t"
349 "vld1.32 d0[0], [%[s]]! \n\t"
350 "vst1.32 d0[0], [%[d]]! \n\t"
351
352 // Up to 3 times
353 AP"dualstart: \n\t"
354 "sub %[tmp], %[e], %[d] \n\t"
355 "cmp %[tmp], #31 \n\t"
356 "blt "AP"loopout \n\t"
357
358 "andS %[tmp], %[d], $0x1f \n\t"
359 "beq "AP"quadstart \n\t"
360
361 AP"dualloop: \n\t"
362 "vldm %[s]!, {d0} \n\t"
363 "vstm %[d]!, {d0} \n\t"
364
365 "andS %[tmp], %[d], $0x1f \n\t"
366 "bne "AP"dualloop \n\t"
367
368
369 AP"quadstart: \n\t"
370 "sub %[tmp], %[e], %[d] \n\t"
371 "cmp %[tmp], #64 \n\t"
372 "blt "AP"loopout \n\t"
373
374 "sub %[tmp],%[e],#63 \n\t"
375
376 AP "quadloop: \n\t"
377 "vldm %[s]!, {d0,d1,d2,d3} \n\t"
378 "vldm %[s]!, {d4,d5,d6,d7} \n\t"
379 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
380 "vstm %[d]!, {d4,d5,d6,d7} \n\t"
381
382 "cmp %[tmp], %[d] \n\t"
383 "bhi "AP"quadloop \n\t"
384
385
386 AP "loopout: \n\t"
387 "cmp %[d], %[e] \n\t"
388 "beq "AP"done \n\t"
389 "sub %[tmp],%[e], %[d] \n\t"
390 "cmp %[tmp],$0x04 \n\t"
391 "beq "AP"singleloop2 \n\t"
392
393 AP "dualloop2: \n\t"
394 "sub %[tmp],%[e],$0x7 \n\t"
395 AP "dualloop2int: \n\t"
396 "vldm %[s]!, {d0} \n\t"
397 "vstm %[d]!, {d0} \n\t"
398
399 "cmp %[tmp], %[d] \n\t"
400 "bhi "AP"dualloop2int \n\t"
401
402 // Single ??
403 "cmp %[e], %[d] \n\t"
404 "beq "AP"done \n\t"
405
406 AP "singleloop2: \n\t"
407 "vld1.32 d0[0], [%[s]] \n\t"
408 "vst1.32 d0[0], [%[d]] \n\t"
409
410 AP "done:\n\t"
411
412 : // No output regs
413 // Input
414 : [s] "r" (src), [e] "r" (e), [d] "r" (dst),[tmp] "r" (tmp)
415 // Clobbered
416 : "q0","q1","q2","q3","memory"
417 );
418#undef AP
419
420}
421#endif /* BUILD_NEON */
422
423#ifdef BUILD_SSE
424static void
425evas_common_copy_pixels_sse(DATA32 *src, DATA32 *dst, int len)
426{
427 DATA32 *src_ptr, *dst_ptr, *dst_end_ptr;
428
429 dst_end_ptr = dst + len;
430 dst_end_ptr -= 15;
431 src_ptr = src;
432 dst_ptr = dst;
433 while (dst_ptr < dst_end_ptr)
434 {
435 MOVE_16DWORDS_MMX2(src_ptr, dst_ptr);
436 src_ptr+=16;
437 dst_ptr+=16;
438 }
439 dst_end_ptr = dst + len;
440 while (dst_ptr < dst_end_ptr)
441 {
442 *dst_ptr = *src_ptr;
443 src_ptr++;
444 dst_ptr++;
445 }
446#if 0
447#ifdef ALIGN_FIX
448 int src_align;
449 int dst_align;
450
451 src_align = (int)src & 0x3f; /* 64 byte alignment */
452 dst_align = (int)dst & 0x3f; /* 64 byte alignment */
453
454 if ((src_align != dst_align) ||
455 ((src_align & 0x3) != 0))
456 {
457#ifdef BUILD_C
458 evas_common_copy_pixels_c(src, dst, len);
459#endif
460 return;
461 }
462
463 while ((src_align > 0) && (len > 0))
464 {
465 *dst = *src;
466 dst++;
467 src++;
468 len--;
469 src_align -= sizeof(DATA32);
470 }
471#endif /* ALIGN_FIX */
472
473 src_ptr = src;
474 dst_ptr = dst;
475 dst_end_ptr = dst + len;
476 dst_end_ptr_pre = dst + ((len / 16) * 16);
477
478 while (dst_ptr < dst_end_ptr_pre)
479 {
480 prefetch(&src_ptr[16]);
481 MOVE_16DWORDS_MMX(src_ptr, dst_ptr);
482 src_ptr+=16;
483 dst_ptr+=16;
484 }
485 while (dst_ptr < dst_end_ptr)
486 {
487 *dst_ptr = *src_ptr;
488 src_ptr++;
489 dst_ptr++;
490 }
491#endif
492}
493#endif
494
495/****************************************************************************/
496
497#ifdef BUILD_C
498static void
499evas_common_copy_pixels_rev_c(DATA32 *src, DATA32 *dst, int len)
500{
501 DATA32 *dst_end;
502
503 src = src + len - 1;
504 dst_end = dst - 1;
505 dst = dst + len - 1;
506
507 while (dst > dst_end) *dst-- = *src--;
508}
509#endif
510
511#ifdef BUILD_MMX
512static void
513evas_common_copy_pixels_rev_mmx(DATA32 *src, DATA32 *dst, int len)
514{
515 DATA32 *dst_end, *dst_end_pre;
516
517 if (len >= 16)
518 {
519 src = src + len - 16;
520 dst_end = dst;
521 dst_end_pre = dst + len - ((len / 16) * 16);
522 dst = dst + len - 16;
523
524 while (dst >= dst_end_pre)
525 {
526 MOVE_16DWORDS_MMX(src, dst);
527 src -= 16;
528 dst -= 16;
529 }
530 src += 15;
531 dst += 15;
532 while (dst >= dst_end)
533 *dst-- = *src--;
534 }
535 else
536 {
537 src = src + len - 1;
538 dst_end = dst - 1;
539 dst = dst + len - 1;
540 while (dst > dst_end)
541 *dst-- = *src--;
542 }
543}
544#endif
545
546#ifdef BUILD_SSE
547static void
548evas_common_copy_pixels_rev_sse(DATA32 *src, DATA32 *dst, int len)
549{
550 DATA32 *src_ptr, *dst_ptr, *dst_end_ptr, *dst_end_ptr_pre;
551
552 src_ptr = src + len - 16;
553 dst_ptr = dst + len - 16;
554 dst_end_ptr = dst;
555 dst_end_ptr_pre = dst + len - ((len / 16) * 16);
556
557 if (len >= 16)
558 {
559 while (dst_ptr >= dst_end_ptr_pre)
560 {
561 prefetch(&src_ptr[-16]);
562 MOVE_10DWORDS_MMX(src_ptr, dst_ptr);
563 src_ptr -= 16;
564 dst_ptr -= 16;
565 }
566 src_ptr += 15;
567 dst_ptr += 15;
568 while (dst_ptr >= dst_end_ptr)
569 {
570 *dst_ptr = *src_ptr;
571 src_ptr--;
572 dst_ptr--;
573 }
574 }
575 else
576 {
577 src_ptr = src + len - 1;
578 dst_ptr = dst + len - 1;
579 while (dst_ptr >= dst_end_ptr)
580 {
581 *dst_ptr = *src_ptr;
582 src_ptr--;
583 dst_ptr--;
584 }
585 }
586}
587#endif
588
589
590Gfx_Func_Copy
591evas_common_draw_func_copy_get(int pixels, int reverse)
592{
593 if (reverse == -1)
594 return evas_common_copy_rev_pixels_c;
595 if (reverse)
596 {
597#ifdef BUILD_SSE
598 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256))
599 return evas_common_copy_pixels_rev_sse;
600#endif
601#ifdef BUILD_MMX
602# ifdef BUILD_SSE
603 else
604# endif
605 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
606 return evas_common_copy_pixels_rev_mmx;
607#endif
608#ifdef BUILD_NEON
609# if defined(BUILD_SSE) || defined(BUILD_MMX)
610 else
611# endif
612 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
613 return evas_common_copy_pixels_rev_neon;
614#endif
615
616#ifdef BUILD_C
617# if defined(BUILD_MMX) || defined(BUILD_NEON)
618 else
619# endif
620 return evas_common_copy_pixels_rev_c;
621#endif
622 }
623 else
624 {
625#if 1
626
627# ifdef BUILD_MMX
628# ifdef BUILD_C
629 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
630# endif
631 return evas_common_copy_pixels_mmx2;
632# ifdef BUILD_SSE
633 else
634# endif
635#endif
636#ifdef BUILD_SSE
637# ifdef BUILD_C
638 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 64 * 64))
639# endif
640 return evas_common_copy_pixels_sse;
641# ifdef BUILD_MMX
642 else
643# endif
644#endif
645# ifdef BUILD_NEON
646# ifdef BUILD_C
647 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
648# endif
649 return evas_common_copy_pixels_neon;
650# ifdef BUILD_SSE
651 else
652# endif
653#endif
654#ifdef BUILD_MMX
655# ifdef BUILD_C
656 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
657# endif
658 return evas_common_copy_pixels_mmx;
659# ifdef BUILD_C
660 else
661# endif
662#endif
663#ifdef BUILD_C
664 return evas_common_copy_pixels_c;
665#endif
666
667#else
668
669# ifdef BUILD_SSE
670 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE) && (pixels > 256 * 256))
671 return evas_common_copy_pixels_sse;
672# ifdef BUILD_MMX
673 else
674# endif
675#endif
676#ifdef BUILD_MMX
677# ifdef BUILD_C
678 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
679# endif
680 return evas_common_copy_pixels_mmx2;
681# ifdef BUILD_C
682 else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
683# endif
684 return evas_common_copy_pixels_mmx;
685# ifdef BUILD_C
686 else
687# endif
688#endif
689#ifdef BUILD_C
690 return evas_common_copy_pixels_c;
691#endif
692
693#endif
694 }
695#ifdef BUILD_C
696 return evas_common_copy_pixels_c;
697#else
698 return NULL;
699#endif
700}
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 @@
1#include "evas_common.h"
2#include "evas_convert_color.h"
3
4
5EAPI DATA32
6evas_common_convert_argb_premul(DATA32 *data, unsigned int len)
7{
8 DATA32 *de = data + len;
9 DATA32 nas = 0;
10
11 while (data < de)
12 {
13 DATA32 a = 1 + (*data >> 24);
14
15 *data = (*data & 0xff000000) +
16 (((((*data) >> 8) & 0xff) * a) & 0xff00) +
17 (((((*data) & 0x00ff00ff) * a) >> 8) & 0x00ff00ff);
18 data++;
19
20 if ((a == 1) || (a == 256))
21 nas++;
22 }
23
24 return nas;
25}
26
27EAPI void
28evas_common_convert_argb_unpremul(DATA32 *data, unsigned int len)
29{
30 DATA32 *de = data + len;
31
32 while (data < de)
33 {
34 DATA32 a = (*data >> 24);
35
36 if ((a > 0) && (a < 255))
37 *data = ARGB_JOIN(a,
38 (R_VAL(data) * 255) / a,
39 (G_VAL(data) * 255) / a,
40 (B_VAL(data) * 255) / a);
41 data++;
42 }
43
44}
45
46EAPI void
47evas_common_convert_color_argb_premul(int a, int *r, int *g, int *b)
48{
49 a++;
50 if (r) { *r = (a * *r) >> 8; }
51 if (g) { *g = (a * *g) >> 8; }
52 if (b) { *b = (a * *b) >> 8; }
53}
54
55EAPI void
56evas_common_convert_color_argb_unpremul(int a, int *r, int *g, int *b)
57{
58 if (!a) return;
59 if (r) { *r = (255 * *r) / a; }
60 if (g) { *g = (255 * *g) / a; }
61 if (b) { *b = (255 * *b) / a; }
62}
63
64EAPI void
65evas_common_convert_color_hsv_to_rgb(float h, float s, float v, int *r, int *g, int *b)
66{
67 int i;
68 float f;
69
70 v *= 255;
71 if (s == 0)
72 {
73 if (r) *r = v;
74 if (g) *g = v;
75 if (b) *b = v;
76 return;
77 }
78
79 h /= 60;
80 i = h;
81 f = h - i;
82
83 s *= v;
84 f *= s;
85 s = v - s;
86
87 switch (i)
88 {
89 case 1:
90 if (r) *r = v - f; if (g) *g = v; if (b) *b = s;
91 return;
92 case 2:
93 if (r) *r = s; if (g) *g = v; if (b) *b = s + f;
94 return;
95 case 3:
96 if (r) *r = s; if (g) *g = v - f; if (b) *b = v;
97 return;
98 case 4:
99 if (r) *r = s + f; if (g) *g = s; if (b) *b = v;
100 return;
101 case 5:
102 if (r) *r = v; if (g) *g = s; if (b) *b = v - f;
103 return;
104 default:
105 if (r) *r = v; if (g) *g = s + f; if (b) *b = s;
106 break;
107 }
108}
109
110EAPI void
111evas_common_convert_color_rgb_to_hsv(int r, int g, int b, float *h, float *s, float *v)
112{
113 int max, min, d = r - g;
114
115 //set min to MIN(g,r)
116 d = (d & (~(d >> 8)));
117 min = r - d;
118 //set max to MAX(g,r)
119 max = g + d;
120
121 //set min to MIN(b,min)
122 d = min - b;
123 min -= (d & (~(d >> 8)));
124
125 //set max to MAX(max,b)
126 d = b - max;
127 max += (d & (~(d >> 8)));
128
129 d = max - min;
130
131 if (v) *v = (max / 255.0);
132 if (!max || !d)
133 {
134 if (s) *s = 0;
135 if (h) *h = 0;
136 return;
137 }
138
139 if (s) *s = (d / (float)max);
140 if (r == max)
141 {
142 if (h)
143 {
144 *h = 60 * ((g - b) / (float)d);
145 if (*h < 0) *h += 360;
146 }
147 return;
148 }
149 if (g == max)
150 {
151 if (h)
152 {
153 *h = 120 + (60 * ((b - r) / (float)d));
154 if (*h < 0) *h += 360;
155 }
156 return;
157 }
158 if (h)
159 {
160 *h = 240 + (60 * ((r - g) / (float)d));
161 if (*h < 0) *h += 360;
162 }
163}
164
165EAPI void
166evas_common_convert_color_hsv_to_rgb_int(int h, int s, int v, int *r, int *g, int *b)
167{
168 int i, f;
169
170 if (!s)
171 {
172 *r = *g = *b = v;
173 return;
174 }
175
176 i = h / 255;
177 f = h - (i * 255);
178 s = (v * s) / 255;
179 f = (s * f) / 255;
180 s = v - s;
181
182 switch (i)
183 {
184 case 1:
185 *r = v - f; *g = v; *b = s;
186 return;
187 case 2:
188 *r = s; *g = v; *b = s + f;
189 return;
190 case 3:
191 *r = s; *g = v - f; *b = v;
192 return;
193 case 4:
194 *r = s + f; *g = s; *b = v;
195 return;
196 case 5:
197 *r = v; *g = s; *b = v - f;
198 return;
199 default:
200 *r = v; *g = s + f; *b = s;
201 break;
202 }
203}
204
205EAPI void
206evas_common_convert_color_rgb_to_hsv_int(int r, int g, int b, int *h, int *s, int *v)
207{
208 int min, max, d = r - g;
209
210 d = (d & (~(d >> 8)));
211 min = r - d;
212 max = g + d;
213
214 d = min - b;
215 min -= (d & (~(d >> 8)));
216
217 d = b - max;
218 max += (d & (~(d >> 8)));
219
220 d = max - min;
221
222 *v = max;
223 if (!max)
224 {
225 *s = *h = 0;
226 return;
227 }
228
229 *s = ((d * 255) / max);
230
231 if (r == max)
232 {
233 *h = (((g - b) * 255) / d);
234 if (*h < 0) *h += 1530;
235 return;
236 }
237 if (g == max)
238 {
239 *h = 510 + (((b - r) * 255) / d);
240 if (*h < 0) *h += 1530;
241 return;
242 }
243 *h = 1020 + (((r - g) * 255) / d);
244 if (*h < 0) *h += 1530;
245
246}
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 @@
1#ifndef _EVAS_CONVERT_COLOR_H
2#define _EVAS_CONVERT_COLOR_H
3
4
5EAPI DATA32 evas_common_convert_argb_premul (DATA32 *src, unsigned int len);
6EAPI void evas_common_convert_argb_unpremul (DATA32 *src, unsigned int len);
7EAPI void evas_common_convert_color_argb_premul (int a, int *r, int *g, int *b);
8EAPI void evas_common_convert_color_argb_unpremul (int a, int *r, int *g, int *b);
9
10EAPI void evas_common_convert_color_hsv_to_rgb (float h, float s, float v, int *r, int *g, int *b);
11EAPI void evas_common_convert_color_rgb_to_hsv (int r, int g, int b, float *h, float *s, float *v);
12EAPI void evas_common_convert_color_hsv_to_rgb_int (int h, int s, int v, int *r, int *g, int *b);
13EAPI void evas_common_convert_color_rgb_to_hsv_int (int r, int g, int b, int *h, int *s, int *v);
14
15
16#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 @@
1#include "evas_common.h"
2#include "evas_convert_colorspace.h"
3
4#define CONVERT_RGB_565_TO_RGB_888(s) \
5 (((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7)) | \
6 ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
7 ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
8
9#define CONVERT_A5P_TO_A8(s) \
10 ((((s) << 3) & 0xf8) | (((s) >> 2) & 0x7))
11
12#define CONVERT_ARGB_8888_TO_A_8(s) ((s) >> 24)
13
14
15static inline void *
16evas_common_convert_argb8888_to_rgb565_a5p(void *data __UNUSED__, int w __UNUSED__, int h __UNUSED__, int stride __UNUSED__, Eina_Bool has_alpha __UNUSED__)
17{
18 return NULL;
19}
20
21static inline void *
22evas_common_convert_rgb565_a5p_to_argb8888(void *data, int w, int h, int stride, Eina_Bool has_alpha)
23{
24 DATA16 *src, *end;
25 DATA32 *ret, *dst;
26
27 src = data;
28 end = src + (stride * h);
29 ret = malloc(w * h * sizeof(DATA32));
30
31 dst = ret;
32 if (has_alpha)
33 {
34 DATA8 *alpha;
35
36 alpha = (DATA8 *)end;
37 for (; src < end; src++, alpha++, dst++)
38 *dst = (CONVERT_A5P_TO_A8(*alpha) << 24) |
39 CONVERT_RGB_565_TO_RGB_888(*src);
40 }
41 else
42 {
43 for (; src < end; src++, dst++)
44 *dst = CONVERT_RGB_565_TO_RGB_888(*src);
45 }
46 return ret;
47}
48
49static inline void *
50evas_common_convert_argb8888_to_a8(void *data, int w, int h, int stride, Eina_Bool has_alpha)
51{
52 uint32_t *src, *end;
53 uint8_t *ret, *dst;
54
55 src = data;
56 end = src + (stride * h);
57 ret = malloc(w * h);
58 if (!ret) return NULL;
59
60 if (!has_alpha)
61 {
62 return memset(ret, 0xff, w * h);
63 }
64
65 dst = ret;
66 for ( ; src < end ; src++, dst++)
67 *dst = CONVERT_ARGB_8888_TO_A_8(*src);
68 return ret;
69}
70
71
72
73EAPI void *
74evas_common_convert_argb8888_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace)
75{
76 switch (cspace)
77 {
78 case EVAS_COLORSPACE_RGB565_A5P:
79 return evas_common_convert_argb8888_to_rgb565_a5p(data, w, h, stride, has_alpha);
80 default:
81 break;
82 }
83 return NULL;
84}
85
86EAPI void *
87evas_common_convert_rgb565_a5p_to(void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace)
88{
89 switch (cspace)
90 {
91 case EVAS_COLORSPACE_ARGB8888:
92 return evas_common_convert_rgb565_a5p_to_argb8888(data, w, h, stride, has_alpha);
93 default:
94 break;
95 }
96 return NULL;
97}
98
99EAPI void *
100evas_common_convert_yuv_422_601_to(void *data, int w, int h, Evas_Colorspace cspace)
101{
102 switch (cspace)
103 {
104 case EVAS_COLORSPACE_ARGB8888:
105 {
106 void *dst;
107
108 fprintf(stderr, "to argb888\n");
109
110 dst = malloc(sizeof (unsigned int) * w * h);
111 if (!dst) return NULL;
112
113 evas_common_convert_yuv_422_601_rgba(data, dst, w, h);
114 return dst;
115 }
116 default:
117 break;
118 }
119 return NULL;
120}
121
122EAPI void *
123evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace)
124{
125 switch (cspace)
126 {
127 case EVAS_COLORSPACE_ARGB8888:
128 {
129 void *dst;
130
131 dst = malloc(sizeof (unsigned int) * w * h);
132 if (!dst) return NULL;
133
134 evas_common_convert_yuv_420p_601_rgba(data, dst, w, h);
135 break;
136 }
137 default:
138 break;
139 }
140 return NULL;
141}
142
143EAPI void *
144evas_common_convert_yuv_420_601_to(void *data, int w, int h, Evas_Colorspace cspace)
145{
146 switch (cspace)
147 {
148 case EVAS_COLORSPACE_ARGB8888:
149 {
150 void *dst;
151
152 dst = malloc(sizeof (unsigned int) * w * h);
153 if (!dst) return NULL;
154
155 evas_common_convert_yuv_420_601_rgba(data, dst, w, h);
156 break;
157 }
158 default:
159 break;
160 }
161 return NULL;
162}
163
164EAPI void *
165evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace)
166{
167 switch (cspace)
168 {
169 case EVAS_COLORSPACE_ARGB8888:
170 {
171 void *dst;
172
173 dst = malloc(sizeof (unsigned int) * w * h);
174 if (!dst) return NULL;
175
176 evas_common_convert_yuv_420_601_rgba(data, dst, w, h);
177 break;
178 }
179 default:
180 break;
181 }
182 return NULL;
183}
184
185
186/* 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 @@
1#ifndef _EVAS_CONVERT_COLORSPACE_H
2#define _EVAS_CONVERT_COLORSPACE_H
3
4
5EAPI void *evas_common_convert_argb8888_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
6EAPI void *evas_common_convert_rgb565_a5p_to (void *data, int w, int h, int stride, Eina_Bool has_alpha, Evas_Colorspace cspace);
7EAPI void *evas_common_convert_yuv_422P_601_to(void *data, int w, int h, Evas_Colorspace cspace);
8EAPI void *evas_common_convert_yuv_422_601_to (void *data, int w, int h, Evas_Colorspace cspace);
9EAPI void *evas_common_convert_yuv_420_601_to (void *data, int w, int h, Evas_Colorspace cspace);
10EAPI void *evas_common_convert_yuv_420T_601_to(void *data, int w, int h, Evas_Colorspace cspace);
11
12#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 @@
1#include "evas_common.h"
2#include "evas_convert_gry_1.h"
3
4#ifdef BUILD_CONVERT_1_GRY_1
5void 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){}
6#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 @@
1#ifndef _EVAS_CONVERT_GRY_1_H
2#define _EVAS_CONVERT_GRY_1_H
3
4
5void 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);
6
7
8
9#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 @@
1#include "evas_common.h"
2#include "evas_convert_gry_4.h"
3
4#ifdef BUILD_CONVERT_4_GRY_4
5void 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){}
6#endif
7
8#ifdef BUILD_CONVERT_4_GRY_1
9void 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){}
10#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 @@
1#ifndef _EVAS_CONVERT_GRY_4_H
2#define _EVAS_CONVERT_GRY_4_H
3
4
5void 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);
6void 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);
7
8
9#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 @@
1#include "evas_common.h"
2#include "evas_convert_gry_8.h"
3
4#ifdef USE_DITHER_44
5extern const DATA8 _evas_dither_44[4][4];
6#endif
7#ifdef USE_DITHER_128128
8extern const DATA8 _evas_dither_128128[128][128];
9#endif
10
11#ifdef BUILD_CONVERT_8_GRY_1
12void 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__)
13{
14 DATA32 *src_ptr;
15 DATA8 *dst_ptr;
16 int x, y;
17 DATA8 r, g, b;
18 DATA32 gry8;
19
20 dst_ptr = (DATA8 *)dst;
21
22 CONVERT_LOOP_START_ROT_0();
23
24 r = (R_VAL(src_ptr));
25 g = (G_VAL(src_ptr));
26 b = (B_VAL(src_ptr));
27
28 // Y = 0.299 * R + 0.587 * G + 0.114 * B;
29 gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16;
30
31 *dst_ptr = gry8;
32
33 CONVERT_LOOP_END_ROT_0();
34}
35#endif
36
37#ifdef BUILD_CONVERT_8_GRY_4
38void 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__){}
39#endif
40
41#ifdef BUILD_CONVERT_8_GRY_16
42void 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__)
43{
44 DATA32 *src_ptr;
45 DATA8 *dst_ptr;
46 int x, y;
47 DATA8 r, g, b;
48 DATA32 gry8;
49 DATA8 dith;
50
51 dst_ptr = (DATA8 *)dst;
52
53 CONVERT_LOOP_START_ROT_0();
54
55 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
56
57 r = (R_VAL(src_ptr));
58 g = (G_VAL(src_ptr));
59 b = (B_VAL(src_ptr));
60
61 // Y = 0.299 * R + 0.587 * G + 0.114 * B;
62 gry8 = ((r * 19595) + (g * 38469) + (b * 7471)) >> 16;
63
64 if (((gry8 - gry8 * 255 / 4) >= dith) && (gry8 < 0x07)) gry8++;
65
66 *dst_ptr = gry8;
67
68 CONVERT_LOOP_END_ROT_0();
69}
70#endif
71
72#ifdef BUILD_CONVERT_8_GRY_64
73void 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__){}
74#endif
75
76#ifdef BUILD_CONVERT_8_GRY_256
77void 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__){}
78#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 @@
1#ifndef _EVAS_CONVERT_GRY_8_H
2#define _EVAS_CONVERT_GRY_8_H
3
4
5void 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);
6void 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);
7void 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);
8void 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);
9void 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);
10
11
12#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 @@
1#include "evas_common.h"
2#include "evas_convert_grypal_6.h"
3
4#ifdef BUILD_CONVERT_8_GRAYSCALE_64
5void 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)
6{
7 DATA32 *src_ptr;
8 DATA8 *dst_ptr;
9 int x, y;
10 DATA8 Y;
11
12 dst_ptr = dst;
13 CONVERT_LOOP_START_ROT_0();
14
15 /* RGB -> YUV conversion */
16 Y = ((R_VAL(src_ptr) * 76) +
17 (G_VAL(src_ptr) * 151) +
18 (B_VAL(src_ptr) * 29)) >> 10;
19 *dst_ptr = pal[Y];
20
21 CONVERT_LOOP_END_ROT_0();
22}
23#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 @@
1#ifndef _EVAS_CONVERT_GRY_4_H
2#define _EVAS_CONVERT_GRY_4_H
3
4void 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);
5
6#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 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_8.h"
3#include "evas_convert_rgb_16.h"
4#include "evas_convert_rgb_24.h"
5#include "evas_convert_rgb_32.h"
6#include "evas_convert_grypal_6.h"
7#include "evas_convert_gry_8.h"
8#include "evas_convert_yuv.h"
9
10#ifdef USE_DITHER_44
11
12const DATA8 _evas_dither_44[4][4] =
13{
14 { 0, 8, 2, 10},
15 {12, 4, 14, 6},
16 { 3, 11, 1, 9},
17 {15, 7, 13, 5}
18};
19
20#endif
21
22#ifdef USE_DITHER_128128
23
24const DATA8 _evas_dither_128128[128][128] =
25{
26 { 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 },
27 { 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 },
28 { 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 },
29 { 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 },
30 { 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 },
31 { 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 },
32 { 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 },
33 { 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 },
34 { 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 },
35 { 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 },
36 { 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 },
37 { 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 },
38 { 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 },
39 { 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 },
40 { 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 { 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 },
42 { 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 },
43 { 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 },
44 { 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 },
45 { 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 },
46 { 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 },
47 { 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 },
48 { 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 },
49 { 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 },
50 { 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 },
51 { 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 },
52 { 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 },
53 { 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 },
54 { 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 },
55 { 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 },
56 { 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 },
57 { 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 },
58 { 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 },
59 { 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 },
60 { 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 },
61 { 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 },
62 { 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 },
63 { 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 },
64 { 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 },
65 { 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 },
66 { 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 },
67 { 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 },
68 { 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 },
69 { 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 },
70 { 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 },
71 { 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 },
72 { 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 },
73 { 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 },
74 { 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 },
75 { 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 },
76 { 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 },
77 { 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 },
78 { 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 },
79 { 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 },
80 { 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 },
81 { 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 },
82 { 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 },
83 { 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 },
84 { 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 },
85 { 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 },
86 { 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 },
87 { 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 },
88 { 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 },
89 { 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 },
90 { 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 },
91 { 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 },
92 { 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 },
93 { 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 },
94 { 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 },
95 { 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 },
96 { 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 },
97 { 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 },
98 { 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 },
99 { 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 },
100 { 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 },
101 { 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 },
102 { 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 },
103 { 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 },
104 { 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 },
105 { 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 },
106 { 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 },
107 { 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 },
108 { 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 },
109 { 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 },
110 { 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 },
111 { 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 },
112 { 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 },
113 { 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 },
114 { 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 },
115 { 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 },
116 { 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 },
117 { 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 },
118 { 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 },
119 { 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 },
120 { 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 },
121 { 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 },
122 { 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 },
123 { 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 },
124 { 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 },
125 { 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 },
126 { 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 },
127 { 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 },
128 { 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 },
129 { 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 },
130 { 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 },
131 { 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 },
132 { 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 },
133 { 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 },
134 { 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 },
135 { 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 },
136 { 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 },
137 { 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 },
138 { 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 },
139 { 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 },
140 { 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 },
141 { 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 },
142 { 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 },
143 { 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 },
144 { 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 },
145 { 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 },
146 { 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 },
147 { 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 },
148 { 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 },
149 { 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 },
150 { 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 },
151 { 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 },
152 { 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 },
153 { 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 }
154};
155
156#endif /* USE_DITHER_128128 */
157
158EAPI void
159evas_common_convert_init(void)
160{
161}
162
163EAPI Gfx_Func_Convert
164evas_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)
165{
166 if ((rmask == 0) && (gmask == 0) && (bmask == 0))
167 {
168 if (depth == 8)
169 {
170#ifdef BUILD_CONVERT_8_GRY_1
171 if (pal_mode == PAL_MODE_NONE)
172 return evas_common_convert_rgba_to_8bpp_gry_256_dith;
173#endif
174#ifdef BUILD_CONVERT_8_GRY_16
175 if (pal_mode == PAL_MODE_NONE)
176 return evas_common_convert_rgba_to_8bpp_gry_16_dith;
177#endif
178#ifdef BUILD_CONVERT_8_RGB_332
179 if (pal_mode == PAL_MODE_RGB332)
180 return evas_common_convert_rgba_to_8bpp_rgb_332_dith;
181#endif
182#ifdef BUILD_CONVERT_8_RGB_666
183 if (pal_mode == PAL_MODE_RGB666)
184 return evas_common_convert_rgba_to_8bpp_rgb_666_dith;
185#endif
186#ifdef BUILD_CONVERT_8_RGB_232
187 if (pal_mode == PAL_MODE_RGB232)
188 return evas_common_convert_rgba_to_8bpp_rgb_232_dith;
189#endif
190#ifdef BUILD_CONVERT_8_RGB_222
191 if (pal_mode == PAL_MODE_RGB222)
192 return evas_common_convert_rgba_to_8bpp_rgb_222_dith;
193#endif
194#ifdef BUILD_CONVERT_8_RGB_221
195 if (pal_mode == PAL_MODE_RGB221)
196 return evas_common_convert_rgba_to_8bpp_rgb_221_dith;
197#endif
198#ifdef BUILD_CONVERT_8_RGB_121
199 if (pal_mode == PAL_MODE_RGB121)
200 return evas_common_convert_rgba_to_8bpp_rgb_121_dith;
201#endif
202#ifdef BUILD_CONVERT_8_RGB_111
203 if (pal_mode == PAL_MODE_RGB111)
204 return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
205#endif
206#ifdef BUILD_CONVERT_8_GRAYSCALE_64
207 if (pal_mode == PAL_MODE_GRAY64)
208 return evas_common_convert_rgba_to_8bpp_pal_gray64;
209#endif
210 }
211 }
212 else
213 {
214 if (depth == 16)
215 {
216#ifdef BUILD_CONVERT_16_RGB_565
217 if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f))
218 {
219#ifdef BUILD_CONVERT_16_RGB_ROT0
220 if (rotation == 0)
221 {
222 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
223 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith;
224 else
225 return evas_common_convert_rgba_to_16bpp_rgb_565_dith;
226 }
227#endif
228#ifdef BUILD_CONVERT_16_RGB_ROT180
229 if (rotation == 180)
230 {
231 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
232 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180;
233 else
234 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180;
235 }
236#endif
237#ifdef BUILD_CONVERT_16_RGB_ROT270
238 if (rotation == 270)
239 {
240 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
241 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270;
242 else
243 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270;
244 }
245#endif
246#ifdef BUILD_CONVERT_16_RGB_ROT90
247 if (rotation == 90)
248 {
249 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
250 return evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90;
251 else
252 return evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90;
253 }
254#endif
255 }
256#endif
257#ifdef BUILD_CONVERT_16_BGR_565
258 if ((rmask == 0x0000001f) && (gmask == 0x000007e0) && (bmask == 0x0000f800))
259 {
260#ifdef BUILD_CONVERT_16_RGB_ROT0
261 if (rotation == 0)
262 {
263 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
264 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith;
265 else
266 return evas_common_convert_rgba_to_16bpp_bgr_565_dith;
267 }
268#endif
269#ifdef BUILD_CONVERT_16_RGB_ROT180
270 if (rotation == 180)
271 {
272 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
273 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180;
274 else
275 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180;
276 }
277#endif
278#ifdef BUILD_CONVERT_16_RGB_ROT270
279 if (rotation == 270)
280 {
281 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
282 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270;
283 else
284 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270;
285 }
286#endif
287#ifdef BUILD_CONVERT_16_RGB_ROT90
288 if (rotation == 90)
289 {
290 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
291 return evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90;
292 else
293 return evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90;
294 }
295#endif
296 }
297#endif
298#ifdef BUILD_CONVERT_16_RGB_555
299 if ((rmask == 0x00007c00) && (gmask == 0x000003e0) && (bmask == 0x0000001f))
300 {
301#ifdef BUILD_CONVERT_16_RGB_ROT0
302 if (rotation == 0)
303 {
304 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
305 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith;
306 else
307 return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
308 }
309#endif
310#ifdef BUILD_CONVERT_16_RGB_ROT180
311 if (rotation == 180)
312 {
313 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
314 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180;
315 else
316 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180;
317 }
318#endif
319#ifdef BUILD_CONVERT_16_RGB_ROT270
320 if (rotation == 270)
321 {
322 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
323 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270;
324 else
325 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270;
326 }
327#endif
328#ifdef BUILD_CONVERT_16_RGB_ROT90
329 if (rotation == 90)
330 {
331 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
332 return evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90;
333 else
334 return evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90;
335 }
336#endif
337 }
338#endif
339#ifdef BUILD_CONVERT_16_RGB_444
340 if ((rmask == 0x00000f00) && (gmask == 0x000000f0) && (bmask == 0x0000000f))
341 {
342#ifdef BUILD_CONVERT_16_RGB_ROT0
343 if (rotation == 0)
344 {
345 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
346 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith;
347 else
348 return evas_common_convert_rgba_to_16bpp_rgb_444_dith;
349 }
350#endif
351#ifdef BUILD_CONVERT_16_RGB_ROT180
352 if (rotation == 180)
353 {
354 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
355 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180;
356 else
357 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180;
358 }
359#endif
360#ifdef BUILD_CONVERT_16_RGB_ROT270
361 if (rotation == 270)
362 {
363 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
364 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270;
365 else
366 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270;
367 }
368#endif
369#ifdef BUILD_CONVERT_16_RGB_ROT90
370 if (rotation == 90)
371 {
372 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
373 return evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90;
374 else
375 return evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90;
376 }
377#endif
378 }
379#endif
380#ifdef BUILD_CONVERT_16_RGB_454645
381 if ((rmask == 0x0000f000) && (gmask == 0x00000780) && (bmask == 0x0000001e))
382 {
383#ifdef BUILD_CONVERT_16_RGB_ROT0
384 if (rotation == 0)
385 {
386 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
387 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
388 else
389 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
390
391 }
392#endif
393#ifdef BUILD_CONVERT_16_RGB_ROT180
394 if (rotation == 180)
395 {
396 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
397 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
398 else
399 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
400 }
401#endif
402#ifdef BUILD_CONVERT_16_RGB_ROT270
403 if (rotation == 270)
404 {
405 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
406 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
407 else
408 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
409 }
410#endif
411#ifdef BUILD_CONVERT_16_RGB_ROT90
412 if (rotation == 270)
413 {
414 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
415 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
416 else
417 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
418 }
419#endif
420 }
421#endif
422#ifdef BUILD_CONVERT_16_RGB_454645
423 if ((rmask == 0x0000f800) && (gmask == 0x000007e0) && (bmask == 0x0000001f))
424 {
425#ifdef BUILD_CONVERT_16_RGB_ROT0
426 if (rotation == 0)
427 {
428 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
429 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
430 else
431 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
432
433 }
434#endif
435#ifdef BUILD_CONVERT_16_RGB_ROT180
436 if (rotation == 180)
437 {
438 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
439 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
440 else
441 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
442 }
443#endif
444#ifdef BUILD_CONVERT_16_RGB_ROT270
445 if (rotation == 270)
446 {
447 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
448 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
449 else
450 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
451 }
452#endif
453#ifdef BUILD_CONVERT_16_RGB_ROT90
454 if (rotation == 90)
455 {
456 if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
457 return evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
458 else
459 return evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
460 }
461#endif
462 }
463#endif
464 }
465 if (depth == 32)
466 {
467#ifdef BUILD_CONVERT_32_RGB_8888
468 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
469 {
470#ifdef BUILD_CONVERT_32_RGB_ROT0
471 if (rotation == 0)
472 return evas_common_convert_rgba_to_32bpp_rgb_8888;
473#endif
474#ifdef BUILD_CONVERT_32_RGB_ROT180
475 if (rotation == 180)
476 return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180;
477#endif
478#ifdef BUILD_CONVERT_32_RGB_ROT270
479 if (rotation == 270)
480 return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270;
481#endif
482#ifdef BUILD_CONVERT_32_RGB_ROT90
483 if (rotation == 90)
484 return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90;
485#endif
486 }
487#endif
488#ifdef BUILD_CONVERT_32_RGBX_8888
489 if ((rmask == 0xff000000) && (gmask == 0x00ff0000) && (bmask == 0x0000ff00))
490 {
491#ifdef BUILD_CONVERT_32_RGB_ROT0
492 if (rotation == 0)
493 return evas_common_convert_rgba_to_32bpp_rgbx_8888;
494#endif
495#ifdef BUILD_CONVERT_32_RGB_ROT180
496 if (rotation == 180)
497 return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180;
498#endif
499#ifdef BUILD_CONVERT_32_RGB_ROT270
500 if (rotation == 270)
501 return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270;
502#endif
503#ifdef BUILD_CONVERT_32_RGB_ROT90
504 if (rotation == 90)
505 return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90;
506#endif
507 }
508#endif
509#ifdef BUILD_CONVERT_32_BGR_8888
510 if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000))
511 {
512#ifdef BUILD_CONVERT_32_RGB_ROT0
513 if (rotation == 0)
514 return evas_common_convert_rgba_to_32bpp_bgr_8888;
515#endif
516#ifdef BUILD_CONVERT_32_RGB_ROT180
517 if (rotation == 180)
518 return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180;
519#endif
520#ifdef BUILD_CONVERT_32_RGB_ROT270
521 if (rotation == 270)
522 return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270;
523#endif
524#ifdef BUILD_CONVERT_32_RGB_ROT90
525 if (rotation == 90)
526 return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90;
527#endif
528 }
529#endif
530#ifdef BUILD_CONVERT_32_BGRX_8888
531 if ((rmask == 0x0000ff00) && (gmask == 0x00ff0000) && (bmask == 0xff000000))
532 {
533#ifdef BUILD_CONVERT_32_RGB_ROT0
534 if (rotation == 0)
535 return evas_common_convert_rgba_to_32bpp_bgrx_8888;
536#endif
537#ifdef BUILD_CONVERT_32_RGB_ROT180
538 if (rotation == 180)
539 return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180;
540#endif
541#ifdef BUILD_CONVERT_32_RGB_ROT270
542 if (rotation == 270)
543 return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270;
544#endif
545#ifdef BUILD_CONVERT_32_RGB_ROT90
546 if (rotation == 90)
547 return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90;
548#endif
549 }
550#endif
551#ifdef BUILD_CONVERT_32_RGB_666
552 if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f))
553 {
554#ifdef BUILD_CONVERT_32_RGB_ROT0
555 if (rotation == 0)
556 return evas_common_convert_rgba_to_32bpp_rgb_666;
557#endif
558#ifdef BUILD_CONVERT_32_RGB_ROT180
559// if (rotation == 180)
560// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180;
561#endif
562#ifdef BUILD_CONVERT_32_RGB_ROT270
563// if (rotation == 270)
564// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270;
565#endif
566#ifdef BUILD_CONVERT_32_RGB_ROT90
567// if (rotation == 90)
568// return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90;
569#endif
570 }
571#endif
572 }
573 if (depth == 24)
574 {
575#ifdef BUILD_CONVERT_24_RGB_888
576 if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
577 {
578 if (rotation == 0)
579 return evas_common_convert_rgba_to_24bpp_rgb_888;
580 }
581#endif
582#ifdef BUILD_CONVERT_24_RGB_666
583 if ((rmask == 0x0003f000) && (gmask == 0x00000fc0) && (bmask == 0x0000003f))
584 {
585 if (rotation == 0)
586 return evas_common_convert_rgba_to_24bpp_rgb_666;
587 }
588#endif
589#ifdef BUILD_CONVERT_24_BGR_888
590 if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000))
591 {
592 if (rotation == 0)
593 return evas_common_convert_rgba_to_24bpp_bgr_888;
594 }
595#endif
596 }
597 INF("depth = %i mode = %i", depth, pal_mode);
598 if (depth == 8)
599 {
600#ifdef BUILD_CONVERT_8_RGB_332
601 if (pal_mode == PAL_MODE_RGB332)
602 return evas_common_convert_rgba_to_8bpp_rgb_332_dith;
603#endif
604#ifdef BUILD_CONVERT_8_RGB_666
605 if (pal_mode == PAL_MODE_RGB666)
606 return evas_common_convert_rgba_to_8bpp_rgb_666_dith;
607#endif
608#ifdef BUILD_CONVERT_8_RGB_232
609 if (pal_mode == PAL_MODE_RGB232)
610 return evas_common_convert_rgba_to_8bpp_rgb_232_dith;
611#endif
612#ifdef BUILD_CONVERT_8_RGB_222
613 if (pal_mode == PAL_MODE_RGB222)
614 return evas_common_convert_rgba_to_8bpp_rgb_222_dith;
615#endif
616#ifdef BUILD_CONVERT_8_RGB_221
617 if (pal_mode == PAL_MODE_RGB221)
618 return evas_common_convert_rgba_to_8bpp_rgb_221_dith;
619#endif
620#ifdef BUILD_CONVERT_8_RGB_121
621 if (pal_mode == PAL_MODE_RGB121)
622 return evas_common_convert_rgba_to_8bpp_rgb_121_dith;
623#endif
624#ifdef BUILD_CONVERT_8_RGB_111
625 if (pal_mode == PAL_MODE_RGB111)
626 return evas_common_convert_rgba_to_8bpp_rgb_111_dith;
627#endif
628 }
629 }
630 /* no optimised converter for this... no generic one either. NULL */
631 return NULL;
632}
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 @@
1#ifndef _EVAS_CONVERT_MAIN_H
2#define _EVAS_CONVERT_MAIN_H
3
4
5EAPI void evas_common_convert_init (void);
6EAPI 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);
7
8
9#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 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_16.h"
3
4#ifndef BUILD_NO_DITHER_MASK
5#ifdef USE_DITHER_44
6extern const DATA8 _evas_dither_44[4][4];
7#endif
8#ifdef USE_DITHER_128128
9extern const DATA8 _evas_dither_128128[128][128];
10#endif
11#endif
12
13#ifdef BUILD_CONVERT_16_RGB_565
14#ifdef BUILD_CONVERT_16_RGB_ROT0
15void
16evas_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)
17{
18#ifndef BUILD_NO_DITHER_MASK
19 DATA16 *d = (DATA16 *)dst;
20 DATA32 r1, g1, b1;
21 DATA32 r2, g2, b2;
22 unsigned int dith, dith2;
23 int x, y;
24
25#ifdef BUILD_LINE_DITHER_MASK
26 for (y = 0; y < h; y++)
27 {
28 if ((y + dith_y) & 0x1)
29 {
30 for (x = 0; x < w; x+=2)
31 {
32 DATA32 p = *src++, q = *src++;
33 r1 = ((p & 0xff0000) + 0x030000) >> 19;
34 if (r1 > 0x1f) r1 = 0x1f;
35 g1 = ((p & 0xff00) + 0x000100) >> 10;
36 if (g1 > 0x3f) g1 = 0x3f;
37 b1 = ((p & 0xff) + 0x000003) >> 3;
38 if (b1 > 0x1f) b1 = 0x1f;
39 r2 = ((q & 0xff0000) + 0x030000) >> 19;
40 if (r2 > 0x1f) r2 = 0x1f;
41 g2 = ((q & 0xff00) + 0x000100) >> 10;
42 if (g2 > 0x3f) g2 = 0x3f;
43 b2 = ((q & 0xff) + 0x000003) >> 3;
44 if (b2 > 0x1f) b2 = 0x1f;
45#ifndef WORDS_BIGENDIAN
46 *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) |
47 (r1 << 11) | (g1 << 5) | (b1);
48#else
49 *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) |
50 (r2 << 11) | (g2 << 5) | (b2);
51#endif
52 d += 2;
53 }
54 }
55 else
56 {
57 x = w;
58 while (w > 0)
59 {
60 DATA32 p = *src++, q = *src++;
61
62#ifndef WORDS_BIGENDIAN
63 *((DATA32 *)d) =
64 (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) |
65 (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3);
66#else
67 *((DATA32 *)d) =
68 (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) |
69 (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3);
70#endif
71 d += 2; w -= 2;
72 }
73 w = x;
74 }
75 src += src_jump;
76 d += dst_jump;
77 }
78#else
79 for (y = 0; y < h; y++)
80 {
81 for (x = 0; x < w; x++)
82 {
83 DATA32 p = *src++, q = *src++;
84
85 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
86 dith2 = dith >> DM_SHF(6);
87 dith >>= DM_SHF(5);
88 r1 = (p & 0xff0000) >> 19;
89 g1 = (p & 0xff00) >> 10;
90 b1 = (p & 0xff) >> 3;
91 if ((r1 < 0x1f) && ((((p & 0xff0000) >> 16) - (r1 << 3)) >= dith )) r1++;
92 if ((g1 < 0x3f) && ((((p & 0xff00) >> 8) - (g1 << 2)) >= dith2)) g1++;
93 if ((b1 < 0x1f) && (((p & 0xff) - (b1 << 3)) >= dith )) b1++;
94
95 x++;
96 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
97 dith2 = dith >> DM_SHF(6);
98 dith >>= DM_SHF(5);
99 r2 = (q & 0xff0000) >> 19;
100 g2 = (q & 0xff00) >> 10;
101 b2 = (q & 0xff) >> 3;
102 if ((r2 < 0x1f) && ((((q & 0xff0000) >> 16) - (r2 << 3)) >= dith )) r2++;
103 if ((g2 < 0x3f) && ((((q & 0xff00) >> 8) - (g2 << 2)) >= dith2)) g2++;
104 if ((b2 < 0x1f) && (((q & 0xff) - (b2 << 3)) >= dith )) b2++;
105
106#ifndef WORDS_BIGENDIAN
107 *((DATA32 *)d) = (r2 << 27) | (g2 << 21) | (b2 << 16) |
108 (r1 << 11) | (g1 << 5) | (b1);
109#else
110 *((DATA32 *)d) = (r1 << 27) | (g1 << 21) | (b1 << 16) |
111 (r2 << 11) | (g2 << 5) | (b2);
112#endif
113 d += 2;
114 }
115 src += src_jump;
116 d += dst_jump;
117 }
118#endif
119 return;
120 (void)pal;
121#else
122 DATA16 *d = (DATA16 *)dst;
123 int w0 = w;
124
125 while (h--)
126 {
127 while (w > 0)
128 {
129 DATA32 p = *src++, q = *src++;
130
131#ifndef WORDS_BIGENDIAN
132 *((DATA32 *)d) =
133 (((q & 0xff0000) >> 19) << 27) | (((q & 0xff00) >> 10) << 21) | (((q & 0xff) >> 3) << 16) |
134 (((p & 0xff0000) >> 19) << 11) | (((p & 0xff00) >> 10) << 5) | ((p & 0xff) >> 3);
135#else
136 *((DATA32 *)d) =
137 (((p & 0xff0000) >> 19) << 27) | (((p & 0xff00) >> 10) << 21) | (((p & 0xff) >> 3) << 16) |
138 (((q & 0xff0000) >> 19) << 11) | (((q & 0xff00) >> 10) << 5) | ((q & 0xff) >> 3);
139#endif
140 d += 2; w -= 2;
141 }
142 w = w0;
143 src += src_jump;
144 d += dst_jump;
145 }
146 return;
147 (void)pal;
148#endif
149}
150#endif
151#endif
152
153#ifdef BUILD_CONVERT_16_RGB_565
154#ifdef BUILD_CONVERT_16_RGB_ROT0
155void
156evas_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)
157{
158#ifndef BUILD_NO_DITHER_MASK
159 DATA16 *d = (DATA16 *)dst;
160 DATA32 r, g, b;
161 unsigned int dith, dith2;
162 int x, y;
163
164#ifdef BUILD_LINE_DITHER_MASK
165 for (y = 0; y < h; y++)
166 {
167 if ((y + dith_y) & 0x1)
168 {
169 for (x = 0; x < w; x++)
170 {
171 DATA32 p = *src++;
172
173 r = (p & 0xff0000) >> 19;
174 if (r > 0x1f) r = 0x1f;
175 g = (p & 0xff00) >> 10;
176 if (g > 0x3f) g = 0x3f;
177 b = (p & 0xff) >> 3;
178 if (b > 0x1f) b = 0x1f;
179 *d++ = (r << 11) | (g << 5) | b;
180 }
181 }
182 else
183 {
184 x = w;
185 while (w--)
186 {
187 *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3);
188 src++;
189 }
190 w = x;
191 }
192 src += src_jump;
193 d += dst_jump;
194 }
195#else
196 for (y = 0; y < h; y++)
197 {
198 for (x = 0; x < w; x++)
199 {
200 DATA32 p = *src++;
201
202 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
203 dith2 = dith >> DM_SHF(6);
204 dith >>= DM_SHF(5);
205 r = (p & 0xff0000) >> 19;
206 g = (p & 0xff00) >> 10;
207 b = (p & 0xff) >> 3;
208 if ((r < 0x1f) && ((((p & 0xff0000) >> 16) - (r << 3)) >= dith )) r++;
209 if ((g < 0x3f) && ((((p & 0xff00) >> 8) - (g << 2)) >= dith2)) g++;
210 if ((b < 0x1f) && (((p & 0xff) - (b << 3)) >= dith )) b++;
211
212 *d++ = (r << 11) | (g << 5) | b;
213 }
214 src += src_jump;
215 d += dst_jump;
216 }
217#endif
218 return;
219 (void)pal;
220#else
221 DATA16 *d = (DATA16 *)dst;
222 int w0 = w;
223
224 while (h--)
225 {
226 while (w--)
227 {
228 *d++ = (((*src & 0xff0000) >> 19) << 11) | (((*src & 0xff00) >> 10) << 5) | ((*src & 0xff) >> 3);
229 src++;
230 }
231 w = w0;
232 src += src_jump;
233 d += dst_jump;
234 }
235 return;
236 (void)pal;
237#endif
238}
239#endif
240#endif
241
242#ifdef BUILD_CONVERT_16_RGB_565
243#ifdef BUILD_CONVERT_16_RGB_ROT180
244void
245evas_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)
246{
247 DATA32 *src_ptr;
248 DATA16 *dst_ptr;
249 int x, y;
250 DATA8 r1, g1, b1;
251 DATA8 r2, g2, b2;
252#ifndef BUILD_NO_DITHER_MASK
253 DATA8 dith, dith2;
254#endif
255
256 dst_ptr = (DATA16 *)dst;
257
258 CONVERT_LOOP2_START_ROT_180();
259
260 r1 = (R_VAL(src_ptr)) >> 3;
261 g1 = (G_VAL(src_ptr)) >> 2;
262 b1 = (B_VAL(src_ptr)) >> 3;
263
264#ifndef BUILD_NO_DITHER_MASK
265 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
266 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
267 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
268 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
269 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
270#endif
271
272 CONVERT_LOOP2_INC_ROT_180();
273
274 r2 = (R_VAL(src_ptr)) >> 3;
275 g2 = (G_VAL(src_ptr)) >> 2;
276 b2 = (B_VAL(src_ptr)) >> 3;
277
278#ifndef BUILD_NO_DITHER_MASK
279 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
280 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
281 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
282 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
283 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
284#endif
285
286#ifndef WORDS_BIGENDIAN
287 *((DATA32 *)dst_ptr) =
288 (r2 << 27) | (g2 << 21) | (b2 << 16) |
289 (r1 << 11) | (g1 << 5 ) | (b1 );
290#else
291 *((DATA32 *)dst_ptr) =
292 (r1 << 27) | (g1 << 21) | (b1 << 16) |
293 (r2 << 11) | (g2 << 5 ) | (b2 );
294#endif
295
296 CONVERT_LOOP2_END_ROT_180();
297 return;
298 (void)pal;
299}
300#endif
301#endif
302
303#ifdef BUILD_CONVERT_16_RGB_565
304#ifdef BUILD_CONVERT_16_RGB_ROT180
305void
306evas_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)
307{
308 DATA32 *src_ptr;
309 DATA16 *dst_ptr;
310 int x, y;
311 DATA8 r, g, b;
312#ifndef BUILD_NO_DITHER_MASK
313 DATA8 dith, dith2;
314#endif
315
316 dst_ptr = (DATA16 *)dst;
317
318 CONVERT_LOOP_START_ROT_180();
319
320 r = (R_VAL(src_ptr)) >> 3;
321 g = (G_VAL(src_ptr)) >> 2;
322 b = (B_VAL(src_ptr)) >> 3;
323
324#ifndef BUILD_NO_DITHER_MASK
325 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
326 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
327 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
328 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
329 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
330#endif
331
332 *dst_ptr = (r << 11) | (g << 5) | (b);
333
334 CONVERT_LOOP_END_ROT_180();
335 return;
336 (void)pal;
337}
338#endif
339#endif
340
341#ifdef BUILD_CONVERT_16_RGB_565
342#ifdef BUILD_CONVERT_16_RGB_ROT270
343void
344evas_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)
345{
346 DATA32 *src_ptr;
347 DATA16 *dst_ptr;
348 int x, y;
349 DATA8 r1, g1, b1;
350 DATA8 r2, g2, b2;
351#ifndef BUILD_NO_DITHER_MASK
352 DATA8 dith, dith2;
353#endif
354
355 dst_ptr = (DATA16 *)dst;
356
357 CONVERT_LOOP2_START_ROT_270();
358
359 r1 = (R_VAL(src_ptr)) >> 3;
360 g1 = (G_VAL(src_ptr)) >> 2;
361 b1 = (B_VAL(src_ptr)) >> 3;
362
363#ifndef BUILD_NO_DITHER_MASK
364 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
365 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
366 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
367 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
368 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
369#endif
370
371 CONVERT_LOOP2_INC_ROT_270();
372
373 r2 = (R_VAL(src_ptr)) >> 3;
374 g2 = (G_VAL(src_ptr)) >> 2;
375 b2 = (B_VAL(src_ptr)) >> 3;
376
377#ifndef BUILD_NO_DITHER_MASK
378 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
379 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
380 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
381 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
382 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
383#endif
384
385#ifndef WORDS_BIGENDIAN
386 *((DATA32 *)dst_ptr) =
387 (r2 << 27) | (g2 << 21) | (b2 << 16) |
388 (r1 << 11) | (g1 << 5 ) | (b1 );
389#else
390 *((DATA32 *)dst_ptr) =
391 (r1 << 27) | (g1 << 21) | (b1 << 16) |
392 (r2 << 11) | (g2 << 5 ) | (b2 );
393#endif
394
395 CONVERT_LOOP2_END_ROT_270();
396 return;
397 (void)pal;
398}
399#endif
400#endif
401
402#ifdef BUILD_CONVERT_16_RGB_565
403#ifdef BUILD_CONVERT_16_RGB_ROT270
404void
405evas_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)
406{
407 DATA32 *src_ptr;
408 DATA16 *dst_ptr;
409 int x, y;
410 DATA8 r, g, b;
411#ifndef BUILD_NO_DITHER_MASK
412 DATA8 dith, dith2;
413#endif
414
415 dst_ptr = (DATA16 *)dst;
416
417 CONVERT_LOOP_START_ROT_270();
418
419 r = (R_VAL(src_ptr)) >> 3;
420 g = (G_VAL(src_ptr)) >> 2;
421 b = (B_VAL(src_ptr)) >> 3;
422
423#ifndef BUILD_NO_DITHER_MASK
424 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
425 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
426 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
427 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
428 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
429#endif
430
431 *dst_ptr = (r << 11) | (g << 5) | (b);
432
433 CONVERT_LOOP_END_ROT_270();
434 return;
435 (void)pal;
436}
437#endif
438#endif
439
440#ifdef BUILD_CONVERT_16_RGB_565
441#ifdef BUILD_CONVERT_16_RGB_ROT90
442void
443evas_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)
444{
445 DATA32 *src_ptr;
446 DATA16 *dst_ptr;
447 int x, y;
448 DATA8 r1, g1, b1;
449 DATA8 r2, g2, b2;
450#ifndef BUILD_NO_DITHER_MASK
451 DATA8 dith, dith2;
452#endif
453
454 dst_ptr = (DATA16 *)dst;
455
456 CONVERT_LOOP2_START_ROT_90();
457
458 r1 = (R_VAL(src_ptr)) >> 3;
459 g1 = (G_VAL(src_ptr)) >> 2;
460 b1 = (B_VAL(src_ptr)) >> 3;
461
462#ifndef BUILD_NO_DITHER_MASK
463 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
464 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
465 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
466 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
467 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
468#endif
469
470 CONVERT_LOOP2_INC_ROT_90();
471
472 r2 = (R_VAL(src_ptr)) >> 3;
473 g2 = (G_VAL(src_ptr)) >> 2;
474 b2 = (B_VAL(src_ptr)) >> 3;
475
476#ifndef BUILD_NO_DITHER_MASK
477 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
478 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
479 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
480 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
481 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
482#endif
483
484#ifndef WORDS_BIGENDIAN
485 *((DATA32 *)dst_ptr) =
486 (r2 << 27) | (g2 << 21) | (b2 << 16) |
487 (r1 << 11) | (g1 << 5 ) | (b1 );
488#else
489 *((DATA32 *)dst_ptr) =
490 (r1 << 27) | (g1 << 21) | (b1 << 16) |
491 (r2 << 11) | (g2 << 5 ) | (b2 );
492#endif
493
494 CONVERT_LOOP2_END_ROT_90();
495 return;
496 (void)pal;
497}
498#endif
499#endif
500
501#ifdef BUILD_CONVERT_16_RGB_565
502#ifdef BUILD_CONVERT_16_RGB_ROT90
503void
504evas_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)
505{
506 DATA32 *src_ptr;
507 DATA16 *dst_ptr;
508 int x, y;
509 DATA8 r, g, b;
510#ifndef BUILD_NO_DITHER_MASK
511 DATA8 dith, dith2;
512#endif
513
514 dst_ptr = (DATA16 *)dst;
515
516 CONVERT_LOOP_START_ROT_90();
517
518 r = (R_VAL(src_ptr)) >> 3;
519 g = (G_VAL(src_ptr)) >> 2;
520 b = (B_VAL(src_ptr)) >> 3;
521
522#ifndef BUILD_NO_DITHER_MASK
523 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
524 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
525 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
526 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
527 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
528#endif
529
530 *dst_ptr = (r << 11) | (g << 5) | (b);
531
532 CONVERT_LOOP_END_ROT_90();
533 return;
534 (void)pal;
535}
536#endif
537#endif
538
539#ifdef BUILD_CONVERT_16_BGR_565
540#ifdef BUILD_CONVERT_16_RGB_ROT0
541void
542evas_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)
543{
544 DATA32 *src_ptr;
545 DATA16 *dst_ptr;
546 int x, y;
547 DATA8 r1, g1, b1;
548 DATA8 r2, g2, b2;
549#ifndef BUILD_NO_DITHER_MASK
550 DATA8 dith, dith2;
551#endif
552
553 dst_ptr = (DATA16 *)dst;
554
555 CONVERT_LOOP2_START_ROT_0();
556
557 r1 = (R_VAL(src_ptr)) >> 3;
558 g1 = (G_VAL(src_ptr)) >> 2;
559 b1 = (B_VAL(src_ptr)) >> 3;
560
561#ifndef BUILD_NO_DITHER_MASK
562 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
563 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
564 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
565 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
566 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
567#endif
568
569 CONVERT_LOOP2_INC_ROT_0();
570
571 r2 = (R_VAL(src_ptr)) >> 3;
572 g2 = (G_VAL(src_ptr)) >> 2;
573 b2 = (B_VAL(src_ptr)) >> 3;
574
575#ifndef BUILD_NO_DITHER_MASK
576 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
577 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
578 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
579 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
580 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
581#endif
582
583#ifndef WORDS_BIGENDIAN
584 *((DATA32 *)dst_ptr) =
585 (b2 << 27) | (g2 << 21) | (r2 << 16) |
586 (b1 << 11) | (g1 << 5 ) | (r1 );
587#else
588 *((DATA32 *)dst_ptr) =
589 (b1 << 27) | (g1 << 21) | (r1 << 16) |
590 (b2 << 11) | (g2 << 5 ) | (r2 );
591#endif
592
593 CONVERT_LOOP2_END_ROT_0();
594 return;
595 (void)pal;
596}
597#endif
598#endif
599
600#ifdef BUILD_CONVERT_16_BGR_565
601#ifdef BUILD_CONVERT_16_RGB_ROT0
602void
603evas_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)
604{
605 DATA32 *src_ptr;
606 DATA16 *dst_ptr;
607 int x, y;
608 DATA8 r, g, b;
609#ifndef BUILD_NO_DITHER_MASK
610 DATA8 dith, dith2;
611#endif
612
613 dst_ptr = (DATA16 *)dst;
614
615 CONVERT_LOOP_START_ROT_0();
616
617 r = (R_VAL(src_ptr)) >> 3;
618 g = (G_VAL(src_ptr)) >> 2;
619 b = (B_VAL(src_ptr)) >> 3;
620
621#ifndef BUILD_NO_DITHER_MASK
622 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
623 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
624 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
625 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
626 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
627#endif
628
629 *dst_ptr = (b << 11) | (g << 5) | (r);
630
631 CONVERT_LOOP_END_ROT_0();
632 return;
633 (void)pal;
634}
635#endif
636#endif
637
638#ifdef BUILD_CONVERT_16_BGR_565
639#ifdef BUILD_CONVERT_16_RGB_ROT180
640void
641evas_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)
642{
643 DATA32 *src_ptr;
644 DATA16 *dst_ptr;
645 int x, y;
646 DATA8 r1, g1, b1;
647 DATA8 r2, g2, b2;
648#ifndef BUILD_NO_DITHER_MASK
649 DATA8 dith, dith2;
650#endif
651
652 dst_ptr = (DATA16 *)dst;
653
654 CONVERT_LOOP2_START_ROT_180();
655
656 r1 = (R_VAL(src_ptr)) >> 3;
657 g1 = (G_VAL(src_ptr)) >> 2;
658 b1 = (B_VAL(src_ptr)) >> 3;
659
660#ifndef BUILD_NO_DITHER_MASK
661 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
662 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
663 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
664 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
665 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
666#endif
667
668 CONVERT_LOOP2_INC_ROT_180();
669
670 r2 = (R_VAL(src_ptr)) >> 3;
671 g2 = (G_VAL(src_ptr)) >> 2;
672 b2 = (B_VAL(src_ptr)) >> 3;
673
674#ifndef BUILD_NO_DITHER_MASK
675 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
676 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
677 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
678 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
679 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
680#endif
681
682#ifndef WORDS_BIGENDIAN
683 *((DATA32 *)dst_ptr) =
684 (b2 << 27) | (g2 << 21) | (r2 << 16) |
685 (b1 << 11) | (g1 << 5 ) | (r1 );
686#else
687 *((DATA32 *)dst_ptr) =
688 (b1 << 27) | (g1 << 21) | (r1 << 16) |
689 (b2 << 11) | (g2 << 5 ) | (r2 );
690#endif
691
692 CONVERT_LOOP2_END_ROT_180();
693 return;
694 (void)pal;
695}
696#endif
697#endif
698
699#ifdef BUILD_CONVERT_16_BGR_565
700#ifdef BUILD_CONVERT_16_RGB_ROT180
701void
702evas_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)
703{
704 DATA32 *src_ptr;
705 DATA16 *dst_ptr;
706 int x, y;
707 DATA8 r, g, b;
708#ifndef BUILD_NO_DITHER_MASK
709 DATA8 dith, dith2;
710#endif
711
712 dst_ptr = (DATA16 *)dst;
713
714 ERR("evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180");
715
716 CONVERT_LOOP_START_ROT_180();
717
718 r = (R_VAL(src_ptr)) >> 3;
719 g = (G_VAL(src_ptr)) >> 2;
720 b = (B_VAL(src_ptr)) >> 3;
721
722#ifndef BUILD_NO_DITHER_MASK
723 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
724 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
725 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
726 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
727 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
728#endif
729
730 *dst_ptr = (b << 11) | (g << 5) | (r);
731
732 CONVERT_LOOP_END_ROT_180();
733 return;
734 (void)pal;
735}
736#endif
737#endif
738
739#ifdef BUILD_CONVERT_16_BGR_565
740#ifdef BUILD_CONVERT_16_RGB_ROT270
741void
742evas_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)
743{
744 DATA32 *src_ptr;
745 DATA16 *dst_ptr;
746 int x, y;
747 DATA8 r1, g1, b1;
748 DATA8 r2, g2, b2;
749#ifndef BUILD_NO_DITHER_MASK
750 DATA8 dith, dith2;
751#endif
752
753 dst_ptr = (DATA16 *)dst;
754
755 CONVERT_LOOP2_START_ROT_270();
756
757 r1 = (R_VAL(src_ptr)) >> 3;
758 g1 = (G_VAL(src_ptr)) >> 2;
759 b1 = (B_VAL(src_ptr)) >> 3;
760
761#ifndef BUILD_NO_DITHER_MASK
762 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
763 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
764 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
765 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
766 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
767#endif
768
769 CONVERT_LOOP2_INC_ROT_270();
770
771 r2 = (R_VAL(src_ptr)) >> 3;
772 g2 = (G_VAL(src_ptr)) >> 2;
773 b2 = (B_VAL(src_ptr)) >> 3;
774
775#ifndef BUILD_NO_DITHER_MASK
776 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
777 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
778 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
779 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
780 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
781#endif
782
783#ifndef WORDS_BIGENDIAN
784 *((DATA32 *)dst_ptr) =
785 (b2 << 27) | (g2 << 21) | (r2 << 16) |
786 (b1 << 11) | (g1 << 5 ) | (r1 );
787#else
788 *((DATA32 *)dst_ptr) =
789 (b1 << 27) | (g1 << 21) | (r1 << 16) |
790 (b2 << 11) | (g2 << 5 ) | (r2 );
791#endif
792
793 CONVERT_LOOP2_END_ROT_270();
794 return;
795 (void)pal;
796}
797#endif
798#endif
799
800#ifdef BUILD_CONVERT_16_BGR_565
801#ifdef BUILD_CONVERT_16_RGB_ROT270
802void
803evas_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)
804{
805 DATA32 *src_ptr;
806 DATA16 *dst_ptr;
807 int x, y;
808 DATA8 r, g, b;
809#ifndef BUILD_NO_DITHER_MASK
810 DATA8 dith, dith2;
811#endif
812
813 dst_ptr = (DATA16 *)dst;
814
815 CONVERT_LOOP_START_ROT_270();
816
817 r = (R_VAL(src_ptr)) >> 3;
818 g = (G_VAL(src_ptr)) >> 2;
819 b = (B_VAL(src_ptr)) >> 3;
820
821#ifndef BUILD_NO_DITHER_MASK
822 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
823 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
824 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
825 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
826 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
827#endif
828
829 *dst_ptr = (b << 11) | (g << 5) | (r);
830
831 CONVERT_LOOP_END_ROT_270();
832 return;
833 (void)pal;
834}
835#endif
836#endif
837
838#ifdef BUILD_CONVERT_16_BGR_565
839#ifdef BUILD_CONVERT_16_RGB_ROT90
840void
841evas_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)
842{
843 DATA32 *src_ptr;
844 DATA16 *dst_ptr;
845 int x, y;
846 DATA8 r1, g1, b1;
847 DATA8 r2, g2, b2;
848#ifndef BUILD_NO_DITHER_MASK
849 DATA8 dith, dith2;
850#endif
851
852 dst_ptr = (DATA16 *)dst;
853
854 CONVERT_LOOP2_START_ROT_90();
855
856 r1 = (R_VAL(src_ptr)) >> 3;
857 g1 = (G_VAL(src_ptr)) >> 2;
858 b1 = (B_VAL(src_ptr)) >> 3;
859
860#ifndef BUILD_NO_DITHER_MASK
861 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
862 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
863 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
864 if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
865 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
866#endif
867
868 CONVERT_LOOP2_INC_ROT_90();
869
870 r2 = (R_VAL(src_ptr)) >> 3;
871 g2 = (G_VAL(src_ptr)) >> 2;
872 b2 = (B_VAL(src_ptr)) >> 3;
873
874#ifndef BUILD_NO_DITHER_MASK
875 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
876 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
877 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
878 if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
879 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
880#endif
881
882#ifndef WORDS_BIGENDIAN
883 *((DATA32 *)dst_ptr) =
884 (b2 << 27) | (g2 << 21) | (r2 << 16) |
885 (b1 << 11) | (g1 << 5 ) | (r1 );
886#else
887 *((DATA32 *)dst_ptr) =
888 (b1 << 27) | (g1 << 21) | (r1 << 16) |
889 (b2 << 11) | (g2 << 5 ) | (r2 );
890#endif
891
892 CONVERT_LOOP2_END_ROT_90();
893 return;
894 (void)pal;
895}
896#endif
897#endif
898
899#ifdef BUILD_CONVERT_16_BGR_565
900#ifdef BUILD_CONVERT_16_RGB_ROT90
901void
902evas_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)
903{
904 DATA32 *src_ptr;
905 DATA16 *dst_ptr;
906 int x, y;
907 DATA8 r, g, b;
908#ifndef BUILD_NO_DITHER_MASK
909 DATA8 dith, dith2;
910#endif
911
912 dst_ptr = (DATA16 *)dst;
913
914 CONVERT_LOOP_START_ROT_90();
915
916 r = (R_VAL(src_ptr)) >> 3;
917 g = (G_VAL(src_ptr)) >> 2;
918 b = (B_VAL(src_ptr)) >> 3;
919
920#ifndef BUILD_NO_DITHER_MASK
921 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
922 dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
923 if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
924 if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
925 if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
926#endif
927
928 *dst_ptr = (b << 11) | (g << 5) | (r);
929
930 CONVERT_LOOP_END_ROT_90();
931 return;
932 (void)pal;
933}
934#endif
935#endif
936
937#ifdef BUILD_CONVERT_16_RGB_444
938#ifdef BUILD_CONVERT_16_RGB_ROT0
939void
940evas_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)
941{
942 DATA32 *src_ptr;
943 DATA16 *dst_ptr;
944 int x, y;
945 DATA8 r1, g1, b1;
946 DATA8 r2, g2, b2;
947#ifndef BUILD_NO_DITHER_MASK
948 DATA8 dith;
949#endif
950
951 dst_ptr = (DATA16 *)dst;
952
953 CONVERT_LOOP2_START_ROT_0();
954
955 r1 = (R_VAL(src_ptr)) >> 4;
956 g1 = (G_VAL(src_ptr)) >> 4;
957 b1 = (B_VAL(src_ptr)) >> 4;
958
959#ifndef BUILD_NO_DITHER_MASK
960 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
961 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
962 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
963 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
964#endif
965
966 CONVERT_LOOP2_INC_ROT_0();
967
968 r2 = (R_VAL(src_ptr)) >> 4;
969 g2 = (G_VAL(src_ptr)) >> 4;
970 b2 = (B_VAL(src_ptr)) >> 4;
971
972#ifndef BUILD_NO_DITHER_MASK
973 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
974 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
975 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
976 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
977#endif
978
979#ifndef WORDS_BIGENDIAN
980 *((DATA32 *)dst_ptr) =
981 (r2 << 24) | (g2 << 20) | (b2 << 16) |
982 (r1 << 8 ) | (g1 << 4 ) | (b1 );
983#else
984 *((DATA32 *)dst_ptr) =
985 (r1 << 24) | (g1 << 20) | (b1 << 16) |
986 (r2 << 8 ) | (g2 << 4 ) | (b2 );
987#endif
988
989 CONVERT_LOOP2_END_ROT_0();
990 return;
991 (void)pal;
992}
993#endif
994#endif
995
996#ifdef BUILD_CONVERT_16_RGB_444
997#ifdef BUILD_CONVERT_16_RGB_ROT0
998void
999evas_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)
1000{
1001 DATA32 *src_ptr;
1002 DATA16 *dst_ptr;
1003 int x, y;
1004 DATA8 r, g, b;
1005#ifndef BUILD_NO_DITHER_MASK
1006 DATA8 dith;
1007#endif
1008
1009 dst_ptr = (DATA16 *)dst;
1010
1011 CONVERT_LOOP_START_ROT_0();
1012
1013 r = (R_VAL(src_ptr)) >> 4;
1014 g = (G_VAL(src_ptr)) >> 4;
1015 b = (B_VAL(src_ptr)) >> 4;
1016
1017#ifndef BUILD_NO_DITHER_MASK
1018 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1019 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1020 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1021 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1022#endif
1023
1024 *dst_ptr = (r << 8) | (g << 4) | (b);
1025
1026 CONVERT_LOOP_END_ROT_0();
1027 return;
1028 (void)pal;
1029}
1030#endif
1031#endif
1032
1033#ifdef BUILD_CONVERT_16_RGB_444
1034#ifdef BUILD_CONVERT_16_RGB_ROT180
1035void
1036evas_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)
1037{
1038 DATA32 *src_ptr;
1039 DATA16 *dst_ptr;
1040 int x, y;
1041 DATA8 r1, g1, b1;
1042 DATA8 r2, g2, b2;
1043#ifndef BUILD_NO_DITHER_MASK
1044 DATA8 dith;
1045#endif
1046
1047 dst_ptr = (DATA16 *)dst;
1048
1049 CONVERT_LOOP2_START_ROT_180();
1050
1051 r1 = (R_VAL(src_ptr)) >> 4;
1052 g1 = (G_VAL(src_ptr)) >> 4;
1053 b1 = (B_VAL(src_ptr)) >> 4;
1054
1055#ifndef BUILD_NO_DITHER_MASK
1056 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1057 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1058 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1059 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1060#endif
1061
1062 CONVERT_LOOP2_INC_ROT_180();
1063
1064 r2 = (R_VAL(src_ptr)) >> 4;
1065 g2 = (G_VAL(src_ptr)) >> 4;
1066 b2 = (B_VAL(src_ptr)) >> 4;
1067
1068#ifndef BUILD_NO_DITHER_MASK
1069 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1070 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1071 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1072 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1073#endif
1074
1075#ifndef WORDS_BIGENDIAN
1076 *((DATA32 *)dst_ptr) =
1077 (r2 << 24) | (g2 << 20) | (b2 << 16) |
1078 (r1 << 8 ) | (g1 << 4 ) | (b1 );
1079#else
1080 *((DATA32 *)dst_ptr) =
1081 (r1 << 24) | (g1 << 20) | (b1 << 16) |
1082 (r2 << 8 ) | (g2 << 4 ) | (b2 );
1083#endif
1084
1085 CONVERT_LOOP2_END_ROT_180();
1086 return;
1087 (void)pal;
1088}
1089#endif
1090#endif
1091
1092#ifdef BUILD_CONVERT_16_RGB_444
1093#ifdef BUILD_CONVERT_16_RGB_ROT180
1094void
1095evas_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)
1096{
1097 DATA32 *src_ptr;
1098 DATA16 *dst_ptr;
1099 int x, y;
1100 DATA8 r, g, b;
1101#ifndef BUILD_NO_DITHER_MASK
1102 DATA8 dith;
1103#endif
1104
1105 dst_ptr = (DATA16 *)dst;
1106
1107 CONVERT_LOOP_START_ROT_180();
1108
1109 r = (R_VAL(src_ptr)) >> 4;
1110 g = (G_VAL(src_ptr)) >> 4;
1111 b = (B_VAL(src_ptr)) >> 4;
1112
1113#ifndef BUILD_NO_DITHER_MASK
1114 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1115 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1116 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1117 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1118#endif
1119
1120 *dst_ptr = (r << 8) | (g << 4) | (b);
1121
1122 CONVERT_LOOP_END_ROT_180();
1123 return;
1124 (void)pal;
1125}
1126#endif
1127#endif
1128
1129#ifdef BUILD_CONVERT_16_RGB_444
1130#ifdef BUILD_CONVERT_16_RGB_ROT270
1131void
1132evas_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)
1133{
1134 DATA32 *src_ptr;
1135 DATA16 *dst_ptr;
1136 int x, y;
1137 DATA8 r1, g1, b1;
1138 DATA8 r2, g2, b2;
1139#ifndef BUILD_NO_DITHER_MASK
1140 DATA8 dith;
1141#endif
1142
1143 dst_ptr = (DATA16 *)dst;
1144
1145 CONVERT_LOOP2_START_ROT_270();
1146
1147 r1 = (R_VAL(src_ptr)) >> 4;
1148 g1 = (G_VAL(src_ptr)) >> 4;
1149 b1 = (B_VAL(src_ptr)) >> 4;
1150
1151#ifndef BUILD_NO_DITHER_MASK
1152 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1153 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1154 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1155 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1156#endif
1157
1158 CONVERT_LOOP2_INC_ROT_270();
1159
1160 r2 = (R_VAL(src_ptr)) >> 4;
1161 g2 = (G_VAL(src_ptr)) >> 4;
1162 b2 = (B_VAL(src_ptr)) >> 4;
1163
1164#ifndef BUILD_NO_DITHER_MASK
1165 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1166 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1167 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1168 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1169#endif
1170
1171#ifndef WORDS_BIGENDIAN
1172 *((DATA32 *)dst_ptr) =
1173 (r2 << 24) | (g2 << 20) | (b2 << 16) |
1174 (r1 << 8 ) | (g1 << 4 ) | (b1 );
1175#else
1176 *((DATA32 *)dst_ptr) =
1177 (r1 << 24) | (g1 << 20) | (b1 << 16) |
1178 (r2 << 8 ) | (g2 << 4 ) | (b2 );
1179#endif
1180
1181 CONVERT_LOOP2_END_ROT_270();
1182 return;
1183 (void)pal;
1184}
1185#endif
1186#endif
1187
1188#ifdef BUILD_CONVERT_16_RGB_444
1189#ifdef BUILD_CONVERT_16_RGB_ROT270
1190void
1191evas_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)
1192{
1193 DATA32 *src_ptr;
1194 DATA16 *dst_ptr;
1195 int x, y;
1196 DATA8 r, g, b;
1197#ifndef BUILD_NO_DITHER_MASK
1198 DATA8 dith;
1199#endif
1200
1201 dst_ptr = (DATA16 *)dst;
1202
1203 CONVERT_LOOP_START_ROT_270();
1204
1205 r = (R_VAL(src_ptr)) >> 4;
1206 g = (G_VAL(src_ptr)) >> 4;
1207 b = (B_VAL(src_ptr)) >> 4;
1208
1209#ifndef BUILD_NO_DITHER_MASK
1210 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1211 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1212 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1213 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1214#endif
1215
1216 *dst_ptr = (r << 8) | (g << 4) | (b);
1217
1218 CONVERT_LOOP_END_ROT_270();
1219 return;
1220 (void)pal;
1221}
1222#endif
1223#endif
1224
1225#ifdef BUILD_CONVERT_16_RGB_444
1226#ifdef BUILD_CONVERT_16_RGB_ROT90
1227void
1228evas_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)
1229{
1230 DATA32 *src_ptr;
1231 DATA16 *dst_ptr;
1232 int x, y;
1233 DATA8 r1, g1, b1;
1234 DATA8 r2, g2, b2;
1235#ifndef BUILD_NO_DITHER_MASK
1236 DATA8 dith;
1237#endif
1238
1239 dst_ptr = (DATA16 *)dst;
1240
1241 CONVERT_LOOP2_START_ROT_90();
1242
1243 r1 = (R_VAL(src_ptr)) >> 4;
1244 g1 = (G_VAL(src_ptr)) >> 4;
1245 b1 = (B_VAL(src_ptr)) >> 4;
1246
1247#ifndef BUILD_NO_DITHER_MASK
1248 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1249 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1250 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1251 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1252#endif
1253
1254 CONVERT_LOOP2_INC_ROT_90();
1255
1256 r2 = (R_VAL(src_ptr)) >> 4;
1257 g2 = (G_VAL(src_ptr)) >> 4;
1258 b2 = (B_VAL(src_ptr)) >> 4;
1259
1260#ifndef BUILD_NO_DITHER_MASK
1261 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1262 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1263 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1264 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1265#endif
1266
1267#ifndef WORDS_BIGENDIAN
1268 *((DATA32 *)dst_ptr) =
1269 (r2 << 24) | (g2 << 20) | (b2 << 16) |
1270 (r1 << 8 ) | (g1 << 4 ) | (b1 );
1271#else
1272 *((DATA32 *)dst_ptr) =
1273 (r1 << 24) | (g1 << 20) | (b1 << 16) |
1274 (r2 << 8 ) | (g2 << 4 ) | (b2 );
1275#endif
1276
1277 CONVERT_LOOP2_END_ROT_90();
1278 return;
1279 (void)pal;
1280}
1281#endif
1282#endif
1283
1284#ifdef BUILD_CONVERT_16_RGB_444
1285#ifdef BUILD_CONVERT_16_RGB_ROT90
1286void
1287evas_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)
1288{
1289 DATA32 *src_ptr;
1290 DATA16 *dst_ptr;
1291 int x, y;
1292 DATA8 r, g, b;
1293#ifndef BUILD_NO_DITHER_MASK
1294 DATA8 dith;
1295#endif
1296
1297 dst_ptr = (DATA16 *)dst;
1298
1299 CONVERT_LOOP_START_ROT_90();
1300
1301 r = (R_VAL(src_ptr)) >> 4;
1302 g = (G_VAL(src_ptr)) >> 4;
1303 b = (B_VAL(src_ptr)) >> 4;
1304
1305#ifndef BUILD_NO_DITHER_MASK
1306 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1307 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1308 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1309 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1310#endif
1311
1312 *dst_ptr = (r << 8) | (g << 4) | (b);
1313
1314 CONVERT_LOOP_END_ROT_90();
1315 return;
1316 (void)pal;
1317}
1318#endif
1319#endif
1320
1321#ifdef BUILD_CONVERT_16_RGB_454645
1322#ifdef BUILD_CONVERT_16_RGB_ROT0
1323void
1324evas_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)
1325{
1326 DATA32 *src_ptr;
1327 DATA16 *dst_ptr;
1328 int x, y;
1329 DATA8 r1, g1, b1;
1330 DATA8 r2, g2, b2;
1331#ifndef BUILD_NO_DITHER_MASK
1332 DATA8 dith;
1333#endif
1334
1335 dst_ptr = (DATA16 *)dst;
1336
1337 CONVERT_LOOP2_START_ROT_0();
1338
1339 r1 = (R_VAL(src_ptr)) >> 4;
1340 g1 = (G_VAL(src_ptr)) >> 4;
1341 b1 = (B_VAL(src_ptr)) >> 4;
1342
1343#ifndef BUILD_NO_DITHER_MASK
1344 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1345 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1346 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1347 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1348#endif
1349
1350 CONVERT_LOOP2_INC_ROT_0();
1351
1352 r2 = (R_VAL(src_ptr)) >> 4;
1353 g2 = (G_VAL(src_ptr)) >> 4;
1354 b2 = (B_VAL(src_ptr)) >> 4;
1355
1356#ifndef BUILD_NO_DITHER_MASK
1357 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1358 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1359 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1360 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1361#endif
1362
1363#ifndef WORDS_BIGENDIAN
1364 *((DATA32 *)dst_ptr) =
1365 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1366 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1367#else
1368 *((DATA32 *)dst_ptr) =
1369 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1370 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1371#endif
1372
1373 CONVERT_LOOP2_END_ROT_0();
1374 return;
1375 (void)pal;
1376}
1377#endif
1378#endif
1379
1380#ifdef BUILD_CONVERT_16_RGB_454645
1381#ifdef BUILD_CONVERT_16_RGB_ROT0
1382void
1383evas_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)
1384{
1385 DATA32 *src_ptr;
1386 DATA16 *dst_ptr;
1387 int x, y;
1388 DATA8 r, g, b;
1389#ifndef BUILD_NO_DITHER_MASK
1390 DATA8 dith;
1391#endif
1392
1393 dst_ptr = (DATA16 *)dst;
1394
1395 CONVERT_LOOP_START_ROT_0();
1396
1397 r = (R_VAL(src_ptr)) >> 4;
1398 g = (G_VAL(src_ptr)) >> 4;
1399 b = (B_VAL(src_ptr)) >> 4;
1400
1401#ifndef BUILD_NO_DITHER_MASK
1402 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1403 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1404 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1405 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1406#endif
1407
1408 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1409
1410 CONVERT_LOOP_END_ROT_0();
1411 return;
1412 (void)pal;
1413}
1414#endif
1415#endif
1416
1417#ifdef BUILD_CONVERT_16_RGB_454645
1418#ifdef BUILD_CONVERT_16_RGB_ROT180
1419void
1420evas_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)
1421{
1422 DATA32 *src_ptr;
1423 DATA16 *dst_ptr;
1424 int x, y;
1425 DATA8 r1, g1, b1;
1426 DATA8 r2, g2, b2;
1427#ifndef BUILD_NO_DITHER_MASK
1428 DATA8 dith;
1429#endif
1430
1431 dst_ptr = (DATA16 *)dst;
1432
1433 CONVERT_LOOP2_START_ROT_180();
1434
1435 r1 = (R_VAL(src_ptr)) >> 4;
1436 g1 = (G_VAL(src_ptr)) >> 4;
1437 b1 = (B_VAL(src_ptr)) >> 4;
1438
1439#ifndef BUILD_NO_DITHER_MASK
1440 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1441 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1442 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1443 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1444#endif
1445
1446 CONVERT_LOOP2_INC_ROT_180();
1447
1448 r2 = (R_VAL(src_ptr)) >> 4;
1449 g2 = (G_VAL(src_ptr)) >> 4;
1450 b2 = (B_VAL(src_ptr)) >> 4;
1451
1452#ifndef BUILD_NO_DITHER_MASK
1453 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1454 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1455 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1456 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1457#endif
1458
1459#ifndef WORDS_BIGENDIAN
1460 *((DATA32 *)dst_ptr) =
1461 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1462 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1463#else
1464 *((DATA32 *)dst_ptr) =
1465 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1466 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1467#endif
1468
1469 CONVERT_LOOP2_END_ROT_180();
1470 return;
1471 (void)pal;
1472}
1473#endif
1474#endif
1475
1476#ifdef BUILD_CONVERT_16_RGB_454645
1477#ifdef BUILD_CONVERT_16_RGB_ROT180
1478void
1479evas_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)
1480{
1481 DATA32 *src_ptr;
1482 DATA16 *dst_ptr;
1483 int x, y;
1484 DATA8 r, g, b;
1485#ifndef BUILD_NO_DITHER_MASK
1486 DATA8 dith;
1487#endif
1488
1489 dst_ptr = (DATA16 *)dst;
1490
1491 CONVERT_LOOP_START_ROT_180();
1492
1493 r = (R_VAL(src_ptr)) >> 4;
1494 g = (G_VAL(src_ptr)) >> 4;
1495 b = (B_VAL(src_ptr)) >> 4;
1496
1497#ifndef BUILD_NO_DITHER_MASK
1498 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1499 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1500 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1501 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1502#endif
1503
1504 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1505
1506 CONVERT_LOOP_END_ROT_180();
1507 return;
1508 (void)pal;
1509}
1510#endif
1511#endif
1512
1513
1514#ifdef BUILD_CONVERT_16_RGB_454645
1515#ifdef BUILD_CONVERT_16_RGB_ROT270
1516void
1517evas_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)
1518{
1519 DATA32 *src_ptr;
1520 DATA16 *dst_ptr;
1521 int x, y;
1522 DATA8 r1, g1, b1;
1523 DATA8 r2, g2, b2;
1524#ifndef BUILD_NO_DITHER_MASK
1525 DATA8 dith;
1526#endif
1527
1528 dst_ptr = (DATA16 *)dst;
1529
1530 CONVERT_LOOP2_START_ROT_270();
1531
1532 r1 = (R_VAL(src_ptr)) >> 4;
1533 g1 = (G_VAL(src_ptr)) >> 4;
1534 b1 = (B_VAL(src_ptr)) >> 4;
1535
1536#ifndef BUILD_NO_DITHER_MASK
1537 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1538 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1539 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1540 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1541#endif
1542
1543 CONVERT_LOOP2_INC_ROT_270();
1544
1545 r2 = (R_VAL(src_ptr)) >> 4;
1546 g2 = (G_VAL(src_ptr)) >> 4;
1547 b2 = (B_VAL(src_ptr)) >> 4;
1548
1549#ifndef BUILD_NO_DITHER_MASK
1550 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1551 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1552 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1553 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1554#endif
1555
1556#ifndef WORDS_BIGENDIAN
1557 *((DATA32 *)dst_ptr) =
1558 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1559 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1560#else
1561 *((DATA32 *)dst_ptr) =
1562 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1563 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1564#endif
1565
1566 CONVERT_LOOP2_END_ROT_270();
1567 return;
1568 (void)pal;
1569}
1570#endif
1571#endif
1572
1573#ifdef BUILD_CONVERT_16_RGB_454645
1574#ifdef BUILD_CONVERT_16_RGB_ROT270
1575void
1576evas_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)
1577{
1578 DATA32 *src_ptr;
1579 DATA16 *dst_ptr;
1580 int x, y;
1581 DATA8 r, g, b;
1582#ifndef BUILD_NO_DITHER_MASK
1583 DATA8 dith;
1584#endif
1585
1586 dst_ptr = (DATA16 *)dst;
1587
1588 CONVERT_LOOP_START_ROT_270();
1589
1590 r = (R_VAL(src_ptr)) >> 4;
1591 g = (G_VAL(src_ptr)) >> 4;
1592 b = (B_VAL(src_ptr)) >> 4;
1593
1594#ifndef BUILD_NO_DITHER_MASK
1595 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1596 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1597 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1598 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1599#endif
1600
1601 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1602
1603 CONVERT_LOOP_END_ROT_270();
1604 return;
1605 (void)pal;
1606}
1607#endif
1608#endif
1609
1610#ifdef BUILD_CONVERT_16_RGB_454645
1611#ifdef BUILD_CONVERT_16_RGB_ROT90
1612void
1613evas_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)
1614{
1615 DATA32 *src_ptr;
1616 DATA16 *dst_ptr;
1617 int x, y;
1618 DATA8 r1, g1, b1;
1619 DATA8 r2, g2, b2;
1620#ifndef BUILD_NO_DITHER_MASK
1621 DATA8 dith;
1622#endif
1623
1624 dst_ptr = (DATA16 *)dst;
1625
1626 CONVERT_LOOP2_START_ROT_90();
1627
1628 r1 = (R_VAL(src_ptr)) >> 4;
1629 g1 = (G_VAL(src_ptr)) >> 4;
1630 b1 = (B_VAL(src_ptr)) >> 4;
1631
1632#ifndef BUILD_NO_DITHER_MASK
1633 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1634 if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
1635 if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
1636 if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
1637#endif
1638
1639 CONVERT_LOOP2_INC_ROT_90();
1640
1641 r2 = (R_VAL(src_ptr)) >> 4;
1642 g2 = (G_VAL(src_ptr)) >> 4;
1643 b2 = (B_VAL(src_ptr)) >> 4;
1644
1645#ifndef BUILD_NO_DITHER_MASK
1646 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1647 if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
1648 if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
1649 if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
1650#endif
1651
1652#ifndef WORDS_BIGENDIAN
1653 *((DATA32 *)dst_ptr) =
1654 (r2 << 28) | (g2 << 23) | (b2 << 17) |
1655 (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
1656#else
1657 *((DATA32 *)dst_ptr) =
1658 (r1 << 28) | (g1 << 23) | (b1 << 17) |
1659 (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
1660#endif
1661
1662 CONVERT_LOOP2_END_ROT_90();
1663 return;
1664 (void)pal;
1665}
1666#endif
1667#endif
1668
1669#ifdef BUILD_CONVERT_16_RGB_454645
1670#ifdef BUILD_CONVERT_16_RGB_ROT90
1671void
1672evas_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)
1673{
1674 DATA32 *src_ptr;
1675 DATA16 *dst_ptr;
1676 int x, y;
1677 DATA8 r, g, b;
1678#ifndef BUILD_NO_DITHER_MASK
1679 DATA8 dith;
1680#endif
1681
1682 dst_ptr = (DATA16 *)dst;
1683
1684 CONVERT_LOOP_START_ROT_90();
1685
1686 r = (R_VAL(src_ptr)) >> 4;
1687 g = (G_VAL(src_ptr)) >> 4;
1688 b = (B_VAL(src_ptr)) >> 4;
1689
1690#ifndef BUILD_NO_DITHER_MASK
1691 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
1692 if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
1693 if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
1694 if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
1695#endif
1696
1697 *dst_ptr = (r << 12) | (g << 7) | (b << 1);
1698
1699 CONVERT_LOOP_END_ROT_90();
1700 return;
1701 (void)pal;
1702}
1703#endif
1704#endif
1705
1706#ifdef BUILD_CONVERT_16_RGB_555
1707#ifdef BUILD_CONVERT_16_RGB_ROT0
1708void
1709evas_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)
1710{
1711 DATA32 *src_ptr;
1712 DATA16 *dst_ptr;
1713 int x, y;
1714 DATA8 r1, g1, b1;
1715 DATA8 r2, g2, b2;
1716#ifndef BUILD_NO_DITHER_MASK
1717 DATA8 dith;
1718#endif
1719
1720 dst_ptr = (DATA16 *)dst;
1721
1722 CONVERT_LOOP2_START_ROT_0();
1723
1724 r1 = (R_VAL(src_ptr)) >> 3;
1725 g1 = (G_VAL(src_ptr)) >> 3;
1726 b1 = (B_VAL(src_ptr)) >> 3;
1727
1728#ifndef BUILD_NO_DITHER_MASK
1729 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1730 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
1731 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
1732 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
1733#endif
1734
1735 CONVERT_LOOP2_INC_ROT_0();
1736
1737 r2 = (R_VAL(src_ptr)) >> 3;
1738 g2 = (G_VAL(src_ptr)) >> 3;
1739 b2 = (B_VAL(src_ptr)) >> 3;
1740
1741#ifndef BUILD_NO_DITHER_MASK
1742 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1743 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
1744 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
1745 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
1746#endif
1747
1748#ifndef WORDS_BIGENDIAN
1749 *((DATA32 *)dst_ptr) =
1750 (r2 << 26) | (g2 << 21) | (b2 << 16) |
1751 (r1 << 10) | (g1 << 5 ) | (b1 );
1752#else
1753 *((DATA32 *)dst_ptr) =
1754 (r1 << 26) | (g1 << 21) | (b1 << 16) |
1755 (r2 << 10) | (g2 << 5 ) | (b2 );
1756#endif
1757
1758 CONVERT_LOOP2_END_ROT_0();
1759 return;
1760 (void)pal;
1761}
1762#endif
1763#endif
1764
1765#ifdef BUILD_CONVERT_16_RGB_555
1766#ifdef BUILD_CONVERT_16_RGB_ROT0
1767void
1768evas_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)
1769{
1770 DATA32 *src_ptr;
1771 DATA16 *dst_ptr;
1772 int x, y;
1773 DATA8 r, g, b;
1774#ifndef BUILD_NO_DITHER_MASK
1775 DATA8 dith;
1776#endif
1777
1778 dst_ptr = (DATA16 *)dst;
1779
1780 CONVERT_LOOP_START_ROT_0();
1781
1782 r = (R_VAL(src_ptr)) >> 3;
1783 g = (G_VAL(src_ptr)) >> 3;
1784 b = (B_VAL(src_ptr)) >> 3;
1785
1786#ifndef BUILD_NO_DITHER_MASK
1787 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1788 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
1789 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
1790 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
1791#endif
1792
1793 *dst_ptr = (r << 10) | (g << 5) | (b);
1794
1795 CONVERT_LOOP_END_ROT_0();
1796 return;
1797 (void)pal;
1798}
1799#endif
1800#endif
1801
1802#ifdef BUILD_CONVERT_16_RGB_555
1803#ifdef BUILD_CONVERT_16_RGB_ROT180
1804void
1805evas_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)
1806{
1807 DATA32 *src_ptr;
1808 DATA16 *dst_ptr;
1809 int x, y;
1810 DATA8 r1, g1, b1;
1811 DATA8 r2, g2, b2;
1812#ifndef BUILD_NO_DITHER_MASK
1813 DATA8 dith;
1814#endif
1815
1816 dst_ptr = (DATA16 *)dst;
1817
1818 CONVERT_LOOP2_START_ROT_180();
1819
1820 r1 = (R_VAL(src_ptr)) >> 3;
1821 g1 = (G_VAL(src_ptr)) >> 3;
1822 b1 = (B_VAL(src_ptr)) >> 3;
1823
1824#ifndef BUILD_NO_DITHER_MASK
1825 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1826 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
1827 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
1828 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
1829#endif
1830
1831 CONVERT_LOOP2_INC_ROT_180();
1832
1833 r2 = (R_VAL(src_ptr)) >> 3;
1834 g2 = (G_VAL(src_ptr)) >> 3;
1835 b2 = (B_VAL(src_ptr)) >> 3;
1836
1837#ifndef BUILD_NO_DITHER_MASK
1838 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1839 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
1840 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
1841 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
1842#endif
1843
1844#ifndef WORDS_BIGENDIAN
1845 *((DATA32 *)dst_ptr) =
1846 (r2 << 26) | (g2 << 21) | (b2 << 16) |
1847 (r1 << 10) | (g1 << 5 ) | (b1 );
1848#else
1849 *((DATA32 *)dst_ptr) =
1850 (r1 << 26) | (g1 << 21) | (b1 << 16) |
1851 (r2 << 10) | (g2 << 5 ) | (b2 );
1852#endif
1853
1854 CONVERT_LOOP2_END_ROT_180();
1855 return;
1856 (void)pal;
1857}
1858#endif
1859#endif
1860
1861#ifdef BUILD_CONVERT_16_RGB_555
1862#ifdef BUILD_CONVERT_16_RGB_ROT180
1863void
1864evas_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)
1865{
1866 DATA32 *src_ptr;
1867 DATA16 *dst_ptr;
1868 int x, y;
1869 DATA8 r, g, b;
1870#ifndef BUILD_NO_DITHER_MASK
1871 DATA8 dith;
1872#endif
1873
1874 dst_ptr = (DATA16 *)dst;
1875
1876 CONVERT_LOOP_START_ROT_180();
1877
1878 r = (R_VAL(src_ptr)) >> 3;
1879 g = (G_VAL(src_ptr)) >> 3;
1880 b = (B_VAL(src_ptr)) >> 3;
1881
1882#ifndef BUILD_NO_DITHER_MASK
1883 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1884 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
1885 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
1886 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
1887#endif
1888
1889 *dst_ptr = (r << 10) | (g << 5) | (b);
1890
1891 CONVERT_LOOP_END_ROT_180();
1892 return;
1893 (void)pal;
1894}
1895#endif
1896#endif
1897
1898#ifdef BUILD_CONVERT_16_RGB_555
1899#ifdef BUILD_CONVERT_16_RGB_ROT270
1900void
1901evas_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)
1902{
1903 DATA32 *src_ptr;
1904 DATA16 *dst_ptr;
1905 int x, y;
1906 DATA8 r1, g1, b1;
1907 DATA8 r2, g2, b2;
1908#ifndef BUILD_NO_DITHER_MASK
1909 DATA8 dith;
1910#endif
1911
1912 dst_ptr = (DATA16 *)dst;
1913
1914 CONVERT_LOOP2_START_ROT_270();
1915
1916 r1 = (R_VAL(src_ptr)) >> 3;
1917 g1 = (G_VAL(src_ptr)) >> 3;
1918 b1 = (B_VAL(src_ptr)) >> 3;
1919
1920#ifndef BUILD_NO_DITHER_MASK
1921 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1922 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
1923 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
1924 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
1925#endif
1926
1927 CONVERT_LOOP2_INC_ROT_270();
1928
1929 r2 = (R_VAL(src_ptr)) >> 3;
1930 g2 = (G_VAL(src_ptr)) >> 3;
1931 b2 = (B_VAL(src_ptr)) >> 3;
1932
1933#ifndef BUILD_NO_DITHER_MASK
1934 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1935 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
1936 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
1937 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
1938#endif
1939
1940#ifndef WORDS_BIGENDIAN
1941 *((DATA32 *)dst_ptr) =
1942 (r2 << 26) | (g2 << 21) | (b2 << 16) |
1943 (r1 << 10) | (g1 << 5 ) | (b1 );
1944#else
1945 *((DATA32 *)dst_ptr) =
1946 (r1 << 26) | (g1 << 21) | (b1 << 16) |
1947 (r2 << 10) | (g2 << 5 ) | (b2 );
1948#endif
1949
1950 CONVERT_LOOP2_END_ROT_270();
1951 return;
1952 (void)pal;
1953}
1954#endif
1955#endif
1956
1957#ifdef BUILD_CONVERT_16_RGB_555
1958#ifdef BUILD_CONVERT_16_RGB_ROT270
1959void
1960evas_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)
1961{
1962 DATA32 *src_ptr;
1963 DATA16 *dst_ptr;
1964 int x, y;
1965 DATA8 r, g, b;
1966#ifndef BUILD_NO_DITHER_MASK
1967 DATA8 dith;
1968#endif
1969
1970 dst_ptr = (DATA16 *)dst;
1971
1972 CONVERT_LOOP_START_ROT_270();
1973
1974 r = (R_VAL(src_ptr)) >> 3;
1975 g = (G_VAL(src_ptr)) >> 3;
1976 b = (B_VAL(src_ptr)) >> 3;
1977
1978#ifndef BUILD_NO_DITHER_MASK
1979 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
1980 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
1981 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
1982 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
1983#endif
1984
1985 *dst_ptr = (r << 10) | (g << 5) | (b);
1986
1987 CONVERT_LOOP_END_ROT_270();
1988 return;
1989 (void)pal;
1990}
1991#endif
1992#endif
1993
1994#ifdef BUILD_CONVERT_16_RGB_555
1995#ifdef BUILD_CONVERT_16_RGB_ROT90
1996void
1997evas_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)
1998{
1999 DATA32 *src_ptr;
2000 DATA16 *dst_ptr;
2001 int x, y;
2002 DATA8 r1, g1, b1;
2003 DATA8 r2, g2, b2;
2004#ifndef BUILD_NO_DITHER_MASK
2005 DATA8 dith;
2006#endif
2007
2008 dst_ptr = (DATA16 *)dst;
2009
2010 CONVERT_LOOP2_START_ROT_90();
2011
2012 r1 = (R_VAL(src_ptr)) >> 3;
2013 g1 = (G_VAL(src_ptr)) >> 3;
2014 b1 = (B_VAL(src_ptr)) >> 3;
2015
2016#ifndef BUILD_NO_DITHER_MASK
2017 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
2018 if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
2019 if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
2020 if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
2021#endif
2022
2023 CONVERT_LOOP2_INC_ROT_90();
2024
2025 r2 = (R_VAL(src_ptr)) >> 3;
2026 g2 = (G_VAL(src_ptr)) >> 3;
2027 b2 = (B_VAL(src_ptr)) >> 3;
2028
2029#ifndef BUILD_NO_DITHER_MASK
2030 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
2031 if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
2032 if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
2033 if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
2034#endif
2035
2036#ifndef WORDS_BIGENDIAN
2037 *((DATA32 *)dst_ptr) =
2038 (r2 << 26) | (g2 << 21) | (b2 << 16) |
2039 (r1 << 10) | (g1 << 5 ) | (b1 );
2040#else
2041 *((DATA32 *)dst_ptr) =
2042 (r1 << 26) | (g1 << 21) | (b1 << 16) |
2043 (r2 << 10) | (g2 << 5 ) | (b2 );
2044#endif
2045
2046 CONVERT_LOOP2_END_ROT_90();
2047 return;
2048 (void)pal;
2049}
2050#endif
2051#endif
2052
2053#ifdef BUILD_CONVERT_16_RGB_555
2054#ifdef BUILD_CONVERT_16_RGB_ROT90
2055void
2056evas_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)
2057{
2058 DATA32 *src_ptr;
2059 DATA16 *dst_ptr;
2060 int x, y;
2061 DATA8 r, g, b;
2062#ifndef BUILD_NO_DITHER_MASK
2063 DATA8 dith;
2064#endif
2065
2066 dst_ptr = (DATA16 *)dst;
2067
2068 CONVERT_LOOP_START_ROT_90();
2069
2070 r = (R_VAL(src_ptr)) >> 3;
2071 g = (G_VAL(src_ptr)) >> 3;
2072 b = (B_VAL(src_ptr)) >> 3;
2073
2074#ifndef BUILD_NO_DITHER_MASK
2075 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
2076 if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
2077 if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
2078 if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
2079#endif
2080
2081 *dst_ptr = (r << 10) | (g << 5) | (b);
2082
2083 CONVERT_LOOP_END_ROT_90();
2084 return;
2085 (void)pal;
2086}
2087#endif
2088#endif
2089
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 @@
1#ifndef _EVAS_CONVERT_RGB_16_H
2#define _EVAS_CONVERT_RGB_16_H
3
4
5void 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);
6void 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);
7void 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);
8void 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);
9void 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);
10void 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);
11void 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);
12void 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);
13void 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);
14void 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);
15
16void 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);
17void 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);
18void 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);
19void 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);
20void 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);
21void 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);
22void 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);
23void 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);
24void 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);
25void 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);
26
27void 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);
28void 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);
29void 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);
30void 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);
31void 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);
32void 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);
33void 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);
34void 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);
35void 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);
36void 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);
37
38void 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);
39void 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);
40void 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);
41void 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);
42void 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);
43void 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);
44void 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);
45void 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);
46void 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);
47void 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);
48
49
50#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 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_24.h"
3
4#ifdef BUILD_CONVERT_24_RGB_888
5void
6evas_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__)
7{
8 DATA32 *src_ptr;
9 DATA8 *dst_ptr;
10 int x, y;
11
12 dst_ptr = (DATA8 *)dst;
13 src_ptr = (DATA32 *)src;
14
15 for (y = 0; y < h; y++)
16 {
17 for (x = 0; x < w; x++)
18 {
19 dst_ptr[0] = R_VAL(src_ptr);
20 dst_ptr[1] = G_VAL(src_ptr);
21 dst_ptr[2] = B_VAL(src_ptr);
22 src_ptr++;
23 dst_ptr+=3;
24 }
25 src_ptr += src_jump;
26 dst_ptr += (dst_jump * 3);
27 }
28 return;
29}
30#endif
31#ifdef BUILD_CONVERT_24_RGB_666
32void
33evas_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__)
34{
35 DATA32 *src_ptr;
36 DATA8 *dst_ptr, *scratch_ptr;
37 DATA32 scratch;
38 int x, y;
39
40 dst_ptr = (DATA8 *)dst;
41 src_ptr = (DATA32 *)src;
42
43 scratch_ptr = (DATA8 *)(&scratch);
44 for (y = 0; y < h; y++)
45 {
46 for (x = 0; x < w; x++)
47 {
48 scratch =
49 (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) |
50 ((G_VAL(src_ptr) << 4) & 0x000fc0);
51 dst_ptr[0] = scratch_ptr[1];
52 dst_ptr[1] = scratch_ptr[2];
53 dst_ptr[2] = scratch_ptr[3];
54 src_ptr++;
55 dst_ptr+=3;
56 }
57 src_ptr += src_jump;
58 dst_ptr += (dst_jump * 3);
59 }
60 return;
61}
62#endif
63#ifdef BUILD_CONVERT_24_BGR_888
64void
65evas_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__)
66{
67 DATA32 *src_ptr;
68 DATA8 *dst_ptr;
69 int x, y;
70
71 dst_ptr = (DATA8 *)dst;
72 src_ptr = (DATA32 *)src;
73
74 for (y = 0; y < h; y++)
75 {
76 for (x = 0; x < w; x++)
77 {
78 dst_ptr[2] = R_VAL(src_ptr);
79 dst_ptr[1] = G_VAL(src_ptr);
80 dst_ptr[0] = B_VAL(src_ptr);
81 src_ptr++;
82 dst_ptr+=3;
83 }
84 src_ptr += src_jump;
85 dst_ptr += (dst_jump * 3);
86 }
87 return;
88}
89#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 @@
1#ifndef _EVAS_CONVERT_RGB_24_H
2#define _EVAS_CONVERT_RGB_24_H
3
4
5void 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);
6void 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);
7
8void 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);
9
10#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 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_32.h"
3
4#ifdef BUILD_CONVERT_32_RGB_8888
5#ifdef BUILD_CONVERT_32_RGB_ROT0
6void
7evas_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__)
8{
9 DATA32 *src_ptr;
10 DATA32 *dst_ptr;
11 int y;
12 Gfx_Func_Copy func;
13
14 dst_ptr = (DATA32 *)dst;
15 src_ptr = src;
16
17 func = evas_common_draw_func_copy_get(w, 0);
18
19 for (y = 0; y < h; y++)
20 {
21 func(src_ptr, dst_ptr, w);
22 src_ptr += w + src_jump;
23 dst_ptr += w + dst_jump;
24 }
25 return;
26}
27#endif
28#endif
29
30#ifdef BUILD_CONVERT_32_RGB_8888
31#ifdef BUILD_CONVERT_32_RGB_ROT180
32void
33evas_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__)
34{
35 DATA32 *src_ptr;
36 DATA32 *dst_ptr;
37 int x, y;
38
39 dst_ptr = (DATA32 *)dst;
40
41 CONVERT_LOOP_START_ROT_180();
42
43 *dst_ptr = *src_ptr;
44
45 CONVERT_LOOP_END_ROT_180();
46 return;
47}
48#endif
49#endif
50
51#ifdef TILE_ROTATE
52#define FAST_SIMPLE_ROTATE(suffix, pix_type) \
53 static void \
54 blt_rotated_90_trivial_##suffix(pix_type *dst, \
55 int dst_stride, \
56 const pix_type *src, \
57 int src_stride, \
58 int w, \
59 int h) \
60 { \
61 int x, y; \
62 for (y = 0; y < h; y++) \
63 { \
64 const pix_type *s = src + (h - y - 1); \
65 pix_type *d = dst + (dst_stride * y); \
66 for (x = 0; x < w; x++) \
67 { \
68 *d++ = *s; \
69 s += src_stride; \
70 } \
71 } \
72 } \
73 static void \
74 blt_rotated_270_trivial_##suffix(pix_type *dst, \
75 int dst_stride, \
76 const pix_type *src, \
77 int src_stride, \
78 int w, \
79 int h) \
80 { \
81 int x, y; \
82 for (y = 0; y < h; y++) \
83 { \
84 const pix_type *s = src + (src_stride * (w - 1)) + y; \
85 pix_type *d = dst + (dst_stride * y); \
86 for (x = 0; x < w; x++) \
87 { \
88 *d++ = *s; \
89 s -= src_stride; \
90 } \
91 } \
92 } \
93 static void \
94 blt_rotated_90_##suffix(pix_type *dst, \
95 int dst_stride, \
96 const pix_type *src, \
97 int src_stride, \
98 int w, \
99 int h) \
100 { \
101 int x, leading_pixels = 0, trailing_pixels = 0; \
102 const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \
103 if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \
104 { \
105 leading_pixels = TILE_SIZE - \
106 (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
107 if (leading_pixels > w) \
108 leading_pixels = w; \
109 blt_rotated_90_trivial_##suffix(dst, \
110 dst_stride, \
111 src, \
112 src_stride, \
113 leading_pixels, \
114 h); \
115 dst += leading_pixels; \
116 src += leading_pixels * src_stride; \
117 w -= leading_pixels; \
118 } \
119 if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \
120 { \
121 trailing_pixels = (((uintptr_t)(dst + w) & \
122 (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
123 if (trailing_pixels > w) \
124 trailing_pixels = w; \
125 w -= trailing_pixels; \
126 } \
127 for (x = 0; x < w; x += TILE_SIZE) \
128 { \
129 blt_rotated_90_trivial_##suffix(dst + x, \
130 dst_stride, \
131 src + (src_stride * x), \
132 src_stride, \
133 TILE_SIZE, \
134 h); \
135 } \
136 if (trailing_pixels) \
137 blt_rotated_90_trivial_##suffix(dst + w, \
138 dst_stride, \
139 src + (w * src_stride), \
140 src_stride, \
141 trailing_pixels, \
142 h); \
143 } \
144 static void \
145 blt_rotated_270_##suffix(pix_type *dst, \
146 int dst_stride, \
147 const pix_type *src, \
148 int src_stride, \
149 int w, \
150 int h) \
151 { \
152 int x, leading_pixels = 0, trailing_pixels = 0; \
153 const int TILE_SIZE = TILE_CACHE_LINE_SIZE / sizeof(pix_type); \
154 if ((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) \
155 { \
156 leading_pixels = TILE_SIZE - \
157 (((uintptr_t)dst & (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
158 if (leading_pixels > w) \
159 leading_pixels = w; \
160 blt_rotated_270_trivial_##suffix(dst, \
161 dst_stride, \
162 src + (src_stride * (w - leading_pixels)), \
163 src_stride, \
164 leading_pixels, \
165 h); \
166 dst += leading_pixels; \
167 w -= leading_pixels; \
168 } \
169 if ((uintptr_t)(dst + w) & (TILE_CACHE_LINE_SIZE - 1)) \
170 { \
171 trailing_pixels = (((uintptr_t)(dst + w) & \
172 (TILE_CACHE_LINE_SIZE - 1)) / sizeof(pix_type)); \
173 if (trailing_pixels > w) \
174 trailing_pixels = w; \
175 w -= trailing_pixels; \
176 src += trailing_pixels * src_stride; \
177 } \
178 for (x = 0; x < w; x += TILE_SIZE) \
179 { \
180 blt_rotated_270_trivial_##suffix(dst + x, \
181 dst_stride, \
182 src + (src_stride * (w - x - TILE_SIZE)), \
183 src_stride, \
184 TILE_SIZE, \
185 h); \
186 } \
187 if (trailing_pixels) \
188 blt_rotated_270_trivial_##suffix(dst + w, \
189 dst_stride, \
190 src - (trailing_pixels * src_stride), \
191 src_stride, \
192 trailing_pixels, \
193 h); \
194 }
195
196FAST_SIMPLE_ROTATE(8888, DATA8)
197#endif
198
199
200#ifdef BUILD_CONVERT_32_RGB_8888
201#ifdef BUILD_CONVERT_32_RGB_ROT270
202void
203evas_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__)
204{
205#ifdef TILE_ROTATE
206 blt_rotated_270_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ;
207#else
208 DATA32 *src_ptr;
209 DATA32 *dst_ptr;
210 int x, y;
211
212 dst_ptr = (DATA32 *)dst;
213
214 CONVERT_LOOP_START_ROT_270();
215
216 *dst_ptr = *src_ptr;
217
218 CONVERT_LOOP_END_ROT_270();
219#endif
220 return;
221}
222#endif
223#endif
224
225#ifdef BUILD_CONVERT_32_RGB_8888
226#ifdef BUILD_CONVERT_32_RGB_ROT90
227void
228evas_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__)
229{
230# ifndef BUILD_NEON
231# ifdef TILE_ROTATE
232 blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ;
233# else
234 DATA32 *src_ptr;
235 DATA32 *dst_ptr;
236 int x, y;
237
238 dst_ptr = (DATA32 *)dst;
239 CONVERT_LOOP_START_ROT_90();
240
241 *dst_ptr = *src_ptr;
242
243 CONVERT_LOOP_END_ROT_90();
244# endif
245
246# else
247
248# ifdef TILE_ROTATE
249 blt_rotated_90_8888((DATA8 *)dst, dst_jump+w, (const DATA8 *)src, src_jump+h, w, h) ;
250# else
251 if ((w & 1) || (h & 1))
252 {
253 /* Rarely (if ever) if ever: so slow path is fine */
254 DATA32 *src_ptr;
255 DATA32 *dst_ptr;
256 int x, y;
257
258 dst_ptr = (DATA32 *)dst;
259 CONVERT_LOOP_START_ROT_90();
260
261 *dst_ptr = *src_ptr;
262
263 CONVERT_LOOP_END_ROT_90();
264 }
265 else
266 {
267# define AP "convert_rgba32_rot_90_"
268 asm volatile (
269 ".fpu neon \n\t"
270 " mov %[s1], %[src] \n\t"
271 " add %[s1], %[s1], %[h],lsl #2 \n\t"
272 " sub %[s1], #8 \n\t"
273
274 " mov %[s2], %[src] \n\t"
275 " add %[s2], %[s2], %[h], lsl #3 \n\t"
276 " add %[s2], %[s2], %[sjmp], lsr #1 \n\t"
277 " sub %[s2], #8 \n\t"
278
279 " mov %[d1], %[dst] \n\t"
280
281 " add %[d2], %[d1], %[djmp] \n\t"
282 " add %[d2], %[d2], %[w], lsl #2 \n\t"
283
284 " mov %[sadv], %[h], lsl #3 \n\t"
285 " add %[sadv], %[sadv], %[sjmp], lsl #1\n\t"
286
287 " mov %[y], #0 \n\t"
288 " mov %[x], #0 \n\t"
289 AP"loop: \n\t"
290 " vld1.u32 d0, [%[s1]] \n\t"
291 " vld1.u32 d1, [%[s2]] \n\t"
292 " add %[x], #2 \n\t"
293 " add %[s1], %[sadv] \n\t"
294 " add %[s2], %[sadv] \n\t"
295 " vtrn.u32 d0, d1 \n\t"
296 " cmp %[x], %[w] \n\t"
297 " vst1.u32 d1, [%[d1]]! \n\t"
298 " vst1.u32 d0, [%[d2]]! \n\t"
299 " blt "AP"loop \n\t"
300
301 " mov %[x], #0 \n\t"
302 " add %[d1], %[djmp] \n\t"
303 " add %[d1], %[d1], %[w], lsl #2 \n\t"
304 " add %[d2], %[djmp] \n\t"
305 " add %[d2], %[d2], %[w], lsl #2 \n\t"
306
307 " mov %[s1], %[src] \n\t"
308 " add %[s1], %[s1], %[h], lsl #2 \n\t"
309 " sub %[s1], %[s1], %[y], lsl #2 \n\t"
310 " sub %[s1], #16 \n\t"
311
312 " add %[s2], %[s1], %[h], lsl #2 \n\t"
313 " add %[s2], %[s2], %[sjmp], lsl #2 \n\t"
314
315 " add %[y], #2 \n\t"
316
317 " cmp %[y], %[h] \n\t"
318 " blt "AP"loop \n\t"
319
320 : // Out
321 : [s1] "r" (1),
322 [s2] "r" (11),
323 [d1] "r" (2),
324 [d2] "r" (12),
325 [src] "r" (src),
326 [dst] "r" (dst),
327 [x] "r" (3),
328 [y] "r" (4),
329 [w] "r" (w),
330 [h] "r" (h),
331 [sadv] "r" (5),
332 [sjmp] "r" (src_jump * 4),
333 [djmp] "r" (dst_jump * 4 * 2)
334 : "d0", "d1", "memory", "cc"// Clober
335
336
337 );
338 }
339# undef AP
340# endif
341# endif
342 return;
343}
344#endif
345#endif
346
347#ifdef BUILD_CONVERT_32_RGBX_8888
348#ifdef BUILD_CONVERT_32_RGB_ROT0
349void
350evas_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__)
351{
352 DATA32 *src_ptr;
353 DATA32 *dst_ptr;
354 int x, y;
355
356 dst_ptr = (DATA32 *)dst;
357
358 CONVERT_LOOP_START_ROT_0();
359
360// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
361 *dst_ptr = (*src_ptr << 8);
362
363 CONVERT_LOOP_END_ROT_0();
364 return;
365}
366#endif
367#endif
368
369#ifdef BUILD_CONVERT_32_RGBX_8888
370#ifdef BUILD_CONVERT_32_RGB_ROT180
371void
372evas_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__)
373{
374 DATA32 *src_ptr;
375 DATA32 *dst_ptr;
376 int x, y;
377
378 dst_ptr = (DATA32 *)dst;
379
380 CONVERT_LOOP_START_ROT_180();
381
382// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
383 *dst_ptr = (*src_ptr << 8);
384
385 CONVERT_LOOP_END_ROT_180();
386 return;
387}
388#endif
389#endif
390
391#ifdef BUILD_CONVERT_32_RGBX_8888
392#ifdef BUILD_CONVERT_32_RGB_ROT270
393void
394evas_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__)
395{
396 DATA32 *src_ptr;
397 DATA32 *dst_ptr;
398 int x, y;
399
400 dst_ptr = (DATA32 *)dst;
401
402 CONVERT_LOOP_START_ROT_270();
403
404// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
405 *dst_ptr = (*src_ptr << 8);
406
407 CONVERT_LOOP_END_ROT_270();
408 return;
409}
410#endif
411#endif
412
413#ifdef BUILD_CONVERT_32_RGBX_8888
414#ifdef BUILD_CONVERT_32_RGB_ROT90
415void
416evas_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__)
417{
418 DATA32 *src_ptr;
419 DATA32 *dst_ptr;
420 int x, y;
421
422 dst_ptr = (DATA32 *)dst;
423
424 CONVERT_LOOP_START_ROT_90();
425
426// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
427 *dst_ptr = (*src_ptr << 8);
428
429 CONVERT_LOOP_END_ROT_90();
430 return;
431}
432#endif
433#endif
434
435#ifdef BUILD_CONVERT_32_BGR_8888
436#ifdef BUILD_CONVERT_32_RGB_ROT0
437void
438evas_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__)
439{
440 DATA32 *src_ptr;
441 DATA32 *dst_ptr;
442 int x, y;
443
444 dst_ptr = (DATA32 *)dst;
445
446 CONVERT_LOOP_START_ROT_0();
447
448 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
449
450 CONVERT_LOOP_END_ROT_0();
451 return;
452}
453#endif
454#endif
455
456#ifdef BUILD_CONVERT_32_BGR_8888
457#ifdef BUILD_CONVERT_32_RGB_ROT180
458void
459evas_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__)
460{
461 DATA32 *src_ptr;
462 DATA32 *dst_ptr;
463 int x, y;
464
465 dst_ptr = (DATA32 *)dst;
466
467 CONVERT_LOOP_START_ROT_180();
468
469 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
470
471 CONVERT_LOOP_END_ROT_180();
472 return;
473}
474#endif
475#endif
476
477#ifdef BUILD_CONVERT_32_BGR_8888
478#ifdef BUILD_CONVERT_32_RGB_ROT270
479void
480evas_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__)
481{
482 DATA32 *src_ptr;
483 DATA32 *dst_ptr;
484 int x, y;
485
486 dst_ptr = (DATA32 *)dst;
487
488 CONVERT_LOOP_START_ROT_270();
489
490 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
491
492 CONVERT_LOOP_END_ROT_270();
493 return;
494}
495#endif
496#endif
497
498#ifdef BUILD_CONVERT_32_BGR_8888
499#ifdef BUILD_CONVERT_32_RGB_ROT90
500void
501evas_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__)
502{
503 DATA32 *src_ptr;
504 DATA32 *dst_ptr;
505 int x, y;
506
507 dst_ptr = (DATA32 *)dst;
508
509 CONVERT_LOOP_START_ROT_90();
510
511 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
512
513 CONVERT_LOOP_END_ROT_90();
514 return;
515}
516#endif
517#endif
518
519#ifdef BUILD_CONVERT_32_BGRX_8888
520#ifdef BUILD_CONVERT_32_RGB_ROT0
521void
522evas_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__)
523{
524 DATA32 *src_ptr;
525 DATA32 *dst_ptr;
526 int x, y;
527
528 dst_ptr = (DATA32 *)dst;
529
530 CONVERT_LOOP_START_ROT_0();
531
532 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
533
534 CONVERT_LOOP_END_ROT_0();
535 return;
536}
537#endif
538#endif
539
540#ifdef BUILD_CONVERT_32_BGRX_8888
541#ifdef BUILD_CONVERT_32_RGB_ROT180
542void
543evas_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__)
544{
545 DATA32 *src_ptr;
546 DATA32 *dst_ptr;
547 int x, y;
548
549 dst_ptr = (DATA32 *)dst;
550
551 CONVERT_LOOP_START_ROT_180();
552
553 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
554
555 CONVERT_LOOP_END_ROT_180();
556 return;
557}
558#endif
559#endif
560
561#ifdef BUILD_CONVERT_32_BGRX_8888
562#ifdef BUILD_CONVERT_32_RGB_ROT270
563void
564evas_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__)
565{
566 DATA32 *src_ptr;
567 DATA32 *dst_ptr;
568 int x, y;
569
570 dst_ptr = (DATA32 *)dst;
571
572 CONVERT_LOOP_START_ROT_270();
573
574 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
575
576 CONVERT_LOOP_END_ROT_270();
577 return;
578}
579#endif
580#endif
581
582#ifdef BUILD_CONVERT_32_BGRX_8888
583#ifdef BUILD_CONVERT_32_RGB_ROT90
584void
585evas_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__)
586{
587 DATA32 *src_ptr;
588 DATA32 *dst_ptr;
589 int x, y;
590
591 dst_ptr = (DATA32 *)dst;
592
593 CONVERT_LOOP_START_ROT_90();
594
595 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
596
597 CONVERT_LOOP_END_ROT_90();
598 return;
599}
600#endif
601#endif
602
603#ifdef BUILD_CONVERT_32_RGB_666
604#ifdef BUILD_CONVERT_32_RGB_ROT0
605void
606evas_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__)
607{
608 DATA32 *src_ptr;
609 DATA32 *dst_ptr;
610 int x, y;
611
612 dst_ptr = (DATA32 *)dst;
613
614 CONVERT_LOOP_START_ROT_0();
615
616 *dst_ptr =
617 (((R_VAL(src_ptr) << 12) | (B_VAL(src_ptr) >> 2)) & 0x03f03f) |
618 ((G_VAL(src_ptr) << 4) & 0x000fc0);
619
620 CONVERT_LOOP_END_ROT_0();
621 return;
622}
623#endif
624#endif
625
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 @@
1#ifndef _EVAS_CONVERT_RGB_32_H
2#define _EVAS_CONVERT_RGB_32_H
3
4
5void 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);
6void 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);
7void 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);
8void 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);
9void 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);
10void 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);
11void 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);
12void 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);
13void 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);
14void 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);
15void 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);
16void 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);
17void 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);
18void 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);
19void 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);
20void 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);
21
22void 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);
23
24#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 @@
1#include "evas_common.h"
2#include "evas_convert_rgb_8.h"
3
4#ifdef USE_DITHER_44
5extern const DATA8 _evas_dither_44[4][4];
6#endif
7#ifdef USE_DITHER_128128
8extern const DATA8 _evas_dither_128128[128][128];
9#endif
10
11#ifdef BUILD_CONVERT_8_RGB_332
12void 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)
13{
14 DATA32 *src_ptr;
15 DATA8 *dst_ptr;
16 int x, y;
17 DATA8 r, g, b;
18 DATA8 dith, dith2;
19
20 dst_ptr = (DATA8 *)dst;
21
22 CONVERT_LOOP_START_ROT_0();
23
24 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3);
25 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
26/* r = (R_VAL(src_ptr)) >> (8 - 3);*/
27/* g = (G_VAL(src_ptr)) >> (8 - 3);*/
28/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
29/* if (((R_VAL(src_ptr) - (r << (8 - 3))) >= dith ) && (r < 0x07)) r++;*/
30/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/
31/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/
32 r = (R_VAL(src_ptr)) * 7 / 255;
33 if (((R_VAL(src_ptr) - (r * 255 / 7)) >= dith ) && (r < 0x07)) r++;
34 g = (G_VAL(src_ptr)) * 7 / 255;
35 if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++;
36 b = (B_VAL(src_ptr)) * 3 / 255;
37 if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++;
38
39 *dst_ptr = pal[(r << 5) | (g << 2) | (b)];
40
41 CONVERT_LOOP_END_ROT_0();
42}
43#endif
44#ifdef BUILD_CONVERT_8_RGB_666
45static DATA8 p_to_6[256];
46static DATA8 p_to_6_err[256];
47
48void 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)
49{
50 DATA32 *src_ptr;
51 DATA8 *dst_ptr;
52 int x, y;
53 DATA8 r, g, b;
54 DATA8 dith;
55 static int tables_calcualted = 0;
56
57 if (!tables_calcualted)
58 {
59 int i;
60
61 tables_calcualted = 1;
62 for (i = 0; i < 256; i++)
63 p_to_6[i] = (i * 5) / 255;
64 for (i = 0; i < 256; i++)
65 p_to_6_err[i] = ((i * 5) - (p_to_6[i] * 255)) * DM_DIV / 255;
66 }
67 dst_ptr = (DATA8 *)dst;
68
69 CONVERT_LOOP_START_ROT_0();
70
71 r = p_to_6[(R_VAL(src_ptr))];
72 g = p_to_6[(G_VAL(src_ptr))];
73 b = p_to_6[(B_VAL(src_ptr))];
74 dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK];
75 if ((p_to_6_err[(R_VAL(src_ptr))] >= dith ) && (r < 5)) r++;
76 if ((p_to_6_err[(G_VAL(src_ptr))] >= dith ) && (g < 5)) g++;
77 if ((p_to_6_err[(B_VAL(src_ptr))] >= dith ) && (b < 5)) b++;
78
79 *dst_ptr = pal[(r * 36) + (g * 6) + (b)];
80
81 CONVERT_LOOP_END_ROT_0();
82}
83#endif
84#ifdef BUILD_CONVERT_8_RGB_232
85void 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)
86{
87 DATA32 *src_ptr;
88 DATA8 *dst_ptr;
89 int x, y;
90 DATA8 r, g, b;
91 DATA8 dith, dith2;
92
93 dst_ptr = (DATA8 *)dst;
94
95 CONVERT_LOOP_START_ROT_0();
96
97 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3);
98 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
99/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
100/* g = (G_VAL(src_ptr)) >> (8 - 3);*/
101/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
102/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith2) && (r < 0x03)) r++;*/
103/* if (((G_VAL(src_ptr) - (g << (8 - 3))) >= dith ) && (g < 0x07)) g++;*/
104/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith2) && (b < 0x03)) b++;*/
105 r = (R_VAL(src_ptr)) * 3 / 255;
106 if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith2) && (r < 0x03)) r++;
107 g = (G_VAL(src_ptr)) * 7 / 255;
108 if (((G_VAL(src_ptr) - (g * 255 / 7)) >= dith ) && (g < 0x07)) g++;
109 b = (B_VAL(src_ptr)) * 3 / 255;
110 if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith2) && (b < 0x03)) b++;
111
112 *dst_ptr = pal[(r << 5) | (g << 2) | (b)];
113
114 CONVERT_LOOP_END_ROT_0();
115}
116#endif
117#ifdef BUILD_CONVERT_8_RGB_222
118void 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)
119{
120 DATA32 *src_ptr;
121 DATA8 *dst_ptr;
122 int x, y;
123 DATA8 r, g, b;
124 DATA8 dith;
125
126 dst_ptr = (DATA8 *)dst;
127
128 CONVERT_LOOP_START_ROT_0();
129
130 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
131/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
132/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
133/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
134/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/
135/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/
136/* if (((B_VAL(src_ptr) - (b << (8 - 2))) >= dith ) && (b < 0x03)) b++;*/
137 r = (R_VAL(src_ptr)) * 3 / 255;
138 if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++;
139 g = (G_VAL(src_ptr)) * 3 / 255;
140 if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++;
141 b = (B_VAL(src_ptr)) * 3 / 255;
142 if (((B_VAL(src_ptr) - (b * 255 / 3)) >= dith ) && (b < 0x03)) b++;
143
144 *dst_ptr = pal[(r << 4) | (g << 2) | (b)];
145
146 CONVERT_LOOP_END_ROT_0();
147}
148#endif
149#ifdef BUILD_CONVERT_8_RGB_221
150void 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)
151{
152 DATA32 *src_ptr;
153 DATA8 *dst_ptr;
154 int x, y;
155 DATA8 r, g, b;
156 DATA8 dith, dith2;
157
158 dst_ptr = (DATA8 *)dst;
159
160 CONVERT_LOOP_START_ROT_0();
161
162 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
163 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
164/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
165/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
166/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
167/* if (((R_VAL(src_ptr) - (r << (8 - 2))) >= dith ) && (r < 0x03)) r++;*/
168/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/
169/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/
170 r = (R_VAL(src_ptr)) * 3 / 255;
171 if (((R_VAL(src_ptr) - (r * 255 / 3)) >= dith ) && (r < 0x03)) r++;
172 g = (G_VAL(src_ptr)) * 3 / 255;
173 if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++;
174 b = (B_VAL(src_ptr)) * 1 / 255;
175 if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++;
176
177 *dst_ptr = pal[(r << 3) | (g << 1) | (b)];
178
179 CONVERT_LOOP_END_ROT_0();
180}
181#endif
182#ifdef BUILD_CONVERT_8_RGB_121
183void 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)
184{
185 DATA32 *src_ptr;
186 DATA8 *dst_ptr;
187 int x, y;
188 DATA8 r, g, b;
189 DATA8 dith, dith2;
190
191 dst_ptr = (DATA8 *)dst;
192
193 CONVERT_LOOP_START_ROT_0();
194
195 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
196 dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
197/* r = (R_VAL(src_ptr)) >> (8 - 1);*/
198/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
199/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
200/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith2) && (r < 0x01)) r++;*/
201/* if (((G_VAL(src_ptr) - (g << (8 - 2))) >= dith ) && (g < 0x03)) g++;*/
202/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith2) && (b < 0x01)) b++;*/
203
204 r = (R_VAL(src_ptr)) * 1 / 255;
205 if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith2) && (r < 0x01)) r++;
206 g = (G_VAL(src_ptr)) * 3 / 255;
207 if (((G_VAL(src_ptr) - (g * 255 / 3)) >= dith ) && (g < 0x03)) g++;
208 b = (B_VAL(src_ptr)) * 1 / 255;
209 if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith2) && (b < 0x01)) b++;
210
211 *dst_ptr = pal[(r << 3) | (g << 1) | (b)];
212
213 CONVERT_LOOP_END_ROT_0();
214}
215#endif
216#ifdef BUILD_CONVERT_8_RGB_111
217void 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)
218{
219 DATA32 *src_ptr;
220 DATA8 *dst_ptr;
221 int x, y;
222 DATA8 r, g, b;
223 DATA8 dith;
224
225 dst_ptr = (DATA8 *)dst;
226
227 CONVERT_LOOP_START_ROT_0();
228
229 dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
230/* r = (R_VAL(src_ptr)) >> (8 - 1);*/
231/* g = (G_VAL(src_ptr)) >> (8 - 1);*/
232/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
233/* if (((R_VAL(src_ptr) - (r << (8 - 1))) >= dith ) && (r < 0x01)) r++;*/
234/* if (((G_VAL(src_ptr) - (g << (8 - 1))) >= dith ) && (g < 0x01)) g++;*/
235/* if (((B_VAL(src_ptr) - (b << (8 - 1))) >= dith ) && (b < 0x01)) b++;*/
236
237 r = (R_VAL(src_ptr)) * 1 / 255;
238 if (((R_VAL(src_ptr) - (r * 255 / 1)) >= dith ) && (r < 0x01)) r++;
239 g = (G_VAL(src_ptr)) * 1 / 255;
240 if (((G_VAL(src_ptr) - (g * 255 / 1)) >= dith ) && (g < 0x01)) g++;
241 b = (B_VAL(src_ptr)) * 1 / 255;
242 if (((B_VAL(src_ptr) - (b * 255 / 1)) >= dith ) && (b < 0x01)) b++;
243
244 *dst_ptr = pal[(r << 2) | (g << 1) | (b)];
245
246 CONVERT_LOOP_END_ROT_0();
247}
248#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 @@
1#ifndef _EVAS_CONVERT_RGB_8_H
2#define _EVAS_CONVERT_RGB_8_H
3
4
5void 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);
6void 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);
7void 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);
8void 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);
9void 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);
10void 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);
11void 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);
12
13
14#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 @@
1#include "evas_common.h"
2#include "evas_convert_yuv.h"
3
4#if defined BUILD_MMX || defined BUILD_SSE
5# include "evas_mmx.h"
6#endif
7
8#if defined HAVE_ALTIVEC_H
9# include <altivec.h>
10#ifdef CONFIG_DARWIN
11#define AVV(x...) (x)
12#else
13#define AVV(x...) {x}
14#endif
15
16#endif
17
18#ifdef BUILD_CONVERT_YUV
19
20static void _evas_yuv_init (void);
21static void _evas_yv12torgb_sse (unsigned char **yuv, unsigned char *rgb, int w, int h);
22static void _evas_yv12torgb_mmx (unsigned char **yuv, unsigned char *rgb, int w, int h);
23#ifdef BUILD_ALTIVEC
24static void _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h);
25static void _evas_yv12torgb_diz (unsigned char **yuv, unsigned char *rgb, int w, int h);
26#endif
27static void _evas_yv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h);
28static void _evas_yuy2torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h);
29static void _evas_nv12torgb_raster (unsigned char **yuv, unsigned char *rgb, int w, int h);
30static void _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h);
31
32#define CRV 104595
33#define CBU 132251
34#define CGU 25624
35#define CGV 53280
36#define YMUL 76283
37#define OFF 32768
38#define BITRES 16
39
40/* calculation float resolution in bits */
41/* ie RES = 6 is 10.6 fixed point */
42/* RES = 8 is 8.8 fixed point */
43/* RES = 4 is 12.4 fixed point */
44/* NB: going above 6 will lead to overflow... :( */
45#define RES 6
46
47#define RZ(i) (i >> (BITRES - RES))
48#define FOUR(i) {i, i, i, i}
49
50#if defined BUILD_MMX || defined BUILD_SSE
51__attribute__ ((aligned (8))) const volatile unsigned short _const_crvcrv[4] = FOUR(RZ(CRV));
52__attribute__ ((aligned (8))) const volatile unsigned short _const_cbucbu[4] = FOUR(RZ(CBU));
53__attribute__ ((aligned (8))) const volatile unsigned short _const_cgucgu[4] = FOUR(RZ(CGU));
54__attribute__ ((aligned (8))) const volatile unsigned short _const_cgvcgv[4] = FOUR(RZ(CGV));
55__attribute__ ((aligned (8))) const volatile unsigned short _const_ymul [4] = FOUR(RZ(YMUL));
56__attribute__ ((aligned (8))) const volatile unsigned short _const_128 [4] = FOUR(128);
57__attribute__ ((aligned (8))) const volatile unsigned short _const_32 [4] = FOUR(RZ(OFF));
58__attribute__ ((aligned (8))) const volatile unsigned short _const_16 [4] = FOUR(16);
59__attribute__ ((aligned (8))) const volatile unsigned short _const_ff [4] = FOUR(-1);
60
61#define CONST_CRVCRV *_const_crvcrv
62#define CONST_CBUCBU *_const_cbucbu
63#define CONST_CGUCGU *_const_cgucgu
64#define CONST_CGVCGV *_const_cgvcgv
65#define CONST_YMUL *_const_ymul
66#define CONST_128 *_const_128
67#define CONST_32 *_const_32
68#define CONST_16 *_const_16
69#define CONST_FF *_const_ff
70
71/* for C non aligned cleanup */
72const int _crv = RZ(CRV); /* 1.596 */
73const int _cbu = RZ(CBU); /* 2.018 */
74const int _cgu = RZ(CGU); /* 0.391 */
75const int _cgv = RZ(CGV); /* 0.813 */
76
77#endif
78
79#ifdef BUILD_ALTIVEC
80#ifdef __VEC__
81const vector unsigned short res = AVV(RES);
82const vector signed short crv = AVV(RZ(CRV));
83const vector signed short cbu = AVV(RZ(CBU));
84const vector signed short cgu = AVV(RZ(CGU));
85const vector signed short cgv = AVV(RZ(CGV));
86const vector signed short ymul = AVV(RZ(YMUL));
87const vector signed short c128 = AVV(128);
88const vector signed short c32 = AVV(RZ(OFF));
89const vector signed short c16 = AVV(16);
90const vector unsigned char zero = AVV(0);
91const vector signed short maxchar = AVV(255);
92const vector unsigned char pickrg1 = AVV(0, 0x1, 0x11, 0,
93 0, 0x3, 0x13, 0,
94 0, 0x5, 0x15, 0,
95 0, 0x7, 0x17, 0);
96const vector unsigned char pickrg2 = AVV(0, 0x9, 0x19, 0,
97 0, 0xb, 0x1b, 0,
98 0, 0xd, 0x1d, 0,
99 0, 0xf, 0x1f, 0);
100const vector unsigned char pickrgb1 = AVV(0x3, 0x1, 0x2, 0x11,
101 0x7, 0x5, 0x6, 0x13,
102 0xb, 0x9, 0xa, 0x15,
103 0xf, 0xd, 0xe, 0x17);
104const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19,
105 0x7, 0x5, 0x6, 0x1b,
106 0xb, 0x9, 0xa, 0x1d,
107 0xf, 0xd, 0xe, 0x1f);
108#endif
109#endif
110
111#ifdef BUILD_C
112
113/* shortcut speedup lookup-tables */
114static short _v1164[256];
115static short _v1596[256];
116static short _v813[256];
117static short _v391[256];
118static short _v2018[256];
119
120static unsigned char _clip_lut[1024];
121#define LUT_CLIP(i) ((_clip_lut+384)[(i)])
122
123#define CMP_CLIP(i) ((i&256)? (~(i>>10)) : i);
124
125static int initted = 0;
126
127#endif
128
129void
130evas_common_convert_yuv_420p_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
131{
132 int mmx, sse, sse2;
133
134#if defined BUILD_MMX || defined BUILD_SSE
135 evas_common_cpu_can_do(&mmx, &sse, &sse2);
136#endif
137#ifndef BUILD_SSE
138 sse = 0;
139 sse2 = 0;
140#endif
141#ifndef BUILD_MMX
142 mmx = 0;
143#endif
144 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX2))
145 _evas_yv12torgb_sse(src, dst, w, h);
146 else if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
147 _evas_yv12torgb_mmx(src, dst, w, h);
148#ifdef BUILD_ALTIVEC
149 if (evas_common_cpu_has_feature(CPU_FEATURE_ALTIVEC))
150 _evas_yv12torgb_altivec(src, dst, w, h);
151#endif
152 else
153 {
154#ifdef BUILD_C
155 if (!initted) _evas_yuv_init();
156 initted = 1;
157 /* FIXME: diz may be faster sometimes */
158 _evas_yv12torgb_raster(src, dst, w, h);
159#endif
160 }
161}
162
163/* Thanks to Diz for this code. i've munged it a little and turned it into */
164/* inline macros. I tried beating it with a different algorithm using MMX */
165/* but failed. So here we are. This is the fastest YUV->RGB i know of for */
166/* x86. It has an issue that it doesn't convert colours accurately so the */
167/* image looks a little "yellowy". This is a result of only 10.6 fixed point */
168/* resolution as opposed to 16.16 in the C code. This could be fixed by */
169/* processing half the number of pixels per cycle and going up to 32bits */
170/* per element during compute, but it would all but negate the speedup */
171/* from mmx I think :( It might be possible to use SSE and SSE2 here, but */
172/* I haven't tried yet. Let's see. */
173
174/* NB: XviD has almost the same code in it's assembly YV12->RGB code. same */
175/* algorithm, same constants, same all over actually, except it actually */
176/* does a few extra memory accesses that this one doesn't, so in theory */
177/* this code should be faster. In the end it's all just an mmx version of */
178/* the reference implimentation done with fixed point math */
179
180static void
181_evas_yv12torgb_sse(unsigned char **yuv, unsigned char *rgb, int w, int h)
182{
183#ifdef BUILD_SSE
184 int xx, yy;
185 register unsigned char *yp1, *up, *vp;
186 unsigned char *dp1;
187
188 /* destination pointers */
189 dp1 = rgb;
190
191 for (yy = 0; yy < h; yy++)
192 {
193 /* plane pointers */
194 yp1 = yuv[yy];
195 up = yuv[h + (yy / 2)];
196 vp = yuv[h + (h / 2) + (yy / 2)];
197 for (xx = 0; xx < (w - 7); xx += 8)
198 {
199 movd_m2r(*up, mm3);
200 movd_m2r(*vp, mm2);
201 movq_m2r(*yp1, mm0);
202
203 pxor_r2r(mm7, mm7);
204 punpcklbw_r2r(mm7, mm2);
205 punpcklbw_r2r(mm7, mm3);
206
207 movq_r2r(mm0, mm1);
208 psrlw_i2r(8, mm0);
209 psllw_i2r(8, mm1);
210 psrlw_i2r(8, mm1);
211
212 movq_m2r(CONST_16, mm4);
213 psubsw_r2r(mm4, mm0);
214 psubsw_r2r(mm4, mm1);
215
216 movq_m2r(CONST_128, mm5);
217 psubsw_r2r(mm5, mm2);
218 psubsw_r2r(mm5, mm3);
219
220 movq_m2r(CONST_YMUL, mm4);
221 pmullw_r2r(mm4, mm0);
222 pmullw_r2r(mm4, mm1);
223
224 movq_m2r(CONST_CRVCRV, mm7);
225 pmullw_r2r(mm3, mm7);
226 movq_m2r(CONST_CBUCBU, mm6);
227 pmullw_r2r(mm2, mm6);
228 movq_m2r(CONST_CGUCGU, mm5);
229 pmullw_r2r(mm2, mm5);
230 movq_m2r(CONST_CGVCGV, mm4);
231 pmullw_r2r(mm3, mm4);
232
233 movq_r2r(mm0, mm2);
234 paddsw_r2r(mm7, mm2);
235 paddsw_r2r(mm1, mm7);
236
237 psraw_i2r(RES, mm2);
238 psraw_i2r(RES, mm7);
239 packuswb_r2r(mm7, mm2);
240
241 pxor_r2r(mm7, mm7);
242 movq_r2r(mm2, mm3);
243 punpckhbw_r2r(mm7, mm2);
244 punpcklbw_r2r(mm3, mm7);
245 por_r2r(mm7, mm2);
246
247 movq_r2r(mm0, mm3);
248 psubsw_r2r(mm5, mm3);
249 psubsw_r2r(mm4, mm3);
250 paddsw_m2r(CONST_32, mm3);
251
252 movq_r2r(mm1, mm7);
253 psubsw_r2r(mm5, mm7);
254 psubsw_r2r(mm4, mm7);
255 paddsw_m2r(CONST_32, mm7);
256
257 psraw_i2r(RES, mm3);
258 psraw_i2r(RES, mm7);
259 packuswb_r2r(mm7, mm3);
260
261 pxor_r2r(mm7, mm7);
262 movq_r2r(mm3, mm4);
263 punpckhbw_r2r(mm7, mm3);
264 punpcklbw_r2r(mm4, mm7);
265 por_r2r(mm7, mm3);
266
267 movq_m2r(CONST_32, mm4);
268 paddsw_r2r(mm6, mm0);
269 paddsw_r2r(mm6, mm1);
270 paddsw_r2r(mm4, mm0);
271 paddsw_r2r(mm4, mm1);
272 psraw_i2r(RES, mm0);
273 psraw_i2r(RES, mm1);
274 packuswb_r2r(mm1, mm0);
275
276 pxor_r2r(mm7, mm7);
277 movq_r2r(mm0, mm5);
278 punpckhbw_r2r(mm7, mm0);
279 punpcklbw_r2r(mm5, mm7);
280 por_r2r(mm7, mm0);
281
282 movq_m2r(CONST_FF, mm1);
283 movq_r2r(mm0, mm5);
284 movq_r2r(mm3, mm6);
285 movq_r2r(mm2, mm7);
286 punpckhbw_r2r(mm3, mm2);
287 punpcklbw_r2r(mm6, mm7);
288 punpckhbw_r2r(mm1, mm0);
289 punpcklbw_r2r(mm1, mm5);
290
291 movq_r2r(mm7, mm1);
292 punpckhwd_r2r(mm5, mm7);
293 punpcklwd_r2r(mm5, mm1);
294
295 movq_r2r(mm2, mm4);
296 punpckhwd_r2r(mm0, mm2);
297 punpcklwd_r2r(mm0, mm4);
298
299 movntq_r2m(mm1, *(dp1));
300 movntq_r2m(mm7, *(dp1 + 8));
301 movntq_r2m(mm4, *(dp1 + 16));
302 movntq_r2m(mm2, *(dp1 + 24));
303
304 yp1 += 8;
305 up += 4;
306 vp += 4;
307 dp1 += 8 * 4;
308 }
309 /* cleanup pixles that arent a multiple of 8 pixels wide */
310 if (xx < w)
311 {
312 int y, u, v, r, g, b;
313
314 for (; xx < w; xx += 2)
315 {
316 u = (*up++) - 128;
317 v = (*vp++) - 128;
318
319 y = RZ(YMUL) * ((*yp1++) - 16);
320 r = LUT_CLIP((y + (_crv * v)) >> RES);
321 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
322 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
323 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
324
325 dp1 += 4;
326
327 y = RZ(YMUL) * ((*yp1++) - 16);
328 r = LUT_CLIP((y + (_crv * v)) >> RES);
329 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
330 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
331 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
332
333 dp1 += 4;
334 }
335 }
336 }
337 emms();
338#else
339 _evas_yv12torgb_mmx(yuv, rgb, w, h);
340#endif
341}
342
343static void
344_evas_yv12torgb_mmx(unsigned char **yuv, unsigned char *rgb, int w, int h)
345{
346#ifdef BUILD_MMX
347 int xx, yy;
348 register unsigned char *yp1, *up, *vp;
349 unsigned char *dp1;
350
351 /* destination pointers */
352 dp1 = rgb;
353
354 for (yy = 0; yy < h; yy++)
355 {
356 /* plane pointers */
357 yp1 = yuv[yy];
358 up = yuv[h + (yy / 2)];
359 vp = yuv[h + (h / 2) + (yy / 2)];
360 for (xx = 0; xx < (w - 7); xx += 8)
361 {
362 movd_m2r(*up, mm3);
363 movd_m2r(*vp, mm2);
364 movq_m2r(*yp1, mm0);
365
366 pxor_r2r(mm7, mm7);
367 punpcklbw_r2r(mm7, mm2);
368 punpcklbw_r2r(mm7, mm3);
369
370 movq_r2r(mm0, mm1);
371 psrlw_i2r(8, mm0);
372 psllw_i2r(8, mm1);
373 psrlw_i2r(8, mm1);
374
375 movq_m2r(CONST_16, mm4);
376 psubsw_r2r(mm4, mm0);
377 psubsw_r2r(mm4, mm1);
378
379 movq_m2r(CONST_128, mm5);
380 psubsw_r2r(mm5, mm2);
381 psubsw_r2r(mm5, mm3);
382
383 movq_m2r(CONST_YMUL, mm4);
384 pmullw_r2r(mm4, mm0);
385 pmullw_r2r(mm4, mm1);
386
387 movq_m2r(CONST_CRVCRV, mm7);
388 pmullw_r2r(mm3, mm7);
389 movq_m2r(CONST_CBUCBU, mm6);
390 pmullw_r2r(mm2, mm6);
391 movq_m2r(CONST_CGUCGU, mm5);
392 pmullw_r2r(mm2, mm5);
393 movq_m2r(CONST_CGVCGV, mm4);
394 pmullw_r2r(mm3, mm4);
395
396 movq_r2r(mm0, mm2);
397 paddsw_r2r(mm7, mm2);
398 paddsw_r2r(mm1, mm7);
399
400 psraw_i2r(RES, mm2);
401 psraw_i2r(RES, mm7);
402 packuswb_r2r(mm7, mm2);
403
404 pxor_r2r(mm7, mm7);
405 movq_r2r(mm2, mm3);
406 punpckhbw_r2r(mm7, mm2);
407 punpcklbw_r2r(mm3, mm7);
408 por_r2r(mm7, mm2);
409
410 movq_r2r(mm0, mm3);
411 psubsw_r2r(mm5, mm3);
412 psubsw_r2r(mm4, mm3);
413 paddsw_m2r(CONST_32, mm3);
414
415 movq_r2r(mm1, mm7);
416 psubsw_r2r(mm5, mm7);
417 psubsw_r2r(mm4, mm7);
418 paddsw_m2r(CONST_32, mm7);
419
420 psraw_i2r(RES, mm3);
421 psraw_i2r(RES, mm7);
422 packuswb_r2r(mm7, mm3);
423
424 pxor_r2r(mm7, mm7);
425 movq_r2r(mm3, mm4);
426 punpckhbw_r2r(mm7, mm3);
427 punpcklbw_r2r(mm4, mm7);
428 por_r2r(mm7, mm3);
429
430 movq_m2r(CONST_32, mm4);
431 paddsw_r2r(mm6, mm0);
432 paddsw_r2r(mm6, mm1);
433 paddsw_r2r(mm4, mm0);
434 paddsw_r2r(mm4, mm1);
435 psraw_i2r(RES, mm0);
436 psraw_i2r(RES, mm1);
437 packuswb_r2r(mm1, mm0);
438
439 pxor_r2r(mm7, mm7);
440 movq_r2r(mm0, mm5);
441 punpckhbw_r2r(mm7, mm0);
442 punpcklbw_r2r(mm5, mm7);
443 por_r2r(mm7, mm0);
444
445 movq_m2r(CONST_FF, mm1);
446 movq_r2r(mm0, mm5);
447 movq_r2r(mm3, mm6);
448 movq_r2r(mm2, mm7);
449 punpckhbw_r2r(mm3, mm2);
450 punpcklbw_r2r(mm6, mm7);
451 punpckhbw_r2r(mm1, mm0);
452 punpcklbw_r2r(mm1, mm5);
453
454 movq_r2r(mm7, mm1);
455 punpckhwd_r2r(mm5, mm7);
456 punpcklwd_r2r(mm5, mm1);
457
458 movq_r2r(mm2, mm4);
459 punpckhwd_r2r(mm0, mm2);
460 punpcklwd_r2r(mm0, mm4);
461
462 movq_r2m(mm1, *(dp1));
463 movq_r2m(mm7, *(dp1 + 8));
464 movq_r2m(mm4, *(dp1 + 16));
465 movq_r2m(mm2, *(dp1 + 24));
466
467 yp1 += 8;
468 up += 4;
469 vp += 4;
470 dp1 += 8 * 4;
471 }
472 /* cleanup pixles that arent a multiple of 8 pixels wide */
473 if (xx < w)
474 {
475 int y, u, v, r, g, b;
476
477 for (; xx < w; xx += 2)
478 {
479 u = (*up++) - 128;
480 v = (*vp++) - 128;
481
482 y = RZ(YMUL) * ((*yp1++) - 16);
483 r = LUT_CLIP((y + (_crv * v)) >> RES);
484 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
485 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
486 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
487
488 dp1 += 4;
489
490 y = RZ(YMUL) * ((*yp1++) - 16);
491 r = LUT_CLIP((y + (_crv * v)) >> RES);
492 g = LUT_CLIP((y - (_cgu * u) - (_cgv * v) + RZ(OFF)) >> RES);
493 b = LUT_CLIP((y + (_cbu * u) + RZ(OFF)) >> RES);
494 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
495
496 dp1 += 4;
497 }
498 }
499 }
500 emms();
501#else
502 _evas_yv12torgb_raster(yuv, rgb, w, h);
503#endif
504}
505
506#ifdef BUILD_ALTIVEC
507static void
508_evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h)
509{
510#ifdef __VEC__
511 int xx, yy;
512 int w2, h2;
513 unsigned char *yp1, *yp2, *up, *vp;
514 unsigned char *dp1, *dp2;
515 vector signed short y, u, v;
516 vector signed short r, g, b;
517 vector signed short tmp1, tmp2, tmp3;
518 vector unsigned char yperm, uperm, vperm, rgb1, rgb2;
519 vector unsigned char alpha;
520
521 /* handy halved w & h */
522 w2 = w / 2;
523 h2 = h / 2;
524 /* plane pointers */
525 yp1 = yuv;
526 yp2 = yuv + w;
527 up = yuv + (w * h);
528 vp = up + (w2 * h2);
529 /* destination pointers */
530 dp1 = rgb;
531 dp2 = rgb + (w * 4);
532
533 alpha = vec_mergeh((vector unsigned char)AVV(255), zero);
534 alpha = (vector unsigned char)vec_mergeh((vector unsigned short)alpha,
535 (vector unsigned short)zero);
536
537 for (yy = 0; yy < h2; yy++)
538 {
539 for (xx = 0; xx < w2; xx += 4)
540 {
541/* Cycles */
542 /*
543 * Load 4 y and 4 u & v pixels for the 8x2 pixel block.
544 */
545/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1);
546/* 3 */ tmp1 = (vector signed short)vec_lde(0, (unsigned int *)up);
547/* 3 */ tmp2 = (vector signed short)vec_lde(0, (unsigned int *)vp);
548
549 /* Prepare for aligning the data in their vectors */
550/* 3 */ yperm = vec_lvsl(0, yp1);
551/* 3 */ uperm = vec_lvsl(0, up);
552/* 3 */ vperm = vec_lvsl(0, vp);
553 yp1 += 4;
554
555 /* Save y and load the next 4 y pixels for a total of 8 */
556/* 2 */ y = vec_perm(tmp3, tmp3, yperm);
557/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp1);
558
559 /* Setup and calculate the 4 u pixels */
560/* 2 */ tmp1 = vec_perm(tmp1, tmp1, uperm);
561/* 2 */ tmp2 = vec_perm(tmp2, tmp2, vperm);
562
563 /* Avoid dependency stalls on yperm and calculate the 4 u values */
564/* 3 */ yperm = vec_lvsr(12, yp1);
565/* 1 */ tmp1 = (vector signed short)vec_mergeh((vector unsigned char)tmp1,
566 (vector unsigned char)tmp1);
567/* 1 */ u = (vector signed short)vec_mergeh(zero,
568 (vector unsigned char)tmp1);
569
570/* 1 */ u = vec_sub(u, c128);
571/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm);
572
573 /* Setup and calculate the 4 v values */
574/* 1 */ tmp2 = (vector signed short)vec_mergeh((vector unsigned char)tmp2,
575 (vector unsigned char)tmp2);
576/* 1 */ v = (vector signed short)vec_mergeh(zero,
577 (vector unsigned char)tmp2);
578/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero);
579/* 1 */ v = vec_sub(v, c128);
580
581 /* Move the data into y and start loading the next 4 pixels */
582/* 1 */ y = (vector signed short)vec_mergeh(zero,
583 (vector unsigned char)y);
584/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero,
585 (vector unsigned char)tmp3);
586/* 1 */ y = vec_or(y, tmp3);
587
588 /* Finish calculating y */
589/* 1 */ y = vec_sub(y, c16);
590/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero);
591
592 /* Perform non-dependent multiplies first. */
593/* 4 */ tmp1 = vec_mladd(crv, v, y);
594/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2);
595/* 4 */ tmp3 = vec_mladd(cbu, u, y);
596
597 /* Calculate rgb values */
598/* 1 */ r = vec_sra(tmp1, res);
599
600/* 1 */ tmp2 = vec_sub(y, tmp2);
601/* 1 */ tmp2 = vec_add(tmp2, c32);
602/* 1 */ g = vec_sra(tmp2, res);
603
604/* 1 */ tmp3 = vec_add(tmp3, c32);
605/* 1 */ b = vec_sra(tmp3, res);
606
607 /* Bound to 0 <= x <= 255 */
608/* 1 */ r = vec_min(r, maxchar);
609/* 1 */ g = vec_min(g, maxchar);
610/* 1 */ b = vec_min(b, maxchar);
611/* 1 */ r = vec_max(r, (vector signed short)zero);
612/* 1 */ g = vec_max(g, (vector signed short)zero);
613/* 1 */ b = vec_max(b, (vector signed short)zero);
614
615 /* Combine r, g and b. */
616/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
617 pickrg1);
618/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
619 pickrg2);
620
621/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1);
622/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2);
623
624/* 1 */ rgb1 = vec_or(alpha, rgb1);
625/* 1 */ rgb2 = vec_or(alpha, rgb2);
626
627/* 3 */ vec_stl(rgb1, 0, dp1);
628 dp1 += 16;
629/* 3 */ vec_stl(rgb2, 0, dp1);
630
631 /*
632 * Begin the second row calculations
633 */
634
635 /*
636 * Load 4 y pixels for the 8x2 pixel block.
637 */
638/* 3 */ yperm = vec_lvsl(0, yp2);
639/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2);
640 yp2 += 4;
641
642 /* Save y and load the next 4 y pixels for a total of 8 */
643/* 2 */ y = vec_perm(tmp3, tmp3, yperm);
644/* 3 */ yperm = vec_lvsr(12, yp2);
645/* 3 */ tmp3 = (vector signed short)vec_lde(0, (unsigned int *)yp2);
646/* 1 */ y = (vector signed short)vec_mergeh(zero,
647 (vector unsigned char)y);
648
649 /* Avoid dependency stalls on yperm */
650/* 2 */ tmp3 = vec_perm(tmp3, tmp3, yperm);
651/* 1 */ tmp3 = (vector signed short)vec_mergeh(zero,
652 (vector unsigned char)tmp3);
653/* 1 */ y = vec_or(y, tmp3);
654
655 /* Start the calculation for g */
656/* 4 */ tmp2 = vec_mladd(cgu, u, (vector signed short)zero);
657
658 /* Finish calculating y */
659/* 1 */ y = vec_sub(y, c16);
660/* 4 */ y = vec_mladd(ymul, y, (vector signed short)zero);
661
662 /* Perform non-dependent multiplies first. */
663/* 4 */ tmp2 = vec_mladd(cgv, v, tmp2);
664/* 4 */ tmp1 = vec_mladd(crv, v, y);
665/* 4 */ tmp3 = vec_mladd(cbu, u, y);
666
667 /* Calculate rgb values */
668/* 1 */ r = vec_sra(tmp1, res);
669
670/* 1 */ tmp2 = vec_sub(y, tmp2);
671/* 1 */ tmp2 = vec_add(tmp2, c32);
672/* 1 */ g = vec_sra(tmp2, res);
673
674/* 1 */ tmp3 = vec_add(tmp3, c32);
675/* 1 */ b = vec_sra(tmp3, res);
676
677 /* Bound to 0 <= x <= 255 */
678/* 1 */ r = vec_min(r, maxchar);
679/* 1 */ g = vec_min(g, maxchar);
680/* 1 */ b = vec_min(b, maxchar);
681/* 1 */ r = vec_max(r, (vector signed short)zero);
682/* 1 */ g = vec_max(g, (vector signed short)zero);
683/* 1 */ b = vec_max(b, (vector signed short)zero);
684
685 /* Combine r, g and b. */
686/* 2 */ rgb1 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
687 pickrg1);
688/* 2 */ rgb2 = vec_perm((vector unsigned char)r, (vector unsigned char)g,
689 pickrg2);
690
691/* 2 */ rgb1 = vec_perm(rgb1, (vector unsigned char)b, pickrgb1);
692/* 2 */ rgb2 = vec_perm(rgb2, (vector unsigned char)b, pickrgb2);
693
694/* 1 */ rgb1 = vec_or(alpha, rgb1);
695/* 1 */ rgb2 = vec_or(alpha, rgb2);
696
697/* 3 */ vec_stl(rgb1, 0, dp2);
698 dp2 += 16;
699/* 3 */ vec_stl(rgb2, 0, dp2);
700
701 /* Increment the YUV data pointers to the next set of pixels. */
702 yp1 += 4;
703 yp2 += 4;
704 up += 4;
705 vp += 4;
706
707 /* Move the destination pointers to the next set of pixels. */
708 dp1 += 16;
709 dp2 += 16;
710 }
711
712 /* jump down one line since we are doing 2 at once */
713 yp1 += w;
714 yp2 += w;
715 dp1 += (w * 4);
716 dp2 += (w * 4);
717 }
718#else
719 _evas_yv12torgb_diz(yuv, rgb, w, h);
720#endif
721}
722#endif
723
724static void
725_evas_yuv_init(void)
726{
727#ifdef BUILD_C
728 int i;
729
730 for (i = 0; i < 256; i++)
731 {
732 _v1164[i] = (int)(((float)(i - 16 )) * 1.164);
733
734 _v1596[i] = (int)(((float)(i - 128)) * 1.596);
735 _v813[i] = (int)(((float)(i - 128)) * 0.813);
736
737 _v391[i] = (int)(((float)(i - 128)) * 0.391);
738 _v2018[i] = (int)(((float)(i - 128)) * 2.018);
739 }
740
741 for (i = -384; i < 640; i++)
742 {
743 _clip_lut[i+384] = i < 0 ? 0 : (i > 255) ? 255 : i;
744 }
745#endif
746}
747
748#ifdef BUILD_ALTIVEC
749static void
750_evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h)
751{
752#ifdef BUILD_C
753 int xx, yy;
754 int y, u, v, r, g, b;
755 unsigned char *yp1, *yp2, *up, *vp;
756 unsigned char *dp1, *dp2;
757 int crv, cbu, cgu, cgv;
758
759 /* destination pointers */
760 dp1 = rgb;
761 dp2 = rgb + (w * 4);
762
763 crv = CRV; /* 1.596 */
764 cbu = CBU; /* 2.018 */
765 cgu = CGU; /* 0.391 */
766 cgv = CGV; /* 0.813 */
767
768 for (yy = 0; yy < h; yy += 2)
769 {
770 /* plane pointers */
771 yp1 = yuv[yy];
772 yp2 = yuv[yy + 1];
773 up = yuv[h + (yy / 2)];
774 vp = yuv[h + (h / 2) + (yy / 2)];
775 for (xx = 0; xx < w; xx += 2)
776 {
777 /* collect u & v for 2x2 pixel block */
778 u = (*up++) - 128;
779 v = (*vp++) - 128;
780
781 /* do the top 2 pixels of the 2x2 block which shared u & v */
782 /* yuv to rgb */
783 y = YMUL * ((*yp1++) - 16);
784 r = LUT_CLIP((y + (crv * v)) >> 16);
785 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
786 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
787 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
788
789 dp1 += 4;
790
791 /* yuv to rgb */
792 y = YMUL * ((*yp1++) - 16);
793 r = LUT_CLIP((y + (crv * v)) >> 16);
794 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
795 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
796 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(r,g,b);
797
798 dp1 += 4;
799
800 /* do the bottom 2 pixels */
801 /* yuv to rgb */
802 y = YMUL * ((*yp2++) - 16);
803 r = LUT_CLIP((y + (crv * v)) >> 16);
804 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
805 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
806 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b);
807
808 dp2 += 4;
809
810 /* yuv to rgb */
811 y = YMUL * ((*yp2++) - 16);
812 r = LUT_CLIP((y + (crv * v)) >> 16);
813 g = LUT_CLIP((y - (cgu * u) - (cgv * v) + OFF) >>16);
814 b = LUT_CLIP((y + (cbu * u) + OFF) >> 16);
815 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(r,g,b);
816
817 dp2 += 4;
818 }
819 /* jump down one line since we are doing 2 at once */
820 dp1 += (w * 4);
821 dp2 += (w * 4);
822 }
823#endif
824}
825#endif
826
827static void
828_evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
829{
830#ifdef BUILD_C
831 int xx, yy;
832 int y, u, v;
833 unsigned char *yp1, *yp2, *up, *vp;
834 unsigned char *dp1, *dp2;
835
836 /* destination pointers */
837 dp1 = rgb;
838 dp2 = rgb + (w * 4);
839
840 for (yy = 0; yy < h; yy += 2)
841 {
842 /* plane pointers */
843 yp1 = yuv[yy];
844 yp2 = yuv[yy + 1];
845 up = yuv[h + (yy / 2)];
846 vp = yuv[h + (h / 2) + (yy / 2)];
847 for (xx = 0; xx < w; xx += 2)
848 {
849 int vmu;
850
851 /* collect u & v for 2x2 pixel block */
852 u = *up++;
853 v = *vp++;
854
855 /* save lookups */
856 vmu = _v813[v] + _v391[u];
857 u = _v2018[u];
858 v = _v1596[v];
859
860 /* do the top 2 pixels of the 2x2 block which shared u & v */
861 /* yuv to rgb */
862 y = _v1164[*yp1++];
863 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
864
865 dp1 += 4;
866
867 /* yuv to rgb */
868 y = _v1164[*yp1++];
869 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
870
871 dp1 += 4;
872
873 /* do the bottom 2 pixels */
874 /* yuv to rgb */
875 y = _v1164[*yp2++];
876 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
877
878 dp2 += 4;
879
880 /* yuv to rgb */
881 y = _v1164[*yp2++];
882 *((DATA32 *) dp2) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
883
884 dp2 += 4;
885 }
886 /* jump down one line since we are doing 2 at once */
887 dp1 += (w * 4);
888 dp2 += (w * 4);
889 }
890#endif
891}
892
893void
894evas_common_convert_yuv_422_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
895{
896#ifdef BUILD_C
897 if (!initted) _evas_yuv_init();
898 initted = 1;
899 _evas_yuy2torgb_raster(src, dst, w, h);
900#endif
901}
902
903void
904evas_common_convert_yuv_420_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
905{
906#ifdef BUILD_C
907 if (!initted) _evas_yuv_init();
908 initted = 1;
909 _evas_nv12torgb_raster(src, dst, w, h);
910#endif
911}
912
913void
914evas_common_convert_yuv_420T_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
915{
916#ifdef BUILD_C
917 if (initted) _evas_yuv_init();
918 initted = 1;
919 _evas_nv12tiledtorgb_raster(src, dst, w, h);
920#endif
921}
922
923static void
924_evas_yuy2torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
925{
926#ifdef BUILD_C
927 int xx, yy;
928 int y, u, v;
929 unsigned char *yp1, *yp2, *up, *vp;
930 unsigned char *dp1;
931
932 dp1 = rgb;
933
934 /* destination pointers */
935 for (yy = 0; yy < h; yy++)
936 {
937 /* plane pointers */
938 unsigned char *line;
939
940 line = yuv[yy];
941 yp1 = line + 0;
942 up = line + 1;
943 yp2 = line + 2;
944 vp = line + 3;
945
946 for (xx = 0; xx < w; xx += 2)
947 {
948 int vmu;
949
950 /* collect u & v for 2 pixels block */
951 u = *up;
952 v = *vp;
953
954 /* save lookups */
955 vmu = _v813[v] + _v391[u];
956 u = _v2018[u];
957 v = _v1596[v];
958
959 /* do the top 2 pixels of the 2x2 block which shared u & v */
960 /* yuv to rgb */
961 y = _v1164[*yp1];
962 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
963
964 dp1 += 4;
965
966 /* yuv to rgb */
967 y = _v1164[*yp2];
968 *((DATA32 *) dp1) = 0xff000000 + RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
969
970 dp1 += 4;
971
972 yp1 += 4; yp2 += 4; up += 4; vp += 4;
973 }
974 }
975#endif
976}
977
978#ifdef BUILD_C
979static inline void
980_evas_yuv2rgb_420_raster(unsigned char *yp1, unsigned char *yp2, unsigned char *up, unsigned char *vp,
981 unsigned char *dp1, unsigned char *dp2)
982{
983 int y, u, v;
984 int vmu;
985 int rgb;
986
987 /* collect u & v for 4 pixels block */
988 u = *up;
989 v = *vp;
990
991 /* save lookups */
992#ifdef MEM_BP
993 vmu = _v813[v] + _v391[u];
994 u = _v2018[u];
995 v = _v1596[v];
996#else
997 u -= 128;
998 v -= 128;
999 vmu = v * CGV + u * CGU;
1000 u = u * CBU;
1001 v = v * CRV;
1002#endif
1003
1004 /* do the top 2 pixels of the 2x2 block which shared u & v */
1005 /* yuv to rgb */
1006#ifdef MEM_BP
1007 y = _v1164[*yp1];
1008 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1009#else
1010 y = (*yp1 - 16 ) * YMUL;
1011 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1012 LUT_CLIP(((y - vmu + OFF) >> 16)),
1013 LUT_CLIP(((y + u + OFF) >> 16)));
1014#endif
1015 *((DATA32 *) dp1) = 0xff000000 + rgb;
1016
1017 dp1 += 4; yp1++;
1018
1019 /* yuv to rgb */
1020#ifdef MEM_BP
1021 y = _v1164[*yp1];
1022 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1023#else
1024 y = (*yp1 - 16 ) * YMUL;
1025 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1026 LUT_CLIP(((y - vmu + OFF) >> 16)),
1027 LUT_CLIP(((y + u + OFF) >> 16)));
1028#endif
1029 *((DATA32 *) dp1) = 0xff000000 + rgb;
1030
1031 /* do the bottom 2 pixels of the 2x2 block which shared u & v */
1032 /* yuv to rgb */
1033#ifdef MEM_BP
1034 y = _v1164[*yp2];
1035 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1036#else
1037 y = (*yp2 - 16 ) * YMUL;
1038 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1039 LUT_CLIP(((y - vmu + OFF) >> 16)),
1040 LUT_CLIP(((y + u + OFF) >> 16)));
1041#endif
1042 *((DATA32 *) dp2) = 0xff000000 + rgb;
1043
1044 dp2 += 4; yp2++;
1045
1046 /* yuv to rgb */
1047#ifdef MEM_BP
1048 y = _v1164[*yp2];
1049 rgb = RGB_JOIN(LUT_CLIP(y + v), LUT_CLIP(y - vmu), LUT_CLIP(y + u));
1050#else
1051 y = (*yp2 - 16 ) * YMUL;
1052 rgb = RGB_JOIN(LUT_CLIP(((y + v) >> 16)),
1053 LUT_CLIP(((y - vmu + OFF) >> 16)),
1054 LUT_CLIP(((y + u + OFF) >> 16)));
1055#endif
1056 *((DATA32 *) dp2) = 0xff000000 + rgb;
1057}
1058#endif
1059
1060static void
1061_evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
1062{
1063#ifdef BUILD_C
1064
1065#define HANDLE_MACROBLOCK(YP1, YP2, UP, VP, DP1, DP2) \
1066 { \
1067 int i; \
1068 int j; \
1069 \
1070 for (i = 0; i < 32; i += 2) \
1071 { \
1072 for (j = 0; j < 64; j += 2) \
1073 { \
1074 _evas_yuv2rgb_420_raster(YP1, YP2, UP, VP, DP1, DP2); \
1075 \
1076 /* the previous call just rendered 2 pixels per lines */ \
1077 DP1 += 8; DP2 += 8; \
1078 \
1079 /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */ \
1080 YP1 += 2; YP2 += 2; UP += 2; VP += 2; \
1081 } \
1082 \
1083 DP1 += sizeof (int) * ((w << 1) - 64); \
1084 DP2 += sizeof (int) * ((w << 1) - 64); \
1085 YP1 += 64; \
1086 YP2 += 64; \
1087 } \
1088 }
1089
1090 /* One macro block is 32 lines of Y and 16 lines of UV */
1091 const int offset_value[2] = { 0, 64 * 16 };
1092 int mb_x, mb_y, mb_w, mb_h;
1093 int base_h;
1094 int uv_x, uv_step;
1095 int stride;
1096
1097 /* Idea iterate over each macroblock and convert each of them using _evas_nv12torgb_raster */
1098
1099 /* The layout of the Y macroblock order in RGB non tiled space : */
1100 /* --------------------------------------------------- */
1101 /* | 0 | 1 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | */
1102 /* --------------------------------------------------- */
1103 /* | 2 | 3 | 4 | 5 | 10 | 11 | 12 | 13 | 18 | 19 | */
1104 /* --------------------------------------------------- */
1105 /* | 20 | 21 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | */
1106 /* --------------------------------------------------- */
1107 /* | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 38 | 39 | */
1108 /* --------------------------------------------------- */
1109 /* | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | */
1110 /* --------------------------------------------------- */
1111 /* The layout of the UV macroblock order in the same RGB non tiled space : */
1112 /* --------------------------------------------------- */
1113 /* | | | | | | | | | | | */
1114 /* - 0 - 1 - 6 - 7 - 8 - 9 - 14 - 15 - 16 - 17 - */
1115 /* | | | | | | | | | | | */
1116 /* --------------------------------------------------- */
1117 /* | | | | | | | | | | | */
1118 /* - 2 - 3 - 4 - 5 - 10 - 11 - 12 - 13 - 18 - 19 - */
1119 /* | | | | | | | | | | | */
1120 /* --------------------------------------------------- */
1121 /* | | | | | | | | | | | */
1122 /* - 20 - 21 - 22 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - */
1123
1124 /* the number of macroblock should be a multiple of 64x32 */
1125 mb_w = w / 64;
1126 mb_h = h / 32;
1127
1128 base_h = (mb_h >> 1) + (mb_h & 0x1);
1129 stride = w * sizeof (int);
1130
1131 uv_x = 0;
1132
1133 /* In this format we linearize macroblock on two line to form a Z and it's invert */
1134 for (mb_y = 0; mb_y < (mb_h >> 1); mb_y++)
1135 {
1136 int step = 2;
1137 int offset = 0;
1138 int x = 0;
1139 int rmb_x = 0;
1140 int ry[2];
1141
1142 ry[0] = mb_y * 2 * 32 * stride;
1143 ry[1] = ry[0] + 32 * stride;
1144
1145 uv_step = (mb_y & 0x1) == 0 ? 4 : 0;
1146 uv_x = (mb_y & 0x1) == 0 ? 0 : 2 * 64 * 32;
1147
1148 for (mb_x = 0; mb_x < mb_w * 2; mb_x++, rmb_x += 64 * 32)
1149 {
1150 unsigned char *yp1, *yp2, *up, *vp;
1151 unsigned char *dp1, *dp2;
1152
1153 dp1 = rgb + x + ry[offset];
1154 dp2 = dp1 + stride;
1155
1156 yp1 = yuv[mb_y] + rmb_x;
1157 yp2 = yp1 + 64;
1158
1159 /* UV plane is two time less bigger in pixel count, but it old two bytes each times */
1160 up = yuv[(mb_y >> 1) + base_h] + uv_x + offset_value[offset];
1161 vp = up + 1;
1162
1163 HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2);
1164
1165 step++;
1166 if ((step & 0x3) == 0)
1167 {
1168 offset = 1 - offset;
1169 x -= 64 * sizeof (int);
1170 uv_x -= 64 * 32;
1171 }
1172 else
1173 {
1174 x += 64 * sizeof (int);
1175 uv_x += 64 * 32;
1176 }
1177
1178 uv_step++;
1179 if (uv_step == 8)
1180 {
1181 uv_step = 0;
1182 uv_x += 4 * 64 * 32;
1183 }
1184 }
1185 }
1186
1187 if (mb_h & 0x1)
1188 {
1189 int x = 0;
1190 int ry;
1191
1192 ry = mb_y << 1;
1193
1194 uv_step = 0;
1195 uv_x = 0;
1196
1197 for (mb_x = 0; mb_x < mb_w; mb_x++, x++, uv_x++)
1198 {
1199 unsigned char *yp1, *yp2, *up, *vp;
1200 unsigned char *dp1, *dp2;
1201
1202 dp1 = rgb + (x * 64 + (ry * 32 * w)) * sizeof (int);
1203 dp2 = dp1 + sizeof (int) * w;
1204
1205 yp1 = yuv[mb_y] + mb_x * 64 * 32;
1206 yp2 = yp1 + 64;
1207
1208 up = yuv[mb_y / 2 + base_h] + uv_x * 64 * 32;
1209 vp = up + 1;
1210
1211 HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2);
1212 }
1213 }
1214#endif
1215}
1216
1217static void
1218_evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
1219{
1220#ifdef BUILD_C
1221 int xx, yy;
1222 unsigned char *yp1, *yp2, *up, *vp;
1223 unsigned char *dp1;
1224 unsigned char *dp2;
1225
1226 dp1 = rgb;
1227 dp2 = dp1 + sizeof (int) * w;
1228
1229 for (yy = 0; yy < h; yy++)
1230 {
1231 yp1 = yuv[yy++];
1232 yp2 = yuv[yy];
1233
1234 up = yuv[h + (yy >> 1)];
1235 vp = up + 1;
1236
1237 for (xx = 0; xx < w; xx += 2)
1238 {
1239 _evas_yuv2rgb_420_raster(yp1, yp2, up, vp, dp1, dp2);
1240
1241 /* the previous call just rendered 2 pixels per lines */
1242 dp1 += 8; dp2 += 8;
1243
1244 /* and took for that 2 lines with 2 Y, 1 U and 1 V. Don't forget U & V are in the same plane */
1245 yp1 += 2; yp2 += 2; up += 2; vp += 2;
1246 }
1247
1248 /* jump one line */
1249 dp1 += sizeof (int) * w;
1250 dp2 += sizeof (int) * w;
1251 yp1 += w;
1252 yp2 += w;
1253 }
1254#endif
1255}
1256
1257#endif
1258
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 @@
1#ifndef _EVAS_CONVERT_YUV_H
2#define _EVAS_CONVERT_YUV_H
3
4EAPI void evas_common_convert_yuv_420p_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
5EAPI void evas_common_convert_yuv_422_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
6EAPI void evas_common_convert_yuv_420_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
7EAPI void evas_common_convert_yuv_420T_601_rgba (DATA8 **src, DATA8 *dst, int w, int h);
8
9#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 @@
1#include "evas_common.h"
2#if defined BUILD_MMX || defined BUILD_SSE
3#include "evas_mmx.h"
4#endif
5
6#if defined BUILD_SSE3
7#include <immintrin.h>
8#endif
9
10#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP)
11#include <signal.h>
12#include <setjmp.h>
13#include <errno.h>
14
15static sigjmp_buf detect_buf;
16#endif
17
18static int cpu_feature_mask = 0;
19
20#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP)
21static void evas_common_cpu_catch_ill(int sig);
22static void evas_common_cpu_catch_segv(int sig);
23
24static void
25evas_common_cpu_catch_ill(int sig __UNUSED__)
26{
27 siglongjmp(detect_buf, 1);
28}
29
30static void
31evas_common_cpu_catch_segv(int sig __UNUSED__)
32{
33 siglongjmp(detect_buf, 1);
34}
35#endif
36
37void
38evas_common_cpu_mmx_test(void)
39{
40#ifdef BUILD_MMX
41 pxor_r2r(mm4, mm4);
42#endif
43}
44
45void
46evas_common_cpu_mmx2_test(void)
47{
48#ifdef BUILD_MMX
49 char data[16];
50
51 data[0] = 0;
52 mmx_r2m(movntq, mm0, data);
53 data[0] = 0;
54#endif
55}
56
57void
58evas_common_cpu_sse_test(void)
59{
60#ifdef BUILD_SSE
61 int blah[16];
62
63 movntq_r2m(mm0, blah);
64#endif
65}
66
67void evas_common_op_sse3_test(void);
68
69void
70evas_common_cpu_sse3_test(void)
71{
72#ifdef BUILD_SSE3
73 evas_common_op_sse3_test();
74#endif
75}
76
77#ifdef BUILD_ALTIVEC
78void
79evas_common_cpu_altivec_test(void)
80{
81#ifdef __POWERPC__
82#ifdef __VEC__
83 vector unsigned int zero;
84
85 zero = vec_splat_u32(0);
86#endif /* __VEC__ */
87#endif /* __POWERPC__ */
88}
89#endif /* BUILD_ALTIVEC */
90
91void
92evas_common_cpu_neon_test(void)
93{
94//#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 70)
95#ifdef BUILD_NEON
96 asm volatile (
97 ".fpu neon \n\t"
98 "vqadd.u8 d0, d1, d0\n"
99 : /* Out */
100 : /* In */
101 : /* Clobbered */
102 "d0", "d1"
103 );
104#endif
105//#endif
106}
107
108void
109evas_common_cpu_vis_test(void)
110{
111#ifdef __SPARC__
112#endif /* __SPARC__ */
113}
114
115int
116evas_common_cpu_feature_test(void (*feature)(void))
117{
118#if defined (HAVE_STRUCT_SIGACTION) && defined (HAVE_SIGLONGJMP)
119 int enabled = 1;
120 struct sigaction act, oact, oact2;
121
122 act.sa_handler = evas_common_cpu_catch_ill;
123 act.sa_flags = SA_RESTART;
124 sigemptyset(&act.sa_mask);
125 sigaction(SIGILL, &act, &oact);
126
127 act.sa_handler = evas_common_cpu_catch_segv;
128 act.sa_flags = SA_RESTART;
129 sigemptyset(&act.sa_mask);
130 sigaction(SIGSEGV, &act, &oact2);
131
132 if (sigsetjmp(detect_buf, 1))
133 {
134 sigaction(SIGILL, &oact, NULL);
135 sigaction(SIGSEGV, &oact2, NULL);
136 return 0;
137 }
138
139 feature();
140
141 sigaction(SIGILL, &oact, NULL);
142 sigaction(SIGSEGV, &oact2, NULL);
143 return enabled;
144#else
145 return 0;
146#endif
147}
148
149EAPI void
150evas_common_cpu_init(void)
151{
152 static int called = 0;
153
154 if (called) return;
155 called = 1;
156#ifdef BUILD_MMX
157 cpu_feature_mask |= CPU_FEATURE_MMX *
158 evas_common_cpu_feature_test(evas_common_cpu_mmx_test);
159 evas_common_cpu_end_opt();
160 if (getenv("EVAS_CPU_NO_MMX"))
161 cpu_feature_mask &= ~CPU_FEATURE_MMX;
162 cpu_feature_mask |= CPU_FEATURE_MMX2 *
163 evas_common_cpu_feature_test(evas_common_cpu_mmx2_test);
164 evas_common_cpu_end_opt();
165 if (getenv("EVAS_CPU_NO_MMX2"))
166 cpu_feature_mask &= ~CPU_FEATURE_MMX2;
167#ifdef BUILD_SSE
168 cpu_feature_mask |= CPU_FEATURE_SSE *
169 evas_common_cpu_feature_test(evas_common_cpu_sse_test);
170 evas_common_cpu_end_opt();
171 if (getenv("EVAS_CPU_NO_SSE"))
172 cpu_feature_mask &= ~CPU_FEATURE_SSE;
173#ifdef BUILD_SSE3
174 cpu_feature_mask |= CPU_FEATURE_SSE3 *
175 evas_common_cpu_feature_test(evas_common_cpu_sse3_test);
176 evas_common_cpu_end_opt();
177 if (getenv("EVAS_CPU_NO_SSE3"))
178 cpu_feature_mask &= ~CPU_FEATURE_SSE3;
179#endif /* BUILD_SSE3 */
180#endif /* BUILD_SSE */
181#endif /* BUILD_MMX */
182#ifdef BUILD_ALTIVEC
183#ifdef __POWERPC__
184#ifdef __VEC__
185 cpu_feature_mask |= CPU_FEATURE_ALTIVEC *
186 evas_common_cpu_feature_test(evas_common_cpu_altivec_test);
187 evas_common_cpu_end_opt();
188 if (getenv("EVAS_CPU_NO_ALTIVEC"))
189 cpu_feature_mask &= ~CPU_FEATURE_ALTIVEC;
190#endif /* __VEC__ */
191#endif /* __POWERPC__ */
192#endif /* BUILD_ALTIVEC */
193#ifdef __SPARC__
194 cpu_feature_mask |= CPU_FEATURE_VIS *
195 evas_common_cpu_feature_test(evas_common_cpu_vis_test);
196 evas_common_cpu_end_opt();
197 if (getenv("EVAS_CPU_NO_VIS"))
198 cpu_feature_mask &= ~CPU_FEATURE_VIS;
199#endif /* __SPARC__ */
200#if defined(__ARM_ARCH__)
201#ifdef BUILD_NEON
202 cpu_feature_mask |= CPU_FEATURE_NEON *
203 evas_common_cpu_feature_test(evas_common_cpu_neon_test);
204 evas_common_cpu_end_opt();
205 if (getenv("EVAS_CPU_NO_NEON"))
206 cpu_feature_mask &= ~CPU_FEATURE_NEON;
207#endif
208#endif
209}
210
211int
212evas_common_cpu_has_feature(unsigned int feature)
213{
214 return (cpu_feature_mask & feature);
215}
216
217int
218evas_common_cpu_have_cpuid(void)
219{
220 return 0;
221/*
222#ifdef BUILD_MMX
223 unsigned int have_cpu_id;
224
225 have_cpu_id = 0;
226 have_cpuid(have_cpu_id);
227 return have_cpu_id;
228#else
229 return 0;
230#endif
231 */
232}
233
234EAPI void
235evas_common_cpu_can_do(int *mmx, int *sse, int *sse2)
236{
237 static int do_mmx = 0, do_sse = 0, do_sse2 = 0, done = 0;
238
239 if (!done)
240 {
241# ifdef HARD_CODED_P3
242 cpu_feature_mask |= CPU_FEATURE_MMX;
243 cpu_feature_mask |= CPU_FEATURE_SSE;
244#endif
245#ifdef HARD_CODED_P2
246 cpu_feature_mask |= CPU_FEATURE_MMX;
247#endif
248 if (cpu_feature_mask & CPU_FEATURE_MMX) do_mmx = 1;
249 if (cpu_feature_mask & CPU_FEATURE_MMX2) do_sse = 1;
250 if (cpu_feature_mask & CPU_FEATURE_SSE) do_sse = 1;
251 }
252// INF("%i %i %i", do_mmx, do_sse, do_sse2);
253 *mmx = do_mmx;
254 *sse = do_sse;
255 *sse2 = do_sse2;
256 done = 1;
257}
258
259#ifdef BUILD_MMX
260EAPI void
261evas_common_cpu_end_opt(void)
262{
263 if (cpu_feature_mask &
264 (CPU_FEATURE_MMX | CPU_FEATURE_MMX2))
265 {
266 emms();
267 }
268}
269#else
270EAPI void
271evas_common_cpu_end_opt(void)
272{
273}
274#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 @@
1#ifndef _EVAS_DRAW_H
2#define _EVAS_DRAW_H
3
4
5EAPI void evas_common_draw_init (void);
6
7EAPI RGBA_Draw_Context *evas_common_draw_context_new (void);
8EAPI void evas_common_draw_context_free (RGBA_Draw_Context *dc);
9EAPI void evas_common_draw_context_font_ext_set (RGBA_Draw_Context *dc,
10 void *data,
11 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
12 void (*gl_free) (void *ext_dat),
13 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y));
14EAPI void evas_common_draw_context_clip_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
15EAPI void evas_common_draw_context_set_clip (RGBA_Draw_Context *dc, int x, int y, int w, int h);
16EAPI void evas_common_draw_context_unset_clip (RGBA_Draw_Context *dc);
17EAPI void evas_common_draw_context_set_color (RGBA_Draw_Context *dc, int r, int g, int b, int a);
18EAPI void evas_common_draw_context_set_multiplier (RGBA_Draw_Context *dc, int r, int g, int b, int a);
19EAPI void evas_common_draw_context_unset_multiplier (RGBA_Draw_Context *dc);
20EAPI void evas_common_draw_context_set_mask (RGBA_Draw_Context *dc, RGBA_Image *im, int x, int y, int w, int h);
21EAPI void evas_common_draw_context_unset_mask (RGBA_Draw_Context *dc);
22EAPI Cutout_Rects *evas_common_draw_context_cutouts_new (void);
23EAPI void evas_common_draw_context_cutouts_free (Cutout_Rects* rects);
24EAPI void evas_common_draw_context_cutouts_del (Cutout_Rects* rects, int idx);
25EAPI void evas_common_draw_context_add_cutout (RGBA_Draw_Context *dc, int x, int y, int w, int h);
26EAPI void evas_common_draw_context_clear_cutouts (RGBA_Draw_Context *dc);
27EAPI Cutout_Rects *evas_common_draw_context_apply_cutouts (RGBA_Draw_Context *dc);
28EAPI void evas_common_draw_context_apply_clear_cutouts (Cutout_Rects* rects);
29EAPI void evas_common_draw_context_apply_clean_cutouts (Cutout_Rects* rects);
30EAPI void evas_common_draw_context_set_anti_alias (RGBA_Draw_Context *dc, unsigned char aa);
31EAPI void evas_common_draw_context_set_color_interpolation (RGBA_Draw_Context *dc, int color_space);
32EAPI void evas_common_draw_context_set_render_op (RGBA_Draw_Context *dc, int op);
33EAPI void evas_common_draw_context_set_sli (RGBA_Draw_Context *dc, int y, int h);
34
35
36#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 @@
1#include "evas_common.h"
2#include "evas_convert_main.h"
3#include "evas_private.h"
4
5EAPI Cutout_Rects*
6evas_common_draw_context_cutouts_new(void)
7{
8 Cutout_Rects *rects;
9
10 rects = calloc(1, sizeof(Cutout_Rects));
11 return rects;
12}
13
14EAPI void
15evas_common_draw_context_cutouts_free(Cutout_Rects* rects)
16{
17 rects->active = 0;
18}
19
20EAPI void
21evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
22{
23 if ((idx >= 0) && (idx < rects->active))
24 {
25 Cutout_Rect *rect;
26
27 rect = rects->rects + idx;
28 memmove(rect, rect + 1,
29 sizeof(Cutout_Rect) * (rects->active - idx - 1));
30 rects->active--;
31 }
32}
33
34void
35evas_common_init(void)
36{
37 evas_common_cpu_init();
38
39 evas_common_blend_init();
40 evas_common_image_init();
41 evas_common_convert_init();
42 evas_common_scale_init();
43 evas_common_rectangle_init();
44 evas_common_polygon_init();
45 evas_common_line_init();
46 evas_common_font_init();
47 evas_common_draw_init();
48 evas_common_tilebuf_init();
49}
50
51void
52evas_common_shutdown(void)
53{
54 evas_font_dir_cache_free();
55 evas_common_image_cache_free();
56}
57
58EAPI void
59evas_common_draw_init(void)
60{
61}
62
63EAPI RGBA_Draw_Context *
64evas_common_draw_context_new(void)
65{
66 RGBA_Draw_Context *dc;
67
68 dc = calloc(1, sizeof(RGBA_Draw_Context));
69 dc->sli.h = 1;
70 return dc;
71}
72
73EAPI void
74evas_common_draw_context_free(RGBA_Draw_Context *dc)
75{
76 if (!dc) return;
77
78#ifdef HAVE_PIXMAN
79 if (dc->col.pixman_color_image)
80 {
81 pixman_image_unref(dc->col.pixman_color_image);
82 dc->col.pixman_color_image = NULL;
83 }
84#endif
85
86 evas_common_draw_context_apply_clean_cutouts(&dc->cutout);
87 free(dc);
88}
89
90EAPI void
91evas_common_draw_context_clear_cutouts(RGBA_Draw_Context *dc)
92{
93 evas_common_draw_context_apply_clean_cutouts(&dc->cutout);
94}
95
96EAPI void
97evas_common_draw_context_font_ext_set(RGBA_Draw_Context *dc,
98 void *data,
99 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg),
100 void (*gl_free) (void *ext_dat),
101 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y))
102{
103 dc->font_ext.data = data;
104 dc->font_ext.func.gl_new = gl_new;
105 dc->font_ext.func.gl_free = gl_free;
106 dc->font_ext.func.gl_draw = gl_draw;
107}
108
109EAPI void
110evas_common_draw_context_clip_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
111{
112 if (dc->clip.use)
113 {
114 RECTS_CLIP_TO_RECT(dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h,
115 x, y, w, h);
116 }
117 else
118 evas_common_draw_context_set_clip(dc, x, y, w, h);
119}
120
121EAPI void
122evas_common_draw_context_set_clip(RGBA_Draw_Context *dc, int x, int y, int w, int h)
123{
124 dc->clip.use = 1;
125 dc->clip.x = x;
126 dc->clip.y = y;
127 dc->clip.w = w;
128 dc->clip.h = h;
129}
130
131EAPI void
132evas_common_draw_context_unset_clip(RGBA_Draw_Context *dc)
133{
134 dc->clip.use = 0;
135}
136
137EAPI void
138evas_common_draw_context_set_color(RGBA_Draw_Context *dc, int r, int g, int b, int a)
139{
140 R_VAL(&(dc->col.col)) = (DATA8)r;
141 G_VAL(&(dc->col.col)) = (DATA8)g;
142 B_VAL(&(dc->col.col)) = (DATA8)b;
143 A_VAL(&(dc->col.col)) = (DATA8)a;
144#ifdef HAVE_PIXMAN
145 if (dc && dc->col.pixman_color_image)
146 pixman_image_unref(dc->col.pixman_color_image);
147
148 pixman_color_t pixman_color;
149
150 pixman_color.alpha = (dc->col.col & 0xff000000) >> 16;
151 pixman_color.red = (dc->col.col & 0x00ff0000) >> 8;
152 pixman_color.green = (dc->col.col & 0x0000ff00);
153 pixman_color.blue = (dc->col.col & 0x000000ff) << 8;
154
155 dc->col.pixman_color_image = pixman_image_create_solid_fill(&pixman_color);
156#endif
157
158}
159
160EAPI void
161evas_common_draw_context_set_multiplier(RGBA_Draw_Context *dc, int r, int g, int b, int a)
162{
163 dc->mul.use = 1;
164 R_VAL(&(dc->mul.col)) = (DATA8)r;
165 G_VAL(&(dc->mul.col)) = (DATA8)g;
166 B_VAL(&(dc->mul.col)) = (DATA8)b;
167 A_VAL(&(dc->mul.col)) = (DATA8)a;
168}
169
170EAPI void
171evas_common_draw_context_unset_multiplier(RGBA_Draw_Context *dc)
172{
173 dc->mul.use = 0;
174}
175
176EAPI void
177evas_common_draw_context_set_mask(RGBA_Draw_Context *dc, RGBA_Image *mask, int x, int y, int w, int h)
178{
179 dc->mask.mask = mask;
180 dc->mask.x = x;
181 dc->mask.y = y;
182 dc->mask.w = w;
183 dc->mask.h = h;
184
185#ifdef HAVE_PIXMAN
186 if (mask->pixman.im)
187 pixman_image_unref(mask->pixman.im);
188
189 if (mask->cache_entry.flags.alpha)
190 {
191 mask->pixman.im = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h,
192 (uint32_t *)mask->mask.mask,
193 w * 4);
194 }
195 else
196 {
197 mask->pixman.im = pixman_image_create_bits(PIXMAN_x8r8g8b8, w, h,
198 (uint32_t *)mask->mask.mask,
199 w * 4);
200 }
201#endif
202
203}
204
205EAPI void
206evas_common_draw_context_unset_mask(RGBA_Draw_Context *dc)
207{
208 dc->mask.mask = NULL;
209
210#ifdef HAVE_PIXMAN
211 RGBA_Image *mask;
212 mask = (RGBA_Image *)dc->mask.mask;
213
214 if (mask && mask->pixman.im)
215 {
216 pixman_image_unref(mask->pixman.im);
217 mask->pixman.im = NULL;
218 }
219#endif
220}
221
222
223
224
225
226EAPI void
227evas_common_draw_context_add_cutout(RGBA_Draw_Context *dc, int x, int y, int w, int h)
228{
229// if (dc->cutout.rects > 512) return;
230 if (dc->clip.use)
231 {
232#if 1 // this is a bit faster
233 int xa1, xa2, xb1, xb2;
234
235 xa1 = x;
236 xa2 = xa1 + w - 1;
237 xb1 = dc->clip.x;
238 if (xa2 < xb1) return;
239 xb2 = xb1 + dc->clip.w - 1;
240 if (xa1 >= xb2) return;
241 if (xa2 > xb2) xa2 = xb2;
242 if (xb1 > xa1) xa1 = xb1;
243 x = xa1;
244 w = xa2 - xa1 + 1;
245
246 xa1 = y;
247 xa2 = xa1 + h - 1;
248 xb1 = dc->clip.y;
249 if (xa2 < xb1) return;
250 xb2 = xb1 + dc->clip.h - 1;
251 if (xa1 >= xb2) return;
252 if (xa2 > xb2) xa2 = xb2;
253 if (xb1 > xa1) xa1 = xb1;
254 y = xa1;
255 h = xa2 - xa1 + 1;
256#else
257 RECTS_CLIP_TO_RECT(x, y, w, h,
258 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
259#endif
260 if ((w < 1) || (h < 1)) return;
261 }
262 evas_common_draw_context_cutouts_add(&dc->cutout, x, y, w, h);
263}
264
265int
266evas_common_draw_context_cutout_split(Cutout_Rects* res, int idx, Cutout_Rect *split)
267{
268 /* 1 input rect, multiple out */
269 Cutout_Rect in = res->rects[idx];
270
271 /* this is to save me a LOT of typing */
272#define INX1 (in.x)
273#define INX2 (in.x + in.w)
274#define SPX1 (split->x)
275#define SPX2 (split->x + split->w)
276#define INY1 (in.y)
277#define INY2 (in.y + in.h)
278#define SPY1 (split->y)
279#define SPY2 (split->y + split->h)
280#define X1_IN (in.x < split->x)
281#define X2_IN ((in.x + in.w) > (split->x + split->w))
282#define Y1_IN (in.y < split->y)
283#define Y2_IN ((in.y + in.h) > (split->y + split->h))
284#define R_NEW(_r, _x, _y, _w, _h) { evas_common_draw_context_cutouts_add(_r, _x, _y, _w, _h); }
285 if (!RECTS_INTERSECT(in.x, in.y, in.w, in.h,
286 split->x, split->y, split->w, split->h))
287 {
288 /* No colision => no clipping, don't touch it. */
289 return 1;
290 }
291
292 /* S = split (ie cut out rect) */
293 /* +--+ = in (rect to be cut) */
294
295 /*
296 * +---+
297 * | |
298 * | S |
299 * | |
300 * +---+
301 *
302 */
303 if (X1_IN && X2_IN && Y1_IN && Y2_IN)
304 {
305 R_NEW(res, in.x, in.y, in.w, SPY1 - in.y);
306 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
307 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
308 /* out => (in.x, SPY2, in.w, INY2 - SPY2) */
309 res->rects[idx].h = INY2 - SPY2;
310 res->rects[idx].y = SPY2;
311 return 1;
312 }
313 /* SSSSSSS
314 * S+---+S
315 * S|SSS|S
316 * S|SSS|S
317 * S|SSS|S
318 * S+---+S
319 * SSSSSSS
320 */
321 if (!X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
322 {
323 evas_common_draw_context_cutouts_del(res, idx);
324 return 0;
325 }
326 /* SSS
327 * S+---+
328 * S|S |
329 * S|S |
330 * S|S |
331 * S+---+
332 * SSS
333 */
334 if (!X1_IN && X2_IN && !Y1_IN && !Y2_IN)
335 {
336 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
337 res->rects[idx].w = INX2 - SPX2;
338 res->rects[idx].x = SPX2;
339 return 1;
340 }
341 /* S
342 * +---+
343 * | S |
344 * | S |
345 * | S |
346 * +---+
347 * S
348 */
349 if (X1_IN && X2_IN && !Y1_IN && !Y2_IN)
350 {
351 R_NEW(res, in.x, in.y, SPX1 - in.x, in.h);
352 /* in => (SPX2, in.y, INX2 - SPX2, in.h) */
353 res->rects[idx].w = INX2 - SPX2;
354 res->rects[idx].x = SPX2;
355 return 1;
356 }
357 /* SSS
358 * +---+S
359 * | S|S
360 * | S|S
361 * | S|S
362 * +---+S
363 * SSS
364 */
365 if (X1_IN && !X2_IN && !Y1_IN && !Y2_IN)
366 {
367 /* in => (in.x, in.y, SPX1 - in.x, in.h) */
368 res->rects[idx].w = SPX1 - in.x;
369 return 1;
370 }
371 /* SSSSSSS
372 * S+---+S
373 * S|SSS|S
374 * | |
375 * | |
376 * +---+
377 *
378 */
379 if (!X1_IN && !X2_IN && !Y1_IN && Y2_IN)
380 {
381 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
382 res->rects[idx].h = INY2 - SPY2;
383 res->rects[idx].y = SPY2;
384 return 1;
385 }
386 /*
387 * +---+
388 * | |
389 * S|SSS|S
390 * | |
391 * +---+
392 *
393 */
394 if (!X1_IN && !X2_IN && Y1_IN && Y2_IN)
395 {
396 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
397 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
398 res->rects[idx].h = SPY1 - in.y;
399 return 1;
400 }
401 /*
402 * +---+
403 * | |
404 * | |
405 * S|SSS|S
406 * S+---+S
407 * SSSSSSS
408 */
409 if (!X1_IN && !X2_IN && Y1_IN && !Y2_IN)
410 {
411 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
412 res->rects[idx].h = SPY1 - in.y;
413 return 1;
414 }
415 /* SSS
416 * S+---+
417 * S|S |
418 * | |
419 * | |
420 * +---+
421 *
422 */
423 if (!X1_IN && X2_IN && !Y1_IN && Y2_IN)
424 {
425 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
426 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
427 res->rects[idx].h = INY2 - SPY2;
428 res->rects[idx].y = SPY2;
429 return 1;
430 }
431 /* S
432 * +---+
433 * | S |
434 * | |
435 * | |
436 * +---+
437 *
438 */
439 if (X1_IN && X2_IN && !Y1_IN && Y2_IN)
440 {
441 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
442 R_NEW(res, SPX2, in.y, INX2 - SPX2, SPY2 - in.y);
443 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
444 res->rects[idx].h = INY2 - SPY2;
445 res->rects[idx].y = SPY2;
446 return 1;
447 }
448 /* SSS
449 * +---+S
450 * | S|S
451 * | |
452 * | |
453 * +---+
454 *
455 */
456 if (X1_IN && !X2_IN && !Y1_IN && Y2_IN)
457 {
458 R_NEW(res, in.x, in.y, SPX1 - in.x, SPY2 - in.y);
459 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
460 res->rects[idx].h = INY2 - SPY2;
461 res->rects[idx].y = SPY2;
462 return 1;
463 }
464 /*
465 * +---+
466 * | |
467 * S|S |
468 * | |
469 * +---+
470 *
471 */
472 if (!X1_IN && X2_IN && Y1_IN && Y2_IN)
473 {
474 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
475 R_NEW(res, SPX2, SPY1, INX2 - SPX2, SPY2 - SPY1);
476 /* in => (in.x, SPY2, in.w, INY2 - SPY2) */
477 res->rects[idx].h = SPY1 - in.y;
478 return 1;
479 }
480 /*
481 * +---+
482 * | |
483 * | S|S
484 * | |
485 * +---+
486 *
487 */
488 if (X1_IN && !X2_IN && Y1_IN && Y2_IN)
489 {
490 R_NEW(res, in.x, SPY2, in.w, INY2 - SPY2);
491 R_NEW(res, in.x, SPY1, SPX1 - in.x, SPY2 - SPY1);
492 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
493 res->rects[idx].h = SPY1 - in.y;
494 return 1;
495 }
496 /*
497 * +---+
498 * | |
499 * | |
500 * S|S |
501 * S+---+
502 * SSS
503 */
504 if (!X1_IN && X2_IN && Y1_IN && !Y2_IN)
505 {
506 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
507 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
508 res->rects[idx].h = SPY1 - in.y;
509 return 1;
510 }
511 /*
512 * +---+
513 * | |
514 * | |
515 * | S |
516 * +---+
517 * S
518 */
519 if (X1_IN && X2_IN && Y1_IN && !Y2_IN)
520 {
521 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
522 R_NEW(res, SPX2, SPY1, INX2 - SPX2, INY2 - SPY1);
523 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
524 res->rects[idx].h = SPY1 - in.y;
525 return 1;
526 }
527 /*
528 * +---+
529 * | |
530 * | |
531 * | S|S
532 * +---+S
533 * SSS
534 */
535 if (X1_IN && !X2_IN && Y1_IN && !Y2_IN)
536 {
537 R_NEW(res, in.x, SPY1, SPX1 - in.x, INY2 - SPY1);
538 /* in => (in.x, in.y, in.w, SPY1 - in.y) */
539 res->rects[idx].h = SPY1 - in.y;
540 return 1;
541 }
542 evas_common_draw_context_cutouts_del(res, idx);
543 return 0;
544#undef INX1
545#undef INX2
546#undef SPX1
547#undef SPX2
548#undef INY1
549#undef INY2
550#undef SPY1
551#undef SPY2
552#undef X1_IN
553#undef X2_IN
554#undef Y1_IN
555#undef Y2_IN
556#undef R_NEW
557}
558
559EAPI Cutout_Rects*
560evas_common_draw_context_apply_cutouts(RGBA_Draw_Context *dc)
561{
562 Cutout_Rects* res, *res2;
563 int i;
564 int j;
565
566 if (!dc->clip.use) return NULL;
567 if ((dc->clip.w <= 0) || (dc->clip.h <= 0)) return NULL;
568
569
570 res = evas_common_draw_context_cutouts_new();
571 evas_common_draw_context_cutouts_add(res, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
572
573 for (i = 0; i < dc->cutout.active; ++i)
574 {
575 /* Don't loop on the element just added to the list as they are already correctly clipped. */
576 int active = res->active;
577
578 for (j = 0; j < active; )
579 {
580 if (evas_common_draw_context_cutout_split(res, j, dc->cutout.rects + i))
581 ++j;
582 else
583 active--;
584 }
585 }
586 /* merge rects */
587#define RI res->rects[i]
588#define RJ res->rects[j]
589 if (res->active > 1)
590 {
591 int found = 1;
592
593 while (found)
594 {
595 found = 0;
596 for (i = 0; i < res->active; i++)
597 {
598 for (j = i + 1; j < res->active; j++)
599 {
600 /* skip empty rects we are removing */
601 if (RJ.w == 0) continue;
602 /* check if its same width, immediately above or below */
603 if ((RJ.w == RI.w) && (RJ.x == RI.x))
604 {
605 if ((RJ.y + RJ.h) == RI.y) /* above */
606 {
607 RI.y = RJ.y;
608 RI.h += RJ.h;
609 RJ.w = 0;
610 found = 1;
611 }
612 else if ((RI.y + RI.h) == RJ.y) /* below */
613 {
614 RI.h += RJ.h;
615 RJ.w = 0;
616 found = 1;
617 }
618 }
619 /* check if its same height, immediately left or right */
620 else if ((RJ.h == RI.h) && (RJ.y == RI.y))
621 {
622 if ((RJ.x + RJ.w) == RI.x) /* left */
623 {
624 RI.x = RJ.x;
625 RI.w += RJ.w;
626 RJ.w = 0;
627 found = 1;
628 }
629 else if ((RI.x + RI.w) == RJ.x) /* right */
630 {
631 RI.w += RJ.w;
632 RJ.w = 0;
633 found = 1;
634 }
635 }
636 }
637 }
638 }
639 res2 = evas_common_draw_context_cutouts_new();
640 for (i = 0; i < res->active; i++)
641 {
642 if (RI.w == 0) continue;
643 evas_common_draw_context_cutouts_add(res2, RI.x, RI.y, RI.w, RI.h);
644 }
645 free(res->rects);
646 free(res);
647 return res2;
648 }
649 return res;
650}
651
652EAPI void
653evas_common_draw_context_apply_clear_cutouts(Cutout_Rects* rects)
654{
655 evas_common_draw_context_apply_clean_cutouts(rects);
656 free(rects);
657}
658
659EAPI void
660evas_common_draw_context_apply_clean_cutouts(Cutout_Rects* rects)
661{
662 free(rects->rects);
663 rects->rects = NULL;
664 rects->active = 0;
665 rects->max = 0;
666}
667
668EAPI void
669evas_common_draw_context_set_anti_alias(RGBA_Draw_Context *dc , unsigned char aa)
670{
671 dc->anti_alias = !!aa;
672}
673
674EAPI void
675evas_common_draw_context_set_color_interpolation(RGBA_Draw_Context *dc, int color_space)
676{
677 dc->interpolation.color_space = color_space;
678}
679
680EAPI void
681evas_common_draw_context_set_render_op(RGBA_Draw_Context *dc , int op)
682{
683 dc->render_op = op;
684}
685
686EAPI void
687evas_common_draw_context_set_sli(RGBA_Draw_Context *dc, int y, int h)
688{
689 dc->sli.y = y;
690 dc->sli.h = h;
691}
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 @@
1#ifndef _EVAS_FONT_H
2#define _EVAS_FONT_H
3#include "evas_text_utils.h"
4
5
6/* main */
7
8EAPI void evas_common_font_init (void);
9EAPI void evas_common_font_shutdown (void);
10EAPI void evas_common_font_font_all_unload (void);
11
12EAPI int evas_common_font_ascent_get (RGBA_Font *fn);
13EAPI int evas_common_font_descent_get (RGBA_Font *fn);
14EAPI int evas_common_font_max_ascent_get (RGBA_Font *fn);
15EAPI int evas_common_font_max_descent_get (RGBA_Font *fn);
16EAPI int evas_common_font_get_line_advance (RGBA_Font *fn);
17
18/* draw */
19
20EAPI 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);
21EAPI int evas_common_font_glyph_search (RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl);
22EAPI RGBA_Font_Glyph *evas_common_font_int_cache_glyph_get (RGBA_Font_Int *fi, FT_UInt index);
23EAPI FT_UInt evas_common_get_char_index (RGBA_Font_Int* fi, Eina_Unicode gl);
24EAPI void evas_common_font_draw_init (void);
25
26/* load */
27EAPI void evas_common_font_dpi_set (int dpi);
28EAPI RGBA_Font_Source *evas_common_font_source_memory_load (const char *name, const void *data, int data_size);
29EAPI RGBA_Font_Source *evas_common_font_source_load (const char *name);
30EAPI int evas_common_font_source_load_complete (RGBA_Font_Source *fs);
31EAPI RGBA_Font_Source *evas_common_font_source_find (const char *name);
32EAPI void evas_common_font_source_free (RGBA_Font_Source *fs);
33EAPI void evas_common_font_size_use (RGBA_Font *fn);
34EAPI RGBA_Font_Int *evas_common_font_int_load (const char *name, int size, Font_Rend_Flags wanted_rend);
35EAPI RGBA_Font_Int *evas_common_font_int_load_init (RGBA_Font_Int *fn);
36EAPI RGBA_Font_Int *evas_common_font_int_load_complete (RGBA_Font_Int *fi);
37EAPI RGBA_Font *evas_common_font_memory_load (const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend);
38EAPI RGBA_Font *evas_common_font_load (const char *name, int size, Font_Rend_Flags wanted_rend);
39EAPI RGBA_Font *evas_common_font_add (RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend);
40EAPI 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);
41EAPI void evas_common_font_free (RGBA_Font *fn);
42EAPI void evas_common_font_hinting_set (RGBA_Font *fn, Font_Hint_Flags hinting);
43EAPI Eina_Bool evas_common_hinting_available (Font_Hint_Flags hinting);
44EAPI 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);
45EAPI RGBA_Font *evas_common_font_hinting_load (const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
46EAPI RGBA_Font *evas_common_font_hinting_add (RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend);
47EAPI 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);
48EAPI void evas_common_font_int_modify_cache_by (RGBA_Font_Int *fi, int dir);
49EAPI int evas_common_font_cache_get (void);
50EAPI void evas_common_font_cache_set (int size);
51EAPI void evas_common_font_flush (void);
52EAPI void evas_common_font_flush_last (void);
53EAPI RGBA_Font_Int *evas_common_font_int_find (const char *name, int size, Font_Rend_Flags wanted_rend);
54EAPI void evas_common_font_all_clear (void);
55
56/* query */
57
58EAPI int evas_common_font_query_kerning (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning);
59EAPI void evas_common_font_query_size (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h);
60EAPI int evas_common_font_query_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props);
61EAPI int evas_common_font_query_right_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props);
62EAPI void evas_common_font_query_advance (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv);
63EAPI 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);
64EAPI 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);
65EAPI 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);
66EAPI int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y);
67EAPI 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);
68
69#ifdef EVAS_FRAME_QUEUING
70EAPI void evas_common_font_draw_finish(void);
71#endif
72
73void evas_common_font_load_init(void);
74void evas_common_font_load_shutdown(void);
75
76#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 @@
1#ifndef _EVAS_FONT_DEFAULT_WALK_X
2#define _EVAS_FONT_DEFAULT_WALK_X
3/* Macros for text walking */
4
5/**
6 * @def EVAS_FONT_WALK_TEXT_INIT
7 * @internal
8 * This macro defines the variables that will later be used with the following
9 * macros, and by font handling functions.
10 * @see EVAS_FONT_WALK_TEXT_START
11 * @see EVAS_FONT_WALK_TEXT_WORK
12 * @see EVAS_FONT_WALK_TEXT_END
13 */
14# define EVAS_FONT_WALK_TEXT_INIT() \
15 int _pen_x = 0, _pen_y = 0; \
16 Evas_Coord _start_pen = (text_props->info && \
17 (text_props->start > 0)) ? \
18 text_props->info->glyph[text_props->start - 1].pen_after : 0 ; \
19 size_t char_index; \
20 (void) _pen_y; /* Sometimes it won't be used */
21
22/* Visual walk helper macros */
23#ifdef OT_SUPPORT
24#define _EVAS_FONT_WALK_TEXT_START() \
25 Evas_Font_OT_Info *_ot_itr = (text_props->info) ? \
26 text_props->info->ot + text_props->start : NULL; \
27 if (!_ot_itr) break; \
28 for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++, _ot_itr++) \
29 {
30#else
31#define _EVAS_FONT_WALK_TEXT_START() \
32 for (char_index = 0 ; char_index < text_props->len ; char_index++, _glyph_itr++) \
33 {
34#endif
35
36/**
37 * @def EVAS_FONT_WALK_TEXT_START
38 * @internal
39 * This runs through the text in visual order while updating char_index,
40 * which is the current index in the text.
41 * Does not end with a ;
42 * Take a look at EVAS_FONT_WALK_X_OFF and the like.
43 * @see EVAS_FONT_WALK_TEXT_INIT
44 * @see EVAS_FONT_WALK_TEXT_WORK
45 * @see EVAS_FONT_WALK_TEXT_END
46 */
47#define EVAS_FONT_WALK_TEXT_START() \
48 do \
49 { \
50 Evas_Font_Glyph_Info *_glyph_itr = (text_props->info) ? \
51 text_props->info->glyph + text_props->start : NULL; \
52 if (!_glyph_itr) break; \
53 _EVAS_FONT_WALK_TEXT_START()
54
55/*FIXME: doc */
56#ifdef OT_SUPPORT
57# define EVAS_FONT_WALK_X_OFF \
58 (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(*_ot_itr)))
59# define EVAS_FONT_WALK_Y_OFF \
60 (EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_Y_OFF_GET(*_ot_itr)))
61# define EVAS_FONT_WALK_POS \
62 (EVAS_FONT_OT_POS_GET(*_ot_itr) - text_props->text_offset)
63# define EVAS_FONT_WALK_POS_NEXT \
64 ((!EVAS_FONT_WALK_IS_LAST) ? \
65 EVAS_FONT_OT_POS_GET(*(_ot_itr + 1)) - \
66 text_props->text_offset : \
67 EVAS_FONT_WALK_POS \
68 )
69# define EVAS_FONT_WALK_POS_PREV \
70 ((char_index > 0) ? \
71 EVAS_FONT_OT_POS_GET(*(_ot_itr - 1)) - \
72 text_props->text_offset : \
73 EVAS_FONT_WALK_POS \
74 )
75#else
76# define EVAS_FONT_WALK_X_OFF 0
77# define EVAS_FONT_WALK_Y_OFF 0
78# define EVAS_FONT_WALK_POS \
79 ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \
80 (text_props->len - char_index - 1) : \
81 (char_index))
82# define EVAS_FONT_WALK_POS_NEXT \
83 ((!EVAS_FONT_WALK_IS_LAST) ? \
84 ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \
85 text_props->len - char_index - 2 \
86 : (char_index + 1)) : \
87 EVAS_FONT_WALK_POS)
88# define EVAS_FONT_WALK_POS_PREV \
89 ((char_index > 0) ? \
90 ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ? \
91 text_props->len - char_index \
92 : (char_index - 1)) : \
93 EVAS_FONT_WALK_POS)
94#endif
95
96
97#define EVAS_FONT_WALK_IS_VISIBLE (_glyph_itr->index != 0)
98#define EVAS_FONT_WALK_X_BEAR (_glyph_itr->x_bear)
99#define EVAS_FONT_WALK_Y_BEAR (fg->glyph_out->top)
100#define EVAS_FONT_WALK_X_ADV ((_glyph_itr > text_props->info->glyph) ? \
101 _glyph_itr->pen_after - (_glyph_itr - 1)->pen_after : \
102 _glyph_itr->pen_after)
103#define EVAS_FONT_WALK_WIDTH (_glyph_itr->width)
104
105#define EVAS_FONT_WALK_INDEX (_glyph_itr->index)
106#define EVAS_FONT_WALK_PEN_X (_pen_x)
107#define EVAS_FONT_WALK_PEN_X_AFTER (_glyph_itr->pen_after - _start_pen)
108#define EVAS_FONT_WALK_PEN_Y (EVAS_FONT_ROUND_26_6_TO_INT(_pen_y))
109#define EVAS_FONT_WALK_Y_ADV (0)
110#define EVAS_FONT_WALK_IS_LAST \
111 (char_index + 1 == text_props->len)
112#define EVAS_FONT_WALK_IS_FIRST \
113 (char_index == 0)
114#define EVAS_FONT_WALK_LEN (text_props->len)
115
116/**
117 * @def EVAS_FONT_WALK_TEXT_WORK
118 * @internal
119 * This macro actually updates the values mentioned in EVAS_FONT_WALK_TEXT_START
120 * according to the current positing in the walk.
121 * @see EVAS_FONT_WALK_TEXT_START
122 * @see EVAS_FONT_WALK_TEXT_INIT
123 * @see EVAS_FONT_WALK_TEXT_END
124 */
125#define EVAS_FONT_WALK_TEXT_WORK() do {} while(0)
126
127/**
128 * @def EVAS_FONT_WALK_TEXT_END
129 * @internal
130 * Closes EVAS_FONT_WALK_TEXT_START, needs to end with a ;
131 * @see EVAS_FONT_WALK_TEXT_START
132 * @see EVAS_FONT_WALK_TEXT_INIT
133 * @see EVAS_FONT_WALK_TEXT_WORK
134 */
135#define EVAS_FONT_WALK_TEXT_END() \
136 if (EVAS_FONT_WALK_IS_VISIBLE) \
137 { \
138 _pen_x = _glyph_itr->pen_after - _start_pen; \
139 } \
140 } \
141 } \
142 while(0)
143
144#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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3#include "evas_blend_private.h"
4
5#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
6#include "evas_font_private.h" /* for Frame-Queuing support */
7
8#include "evas_font_ot.h"
9
10/* Forcibly disable the broken word/metric caching. */
11#ifdef METRIC_CACHE
12# undef METRIC_CACHE
13#endif
14
15#ifdef WORD_CACHE
16# undef WORD_CACHE
17#endif
18
19#define WORD_CACHE_MAXLEN 50
20/* How many to cache */
21#define WORD_CACHE_NWORDS 40
22
23static int max_cached_words = WORD_CACHE_NWORDS;
24
25struct prword
26{
27 EINA_INLIST;
28 struct cinfo *cinfo;
29 Evas_Text_Props text_props;
30 DATA8 *im;
31 int roww;
32 int width;
33 int height;
34 int baseline;
35};
36
37struct cinfo
38{
39 FT_UInt index;
40 struct
41 {
42 int x, y;
43 } pos;
44 int posx;
45 RGBA_Font_Glyph *fg;
46 struct
47 {
48 int w,h;
49 int rows;
50 unsigned char *data;
51 } bm;
52};
53
54
55#if defined(METRIC_CACHE) || defined(WORD_CACHE)
56LK(lock_words); // for word cache call
57static Eina_Inlist *words = NULL;
58static struct prword *evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props);
59#endif
60
61EAPI void
62evas_common_font_draw_init(void)
63{
64 char *p;
65 int tmp;
66
67 if ((p = getenv("EVAS_WORD_CACHE_MAX_WORDS")))
68 {
69 tmp = strtol(p,NULL,10);
70 /* 0 to disable of course */
71 if (tmp > -1 && tmp < 500){
72 max_cached_words = tmp;
73 }
74 }
75}
76
77#ifdef EVAS_FRAME_QUEUING
78EAPI void
79evas_common_font_draw_finish(void)
80{
81}
82#endif
83
84/*
85 * BiDi handling: We receive the shaped string + other props from text_props,
86 * we need to reorder it so we'll have the visual string (the way we draw)
87 * and then for kerning we have to switch the order of the kerning query (as the prev
88 * is on the right, and not on the left).
89 */
90static void
91evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn __UNUSED__, int x, int y,
92 const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w,
93 int ext_h, int im_w, int im_h __UNUSED__)
94{
95 DATA32 *im;
96 RGBA_Font_Int *fi;
97 EVAS_FONT_WALK_TEXT_INIT();
98
99 fi = text_props->font_instance;
100 if (!fi) return;
101
102 evas_common_font_int_reload(fi);
103
104 if (fi->src->current_size != fi->size)
105 {
106 FTLOCK();
107 FT_Activate_Size(fi->ft.size);
108 FTUNLOCK();
109 fi->src->current_size = fi->size;
110 }
111
112
113#if defined(METRIC_CACHE) || defined(WORD_CACHE)
114 unsigned int len;
115
116 len = text_props->len;
117
118 if (len > 2 && (len < WORD_CACHE_MAXLEN))
119 {
120 struct prword *word;
121
122 word =
123 evas_font_word_prerender(dc, text_props);
124 if (word)
125 {
126 int j, rowstart, rowend, xstart, xrun;
127
128 im = dst->image.data;
129 xrun = word->width;
130 y -= word->baseline;
131 xstart = 0;
132 rowstart = 0;
133 rowend = word->height;
134 /* Clip to extent */
135 if (x + xrun > ext_x + ext_w)
136 {
137 xrun -= x + xrun - ext_x - ext_w;
138 }
139 if (x < ext_x)
140 {
141 int excess = ext_x - x;
142 xstart = excess - 1;
143 xrun -= excess;
144 x = ext_x;
145 }
146 if (y + rowend > ext_y + ext_h)
147 {
148 rowend -= (y - ext_y + rowend - ext_h);
149 }
150 if (y < ext_y)
151 {
152 int excess = ext_y - y;
153 rowstart += excess;
154 //rowend -= excess;
155 // y = ext_y;
156 }
157
158 if (xrun < 1) return;
159/* For some reason, metric and word chache are exactly the same except for
160 * this piece of code that makes metric go nuts. ATM, we'll just go the
161 * WORD_CACHE path. */
162#if defined(METRIC_CACHE) || defined(WORD_CACHE)
163 if (word->im)
164 {
165 for (j = rowstart ; j < rowend ; j ++)
166 {
167 func(NULL, word->im + (word->roww * j) + xstart, dc->col.col,
168 im + ((y + j) * im_w) + x, xrun);
169 }
170 return;
171 }
172# elif defined(METRIC_CACHE)
173 unsigned int ind;
174
175 y += word->baseline;
176 for (ind = 0 ; ind < len ; ind ++)
177 {
178 // FIXME Do we need to draw?
179 struct cinfo *ci = word->cinfo + ind;
180 for (j = rowstart ; j < rowend ; j ++)
181 {
182 if ((ci->fg->ext_dat) && (dc->font_ext.func.gl_draw))
183 {
184 /* ext glyph draw */
185 dc->font_ext.func.gl_draw(dc->font_ext.data,
186 (void *)dst,
187 dc, ci->fg,
188 x + ci->pos.x,
189 y - ci->bm.h + j);
190 }
191 else
192 {
193 func(NULL, word->im + (word->roww * j) + xstart,
194 dc->col.col, im + ((y + j) * im_w) + x, xrun);
195 }
196 }
197 }
198 return;
199# endif
200 }
201 }
202#endif
203
204 im = dst->image.data;
205
206 EVAS_FONT_WALK_TEXT_START()
207 {
208 FT_UInt idx;
209 RGBA_Font_Glyph *fg;
210 int chr_x, chr_y;
211
212 if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
213
214 idx = EVAS_FONT_WALK_INDEX;
215
216 LKL(fi->ft_mutex);
217 fg = evas_common_font_int_cache_glyph_get(fi, idx);
218 if (!fg)
219 {
220 LKU(fi->ft_mutex);
221 continue;
222 }
223
224 LKU(fi->ft_mutex);
225
226 if (dc->font_ext.func.gl_new)
227 {
228 /* extension calls */
229 fg->ext_dat = dc->font_ext.func.gl_new(dc->font_ext.data, fg);
230 fg->ext_dat_free = dc->font_ext.func.gl_free;
231 }
232
233 chr_x = x + EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR;
234 chr_y = y + EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR;
235
236 if (chr_x < (ext_x + ext_w))
237 {
238 DATA8 *data;
239 int i, j, w, h;
240
241 data = fg->glyph_out->bitmap.buffer;
242 j = fg->glyph_out->bitmap.pitch;
243 w = fg->glyph_out->bitmap.width;
244 if (j < w) j = w;
245 h = fg->glyph_out->bitmap.rows;
246 /*
247 if ((fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays)
248 && (fg->glyph_out->bitmap.num_grays == 256)
249 )
250 */
251
252#ifdef HAVE_PIXMAN
253# ifdef PIXMAN_FONT
254 int index;
255 DATA32 *font_alpha_buffer;
256 pixman_image_t *font_mask_image;
257
258 font_alpha_buffer = alloca(w * h * sizeof(DATA32));
259 for (index = 0; index < (w * h); index++)
260 font_alpha_buffer[index] = data[index] << 24;
261
262 font_mask_image = pixman_image_create_bits(PIXMAN_a8r8g8b8, w, h,
263 font_alpha_buffer,
264 w * sizeof(DATA32));
265
266 if (!font_mask_image) return;
267# endif
268#endif
269
270 {
271 if ((j > 0) && (chr_x + w > ext_x))
272 {
273 if ((fg->ext_dat) && (dc->font_ext.func.gl_draw))
274 {
275 /* ext glyph draw */
276 dc->font_ext.func.gl_draw(dc->font_ext.data,
277 (void *)dst,
278 dc, fg, chr_x,
279 y - (chr_y - y));
280 }
281 else
282 {
283 if ((fg->glyph_out->bitmap.num_grays == 256) &&
284 (fg->glyph_out->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY))
285 {
286#ifdef HAVE_PIXMAN
287# ifdef PIXMAN_FONT
288 if ((dst->pixman.im) &&
289 (dc->col.pixman_color_image))
290 pixman_image_composite(PIXMAN_OP_OVER,
291 dc->col.pixman_color_image,
292 font_mask_image,
293 dst->pixman.im,
294 chr_x,
295 y - (chr_y - y),
296 0, 0,
297 chr_x,
298 y - (chr_y - y),
299 w, h);
300 else
301# endif
302#endif
303 {
304 for (i = 0; i < h; i++)
305 {
306 int dx, dy;
307 int in_x, in_w;
308
309 in_x = 0;
310 in_w = 0;
311 dx = chr_x;
312 dy = y - (chr_y - i - y);
313#ifdef EVAS_SLI
314 if (((dy) % dc->sli.h) == dc->sli.y)
315#endif
316 {
317 if ((dx < (ext_x + ext_w)) &&
318 (dy >= (ext_y)) &&
319 (dy < (ext_y + ext_h)))
320 {
321 if (dx + w > (ext_x + ext_w))
322 in_w += (dx + w) - (ext_x + ext_w);
323 if (dx < ext_x)
324 {
325 in_w += ext_x - dx;
326 in_x = ext_x - dx;
327 dx = ext_x;
328 }
329 if (in_w < w)
330 {
331 func(NULL, data + (i * j) + in_x, dc->col.col,
332 im + (dy * im_w) + dx, w - in_w);
333 }
334 }
335 }
336 }
337 }
338 }
339 else
340 {
341 DATA8 *tmpbuf = NULL, *dp, *tp, bits;
342 int bi, bj;
343 const DATA8 bitrepl[2] = {0x0, 0xff};
344
345 tmpbuf = alloca(w);
346 for (i = 0; i < h; i++)
347 {
348 int dx, dy;
349 int in_x, in_w, end;
350
351 in_x = 0;
352 in_w = 0;
353 dx = chr_x;
354 dy = y - (chr_y - i - y);
355#ifdef EVAS_SLI
356 if (((dy) % dc->sli.h) == dc->sli.y)
357#endif
358 {
359 tp = tmpbuf;
360 dp = data + (i * fg->glyph_out->bitmap.pitch);
361 for (bi = 0; bi < w; bi += 8)
362 {
363 bits = *dp;
364 if ((w - bi) < 8) end = w - bi;
365 else end = 8;
366 for (bj = 0; bj < end; bj++)
367 {
368 *tp = bitrepl[(bits >> (7 - bj)) & 0x1];
369 tp++;
370 }
371 dp++;
372 }
373 if ((dx < (ext_x + ext_w)) &&
374 (dy >= (ext_y)) &&
375 (dy < (ext_y + ext_h)))
376 {
377 if (dx + w > (ext_x + ext_w))
378 in_w += (dx + w) - (ext_x + ext_w);
379 if (dx < ext_x)
380 {
381 in_w += ext_x - dx;
382 in_x = ext_x - dx;
383 dx = ext_x;
384 }
385 if (in_w < w)
386 {
387 func(NULL, tmpbuf + in_x, dc->col.col,
388 im + (dy * im_w) + dx, w - in_w);
389 }
390 }
391 }
392 }
393 }
394 }
395 }
396 }
397#ifdef HAVE_PIXMAN
398# ifdef PIXMAN_FONT
399 pixman_image_unref(font_mask_image);
400# endif
401#endif
402 }
403 else
404 break;
405 }
406 EVAS_FONT_WALK_TEXT_END();
407 evas_common_font_int_use_trim();
408}
409
410EAPI void
411evas_common_font_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font *fn, int x, int y, const Evas_Text_Props *text_props)
412{
413 int ext_x, ext_y, ext_w, ext_h;
414 int im_w, im_h;
415 RGBA_Gfx_Func func;
416 Cutout_Rects *rects;
417 Cutout_Rect *r;
418 int c, cx, cy, cw, ch;
419 int i;
420
421 im_w = dst->cache_entry.w;
422 im_h = dst->cache_entry.h;
423
424 ext_x = 0; ext_y = 0; ext_w = im_w; ext_h = im_h;
425 if (dc->clip.use)
426 {
427 ext_x = dc->clip.x;
428 ext_y = dc->clip.y;
429 ext_w = dc->clip.w;
430 ext_h = dc->clip.h;
431 if (ext_x < 0)
432 {
433 ext_w += ext_x;
434 ext_x = 0;
435 }
436 if (ext_y < 0)
437 {
438 ext_h += ext_y;
439 ext_y = 0;
440 }
441 if ((ext_x + ext_w) > im_w)
442 ext_w = im_w - ext_x;
443 if ((ext_y + ext_h) > im_h)
444 ext_h = im_h - ext_y;
445 }
446 if (ext_w <= 0) return;
447 if (ext_h <= 0) return;
448
449#ifdef EVAS_FRAME_QUEUING
450 LKL(fn->lock);
451#endif
452// evas_common_font_size_use(fn);
453 func = evas_common_gfx_func_composite_mask_color_span_get(dc->col.col, dst, 1, dc->render_op);
454
455 if (!dc->cutout.rects)
456 {
457 evas_common_font_draw_internal(dst, dc, fn, x, y, text_props,
458 func, ext_x, ext_y, ext_w, ext_h,
459 im_w, im_h);
460 }
461 else
462 {
463 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
464 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
465 /* our clip is 0 size.. abort */
466 if ((dc->clip.w > 0) && (dc->clip.h > 0))
467 {
468 rects = evas_common_draw_context_apply_cutouts(dc);
469 for (i = 0; i < rects->active; ++i)
470 {
471 r = rects->rects + i;
472 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
473 evas_common_font_draw_internal(dst, dc, fn, x, y, text_props,
474 func, r->x, r->y, r->w, r->h,
475 im_w, im_h);
476 }
477 evas_common_draw_context_apply_clear_cutouts(rects);
478 }
479 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
480 }
481#ifdef EVAS_FRAME_QUEUING
482 LKU(fn->lock);
483#endif
484}
485
486/* Only used if cache is on */
487#if defined(METRIC_CACHE) || defined(WORD_CACHE)
488
489static Eina_Bool
490_evas_font_word_prerender_text_props_equal(const Evas_Text_Props *_a, const Evas_Text_Props *_b)
491{
492 Evas_Font_Glyph_Info *gl1, *gl2;
493 size_t i;
494
495 if ((_a->len != _b->len) ||
496 (_a->font_instance != _b->font_instance))
497 return EINA_FALSE;
498
499 gl1 = _a->info->glyph + _a->start;
500 gl2 = _b->info->glyph + _b->start;
501 i = _a->len;
502 for ( ; (i > 0) && (gl1->index == gl2->index) ; i--, gl1++, gl2++)
503 ;
504
505 return (i == 0);
506}
507
508static struct prword *
509evas_font_word_prerender(RGBA_Draw_Context *dc, const Evas_Text_Props *text_props)
510{
511 struct cinfo *metrics;
512 unsigned char *im;
513 int width;
514 int height, above, below, baseline, descent;
515 unsigned int i,j;
516 struct prword *w;
517 int last_delta = 0;
518 Eina_Unicode gl;
519 struct cinfo *ci;
520 unsigned int len = text_props->len;
521 RGBA_Font_Int *fi = (RGBA_Font_Int *) text_props->font_instance;
522 EVAS_FONT_WALK_TEXT_INIT();
523
524# ifndef METRIC_CACHE
525 gl = dc->font_ext.func.gl_new ? 1: 0;
526 if (gl) return NULL;
527# endif
528
529 LKL(lock_words);
530 EINA_INLIST_FOREACH(words,w)
531 {
532 if (_evas_font_word_prerender_text_props_equal(&w->text_props,
533 text_props))
534 {
535 words = eina_inlist_promote(words, EINA_INLIST_GET(w));
536 LKU(lock_words);
537 return w;
538 }
539 }
540 LKU(lock_words);
541
542 gl = dc->font_ext.func.gl_new ? 1: 0;
543
544 above = 0; below = 0; baseline = 0; height = 0; descent = 0;
545
546 /* First pass: Work out how big and populate */
547 metrics = malloc(sizeof(struct cinfo) * len);
548 ci = metrics;
549 EVAS_FONT_WALK_TEXT_START()
550 {
551 FT_UInt index;
552 RGBA_Font_Glyph *fg;
553 index = EVAS_FONT_WALK_INDEX;
554 LKL(fi->ft_mutex);
555 fg = evas_common_font_int_cache_glyph_get(fi, index);
556 if (!fg)
557 {
558 LKU(fi->ft_mutex);
559 continue;
560 }
561
562 LKU(fi->ft_mutex);
563 EVAS_FONT_WALK_TEXT_WORK();
564 /* Currently broken with invisible chars if (!EVAS_FONT_WALK_IS_VISIBLE) continue; */
565 ci->index = index;
566 ci->fg = fg;
567
568 if (gl)
569 {
570 ci->fg->ext_dat =dc->font_ext.func.gl_new(dc->font_ext.data,ci->fg);
571 ci->fg->ext_dat_free = dc->font_ext.func.gl_free;
572 }
573 ci->bm.data = ci->fg->glyph_out->bitmap.buffer;
574 ci->bm.w = MAX(ci->fg->glyph_out->bitmap.pitch,
575 ci->fg->glyph_out->bitmap.width);
576 ci->bm.rows = ci->fg->glyph_out->bitmap.rows;
577 ci->bm.h = ci->fg->glyph_out->top;
578 above = ci->bm.rows - (ci->bm.rows - ci->bm.h);
579 below = ci->bm.rows - ci->bm.h;
580 if (below > descent) descent = below;
581 if (above > baseline) baseline = above;
582 ci->pos.x = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF + EVAS_FONT_WALK_X_BEAR;
583 ci->pos.y = EVAS_FONT_WALK_PEN_Y + EVAS_FONT_WALK_Y_OFF + EVAS_FONT_WALK_Y_BEAR;
584 last_delta = EVAS_FONT_WALK_X_ADV -
585 (ci->bm.w + ci->fg->glyph_out->left);
586 ci++;
587 }
588 EVAS_FONT_WALK_TEXT_END();
589
590 /* First loop done */
591 width = EVAS_FONT_WALK_PEN_X;
592 if (last_delta < 0)
593 width -= last_delta;
594 width = (width & 0x7) ? width + (8 - (width & 0x7)) : width;
595
596 height = baseline + descent;
597 if (!gl)
598 {
599 im = calloc(height, width);
600 for (i = 0 ; i < len ; i ++)
601 {
602 struct cinfo *cin = metrics + i;
603
604 for (j = 0 ; j < cin->bm.rows ; j ++)
605 {
606 int correction; /* Used to remove negative inset and such */
607 if (cin->pos.x < 0)
608 correction = -cin->pos.x;
609 else
610 correction = 0;
611
612 memcpy(im + cin->pos.x + (j + baseline - cin->bm.h) * width +
613 correction,
614 cin->bm.data + j * cin->bm.w + correction,
615 cin->bm.w - correction);
616 }
617 }
618 }
619 else
620 {
621 im = NULL;
622 }
623
624 /* Save it */
625 struct prword *save;
626
627 save = malloc(sizeof(struct prword));
628 save->cinfo = metrics;
629 evas_common_text_props_content_copy_and_ref(&save->text_props, text_props);
630 save->im = im;
631 save->width = EVAS_FONT_WALK_PEN_X;
632 if (last_delta < 0)
633 save->width += last_delta;
634 save->roww = width;
635 save->height = height;
636 save->baseline = baseline;
637 LKL(lock_words);
638 words = eina_inlist_prepend(words, EINA_INLIST_GET(save));
639
640 /* Clean up if too long */
641 if (eina_inlist_count(words) > max_cached_words)
642 {
643 struct prword *last = (struct prword *)(words->last);
644
645 if (last)
646 {
647 if (last->im) free(last->im);
648 if (last->cinfo) free(last->cinfo);
649 evas_common_text_props_content_unref(&last->text_props);
650 words = eina_inlist_remove(words, EINA_INLIST_GET(last));
651 free(last);
652 }
653 }
654 LKU(lock_words);
655
656 return save;
657}
658#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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4#include <assert.h>
5
6#include "evas_font_private.h" /* for Frame-Queuing support */
7#include "evas_font_ot.h"
8
9#ifdef USE_HARFBUZZ
10# include <hb.h>
11# include <hb-ft.h>
12#endif
13
14extern FT_Library evas_ft_lib;
15
16static int font_cache_usage = 0;
17static int font_cache = 0;
18static int font_dpi = 75;
19
20static Eina_Hash *fonts_src = NULL;
21static Eina_Hash *fonts = NULL;
22static Eina_List *fonts_lru = NULL;
23static Eina_Inlist *fonts_use_lru = NULL;
24static int fonts_use_usage = 0;
25
26static void _evas_common_font_int_clear(RGBA_Font_Int *fi);
27
28static int
29_evas_font_cache_int_cmp(const RGBA_Font_Int *k1, int k1_length __UNUSED__,
30 const RGBA_Font_Int *k2, int k2_length __UNUSED__)
31{
32 /* RGBA_Font_Source->name is a stringshare */
33 if (k1->src->name == k2->src->name)
34 {
35 if (k1->size == k2->size)
36 return k1->wanted_rend - k2->wanted_rend;
37 else
38 return k1->size - k2->size;
39 }
40 return strcmp(k1->src->name, k2->src->name);
41}
42
43static int
44_evas_font_cache_int_hash(const RGBA_Font_Int *key, int key_length __UNUSED__)
45{
46 int hash;
47 unsigned int wanted_rend = key->wanted_rend;
48 hash = eina_hash_djb2(key->src->name, eina_stringshare_strlen(key->src->name) + 1);
49 hash ^= eina_hash_int32(&key->size, sizeof (int));
50 hash ^= eina_hash_int32(&wanted_rend, sizeof (int));
51 return hash;
52}
53
54static void
55_evas_common_font_source_free(RGBA_Font_Source *fs)
56{
57 FTLOCK();
58 FT_Done_Face(fs->ft.face);
59 FTUNLOCK();
60 if (fs->name) eina_stringshare_del(fs->name);
61 if (fs->file) eina_stringshare_del(fs->file);
62 free(fs);
63}
64
65static void
66_evas_common_font_int_free(RGBA_Font_Int *fi)
67{
68 FT_Done_Size(fi->ft.size);
69
70 evas_common_font_int_modify_cache_by(fi, -1);
71 _evas_common_font_int_clear(fi);
72 eina_hash_free(fi->kerning);
73
74 LKD(fi->ft_mutex);
75#ifdef USE_HARFBUZZ
76 hb_font_destroy(fi->ft.hb_font);
77#endif
78 evas_common_font_source_free(fi->src);
79 if (fi->references == 0) fonts_lru = eina_list_remove(fonts_lru, fi);
80 if (fi->fash) fi->fash->freeme(fi->fash);
81 if (fi->inuse)
82 {
83 fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi));
84 fi->inuse = 0;
85 fonts_use_usage -= fi->usage;
86 fi->usage = 0;
87 }
88 free(fi);
89}
90
91void
92evas_common_font_load_init(void)
93{
94 fonts_src = eina_hash_string_small_new(EINA_FREE_CB(_evas_common_font_source_free));
95 fonts = eina_hash_new(NULL,
96 EINA_KEY_CMP(_evas_font_cache_int_cmp),
97 EINA_KEY_HASH(_evas_font_cache_int_hash),
98 EINA_FREE_CB(_evas_common_font_int_free),
99 5);
100}
101
102void
103evas_common_font_load_shutdown(void)
104{
105 eina_hash_free(fonts);
106 fonts = NULL;
107 eina_hash_free(fonts_src);
108 fonts_src = NULL;
109}
110
111EAPI void
112evas_common_font_dpi_set(int dpi)
113{
114 font_dpi = dpi;
115}
116
117EAPI RGBA_Font_Source *
118evas_common_font_source_memory_load(const char *name, const void *data, int data_size)
119{
120 int error;
121 RGBA_Font_Source *fs;
122
123 assert(name != NULL);
124 fs = calloc(1, sizeof(RGBA_Font_Source) + data_size);
125 if (!fs) return NULL;
126 fs->data = ((unsigned char *)fs) + sizeof(RGBA_Font_Source);
127 fs->data_size = data_size;
128 fs->current_size = 0;
129 memcpy(fs->data, data, data_size);
130 FTLOCK();
131 error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face));
132 FTUNLOCK();
133 if (error)
134 {
135 free(fs);
136 return NULL;
137 }
138 fs->name = eina_stringshare_add(name);
139 fs->file = NULL;
140 FTLOCK();
141 error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
142 if (error)
143 {
144 FT_Done_Face(fs->ft.face);
145 fs->ft.face = NULL;
146 free(fs);
147 return NULL;
148 }
149 FTUNLOCK();
150 fs->ft.orig_upem = fs->ft.face->units_per_EM;
151 fs->references = 1;
152 eina_hash_direct_add(fonts_src, fs->name, fs);
153 return fs;
154}
155
156EAPI RGBA_Font_Source *
157evas_common_font_source_load(const char *name)
158{
159 RGBA_Font_Source *fs;
160
161 assert(name != NULL);
162 fs = calloc(1, sizeof(RGBA_Font_Source));
163 if (!fs) return NULL;
164 fs->data = NULL;
165 fs->data_size = 0;
166 fs->current_size = 0;
167 fs->ft.face = NULL;
168 fs->name = eina_stringshare_add(name);
169 fs->file = eina_stringshare_ref(fs->name);
170 fs->ft.orig_upem = 0;
171 fs->references = 1;
172 eina_hash_direct_add(fonts_src, fs->name, fs);
173 return fs;
174}
175
176void
177evas_common_font_source_unload(RGBA_Font_Source *fs)
178{
179 FTLOCK();
180 FT_Done_Face(fs->ft.face);
181 fs->ft.face = NULL;
182 FTUNLOCK();
183}
184
185void
186evas_common_font_source_reload(RGBA_Font_Source *fs)
187{
188 if (fs->ft.face) return;
189 if (fs->data)
190 {
191 int error;
192
193 FTLOCK();
194 error = FT_New_Memory_Face(evas_ft_lib, fs->data, fs->data_size, 0, &(fs->ft.face));
195 FTUNLOCK();
196 if (error) return;
197 FTLOCK();
198 error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
199 if (error)
200 {
201 FT_Done_Face(fs->ft.face);
202 fs->ft.face = NULL;
203 }
204 FTUNLOCK();
205 }
206 else
207 evas_common_font_source_load_complete(fs);
208}
209
210EAPI int
211evas_common_font_source_load_complete(RGBA_Font_Source *fs)
212{
213 int error;
214
215 FTLOCK();
216 error = FT_New_Face(evas_ft_lib, fs->file, 0, &(fs->ft.face));
217 if (error)
218 {
219 FTUNLOCK();
220 fs->ft.face = NULL;
221 return error;
222 }
223 error = FT_Select_Charmap(fs->ft.face, ft_encoding_unicode);
224 if (error)
225 {
226 FT_Done_Face(fs->ft.face);
227 FTUNLOCK();
228 fs->ft.face = NULL;
229 return error;
230 }
231 FTUNLOCK();
232 fs->ft.orig_upem = fs->ft.face->units_per_EM;
233 return error;
234}
235
236EAPI RGBA_Font_Source *
237evas_common_font_source_find(const char *name)
238{
239 RGBA_Font_Source *fs;
240
241 if (!name) return NULL;
242 fs = eina_hash_find(fonts_src, name);
243 if (fs)
244 {
245 fs->references++;
246 return fs;
247 }
248 return NULL;
249}
250
251EAPI void
252evas_common_font_source_free(RGBA_Font_Source *fs)
253{
254 fs->references--;
255 if (fs->references > 0) return;
256 eina_hash_del(fonts_src, fs->name, fs);
257}
258
259EAPI void
260evas_common_font_size_use(RGBA_Font *fn)
261{
262 RGBA_Font_Int *fi;
263 Eina_List *l;
264
265 EINA_LIST_FOREACH(fn->fonts, l, fi)
266 {
267 if (fi->src->current_size != fi->size)
268 {
269 evas_common_font_source_reload(fi->src);
270 FTLOCK();
271 FT_Activate_Size(fi->ft.size);
272 FTUNLOCK();
273 fi->src->current_size = fi->size;
274 }
275 }
276}
277
278static int
279_evas_common_font_double_int_cmp(const int *key1, __UNUSED__ int key1_length,
280 const int *key2, __UNUSED__ int key2_length)
281{
282 if (key1[0] - key2[0] == 0) return key1[1] - key2[1];
283 return key1[0] - key2[0];
284}
285
286static int
287_evas_common_font_double_int_hash(const unsigned int key[2], int key_length)
288{
289 return
290 eina_hash_int32(&key[0], key_length) ^
291 eina_hash_int32(&key[1], key_length);
292}
293
294static void
295_evas_common_font_int_cache_init(RGBA_Font_Int *fi)
296{
297 /* Add some font kerning cache. */
298 fi->kerning = eina_hash_new(NULL,
299 EINA_KEY_CMP(_evas_common_font_double_int_cmp),
300 EINA_KEY_HASH(_evas_common_font_double_int_hash),
301 free, 3);
302 LKI(fi->ft_mutex);
303}
304
305EAPI RGBA_Font_Int *
306evas_common_font_int_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
307{
308 RGBA_Font_Int *fi;
309
310 fi = evas_common_font_int_find(name, size, wanted_rend);
311 if (fi) return fi;
312 fi = calloc(1, sizeof(RGBA_Font_Int));
313 if (!fi) return NULL;
314 fi->src = evas_common_font_source_find(name);
315 if (!fi->src)
316 fi->src = evas_common_font_source_memory_load(name, data, data_size);
317 if (!fi->src)
318 {
319 free(fi);
320 return NULL;
321 }
322 fi->size = size;
323 _evas_common_font_int_cache_init(fi);
324 fi = evas_common_font_int_load_init(fi);
325 evas_common_font_int_load_complete(fi);
326 return fi;
327}
328
329EAPI RGBA_Font_Int *
330evas_common_font_int_load(const char *name, int size,
331 Font_Rend_Flags wanted_rend)
332{
333 RGBA_Font_Int *fi;
334
335 fi = evas_common_font_int_find(name, size, wanted_rend);
336 if (fi) return fi;
337 fi = calloc(1, sizeof(RGBA_Font_Int));
338 if (!fi) return NULL;
339 fi->src = evas_common_font_source_find(name);
340 if (!fi->src && evas_file_path_is_file(name))
341 fi->src = evas_common_font_source_load(name);
342
343 if (!fi->src)
344 {
345 free(fi);
346 return NULL;
347 }
348 fi->size = size;
349 fi->wanted_rend = wanted_rend;
350 _evas_common_font_int_cache_init(fi);
351 fi = evas_common_font_int_load_init(fi);
352// evas_common_font_int_load_complete(fi);
353 return fi;
354}
355
356EAPI RGBA_Font_Int *
357evas_common_font_int_load_init(RGBA_Font_Int *fi)
358{
359 fi->ft.size = NULL;
360 fi->references = 1;
361 eina_hash_direct_add(fonts, fi, fi);
362 return fi;
363}
364
365EAPI RGBA_Font_Int *
366evas_common_font_int_load_complete(RGBA_Font_Int *fi)
367{
368 int val, dv;
369 int ret;
370 int error;
371
372 FTLOCK();
373 error = FT_New_Size(fi->src->ft.face, &(fi->ft.size));
374 if (!error)
375 {
376 FT_Activate_Size(fi->ft.size);
377 }
378 fi->real_size = fi->size * 64;
379 error = FT_Set_Char_Size(fi->src->ft.face, 0, fi->real_size, font_dpi, font_dpi);
380 if (error)
381 {
382 fi->real_size = fi->size;
383 error = FT_Set_Pixel_Sizes(fi->src->ft.face, 0, fi->real_size);
384 }
385 FTUNLOCK();
386 if (error)
387 {
388 int i;
389 int chosen_size = 0;
390 int chosen_width = 0;
391
392 for (i = 0; i < fi->src->ft.face->num_fixed_sizes; i++)
393 {
394 int s;
395 int d, cd;
396
397 s = fi->src->ft.face->available_sizes[i].height;
398 cd = chosen_size - fi->size;
399 if (cd < 0) cd = -cd;
400 d = s - fi->size;
401 if (d < 0) d = -d;
402 if (d < cd)
403 {
404 chosen_width = fi->src->ft.face->available_sizes[i].width;
405 chosen_size = s;
406 }
407 if (d == 0) break;
408 }
409 fi->real_size = chosen_size;
410 FTLOCK();
411 error = FT_Set_Pixel_Sizes(fi->src->ft.face, chosen_width, fi->real_size);
412 FTUNLOCK();
413 if (error)
414 {
415 /* couldn't choose the size anyway... what now? */
416 }
417 }
418 fi->src->current_size = 0;
419 fi->max_h = 0;
420 val = (int)fi->src->ft.face->bbox.yMax;
421 if (fi->src->ft.face->units_per_EM != 0)
422 {
423 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
424 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
425 }
426 else ret = val;
427 fi->max_h += ret;
428 val = -(int)fi->src->ft.face->bbox.yMin;
429 if (fi->src->ft.face->units_per_EM != 0)
430 {
431 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
432 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
433 }
434 else ret = val;
435 fi->max_h += ret;
436
437 /* If the loaded font doesn't match with wanted_rend value requested by
438 * textobject and textblock, Set the runtime_rend value as FONT_REND_SLANT
439 * or FONT_REND_WEIGHT for software rendering. */
440 fi->runtime_rend = FONT_REND_REGULAR;
441 if ((fi->wanted_rend & FONT_REND_SLANT) &&
442 !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_ITALIC))
443 fi->runtime_rend |= FONT_REND_SLANT;
444
445 if ((fi->wanted_rend & FONT_REND_WEIGHT) &&
446 !(fi->src->ft.face->style_flags & FT_STYLE_FLAG_BOLD))
447 fi->runtime_rend |= FONT_REND_WEIGHT;
448
449 return fi;
450}
451
452EAPI RGBA_Font *
453evas_common_font_memory_load(const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
454{
455 RGBA_Font *fn;
456 RGBA_Font_Int *fi;
457
458 fi = evas_common_font_int_memory_load(name, size, data, data_size,
459 wanted_rend);
460 if (!fi) return NULL;
461 fn = calloc(1, sizeof(RGBA_Font));
462 if (!fn)
463 {
464 fi->references--;
465 if (fi->references == 0)
466 {
467 fonts_lru = eina_list_prepend(fonts_lru, fi);
468 evas_common_font_int_modify_cache_by(fi, 1);
469 evas_common_font_flush();
470 }
471 return NULL;
472 }
473 fn->fonts = eina_list_append(fn->fonts, fi);
474 fn->hinting = FONT_BYTECODE_HINT;
475 fi->hinting = fn->hinting;
476 fn->references = 1;
477 LKI(fn->lock);
478#ifdef EVAS_FRAME_QUEUING
479 LKI(fn->ref_fq_add);
480 LKI(fn->ref_fq_del);
481 eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del));
482#endif
483 if (fi->inuse) evas_common_font_int_promote(fi);
484 else
485 {
486 fi->inuse = 1;
487 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
488 }
489 return fn;
490}
491
492
493//ZZZ: font struct looks like:
494// fn->(fi, fi, fi, ...)
495// fi->fs
496
497EAPI RGBA_Font *
498evas_common_font_load(const char *name, int size, Font_Rend_Flags wanted_rend)
499{
500 RGBA_Font *fn;
501 RGBA_Font_Int *fi;
502
503 fi = evas_common_font_int_load(name, size, wanted_rend);
504 if (!fi) return NULL;
505 /* First font, complete load */
506 if (!fi->ft.size)
507 {
508 if (!fi->src->ft.face)
509 {
510 if (evas_common_font_source_load_complete(fi->src))
511 {
512 fi->references--;
513 if (fi->references == 0)
514 {
515 fonts_lru = eina_list_prepend(fonts_lru, fi);
516 evas_common_font_int_modify_cache_by(fi, 1);
517 evas_common_font_flush();
518 }
519 return NULL;
520 }
521 }
522 evas_common_font_int_load_complete(fi);
523 }
524 fn = calloc(1, sizeof(RGBA_Font));
525 if (!fn)
526 {
527 fi->references--;
528 if (fi->references == 0)
529 {
530 fonts_lru = eina_list_prepend(fonts_lru, fi);
531 evas_common_font_int_modify_cache_by(fi, 1);
532 evas_common_font_flush();
533 }
534 return NULL;
535 }
536
537 fn->fonts = eina_list_append(fn->fonts, fi);
538 fn->hinting = FONT_BYTECODE_HINT;
539 fi->hinting = fn->hinting;
540 fn->references = 1;
541 LKI(fn->lock);
542#ifdef EVAS_FRAME_QUEUING
543 LKI(fn->ref_fq_add);
544 LKI(fn->ref_fq_del);
545 eina_condition_new(&(fn->cond_fq_del), &(fn->ref_fq_del));
546#endif
547 if (fi->inuse) evas_common_font_int_promote(fi);
548 else
549 {
550 fi->inuse = 1;
551 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
552 }
553 return fn;
554}
555
556EAPI RGBA_Font *
557evas_common_font_add(RGBA_Font *fn, const char *name, int size, Font_Rend_Flags wanted_rend)
558{
559 RGBA_Font_Int *fi;
560
561 if (!fn) return NULL;
562 fi = evas_common_font_int_load(name, size, wanted_rend);
563 if (fi)
564 {
565 fn->fonts = eina_list_append(fn->fonts, fi);
566 fi->hinting = fn->hinting;
567 if (fi->inuse) evas_common_font_int_promote(fi);
568 else
569 {
570 fi->inuse = 1;
571 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
572 }
573 return fn;
574 }
575 return NULL;
576}
577
578EAPI RGBA_Font *
579evas_common_font_memory_add(RGBA_Font *fn, const char *name, int size, const void *data, int data_size, Font_Rend_Flags wanted_rend)
580{
581 RGBA_Font_Int *fi;
582
583 if (!fn)
584 return NULL;
585 fi = evas_common_font_int_memory_load(name, size, data, data_size, wanted_rend);
586 if (fi)
587 {
588 fn->fonts = eina_list_append(fn->fonts, fi);
589 fi->hinting = fn->hinting;
590 if (fi->inuse) evas_common_font_int_promote(fi);
591 else
592 {
593 fi->inuse = 1;
594 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
595 }
596 return fn;
597 }
598 return NULL;
599}
600
601EAPI void
602evas_common_font_free(RGBA_Font *fn)
603{
604 Eina_List *l;
605 RGBA_Font_Int *fi;
606
607 if (!fn) return;
608 fn->references--;
609 if (fn->references > 0) return;
610#ifdef EVAS_FRAME_QUEUING
611 LKL(fn->ref_fq_add);
612 LKL(fn->ref_fq_del);
613 if (fn->ref_fq[0] != fn->ref_fq[1])
614 {
615 LKU(fn->ref_fq_add);
616 LKU(fn->ref_fq_del);
617 return;
618 }
619 LKU(fn->ref_fq_add);
620 LKU(fn->ref_fq_del);
621#endif
622 EINA_LIST_FOREACH(fn->fonts, l, fi)
623 {
624 fi->references--;
625 if (fi->references == 0)
626 {
627 fonts_lru = eina_list_append(fonts_lru, fi);
628 evas_common_font_int_modify_cache_by(fi, 1);
629 }
630 }
631 evas_common_font_flush();
632 eina_list_free(fn->fonts);
633 if (fn->fash) fn->fash->freeme(fn->fash);
634 LKD(fn->lock);
635#ifdef EVAS_FRAME_QUEUING
636 LKD(fn->ref_fq_add);
637 LKD(fn->ref_fq_del);
638 eina_condition_free(&(fn->cond_fq_del));
639#endif
640 free(fn);
641}
642
643EAPI void
644evas_common_font_hinting_set(RGBA_Font *fn, Font_Hint_Flags hinting)
645{
646 Eina_List *l;
647 RGBA_Font_Int *fi;
648
649 if (!fn) return;
650 fn->hinting = hinting;
651 EINA_LIST_FOREACH(fn->fonts, l, fi)
652 {
653 fi->hinting = fn->hinting;
654 }
655}
656
657EAPI Eina_Bool
658evas_common_hinting_available(Font_Hint_Flags hinting)
659{
660 switch (hinting)
661 {
662 case FONT_NO_HINT:
663 case FONT_AUTO_HINT:
664 /* these two hinting modes are always available */
665 return EINA_TRUE;
666 case FONT_BYTECODE_HINT:
667 /* Only use the bytecode interpreter if support for the _patented_
668 * algorithms is available because the free bytecode
669 * interpreter's results are too crappy.
670 *
671 * On freetyp 2.2+, we can ask the library about support for
672 * the patented interpreter. On older versions, we need to use
673 * macros to check for it.
674 */
675#if FREETYPE_MINOR >= 2
676 return FT_Get_TrueType_Engine_Type(evas_ft_lib) >=
677 FT_TRUETYPE_ENGINE_TYPE_PATENTED;
678#else
679 /* we may not rely on TT_CONFIG_OPTION_BYTECODE_INTERPRETER
680 * here to find out whether it's supported.
681 *
682 * so, assume it is. o_O
683 */
684 return EINA_TRUE;
685#endif
686 }
687 /* shouldn't get here - need to add another case statement */
688 return EINA_FALSE;
689}
690
691EAPI RGBA_Font *
692evas_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)
693{
694 RGBA_Font *fn;
695
696 fn = evas_common_font_memory_load(name, size, data, data_size, wanted_rend);
697 if (fn) evas_common_font_hinting_set(fn, hinting);
698 return fn;
699}
700
701EAPI RGBA_Font *
702evas_common_font_hinting_load(const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
703{
704 RGBA_Font *fn;
705
706 fn = evas_common_font_load(name, size, wanted_rend);
707 if (fn) evas_common_font_hinting_set(fn, hinting);
708 return fn;
709}
710
711EAPI RGBA_Font *
712evas_common_font_hinting_add(RGBA_Font *fn, const char *name, int size, Font_Hint_Flags hinting, Font_Rend_Flags wanted_rend)
713{
714 fn = evas_common_font_add(fn, name, size, wanted_rend);
715 if (fn) evas_common_font_hinting_set(fn, hinting);
716 return fn;
717}
718
719EAPI RGBA_Font *
720evas_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)
721{
722 fn = evas_common_font_memory_add(fn, name, size, data, data_size,
723 wanted_rend);
724 if (fn) evas_common_font_hinting_set(fn, hinting);
725 return fn;
726}
727
728static void
729_evas_common_font_int_clear(RGBA_Font_Int *fi)
730{
731 int i, j, k;
732
733 LKL(fi->ft_mutex);
734 if (!fi->fash)
735 {
736 LKU(fi->ft_mutex);
737 return;
738 }
739 evas_common_font_int_modify_cache_by(fi, -1);
740 if (fi->fash)
741 {
742 for (k = 0; k <= 0xff; k++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
743 {
744 Fash_Glyph_Map2 *fmap2 = fi->fash->bucket[k];
745 if (fmap2)
746 {
747 for (j = 0; j <= 0xff; j++) // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
748 {
749 Fash_Glyph_Map *fmap = fmap2->bucket[j];
750 if (fmap)
751 {
752 for (i = 0; i <= 0xff; i++)
753 {
754 RGBA_Font_Glyph *fg = fmap->item[i];
755 if ((fg) && (fg != (void *)(-1)))
756 {
757 FT_Done_Glyph(fg->glyph);
758 /* extension calls */
759 if (fg->ext_dat_free) fg->ext_dat_free(fg->ext_dat);
760 free(fg);
761 fmap->item[i] = NULL;
762 }
763 }
764 }
765 }
766 }
767 }
768 fi->fash->freeme(fi->fash);
769 fi->fash = NULL;
770 }
771 if (fi->inuse) fonts_use_usage -= fi->usage;
772 fi->usage = 0;
773 LKU(fi->ft_mutex);
774}
775
776static Eina_Bool
777_evas_common_font_all_clear_cb(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata __UNUSED__)
778{
779 RGBA_Font_Int *fi = data;
780 _evas_common_font_int_clear(fi);
781 return 1;
782}
783
784EAPI void
785evas_common_font_all_clear(void)
786{
787 eina_hash_foreach(fonts, _evas_common_font_all_clear_cb, NULL);
788}
789
790void
791evas_common_font_int_promote(RGBA_Font_Int *fi)
792{
793 return;
794 if (fonts_use_lru == (Eina_Inlist *)fi) return;
795 if (!fi->inuse) return;
796 fonts_use_lru = eina_inlist_remove(fonts_use_lru, EINA_INLIST_GET(fi));
797 fonts_use_lru = eina_inlist_prepend(fonts_use_lru, EINA_INLIST_GET(fi));
798}
799
800void
801evas_common_font_int_use_increase(int size)
802{
803 fonts_use_usage += size;
804}
805
806void
807evas_common_font_int_use_trim(void)
808{
809 Eina_Inlist *l;
810
811 return;
812 if (fonts_use_usage <= (font_cache << 1)) return;
813 if (!fonts_use_lru) return;
814 l = fonts_use_lru->last;
815 while (l)
816 {
817 RGBA_Font_Int *fi = (RGBA_Font_Int *)l;
818 if (fonts_use_usage <= (font_cache << 1)) break;
819 // FIXME: del fi->kerning content
820 _evas_common_font_int_clear(fi);
821 evas_common_font_int_unload(fi);
822 evas_common_font_int_promote(fi);
823 l = l->prev;
824 }
825}
826
827void
828evas_common_font_int_unload(RGBA_Font_Int *fi)
829{
830 return;
831 if (!fi->src->ft.face) return;
832 _evas_common_font_int_clear(fi);
833 FT_Done_Size(fi->ft.size);
834 fi->ft.size = NULL;
835 evas_common_font_source_unload(fi->src);
836}
837
838void
839evas_common_font_int_reload(RGBA_Font_Int *fi)
840{
841 if (fi->src->ft.face) return;
842 evas_common_font_source_load_complete(fi->src);
843 return;
844 evas_common_font_source_reload(fi->src);
845 evas_common_font_int_load_complete(fi);
846}
847
848/* when the fi->references == 0 we increase this instead of really deleting
849 * we then check if the cache_useage size is larger than allowed
850 * !If the cache is NOT too large we dont delete font_int
851 * !If the cache is too large we really delete font_int */
852EAPI void
853evas_common_font_int_modify_cache_by(RGBA_Font_Int *fi, int dir)
854{
855 font_cache_usage += dir * (sizeof(RGBA_Font) + fi->usage +
856 sizeof(FT_FaceRec) + 16384); /* fudge values */
857}
858
859EAPI int
860evas_common_font_cache_get(void)
861{
862 return font_cache;
863}
864
865EAPI void
866evas_common_font_cache_set(int size)
867{
868 font_cache = size;
869 evas_common_font_flush();
870 evas_common_font_int_use_trim();
871}
872
873EAPI void
874evas_common_font_flush(void)
875{
876 if (font_cache_usage < font_cache) return;
877 while (font_cache_usage > font_cache)
878 {
879 int pfont_cache_usage;
880
881 pfont_cache_usage = font_cache_usage;
882 evas_common_font_flush_last();
883 if (pfont_cache_usage == font_cache_usage) break;
884 }
885}
886
887/* We run this when the cache gets larger than allowed size
888 * We check cache size each time a fi->references goes to 0
889 * PERFORMS: Find font_int(s) with references == 0 and delete them */
890EAPI void
891evas_common_font_flush_last(void)
892{
893 RGBA_Font_Int *fi = NULL;
894
895 if (!fonts_lru) return ;
896 fi = eina_list_data_get(fonts_lru);
897 fonts_lru = eina_list_remove_list(fonts_lru, fonts_lru);
898 eina_hash_del(fonts, fi, fi);
899}
900
901EAPI RGBA_Font_Int *
902evas_common_font_int_find(const char *name, int size,
903 Font_Rend_Flags wanted_rend)
904{
905 RGBA_Font_Int tmp_fi;
906 RGBA_Font_Source tmp_fn;
907 RGBA_Font_Int *fi;
908
909 tmp_fn.name = (char*) eina_stringshare_add(name);
910 tmp_fi.src = &tmp_fn;
911 tmp_fi.size = size;
912 tmp_fi.wanted_rend = wanted_rend;
913 fi = eina_hash_find(fonts, &tmp_fi);
914 if (fi)
915 {
916 if (fi->references == 0)
917 {
918 evas_common_font_int_modify_cache_by(fi, -1);
919 fonts_lru = eina_list_remove(fonts_lru, fi);
920 }
921 fi->references++;
922 }
923 eina_stringshare_del(tmp_fn.name);
924 return fi;
925}
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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4#include "evas_font_private.h"
5
6#include FT_OUTLINE_H
7
8FT_Library evas_ft_lib = 0;
9static int initialised = 0;
10
11LK(lock_font_draw); // for freetype2 API calls
12LK(lock_bidi); // for evas bidi internal usage.
13LK(lock_ot); // for evas bidi internal usage.
14
15EAPI void
16evas_common_font_init(void)
17{
18 int error;
19 const char *s;
20
21 initialised++;
22 if (initialised != 1) return;
23 error = FT_Init_FreeType(&evas_ft_lib);
24 if (error) return;
25 evas_common_font_load_init();
26 evas_common_font_draw_init();
27 s = getenv("EVAS_FONT_DPI");
28 if (s)
29 {
30 int dpi = atoi(s);
31
32 if (dpi > 0) evas_common_font_dpi_set(dpi);
33 }
34 LKI(lock_font_draw);
35 LKI(lock_bidi);
36 LKI(lock_ot);
37}
38
39EAPI void
40evas_common_font_shutdown(void)
41{
42 if (initialised < 1) return;
43 initialised--;
44 if (initialised != 0) return;
45
46 LKD(lock_font_draw);
47 LKD(lock_bidi);
48 LKD(lock_ot);
49
50 evas_common_font_load_shutdown();
51 evas_common_font_cache_set(0);
52 evas_common_font_flush();
53
54 FT_Done_FreeType(evas_ft_lib);
55#ifdef EVAS_FRAME_QUEUING
56 evas_common_font_draw_finish();
57#endif
58 evas_ft_lib = 0;
59}
60
61EAPI void
62evas_common_font_font_all_unload(void)
63{
64 evas_common_font_all_clear();
65}
66
67EAPI int
68evas_common_font_ascent_get(RGBA_Font *fn)
69{
70 int val;
71 RGBA_Font_Int *fi;
72
73// evas_common_font_size_use(fn);
74#if 0
75 {
76 Eina_List *l;
77
78 EINA_LIST_FOREACH(fn->fonts, l, fi)
79 {
80 if (!fi->src->ft.face) continue;
81 if (fi->src->current_size != fi->size)
82 {
83 FTLOCK();
84 FT_Activate_Size(fi->ft.size);
85 FTUNLOCK();
86 fi->src->current_size = fi->size;
87 }
88 val = (int)fi->src->ft.face->size->metrics.ascender;
89 if (fi->src->ft.face->units_per_EM == 0)
90 return val;
91 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
92 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
93 printf(" ==== %p: %i\n", fi, ret);
94 }
95 }
96#endif
97 fi = fn->fonts->data;
98 evas_common_font_int_reload(fi);
99 if (fi->src->current_size != fi->size)
100 {
101 FTLOCK();
102 FT_Activate_Size(fi->ft.size);
103 FTUNLOCK();
104 fi->src->current_size = fi->size;
105 }
106 if (!FT_IS_SCALABLE(fi->src->ft.face))
107 {
108 WRN("NOT SCALABLE!");
109 }
110 val = (int)fi->src->ft.face->size->metrics.ascender;
111 return val >> 6;
112// printf("%i | %i\n", val, val >> 6);
113// if (fi->src->ft.face->units_per_EM == 0)
114// return val;
115// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
116// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
117// return ret;
118}
119
120EAPI int
121evas_common_font_descent_get(RGBA_Font *fn)
122{
123 int val;
124 RGBA_Font_Int *fi;
125
126// evas_common_font_size_use(fn);
127 fi = fn->fonts->data;
128 evas_common_font_int_reload(fi);
129 if (fi->src->current_size != fi->size)
130 {
131 FTLOCK();
132 FT_Activate_Size(fi->ft.size);
133 FTUNLOCK();
134 fi->src->current_size = fi->size;
135 }
136 val = -(int)fi->src->ft.face->size->metrics.descender;
137 return val >> 6;
138// if (fi->src->ft.face->units_per_EM == 0)
139// return val;
140// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
141// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
142// return ret;
143}
144
145EAPI int
146evas_common_font_max_ascent_get(RGBA_Font *fn)
147{
148 int val, dv;
149 int ret;
150 RGBA_Font_Int *fi;
151
152// evas_common_font_size_use(fn);
153 fi = fn->fonts->data;
154 evas_common_font_int_reload(fi);
155 if (fi->src->current_size != fi->size)
156 {
157 FTLOCK();
158 FT_Activate_Size(fi->ft.size);
159 FTUNLOCK();
160 fi->src->current_size = fi->size;
161 }
162 val = (int)fi->src->ft.face->bbox.yMax;
163 if (fi->src->ft.face->units_per_EM == 0)
164 return val;
165 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
166 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
167 return ret;
168}
169
170EAPI int
171evas_common_font_max_descent_get(RGBA_Font *fn)
172{
173 int val, dv;
174 int ret;
175 RGBA_Font_Int *fi;
176
177// evas_common_font_size_use(fn);
178 fi = fn->fonts->data;
179 evas_common_font_int_reload(fi);
180 if (fi->src->current_size != fi->size)
181 {
182 FTLOCK();
183 FT_Activate_Size(fi->ft.size);
184 FTUNLOCK();
185 fi->src->current_size = fi->size;
186 }
187 val = -(int)fi->src->ft.face->bbox.yMin;
188 if (fi->src->ft.face->units_per_EM == 0)
189 return val;
190 dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
191 ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
192 return ret;
193}
194
195EAPI int
196evas_common_font_get_line_advance(RGBA_Font *fn)
197{
198 int val;
199 RGBA_Font_Int *fi;
200
201// evas_common_font_size_use(fn);
202 fi = fn->fonts->data;
203 evas_common_font_int_reload(fi);
204 if (fi->src->current_size != fi->size)
205 {
206 FTLOCK();
207 FT_Activate_Size(fi->ft.size);
208 FTUNLOCK();
209 fi->src->current_size = fi->size;
210 }
211 val = (int)fi->src->ft.face->size->metrics.height;
212 if (fi->src->ft.face->units_per_EM == 0)
213 return val;
214 return val >> 6;
215// dv = (fi->src->ft.orig_upem * 2048) / fi->src->ft.face->units_per_EM;
216// ret = (val * fi->src->ft.face->size->metrics.y_scale) / (dv * dv);
217// return ret;
218}
219
220/* Set of common functions that are used in a couple of places. */
221
222static void
223_fash_int2_free(Fash_Int_Map2 *fash)
224{
225 int i;
226
227 for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
228 free(fash);
229}
230
231static void
232_fash_int_free(Fash_Int *fash)
233{
234 int i;
235
236 for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_int2_free(fash->bucket[i]);
237 free(fash);
238}
239
240static Fash_Int *
241_fash_int_new(void)
242{
243 Fash_Int *fash = calloc(1, sizeof(Fash_Int));
244 fash->freeme = _fash_int_free;
245 return fash;
246}
247
248static Fash_Item_Index_Map *
249_fash_int_find(Fash_Int *fash, int item)
250{
251 int grp, maj, min;
252
253 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
254 grp = (item >> 16) & 0xff;
255 maj = (item >> 8) & 0xff;
256 min = item & 0xff;
257 if (!fash->bucket[grp]) return NULL;
258 if (!fash->bucket[grp]->bucket[maj]) return NULL;
259 return &(fash->bucket[grp]->bucket[maj]->item[min]);
260}
261
262static void
263_fash_int_add(Fash_Int *fash, int item, RGBA_Font_Int *fint, int idx)
264{
265 int grp, maj, min;
266
267 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
268 grp = (item >> 16) & 0xff;
269 maj = (item >> 8) & 0xff;
270 min = item & 0xff;
271 if (!fash->bucket[grp])
272 fash->bucket[grp] = calloc(1, sizeof(Fash_Int_Map2));
273 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
274 if (!fash->bucket[grp]->bucket[maj])
275 fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Int_Map));
276 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
277 fash->bucket[grp]->bucket[maj]->item[min].fint = fint;
278 fash->bucket[grp]->bucket[maj]->item[min].index = idx;
279}
280
281static void
282_fash_gl2_free(Fash_Glyph_Map2 *fash)
283{
284 int i;
285
286 for (i = 0; i < 256; i++) if (fash->bucket[i]) free(fash->bucket[i]);
287 free(fash);
288}
289
290static void
291_fash_gl_free(Fash_Glyph *fash)
292{
293 int i;
294
295 for (i = 0; i < 256; i++) if (fash->bucket[i]) _fash_gl2_free(fash->bucket[i]);
296 free(fash);
297}
298
299static Fash_Glyph *
300_fash_gl_new(void)
301{
302 Fash_Glyph *fash = calloc(1, sizeof(Fash_Glyph));
303 fash->freeme = _fash_gl_free;
304 return fash;
305}
306
307static RGBA_Font_Glyph *
308_fash_gl_find(Fash_Glyph *fash, int item)
309{
310 int grp, maj, min;
311
312 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
313 grp = (item >> 16) & 0xff;
314 maj = (item >> 8) & 0xff;
315 min = item & 0xff;
316 if (!fash->bucket[grp]) return NULL;
317 if (!fash->bucket[grp]->bucket[maj]) return NULL;
318 return fash->bucket[grp]->bucket[maj]->item[min];
319}
320
321static void
322_fash_gl_add(Fash_Glyph *fash, int item, RGBA_Font_Glyph *glyph)
323{
324 int grp, maj, min;
325
326 // 24bits for unicode - v6 up to E01EF (chrs) & 10FFFD for private use (plane 16)
327 grp = (item >> 16) & 0xff;
328 maj = (item >> 8) & 0xff;
329 min = item & 0xff;
330 if (!fash->bucket[grp])
331 fash->bucket[grp] = calloc(1, sizeof(Fash_Glyph_Map2));
332 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]);
333 if (!fash->bucket[grp]->bucket[maj])
334 fash->bucket[grp]->bucket[maj] = calloc(1, sizeof(Fash_Glyph_Map));
335 EINA_SAFETY_ON_NULL_RETURN(fash->bucket[grp]->bucket[maj]);
336 fash->bucket[grp]->bucket[maj]->item[min] = glyph;
337}
338
339EAPI RGBA_Font_Glyph *
340evas_common_font_int_cache_glyph_get(RGBA_Font_Int *fi, FT_UInt idx)
341{
342 RGBA_Font_Glyph *fg;
343 FT_UInt hindex;
344 FT_Error error;
345 int size;
346 const FT_Int32 hintflags[3] =
347 { FT_LOAD_NO_HINTING, FT_LOAD_FORCE_AUTOHINT, FT_LOAD_NO_AUTOHINT };
348 static FT_Matrix transform = {0x10000, 0x05000, 0x0000, 0x10000}; // about 12 degree.
349
350 evas_common_font_int_promote(fi);
351 if (fi->fash)
352 {
353 fg = _fash_gl_find(fi->fash, idx);
354 if (fg == (void *)(-1)) return NULL;
355 else if (fg) return fg;
356 }
357
358 hindex = idx + (fi->hinting * 500000000);
359
360// fg = eina_hash_find(fi->glyphs, &hindex);
361// if (fg) return fg;
362
363 evas_common_font_int_reload(fi);
364 FTLOCK();
365 error = FT_Load_Glyph(fi->src->ft.face, idx,
366 FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP |
367 hintflags[fi->hinting]);
368 FTUNLOCK();
369 if (error)
370 {
371 if (!fi->fash) fi->fash = _fash_gl_new();
372 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
373 return NULL;
374 }
375
376 /* Transform the outline of Glyph according to runtime_rend. */
377 if (fi->runtime_rend & FONT_REND_SLANT)
378 FT_Outline_Transform(&fi->src->ft.face->glyph->outline, &transform);
379 /* Embolden the outline of Glyph according to rundtime_rend. */
380 if (fi->runtime_rend & FONT_REND_WEIGHT)
381 FT_Outline_Embolden(&fi->src->ft.face->glyph->outline,
382 (fi->src->ft.face->size->metrics.x_ppem * 5 * 64) / 100);
383
384 fg = malloc(sizeof(struct _RGBA_Font_Glyph));
385 if (!fg) return NULL;
386 memset(fg, 0, (sizeof(struct _RGBA_Font_Glyph)));
387
388 FTLOCK();
389 error = FT_Get_Glyph(fi->src->ft.face->glyph, &(fg->glyph));
390 FTUNLOCK();
391 if (error)
392 {
393 free(fg);
394 if (!fi->fash) fi->fash = _fash_gl_new();
395 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
396 return NULL;
397 }
398
399 FTLOCK();
400 error = FT_Glyph_To_Bitmap(&(fg->glyph), FT_RENDER_MODE_NORMAL, 0, 1);
401 if (error)
402 {
403 FT_Done_Glyph(fg->glyph);
404 FTUNLOCK();
405 free(fg);
406 if (!fi->fash) fi->fash = _fash_gl_new();
407 if (fi->fash) _fash_gl_add(fi->fash, idx, (void *)(-1));
408 return NULL;
409 }
410 FTUNLOCK();
411
412 fg->glyph_out = (FT_BitmapGlyph)fg->glyph;
413 fg->index = hindex;
414 fg->fi = fi;
415
416 if (!fi->fash) fi->fash = _fash_gl_new();
417 if (fi->fash) _fash_gl_add(fi->fash, idx, fg);
418 /* This '+ 200' is just an estimation of how much memory freetype will use
419 * on it's size. This value is not really used anywhere in code - it's
420 * only for statistics. */
421 size = sizeof(RGBA_Font_Glyph) + sizeof(Eina_List) +
422 (fg->glyph_out->bitmap.width * fg->glyph_out->bitmap.rows) + 200;
423 fi->usage += size;
424 if (fi->inuse) evas_common_font_int_use_increase(size);
425
426// eina_hash_direct_add(fi->glyphs, &fg->index, fg);
427 return fg;
428}
429
430typedef struct _Font_Char_Index Font_Char_Index;
431struct _Font_Char_Index
432{
433 FT_UInt index;
434 Eina_Unicode gl;
435};
436
437EAPI FT_UInt
438evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl)
439{
440 Font_Char_Index result;
441 //FT_UInt ret;
442
443#ifdef HAVE_PTHREAD
444/// pthread_mutex_lock(&fi->ft_mutex);
445#endif
446
447// result = eina_hash_find(fi->indexes, &gl);
448// if (result) goto on_correct;
449//
450// result = malloc(sizeof (Font_Char_Index));
451// if (!result)
452// {
453//#ifdef HAVE_PTHREAD
454// pthread_mutex_unlock(&fi->ft_mutex);
455//#endif
456// return FT_Get_Char_Index(fi->src->ft.face, gl);
457// }
458
459 evas_common_font_int_reload(fi);
460 FTLOCK();
461 result.index = FT_Get_Char_Index(fi->src->ft.face, gl);
462 FTUNLOCK();
463 result.gl = gl;
464
465// eina_hash_direct_add(fi->indexes, &result->gl, result);
466//
467// on_correct:
468#ifdef HAVE_PTHREAD
469// pthread_mutex_unlock(&fi->ft_mutex);
470#endif
471 return result.index;
472}
473
474EAPI int
475evas_common_font_glyph_search(RGBA_Font *fn, RGBA_Font_Int **fi_ret, Eina_Unicode gl)
476{
477 Eina_List *l;
478
479 if (fn->fash)
480 {
481 Fash_Item_Index_Map *fm = _fash_int_find(fn->fash, gl);
482 if (fm)
483 {
484 if (fm->fint)
485 {
486 *fi_ret = fm->fint;
487 return fm->index;
488 }
489 else if (fm->index == -1) return 0;
490 }
491 }
492
493 for (l = fn->fonts; l; l = l->next)
494 {
495 RGBA_Font_Int *fi;
496 int idx;
497
498 fi = l->data;
499
500#if 0 /* FIXME: charmap user is disabled and use a deprecated data type. */
501/*
502 if (fi->src->charmap) // Charmap loaded, FI/FS blank
503 {
504 idx = evas_array_hash_search(fi->src->charmap, gl);
505 if (idx != 0)
506 {
507 evas_common_font_source_load_complete(fi->src);
508 evas_common_font_int_load_complete(fi);
509
510 evas_array_hash_free(fi->src->charmap);
511 fi->src->charmap = NULL;
512
513 *fi_ret = fi;
514 return idx;
515 }
516 }
517 else
518*/
519#endif
520 if (!fi->src->ft.face) /* Charmap not loaded, FI/FS blank */
521 {
522 evas_common_font_int_reload(fi);
523 }
524 if (fi->src->ft.face)
525 {
526 idx = evas_common_get_char_index(fi, gl);
527 if (idx != 0)
528 {
529 if (!fi->ft.size)
530 evas_common_font_int_load_complete(fi);
531 if (!fn->fash) fn->fash = _fash_int_new();
532 if (fn->fash) _fash_int_add(fn->fash, gl, fi, idx);
533 *fi_ret = fi;
534 return idx;
535 }
536 else
537 {
538 if (!fn->fash) fn->fash = _fash_int_new();
539 if (fn->fash) _fash_int_add(fn->fash, gl, NULL, -1);
540 }
541 }
542 }
543 *fi_ret = NULL;
544 return 0;
545}
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 @@
1#include "evas_font_ot.h"
2
3#ifdef USE_HARFBUZZ
4# include <hb.h>
5# include <hb-ft.h>
6#endif
7
8#include "evas_common.h"
9
10#include <Eina.h>
11#include "evas_font_private.h"
12
13#ifdef USE_HARFBUZZ
14static const hb_script_t
15_evas_script_to_harfbuzz[] =
16{
17 HB_SCRIPT_COMMON,
18 HB_SCRIPT_INHERITED,
19 HB_SCRIPT_ARABIC,
20 HB_SCRIPT_ARMENIAN,
21 HB_SCRIPT_BENGALI,
22 HB_SCRIPT_BOPOMOFO,
23 HB_SCRIPT_CHEROKEE,
24 HB_SCRIPT_COPTIC,
25 HB_SCRIPT_CYRILLIC,
26 HB_SCRIPT_DESERET,
27 HB_SCRIPT_DEVANAGARI,
28 HB_SCRIPT_ETHIOPIC,
29 HB_SCRIPT_GEORGIAN,
30 HB_SCRIPT_GOTHIC,
31 HB_SCRIPT_GREEK,
32 HB_SCRIPT_GUJARATI,
33 HB_SCRIPT_GURMUKHI,
34 HB_SCRIPT_HAN,
35 HB_SCRIPT_HANGUL,
36 HB_SCRIPT_HEBREW,
37 HB_SCRIPT_HIRAGANA,
38 HB_SCRIPT_KANNADA,
39 HB_SCRIPT_KATAKANA,
40 HB_SCRIPT_KHMER,
41 HB_SCRIPT_LAO,
42 HB_SCRIPT_LATIN,
43 HB_SCRIPT_MALAYALAM,
44 HB_SCRIPT_MONGOLIAN,
45 HB_SCRIPT_MYANMAR,
46 HB_SCRIPT_OGHAM,
47 HB_SCRIPT_OLD_ITALIC,
48 HB_SCRIPT_ORIYA,
49 HB_SCRIPT_RUNIC,
50 HB_SCRIPT_SINHALA,
51 HB_SCRIPT_SYRIAC,
52 HB_SCRIPT_TAMIL,
53 HB_SCRIPT_TELUGU,
54 HB_SCRIPT_THAANA,
55 HB_SCRIPT_THAI,
56 HB_SCRIPT_TIBETAN,
57 HB_SCRIPT_CANADIAN_ABORIGINAL,
58 HB_SCRIPT_YI,
59 HB_SCRIPT_TAGALOG,
60 HB_SCRIPT_HANUNOO,
61 HB_SCRIPT_BUHID,
62 HB_SCRIPT_TAGBANWA,
63
64 /* Unicode-4.0 additions */
65 HB_SCRIPT_BRAILLE,
66 HB_SCRIPT_CYPRIOT,
67 HB_SCRIPT_LIMBU,
68 HB_SCRIPT_OSMANYA,
69 HB_SCRIPT_SHAVIAN,
70 HB_SCRIPT_LINEAR_B,
71 HB_SCRIPT_TAI_LE,
72 HB_SCRIPT_UGARITIC,
73
74 /* Unicode-4.1 additions */
75 HB_SCRIPT_NEW_TAI_LUE,
76 HB_SCRIPT_BUGINESE,
77 HB_SCRIPT_GLAGOLITIC,
78 HB_SCRIPT_TIFINAGH,
79 HB_SCRIPT_SYLOTI_NAGRI,
80 HB_SCRIPT_OLD_PERSIAN,
81 HB_SCRIPT_KHAROSHTHI,
82
83 /* Unicode-5.0 additions */
84 HB_SCRIPT_UNKNOWN,
85 HB_SCRIPT_BALINESE,
86 HB_SCRIPT_CUNEIFORM,
87 HB_SCRIPT_PHOENICIAN,
88 HB_SCRIPT_PHAGS_PA,
89 HB_SCRIPT_NKO,
90
91 /* Unicode-5.1 additions */
92 HB_SCRIPT_KAYAH_LI,
93 HB_SCRIPT_LEPCHA,
94 HB_SCRIPT_REJANG,
95 HB_SCRIPT_SUNDANESE,
96 HB_SCRIPT_SAURASHTRA,
97 HB_SCRIPT_CHAM,
98 HB_SCRIPT_OL_CHIKI,
99 HB_SCRIPT_VAI,
100 HB_SCRIPT_CARIAN,
101 HB_SCRIPT_LYCIAN,
102 HB_SCRIPT_LYDIAN,
103
104 /* Unicode-5.2 additions */
105 HB_SCRIPT_AVESTAN,
106 HB_SCRIPT_BAMUM,
107 HB_SCRIPT_EGYPTIAN_HIEROGLYPHS,
108 HB_SCRIPT_IMPERIAL_ARAMAIC,
109 HB_SCRIPT_INSCRIPTIONAL_PAHLAVI,
110 HB_SCRIPT_INSCRIPTIONAL_PARTHIAN,
111 HB_SCRIPT_JAVANESE,
112 HB_SCRIPT_KAITHI,
113 HB_SCRIPT_TAI_THAM,
114 HB_SCRIPT_LISU,
115 HB_SCRIPT_MEETEI_MAYEK,
116 HB_SCRIPT_OLD_SOUTH_ARABIAN,
117 HB_SCRIPT_OLD_TURKIC,
118 HB_SCRIPT_SAMARITAN,
119 HB_SCRIPT_TAI_VIET,
120
121 /* Unicode-6.0 additions */
122 HB_SCRIPT_BATAK,
123 HB_SCRIPT_BRAHMI,
124 HB_SCRIPT_MANDAIC
125};
126#endif
127
128#ifdef OT_SUPPORT
129/* FIXME: doc. returns #items */
130EAPI int
131evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index)
132{
133 int i;
134 int items;
135 int left_bound, right_bound;
136 size_t base_cluster;
137 char_index += props->start;
138 base_cluster = EVAS_FONT_OT_POS_GET(props->info->ot[char_index]);
139 for (i = (int) char_index ;
140 (i >= (int) props->start) &&
141 (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ;
142 i--)
143 ;
144 left_bound = i;
145 for (i = (int) char_index + 1;
146 (i < (int) (props->start + props->len)) &&
147 (EVAS_FONT_OT_POS_GET(props->info->ot[i]) == base_cluster) ;
148 i++)
149 ;
150 right_bound = i;
151
152 if (right_bound == left_bound)
153 {
154 items = 1;
155 }
156 else if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
157 {
158 if (left_bound < 0)
159 {
160 items = props->text_offset + props->text_len - base_cluster;
161 }
162 else
163 {
164 items = props->info->ot[left_bound].source_cluster - base_cluster;
165 }
166 }
167 else
168 {
169 if (right_bound >= (int) (props->text_offset + props->text_len))
170 {
171 items = props->text_offset + props->text_len - base_cluster;
172 }
173 else
174 {
175 items = props->info->ot[right_bound].source_cluster - base_cluster;
176 }
177 }
178 return (items > 0) ? items : 1;
179}
180
181/* Harfbuzz font functions */
182
183static hb_position_t
184_evas_common_font_ot_hb_get_glyph_advance(hb_font_t *font,
185 void *font_data, hb_codepoint_t glyph,
186 void *user_data)
187{
188 /* Use our cache*/
189 RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data;
190 RGBA_Font_Glyph *fg;
191 (void) font;
192 (void) user_data;
193 fg = evas_common_font_int_cache_glyph_get(fi, glyph);
194 if (fg)
195 {
196 return fg->glyph->advance.x >> 10;
197 }
198 return 0;
199}
200
201static hb_position_t
202_evas_common_font_ot_hb_get_kerning(hb_font_t *font, void *font_data,
203 hb_codepoint_t first_glyph, hb_codepoint_t second_glyph, void *user_data)
204{
205 RGBA_Font_Int *fi = (RGBA_Font_Int *) font_data;
206 int kern;
207 (void) font;
208 (void) user_data;
209 if (evas_common_font_query_kerning(fi, first_glyph, second_glyph, &kern))
210 return kern;
211
212 return 0;
213}
214
215/* End of harfbuzz font funcs */
216
217static inline hb_font_funcs_t *
218_evas_common_font_ot_font_funcs_get(void)
219{
220 static hb_font_funcs_t *font_funcs = NULL;
221 if (!font_funcs)
222 {
223 font_funcs = hb_font_funcs_create();
224 hb_font_funcs_set_glyph_h_advance_func(font_funcs,
225 _evas_common_font_ot_hb_get_glyph_advance, NULL, NULL);
226 hb_font_funcs_set_glyph_h_kerning_func(font_funcs,
227 _evas_common_font_ot_hb_get_kerning, NULL, NULL);
228 }
229
230 return font_funcs;
231}
232
233static inline hb_unicode_funcs_t *
234_evas_common_font_ot_unicode_funcs_get(void)
235{
236 static hb_unicode_funcs_t *unicode_funcs = NULL;
237 if (!unicode_funcs)
238 {
239 unicode_funcs = hb_unicode_funcs_get_default();
240 }
241
242 return unicode_funcs;
243}
244
245static void
246_evas_common_font_ot_shape(hb_buffer_t *buffer, RGBA_Font_Int *fi)
247{
248 /* Create hb_font if not previously created */
249 if (!fi->ft.hb_font)
250 {
251 hb_font_t *hb_ft_font;
252
253 hb_ft_font = hb_ft_font_create(fi->src->ft.face, NULL);
254 fi->ft.hb_font = hb_font_create_sub_font(hb_ft_font);
255 hb_font_destroy(hb_ft_font);
256
257 hb_font_set_funcs(fi->ft.hb_font,
258 _evas_common_font_ot_font_funcs_get(), fi, NULL);
259 }
260
261 hb_shape(fi->ft.hb_font, buffer, NULL, 0);
262}
263
264EAPI Eina_Bool
265evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
266 Evas_Text_Props *props, int len)
267{
268 RGBA_Font_Int *fi;
269 hb_buffer_t *buffer;
270 hb_glyph_position_t *positions;
271 hb_glyph_info_t *infos;
272 int slen;
273 unsigned int i;
274 Evas_Font_Glyph_Info *gl_itr;
275 Evas_Font_OT_Info *ot_itr;
276 Evas_Coord pen_x = 0;
277
278 fi = props->font_instance;
279
280 if (len < 0)
281 {
282 slen = eina_unicode_strlen(text);
283 }
284 else
285 {
286 slen = len;
287 }
288
289 buffer = hb_buffer_create();
290 hb_buffer_set_unicode_funcs(buffer, _evas_common_font_ot_unicode_funcs_get());
291 hb_buffer_set_language(buffer, hb_language_from_string(
292 evas_common_language_from_locale_get(), -1));
293 hb_buffer_set_script(buffer, _evas_script_to_harfbuzz[props->script]);
294 hb_buffer_set_direction(buffer,
295 (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) ?
296 HB_DIRECTION_RTL : HB_DIRECTION_LTR);
297 /* FIXME: add run-time conversions if needed, which is very unlikely */
298 hb_buffer_add_utf32(buffer, (const uint32_t *) text, slen, 0, slen);
299
300 _evas_common_font_ot_shape(buffer, fi);
301
302 props->len = hb_buffer_get_length(buffer);
303 props->info->ot = calloc(props->len,
304 sizeof(Evas_Font_OT_Info));
305 props->info->glyph = calloc(props->len,
306 sizeof(Evas_Font_Glyph_Info));
307 positions = hb_buffer_get_glyph_positions(buffer, NULL);
308 infos = hb_buffer_get_glyph_infos(buffer, NULL);
309 gl_itr = props->info->glyph;
310 ot_itr = props->info->ot;
311 for (i = 0 ; i < props->len ; i++)
312 {
313 Evas_Coord adv;
314 ot_itr->source_cluster = infos->cluster;
315 ot_itr->x_offset = positions->x_offset;
316 ot_itr->y_offset = positions->y_offset;
317 gl_itr->index = infos->codepoint;
318 adv = positions->x_advance;
319
320 pen_x += adv;
321 gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
322
323 ot_itr++;
324 gl_itr++;
325 infos++;
326 positions++;
327 }
328
329 hb_buffer_destroy(buffer);
330 evas_common_font_int_use_trim();
331
332 return EINA_FALSE;
333}
334
335#endif
336
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 @@
1#ifndef _EVAS_FONT_OT_H
2# define _EVAS_FONT_OT_H
3
4# ifdef HAVE_CONFIG_H
5# include "config.h"
6# endif
7
8# ifdef HAVE_HARFBUZZ
9# define OT_SUPPORT
10# define USE_HARFBUZZ
11# endif
12
13# ifdef OT_SUPPORT
14# include <stdlib.h>
15typedef struct _Evas_Font_OT_Info Evas_Font_OT_Info;
16# else
17typedef void *Evas_Font_OT_Info;
18# endif
19
20# include "Evas.h"
21
22# ifdef OT_SUPPORT
23struct _Evas_Font_OT_Info
24{
25 size_t source_cluster;
26 Evas_Coord x_offset;
27 Evas_Coord y_offset;
28};
29# endif
30
31# ifdef OT_SUPPORT
32# define EVAS_FONT_OT_X_OFF_GET(a) ((a).x_offset)
33# define EVAS_FONT_OT_Y_OFF_GET(a) ((a).y_offset)
34# define EVAS_FONT_OT_POS_GET(a) ((a).source_cluster)
35# endif
36
37# include "evas_text_utils.h"
38EAPI int
39evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_index);
40
41EAPI Eina_Bool
42evas_common_font_ot_populate_text_props(const Eina_Unicode *text,
43 Evas_Text_Props *props, int len);
44#endif
45
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 @@
1#ifndef _EVAS_FONT_PRIVATE_H
2# define _EVAS_FONT_PRIVATE_H
3#include "evas_font_ot.h"
4
5#ifdef BUILD_PTHREAD
6extern LK(lock_font_draw); // for freetype2 API calls
7extern LK(lock_bidi); // for fribidi API calls
8extern LK(lock_ot); // for harfbuzz calls
9#endif
10
11# if defined(EVAS_FRAME_QUEUING) || defined(BUILD_PIPE_RENDER)
12# define FTLOCK() LKL(lock_font_draw)
13# define FTUNLOCK() LKU(lock_font_draw)
14
15# define BIDILOCK() LKL(lock_bidi)
16# define BIDIUNLOCK() LKU(lock_bidi)
17
18# define OTLOCK() LKL(lock_ot)
19# define OTUNLOCK() LKU(lock_ot)
20# else
21# define FTLOCK(x)
22# define FTUNLOCK(x)
23
24# define BIDILOCK()
25# define BIDIUNLOCK()
26
27/* Macros for text walking */
28# define OTLOCK()
29# define OTUNLOCK()
30# endif
31
32void evas_common_font_source_unload(RGBA_Font_Source *fs);
33void evas_common_font_source_reload(RGBA_Font_Source *fs);
34
35void evas_common_font_int_promote(RGBA_Font_Int *fi);
36void evas_common_font_int_use_increase(int size);
37void evas_common_font_int_use_trim(void);
38void evas_common_font_int_unload(RGBA_Font_Int *fi);
39void evas_common_font_int_reload(RGBA_Font_Int *fi);
40
41/* 6th bit is on is the same as frac part >= 0.5 */
42# define EVAS_FONT_ROUND_26_6_TO_INT(x) \
43 (((x + 0x20) & -0x40) >> 6)
44
45# define EVAS_FONT_CHARACTER_IS_INVISIBLE(x) ( \
46 ((0x200C <= (x)) && ((x) <= 0x200D)) || /* ZWNJ..ZWH */ \
47 ((0x200E <= (x)) && ((x) <= 0x200F)) || /* BIDI stuff */ \
48 ((0x202A <= (x)) && ((x) <= 0x202E)) /* BIDI stuff */ \
49 )
50
51# include "evas_font_default_walk.x"
52#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 @@
1#include "evas_common.h"
2#include "language/evas_bidi_utils.h" /*defines BIDI_SUPPORT if possible */
3#include "evas_font_private.h" /* for Frame-Queuing support */
4#include "evas_font_ot.h"
5
6
7/* FIXME: Check coverage according to the font and not by actually loading */
8/**
9 * @internal
10 * Find the end of a run according to font coverage, and return the base script
11 * font and the current wanted font.
12 *
13 * @param[in] fn the font to use.
14 * @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.
15 * @param[out] cur_fi The font instance found for the current run.
16 * @param[in] script the base script
17 * @param[in] text the text to work on.
18 * @param[in] run_let the current run len, i.e "search limit".
19 * @return length of the run found.
20 */
21EAPI int
22evas_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)
23{
24 RGBA_Font_Int *fi = NULL;
25 const Eina_Unicode *run_end = text + run_len;
26 const Eina_Unicode *itr;
27
28 /* If there's no current script_fi, find it first */
29 if (!*script_fi)
30 {
31 const Eina_Unicode *base_char = NULL;
32 /* Skip common chars */
33 for (base_char = text ;
34 (base_char < run_end) &&
35 (evas_common_language_char_script_get(*base_char) != script) ;
36 base_char++)
37 ;
38 if (base_char == run_end) base_char = text;
39
40 /* Find the first renderable char */
41 while (base_char < run_end)
42 {
43 /* 0x1F is the last ASCII contral char, just a hack in
44 * the meanwhile. */
45 if ((*base_char > 0x1F) &&
46 evas_common_font_glyph_search(fn, &fi, *base_char))
47 break;
48 base_char++;
49 }
50
51
52 /* If everything else fails, at least try to find a font for the
53 * replacement char */
54 if (base_char == run_end)
55 evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
56
57 if (!fi)
58 fi = fn->fonts->data;
59
60 *script_fi = fi;
61 }
62 else
63 {
64 fi = *script_fi;
65 }
66
67 /* Find the longest run of the same font starting from the start position
68 * and update cur_fi accordingly. */
69 itr = text;
70 while (itr < run_end)
71 {
72 RGBA_Font_Int *tmp_fi;
73 /* Itr will end up being the first of the next run */
74 for ( ; itr < run_end ; itr++)
75 {
76 /* 0x1F is the last ASCII contral char, just a hack in
77 * the meanwhile. */
78 if (*itr <= 0x1F)
79 continue;
80 /* Break if either it's not in the font, or if it is in the
81 * script's font. */
82 if (fi == *script_fi)
83 {
84 if (!evas_common_get_char_index(fi, *itr))
85 break;
86 }
87 else
88 {
89 if (evas_common_get_char_index(*script_fi, *itr))
90 break;
91 }
92 }
93
94 /* Abort if we reached the end */
95 if (itr == run_end)
96 break;
97
98 /* If the script font doesn't fit even one char, find a new font. */
99 if (itr == text)
100 {
101 /* If we can find a font, use it. Otherwise, find the first
102 * char the run of chars that can't be rendered until the first
103 * one that can. */
104 if (evas_common_font_glyph_search(fn, &tmp_fi, *itr))
105 {
106 fi = tmp_fi;
107 }
108 else
109 {
110 itr++;
111 /* Go through all the chars that can't be rendered with any
112 * font */
113 for ( ; itr < run_end ; itr++)
114 {
115 tmp_fi = fi;
116 if (evas_common_get_char_index(fi, *itr) ||
117 evas_common_font_glyph_search(fn, &tmp_fi, *itr))
118 {
119 fi = tmp_fi;
120 break;
121 }
122 }
123
124 /* If we found a renderable character and the found font
125 * can render the replacement char, continue, otherwise
126 * find a font most suitable for the replacement char and
127 * break */
128 if ((itr == run_end) ||
129 !evas_common_get_char_index(fi, REPLACEMENT_CHAR))
130 {
131 evas_common_font_glyph_search(fn, &fi, REPLACEMENT_CHAR);
132 break;
133 }
134 }
135 itr++;
136 }
137 else
138 {
139 /* If this char is not renderable by any font, but the replacement
140 * char can be rendered using the currentfont, continue this
141 * run. */
142 if (!evas_common_font_glyph_search(fn, &tmp_fi, *itr) &&
143 evas_common_get_char_index(fi, REPLACEMENT_CHAR))
144 {
145 itr++;
146 }
147 else
148 {
149 /* Done, we did as much as possible */
150 break;
151 }
152 }
153 }
154
155 if (fi)
156 *cur_fi = fi;
157 else
158 *cur_fi = *script_fi;
159
160 return itr - text;
161}
162
163/**
164 * @internal
165 * Calculate the kerning between "left" and "right.
166 *
167 * @param fi the font instance to use
168 * @param left the left glyph index
169 * @param right the right glyph index
170 * @param[out] kerning the kerning calculated.
171 * @return FALSE on error, TRUE on success.
172 */
173EAPI int
174evas_common_font_query_kerning(RGBA_Font_Int *fi, FT_UInt left, FT_UInt right,
175 int *kerning)
176{
177 int *result;
178 FT_Vector delta;
179 int key[2];
180 int error = 1;
181
182 key[0] = left;
183 key[1] = right;
184
185 result = eina_hash_find(fi->kerning, key);
186 if (result)
187 {
188 *kerning = result[2];
189 goto on_correct;
190 }
191
192 /* NOTE: ft2 seems to have a bug. and sometimes returns bizarre
193 * values to kern by - given same font, same size and same
194 * prev_index and index. auto/bytecode or none hinting doesn't
195 * matter */
196 evas_common_font_int_reload(fi);
197 FTLOCK();
198 if (FT_Get_Kerning(fi->src->ft.face,
199 key[0], key[1],
200 FT_KERNING_DEFAULT, &delta) == 0)
201 {
202 int *push;
203
204 FTUNLOCK();
205 *kerning = delta.x;
206
207 push = malloc(sizeof (int) * 3);
208 if (!push) return 1;
209
210 push[0] = key[0];
211 push[1] = key[1];
212 push[2] = *kerning;
213
214 eina_hash_direct_add(fi->kerning, push, push);
215
216 goto on_correct;
217 }
218
219 FTUNLOCK();
220 error = 0;
221
222 on_correct:
223 return error;
224}
225
226/**
227 * @internal
228 * Calculate the inset of the text. Inset is the difference between the pen
229 * position of the first char in the string, and the first pixel drawn.
230 * (can be negative).
231 *
232 * @param fn the font set to use.
233 * @param text_props the string object.
234 * @return the calculated inset.
235 */
236EAPI int
237evas_common_font_query_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props)
238{
239 if (!text_props->len) return 0;
240 return text_props->info->glyph[text_props->start].x_bear;
241}
242
243/**
244 * @internal
245 * Calculate the right inset of the text. This is the difference between the
246 * pen position of the glyph after the last glyph in the text, and the last
247 * pixel drawn in the text (essentially "advance - width" of the last char).
248 *
249 * @param fn the font set to use.
250 * @param text_props the string object.
251 * @return the calculated inset.
252 *
253 * @see evas_common_font_query_inset()
254 */
255EAPI int
256evas_common_font_query_right_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props)
257{
258 const Evas_Font_Glyph_Info *gli;
259 if (!text_props->len) return 0;
260 gli = text_props->info->glyph + text_props->start + text_props->len - 1;
261
262 /* If the last char is a whitespace, we use the advance as the size,
263 * so the right_inset is 0. */
264 if (gli->width == 0)
265 return 0;
266
267 return ((gli > text_props->info->glyph) ?
268 gli->pen_after - (gli - 1)->pen_after : gli->pen_after) -
269 (gli->width + gli->x_bear
270#ifdef OT_SUPPORT
271 + EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(
272 text_props->info->ot[text_props->start + text_props->len - 1]))
273#endif
274 );
275}
276
277/**
278 * @internal
279 * Calculate the size of the string (width and height).
280 * The width is the disntance between the first pen position and the last pixel
281 * drawn.
282 * The height is the max ascent+descent of the font.
283 *
284 * @param fn the font set to use.
285 * @param text_props the string object.
286 * @param[out] w the calculated width
287 * @param[out] h the calculated height
288 */
289EAPI void
290evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, int *w, int *h)
291{
292 Evas_Coord ret_w = 0;
293
294 if (text_props->len > 0)
295 {
296 const Evas_Font_Glyph_Info *glyph = text_props->info->glyph +
297 text_props->start;
298 const Evas_Font_Glyph_Info *last_glyph = glyph;
299
300 if (text_props->len > 1)
301 {
302 last_glyph += text_props->len - 1;
303 ret_w = last_glyph[-1].pen_after;
304 if (text_props->start > 0)
305 ret_w -= glyph[-1].pen_after;
306 }
307#ifdef OT_SUPPORT
308 ret_w += EVAS_FONT_ROUND_26_6_TO_INT(EVAS_FONT_OT_X_OFF_GET(
309 text_props->info->ot[text_props->start + text_props->len - 1]));
310#endif
311 ret_w += last_glyph->width + last_glyph->x_bear;
312 }
313
314 if (w) *w = ret_w;
315 if (h) *h = evas_common_font_max_ascent_get(fn) + evas_common_font_max_descent_get(fn);
316}
317
318/**
319 * @internal
320 * Calculate the advance of the string. Advance is the distance between the
321 * first pen position and the pen position after the string.
322 *
323 * @param fn the font set to use.
324 * @param text_props the string object.
325 * @param[out] h_adv the calculated horizontal advance.
326 * @param[out] v_adv the calculated vertical advance.
327 */
328EAPI void
329evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props, int *h_adv, int *v_adv)
330{
331 Evas_Coord ret_adv = 0;
332 if (text_props->len > 0)
333 {
334 const Evas_Font_Glyph_Info *glyph = text_props->info->glyph +
335 text_props->start;
336 ret_adv = glyph[text_props->len - 1].pen_after;
337 if (text_props->start > 0)
338 ret_adv -= glyph[-1].pen_after;
339 }
340
341 if (h_adv) *h_adv = ret_adv;
342 if (v_adv) *v_adv = evas_common_font_get_line_advance(fn);
343}
344
345/**
346 * @internal
347 * Query the coordinates of the char at position pos. If the position is at the
348 * end of the string (i.e where the finishing null would be) it returns the
349 * coordinates of the position right after the last char. This is either on
350 * the left or on the right of the string, depending on BiDi direction. Returned
351 * width in this case is 0. It returns the x of the leftmost pixel drawn.
352 *
353 * @param fn the font set to use.
354 * @param text_props the string object.
355 * @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).
356 * @param[out] cx the calculated x - CAN BE NULL
357 * @param[out] cy the calculated y - CAN BE NULL
358 * @param[out] cw the calculated width - CAN BE NULL
359 * @param[out] ch the calculated height - CAN BE NULL
360 * @return TRUE on success, FALSE otherwise.
361 *
362 * @see evas_common_font_query_pen_coords()
363 */
364EAPI int
365evas_common_font_query_char_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch)
366{
367 int asc, desc;
368 size_t position = 0;
369 int ret_val = 0;
370 EVAS_FONT_WALK_TEXT_INIT();
371
372 asc = evas_common_font_max_ascent_get(fn);
373 desc = evas_common_font_max_descent_get(fn);
374
375 position = pos;
376 /* If it's the null, choose location according to the direction. */
377 if (position == text_props->text_len)
378 {
379 /* if it's rtl then the location is the left of the string,
380 * otherwise, the right. */
381#ifdef BIDI_SUPPORT
382 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
383 {
384 if (cx) *cx = 0;
385 if (ch) *ch = asc + desc;
386 }
387 else
388#endif
389 {
390 evas_common_font_query_advance(fn, text_props, cx, ch);
391 }
392 if (cy) *cy = 0;
393 if (cw) *cw = 0;
394 ret_val = 1;
395 goto end;
396 }
397
398 Evas_Coord cluster_start = 0, last_end = 0;
399 int prev_cluster = -1;
400 int found = 0, items = 1, item_pos = 1;
401 int last_is_visible = 0;
402 EVAS_FONT_WALK_TEXT_START()
403 {
404 EVAS_FONT_WALK_TEXT_WORK();
405
406 if (prev_cluster != (int) EVAS_FONT_WALK_POS)
407 {
408 if (found)
409 {
410 break;
411 }
412 else
413 {
414 cluster_start = EVAS_FONT_WALK_PEN_X +
415 EVAS_FONT_WALK_X_OFF +
416 EVAS_FONT_WALK_X_BEAR;
417 }
418 }
419 last_is_visible = EVAS_FONT_WALK_IS_VISIBLE;
420 last_end = EVAS_FONT_WALK_PEN_X + EVAS_FONT_WALK_X_OFF +
421 EVAS_FONT_WALK_X_BEAR + EVAS_FONT_WALK_WIDTH;
422 /* we need to see if the char at the visual position is the char wanted */
423 if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) &&
424 (EVAS_FONT_WALK_POS <= (size_t) position) &&
425 ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) ||
426 (EVAS_FONT_WALK_IS_LAST)))
427 {
428 found = 1;
429#ifdef OT_SUPPORT
430 items = evas_common_font_ot_cluster_size_get(text_props,
431 char_index);
432#endif
433 item_pos = position - EVAS_FONT_WALK_POS + 1;
434 }
435 else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) &&
436 ((EVAS_FONT_WALK_POS_PREV > (size_t) position) ||
437 (EVAS_FONT_WALK_IS_FIRST)) &&
438 (((size_t) position) >= EVAS_FONT_WALK_POS))
439 {
440 found = 1;
441#ifdef OT_SUPPORT
442 items = evas_common_font_ot_cluster_size_get(text_props,
443 char_index);
444#endif
445 item_pos = items - (position - EVAS_FONT_WALK_POS);
446 }
447
448 prev_cluster = EVAS_FONT_WALK_POS;
449 }
450 EVAS_FONT_WALK_TEXT_END();
451 if (found)
452 {
453 Evas_Coord cluster_w;
454 cluster_w = last_end - cluster_start;
455 if (cy) *cy = -asc;
456 if (ch) *ch = asc + desc;
457 if (last_is_visible)
458 {
459 if (cx) *cx = cluster_start +
460 (cluster_w / items) *
461 (item_pos - 1);
462 if (cw) *cw = (cluster_w / items);
463 }
464 else
465 {
466 if (cx) *cx = cluster_start;
467 if (cw) *cw = 0;
468 }
469 ret_val = 1;
470 goto end;
471 }
472end:
473
474 return ret_val;
475}
476
477/**
478 * @internal
479 * Query the coordinates of the char at position pos. If the position is at the
480 * end of the string (i.e where the finishing null would be) it returns the
481 * coordinates of the position right after the last char. This is either on
482 * the left or on the right of the string, depending on BiDi direction. Returned
483 * advance in this case is 0.
484 *
485 * This is the same as evas_common_font_query_char_coords() except that the
486 * advance of the character is returned instead of the width and the pen
487 * position is returned instead of the actual pixel position.
488 *
489 * @param fn the font set to use.
490 * @param text_props the string object.
491 * @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).
492 * @param[out] cpenx the calculated x - CAN BE NULL
493 * @param[out] cy the calculated y - CAN BE NULL
494 * @param[out] cadv the calculated advance - CAN BE NULL
495 * @param[out] ch the calculated height - CAN BE NULL
496 * @return TRUE on success, FALSE otherwise.
497 *
498 * @see evas_common_font_query_char_coords()
499 */
500EAPI int
501evas_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)
502{
503 int asc, desc;
504 size_t position;
505 int ret_val = 0;
506 EVAS_FONT_WALK_TEXT_INIT();
507
508 asc = evas_common_font_max_ascent_get(fn);
509 desc = evas_common_font_max_descent_get(fn);
510
511 position = pos;
512 /* If it's the null, choose location according to the direction. */
513 if (position == text_props->text_len)
514 {
515 /* if it's rtl then the location is the left of the string,
516 * otherwise, the right. */
517#ifdef BIDI_SUPPORT
518 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
519 {
520 if (cpen_x) *cpen_x = 0;
521 if (ch) *ch = asc + desc;
522 }
523 else
524#endif
525 {
526 evas_common_font_query_advance(fn, text_props, cpen_x, ch);
527 }
528 if (cy) *cy = 0;
529 if (cadv) *cadv = 0;
530 ret_val = 1;
531 goto end;
532 }
533 Evas_Coord cluster_start = 0;
534 int prev_cluster = -1;
535 int found = 0, items = 1, item_pos = 1;
536 int last_is_visible = 0;
537 EVAS_FONT_WALK_TEXT_START()
538 {
539 EVAS_FONT_WALK_TEXT_WORK();
540
541 if (prev_cluster != (int) EVAS_FONT_WALK_POS)
542 {
543 if (found)
544 {
545 break;
546 }
547 else
548 {
549 cluster_start = EVAS_FONT_WALK_PEN_X;
550 }
551 }
552 last_is_visible = EVAS_FONT_WALK_IS_VISIBLE;
553
554 if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR) &&
555 (EVAS_FONT_WALK_POS <= (size_t) position) &&
556 ((((size_t) position) < EVAS_FONT_WALK_POS_NEXT) ||
557 (EVAS_FONT_WALK_IS_LAST)))
558 {
559 found = 1;
560#ifdef OT_SUPPORT
561 items = evas_common_font_ot_cluster_size_get(text_props,
562 char_index);
563#endif
564 item_pos = position - EVAS_FONT_WALK_POS + 1;
565 }
566 else if ((text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL) &&
567 ((EVAS_FONT_WALK_POS_PREV > (size_t) position) ||
568 (EVAS_FONT_WALK_IS_FIRST)) &&
569 (((size_t) position) >= EVAS_FONT_WALK_POS))
570 {
571 found = 1;
572#ifdef OT_SUPPORT
573 items = evas_common_font_ot_cluster_size_get(text_props,
574 char_index);
575#endif
576 item_pos = items - (position - EVAS_FONT_WALK_POS);
577 }
578
579 prev_cluster = EVAS_FONT_WALK_POS;
580 }
581 EVAS_FONT_WALK_TEXT_END();
582
583 if (found)
584 {
585 Evas_Coord cluster_adv;
586 cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start;
587 if (cy) *cy = -asc;
588 if (ch) *ch = asc + desc;
589 if (last_is_visible)
590 {
591 if (cpen_x) *cpen_x = cluster_start +
592 (cluster_adv / items) *
593 (item_pos - 1);
594 if (cadv) *cadv = (cluster_adv / items);
595 }
596 else
597 {
598 if (cpen_x) *cpen_x = EVAS_FONT_WALK_PEN_X;
599 if (cadv) *cadv = 0;
600 }
601 ret_val = 1;
602 goto end;
603 }
604end:
605
606 return ret_val;
607}
608
609/**
610 * @internal
611 * Find the character at a specific x, y coordinates and return it's position
612 * in the text (not in the text object, but in the source text). Also calculate
613 * the char's geometry.
614 *
615 * @param fn the font set to use.
616 * @param text_props the string object.
617 * @param x the x to look at.
618 * @param y the y to look at.
619 * @param[out] cx the calculated x - CAN BE NULL
620 * @param[out] cy the calculated y - CAN BE NULL
621 * @param[out] cw the calculated width - CAN BE NULL
622 * @param[out] ch the calculated height - CAN BE NULL
623 * @return the position found, -1 on failure.
624 */
625EAPI int
626evas_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)
627{
628 int asc, desc;
629 int ret_val = -1;
630 EVAS_FONT_WALK_TEXT_INIT();
631
632 asc = evas_common_font_max_ascent_get(fn);
633 desc = evas_common_font_max_descent_get(fn);
634 Evas_Coord cluster_start = 0;
635 int prev_cluster = -1;
636 int found = 0, items = 1;
637 EVAS_FONT_WALK_TEXT_START()
638 {
639 EVAS_FONT_WALK_TEXT_WORK();
640 if (prev_cluster != (int) EVAS_FONT_WALK_POS)
641 {
642 if (found)
643 {
644 break;
645 }
646 else
647 {
648 cluster_start = EVAS_FONT_WALK_PEN_X;
649 }
650 }
651
652 if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
653
654 /* we need to see if the char at the visual position is the char,
655 * we check that by checking if it's before the current pen
656 * position and the next */
657 if ((x >= EVAS_FONT_WALK_PEN_X) &&
658 (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) && (y >= -asc) && (y <= desc))
659 {
660#ifdef OT_SUPPORT
661 items = evas_common_font_ot_cluster_size_get(text_props,
662 char_index);
663#endif
664 found = 1;
665 }
666
667 prev_cluster = EVAS_FONT_WALK_POS;
668 }
669 EVAS_FONT_WALK_TEXT_END();
670 if (found)
671 {
672 int item_pos;
673 Evas_Coord cluster_adv;
674 cluster_adv = EVAS_FONT_WALK_PEN_X - cluster_start;
675
676 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_LTR)
677 {
678 double part;
679 part = cluster_adv / items;
680 item_pos = (int) ((x - cluster_start) / part);
681 }
682 else
683 {
684 double part;
685 part = cluster_adv / items;
686 item_pos = items - ((int) ((x - cluster_start) / part)) - 1;
687 }
688 if (cx) *cx = EVAS_FONT_WALK_PEN_X +
689 ((cluster_adv / items) * (item_pos - 1));
690 if (cy) *cy = -asc;
691 if (cw) *cw = (cluster_adv / items);
692 if (ch) *ch = asc + desc;
693 ret_val = prev_cluster + item_pos;
694 goto end;
695 }
696end:
697
698 return ret_val;
699}
700
701/**
702 * @internal
703 * Find one after the last character that fits until the boundaries set by x
704 * and y. I.e find the first char that doesn't fit.
705 * This LOGICALLY walks the string. This is needed for wrapping for example
706 * where we want the first part to be the first logical part.
707 *
708 * @param fn the font set to use.
709 * @param text_props the string object.
710 * @param x the x boundary.
711 * @param y the y boundary.
712 * @return the position found, -1 on failure.
713 */
714EAPI int
715evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y)
716{
717 int asc, desc;
718 int ret=-1;
719
720 asc = evas_common_font_max_ascent_get(fn);
721 desc = evas_common_font_max_descent_get(fn);
722
723#ifdef BIDI_SUPPORT
724 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
725 {
726 Evas_Font_Glyph_Info *gli = NULL;
727 Evas_Coord full_adv = 0, pen_x = 0, start_pen = 0;
728 int i;
729
730 if ((text_props->info) && (text_props->len > 0))
731 {
732 gli = text_props->info->glyph + text_props->start;
733 full_adv = gli[text_props->len - 1].pen_after;
734 if (text_props->start > 0)
735 {
736 start_pen = gli[-1].pen_after;
737 full_adv -= start_pen;
738 }
739
740 gli += text_props->len - 1;
741
742 for (i = text_props->len - 1 ; i >= 0 ; i--, gli--)
743 {
744 pen_x = full_adv - (gli->pen_after - start_pen);
745 /* If invisible, skip */
746 if (gli->index == 0) continue;
747 if ((x >= pen_x) &&
748 (((i == 0) && (x <= full_adv)) ||
749 (x <= (full_adv - (gli[-1].pen_after - start_pen)))) &&
750 (y >= -asc) && (y <= desc))
751 {
752#ifdef OT_SUPPORT
753 ret = EVAS_FONT_OT_POS_GET(
754 text_props->info->ot[text_props->start + i]) -
755 text_props->text_offset;
756#else
757 ret = text_props->text_len - i - 1;
758#endif
759 goto end;
760 }
761 }
762 }
763 }
764 else
765#endif
766 {
767 EVAS_FONT_WALK_TEXT_INIT();
768 /* When text is not rtl, visual direction = logical direction */
769 EVAS_FONT_WALK_TEXT_START()
770 {
771 EVAS_FONT_WALK_TEXT_WORK();
772 if (!EVAS_FONT_WALK_IS_VISIBLE) continue;
773
774 if ((x >= EVAS_FONT_WALK_PEN_X) &&
775 (x <= (EVAS_FONT_WALK_PEN_X_AFTER)) &&
776 (y >= -asc) && (y <= desc))
777 {
778 ret = EVAS_FONT_WALK_POS;
779 goto end;
780 }
781 }
782 EVAS_FONT_WALK_TEXT_END();
783 }
784
785end:
786
787 return ret;
788}
789
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 @@
1#ifndef _EVAS_IMAGE_H
2#define _EVAS_IMAGE_H
3
4
5EAPI void evas_common_image_init (void);
6EAPI void evas_common_image_shutdown (void);
7
8EAPI void evas_common_image_image_all_unload (void);
9
10EAPI void evas_common_rgba_image_free (Image_Entry *ie);
11EAPI void evas_common_rgba_image_unload (Image_Entry *ie);
12EAPI void evas_common_image_colorspace_normalize (RGBA_Image *im);
13EAPI void evas_common_image_colorspace_dirty (RGBA_Image *im);
14EAPI void evas_common_image_cache_free (void); /*2*/
15EAPI void evas_common_image_premul (Image_Entry *ie); /*2*/
16EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/
17/* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */
18/* EAPI RGBA_Image *evas_common_image_create (int w, int h); */
19EAPI RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha);
20EAPI Evas_Cache_Image *evas_common_image_cache_get (void);
21
22EAPI void evas_common_image_set_cache (unsigned int size);
23EAPI int evas_common_image_get_cache (void);
24
25EAPI RGBA_Image *evas_common_image_line_buffer_obtain (int len);
26EAPI void evas_common_image_line_buffer_release (RGBA_Image *im);
27
28EAPI RGBA_Image *evas_common_image_alpha_line_buffer_obtain (int len);
29EAPI void evas_common_image_alpha_line_buffer_release (RGBA_Image *im);
30EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *im);
31
32EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error);
33EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
34
35EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size);
36EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void);
37EAPI void evas_common_rgba_image_scalecache_flush(void);
38EAPI void evas_common_rgba_image_scalecache_dump(void);
39EAPI void
40 evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst,
41 RGBA_Draw_Context *dc, int smooth,
42 int src_region_x, int src_region_y,
43 int src_region_w, int src_region_h,
44 int dst_region_x, int dst_region_y,
45 int dst_region_w, int dst_region_h);
46EAPI void
47 evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
48 RGBA_Draw_Context *dc, int smooth,
49 int src_region_x, int src_region_y,
50 int src_region_w, int src_region_h,
51 int dst_region_x, int dst_region_y,
52 int dst_region_w, int dst_region_h);
53
54
55EAPI int evas_common_load_rgba_image_module_from_file (Image_Entry *im);
56EAPI int evas_common_load_rgba_image_data_from_file (Image_Entry *im);
57EAPI double evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *im, int start_frame, int frame_num);
58
59void _evas_common_rgba_image_post_surface(Image_Entry *ie);
60
61EAPI Eina_Bool evas_common_extension_can_load_get(const char *file);
62
63#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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <assert.h>
6
7#include "evas_common.h"
8#include "evas_private.h"
9#include "evas_image.h"
10
11int
12evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace)
13{
14 RGBA_Image *dst = (RGBA_Image *) ie_dst;
15
16 switch (cspace)
17 {
18 case EVAS_COLORSPACE_ARGB8888:
19 dst->cache_entry.w = w;
20 dst->cache_entry.h = h;
21 dst->image.data = image_data;
22 dst->image.no_free = 1;
23 dst->cache_entry.flags.alpha = alpha ? 1 : 0;
24 break;
25 case EVAS_COLORSPACE_YCBCR422P601_PL:
26 case EVAS_COLORSPACE_YCBCR422P709_PL:
27 case EVAS_COLORSPACE_YCBCR422601_PL:
28 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
29 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
30 w &= ~0x1;
31 dst->cache_entry.w = w;
32 dst->cache_entry.h = h;
33 dst->cs.data = image_data;
34 dst->cs.no_free = 1;
35 break;
36 default:
37 abort();
38 break;
39 }
40 dst->cache_entry.space = cspace;
41 evas_common_image_colorspace_dirty(dst);
42 _evas_common_rgba_image_post_surface(ie_dst);
43 return 0;
44}
45
46int
47evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace)
48{
49 RGBA_Image *dst = (RGBA_Image *) ie_dst;
50
51 /* FIXME: Is dst->image.data valid. */
52 switch (cspace)
53 {
54 case EVAS_COLORSPACE_ARGB8888:
55 dst->cache_entry.flags.alpha = alpha ? 1 : 0;
56 if (image_data)
57 memcpy(dst->image.data, image_data, w * h * sizeof(DATA32));
58 break;
59 case EVAS_COLORSPACE_YCBCR422P601_PL:
60 case EVAS_COLORSPACE_YCBCR422P709_PL:
61 case EVAS_COLORSPACE_YCBCR422601_PL:
62 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
63 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
64 dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char*) * 2);
65 if (image_data && (dst->cs.data))
66 memcpy(dst->cs.data, image_data, dst->cache_entry.h * sizeof(unsigned char*) * 2);
67 break;
68 default:
69 abort();
70 break;
71 }
72
73 dst->cache_entry.space = cspace;
74 evas_common_image_colorspace_dirty(dst);
75 _evas_common_rgba_image_post_surface(ie_dst);
76 return 0;
77}
78
79int
80evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h __UNUSED__)
81{
82 RGBA_Image *dst = (RGBA_Image *) ie_dst;
83 RGBA_Image *im = (RGBA_Image *) ie_im;
84
85 if ((im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P601_PL) ||
86 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422P709_PL) ||
87 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR422601_PL) ||
88 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420TM12601_PL) ||
89 (im->cache_entry.space == EVAS_COLORSPACE_YCBCR420NV12601_PL))
90 {
91 w &= ~0x1;
92 dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
93 }
94
95 dst->flags = im->flags;
96 dst->cs.no_free = 0;
97 evas_common_image_colorspace_dirty(dst);
98
99 _evas_common_rgba_image_post_surface(ie_dst);
100 return 0;
101}
102
103int
104evas_common_rgba_image_colorspace_set(Image_Entry* ie_dst, int cspace)
105{
106 RGBA_Image *dst = (RGBA_Image *) ie_dst;
107
108 switch (cspace)
109 {
110 case EVAS_COLORSPACE_ARGB8888:
111 if (dst->cs.data)
112 {
113 if (!dst->cs.no_free) free(dst->cs.data);
114 dst->cs.data = NULL;
115 dst->cs.no_free = 0;
116 }
117 break;
118 case EVAS_COLORSPACE_YCBCR422P601_PL:
119 case EVAS_COLORSPACE_YCBCR422P709_PL:
120 case EVAS_COLORSPACE_YCBCR422601_PL:
121 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
122 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
123 if (dst->image.no_free)
124 {
125 ie_dst->allocated.w = 0;
126 ie_dst->allocated.h = 0;
127#ifdef BUILD_ASYNC_PRELOAD
128 ie_dst->flags.preload_done = 0;
129#endif
130 ie_dst->flags.loaded = 0;
131 dst->image.data = NULL;
132 dst->image.no_free = 0;
133 /* FIXME: Must allocate image.data surface cleanly. */
134 }
135 if (dst->cs.data)
136 {
137 if (!dst->cs.no_free) free(dst->cs.data);
138 }
139 dst->cs.data = calloc(1, dst->cache_entry.h * sizeof(unsigned char *) * 2);
140 dst->cs.no_free = 0;
141 break;
142 default:
143 abort();
144 break;
145 }
146 dst->cache_entry.space = cspace;
147 evas_common_image_colorspace_dirty(dst);
148
149 _evas_common_rgba_image_post_surface(ie_dst);
150 return 0;
151}
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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <sys/types.h>
6#include <sys/stat.h>
7#include <unistd.h>
8
9#include "evas_common.h"
10#include "evas_private.h"
11#include "evas_cs.h"
12
13struct ext_loader_s
14{
15 unsigned int length;
16 const char *extension;
17 const char *loader;
18};
19
20#define MATCHING(Ext, Module) \
21 { sizeof (Ext), Ext, Module }
22
23static const struct ext_loader_s loaders[] =
24{ /* map extensions to loaders to use for good first-guess tries */
25 MATCHING(".png", "png"),
26 MATCHING(".jpg", "jpeg"),
27 MATCHING(".jpeg", "jpeg"),
28 MATCHING(".jfif", "jpeg"),
29 MATCHING(".eet", "eet"),
30 MATCHING(".edj", "eet"),
31 MATCHING(".eap", "eet"),
32 MATCHING(".edb", "edb"),
33 MATCHING(".xpm", "xpm"),
34 MATCHING(".tiff", "tiff"),
35 MATCHING(".tif", "tiff"),
36 MATCHING(".svg", "svg"),
37 MATCHING(".svgz", "svg"),
38 MATCHING(".svg.gz", "svg"),
39 MATCHING(".gif", "gif"),
40 MATCHING(".pbm", "pmaps"),
41 MATCHING(".pgm", "pmaps"),
42 MATCHING(".ppm", "pmaps"),
43 MATCHING(".pnm", "pmaps"),
44 MATCHING(".bmp", "bmp"),
45 MATCHING(".tga", "tga"),
46 MATCHING(".wbmp", "wbmp"),
47 MATCHING(".ico", "ico"),
48 MATCHING(".cur", "ico"),
49 MATCHING(".psd", "psd"),
50 MATCHING(".pdf", "generic"),
51 MATCHING(".ps", "generic"),
52 MATCHING(".xcf", "generic"),
53 MATCHING(".xcf.gz", "generic"),
54 /* RAW */
55 MATCHING(".arw", "generic"),
56 MATCHING(".cr2", "generic"),
57 MATCHING(".crw", "generic"),
58 MATCHING(".dcr", "generic"),
59 MATCHING(".dng", "generic"),
60 MATCHING(".k25", "generic"),
61 MATCHING(".kdc", "generic"),
62 MATCHING(".erf", "generic"),
63 MATCHING(".mrw", "generic"),
64 MATCHING(".nef", "generic"),
65 MATCHING(".nrf", "generic"),
66 MATCHING(".nrw", "generic"),
67 MATCHING(".orf", "generic"),
68 MATCHING(".raw", "generic"),
69 MATCHING(".rw2", "generic"),
70 MATCHING(".pef", "generic"),
71 MATCHING(".raf", "generic"),
72 MATCHING(".sr2", "generic"),
73 MATCHING(".srf", "generic"),
74 MATCHING(".x3f", "generic"),
75 /* video */
76 MATCHING(".264", "generic"),
77 MATCHING(".3g2", "generic"),
78 MATCHING(".3gp", "generic"),
79 MATCHING(".3gp2", "generic"),
80 MATCHING(".3gpp", "generic"),
81 MATCHING(".3gpp2", "generic"),
82 MATCHING(".3p2", "generic"),
83 MATCHING(".asf", "generic"),
84 MATCHING(".avi", "generic"),
85 MATCHING(".bdm", "generic"),
86 MATCHING(".bdmv", "generic"),
87 MATCHING(".clpi", "generic"),
88 MATCHING(".clp", "generic"),
89 MATCHING(".fla", "generic"),
90 MATCHING(".flv", "generic"),
91 MATCHING(".m1v", "generic"),
92 MATCHING(".m2v", "generic"),
93 MATCHING(".m2t", "generic"),
94 MATCHING(".m4v", "generic"),
95 MATCHING(".mkv", "generic"),
96 MATCHING(".mov", "generic"),
97 MATCHING(".mp2", "generic"),
98 MATCHING(".mp2ts", "generic"),
99 MATCHING(".mp4", "generic"),
100 MATCHING(".mpe", "generic"),
101 MATCHING(".mpeg", "generic"),
102 MATCHING(".mpg", "generic"),
103 MATCHING(".mpl", "generic"),
104 MATCHING(".mpls", "generic"),
105 MATCHING(".mts", "generic"),
106 MATCHING(".mxf", "generic"),
107 MATCHING(".nut", "generic"),
108 MATCHING(".nuv", "generic"),
109 MATCHING(".ogg", "generic"),
110 MATCHING(".ogm", "generic"),
111 MATCHING(".ogv", "generic"),
112 MATCHING(".rm", "generic"),
113 MATCHING(".rmj", "generic"),
114 MATCHING(".rmm", "generic"),
115 MATCHING(".rms", "generic"),
116 MATCHING(".rmx", "generic"),
117 MATCHING(".rmvb", "generic"),
118 MATCHING(".swf", "generic"),
119 MATCHING(".ts", "generic"),
120 MATCHING(".weba", "generic"),
121 MATCHING(".webm", "generic"),
122 MATCHING(".wmv", "generic")
123};
124
125static const char *loaders_name[] =
126{ /* in order of most likely needed */
127 "png", "jpeg", "eet", "xpm", "tiff", "gif", "svg", "pmaps", "bmp", "tga", "wbmp", "ico", "psd", "edb", "generic"
128};
129
130struct evas_image_foreach_loader_data
131{
132 Image_Entry *ie;
133 int *error;
134 Evas_Module *em;
135};
136
137
138static Eina_Bool
139_evas_image_foreach_loader(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__, void *data, void *fdata)
140{
141 Evas_Image_Load_Func *evas_image_load_func = NULL;
142 Evas_Module *em = data;
143 struct evas_image_foreach_loader_data *d = fdata;
144 Image_Entry *ie = d->ie;
145
146 if (!evas_module_load(em)) return EINA_TRUE;
147 evas_image_load_func = em->functions;
148 evas_module_use(em);
149 *(d->error) = EVAS_LOAD_ERROR_NONE;
150 if (evas_image_load_func &&
151 evas_image_load_func->file_head(ie, ie->file, ie->key, d->error) &&
152 (*(d->error) == EVAS_LOAD_ERROR_NONE))
153 {
154 d->em = em;
155 return EINA_FALSE;
156 }
157
158 return EINA_TRUE;
159}
160
161EAPI int
162evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
163{
164 Evas_Image_Load_Func *evas_image_load_func = NULL;
165 const char *loader = NULL, *end;
166 Evas_Module *em;
167 struct stat st;
168 unsigned int i;
169 int len, ret = EVAS_LOAD_ERROR_NONE;
170 struct evas_image_foreach_loader_data fdata;
171
172
173#ifdef EVAS_CSERVE
174 if (evas_cserve_use_get())
175 {
176 // TODO: handle errors from server and return them?
177 DBG("try cserve '%s' '%s'", ie->file, ie->key ? ie->key : "");
178 if (evas_cserve_image_load(ie, ie->file, ie->key, &(ie->load_opts)))
179 {
180 DBG("try cserve '%s' '%s' loaded!",
181 ie->file, ie->key ? ie->key : "");
182 return EVAS_LOAD_ERROR_NONE;
183 }
184 }
185#endif
186 if (stat(ie->file, &st) != 0 || S_ISDIR(st.st_mode))
187 {
188 DBG("trying to open directory '%s' !", ie->file);
189 return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
190 }
191
192 len = strlen(ie->file);
193 end = ie->file + len;
194 for (i = 0; i < (sizeof (loaders) / sizeof(struct ext_loader_s)); i++)
195 {
196 int len2 = strlen(loaders[i].extension);
197 if (len2 > len) continue;
198 if (!strcasecmp(end - len2, loaders[i].extension))
199 {
200 loader = loaders[i].loader;
201 DBG("known loader '%s' handles extension '%s' of file '%s'",
202 loader, end - len2, ie->file);
203 break;
204 }
205 }
206
207 if (loader)
208 {
209 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loader);
210 if (em)
211 {
212 DBG("found image loader '%s' (%p)", loader, em);
213 if (evas_module_load(em))
214 {
215 evas_module_use(em);
216 evas_image_load_func = em->functions;
217 ret = EVAS_LOAD_ERROR_NONE;
218 if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret))
219 {
220 DBG("loaded file head using module '%s' (%p): %s",
221 loader, em, ie->file);
222 goto end;
223 }
224 evas_module_unload(em);
225 INF("failed to load file head using module '%s' (%p): "
226 "%s (%s)",
227 loader, em, ie->file, evas_load_error_str(ret));
228 }
229 else
230 WRN("failed to load module '%s' (%p)", loader, em);
231 }
232 else
233 INF("image loader '%s' is not enabled or missing!", loader);
234 }
235
236 fdata.ie = ie;
237 fdata.error = &ret;
238 fdata.em = NULL;
239 ret = EVAS_LOAD_ERROR_NONE;
240 evas_module_foreach_image_loader(_evas_image_foreach_loader, &fdata);
241 em = fdata.em;
242 evas_image_load_func = em ? em->functions : NULL;
243 if (em) goto end;
244
245 /* This is our last chance, try all known image loader. */
246 /* FIXME: We could use eina recursive module search ability. */
247 for (i = 0; i < sizeof (loaders_name) / sizeof (char *); i++)
248 {
249 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_LOADER, loaders_name[i]);
250 if (em)
251 {
252 if (evas_module_load(em))
253 {
254 evas_module_use(em);
255 evas_image_load_func = em->functions;
256 ret = EVAS_LOAD_ERROR_NONE;
257 if (evas_image_load_func->file_head(ie, ie->file, ie->key, &ret))
258 {
259 DBG("brute force loader '%s' (%p) worked on %s",
260 loaders_name[i], em, ie->file);
261 goto end;
262 }
263 else
264 INF("brute force loader '%s' (%p) failed on %s (%s)",
265 loaders_name[i], em, ie->file,
266 evas_load_error_str(ret));
267
268 evas_module_unload(em);
269 }
270 else
271 INF("failed to load module '%s' (%p)", loaders_name[i], em);
272 }
273 else
274 DBG("could not find module '%s'", loaders_name[i]);
275 }
276
277 INF("exhausted all means to load image '%s'", ie->file);
278 return EVAS_LOAD_ERROR_UNKNOWN_FORMAT;
279
280 end:
281
282 if (ret != EVAS_LOAD_ERROR_NONE)
283 {
284 const char *modname = NULL;
285 int modversion = -1;
286 if (em && em->definition)
287 {
288 modname = em->definition->name;
289 modversion = em->definition->version;
290 }
291 WRN("loader '%s' (version %d) "
292 "handled file '%s', key '%s' with errors: %s",
293 modname ? modname : "<UNKNOWN>", modversion,
294 ie->file, ie->key ? ie->key : "",
295 evas_load_error_str(ret));
296 goto end;
297 }
298
299 DBG("loader '%s' used for file %s",
300 (em && em->definition && em->definition->name) ?
301 em->definition->name : "<UNKNOWN>",
302 ie->file);
303
304 ie->info.module = (void*) em;
305 ie->info.loader = (void*) evas_image_load_func;
306 evas_module_ref((Evas_Module*) ie->info.module);
307 return ret;
308}
309
310EAPI int
311evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
312{
313 Evas_Image_Load_Func *evas_image_load_func = NULL;
314 int ret = EVAS_LOAD_ERROR_NONE;
315
316 if ((ie->flags.loaded) && (!ie->flags.animated)) return EVAS_LOAD_ERROR_GENERIC;
317
318#ifdef EVAS_CSERVE
319 if (ie->data1)
320 {
321 if (evas_cserve_image_data_load(ie))
322 {
323 RGBA_Image *im = (RGBA_Image *)ie;
324 Mem *mem = ie->data2;
325 if (mem)
326 {
327 im->image.data = (void*) (mem->data + mem->offset);
328 im->image.no_free = 1;
329 return EVAS_LOAD_ERROR_NONE;
330 }
331 }
332 return EVAS_LOAD_ERROR_GENERIC;
333 }
334#endif
335
336 if (!ie->info.module) return EVAS_LOAD_ERROR_GENERIC;
337
338// printf("load data [%p] %s %s\n", ie, ie->file, ie->key);
339
340 evas_image_load_func = ie->info.loader;
341 evas_module_use((Evas_Module*) ie->info.module);
342 if (!evas_image_load_func->file_data(ie, ie->file, ie->key, &ret))
343 {
344 return ret;
345 }
346
347// evas_module_unref((Evas_Module*) ie->info.module);
348// ie->info.module = NULL;
349
350 return EVAS_LOAD_ERROR_NONE;
351}
352
353EAPI double
354evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int start, const int frame_num)
355{
356 Evas_Image_Load_Func *evas_image_load_func = NULL;
357
358 if (!ie->info.module) return -1;
359
360 evas_image_load_func = ie->info.loader;
361 evas_module_use((Evas_Module*) ie->info.module);
362 if (evas_image_load_func->frame_duration)
363 return evas_image_load_func->frame_duration(ie, ie->file, start, frame_num);
364 return -1;
365}
366
367EAPI Eina_Bool
368evas_common_extension_can_load_get(const char *file)
369{
370 unsigned int length;
371 unsigned int i;
372
373 length = eina_stringshare_strlen(file) + 1;
374 if (length < 5) return EINA_FALSE;
375
376 for (i = 0; i < sizeof (loaders) / sizeof (struct ext_loader_s); ++i)
377 {
378 if (loaders[i].length > length) continue;
379
380 if (!strcasecmp(loaders[i].extension, file + length - loaders[i].length))
381 return EINA_TRUE;
382 }
383
384 return EINA_FALSE;
385}
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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h" /* so that EAPI in Eet.h is correctly defined */
3#endif
4
5#ifdef BUILD_LOADER_EET
6# include <Eet.h>
7#endif
8
9#include "evas_common.h"
10#include "evas_private.h"
11#include "evas_image_private.h"
12#include "evas_convert_yuv.h"
13#include "evas_cs.h"
14
15#ifdef HAVE_VALGRIND
16# include <memcheck.h>
17#endif
18
19//#define SURFDBG 1
20
21static Evas_Cache_Image * eci = NULL;
22static int reference = 0;
23
24/* static RGBA_Image *evas_rgba_line_buffer = NULL; */
25
26#define EVAS_RGBA_LINE_BUFFER_MIN_LEN 256
27#define EVAS_RGBA_LINE_BUFFER_MAX_LEN 2048
28
29/* static RGBA_Image *evas_alpha_line_buffer = NULL; */
30
31#define EVAS_ALPHA_LINE_BUFFER_MIN_LEN 256
32#define EVAS_ALPHA_LINE_BUFFER_MAX_LEN 2048
33
34
35static Image_Entry *_evas_common_rgba_image_new(void);
36static void _evas_common_rgba_image_delete(Image_Entry *ie);
37
38static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h);
39static void _evas_common_rgba_image_surface_delete(Image_Entry *ie);
40static DATA32 *_evas_common_rgba_image_surface_pixels(Image_Entry *ie);
41
42static void _evas_common_rgba_image_unload(Image_Entry *im);
43
44static void _evas_common_rgba_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
45
46static int _evas_common_rgba_image_ram_usage(Image_Entry *ie);
47
48/* Only called when references > 0. Need to provide a fresh copie of im. */
49/* The destination surface does have a surface, but no allocated pixel data. */
50static int _evas_common_rgba_image_dirty(Image_Entry* dst, const Image_Entry* src);
51
52#if 0
53static void
54_evas_common_rgba_image_debug(const char* context, Image_Entry *eim)
55{
56 DBG("%p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
57}
58#endif
59
60static const Evas_Cache_Image_Func _evas_common_image_func =
61{
62 _evas_common_rgba_image_new,
63 _evas_common_rgba_image_delete,
64 _evas_common_rgba_image_surface_alloc,
65 _evas_common_rgba_image_surface_delete,
66 _evas_common_rgba_image_surface_pixels,
67 evas_common_load_rgba_image_module_from_file,
68 _evas_common_rgba_image_unload,
69 _evas_common_rgba_image_dirty_region,
70 _evas_common_rgba_image_dirty,
71 evas_common_rgba_image_size_set,
72 evas_common_rgba_image_from_copied_data,
73 evas_common_rgba_image_from_data,
74 evas_common_rgba_image_colorspace_set,
75 evas_common_load_rgba_image_data_from_file,
76 _evas_common_rgba_image_ram_usage,
77/* _evas_common_rgba_image_debug */
78 NULL
79};
80
81EAPI void
82evas_common_image_init(void)
83{
84 if (!eci)
85 eci = evas_cache_image_init(&_evas_common_image_func);
86 reference++;
87//// ERR("REF++=%i", reference);
88
89#ifdef BUILD_LOADER_EET
90 eet_init();
91#endif
92 evas_common_scalecache_init();
93}
94
95EAPI void
96evas_common_image_shutdown(void)
97{
98 if (--reference == 0)
99 {
100//// printf("REF--=%i\n", reference);
101// DISABLE for now - something wrong with cache shutdown freeing things
102// still in use - rage_thumb segv's now.
103//
104// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
105// because in eng_setup() when a buffer changes size it is FIRST freed
106// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
107// where it should stay at 1. - see evas_engine.c in the buffer enigne for
108// example. eng_output_free() is called BEFORE _output_setup(). although this
109// is only a SIGNE of the problem. we can patch this up with either freeing
110// after the setup (so we just pt a ref of 2 then back to 1), or just
111// evas_common_image_init() at the start and evas_common_image_shutdown()
112// after it all. really ref 0 should only be reached when no more canvases
113// with no more objects exist anywhere.
114
115// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009.
116 evas_cache_image_shutdown(eci);
117 eci = NULL;
118 }
119
120#ifdef BUILD_LOADER_EET
121 eet_shutdown();
122#endif
123 evas_common_scalecache_shutdown();
124}
125
126EAPI void
127evas_common_image_image_all_unload(void)
128{
129 evas_common_rgba_image_scalecache_dump();
130 evas_cache_image_unload_all(eci);
131}
132
133static Image_Entry *
134_evas_common_rgba_image_new(void)
135{
136 RGBA_Image *im;
137
138 im = calloc(1, sizeof(RGBA_Image));
139 if (!im) return NULL;
140 im->flags = RGBA_IMAGE_NOTHING;
141 im->ref = 1;
142#ifdef EVAS_FRAME_QUEUING
143 LKI(im->cache_entry.ref_fq_add);
144 LKI(im->cache_entry.ref_fq_del);
145 eina_condition_new(&(im->cache_entry.cond_fq_del),
146 &(im->cache_entry.ref_fq_del));
147#endif
148
149 evas_common_rgba_image_scalecache_init(&im->cache_entry);
150
151 return &im->cache_entry;
152}
153
154static void
155_evas_common_rgba_image_delete(Image_Entry *ie)
156{
157 RGBA_Image *im = (RGBA_Image *)ie;
158
159#ifdef BUILD_PIPE_RENDER
160 evas_common_pipe_free(im);
161# ifdef EVAS_FRAME_QUEUING
162 LKD(im->cache_entry.ref_fq_add);
163 LKD(im->cache_entry.ref_fq_del);
164 eina_condition_free(&(im->cache_entry.cond_fq_del));
165# endif
166#endif
167 evas_common_rgba_image_scalecache_shutdown(&im->cache_entry);
168 if (ie->info.module) evas_module_unref((Evas_Module *)ie->info.module);
169 /* memset the image to 0x99 because i recently saw a segv where an
170 * seemed to be used BUT its contents were wrong - it looks like it was
171 * overwritten by something from efreet - as there was an execute command
172 * for a command there and some other signs - but to make sure, I am
173 * going to empty this struct out in case this happens again so i know
174 * that something else is overwritign this struct - or not */
175// memset(im, 0x99, sizeof(im));
176#ifdef EVAS_CSERVE
177 if (ie->data1) evas_cserve_image_free(ie);
178#endif
179/*
180 * FIXME: This doesn't seem to be needed... But I'm not sure why.
181 * -- nash
182 {
183 Filtered_Image *fi;
184
185 EINA_LIST_FREE(im->filtered, fi)
186 {
187 free(fi->key);
188 _evas_common_rgba_image_delete((Image_Entry *)(fi->image));
189 free(fi);
190 }
191 }
192*/
193 if (ie->frames)
194 {
195 Eina_List *l;
196 Image_Entry_Frame *frame;
197 EINA_LIST_FOREACH(ie->frames, l, frame)
198 {
199 if (frame)
200 {
201 if (frame->data) free(frame->data);
202 if (frame->info) free(frame->info);
203 free (frame);
204 }
205 }
206 }
207 free(im);
208}
209
210EAPI void
211evas_common_rgba_image_free(Image_Entry *ie)
212{
213 _evas_common_rgba_image_surface_delete(ie);
214 _evas_common_rgba_image_delete(ie);
215}
216
217#ifdef SURFDBG
218static Eina_List *surfs = NULL;
219
220static void
221surf_debug(void)
222{
223 Eina_List *l;
224 Image_Entry *ie;
225 RGBA_Image *im;
226 int i = 0;
227
228 printf("----SURFS----\n");
229 EINA_LIST_FOREACH(surfs, l, ie)
230 {
231 im = ie;
232 printf("%i - %p - %ix%i [%s][%s]\n",
233 i, im->image.data, ie->allocated.w, ie->allocated.h,
234 ie->file, ie->key
235 );
236 i++;
237 }
238}
239#endif
240
241EAPI void
242evas_common_rgba_image_unload(Image_Entry *ie)
243{
244 RGBA_Image *im = (RGBA_Image *) ie;
245
246 if (!ie->flags.loaded) return;
247 if ((!ie->info.module) && (!ie->data1)) return;
248 if (!ie->file) return;
249
250 ie->flags.loaded = 0;
251
252 if ((im->cs.data) && (im->image.data))
253 {
254 if (im->cs.data != im->image.data)
255 {
256 if (!im->cs.no_free) free(im->cs.data);
257 }
258 }
259 else if (im->cs.data)
260 {
261 if (!im->cs.no_free) free(im->cs.data);
262 }
263 im->cs.data = NULL;
264
265#ifdef EVAS_CSERVE
266 if (ie->data1)
267 {
268 evas_cserve_image_useless(ie);
269 im->image.data = NULL;
270 ie->allocated.w = 0;
271 ie->allocated.h = 0;
272 ie->flags.loaded = 0;
273#ifdef BUILD_ASYNC_PRELOAD
274 ie->flags.preload_done = 0;
275#endif
276 return;
277 }
278#endif
279
280 if (im->image.data && !im->image.no_free)
281 {
282 free(im->image.data);
283#ifdef SURFDBG
284 surfs = eina_list_remove(surfs, ie);
285#endif
286 }
287 im->image.data = NULL;
288 ie->allocated.w = 0;
289 ie->allocated.h = 0;
290 ie->flags.loaded = 0;
291#ifdef BUILD_ASYNC_PRELOAD
292 ie->flags.preload_done = 0;
293#endif
294#ifdef SURFDBG
295 surf_debug();
296#endif
297}
298
299void
300_evas_common_rgba_image_post_surface(Image_Entry *ie)
301{
302#ifdef HAVE_PIXMAN
303# ifdef PIXMAN_IMAGE
304 RGBA_Image *im = (RGBA_Image *)ie;
305
306 if (im->pixman.im) pixman_image_unref(im->pixman.im);
307 if (im->cache_entry.flags.alpha)
308 {
309 im->pixman.im = pixman_image_create_bits
310 (
311// FIXME: endianess determines this
312 PIXMAN_a8r8g8b8,
313// PIXMAN_b8g8r8a8,
314 im->cache_entry.w, im->cache_entry.h,
315 im->image.data,
316 im->cache_entry.w * 4
317 );
318 }
319 else
320 {
321 im->pixman.im = pixman_image_create_bits
322 (
323// FIXME: endianess determines this
324 PIXMAN_x8r8g8b8,
325// PIXMAN_b8g8r8x8,
326 im->cache_entry.w, im->cache_entry.h,
327 im->image.data,
328 im->cache_entry.w * 4
329 );
330 }
331# else
332 (void)ie;
333# endif
334#else
335 (void)ie;
336#endif
337}
338
339static int
340_evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
341{
342 RGBA_Image *im = (RGBA_Image *) ie;
343 size_t siz = 0;
344
345#ifdef EVAS_CSERVE
346 if (ie->data1) return 0;
347#endif
348 if (im->image.no_free) return 0;
349
350 if (im->flags & RGBA_IMAGE_ALPHA_ONLY)
351 siz = w * h * sizeof(DATA8);
352 else
353 siz = w * h * sizeof(DATA32);
354
355 if (im->image.data)
356 {
357 free(im->image.data);
358#ifdef SURFDBG
359 surfs = eina_list_remove(surfs, ie);
360#endif
361 }
362 im->image.data = malloc(siz);
363 if (!im->image.data) return -1;
364 ie->allocated.w = w;
365 ie->allocated.h = h;
366#ifdef SURFDBG
367 surfs = eina_list_append(surfs, ie);
368#endif
369#ifdef HAVE_VALGRIND
370# ifdef VALGRIND_MAKE_READABLE
371 VALGRIND_MAKE_READABLE(im->image.data, siz);
372# else
373# ifdef VALGRIND_MAKE_MEM_DEFINED
374 VALGRIND_MAKE_MEM_DEFINED(im->image.data, siz);
375# endif
376# endif
377#endif
378 _evas_common_rgba_image_post_surface(ie);
379#ifdef SURFDBG
380 surf_debug();
381#endif
382 return 0;
383}
384
385static void
386_evas_common_rgba_image_surface_delete(Image_Entry *ie)
387{
388 RGBA_Image *im = (RGBA_Image *) ie;
389
390#ifdef HAVE_PIXMAN
391# ifdef PIXMAN_IMAGE
392 if (im->pixman.im)
393 {
394 pixman_image_unref(im->pixman.im);
395 im->pixman.im = NULL;
396 }
397# endif
398#endif
399 if (ie->file)
400 DBG("unload: [%p] %s %s", ie, ie->file, ie->key);
401 if ((im->cs.data) && (im->image.data))
402 {
403 if (im->cs.data != im->image.data)
404 {
405 if (!im->cs.no_free) free(im->cs.data);
406 }
407 }
408 else if (im->cs.data)
409 {
410 if (!im->cs.no_free) free(im->cs.data);
411 }
412 im->cs.data = NULL;
413
414 if (im->image.data && !im->image.no_free)
415 {
416 free(im->image.data);
417#ifdef SURFDBG
418 surfs = eina_list_remove(surfs, ie);
419#endif
420 }
421#ifdef EVAS_CSERVE
422 else if (ie->data1)
423 evas_cserve_image_free(ie);
424#endif
425
426 im->image.data = NULL;
427 ie->allocated.w = 0;
428 ie->allocated.h = 0;
429#ifdef BUILD_ASYNC_PRELOAD
430 ie->flags.preload_done = 0;
431#endif
432 ie->flags.loaded = 0;
433 evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
434#ifdef SURFDBG
435 surf_debug();
436#endif
437}
438
439static void
440_evas_common_rgba_image_unload(Image_Entry *im)
441{
442// DBG("unload: [%p] %s %s", im, im->file, im->key);
443 evas_common_rgba_image_scalecache_dirty(im);
444 evas_common_rgba_image_unload(im);
445}
446
447static void
448_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__)
449{
450 RGBA_Image *im = (RGBA_Image *) ie;
451
452#ifdef EVAS_CSERVE
453 if (ie->data1) evas_cserve_image_free(ie);
454#endif
455 im->flags |= RGBA_IMAGE_IS_DIRTY;
456 evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
457}
458
459/* Only called when references > 0. Need to provide a fresh copie of im. */
460static int
461_evas_common_rgba_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
462{
463 RGBA_Image *dst = (RGBA_Image *) ie_dst;
464 RGBA_Image *src = (RGBA_Image *) ie_src;
465
466 evas_common_rgba_image_scalecache_dirty((Image_Entry *)ie_src);
467 evas_common_rgba_image_scalecache_dirty(ie_dst);
468 evas_cache_image_load_data(&src->cache_entry);
469 if (_evas_common_rgba_image_surface_alloc(&dst->cache_entry,
470 src->cache_entry.w, src->cache_entry.h))
471 {
472#ifdef EVAS_CSERVE
473 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
474#endif
475 return 1;
476 }
477
478#ifdef EVAS_CSERVE
479 if (ie_src->data1) evas_cserve_image_free((Image_Entry*) ie_src);
480#endif
481 evas_common_image_colorspace_normalize(src);
482 evas_common_image_colorspace_normalize(dst);
483/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */
484/* evas_common_cpu_end_opt(); */
485
486 return 0;
487}
488
489static int
490_evas_common_rgba_image_ram_usage(Image_Entry *ie)
491{
492 RGBA_Image *im = (RGBA_Image *)ie;
493 int size = sizeof(struct _RGBA_Image);
494
495 if (ie->cache_key) size += strlen(ie->cache_key);
496 if (ie->file) size += strlen(ie->file);
497 if (ie->key) size += strlen(ie->key);
498
499 if (im->image.data)
500 {
501#ifdef EVAS_CSERVE
502 if ((!im->image.no_free) || (ie->data1))
503#else
504 if ((!im->image.no_free))
505#endif
506 size += im->cache_entry.w * im->cache_entry.h * sizeof(DATA32);
507 }
508 size += evas_common_rgba_image_scalecache_usage_get(&im->cache_entry);
509 return size;
510}
511
512static DATA32 *
513_evas_common_rgba_image_surface_pixels(Image_Entry *ie)
514{
515 RGBA_Image *im = (RGBA_Image *) ie;
516
517 return im->image.data;
518}
519
520#if 0
521void
522evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
523{
524 int x, y;
525 DATA32 *ptr;
526
527 if (is->spans) return;
528 if (!is->im->cache_entry.flags.alpha) return;
529 /* FIXME: dont handle alpha only images yet */
530 if ((is->im->flags & RGBA_IMAGE_ALPHA_ONLY)) return;
531 if (tsize < 0) tsize = 0;
532 is->spans = calloc(1, sizeof(RGBA_Image_Span *) * is->h);
533 if (!is->spans) return;
534 ptr = is->data;
535 for (y = 0; y < is->h; y++)
536 {
537 RGBA_Image_Span *sp;
538
539 sp = NULL;
540 for (x = 0; x < is->w; x++)
541 {
542 DATA8 a;
543
544 a = A_VAL(ptr);
545 if (sp)
546 {
547 if (a == 0)
548 {
549 is->spans[y] = eina_inlist_append(is->spans[y], sp);
550 sp = NULL;
551 }
552 else
553 {
554 sp->w++;
555 if ((sp->v == 2) && (a != 255)) sp->v = 1;
556 }
557 }
558 else
559 {
560 if (a == 255)
561 {
562 sp = calloc(1, sizeof(RGBA_Image_Span));
563 sp->x = x;
564 sp->w = 1;
565 sp->v = 2;
566 }
567 else if (a > 0)
568 {
569 sp = calloc(1, sizeof(RGBA_Image_Span));
570 sp->x = x;
571 sp->w = 1;
572 sp->v = 1;
573 }
574 }
575 ptr++;
576 }
577 if (sp)
578 {
579 is->spans[y] = eina_inlist_append(is->spans[y], sp);
580 sp = NULL;
581 }
582 }
583}
584#endif
585
586/* EAPI void */
587/* evas_common_image_surface_dealloc(RGBA_Surface *is) */
588/* { */
589/* if ((is->data) && (!is->no_free)) */
590/* { */
591/* free(is->data); */
592/* is->data = NULL; */
593/* } */
594/* } */
595
596static RGBA_Image *
597evas_common_image_create(unsigned int w, unsigned int h)
598{
599 RGBA_Image *im;
600
601 im = (RGBA_Image *) _evas_common_rgba_image_new();
602 if (!im) return NULL;
603 im->cache_entry.w = w;
604 im->cache_entry.h = h;
605 if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h))
606 {
607 _evas_common_rgba_image_delete(&im->cache_entry);
608 return NULL;
609 }
610 im->cache_entry.flags.cached = 0;
611 return im;
612}
613
614EAPI RGBA_Image *
615evas_common_image_alpha_create(unsigned int w, unsigned int h)
616{
617 RGBA_Image *im;
618
619 im = (RGBA_Image *) _evas_common_rgba_image_new();
620 if (!im) return NULL;
621 im->cache_entry.w = w;
622 im->cache_entry.h = h;
623 im->cache_entry.flags.alpha = 1;
624 if (_evas_common_rgba_image_surface_alloc(&im->cache_entry, w, h))
625 {
626 _evas_common_rgba_image_delete(&im->cache_entry);
627 return NULL;
628 }
629 im->cache_entry.flags.cached = 0;
630 return im;
631}
632
633EAPI RGBA_Image *
634evas_common_image_new(unsigned int w, unsigned int h, unsigned int alpha)
635{
636 if (alpha)
637 return evas_common_image_alpha_create(w, h);
638 return evas_common_image_create(w, h);
639}
640
641void
642evas_common_image_colorspace_normalize(RGBA_Image *im)
643{
644 if ((!im->cs.data) ||
645 ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY)))) return;
646 switch (im->cache_entry.space)
647 {
648 case EVAS_COLORSPACE_ARGB8888:
649 if (im->image.data != im->cs.data)
650 {
651#ifdef EVAS_CSERVE
652 if (((Image_Entry *)im)->data1) evas_cserve_image_free(&im->cache_entry);
653#endif
654 if (!im->image.no_free)
655 {
656 free(im->image.data);
657#ifdef SURFDBG
658 surfs = eina_list_remove(surfs, im);
659#endif
660 ((Image_Entry *)im)->allocated.w = 0;
661 ((Image_Entry *)im)->allocated.h = 0;
662 }
663 im->image.data = im->cs.data;
664 im->cs.no_free = im->image.no_free;
665 }
666 break;
667 case EVAS_COLORSPACE_YCBCR422P601_PL:
668#ifdef BUILD_CONVERT_YUV
669 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
670 evas_common_convert_yuv_420p_601_rgba(im->cs.data, (DATA8*) im->image.data,
671 im->cache_entry.w, im->cache_entry.h);
672#endif
673 break;
674 case EVAS_COLORSPACE_YCBCR422601_PL:
675#ifdef BUILD_CONVERT_YUV
676 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
677 evas_common_convert_yuv_422_601_rgba(im->cs.data, (DATA8*) im->image.data,
678 im->cache_entry.w, im->cache_entry.h);
679#endif
680 break;
681 case EVAS_COLORSPACE_YCBCR420NV12601_PL:
682#ifdef BUILD_CONVERT_YUV
683 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
684 evas_common_convert_yuv_420_601_rgba(im->cs.data, (DATA8*) im->image.data,
685 im->cache_entry.w, im->cache_entry.h);
686#endif
687 break;
688 case EVAS_COLORSPACE_YCBCR420TM12601_PL:
689#ifdef BUILD_CONVERT_YUV
690 if ((im->image.data) && (*((unsigned char **)im->cs.data)))
691 evas_common_convert_yuv_420T_601_rgba(im->cs.data, (DATA8*) im->image.data,
692 im->cache_entry.w, im->cache_entry.h);
693#endif
694 break;
695 default:
696 break;
697 }
698 im->cs.dirty = 0;
699#ifdef SURFDBG
700 surf_debug();
701#endif
702}
703
704EAPI void
705evas_common_image_colorspace_dirty(RGBA_Image *im)
706{
707 im->cs.dirty = 1;
708 evas_common_rgba_image_scalecache_dirty(&im->cache_entry);
709}
710
711EAPI void
712evas_common_image_set_cache(unsigned int size)
713{
714 if (eci)
715 evas_cache_image_set(eci, size);
716}
717
718EAPI int
719evas_common_image_get_cache(void)
720{
721 return evas_cache_image_get(eci);
722}
723
724EAPI RGBA_Image *
725evas_common_load_image_from_file(const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error)
726{
727 if (!file)
728 {
729 *error = EVAS_LOAD_ERROR_GENERIC;
730 return NULL;
731 }
732 return (RGBA_Image *) evas_cache_image_request(eci, file, key, lo, error);
733}
734
735EAPI void
736evas_common_image_cache_free(void)
737{
738 evas_common_image_set_cache(0);
739}
740
741EAPI Evas_Cache_Image*
742evas_common_image_cache_get(void)
743{
744 return eci;
745}
746
747EAPI RGBA_Image *
748evas_common_image_line_buffer_obtain(int len)
749{
750 if (len < 1) return NULL;
751 if (len < EVAS_RGBA_LINE_BUFFER_MIN_LEN)
752 len = EVAS_RGBA_LINE_BUFFER_MIN_LEN;
753 return evas_common_image_create(len, 1);
754/*
755 if (evas_rgba_line_buffer)
756 {
757 if (evas_rgba_line_buffer->image->w >= len)
758 return evas_rgba_line_buffer;
759 evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data, len * sizeof(DATA32));
760 if (!evas_rgba_line_buffer->image->data)
761 {
762 evas_common_image_free(evas_rgba_line_buffer);
763 evas_rgba_line_buffer = NULL;
764 return NULL;
765 }
766 evas_rgba_line_buffer->image->w = len;
767 return evas_rgba_line_buffer;
768 }
769 evas_rgba_line_buffer = evas_common_image_create(len, 1);
770 if (!evas_rgba_line_buffer) return NULL;
771 return evas_rgba_line_buffer;
772 */
773}
774
775EAPI void
776evas_common_image_line_buffer_release(RGBA_Image *im)
777{
778 _evas_common_rgba_image_delete(&im->cache_entry);
779/*
780 if (!evas_rgba_line_buffer) return;
781 if (EVAS_RGBA_LINE_BUFFER_MAX_LEN < evas_rgba_line_buffer->image->w)
782 {
783 evas_rgba_line_buffer->image->w = EVAS_RGBA_LINE_BUFFER_MAX_LEN;
784 evas_rgba_line_buffer->image->data = (DATA32 *)realloc(evas_rgba_line_buffer->image->data,
785 evas_rgba_line_buffer->image->w * sizeof(DATA32));
786 if (!evas_rgba_line_buffer->image->data)
787 {
788 evas_common_image_free(evas_rgba_line_buffer);
789 evas_rgba_line_buffer = NULL;
790 }
791 }
792 */
793}
794
795EAPI void
796evas_common_image_line_buffer_free(RGBA_Image *im)
797{
798 _evas_common_rgba_image_delete(&im->cache_entry);
799/*
800 if (!evas_rgba_line_buffer) return;
801 evas_common_image_free(evas_rgba_line_buffer);
802 evas_rgba_line_buffer = NULL;
803 */
804}
805
806EAPI RGBA_Image *
807evas_common_image_alpha_line_buffer_obtain(int len)
808{
809 if (len < 1) return NULL;
810 if (len < EVAS_ALPHA_LINE_BUFFER_MIN_LEN)
811 len = EVAS_ALPHA_LINE_BUFFER_MIN_LEN;
812 return evas_common_image_alpha_create(len, 1);
813/*
814 if (evas_alpha_line_buffer)
815 {
816 if (evas_alpha_line_buffer->image->w >= len)
817 return evas_alpha_line_buffer;
818 evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data, len * sizeof(DATA8));
819 if (!evas_alpha_line_buffer->image->data)
820 {
821 evas_common_image_free(evas_alpha_line_buffer);
822 evas_alpha_line_buffer = NULL;
823 return NULL;
824 }
825 evas_alpha_line_buffer->image->w = len;
826 return evas_alpha_line_buffer;
827 }
828 evas_alpha_line_buffer = evas_common_image_alpha_create(len, 1);
829 return evas_alpha_line_buffer;
830 */
831}
832
833EAPI void
834evas_common_image_alpha_line_buffer_release(RGBA_Image *im)
835{
836 _evas_common_rgba_image_delete(&im->cache_entry);
837/*
838 if (!evas_alpha_line_buffer) return;
839 if (EVAS_ALPHA_LINE_BUFFER_MAX_LEN < evas_alpha_line_buffer->image->w)
840 {
841 evas_alpha_line_buffer->image->w = EVAS_ALPHA_LINE_BUFFER_MAX_LEN;
842 evas_alpha_line_buffer->image->data = realloc(evas_alpha_line_buffer->image->data,
843 evas_alpha_line_buffer->image->w * sizeof(DATA8));
844 if (!evas_alpha_line_buffer->image->data)
845 {
846 evas_common_image_free(evas_alpha_line_buffer);
847 evas_alpha_line_buffer = NULL;
848 }
849 }
850 */
851}
852
853EAPI void
854evas_common_image_premul(Image_Entry *ie)
855{
856 DATA32 nas = 0;
857
858 if (!ie) return ;
859 if (!evas_cache_image_pixels(ie)) return ;
860 if (!ie->flags.alpha) return;
861
862 nas = evas_common_convert_argb_premul(evas_cache_image_pixels(ie), ie->w * ie->h);
863 if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h))
864 ie->flags.alpha_sparse = 1;
865}
866
867EAPI void
868evas_common_image_set_alpha_sparse(Image_Entry *ie)
869{
870 DATA32 *s, *se;
871 DATA32 nas = 0;
872
873 if (!ie) return;
874 if (!evas_cache_image_pixels(ie)) return ;
875 if (!ie->flags.alpha) return;
876
877 s = evas_cache_image_pixels(ie);
878 se = s + (ie->w * ie->h);
879 while (s < se)
880 {
881 DATA32 p = *s & 0xff000000;
882
883 if (!p || (p == 0xff000000))
884 nas++;
885 s++;
886 }
887 if ((ALPHA_SPARSE_INV_FRACTION * nas) >= (ie->w * ie->h))
888 ie->flags.alpha_sparse = 1;
889}
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 @@
1#ifndef _EVAS_IMAGE_PRIVATE_H
2#define _EVAS_IMAGE_PRIVATE_H
3
4int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, unsigned int w, unsigned int h);
5int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
6int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
7int evas_common_rgba_image_colorspace_set (Image_Entry* dst, int cspace);
8
9void evas_common_scalecache_init(void);
10void evas_common_scalecache_shutdown(void);
11void evas_common_rgba_image_scalecache_init(Image_Entry *ie);
12void evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie);
13void evas_common_rgba_image_scalecache_dirty(Image_Entry *ie);
14void evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie);
15int evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie);
16
17#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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#include "evas_options.h"
6
7#include "evas_common.h"
8#include "evas_private.h"
9
10
11int
12evas_common_save_image_to_file(RGBA_Image *im, const char *file, const char *key, int quality, int compress)
13{
14 Evas_Image_Save_Func *evas_image_save_func = NULL;
15 char *p;
16 char *saver = NULL;
17
18 p = strrchr(file, '.');
19 if (p)
20 {
21 p++;
22
23 if (!strcasecmp(p, "png"))
24 saver = "png";
25 if ((!strcasecmp(p, "jpg")) || (!strcasecmp(p, "jpeg")) ||
26 (!strcasecmp(p, "jfif")))
27 saver = "jpeg";
28 if ((!strcasecmp(p, "eet")) || (!strcasecmp(p, "edj")) ||
29 (!strcasecmp(p, "eap")))
30 saver = "eet";
31 if (!strcasecmp(p, "edb"))
32 saver = "edb";
33 }
34
35 if (saver)
36 {
37 Evas_Module *em;
38
39 em = evas_module_find_type(EVAS_MODULE_TYPE_IMAGE_SAVER, saver);
40 if (em)
41 {
42 evas_module_use(em);
43 if (evas_module_load(em))
44 {
45 evas_image_save_func = em->functions;
46 return evas_image_save_func->image_save(im, file, key, quality, compress);
47 }
48 }
49 }
50 return 0;
51}
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 @@
1#ifdef HAVE_CONFIG_H
2# include "config.h"
3#endif
4
5#ifdef HAVE_EVIL
6# include <Evil.h>
7#endif
8
9#include <assert.h>
10
11#include "evas_common.h"
12#include "evas_private.h"
13#include "evas_image_private.h"
14
15#define SCALECACHE 1
16
17#define MAX_SCALEITEMS 32
18#define MIN_SCALE_USES 3
19//#define MIN_SCALE_AGE_GAP 5000
20#define MAX_SCALECACHE_DIM 3200
21#define FLOP_ADD 4
22#define MAX_FLOP_COUNT 16
23#define FLOP_DEL 1
24#define SCALE_CACHE_SIZE 4 * 1024 * 1024
25//#define SCALE_CACHE_SIZE 0
26
27typedef struct _Scaleitem Scaleitem;
28
29struct _Scaleitem
30{
31 EINA_INLIST;
32 unsigned long long usage;
33 unsigned long long usage_count;
34 RGBA_Image *im, *parent_im;
35 int src_x, src_y;
36 unsigned int src_w, src_h;
37 unsigned int dst_w, dst_h;
38 unsigned int flop;
39 unsigned int size_adjust;
40#ifdef EVAS_FRAME_QUEUING
41 RWLK(lock);
42#endif
43 Eina_Bool forced_unload : 1;
44 Eina_Bool smooth : 1;
45 Eina_Bool populate_me : 1;
46};
47
48#ifdef SCALECACHE
49static unsigned long long use_counter = 0;
50
51static LK(cache_lock);
52static Eina_Inlist *cache_list = NULL;
53static unsigned int cache_size = 0;
54static int init = 0;
55
56static unsigned int max_cache_size = SCALE_CACHE_SIZE;
57static unsigned int max_dimension = MAX_SCALECACHE_DIM;
58static unsigned int max_flop_count = MAX_FLOP_COUNT;
59static unsigned int max_scale_items = MAX_SCALEITEMS;
60static unsigned int min_scale_uses = MIN_SCALE_USES;
61#endif
62
63void
64evas_common_scalecache_init(void)
65{
66#ifdef SCALECACHE
67 const char *s;
68
69 init++;
70 if (init > 1) return;
71 use_counter = 0;
72 LKI(cache_lock);
73 s = getenv("EVAS_SCALECACHE_SIZE");
74 if (s) max_cache_size = atoi(s) * 1024;
75 s = getenv("EVAS_SCALECACHE_MAX_DIMENSION");
76 if (s) max_dimension = atoi(s);
77 s = getenv("EVAS_SCALECACHE_MAX_FLOP_COUNT");
78 if (s) max_flop_count = atoi(s);
79 s = getenv("EVAS_SCALECACHE_MAX_ITEMS");
80 if (s) max_scale_items = atoi(s);
81 s = getenv("EVAS_SCALECACHE_MIN_USES");
82 if (s) min_scale_uses = atoi(s);
83#endif
84}
85
86void
87evas_common_scalecache_shutdown(void)
88{
89#ifdef SCALECACHE
90 init--;
91 if (init ==0)
92 LKD(cache_lock);
93#endif
94}
95
96void
97evas_common_rgba_image_scalecache_init(Image_Entry *ie)
98{
99#ifdef SCALECACHE
100 RGBA_Image *im = (RGBA_Image *)ie;
101 // NOTE: this conflicts with evas image cache init and del of lock
102 LKI(im->cache.lock);
103#endif
104}
105
106void
107evas_common_rgba_image_scalecache_shutdown(Image_Entry *ie)
108{
109#ifdef SCALECACHE
110 RGBA_Image *im = (RGBA_Image *)ie;
111 evas_common_rgba_image_scalecache_dirty(ie);
112 // NOTE: this conflicts with evas image cache init and del of lock
113 LKD(im->cache.lock);
114#endif
115}
116
117void
118evas_common_rgba_image_scalecache_dirty(Image_Entry *ie)
119{
120#ifdef SCALECACHE
121 RGBA_Image *im = (RGBA_Image *)ie;
122 LKL(im->cache.lock);
123 while (im->cache.list)
124 {
125 Scaleitem *sci;
126 sci = im->cache.list->data;
127#ifdef EVAS_FRAME_QUEUING
128 WRLKL(sci->lock);
129#endif
130 im->cache.list = eina_list_remove(im->cache.list, sci);
131 if (sci->im)
132 {
133// INF(" 0- %i", sci->dst_w * sci->dst_h * 4);
134 LKL(cache_lock);
135 evas_common_rgba_image_free(&sci->im->cache_entry);
136 if (!sci->forced_unload)
137 cache_size -= sci->dst_w * sci->dst_h * 4;
138 else
139 cache_size -= sci->size_adjust;
140 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
141 LKU(cache_lock);
142 }
143#ifdef EVAS_FRAME_QUEUING
144 RWLKU(sci->lock);
145 RWLKD(sci->lock);
146#endif
147 free(sci);
148 }
149 LKU(im->cache.lock);
150#endif
151}
152
153void
154evas_common_rgba_image_scalecache_orig_use(Image_Entry *ie)
155{
156#ifdef SCALECACHE
157 RGBA_Image *im = (RGBA_Image *)ie;
158 LKL(im->cache.lock);
159 use_counter++;
160 // FIXME: if orig not loaded, reload
161 // FIXME: mark orig with current used counter
162 im->cache.orig_usage++;
163 im->cache.usage_count = use_counter;
164 LKU(im->cache.lock);
165#endif
166}
167
168int
169evas_common_rgba_image_scalecache_usage_get(Image_Entry *ie)
170{
171#ifdef SCALECACHE
172 RGBA_Image *im = (RGBA_Image *)ie;
173 int size = 0;
174 Eina_List *l;
175 Scaleitem *sci;
176 LKL(im->cache.lock);
177 EINA_LIST_FOREACH(im->cache.list, l, sci)
178 {
179 if (sci->im) size += sci->dst_w * sci->dst_h * 4;
180 }
181 LKU(im->cache.lock);
182 return size;
183#else
184 return 0;
185#endif
186}
187
188#ifdef SCALECACHE
189static void
190_sci_fix_newest(RGBA_Image *im)
191{
192 Eina_List *l;
193 Scaleitem *sci;
194
195 im->cache.newest_usage = 0;
196 im->cache.newest_usage_count = 0;
197 EINA_LIST_FOREACH(im->cache.list, l, sci)
198 {
199 if (sci->usage > im->cache.newest_usage)
200 im->cache.newest_usage = sci->usage;
201 if (sci->usage_count > im->cache.newest_usage_count)
202 im->cache.newest_usage_count = sci->usage_count;
203 }
204// INF("_sci_fix_newest! -> %i", im->cache.newest_usage);
205}
206
207static Scaleitem *
208_sci_find(RGBA_Image *im,
209 RGBA_Draw_Context *dc __UNUSED__, int smooth,
210 int src_region_x, int src_region_y,
211 unsigned int src_region_w, unsigned int src_region_h,
212 unsigned int dst_region_w, unsigned int dst_region_h)
213{
214 Eina_List *l;
215 Scaleitem *sci;
216
217 EINA_LIST_FOREACH(im->cache.list, l, sci)
218 {
219 if (
220 (sci->src_w == src_region_w) &&
221 (sci->src_h == src_region_h) &&
222 (sci->dst_w == dst_region_w) &&
223 (sci->dst_h == dst_region_h) &&
224 (sci->src_x == src_region_x) &&
225 (sci->src_y == src_region_y) &&
226 (sci->smooth == smooth)
227 )
228 {
229 if (im->cache.list != l)
230 {
231 im->cache.list = eina_list_remove_list(im->cache.list, l);
232 im->cache.list = eina_list_prepend(im->cache.list, sci);
233 }
234 return sci;
235 }
236 }
237 if (eina_list_count(im->cache.list) > max_scale_items)
238 {
239 l = eina_list_last(im->cache.list);
240 sci = l->data;
241#ifdef EVAS_FRAME_QUEUING
242 WRLKL(sci->lock);
243#endif
244 im->cache.list = eina_list_remove_list(im->cache.list, l);
245 if ((sci->usage == im->cache.newest_usage) ||
246 (sci->usage_count == im->cache.newest_usage_count))
247 _sci_fix_newest(im);
248 if (sci->im)
249 {
250 evas_common_rgba_image_free(&sci->im->cache_entry);
251 if (!sci->forced_unload)
252 cache_size -= sci->dst_w * sci->dst_h * 4;
253 else
254 cache_size -= sci->size_adjust;
255// INF(" 1- %i", sci->dst_w * sci->dst_h * 4);
256 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
257 }
258#ifdef EVAS_FRAME_QUEUING
259 RWLKU(sci->lock);
260#endif
261 if (max_scale_items < 1) return NULL;
262 }
263 else
264 {
265 if (max_scale_items < 1) return NULL;
266
267 if (eina_list_count(im->cache.list) > (max_scale_items - 1))
268 return NULL;
269 sci = calloc(1, sizeof(Scaleitem));
270 sci->parent_im = im;
271#ifdef EVAS_FRAME_QUEUING
272 RWLKI(sci->lock);
273#endif
274 }
275 sci->usage = 0;
276 sci->usage_count = 0;
277 sci->populate_me = 0;
278 sci->smooth = smooth;
279 sci->forced_unload = 0;
280 sci->flop = 0;
281 sci->im = NULL;
282 sci->src_x = src_region_x;
283 sci->src_y = src_region_y;
284 sci->src_w = src_region_w;
285 sci->src_h = src_region_h;
286 sci->dst_w = dst_region_w;
287 sci->dst_h = dst_region_h;
288 im->cache.list = eina_list_prepend(im->cache.list, sci);
289 return sci;
290}
291
292static void
293_cache_prune(Scaleitem *notsci, Eina_Bool copies_only)
294{
295 Scaleitem *sci;
296 while (cache_size > max_cache_size)
297 {
298 if (!cache_list) break;
299 sci = (Scaleitem *)(cache_list);
300 if (copies_only)
301 {
302 while ((sci) && (!sci->parent_im->image.data))
303 sci = (Scaleitem *)(((Eina_Inlist *)sci)->next);
304 if (!sci) return;
305 }
306 if (sci == notsci) return;
307#ifdef EVAS_FRAME_QUEUING
308 WRLKL(sci->lock);
309#endif
310 if (sci->im)
311 {
312 evas_common_rgba_image_free(&sci->im->cache_entry);
313 sci->im = NULL;
314 sci->usage = 0;
315 sci->usage_count = 0;
316 sci->flop += FLOP_ADD;
317 if (!sci->forced_unload)
318 cache_size -= sci->dst_w * sci->dst_h * 4;
319 else
320 cache_size -= sci->size_adjust;
321// INF(" 2- %i", sci->dst_w * sci->dst_h * 4);
322 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
323 memset(sci, 0, sizeof(Eina_Inlist));
324 }
325#ifdef EVAS_FRAME_QUEUING
326 RWLKU(sci->lock);
327#endif
328
329// INF("FLUSH %i > %i", cache_size, max_cache_size);
330 }
331}
332#endif
333
334EAPI void
335evas_common_rgba_image_scalecache_size_set(unsigned int size)
336{
337#ifdef SCALECACHE
338 LKL(cache_lock);
339 if (size != max_cache_size)
340 {
341 max_cache_size = size;
342 _cache_prune(NULL, 1);
343 }
344 LKU(cache_lock);
345#endif
346}
347
348EAPI unsigned int
349evas_common_rgba_image_scalecache_size_get(void)
350{
351#ifdef SCALECACHE
352 int t;
353 LKL(cache_lock);
354 t = max_cache_size;
355 LKU(cache_lock);
356 return t;
357#else
358 return 0;
359#endif
360}
361
362EAPI void
363evas_common_rgba_image_scalecache_dump(void)
364{
365#ifdef SCALECACHE
366 int t;
367 LKL(cache_lock);
368 t = max_cache_size;
369 max_cache_size = 0;
370 _cache_prune(NULL, 0);
371 max_cache_size = t;
372 LKU(cache_lock);
373#endif
374}
375
376EAPI void
377evas_common_rgba_image_scalecache_flush(void)
378{
379#ifdef SCALECACHE
380 int t;
381 LKL(cache_lock);
382 t = max_cache_size;
383 max_cache_size = 0;
384 _cache_prune(NULL, 1);
385 max_cache_size = t;
386 LKU(cache_lock);
387#endif
388}
389
390EAPI void
391evas_common_rgba_image_scalecache_prepare(Image_Entry *ie, RGBA_Image *dst __UNUSED__,
392 RGBA_Draw_Context *dc, int smooth,
393 int src_region_x, int src_region_y,
394 int src_region_w, int src_region_h,
395 int dst_region_x __UNUSED__, int dst_region_y __UNUSED__,
396 int dst_region_w, int dst_region_h)
397{
398#ifdef SCALECACHE
399 int locked = 0;
400 Eina_Lock_Result ret;
401 RGBA_Image *im = (RGBA_Image *)ie;
402 Scaleitem *sci;
403 if (!im->image.data) return;
404 if ((dst_region_w == 0) || (dst_region_h == 0) ||
405 (src_region_w == 0) || (src_region_h == 0)) return;
406 // was having major lock issues here - LKL was deadlocking. what was
407 // going on? it may have been an eina treads badness but this will stay here
408 // for now for debug
409#if 1
410 ret = LKT(im->cache.lock);
411 if (ret == EINA_FALSE) /* can't get image lock */
412 {
413 useconds_t slp = 1, slpt = 0;
414
415 while (slpt < 500000)
416 {
417#ifdef _WIN32
418 Sleep(slp / 1000);
419#else
420 usleep(slp);
421#endif
422 slpt += slp;
423 slp++;
424 ret = LKT(im->cache.lock);
425 if (ret == EINA_LOCK_DEADLOCK)
426 {
427 printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file);
428 }
429 else
430 {
431 locked = 1;
432 break;
433 }
434 }
435 if (ret == EINA_FALSE)
436 {
437 printf("WARNING: lock still there after %i usec\n", slpt);
438 printf("WARNING: stucklock on image %p (%s)\n", im, ie->file);
439 LKDBG(im->cache.lock);
440 }
441 }
442 else if (ret == EINA_LOCK_DEADLOCK)
443 {
444 printf("WARNING: DEADLOCK on image %p (%s)\n", im, ie->file);
445 }
446 else locked = 1;
447#endif
448 if (!locked) { LKL(im->cache.lock); locked = 1; }
449 use_counter++;
450 if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h))
451 {
452 // 1:1 scale.
453 im->cache.orig_usage++;
454 im->cache.usage_count = use_counter;
455 if (locked) LKU(im->cache.lock);
456 return;
457 }
458 if ((!im->cache_entry.flags.alpha) && (!smooth))
459 {
460 // solid nearest scaling - it's actually the same speed cached or not,
461 // or in some cases faster not cached
462 im->cache.orig_usage++;
463 im->cache.usage_count = use_counter;
464 if (locked) LKU(im->cache.lock);
465 return;
466 }
467 LKL(cache_lock);
468 sci = _sci_find(im, dc, smooth,
469 src_region_x, src_region_y, src_region_w, src_region_h,
470 dst_region_w, dst_region_h);
471 if (!sci)
472 {
473 LKU(cache_lock);
474 if (locked) LKU(im->cache.lock);
475 return;
476 }
477// INF("%10i | %4i %4i %4ix%4i -> %4i %4i %4ix%4i | %i",
478// (int)use_counter,
479// src_region_x, src_region_y, src_region_w, src_region_h,
480// dst_region_x, dst_region_y, dst_region_w, dst_region_h,
481// smooth);
482 if ((sci->usage >= min_scale_uses)
483 && (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)
484// && (sci->usage_count > (use_counter - MIN_SCALE_AGE_GAP))
485 )
486 {
487 if (!sci->im)
488 {
489 if ((sci->dst_w < max_dimension) &&
490 (sci->dst_h < max_dimension))
491 {
492 if (sci->flop <= max_flop_count)
493 {
494 sci->populate_me = 1;
495 im->cache.populate_count++;
496 }
497 }
498 }
499 }
500 sci->usage++;
501 sci->usage_count = use_counter;
502 LKU(cache_lock);
503 if (sci->usage > im->cache.newest_usage)
504 im->cache.newest_usage = sci->usage;
505// INF("newset? %p %i > %i", im,
506// (int)sci->usage,
507// (int)im->cache.newest_usage);
508 if (sci->usage_count > im->cache.newest_usage_count)
509 im->cache.newest_usage_count = sci->usage_count;
510// INF(" -------------- used %8i#, %8i@", (int)sci->usage, (int)sci->usage_count);
511 if (locked) LKU(im->cache.lock);
512#endif
513}
514
515#ifdef SCALECACHE
516//static int pops = 0;
517//static int hits = 0;
518//static int misses = 0;
519//static int noscales = 0;
520#endif
521
522EAPI void
523evas_common_rgba_image_scalecache_do(Image_Entry *ie, RGBA_Image *dst,
524 RGBA_Draw_Context *dc, int smooth,
525 int src_region_x, int src_region_y,
526 int src_region_w, int src_region_h,
527 int dst_region_x, int dst_region_y,
528 int dst_region_w, int dst_region_h)
529{
530#ifdef SCALECACHE
531 RGBA_Image *im = (RGBA_Image *)ie;
532 Scaleitem *sci;
533 int didpop = 0;
534 int dounload = 0;
535/*
536 static int i = 0;
537
538 i++;
539 if (i > 2000)
540 {
541 INF("p: %6i, h: %6i, m: %6i, n: %6i",
542 pops, hits, misses, noscales);
543 i = 0;
544 }
545 */
546 if ((dst_region_w == 0) || (dst_region_h == 0) ||
547 (src_region_w == 0) || (src_region_h == 0)) return;
548 LKL(im->cache.lock);
549 if ((src_region_w == dst_region_w) && (src_region_h == dst_region_h))
550 {
551#ifdef EVAS_FRAME_QUEUING
552 if (!evas_common_frameq_enabled())
553#endif
554 {
555 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
556 evas_cache_image_load_data(&im->cache_entry);
557 evas_common_image_colorspace_normalize(im);
558 }
559// noscales++;
560 LKU(im->cache.lock);
561 if (im->image.data)
562 {
563 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
564 src_region_x, src_region_y,
565 src_region_w, src_region_h,
566 dst_region_x, dst_region_y,
567 dst_region_w, dst_region_h);
568 }
569 return;
570 }
571 LKL(cache_lock);
572 sci = _sci_find(im, dc, smooth,
573 src_region_x, src_region_y, src_region_w, src_region_h,
574 dst_region_w, dst_region_h);
575 LKU(cache_lock);
576 if (!sci)
577 {
578#ifdef EVAS_FRAME_QUEUING
579 if (!evas_common_frameq_enabled())
580#endif
581 {
582 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
583 evas_cache_image_load_data(&im->cache_entry);
584 evas_common_image_colorspace_normalize(im);
585 }
586// misses++;
587 LKU(im->cache.lock);
588 if (im->image.data)
589 {
590 if (smooth)
591 evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
592 src_region_x, src_region_y,
593 src_region_w, src_region_h,
594 dst_region_x, dst_region_y,
595 dst_region_w, dst_region_h);
596 else
597 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
598 src_region_x, src_region_y,
599 src_region_w, src_region_h,
600 dst_region_x, dst_region_y,
601 dst_region_w, dst_region_h);
602 }
603 return;
604 }
605 if (sci->populate_me)
606 {
607 int size, osize, used;
608
609 size = dst_region_w * dst_region_h;
610 if (((((dst_region_w > 640) || (dst_region_h > 640)) &&
611 (size > (480 * 480))) ||
612 (ie->scale_hint == EVAS_IMAGE_SCALE_HINT_STATIC)) &&
613 (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC))
614 {
615 Eina_List *l;
616 Scaleitem *sci2;
617
618 dounload = 1;
619 osize = sci->parent_im->cache_entry.w * sci->parent_im->cache_entry.h;
620 used = 0;
621 EINA_LIST_FOREACH(im->cache.list, l, sci2)
622 {
623 if (sci2->im) used += sci2->dst_w * sci2->dst_h;
624 }
625 if ((size < osize) && (used == 0))
626 sci->size_adjust = 0;
627 else
628 {
629 osize -= used;
630 if (osize < 0) osize = 0;
631 size -= osize;
632 sci->size_adjust = size * 4;
633 }
634 }
635 else
636 {
637 size *= sizeof(DATA32);
638 if ((cache_size + size) > max_cache_size)
639 {
640 sci->populate_me = 0;
641 im->cache.populate_count--;
642 }
643 }
644 }
645 if (sci->populate_me)
646 {
647// INF("##! populate!");
648 sci->im = evas_common_image_new
649 (dst_region_w, dst_region_h, im->cache_entry.flags.alpha);
650 if (sci->im)
651 {
652 static RGBA_Draw_Context *ct = NULL;
653
654 LKL(cache_lock);
655 im->cache.orig_usage++;
656 im->cache.usage_count = use_counter;
657 im->cache.populate_count--;
658// pops++;
659 if (!ct)
660 {
661 // FIXME: static ct - never can free on shutdown? not a leak
662 // or real harm - just annoying valgrind bitch
663 ct = evas_common_draw_context_new();
664 evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY);
665 }
666 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
667 evas_cache_image_load_data(&im->cache_entry);
668 evas_common_image_colorspace_normalize(im);
669 if (im->image.data)
670 {
671 if (smooth)
672 evas_common_scale_rgba_in_to_out_clip_smooth
673 (im, sci->im, ct,
674 src_region_x, src_region_y,
675 src_region_w, src_region_h,
676 0, 0,
677 dst_region_w, dst_region_h);
678 else
679 evas_common_scale_rgba_in_to_out_clip_sample
680 (im, sci->im, ct,
681 src_region_x, src_region_y,
682 src_region_w, src_region_h,
683 0, 0,
684 dst_region_w, dst_region_h);
685 sci->populate_me = 0;
686#if 0 // visual debug of cached images
687 {
688 int xx, yy;
689 DATA32 *pp;
690
691 pp = sci->im->image.data;
692 for (yy = 0; yy < dst_region_h; yy++)
693 {
694
695 for (xx = 0; xx < dst_region_w; xx++)
696 {
697 if (yy & 0x1)
698 {
699 if (xx & 0x1) *pp = 0x882288ff;
700 }
701 else
702 {
703 if (!(xx & 0x1)) *pp = 0x882288ff;
704 }
705 pp++;
706 }
707 }
708 }
709#endif
710 }
711 if (dounload)
712 {
713 sci->forced_unload = 1;
714 cache_size += sci->size_adjust;
715 }
716 else
717 {
718 cache_size += sci->dst_w * sci->dst_h * 4;
719 }
720// INF(" + %i @ flop: %i (%ix%i)",
721// sci->dst_w * sci->dst_h * 4, sci->flop,
722// sci->dst_w, sci->dst_h);
723 cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci);
724 _cache_prune(sci, 0);
725 LKU(cache_lock);
726 didpop = 1;
727 }
728 }
729 if (sci->im && !ie->flags.animated)
730 {
731 if (!didpop)
732 {
733 LKL(cache_lock);
734 cache_list = eina_inlist_remove(cache_list, (Eina_Inlist *)sci);
735 cache_list = eina_inlist_append(cache_list, (Eina_Inlist *)sci);
736 LKU(cache_lock);
737 }
738 else
739 {
740 if (sci->flop >= FLOP_DEL) sci->flop -= FLOP_DEL;
741 }
742// INF("use cached!");
743#ifdef EVAS_FRAME_QUEUING
744 RDLKL(sci->lock);
745#endif
746 LKU(im->cache.lock);
747 evas_common_scale_rgba_in_to_out_clip_sample
748 (sci->im, dst, dc,
749 0, 0,
750 dst_region_w, dst_region_h,
751 dst_region_x, dst_region_y,
752 dst_region_w, dst_region_h);
753#ifdef EVAS_FRAME_QUEUING
754 RWLKU(sci->lock);
755#endif
756// hits++;
757// INF("check %p %i < %i",
758// im,
759// (int)im->cache.orig_usage,
760// (int)im->cache.newest_usage);
761#ifndef EVAS_FRAME_QUEUING
762 /* while framequeuing is applied,
763 * original image data is loaded by the main thread
764 * just before enqueuing the rendering op into the pipe.
765 * so unloading the original image data here
766 * causes only speed-down side-effect and no memory usage gain;
767 * it will be loaded again for the very next rendering for this image.
768 */
769 if (ie->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)
770 {
771 if ((dounload) ||
772 ((im->cache_entry.flags.loaded) &&
773 ((!im->cs.no_free)
774#ifdef EVAS_CSERVE
775 || (ie->data1)
776#endif
777 ) &&
778 (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)))
779 {
780 if ((dounload) || (im->cache.orig_usage <
781 (im->cache.newest_usage / 20)))
782 {
783 //FIXME: imagedataunload - inform owners
784 evas_common_rgba_image_unload(&im->cache_entry);
785 }
786 }
787 }
788#endif
789 }
790 else
791 {
792#ifdef EVAS_FRAME_QUEUING
793 if (!evas_common_frameq_enabled())
794#endif
795 {
796 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
797 evas_cache_image_load_data(&im->cache_entry);
798 evas_common_image_colorspace_normalize(im);
799 }
800// misses++;
801 LKU(im->cache.lock);
802 if (im->image.data)
803 {
804 if (smooth)
805 evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
806 src_region_x, src_region_y,
807 src_region_w, src_region_h,
808 dst_region_x, dst_region_y,
809 dst_region_w, dst_region_h);
810 else
811 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
812 src_region_x, src_region_y,
813 src_region_w, src_region_h,
814 dst_region_x, dst_region_y,
815 dst_region_w, dst_region_h);
816 }
817 }
818#else
819 RGBA_Image *im = (RGBA_Image *)ie;
820#ifdef EVAS_FRAME_QUEUING
821 if (!evas_common_frameq_enabled())
822#endif
823 {
824 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
825 evas_cache_image_load_data(&im->cache_entry);
826 evas_common_image_colorspace_normalize(im);
827 }
828 if (im->image.data)
829 {
830 if (smooth)
831 evas_common_scale_rgba_in_to_out_clip_smooth(im, dst, dc,
832 src_region_x, src_region_y,
833 src_region_w, src_region_h,
834 dst_region_x, dst_region_y,
835 dst_region_w, dst_region_h);
836 else
837 evas_common_scale_rgba_in_to_out_clip_sample(im, dst, dc,
838 src_region_x, src_region_y,
839 src_region_w, src_region_h,
840 dst_region_x, dst_region_y,
841 dst_region_w, dst_region_h);
842 }
843#endif
844}
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 @@
1#ifndef _EVAS_LINE_H
2#define _EVAS_LINE_H
3
4
5EAPI void evas_common_line_init (void);
6
7EAPI void evas_common_line_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x1, int y1, int x2, int y2);
8
9
10#endif /* _EVAS_LINE_H */
11
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 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4
5static void
6_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y);
7
8static void
9_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
10
11static void
12_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
13
14static void
15_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
16
17
18#define IN_RANGE(x, y, w, h) \
19 ( x > 0 && y > 0 &&((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) )
20
21#define IN_RECT(x, y, rx, ry, rw, rh) \
22 ( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \
23 ((unsigned)((y) - (ry)) < (unsigned)(rh)) )
24
25#define EXCHANGE_POINTS(x0, y0, x1, y1) \
26 { \
27 int _tmp = y0; \
28 \
29 y0 = y1; \
30 y1 = _tmp; \
31 \
32 _tmp = x0; \
33 x0 = x1; \
34 x1 = _tmp; \
35 }
36
37
38EAPI void
39evas_common_line_init(void)
40{
41}
42
43EAPI void
44evas_common_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
45{
46 int x, y, w, h;
47 int clx, cly, clw, clh;
48 int cuse, cx, cy, cw, ch;
49
50 if ((x0 == x1) && (y0 == y1))
51 {
52 _evas_draw_point(dst, dc, x0, y0);
53 return;
54 }
55
56 clx = cly = 0;
57 clw = dst->cache_entry.w;
58 clh = dst->cache_entry.h;
59
60 /* save out clip info */
61 cuse = dc->clip.use;
62 cx = dc->clip.x;
63 cy = dc->clip.y;
64 cw = dc->clip.w;
65 ch = dc->clip.h;
66
67 if (cuse)
68 {
69 RECTS_CLIP_TO_RECT(clx, cly, clw, clh, cx, cy, cw, ch);
70 if ((clw < 1) || (clh < 1))
71 return;
72 }
73
74 x = MIN(x0, x1);
75 y = MIN(y0, y1);
76 w = MAX(x0, x1) - x + 1;
77 h = MAX(y0, y1) - y + 1;
78
79 RECTS_CLIP_TO_RECT(clx, cly, clw, clh, x, y, w, h);
80 if ((clw < 1) || (clh < 1))
81 return;
82
83 dc->clip.use = 1;
84 dc->clip.x = clx;
85 dc->clip.y = cly;
86 dc->clip.w = clw;
87 dc->clip.h = clh;
88
89 if (dc->anti_alias)
90 _evas_draw_line_aa(dst, dc, x0, y0, x1, y1);
91 else
92 _evas_draw_line(dst, dc, x0, y0, x1, y1);
93
94 /* restore clip info */
95 dc->clip.use = cuse;
96 dc->clip.x = cx;
97 dc->clip.y = cy;
98 dc->clip.w = cw;
99 dc->clip.h = ch;
100}
101
102
103static void
104_evas_draw_point(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y)
105{
106 RGBA_Gfx_Pt_Func pfunc;
107
108 if (!IN_RANGE(x, y, dst->cache_entry.w, dst->cache_entry.h))
109 return;
110 if ((dc->clip.use) && (!IN_RECT(x, y, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h)))
111 return;
112#ifdef HAVE_PIXMAN
113# ifdef PIXMAN_LINE
114 pixman_op_t op = PIXMAN_OP_SRC;
115
116 if (dc->render_op == _EVAS_RENDER_BLEND)
117 op = PIXMAN_OP_OVER;
118
119 if ((dst->pixman.im) && (dc->col.pixman_color_image))
120 pixman_image_composite(op, dc->col.pixman_color_image, NULL,
121 dst->pixman.im, x, y, 0, 0, x, y, 1, 1);
122 else
123# endif
124#endif
125 {
126 pfunc = evas_common_gfx_func_composite_color_pt_get(dc->col.col, dst, dc->render_op);
127 if (pfunc)
128 pfunc(0, 255, dc->col.col, dst->image.data + (dst->cache_entry.w * y) + x);
129 }
130}
131
132/*
133 these functions use the dc->clip data as bounding
134 data. they assume that such data has already been cut
135 back to lie in the dst image rect and the object's
136 (line) bounding rect.
137*/
138static void
139_evas_draw_simple_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
140{
141 int dx, dy, len, lx, ty, rx, by;
142 int clx, cly, clw, clh;
143 int dstw;
144 DATA32 *p, color;
145 RGBA_Gfx_Pt_Func pfunc;
146 RGBA_Gfx_Func sfunc;
147
148#ifdef HAVE_PIXMAN
149# ifdef PIXMAN_LINE
150 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
151 if (dc->render_op == _EVAS_RENDER_BLEND)
152 op = PIXMAN_OP_OVER;
153# endif
154#endif
155
156 dstw = dst->cache_entry.w;
157 color = dc->col.col;
158
159 if (y0 > y1)
160 EXCHANGE_POINTS(x0, y0, x1, y1)
161 if (x0 > x1)
162 EXCHANGE_POINTS(x0, y0, x1, y1)
163
164 dx = x1 - x0;
165 dy = y1 - y0;
166
167 clx = dc->clip.x;
168 cly = dc->clip.y;
169 clw = dc->clip.w;
170 clh = dc->clip.h;
171
172 lx = clx;
173 rx = clx + clw - 1;
174 ty = cly;
175 by = cly + clh - 1;
176
177 if (dy == 0)
178 {
179#ifdef EVAS_SLI
180 if (((y0) % dc->sli.h) == dc->sli.y)
181#endif
182 {
183 if ((y0 >= ty) && (y0 <= by))
184 {
185 if (dx < 0)
186 {
187 int tmp = x1;
188
189 x1 = x0;
190 x0 = tmp;
191 }
192
193 if (x0 < lx) x0 = lx;
194 if (x1 > rx) x1 = rx;
195
196 len = x1 - x0 + 1;
197 p = dst->image.data + (dstw * y0) + x0;
198#ifdef HAVE_PIXMAN
199# ifdef PIXMAN_LINE
200 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
201 (!dc->mask.mask))
202 pixman_image_composite(op, dc->col.pixman_color_image,
203 NULL, dst->pixman.im,
204 x0, y0, 0, 0, x0, y0, len, 1);
205 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
206 (dc->mask.mask))
207 pixman_image_composite(op, dc->col.pixman_color_image,
208 dc->mask.mask->pixman.im,
209 dst->pixman.im,
210 x0, y0, 0, 0, x0, y0, len, 1);
211 else
212# endif
213#endif
214 {
215 sfunc = evas_common_gfx_func_composite_color_span_get(color, dst, len, dc->render_op);
216 if (sfunc)
217 sfunc(NULL, NULL, color, p, len);
218 }
219 }
220 }
221 return;
222 }
223
224 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op);
225 if (!pfunc) return;
226
227 if (dx == 0)
228 {
229 if ((x0 >= lx) && (x0 <= rx))
230 {
231 if (y0 < ty) y0 = ty;
232 if (y1 > by) y1 = by;
233
234 len = y1 - y0 + 1;
235 p = dst->image.data + (dstw * y0) + x0;
236#ifdef HAVE_PIXMAN
237# ifdef PIXMAN_LINE
238 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
239 (!dc->mask.mask))
240 pixman_image_composite(op, dc->col.pixman_color_image,
241 NULL, dst->pixman.im,
242 x0, y0, 0, 0, x0, y0, 1, len);
243 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
244 (dc->mask.mask))
245 pixman_image_composite(op, dc->col.pixman_color_image,
246 dc->mask.mask->pixman.im, dst->pixman.im,
247 x0, y0, 0, 0, x0, y0, 1, len);
248 else
249# endif
250#endif
251 {
252 while (len--)
253 {
254#ifdef EVAS_SLI
255 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
256#endif
257 {
258 pfunc(0, 255, color, p);
259 }
260 p += dstw;
261 }
262 }
263 }
264 return;
265 }
266
267 if ((dy == dx) || (dy == -dx))
268 {
269 int p0_in, p1_in;
270
271 p0_in = (IN_RECT(x0, y0, clx, cly, clw, clh) ? 1 : 0);
272 p1_in = (IN_RECT(x1, y1, clx, cly, clw, clh) ? 1 : 0);
273
274 if (dy > 0)
275 {
276 if (!p0_in)
277 {
278 x0 = x0 + (ty - y0);
279 y0 = ty;
280 if (x0 > rx) return;
281 if (x0 < lx)
282 {
283 y0 = y0 + (lx - x0);
284 x0 = lx;
285 if ((y0 < ty) || (y0 > by)) return;
286 }
287 }
288 if (!p1_in)
289 {
290 x1 = x0 + (by - y0);
291 y1 = by;
292 if (x1 < lx) return;
293 if (x1 > rx)
294 {
295 y1 = y0 + (rx - x0);
296 x1 = rx;
297 if ((y1 < ty) || (y1 > by)) return;
298 }
299 }
300 }
301 else
302 {
303 if (!p0_in)
304 {
305 x0 = x0 - (by - y0);
306 y0 = by;
307 if (x0 > rx) return;
308 if (x0 < lx)
309 {
310 y0 = y0 - (lx - x0);
311 x0 = lx;
312 if ((y0 < ty) || (y0 > by)) return;
313 }
314 }
315 if (!p1_in)
316 {
317 x1 = x0 - (ty - y0);
318 y1 = ty;
319 if (x1 < lx) return;
320 if (x1 > rx)
321 {
322 y1 = y0 - (rx - x0);
323 x1 = rx;
324 if ((y1 < ty) || (y1 > by)) return;
325 }
326 }
327 }
328 if (y1 > y0)
329 {
330 p = dst->image.data + (dstw * y0) + x0;
331 len = y1 - y0 + 1;
332 if (dx > 0) dstw++;
333 else dstw--;
334 }
335 else
336 {
337 len = y0 - y1 + 1;
338 p = dst->image.data + (dstw * y1) + x1;
339 if (dx > 0) dstw--;
340 else dstw++;
341 }
342#ifdef HAVE_PIXMAN
343# ifdef PIXMAN_LINE
344 int pixman_x_position = x0;
345 int pixman_y_position = y0;
346 int x_unit = dstw - dst->cache_entry.w;
347# endif
348#endif
349
350
351 while (len--)
352 {
353#ifdef EVAS_SLI
354 if (((y1 + 1 - len) % dc->sli.h) == dc->sli.y)
355#endif
356 {
357#ifdef HAVE_PIXMAN
358# ifdef PIXMAN_LINE
359 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
360 (!dc->mask.mask))
361 pixman_image_composite(op, dc->col.pixman_color_image,
362 NULL, dst->pixman.im,
363 pixman_x_position,
364 pixman_y_position,
365 0, 0, pixman_x_position,
366 pixman_y_position, 1, 1);
367 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
368 (dc->mask.mask))
369 pixman_image_composite(op, dc->col.pixman_color_image,
370 dc->mask.mask->pixman.im,
371 dst->pixman.im,
372 pixman_x_position,
373 pixman_y_position, 0, 0,
374 pixman_x_position,
375 pixman_y_position, 1, 1);
376 else
377# endif
378#endif
379 pfunc(0, 255, color, p);
380 }
381#ifdef HAVE_PIXMAN
382# ifdef PIXMAN_LINE
383 pixman_x_position += x_unit;
384 pixman_y_position += 1;
385# endif
386#endif
387 p += dstw;
388 }
389 }
390}
391
392
393#define SETUP_LINE_SHALLOW \
394 if (x0 > x1) \
395 { \
396 EXCHANGE_POINTS(x0, y0, x1, y1); \
397 dx = -dx; \
398 dy = -dy; \
399 } \
400 \
401 px = x0; \
402 py = y0; \
403 \
404 p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
405 p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
406 \
407 dely = 1; \
408 dh = dstw; \
409 if (dy < 0) \
410 { \
411 dely = -1; \
412 dh = -dstw; \
413 } \
414 \
415 dyy = ((dy) << 16) / (dx); \
416 \
417 if (!p0_in) \
418 { \
419 dxx = ((dx) << 16) / (dy); \
420 if (px < 0) \
421 { \
422 x = -px; px = 0; \
423 yy = x * dyy; \
424 y = yy >> 16; \
425 if (!a_a) \
426 y += (yy - (y << 16)) >> 15; \
427 py += y; \
428 if ((dely > 0) && (py >= clh)) \
429 return; \
430 else if ((dely < 0) && (py < -1)) \
431 return; \
432 } \
433 \
434 y = 0; \
435 if ((dely > 0) && (py < 0)) \
436 y = (-1 - py); \
437 else if ((dely < 0) && (py >= clh)) \
438 y = (clh - 1 - py); \
439 \
440 xx = y * dxx; \
441 x = xx >> 16; \
442 if (!a_a) \
443 x += (xx - (x << 16)) >> 15; \
444 px += x; \
445 if (px >= clw) return; \
446 \
447 yy = x * dyy; \
448 y = yy >> 16; \
449 if (!a_a) \
450 y += (yy - (y << 16)) >> 15; \
451 py += y; \
452 if ((dely > 0) && (py >= clh)) \
453 return; \
454 else if ((dely < 0) && (py < -1)) \
455 return; \
456 } \
457 \
458 p = data + (dstw * py) + px; \
459 \
460 x = px - x0; \
461 yy = x * dyy; \
462 prev_y = (yy >> 16); \
463 \
464 rx = MIN(x1 + 1, clw); \
465 by = clh - 1;
466
467
468#define SETUP_LINE_STEEP \
469 if (y0 > y1) \
470 { \
471 EXCHANGE_POINTS(x0, y0, x1, y1); \
472 dx = -dx; \
473 dy = -dy; \
474 } \
475 \
476 px = x0; \
477 py = y0; \
478 \
479 p0_in = (IN_RANGE(x0 , y0 , clw, clh) ? 1 : 0); \
480 p1_in = (IN_RANGE(x1 , y1 , clw, clh) ? 1 : 0); \
481 \
482 delx = 1; \
483 if (dx < 0) \
484 delx = -1; \
485 \
486 dxx = ((dx) << 16) / (dy); \
487 \
488 if (!p0_in) \
489 { \
490 dyy = ((dy) << 16) / (dx); \
491 \
492 if (py < 0) \
493 { \
494 y = -py; py = 0; \
495 xx = y * dxx; \
496 x = xx >> 16; \
497 if (!a_a) \
498 x += (xx - (x << 16)) >> 15; \
499 px += x; \
500 if ((delx > 0) && (px >= clw)) \
501 return; \
502 else if ((delx < 0) && (px < -1)) \
503 return; \
504 } \
505 \
506 x = 0; \
507 if ((delx > 0) && (px < -1)) \
508 x = (-1 - px); \
509 else if ((delx < 0) && (px >= clw)) \
510 x = (clw - 1 - px); \
511 \
512 yy = x * dyy; \
513 y = yy >> 16; \
514 if (!a_a) \
515 y += (yy - (y << 16)) >> 15; \
516 py += y; \
517 if (py >= clh) return; \
518 \
519 xx = y * dxx; \
520 x = xx >> 16; \
521 if (!a_a) \
522 x += (xx - (x << 16)) >> 15; \
523 px += x; \
524 if ((delx > 0) && (px >= clw)) \
525 return; \
526 else if ((delx < 0) && (px < -1)) \
527 return; \
528 } \
529 \
530 p = data + (dstw * py) + px; \
531 \
532 y = py - y0; \
533 xx = y * dxx; \
534 prev_x = (xx >> 16); \
535 \
536 by = MIN(y1 + 1, clh); \
537 rx = clw - 1;
538
539static void
540_evas_draw_line(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
541{
542 int px, py, x, y, prev_x, prev_y;
543 int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 0;
544 int delx, dely, xx, yy, dxx, dyy;
545 int clx, cly, clw, clh;
546 int dstw;
547 DATA32 *p, *data, color;
548 RGBA_Gfx_Pt_Func pfunc;
549
550 dx = x1 - x0;
551 dy = y1 - y0;
552
553#ifdef HAVE_PIXMAN
554# ifdef PIXMAN_LINE
555 int pix_x;
556 int pix_y;
557 int pix_x_unit;
558 int pix_y_unit;
559
560 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
561 if (dc->render_op == _EVAS_RENDER_BLEND)
562 op = PIXMAN_OP_OVER;
563 pix_x = x0;
564 pix_y = y0;
565
566 if (dx < 0)
567 pix_x_unit = -1;
568 else
569 pix_x_unit = 1;
570
571 if (dy < 0)
572 pix_y_unit = -1;
573 else
574 pix_y_unit = 1;
575# endif
576#endif
577
578 if ( (dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy) )
579 {
580 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1);
581 return;
582 }
583
584 color = dc->col.col;
585 pfunc = evas_common_gfx_func_composite_color_pt_get(color, dst, dc->render_op);
586 if (!pfunc) return;
587
588 clx = dc->clip.x;
589 cly = dc->clip.y;
590 clw = dc->clip.w;
591 clh = dc->clip.h;
592
593 data = dst->image.data;
594 dstw = dst->cache_entry.w;
595
596 data += (dstw * cly) + clx;
597 x0 -= clx;
598 y0 -= cly;
599 x1 -= clx;
600 y1 -= cly;
601
602 /* shallow: x-parametric */
603 if ((dy < dx) || (dy < -dx))
604 {
605 SETUP_LINE_SHALLOW;
606
607 while (px < rx)
608 {
609 y = (yy >> 16);
610 y += ((yy - (y << 16)) >> 15);
611 if (prev_y != y)
612 {
613 prev_y = y;
614 p += dh;
615 py += dely;
616#ifdef HAVE_PIXMAN
617# ifdef PIXMAN_LINE
618 pix_y += pix_y_unit;
619# endif
620#endif
621 }
622 if (!p1_in)
623 {
624 if ((py < 0) && (dely < 0)) return;
625 if ((py > by) && (dely > 0)) return;
626 }
627 if (!p0_in)
628 {
629 if (py < 0) goto next_x;
630 }
631#ifdef EVAS_SLI
632 if (((py) % dc->sli.h) == dc->sli.y)
633#endif
634 {
635 if (IN_RANGE(px, py, clw, clh))
636 {
637#ifdef HAVE_PIXMAN
638# ifdef PIXMAN_LINE
639 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
640 (!dc->mask.mask))
641 pixman_image_composite(op, dc->col.pixman_color_image,
642 NULL, dst->pixman.im,
643 pix_x, pix_y, 0, 0,
644 pix_x, pix_y, 1, 1);
645 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
646 (dc->mask.mask))
647 pixman_image_composite(op, dc->col.pixman_color_image,
648 dc->mask.mask->pixman.im,
649 dst->pixman.im,
650 pix_x, pix_y, 0, 0,
651 pix_x, pix_y, 1, 1);
652 else
653# endif
654#endif
655 pfunc(0, 255, color, p);
656 }
657 }
658next_x:
659 yy += dyy;
660 px++;
661 p++;
662#ifdef HAVE_PIXMAN
663# ifdef PIXMAN_LINE
664 pix_x += pix_x_unit;
665# endif
666#endif
667 }
668 return;
669 }
670
671 /* steep: y-parametric */
672
673 SETUP_LINE_STEEP;
674
675 while (py < by)
676 {
677 x = (xx >> 16);
678 x += ((xx - (x << 16)) >> 15);
679 if (prev_x != x)
680 {
681 prev_x = x;
682 px += delx;
683 p += delx;
684#ifdef HAVE_PIXMAN
685# ifdef PIXMAN_LINE
686 pix_x += pix_x_unit;
687# endif
688#endif
689 }
690 if (!p1_in)
691 {
692 if ((px < 0) && (delx < 0)) return;
693 if ((px > rx) && (delx > 0)) return;
694 }
695 if (!p0_in)
696 {
697 if (px < 0) goto next_y;
698 }
699#ifdef EVAS_SLI
700 if (((py) % dc->sli.h) == dc->sli.y)
701#endif
702 {
703 if (IN_RANGE(px, py, clw, clh))
704 {
705#ifdef HAVE_PIXMAN
706# ifdef PIXMAN_LINE
707 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
708 (!dc->mask.mask))
709 pixman_image_composite(op, dc->col.pixman_color_image,
710 NULL, dst->pixman.im,
711 pix_x, pix_y, 0, 0,
712 pix_x, pix_y, 1, 1);
713 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
714 (dc->mask.mask))
715 pixman_image_composite(op, dc->col.pixman_color_image,
716 dc->mask.mask->pixman.im,
717 dst->pixman.im,
718 pix_x, pix_y, 0, 0,
719 pix_x, pix_y, 1, 1);
720 else
721# endif
722#endif
723 pfunc(0, 255, color, p);
724 }
725 }
726next_y:
727 xx += dxx;
728 py++;
729 p += dstw;
730#ifdef HAVE_PIXMAN
731# ifdef PIXMAN_LINE
732 pix_y += pix_y_unit;
733# endif
734#endif
735
736 }
737}
738
739
740static void
741_evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
742{
743 int px, py, x, y, prev_x, prev_y;
744 int dx, dy, rx, by, p0_in, p1_in, dh, a_a = 1;
745 int delx, dely, xx, yy, dxx, dyy;
746 int clx, cly, clw, clh;
747 int dstw;
748 DATA32 *p, *data, color;
749 RGBA_Gfx_Pt_Func pfunc;
750
751 dx = x1 - x0;
752 dy = y1 - y0;
753
754#ifdef HAVE_PIXMAN
755# ifdef PIXMAN_LINE
756 int pix_x;
757 int pix_y;
758 int pix_x_unit;
759 int pix_y_unit;
760
761 pixman_image_t *aa_mask_image;
762 int alpha_data_buffer;
763
764 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
765 if (dc->render_op == _EVAS_RENDER_BLEND)
766 op = PIXMAN_OP_OVER;
767 pix_x = x0;
768 pix_y = y0;
769
770 if (dx < 0)
771 pix_x_unit = -1;
772 else
773 pix_x_unit = 1;
774
775 if (dy < 0)
776 pix_y_unit = -1;
777 else
778 pix_y_unit = 1;
779# endif
780#endif
781 if (y0 > y1)
782 EXCHANGE_POINTS(x0, y0, x1, y1);
783
784 dx = x1 - x0;
785 dy = y1 - y0;
786
787 if ((dx == 0) || (dy == 0) || (dx == dy) || (dx == -dy))
788 {
789 _evas_draw_simple_line(dst, dc, x0, y0, x1, y1);
790 return;
791 }
792
793 color = dc->col.col;
794 pfunc = evas_common_gfx_func_composite_mask_color_pt_get(color, dst, dc->render_op);
795 if (!pfunc) return;
796
797 clx = dc->clip.x;
798 cly = dc->clip.y;
799 clw = dc->clip.w;
800 clh = dc->clip.h;
801
802 data = evas_cache_image_pixels(&dst->cache_entry);
803 dstw = dst->cache_entry.w;
804
805 data += (dstw * cly) + clx;
806 x0 -= clx;
807 y0 -= cly;
808 x1 -= clx;
809 y1 -= cly;
810
811 /* shallow: x-parametric */
812 if ((dy < dx) || (dy < -dx))
813 {
814 SETUP_LINE_SHALLOW;
815
816 while (px < rx)
817 {
818 DATA8 aa;
819
820 y = (yy >> 16);
821 if (prev_y != y)
822 {
823 prev_y = y;
824 p += dh;
825 py += dely;
826#ifdef HAVE_PIXMAN
827# ifdef PIXMAN_LINE
828 pix_y += pix_y_unit;
829# endif
830#endif
831 }
832 if (!p1_in)
833 {
834 if ((py < 0) && (dely < 0)) return;
835 if ((py > by) && (dely > 0)) return;
836 }
837 if (!p0_in)
838 {
839 if (py < 0) goto next_x;
840 }
841 if (px < clw)
842 {
843 aa = ((yy - (y << 16)) >> 8);
844 if ((py) < clh)
845 {
846#ifdef HAVE_PIXMAN
847# ifdef PIXMAN_LINE
848 alpha_data_buffer = 255 - aa;
849 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
850 (uint32_t *)&alpha_data_buffer, 4);
851
852 if ((dst->pixman.im) && (dc->col.pixman_color_image ) &&
853 (!dc->mask.mask))
854 pixman_image_composite(PIXMAN_OP_OVER,
855 dc->col.pixman_color_image,
856 aa_mask_image, dst->pixman.im,
857 pix_x, pix_y, 0, 0,
858 pix_x, pix_y, 1, 1);
859 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
860 (dc->mask.mask) )
861 pixman_image_composite(op, dc->col.pixman_color_image,
862 dc->mask.mask->pixman.im,
863 dst->pixman.im,
864 pix_x, pix_y, 0, 0,
865 pix_x, pix_y, 1, 1);
866 else
867# endif
868#endif
869 pfunc(0, 255 - aa, color, p);
870#ifdef HAVE_PIXMAN
871# ifdef PIXMAN_LINE
872 pixman_image_unref(aa_mask_image);
873# endif
874#endif
875 }
876 if ((py + 1) < clh)
877 {
878#ifdef HAVE_PIXMAN
879# ifdef PIXMAN_LINE
880 alpha_data_buffer = aa;
881 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
882 (uint32_t *)&alpha_data_buffer, 4);
883
884 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
885 (!dc->mask.mask))
886 pixman_image_composite(PIXMAN_OP_OVER,
887 dc->col.pixman_color_image,
888 aa_mask_image, dst->pixman.im,
889 pix_x, pix_y + 1, 0, 0,
890 pix_x, pix_y + 1, 1, 1);
891 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
892 (dc->mask.mask))
893 pixman_image_composite(op, dc->col.pixman_color_image,
894 dc->mask.mask->pixman.im,
895 dst->pixman.im,
896 pix_x, pix_y + 1, 0, 0,
897 pix_x, pix_y + 1, 1, 1);
898 else
899# endif
900#endif
901 pfunc(0, aa, color, p + dstw);
902#ifdef HAVE_PIXMAN
903# ifdef PIXMAN_LINE
904 pixman_image_unref(aa_mask_image);
905# endif
906#endif
907 }
908 }
909
910next_x:
911 yy += dyy;
912 px++;
913 p++;
914#ifdef HAVE_PIXMAN
915# ifdef PIXMAN_LINE
916 pix_x += pix_x_unit;
917# endif
918#endif
919 }
920 return;
921 }
922
923 /* steep: y-parametric */
924 SETUP_LINE_STEEP;
925
926 while (py < by)
927 {
928 DATA8 aa;
929
930 x = (xx >> 16);
931 if (prev_x != x)
932 {
933 prev_x = x;
934 px += delx;
935 p += delx;
936#ifdef HAVE_PIXMAN
937# ifdef PIXMAN_LINE
938 pix_x += pix_x_unit;
939# endif
940#endif
941 }
942 if (!p1_in)
943 {
944 if ((px < 0) && (delx < 0)) return;
945 if ((px > rx) && (delx > 0)) return;
946 }
947 if (!p0_in)
948 {
949 if (px < 0) goto next_y;
950 }
951 if (py < clh)
952 {
953 aa = ((xx - (x << 16)) >> 8);
954 if ((px) < clw)
955 {
956#ifdef HAVE_PIXMAN
957# ifdef PIXMAN_LINE
958 alpha_data_buffer = 255 - aa;
959 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, (uint32_t *)&alpha_data_buffer, 4);
960
961 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
962 (!dc->mask.mask))
963 pixman_image_composite(PIXMAN_OP_OVER,
964 dc->col.pixman_color_image,
965 aa_mask_image, dst->pixman.im,
966 pix_x, pix_y, 0, 0,
967 pix_x, pix_y, 1, 1);
968 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
969 (dc->mask.mask))
970 pixman_image_composite(op, dc->col.pixman_color_image,
971 dc->mask.mask->pixman.im,
972 dst->pixman.im,
973 pix_x, pix_y, 0, 0,
974 pix_x, pix_y, 1, 1);
975 else
976# endif
977#endif
978 pfunc(0, 255 - aa, color, p);
979#ifdef HAVE_PIXMAN
980# ifdef PIXMAN_LINE
981 pixman_image_unref(aa_mask_image);
982# endif
983#endif
984
985 }
986 if ((px + 1) < clw)
987 {
988#ifdef HAVE_PIXMAN
989# ifdef PIXMAN_LINE
990 alpha_data_buffer = aa;
991 aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1,
992 (uint32_t *)&alpha_data_buffer, 4);
993
994 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
995 (!dc->mask.mask))
996 pixman_image_composite(PIXMAN_OP_OVER,
997 dc->col.pixman_color_image,
998 aa_mask_image, dst->pixman.im,
999 pix_x + 1, pix_y, 0, 0,
1000 pix_x + 1, pix_y, 1, 1);
1001 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
1002 (dc->mask.mask))
1003 pixman_image_composite(op, dc->col.pixman_color_image,
1004 dc->mask.mask->pixman.im,
1005 dst->pixman.im,
1006 pix_x + 1, pix_y, 0, 0,
1007 pix_x + 1, pix_y, 1, 1);
1008 else
1009# endif
1010#endif
1011 pfunc(0, aa, color, p + 1);
1012#ifdef HAVE_PIXMAN
1013# ifdef PIXMAN_LINE
1014 pixman_image_unref(aa_mask_image);
1015# endif
1016#endif
1017 }
1018 }
1019 next_y:
1020 xx += dxx;
1021 py++;
1022 p += dstw;
1023#ifdef HAVE_PIXMAN
1024# ifdef PIXMAN_LINE
1025 pix_y += pix_y_unit;
1026# endif
1027#endif
1028 }
1029}
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 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4#ifdef BUILD_SCALE_SMOOTH
5# ifdef BUILD_MMX
6# undef SCALE_USING_MMX
7# define SCALE_USING_MMX
8# endif
9#endif
10
11#define FPI 8
12#define FPI1 (1 << (FPI))
13#define FPIH (1 << (FPI - 1))
14
15#define FPFPI1 (1 << (FP + FPI))
16
17typedef struct _Line Line;
18typedef struct _Span Span;
19
20struct _Span
21{
22 int x1, x2;
23 FPc o1, o2, z1, z2;
24 FPc u[2], v[2];
25 DATA32 col[2];
26};
27
28struct _Line
29{
30 Span span[2];
31};
32
33static FPc
34_interp(int x1, int x2, int p, FPc u1, FPc u2)
35{
36 FPc u;
37
38 x2 -= x1;
39 p -= x1;
40 u = u2 - u1;
41 u = (u * p) / (x2 + 1);
42 // FIXME: do z persp
43 return u1 + u;
44}
45
46static DATA32
47_interp_col(int x1, int x2, int p, DATA32 col1, DATA32 col2)
48{
49 x2 -= x1;
50 p -= x1;
51 p = (p << 8) / (x2 + 1);
52 // FIXME: do z persp
53 return INTERP_256(p, col2, col1);
54}
55
56static void
57_limit(Span *s, int c1, int c2, int nocol)
58{
59 if (s->x1 < c1)
60 {
61 s->u[0] = _interp(s->x1, s->x2, c1, s->u[0], s->u[1]);
62 s->v[0] = _interp(s->x1, s->x2, c1, s->v[0], s->v[1]);
63 if (!nocol)
64 s->col[0] = _interp_col(s->x1, s->x2, c1, s->col[0], s->col[1]);
65 s->x1 = c1;
66 s->o1 = c1 << FP;
67 // FIXME: do s->z1
68 }
69 if (s->x2 > c2)
70 {
71 s->u[1] = _interp(s->x1, s->x2, c2, s->u[0], s->u[1]);
72 s->v[1] = _interp(s->x1, s->x2, c2, s->v[0], s->v[1]);
73 if (!nocol)
74 s->col[1] = _interp_col(s->x1, s->x2, c2, s->col[0], s->col[1]);
75 s->x2 = c2;
76 s->o2 = c2 << FP;
77 // FIXME: do s->z2
78 }
79}
80
81// 12.63 % of time - this can improve
82static void
83_calc_spans(RGBA_Map_Point *p, Line *spans, int ystart, int yend, int cx, int cy __UNUSED__, int cw, int ch __UNUSED__)
84{
85 int i, y, yp, yy;
86 int py[4];
87 int edge[4][4], edge_num, swapped, order[4];
88 FPc uv[4][2], u, v, x, h, t, uu, vv;
89 DATA32 col[4];
90
91#if 1 // maybe faster on x86?
92 for (i = 0; i < 4; i++) py[i] = p[i].y >> FP;
93# define PY(x) (py[x])
94#else
95# define PY(x) (p[x].y >> FP)
96#endif
97
98 if ((PY(0) == PY(1)) && (PY(0) == PY(2)) && (PY(0) == PY(3)))
99 {
100 int leftp, rightp;
101 int nocol = 1;
102
103 leftp = rightp = 0;
104 for (i = 1; i < 4; i++)
105 {
106 if (p[i].x < p[leftp].x) leftp = i;
107 if (p[i].x > p[rightp].x) rightp = i;
108 if (p[i].col != 0xffffffff) nocol = 0;
109 }
110 for (y = ystart; y <= yend; y++)
111 {
112 yp = y - ystart;
113 if (y == PY(0))
114 {
115 i = 0;
116 spans[yp].span[i].x1 = p[leftp].x >> FP;
117 spans[yp].span[i].o1 = p[leftp].x;
118 spans[yp].span[i].u[0] = p[leftp].u;
119 spans[yp].span[i].v[0] = p[leftp].v;
120 spans[yp].span[i].col[0] = p[leftp].col;
121 spans[yp].span[i].x2 = p[rightp].x >> FP;
122 spans[yp].span[i].o2 = p[rightp].x;
123 spans[yp].span[i].u[1] = p[rightp].u;
124 spans[yp].span[i].v[1] = p[rightp].v;
125 spans[yp].span[i].col[1] = p[rightp].col;
126 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
127 (spans[yp].span[i].x2 < cx))
128 spans[yp].span[i].x1 = -1;
129 else
130 {
131 _limit(&(spans[yp].span[i]), cx, cx + cw, nocol);
132 i++;
133 spans[yp].span[i].x1 = -1;
134 }
135 }
136 else
137 spans[yp].span[0].x1 = -1;
138 }
139 return;
140 }
141 for (y = ystart; y <= yend; y++)
142 {
143 int nocol = 1;
144
145 yp = y - ystart;
146 edge_num = 0;
147 for (i = 0; i < 4; i++)
148 {
149 if ((PY(i) <= y) && (PY((i + 1) % 4) > y))
150 {
151 edge[edge_num][0] = i;
152 edge[edge_num][1] = (i + 1) % 4;
153 edge_num++;
154 }
155 else if ((PY((i + 1) % 4) <= y) && (PY(i) > y))
156 {
157 edge[edge_num][0] = (i + 1) % 4;
158 edge[edge_num][1] = i;
159 edge_num++;
160 }
161 if (p[i].col != 0xffffffff) nocol = 0;
162 }
163 // calculate line x points for each edge
164 for (i = 0; i < edge_num; i++)
165 {
166 int e1 = edge[i][0];
167 int e2 = edge[i][1];
168 FPc t256;
169
170 h = (p[e2].y - p[e1].y) >> FP; // height of edge
171 if (h < 1) h = 1;
172 t = (((y << FP) + (FP1 / 2) - 1) - p[e1].y) >> FP;
173 x = p[e2].x - p[e1].x;
174 x = p[e1].x + ((x * t) / h);
175
176/*
177 // FIXME: 3d accuracy here
178 // XXX t needs adjusting. above its a linear interp point
179 // only.
180 //
181 // // FIXME: do in fixed pt. reduce divides
182 evas_common_cpu_end_opt();
183 //
184 int foc = 512, z0 = 0, px = 320, py = 240; // FIXME: need from map points
185 //
186 float focf, hf;
187 float z1, z2, y1, y2, dz, dy, zt, dydz, yt;
188
189 focf = foc;
190 hf = h;
191
192 // adjust for fixed point and focal length and z0 for map
193 z1 = (p[e1].z >> FP) - z0 + foc;
194 z2 = (p[e2].z >> FP) - z0 + foc;
195 // deltas
196 dz = z1 - z2;
197
198 if (dz != 0)
199 {
200 int pt;
201
202 // adjust for perspective point (being 0 0)
203 y1 = (p[e1].y >> FP) - py;
204 y2 = (p[e2].y >> FP) - py;
205
206 // correct for x &y not being in world coords - screen coords
207 y1 = (y1 * z1) / focf;
208 y2 = (y2 * z2) / focf;
209
210 // deltas
211 dy = y1 - y2;
212
213 yt = y - py;
214 dydz = dy / dz;
215
216 zt = (y2 - (dydz * z2)) / ((yt / focf) - dydz);
217
218 pt = t;
219 t = ((z1 - zt) * hf) / dz;
220 }
221 */
222 u = p[e2].u - p[e1].u;
223 uu = u >> FP;
224 if (uu < 0) uu = -uu;
225 if (uu == h)
226 {
227 yy = ((y << FP) - p[e1].y) >> FP;
228 if (u > 0)
229 u = p[e1].u + (yy << FP);
230 else
231 u = p[e1].u - (yy << FP) - (FP1 - 1);
232 }
233 else
234 {
235 if (u >= 0)
236 u = p[e1].u + ((u * t) / h);
237 else
238 u = p[e1].u + (((u * t) - (FP1 / 2)) / h);
239 }
240
241 v = p[e2].v - p[e1].v;
242 vv = v >> FP;
243 if (vv < 0) vv = -vv;
244 if (vv == h)
245 {
246 yy = ((y << FP) - p[e1].y) >> FP;
247 if (v > 0)
248 v = p[e1].v + (yy << FP);
249 else
250 v = p[e1].v - (yy << FP) - (FP1 - 1);
251 }
252 else
253 {
254 if (v >= 0)
255 v = p[e1].v + ((v * t) / h);
256 else
257 v = p[e1].v + (((v * t) - (FP1 / 2)) / h);
258 }
259
260 // FIXME: 3d accuracy for color too
261 t256 = (t << 8) / h; // maybe * 255?
262 col[i] = INTERP_256(t256, p[e2].col, p[e1].col);
263
264 // FIXME: store z persp
265 uv[i][1] = v;
266 uv[i][0] = u;
267 edge[i][2] = x >> FP;
268 edge[i][3] = x;
269 // also fill in order
270 order[i] = i;
271 }
272 // sort edges from left to right - bubble. its a small list!
273 do
274 {
275 swapped = 0;
276 for (i = 0; i < (edge_num - 1); i++)
277 {
278 if (edge[order[i]][2] > edge[order[i + 1]][2])
279 {
280 t = order[i];
281 order[i] = order[i + 1];
282 order[i + 1] = t;
283 swapped = 1;
284 }
285 }
286 }
287 while (swapped);
288 if (edge_num == 2)
289 {
290 i = 0;
291 spans[yp].span[i].x1 = edge[order[0]][2];
292 spans[yp].span[i].o1 = edge[order[0]][3];
293 spans[yp].span[i].u[0] = uv[order[0]][0];
294 spans[yp].span[i].v[0] = uv[order[0]][1];
295 spans[yp].span[i].col[0] = col[order[0]];
296
297 spans[yp].span[i].x2 = edge[order[1]][2];
298 spans[yp].span[i].o2 = edge[order[1]][3];
299 spans[yp].span[i].u[1] = uv[order[1]][0];
300 spans[yp].span[i].v[1] = uv[order[1]][1];
301 spans[yp].span[i].col[1] = col[order[1]];
302 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
303 (spans[yp].span[i].x2 < cx))
304 spans[yp].span[i].x1 = -1;
305 else
306 {
307 _limit(&(spans[yp].span[i]), cx, cx + cw, nocol);
308 i++;
309 spans[yp].span[i].x1 = -1;
310 }
311 }
312 else if (edge_num == 4)
313 {
314 i = 0;
315 spans[yp].span[i].x1 = edge[order[0]][2];
316 spans[yp].span[i].u[0] = uv[order[0]][0];
317 spans[yp].span[i].v[0] = uv[order[0]][1];
318 spans[yp].span[i].col[0] = col[order[0]];
319
320 spans[yp].span[i].x2 = edge[order[1]][2];
321 spans[yp].span[i].u[1] = uv[order[1]][0];
322 spans[yp].span[i].v[1] = uv[order[1]][1];
323 spans[yp].span[i].col[1] = col[order[1]];
324 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
325 (spans[yp].span[i].x2 < cx))
326 spans[yp].span[i].x1 = -1;
327 else
328 {
329 _limit(&(spans[yp].span[i]), cx, cx + cw, nocol);
330 i++;
331 }
332 spans[yp].span[i].x1 = edge[order[2]][2];
333 spans[yp].span[i].u[0] = uv[order[2]][0];
334 spans[yp].span[i].v[0] = uv[order[2]][1];
335 spans[yp].span[i].col[0] = col[order[2]];
336
337 spans[yp].span[i].x2 = edge[order[3]][2];
338 spans[yp].span[i].u[1] = uv[order[3]][0];
339 spans[yp].span[i].v[1] = uv[order[3]][1];
340 spans[yp].span[i].col[1] = col[order[3]];
341 if ((spans[yp].span[i].x1 >= (cx + cw)) ||
342 (spans[yp].span[i].x2 < cx))
343 spans[yp].span[i].x1 = -1;
344 else
345 {
346 int l = cx;
347
348 if (i > 0) l = spans[yp].span[i - 1].x2;
349 _limit(&(spans[yp].span[i]), l, cx + cw, nocol);
350 }
351 }
352 else
353 spans[yp].span[0].x1 = -1;
354 }
355}
356
357#ifdef BUILD_SCALE_SMOOTH
358# ifdef BUILD_MMX
359# undef FUNC_NAME
360# define FUNC_NAME evas_common_map_rgba_internal_mmx
361# undef SCALE_USING_MMX
362# define SCALE_USING_MMX
363# include "evas_map_image_internal.c"
364# endif
365# ifdef BUILD_C
366# undef FUNC_NAME
367# define FUNC_NAME evas_common_map_rgba_internal
368# undef SCALE_USING_MMX
369# include "evas_map_image_internal.c"
370# endif
371#endif
372
373EAPI void
374evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
375 RGBA_Draw_Context *dc,
376 int npoints __UNUSED__, RGBA_Map_Point *p,
377 int smooth, int level)
378{
379#ifdef BUILD_MMX
380 int mmx, sse, sse2;
381#endif
382 Cutout_Rects *rects;
383 Cutout_Rect *r;
384 int c, cx, cy, cw, ch;
385 int i;
386
387 if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
388 evas_cache_image_load_data(&src->cache_entry);
389 evas_common_image_colorspace_normalize(src);
390 if (!src->image.data) return;
391#ifdef BUILD_MMX
392 evas_common_cpu_can_do(&mmx, &sse, &sse2);
393#endif
394 if ((!dc->cutout.rects) && (!dc->clip.use))
395 {
396#ifdef BUILD_MMX
397 if (mmx)
398 evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level);
399 else
400#endif
401#ifdef BUILD_C
402 evas_common_map_rgba_internal(src, dst, dc, p, smooth, level);
403#endif
404 return;
405 }
406 /* save out clip info */
407 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
408 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
409 /* our clip is 0 size.. abort */
410 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
411 {
412 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
413 return;
414 }
415 rects = evas_common_draw_context_apply_cutouts(dc);
416 for (i = 0; i < rects->active; ++i)
417 {
418 r = rects->rects + i;
419 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
420#ifdef BUILD_MMX
421 if (mmx)
422 evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level);
423 else
424#endif
425#ifdef BUILD_C
426 evas_common_map_rgba_internal(src, dst, dc, p, smooth, level);
427#endif
428 }
429 evas_common_draw_context_apply_clear_cutouts(rects);
430 /* restore clip info */
431 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
432}
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 @@
1#ifndef _EVAS_MAP_H
2#define _EVAS_MAP_H
3
4EAPI void
5evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
6 RGBA_Draw_Context *dc,
7 int npoints, RGBA_Map_Point *points,
8 int smooth, int level);
9
10#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 @@
1//#undef SCALE_USING_MMX
2{
3 if (smooth)
4 {
5 for (y = ystart; y <= yend; y++)
6 {
7 int x, w, ww;
8 FPc u, v, ud, vd, dv, ue, ve;
9 DATA32 *d, *s;
10#ifdef COLMUL
11 FPc cv, cd; // col
12# ifdef SCALE_USING_MMX
13 FPc cc;
14#endif
15 DATA32 c1, c2; // col
16#endif
17 Line *line;
18
19#ifdef SCALE_USING_MMX
20 pxor_r2r(mm0, mm0);
21 MOV_A2R(ALPHA_255, mm5)
22#endif
23
24 line = &(spans[y - ystart]);
25 for (i = 0; i < 2; i++)
26 {
27 Span *span;
28
29 span = &(line->span[i]);
30 if (span->x1 >= 0)
31 {
32 long long tl;
33
34 x = span->x1;
35 w = (span->x2 - x);
36 if (w <= 0) continue;
37 dv = (span->o2 - span->o1);
38 if (dv <= 0) continue;
39
40 ww = w;
41 u = span->u[0] << FPI;
42 if (u < 0) u = 0;
43 else if (u > swp) u = swp;
44 v = span->v[0] << FPI;
45 if (v < 0) v = 0;
46 else if (v > shp) v = shp;
47 ue = span->u[1] << FPI;
48 if (ue < 0) ue = 0;
49 else if (ue > swp) ue = swp;
50 ve = span->v[1] << FPI;
51 if (ve < 0) ve = 0;
52 else if (ve > shp) ve = shp;
53 ud = (ue - u) / w;
54 vd = (ve - v) / w;
55 tl = (long long)ud * (w << FP);
56 tl = tl / dv;
57 ud = tl;
58 u -= (ud * (span->o1 - (span->x1 << FP))) / FP1;
59
60 tl = (long long)vd * (w << FP);
61 tl = tl / dv;
62 vd = tl;
63 v -= (vd * (span->o1 - (span->x1 << FP))) / FP1;
64
65 if (ud < 0) u += ud;
66 if (vd < 0) v += vd;
67 if (u < 0) u = 0;
68 else if (u >= swp) u = swp - 1;
69 if (v < 0) v = 0;
70 else if (v >= shp) v = shp - 1;
71
72 if (direct)
73 d = dst->image.data + (y * dst->cache_entry.w) + x;
74 else
75 d = buf;
76
77#define SMOOTH 1
78#ifdef COLMUL
79 c1 = span->col[0]; // col
80 c2 = span->col[1]; // col
81 cv = 0; // col
82 cd = (255 << 16) / w; // col
83
84 if (c1 == c2)
85 {
86 if (c1 == 0xffffffff)
87 {
88#endif
89#include "evas_map_image_loop.c"
90#ifdef COLMUL
91 }
92 else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha))
93 {
94 // all black line
95# define COLBLACK 1
96# include "evas_map_image_loop.c"
97# undef COLBLACK
98 }
99 else if (c1 == 0x000000)
100 {
101 // skip span
102 }
103 else
104 {
105 // generic loop
106# include "evas_map_image_loop.c"
107 }
108 }
109 else
110 {
111# include "evas_map_image_loop.c"
112 }
113#endif
114 if (!direct)
115 {
116 d = dst->image.data;
117 d += (y * dst->cache_entry.w) + x;
118 func(buf, NULL, dc->mul.col, d, w);
119 }
120 }
121 else break;
122 }
123 }
124 }
125 else
126 {
127 for (y = ystart; y <= yend; y++)
128 {
129 int x, w, ww;
130 FPc u, v, ud, vd, ue, ve;
131 DATA32 *d, *s;
132#ifdef COLMUL
133 FPc cv, cd; // col
134 DATA32 c1, c2; // col
135#endif
136 Line *line;
137
138 line = &(spans[y - ystart]);
139 for (i = 0; i < 2; i++)
140 {
141 Span *span;
142
143 span = &(line->span[i]);
144 if (span->x1 >= 0)
145 {
146 x = span->x1;
147 w = (span->x2 - x);
148
149 if (w <= 0) continue;
150 ww = w;
151 u = span->u[0] << FPI;
152 if (u < 0) u = 0;
153 else if (u > swp) u = swp;
154 v = span->v[0] << FPI;
155 if (v < 0) v = 0;
156 else if (v > shp) v = shp;
157 ue = span->u[1] << FPI;
158 if (ue < 0) ue = 0;
159 else if (ue > swp) ue = swp;
160 ve = span->v[1] << FPI;
161 if (ve < 0) ve = 0;
162 else if (ve > shp) ve = shp;
163 ud = (ue - u) / w;
164 vd = (ve - v) / w;
165 if (direct)
166 d = dst->image.data + (y * dst->cache_entry.w) + x;
167 else
168 d = buf;
169
170 if (ud < 0) u += ud;
171 if (vd < 0) v += vd;
172 if (u < 0) u = 0;
173 else if (u >= swp) u = swp - 1;
174 if (v < 0) v = 0;
175 else if (v >= shp) v = shp - 1;
176
177#undef SMOOTH
178#ifdef COLMUL
179 c1 = span->col[0]; // col
180 c2 = span->col[1]; // col
181 cv = 0; // col
182 cd = (255 << 16) / w; // col
183
184 if (c1 == c2)
185 {
186 if (c1 == 0xffffffff)
187 {
188#endif
189#include "evas_map_image_loop.c"
190#ifdef COLMUL
191 }
192 else if ((c1 == 0x0000ff) && (!src->cache_entry.flags.alpha))
193 {
194 // all black line
195# define COLBLACK 1
196# include "evas_map_image_loop.c"
197# undef COLBLACK
198 }
199 else if (c1 == 0x000000)
200 {
201 // skip span
202 }
203 else
204 {
205 // generic loop
206# include "evas_map_image_loop.c"
207 }
208 }
209 else
210 {
211 // generic loop
212# include "evas_map_image_loop.c"
213 }
214#endif
215 if (!direct)
216 {
217 d = dst->image.data;
218 d += (y * dst->cache_entry.w) + x;
219 func(buf, NULL, dc->mul.col, d, w);
220 }
221 }
222 else break;
223 }
224 }
225 }
226}
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 @@
1// 66.74 % of time
2static void
3FUNC_NAME(RGBA_Image *src, RGBA_Image *dst,
4 RGBA_Draw_Context *dc,
5 RGBA_Map_Point *p,
6 int smooth, int level __UNUSED__) // level unused for now - for future use
7{
8 int i;
9 int c, cx, cy, cw, ch;
10 int ytop, ybottom, ystart, yend, y, sw, shp, swp, direct;
11 Line *spans;
12 DATA32 *buf = NULL, *sp;
13 RGBA_Gfx_Func func = NULL;
14 int havea = 0;
15 int havecol = 4;
16
17 // get the clip
18 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
19 if (!c)
20 {
21 cx = 0;
22 cy = 0;
23 cw = dst->cache_entry.w;
24 ch = dst->cache_entry.h;
25 }
26
27 // find y yop line and y bottom line
28 ytop = p[0].y;
29 if ((p[0].col >> 24) < 0xff) havea = 1;
30 if (p[0].col == 0xffffffff) havecol--;
31 for (i = 1; i < 4; i++)
32 {
33 if (p[i].y < ytop) ytop = p[i].y;
34 if ((p[i].col >> 24) < 0xff) havea = 1;
35 if (p[i].col == 0xffffffff) havecol--;
36 }
37
38 ybottom = p[0].y;
39 for (i = 1; i < 4; i++)
40 {
41 if (p[i].y > ybottom) ybottom = p[i].y;
42 }
43
44 // convert to screen space from fixed point
45 ytop = ytop >> FP;
46 ybottom = ybottom >> FP;
47
48 // if its outside the clip vertical bounds - don't bother
49 if ((ytop >= (cy + ch)) || (ybottom < cy)) return;
50
51 // limit to the clip vertical bounds
52 if (ytop < cy) ystart = cy;
53 else ystart = ytop;
54 if (ybottom >= (cy + ch)) yend = (cy + ch) - 1;
55 else yend = ybottom;
56
57 // get some source image information
58 sp = src->image.data;
59 sw = src->cache_entry.w;
60 swp = sw << (FP + FPI);
61 shp = src->cache_entry.h << (FP + FPI);
62
63 // limit u,v coords of points to be within the source image
64 for (i = 0; i < 4; i++)
65 {
66 if (p[i].u < 0) p[i].u = 0;
67 else if (p[i].u > (int)(src->cache_entry.w << FP))
68 p[i].u = src->cache_entry.w << FP;
69
70 if (p[i].v < 0) p[i].v = 0;
71 else if (p[i].v > (int)(src->cache_entry.h << FP))
72 p[i].v = src->cache_entry.h << FP;
73 }
74
75 // allocate some spans to hold out span list
76 spans = alloca((yend - ystart + 1) * sizeof(Line));
77 if (!spans) return;
78 memset(spans, 0, (yend - ystart + 1) * sizeof(Line));
79
80 // calculate the spans list
81 _calc_spans(p, spans, ystart, yend, cx, cy, cw, ch);
82
83 // walk through spans and render
84
85 // if operation is solid, bypass buf and draw func and draw direct to dst
86 direct = 0;
87 if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha) &&
88 (!dc->mul.use) && (!havea))
89 {
90 direct = 1;
91 }
92 else
93 {
94 int pa;
95
96 buf = alloca(cw * sizeof(DATA32));
97 if (!buf) return;
98 pa = src->cache_entry.flags.alpha;
99 if (havea) src->cache_entry.flags.alpha = 1;
100 if (dc->mul.use)
101 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, cw, dc->render_op);
102 else
103 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, cw, dc->render_op);
104 src->cache_entry.flags.alpha = pa;
105 }
106
107 if (!havecol)
108 {
109#undef COLMUL
110#include "evas_map_image_core.c"
111 }
112 else
113 {
114#define COLMUL 1
115#include "evas_map_image_core.c"
116 }
117}
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 @@
1#ifdef SMOOTH
2{
3 while (ww > 0)
4 {
5# ifdef COLBLACK
6 *d = 0xff000000; // col
7# else
8 FPc u1, v1, u2, v2;
9 FPc rv, ru;
10 DATA32 val1, val2, val3, val4;
11
12 u1 = u;
13 if (u1 < 0) u1 = 0;
14 else if (u1 >= swp) u1 = swp - 1;
15
16 v1 = v;
17 if (v1 < 0) v1 = 0;
18 else if (v1 >= shp) v1 = shp - 1;
19
20 u2 = u1 + FPFPI1;
21 if (u2 >= swp) u2 = swp - 1;
22
23 v2 = v1 + FPFPI1;
24 if (v2 >= shp) v2 = shp - 1;
25
26 ru = (u >> (FP + FPI - 8)) & 0xff;
27 rv = (v >> (FP + FPI - 8)) & 0xff;
28
29 s = sp + ((v1 >> (FP + FPI)) * sw) +
30 (u1 >> (FP + FPI));
31 val1 = *s;
32 s = sp + ((v1 >> (FP + FPI)) * sw) +
33 (u2 >> (FP + FPI));
34 val2 = *s;
35
36 s = sp + ((v2 >> (FP + FPI)) * sw) +
37 (u1 >> (FP + FPI));
38 val3 = *s;
39 s = sp + ((v2 >> (FP + FPI)) * sw) +
40 (u2 >> (FP + FPI));
41 val4 = *s;
42# ifdef SCALE_USING_MMX
43 MOV_A2R(rv, mm4);
44 MOV_A2R(ru, mm6);
45 MOV_P2R(val1, mm1, mm0);
46 if (val1 | val2)
47 {
48 MOV_P2R(val2, mm2, mm0);
49 INTERP_256_R2R(mm6, mm2, mm1, mm5);
50 }
51 MOV_P2R(val3, mm2, mm0);
52 if (val3 | val4)
53 {
54 MOV_P2R(val4, mm3, mm0);
55 INTERP_256_R2R(mm6, mm3, mm2, mm5);
56 }
57 INTERP_256_R2R(mm4, mm2, mm1, mm5);
58# ifdef COLMUL
59 cc = cv >> 16; // col
60 cv += cd; // col
61 MOV_A2R(cc, mm2); // col
62 MOV_P2R(c1, mm3, mm0); // col
63 MOV_P2R(c2, mm4, mm0); // col
64 INTERP_256_R2R(mm2, mm4, mm3, mm5); // col
65 MUL4_SYM_R2R(mm3, mm1, mm5); // col
66# endif
67 MOV_R2P(mm1, *d, mm0);
68# else
69 val1 = INTERP_256(ru, val2, val1);
70 val3 = INTERP_256(ru, val4, val3);
71 val1 = INTERP_256(rv, val3, val1); // col
72# ifdef COLMUL
73 val2 = INTERP_256((cv >> 16), c2, c1); // col
74 *d = MUL4_SYM(val2, val1); // col
75 cv += cd; // col
76# else
77 *d = INTERP_256(rv, val3, val1);
78# endif
79# endif
80 u += ud;
81 v += vd;
82# endif
83 d++;
84 ww--;
85 }
86}
87#else
88{
89 while (ww > 0)
90 {
91# ifdef COLMUL
92# ifndef COLBLACK
93 DATA32 val1, cval; // col
94# endif
95# endif
96# ifdef COLBLACK
97 *d = 0xff000000; // col
98# else
99 s = sp + ((v >> (FP + FPI)) * sw) +
100 (u >> (FP + FPI));
101# ifdef COLMUL
102 val1 = *s; // col
103 cval = INTERP_256((cv >> 16), c2, c1); // col
104 *d = MUL4_SYM(cval, val1);
105 cv += cd; // col
106# else
107 *d = *s;
108# endif
109 u += ud;
110 v += vd;
111# endif
112 d++;
113 ww--;
114 }
115}
116#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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_add_color_.c \
5op_add_color_i386.c \
6op_add_mask_color_.c \
7op_add_mask_color_i386.c \
8op_add_pixel_.c \
9op_add_pixel_color_.c \
10op_add_pixel_color_i386.c \
11op_add_pixel_i386.c \
12op_add_pixel_mask_.c \
13op_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_add
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
120EXOTIC_LIBS = @EXOTIC_LIBS@
121FGREP = @FGREP@
122FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
123FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
124FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
125FREETYPE_LIBS = @FREETYPE_LIBS@
126FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
127FRIBIDI_LIBS = @FRIBIDI_LIBS@
128GL_EET_CFLAGS = @GL_EET_CFLAGS@
129GL_EET_LIBS = @GL_EET_LIBS@
130GREP = @GREP@
131HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
132HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
133INSTALL = @INSTALL@
134INSTALL_DATA = @INSTALL_DATA@
135INSTALL_PROGRAM = @INSTALL_PROGRAM@
136INSTALL_SCRIPT = @INSTALL_SCRIPT@
137INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
138LD = @LD@
139LDFLAGS = @LDFLAGS@
140LIBOBJS = @LIBOBJS@
141LIBS = @LIBS@
142LIBTOOL = @LIBTOOL@
143LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
144LINEBREAK_LIBS = @LINEBREAK_LIBS@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MKDIR_P = @MKDIR_P@
150MODULE_ARCH = @MODULE_ARCH@
151NM = @NM@
152NMEDIT = @NMEDIT@
153OBJC = @OBJC@
154OBJCDEPMODE = @OBJCDEPMODE@
155OBJCFLAGS = @OBJCFLAGS@
156OBJDUMP = @OBJDUMP@
157OBJEXT = @OBJEXT@
158OTOOL = @OTOOL@
159OTOOL64 = @OTOOL64@
160PACKAGE = @PACKAGE@
161PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162PACKAGE_NAME = @PACKAGE_NAME@
163PACKAGE_STRING = @PACKAGE_STRING@
164PACKAGE_TARNAME = @PACKAGE_TARNAME@
165PACKAGE_URL = @PACKAGE_URL@
166PACKAGE_VERSION = @PACKAGE_VERSION@
167PATH_SEPARATOR = @PATH_SEPARATOR@
168PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
169PIXMAN_LIBS = @PIXMAN_LIBS@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173PNG_CFLAGS = @PNG_CFLAGS@
174PNG_LIBS = @PNG_LIBS@
175RANLIB = @RANLIB@
176SDL_CFLAGS = @SDL_CFLAGS@
177SDL_LIBS = @SDL_LIBS@
178SED = @SED@
179SET_MAKE = @SET_MAKE@
180SHELL = @SHELL@
181SHM_OPEN_LINK = @SHM_OPEN_LINK@
182STRIP = @STRIP@
183SVG_CFLAGS = @SVG_CFLAGS@
184SVG_LIBS = @SVG_LIBS@
185VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
186VALGRIND_LIBS = @VALGRIND_LIBS@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
190WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
191XCB_CFLAGS = @XCB_CFLAGS@
192XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
193XCB_GL_LIBS = @XCB_GL_LIBS@
194XCB_LIBS = @XCB_LIBS@
195XEXT_CFLAGS = @XEXT_CFLAGS@
196XEXT_LIBS = @XEXT_LIBS@
197XMKMF = @XMKMF@
198X_CFLAGS = @X_CFLAGS@
199X_EXTRA_LIBS = @X_EXTRA_LIBS@
200X_LIBS = @X_LIBS@
201X_PRE_LIBS = @X_PRE_LIBS@
202abs_builddir = @abs_builddir@
203abs_srcdir = @abs_srcdir@
204abs_top_builddir = @abs_top_builddir@
205abs_top_srcdir = @abs_top_srcdir@
206ac_ct_CC = @ac_ct_CC@
207ac_ct_CXX = @ac_ct_CXX@
208ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
209ac_ct_OBJC = @ac_ct_OBJC@
210altivec_cflags = @altivec_cflags@
211am__include = @am__include@
212am__leading_dot = @am__leading_dot@
213am__quote = @am__quote@
214am__tar = @am__tar@
215am__untar = @am__untar@
216bindir = @bindir@
217build = @build@
218build_alias = @build_alias@
219build_cpu = @build_cpu@
220build_os = @build_os@
221build_vendor = @build_vendor@
222builddir = @builddir@
223datadir = @datadir@
224datarootdir = @datarootdir@
225dlopen_libs = @dlopen_libs@
226docdir = @docdir@
227dvidir = @dvidir@
228edje_cc = @edje_cc@
229efl_doxygen = @efl_doxygen@
230efl_have_doxygen = @efl_have_doxygen@
231evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
232evas_engine_buffer_libs = @evas_engine_buffer_libs@
233evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
234evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
235evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
236evas_engine_directfb_libs = @evas_engine_directfb_libs@
237evas_engine_fb_cflags = @evas_engine_fb_cflags@
238evas_engine_fb_libs = @evas_engine_fb_libs@
239evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
240evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
241evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
242evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
243evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
244evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
245evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
246evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
247evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
248evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
249evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
250evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
251evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
252evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
253evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
254evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
255evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
256evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
257evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
258evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
259evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
260evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
261evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
262evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
263evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
269evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
270evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
271evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
272evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
273evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
274evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
275evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
276evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
277evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
278evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
279evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
280evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
281evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
282evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
283evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
284evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
285evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
286evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
287evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
288evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
289evas_image_loader_png_libs = @evas_image_loader_png_libs@
290evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
291evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
292evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
293evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
294evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
295evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
296evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
297evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
298evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
299evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
300evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
301evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
302exec_prefix = @exec_prefix@
303have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
304have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
305have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
306have_evas_engine_software_x11 = @have_evas_engine_software_x11@
307have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
308have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
309have_lcov = @have_lcov@
310host = @host@
311host_alias = @host_alias@
312host_cpu = @host_cpu@
313host_os = @host_os@
314host_vendor = @host_vendor@
315htmldir = @htmldir@
316includedir = @includedir@
317infodir = @infodir@
318install_sh = @install_sh@
319libdir = @libdir@
320libexecdir = @libexecdir@
321localedir = @localedir@
322localstatedir = @localstatedir@
323lt_ECHO = @lt_ECHO@
324lt_enable_auto_import = @lt_enable_auto_import@
325mandir = @mandir@
326mkdir_p = @mkdir_p@
327oldincludedir = @oldincludedir@
328pdfdir = @pdfdir@
329pkgconfig_requires_private = @pkgconfig_requires_private@
330prefix = @prefix@
331program_transform_name = @program_transform_name@
332psdir = @psdir@
333pthread_cflags = @pthread_cflags@
334pthread_libs = @pthread_libs@
335release_info = @release_info@
336requirement_evas = @requirement_evas@
337sbindir = @sbindir@
338sharedstatedir = @sharedstatedir@
339srcdir = @srcdir@
340sysconfdir = @sysconfdir@
341target_alias = @target_alias@
342top_build_prefix = @top_build_prefix@
343top_builddir = @top_builddir@
344top_srcdir = @top_srcdir@
345version_info = @version_info@
346MAINTAINERCLEANFILES = Makefile.in
347EXTRA_DIST = \
348op_add_color_.c \
349op_add_color_i386.c \
350op_add_mask_color_.c \
351op_add_mask_color_i386.c \
352op_add_pixel_.c \
353op_add_pixel_color_.c \
354op_add_pixel_color_i386.c \
355op_add_pixel_i386.c \
356op_add_pixel_mask_.c \
357op_add_pixel_mask_i386.c
358
359all: all-am
360
361.SUFFIXES:
362$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
363 @for dep in $?; do \
364 case '$(am__configure_deps)' in \
365 *$$dep*) \
366 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
367 && { if test -f $@; then exit 0; else break; fi; }; \
368 exit 1;; \
369 esac; \
370 done; \
371 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile'; \
372 $(am__cd) $(top_srcdir) && \
373 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_add/Makefile
374.PRECIOUS: Makefile
375Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
376 @case '$?' in \
377 *config.status*) \
378 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
379 *) \
380 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
381 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
382 esac;
383
384$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
385 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
386
387$(top_srcdir)/configure: $(am__configure_deps)
388 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
389$(ACLOCAL_M4): $(am__aclocal_m4_deps)
390 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
391$(am__aclocal_m4_deps):
392
393mostlyclean-libtool:
394 -rm -f *.lo
395
396clean-libtool:
397 -rm -rf .libs _libs
398tags: TAGS
399TAGS:
400
401ctags: CTAGS
402CTAGS:
403
404
405distdir: $(DISTFILES)
406 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
407 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
408 list='$(DISTFILES)'; \
409 dist_files=`for file in $$list; do echo $$file; done | \
410 sed -e "s|^$$srcdirstrip/||;t" \
411 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
412 case $$dist_files in \
413 */*) $(MKDIR_P) `echo "$$dist_files" | \
414 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
415 sort -u` ;; \
416 esac; \
417 for file in $$dist_files; do \
418 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
419 if test -d $$d/$$file; then \
420 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
421 if test -d "$(distdir)/$$file"; then \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
425 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
426 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
427 fi; \
428 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
429 else \
430 test -f "$(distdir)/$$file" \
431 || cp -p $$d/$$file "$(distdir)/$$file" \
432 || exit 1; \
433 fi; \
434 done
435check-am: all-am
436check: check-am
437all-am: Makefile
438installdirs:
439install: install-am
440install-exec: install-exec-am
441install-data: install-data-am
442uninstall: uninstall-am
443
444install-am: all-am
445 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
446
447installcheck: installcheck-am
448install-strip:
449 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
450 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
451 `test -z '$(STRIP)' || \
452 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
453mostlyclean-generic:
454
455clean-generic:
456
457distclean-generic:
458 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
459 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
460
461maintainer-clean-generic:
462 @echo "This command is intended for maintainers to use"
463 @echo "it deletes files that may require special tools to rebuild."
464 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
465clean: clean-am
466
467clean-am: clean-generic clean-libtool mostlyclean-am
468
469distclean: distclean-am
470 -rm -f Makefile
471distclean-am: clean-am distclean-generic
472
473dvi: dvi-am
474
475dvi-am:
476
477html: html-am
478
479html-am:
480
481info: info-am
482
483info-am:
484
485install-data-am:
486
487install-dvi: install-dvi-am
488
489install-dvi-am:
490
491install-exec-am:
492
493install-html: install-html-am
494
495install-html-am:
496
497install-info: install-info-am
498
499install-info-am:
500
501install-man:
502
503install-pdf: install-pdf-am
504
505install-pdf-am:
506
507install-ps: install-ps-am
508
509install-ps-am:
510
511installcheck-am:
512
513maintainer-clean: maintainer-clean-am
514 -rm -f Makefile
515maintainer-clean-am: distclean-am maintainer-clean-generic
516
517mostlyclean: mostlyclean-am
518
519mostlyclean-am: mostlyclean-generic mostlyclean-libtool
520
521pdf: pdf-am
522
523pdf-am:
524
525ps: ps-am
526
527ps-am:
528
529uninstall-am:
530
531.MAKE: install-am install-strip
532
533.PHONY: all all-am check check-am clean clean-generic clean-libtool \
534 distclean distclean-generic distclean-libtool distdir dvi \
535 dvi-am html html-am info info-am install install-am \
536 install-data install-data-am install-dvi install-dvi-am \
537 install-exec install-exec-am install-html install-html-am \
538 install-info install-info-am install-man install-pdf \
539 install-pdf-am install-ps install-ps-am install-strip \
540 installcheck installcheck-am installdirs maintainer-clean \
541 maintainer-clean-generic mostlyclean mostlyclean-generic \
542 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
543
544
545# Tell versions [3.59,3.63) of GNU make to not export all variables.
546# Otherwise a system limit (for SysV at least) may be exceeded.
547.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 @@
1/* add color -> dst */
2
3#ifdef BUILD_C
4static void
5init_add_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel color -> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_color_pt_funcs_c(void)
31{
32}
33#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 @@
1/* add color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_color_pt_funcs_mmx(void)
31{
32}
33#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 @@
1/* add mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5init_add_mask_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_mask_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel mask x color -> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_mask_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_mask_color_pt_funcs_c(void)
31{
32}
33#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 @@
1/* add mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_mask_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_mask_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel mask x color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_mask_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_mask_color_pt_funcs_mmx(void)
31{
32}
33#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 @@
1/* add pixel --> dst */
2
3#ifdef BUILD_C
4static void
5init_add_pixel_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_pixel_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel --> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_pixel_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_pixel_pt_funcs_c(void)
31{
32}
33#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 @@
1/* add pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5init_add_pixel_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_add_pixel_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel x color --> dst */
20
21#ifdef BUILD_C
22static void
23init_add_rel_pixel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_add_rel_pixel_color_pt_funcs_c(void)
31{
32}
33#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 @@
1/* add pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_pixel_color_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_add_pixel_color_pt_funcs_mmx(void)
12{ }
13#endif
14
15/*-----*/
16
17/* add_rel pixel x color --> dst */
18
19#ifdef BUILD_MMX
20static void
21init_add_rel_pixel_color_span_funcs_mmx(void)
22{ }
23#endif
24
25#ifdef BUILD_MMX
26static void
27init_add_rel_pixel_color_pt_funcs_mmx(void)
28{ }
29#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 @@
1/* add pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_pixel_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_pixel_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel --> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_pixel_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_pixel_pt_funcs_mmx(void)
31{
32}
33#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 @@
1/* add pixel x mask --> dst */
2
3#ifdef BUILD_C
4/* XXX: not used
5static void
6init_add_pixel_mask_span_funcs_c(void)
7{
8}
9*/
10#endif
11
12#ifdef BUILD_C
13/* XXX: not used
14static void
15init_add_pixel_mask_pt_funcs_c(void)
16{
17}
18*/
19#endif
20
21/*-----*/
22
23/* add_rel pixel x mask --> dst */
24
25#ifdef BUILD_C
26static void
27init_add_rel_pixel_mask_span_funcs_c(void)
28{
29}
30#endif
31
32#ifdef BUILD_C
33static void
34init_add_rel_pixel_mask_pt_funcs_c(void)
35{
36}
37#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 @@
1/* add pixel x mask -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_add_pixel_mask_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_add_pixel_mask_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* add_rel pixel x mask -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_add_rel_pixel_mask_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_add_rel_pixel_mask_pt_funcs_mmx(void)
31{
32}
33#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 @@
1#include "evas_common.h"
2static RGBA_Gfx_Func op_add_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
3static RGBA_Gfx_Pt_Func op_add_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4
5static void op_add_init(void);
6static void op_add_shutdown(void);
7
8static RGBA_Gfx_Func op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
9static RGBA_Gfx_Func op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
13
14static RGBA_Gfx_Pt_Func op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
15static RGBA_Gfx_Pt_Func op_add_color_pt_get(DATA32 col, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
19
20static RGBA_Gfx_Compositor _composite_add = { "add",
21 op_add_init, op_add_shutdown,
22 op_add_pixel_span_get, op_add_color_span_get,
23 op_add_pixel_color_span_get, op_add_mask_color_span_get,
24 op_add_pixel_mask_span_get,
25 op_add_pixel_pt_get, op_add_color_pt_get,
26 op_add_pixel_color_pt_get, op_add_mask_color_pt_get,
27 op_add_pixel_mask_pt_get
28 };
29
30RGBA_Gfx_Compositor *
31evas_common_gfx_compositor_add_get(void)
32{
33 return &(_composite_add);
34}
35
36static RGBA_Gfx_Func op_add_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
37static RGBA_Gfx_Pt_Func op_add_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
38
39static void op_add_rel_init(void);
40static void op_add_rel_shutdown(void);
41
42static RGBA_Gfx_Func op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
43static RGBA_Gfx_Func op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
44static RGBA_Gfx_Func op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
45static RGBA_Gfx_Func op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
47
48static RGBA_Gfx_Pt_Func op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
49static RGBA_Gfx_Pt_Func op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
50static RGBA_Gfx_Pt_Func op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
51static RGBA_Gfx_Pt_Func op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
52static RGBA_Gfx_Pt_Func op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
53
54static RGBA_Gfx_Compositor _composite_add_rel = { "add_rel",
55 op_add_rel_init, op_add_rel_shutdown,
56 op_add_rel_pixel_span_get, op_add_rel_color_span_get,
57 op_add_rel_pixel_color_span_get, op_add_rel_mask_color_span_get,
58 op_add_rel_pixel_mask_span_get,
59 op_add_rel_pixel_pt_get, op_add_rel_color_pt_get,
60 op_add_rel_pixel_color_pt_get, op_add_rel_mask_color_pt_get,
61 op_add_rel_pixel_mask_pt_get
62 };
63
64RGBA_Gfx_Compositor *
65evas_common_gfx_compositor_add_rel_get(void)
66{
67 return &(_composite_add_rel);
68}
69
70
71# include "./evas_op_add/op_add_pixel_.c"
72# include "./evas_op_add/op_add_color_.c"
73# include "./evas_op_add/op_add_pixel_color_.c"
74# include "./evas_op_add/op_add_pixel_mask_.c"
75# include "./evas_op_add/op_add_mask_color_.c"
76//# include "./evas_op_add/op_add_pixel_mask_color_.c"
77
78# include "./evas_op_add/op_add_pixel_i386.c"
79# include "./evas_op_add/op_add_color_i386.c"
80# include "./evas_op_add/op_add_pixel_color_i386.c"
81# include "./evas_op_add/op_add_pixel_mask_i386.c"
82# include "./evas_op_add/op_add_mask_color_i386.c"
83//# include "op_add_pixel_mask_color_.c"
84
85static void
86op_add_init(void)
87{
88 memset(op_add_span_funcs, 0, sizeof(op_add_span_funcs));
89 memset(op_add_pt_funcs, 0, sizeof(op_add_pt_funcs));
90#ifdef BUILD_MMX
91 init_add_pixel_span_funcs_mmx();
92 init_add_pixel_color_span_funcs_mmx();
93 init_add_pixel_mask_span_funcs_mmx();
94 init_add_color_span_funcs_mmx();
95 init_add_mask_color_span_funcs_mmx();
96
97 init_add_pixel_pt_funcs_mmx();
98 init_add_pixel_color_pt_funcs_mmx();
99 init_add_pixel_mask_pt_funcs_mmx();
100 init_add_color_pt_funcs_mmx();
101 init_add_mask_color_pt_funcs_mmx();
102#endif
103#ifdef BUILD_C
104 init_add_pixel_span_funcs_c();
105 init_add_pixel_color_span_funcs_c();
106 init_add_rel_pixel_mask_span_funcs_c();
107 init_add_color_span_funcs_c();
108 init_add_mask_color_span_funcs_c();
109
110 init_add_pixel_pt_funcs_c();
111 init_add_pixel_color_pt_funcs_c();
112 init_add_rel_pixel_mask_pt_funcs_c();
113 init_add_color_pt_funcs_c();
114 init_add_mask_color_pt_funcs_c();
115#endif
116}
117
118static void
119op_add_shutdown(void)
120{
121}
122
123static RGBA_Gfx_Func
124add_gfx_span_func_cpu(int s, int m, int c, int d)
125{
126 RGBA_Gfx_Func func = NULL;
127 int cpu = CPU_N;
128#ifdef BUILD_MMX
129 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
130 {
131 cpu = CPU_MMX;
132 func = op_add_span_funcs[s][m][c][d][cpu];
133 if (func) return func;
134 }
135#endif
136#ifdef BUILD_C
137 cpu = CPU_C;
138 func = op_add_span_funcs[s][m][c][d][cpu];
139 if (func) return func;
140#endif
141 return func;
142}
143
144static RGBA_Gfx_Func
145op_add_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
146{
147 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
148
149 if (src && src->cache_entry.flags.alpha)
150 s = SP;
151 if (dst && dst->cache_entry.flags.alpha)
152 d = DP;
153 return add_gfx_span_func_cpu(s, m, c, d);
154}
155
156static RGBA_Gfx_Func
157op_add_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
158{
159 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
160
161 if ((col >> 24) < 255)
162 c = SC;
163 if (col == (col | 0x00ffffff))
164 c = SC_AA;
165 if (col == 0xffffffff)
166 c = SC_N;
167 if (dst && dst->cache_entry.flags.alpha)
168 d = DP;
169 return add_gfx_span_func_cpu(s, m, c, d);
170}
171
172static RGBA_Gfx_Func
173op_add_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
174{
175 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
176
177 if (src && src->cache_entry.flags.alpha)
178 s = SP;
179 if ((col >> 24) < 255)
180 c = SC;
181 if (col == (col | 0x00ffffff))
182 c = SC_AA;
183 if (col == 0xffffffff)
184 c = SC_N;
185 if (dst && dst->cache_entry.flags.alpha)
186 d = DP;
187 return add_gfx_span_func_cpu(s, m, c, d);
188}
189
190static RGBA_Gfx_Func
191op_add_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
192{
193 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
194
195 if ((col >> 24) < 255)
196 c = SC;
197 if (col == (col | 0x00ffffff))
198 c = SC_AA;
199 if (col == 0xffffffff)
200 c = SC_N;
201 if (dst && dst->cache_entry.flags.alpha)
202 d = DP;
203 return add_gfx_span_func_cpu(s, m, c, d);
204}
205
206static RGBA_Gfx_Func
207op_add_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
208{
209 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
210
211 if (src && src->cache_entry.flags.alpha)
212 s = SP;
213 if (dst && dst->cache_entry.flags.alpha)
214 d = DP;
215 return add_gfx_span_func_cpu(s, m, c, d);
216}
217
218static RGBA_Gfx_Pt_Func
219add_gfx_pt_func_cpu(int s, int m, int c, int d)
220{
221 RGBA_Gfx_Pt_Func func = NULL;
222 int cpu = CPU_N;
223#ifdef BUILD_MMX
224 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
225 {
226 cpu = CPU_MMX;
227 func = op_add_pt_funcs[s][m][c][d][cpu];
228 if (func) return func;
229 }
230#endif
231#ifdef BUILD_C
232 cpu = CPU_C;
233 func = op_add_pt_funcs[s][m][c][d][cpu];
234 if (func) return func;
235#endif
236 return func;
237}
238
239static RGBA_Gfx_Pt_Func
240op_add_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
241{
242 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
243
244 if (src_flags.alpha)
245 s = SP;
246 if (dst && dst->cache_entry.flags.alpha)
247 d = DP;
248 return add_gfx_pt_func_cpu(s, m, c, d);
249}
250
251static RGBA_Gfx_Pt_Func
252op_add_color_pt_get(DATA32 col, RGBA_Image *dst)
253{
254 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
255
256 if ((col >> 24) < 255)
257 c = SC;
258 if (col == (col | 0x00ffffff))
259 c = SC_AA;
260 if (col == 0xffffffff)
261 c = SC_N;
262 if (dst && dst->cache_entry.flags.alpha)
263 d = DP;
264 return add_gfx_pt_func_cpu(s, m, c, d);
265}
266
267static RGBA_Gfx_Pt_Func
268op_add_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
269{
270 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
271
272 if (src_flags.alpha)
273 s = SP;
274 if ((col >> 24) < 255)
275 c = SC;
276 if (col == (col | 0x00ffffff))
277 c = SC_AA;
278 if (col == 0xffffffff)
279 c = SC_N;
280 if (dst && dst->cache_entry.flags.alpha)
281 d = DP;
282 return add_gfx_pt_func_cpu(s, m, c, d);
283}
284
285static RGBA_Gfx_Pt_Func
286op_add_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
287{
288 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
289
290 if ((col >> 24) < 255)
291 c = SC;
292 if (col == (col | 0x00ffffff))
293 c = SC_AA;
294 if (col == 0xffffffff)
295 c = SC_N;
296 if (dst && dst->cache_entry.flags.alpha)
297 d = DP;
298 return add_gfx_pt_func_cpu(s, m, c, d);
299}
300
301static RGBA_Gfx_Pt_Func
302op_add_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
303{
304 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
305
306 if (src_flags.alpha)
307 s = SP;
308 if (dst && dst->cache_entry.flags.alpha)
309 d = DP;
310 return add_gfx_pt_func_cpu(s, m, c, d);
311}
312
313
314
315static void
316op_add_rel_init(void)
317{
318 memset(op_add_rel_span_funcs, 0, sizeof(op_add_rel_span_funcs));
319 memset(op_add_rel_pt_funcs, 0, sizeof(op_add_rel_pt_funcs));
320#ifdef BUILD_MMX
321 init_add_rel_pixel_span_funcs_mmx();
322 init_add_rel_pixel_color_span_funcs_mmx();
323 init_add_rel_pixel_mask_span_funcs_mmx();
324 init_add_rel_color_span_funcs_mmx();
325 init_add_rel_mask_color_span_funcs_mmx();
326
327 init_add_rel_pixel_pt_funcs_mmx();
328 init_add_rel_pixel_color_pt_funcs_mmx();
329 init_add_rel_pixel_mask_pt_funcs_mmx();
330 init_add_rel_color_pt_funcs_mmx();
331 init_add_rel_mask_color_pt_funcs_mmx();
332#endif
333#ifdef BUILD_C
334 init_add_rel_pixel_span_funcs_c();
335 init_add_rel_pixel_color_span_funcs_c();
336 init_add_rel_pixel_mask_span_funcs_c();
337 init_add_rel_color_span_funcs_c();
338 init_add_rel_mask_color_span_funcs_c();
339
340 init_add_rel_pixel_pt_funcs_c();
341 init_add_rel_pixel_color_pt_funcs_c();
342 init_add_rel_pixel_mask_pt_funcs_c();
343 init_add_rel_color_pt_funcs_c();
344 init_add_rel_mask_color_pt_funcs_c();
345#endif
346}
347
348static void
349op_add_rel_shutdown(void)
350{
351}
352
353static RGBA_Gfx_Func
354add_rel_gfx_span_func_cpu(int s, int m, int c, int d)
355{
356 RGBA_Gfx_Func func = NULL;
357 int cpu = CPU_N;
358#ifdef BUILD_MMX
359 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
360 {
361 cpu = CPU_MMX;
362 func = op_add_rel_span_funcs[s][m][c][d][cpu];
363 if (func) return func;
364 }
365#endif
366#ifdef BUILD_C
367 cpu = CPU_C;
368 func = op_add_rel_span_funcs[s][m][c][d][cpu];
369 if (func) return func;
370#endif
371 return func;
372}
373
374static RGBA_Gfx_Func
375op_add_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
376{
377 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
378
379 if (src && src->cache_entry.flags.alpha)
380 s = SP;
381 if (dst && dst->cache_entry.flags.alpha)
382 d = DP;
383 return add_rel_gfx_span_func_cpu(s, m, c, d);
384}
385
386static RGBA_Gfx_Func
387op_add_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
388{
389 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
390
391 if ((col >> 24) < 255)
392 c = SC;
393 if (col == (col | 0x00ffffff))
394 c = SC_AA;
395 if (col == 0xffffffff)
396 c = SC_N;
397 if (dst && dst->cache_entry.flags.alpha)
398 d = DP;
399 return add_rel_gfx_span_func_cpu(s, m, c, d);
400}
401
402static RGBA_Gfx_Func
403op_add_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
404{
405 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
406
407 if (src && src->cache_entry.flags.alpha)
408 s = SP;
409 if ((col >> 24) < 255)
410 c = SC;
411 if (col == (col | 0x00ffffff))
412 c = SC_AA;
413 if (col == 0xffffffff)
414 c = SC_N;
415 if (dst && dst->cache_entry.flags.alpha)
416 d = DP;
417 return add_rel_gfx_span_func_cpu(s, m, c, d);
418}
419
420static RGBA_Gfx_Func
421op_add_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
422{
423 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
424
425 if ((col >> 24) < 255)
426 c = SC;
427 if (col == (col | 0x00ffffff))
428 c = SC_AA;
429 if (col == 0xffffffff)
430 c = SC_N;
431 if (dst && dst->cache_entry.flags.alpha)
432 d = DP;
433 return add_rel_gfx_span_func_cpu(s, m, c, d);
434}
435
436static RGBA_Gfx_Func
437op_add_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
438{
439 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
440
441 if (src && src->cache_entry.flags.alpha)
442 s = SP;
443 if (dst && dst->cache_entry.flags.alpha)
444 d = DP;
445 return add_rel_gfx_span_func_cpu(s, m, c, d);
446}
447
448static RGBA_Gfx_Pt_Func
449add_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
450{
451 RGBA_Gfx_Pt_Func func = NULL;
452 int cpu = CPU_N;
453#ifdef BUILD_MMX
454 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
455 {
456 cpu = CPU_MMX;
457 func = op_add_rel_pt_funcs[s][m][c][d][cpu];
458 if (func) return func;
459 }
460#endif
461#ifdef BUILD_C
462 cpu = CPU_C;
463 func = op_add_rel_pt_funcs[s][m][c][d][cpu];
464 if (func) return func;
465#endif
466 return func;
467}
468
469static RGBA_Gfx_Pt_Func
470op_add_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
471{
472 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
473
474 if (src_flags.alpha)
475 s = SP;
476 if (dst && dst->cache_entry.flags.alpha)
477 d = DP;
478 return add_rel_gfx_pt_func_cpu(s, m, c, d);
479}
480
481static RGBA_Gfx_Pt_Func
482op_add_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
483{
484 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
485
486 if ((col >> 24) < 255)
487 c = SC;
488 if (col == (col | 0x00ffffff))
489 c = SC_AA;
490 if (col == 0xffffffff)
491 c = SC_N;
492 if (dst && dst->cache_entry.flags.alpha)
493 d = DP;
494 return add_rel_gfx_pt_func_cpu(s, m, c, d);
495}
496
497static RGBA_Gfx_Pt_Func
498op_add_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
499{
500 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
501
502 if (src_flags.alpha)
503 s = SP;
504 if ((col >> 24) < 255)
505 c = SC;
506 if (col == (col | 0x00ffffff))
507 c = SC_AA;
508 if (col == 0xffffffff)
509 c = SC_N;
510 if (dst && dst->cache_entry.flags.alpha)
511 d = DP;
512 return add_rel_gfx_pt_func_cpu(s, m, c, d);
513}
514
515static RGBA_Gfx_Pt_Func
516op_add_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
517{
518 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
519
520 if ((col >> 24) < 255)
521 c = SC;
522 if (col == (col | 0x00ffffff))
523 c = SC_AA;
524 if (col == 0xffffffff)
525 c = SC_N;
526 if (dst && dst->cache_entry.flags.alpha)
527 d = DP;
528 return add_rel_gfx_pt_func_cpu(s, m, c, d);
529}
530
531static RGBA_Gfx_Pt_Func
532op_add_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
533{
534 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
535
536 if (src_flags.alpha)
537 s = SP;
538 if (dst && dst->cache_entry.flags.alpha)
539 d = DP;
540 return add_rel_gfx_pt_func_cpu(s, m, c, d);
541}
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_blend_color_.c \
5op_blend_color_i386.c \
6op_blend_color_neon.c \
7op_blend_color_sse3.c \
8op_blend_mask_color_.c \
9op_blend_mask_color_i386.c \
10op_blend_mask_color_neon.c \
11op_blend_mask_color_sse3.c \
12op_blend_pixel_.c \
13op_blend_pixel_color_.c \
14op_blend_pixel_color_i386.c \
15op_blend_pixel_color_neon.c \
16op_blend_pixel_color_sse3.c \
17op_blend_pixel_i386.c \
18op_blend_pixel_mask_.c \
19op_blend_pixel_mask_i386.c \
20op_blend_pixel_mask_neon.c \
21op_blend_pixel_mask_sse3.c \
22op_blend_pixel_neon.c \
23op_blend_pixel_sse3.c
24
25noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la
26
27libevas_engine_common_op_blend_master_sse3_la_SOURCES = \
28op_blend_master_sse3.c
29
30libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \
31-I. \
32-I$(top_srcdir)/src/lib \
33-I$(top_srcdir)/src/lib/engines/common \
34-I$(top_srcdir)/src/lib/engines/common/evas_op_blend \
35-I$(top_srcdir)/src/lib/cserve \
36-I$(top_srcdir)/src/lib/include \
37-DPACKAGE_BIN_DIR=\"$(bindir)\" \
38-DPACKAGE_LIB_DIR=\"$(libdir)\" \
39-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
40@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
41@PIXMAN_CFLAGS@ \
42@EET_CFLAGS@ @pthread_cflags@ \
43@EINA_CFLAGS@ \
44@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
45@PIXMAN_CFLAGS@ \
46@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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common/evas_op_blend
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_engine_common_op_blend_master_sse3_la_LIBADD =
61am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS = libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo
62libevas_engine_common_op_blend_master_sse3_la_OBJECTS = \
63 $(am_libevas_engine_common_op_blend_master_sse3_la_OBJECTS)
64AM_V_lt = $(am__v_lt_$(V))
65am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
66am__v_lt_0 = --silent
67libevas_engine_common_op_blend_master_sse3_la_LINK = $(LIBTOOL) \
68 $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
69 --mode=link $(CCLD) \
70 $(libevas_engine_common_op_blend_master_sse3_la_CFLAGS) \
71 $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
72DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
73depcomp = $(SHELL) $(top_srcdir)/depcomp
74am__depfiles_maybe = depfiles
75am__mv = mv -f
76COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
77 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
78LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
79 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
80 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
81 $(AM_CFLAGS) $(CFLAGS)
82AM_V_CC = $(am__v_CC_$(V))
83am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
84am__v_CC_0 = @echo " CC " $@;
85AM_V_at = $(am__v_at_$(V))
86am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
87am__v_at_0 = @
88CCLD = $(CC)
89LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
90 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
91 $(AM_LDFLAGS) $(LDFLAGS) -o $@
92AM_V_CCLD = $(am__v_CCLD_$(V))
93am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
94am__v_CCLD_0 = @echo " CCLD " $@;
95AM_V_GEN = $(am__v_GEN_$(V))
96am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
97am__v_GEN_0 = @echo " GEN " $@;
98SOURCES = $(libevas_engine_common_op_blend_master_sse3_la_SOURCES)
99DIST_SOURCES = \
100 $(libevas_engine_common_op_blend_master_sse3_la_SOURCES)
101ETAGS = etags
102CTAGS = ctags
103DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
104ACLOCAL = @ACLOCAL@
105ALLOCA = @ALLOCA@
106AMTAR = @AMTAR@
107AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
108AR = @AR@
109AS = @AS@
110AUTOCONF = @AUTOCONF@
111AUTOHEADER = @AUTOHEADER@
112AUTOMAKE = @AUTOMAKE@
113AWK = @AWK@
114CC = @CC@
115CCDEPMODE = @CCDEPMODE@
116CFLAGS = @CFLAGS@
117CHECK_CFLAGS = @CHECK_CFLAGS@
118CHECK_LIBS = @CHECK_LIBS@
119CPP = @CPP@
120CPPFLAGS = @CPPFLAGS@
121CXX = @CXX@
122CXXCPP = @CXXCPP@
123CXXDEPMODE = @CXXDEPMODE@
124CXXFLAGS = @CXXFLAGS@
125CYGPATH_W = @CYGPATH_W@
126DEFS = @DEFS@
127DEPDIR = @DEPDIR@
128DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
129DIRECTFB_LIBS = @DIRECTFB_LIBS@
130DLLTOOL = @DLLTOOL@
131DSYMUTIL = @DSYMUTIL@
132DUMPBIN = @DUMPBIN@
133ECHO_C = @ECHO_C@
134ECHO_N = @ECHO_N@
135ECHO_T = @ECHO_T@
136ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
137ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
138EDB_CFLAGS = @EDB_CFLAGS@
139EDB_LIBS = @EDB_LIBS@
140EDJE_CFLAGS = @EDJE_CFLAGS@
141EDJE_LIBS = @EDJE_LIBS@
142EET_CFLAGS = @EET_CFLAGS@
143EET_LIBS = @EET_LIBS@
144EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
145EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
146EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
147EGREP = @EGREP@
148EINA_CFLAGS = @EINA_CFLAGS@
149EINA_LIBS = @EINA_LIBS@
150EVAS_CFLAGS = @EVAS_CFLAGS@
151EVAS_LIBS = @EVAS_LIBS@
152EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
153EVIL_CFLAGS = @EVIL_CFLAGS@
154EVIL_LIBS = @EVIL_LIBS@
155EXEEXT = @EXEEXT@
156EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
157EXOTIC_LIBS = @EXOTIC_LIBS@
158FGREP = @FGREP@
159FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
160FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
161FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
162FREETYPE_LIBS = @FREETYPE_LIBS@
163FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
164FRIBIDI_LIBS = @FRIBIDI_LIBS@
165GL_EET_CFLAGS = @GL_EET_CFLAGS@
166GL_EET_LIBS = @GL_EET_LIBS@
167GREP = @GREP@
168HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
169HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
170INSTALL = @INSTALL@
171INSTALL_DATA = @INSTALL_DATA@
172INSTALL_PROGRAM = @INSTALL_PROGRAM@
173INSTALL_SCRIPT = @INSTALL_SCRIPT@
174INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
175LD = @LD@
176LDFLAGS = @LDFLAGS@
177LIBOBJS = @LIBOBJS@
178LIBS = @LIBS@
179LIBTOOL = @LIBTOOL@
180LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
181LINEBREAK_LIBS = @LINEBREAK_LIBS@
182LIPO = @LIPO@
183LN_S = @LN_S@
184LTLIBOBJS = @LTLIBOBJS@
185MAKEINFO = @MAKEINFO@
186MKDIR_P = @MKDIR_P@
187MODULE_ARCH = @MODULE_ARCH@
188NM = @NM@
189NMEDIT = @NMEDIT@
190OBJC = @OBJC@
191OBJCDEPMODE = @OBJCDEPMODE@
192OBJCFLAGS = @OBJCFLAGS@
193OBJDUMP = @OBJDUMP@
194OBJEXT = @OBJEXT@
195OTOOL = @OTOOL@
196OTOOL64 = @OTOOL64@
197PACKAGE = @PACKAGE@
198PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
199PACKAGE_NAME = @PACKAGE_NAME@
200PACKAGE_STRING = @PACKAGE_STRING@
201PACKAGE_TARNAME = @PACKAGE_TARNAME@
202PACKAGE_URL = @PACKAGE_URL@
203PACKAGE_VERSION = @PACKAGE_VERSION@
204PATH_SEPARATOR = @PATH_SEPARATOR@
205PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
206PIXMAN_LIBS = @PIXMAN_LIBS@
207PKG_CONFIG = @PKG_CONFIG@
208PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
209PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
210PNG_CFLAGS = @PNG_CFLAGS@
211PNG_LIBS = @PNG_LIBS@
212RANLIB = @RANLIB@
213SDL_CFLAGS = @SDL_CFLAGS@
214SDL_LIBS = @SDL_LIBS@
215SED = @SED@
216SET_MAKE = @SET_MAKE@
217SHELL = @SHELL@
218SHM_OPEN_LINK = @SHM_OPEN_LINK@
219STRIP = @STRIP@
220SVG_CFLAGS = @SVG_CFLAGS@
221SVG_LIBS = @SVG_LIBS@
222VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
223VALGRIND_LIBS = @VALGRIND_LIBS@
224VERSION = @VERSION@
225VMAJ = @VMAJ@
226WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
227WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
228XCB_CFLAGS = @XCB_CFLAGS@
229XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
230XCB_GL_LIBS = @XCB_GL_LIBS@
231XCB_LIBS = @XCB_LIBS@
232XEXT_CFLAGS = @XEXT_CFLAGS@
233XEXT_LIBS = @XEXT_LIBS@
234XMKMF = @XMKMF@
235X_CFLAGS = @X_CFLAGS@
236X_EXTRA_LIBS = @X_EXTRA_LIBS@
237X_LIBS = @X_LIBS@
238X_PRE_LIBS = @X_PRE_LIBS@
239abs_builddir = @abs_builddir@
240abs_srcdir = @abs_srcdir@
241abs_top_builddir = @abs_top_builddir@
242abs_top_srcdir = @abs_top_srcdir@
243ac_ct_CC = @ac_ct_CC@
244ac_ct_CXX = @ac_ct_CXX@
245ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
246ac_ct_OBJC = @ac_ct_OBJC@
247altivec_cflags = @altivec_cflags@
248am__include = @am__include@
249am__leading_dot = @am__leading_dot@
250am__quote = @am__quote@
251am__tar = @am__tar@
252am__untar = @am__untar@
253bindir = @bindir@
254build = @build@
255build_alias = @build_alias@
256build_cpu = @build_cpu@
257build_os = @build_os@
258build_vendor = @build_vendor@
259builddir = @builddir@
260datadir = @datadir@
261datarootdir = @datarootdir@
262dlopen_libs = @dlopen_libs@
263docdir = @docdir@
264dvidir = @dvidir@
265edje_cc = @edje_cc@
266efl_doxygen = @efl_doxygen@
267efl_have_doxygen = @efl_have_doxygen@
268evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
269evas_engine_buffer_libs = @evas_engine_buffer_libs@
270evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
271evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
272evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
273evas_engine_directfb_libs = @evas_engine_directfb_libs@
274evas_engine_fb_cflags = @evas_engine_fb_cflags@
275evas_engine_fb_libs = @evas_engine_fb_libs@
276evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
277evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
278evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
279evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
280evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
281evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
282evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
283evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
284evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
285evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
286evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
287evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
288evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
289evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
290evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
291evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
292evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
293evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
294evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
295evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
296evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
297evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
298evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
299evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
300evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
301evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
302evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
303evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
304evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
305evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
306evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
307evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
308evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
309evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
310evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
311evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
312evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
313evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
314evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
315evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
316evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
317evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
318evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
319evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
320evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
321evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
322evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
323evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
324evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
325evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
326evas_image_loader_png_libs = @evas_image_loader_png_libs@
327evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
328evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
329evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
330evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
331evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
332evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
333evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
334evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
335evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
336evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
337evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
338evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
339exec_prefix = @exec_prefix@
340have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
341have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
342have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
343have_evas_engine_software_x11 = @have_evas_engine_software_x11@
344have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
345have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
346have_lcov = @have_lcov@
347host = @host@
348host_alias = @host_alias@
349host_cpu = @host_cpu@
350host_os = @host_os@
351host_vendor = @host_vendor@
352htmldir = @htmldir@
353includedir = @includedir@
354infodir = @infodir@
355install_sh = @install_sh@
356libdir = @libdir@
357libexecdir = @libexecdir@
358localedir = @localedir@
359localstatedir = @localstatedir@
360lt_ECHO = @lt_ECHO@
361lt_enable_auto_import = @lt_enable_auto_import@
362mandir = @mandir@
363mkdir_p = @mkdir_p@
364oldincludedir = @oldincludedir@
365pdfdir = @pdfdir@
366pkgconfig_requires_private = @pkgconfig_requires_private@
367prefix = @prefix@
368program_transform_name = @program_transform_name@
369psdir = @psdir@
370pthread_cflags = @pthread_cflags@
371pthread_libs = @pthread_libs@
372release_info = @release_info@
373requirement_evas = @requirement_evas@
374sbindir = @sbindir@
375sharedstatedir = @sharedstatedir@
376srcdir = @srcdir@
377sysconfdir = @sysconfdir@
378target_alias = @target_alias@
379top_build_prefix = @top_build_prefix@
380top_builddir = @top_builddir@
381top_srcdir = @top_srcdir@
382version_info = @version_info@
383MAINTAINERCLEANFILES = Makefile.in
384EXTRA_DIST = \
385op_blend_color_.c \
386op_blend_color_i386.c \
387op_blend_color_neon.c \
388op_blend_color_sse3.c \
389op_blend_mask_color_.c \
390op_blend_mask_color_i386.c \
391op_blend_mask_color_neon.c \
392op_blend_mask_color_sse3.c \
393op_blend_pixel_.c \
394op_blend_pixel_color_.c \
395op_blend_pixel_color_i386.c \
396op_blend_pixel_color_neon.c \
397op_blend_pixel_color_sse3.c \
398op_blend_pixel_i386.c \
399op_blend_pixel_mask_.c \
400op_blend_pixel_mask_i386.c \
401op_blend_pixel_mask_neon.c \
402op_blend_pixel_mask_sse3.c \
403op_blend_pixel_neon.c \
404op_blend_pixel_sse3.c
405
406noinst_LTLIBRARIES = libevas_engine_common_op_blend_master_sse3.la
407libevas_engine_common_op_blend_master_sse3_la_SOURCES = \
408op_blend_master_sse3.c
409
410libevas_engine_common_op_blend_master_sse3_la_CFLAGS = \
411-I. \
412-I$(top_srcdir)/src/lib \
413-I$(top_srcdir)/src/lib/engines/common \
414-I$(top_srcdir)/src/lib/engines/common/evas_op_blend \
415-I$(top_srcdir)/src/lib/cserve \
416-I$(top_srcdir)/src/lib/include \
417-DPACKAGE_BIN_DIR=\"$(bindir)\" \
418-DPACKAGE_LIB_DIR=\"$(libdir)\" \
419-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
420@FREETYPE_CFLAGS@ @VALGRIND_CFLAGS@ \
421@PIXMAN_CFLAGS@ \
422@EET_CFLAGS@ @pthread_cflags@ \
423@EINA_CFLAGS@ \
424@FRIBIDI_CFLAGS@ @HARFBUZZ_CFLAGS@ \
425@PIXMAN_CFLAGS@ \
426@EVAS_SSE3_CFLAGS@
427
428all: all-am
429
430.SUFFIXES:
431.SUFFIXES: .c .lo .o .obj
432$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
433 @for dep in $?; do \
434 case '$(am__configure_deps)' in \
435 *$$dep*) \
436 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
437 && { if test -f $@; then exit 0; else break; fi; }; \
438 exit 1;; \
439 esac; \
440 done; \
441 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile'; \
442 $(am__cd) $(top_srcdir) && \
443 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_blend/Makefile
444.PRECIOUS: Makefile
445Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
446 @case '$?' in \
447 *config.status*) \
448 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
449 *) \
450 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
451 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
452 esac;
453
454$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
455 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
456
457$(top_srcdir)/configure: $(am__configure_deps)
458 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
459$(ACLOCAL_M4): $(am__aclocal_m4_deps)
460 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
461$(am__aclocal_m4_deps):
462
463clean-noinstLTLIBRARIES:
464 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
465 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
466 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
467 test "$$dir" != "$$p" || dir=.; \
468 echo "rm -f \"$${dir}/so_locations\""; \
469 rm -f "$${dir}/so_locations"; \
470 done
471libevas_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)
472 $(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)
473
474mostlyclean-compile:
475 -rm -f *.$(OBJEXT)
476
477distclean-compile:
478 -rm -f *.tab.c
479
480@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.Plo@am__quote@
481
482.c.o:
483@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
484@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
485@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
486@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
487@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
488@am__fastdepCC_FALSE@ $(COMPILE) -c $<
489
490.c.obj:
491@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
492@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
493@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
494@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
495@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
496@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
497
498.c.lo:
499@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
500@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
501@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
502@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
503@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
504@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
505
506libevas_engine_common_op_blend_master_sse3_la-op_blend_master_sse3.lo: op_blend_master_sse3.c
507@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
508@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
509@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
510@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@
511@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
512@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
513
514mostlyclean-libtool:
515 -rm -f *.lo
516
517clean-libtool:
518 -rm -rf .libs _libs
519
520ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
521 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
522 unique=`for i in $$list; do \
523 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
524 done | \
525 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
526 END { if (nonempty) { for (i in files) print i; }; }'`; \
527 mkid -fID $$unique
528tags: TAGS
529
530TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
531 $(TAGS_FILES) $(LISP)
532 set x; \
533 here=`pwd`; \
534 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
535 unique=`for i in $$list; do \
536 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
537 done | \
538 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
539 END { if (nonempty) { for (i in files) print i; }; }'`; \
540 shift; \
541 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
542 test -n "$$unique" || unique=$$empty_fix; \
543 if test $$# -gt 0; then \
544 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
545 "$$@" $$unique; \
546 else \
547 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
548 $$unique; \
549 fi; \
550 fi
551ctags: CTAGS
552CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
553 $(TAGS_FILES) $(LISP)
554 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
555 unique=`for i in $$list; do \
556 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
557 done | \
558 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
559 END { if (nonempty) { for (i in files) print i; }; }'`; \
560 test -z "$(CTAGS_ARGS)$$unique" \
561 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
562 $$unique
563
564GTAGS:
565 here=`$(am__cd) $(top_builddir) && pwd` \
566 && $(am__cd) $(top_srcdir) \
567 && gtags -i $(GTAGS_ARGS) "$$here"
568
569distclean-tags:
570 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
571
572distdir: $(DISTFILES)
573 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
574 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
575 list='$(DISTFILES)'; \
576 dist_files=`for file in $$list; do echo $$file; done | \
577 sed -e "s|^$$srcdirstrip/||;t" \
578 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
579 case $$dist_files in \
580 */*) $(MKDIR_P) `echo "$$dist_files" | \
581 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
582 sort -u` ;; \
583 esac; \
584 for file in $$dist_files; do \
585 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
586 if test -d $$d/$$file; then \
587 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
588 if test -d "$(distdir)/$$file"; then \
589 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
590 fi; \
591 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
592 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
593 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
594 fi; \
595 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
596 else \
597 test -f "$(distdir)/$$file" \
598 || cp -p $$d/$$file "$(distdir)/$$file" \
599 || exit 1; \
600 fi; \
601 done
602check-am: all-am
603check: check-am
604all-am: Makefile $(LTLIBRARIES)
605installdirs:
606install: install-am
607install-exec: install-exec-am
608install-data: install-data-am
609uninstall: uninstall-am
610
611install-am: all-am
612 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
613
614installcheck: installcheck-am
615install-strip:
616 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
617 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
618 `test -z '$(STRIP)' || \
619 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
620mostlyclean-generic:
621
622clean-generic:
623
624distclean-generic:
625 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
626 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
627
628maintainer-clean-generic:
629 @echo "This command is intended for maintainers to use"
630 @echo "it deletes files that may require special tools to rebuild."
631 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
632clean: clean-am
633
634clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
635 mostlyclean-am
636
637distclean: distclean-am
638 -rm -rf ./$(DEPDIR)
639 -rm -f Makefile
640distclean-am: clean-am distclean-compile distclean-generic \
641 distclean-tags
642
643dvi: dvi-am
644
645dvi-am:
646
647html: html-am
648
649html-am:
650
651info: info-am
652
653info-am:
654
655install-data-am:
656
657install-dvi: install-dvi-am
658
659install-dvi-am:
660
661install-exec-am:
662
663install-html: install-html-am
664
665install-html-am:
666
667install-info: install-info-am
668
669install-info-am:
670
671install-man:
672
673install-pdf: install-pdf-am
674
675install-pdf-am:
676
677install-ps: install-ps-am
678
679install-ps-am:
680
681installcheck-am:
682
683maintainer-clean: maintainer-clean-am
684 -rm -rf ./$(DEPDIR)
685 -rm -f Makefile
686maintainer-clean-am: distclean-am maintainer-clean-generic
687
688mostlyclean: mostlyclean-am
689
690mostlyclean-am: mostlyclean-compile mostlyclean-generic \
691 mostlyclean-libtool
692
693pdf: pdf-am
694
695pdf-am:
696
697ps: ps-am
698
699ps-am:
700
701uninstall-am:
702
703.MAKE: install-am install-strip
704
705.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
706 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
707 distclean-compile distclean-generic distclean-libtool \
708 distclean-tags distdir dvi dvi-am html html-am info info-am \
709 install install-am install-data install-data-am install-dvi \
710 install-dvi-am install-exec install-exec-am install-html \
711 install-html-am install-info install-info-am install-man \
712 install-pdf install-pdf-am install-ps install-ps-am \
713 install-strip installcheck installcheck-am installdirs \
714 maintainer-clean maintainer-clean-generic mostlyclean \
715 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
716 pdf pdf-am ps ps-am tags uninstall uninstall-am
717
718
719# Tell versions [3.59,3.63) of GNU make to not export all variables.
720# Otherwise a system limit (for SysV at least) may be exceeded.
721.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 @@
1/* blend color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e, a = 256 - (c >> 24);
7 UNROLL8_PLD_WHILE(d, l, e,
8 {
9 *d = c + MUL_256(a, *d);
10 d++;
11 });
12}
13
14#define _op_blend_caa_dp _op_blend_c_dp
15
16#define _op_blend_c_dpan _op_blend_c_dp
17#define _op_blend_caa_dpan _op_blend_c_dpan
18
19static void
20init_blend_color_span_funcs_c(void)
21{
22 op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_c_dp;
23 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_caa_dp;
24
25 op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_c_dpan;
26 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_caa_dpan;
27}
28#endif
29
30#ifdef BUILD_C
31static void
32_op_blend_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
33 s = 256 - (c >> 24);
34 *d = c + MUL_256(s, *d);
35}
36
37#define _op_blend_pt_caa_dp _op_blend_pt_c_dp
38
39#define _op_blend_pt_c_dpan _op_blend_pt_c_dp
40#define _op_blend_pt_caa_dpan _op_blend_pt_c_dpan
41
42#define _op_blend_pt_c_dpas _op_blend_pt_c_dp
43#define _op_blend_pt_caa_dpas _op_blend_pt_c_dp
44
45static void
46init_blend_color_pt_funcs_c(void)
47{
48 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_pt_c_dp;
49 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_caa_dp;
50
51 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_c_dpan;
52 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_caa_dpan;
53}
54#endif
55
56/*-----*/
57
58/* blend_rel color -> dst */
59
60#ifdef BUILD_C
61static void
62_op_blend_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
63 DATA32 *e;
64 int alpha = 256 - (c >> 24);
65 UNROLL8_PLD_WHILE(d, l, e,
66 {
67 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
68 d++;
69 });
70}
71
72#define _op_blend_rel_caa_dp _op_blend_rel_c_dp
73
74#define _op_blend_rel_c_dpan _op_blend_c_dpan
75#define _op_blend_rel_caa_dpan _op_blend_caa_dpan
76
77static void
78init_blend_rel_color_span_funcs_c(void)
79{
80 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_c_dp;
81 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_caa_dp;
82
83 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_c_dpan;
84 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_caa_dpan;
85}
86#endif
87
88#ifdef BUILD_C
89static void
90_op_blend_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
91 s = *d >> 24;
92 *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d);
93}
94
95#define _op_blend_rel_pt_caa_dp _op_blend_rel_pt_c_dp
96
97#define _op_blend_rel_pt_c_dpan _op_blend_pt_c_dpan
98#define _op_blend_rel_pt_caa_dpan _op_blend_pt_caa_dpan
99
100static void
101init_blend_rel_color_pt_funcs_c(void)
102{
103 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_c_dp;
104 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_caa_dp;
105
106 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_c_dpan;
107 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_caa_dpan;
108}
109#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 @@
1/* blend color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_P2R(c, mm2, mm0)
9 c = 256 - (c >> 24);
10 MOV_A2R(c, mm3)
11 while (d < e) {
12 MOV_P2R(*d, mm1, mm0)
13 MUL4_256_R2R(mm3, mm1)
14 paddw_r2r(mm2, mm1);
15 MOV_R2P(mm1, *d, mm0)
16 d++;
17 }
18}
19
20#define _op_blend_caa_dp_mmx _op_blend_c_dp_mmx
21
22#define _op_blend_c_dpan_mmx _op_blend_c_dp_mmx
23#define _op_blend_caa_dpan_mmx _op_blend_c_dpan_mmx
24
25static void
26init_blend_color_span_funcs_mmx(void)
27{
28 op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_c_dp_mmx;
29 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_caa_dp_mmx;
30
31 op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_c_dpan_mmx;
32 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_caa_dpan_mmx;
33}
34#endif
35
36#ifdef BUILD_MMX
37static void
38_op_blend_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
39 pxor_r2r(mm0, mm0);
40 MOV_P2R(c, mm2, mm0)
41 c = 256 - (c >> 24);
42 MOV_A2R(c, mm3)
43 MOV_P2R(*d, mm1, mm0)
44 MUL4_256_R2R(mm3, mm1)
45 paddw_r2r(mm2, mm1);
46 MOV_R2P(mm1, *d, mm0)
47}
48
49#define _op_blend_pt_caa_dp_mmx _op_blend_pt_c_dp_mmx
50
51#define _op_blend_pt_c_dpan_mmx _op_blend_pt_c_dp_mmx
52#define _op_blend_pt_caa_dpan_mmx _op_blend_pt_c_dpan_mmx
53
54static void
55init_blend_color_pt_funcs_mmx(void)
56{
57 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_c_dp_mmx;
58 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_caa_dp_mmx;
59
60 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_c_dpan_mmx;
61 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_caa_dpan_mmx;
62}
63#endif
64/*-----*/
65
66/* blend_rel color -> dst */
67
68#ifdef BUILD_MMX
69static void
70_op_blend_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
71 DATA32 *e = d + l;
72 pxor_r2r(mm0, mm0);
73 MOV_P2R(c, mm2, mm0)
74 c = 256 - (c >> 24);
75 MOV_A2R(c, mm3)
76 MOV_A2R(ALPHA_255, mm5)
77 while (d < e) {
78 MOV_P2R(*d, mm1, mm0)
79 MOV_RA2R(mm1, mm4)
80 MUL4_256_R2R(mm3, mm1)
81 MUL4_SYM_R2R(mm2, mm4, mm5)
82 paddw_r2r(mm4, mm1);
83 MOV_R2P(mm1, *d, mm0)
84 d++;
85 }
86}
87
88#define _op_blend_rel_caa_dp_mmx _op_blend_rel_c_dp_mmx
89
90#define _op_blend_rel_c_dpan_mmx _op_blend_c_dpan_mmx
91#define _op_blend_rel_caa_dpan_mmx _op_blend_caa_dpan_mmx
92
93static void
94init_blend_rel_color_span_funcs_mmx(void)
95{
96 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_c_dp_mmx;
97 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_caa_dp_mmx;
98
99 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_c_dpan_mmx;
100 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_caa_dpan_mmx;
101}
102#endif
103
104#ifdef BUILD_MMX
105static void
106_op_blend_rel_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
107 pxor_r2r(mm0, mm0);
108 MOV_A2R(ALPHA_256, mm6)
109 MOV_A2R(ALPHA_255, mm5)
110
111 MOV_P2R(c, mm2, mm0)
112 MOV_RA2R(mm2, mm1)
113 psubw_r2r(mm1, mm6);
114
115 MOV_P2R(*d, mm1, mm0)
116 MOV_RA2R(mm1, mm4)
117 MUL4_256_R2R(mm6, mm1)
118
119 MUL4_SYM_R2R(mm4, mm2, mm5)
120 paddw_r2r(mm2, mm1);
121 MOV_R2P(mm1, *d, mm0)
122}
123
124#define _op_blend_rel_pt_caa_dp_mmx _op_blend_rel_pt_c_dp_mmx
125
126#define _op_blend_rel_pt_c_dpan_mmx _op_blend_pt_c_dpan_mmx
127#define _op_blend_rel_pt_caa_dpan_mmx _op_blend_pt_caa_dpan_mmx
128
129static void
130init_blend_rel_color_pt_funcs_mmx(void)
131{
132 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_blend_rel_pt_c_dp_mmx;
133 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_caa_dp_mmx;
134
135 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_c_dpan_mmx;
136 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_caa_dpan_mmx;
137}
138#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 @@
1/* blend color --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_blend_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e, *tmp = 0;
7#define AP "B_C_DP"
8 asm volatile (
9 ".fpu neon \n\t"
10 "vdup.u32 q6, %[c] \n\t"
11 "vmov.i8 q5, #1 \n\t"
12 "vmvn.u8 q7,q6 \n\t"
13 "vshr.u32 q7, q7, $0x18 \n\t"
14 "vmul.u32 q7,q5, q7 \n\t"
15 "bic %[e], #3 \n\t"
16 "bic %[d], #3 \n\t"
17
18 AP "loopchoose: \n\t"
19 // If aligned already - straight to quads
20 "andS %[tmp], %[d],$0x1f \n\t"
21 "beq "AP"quadloops \n\t"
22
23 "andS %[tmp], %[d],$0x4 \n\t"
24 "beq "AP"dualloop \n\t"
25
26 // Only ever executes once, fall through to dual
27 AP "singleloop: \n\t"
28 // Use 'tmp' not 'd'
29 "vld1.32 d0[0], [%[d]] \n\t"
30 // Only touch d1
31 "vmull.u8 q0, d0, d14 \n\t"
32 "vqrshrn.u16 d0, q0, #8 \n\t"
33 "vadd.u8 d0, d12, d0 \n\t"
34 "vst1.32 d0[0], [%[d]] \n\t"
35
36 "add %[d], #4 \n\t"
37
38 // Can we go the fast path?
39 "andS %[tmp], %[d],$0x1f \n\t"
40 "beq "AP"quadloops \n\t"
41
42 AP "dualloop: \n\t"
43 "sub %[tmp], %[e], %[d] \n\t"
44 "cmp %[tmp], #32 \n\t"
45 "blt "AP"loopout \n\t"
46
47
48 AP "dualloopint: \n\t"
49 "vldr.32 d0, [%[d]] \n\t"
50 "vmull.u8 q1, d0, d14 \n\t"
51 "vqrshrn.u16 d0, q1, #8 \n\t"
52 "vqadd.u8 d0, d0, d12 \n\t"
53
54 "vstm %[d]!, {d0} \n\t"
55
56 "ands %[tmp], %[d], $0x1f \n\t"
57 "bne "AP"dualloopint \n\t"
58
59 AP "quadloops: \n\t"
60 "sub %[tmp], %[e], %[d] \n\t"
61 "cmp %[tmp], #32 \n\t"
62 "blt "AP"loopout \n\t"
63
64 "sub %[tmp],%[e],#31 \n\t"
65
66 AP "quadloopint:\n\t"
67 "vldm %[d], {d0,d1,d2,d3} \n\t"
68
69 "vmull.u8 q2, d0, d14 \n\t"
70 "vmull.u8 q3, d1, d15 \n\t"
71 "vmull.u8 q4, d2, d14 \n\t"
72 "vmull.u8 q5, d3, d15 \n\t"
73
74 "vqrshrn.u16 d0, q2, #8 \n\t"
75 "vqrshrn.u16 d1, q3, #8 \n\t"
76 "vqrshrn.u16 d2, q4, #8 \n\t"
77 "vqrshrn.u16 d3, q5, #8 \n\t"
78
79 "vqadd.u8 q0, q6, q0 \n\t"
80 "vqadd.u8 q1, q6, q1 \n\t"
81
82 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
83
84 "cmp %[tmp], %[d]\n\t"
85 "bhi "AP"quadloopint\n\t"
86
87 AP "loopout: \n\t"
88 "cmp %[d], %[e]\n\t"
89 "beq "AP"done\n\t"
90 "sub %[tmp],%[e], %[d] \n\t"
91 "cmp %[tmp],#8 \n\t"
92 "blt "AP"singleloop2 \n\t"
93
94 AP "dualloop2: \n\t"
95 "sub %[tmp],%[e],$0x7 \n\t"
96 AP "dualloop2int: \n\t"
97 "vldr.64 d0, [%[d]] \n\t"
98 "vmull.u8 q1, d0, d14 \n\t"
99 "vqrshrn.u16 d0, q1, #8 \n\t"
100 "vqadd.u8 d0, d0, d12 \n\t"
101
102 "vstr.64 d0, [%[d]] \n\t"
103
104 "add %[d], #8 \n\t"
105 "cmp %[tmp], %[d] \n\t"
106 "bhi "AP"dualloop2int \n\t"
107
108 // Single ??
109 "cmp %[e], %[d] \n\t"
110 "beq "AP"done \n\t"
111
112 AP "singleloop2: \n\t"
113 "vld1.32 d0[0], [%[d]] \n\t"
114 "vmull.u8 q1, d0, d14 \n\t"
115 "vqrshrn.u16 d0, q1, #8 \n\t"
116 "vqadd.u8 d0, d0, d12 \n\t"
117
118 "vst1.32 d0[0], [%[d]] \n\t"
119
120 AP "done:\n\t"
121
122 : // output regs
123 // Input
124 : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c), [tmp] "r" (tmp)
125 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","memory" // clobbered
126
127 );
128#undef AP
129
130}
131
132#define _op_blend_caa_dp_neon _op_blend_c_dp_neon
133
134#define _op_blend_c_dpan_neon _op_blend_c_dp_neon
135#define _op_blend_caa_dpan_neon _op_blend_c_dpan_neon
136
137static void
138init_blend_color_span_funcs_neon(void)
139{
140 op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_c_dp_neon;
141 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_caa_dp_neon;
142
143 op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_c_dpan_neon;
144 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_caa_dpan_neon;
145}
146#endif
147
148#ifdef BUILD_NEON
149static void
150_op_blend_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
151 s = 256 - (c >> 24);
152 *d = c + MUL_256(s, *d);
153}
154
155#define _op_blend_pt_caa_dp_neon _op_blend_pt_c_dp_neon
156
157#define _op_blend_pt_c_dpan_neon _op_blend_pt_c_dp_neon
158#define _op_blend_pt_caa_dpan_neon _op_blend_pt_c_dpan_neon
159
160static void
161init_blend_color_pt_funcs_neon(void)
162{
163 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_c_dp_neon;
164 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_caa_dp_neon;
165
166 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_c_dpan_neon;
167 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_caa_dpan_neon;
168}
169#endif
170/*-----*/
171
172/* blend_rel color -> dst */
173
174#ifdef BUILD_NEON
175static void
176_op_blend_rel_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
177 DATA32 *e;
178 int alpha = 256 - (c >> 24);
179 UNROLL8_PLD_WHILE(d, l, e,
180 {
181 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
182 d++;
183 });
184}
185
186#define _op_blend_rel_caa_dp_neon _op_blend_rel_c_dp_neon
187
188#define _op_blend_rel_c_dpan_neon _op_blend_c_dpan_neon
189#define _op_blend_rel_caa_dpan_neon _op_blend_caa_dpan_neon
190
191static void
192init_blend_rel_color_span_funcs_neon(void)
193{
194 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_c_dp_neon;
195 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_caa_dp_neon;
196
197 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_c_dpan_neon;
198 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_caa_dpan_neon;
199}
200#endif
201
202#ifdef BUILD_NEON
203static void
204_op_blend_rel_pt_c_dp_neon(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
205 s = *d >> 24;
206 *d = MUL_SYM(s, c) + MUL_256(256 - (c >> 24), *d);
207}
208
209#define _op_blend_rel_pt_caa_dp_neon _op_blend_rel_pt_c_dp_neon
210
211#define _op_blend_rel_pt_c_dpan_neon _op_blend_pt_c_dpan_neon
212#define _op_blend_rel_pt_caa_dpan_neon _op_blend_pt_caa_dpan_neon
213
214static void
215init_blend_rel_color_pt_funcs_neon(void)
216{
217 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_blend_rel_pt_c_dp_neon;
218 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_caa_dp_neon;
219
220 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_c_dpan_neon;
221 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_caa_dpan_neon;
222}
223#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 @@
1/* blend color -> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
7
8 DATA32 a = 256 - (c >> 24);
9
10 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
11 const __m128i a_packed = _mm_set_epi32(a, a, a, a);
12
13 LOOP_ALIGNED_U1_A48_SSE3(d, l,
14 { /* UOP */
15
16 *d = c + MUL_256(a, *d);
17 d++; l--;
18 },
19 { /* A4OP */
20
21 __m128i d0 = _mm_load_si128((__m128i *)d);
22
23 d0 = mul_256_sse3(a_packed, d0);
24 d0 = _mm_add_epi32(d0, c_packed);
25
26 _mm_store_si128((__m128i *)d, d0);
27
28 d += 4; l -= 4;
29 },
30 { /* A8OP */
31
32 __m128i d0 = _mm_load_si128((__m128i *)d);
33 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
34
35 d0 = mul_256_sse3(a_packed, d0);
36 d1 = mul_256_sse3(a_packed, d1);
37
38 d0 = _mm_add_epi32(d0, c_packed);
39 d1 = _mm_add_epi32(d1, c_packed);
40
41 _mm_store_si128((__m128i *)d, d0);
42 _mm_store_si128((__m128i *)(d+4), d1);
43
44 d += 8; l -= 8;
45 })
46}
47
48#define _op_blend_caa_dp_sse3 _op_blend_c_dp_sse3
49
50#define _op_blend_c_dpan_sse3 _op_blend_c_dp_sse3
51#define _op_blend_caa_dpan_sse3 _op_blend_c_dpan_sse3
52
53static void
54init_blend_color_span_funcs_sse3(void)
55{
56// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle)
57// op_blend_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_c_dp_sse3;
58 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_caa_dp_sse3;
59
60// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle)
61// op_blend_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_c_dpan_sse3;
62 op_blend_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_caa_dpan_sse3;
63}
64
65#define _op_blend_pt_c_dp_sse3 NULL
66#define _op_blend_pt_caa_dp_sse3 _op_blend_pt_c_dp_sse3
67
68#define _op_blend_pt_c_dpan_sse3 _op_blend_pt_c_dp_sse3
69#define _op_blend_pt_caa_dpan_sse3 _op_blend_pt_c_dpan_sse3
70
71#define _op_blend_pt_c_dpas_sse3 _op_blend_pt_c_dp_sse3
72#define _op_blend_pt_caa_dpas_sse3 _op_blend_pt_c_dp_sse3
73
74static void
75init_blend_color_pt_funcs_sse3(void)
76{
77 op_blend_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_c_dp_sse3;
78 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_caa_dp_sse3;
79
80 op_blend_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_c_dpan_sse3;
81 op_blend_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_caa_dpan_sse3;
82}
83
84
85/*-----*/
86
87/* blend_rel color -> dst */
88
89static void
90_op_blend_rel_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
91
92 int alpha = 256 - (c >> 24);
93
94 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
95 const __m128i alpha_packed = _mm_set_epi32(alpha, alpha, alpha, alpha);
96
97 LOOP_ALIGNED_U1_A48_SSE3(d, l,
98 { /* UOP */
99
100 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
101 d++; l--;
102 },
103 { /* A4OP */
104
105 __m128i d0 = _mm_load_si128((__m128i *)d);
106
107 __m128i mul0 = mul_256_sse3(alpha_packed, d0);
108 __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed);
109
110 d0 = _mm_add_epi32(mul0, sym0);
111
112 _mm_store_si128((__m128i *)d, d0);
113
114 d += 4; l -= 4;
115 },
116 { /* A8OP */
117
118 __m128i d0 = _mm_load_si128((__m128i *)d);
119 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
120
121 __m128i mul0 = mul_256_sse3(alpha_packed, d0);
122 __m128i mul1 = mul_256_sse3(alpha_packed, d1);
123
124 __m128i sym0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c_packed);
125 __m128i sym1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c_packed);
126
127 d0 = _mm_add_epi32(mul0, sym0);
128 d1 = _mm_add_epi32(mul1, sym1);
129
130 _mm_store_si128((__m128i *)d, d0);
131 _mm_store_si128((__m128i *)(d+4), d1);
132
133 d += 8; l -= 8;
134 })
135}
136
137#define _op_blend_rel_caa_dp_sse3 _op_blend_rel_c_dp_sse3
138#define _op_blend_rel_c_dpan_sse3 _op_blend_c_dpan_sse3
139#define _op_blend_rel_caa_dpan_sse3 _op_blend_caa_dpan_sse3
140
141static void
142init_blend_rel_color_span_funcs_sse3(void)
143{
144 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_c_dp_sse3;
145 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_caa_dp_sse3;
146
147 op_blend_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_c_dpan_sse3;
148 op_blend_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_caa_dpan_sse3;
149}
150
151#define _op_blend_rel_pt_c_dp_sse3 NULL
152#define _op_blend_rel_pt_caa_dp_sse3 _op_blend_rel_pt_c_dp_sse3
153
154#define _op_blend_rel_pt_c_dpan_sse3 _op_blend_pt_c_dpan_sse3
155#define _op_blend_rel_pt_caa_dpan_sse3 _op_blend_pt_caa_dpan_sse3
156
157static void
158init_blend_rel_color_pt_funcs_sse3(void)
159{
160 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_c_dp_sse3;
161 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_caa_dp_sse3;
162
163 op_blend_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_c_dpan_sse3;
164 op_blend_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_caa_dpan_sse3;
165}
166
167#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 @@
1/* blend mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha = 256 - (c >> 24);
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 DATA32 a = *m;
11 switch(a)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = c + MUL_256(alpha, *d);
17 break;
18 default:
19 {
20 DATA32 mc = MUL_SYM(a, c);
21 a = 256 - (mc >> 24);
22 *d = mc + MUL_256(a, *d);
23 }
24 break;
25 }
26 m++; d++;
27 });
28}
29
30static void
31_op_blend_mas_can_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
32 DATA32 *e;
33 int alpha;
34 UNROLL8_PLD_WHILE(d, l, e,
35 {
36 alpha = *m;
37 switch(alpha)
38 {
39 case 0:
40 break;
41 case 255:
42 *d = c;
43 break;
44 default:
45 alpha++;
46 *d = INTERP_256(alpha, c, *d);
47 break;
48 }
49 m++; d++;
50 });
51}
52
53#define _op_blend_mas_cn_dp _op_blend_mas_can_dp
54#define _op_blend_mas_caa_dp _op_blend_mas_c_dp
55
56#define _op_blend_mas_c_dpan _op_blend_mas_c_dp
57#define _op_blend_mas_cn_dpan _op_blend_mas_cn_dp
58#define _op_blend_mas_can_dpan _op_blend_mas_can_dp
59#define _op_blend_mas_caa_dpan _op_blend_mas_caa_dp
60
61static void
62init_blend_mask_color_span_funcs_c(void)
63{
64 op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_mas_c_dp;
65 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_mas_cn_dp;
66 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_mas_can_dp;
67 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_mas_caa_dp;
68
69 op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_mas_c_dpan;
70 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_mas_cn_dpan;
71 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_mas_can_dpan;
72 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_mas_caa_dpan;
73}
74#endif
75
76#ifdef BUILD_C
77static void
78_op_blend_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
79 s = MUL_SYM(m, c);
80 m = 256 - (s >> 24);
81 *d = s + MUL_256(m, *d);
82}
83
84static void
85_op_blend_pt_mas_can_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
86 *d = INTERP_256(m + 1, c, *d);
87}
88
89#define _op_blend_pt_mas_cn_dp _op_blend_pt_mas_can_dp
90#define _op_blend_pt_mas_caa_dp _op_blend_pt_mas_c_dp
91
92#define _op_blend_pt_mas_c_dpan _op_blend_pt_mas_c_dp
93#define _op_blend_pt_mas_cn_dpan _op_blend_pt_mas_cn_dp
94#define _op_blend_pt_mas_can_dpan _op_blend_pt_mas_can_dp
95#define _op_blend_pt_mas_caa_dpan _op_blend_pt_mas_caa_dp
96
97static void
98init_blend_mask_color_pt_funcs_c(void)
99{
100 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_pt_mas_c_dp;
101 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_mas_cn_dp;
102 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_pt_mas_can_dp;
103 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_pt_mas_caa_dp;
104
105 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_pt_mas_c_dpan;
106 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_mas_cn_dpan;
107 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_pt_mas_can_dpan;
108 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_pt_mas_caa_dpan;
109}
110#endif
111
112/*-----*/
113
114/* blend_rel mask x color --> dst */
115
116#ifdef BUILD_C
117static void
118_op_blend_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
119 DATA32 *e;
120 int alpha;
121 UNROLL8_PLD_WHILE(d, l, e,
122 {
123 DATA32 mc = MUL_SYM(*m, c);
124 alpha = 256 - (mc >> 24);
125 *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d);
126 d++;
127 m++;
128 });
129}
130
131#define _op_blend_rel_mas_cn_dp _op_blend_rel_mas_c_dp
132#define _op_blend_rel_mas_can_dp _op_blend_rel_mas_c_dp
133#define _op_blend_rel_mas_caa_dp _op_blend_rel_mas_c_dp
134
135#define _op_blend_rel_mas_c_dpan _op_blend_mas_c_dpan
136#define _op_blend_rel_mas_cn_dpan _op_blend_mas_cn_dpan
137#define _op_blend_rel_mas_can_dpan _op_blend_mas_can_dpan
138#define _op_blend_rel_mas_caa_dpan _op_blend_mas_caa_dpan
139
140static void
141init_blend_rel_mask_color_span_funcs_c(void)
142{
143 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_mas_c_dp;
144 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_mas_can_dp;
145 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_mas_can_dp;
146 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_mas_caa_dp;
147
148 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_mas_c_dpan;
149 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_mas_cn_dpan;
150 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_mas_can_dpan;
151 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_mas_caa_dpan;
152}
153#endif
154
155#ifdef BUILD_C
156static void
157_op_blend_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
158 s = MUL_SYM(m, c);
159 c = 256 - (s >> 24);
160 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
161}
162
163#define _op_blend_rel_pt_mas_cn_dp _op_blend_rel_pt_mas_c_dp
164#define _op_blend_rel_pt_mas_can_dp _op_blend_rel_pt_mas_c_dp
165#define _op_blend_rel_pt_mas_caa_dp _op_blend_rel_pt_mas_c_dp
166
167#define _op_blend_rel_pt_mas_c_dpan _op_blend_pt_mas_c_dpan
168#define _op_blend_rel_pt_mas_cn_dpan _op_blend_pt_mas_cn_dpan
169#define _op_blend_rel_pt_mas_can_dpan _op_blend_pt_mas_can_dpan
170#define _op_blend_rel_pt_mas_caa_dpan _op_blend_pt_mas_caa_dpan
171
172static void
173init_blend_rel_mask_color_pt_funcs_c(void)
174{
175 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_blend_rel_pt_mas_c_dp;
176 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_mas_cn_dp;
177 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_blend_rel_pt_mas_can_dp;
178 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_blend_rel_pt_mas_caa_dp;
179
180 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_blend_rel_pt_mas_c_dpan;
181 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_mas_cn_dpan;
182 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_mas_can_dpan;
183 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_mas_caa_dpan;
184}
185#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 @@
1/* blend mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_256, mm6)
9 MOV_P2R(c, mm2, mm0)
10 c = 256 - (c >> 24);
11 MOV_A2R(c, mm4)
12 while (d < e) {
13 l = *m;
14 switch(l)
15 {
16 case 0:
17 break;
18 case 255:
19 MOV_P2R(*d, mm1, mm0)
20 MUL4_256_R2R(mm4, mm1)
21 paddw_r2r(mm2, mm1);
22 MOV_R2P(mm1, *d, mm0)
23 break;
24 default:
25 l++;
26 MOV_A2R(l, mm3)
27 MUL4_256_R2R(mm2, mm3)
28
29 MOV_RA2R(mm3, mm1)
30 movq_r2r(mm6, mm7);
31 psubw_r2r(mm1, mm7);
32
33 MOV_P2R(*d, mm1, mm0)
34 MUL4_256_R2R(mm7, mm1)
35
36 paddw_r2r(mm3, mm1);
37 MOV_R2P(mm1, *d, mm0)
38 break;
39 }
40 m++; d++;
41 }
42}
43
44static void
45_op_blend_mas_can_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
46 DATA32 *e = d + l;
47 pxor_r2r(mm0, mm0);
48 MOV_P2R(c, mm2, mm0)
49 MOV_A2R(ALPHA_255, mm5)
50 while (d < e) {
51 l = *m;
52 switch(l)
53 {
54 case 0:
55 break;
56 case 255:
57 *d = c;
58 break;
59 default:
60 l++;
61 MOV_A2R(l, mm3)
62 MOV_P2R(*d, mm1, mm0)
63 movq_r2r(mm2, mm4);
64 INTERP_256_R2R(mm3, mm4, mm1, mm5)
65 MOV_R2P(mm1, *d, mm0)
66 break;
67 }
68 m++; d++;
69 }
70}
71
72#define _op_blend_mas_cn_dp_mmx _op_blend_mas_can_dp_mmx
73#define _op_blend_mas_caa_dp_mmx _op_blend_mas_c_dp_mmx
74
75#define _op_blend_mas_c_dpan_mmx _op_blend_mas_c_dp_mmx
76#define _op_blend_mas_cn_dpan_mmx _op_blend_mas_cn_dp_mmx
77#define _op_blend_mas_can_dpan_mmx _op_blend_mas_can_dp_mmx
78#define _op_blend_mas_caa_dpan_mmx _op_blend_mas_caa_dp_mmx
79
80static void
81init_blend_mask_color_span_funcs_mmx(void)
82{
83 op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_mas_c_dp_mmx;
84 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_mas_cn_dp_mmx;
85 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_mas_can_dp_mmx;
86 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_mas_caa_dp_mmx;
87
88 op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_mas_c_dpan_mmx;
89 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_mas_cn_dpan_mmx;
90 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_mas_can_dpan_mmx;
91 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_mas_caa_dpan_mmx;
92}
93#endif
94
95#ifdef BUILD_MMX
96static void
97_op_blend_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
98 s = m + 1;
99 MOV_A2R(s, mm3)
100 MOV_A2R(ALPHA_256, mm6)
101 pxor_r2r(mm0, mm0);
102 MOV_P2R(c, mm2, mm0)
103 MUL4_256_R2R(mm2, mm3)
104
105 MOV_RA2R(mm3, mm1)
106 psubw_r2r(mm1, mm6);
107
108 MOV_P2R(*d, mm1, mm0)
109 MUL4_256_R2R(mm6, mm1)
110
111 paddw_r2r(mm3, mm1);
112 MOV_R2P(mm1, *d, mm0)
113}
114
115
116#define _op_blend_pt_mas_cn_dp_mmx _op_blend_pt_mas_c_dp_mmx
117#define _op_blend_pt_mas_can_dp_mmx _op_blend_pt_mas_c_dp_mmx
118#define _op_blend_pt_mas_caa_dp_mmx _op_blend_pt_mas_c_dp_mmx
119
120#define _op_blend_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dp_mmx
121#define _op_blend_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dp_mmx
122#define _op_blend_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dp_mmx
123#define _op_blend_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dp_mmx
124
125static void
126init_blend_mask_color_pt_funcs_mmx(void)
127{
128 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_pt_mas_c_dp_mmx;
129 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_mas_cn_dp_mmx;
130 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_pt_mas_can_dp_mmx;
131 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_pt_mas_caa_dp_mmx;
132
133 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_pt_mas_c_dpan_mmx;
134 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_mas_cn_dpan_mmx;
135 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_mas_can_dpan_mmx;
136 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_mas_caa_dpan_mmx;
137}
138#endif
139
140/*-----*/
141
142/* blend_rel mask x color -> dst */
143
144#ifdef BUILD_MMX
145static void
146_op_blend_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
147 DATA32 *e = d + l;
148 pxor_r2r(mm0, mm0);
149 MOV_A2R(ALPHA_256, mm6)
150 MOV_A2R(ALPHA_255, mm5)
151 MOV_P2R(c, mm2, mm0)
152 while (d < e) {
153 l = *m;
154 switch(l)
155 {
156 case 0:
157 break;
158 default:
159 l++;
160 MOV_A2R(l, mm3)
161 MUL4_256_R2R(mm2, mm3)
162
163 MOV_RA2R(mm3, mm1)
164 movq_r2r(mm6, mm7);
165 psubw_r2r(mm1, mm7);
166
167 MOV_P2R(*d, mm1, mm0)
168 MOV_RA2R(mm1, mm4)
169 MUL4_256_R2R(mm7, mm1)
170
171 MUL4_SYM_R2R(mm4, mm3, mm5)
172
173 paddw_r2r(mm3, mm1);
174 MOV_R2P(mm1, *d, mm0)
175 break;
176 }
177 m++; d++;
178 }
179}
180
181#define _op_blend_rel_mas_cn_dp_mmx _op_blend_rel_mas_c_dp_mmx
182#define _op_blend_rel_mas_can_dp_mmx _op_blend_rel_mas_c_dp_mmx
183#define _op_blend_rel_mas_caa_dp_mmx _op_blend_rel_mas_c_dp_mmx
184
185#define _op_blend_rel_mas_c_dpan_mmx _op_blend_mas_c_dpan_mmx
186#define _op_blend_rel_mas_cn_dpan_mmx _op_blend_mas_cn_dpan_mmx
187#define _op_blend_rel_mas_can_dpan_mmx _op_blend_mas_can_dpan_mmx
188#define _op_blend_rel_mas_caa_dpan_mmx _op_blend_mas_caa_dpan_mmx
189
190static void
191init_blend_rel_mask_color_span_funcs_mmx(void)
192{
193 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_mas_c_dp_mmx;
194 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_mas_cn_dp_mmx;
195 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_mas_can_dp_mmx;
196 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_mas_caa_dp_mmx;
197
198 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_mas_c_dpan_mmx;
199 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_mas_cn_dpan_mmx;
200 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_mas_can_dpan_mmx;
201 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_mas_caa_dpan_mmx;
202}
203#endif
204
205#ifdef BUILD_MMX
206static void
207_op_blend_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
208 pxor_r2r(mm0, mm0);
209 MOV_A2R(ALPHA_256, mm6)
210 MOV_A2R(ALPHA_255, mm5)
211 s = m + 1;
212 MOV_A2R(s, mm3)
213 MOV_P2R(c, mm2, mm0)
214 MUL4_256_R2R(mm2, mm3)
215
216 MOV_RA2R(mm3, mm1)
217 psubw_r2r(mm1, mm6);
218
219 MOV_P2R(*d, mm1, mm0)
220 MOV_RA2R(mm1, mm4)
221 MUL4_256_R2R(mm6, mm1)
222
223 MUL4_SYM_R2R(mm4, mm3, mm5)
224
225 paddw_r2r(mm3, mm1);
226 MOV_R2P(mm1, *d, mm0)
227}
228
229#define _op_blend_rel_pt_mas_cn_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx
230#define _op_blend_rel_pt_mas_can_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx
231#define _op_blend_rel_pt_mas_caa_dp_mmx _op_blend_rel_pt_mas_c_dp_mmx
232
233#define _op_blend_rel_pt_mas_c_dpan_mmx _op_blend_pt_mas_c_dpan_mmx
234#define _op_blend_rel_pt_mas_cn_dpan_mmx _op_blend_pt_mas_cn_dpan_mmx
235#define _op_blend_rel_pt_mas_can_dpan_mmx _op_blend_pt_mas_can_dpan_mmx
236#define _op_blend_rel_pt_mas_caa_dpan_mmx _op_blend_pt_mas_caa_dpan_mmx
237
238static void
239init_blend_rel_mask_color_pt_funcs_mmx(void)
240{
241 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_blend_rel_pt_mas_c_dp_mmx;
242 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_mas_cn_dp_mmx;
243 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_blend_rel_pt_mas_can_dp_mmx;
244 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_blend_rel_pt_mas_caa_dp_mmx;
245
246 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_c_dpan_mmx;
247 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_cn_dpan_mmx;
248 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_can_dpan_mmx;
249 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_mas_caa_dpan_mmx;
250}
251#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 @@
1#define NEONDEBUG 0
2
3
4#if NEONDEBUG
5#define DEBUG_FNCOUNT(x) \
6 do { \
7 static int _foo = 0; \
8 if (_foo++%10000 ==0) \
9 printf("%s %+d %s: %d (%s)\n",__FILE__,__LINE__,__FUNCTION__,\
10 _foo, x " optimised");\
11 } while (0)
12#else
13#define DEBUG_FNCOUNT(x) ((void)x)
14#endif
15
16
17/* blend mask x color -> dst */
18
19#ifdef BUILD_NEON
20static void
21_op_blend_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
22 DATA32 *e;
23
24 DEBUG_FNCOUNT("");
25
26#define AP "blend_mas_c_dp_"
27 asm volatile (
28 ".fpu neon \n\t"
29 " vdup.i32 q15, %[c] \n\t"
30 " vmov.i8 q14, #1 \n\t"
31
32 // If aligned already - straight to quads
33 " andS %[tmp], %[d],$0xf \n\t"
34 " beq "AP"quadloops \n\t"
35
36 " andS %[tmp], %[d],$0x4 \n\t"
37 " beq "AP"dualloop \n\t"
38
39 AP"singleloop: \n\t"
40 " vld1.8 d0[0], [%[m]]! \n\t"
41 " vld1.32 d4[0], [%[d]] \n\t"
42 " vdup.u8 d0, d0[0] \n\t"
43 " vmull.u8 q4, d0, d30 \n\t"
44 " vqrshrn.u16 d12, q4, #8 \n\t"
45 " vmvn.u16 d14, d12 \n\t"
46 " vshr.u32 d16, d14, #24 \n\t"
47 " vmul.u32 d16, d16, d28 \n\t"
48 " vmull.u8 q7, d16, d4 \n\t"
49 " vqrshrn.u16 d0, q7, #8 \n\t"
50 " vqadd.u8 d0, d0, d12 \n\t"
51 " vst1.32 d0[0], [%[d]]! \n\t"
52
53 // Can we go the fast path?
54 " andS %[tmp], %[d],$0xf \n\t"
55 " beq "AP"quadloops \n\t"
56
57 AP"dualloop: \n\t"
58 " sub %[tmp], %[e], %[d] \n\t"
59 " cmp %[tmp], #16 \n\t"
60 " blt "AP"loopout \n\t"
61
62 " vld1.16 d0[0], [%[m]]! \n\t"
63 " vldm %[d], {d4} \n\t"
64 " vmovl.u8 q0, d0 \n\t"
65 " vmovl.u8 q0, d0 \n\t"
66 " vmul.u32 q0, q14 \n\t"
67 " vmull.u8 q4, d0, d30 \n\t"
68 " vqrshrn.u16 d12, q4, #8 \n\t"
69 " vmvn.u16 d14, d12 \n\t"
70 " vshr.u32 d16, d14, #24 \n\t"
71 " vmul.u32 d16, d16, d28 \n\t"
72 " vmull.u8 q7, d16, d4 \n\t"
73 " vqrshrn.u16 d0, q7, #8 \n\t"
74 " vqadd.u8 q0, q0, q6 \n\t"
75 " vstm %[d]!, {d0} \n\t"
76
77 AP"quadloops: \n\t"
78 " sub %[tmp], %[e], %[d] \n\t"
79 " cmp %[tmp], #16 \n\t"
80 " blt "AP"loopout \n\t"
81
82
83 " sub %[tmp], %[e], #15 \n\t"
84
85 " sub %[d], #16 \n\t"
86 AP"fastloop:"
87 " add %[d], #16 \n\t"
88 " cmp %[tmp], %[d] \n\t"
89 " ble "AP"loopout \n\t"
90 AP"quadloopint: \n\t"
91 " ldr %[x], [%[m]] \n\t"
92 " add %[m], #4 \n\t"
93 " cmp %[x], #0 \n\t"
94 " beq "AP"fastloop \n\t"
95 " vmov.32 d0[0], %[x] \n\t"
96 " vldm %[d], {d4,d5} \n\t"
97
98 // Expand M: Fixme: Can we do this quicker?
99 " vmovl.u8 q0, d0 \n\t"
100 " vmovl.u8 q0, d0 \n\t"
101 " vmul.u32 q0, q14 \n\t"
102
103 // Multiply a * c
104 " vmull.u8 q4, d0, d30 \n\t"
105 " vmull.u8 q5, d1, d31 \n\t"
106
107 // Shorten
108 " vqrshrn.u16 d12, q4, #8 \n\t"
109 " vqrshrn.u16 d13, q5, #8 \n\t"
110
111 // extract negated alpha
112 " vmvn.u16 q7, q6 \n\t"
113 " vshr.u32 q8, q7, #24 \n\t"
114 " vmul.u32 q8, q8, q14 \n\t"
115
116 // Multiply
117 " vmull.u8 q7, d16, d4 \n\t"
118 " vmull.u8 q8, d17, d5 \n\t"
119
120 " vqrshrn.u16 d0, q7, #8 \n\t"
121 " vqrshrn.u16 d1, q8, #8 \n\t"
122
123 // Add
124 " vqadd.u8 q0, q0, q6 \n\t"
125
126 " vstm %[d]!, {d0,d1} \n\t"
127
128 " cmp %[tmp], %[d] \n\t"
129 " bhi "AP"quadloopint \n\t"
130
131 AP"loopout: \n\t"
132#if NEONDEBUG
133 "cmp %[d], %[e] \n\t"
134 "ble "AP"foo \n\t"
135 "cmp %[tmp], %[m] \n\t"
136 "sub %[x], %[x] \n\t"
137 "vst1.32 d0[0], [%[x]] \n\t"
138 AP"foo: \n\t"
139#endif
140
141 " cmp %[d], %[e] \n\t"
142 " beq "AP"done \n\t"
143 " sub %[tmp],%[e], %[d] \n\t"
144 " cmp %[tmp],#4 \n\t"
145 " beq "AP"singleout \n\t"
146
147 AP "dualloop2: \n\t"
148 "sub %[tmp],%[e],$0x8 \n\t"
149 " vld1.16 d0[0], [%[m]]! \n\t"
150 " vldm %[d], {d4} \n\t"
151 " vmovl.u8 q0, d0 \n\t"
152 " vmovl.u8 q0, d0 \n\t"
153 " vmul.u32 q0, q14 \n\t"
154 " vmull.u8 q4, d0, d30 \n\t"
155 " vqrshrn.u16 d12, q4, #8 \n\t"
156 " vmvn.u16 d14, d12 \n\t"
157 " vshr.u32 d16, d14, #24 \n\t"
158 " vmul.u32 d16, d16, d28 \n\t"
159 " vmull.u8 q7, d16, d4 \n\t"
160 " vqrshrn.u16 d0, q7, #8 \n\t"
161 " vqadd.u8 q0, q0, q6 \n\t"
162 " vstm %[d]!, {d0} \n\t"
163
164 " cmp %[e], %[d] \n\t"
165 " beq "AP"done \n\t"
166
167 AP"singleout: \n\t"
168 " vld1.8 d0[0], [%[m]]! \n\t"
169 " vld1.32 d4[0], [%[d]] \n\t"
170 " vdup.u8 d0, d0[0] \n\t"
171 " vmull.u8 q4, d0, d30 \n\t"
172 " vqrshrn.u16 d12, q4, #8 \n\t"
173 " vmvn.u16 d14, d12 \n\t"
174 " vshr.u32 d16, d14, #24 \n\t"
175 " vmul.u32 d16, d16, d28 \n\t"
176 " vmull.u8 q7, d16, d4 \n\t"
177 " vqrshrn.u16 d0, q7, #8 \n\t"
178 " vqadd.u8 q0, q0, q6 \n\t"
179 " vst1.32 d0[0], [%[d]]! \n\t"
180
181 AP"done: \n\t"
182#if NEONDEBUG
183 "cmp %[d], %[e] \n\t"
184 "beq "AP"reallydone \n\t"
185 "sub %[tmp], %[tmp] \n\t"
186 "vst1.32 d0[0], [%[tmp]] \n\t"
187 AP"reallydone:"
188#endif
189 : // Out
190 : [e] "r" (d + l), [d] "r" (d), [c] "r" (c),
191 [tmp] "r" (7), [m] "r" (m), [x] "r" (0)
192 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","q14","q15",
193 "memory" // clobbered
194 );
195#undef AP
196}
197#endif
198
199#ifdef BUILD_NEON
200static void
201_op_blend_mas_can_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
202 DATA32 *e,*tmp;
203 int alpha;
204
205 DEBUG_FNCOUNT("");
206
207#define AP "_blend_mas_can_dp_neon_"
208 asm volatile (
209 ".fpu neon \n\t"
210 "vdup.u32 q9, %[c] \n\t"
211 "vmov.i8 q15, #1 \n\t"
212 "vmov.i8 q14, #0 \n\t"
213
214 // Make C 16 bit (C in q3/q2)
215 "vmovl.u8 q3, d19 \n\t"
216 "vmovl.u8 q2, d18 \n\t"
217
218 // Which loop to start
219 " andS %[tmp], %[d],$0xf \n\t"
220 " beq "AP"quadloop \n\t"
221
222 " andS %[tmp], %[d], #4 \n\t"
223 " beq "AP"dualstart \n\t"
224
225
226 AP"singleloop: \n\t"
227 " vld1.8 d0[0], [%[m]]! \n\t"
228 " vld1.32 d8[0], [%[d]] \n\t"
229 " vdup.u8 d0, d0[0] \n\t"
230 " vshr.u8 d0, d0, #1 \n\t"
231 " vmovl.u8 q0, d0 \n\t"
232 " vmovl.u8 q4, d8 \n\t"
233 " vsub.s16 q6, q2, q4 \n\t"
234 " vmul.s16 q6, q0 \n\t"
235 " vshr.s16 q6, #7 \n\t"
236 " vadd.s16 q6, q4 \n\t"
237 " vqmovun.s16 d2, q6 \n\t"
238 " vst1.32 d2[0], [%[d]]! \n\t"
239
240 " andS %[tmp], %[d], $0xf \n\t"
241 " beq "AP"quadloop \n\t"
242
243 AP"dualstart: \n\t"
244 " sub %[tmp], %[e], %[d] \n\t"
245 " cmp %[tmp], #16 \n\t"
246 " blt "AP"loopout \n\t"
247
248 AP"dualloop: \n\t"
249 " vld1.16 d0[0], [%[m]]! \n\t"
250 " vldm %[d], {d8} \n\t"
251 " vmovl.u8 q0, d0 \n\t"
252 " vmovl.u8 q0, d0 \n\t"
253 " vmul.u32 d0, d0, d30 \n\t"
254 " vshr.u8 d0, d0, #1 \n\t"
255 " vmovl.u8 q0, d0 \n\t"
256 " vmovl.u8 q4, d8 \n\t"
257 " vsub.s16 q6, q2, q4 \n\t"
258 " vmul.s16 q6, q0 \n\t"
259 " vshr.s16 q6, #7 \n\t"
260 " vadd.s16 q6, q4 \n\t"
261 " vqmovun.s16 d2, q6 \n\t"
262 " vstm %[d]!, {d2} \n\t"
263
264 AP"quadloop: \n\t"
265 " sub %[tmp], %[e], %[d] \n\t"
266 " cmp %[tmp], #16 \n\t"
267 " blt "AP"loopout \n\t"
268 " sub %[tmp], %[e], #15 \n\t"
269
270 " sub %[d], #16 \n\t"
271 AP"fastloop: \n\t"
272 " add %[d], #16 \n\t"
273 " cmp %[tmp], %[d] \n\t"
274 " blt "AP"loopout \n\t"
275
276 AP"quadloopint: \n\t"
277 // Load the mask: 4 bytes: It has d0/d1
278 " ldr %[x], [%[m]] \n\t"
279 " add %[m], #4 \n\t"
280
281 // Check for shortcuts
282 " cmp %[x], #0 \n\t"
283 " beq "AP"fastloop \n\t"
284
285 " cmp %[x], $0xffffffff \n\t"
286 " beq "AP"quadstore \n\t"
287
288 " vmov.32 d0[0], %[x] \n\t"
289 // Load d into d8/d9 q4
290 " vldm %[d], {d8,d9} \n\t"
291
292 // Get the alpha channel ready (m)
293 " vmovl.u8 q0, d0 \n\t"
294 " vmovl.u8 q0, d0 \n\t"
295 " vmul.u32 q0, q0,q15 \n\t"
296 // Lop a bit off to prevent overflow
297 " vshr.u8 q0, q0, #1 \n\t"
298
299 // Now make it 16 bit
300 " vmovl.u8 q1, d1 \n\t"
301 " vmovl.u8 q0, d0 \n\t"
302
303 // 16 bit 'd'
304 " vmovl.u8 q5, d9 \n\t"
305 " vmovl.u8 q4, d8 \n\t"
306
307 // Diff 'd' & 'c'
308 " vsub.s16 q7, q3, q5 \n\t"
309 " vsub.s16 q6, q2, q4 \n\t"
310
311 " vmul.s16 q7, q1 \n\t"
312 " vmul.s16 q6, q0 \n\t"
313
314 // Shift results a bit
315 " vshr.s16 q7, #7 \n\t"
316 " vshr.s16 q6, #7 \n\t"
317
318 // Add 'd'
319 " vadd.s16 q7, q5 \n\t"
320 " vadd.s16 q6, q4 \n\t"
321
322 // Make sure none are negative
323 " vqmovun.s16 d9, q7 \n\t"
324 " vqmovun.s16 d8, q6 \n\t"
325
326 " vstm %[d]!, {d8,d9} \n\t"
327
328 " cmp %[tmp], %[d] \n\t"
329 " bhi "AP"quadloopint \n\t"
330 " b "AP"loopout \n\t"
331
332 AP"quadstore: \n\t"
333 " vstm %[d]!, {d18,d19} \n\t"
334 " cmp %[tmp], %[d] \n\t"
335 " bhi "AP"quadloopint \n\t"
336
337 AP"loopout: \n\t"
338#if NEONDEBUG
339 "cmp %[d], %[e] \n\t"
340 "ble "AP"foo \n\t"
341 "sub %[tmp], %[tmp] \n\t"
342 "vst1.32 d0[0], [%[tmp]] \n\t"
343 AP"foo: \n\t"
344#endif
345
346 " cmp %[e], %[d] \n\t"
347 " beq "AP"done \n\t"
348
349 " sub %[tmp],%[e], %[d] \n\t"
350 " cmp %[tmp],#8 \n\t"
351
352 " blt "AP"onebyte \n\t"
353
354 // Load the mask: 2 bytes: It has d0
355 " vld1.16 d0[0], [%[m]]! \n\t"
356
357 // Load d into d8/d9 q4
358 " vldm %[d], {d8} \n\t"
359
360 // Get the alpha channel ready (m)
361 " vmovl.u8 q0, d0 \n\t"
362 " vmovl.u8 q0, d0 \n\t"
363 " vmul.u32 d0, d0, d30 \n\t"
364 // Lop a bit off to prevent overflow
365 " vshr.u8 d0, d0, #1 \n\t"
366
367 // Now make it 16 bit
368 " vmovl.u8 q0, d0 \n\t"
369
370 // 16 bit 'd'
371 " vmovl.u8 q4, d8 \n\t"
372
373 // Diff 'd' & 'c'
374 " vsub.s16 q6, q2, q4 \n\t"
375
376 " vmul.s16 q6, q0 \n\t"
377
378 // Shift results a bit
379 " vshr.s16 q6, #7 \n\t"
380
381 // Add 'd'
382 "vadd.s16 q6, q4 \n\t"
383
384 // Make sure none are negative
385 "vqmovun.s16 d2, q6 \n\t"
386
387 "vstm %[d]!, {d2} \n\t"
388
389 "cmp %[e], %[d] \n\t"
390 "beq "AP"done \n\t"
391
392 AP"onebyte: \n\t"
393 "vld1.8 d0[0], [%[m]]! \n\t"
394 "vld1.32 d8[0], [%[d]] \n\t"
395 "vdup.u8 d0, d0[0] \n\t"
396 "vshr.u8 d0, d0, #1 \n\t"
397 "vmovl.u8 q0, d0 \n\t"
398 "vmovl.u8 q4, d8 \n\t"
399 "vsub.s16 q6, q2, q4 \n\t"
400 "vmul.s16 q6, q0 \n\t"
401 "vshr.s16 q6, #7 \n\t"
402 "vadd.s16 q6, q4 \n\t"
403 "vqmovun.s16 d2, q6 \n\t"
404 "vst1.32 d2[0], [%[d]]! \n\t"
405
406
407 AP"done: \n\t"
408#if NEONDEBUG
409 "cmp %[d], %[e] \n\t"
410 "beq "AP"reallydone \n\t"
411 "sub %[m], %[m] \n\t"
412 "vst1.32 d0[0], [%[m]] \n\t"
413 AP"reallydone:"
414#endif
415
416
417 : // output regs
418 // Input
419 : [e] "r" (e = d + l), [d] "r" (d), [c] "r" (c),
420 [m] "r" (m), [tmp] "r" (7), [x] "r" (33)
421 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q9","q14","q15",
422 "memory" // clobbered
423
424 );
425#undef AP
426}
427#endif
428
429#ifdef BUILD_NEON
430#define _op_blend_mas_cn_dp_neon _op_blend_mas_can_dp_neon
431#define _op_blend_mas_caa_dp_neon _op_blend_mas_c_dp_neon
432
433#define _op_blend_mas_c_dpan_neon _op_blend_mas_c_dp_neon
434#define _op_blend_mas_cn_dpan_neon _op_blend_mas_cn_dp_neon
435#define _op_blend_mas_can_dpan_neon _op_blend_mas_can_dp_neon
436#define _op_blend_mas_caa_dpan_neon _op_blend_mas_caa_dp_neon
437
438static void
439init_blend_mask_color_span_funcs_neon(void)
440{
441 op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_mas_c_dp_neon;
442 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_mas_cn_dp_neon;
443 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_mas_can_dp_neon;
444 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_mas_caa_dp_neon;
445
446 op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_mas_c_dpan_neon;
447 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_mas_cn_dpan_neon;
448 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_mas_can_dpan_neon;
449 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_mas_caa_dpan_neon;
450}
451#endif
452
453#ifdef BUILD_NEON
454static void
455_op_blend_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
456 s = MUL_SYM(m, c);
457 c = 256 - (s >> 24);
458 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
459}
460
461
462#define _op_blend_pt_mas_cn_dp_neon _op_blend_pt_mas_c_dp_neon
463#define _op_blend_pt_mas_can_dp_neon _op_blend_pt_mas_c_dp_neon
464#define _op_blend_pt_mas_caa_dp_neon _op_blend_pt_mas_c_dp_neon
465
466#define _op_blend_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dp_neon
467#define _op_blend_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dp_neon
468#define _op_blend_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dp_neon
469#define _op_blend_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dp_neon
470
471static void
472init_blend_mask_color_pt_funcs_neon(void)
473{
474 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_pt_mas_c_dp_neon;
475 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_mas_cn_dp_neon;
476 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_pt_mas_can_dp_neon;
477 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_pt_mas_caa_dp_neon;
478
479 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_pt_mas_c_dpan_neon;
480 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_mas_cn_dpan_neon;
481 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_mas_can_dpan_neon;
482 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_mas_caa_dpan_neon;
483}
484#endif
485
486/*-----*/
487
488/* blend_rel mask x color -> dst */
489
490#ifdef BUILD_NEON
491static void
492_op_blend_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
493 DATA32 *e;
494 int alpha;
495
496 DEBUG_FNCOUNT("not");
497
498 UNROLL8_PLD_WHILE(d, l, e,
499 {
500 DATA32 mc = MUL_SYM(*m, c);
501 alpha = 256 - (mc >> 24);
502 *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d);
503 d++;
504 m++;
505 });
506}
507
508#define _op_blend_rel_mas_cn_dp_neon _op_blend_rel_mas_c_dp_neon
509#define _op_blend_rel_mas_can_dp_neon _op_blend_rel_mas_c_dp_neon
510#define _op_blend_rel_mas_caa_dp_neon _op_blend_rel_mas_c_dp_neon
511
512#define _op_blend_rel_mas_c_dpan_neon _op_blend_mas_c_dpan_neon
513#define _op_blend_rel_mas_cn_dpan_neon _op_blend_mas_cn_dpan_neon
514#define _op_blend_rel_mas_can_dpan_neon _op_blend_mas_can_dpan_neon
515#define _op_blend_rel_mas_caa_dpan_neon _op_blend_mas_caa_dpan_neon
516
517static void
518init_blend_rel_mask_color_span_funcs_neon(void)
519{
520 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_mas_c_dp_neon;
521 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_mas_cn_dp_neon;
522 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_mas_can_dp_neon;
523 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_mas_caa_dp_neon;
524
525 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_mas_c_dpan_neon;
526 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_mas_cn_dpan_neon;
527 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_mas_can_dpan_neon;
528 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_mas_caa_dpan_neon;
529}
530#endif
531
532#ifdef BUILD_NEON
533static void
534_op_blend_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
535 s = MUL_SYM(m, c);
536 c = 256 - (s >> 24);
537 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
538}
539
540#define _op_blend_rel_pt_mas_cn_dp_neon _op_blend_rel_pt_mas_c_dp_neon
541#define _op_blend_rel_pt_mas_can_dp_neon _op_blend_rel_pt_mas_c_dp_neon
542#define _op_blend_rel_pt_mas_caa_dp_neon _op_blend_rel_pt_mas_c_dp_neon
543
544#define _op_blend_rel_pt_mas_c_dpan_neon _op_blend_pt_mas_c_dpan_neon
545#define _op_blend_rel_pt_mas_cn_dpan_neon _op_blend_pt_mas_cn_dpan_neon
546#define _op_blend_rel_pt_mas_can_dpan_neon _op_blend_pt_mas_can_dpan_neon
547#define _op_blend_rel_pt_mas_caa_dpan_neon _op_blend_pt_mas_caa_dpan_neon
548
549static void
550init_blend_rel_mask_color_pt_funcs_neon(void)
551{
552 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_blend_rel_pt_mas_c_dp_neon;
553 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_mas_cn_dp_neon;
554 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_blend_rel_pt_mas_can_dp_neon;
555 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_blend_rel_pt_mas_caa_dp_neon;
556
557 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_c_dpan_neon;
558 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_cn_dpan_neon;
559 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_can_dpan_neon;
560 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_mas_caa_dpan_neon;
561}
562#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 @@
1/* blend mask x color -> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
7
8 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
9
10 LOOP_ALIGNED_U1_A48_SSE3(d, l,
11 { /* UOP */
12
13 DATA32 a = *m;
14 DATA32 mc = MUL_SYM(a, c);
15 a = 256 - (mc >> 24);
16 *d = mc + MUL_256(a, *d);
17 m++; d++; l--;
18 },
19 { /* A4OP */
20
21 if ((m[3] | m[2] | m[1] | m[0]) == 0) {
22 m += 4; d += 4; l -= 4;
23 continue;
24 }
25
26 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
27 __m128i d0 = _mm_load_si128((__m128i *)d);
28
29 __m128i mc0 = mul_sym_sse3(m0, c_packed);
30 __m128i a0 = sub4_alpha_sse3(mc0);
31 __m128i mul0 = mul_256_sse3(a0, d0);
32
33 mul0 = _mm_add_epi32(mul0, mc0);
34
35 _mm_store_si128((__m128i *)d, mul0);
36
37 m += 4; d += 4; l -= 4;
38 },
39 { /* A8OP */
40
41 if((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) {
42 m += 8; d += 8; l -= 8;
43 continue;
44 }
45
46 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
47 __m128i d0 = _mm_load_si128((__m128i *)d);
48
49 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
50 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
51
52 __m128i mc0 = mul_sym_sse3(m0, c_packed);
53 __m128i a0 = sub4_alpha_sse3(mc0);
54 __m128i mul0 = mul_256_sse3(a0, d0);
55
56 mul0 = _mm_add_epi32(mc0, mul0);
57
58 __m128i mc1 = mul_sym_sse3(m1, c_packed);
59 __m128i a1 = sub4_alpha_sse3(mc1);
60 __m128i mul1 = mul_256_sse3(a1, d1);
61
62 mul1 = _mm_add_epi32(mc1, mul1);
63
64 _mm_store_si128((__m128i *)d, mul0);
65 _mm_store_si128((__m128i *)(d+4), mul1);
66
67 m += 8; d += 8; l -= 8;
68 })
69}
70
71static void
72_op_blend_mas_can_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
73
74 DATA32 alpha;
75
76 const __m128i one = _mm_set_epi32(1, 1, 1, 1);
77 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
78
79 LOOP_ALIGNED_U1_A48_SSE3(d, l,
80 { /* UOP */
81
82 alpha = *m;
83 switch(alpha)
84 {
85 case 0:
86 break;
87 case 255:
88 *d = c;
89 break;
90 default:
91 alpha++;
92 *d = INTERP_256(alpha, c, *d);
93 break;
94 }
95 m++; d++; l--;
96 },
97 { /* A4OP */
98
99 if ((m[3] | m[2] | m[1] | m[0]) == 0) {
100 m += 4; d += 4; l -= 4;
101 continue;
102 }
103
104 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
105 __m128i d0 = _mm_load_si128((__m128i *)d);
106
107 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
108
109 m0 = _mm_add_epi32(one, m0);
110
111 __m128i r0 = interp4_256_sse3(m0, c_packed, d0);
112
113 r0 = _mm_and_si128(~zm0, r0);
114 d0 = _mm_and_si128(zm0, d0);
115
116 d0 = _mm_add_epi32(r0, d0);
117
118 _mm_store_si128((__m128i *)d, d0);
119
120 m += 4; d += 4; l -= 4;
121 },
122 { /* A8OP */
123
124 if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) {
125 m += 8; d += 8; l -= 8;
126 continue;
127 }
128
129 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
130 __m128i d0 = _mm_load_si128((__m128i *)d);
131
132 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
133 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
134
135 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
136 __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128());
137
138 m0 = _mm_add_epi32(one, m0);
139 m1 = _mm_add_epi32(one, m1);
140
141 __m128i r0 = interp4_256_sse3(m0, c_packed, d0);
142 __m128i r1 = interp4_256_sse3(m1, c_packed, d1);
143
144 r0 = _mm_and_si128(~zm0, r0);
145 d0 = _mm_and_si128(zm0, d0);
146
147 r1 = _mm_and_si128(~zm1, r1);
148 d1 = _mm_and_si128(zm1, d1);
149
150 d0 = _mm_add_epi32(d0, r0);
151 d1 = _mm_add_epi32(d1, r1);
152
153 _mm_store_si128((__m128i *)d, d0);
154 _mm_store_si128((__m128i *)(d+4), d1);
155
156 m += 8; d += 8; l -= 8;
157 })
158}
159
160#define _op_blend_mas_cn_dp_sse3 _op_blend_mas_can_dp_sse3
161#define _op_blend_mas_caa_dp_sse3 _op_blend_mas_c_dp_sse3
162
163#define _op_blend_mas_c_dpan_sse3 _op_blend_mas_c_dp_sse3
164#define _op_blend_mas_cn_dpan_sse3 _op_blend_mas_cn_dp_sse3
165#define _op_blend_mas_can_dpan_sse3 _op_blend_mas_can_dp_sse3
166#define _op_blend_mas_caa_dpan_sse3 _op_blend_mas_caa_dp_sse3
167
168static void
169init_blend_mask_color_span_funcs_sse3(void)
170{
171// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle)
172// op_blend_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_mas_c_dp_sse3;
173 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_mas_cn_dp_sse3;
174 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_mas_can_dp_sse3;
175 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_mas_caa_dp_sse3;
176
177// FIXME: BUGGY BUGGY Core i5 2500 (64bit), gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text)
178// op_blend_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_mas_c_dpan_sse3;
179 op_blend_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_mas_cn_dpan_sse3;
180 op_blend_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_mas_can_dpan_sse3;
181 op_blend_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_mas_caa_dpan_sse3;
182}
183
184#define _op_blend_pt_mas_c_dp_sse3 NULL
185#define _op_blend_pt_mas_can_dp_sse3 NULL
186
187#define _op_blend_pt_mas_cn_dp_sse3 _op_blend_pt_mas_can_dp_sse3
188#define _op_blend_pt_mas_caa_dp_sse3 _op_blend_pt_mas_c_dp_sse3
189
190#define _op_blend_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dp_sse3
191#define _op_blend_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dp_sse3
192#define _op_blend_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dp_sse3
193#define _op_blend_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dp_sse3
194
195static void
196init_blend_mask_color_pt_funcs_sse3(void)
197{
198 op_blend_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_pt_mas_c_dp_sse3;
199 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_mas_cn_dp_sse3;
200 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_pt_mas_can_dp_sse3;
201 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_pt_mas_caa_dp_sse3;
202
203 op_blend_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_pt_mas_c_dpan_sse3;
204 op_blend_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_mas_cn_dpan_sse3;
205 op_blend_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_mas_can_dpan_sse3;
206 op_blend_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_mas_caa_dpan_sse3;
207}
208
209/*-----*/
210
211/* blend_rel mask x color --> dst */
212
213static void
214_op_blend_rel_mas_c_dp_sse3(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
215
216 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
217
218 LOOP_ALIGNED_U1_A48_SSE3(d, l,
219 { /* UOP */
220
221 DATA32 mc = MUL_SYM(*m, c);
222 int alpha = 256 - (mc >> 24);
223 *d = MUL_SYM(*d >> 24, mc) + MUL_256(alpha, *d);
224 d++; m++; l--;
225 },
226 { /* A4OP */
227
228 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
229 __m128i d0 = _mm_load_si128((__m128i *) d);
230
231 __m128i mc0 = mul_sym_sse3(m0, c_packed);
232 __m128i a0 = sub4_alpha_sse3(mc0);
233
234 __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0);
235 d0 = mul_256_sse3(a0, d0);
236
237 d0 = _mm_add_epi32(d0, d0_sym);
238
239 _mm_store_si128((__m128i *)d, d0);
240
241 d += 4; m += 4; l -= 4;
242 },
243 { /* A8OP */
244
245 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
246 __m128i d0 = _mm_load_si128((__m128i *)d);
247
248 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
249 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
250
251 __m128i mc0 = mul_sym_sse3(m0, c_packed);
252 __m128i mc1 = mul_sym_sse3(m1, c_packed);
253
254 __m128i a0 = sub4_alpha_sse3(mc0);
255 __m128i a1 = sub4_alpha_sse3(mc1);
256
257 __m128i d0_sym = mul_sym_sse3(_mm_srli_epi32(d0, 24), mc0);
258 __m128i d1_sym = mul_sym_sse3(_mm_srli_epi32(d1, 24), mc1);
259
260 d0 = mul_256_sse3(a0, d0);
261 d1 = mul_256_sse3(a1, d1);
262
263 d0 = _mm_add_epi32(d0, d0_sym);
264 d1 = _mm_add_epi32(d1, d1_sym);
265
266 _mm_store_si128((__m128i *)d, d0);
267 _mm_store_si128((__m128i *)(d+4), d1);
268
269 d += 8; m += 8; l -= 8;
270 })
271}
272
273#define _op_blend_rel_mas_cn_dp_sse3 _op_blend_rel_mas_c_dp_sse3
274#define _op_blend_rel_mas_can_dp_sse3 _op_blend_rel_mas_c_dp_sse3
275#define _op_blend_rel_mas_caa_dp_sse3 _op_blend_rel_mas_c_dp_sse3
276
277#define _op_blend_rel_mas_c_dpan_sse3 _op_blend_mas_c_dpan_sse3
278#define _op_blend_rel_mas_cn_dpan_sse3 _op_blend_mas_cn_dpan_sse3
279#define _op_blend_rel_mas_can_dpan_sse3 _op_blend_mas_can_dpan_sse3
280#define _op_blend_rel_mas_caa_dpan_sse3 _op_blend_mas_caa_dpan_sse3
281
282static void
283init_blend_rel_mask_color_span_funcs_sse3(void)
284{
285 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_mas_c_dp_sse3;
286 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3;
287 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_mas_can_dp_sse3;
288 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_mas_caa_dp_sse3;
289
290 op_blend_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_mas_c_dpan_sse3;
291 op_blend_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_mas_cn_dpan_sse3;
292 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_mas_can_dpan_sse3;
293 op_blend_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_mas_caa_dpan_sse3;
294}
295
296#define _op_blend_rel_pt_mas_c_dp_sse3 NULL
297
298#define _op_blend_rel_pt_mas_cn_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3
299#define _op_blend_rel_pt_mas_can_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3
300#define _op_blend_rel_pt_mas_caa_dp_sse3 _op_blend_rel_pt_mas_c_dp_sse3
301
302#define _op_blend_rel_pt_mas_c_dpan_sse3 _op_blend_pt_mas_c_dpan_sse3
303#define _op_blend_rel_pt_mas_cn_dpan_sse3 _op_blend_pt_mas_cn_dpan_sse3
304#define _op_blend_rel_pt_mas_can_dpan_sse3 _op_blend_pt_mas_can_dpan_sse3
305#define _op_blend_rel_pt_mas_caa_dpan_sse3 _op_blend_pt_mas_caa_dpan_sse3
306
307static void
308init_blend_rel_mask_color_pt_funcs_sse3(void)
309{
310 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_SSE3] = _op_blend_rel_pt_mas_c_dp_sse3;
311 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dp_sse3;
312 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_mas_can_dp_sse3;
313 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dp_sse3;
314
315 op_blend_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_c_dpan_sse3;
316 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_cn_dpan_sse3;
317 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_can_dpan_sse3;
318 op_blend_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_mas_caa_dpan_sse3;
319}
320
321#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 @@
1#define NEED_SSE3 1
2
3#include "evas_common.h"
4
5#ifdef BUILD_SSE3
6static __m128i A_MASK_SSE3;
7#endif
8
9extern RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
10extern RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
11
12extern RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
13extern RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
14
15# include "op_blend_pixel_sse3.c"
16# include "op_blend_color_sse3.c"
17# include "op_blend_pixel_color_sse3.c"
18# include "op_blend_pixel_mask_sse3.c"
19# include "op_blend_mask_color_sse3.c"
20
21void
22evas_common_op_blend_init_sse3(void)
23{
24#ifdef BUILD_SSE3
25 GA_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x00FF00FF, 0x00FF00FF, 0x00FF00FF);
26 RB_MASK_SSE3 = _mm_set_epi32(0xFF00FF00, 0xFF00FF00, 0xFF00FF00, 0xFF00FF00);
27 SYM4_MASK_SSE3 = _mm_set_epi32(0x00FF00FF, 0x000000FF, 0x00FF00FF, 0x000000FF);
28 RGB_MASK_SSE3 = _mm_set_epi32(0xFFFFFF, 0xFFFFFF, 0xFFFFFF, 0xFFFFFF);
29 A_MASK_SSE3 = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
30 ALPHA_SSE3 = _mm_set_epi32(256, 256, 256, 256);
31
32 init_blend_pixel_span_funcs_sse3();
33 init_blend_pixel_color_span_funcs_sse3();
34 init_blend_pixel_mask_span_funcs_sse3();
35 init_blend_color_span_funcs_sse3();
36 init_blend_mask_color_span_funcs_sse3();
37
38 init_blend_pixel_pt_funcs_sse3();
39 init_blend_pixel_color_pt_funcs_sse3();
40 init_blend_pixel_mask_pt_funcs_sse3();
41 init_blend_color_pt_funcs_sse3();
42 init_blend_mask_color_pt_funcs_sse3();
43#endif
44}
45
46void
47evas_common_op_blend_rel_init_sse3(void)
48{
49#ifdef BUILD_SSE3
50 init_blend_rel_pixel_span_funcs_sse3();
51 init_blend_rel_pixel_color_span_funcs_sse3();
52 init_blend_rel_pixel_mask_span_funcs_sse3();
53 init_blend_rel_color_span_funcs_sse3();
54 init_blend_rel_mask_color_span_funcs_sse3();
55
56 init_blend_rel_pixel_pt_funcs_sse3();
57 init_blend_rel_pixel_color_pt_funcs_sse3();
58 init_blend_rel_pixel_mask_pt_funcs_sse3();
59 init_blend_rel_color_pt_funcs_sse3();
60 init_blend_rel_mask_color_pt_funcs_sse3();
61#endif
62}
63
64//#pragma GCC push_options
65//#pragma GCC optimize ("O0")
66void
67evas_common_op_sse3_test(void)
68{
69#ifdef BUILD_SSE3
70 DATA32 s[64] = {0x11883399}, d[64] = {0xff88cc33};
71
72 s[0] = rand(); d[1] = rand();
73 _op_blend_pas_dp_sse3(s, NULL, 0, d, 64);
74 evas_common_cpu_end_opt();
75#endif
76}
77//#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 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 alpha = 256 - (*s >> 24);
11 *d = *s++ + MUL_256(alpha, *d);
12 d++;
13 });
14}
15
16static void
17_op_blend_pas_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
18 DATA32 *e;
19 int alpha;
20 UNROLL8_PLD_WHILE(d, l, e,
21 {
22 switch (*s & 0xff000000)
23 {
24 case 0:
25 break;
26 case 0xff000000:
27 *d = *s;
28 break;
29 default:
30 alpha = 256 - (*s >> 24);
31 *d = *s + MUL_256(alpha, *d);
32 break;
33 }
34 s++; d++;
35 });
36}
37
38#define _op_blend_pan_dp NULL
39
40#define _op_blend_p_dpan _op_blend_p_dp
41#define _op_blend_pas_dpan _op_blend_pas_dp
42#define _op_blend_pan_dpan _op_blend_pan_dp
43
44static void
45init_blend_pixel_span_funcs_c(void)
46{
47 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_p_dp;
48 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pas_dp;
49 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pan_dp;
50
51 op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_p_dpan;
52 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pas_dpan;
53 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pan_dpan;
54}
55#endif
56
57#ifdef BUILD_C
58static void
59_op_blend_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
60 c = 256 - (s >> 24);
61 *d = s + MUL_256(c, *d);
62}
63
64#define _op_blend_pt_pas_dp _op_blend_pt_p_dp
65#define _op_blend_pt_pan_dp NULL
66
67#define _op_blend_pt_p_dpan _op_blend_pt_p_dp
68#define _op_blend_pt_pan_dpan _op_blend_pt_pan_dp
69#define _op_blend_pt_pas_dpan _op_blend_pt_pas_dp
70
71static void
72init_blend_pixel_pt_funcs_c(void)
73{
74 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_p_dp;
75 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pas_dp;
76 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_pt_pan_dp;
77
78 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_dpan;
79 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_dpan;
80 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_dpan;
81}
82#endif
83
84/*-----*/
85
86/* blend_rel pixel -> dst */
87
88#ifdef BUILD_C
89static void
90_op_blend_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
91 DATA32 *e;
92 int alpha;
93 UNROLL8_PLD_WHILE(d, l, e,
94 {
95 alpha = 256 - (*s >> 24);
96 c = 1 + (*d >> 24);
97 *d = MUL_256(c, *s) + MUL_256(alpha, *d);
98 d++;
99 s++;
100 });
101}
102
103static void
104_op_blend_rel_pan_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
105 DATA32 *e;
106 UNROLL8_PLD_WHILE(d, l, e,
107 {
108 c = 1 + (*d >> 24);
109 *d++ = MUL_256(c, *s);
110 s++;
111 });
112}
113
114#define _op_blend_rel_pas_dp _op_blend_rel_p_dp
115
116#define _op_blend_rel_p_dpan _op_blend_p_dpan
117#define _op_blend_rel_pan_dpan _op_blend_pan_dpan
118#define _op_blend_rel_pas_dpan _op_blend_pas_dpan
119
120static void
121init_blend_rel_pixel_span_funcs_c(void)
122{
123 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_p_dp;
124 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pas_dp;
125 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pan_dp;
126
127 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_dpan;
128 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_dpan;
129 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_dpan;
130}
131#endif
132
133#ifdef BUILD_C
134static void
135_op_blend_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
136 c = 256 - (s >> 24);
137 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
138}
139
140static void
141_op_blend_rel_pt_pan_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
142 *d = MUL_SYM(*d >> 24, s);
143}
144
145#define _op_blend_rel_pt_pas_dp _op_blend_rel_pt_p_dp
146
147#define _op_blend_rel_pt_p_dpan _op_blend_pt_p_dpan
148#define _op_blend_rel_pt_pan_dpan _op_blend_pt_pan_dpan
149#define _op_blend_rel_pt_pas_dpan _op_blend_pt_pas_dpan
150
151static void
152init_blend_rel_pixel_pt_funcs_c(void)
153{
154 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_dp;
155 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_dp;
156 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_dp;
157
158 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_dpan;
159 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_dpan;
160 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_dpan;
161}
162#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 @@
1/* blend pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 DATA32 sc = MUL4_SYM(c, *s);
11 alpha = 256 - (sc >> 24);
12 *d = sc + MUL_256(alpha, *d);
13 d++;
14 s++;
15 });
16}
17
18static void
19_op_blend_pan_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
20 DATA32 *e;
21 int alpha = 256 - (c >> 24);
22 UNROLL8_PLD_WHILE(d, l, e,
23 {
24 *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
25 d++;
26 s++;
27 });
28}
29
30static void
31_op_blend_p_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
32 DATA32 *e;
33 int alpha;
34 UNROLL8_PLD_WHILE(d, l, e,
35 {
36 alpha = 256 - (*s >> 24);
37 *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
38 d++;
39 s++;
40 });
41}
42
43static void
44_op_blend_pan_can_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
45 DATA32 *e;
46 UNROLL8_PLD_WHILE(d, l, e,
47 {
48 *d++ = 0xff000000 + MUL3_SYM(c, *s);
49 s++;
50 });
51}
52
53static void
54_op_blend_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
55 DATA32 *e;
56 int alpha;
57 c = 1 + (c & 0xff);
58 UNROLL8_PLD_WHILE(d, l, e,
59 {
60 DATA32 sc = MUL_256(c, *s);
61 alpha = 256 - (sc >> 24);
62 *d = sc + MUL_256(alpha, *d);
63 d++;
64 s++;
65 });
66}
67
68static void
69_op_blend_pan_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
70 DATA32 *e;
71 c = 1 + (c & 0xff);
72 UNROLL8_PLD_WHILE(d, l, e,
73 {
74 *d = INTERP_256(c, *s, *d);
75 d++;
76 s++;
77 });
78}
79
80#define _op_blend_pas_c_dp _op_blend_p_c_dp
81#define _op_blend_pas_can_dp _op_blend_p_can_dp
82#define _op_blend_pas_caa_dp _op_blend_p_caa_dp
83
84#define _op_blend_p_c_dpan _op_blend_p_c_dp
85#define _op_blend_pas_c_dpan _op_blend_pas_c_dp
86#define _op_blend_pan_c_dpan _op_blend_pan_c_dp
87#define _op_blend_p_can_dpan _op_blend_p_can_dp
88#define _op_blend_pas_can_dpan _op_blend_pas_can_dp
89#define _op_blend_pan_can_dpan _op_blend_pan_can_dp
90#define _op_blend_p_caa_dpan _op_blend_p_caa_dp
91#define _op_blend_pas_caa_dpan _op_blend_pas_caa_dp
92#define _op_blend_pan_caa_dpan _op_blend_pan_caa_dp
93
94static void
95init_blend_pixel_color_span_funcs_c(void)
96{
97 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_p_c_dp;
98 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pas_c_dp;
99 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pan_c_dp;
100 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_p_can_dp;
101 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pas_can_dp;
102 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pan_can_dp;
103 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_p_caa_dp;
104 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pas_caa_dp;
105 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pan_caa_dp;
106
107 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_p_c_dpan;
108 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pas_c_dpan;
109 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pan_c_dpan;
110 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_p_can_dpan;
111 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pas_can_dpan;
112 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pan_can_dpan;
113 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_p_caa_dpan;
114 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pas_caa_dpan;
115 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pan_caa_dpan;
116}
117#endif
118
119#ifdef BUILD_C
120static void
121_op_blend_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
122 s = MUL4_SYM(c, s);
123 c = 256 - (s >> 24);
124 *d = s + MUL_256(c, *d);
125}
126
127#define _op_blend_pt_pas_c_dp _op_blend_pt_p_c_dp
128#define _op_blend_pt_pan_c_dp _op_blend_pt_p_c_dp
129#define _op_blend_pt_p_can_dp _op_blend_pt_p_c_dp
130#define _op_blend_pt_pas_can_dp _op_blend_pt_p_c_dp
131#define _op_blend_pt_pan_can_dp _op_blend_pt_p_c_dp
132#define _op_blend_pt_p_caa_dp _op_blend_pt_p_c_dp
133#define _op_blend_pt_pas_caa_dp _op_blend_pt_p_c_dp
134#define _op_blend_pt_pan_caa_dp _op_blend_pt_p_c_dp
135
136#define _op_blend_pt_p_c_dpan _op_blend_pt_p_c_dp
137#define _op_blend_pt_pas_c_dpan _op_blend_pt_pas_c_dp
138#define _op_blend_pt_pan_c_dpan _op_blend_pt_pan_c_dp
139#define _op_blend_pt_p_can_dpan _op_blend_pt_p_can_dp
140#define _op_blend_pt_pas_can_dpan _op_blend_pt_pas_can_dp
141#define _op_blend_pt_pan_can_dpan _op_blend_pt_pan_can_dp
142#define _op_blend_pt_p_caa_dpan _op_blend_pt_p_caa_dp
143#define _op_blend_pt_pas_caa_dpan _op_blend_pt_pas_caa_dp
144#define _op_blend_pt_pan_caa_dpan _op_blend_pt_pan_caa_dp
145
146static void
147init_blend_pixel_color_pt_funcs_c(void)
148{
149 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_pt_p_c_dp;
150 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_pt_pas_c_dp;
151 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_pt_pan_c_dp;
152 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_p_can_dp;
153 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pas_can_dp;
154 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_pt_pan_can_dp;
155 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_p_caa_dp;
156 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pas_caa_dp;
157 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_pt_pan_caa_dp;
158
159 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_p_c_dpan;
160 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pas_c_dpan;
161 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_pt_pan_c_dpan;
162 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_p_can_dpan;
163 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pas_can_dpan;
164 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_pt_pan_can_dpan;
165 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_p_caa_dpan;
166 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pas_caa_dpan;
167 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_pt_pan_caa_dpan;
168}
169#endif
170
171/*-----*/
172
173/* blend_rel pixel x color -> dst */
174
175#ifdef BUILD_C
176static void
177_op_blend_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
178 DATA32 *e;
179 int alpha;
180 UNROLL8_PLD_WHILE(d, l, e,
181 {
182 DATA32 sc = MUL4_SYM(c, *s);
183 alpha = 256 - (sc >> 24);
184 *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d);
185 d++;
186 s++;
187 });
188}
189
190#define _op_blend_rel_pas_c_dp _op_blend_rel_p_c_dp
191#define _op_blend_rel_pan_c_dp _op_blend_rel_p_c_dp
192#define _op_blend_rel_p_can_dp _op_blend_rel_p_c_dp
193#define _op_blend_rel_pas_can_dp _op_blend_rel_p_c_dp
194#define _op_blend_rel_pan_can_dp _op_blend_rel_p_c_dp
195#define _op_blend_rel_p_caa_dp _op_blend_rel_p_c_dp
196#define _op_blend_rel_pas_caa_dp _op_blend_rel_p_c_dp
197#define _op_blend_rel_pan_caa_dp _op_blend_rel_p_c_dp
198
199#define _op_blend_rel_p_c_dpan _op_blend_p_c_dpan
200#define _op_blend_rel_pas_c_dpan _op_blend_pas_c_dpan
201#define _op_blend_rel_pan_c_dpan _op_blend_pan_c_dpan
202#define _op_blend_rel_p_can_dpan _op_blend_p_can_dpan
203#define _op_blend_rel_pas_can_dpan _op_blend_pas_can_dpan
204#define _op_blend_rel_pan_can_dpan _op_blend_pan_can_dpan
205#define _op_blend_rel_p_caa_dpan _op_blend_p_caa_dpan
206#define _op_blend_rel_pas_caa_dpan _op_blend_pas_caa_dpan
207#define _op_blend_rel_pan_caa_dpan _op_blend_pan_caa_dpan
208
209static void
210init_blend_rel_pixel_color_span_funcs_c(void)
211{
212 op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_p_c_dp;
213 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pas_c_dp;
214 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pan_c_dp;
215 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_p_can_dp;
216 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pas_can_dp;
217 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pan_can_dp;
218 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_p_caa_dp;
219 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pas_caa_dp;
220 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pan_caa_dp;
221
222 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_p_c_dpan;
223 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pas_c_dpan;
224 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pan_c_dpan;
225 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_p_can_dpan;
226 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pas_can_dpan;
227 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pan_can_dpan;
228 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_p_caa_dpan;
229 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pas_caa_dpan;
230 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pan_caa_dpan;
231}
232#endif
233
234#ifdef BUILD_C
235static void
236_op_blend_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
237 s = MUL4_SYM(c, s);
238 c = 256 - (s >> 24);
239 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
240}
241
242#define _op_blend_rel_pt_pas_c_dp _op_blend_rel_pt_p_c_dp
243#define _op_blend_rel_pt_pan_c_dp _op_blend_rel_pt_p_c_dp
244#define _op_blend_rel_pt_p_can_dp _op_blend_rel_pt_p_c_dp
245#define _op_blend_rel_pt_pas_can_dp _op_blend_rel_pt_p_c_dp
246#define _op_blend_rel_pt_pan_can_dp _op_blend_rel_pt_p_c_dp
247#define _op_blend_rel_pt_p_caa_dp _op_blend_rel_pt_p_c_dp
248#define _op_blend_rel_pt_pas_caa_dp _op_blend_rel_pt_p_c_dp
249#define _op_blend_rel_pt_pan_caa_dp _op_blend_rel_pt_p_c_dp
250
251#define _op_blend_rel_pt_p_c_dpan _op_blend_pt_p_c_dpan
252#define _op_blend_rel_pt_pas_c_dpan _op_blend_pt_pas_c_dpan
253#define _op_blend_rel_pt_pan_c_dpan _op_blend_pt_pan_c_dpan
254#define _op_blend_rel_pt_p_can_dpan _op_blend_pt_p_can_dpan
255#define _op_blend_rel_pt_pas_can_dpan _op_blend_pt_pas_can_dpan
256#define _op_blend_rel_pt_pan_can_dpan _op_blend_pt_pan_can_dpan
257#define _op_blend_rel_pt_p_caa_dpan _op_blend_pt_p_caa_dpan
258#define _op_blend_rel_pt_pas_caa_dpan _op_blend_pt_pas_caa_dpan
259#define _op_blend_rel_pt_pan_caa_dpan _op_blend_pt_pan_caa_dpan
260
261static void
262init_blend_rel_pixel_color_pt_funcs_c(void)
263{
264 op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_p_c_dp;
265 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pas_c_dp;
266 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_blend_rel_pt_pan_c_dp;
267 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_p_can_dp;
268 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pas_can_dp;
269 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_blend_rel_pt_pan_can_dp;
270 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_p_caa_dp;
271 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pas_caa_dp;
272 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_blend_rel_pt_pan_caa_dp;
273
274 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_p_c_dpan;
275 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pas_c_dpan;
276 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_blend_rel_pt_pan_c_dpan;
277 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_p_can_dpan;
278 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pas_can_dpan;
279 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_blend_rel_pt_pan_can_dpan;
280 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_p_caa_dpan;
281 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pas_caa_dpan;
282 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_blend_rel_pt_pan_caa_dpan;
283}
284#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 @@
1/* blend pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_256, mm6)
8 MOV_A2R(ALPHA_255, mm5)
9 pxor_r2r(mm0, mm0);
10 MOV_P2R(c, mm2, mm0)
11 while (d < e) {
12 MOV_P2R(*s, mm3, mm0)
13 MUL4_SYM_R2R(mm2, mm3, mm5)
14
15 MOV_RA2R(mm3, mm1)
16 movq_r2r(mm6, mm4);
17 psubw_r2r(mm1, mm4);
18
19 MOV_P2R(*d, mm1, mm0)
20 MUL4_256_R2R(mm4, mm1)
21
22 paddw_r2r(mm3, mm1);
23 MOV_R2P(mm1, *d, mm0)
24 s++; d++;
25 }
26}
27
28static void
29_op_blend_pan_can_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
30 DATA32 *e = d + l;
31 pxor_r2r(mm0, mm0);
32 MOV_P2R(c, mm2, mm0)
33 MOV_A2R(ALPHA_255, mm5)
34 while (d < e) {
35 MOV_P2R(*s, mm1, mm0)
36 MUL4_SYM_R2R(mm2, mm1, mm5)
37 MOV_R2P(mm1, *d, mm0)
38 s++; d++;
39 }
40}
41
42static void
43_op_blend_pan_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
44 DATA32 *e = d + l;
45 c = 1 + (c & 0xff);
46 MOV_A2R(c, mm2)
47 MOV_A2R(ALPHA_255, mm5)
48 pxor_r2r(mm0, mm0);
49 while (d < e) {
50 MOV_P2R(*s, mm3, mm0)
51 MOV_P2R(*d, mm1, mm0)
52 INTERP_256_R2R(mm2, mm3, mm1, mm5)
53 MOV_R2P(mm1, *d, mm0)
54 s++; d++;
55 }
56}
57
58#define _op_blend_pas_c_dp_mmx _op_blend_p_c_dp_mmx
59#define _op_blend_pan_c_dp_mmx _op_blend_p_c_dp_mmx
60#define _op_blend_p_can_dp_mmx _op_blend_p_c_dp_mmx
61#define _op_blend_pas_can_dp_mmx _op_blend_p_c_dp_mmx
62#define _op_blend_p_caa_dp_mmx _op_blend_p_c_dp_mmx
63#define _op_blend_pas_caa_dp_mmx _op_blend_p_c_dp_mmx
64
65#define _op_blend_p_c_dpan_mmx _op_blend_p_c_dp_mmx
66#define _op_blend_pas_c_dpan_mmx _op_blend_pas_c_dp_mmx
67#define _op_blend_pan_c_dpan_mmx _op_blend_pan_c_dp_mmx
68#define _op_blend_p_can_dpan_mmx _op_blend_p_can_dp_mmx
69#define _op_blend_pas_can_dpan_mmx _op_blend_pas_can_dp_mmx
70#define _op_blend_pan_can_dpan_mmx _op_blend_pan_can_dp_mmx
71#define _op_blend_p_caa_dpan_mmx _op_blend_p_caa_dp_mmx
72#define _op_blend_pas_caa_dpan_mmx _op_blend_pas_caa_dp_mmx
73#define _op_blend_pan_caa_dpan_mmx _op_blend_pan_caa_dp_mmx
74
75
76static void
77init_blend_pixel_color_span_funcs_mmx(void)
78{
79 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_p_c_dp_mmx;
80 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pas_c_dp_mmx;
81 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pan_c_dp_mmx;
82 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_p_can_dp_mmx;
83 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pas_can_dp_mmx;
84 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pan_can_dp_mmx;
85 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_p_caa_dp_mmx;
86 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pas_caa_dp_mmx;
87 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pan_caa_dp_mmx;
88
89 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_p_c_dpan_mmx;
90 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pas_c_dpan_mmx;
91 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pan_c_dpan_mmx;
92 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_p_can_dpan_mmx;
93 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pas_can_dpan_mmx;
94 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pan_can_dpan_mmx;
95 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_p_caa_dpan_mmx;
96 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pas_caa_dpan_mmx;
97 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pan_caa_dpan_mmx;
98}
99#endif
100
101#ifdef BUILD_MMX
102static void
103_op_blend_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
104 MOV_A2R(ALPHA_256, mm4)
105 MOV_A2R(ALPHA_255, mm5)
106 pxor_r2r(mm0, mm0);
107 MOV_P2R(c, mm2, mm0)
108 MOV_P2R(s, mm3, mm0)
109 MUL4_SYM_R2R(mm2, mm3, mm5)
110
111 MOV_RA2R(mm3, mm1)
112 psubw_r2r(mm1, mm4);
113
114 MOV_P2R(*d, mm1, mm0)
115 MUL4_256_R2R(mm4, mm1)
116
117 paddw_r2r(mm3, mm1);
118 MOV_R2P(mm1, *d, mm0)
119}
120
121#define _op_blend_pt_pas_c_dp_mmx _op_blend_pt_p_c_dp_mmx
122#define _op_blend_pt_pan_c_dp_mmx _op_blend_pt_p_c_dp_mmx
123#define _op_blend_pt_p_can_dp_mmx _op_blend_pt_p_c_dp_mmx
124#define _op_blend_pt_pas_can_dp_mmx _op_blend_pt_p_c_dp_mmx
125#define _op_blend_pt_pan_can_dp_mmx _op_blend_pt_p_c_dp_mmx
126#define _op_blend_pt_p_caa_dp_mmx _op_blend_pt_p_c_dp_mmx
127#define _op_blend_pt_pas_caa_dp_mmx _op_blend_pt_p_c_dp_mmx
128#define _op_blend_pt_pan_caa_dp_mmx _op_blend_pt_p_c_dp_mmx
129
130#define _op_blend_pt_p_c_dpan_mmx _op_blend_pt_p_c_dp_mmx
131#define _op_blend_pt_pas_c_dpan_mmx _op_blend_pt_p_c_dp_mmx
132#define _op_blend_pt_pan_c_dpan_mmx _op_blend_pt_p_c_dp_mmx
133#define _op_blend_pt_p_can_dpan_mmx _op_blend_pt_p_c_dp_mmx
134#define _op_blend_pt_pas_can_dpan_mmx _op_blend_pt_p_c_dp_mmx
135#define _op_blend_pt_pan_can_dpan_mmx _op_blend_pt_p_c_dp_mmx
136#define _op_blend_pt_p_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx
137#define _op_blend_pt_pas_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx
138#define _op_blend_pt_pan_caa_dpan_mmx _op_blend_pt_p_c_dp_mmx
139
140static void
141init_blend_pixel_color_pt_funcs_mmx(void)
142{
143 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_p_c_dp_mmx;
144 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pas_c_dp_mmx;
145 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_blend_pt_pan_c_dp_mmx;
146 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_p_can_dp_mmx;
147 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pas_can_dp_mmx;
148 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_blend_pt_pan_can_dp_mmx;
149 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_p_caa_dp_mmx;
150 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pas_caa_dp_mmx;
151 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_blend_pt_pan_caa_dp_mmx;
152
153 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_p_c_dpan_mmx;
154 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pas_c_dpan_mmx;
155 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_pt_pan_c_dpan_mmx;
156 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_p_can_dpan_mmx;
157 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pas_can_dpan_mmx;
158 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_pt_pan_can_dpan_mmx;
159 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_p_caa_dpan_mmx;
160 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pas_caa_dpan_mmx;
161 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_pt_pan_caa_dpan_mmx;
162}
163#endif
164
165/*-----*/
166
167/* blend_rel pixel x color -> dst */
168
169#ifdef BUILD_MMX
170
171#define _op_blend_rel_p_c_dpan_mmx _op_blend_p_c_dpan_mmx
172#define _op_blend_rel_pas_c_dpan_mmx _op_blend_pas_c_dpan_mmx
173#define _op_blend_rel_pan_c_dpan_mmx _op_blend_pan_c_dpan_mmx
174#define _op_blend_rel_p_can_dpan_mmx _op_blend_p_can_dpan_mmx
175#define _op_blend_rel_pas_can_dpan_mmx _op_blend_pas_can_dpan_mmx
176#define _op_blend_rel_pan_can_dpan_mmx _op_blend_pan_can_dpan_mmx
177#define _op_blend_rel_p_caa_dpan_mmx _op_blend_p_caa_dpan_mmx
178#define _op_blend_rel_pas_caa_dpan_mmx _op_blend_pas_caa_dpan_mmx
179#define _op_blend_rel_pan_caa_dpan_mmx _op_blend_pan_caa_dpan_mmx
180
181static void
182init_blend_rel_pixel_color_span_funcs_mmx(void)
183{
184 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_p_c_dpan_mmx;
185 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pas_c_dpan_mmx;
186 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pan_c_dpan_mmx;
187 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_p_can_dpan_mmx;
188 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pas_can_dpan_mmx;
189 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pan_can_dpan_mmx;
190 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_p_caa_dpan_mmx;
191 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pas_caa_dpan_mmx;
192 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pan_caa_dpan_mmx;
193}
194#endif
195
196#ifdef BUILD_MMX
197
198#define _op_blend_rel_pt_p_c_dpan_mmx _op_blend_pt_p_c_dpan_mmx
199#define _op_blend_rel_pt_pas_c_dpan_mmx _op_blend_pt_pas_c_dpan_mmx
200#define _op_blend_rel_pt_pan_c_dpan_mmx _op_blend_pt_pan_c_dpan_mmx
201#define _op_blend_rel_pt_p_can_dpan_mmx _op_blend_pt_p_can_dpan_mmx
202#define _op_blend_rel_pt_pas_can_dpan_mmx _op_blend_pt_pas_can_dpan_mmx
203#define _op_blend_rel_pt_pan_can_dpan_mmx _op_blend_pt_pan_can_dpan_mmx
204#define _op_blend_rel_pt_p_caa_dpan_mmx _op_blend_pt_p_caa_dpan_mmx
205#define _op_blend_rel_pt_pas_caa_dpan_mmx _op_blend_pt_pas_caa_dpan_mmx
206#define _op_blend_rel_pt_pan_caa_dpan_mmx _op_blend_pt_pan_caa_dpan_mmx
207
208static void
209init_blend_rel_pixel_color_pt_funcs_mmx(void)
210{
211 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_c_dpan_mmx;
212 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_c_dpan_mmx;
213 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_c_dpan_mmx;
214 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_can_dpan_mmx;
215 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_can_dpan_mmx;
216 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_can_dpan_mmx;
217 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_caa_dpan_mmx;
218 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_caa_dpan_mmx;
219 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_caa_dpan_mmx;
220}
221#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 @@
1/* blend pixel x color --> dst */
2#ifdef BUILD_NEON
3/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of
4 * reads, then two writes, a miss on read is 'just' two reads */
5static void
6_op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
7#define AP "blend_p_c_dp_"
8 asm volatile (
9 ".fpu neon \n\t"
10 // Load 'c'
11 "vdup.u32 q7, %[c] \n\t"
12 "vmov.i8 q6, #1 \n\t"
13
14 // Choose a loop
15 "andS %[tmp], %[d], $0xf \n\t"
16 "beq "AP"quadstart \n\t"
17
18 "andS %[tmp],%[d], $0x4 \n\t"
19 "beq "AP"dualloop \n\t"
20
21 AP"singleloop:"
22 "vld1.32 d0[0], [%[s]]! \n\t"
23 "vld1.32 d2[0], [%[d]] \n\t"
24 // Mulitply s * c (= sc)
25 "vmull.u8 q4, d0,d14 \n\t"
26 // sc in d8
27 "vqrshrn.u16 d4, q4, #8 \n\t"
28
29 // sca in d9
30 "vmvn.u32 d6, d4 \n\t"
31 "vshr.u32 d6, d6, #24 \n\t"
32
33 "vmul.u32 d6, d12, d6 \n\t"
34
35 /* d * alpha */
36 "vmull.u8 q4, d6, d2 \n\t"
37 "vqrshrn.u16 d0, q4, #8 \n\t"
38
39 "vqadd.u8 d2, d0, d4 \n\t"
40
41 // Save dsc + sc
42 "vst1.32 d2[0], [%[d]]! \n\t"
43
44 // Now where?
45 // Can we go the fast path?
46 "andS %[tmp], %[d],$0xf \n\t"
47 "beq "AP"quadstart \n\t"
48
49 AP"dualloop: \n\t"
50 // Check we have enough to bother with!
51 "sub %[tmp], %[e], %[d] \n\t"
52 "cmp %[tmp], #16 \n\t"
53 "blt "AP"loopout \n\t"
54
55 // load 's' -> q0, 'd' -> q1
56 "vldm %[s]!, {d0} \n\t"
57 "vldm %[d], {d2} \n\t"
58 // Mulitply s * c (= sc)
59 "vmull.u8 q4, d0,d14 \n\t"
60 // sc in d8
61 "vqrshrn.u16 d4, q4, #8 \n\t"
62
63 // sca in d9
64 "vmvn.u32 d6, d4 \n\t"
65 "vshr.u32 d6, d6, #24 \n\t"
66
67 "vmul.u32 d6, d12, d6 \n\t"
68
69 /* d * alpha */
70 "vmull.u8 q4, d6, d2 \n\t"
71 "vqrshrn.u16 d0, q4, #8 \n\t"
72
73 "vqadd.u8 d2, d0, d4 \n\t"
74
75 // Save dsc + sc
76 "vst1.32 d2, [%[d]]! \n\t"
77
78 AP"quadstart: \n\t"
79 "sub %[tmp], %[e], %[d] \n\t"
80 "cmp %[tmp], #16 \n\t"
81 "blt "AP"loopout \n\t"
82
83 "sub %[tmp], %[e], #15 \n\t"
84
85 AP"quadloop:\n\t"
86 // load 's' -> q0, 'd' -> q1
87 "vldm %[s]!, {d0,d1} \n\t"
88 "vldm %[d], {d2,d3} \n\t"
89 // Mulitply s * c (= sc)
90 "vmull.u8 q4, d0,d14 \n\t"
91 "vmull.u8 q5, d1,d14 \n\t"
92
93 // Get sc & sc alpha
94 "vqrshrn.u16 d4, q4, #8 \n\t"
95 "vqrshrn.u16 d5, q5, #8 \n\t"
96 // sc is now in q2, 8bpp
97 // Shift out, then spread alpha for q2
98 "vmvn.u32 q3, q2 \n\t"
99 "vshr.u32 q3, q3, $0x18 \n\t"
100 "vmul.u32 q3, q6,q3 \n\t"
101
102 // Multiply 'd' by sc.alpha (dsca)
103 "vmull.u8 q4, d6,d2 \n\t"
104 "vmull.u8 q5, d7,d3 \n\t"
105
106 "vqrshrn.u16 d0, q4, #8 \n\t"
107 "vqrshrn.u16 d1, q5, #8 \n\t"
108
109 "vqadd.u8 q1, q0, q2 \n\t"
110
111 // Save dsc + sc
112 "vstm %[d]!, {d2,d3} \n\t"
113
114 "cmp %[tmp], %[d] \n\t"
115
116 "bhi "AP"quadloop \n\t"
117
118 /* Trailing stuff */
119 AP"loopout: \n\t"
120
121 "cmp %[d], %[e] \n\t"
122 "beq "AP"done\n\t"
123 "sub %[tmp],%[e], %[d] \n\t"
124 "cmp %[tmp],$0x04 \n\t"
125 "beq "AP"singleloop2 \n\t"
126
127 "sub %[tmp], %[e], #7 \n\t"
128 /* Dual loop */
129 AP"dualloop2: \n\t"
130 "vldm %[s]!, {d0} \n\t"
131 "vldm %[d], {d2} \n\t"
132 // Mulitply s * c (= sc)
133 "vmull.u8 q4, d0,d14 \n\t"
134 // sc in d8
135 "vqrshrn.u16 d4, q4, #8 \n\t"
136
137 // sca in d9
138 // XXX: I can probably squash one of these 3
139 "vmvn.u32 d6, d4 \n\t"
140 "vshr.u32 d6, d6, #24 \n\t"
141 "vmul.u32 d6, d6, d12 \n\t"
142
143 /* d * alpha */
144 "vmull.u8 q4, d6, d2 \n\t"
145 "vqrshrn.u16 d0, q4, #8 \n\t"
146
147 "vqadd.u8 d2, d0, d4 \n\t"
148
149 // Save dsc + sc
150 "vstm %[d]!, {d2} \n\t"
151
152 "cmp %[tmp], %[d] \n\t"
153 "bhi "AP"dualloop2 \n\t"
154
155 "cmp %[d], %[e] \n\t"
156 "beq "AP"done \n\t"
157
158 AP"singleloop2: \n\t"
159 "vld1.32 d0[0], [%[s]]! \n\t"
160 "vld1.32 d2[0], [%[d]] \n\t"
161 // Mulitply s * c (= sc)
162 "vmull.u8 q4, d0,d14 \n\t"
163 // sc in d8
164 "vqrshrn.u16 d4, q4, #8 \n\t"
165
166 // sca in d6
167 "vmvn.u32 d6, d4 \n\t"
168 "vshr.u32 d6, d6, #24 \n\t"
169 "vmul.u32 d6, d12,d6 \n\t"
170
171 /* d * alpha */
172 "vmull.u8 q4, d6, d2 \n\t"
173 "vqrshrn.u16 d0, q4, #8 \n\t"
174
175 "vqadd.u8 d2, d0, d4 \n\t"
176
177 // Save dsc + sc
178 "vst1.32 d2[0], [%[d]]! \n\t"
179
180
181 AP"done:"
182 : // No output
183 //
184 : [s] "r" (s), [e] "r" (d + l), [d] "r" (d), [c] "r" (c),
185 [tmp] "r" (12)
186 : "q0","q1","q2","q3","q4","q5","q6","q7","memory"
187 );
188#undef AP
189}
190
191static void
192_op_blend_pan_can_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
193 DATA32 *e;
194 UNROLL8_PLD_WHILE(d, l, e,
195 {
196 *d++ = 0xff000000 + MUL3_SYM(c, *s);
197 s++;
198 });
199}
200
201static void
202_op_blend_pan_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
203#if 1
204 DATA32 *e;
205 int alpha;
206 c = 1 + (c & 0xff);
207 UNROLL8_PLD_WHILE(d, l, e,
208 {
209 DATA32 sc = MUL_256(c, *s);
210 alpha = 256 - (sc >> 24);
211 *d = sc + MUL_256(alpha, *d);
212 d++;
213 s++;
214 });
215#else // the below neon is buggy!! misses rendering of spans, i think with alignment. quick - just disable this.
216#define AP "_op_blend_pan_caa_dp_"
217 DATA32 *e = d + l, *tmp = (void*)73;
218 asm volatile (
219 ".fpu neon \n\t"
220 /* Set up 'c' */
221 "vdup.u8 d14, %[c] \n\t"
222 "vmov.i8 d15, #1 \n\t"
223 "vaddl.u8 q15, d14, d15 \n\t"
224 "vshr.u8 q15,#1 \n\t"
225
226 // Pick a loop
227 "andS %[tmp], %[d], $0xf \n\t"
228 "beq "AP"quadstart \n\t"
229
230 "andS %[tmp], %[d], $0x4 \n\t"
231 "beq "AP"dualstart \n\t"
232
233 AP"singleloop: \n\t"
234 "vld1.32 d4[0], [%[d]] \n\t"
235 "vld1.32 d0[0], [%[s]]! \n\t"
236
237 // Long version of 'd'
238 "vmovl.u8 q8, d4 \n\t"
239
240 // Long version of 's'
241 "vmovl.u8 q6, d0 \n\t"
242
243 // d8 = s -d
244 "vsub.s16 d8, d12, d16 \n\t"
245
246 // Multiply
247 "vmul.s16 d8, d8, d30 \n\t"
248
249 // Shift down
250 "vshr.s16 d8, #7 \n\t"
251
252 // Add 'd'
253 "vqadd.s16 d8, d8, d16 \n\t"
254
255 // Shrink to save
256 "vqmovun.s16 d0, q4 \n\t"
257 "vst1.32 d0[0], [%[d]]! \n\t"
258
259 // Now where?
260 "andS %[tmp], %[d], $0xf \n\t"
261 "beq "AP"quadstart \n\t"
262
263 AP"dualstart: \n\t"
264 // Check we have enough
265 "sub %[tmp], %[e], %[d] \n\t"
266 "cmp %[tmp], #16 \n\t"
267 "blt "AP"loopout \n\t"
268
269 AP"dualloop:"
270 "vldm %[d], {d4} \n\t"
271 "vldm %[s]!, {d0} \n\t"
272
273 // Long version of d
274 "vmovl.u8 q8, d4 \n\t"
275
276 // Long version of s
277 "vmovl.u8 q6, d0 \n\t"
278
279 // q4/q5 = s-d
280 "vsub.s16 q4, q6, q8 \n\t"
281
282 // Multiply
283 "vmul.s16 q4, q4,q15 \n\t"
284
285 // Shift down
286 "vshr.s16 q4, #7 \n\t"
287
288 // Add d
289 "vqadd.s16 q4, q4, q8 \n\t"
290
291 // Shrink to save
292 "vqmovun.s16 d0, q4 \n\t"
293
294 "vstm %[d]!, {d0} \n\t"
295 AP"quadstart: \n\t"
296 "sub %[tmp], %[e], %[d] \n\t"
297 "cmp %[tmp], #16 \n\t"
298 "blt "AP"loopout \n\t"
299
300 "sub %[tmp], %[e], #15 \n\t"
301
302 AP"quadloop: \n\t"
303 // load 's' -> q0, 'd' -> q2
304 "vldm %[d], {d4,d5} \n\t"
305 "vldm %[s]!, {d0,d1} \n\t"
306
307 // Long version of d
308 "vmovl.u8 q8, d4 \n\t"
309 "vmovl.u8 q9, d5 \n\t"
310
311 // Long version of s
312 "vmovl.u8 q6, d0 \n\t"
313 "vmovl.u8 q7, d1 \n\t"
314
315 // q4/q5 = s-d
316 "vsub.s16 q4, q6, q8 \n\t"
317 "vsub.s16 q5, q7, q9 \n\t"
318
319 // Multiply
320 "vmul.s16 q4, q4,q15 \n\t"
321 "vmul.s16 q5, q5,q15 \n\t"
322
323 // Shift down
324 "vshr.s16 q4, #7 \n\t"
325 "vshr.s16 q5, #7 \n\t"
326
327 // Add d
328 "vqadd.s16 q4, q4, q8 \n\t"
329 "vqadd.s16 q5, q5, q9 \n\t"
330
331 // Shrink to save
332 "vqmovun.s16 d0, q4 \n\t"
333 "vqmovun.s16 d1, q5 \n\t"
334 "vstm %[d]!, {d0,d1} \n\t"
335 "cmp %[tmp], %[d] \n\t"
336
337 "bhi "AP"quadloop\n\t"
338
339
340 "b "AP"done\n\t"
341 AP"loopout: \n\t"
342 "cmp %[d], %[e] \n\t"
343 "beq "AP"done\n\t"
344 "sub %[tmp],%[e], %[d] \n\t"
345 "cmp %[tmp],$0x04 \n\t"
346 "beq "AP"singleloop2 \n\t"
347
348 AP"dualloop2: \n\t"
349 "vldm %[d], {d4} \n\t"
350 "vldm %[s]!, {d0} \n\t"
351
352 // Long version of d
353 "vmovl.u8 q8, d4 \n\t"
354
355 // Long version of s
356 "vmovl.u8 q6, d0 \n\t"
357
358 // q4/q5 = s-d
359 "vsub.s16 q4, q6, q8 \n\t"
360
361 // Multiply
362 "vmul.s16 q4, q4,q15 \n\t"
363
364 // Shift down
365 "vshr.s16 q4, #7 \n\t"
366
367 // Add d
368 "vqadd.s16 q4, q4, q8 \n\t"
369
370 // Shrink to save
371 "vqmovun.s16 d0, q4 \n\t"
372
373 "vstm %[d]!, {d0} \n\t"
374
375 "cmp %[d], %[e] \n\t"
376 "beq "AP"done \n\t"
377
378 AP"singleloop2: \n\t"
379 "vld1.32 d4[0], [%[d]] \n\t"
380 "vld1.32 d0[0], [%[s]]! \n\t"
381
382 // Long version of 'd'
383 "vmovl.u8 q8, d4 \n\t"
384
385 // Long version of 's'
386 "vmovl.u8 q6, d0 \n\t"
387
388 // d8 = s -d
389 "vsub.s16 d8, d12, d16 \n\t"
390
391 // Multiply
392 "vmul.s16 d8, d8, d30 \n\t"
393
394 // Shift down
395 "vshr.s16 d8, #7 \n\t"
396
397 // Add 'd'
398 "vqadd.s16 d8, d8, d16 \n\t"
399
400 // Shrink to save
401 "vqmovun.s16 d0, q4 \n\t"
402
403 "vst1.32 d0[0], [%[d]] \n\t"
404
405
406 AP"done: \n\t"
407
408 // No output
409 :
410 // Input
411 : [s] "r" (s), [d] "r" (d), [e] "r" (e), [c] "r" (c), [tmp] "r" (tmp)
412 // Clobbered
413 : "q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "memory"
414 );
415#undef AP
416#endif
417}
418
419#define _op_blend_pas_c_dp_neon _op_blend_p_c_dp_neon
420#define _op_blend_pan_c_dp_neon _op_blend_p_c_dp_neon
421#define _op_blend_p_can_dp_neon _op_blend_p_c_dp_neon
422#define _op_blend_pas_can_dp_neon _op_blend_p_c_dp_neon
423#define _op_blend_p_caa_dp_neon _op_blend_p_c_dp_neon
424#define _op_blend_pas_caa_dp_neon _op_blend_p_c_dp_neon
425
426#define _op_blend_p_c_dpan_neon _op_blend_p_c_dp_neon
427#define _op_blend_pas_c_dpan_neon _op_blend_pas_c_dp_neon
428#define _op_blend_pan_c_dpan_neon _op_blend_pan_c_dp_neon
429#define _op_blend_p_can_dpan_neon _op_blend_p_can_dp_neon
430#define _op_blend_pas_can_dpan_neon _op_blend_pas_can_dp_neon
431#define _op_blend_pan_can_dpan_neon _op_blend_pan_can_dp_neon
432#define _op_blend_p_caa_dpan_neon _op_blend_p_caa_dp_neon
433#define _op_blend_pas_caa_dpan_neon _op_blend_pas_caa_dp_neon
434#define _op_blend_pan_caa_dpan_neon _op_blend_pan_caa_dp_neon
435
436
437static void
438init_blend_pixel_color_span_funcs_neon(void)
439{
440 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_p_c_dp_neon;
441 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pas_c_dp_neon;
442 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pan_c_dp_neon;
443 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_p_can_dp_neon;
444 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pas_can_dp_neon;
445 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pan_can_dp_neon;
446 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_p_caa_dp_neon;
447 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pas_caa_dp_neon;
448 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pan_caa_dp_neon;
449
450 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_p_c_dpan_neon;
451 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pas_c_dpan_neon;
452 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pan_c_dpan_neon;
453 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_p_can_dpan_neon;
454 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pas_can_dpan_neon;
455 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pan_can_dpan_neon;
456 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_p_caa_dpan_neon;
457 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pas_caa_dpan_neon;
458 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pan_caa_dpan_neon;
459}
460#endif
461
462#ifdef BUILD_NEON
463static void
464_op_blend_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
465 s = MUL4_SYM(c, s);
466 c = 256 - (s >> 24);
467 *d = s + MUL_256(c, *d);
468}
469
470#define _op_blend_pt_pas_c_dp_neon _op_blend_pt_p_c_dp_neon
471#define _op_blend_pt_pan_c_dp_neon _op_blend_pt_p_c_dp_neon
472#define _op_blend_pt_p_can_dp_neon _op_blend_pt_p_c_dp_neon
473#define _op_blend_pt_pas_can_dp_neon _op_blend_pt_p_c_dp_neon
474#define _op_blend_pt_pan_can_dp_neon _op_blend_pt_p_c_dp_neon
475#define _op_blend_pt_p_caa_dp_neon _op_blend_pt_p_c_dp_neon
476#define _op_blend_pt_pas_caa_dp_neon _op_blend_pt_p_c_dp_neon
477#define _op_blend_pt_pan_caa_dp_neon _op_blend_pt_p_c_dp_neon
478
479#define _op_blend_pt_p_c_dpan_neon _op_blend_pt_p_c_dp_neon
480#define _op_blend_pt_pas_c_dpan_neon _op_blend_pt_p_c_dp_neon
481#define _op_blend_pt_pan_c_dpan_neon _op_blend_pt_p_c_dp_neon
482#define _op_blend_pt_p_can_dpan_neon _op_blend_pt_p_c_dp_neon
483#define _op_blend_pt_pas_can_dpan_neon _op_blend_pt_p_c_dp_neon
484#define _op_blend_pt_pan_can_dpan_neon _op_blend_pt_p_c_dp_neon
485#define _op_blend_pt_p_caa_dpan_neon _op_blend_pt_p_c_dp_neon
486#define _op_blend_pt_pas_caa_dpan_neon _op_blend_pt_p_c_dp_neon
487#define _op_blend_pt_pan_caa_dpan_neon _op_blend_pt_p_c_dp_neon
488
489static void
490init_blend_pixel_color_pt_funcs_neon(void)
491{
492 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_p_c_dp_neon;
493 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pas_c_dp_neon;
494 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_blend_pt_pan_c_dp_neon;
495 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_p_can_dp_neon;
496 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pas_can_dp_neon;
497 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_blend_pt_pan_can_dp_neon;
498 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_p_caa_dp_neon;
499 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pas_caa_dp_neon;
500 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_blend_pt_pan_caa_dp_neon;
501
502 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_p_c_dpan_neon;
503 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pas_c_dpan_neon;
504 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_pt_pan_c_dpan_neon;
505 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_p_can_dpan_neon;
506 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pas_can_dpan_neon;
507 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_pt_pan_can_dpan_neon;
508 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_p_caa_dpan_neon;
509 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pas_caa_dpan_neon;
510 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_pt_pan_caa_dpan_neon;
511}
512#endif
513
514/*-----*/
515
516/* blend_rel pixel x color -> dst */
517
518#ifdef BUILD_NEON
519
520#define _op_blend_rel_p_c_dpan_neon _op_blend_p_c_dpan_neon
521#define _op_blend_rel_pas_c_dpan_neon _op_blend_pas_c_dpan_neon
522#define _op_blend_rel_pan_c_dpan_neon _op_blend_pan_c_dpan_neon
523#define _op_blend_rel_p_can_dpan_neon _op_blend_p_can_dpan_neon
524#define _op_blend_rel_pas_can_dpan_neon _op_blend_pas_can_dpan_neon
525#define _op_blend_rel_pan_can_dpan_neon _op_blend_pan_can_dpan_neon
526#define _op_blend_rel_p_caa_dpan_neon _op_blend_p_caa_dpan_neon
527#define _op_blend_rel_pas_caa_dpan_neon _op_blend_pas_caa_dpan_neon
528#define _op_blend_rel_pan_caa_dpan_neon _op_blend_pan_caa_dpan_neon
529
530static void
531init_blend_rel_pixel_color_span_funcs_neon(void)
532{
533 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_p_c_dpan_neon;
534 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pas_c_dpan_neon;
535 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pan_c_dpan_neon;
536 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_p_can_dpan_neon;
537 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pas_can_dpan_neon;
538 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pan_can_dpan_neon;
539 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_p_caa_dpan_neon;
540 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pas_caa_dpan_neon;
541 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pan_caa_dpan_neon;
542}
543#endif
544
545#ifdef BUILD_NEON
546
547#define _op_blend_rel_pt_p_c_dpan_neon _op_blend_pt_p_c_dpan_neon
548#define _op_blend_rel_pt_pas_c_dpan_neon _op_blend_pt_pas_c_dpan_neon
549#define _op_blend_rel_pt_pan_c_dpan_neon _op_blend_pt_pan_c_dpan_neon
550#define _op_blend_rel_pt_p_can_dpan_neon _op_blend_pt_p_can_dpan_neon
551#define _op_blend_rel_pt_pas_can_dpan_neon _op_blend_pt_pas_can_dpan_neon
552#define _op_blend_rel_pt_pan_can_dpan_neon _op_blend_pt_pan_can_dpan_neon
553#define _op_blend_rel_pt_p_caa_dpan_neon _op_blend_pt_p_caa_dpan_neon
554#define _op_blend_rel_pt_pas_caa_dpan_neon _op_blend_pt_pas_caa_dpan_neon
555#define _op_blend_rel_pt_pan_caa_dpan_neon _op_blend_pt_pan_caa_dpan_neon
556
557static void
558init_blend_rel_pixel_color_pt_funcs_neon(void)
559{
560 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_c_dpan_neon;
561 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_c_dpan_neon;
562 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_c_dpan_neon;
563 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_can_dpan_neon;
564 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_can_dpan_neon;
565 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_can_dpan_neon;
566 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_caa_dpan_neon;
567 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_caa_dpan_neon;
568 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_caa_dpan_neon;
569}
570#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 @@
1/* blend pixel x color --> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
7
8 DATA32 alpha;
9
10 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
11
12 LOOP_ALIGNED_U1_A48_SSE3(d, l,
13 { /* UOP */
14
15 DATA32 sc = MUL4_SYM(c, *s);
16 alpha = 256 - (sc >> 24);
17 *d = sc + MUL_256(alpha, *d);
18 d++; s++; l--;
19 },
20 { /* A4OP */
21
22 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
23 __m128i d0 = _mm_load_si128((__m128i *)d);
24
25 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
26 __m128i a0 = sub4_alpha_sse3(sc0);
27 __m128i mul0 = mul_256_sse3(a0, d0);
28
29 d0 = _mm_add_epi32(sc0, mul0);
30
31 _mm_store_si128((__m128i *)d, d0);
32
33 d += 4; s += 4; l -= 4;
34 },
35 { /* A8OP */
36
37 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
38 __m128i d0 = _mm_load_si128((__m128i *)d);
39
40 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
41 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
42
43 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
44 __m128i sc1 = mul4_sym_sse3(c_packed, s1);
45
46 __m128i a0 = sub4_alpha_sse3(sc0);
47 __m128i a1 = sub4_alpha_sse3(sc1);
48
49 __m128i mul0 = mul_256_sse3(a0, d0);
50 __m128i mul1 = mul_256_sse3(a1, d1);
51
52 d0 = _mm_add_epi32(sc0, mul0);
53 d1 = _mm_add_epi32(sc1, mul1);
54
55 _mm_store_si128((__m128i *)d, d0);
56 _mm_store_si128((__m128i *)(d+4), d1);
57
58 d += 8; s += 8; l -= 8;
59 })
60}
61
62static void
63_op_blend_pan_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
64
65 DATA32 c_a = c & 0xFF000000;
66 DATA32 alpha = 256 - (c >> 24);
67
68 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
69 const __m128i c_alpha = _mm_set_epi32(c_a, c_a, c_a, c_a);
70 const __m128i a0 = _mm_set_epi32(alpha, alpha, alpha, alpha);
71
72 LOOP_ALIGNED_U1_A48_SSE3(d, l,
73 { /* UOP */
74
75 *d = ((c & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
76 d++; s++; l--;
77 },
78 { /* A4OP */
79
80 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
81 __m128i d0 = _mm_load_si128((__m128i *)d);
82
83 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
84 mul_256_sse3(a0, d0));
85
86 r0 = _mm_add_epi32(r0, c_alpha);
87
88 _mm_store_si128((__m128i *)d, r0);
89
90 d += 4; s += 4; l -= 4;
91 },
92 { /* A8OP */
93
94 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
95 __m128i d0 = _mm_load_si128((__m128i *)d);
96
97 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
98 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
99
100 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
101 mul_256_sse3(a0, d0));
102
103 __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1),
104 mul_256_sse3(a0, d1));
105
106 r0 = _mm_add_epi32(r0, c_alpha);
107 r1 = _mm_add_epi32(r1, c_alpha);
108
109 _mm_store_si128((__m128i *)d, r0);
110 _mm_store_si128((__m128i *)(d+4), r1);
111
112 d += 8; s += 8; l -= 8;
113 })
114}
115
116static void
117_op_blend_p_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
118
119 int alpha;
120 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
121
122 LOOP_ALIGNED_U1_A48_SSE3(d, l,
123 { /* UOP */
124
125 alpha = 256 - (*s >> 24);
126 *d = ((*s & 0xff000000) + MUL3_SYM(c, *s)) + MUL_256(alpha, *d);
127 d++; s++; l--;
128 },
129 { /* A4OP */
130
131 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
132 __m128i d0 = _mm_load_si128((__m128i *)d);
133
134 __m128i a0 = sub4_alpha_sse3(s0);
135
136 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
137 mul_256_sse3(a0, d0));
138
139 r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3));
140
141 _mm_store_si128((__m128i *)d, r0);
142
143 d += 4; s += 4; l -= 4;
144 },
145 {
146 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
147 __m128i d0 = _mm_load_si128((__m128i *)d);
148
149 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
150 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
151
152 __m128i a0 = sub4_alpha_sse3(s0);
153 __m128i a1 = sub4_alpha_sse3(s1);
154
155 __m128i r0 = _mm_add_epi32(mul3_sym_sse3(c_packed, s0),
156 mul_256_sse3(a0, d0));
157
158 __m128i r1 = _mm_add_epi32(mul3_sym_sse3(c_packed, s1),
159 mul_256_sse3(a1, d1));
160
161 r0 = _mm_add_epi32(r0, _mm_and_si128(s0, A_MASK_SSE3));
162 r1 = _mm_add_epi32(r1, _mm_and_si128(s1, A_MASK_SSE3));
163
164 _mm_store_si128((__m128i *)d, r0);
165 _mm_store_si128((__m128i *)(d+4), r1);
166
167 d += 8; s += 8; l -= 8;
168 })
169}
170
171static void
172_op_blend_pan_can_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
173
174 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
175
176 LOOP_ALIGNED_U1_A48_SSE3(d, l,
177 { /* UOP */
178
179 *d++ = 0xff000000 + MUL3_SYM(c, *s);
180 s++; l--;
181 },
182 { /* A4OP */
183
184 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
185
186 __m128i r0 = mul3_sym_sse3(c_packed, s0);
187 r0 = _mm_add_epi32(r0, A_MASK_SSE3);
188
189 _mm_store_si128((__m128i *)d, r0);
190
191 d += 4; s += 4; l -= 4;
192 },
193 { /* A8OP */
194
195 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
196 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
197
198 __m128i r0 = mul3_sym_sse3(c_packed, s0);
199 __m128i r1 = mul3_sym_sse3(c_packed, s1);
200
201 r0 = _mm_add_epi32(r0, A_MASK_SSE3);
202 r1 = _mm_add_epi32(r1, A_MASK_SSE3);
203
204 _mm_store_si128((__m128i *)d, r0);
205 _mm_store_si128((__m128i *)(d+4), r1);
206
207 d += 8; s += 8; l -= 8;
208 })
209}
210
211static void
212_op_blend_p_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
213
214 int alpha;
215 c = 1 + (c & 0xff);
216 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
217
218 LOOP_ALIGNED_U1_A48_SSE3(d, l,
219 { /* UOP */
220
221 DATA32 sc = MUL_256(c, *s);
222 alpha = 256 - (sc >> 24);
223 *d = sc + MUL_256(alpha, *d);
224 d++;
225 s++;
226 l--;
227 },
228 { /* A4OP */
229
230 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
231 __m128i d0 = _mm_load_si128 ((__m128i *)d);
232
233 __m128i sc0 = mul_256_sse3(c_packed, s0);
234 __m128i a0 = sub4_alpha_sse3(sc0);
235
236 __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0);
237
238 _mm_store_si128((__m128i *)d, r0);
239
240 d += 4; s += 4; l -= 4;
241 },
242 {
243 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
244 __m128i d0 = _mm_load_si128((__m128i *)d);
245
246 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
247 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
248
249 __m128i sc0 = mul_256_sse3(c_packed, s0);
250 __m128i sc1 = mul_256_sse3(c_packed, s1);
251
252 __m128i a0 = sub4_alpha_sse3(sc0);
253 __m128i a1 = sub4_alpha_sse3(sc1);
254
255 __m128i r0 = _mm_add_epi32(mul_256_sse3(a0, d0), sc0);
256 __m128i r1 = _mm_add_epi32(mul_256_sse3(a1, d1), sc1);
257
258 _mm_store_si128((__m128i *)d, r0);
259 _mm_store_si128((__m128i *)(d+4), r1);
260
261 d += 8; s += 8; l -= 8;
262 })
263}
264
265static void
266_op_blend_pan_caa_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
267
268 c = 1 + (c & 0xff);
269 const __m128i c_packed = _mm_set_epi32(c, c, c,c);
270
271 LOOP_ALIGNED_U1_A48_SSE3(d, l,
272 { /* UOP */
273
274 *d = INTERP_256(c, *s, *d);
275 d++; s++; l--;
276 },
277 { /* A4OP */
278
279 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
280 __m128i d0 = _mm_load_si128((__m128i *)d);
281
282 __m128i r0 = interp4_256_sse3(c_packed, s0, d0);
283
284 _mm_store_si128((__m128i *)d, r0);
285
286 d += 4; s += 4; l -= 4;
287 },
288 {
289
290 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
291 __m128i d0 = _mm_load_si128((__m128i *)d);
292
293 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
294 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
295
296 __m128i r0 = interp4_256_sse3(c_packed, s0, d0);
297 __m128i r1 = interp4_256_sse3(c_packed, s1, d1);
298
299 _mm_store_si128((__m128i *)d, r0);
300 _mm_store_si128((__m128i *)(d+4), r1);
301
302 d += 8; s += 8; l -= 8;
303 })
304}
305
306#define _op_blend_pas_c_dp_sse3 _op_blend_p_c_dp_sse3
307#define _op_blend_pas_can_dp_sse3 _op_blend_p_can_dp_sse3
308#define _op_blend_pas_caa_dp_sse3 _op_blend_p_caa_dp_sse3
309
310#define _op_blend_p_c_dpan_sse3 _op_blend_p_c_dp_sse3
311#define _op_blend_pas_c_dpan_sse3 _op_blend_pas_c_dp_sse3
312#define _op_blend_pan_c_dpan_sse3 _op_blend_pan_c_dp_sse3
313#define _op_blend_p_can_dpan_sse3 _op_blend_p_can_dp_sse3
314#define _op_blend_pas_can_dpan_sse3 _op_blend_pas_can_dp_sse3
315#define _op_blend_pan_can_dpan_sse3 _op_blend_pan_can_dp_sse3
316#define _op_blend_p_caa_dpan_sse3 _op_blend_p_caa_dp_sse3
317#define _op_blend_pas_caa_dpan_sse3 _op_blend_pas_caa_dp_sse3
318#define _op_blend_pan_caa_dpan_sse3 _op_blend_pan_caa_dp_sse3
319
320static void
321init_blend_pixel_color_span_funcs_sse3(void)
322{
323 op_blend_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_p_c_dp_sse3;
324 op_blend_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pas_c_dp_sse3;
325 op_blend_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pan_c_dp_sse3;
326 op_blend_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_p_can_dp_sse3;
327 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pas_can_dp_sse3;
328 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pan_can_dp_sse3;
329 op_blend_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_p_caa_dp_sse3;
330 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pas_caa_dp_sse3;
331 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pan_caa_dp_sse3;
332
333 op_blend_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_p_c_dpan_sse3;
334 op_blend_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pas_c_dpan_sse3;
335 op_blend_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pan_c_dpan_sse3;
336 op_blend_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_p_can_dpan_sse3;
337 op_blend_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pas_can_dpan_sse3;
338 op_blend_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pan_can_dpan_sse3;
339 op_blend_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_p_caa_dpan_sse3;
340 op_blend_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pas_caa_dpan_sse3;
341 op_blend_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pan_caa_dpan_sse3;
342}
343
344#define _op_blend_pt_p_c_dp_sse3 NULL
345
346#define _op_blend_pt_pas_c_dp_sse3 _op_blend_pt_p_c_dp_sse3
347#define _op_blend_pt_pan_c_dp_sse3 _op_blend_pt_p_c_dp_sse3
348#define _op_blend_pt_p_can_dp_sse3 _op_blend_pt_p_c_dp_sse3
349#define _op_blend_pt_pas_can_dp_sse3 _op_blend_pt_p_c_dp_sse3
350#define _op_blend_pt_pan_can_dp_sse3 _op_blend_pt_p_c_dp_sse3
351#define _op_blend_pt_p_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3
352#define _op_blend_pt_pas_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3
353#define _op_blend_pt_pan_caa_dp_sse3 _op_blend_pt_p_c_dp_sse3
354
355#define _op_blend_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dp_sse3
356#define _op_blend_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dp_sse3
357#define _op_blend_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dp_sse3
358#define _op_blend_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dp_sse3
359#define _op_blend_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dp_sse3
360#define _op_blend_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dp_sse3
361#define _op_blend_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dp_sse3
362#define _op_blend_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dp_sse3
363#define _op_blend_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dp_sse3
364
365static void
366init_blend_pixel_color_pt_funcs_sse3(void)
367{
368 op_blend_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_p_c_dp_sse3;
369 op_blend_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pas_c_dp_sse3;
370 op_blend_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_pt_pan_c_dp_sse3;
371 op_blend_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_p_can_dp_sse3;
372 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pas_can_dp_sse3;
373 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_pt_pan_can_dp_sse3;
374 op_blend_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_p_caa_dp_sse3;
375 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pas_caa_dp_sse3;
376 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_pt_pan_caa_dp_sse3;
377
378 op_blend_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_p_c_dpan_sse3;
379 op_blend_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pas_c_dpan_sse3;
380 op_blend_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_pt_pan_c_dpan_sse3;
381 op_blend_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_p_can_dpan_sse3;
382 op_blend_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pas_can_dpan_sse3;
383 op_blend_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_pt_pan_can_dpan_sse3;
384 op_blend_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_p_caa_dpan_sse3;
385 op_blend_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pas_caa_dpan_sse3;
386 op_blend_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_pt_pan_caa_dpan_sse3;
387}
388
389/*-----*/
390
391/* blend_rel pixel x color -> dst */
392
393static void
394_op_blend_rel_p_c_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
395
396 int alpha;
397
398 const __m128i c_packed = _mm_set_epi32(c, c, c, c);
399
400 LOOP_ALIGNED_U1_A48_SSE3(d, l,
401 { /* UOP */
402
403 DATA32 sc = MUL4_SYM(c, *s);
404 alpha = 256 - (sc >> 24);
405 *d = MUL_SYM(*d >> 24, sc) + MUL_256(alpha, *d);
406 d++; s++; l--;
407 },
408 { /* A4OP */
409
410 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
411 __m128i d0 = _mm_load_si128((__m128i *)d);
412
413 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
414 __m128i a0 = sub4_alpha_sse3(sc0);
415
416 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0);
417 __m128i r0 = mul_256_sse3(a0, d0);
418
419 r0 = _mm_add_epi32(l0, r0);
420
421 _mm_store_si128((__m128i *)d, r0);
422
423 d += 4; s += 4; l -= 4;
424 },
425 { /* A8OP */
426
427 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
428 __m128i d0 = _mm_load_si128((__m128i *)d);
429
430 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
431 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
432
433 __m128i sc0 = mul4_sym_sse3(c_packed, s0);
434 __m128i sc1 = mul4_sym_sse3(c_packed, s1);
435
436 __m128i a0 = sub4_alpha_sse3(sc0);
437 __m128i a1 = sub4_alpha_sse3(sc1);
438
439 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), sc0);
440 __m128i r0 = mul_256_sse3(a0, d0);
441
442 __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), sc1);
443 __m128i r1 = mul_256_sse3(a1, d1);
444
445 r0 = _mm_add_epi32(l0, r0);
446 r1 = _mm_add_epi32(l1, r1);
447
448 _mm_store_si128((__m128i *)d, r0);
449 _mm_store_si128((__m128i *)(d+4), r1);
450
451 d += 8; s += 8; l -= 8;
452 })
453}
454
455#define _op_blend_rel_pas_c_dp_sse3 _op_blend_rel_p_c_dp_sse3
456#define _op_blend_rel_pan_c_dp_sse3 _op_blend_rel_p_c_dp_sse3
457#define _op_blend_rel_p_can_dp_sse3 _op_blend_rel_p_c_dp_sse3
458#define _op_blend_rel_pas_can_dp_sse3 _op_blend_rel_p_c_dp_sse3
459#define _op_blend_rel_pan_can_dp_sse3 _op_blend_rel_p_c_dp_sse3
460#define _op_blend_rel_p_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3
461#define _op_blend_rel_pas_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3
462#define _op_blend_rel_pan_caa_dp_sse3 _op_blend_rel_p_c_dp_sse3
463
464#define _op_blend_rel_p_c_dpan_sse3 _op_blend_p_c_dpan_sse3
465#define _op_blend_rel_pas_c_dpan_sse3 _op_blend_pas_c_dpan_sse3
466#define _op_blend_rel_pan_c_dpan_sse3 _op_blend_pan_c_dpan_sse3
467#define _op_blend_rel_p_can_dpan_sse3 _op_blend_p_can_dpan_sse3
468#define _op_blend_rel_pas_can_dpan_sse3 _op_blend_pas_can_dpan_sse3
469#define _op_blend_rel_pan_can_dpan_sse3 _op_blend_pan_can_dpan_sse3
470#define _op_blend_rel_p_caa_dpan_sse3 _op_blend_p_caa_dpan_sse3
471#define _op_blend_rel_pas_caa_dpan_sse3 _op_blend_pas_caa_dpan_sse3
472#define _op_blend_rel_pan_caa_dpan_sse3 _op_blend_pan_caa_dpan_sse3
473
474static void
475init_blend_rel_pixel_color_span_funcs_sse3(void)
476{
477 op_blend_rel_span_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_p_c_dp_sse3;
478 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pas_c_dp_sse3;
479 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pan_c_dp_sse3;
480 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_p_can_dp_sse3;
481 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pas_can_dp_sse3;
482 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pan_can_dp_sse3;
483 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_p_caa_dp_sse3;
484 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pas_caa_dp_sse3;
485 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pan_caa_dp_sse3;
486
487 op_blend_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_p_c_dpan_sse3;
488 op_blend_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pas_c_dpan_sse3;
489 op_blend_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pan_c_dpan_sse3;
490 op_blend_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_p_can_dpan_sse3;
491 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pas_can_dpan_sse3;
492 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pan_can_dpan_sse3;
493 op_blend_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_p_caa_dpan_sse3;
494 op_blend_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pas_caa_dpan_sse3;
495 op_blend_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pan_caa_dpan_sse3;
496}
497
498#define _op_blend_rel_pt_p_c_dp_sse3 NULL
499
500#define _op_blend_rel_pt_pas_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
501#define _op_blend_rel_pt_pan_c_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
502#define _op_blend_rel_pt_p_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
503#define _op_blend_rel_pt_pas_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
504#define _op_blend_rel_pt_pan_can_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
505#define _op_blend_rel_pt_p_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
506#define _op_blend_rel_pt_pas_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
507#define _op_blend_rel_pt_pan_caa_dp_sse3 _op_blend_rel_pt_p_c_dp_sse3
508
509#define _op_blend_rel_pt_p_c_dpan_sse3 _op_blend_pt_p_c_dpan_sse3
510#define _op_blend_rel_pt_pas_c_dpan_sse3 _op_blend_pt_pas_c_dpan_sse3
511#define _op_blend_rel_pt_pan_c_dpan_sse3 _op_blend_pt_pan_c_dpan_sse3
512#define _op_blend_rel_pt_p_can_dpan_sse3 _op_blend_pt_p_can_dpan_sse3
513#define _op_blend_rel_pt_pas_can_dpan_sse3 _op_blend_pt_pas_can_dpan_sse3
514#define _op_blend_rel_pt_pan_can_dpan_sse3 _op_blend_pt_pan_can_dpan_sse3
515#define _op_blend_rel_pt_p_caa_dpan_sse3 _op_blend_pt_p_caa_dpan_sse3
516#define _op_blend_rel_pt_pas_caa_dpan_sse3 _op_blend_pt_pas_caa_dpan_sse3
517#define _op_blend_rel_pt_pan_caa_dpan_sse3 _op_blend_pt_pan_caa_dpan_sse3
518
519static void
520init_blend_rel_pixel_color_pt_funcs_sse3(void)
521{
522 op_blend_rel_pt_funcs[SP][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_p_c_dp_sse3;
523 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pas_c_dp_sse3;
524 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_SSE3] = _op_blend_rel_pt_pan_c_dp_sse3;
525 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_p_can_dp_sse3;
526 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pas_can_dp_sse3;
527 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_SSE3] = _op_blend_rel_pt_pan_can_dp_sse3;
528 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_p_caa_dp_sse3;
529 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dp_sse3;
530 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dp_sse3;
531
532 op_blend_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_c_dpan_sse3;
533 op_blend_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_c_dpan_sse3;
534 op_blend_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_c_dpan_sse3;
535 op_blend_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_can_dpan_sse3;
536 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_can_dpan_sse3;
537 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_can_dpan_sse3;
538 op_blend_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_caa_dpan_sse3;
539 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_caa_dpan_sse3;
540 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_caa_dpan_sse3;
541}
542
543#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 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_256, mm6)
9 while (d < e)
10 {
11 MOV_P2R(*s, mm2, mm0)
12 MOV_RA2R(mm2, mm1)
13 movq_r2r(mm6, mm3);
14 psubw_r2r(mm1, mm3);
15
16 MOV_P2R(*d, mm1, mm0)
17 MUL4_256_R2R(mm3, mm1)
18
19 paddw_r2r(mm2, mm1);
20 MOV_R2P(mm1, *d, mm0)
21 s++; d++;
22 }
23}
24
25static void
26_op_blend_pas_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
27 _op_blend_p_dp_mmx(s, m, c, d, l);
28 return;
29 DATA32 *e = d + l;
30 pxor_r2r(mm0, mm0);
31 MOV_A2R(ALPHA_256, mm6)
32 while (d < e)
33 {
34 switch (*s & 0xff000000)
35 {
36 case 0:
37 break;
38 case 0xff000000:
39 *d = *s;
40 break;
41 default :
42 MOV_P2R(*s, mm2, mm0)
43 MOV_RA2R(mm2, mm1)
44 movq_r2r(mm6, mm3);
45 psubw_r2r(mm1, mm3);
46
47 MOV_P2R(*d, mm1, mm0)
48 MUL4_256_R2R(mm3, mm1)
49
50 paddw_r2r(mm2, mm1);
51 MOV_R2P(mm1, *d, mm0)
52 break;
53 }
54 s++; d++;
55 }
56}
57
58#define _op_blend_pan_dp_mmx NULL
59
60#define _op_blend_p_dpan_mmx _op_blend_p_dp_mmx
61#define _op_blend_pas_dpan_mmx _op_blend_pas_dp_mmx
62#define _op_blend_pan_dpan_mmx _op_blend_pan_dp_mmx
63
64static void
65init_blend_pixel_span_funcs_mmx(void)
66{
67 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_p_dp_mmx;
68 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pas_dp_mmx;
69 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pan_dp_mmx;
70
71 op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_p_dpan_mmx;
72 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_dpan_mmx;
73 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_dpan_mmx;
74}
75#endif
76
77#ifdef BUILD_MMX
78static void
79_op_blend_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
80 pxor_r2r(mm0, mm0);
81 MOV_A2R(ALPHA_256, mm6)
82 MOV_P2R(s, mm2, mm0)
83 MOV_RA2R(mm2, mm1)
84 movq_r2r(mm6, mm3);
85 psubw_r2r(mm1, mm3);
86
87 MOV_P2R(*d, mm1, mm0)
88 MUL4_256_R2R(mm3, mm1)
89
90 paddw_r2r(mm2, mm1);
91 MOV_R2P(mm1, *d, mm0)
92}
93
94
95#define _op_blend_pt_pan_dp_mmx NULL
96#define _op_blend_pt_pas_dp_mmx _op_blend_pt_p_dp_mmx
97
98#define _op_blend_pt_p_dpan_mmx _op_blend_pt_p_dp_mmx
99#define _op_blend_pt_pan_dpan_mmx _op_blend_pt_pan_dp_mmx
100#define _op_blend_pt_pas_dpan_mmx _op_blend_pt_pas_dp_mmx
101
102static void
103init_blend_pixel_pt_funcs_mmx(void)
104{
105 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_p_dp_mmx;
106 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_dp_mmx;
107 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_dp_mmx;
108
109 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_dpan_mmx;
110 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_dpan_mmx;
111 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_dpan_mmx;
112}
113#endif
114
115/*-----*/
116
117/* blend_rel pixel -> dst */
118
119#ifdef BUILD_MMX
120static void
121_op_blend_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
122 DATA32 *e = d + l;
123 pxor_r2r(mm0, mm0);
124 MOV_A2R(ALPHA_256, mm6)
125 MOV_A2R(ALPHA_255, mm5)
126 while (d < e)
127 {
128 MOV_P2R(*s, mm2, mm0)
129 MOV_RA2R(mm2, mm1)
130 movq_r2r(mm6, mm3);
131 psubw_r2r(mm1, mm3);
132
133 MOV_P2R(*d, mm1, mm0)
134 MOV_RA2R(mm1, mm4)
135 MUL4_256_R2R(mm3, mm1)
136
137 MUL4_SYM_R2R(mm4, mm2, mm5)
138 paddw_r2r(mm2, mm1);
139 MOV_R2P(mm1, *d, mm0)
140 s++; d++;
141 }
142}
143
144static void
145_op_blend_rel_pan_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
146 DATA32 *e = d + l;
147 pxor_r2r(mm0, mm0);
148 MOV_A2R(ALPHA_256, mm6)
149 MOV_A2R(ALPHA_255, mm5)
150 while (d < e)
151 {
152 MOV_P2R(*s, mm2, mm0)
153 MOV_PA2R(*d, mm1)
154 MUL4_SYM_R2R(mm2, mm1, mm5)
155 MOV_R2P(mm1, *d, mm0)
156 s++; d++;
157 }
158}
159
160#define _op_blend_rel_pas_dp_mmx _op_blend_rel_p_dp_mmx
161
162#define _op_blend_rel_p_dpan_mmx _op_blend_p_dpan_mmx
163#define _op_blend_rel_pan_dpan_mmx _op_blend_pan_dpan_mmx
164#define _op_blend_rel_pas_dpan_mmx _op_blend_pas_dpan_mmx
165
166static void
167init_blend_rel_pixel_span_funcs_mmx(void)
168{
169 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_p_dp_mmx;
170 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pas_dp_mmx;
171 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pan_dp_mmx;
172
173 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_dpan_mmx;
174 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_dpan_mmx;
175 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_dpan_mmx;
176}
177#endif
178
179#ifdef BUILD_MMX
180static void
181_op_blend_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
182 pxor_r2r(mm0, mm0);
183 MOV_A2R(ALPHA_256, mm6)
184 MOV_A2R(ALPHA_255, mm5)
185
186 MOV_P2R(s, mm2, mm0)
187 MOV_RA2R(mm2, mm1)
188 psubw_r2r(mm1, mm6);
189
190 MOV_P2R(*d, mm1, mm0)
191 MOV_RA2R(mm1, mm4)
192 MUL4_256_R2R(mm6, mm1)
193
194 MUL4_SYM_R2R(mm4, mm2, mm5)
195 paddw_r2r(mm2, mm1);
196 MOV_R2P(mm1, *d, mm0)
197}
198
199#define _op_blend_rel_pt_pas_dp_mmx _op_blend_rel_pt_p_dp_mmx
200#define _op_blend_rel_pt_pan_dp_mmx _op_blend_rel_pt_p_dp_mmx
201
202#define _op_blend_rel_pt_p_dpan_mmx _op_blend_pt_p_dpan_mmx
203#define _op_blend_rel_pt_pas_dpan_mmx _op_blend_pt_pas_dpan_mmx
204#define _op_blend_rel_pt_pan_dpan_mmx _op_blend_pt_pan_dpan_mmx
205
206static void
207init_blend_rel_pixel_pt_funcs_mmx(void)
208{
209 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_p_dp_mmx;
210 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pas_dp_mmx;
211 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_blend_rel_pt_pan_dp_mmx;
212
213 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_dpan_mmx;
214 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_dpan_mmx;
215 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_dpan_mmx;
216}
217#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 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_blend_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 alpha = *m;
11 switch(alpha)
12 {
13 case 0:
14 break;
15 case 255:
16 alpha = 256 - (*s >> 24);
17 *d = *s + MUL_256(alpha, *d);
18 break;
19 default:
20 c = MUL_SYM(alpha, *s);
21 alpha = 256 - (c >> 24);
22 *d = c + MUL_256(alpha, *d);
23 break;
24 }
25 m++; s++; d++;
26 });
27}
28
29static void
30_op_blend_pas_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
31 DATA32 *e;
32 int alpha;
33 UNROLL8_PLD_WHILE(d, l, e,
34 {
35 alpha = *m;
36 switch(alpha)
37 {
38 case 0:
39 break;
40 case 255:
41 *d = *s;
42 break;
43 default:
44 alpha++;
45 *d = INTERP_256(alpha, *s, *d);
46 break;
47 }
48 m++; s++; d++;
49 });
50}
51
52static void
53_op_blend_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
54 DATA32 *e;
55 int alpha;
56 UNROLL8_PLD_WHILE(d, l, e,
57 {
58 alpha = *m;
59 switch(alpha)
60 {
61 case 0:
62 break;
63 case 255:
64 *d = *s;
65 break;
66 default:
67 alpha++;
68 *d = INTERP_256(alpha, *s, *d);
69 break;
70 }
71 m++; s++; d++;
72 });
73}
74
75
76#define _op_blend_p_mas_dpan _op_blend_p_mas_dp
77#define _op_blend_pas_mas_dpan _op_blend_pas_mas_dp
78#define _op_blend_pan_mas_dpan _op_blend_pan_mas_dp
79
80static void
81init_blend_pixel_mask_span_funcs_c(void)
82{
83 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_p_mas_dp;
84 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pas_mas_dp;
85 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pan_mas_dp;
86
87 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_p_mas_dpan;
88 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pas_mas_dpan;
89 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pan_mas_dpan;
90}
91#endif
92
93#ifdef BUILD_C
94static void
95_op_blend_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
96 s = MUL_SYM(m, s);
97 c = 256 - (s >> 24);
98 *d = s + MUL_256(c, *d);
99}
100
101static void
102_op_blend_pt_pan_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
103 *d = INTERP_256(m + 1, s, *d);
104}
105
106#define _op_blend_pt_pas_mas_dp _op_blend_pt_p_mas_dp
107
108#define _op_blend_pt_p_mas_dpan _op_blend_pt_p_mas_dp
109#define _op_blend_pt_pas_mas_dpan _op_blend_pt_pas_mas_dp
110#define _op_blend_pt_pan_mas_dpan _op_blend_pt_pan_mas_dp
111
112static void
113init_blend_pixel_mask_pt_funcs_c(void)
114{
115 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_p_mas_dp;
116 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pas_mas_dp;
117 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_pt_pan_mas_dp;
118
119 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_p_mas_dpan;
120 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pas_mas_dpan;
121 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_pt_pan_mas_dpan;
122}
123#endif
124
125/*-----*/
126
127/* blend_rel pixel x mask -> dst */
128
129#ifdef BUILD_C
130static void
131_op_blend_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
132 DATA32 *e;
133 int alpha;
134 UNROLL8_PLD_WHILE(d, l, e,
135 {
136 c = MUL_SYM(*m, *s);
137 alpha = 256 - (c >> 24);
138 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
139 d++; m++; s++;
140 });
141}
142
143#define _op_blend_rel_pas_mas_dp _op_blend_rel_p_mas_dp
144#define _op_blend_rel_pan_mas_dp _op_blend_rel_p_mas_dp
145
146#define _op_blend_rel_p_mas_dpan _op_blend_p_mas_dpan
147#define _op_blend_rel_pas_mas_dpan _op_blend_pas_mas_dpan
148#define _op_blend_rel_pan_mas_dpan _op_blend_pan_mas_dpan
149
150static void
151init_blend_rel_pixel_mask_span_funcs_c(void)
152{
153 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_p_mas_dp;
154 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pas_mas_dp;
155 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pan_mas_dp;
156
157 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_p_mas_dpan;
158 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pas_mas_dpan;
159 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pan_mas_dpan;
160}
161#endif
162
163#ifdef BUILD_C
164static void
165_op_blend_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
166 s = MUL_SYM(m, s);
167 c = 256 - (s >> 24);
168 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
169}
170
171#define _op_blend_rel_pt_pas_mas_dp _op_blend_rel_pt_p_mas_dp
172#define _op_blend_rel_pt_pan_mas_dp _op_blend_rel_pt_p_mas_dp
173
174#define _op_blend_rel_pt_p_mas_dpan _op_blend_pt_p_mas_dpan
175#define _op_blend_rel_pt_pas_mas_dpan _op_blend_pt_pas_mas_dpan
176#define _op_blend_rel_pt_pan_mas_dpan _op_blend_pt_pan_mas_dpan
177
178static void
179init_blend_rel_pixel_mask_pt_funcs_c(void)
180{
181 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_p_mas_dp;
182 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pas_mas_dp;
183 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_blend_rel_pt_pan_mas_dp;
184
185 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_p_mas_dpan;
186 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pas_mas_dpan;
187 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_blend_rel_pt_pan_mas_dpan;
188}
189#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 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_blend_pas_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_256, mm6)
9 while (d < e) {
10 l = (*s >> 24);
11 switch(*m & l)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 l = 1 + *m;
20 MOV_A2R(l, mm3)
21 MOV_P2R(*s, mm2, mm0)
22 MUL4_256_R2R(mm3, mm2)
23
24 MOV_RA2R(mm2, mm1)
25 movq_r2r(mm6, mm3);
26 psubw_r2r(mm1, mm3);
27
28 MOV_P2R(*d, mm1, mm0)
29 MUL4_256_R2R(mm3, mm1)
30
31 paddw_r2r(mm2, mm1);
32 MOV_R2P(mm1, *d, mm0)
33 break;
34 }
35 m++; s++; d++;
36 }
37}
38
39static void
40_op_blend_pan_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
41 DATA32 *e = d + l;
42 MOV_A2R(ALPHA_255, mm5)
43 pxor_r2r(mm0, mm0);
44 while (d < e) {
45 l = *m;
46 switch(l)
47 {
48 case 0:
49 break;
50 case 255:
51 *d = *s;
52 break;
53 default:
54 l++;
55 MOV_A2R(l, mm3)
56 MOV_P2R(*s, mm2, mm0)
57 MOV_P2R(*d, mm1, mm0)
58 INTERP_256_R2R(mm3, mm2, mm1, mm5)
59 MOV_R2P(mm1, *d, mm0)
60 break;
61 }
62 m++; s++; d++;
63 }
64}
65
66#define _op_blend_p_mas_dp_mmx _op_blend_pas_mas_dp_mmx
67
68#define _op_blend_p_mas_dpan_mmx _op_blend_p_mas_dp_mmx
69#define _op_blend_pan_mas_dpan_mmx _op_blend_pan_mas_dp_mmx
70#define _op_blend_pas_mas_dpan_mmx _op_blend_pas_mas_dp_mmx
71
72static void
73init_blend_pixel_mask_span_funcs_mmx(void)
74{
75 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_p_mas_dp_mmx;
76 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pas_mas_dp_mmx;
77 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pan_mas_dp_mmx;
78
79 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_p_mas_dpan_mmx;
80 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pas_mas_dpan_mmx;
81 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pan_mas_dpan_mmx;
82}
83#endif
84
85#ifdef BUILD_MMX
86static void
87_op_blend_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
88 c = m + 1;
89 MOV_A2R(c, mm3)
90 pxor_r2r(mm0, mm0);
91 MOV_A2R(ALPHA_256, mm6)
92 MOV_P2R(s, mm2, mm0)
93 MUL4_256_R2R(mm3, mm2)
94
95 MOV_RA2R(mm2, mm1)
96 psubw_r2r(mm1, mm6);
97
98 MOV_P2R(*d, mm1, mm0)
99 MUL4_256_R2R(mm6, mm1)
100
101 paddw_r2r(mm2, mm1);
102 MOV_R2P(mm1, *d, mm0)
103}
104
105#define _op_blend_pt_pan_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx
106#define _op_blend_pt_pas_mas_dp_mmx _op_blend_pt_p_mas_dp_mmx
107
108#define _op_blend_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dp_mmx
109#define _op_blend_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dp_mmx
110#define _op_blend_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dp_mmx
111
112static void
113init_blend_pixel_mask_pt_funcs_mmx(void)
114{
115 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_p_mas_dp_mmx;
116 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pas_mas_dp_mmx;
117 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_blend_pt_pan_mas_dp_mmx;
118
119 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_p_mas_dpan_mmx;
120 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pas_mas_dpan_mmx;
121 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_pt_pan_mas_dpan_mmx;
122}
123#endif
124
125/*-----*/
126
127/* blend_rel pixel x mask -> dst */
128
129#ifdef BUILD_MMX
130
131#define _op_blend_rel_p_mas_dpan_mmx _op_blend_p_mas_dpan_mmx
132#define _op_blend_rel_pas_mas_dpan_mmx _op_blend_pas_mas_dpan_mmx
133#define _op_blend_rel_pan_mas_dpan_mmx _op_blend_pan_mas_dpan_mmx
134
135static void
136init_blend_rel_pixel_mask_span_funcs_mmx(void)
137{
138 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_p_mas_dpan_mmx;
139 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pas_mas_dpan_mmx;
140 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pan_mas_dpan_mmx;
141}
142#endif
143
144#ifdef BUILD_MMX
145
146#define _op_blend_rel_pt_p_mas_dpan_mmx _op_blend_pt_p_mas_dpan_mmx
147#define _op_blend_rel_pt_pas_mas_dpan_mmx _op_blend_pt_pas_mas_dpan_mmx
148#define _op_blend_rel_pt_pan_mas_dpan_mmx _op_blend_pt_pan_mas_dpan_mmx
149
150static void
151init_blend_rel_pixel_mask_pt_funcs_mmx(void)
152{
153 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_p_mas_dpan_mmx;
154 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pas_mas_dpan_mmx;
155 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_blend_rel_pt_pan_mas_dpan_mmx;
156}
157#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 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_blend_pas_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e;
7 int alpha;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 alpha = *m;
11 switch(alpha)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 alpha++;
20 *d = INTERP_256(alpha, *s, *d);
21 break;
22 }
23 m++; s++; d++;
24 });
25}
26
27static void
28_op_blend_pan_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
29 DATA32 *e;
30 int alpha;
31 UNROLL8_PLD_WHILE(d, l, e,
32 {
33 alpha = *m;
34 switch(alpha)
35 {
36 case 0:
37 break;
38 case 255:
39 *d = *s;
40 break;
41 default:
42 alpha++;
43 *d = INTERP_256(alpha, *s, *d);
44 break;
45 }
46 m++; s++; d++;
47 });
48}
49
50#define _op_blend_p_mas_dp_neon _op_blend_pas_mas_dp_neon
51
52#define _op_blend_p_mas_dpan_neon _op_blend_p_mas_dp_neon
53#define _op_blend_pan_mas_dpan_neon _op_blend_pan_mas_dp_neon
54#define _op_blend_pas_mas_dpan_neon _op_blend_pas_mas_dp_neon
55
56static void
57init_blend_pixel_mask_span_funcs_neon(void)
58{
59 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_p_mas_dp_neon;
60 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pas_mas_dp_neon;
61 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pan_mas_dp_neon;
62
63 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_p_mas_dpan_neon;
64 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_mas_dpan_neon;
65 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_mas_dpan_neon;
66}
67#endif
68
69#ifdef BUILD_NEON
70static void
71_op_blend_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
72 s = MUL_SYM(m, s);
73 c = 256 - (s >> 24);
74 *d = s + MUL_256(c, *d);
75}
76
77#define _op_blend_pt_pan_mas_dp_neon _op_blend_pt_p_mas_dp_neon
78#define _op_blend_pt_pas_mas_dp_neon _op_blend_pt_p_mas_dp_neon
79
80#define _op_blend_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dp_neon
81#define _op_blend_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dp_neon
82#define _op_blend_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dp_neon
83
84static void
85init_blend_pixel_mask_pt_funcs_neon(void)
86{
87 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_p_mas_dp_neon;
88 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_mas_dp_neon;
89 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_mas_dp_neon;
90
91 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_mas_dpan_neon;
92 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_mas_dpan_neon;
93 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_mas_dpan_neon;
94}
95#endif
96
97/*-----*/
98
99/* blend_rel pixel x mask -> dst */
100
101#ifdef BUILD_NEON
102
103#define _op_blend_rel_p_mas_dpan_neon _op_blend_p_mas_dpan_neon
104#define _op_blend_rel_pas_mas_dpan_neon _op_blend_pas_mas_dpan_neon
105#define _op_blend_rel_pan_mas_dpan_neon _op_blend_pan_mas_dpan_neon
106
107static void
108init_blend_rel_pixel_mask_span_funcs_neon(void)
109{
110 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_mas_dpan_neon;
111 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_mas_dpan_neon;
112 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_mas_dpan_neon;
113}
114#endif
115
116#ifdef BUILD_NEON
117
118#define _op_blend_rel_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dpan_neon
119#define _op_blend_rel_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dpan_neon
120#define _op_blend_rel_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dpan_neon
121
122static void
123init_blend_rel_pixel_mask_pt_funcs_neon(void)
124{
125 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_mas_dpan_neon;
126 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_mas_dpan_neon;
127 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_mas_dpan_neon;
128}
129#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 @@
1/* blend pixel x mask --> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
7
8 int alpha;
9
10 LOOP_ALIGNED_U1_A48_SSE3(d, l,
11 { /* UOP */
12
13 alpha = *m;
14 c = MUL_SYM(alpha, *s);
15 alpha = 256 - (c >> 24);
16 *d = c + MUL_256(alpha, *d);
17 m++; s++; d++; l--;
18 },
19 { /* A4OP */
20
21 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
22 __m128i d0 = _mm_load_si128((__m128i *)d);
23 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
24
25 __m128i c0 = mul_sym_sse3(m0, s0);
26 __m128i a0 = sub4_alpha_sse3(c0);
27 __m128i r0 = mul_256_sse3(a0, d0);
28
29 r0 = _mm_add_epi32(r0, c0);
30
31 _mm_store_si128((__m128i *)d, r0);
32
33 m += 4; s += 4; d += 4; l -= 4;
34 },
35 { /* A8OP */
36
37 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
38 __m128i d0 = _mm_load_si128((__m128i *)d);
39 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
40
41 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
42 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
43 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
44
45 __m128i c0 = mul_sym_sse3(m0, s0);
46 __m128i c1 = mul_sym_sse3(m1, s1);
47
48 __m128i a0 = sub4_alpha_sse3(c0);
49 __m128i a1 = sub4_alpha_sse3(c1);
50
51 __m128i r0 = mul_256_sse3(a0, d0);
52 __m128i r1 = mul_256_sse3(a1, d1);
53
54 r0 = _mm_add_epi32(r0, c0);
55 r1 = _mm_add_epi32(r1, c1);
56
57 _mm_store_si128((__m128i *)d, r0);
58 _mm_store_si128((__m128i *)(d+4), r1);
59
60 m += 8; s += 8; d += 8; l -= 8;
61 })
62}
63
64static void
65_op_blend_pas_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
66
67 const __m128i ones = _mm_set_epi32(1, 1, 1, 1);
68 int alpha;
69
70 LOOP_ALIGNED_U1_A48_SSE3(d, l,
71 { /* UOP */
72
73 alpha = *m;
74 switch(alpha)
75 {
76 case 0:
77 break;
78 case 255:
79 *d = *s;
80 break;
81 default:
82 alpha++;
83 *d = INTERP_256(alpha, *s, *d);
84 break;
85 }
86 m++; s++; d++; l--;
87 },
88 { /*A4OP */
89
90 if ((m[3] | m[2] | m[1] | m[0]) == 0) {
91 m += 4; s += 4; d += 4; l -= 4;
92 continue;
93 }
94
95 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
96 __m128i d0 = _mm_load_si128((__m128i *)d);
97 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
98
99 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
100
101 m0 = _mm_add_epi32(m0, ones);
102
103 __m128i r0 = interp4_256_sse3(m0, s0, d0);
104
105 r0 = _mm_and_si128(~zm0, r0);
106 d0 = _mm_and_si128(zm0, d0);
107
108 d0 = _mm_add_epi32(r0, d0);
109
110 _mm_store_si128((__m128i *)d, d0);
111
112 m += 4; s += 4; d += 4; l -= 4;
113 },
114 { /* A8OP */
115
116 if ((m[7] | m[6] | m[5] | m[4] | m[3] | m[2] | m[1] | m[0]) == 0) {
117 m += 8; s += 8; d += 8; l -= 8;
118 continue;
119 }
120
121 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
122 __m128i d0 = _mm_load_si128((__m128i *)d);
123 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
124
125 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
126 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
127 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
128
129 __m128i zm0 = _mm_cmpeq_epi32(m0, _mm_setzero_si128());
130 __m128i zm1 = _mm_cmpeq_epi32(m1, _mm_setzero_si128());
131
132 m0 = _mm_add_epi32(m0, ones);
133 m1 = _mm_add_epi32(m1, ones);
134
135 __m128i r0 = interp4_256_sse3(m0, s0, d0);
136 __m128i r1 = interp4_256_sse3(m1, s1, d1);
137
138 r0 = _mm_and_si128(~zm0, r0);
139 d0 = _mm_and_si128(zm0, d0);
140
141 r1 = _mm_and_si128(~zm1, r1);
142 d1 = _mm_and_si128(zm1, d1);
143
144 d0 = _mm_add_epi32(d0, r0);
145 d1 = _mm_add_epi32(d1, r1);
146
147 _mm_store_si128((__m128i *)d, d0);
148 _mm_store_si128((__m128i *)(d+4), d1);
149
150 m += 8; s += 8; d += 8; l -= 8;
151 })
152}
153
154#define _op_blend_pan_mas_dp_sse3 _op_blend_pas_mas_dp_sse3
155
156#define _op_blend_p_mas_dpan_sse3 _op_blend_p_mas_dp_sse3
157#define _op_blend_pas_mas_dpan_sse3 _op_blend_pas_mas_dp_sse3
158#define _op_blend_pan_mas_dpan_sse3 _op_blend_pan_mas_dp_sse3
159
160static void
161init_blend_pixel_mask_span_funcs_sse3(void)
162{
163 op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_p_mas_dp_sse3;
164 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pas_mas_dp_sse3;
165 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pan_mas_dp_sse3;
166
167 op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_mas_dpan_sse3;
168 op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_mas_dpan_sse3;
169 op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_mas_dpan_sse3;
170}
171
172#define _op_blend_pt_p_mas_dp_sse3 NULL
173#define _op_blend_pt_pan_mas_dp_sse3 NULL
174
175#define _op_blend_pt_pas_mas_dp_sse3 _op_blend_pt_p_mas_dp_sse3
176
177#define _op_blend_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dp_sse3
178#define _op_blend_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dp_sse3
179#define _op_blend_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dp_sse3
180
181static void
182init_blend_pixel_mask_pt_funcs_sse3(void)
183{
184 op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_mas_dp_sse3;
185 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_mas_dp_sse3;
186 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_mas_dp_sse3;
187
188 op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_mas_dpan_sse3;
189 op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_mas_dpan_sse3;
190 op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_mas_dpan_sse3;
191}
192
193/*-----*/
194
195/* blend_rel pixel x mask -> dst */
196
197static void
198_op_blend_rel_p_mas_dp_sse3(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
199
200 int alpha;
201
202 LOOP_ALIGNED_U1_A48_SSE3(d, l,
203 { /* UOP */
204
205 c = MUL_SYM(*m, *s);
206 alpha = 256 - (c >> 24);
207 *d = MUL_SYM(*d >> 24, c) + MUL_256(alpha, *d);
208 d++; m++; s++; l--;
209 },
210 { /* A4OP */
211
212 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
213 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
214 __m128i d0 = _mm_load_si128((__m128i *)d);
215
216 __m128i c0 = mul_sym_sse3(m0, s0);
217 __m128i a0 = sub4_alpha_sse3(c0);
218
219 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0);
220 __m128i r0 = mul_256_sse3(a0, d0);
221
222 d0 = _mm_add_epi32(l0, r0);
223
224 _mm_store_si128((__m128i *)d, d0);
225
226 d += 4; m += 4; s += 4; l -= 4;
227 },
228 { /* A8OP */
229
230 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
231 __m128i m0 = _mm_set_epi32(m[3], m[2], m[1], m[0]);
232 __m128i d0 = _mm_load_si128((__m128i *)d);
233
234 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
235 __m128i m1 = _mm_set_epi32(m[7], m[6], m[5], m[4]);
236 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
237
238 __m128i c0 = mul_sym_sse3(m0, s0);
239 __m128i c1 = mul_sym_sse3(m1, s1);
240
241 __m128i a0 = sub4_alpha_sse3(c0);
242 __m128i a1 = sub4_alpha_sse3(c1);
243
244 __m128i l0 = mul_sym_sse3(_mm_srli_epi32(d0, 24), c0);
245 __m128i r0 = mul_256_sse3(a0, d0);
246
247 __m128i l1 = mul_sym_sse3(_mm_srli_epi32(d1, 24), c1);
248 __m128i r1 = mul_256_sse3(a1, d1);
249
250 d0 = _mm_add_epi32(l0, r0);
251 d1 = _mm_add_epi32(l1, r1);
252
253 _mm_store_si128((__m128i *)d, d0);
254 _mm_store_si128((__m128i *)(d+4), d1);
255
256 d += 8; m += 8; s += 8; l -= 8;
257 })
258}
259
260#define _op_blend_rel_pas_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3
261#define _op_blend_rel_pan_mas_dp_sse3 _op_blend_rel_p_mas_dp_sse3
262
263#define _op_blend_rel_p_mas_dpan_sse3 _op_blend_p_mas_dpan_sse3
264#define _op_blend_rel_pas_mas_dpan_sse3 _op_blend_pas_mas_dpan_sse3
265#define _op_blend_rel_pan_mas_dpan_sse3 _op_blend_pan_mas_dpan_sse3
266
267static void
268init_blend_rel_pixel_mask_span_funcs_sse3(void)
269{
270 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_mas_dp_sse3;
271 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_mas_dp_sse3;
272 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_mas_dp_sse3;
273
274 op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_mas_dpan_sse3;
275 op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_mas_dpan_sse3;
276 op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_mas_dpan_sse3;
277}
278
279#define _op_blend_rel_pt_p_mas_dp_sse3 NULL
280
281#define _op_blend_rel_pt_pas_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3
282#define _op_blend_rel_pt_pan_mas_dp_sse3 _op_blend_rel_pt_p_mas_dp_sse3
283
284#define _op_blend_rel_pt_p_mas_dpan_sse3 _op_blend_pt_p_mas_dpan_sse3
285#define _op_blend_rel_pt_pas_mas_dpan_sse3 _op_blend_pt_pas_mas_dpan_sse3
286#define _op_blend_rel_pt_pan_mas_dpan_sse3 _op_blend_pt_pan_mas_dpan_sse3
287
288static void
289init_blend_rel_pixel_mask_pt_funcs_sse3(void)
290{
291 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_mas_dp_sse3;
292 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dp_sse3;
293 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dp_sse3;
294
295 op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_mas_dpan_sse3;
296 op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_mas_dpan_sse3;
297 op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_mas_dpan_sse3;
298}
299
300#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 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_blend_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6#define AP "blend_p_dp_"
7 asm volatile (
8 ".fpu neon \n\t"
9 //** init
10 "vmov.i8 q8, $0x1 \n\t"
11
12 AP "loopchoose: \n\t"
13 // If aligned already - straight to octs
14 "andS %[tmp], %[d],$0x1f \n\t"
15 "beq "AP"octloops \n\t"
16
17 "andS %[tmp], %[d],$0xf \n\t"
18 "beq "AP"quadloops \n\t"
19
20 "andS %[tmp], %[d],$0x4 \n\t"
21 "beq "AP"dualloop \n\t"
22
23 // Only ever executes once, fall through to dual
24 AP "singleloop: \n\t"
25 "vld1.32 d0[0], [%[s]]! \n\t"
26 "vld1.32 d4[0], [%[d]] \n\t"
27
28 "vmvn.u8 d8, d0 \n\t"
29 "vshr.u32 d8, d8, #24 \n\t"
30
31 "vmul.u32 d8, d16, d8 \n\t"
32
33 "vmull.u8 q6, d4,d8 \n\t"
34 "vqrshrn.u16 d8, q6, #8 \n\t"
35 // Add to 's'
36 "vqadd.u8 q2, q4,q0 \n\t"
37
38 "vst1.32 d4[0], [%[d]] \n\t"
39 "add %[d], #4 \n\t"
40
41 // Can we go the fast path?
42 "andS %[tmp], %[d],$0x1f \n\t"
43 "beq "AP"octloops \n\t"
44
45 "andS %[tmp], %[d],$0x0f \n\t"
46 "beq "AP"quadloops \n\t"
47
48
49 AP "dualloop: \n\t"
50 "sub %[tmp], %[e], %[d] \n\t"
51 "cmp %[tmp], #32 \n\t"
52 "blt "AP"loopout \n\t"
53
54 AP "dualloopint: \n\t"
55 //** Dual Loop
56 "vldm %[s]!, {d0} \n\t"
57 "vldr d4, [%[d]] \n\t"
58
59 "vmvn.u8 d8, d0 \n\t"
60 "vshr.u32 d8, d8, #24 \n\t"
61
62 "vmul.u32 d8, d16, d8 \n\t"
63
64 "vmull.u8 q6, d4,d8 \n\t"
65 "vqrshrn.u16 d8, q6, #8 \n\t"
66 // Add to 's'
67 "vqadd.u8 d4, d8,d0 \n\t"
68 "vstr d4, [%[d]] \n\t"
69 "add %[d], #8 \n\t"
70
71 "ands %[tmp], %[d], $0x1f \n\t"
72 "beq "AP"octloops \n\t"
73
74 AP"quadloops: \n\t"
75 "sub %[tmp], %[e], %[d] \n\t"
76 "cmp %[tmp], #32 \n\t"
77 "blt "AP"loopout \n\t"
78
79 "vldm %[s]!, {d0,d1) \n\t"
80 "vldm %[d], {d4,d5} \n\t"
81
82
83 // Copy s.a into q2 (>> 24) & subtract from 255
84 "vmvn.u8 q4, q0 \n\t"
85 "vshr.u32 q4, q4,$0x18 \n\t"
86
87 // Multiply into all fields
88 "vmul.u32 q4, q8,q4 \n\t"
89
90 // a * d (clobbering 'd'/q7)
91 "vmull.u8 q6, d4,d8 \n\t"
92 "vmull.u8 q2, d5,d9 \n\t"
93
94 // Shift & narrow it
95 "vqrshrn.u16 d8, q6, #8 \n\t"
96 "vqrshrn.u16 d9, q2, #8 \n\t"
97
98 // Add to s
99 "vqadd.u8 q2, q4,q0 \n\t"
100
101 // Write it
102 "vstm %[d]!, {d4,d5} \n\t"
103
104 AP "octloops: \n\t"
105 "sub %[tmp], %[e], %[d] \n\t"
106 "cmp %[tmp], #32 \n\t"
107 "ble "AP"loopout \n\t"
108
109 "sub %[tmp],%[e],#64 \n\t"
110
111
112 AP "octloopint:\n\t"
113 //** Oct loop
114 "vldm %[s]!, {d0,d1,d2,d3) \n\t"
115 "vldm %[d], {d4,d5,d6,d7} \n\t"
116 "pld [%[s], #64] \n\t"
117
118
119 // Copy s.a into q2 (>> 24) & subtract from 255
120 "vmvn.u8 q4, q0 \n\t"
121 "vmvn.u8 q5, q1 \n\t"
122 "vshr.u32 q4, q4,$0x18 \n\t"
123 "vshr.u32 q5, q5,$0x18\n\t"
124
125 // Multiply into all fields
126 "vmul.u32 q4, q8,q4 \n\t"
127 "vmul.u32 q5, q8,q5 \n\t"
128
129
130 // a * d (clobbering 'd'/q7)
131 "vmull.u8 q6, d4,d8 \n\t"
132 "vmull.u8 q2, d5,d9 \n\t"
133 "vmull.u8 q7, d6,d10 \n\t"
134 "vmull.u8 q3, d7,d11 \n\t"
135
136 "cmp %[tmp], %[d]\n\t"
137
138 // Shift & narrow it
139 "vqrshrn.u16 d8, q6, #8 \n\t"
140 "vqrshrn.u16 d9, q2, #8 \n\t"
141 "vqrshrn.u16 d10, q7, #8 \n\t"
142 "vqrshrn.u16 d11, q3, #8 \n\t"
143
144
145 // Add to s
146 "vqadd.u8 q2, q4,q0 \n\t"
147 "vqadd.u8 q3, q5,q1 \n\t"
148
149 // Write it
150 "vstm %[d]!, {d4,d5,d6,d7} \n\t"
151
152 "bhi "AP"octloopint\n\t"
153
154 AP "loopout: \n\t"
155 "cmp %[d], %[e] \n\t"
156 "beq "AP"done \n\t"
157 "sub %[tmp],%[e], %[d] \n\t"
158 "cmp %[tmp],$0x04 \n\t"
159 "ble "AP"singleloop2 \n\t"
160
161 AP "dualloop2: \n\t"
162 "sub %[tmp],%[e],$0x7 \n\t"
163 AP "dualloop2int: \n\t"
164 //** Trailing double
165
166 "vldm %[s]!, {d0} \n\t"
167 "vldm %[d], {d4} \n\t"
168
169 "vmvn.u8 d8, d0 \n\t"
170 "vshr.u32 d8, d8, #24 \n\t"
171
172 "vmul.u32 d8, d16, d8 \n\t"
173
174 "vmull.u8 q6, d4,d8 \n\t"
175 "vqrshrn.u16 d8, q6, #8 \n\t"
176 // Add to 's'
177 "vqadd.u8 d4, d8,d0 \n\t"
178
179 "vstr.32 d4, [%[d]] \n\t"
180 "add %[d], #8 \n\t"
181
182 "cmp %[tmp], %[d] \n\t"
183 "bhi "AP"dualloop2int \n\t"
184
185 // Single ??
186 "cmp %[e], %[d] \n\t"
187 "beq "AP"done \n\t"
188
189 AP"singleloop2: \n\t"
190 "vld1.32 d0[0], [%[s]] \n\t"
191 "vld1.32 d4[0], [%[d]] \n\t"
192
193 "vmvn.u8 d8, d0 \n\t"
194 "vshr.u32 d8, d8, #24 \n\t"
195
196 "vmul.u32 d8, d8, d16 \n\t"
197
198 "vmull.u8 q6, d8,d4 \n\t"
199 "vqrshrn.u16 d8, q6, #8 \n\t"
200 // Add to 's'
201 "vqadd.u8 d0, d0,d8 \n\t"
202 "vst1.32 d0[0], [%[d]] \n\t"
203
204 //** Trailing single
205
206 AP"done:\n\t"
207//"sub %[tmp], %[e], #4 \n\t"
208//"vmov.i32 d0, $0xffff0000 \n\t"
209//"vst1.32 d0[0], [%[tmp]] \n\t"
210
211
212 : // output regs
213 // Input
214 : [e] "r" (d + l), [d] "r" (d), [s] "r" (s), [c] "r" (c),
215 [tmp] "r" (7)
216 : "q0", "q1", "q2","q3", "q4","q5","q6", "q7","q8","memory" // clobbered
217 );
218#undef AP
219
220}
221
222static void
223_op_blend_pas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
224#define AP "blend_pas_dp_"
225 DATA32 *e = d + l,*tmp = e + 32,*pl=(void*)912;
226 asm volatile (
227 ".fpu neon \n\t"
228 "vmov.i8 q8, #1 \n\t"
229 AP"loopchoose: \n\t"
230 // If aliged - go as fast we can
231 "andS %[tmp], %[d], #31 \n\t"
232 "beq "AP"quadstart \n\t"
233
234 // See if we can at least do our double loop
235 "andS %[tmp], %[d], $0x7 \n\t"
236 "beq "AP"dualstart \n\t"
237
238 // Ugly single word version
239 AP "singleloop: \n\t"
240 "vld1.32 d0[0], [%[s]]! \n\t"
241 "vld1.32 d4[0], [%[d]] \n\t"
242
243 "vmvn.u8 d8, d0 \n\t"
244
245 "vshr.u32 d8, d8,$0x18 \n\t"
246
247 // Mulitply into all fields
248 "vmul.u32 d8, d8, d16 \n\t"
249
250 // Multiply out
251 "vmull.u8 q6, d8, d4 \n\t"
252
253 "vqrshrn.u16 d8, q6, #8 \n\t"
254
255 // Add to s
256 "vqadd.u8 d0, d0,d8 \n\t"
257 "vst1.32 d0[0], [%[d]]! \n\t"
258
259 AP"dualstart: \n\t"
260 "sub %[tmp], %[e], %[d] \n\t"
261 "cmp %[tmp], #32 \n\t"
262 "blt "AP"loopout \n\t"
263
264 // If aligned - go as fast we can
265 "andS %[tmp], %[d], #31 \n\t"
266 "beq "AP"quadstart \n\t"
267
268
269 AP"dualloop: \n\t"
270
271 "vldm %[s]!, {d0) \n\t"
272 "vldm %[d], {d4} \n\t"
273
274 // Subtract from 255 (ie negate) and extract alpha channel
275 "vmvn.u8 d8, d0 \n\t"
276 "vshr.u32 d8, d8,$0x18 \n\t"
277
278 // Mulitply into all fields
279 "vmul.u32 d8, d8, d16 \n\t"
280
281 // Multiply out
282 "vmull.u8 q6, d8, d4 \n\t"
283
284 "vqrshrn.u16 d8, q6, #8 \n\t"
285
286 // Add to s
287 "vqadd.u8 d0, d0,d8 \n\t"
288 "vstm %[d]!, {d0} \n\t"
289
290 "andS %[tmp], %[d], $0x1f \n\t"
291 "bne "AP"dualloop \n\t"
292
293
294 AP"quadstart: \n\t"
295 "sub %[tmp], %[e], %[d] \n\t"
296 "cmp %[tmp], #32 \n\t"
297 "blt "AP"loopout \n\t"
298
299 "sub %[tmp], %[e], #31 \n\t"
300
301 AP"quadloop:\n\t"
302 "vldm %[s]!, {d0,d1,d2,d3) \n\t"
303 "vldm %[d], {d4,d5,d6,d7} \n\t"
304
305 // Subtract from 255 (ie negate) and extract alpha channel
306 "vmvn.u8 q4, q0 \n\t"
307 "vmvn.u8 q5, q1 \n\t"
308 "vshr.u32 q4, q4,$0x18 \n\t"
309 "vshr.u32 q5, q5,$0x18 \n\t"
310
311 // Prepare to preload
312 "add %[pl], %[s], #32 \n\t"
313
314 // Mulitply into all fields
315 "vmul.u32 q4, q4, q8 \n\t"
316 "vmul.u32 q5, q5, q8 \n\t"
317 "pld [%[pl]] \n\t"
318
319 // Multiply out
320 "vmull.u8 q6, d8, d4 \n\t"
321 "vmull.u8 q7, d10, d6 \n\t"
322 "vmull.u8 q2, d9, d5 \n\t"
323 "vmull.u8 q3, d11, d7 \n\t"
324
325 "add %[pl], %[d], #32 \n\t"
326
327 "vqrshrn.u16 d8, q6, #8 \n\t"
328 "vqrshrn.u16 d10, q7, #8 \n\t"
329 "vqrshrn.u16 d9, q2, #8 \n\t"
330 "vqrshrn.u16 d11, q3, #8 \n\t"
331 "pld [%[pl]] \n\t"
332
333 "cmp %[tmp], %[pl] \n\t"
334 // Add to s
335 "vqadd.u8 q0, q0,q4 \n\t"
336 "vqadd.u8 q1, q1,q5 \n\t"
337
338 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
339
340 "bhi "AP"quadloop \n\t"
341
342 AP "loopout: \n\t"
343 "cmp %[d], %[e] \n\t"
344 "beq "AP"done \n\t"
345
346 "sub %[tmp],%[e], %[d] \n\t"
347 "cmp %[tmp],$0x04 \n\t"
348 "beq "AP"singleloop2 \n\t"
349
350 "sub %[tmp],%[e],$0x7 \n\t"
351
352 AP"dualloop2: \n\t"
353 "vldm %[s]!, {d0) \n\t"
354 "vldm %[d], {d4} \n\t"
355
356 // Subtract from 255 (ie negate) and extract alpha channel
357 "vmvn.u8 d8, d0 \n\t"
358 "vshr.u32 d8, d8,$0x18 \n\t"
359
360 // Mulitply into all fields
361 "vmul.u32 d8, d8, d16 \n\t"
362
363 // Multiply out
364 "vmull.u8 q6, d8, d4 \n\t"
365
366 "vqrshrn.u16 d8, q6, #8 \n\t"
367
368 // Add to s
369 "vqadd.u8 d0, d0,d8 \n\t"
370
371 "vstm %[d]!, {d0} \n\t"
372 "cmp %[tmp], %[d] \n\t"
373
374 "bhi "AP"dualloop2 \n\t"
375
376 // Single ??
377 "cmp %[e], %[d] \n\t"
378 "beq "AP"done \n\t"
379
380 AP "singleloop2: \n\t"
381 "vld1.32 d0[0], [%[s]] \n\t"
382 "vld1.32 d4[0], [%[d]] \n\t"
383
384 "vmvn.u8 d8, d0 \n\t"
385
386 "vshr.u32 d8, d8,$0x18 \n\t"
387
388 // Mulitply into all fields
389 "vmul.u32 d8, d8, d16 \n\t"
390
391 // Multiply out
392 "vmull.u8 q6, d8, d4 \n\t"
393
394 "vqrshrn.u16 d8, q6, #8 \n\t"
395
396 // Add to s
397 "vqadd.u8 d0, d0,d8 \n\t"
398
399 "vst1.32 d0[0], [%[d]] \n\t"
400 AP "done:\n\t"
401
402
403 : /* Out */
404 : /* In */ [s] "r" (s), [e] "r" (e), [d] "r" (d), [tmp] "r" (tmp),
405 [pl] "r" (pl)
406 : /* Clobbered */
407 "q0","q1","q2","q3","q4","q5","q6","q7","q8","memory"
408 );
409#undef AP
410}
411
412#define _op_blend_pan_dp_neon NULL
413
414#define _op_blend_p_dpan_neon _op_blend_p_dp_neon
415#define _op_blend_pas_dpan_neon _op_blend_pas_dp_neon
416#define _op_blend_pan_dpan_neon _op_blend_pan_dp_neon
417
418static void
419init_blend_pixel_span_funcs_neon(void)
420{
421 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_p_dp_neon;
422 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pas_dp_neon;
423 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pan_dp_neon;
424
425 op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_p_dpan_neon;
426 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_dpan_neon;
427 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_dpan_neon;
428}
429#endif
430
431#ifdef BUILD_NEON
432static void
433_op_blend_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
434 c = 256 - (s >> 24);
435 *d = s + MUL_256(c, *d);
436}
437
438
439#define _op_blend_pt_pan_dp_neon NULL
440#define _op_blend_pt_pas_dp_neon _op_blend_pt_p_dp_neon
441
442#define _op_blend_pt_p_dpan_neon _op_blend_pt_p_dp_neon
443#define _op_blend_pt_pan_dpan_neon _op_blend_pt_pan_dp_neon
444#define _op_blend_pt_pas_dpan_neon _op_blend_pt_pas_dp_neon
445
446static void
447init_blend_pixel_pt_funcs_neon(void)
448{
449 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_p_dp_neon;
450 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_dp_neon;
451 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_dp_neon;
452
453 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_dpan_neon;
454 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_dpan_neon;
455 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_dpan_neon;
456}
457#endif
458
459/*-----*/
460
461/* blend_rel pixel -> dst */
462
463#ifdef BUILD_NEON
464static void
465_op_blend_rel_p_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
466 DATA32 *e = d + l;
467 while (d < e) {
468 l = 256 - (*s >> 24);
469 c = 1 + (*d >> 24);
470 *d = MUL_256(c, *s) + MUL_256(l, *d);
471 d++;
472 s++;
473 }
474}
475
476static void
477_op_blend_rel_pan_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
478 DATA32 *e = d + l;
479 while (d < e) {
480 c = 1 + (*d >> 24);
481 *d++ = MUL_256(c, *s);
482 s++;
483 }
484}
485
486#define _op_blend_rel_pas_dp_neon _op_blend_rel_p_dp_neon
487
488#define _op_blend_rel_p_dpan_neon _op_blend_p_dpan_neon
489#define _op_blend_rel_pan_dpan_neon _op_blend_pan_dpan_neon
490#define _op_blend_rel_pas_dpan_neon _op_blend_pas_dpan_neon
491
492static void
493init_blend_rel_pixel_span_funcs_neon(void)
494{
495 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_p_dp_neon;
496 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pas_dp_neon;
497 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pan_dp_neon;
498
499 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_dpan_neon;
500 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_dpan_neon;
501 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_dpan_neon;
502}
503#endif
504
505#ifdef BUILD_NEON
506static void
507_op_blend_rel_pt_p_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
508 c = 256 - (s >> 24);
509 *d = MUL_SYM(*d >> 24, s) + MUL_256(c, *d);
510}
511
512#define _op_blend_rel_pt_pas_dp_neon _op_blend_rel_pt_p_dp_neon
513#define _op_blend_rel_pt_pan_dp_neon _op_blend_rel_pt_p_dp_neon
514
515#define _op_blend_rel_pt_p_dpan_neon _op_blend_pt_p_dpan_neon
516#define _op_blend_rel_pt_pas_dpan_neon _op_blend_pt_pas_dpan_neon
517#define _op_blend_rel_pt_pan_dpan_neon _op_blend_pt_pan_dpan_neon
518
519static void
520init_blend_rel_pixel_pt_funcs_neon(void)
521{
522 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_p_dp_neon;
523 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pas_dp_neon;
524 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_blend_rel_pt_pan_dp_neon;
525
526 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_dpan_neon;
527 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_dpan_neon;
528 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_dpan_neon;
529}
530#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 @@
1/* blend pixel --> dst */
2
3#ifdef BUILD_SSE3
4
5static void
6_op_blend_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
7
8 LOOP_ALIGNED_U1_A48_SSE3(d, l,
9 { /* UOP */
10
11 int alpha = 256 - (*s >> 24);
12 *d = *s + MUL_256(alpha, *d);
13 s++; d++; l--;
14 },
15 { /* A4OP */
16
17 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
18 __m128i d0 = _mm_load_si128((__m128i *)d);
19
20 __m128i a0 = sub4_alpha_sse3(s0);
21 __m128i mul0 = mul_256_sse3(a0, d0);
22 d0 = _mm_add_epi32(mul0, s0);
23
24 _mm_store_si128((__m128i *)d, d0);
25
26 s += 4; d += 4; l -= 4;
27 },
28 { /* A8OP */
29
30 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
31 __m128i d0 = _mm_load_si128((__m128i *)d);
32
33 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
34 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
35
36 __m128i a0 = sub4_alpha_sse3(s0);
37 __m128i a1 = sub4_alpha_sse3(s1);
38
39 __m128i mul0 = mul_256_sse3(a0, d0);
40 __m128i mul1 = mul_256_sse3(a1, d1);
41
42 d0 = _mm_add_epi32(mul0, s0);
43 d1 = _mm_add_epi32(mul1, s1);
44
45 _mm_store_si128((__m128i *)d, d0);
46 _mm_store_si128((__m128i *)(d+4), d1);
47
48 s += 8; d += 8; l -= 8;
49 })
50}
51
52static void
53_op_blend_pas_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
54
55 int alpha;
56
57 const __m128i zero = _mm_setzero_si128();
58
59 LOOP_ALIGNED_U1_A48_SSE3(d, l,
60 { /* UOP */
61 switch (*s & 0xff000000)
62 {
63 case 0:
64 break;
65 case 0xff000000:
66 *d = *s;
67 break;
68 default:
69 alpha = 256 - (*s >> 24);
70 *d = *s + MUL_256(alpha, *d);
71 break;
72 }
73 s++; d++; l--;
74 },
75 { /* A4OP */
76
77 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
78 __m128i d0 = _mm_load_si128((__m128i *)d);
79
80 __m128i a0 = sub4_alpha_sse3(s0);
81 __m128i mul0 = mul_256_sse3(a0, d0);
82
83 mul0 = _mm_add_epi32(s0, mul0);
84
85 __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero);
86 __m128i imask0 = ~zmask0;
87
88 mul0 = _mm_and_si128(imask0, mul0);
89 d0 = _mm_and_si128(zmask0, d0);
90
91 d0 = _mm_add_epi32(mul0, d0);
92
93 _mm_store_si128((__m128i *)d, d0);
94
95 s += 4; d += 4; l -= 4;
96 },
97 { /* A8OP */
98
99 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
100 __m128i d0 = _mm_load_si128((__m128i *)d);
101
102 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
103 __m128i d1 = _mm_load_si128((__m128i *)(d+4));
104
105 __m128i a0 = sub4_alpha_sse3(s0);
106 __m128i a1 = sub4_alpha_sse3(s1);
107
108 __m128i mul0 = mul_256_sse3(a0, d0);
109 __m128i mul1 = mul_256_sse3(a1, d1);
110
111 mul0 = _mm_add_epi32(s0, mul0);
112 mul1 = _mm_add_epi32(s1, mul1);
113
114 __m128i zmask0 = _mm_cmpeq_epi32(_mm_srli_epi32(s0, 24), zero);
115 __m128i zmask1 = _mm_cmpeq_epi32(_mm_srli_epi32(s1, 24), zero);
116
117 __m128i imask0 = ~zmask0;
118 __m128i imask1 = ~zmask1;
119
120 mul0 = _mm_and_si128(imask0, mul0);
121 d0 = _mm_and_si128(zmask0, d0);
122
123 mul1 = _mm_and_si128(imask1, mul1);
124 d1 = _mm_and_si128(zmask1, d1);
125
126 d0 = _mm_add_epi32(mul0, d0);
127 d1 = _mm_add_epi32(mul1, d1);
128
129 _mm_store_si128((__m128i *)d, d0);
130 _mm_store_si128((__m128i *)(d+4), d1);
131
132 s += 8; d += 8; l -= 8;
133 })
134}
135
136#define _op_blend_pan_dp_sse3 NULL
137
138#define _op_blend_p_dpan_sse3 _op_blend_p_dp_sse3
139#define _op_blend_pas_dpan_sse3 _op_blend_pas_dp_sse3
140#define _op_blend_pan_dpan_sse3 _op_blend_pan_dp_sse3
141
142static void
143init_blend_pixel_span_funcs_sse3(void)
144{
145 op_blend_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_p_dp_sse3;
146 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pas_dp_sse3;
147 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pan_dp_sse3;
148
149// FIXME: BUGGY BUGGY Core i5 750 (32bit), 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4), ello (text and rectangle)
150// op_blend_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_p_dpan_sse3;
151 op_blend_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pas_dpan_sse3;
152 op_blend_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pan_dpan_sse3;
153}
154
155#define _op_blend_pt_p_dp_sse3 NULL
156
157#define _op_blend_pt_pas_dp_sse3 _op_blend_pt_p_dp_sse3
158#define _op_blend_pt_pan_dp_sse3 NULL
159
160#define _op_blend_pt_p_dpan_sse3 _op_blend_pt_p_dp_sse3
161#define _op_blend_pt_pan_dpan_sse3 _op_blend_pt_pan_dp_sse3
162#define _op_blend_pt_pas_dpan_sse3 _op_blend_pt_pas_dp_sse3
163
164static void
165init_blend_pixel_pt_funcs_sse3(void)
166{
167 op_blend_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_p_dp_sse3;
168 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pas_dp_sse3;
169 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_pt_pan_dp_sse3;
170
171 op_blend_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_p_dpan_sse3;
172 op_blend_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pas_dpan_sse3;
173 op_blend_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_pt_pan_dpan_sse3;
174}
175
176/*-----*/
177
178/* blend_rel pixel -> dst */
179
180static void
181_op_blend_rel_p_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
182
183 const __m128i ones = _mm_set_epi32(1, 1, 1, 1);
184
185 LOOP_ALIGNED_U1_A48_SSE3(d, l,
186 { /* UOP */
187
188 int alpha = 256 - (*s >> 24);
189 c = 1 + (*d >> 24);
190 *d = MUL_256(c, *s) + MUL_256(alpha, *d);
191 d++; s++; l--;
192 },
193 { /*A4OP */
194
195 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
196 __m128i d0 = _mm_load_si128((__m128i *)d);
197
198 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
199 __m128i a0 = sub4_alpha_sse3(s0);
200
201 d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0));
202
203 _mm_store_si128((__m128i *)d, d0);
204
205 d += 4; s += 4; l -= 4;
206 },
207 { /* A8OP */
208
209 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
210 __m128i d0 = _mm_load_si128 ((__m128i *)d);
211
212 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
213 __m128i d1 = _mm_load_si128 ((__m128i *)(d+4));
214
215 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
216 __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones);
217
218 __m128i a0 = sub4_alpha_sse3(s0);
219 __m128i a1 = sub4_alpha_sse3(s1);
220
221 d0 = _mm_add_epi32(mul_256_sse3(c0, s0), mul_256_sse3(a0, d0));
222 d1 = _mm_add_epi32(mul_256_sse3(c1, s1), mul_256_sse3(a1, d1));
223
224 _mm_store_si128((__m128i *)d, d0);
225 _mm_store_si128((__m128i *)(d+4), d1);
226
227 d += 8; s += 8; l -= 8;
228 })
229}
230
231static void
232_op_blend_rel_pan_dp_sse3(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
233
234 const __m128i ones = _mm_set_epi32(1, 1, 1, 1);
235
236 LOOP_ALIGNED_U1_A48_SSE3(d, l,
237 { /* UOP */
238
239 c = 1 + (*d >> 24);
240 *d++ = MUL_256(c, *s);
241 s++; l--;
242 },
243 { /* A4OP */
244
245 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
246 __m128i d0 = _mm_load_si128((__m128i *)d);
247
248 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
249 d0 = mul_256_sse3(c0, s0);
250
251 _mm_store_si128((__m128i *)d, d0);
252
253 d += 4; s += 4; l -= 4;
254 },
255 { /* A8OP */
256
257 __m128i s0 = _mm_lddqu_si128((__m128i *)s);
258 __m128i d0 = _mm_load_si128 ((__m128i *)d);
259
260 __m128i s1 = _mm_lddqu_si128((__m128i *)(s+4));
261 __m128i d1 = _mm_load_si128 ((__m128i *)(d+4));
262
263 __m128i c0 = _mm_add_epi32(_mm_srli_epi32(d0, 24), ones);
264 __m128i c1 = _mm_add_epi32(_mm_srli_epi32(d1, 24), ones);
265
266 d0 = mul_256_sse3(c0, s0);
267 d1 = mul_256_sse3(c1, s1);
268
269 _mm_store_si128((__m128i *)d, d0);
270 _mm_store_si128((__m128i *)(d+4), d1);
271
272 d += 8; s += 8; l -= 8;
273 })
274}
275
276#define _op_blend_rel_pas_dp_sse3 _op_blend_rel_p_dp_sse3
277
278#define _op_blend_rel_p_dpan_sse3 _op_blend_p_dpan_sse3
279#define _op_blend_rel_pan_dpan_sse3 _op_blend_pan_dpan_sse3
280#define _op_blend_rel_pas_dpan_sse3 _op_blend_pas_dpan_sse3
281
282static void
283init_blend_rel_pixel_span_funcs_sse3(void)
284{
285 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_p_dp_sse3;
286 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pas_dp_sse3;
287 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pan_dp_sse3;
288
289 op_blend_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_p_dpan_sse3;
290 op_blend_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pas_dpan_sse3;
291 op_blend_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pan_dpan_sse3;
292}
293
294#define _op_blend_rel_pt_p_dp_sse3 NULL
295#define _op_blend_rel_pt_pan_dp_sse3 NULL
296
297#define _op_blend_rel_pt_pas_dp_sse3 _op_blend_rel_pt_p_dp_sse3
298
299#define _op_blend_rel_pt_p_dpan_sse3 _op_blend_pt_p_dpan_sse3
300#define _op_blend_rel_pt_pan_dpan_sse3 _op_blend_pt_pan_dpan_sse3
301#define _op_blend_rel_pt_pas_dpan_sse3 _op_blend_pt_pas_dpan_sse3
302
303static void
304init_blend_rel_pixel_pt_funcs_sse3(void)
305{
306 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_p_dp_sse3;
307 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pas_dp_sse3;
308 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_SSE3] = _op_blend_rel_pt_pan_dp_sse3;
309
310 op_blend_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_p_dpan_sse3;
311 op_blend_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pas_dpan_sse3;
312 op_blend_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_SSE3] = _op_blend_rel_pt_pan_dpan_sse3;
313}
314
315#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 @@
1#include "evas_common.h"
2
3RGBA_Gfx_Func op_blend_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4RGBA_Gfx_Pt_Func op_blend_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_blend_init(void);
7static void op_blend_shutdown(void);
8
9static RGBA_Gfx_Func op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_blend_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_blend = { "blend",
22 op_blend_init, op_blend_shutdown,
23 op_blend_pixel_span_get, op_blend_color_span_get,
24 op_blend_pixel_color_span_get, op_blend_mask_color_span_get,
25 op_blend_pixel_mask_span_get,
26 op_blend_pixel_pt_get, op_blend_color_pt_get,
27 op_blend_pixel_color_pt_get, op_blend_mask_color_pt_get,
28 op_blend_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_blend_get(void)
33{
34 return &(_composite_blend);
35}
36
37
38RGBA_Gfx_Func op_blend_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
39RGBA_Gfx_Pt_Func op_blend_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
40
41static void op_blend_rel_init(void);
42static void op_blend_rel_shutdown(void);
43
44static RGBA_Gfx_Func op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
45static RGBA_Gfx_Func op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
47static RGBA_Gfx_Func op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
48static RGBA_Gfx_Func op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
49
50static RGBA_Gfx_Pt_Func op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
51static RGBA_Gfx_Pt_Func op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
52static RGBA_Gfx_Pt_Func op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
53static RGBA_Gfx_Pt_Func op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
54static RGBA_Gfx_Pt_Func op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
55
56static RGBA_Gfx_Compositor _composite_blend_rel = { "blend_rel",
57 op_blend_rel_init, op_blend_rel_shutdown,
58 op_blend_rel_pixel_span_get, op_blend_rel_color_span_get,
59 op_blend_rel_pixel_color_span_get, op_blend_rel_mask_color_span_get,
60 op_blend_rel_pixel_mask_span_get,
61 op_blend_rel_pixel_pt_get, op_blend_rel_color_pt_get,
62 op_blend_rel_pixel_color_pt_get, op_blend_rel_mask_color_pt_get,
63 op_blend_rel_pixel_mask_pt_get
64 };
65
66RGBA_Gfx_Compositor *
67evas_common_gfx_compositor_blend_rel_get(void)
68{
69 return &(_composite_blend_rel);
70}
71
72
73# include "./evas_op_blend/op_blend_pixel_.c"
74# include "./evas_op_blend/op_blend_color_.c"
75# include "./evas_op_blend/op_blend_pixel_color_.c"
76# include "./evas_op_blend/op_blend_pixel_mask_.c"
77# include "./evas_op_blend/op_blend_mask_color_.c"
78//# include "./evas_op_blend/op_blend_pixel_mask_color_.c"
79
80# include "./evas_op_blend/op_blend_pixel_i386.c"
81# include "./evas_op_blend/op_blend_color_i386.c"
82# include "./evas_op_blend/op_blend_pixel_color_i386.c"
83# include "./evas_op_blend/op_blend_pixel_mask_i386.c"
84# include "./evas_op_blend/op_blend_mask_color_i386.c"
85//# include "./evas_op_blend/op_blend_pixel_mask_color_i386.c"
86
87# include "./evas_op_blend/op_blend_pixel_neon.c"
88# include "./evas_op_blend/op_blend_color_neon.c"
89# include "./evas_op_blend/op_blend_pixel_color_neon.c"
90# include "./evas_op_blend/op_blend_pixel_mask_neon.c"
91# include "./evas_op_blend/op_blend_mask_color_neon.c"
92//# include "./evas_op_blend/op_blend_pixel_mask_color_neon.c"
93
94#ifdef BUILD_SSE3
95void evas_common_op_blend_init_sse3(void);
96#endif
97
98static void
99op_blend_init(void)
100{
101 memset(op_blend_span_funcs, 0, sizeof(op_blend_span_funcs));
102 memset(op_blend_pt_funcs, 0, sizeof(op_blend_pt_funcs));
103#ifdef BUILD_SSE3
104 evas_common_op_blend_init_sse3();
105#endif
106#ifdef BUILD_MMX
107 init_blend_pixel_span_funcs_mmx();
108 init_blend_pixel_color_span_funcs_mmx();
109 init_blend_pixel_mask_span_funcs_mmx();
110 init_blend_color_span_funcs_mmx();
111 init_blend_mask_color_span_funcs_mmx();
112
113 init_blend_pixel_pt_funcs_mmx();
114 init_blend_pixel_color_pt_funcs_mmx();
115 init_blend_pixel_mask_pt_funcs_mmx();
116 init_blend_color_pt_funcs_mmx();
117 init_blend_mask_color_pt_funcs_mmx();
118#endif
119#ifdef BUILD_NEON
120 init_blend_pixel_span_funcs_neon();
121 init_blend_pixel_color_span_funcs_neon();
122 init_blend_pixel_mask_span_funcs_neon();
123 init_blend_color_span_funcs_neon();
124 init_blend_mask_color_span_funcs_neon();
125
126 init_blend_pixel_pt_funcs_neon();
127 init_blend_pixel_color_pt_funcs_neon();
128 init_blend_pixel_mask_pt_funcs_neon();
129 init_blend_color_pt_funcs_neon();
130 init_blend_mask_color_pt_funcs_neon();
131#endif
132#ifdef BUILD_C
133 init_blend_pixel_span_funcs_c();
134 init_blend_pixel_color_span_funcs_c();
135 init_blend_pixel_mask_span_funcs_c();
136 init_blend_color_span_funcs_c();
137 init_blend_mask_color_span_funcs_c();
138
139 init_blend_pixel_pt_funcs_c();
140 init_blend_pixel_color_pt_funcs_c();
141 init_blend_pixel_mask_pt_funcs_c();
142 init_blend_color_pt_funcs_c();
143 init_blend_mask_color_pt_funcs_c();
144#endif
145}
146
147static void
148op_blend_shutdown(void)
149{
150}
151
152static RGBA_Gfx_Func
153blend_gfx_span_func_cpu(int s, int m, int c, int d)
154{
155 RGBA_Gfx_Func func = NULL;
156 int cpu = CPU_N;
157#ifdef BUILD_SSE3
158 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
159 {
160 cpu = CPU_SSE3;
161 func = op_blend_span_funcs[s][m][c][d][cpu];
162 if(func) return func;
163 }
164#endif
165#ifdef BUILD_MMX
166 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
167 {
168 cpu = CPU_MMX;
169 func = op_blend_span_funcs[s][m][c][d][cpu];
170 if (func) return func;
171 }
172#endif
173#ifdef BUILD_NEON
174 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
175 {
176 cpu = CPU_NEON;
177 func = op_blend_span_funcs[s][m][c][d][cpu];
178 if (func) return func;
179 }
180#endif
181#ifdef BUILD_C
182 cpu = CPU_C;
183 func = op_blend_span_funcs[s][m][c][d][cpu];
184 if (func) return func;
185#endif
186 return func;
187}
188
189static RGBA_Gfx_Func
190op_blend_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
191{
192 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
193
194 if (src && src->cache_entry.flags.alpha)
195 {
196 s = SP;
197 if (src->cache_entry.flags.alpha_sparse)
198 s = SP_AS;
199 }
200 if (dst && dst->cache_entry.flags.alpha)
201 d = DP;
202 return blend_gfx_span_func_cpu(s, m, c, d);
203}
204
205static RGBA_Gfx_Func
206op_blend_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
207{
208 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
209
210 if ((col >> 24) < 255)
211 c = SC;
212 if (col == ((col >> 24) * 0x01010101))
213 c = SC_AA;
214 if (col == 0xffffffff)
215 c = SC_N;
216 if (dst && dst->cache_entry.flags.alpha)
217 d = DP;
218 return blend_gfx_span_func_cpu(s, m, c, d);
219}
220
221static RGBA_Gfx_Func
222op_blend_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
223{
224 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
225
226 if (src && src->cache_entry.flags.alpha)
227 {
228 s = SP;
229 if (src->cache_entry.flags.alpha_sparse)
230 s = SP_AS;
231 }
232 if ((col >> 24) < 255)
233 c = SC;
234 if (col == ((col >> 24) * 0x01010101))
235 c = SC_AA;
236 if (col == 0xffffffff)
237 c = SC_N;
238 if (dst && dst->cache_entry.flags.alpha)
239 d = DP;
240 return blend_gfx_span_func_cpu(s, m, c, d);
241}
242
243static RGBA_Gfx_Func
244op_blend_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
245{
246 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
247
248 if ((col >> 24) < 255)
249 c = SC;
250 if (col == ((col >> 24) * 0x01010101))
251 c = SC_AA;
252 if (col == 0xffffffff)
253 c = SC_N;
254 if (dst && dst->cache_entry.flags.alpha)
255 d = DP;
256 return blend_gfx_span_func_cpu(s, m, c, d);
257}
258
259static RGBA_Gfx_Func
260op_blend_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
261{
262 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
263
264 if (src && src->cache_entry.flags.alpha)
265 {
266 s = SP;
267 if (src->cache_entry.flags.alpha_sparse)
268 s = SP_AS;
269 }
270 if (dst && dst->cache_entry.flags.alpha)
271 d = DP;
272 return blend_gfx_span_func_cpu(s, m, c, d);
273}
274
275
276static RGBA_Gfx_Pt_Func
277blend_gfx_pt_func_cpu(int s, int m, int c, int d)
278{
279 RGBA_Gfx_Pt_Func func = NULL;
280 int cpu = CPU_N;
281#ifdef BUILD_SSE3
282 if(evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
283 {
284 cpu = CPU_SSE3;
285 func = op_blend_pt_funcs[s][m][c][d][cpu];
286 if(func) return func;
287 }
288#endif
289#ifdef BUILD_MMX
290 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
291 {
292 cpu = CPU_MMX;
293 func = op_blend_pt_funcs[s][m][c][d][cpu];
294 if (func) return func;
295 }
296#endif
297#ifdef BUILD_NEON
298 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
299 {
300 cpu = CPU_NEON;
301 func = op_blend_pt_funcs[s][m][c][d][cpu];
302 if (func) return func;
303 }
304#endif
305#ifdef BUILD_C
306 cpu = CPU_C;
307 func = op_blend_pt_funcs[s][m][c][d][cpu];
308 if (func) return func;
309#endif
310 return func;
311}
312
313static RGBA_Gfx_Pt_Func
314op_blend_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
315{
316 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
317
318 if (src_flags.alpha)
319 s = SP;
320 if (dst && dst->cache_entry.flags.alpha)
321 d = DP;
322 return blend_gfx_pt_func_cpu(s, m, c, d);
323}
324
325static RGBA_Gfx_Pt_Func
326op_blend_color_pt_get(DATA32 col, RGBA_Image *dst)
327{
328 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
329
330 if ((col >> 24) < 255)
331 c = SC;
332 if (col == ((col >> 24) * 0x01010101))
333 c = SC_AA;
334 if (col == 0xffffffff)
335 c = SC_N;
336 if (dst && dst->cache_entry.flags.alpha)
337 d = DP;
338 return blend_gfx_pt_func_cpu(s, m, c, d);
339}
340
341static RGBA_Gfx_Pt_Func
342op_blend_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
343{
344 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
345
346 if (src_flags.alpha)
347 s = SP;
348 if ((col >> 24) < 255)
349 c = SC;
350 if (col == ((col >> 24) * 0x01010101))
351 c = SC_AA;
352 if (col == 0xffffffff)
353 c = SC_N;
354 if (dst && dst->cache_entry.flags.alpha)
355 d = DP;
356 return blend_gfx_pt_func_cpu(s, m, c, d);
357}
358
359static RGBA_Gfx_Pt_Func
360op_blend_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
361{
362 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
363
364 if ((col >> 24) < 255)
365 c = SC;
366 if (col == ((col >> 24) * 0x01010101))
367 c = SC_AA;
368 if (col == 0xffffffff)
369 c = SC_N;
370 if (dst && dst->cache_entry.flags.alpha)
371 d = DP;
372 return blend_gfx_pt_func_cpu(s, m, c, d);
373}
374
375static RGBA_Gfx_Pt_Func
376op_blend_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
377{
378 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
379
380 if (src_flags.alpha)
381 s = SP;
382 if (dst && dst->cache_entry.flags.alpha)
383 d = DP;
384 return blend_gfx_pt_func_cpu(s, m, c, d);
385}
386
387void evas_common_op_blend_rel_init_sse3(void);
388
389static void
390op_blend_rel_init(void)
391{
392 memset(op_blend_rel_span_funcs, 0, sizeof(op_blend_rel_span_funcs));
393 memset(op_blend_rel_pt_funcs, 0, sizeof(op_blend_rel_pt_funcs));
394#ifdef BUILD_SSE3
395 evas_common_op_blend_rel_init_sse3();
396#endif
397#ifdef BUILD_MMX
398 init_blend_rel_pixel_span_funcs_mmx();
399 init_blend_rel_pixel_color_span_funcs_mmx();
400 init_blend_rel_pixel_mask_span_funcs_mmx();
401 init_blend_rel_color_span_funcs_mmx();
402 init_blend_rel_mask_color_span_funcs_mmx();
403
404 init_blend_rel_pixel_pt_funcs_mmx();
405 init_blend_rel_pixel_color_pt_funcs_mmx();
406 init_blend_rel_pixel_mask_pt_funcs_mmx();
407 init_blend_rel_color_pt_funcs_mmx();
408 init_blend_rel_mask_color_pt_funcs_mmx();
409#endif
410#ifdef BUILD_NEON
411 init_blend_rel_pixel_span_funcs_neon();
412 init_blend_rel_pixel_color_span_funcs_neon();
413 init_blend_rel_pixel_mask_span_funcs_neon();
414 init_blend_rel_color_span_funcs_neon();
415 init_blend_rel_mask_color_span_funcs_neon();
416
417 init_blend_rel_pixel_pt_funcs_neon();
418 init_blend_rel_pixel_color_pt_funcs_neon();
419 init_blend_rel_pixel_mask_pt_funcs_neon();
420 init_blend_rel_color_pt_funcs_neon();
421 init_blend_rel_mask_color_pt_funcs_neon();
422#endif
423#ifdef BUILD_C
424 init_blend_rel_pixel_span_funcs_c();
425 init_blend_rel_pixel_color_span_funcs_c();
426 init_blend_rel_pixel_mask_span_funcs_c();
427 init_blend_rel_color_span_funcs_c();
428 init_blend_rel_mask_color_span_funcs_c();
429
430 init_blend_rel_pixel_pt_funcs_c();
431 init_blend_rel_pixel_color_pt_funcs_c();
432 init_blend_rel_pixel_mask_pt_funcs_c();
433 init_blend_rel_color_pt_funcs_c();
434 init_blend_rel_mask_color_pt_funcs_c();
435#endif
436}
437
438static void
439op_blend_rel_shutdown(void)
440{
441}
442
443static RGBA_Gfx_Func
444blend_rel_gfx_span_func_cpu(int s, int m, int c, int d)
445{
446 RGBA_Gfx_Func func = NULL;
447 int cpu = CPU_N;
448#ifdef BUILD_SSE3
449 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
450 {
451 cpu = CPU_SSE3;
452 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
453 if(func) return func;
454 }
455#endif
456#ifdef BUILD_MMX
457 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
458 {
459 cpu = CPU_MMX;
460 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
461 if (func) return func;
462 }
463#endif
464#ifdef BUILD_NEON
465 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
466 {
467 cpu = CPU_NEON;
468 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
469 if (func) return func;
470 }
471#endif
472#ifdef BUILD_C
473 cpu = CPU_C;
474 func = op_blend_rel_span_funcs[s][m][c][d][cpu];
475 if (func) return func;
476#endif
477 return func;
478}
479
480static RGBA_Gfx_Func
481op_blend_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
482{
483 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
484
485 if (src && src->cache_entry.flags.alpha)
486 {
487 s = SP;
488 if (src->cache_entry.flags.alpha_sparse)
489 s = SP_AS;
490 }
491 if (dst && dst->cache_entry.flags.alpha)
492 d = DP;
493 return blend_rel_gfx_span_func_cpu(s, m, c, d);
494}
495
496static RGBA_Gfx_Func
497op_blend_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
498{
499 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
500
501 if ((col >> 24) < 255)
502 c = SC;
503 if (col == ((col >> 24) * 0x01010101))
504 c = SC_AA;
505 if (col == 0xffffffff)
506 c = SC_N;
507 if (dst && dst->cache_entry.flags.alpha)
508 d = DP;
509 return blend_rel_gfx_span_func_cpu(s, m, c, d);
510}
511
512static RGBA_Gfx_Func
513op_blend_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
514{
515 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
516
517 if (src && src->cache_entry.flags.alpha)
518 s = SP;
519 if ((col >> 24) < 255)
520 c = SC;
521 if (col == ((col >> 24) * 0x01010101))
522 c = SC_AA;
523 if (col == 0xffffffff)
524 c = SC_N;
525 if (dst && dst->cache_entry.flags.alpha)
526 d = DP;
527 return blend_rel_gfx_span_func_cpu(s, m, c, d);
528}
529
530static RGBA_Gfx_Func
531op_blend_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
532{
533 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
534
535 if ((col >> 24) < 255)
536 c = SC;
537 if (col == ((col >> 24) * 0x01010101))
538 c = SC_AA;
539 if (col == 0xffffffff)
540 c = SC_N;
541 if (dst && dst->cache_entry.flags.alpha)
542 d = DP;
543 return blend_rel_gfx_span_func_cpu(s, m, c, d);
544}
545
546static RGBA_Gfx_Func
547op_blend_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
548{
549 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
550
551 if (src && src->cache_entry.flags.alpha)
552 {
553 s = SP;
554 if (src->cache_entry.flags.alpha_sparse)
555 s = SP_AS;
556 }
557 if (dst && dst->cache_entry.flags.alpha)
558 d = DP;
559 return blend_rel_gfx_span_func_cpu(s, m, c, d);
560}
561
562static RGBA_Gfx_Pt_Func
563blend_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
564{
565 RGBA_Gfx_Pt_Func func = NULL;
566 int cpu = CPU_N;
567#ifdef BUILD_SSE3
568 if (evas_common_cpu_has_feature(CPU_FEATURE_SSE3))
569 {
570 cpu = CPU_SSE3;
571 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
572 if(func) return func;
573 }
574#endif
575#ifdef BUILD_MMX
576 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
577 {
578 cpu = CPU_MMX;
579 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
580 if (func) return func;
581 }
582#endif
583#ifdef BUILD_NEON
584 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
585 {
586 cpu = CPU_NEON;
587 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
588 if (func) return func;
589 }
590#endif
591#ifdef BUILD_C
592 cpu = CPU_C;
593 func = op_blend_rel_pt_funcs[s][m][c][d][cpu];
594 if (func) return func;
595#endif
596 return func;
597}
598
599static RGBA_Gfx_Pt_Func
600op_blend_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
601{
602 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
603
604 if (src_flags.alpha)
605 s = SP;
606 if (dst && dst->cache_entry.flags.alpha)
607 d = DP;
608 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
609}
610
611static RGBA_Gfx_Pt_Func
612op_blend_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
613{
614 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
615
616 if ((col >> 24) < 255)
617 c = SC;
618 if (col == ((col >> 24) * 0x01010101))
619 c = SC_AA;
620 if (col == 0xffffffff)
621 c = SC_N;
622 if (dst && dst->cache_entry.flags.alpha)
623 d = DP;
624 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
625}
626
627static RGBA_Gfx_Pt_Func
628op_blend_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
629{
630 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
631
632 if (src_flags.alpha)
633 s = SP;
634 if ((col >> 24) < 255)
635 c = SC;
636 if (col == ((col >> 24) * 0x01010101))
637 c = SC_AA;
638 if (col == 0xffffffff)
639 c = SC_N;
640 if (dst && dst->cache_entry.flags.alpha)
641 d = DP;
642 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
643}
644
645static RGBA_Gfx_Pt_Func
646op_blend_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
647{
648 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
649
650 if ((col >> 24) < 255)
651 c = SC;
652 if (col == ((col >> 24) * 0x01010101))
653 c = SC_AA;
654 if (col == 0xffffffff)
655 c = SC_N;
656 if (dst && dst->cache_entry.flags.alpha)
657 d = DP;
658 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
659}
660
661static RGBA_Gfx_Pt_Func
662op_blend_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
663{
664 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
665
666 if (src_flags.alpha)
667 s = SP;
668 if (dst && dst->cache_entry.flags.alpha)
669 d = DP;
670 return blend_rel_gfx_pt_func_cpu(s, m, c, d);
671}
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_copy_color_.c \
5op_copy_color_i386.c \
6op_copy_color_neon.c \
7op_copy_mask_color_.c \
8op_copy_mask_color_i386.c \
9op_copy_mask_color_neon.c \
10op_copy_pixel_.c \
11op_copy_pixel_neon.c \
12op_copy_pixel_color_.c \
13op_copy_pixel_color_i386.c \
14op_copy_pixel_color_neon.c \
15op_copy_pixel_i386.c \
16op_copy_pixel_mask_.c \
17op_copy_pixel_mask_i386.c \
18op_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_copy
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
120EXOTIC_LIBS = @EXOTIC_LIBS@
121FGREP = @FGREP@
122FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
123FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
124FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
125FREETYPE_LIBS = @FREETYPE_LIBS@
126FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
127FRIBIDI_LIBS = @FRIBIDI_LIBS@
128GL_EET_CFLAGS = @GL_EET_CFLAGS@
129GL_EET_LIBS = @GL_EET_LIBS@
130GREP = @GREP@
131HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
132HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
133INSTALL = @INSTALL@
134INSTALL_DATA = @INSTALL_DATA@
135INSTALL_PROGRAM = @INSTALL_PROGRAM@
136INSTALL_SCRIPT = @INSTALL_SCRIPT@
137INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
138LD = @LD@
139LDFLAGS = @LDFLAGS@
140LIBOBJS = @LIBOBJS@
141LIBS = @LIBS@
142LIBTOOL = @LIBTOOL@
143LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
144LINEBREAK_LIBS = @LINEBREAK_LIBS@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MKDIR_P = @MKDIR_P@
150MODULE_ARCH = @MODULE_ARCH@
151NM = @NM@
152NMEDIT = @NMEDIT@
153OBJC = @OBJC@
154OBJCDEPMODE = @OBJCDEPMODE@
155OBJCFLAGS = @OBJCFLAGS@
156OBJDUMP = @OBJDUMP@
157OBJEXT = @OBJEXT@
158OTOOL = @OTOOL@
159OTOOL64 = @OTOOL64@
160PACKAGE = @PACKAGE@
161PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162PACKAGE_NAME = @PACKAGE_NAME@
163PACKAGE_STRING = @PACKAGE_STRING@
164PACKAGE_TARNAME = @PACKAGE_TARNAME@
165PACKAGE_URL = @PACKAGE_URL@
166PACKAGE_VERSION = @PACKAGE_VERSION@
167PATH_SEPARATOR = @PATH_SEPARATOR@
168PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
169PIXMAN_LIBS = @PIXMAN_LIBS@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173PNG_CFLAGS = @PNG_CFLAGS@
174PNG_LIBS = @PNG_LIBS@
175RANLIB = @RANLIB@
176SDL_CFLAGS = @SDL_CFLAGS@
177SDL_LIBS = @SDL_LIBS@
178SED = @SED@
179SET_MAKE = @SET_MAKE@
180SHELL = @SHELL@
181SHM_OPEN_LINK = @SHM_OPEN_LINK@
182STRIP = @STRIP@
183SVG_CFLAGS = @SVG_CFLAGS@
184SVG_LIBS = @SVG_LIBS@
185VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
186VALGRIND_LIBS = @VALGRIND_LIBS@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
190WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
191XCB_CFLAGS = @XCB_CFLAGS@
192XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
193XCB_GL_LIBS = @XCB_GL_LIBS@
194XCB_LIBS = @XCB_LIBS@
195XEXT_CFLAGS = @XEXT_CFLAGS@
196XEXT_LIBS = @XEXT_LIBS@
197XMKMF = @XMKMF@
198X_CFLAGS = @X_CFLAGS@
199X_EXTRA_LIBS = @X_EXTRA_LIBS@
200X_LIBS = @X_LIBS@
201X_PRE_LIBS = @X_PRE_LIBS@
202abs_builddir = @abs_builddir@
203abs_srcdir = @abs_srcdir@
204abs_top_builddir = @abs_top_builddir@
205abs_top_srcdir = @abs_top_srcdir@
206ac_ct_CC = @ac_ct_CC@
207ac_ct_CXX = @ac_ct_CXX@
208ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
209ac_ct_OBJC = @ac_ct_OBJC@
210altivec_cflags = @altivec_cflags@
211am__include = @am__include@
212am__leading_dot = @am__leading_dot@
213am__quote = @am__quote@
214am__tar = @am__tar@
215am__untar = @am__untar@
216bindir = @bindir@
217build = @build@
218build_alias = @build_alias@
219build_cpu = @build_cpu@
220build_os = @build_os@
221build_vendor = @build_vendor@
222builddir = @builddir@
223datadir = @datadir@
224datarootdir = @datarootdir@
225dlopen_libs = @dlopen_libs@
226docdir = @docdir@
227dvidir = @dvidir@
228edje_cc = @edje_cc@
229efl_doxygen = @efl_doxygen@
230efl_have_doxygen = @efl_have_doxygen@
231evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
232evas_engine_buffer_libs = @evas_engine_buffer_libs@
233evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
234evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
235evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
236evas_engine_directfb_libs = @evas_engine_directfb_libs@
237evas_engine_fb_cflags = @evas_engine_fb_cflags@
238evas_engine_fb_libs = @evas_engine_fb_libs@
239evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
240evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
241evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
242evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
243evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
244evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
245evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
246evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
247evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
248evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
249evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
250evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
251evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
252evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
253evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
254evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
255evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
256evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
257evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
258evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
259evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
260evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
261evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
262evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
263evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
269evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
270evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
271evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
272evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
273evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
274evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
275evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
276evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
277evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
278evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
279evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
280evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
281evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
282evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
283evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
284evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
285evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
286evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
287evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
288evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
289evas_image_loader_png_libs = @evas_image_loader_png_libs@
290evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
291evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
292evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
293evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
294evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
295evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
296evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
297evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
298evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
299evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
300evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
301evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
302exec_prefix = @exec_prefix@
303have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
304have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
305have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
306have_evas_engine_software_x11 = @have_evas_engine_software_x11@
307have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
308have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
309have_lcov = @have_lcov@
310host = @host@
311host_alias = @host_alias@
312host_cpu = @host_cpu@
313host_os = @host_os@
314host_vendor = @host_vendor@
315htmldir = @htmldir@
316includedir = @includedir@
317infodir = @infodir@
318install_sh = @install_sh@
319libdir = @libdir@
320libexecdir = @libexecdir@
321localedir = @localedir@
322localstatedir = @localstatedir@
323lt_ECHO = @lt_ECHO@
324lt_enable_auto_import = @lt_enable_auto_import@
325mandir = @mandir@
326mkdir_p = @mkdir_p@
327oldincludedir = @oldincludedir@
328pdfdir = @pdfdir@
329pkgconfig_requires_private = @pkgconfig_requires_private@
330prefix = @prefix@
331program_transform_name = @program_transform_name@
332psdir = @psdir@
333pthread_cflags = @pthread_cflags@
334pthread_libs = @pthread_libs@
335release_info = @release_info@
336requirement_evas = @requirement_evas@
337sbindir = @sbindir@
338sharedstatedir = @sharedstatedir@
339srcdir = @srcdir@
340sysconfdir = @sysconfdir@
341target_alias = @target_alias@
342top_build_prefix = @top_build_prefix@
343top_builddir = @top_builddir@
344top_srcdir = @top_srcdir@
345version_info = @version_info@
346MAINTAINERCLEANFILES = Makefile.in
347EXTRA_DIST = \
348op_copy_color_.c \
349op_copy_color_i386.c \
350op_copy_color_neon.c \
351op_copy_mask_color_.c \
352op_copy_mask_color_i386.c \
353op_copy_mask_color_neon.c \
354op_copy_pixel_.c \
355op_copy_pixel_neon.c \
356op_copy_pixel_color_.c \
357op_copy_pixel_color_i386.c \
358op_copy_pixel_color_neon.c \
359op_copy_pixel_i386.c \
360op_copy_pixel_mask_.c \
361op_copy_pixel_mask_i386.c \
362op_copy_pixel_mask_neon.c
363
364all: all-am
365
366.SUFFIXES:
367$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
368 @for dep in $?; do \
369 case '$(am__configure_deps)' in \
370 *$$dep*) \
371 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
372 && { if test -f $@; then exit 0; else break; fi; }; \
373 exit 1;; \
374 esac; \
375 done; \
376 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile'; \
377 $(am__cd) $(top_srcdir) && \
378 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_copy/Makefile
379.PRECIOUS: Makefile
380Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
381 @case '$?' in \
382 *config.status*) \
383 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
384 *) \
385 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
386 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
387 esac;
388
389$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
390 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
391
392$(top_srcdir)/configure: $(am__configure_deps)
393 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
394$(ACLOCAL_M4): $(am__aclocal_m4_deps)
395 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
396$(am__aclocal_m4_deps):
397
398mostlyclean-libtool:
399 -rm -f *.lo
400
401clean-libtool:
402 -rm -rf .libs _libs
403tags: TAGS
404TAGS:
405
406ctags: CTAGS
407CTAGS:
408
409
410distdir: $(DISTFILES)
411 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
412 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
413 list='$(DISTFILES)'; \
414 dist_files=`for file in $$list; do echo $$file; done | \
415 sed -e "s|^$$srcdirstrip/||;t" \
416 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
417 case $$dist_files in \
418 */*) $(MKDIR_P) `echo "$$dist_files" | \
419 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
420 sort -u` ;; \
421 esac; \
422 for file in $$dist_files; do \
423 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
424 if test -d $$d/$$file; then \
425 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
426 if test -d "$(distdir)/$$file"; then \
427 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
428 fi; \
429 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
430 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
431 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
432 fi; \
433 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
434 else \
435 test -f "$(distdir)/$$file" \
436 || cp -p $$d/$$file "$(distdir)/$$file" \
437 || exit 1; \
438 fi; \
439 done
440check-am: all-am
441check: check-am
442all-am: Makefile
443installdirs:
444install: install-am
445install-exec: install-exec-am
446install-data: install-data-am
447uninstall: uninstall-am
448
449install-am: all-am
450 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
451
452installcheck: installcheck-am
453install-strip:
454 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
455 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
456 `test -z '$(STRIP)' || \
457 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
458mostlyclean-generic:
459
460clean-generic:
461
462distclean-generic:
463 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
464 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
465
466maintainer-clean-generic:
467 @echo "This command is intended for maintainers to use"
468 @echo "it deletes files that may require special tools to rebuild."
469 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
470clean: clean-am
471
472clean-am: clean-generic clean-libtool mostlyclean-am
473
474distclean: distclean-am
475 -rm -f Makefile
476distclean-am: clean-am distclean-generic
477
478dvi: dvi-am
479
480dvi-am:
481
482html: html-am
483
484html-am:
485
486info: info-am
487
488info-am:
489
490install-data-am:
491
492install-dvi: install-dvi-am
493
494install-dvi-am:
495
496install-exec-am:
497
498install-html: install-html-am
499
500install-html-am:
501
502install-info: install-info-am
503
504install-info-am:
505
506install-man:
507
508install-pdf: install-pdf-am
509
510install-pdf-am:
511
512install-ps: install-ps-am
513
514install-ps-am:
515
516installcheck-am:
517
518maintainer-clean: maintainer-clean-am
519 -rm -f Makefile
520maintainer-clean-am: distclean-am maintainer-clean-generic
521
522mostlyclean: mostlyclean-am
523
524mostlyclean-am: mostlyclean-generic mostlyclean-libtool
525
526pdf: pdf-am
527
528pdf-am:
529
530ps: ps-am
531
532ps-am:
533
534uninstall-am:
535
536.MAKE: install-am install-strip
537
538.PHONY: all all-am check check-am clean clean-generic clean-libtool \
539 distclean distclean-generic distclean-libtool distdir dvi \
540 dvi-am html html-am info info-am install install-am \
541 install-data install-data-am install-dvi install-dvi-am \
542 install-exec install-exec-am install-html install-html-am \
543 install-info install-info-am install-man install-pdf \
544 install-pdf-am install-ps install-ps-am install-strip \
545 installcheck installcheck-am installdirs maintainer-clean \
546 maintainer-clean-generic mostlyclean mostlyclean-generic \
547 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
548
549
550# Tell versions [3.59,3.63) of GNU make to not export all variables.
551# Otherwise a system limit (for SysV at least) may be exceeded.
552.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 @@
1/* copy color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 UNROLL8_PLD_WHILE(d, l, e,
8 {
9 *d = c;
10 d++;
11 });
12}
13
14#define _op_copy_cn_dp _op_copy_c_dp
15#define _op_copy_can_dp _op_copy_c_dp
16#define _op_copy_caa_dp _op_copy_c_dp
17
18#define _op_copy_c_dpan _op_copy_c_dp
19#define _op_copy_cn_dpan _op_copy_c_dp
20#define _op_copy_can_dpan _op_copy_c_dp
21#define _op_copy_caa_dpan _op_copy_c_dp
22
23static void
24init_copy_color_span_funcs_c(void)
25{
26 op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_cn_dp;
27 op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_c_dp;
28 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_can_dp;
29 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_caa_dp;
30
31 op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_cn_dpan;
32 op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_c_dpan;
33 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_can_dpan;
34 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_caa_dpan;
35}
36#endif
37
38#ifdef BUILD_C
39static void
40_op_copy_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
41 *d = c;
42}
43
44#define _op_copy_pt_cn_dp _op_copy_pt_c_dp
45#define _op_copy_pt_can_dp _op_copy_pt_c_dp
46#define _op_copy_pt_caa_dp _op_copy_pt_c_dp
47
48#define _op_copy_pt_c_dpan _op_copy_pt_c_dp
49#define _op_copy_pt_cn_dpan _op_copy_pt_c_dp
50#define _op_copy_pt_can_dpan _op_copy_pt_c_dp
51#define _op_copy_pt_caa_dpan _op_copy_pt_c_dp
52
53static void
54init_copy_color_pt_funcs_c(void)
55{
56 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_cn_dp;
57 op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_pt_c_dp;
58 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_can_dp;
59 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_caa_dp;
60
61 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_cn_dpan;
62 op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_c_dpan;
63 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_can_dpan;
64 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_caa_dpan;
65}
66#endif
67
68/*-----*/
69
70/* copy_rel color --> dst */
71
72#ifdef BUILD_C
73static void
74_op_copy_rel_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
75 DATA32 *e;
76 UNROLL8_PLD_WHILE(d, l, e,
77 {
78 *d = MUL_SYM(*d >> 24, c);
79 d++;
80 });
81}
82
83
84#define _op_copy_rel_cn_dp _op_copy_rel_c_dp
85#define _op_copy_rel_can_dp _op_copy_rel_c_dp
86#define _op_copy_rel_caa_dp _op_copy_rel_c_dp
87
88#define _op_copy_rel_c_dpan _op_copy_c_dp
89#define _op_copy_rel_cn_dpan _op_copy_cn_dp
90#define _op_copy_rel_can_dpan _op_copy_can_dp
91#define _op_copy_rel_caa_dpan _op_copy_caa_dp
92
93static void
94init_copy_rel_color_span_funcs_c(void)
95{
96 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_cn_dp;
97 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_c_dp;
98 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_can_dp;
99 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_caa_dp;
100
101 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_cn_dpan;
102 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_c_dpan;
103 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_can_dpan;
104 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_caa_dpan;
105}
106#endif
107
108#ifdef BUILD_C
109static void
110_op_copy_rel_pt_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
111 s = 1 + (*d >> 24);
112 *d = MUL_256(s, c);
113}
114
115
116#define _op_copy_rel_pt_cn_dp _op_copy_rel_pt_c_dp
117#define _op_copy_rel_pt_can_dp _op_copy_rel_pt_c_dp
118#define _op_copy_rel_pt_caa_dp _op_copy_rel_pt_c_dp
119
120#define _op_copy_rel_pt_c_dpan _op_copy_pt_c_dp
121#define _op_copy_rel_pt_cn_dpan _op_copy_pt_cn_dp
122#define _op_copy_rel_pt_can_dpan _op_copy_pt_can_dp
123#define _op_copy_rel_pt_caa_dpan _op_copy_pt_caa_dp
124
125static void
126init_copy_rel_color_pt_funcs_c(void)
127{
128 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_cn_dp;
129 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_c_dp;
130 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_can_dp;
131 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_caa_dp;
132
133 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_cn_dpan;
134 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_c_dpan;
135 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_can_dpan;
136 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_caa_dpan;
137}
138#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 @@
1/* copy color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l - 1;
7 movd_m2r(c, mm1);
8 movq_r2r(mm1, mm2);
9 psllq_i2r(32, mm1);
10 por_r2r(mm2, mm1);
11 for (; d < e; d+=2) {
12 movq_r2m(mm1, d[0]);
13 }
14 e+=1;
15 for (; d < e; d++) {
16 *d = c;
17 }
18}
19
20#define _op_copy_cn_dp_mmx _op_copy_c_dp_mmx
21#define _op_copy_can_dp_mmx _op_copy_c_dp_mmx
22#define _op_copy_caa_dp_mmx _op_copy_c_dp_mmx
23
24#define _op_copy_cn_dpan_mmx _op_copy_c_dp_mmx
25#define _op_copy_c_dpan_mmx _op_copy_c_dp_mmx
26#define _op_copy_can_dpan_mmx _op_copy_c_dp_mmx
27#define _op_copy_caa_dpan_mmx _op_copy_c_dp_mmx
28
29static void
30init_copy_color_span_funcs_mmx(void)
31{
32 op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_cn_dp_mmx;
33 op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_c_dp_mmx;
34 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_can_dp_mmx;
35 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_caa_dp_mmx;
36
37 op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_cn_dpan_mmx;
38 op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_c_dpan_mmx;
39 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_can_dpan_mmx;
40 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_caa_dpan_mmx;
41}
42#endif
43
44#ifdef BUILD_MMX
45static void
46_op_copy_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
47 *d = c;
48}
49
50#define _op_copy_pt_cn_dp_mmx _op_copy_pt_c_dp_mmx
51#define _op_copy_pt_can_dp_mmx _op_copy_pt_c_dp_mmx
52#define _op_copy_pt_caa_dp_mmx _op_copy_pt_c_dp_mmx
53
54#define _op_copy_pt_cn_dpan_mmx _op_copy_pt_c_dp_mmx
55#define _op_copy_pt_c_dpan_mmx _op_copy_pt_c_dp_mmx
56#define _op_copy_pt_can_dpan_mmx _op_copy_pt_c_dp_mmx
57#define _op_copy_pt_caa_dpan_mmx _op_copy_pt_c_dp_mmx
58
59static void
60init_copy_color_pt_funcs_mmx(void)
61{
62 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_cn_dp_mmx;
63 op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_c_dp_mmx;
64 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_can_dp_mmx;
65 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_caa_dp_mmx;
66
67 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_cn_dpan_mmx;
68 op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_c_dpan_mmx;
69 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_can_dpan_mmx;
70 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_caa_dpan_mmx;
71}
72#endif
73
74/*-----*/
75
76/* copy_rel color --> dst */
77
78#ifdef BUILD_MMX
79static void
80_op_copy_rel_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
81 DATA32 *e = d + l;
82 pxor_r2r(mm0, mm0);
83 MOV_P2R(c, mm2, mm0)
84 for (; d < e; d++) {
85 DATA32 da = 1 + (*d >> 24);
86 MOV_A2R(da, mm1)
87 MUL4_256_R2R(mm2, mm1)
88 MOV_R2P(mm1, *d, mm0)
89 }
90}
91
92#define _op_copy_rel_cn_dp_mmx _op_copy_rel_c_dp_mmx
93#define _op_copy_rel_can_dp_mmx _op_copy_rel_c_dp_mmx
94#define _op_copy_rel_caa_dp_mmx _op_copy_rel_c_dp_mmx
95
96#define _op_copy_rel_cn_dpan_mmx _op_copy_cn_dpan_mmx
97#define _op_copy_rel_c_dpan_mmx _op_copy_c_dpan_mmx
98#define _op_copy_rel_can_dpan_mmx _op_copy_can_dpan_mmx
99#define _op_copy_rel_caa_dpan_mmx _op_copy_caa_dpan_mmx
100
101static void
102init_copy_rel_color_span_funcs_mmx(void)
103{
104 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_cn_dp_mmx;
105 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_c_dp_mmx;
106 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_can_dp_mmx;
107 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_caa_dp_mmx;
108
109 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_cn_dpan_mmx;
110 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_c_dpan_mmx;
111 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_can_dpan_mmx;
112 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_caa_dpan_mmx;
113}
114#endif
115
116#ifdef BUILD_MMX
117static void
118_op_copy_rel_pt_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
119 s = 1 + (*d >> 24);
120 pxor_r2r(mm0, mm0);
121 MOV_P2R(c, mm2, mm0)
122 MOV_A2R(s, mm1)
123 MUL4_256_R2R(mm2, mm1)
124 MOV_R2P(mm1, *d, mm0)
125}
126
127
128#define _op_copy_rel_pt_cn_dp_mmx _op_copy_rel_pt_c_dp_mmx
129#define _op_copy_rel_pt_can_dp_mmx _op_copy_rel_pt_c_dp_mmx
130#define _op_copy_rel_pt_caa_dp_mmx _op_copy_rel_pt_c_dp_mmx
131
132#define _op_copy_rel_pt_cn_dpan_mmx _op_copy_pt_cn_dpan_mmx
133#define _op_copy_rel_pt_c_dpan_mmx _op_copy_pt_c_dpan_mmx
134#define _op_copy_rel_pt_can_dpan_mmx _op_copy_pt_can_dpan_mmx
135#define _op_copy_rel_pt_caa_dpan_mmx _op_copy_pt_caa_dpan_mmx
136
137static void
138init_copy_rel_color_pt_funcs_mmx(void)
139{
140 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_cn_dp_mmx;
141 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_c_dp_mmx;
142 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_can_dp_mmx;
143 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_caa_dp_mmx;
144
145 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_cn_dpan_mmx;
146 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_c_dpan_mmx;
147 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_can_dpan_mmx;
148 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_caa_dpan_mmx;
149}
150#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 @@
1/* copy color --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6#define AP "COPY_C_DP_"
7 uint32_t *e = d + l,*tmp;
8 asm volatile (
9 ".fpu neon \n\t"
10
11 "vdup.i32 q0, %[c] \n\t"
12
13 // Can we do 32 byte?
14 "andS %[tmp], %[d], $0x1f \n\t"
15 "beq "AP"quadstart \n\t"
16
17 // Can we do at least 16 byte?
18 "andS %[tmp], %[d], $0x4 \n\t"
19 "beq "AP"dualstart \n\t"
20
21 // Only once
22 AP"singleloop: \n\t"
23 "vst1.32 d0[0], [%[d]] \n\t"
24 "add %[d], #4 \n\t"
25
26 // Up to 3 times
27 AP"dualstart: \n\t"
28 "sub %[tmp], %[e], %[d] \n\t"
29 "cmp %[tmp], #32 \n\t"
30 "blt "AP"loopout \n\t"
31
32 AP"dualloop: \n\t"
33 "vstr.32 d0, [%[d]] \n\t"
34
35 "add %[d], #8 \n\t"
36 "andS %[tmp], %[d], $0x1f \n\t"
37 "bne "AP"dualloop \n\t"
38
39
40 AP"quadstart: \n\t"
41 "sub %[tmp], %[e], %[d] \n\t"
42 "cmp %[tmp], #32 \n\t"
43 "blt "AP"loopout \n\t"
44
45 "vmov q1, q0 \n\t"
46 "sub %[tmp],%[e],#31 \n\t"
47
48 AP "quadloop: \n\t"
49 "vstm %[d]!, {d0,d1,d2,d3} \n\t"
50
51 "cmp %[tmp], %[d] \n\t"
52 "bhi "AP"quadloop \n\t"
53
54
55 AP "loopout: \n\t"
56 "cmp %[d], %[e] \n\t"
57 "beq "AP"done \n\t"
58 "sub %[tmp],%[e], %[d] \n\t"
59 "cmp %[tmp],$0x04 \n\t"
60 "beq "AP"singleloop2 \n\t"
61
62 AP "dualloop2: \n\t"
63 "sub %[tmp],%[e],#7 \n\t"
64 AP "dualloop2int: \n\t"
65 "vstr.64 d0, [%[d]] \n\t"
66
67 "add %[d], #8 \n\t"
68 "cmp %[tmp], %[d] \n\t"
69 "bhi "AP"dualloop2int \n\t"
70
71 // Single ??
72 "cmp %[e], %[d] \n\t"
73 "beq "AP"done \n\t"
74
75 AP "singleloop2: \n\t"
76 "vst1.32 d0[0], [%[d]] \n\t"
77
78 AP "done:\n\t"
79
80 : // No output regs
81 // Input
82 : [c] "r" (c), [e] "r" (e), [d] "r" (d),[tmp] "r" (tmp)
83 // Clobbered
84 : "q0","q1","memory"
85
86
87 );
88}
89
90#define _op_copy_cn_dp_neon _op_copy_c_dp_neon
91#define _op_copy_can_dp_neon _op_copy_c_dp_neon
92#define _op_copy_caa_dp_neon _op_copy_c_dp_neon
93
94#define _op_copy_cn_dpan_neon _op_copy_c_dp_neon
95#define _op_copy_c_dpan_neon _op_copy_c_dp_neon
96#define _op_copy_can_dpan_neon _op_copy_c_dp_neon
97#define _op_copy_caa_dpan_neon _op_copy_c_dp_neon
98
99static void
100init_copy_color_span_funcs_neon(void)
101{
102 op_copy_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_cn_dp_neon;
103 op_copy_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_c_dp_neon;
104 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_can_dp_neon;
105 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_caa_dp_neon;
106
107 op_copy_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_cn_dpan_neon;
108 op_copy_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_c_dpan_neon;
109 op_copy_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_can_dpan_neon;
110 op_copy_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_caa_dpan_neon;
111}
112#endif
113
114#ifdef BUILD_NEON
115static void
116_op_copy_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
117 *d = c;
118}
119
120#define _op_copy_pt_cn_dp_neon _op_copy_pt_c_dp_neon
121#define _op_copy_pt_can_dp_neon _op_copy_pt_c_dp_neon
122#define _op_copy_pt_caa_dp_neon _op_copy_pt_c_dp_neon
123
124#define _op_copy_pt_cn_dpan_neon _op_copy_pt_c_dp_neon
125#define _op_copy_pt_c_dpan_neon _op_copy_pt_c_dp_neon
126#define _op_copy_pt_can_dpan_neon _op_copy_pt_c_dp_neon
127#define _op_copy_pt_caa_dpan_neon _op_copy_pt_c_dp_neon
128
129static void
130init_copy_color_pt_funcs_neon(void)
131{
132 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_cn_dp_neon;
133 op_copy_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_c_dp_neon;
134 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_can_dp_neon;
135 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_caa_dp_neon;
136
137 op_copy_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_cn_dpan_neon;
138 op_copy_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_c_dpan_neon;
139 op_copy_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_can_dpan_neon;
140 op_copy_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_caa_dpan_neon;
141}
142#endif
143
144/*-----*/
145
146/* copy_rel color --> dst */
147
148#ifdef BUILD_NEON
149static void
150_op_copy_rel_c_dp_neon(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
151 // FIXME: neon-it
152 DATA32 *e = d + l;
153 for (; d < e; d++) {
154 *d = MUL_SYM(*d >> 24, c);
155 }
156}
157
158#define _op_copy_rel_cn_dp_neon _op_copy_rel_c_dp_neon
159#define _op_copy_rel_can_dp_neon _op_copy_rel_c_dp_neon
160#define _op_copy_rel_caa_dp_neon _op_copy_rel_c_dp_neon
161
162#define _op_copy_rel_cn_dpan_neon _op_copy_cn_dpan_neon
163#define _op_copy_rel_c_dpan_neon _op_copy_c_dpan_neon
164#define _op_copy_rel_can_dpan_neon _op_copy_can_dpan_neon
165#define _op_copy_rel_caa_dpan_neon _op_copy_caa_dpan_neon
166
167static void
168init_copy_rel_color_span_funcs_neon(void)
169{
170 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_cn_dp_neon;
171 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_c_dp_neon;
172 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_can_dp_neon;
173 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_caa_dp_neon;
174
175 op_copy_rel_span_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_cn_dpan_neon;
176 op_copy_rel_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_c_dpan_neon;
177 op_copy_rel_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_can_dpan_neon;
178 op_copy_rel_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_caa_dpan_neon;
179}
180#endif
181
182#ifdef BUILD_NEON
183static void
184_op_copy_rel_pt_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
185 s = 1 + (*d >> 24);
186 *d = MUL_256(s, c);
187}
188
189
190#define _op_copy_rel_pt_cn_dp_neon _op_copy_rel_pt_c_dp_neon
191#define _op_copy_rel_pt_can_dp_neon _op_copy_rel_pt_c_dp_neon
192#define _op_copy_rel_pt_caa_dp_neon _op_copy_rel_pt_c_dp_neon
193
194#define _op_copy_rel_pt_cn_dpan_neon _op_copy_pt_cn_dpan_neon
195#define _op_copy_rel_pt_c_dpan_neon _op_copy_pt_c_dpan_neon
196#define _op_copy_rel_pt_can_dpan_neon _op_copy_pt_can_dpan_neon
197#define _op_copy_rel_pt_caa_dpan_neon _op_copy_pt_caa_dpan_neon
198
199static void
200init_copy_rel_color_pt_funcs_neon(void)
201{
202 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_cn_dp_neon;
203 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_c_dp_neon;
204 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_can_dp_neon;
205 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_caa_dp_neon;
206
207 op_copy_rel_pt_funcs[SP_N][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_cn_dpan_neon;
208 op_copy_rel_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_c_dpan_neon;
209 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_can_dpan_neon;
210 op_copy_rel_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_caa_dpan_neon;
211}
212#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 @@
1/* copy mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 int color;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 color = *m;
11 switch(color)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = c;
17 break;
18 default:
19 color++;
20 *d = INTERP_256(color, c, *d);
21 break;
22 }
23 m++; d++;
24 });
25}
26
27#define _op_copy_mas_cn_dp _op_copy_mas_c_dp
28#define _op_copy_mas_can_dp _op_copy_mas_c_dp
29#define _op_copy_mas_caa_dp _op_copy_mas_c_dp
30
31#define _op_copy_mas_c_dpan _op_copy_mas_c_dp
32#define _op_copy_mas_cn_dpan _op_copy_mas_c_dpan
33#define _op_copy_mas_can_dpan _op_copy_mas_c_dpan
34#define _op_copy_mas_caa_dpan _op_copy_mas_c_dpan
35
36static void
37init_copy_mask_color_span_funcs_c(void)
38{
39 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_mas_cn_dp;
40 op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_mas_c_dp;
41 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_mas_can_dp;
42 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_mas_caa_dp;
43
44 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_mas_cn_dpan;
45 op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_mas_c_dpan;
46 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_mas_can_dpan;
47 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_mas_caa_dpan;
48}
49#endif
50
51#ifdef BUILD_C
52static void
53_op_copy_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
54 *d = INTERP_256(m + 1, c, *d);
55}
56
57
58#define _op_copy_pt_mas_cn_dp _op_copy_pt_mas_c_dp
59#define _op_copy_pt_mas_can_dp _op_copy_pt_mas_c_dp
60#define _op_copy_pt_mas_caa_dp _op_copy_pt_mas_c_dp
61
62#define _op_copy_pt_mas_c_dpan _op_copy_pt_mas_c_dp
63#define _op_copy_pt_mas_cn_dpan _op_copy_pt_mas_c_dpan
64#define _op_copy_pt_mas_can_dpan _op_copy_pt_mas_c_dpan
65#define _op_copy_pt_mas_caa_dpan _op_copy_pt_mas_c_dpan
66
67static void
68init_copy_mask_color_pt_funcs_c(void)
69{
70 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_mas_cn_dp;
71 op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_pt_mas_c_dp;
72 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_pt_mas_can_dp;
73 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_pt_mas_caa_dp;
74
75 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_mas_cn_dpan;
76 op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_pt_mas_c_dpan;
77 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_pt_mas_can_dpan;
78 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_pt_mas_caa_dpan;
79}
80#endif
81
82/*-----*/
83
84/* copy_rel mask x color -> dst */
85
86#ifdef BUILD_C
87static void
88_op_copy_rel_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
89 DATA32 *e;
90 int color;
91 UNROLL8_PLD_WHILE(d, l, e,
92 {
93 color = *m;
94 switch(color)
95 {
96 case 0:
97 break;
98 case 255:
99 color = 1 + (*d >> 24);
100 *d = MUL_256(color, c);
101 break;
102 default:
103 {
104 DATA32 da = 1 + (*d >> 24);
105 da = MUL_256(da, c);
106 color++;
107 *d = INTERP_256(color, da, *d);
108 }
109 break;
110 }
111 m++; d++;
112 });
113}
114
115
116#define _op_copy_rel_mas_cn_dp _op_copy_rel_mas_c_dp
117#define _op_copy_rel_mas_can_dp _op_copy_rel_mas_c_dp
118#define _op_copy_rel_mas_caa_dp _op_copy_rel_mas_c_dp
119
120#define _op_copy_rel_mas_c_dpan _op_copy_mas_c_dpan
121#define _op_copy_rel_mas_cn_dpan _op_copy_mas_cn_dpan
122#define _op_copy_rel_mas_can_dpan _op_copy_mas_can_dpan
123#define _op_copy_rel_mas_caa_dpan _op_copy_mas_caa_dpan
124
125static void
126init_copy_rel_mask_color_span_funcs_c(void)
127{
128 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_mas_cn_dp;
129 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_mas_c_dp;
130 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_mas_can_dp;
131 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_mas_caa_dp;
132
133 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_mas_cn_dpan;
134 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_mas_c_dpan;
135 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_mas_can_dpan;
136 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_mas_caa_dpan;
137}
138#endif
139
140#ifdef BUILD_C
141static void
142_op_copy_rel_pt_mas_c_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
143 s = 1 + (*d >> 24);
144 s = MUL_256(s, c);
145 *d = INTERP_256(m + 1, s, *d);
146}
147
148#define _op_copy_rel_pt_mas_cn_dp _op_copy_rel_pt_mas_c_dp
149#define _op_copy_rel_pt_mas_can_dp _op_copy_rel_pt_mas_c_dp
150#define _op_copy_rel_pt_mas_caa_dp _op_copy_rel_pt_mas_c_dp
151
152#define _op_copy_rel_pt_mas_c_dpan _op_copy_pt_mas_c_dpan
153#define _op_copy_rel_pt_mas_cn_dpan _op_copy_pt_mas_cn_dpan
154#define _op_copy_rel_pt_mas_can_dpan _op_copy_pt_mas_can_dpan
155#define _op_copy_rel_pt_mas_caa_dpan _op_copy_pt_mas_caa_dpan
156
157static void
158init_copy_rel_mask_color_pt_funcs_c(void)
159{
160 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_mas_cn_dp;
161 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_copy_rel_pt_mas_c_dp;
162 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_copy_rel_pt_mas_can_dp;
163 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_copy_rel_pt_mas_caa_dp;
164
165 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_mas_cn_dpan;
166 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_copy_rel_pt_mas_c_dpan;
167 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_mas_can_dpan;
168 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_mas_caa_dpan;
169}
170#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 @@
1/* copy mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_P2R(c, mm2, mm0)
9 MOV_A2R(ALPHA_255, mm5)
10 while (d < e) {
11 l = *m;
12 switch(l)
13 {
14 case 0:
15 break;
16 case 255:
17 *d = c;
18 break;
19 default:
20 {
21 l++;
22 MOV_A2R(l, mm3)
23 MOV_P2R(*d, mm1, mm0)
24 movq_r2r(mm2, mm4);
25 INTERP_256_R2R(mm3, mm4, mm1, mm5);
26 MOV_R2P(mm1, *d, mm0)
27 }
28 break;
29 }
30 m++; d++;
31 }
32}
33
34#define _op_copy_mas_cn_dp_mmx _op_copy_mas_c_dp_mmx
35#define _op_copy_mas_can_dp_mmx _op_copy_mas_c_dp_mmx
36#define _op_copy_mas_caa_dp_mmx _op_copy_mas_c_dp_mmx
37
38#define _op_copy_mas_c_dpan_mmx _op_copy_mas_c_dp_mmx
39#define _op_copy_mas_cn_dpan_mmx _op_copy_mas_c_dpan_mmx
40#define _op_copy_mas_can_dpan_mmx _op_copy_mas_c_dpan_mmx
41#define _op_copy_mas_caa_dpan_mmx _op_copy_mas_c_dpan_mmx
42
43static void
44init_copy_mask_color_span_funcs_mmx(void)
45{
46 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_mas_cn_dp_mmx;
47 op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_mas_c_dp_mmx;
48 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_mas_can_dp_mmx;
49 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_mas_caa_dp_mmx;
50
51 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_mas_cn_dpan_mmx;
52 op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_mas_c_dpan_mmx;
53 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_mas_can_dpan_mmx;
54 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_mas_caa_dpan_mmx;
55}
56#endif
57
58#ifdef BUILD_MMX
59static void
60_op_copy_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
61 s = m + 1;
62 MOV_A2R(ALPHA_255, mm5)
63 pxor_r2r(mm0, mm0);
64 MOV_P2R(c, mm2, mm0)
65 MOV_A2R(s, mm3)
66 MOV_P2R(*d, mm1, mm0)
67 INTERP_256_R2R(mm3, mm2, mm1, mm5);
68 MOV_R2P(mm1, *d, mm0)
69}
70
71#define _op_copy_pt_mas_cn_dp_mmx _op_copy_pt_mas_c_dp_mmx
72#define _op_copy_pt_mas_can_dp_mmx _op_copy_pt_mas_c_dp_mmx
73#define _op_copy_pt_mas_caa_dp_mmx _op_copy_pt_mas_c_dp_mmx
74
75#define _op_copy_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dp_mmx
76#define _op_copy_pt_mas_cn_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
77#define _op_copy_pt_mas_can_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
78#define _op_copy_pt_mas_caa_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
79
80static void
81init_copy_mask_color_pt_funcs_mmx(void)
82{
83 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_mas_cn_dp_mmx;
84 op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_pt_mas_c_dp_mmx;
85 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_pt_mas_can_dp_mmx;
86 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_pt_mas_caa_dp_mmx;
87
88 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_mas_cn_dpan_mmx;
89 op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_pt_mas_c_dpan_mmx;
90 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_mas_can_dpan_mmx;
91 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_mas_caa_dpan_mmx;
92}
93#endif
94
95/*-----*/
96
97/* copy_rel mask x color -> dst */
98
99#ifdef BUILD_MMX
100static void
101_op_copy_rel_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
102 DATA32 *e = d + l;
103 pxor_r2r(mm0, mm0);
104 MOV_P2R(c, mm2, mm0)
105 MOV_A2R(ALPHA_255, mm5)
106 while (d < e) {
107 l = *m;
108 switch(l)
109 {
110 case 0:
111 break;
112 case 255:
113 l = 1 + (*d >> 24);
114 MOV_A2R(l, mm1)
115 MUL4_256_R2R(mm2, mm1)
116 MOV_R2P(mm1, *d, mm0)
117 break;
118 default:
119 l++;
120 MOV_A2R(l, mm3)
121 MOV_P2R(*d, mm1, mm0)
122 MOV_RA2R(mm1, mm4)
123 MUL4_256_R2R(mm2, mm4)
124 INTERP_256_R2R(mm3, mm4, mm1, mm5)
125 MOV_R2P(mm1, *d, mm0)
126 break;
127 }
128 m++; d++;
129 }
130}
131
132#define _op_copy_rel_mas_cn_dp_mmx _op_copy_rel_mas_c_dp_mmx
133#define _op_copy_rel_mas_can_dp_mmx _op_copy_rel_mas_c_dp_mmx
134#define _op_copy_rel_mas_caa_dp_mmx _op_copy_rel_mas_c_dp_mmx
135
136#define _op_copy_rel_mas_c_dpan_mmx _op_copy_mas_c_dpan_mmx
137#define _op_copy_rel_mas_cn_dpan_mmx _op_copy_mas_cn_dpan_mmx
138#define _op_copy_rel_mas_can_dpan_mmx _op_copy_mas_can_dpan_mmx
139#define _op_copy_rel_mas_caa_dpan_mmx _op_copy_mas_caa_dpan_mmx
140
141static void
142init_copy_rel_mask_color_span_funcs_mmx(void)
143{
144 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_mas_cn_dp_mmx;
145 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_mas_c_dp_mmx;
146 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_mas_can_dp_mmx;
147 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_mas_caa_dp_mmx;
148
149 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_mas_cn_dpan_mmx;
150 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_mas_c_dpan_mmx;
151 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_mas_can_dpan_mmx;
152 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_mas_caa_dpan_mmx;
153}
154#endif
155
156#ifdef BUILD_MMX
157static void
158_op_copy_rel_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
159 s = m + 1;
160 MOV_A2R(ALPHA_255, mm5)
161 pxor_r2r(mm0, mm0);
162 MOV_A2R(s, mm3)
163 MOV_P2R(*d, mm1, mm0)
164 MOV_RA2R(mm1, mm4)
165 MOV_P2R(c, mm2, mm0)
166 MUL4_256_R2R(mm2, mm4)
167 INTERP_256_R2R(mm3, mm4, mm1, mm5)
168 MOV_R2P(mm1, *d, mm0)
169}
170
171#define _op_copy_rel_pt_mas_cn_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx
172#define _op_copy_rel_pt_mas_can_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx
173#define _op_copy_rel_pt_mas_caa_dp_mmx _op_copy_rel_pt_mas_c_dp_mmx
174
175#define _op_copy_rel_pt_mas_c_dpan_mmx _op_copy_pt_mas_c_dpan_mmx
176#define _op_copy_rel_pt_mas_cn_dpan_mmx _op_copy_pt_mas_cn_dpan_mmx
177#define _op_copy_rel_pt_mas_can_dpan_mmx _op_copy_pt_mas_can_dpan_mmx
178#define _op_copy_rel_pt_mas_caa_dpan_mmx _op_copy_pt_mas_caa_dpan_mmx
179
180static void
181init_copy_rel_mask_color_pt_funcs_mmx(void)
182{
183 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_mas_cn_dp_mmx;
184 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_copy_rel_pt_mas_c_dp_mmx;
185 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_mas_can_dp_mmx;
186 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_mas_caa_dp_mmx;
187
188 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_cn_dpan_mmx;
189 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_c_dpan_mmx;
190 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_can_dpan_mmx;
191 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_mas_caa_dpan_mmx;
192}
193#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 @@
1/* copy mask x color -> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 // FIXME: neon-it
7 DATA32 *e;
8 int color;
9 UNROLL8_PLD_WHILE(d, l, e,
10 {
11 color = *m;
12 switch(color)
13 {
14 case 0:
15 break;
16 case 255:
17 *d = c;
18 break;
19 default:
20 color++;
21 *d = INTERP_256(color, c, *d);
22 break;
23 }
24 m++; d++;
25 });
26}
27
28#define _op_copy_mas_cn_dp_neon _op_copy_mas_c_dp_neon
29#define _op_copy_mas_can_dp_neon _op_copy_mas_c_dp_neon
30#define _op_copy_mas_caa_dp_neon _op_copy_mas_c_dp_neon
31
32#define _op_copy_mas_c_dpan_neon _op_copy_mas_c_dp_neon
33#define _op_copy_mas_cn_dpan_neon _op_copy_mas_c_dpan_neon
34#define _op_copy_mas_can_dpan_neon _op_copy_mas_c_dpan_neon
35#define _op_copy_mas_caa_dpan_neon _op_copy_mas_c_dpan_neon
36
37static void
38init_copy_mask_color_span_funcs_neon(void)
39{
40 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_mas_cn_dp_neon;
41 op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_mas_c_dp_neon;
42 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_mas_can_dp_neon;
43 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_mas_caa_dp_neon;
44
45 op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_mas_cn_dpan_neon;
46 op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_mas_c_dpan_neon;
47 op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_mas_can_dpan_neon;
48 op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_mas_caa_dpan_neon;
49}
50#endif
51
52#ifdef BUILD_NEON
53static void
54_op_copy_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
55 *d = INTERP_256(m + 1, c, *d);
56}
57
58#define _op_copy_pt_mas_cn_dp_neon _op_copy_pt_mas_c_dp_neon
59#define _op_copy_pt_mas_can_dp_neon _op_copy_pt_mas_c_dp_neon
60#define _op_copy_pt_mas_caa_dp_neon _op_copy_pt_mas_c_dp_neon
61
62#define _op_copy_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dp_neon
63#define _op_copy_pt_mas_cn_dpan_neon _op_copy_pt_mas_c_dpan_neon
64#define _op_copy_pt_mas_can_dpan_neon _op_copy_pt_mas_c_dpan_neon
65#define _op_copy_pt_mas_caa_dpan_neon _op_copy_pt_mas_c_dpan_neon
66
67static void
68init_copy_mask_color_pt_funcs_neon(void)
69{
70 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_mas_cn_dp_neon;
71 op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_pt_mas_c_dp_neon;
72 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_pt_mas_can_dp_neon;
73 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_pt_mas_caa_dp_neon;
74
75 op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_mas_cn_dpan_neon;
76 op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_pt_mas_c_dpan_neon;
77 op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_mas_can_dpan_neon;
78 op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_mas_caa_dpan_neon;
79}
80#endif
81
82/*-----*/
83
84/* copy_rel mask x color -> dst */
85
86#ifdef BUILD_NEON
87static void
88_op_copy_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
89 // FIXME: neon-it
90 DATA32 *e;
91 int color;
92 UNROLL8_PLD_WHILE(d, l, e,
93 {
94 color = *m;
95 switch(color)
96 {
97 case 0:
98 break;
99 case 255:
100 color = 1 + (*d >> 24);
101 *d = MUL_256(color, c);
102 break;
103 default:
104 {
105 DATA32 da = 1 + (*d >> 24);
106 da = MUL_256(da, c);
107 color++;
108 *d = INTERP_256(color, da, *d);
109 }
110 break;
111 }
112 m++; d++;
113 });
114}
115
116#define _op_copy_rel_mas_cn_dp_neon _op_copy_rel_mas_c_dp_neon
117#define _op_copy_rel_mas_can_dp_neon _op_copy_rel_mas_c_dp_neon
118#define _op_copy_rel_mas_caa_dp_neon _op_copy_rel_mas_c_dp_neon
119
120#define _op_copy_rel_mas_c_dpan_neon _op_copy_mas_c_dpan_neon
121#define _op_copy_rel_mas_cn_dpan_neon _op_copy_mas_cn_dpan_neon
122#define _op_copy_rel_mas_can_dpan_neon _op_copy_mas_can_dpan_neon
123#define _op_copy_rel_mas_caa_dpan_neon _op_copy_mas_caa_dpan_neon
124
125static void
126init_copy_rel_mask_color_span_funcs_neon(void)
127{
128 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_mas_cn_dp_neon;
129 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_mas_c_dp_neon;
130 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_mas_can_dp_neon;
131 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_mas_caa_dp_neon;
132
133 op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_mas_cn_dpan_neon;
134 op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_mas_c_dpan_neon;
135 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_mas_can_dpan_neon;
136 op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_mas_caa_dpan_neon;
137}
138#endif
139
140#ifdef BUILD_NEON
141static void
142_op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
143 s = 1 + (*d >> 24);
144 s = MUL_256(s, c);
145 *d = INTERP_256(m + 1, s, *d);
146}
147
148#define _op_copy_rel_pt_mas_cn_dp_neon _op_copy_rel_pt_mas_c_dp_neon
149#define _op_copy_rel_pt_mas_can_dp_neon _op_copy_rel_pt_mas_c_dp_neon
150#define _op_copy_rel_pt_mas_caa_dp_neon _op_copy_rel_pt_mas_c_dp_neon
151
152#define _op_copy_rel_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dpan_neon
153#define _op_copy_rel_pt_mas_cn_dpan_neon _op_copy_pt_mas_cn_dpan_neon
154#define _op_copy_rel_pt_mas_can_dpan_neon _op_copy_pt_mas_can_dpan_neon
155#define _op_copy_rel_pt_mas_caa_dpan_neon _op_copy_pt_mas_caa_dpan_neon
156
157static void
158init_copy_rel_mask_color_pt_funcs_neon(void)
159{
160 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_mas_cn_dp_neon;
161 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_pt_mas_c_dp_neon;
162 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_mas_can_dp_neon;
163 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_mas_caa_dp_neon;
164
165 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_cn_dpan_neon;
166 op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_c_dpan_neon;
167 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_can_dpan_neon;
168 op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_caa_dpan_neon;
169}
170#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 @@
1/* copy pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 memcpy(d, s, l * sizeof(DATA32));
7}
8
9#define _op_copy_pan_dp _op_copy_p_dp
10#define _op_copy_pas_dp _op_copy_p_dp
11
12#define _op_copy_p_dpan _op_copy_p_dp
13#define _op_copy_pan_dpan _op_copy_pan_dp
14#define _op_copy_pas_dpan _op_copy_pas_dp
15
16static void
17init_copy_pixel_span_funcs_c(void)
18{
19 op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_p_dp;
20 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pan_dp;
21 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pas_dp;
22
23 op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_p_dpan;
24 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pan_dpan;
25 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pas_dpan;
26}
27#endif
28
29#ifdef BUILD_C
30static void
31_op_copy_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
32 *d = s;
33}
34
35#define _op_copy_pt_pan_dp _op_copy_pt_p_dp
36#define _op_copy_pt_pas_dp _op_copy_pt_p_dp
37
38#define _op_copy_pt_p_dpan _op_copy_pt_p_dp
39#define _op_copy_pt_pan_dpan _op_copy_pt_pan_dp
40#define _op_copy_pt_pas_dpan _op_copy_pt_pas_dp
41
42static void
43init_copy_pixel_pt_funcs_c(void)
44{
45 op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_p_dp;
46 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pan_dp;
47 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_pt_pas_dp;
48
49 op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_dpan;
50 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_dpan;
51 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_dpan;
52}
53#endif
54
55/*-----*/
56
57/* copy_rel pixel --> dst */
58
59#ifdef BUILD_C
60static void
61_op_copy_rel_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
62 DATA32 *e;
63 UNROLL8_PLD_WHILE(d, l, e,
64 {
65 *d = MUL_SYM(*d >> 24, *s);
66 d++; s++;
67 });
68}
69
70
71#define _op_copy_rel_pas_dp _op_copy_rel_p_dp
72#define _op_copy_rel_pan_dp _op_copy_rel_p_dp
73
74#define _op_copy_rel_p_dpan _op_copy_p_dpan
75#define _op_copy_rel_pan_dpan _op_copy_pan_dpan
76#define _op_copy_rel_pas_dpan _op_copy_pas_dpan
77
78static void
79init_copy_rel_pixel_span_funcs_c(void)
80{
81 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_p_dp;
82 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pan_dp;
83 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pas_dp;
84
85 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_dpan;
86 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_dpan;
87 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_dpan;
88}
89#endif
90
91#ifdef BUILD_C
92static void
93_op_copy_rel_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
94 c = 1 + (*d >> 24);
95 *d = MUL_256(c, s);
96}
97
98
99#define _op_copy_rel_pt_pan_dp _op_copy_rel_pt_p_dp
100#define _op_copy_rel_pt_pas_dp _op_copy_rel_pt_p_dp
101
102#define _op_copy_rel_pt_p_dpan _op_copy_pt_p_dpan
103#define _op_copy_rel_pt_pan_dpan _op_copy_pt_pan_dpan
104#define _op_copy_rel_pt_pas_dpan _op_copy_pt_pas_dpan
105
106static void
107init_copy_rel_pixel_pt_funcs_c(void)
108{
109 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_dp;
110 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_dp;
111 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_dp;
112
113 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_dpan;
114 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_dpan;
115 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_dpan;
116}
117#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 @@
1/* copy pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e;
7 UNROLL8_PLD_WHILE(d, l, e,
8 {
9 *d = MUL4_SYM(c, *s);
10 d++;
11 s++;
12 });
13}
14
15static void
16_op_copy_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
17 DATA32 *e;
18 c = 1 + (c >> 24);
19 UNROLL8_PLD_WHILE(d, l, e,
20 {
21 *d = MUL_256(c, *s);
22 d++;
23 s++;
24 });
25}
26
27
28#define _op_copy_pas_c_dp _op_copy_p_c_dp
29#define _op_copy_pan_c_dp _op_copy_p_c_dp
30#define _op_copy_p_can_dp _op_copy_p_c_dp
31#define _op_copy_pas_can_dp _op_copy_p_can_dp
32#define _op_copy_pan_can_dp _op_copy_p_c_dp
33#define _op_copy_pas_caa_dp _op_copy_p_caa_dp
34#define _op_copy_pan_caa_dp _op_copy_p_caa_dp
35
36#define _op_copy_p_c_dpan _op_copy_p_c_dp
37#define _op_copy_pas_c_dpan _op_copy_pas_c_dp
38#define _op_copy_pan_c_dpan _op_copy_pan_c_dp
39#define _op_copy_p_can_dpan _op_copy_p_can_dp
40#define _op_copy_pas_can_dpan _op_copy_pas_can_dp
41#define _op_copy_pan_can_dpan _op_copy_pan_can_dp
42#define _op_copy_p_caa_dpan _op_copy_p_caa_dp
43#define _op_copy_pas_caa_dpan _op_copy_pas_caa_dp
44#define _op_copy_pan_caa_dpan _op_copy_pan_caa_dp
45
46static void
47init_copy_pixel_color_span_funcs_c(void)
48{
49 op_copy_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_p_c_dp;
50 op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pas_c_dp;
51 op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pan_c_dp;
52 op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_p_can_dp;
53 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pas_can_dp;
54 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pan_can_dp;
55 op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_p_caa_dp;
56 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pas_caa_dp;
57 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pan_caa_dp;
58
59 op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_p_c_dpan;
60 op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pas_c_dpan;
61 op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pan_c_dpan;
62 op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_p_can_dpan;
63 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pas_can_dpan;
64 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pan_can_dpan;
65 op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_p_caa_dpan;
66 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pas_caa_dpan;
67 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pan_caa_dpan;
68}
69#endif
70
71#ifdef BUILD_C
72static void
73_op_copy_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
74 *d = MUL4_SYM(c, s);
75}
76
77static void
78_op_copy_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
79 *d = MUL_SYM(c >> 24, s);
80}
81
82
83#define _op_copy_pt_p_can_dp _op_copy_pt_p_c_dp
84#define _op_copy_pt_pan_c_dp _op_copy_pt_p_c_dp
85#define _op_copy_pt_pan_can_dp _op_copy_pt_p_c_dp
86#define _op_copy_pt_pan_caa_dp _op_copy_pt_p_caa_dp
87#define _op_copy_pt_pas_c_dp _op_copy_pt_p_c_dp
88#define _op_copy_pt_pas_can_dp _op_copy_pt_p_can_dp
89#define _op_copy_pt_pas_caa_dp _op_copy_pt_p_caa_dp
90
91#define _op_copy_pt_p_c_dpan _op_copy_pt_p_c_dp
92#define _op_copy_pt_pas_c_dpan _op_copy_pt_pas_c_dp
93#define _op_copy_pt_pan_c_dpan _op_copy_pt_pan_c_dp
94#define _op_copy_pt_p_can_dpan _op_copy_pt_p_can_dp
95#define _op_copy_pt_pas_can_dpan _op_copy_pt_pas_can_dp
96#define _op_copy_pt_pan_can_dpan _op_copy_pt_pan_can_dp
97#define _op_copy_pt_p_caa_dpan _op_copy_pt_p_caa_dp
98#define _op_copy_pt_pas_caa_dpan _op_copy_pt_pas_caa_dp
99#define _op_copy_pt_pan_caa_dpan _op_copy_pt_pan_caa_dp
100
101static void
102init_copy_pixel_color_pt_funcs_c(void)
103{
104 op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_pt_p_c_dp;
105 op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_pt_pas_c_dp;
106 op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_pt_pan_c_dp;
107 op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_p_can_dp;
108 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pas_can_dp;
109 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_pt_pan_can_dp;
110 op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_p_caa_dp;
111 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pas_caa_dp;
112 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_pt_pan_caa_dp;
113
114 op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_p_c_dpan;
115 op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pas_c_dpan;
116 op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_pt_pan_c_dpan;
117 op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_p_can_dpan;
118 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pas_can_dpan;
119 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_pt_pan_can_dpan;
120 op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_p_caa_dpan;
121 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pas_caa_dpan;
122 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_pt_pan_caa_dpan;
123}
124#endif
125
126/*-----*/
127
128/* copy_rel pixel x color --> dst */
129
130#ifdef BUILD_C
131static void
132_op_copy_rel_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
133 DATA32 *e;
134 UNROLL8_PLD_WHILE(d, l, e,
135 {
136 DATA32 cs = MUL4_SYM(c, *s);
137 *d = MUL_SYM(*d >> 24, cs);
138 d++;
139 s++;
140 });
141}
142
143#define _op_copy_rel_pas_c_dp _op_copy_rel_p_c_dp
144#define _op_copy_rel_pan_c_dp _op_copy_rel_p_c_dp
145#define _op_copy_rel_p_can_dp _op_copy_rel_p_c_dp
146#define _op_copy_rel_pas_can_dp _op_copy_rel_pas_c_dp
147#define _op_copy_rel_pan_can_dp _op_copy_rel_p_c_dp
148#define _op_copy_rel_p_caa_dp _op_copy_rel_p_c_dp
149#define _op_copy_rel_pas_caa_dp _op_copy_rel_p_c_dp
150#define _op_copy_rel_pan_caa_dp _op_copy_rel_p_c_dp
151
152#define _op_copy_rel_p_c_dpan _op_copy_p_c_dpan
153#define _op_copy_rel_pas_c_dpan _op_copy_pas_c_dpan
154#define _op_copy_rel_pan_c_dpan _op_copy_pan_c_dpan
155#define _op_copy_rel_p_can_dpan _op_copy_p_can_dpan
156#define _op_copy_rel_pas_can_dpan _op_copy_pas_can_dpan
157#define _op_copy_rel_pan_can_dpan _op_copy_pan_can_dpan
158#define _op_copy_rel_p_caa_dpan _op_copy_p_caa_dpan
159#define _op_copy_rel_pas_caa_dpan _op_copy_pas_caa_dpan
160#define _op_copy_rel_pan_caa_dpan _op_copy_pan_caa_dpan
161
162static void
163init_copy_rel_pixel_color_span_funcs_c(void)
164{
165 op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_p_c_dp;
166 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pas_c_dp;
167 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pan_c_dp;
168 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_p_can_dp;
169 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pas_can_dp;
170 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pan_can_dp;
171 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_p_caa_dp;
172 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pas_caa_dp;
173 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pan_caa_dp;
174
175 op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_p_c_dpan;
176 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pas_c_dpan;
177 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pan_c_dpan;
178 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_p_can_dpan;
179 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pas_can_dpan;
180 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pan_can_dpan;
181 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_p_caa_dpan;
182 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pas_caa_dpan;
183 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pan_caa_dpan;
184}
185#endif
186
187#ifdef BUILD_C
188static void
189_op_copy_rel_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
190 s = MUL4_SYM(c, s);
191 *d = MUL_SYM(*d >> 24, s);
192}
193
194#define _op_copy_rel_pt_pas_c_dp _op_copy_rel_pt_p_c_dp
195#define _op_copy_rel_pt_pan_c_dp _op_copy_rel_pt_p_c_dp
196#define _op_copy_rel_pt_p_can_dp _op_copy_rel_pt_p_c_dp
197#define _op_copy_rel_pt_pas_can_dp _op_copy_rel_pt_p_can_dp
198#define _op_copy_rel_pt_pan_can_dp _op_copy_rel_pt_p_c_dp
199#define _op_copy_rel_pt_p_caa_dp _op_copy_rel_pt_p_c_dp
200#define _op_copy_rel_pt_pas_caa_dp _op_copy_rel_pt_p_caa_dp
201#define _op_copy_rel_pt_pan_caa_dp _op_copy_rel_pt_p_caa_dp
202
203#define _op_copy_rel_pt_p_c_dpan _op_copy_pt_p_c_dpan
204#define _op_copy_rel_pt_pas_c_dpan _op_copy_pt_pas_c_dpan
205#define _op_copy_rel_pt_pan_c_dpan _op_copy_pt_pan_c_dpan
206#define _op_copy_rel_pt_p_can_dpan _op_copy_pt_p_can_dpan
207#define _op_copy_rel_pt_pas_can_dpan _op_copy_pt_pas_can_dpan
208#define _op_copy_rel_pt_pan_can_dpan _op_copy_pt_pan_can_dpan
209#define _op_copy_rel_pt_p_caa_dpan _op_copy_pt_p_caa_dpan
210#define _op_copy_rel_pt_pas_caa_dpan _op_copy_pt_pas_caa_dpan
211#define _op_copy_rel_pt_pan_caa_dpan _op_copy_pt_pan_caa_dpan
212
213static void
214init_copy_rel_pixel_color_pt_funcs_c(void)
215{
216 op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_p_c_dp;
217 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pas_c_dp;
218 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_copy_rel_pt_pan_c_dp;
219 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_p_can_dp;
220 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pas_can_dp;
221 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_copy_rel_pt_pan_can_dp;
222 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_p_caa_dp;
223 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pas_caa_dp;
224 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_copy_rel_pt_pan_caa_dp;
225
226 op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_p_c_dpan;
227 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pas_c_dpan;
228 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_copy_rel_pt_pan_c_dpan;
229 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_p_can_dpan;
230 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pas_can_dpan;
231 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_copy_rel_pt_pan_can_dpan;
232 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_p_caa_dpan;
233 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pas_caa_dpan;
234 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_copy_rel_pt_pan_caa_dpan;
235}
236#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 @@
1/* copy pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_P2R(c, mm3, mm0)
9 MOV_A2R(ALPHA_255, mm5)
10 while (d < e) {
11 MOV_P2R(*s, mm2, mm0)
12 MUL4_SYM_R2R(mm3, mm2, mm5);
13 MOV_R2P(mm2, *d, mm0)
14 s++; d++;
15 }
16}
17
18
19static void
20_op_copy_p_caa_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
21 DATA32 *e = d + l;
22 c = 1 + (c >> 24);
23 MOV_A2R(c, mm3)
24 pxor_r2r(mm0, mm0);
25 while (d < e) {
26 MOV_P2R(*s, mm2, mm0)
27 MUL4_256_R2R(mm3, mm2);
28 MOV_R2P(mm2, *d, mm0)
29 s++; d++;
30 }
31}
32
33
34#define _op_copy_pas_c_dp_mmx _op_copy_p_c_dp_mmx
35#define _op_copy_pan_c_dp_mmx _op_copy_p_c_dp_mmx
36#define _op_copy_p_can_dp_mmx _op_copy_p_c_dp_mmx
37#define _op_copy_pas_can_dp_mmx _op_copy_pas_c_dp_mmx
38#define _op_copy_pan_can_dp_mmx _op_copy_pan_c_dp_mmx
39#define _op_copy_pas_caa_dp_mmx _op_copy_p_caa_dp_mmx
40#define _op_copy_pan_caa_dp_mmx _op_copy_p_caa_dp_mmx
41
42#define _op_copy_p_c_dpan_mmx _op_copy_p_c_dp_mmx
43#define _op_copy_pas_c_dpan_mmx _op_copy_pas_c_dp_mmx
44#define _op_copy_pan_c_dpan_mmx _op_copy_pan_c_dp_mmx
45#define _op_copy_p_can_dpan_mmx _op_copy_p_can_dp_mmx
46#define _op_copy_pas_can_dpan_mmx _op_copy_pas_can_dp_mmx
47#define _op_copy_pan_can_dpan_mmx _op_copy_pan_can_dp_mmx
48#define _op_copy_p_caa_dpan_mmx _op_copy_p_caa_dp_mmx
49#define _op_copy_pas_caa_dpan_mmx _op_copy_pas_caa_dp_mmx
50#define _op_copy_pan_caa_dpan_mmx _op_copy_pan_caa_dp_mmx
51
52static void
53init_copy_pixel_color_span_funcs_mmx(void)
54{
55 op_copy_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_p_c_dp_mmx;
56 op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pas_c_dp_mmx;
57 op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pan_c_dp_mmx;
58 op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_p_can_dp_mmx;
59 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pas_can_dp_mmx;
60 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pan_can_dp_mmx;
61 op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_p_caa_dp_mmx;
62 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pas_caa_dp_mmx;
63 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pan_caa_dp_mmx;
64
65 op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_p_c_dpan_mmx;
66 op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pas_c_dpan_mmx;
67 op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pan_c_dpan_mmx;
68 op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_p_can_dpan_mmx;
69 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pas_can_dpan_mmx;
70 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pan_can_dpan_mmx;
71 op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_p_caa_dpan_mmx;
72 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pas_caa_dpan_mmx;
73 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pan_caa_dpan_mmx;
74}
75#endif
76
77#ifdef BUILD_MMX
78static void
79_op_copy_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
80 pxor_r2r(mm0, mm0);
81 MOV_A2R(ALPHA_255, mm5)
82 MOV_P2R(c, mm2, mm0)
83 MOV_P2R(s, mm2, mm0)
84 MUL4_SYM_R2R(mm3, mm2, mm5);
85 MOV_R2P(mm2, *d, mm0)
86}
87
88#define _op_copy_pt_pas_c_dp_mmx _op_copy_pt_p_c_dp_mmx
89#define _op_copy_pt_pan_c_dp_mmx _op_copy_pt_p_c_dp_mmx
90#define _op_copy_pt_p_can_dp_mmx _op_copy_pt_p_c_dp_mmx
91#define _op_copy_pt_pas_can_dp_mmx _op_copy_pt_p_c_dp_mmx
92#define _op_copy_pt_pan_can_dp_mmx _op_copy_pt_p_c_dp_mmx
93#define _op_copy_pt_p_caa_dp_mmx _op_copy_pt_p_c_dp_mmx
94#define _op_copy_pt_pas_caa_dp_mmx _op_copy_pt_p_c_dp_mmx
95#define _op_copy_pt_pan_caa_dp_mmx _op_copy_pt_p_c_dp_mmx
96
97#define _op_copy_pt_p_c_dpan_mmx _op_copy_pt_p_c_dp_mmx
98#define _op_copy_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dp_mmx
99#define _op_copy_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dp_mmx
100#define _op_copy_pt_p_can_dpan_mmx _op_copy_pt_p_can_dp_mmx
101#define _op_copy_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dp_mmx
102#define _op_copy_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dp_mmx
103#define _op_copy_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dp_mmx
104#define _op_copy_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dp_mmx
105#define _op_copy_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dp_mmx
106
107static void
108init_copy_pixel_color_pt_funcs_mmx(void)
109{
110 op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_p_c_dp_mmx;
111 op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pas_c_dp_mmx;
112 op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_pt_pan_c_dp_mmx;
113 op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_p_can_dp_mmx;
114 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pas_can_dp_mmx;
115 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_pt_pan_can_dp_mmx;
116 op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_p_caa_dp_mmx;
117 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pas_caa_dp_mmx;
118 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_pt_pan_caa_dp_mmx;
119
120 op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_p_c_dpan_mmx;
121 op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pas_c_dpan_mmx;
122 op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_pt_pan_c_dpan_mmx;
123 op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_p_can_dpan_mmx;
124 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pas_can_dpan_mmx;
125 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_pt_pan_can_dpan_mmx;
126 op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_p_caa_dpan_mmx;
127 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pas_caa_dpan_mmx;
128 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_pt_pan_caa_dpan_mmx;
129}
130#endif
131
132/*-----*/
133
134/* copy_rel pixel x color --> dst */
135
136#ifdef BUILD_MMX
137static void
138_op_copy_rel_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
139 DATA32 *e = d + l;
140 pxor_r2r(mm0, mm0);
141 MOV_P2R(c, mm3, mm0)
142 MOV_A2R(ALPHA_255, mm5)
143 while (d < e) {
144 MOV_PA2R(*d, mm1)
145 MOV_P2R(*s, mm2, mm0)
146 MUL4_SYM_R2R(mm3, mm2, mm5);
147 MUL4_SYM_R2R(mm2, mm1, mm5);
148 MOV_R2P(mm1, *d, mm0)
149 s++; d++;
150 }
151}
152
153
154#define _op_copy_rel_pas_c_dp_mmx _op_copy_rel_p_c_dp_mmx
155#define _op_copy_rel_pan_c_dp_mmx _op_copy_rel_p_c_dp_mmx
156#define _op_copy_rel_p_can_dp_mmx _op_copy_rel_p_c_dp_mmx
157#define _op_copy_rel_pas_can_dp_mmx _op_copy_rel_p_c_dp_mmx
158#define _op_copy_rel_pan_can_dp_mmx _op_copy_rel_p_c_dp_mmx
159#define _op_copy_rel_p_caa_dp_mmx _op_copy_rel_p_c_dp_mmx
160#define _op_copy_rel_pas_caa_dp_mmx _op_copy_rel_p_c_dp_mmx
161#define _op_copy_rel_pan_caa_dp_mmx _op_copy_rel_p_c_dp_mmx
162
163#define _op_copy_rel_p_c_dpan_mmx _op_copy_p_c_dpan_mmx
164#define _op_copy_rel_pas_c_dpan_mmx _op_copy_pas_c_dpan_mmx
165#define _op_copy_rel_pan_c_dpan_mmx _op_copy_pan_c_dpan_mmx
166#define _op_copy_rel_p_can_dpan_mmx _op_copy_p_can_dpan_mmx
167#define _op_copy_rel_pas_can_dpan_mmx _op_copy_pas_can_dpan_mmx
168#define _op_copy_rel_pan_can_dpan_mmx _op_copy_pan_can_dpan_mmx
169#define _op_copy_rel_p_caa_dpan_mmx _op_copy_p_caa_dpan_mmx
170#define _op_copy_rel_pas_caa_dpan_mmx _op_copy_pas_caa_dpan_mmx
171#define _op_copy_rel_pan_caa_dpan_mmx _op_copy_pan_caa_dpan_mmx
172
173static void
174init_copy_rel_pixel_color_span_funcs_mmx(void)
175{
176 op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_p_c_dp_mmx;
177 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pas_c_dp_mmx;
178 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pan_c_dp_mmx;
179 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_p_can_dp_mmx;
180 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pas_can_dp_mmx;
181 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pan_can_dp_mmx;
182 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_p_caa_dp_mmx;
183 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pas_caa_dp_mmx;
184 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pan_caa_dp_mmx;
185
186 op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_p_c_dpan_mmx;
187 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pas_c_dpan_mmx;
188 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pan_c_dpan_mmx;
189 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_p_can_dpan_mmx;
190 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pas_can_dpan_mmx;
191 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pan_can_dpan_mmx;
192 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_p_caa_dpan_mmx;
193 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pas_caa_dpan_mmx;
194 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pan_caa_dpan_mmx;
195}
196#endif
197
198#ifdef BUILD_MMX
199static void
200_op_copy_rel_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
201 pxor_r2r(mm0, mm0);
202 MOV_P2R(c, mm3, mm0)
203 MOV_A2R(ALPHA_255, mm5)
204 MOV_PA2R(*d, mm1)
205 MOV_P2R(s, mm2, mm0)
206 MUL4_SYM_R2R(mm3, mm2, mm5);
207 MUL4_SYM_R2R(mm2, mm1, mm5);
208 MOV_R2P(mm1, *d, mm0)
209}
210
211
212#define _op_copy_rel_pt_pas_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
213#define _op_copy_rel_pt_pan_c_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
214#define _op_copy_rel_pt_p_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
215#define _op_copy_rel_pt_pas_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
216#define _op_copy_rel_pt_pan_can_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
217#define _op_copy_rel_pt_p_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
218#define _op_copy_rel_pt_pas_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
219#define _op_copy_rel_pt_pan_caa_dp_mmx _op_copy_rel_pt_p_c_dp_mmx
220
221#define _op_copy_rel_pt_p_c_dpan_mmx _op_copy_pt_p_c_dpan_mmx
222#define _op_copy_rel_pt_pas_c_dpan_mmx _op_copy_pt_pas_c_dpan_mmx
223#define _op_copy_rel_pt_pan_c_dpan_mmx _op_copy_pt_pan_c_dpan_mmx
224#define _op_copy_rel_pt_p_can_dpan_mmx _op_copy_pt_p_can_dpan_mmx
225#define _op_copy_rel_pt_pas_can_dpan_mmx _op_copy_pt_pas_can_dpan_mmx
226#define _op_copy_rel_pt_pan_can_dpan_mmx _op_copy_pt_pan_can_dpan_mmx
227#define _op_copy_rel_pt_p_caa_dpan_mmx _op_copy_pt_p_caa_dpan_mmx
228#define _op_copy_rel_pt_pas_caa_dpan_mmx _op_copy_pt_pas_caa_dpan_mmx
229#define _op_copy_rel_pt_pan_caa_dpan_mmx _op_copy_pt_pan_caa_dpan_mmx
230
231
232static void
233init_copy_rel_pixel_color_pt_funcs_mmx(void)
234{
235 op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_p_c_dp_mmx;
236 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pas_c_dp_mmx;
237 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_copy_rel_pt_pan_c_dp_mmx;
238 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_p_can_dp_mmx;
239 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pas_can_dp_mmx;
240 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_copy_rel_pt_pan_can_dp_mmx;
241 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_p_caa_dp_mmx;
242 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pas_caa_dp_mmx;
243 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_copy_rel_pt_pan_caa_dp_mmx;
244
245 op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_c_dpan_mmx;
246 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_c_dpan_mmx;
247 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_c_dpan_mmx;
248 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_can_dpan_mmx;
249 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_can_dpan_mmx;
250 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_can_dpan_mmx;
251 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_caa_dpan_mmx;
252 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_caa_dpan_mmx;
253 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_caa_dpan_mmx;
254}
255#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 @@
1/* copy pixel x color --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 // FIXME: neon-it
7 DATA32 *e;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 *d = MUL4_SYM(c, *s);
11 d++;
12 s++;
13 });
14}
15
16
17static void
18_op_copy_p_caa_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) { // FIXME: neon-it
19 // FIXME: neon-it
20 DATA32 *e;
21 c = 1 + (c >> 24);
22 UNROLL8_PLD_WHILE(d, l, e,
23 {
24 *d = MUL_256(c, *s);
25 d++;
26 s++;
27 });
28}
29
30
31#define _op_copy_pas_c_dp_neon _op_copy_p_c_dp_neon
32#define _op_copy_pan_c_dp_neon _op_copy_p_c_dp_neon
33#define _op_copy_p_can_dp_neon _op_copy_p_c_dp_neon
34#define _op_copy_pas_can_dp_neon _op_copy_pas_c_dp_neon
35#define _op_copy_pan_can_dp_neon _op_copy_pan_c_dp_neon
36#define _op_copy_pas_caa_dp_neon _op_copy_p_caa_dp_neon
37#define _op_copy_pan_caa_dp_neon _op_copy_p_caa_dp_neon
38
39#define _op_copy_p_c_dpan_neon _op_copy_p_c_dp_neon
40#define _op_copy_pas_c_dpan_neon _op_copy_pas_c_dp_neon
41#define _op_copy_pan_c_dpan_neon _op_copy_pan_c_dp_neon
42#define _op_copy_p_can_dpan_neon _op_copy_p_can_dp_neon
43#define _op_copy_pas_can_dpan_neon _op_copy_pas_can_dp_neon
44#define _op_copy_pan_can_dpan_neon _op_copy_pan_can_dp_neon
45#define _op_copy_p_caa_dpan_neon _op_copy_p_caa_dp_neon
46#define _op_copy_pas_caa_dpan_neon _op_copy_pas_caa_dp_neon
47#define _op_copy_pan_caa_dpan_neon _op_copy_pan_caa_dp_neon
48
49static void
50init_copy_pixel_color_span_funcs_neon(void)
51{
52 op_copy_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_p_c_dp_neon;
53 op_copy_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pas_c_dp_neon;
54 op_copy_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pan_c_dp_neon;
55 op_copy_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_p_can_dp_neon;
56 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pas_can_dp_neon;
57 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pan_can_dp_neon;
58 op_copy_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_p_caa_dp_neon;
59 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pas_caa_dp_neon;
60 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pan_caa_dp_neon;
61
62 op_copy_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_p_c_dpan_neon;
63 op_copy_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pas_c_dpan_neon;
64 op_copy_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pan_c_dpan_neon;
65 op_copy_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_p_can_dpan_neon;
66 op_copy_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pas_can_dpan_neon;
67 op_copy_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pan_can_dpan_neon;
68 op_copy_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_p_caa_dpan_neon;
69 op_copy_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pas_caa_dpan_neon;
70 op_copy_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pan_caa_dpan_neon;
71}
72#endif
73
74#ifdef BUILD_NEON
75static void
76_op_copy_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
77 *d = MUL4_SYM(c, s);
78}
79
80#define _op_copy_pt_pas_c_dp_neon _op_copy_pt_p_c_dp_neon
81#define _op_copy_pt_pan_c_dp_neon _op_copy_pt_p_c_dp_neon
82#define _op_copy_pt_p_can_dp_neon _op_copy_pt_p_c_dp_neon
83#define _op_copy_pt_pas_can_dp_neon _op_copy_pt_p_c_dp_neon
84#define _op_copy_pt_pan_can_dp_neon _op_copy_pt_p_c_dp_neon
85#define _op_copy_pt_p_caa_dp_neon _op_copy_pt_p_c_dp_neon
86#define _op_copy_pt_pas_caa_dp_neon _op_copy_pt_p_c_dp_neon
87#define _op_copy_pt_pan_caa_dp_neon _op_copy_pt_p_c_dp_neon
88
89#define _op_copy_pt_p_c_dpan_neon _op_copy_pt_p_c_dp_neon
90#define _op_copy_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dp_neon
91#define _op_copy_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dp_neon
92#define _op_copy_pt_p_can_dpan_neon _op_copy_pt_p_can_dp_neon
93#define _op_copy_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dp_neon
94#define _op_copy_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dp_neon
95#define _op_copy_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dp_neon
96#define _op_copy_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dp_neon
97#define _op_copy_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dp_neon
98
99static void
100init_copy_pixel_color_pt_funcs_neon(void)
101{
102 op_copy_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_p_c_dp_neon;
103 op_copy_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pas_c_dp_neon;
104 op_copy_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_pt_pan_c_dp_neon;
105 op_copy_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_p_can_dp_neon;
106 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pas_can_dp_neon;
107 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_pt_pan_can_dp_neon;
108 op_copy_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_p_caa_dp_neon;
109 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pas_caa_dp_neon;
110 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_pt_pan_caa_dp_neon;
111
112 op_copy_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_p_c_dpan_neon;
113 op_copy_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pas_c_dpan_neon;
114 op_copy_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_pt_pan_c_dpan_neon;
115 op_copy_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_p_can_dpan_neon;
116 op_copy_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pas_can_dpan_neon;
117 op_copy_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_pan_can_dpan_neon;
118 op_copy_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_p_caa_dpan_neon;
119 op_copy_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pas_caa_dpan_neon;
120 op_copy_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_pan_caa_dpan_neon;
121}
122#endif
123
124/*-----*/
125
126/* copy_rel pixel x color --> dst */
127
128#ifdef BUILD_NEON
129static void
130_op_copy_rel_p_c_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
131 // FIXME: neon-it
132 DATA32 *e;
133 UNROLL8_PLD_WHILE(d, l, e,
134 {
135 DATA32 cs = MUL4_SYM(c, *s);
136 *d = MUL_SYM(*d >> 24, cs);
137 d++;
138 s++;
139 });
140}
141
142
143#define _op_copy_rel_pas_c_dp_neon _op_copy_rel_p_c_dp_neon
144#define _op_copy_rel_pan_c_dp_neon _op_copy_rel_p_c_dp_neon
145#define _op_copy_rel_p_can_dp_neon _op_copy_rel_p_c_dp_neon
146#define _op_copy_rel_pas_can_dp_neon _op_copy_rel_p_c_dp_neon
147#define _op_copy_rel_pan_can_dp_neon _op_copy_rel_p_c_dp_neon
148#define _op_copy_rel_p_caa_dp_neon _op_copy_rel_p_c_dp_neon
149#define _op_copy_rel_pas_caa_dp_neon _op_copy_rel_p_c_dp_neon
150#define _op_copy_rel_pan_caa_dp_neon _op_copy_rel_p_c_dp_neon
151
152#define _op_copy_rel_p_c_dpan_neon _op_copy_p_c_dpan_neon
153#define _op_copy_rel_pas_c_dpan_neon _op_copy_pas_c_dpan_neon
154#define _op_copy_rel_pan_c_dpan_neon _op_copy_pan_c_dpan_neon
155#define _op_copy_rel_p_can_dpan_neon _op_copy_p_can_dpan_neon
156#define _op_copy_rel_pas_can_dpan_neon _op_copy_pas_can_dpan_neon
157#define _op_copy_rel_pan_can_dpan_neon _op_copy_pan_can_dpan_neon
158#define _op_copy_rel_p_caa_dpan_neon _op_copy_p_caa_dpan_neon
159#define _op_copy_rel_pas_caa_dpan_neon _op_copy_pas_caa_dpan_neon
160#define _op_copy_rel_pan_caa_dpan_neon _op_copy_pan_caa_dpan_neon
161
162static void
163init_copy_rel_pixel_color_span_funcs_neon(void)
164{
165 op_copy_rel_span_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_p_c_dp_neon;
166 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pas_c_dp_neon;
167 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pan_c_dp_neon;
168 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_p_can_dp_neon;
169 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pas_can_dp_neon;
170 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pan_can_dp_neon;
171 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_p_caa_dp_neon;
172 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pas_caa_dp_neon;
173 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pan_caa_dp_neon;
174
175 op_copy_rel_span_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_p_c_dpan_neon;
176 op_copy_rel_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pas_c_dpan_neon;
177 op_copy_rel_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pan_c_dpan_neon;
178 op_copy_rel_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_p_can_dpan_neon;
179 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pas_can_dpan_neon;
180 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pan_can_dpan_neon;
181 op_copy_rel_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_p_caa_dpan_neon;
182 op_copy_rel_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pas_caa_dpan_neon;
183 op_copy_rel_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pan_caa_dpan_neon;
184}
185#endif
186
187#ifdef BUILD_NEON
188static void
189_op_copy_rel_pt_p_c_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
190 s = MUL4_SYM(c, s);
191 *d = MUL_SYM(*d >> 24, s);
192}
193
194
195#define _op_copy_rel_pt_pas_c_dp_neon _op_copy_rel_pt_p_c_dp_neon
196#define _op_copy_rel_pt_pan_c_dp_neon _op_copy_rel_pt_p_c_dp_neon
197#define _op_copy_rel_pt_p_can_dp_neon _op_copy_rel_pt_p_c_dp_neon
198#define _op_copy_rel_pt_pas_can_dp_neon _op_copy_rel_pt_p_c_dp_neon
199#define _op_copy_rel_pt_pan_can_dp_neon _op_copy_rel_pt_p_c_dp_neon
200#define _op_copy_rel_pt_p_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon
201#define _op_copy_rel_pt_pas_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon
202#define _op_copy_rel_pt_pan_caa_dp_neon _op_copy_rel_pt_p_c_dp_neon
203
204#define _op_copy_rel_pt_p_c_dpan_neon _op_copy_pt_p_c_dpan_neon
205#define _op_copy_rel_pt_pas_c_dpan_neon _op_copy_pt_pas_c_dpan_neon
206#define _op_copy_rel_pt_pan_c_dpan_neon _op_copy_pt_pan_c_dpan_neon
207#define _op_copy_rel_pt_p_can_dpan_neon _op_copy_pt_p_can_dpan_neon
208#define _op_copy_rel_pt_pas_can_dpan_neon _op_copy_pt_pas_can_dpan_neon
209#define _op_copy_rel_pt_pan_can_dpan_neon _op_copy_pt_pan_can_dpan_neon
210#define _op_copy_rel_pt_p_caa_dpan_neon _op_copy_pt_p_caa_dpan_neon
211#define _op_copy_rel_pt_pas_caa_dpan_neon _op_copy_pt_pas_caa_dpan_neon
212#define _op_copy_rel_pt_pan_caa_dpan_neon _op_copy_pt_pan_caa_dpan_neon
213
214
215static void
216init_copy_rel_pixel_color_pt_funcs_neon(void)
217{
218 op_copy_rel_pt_funcs[SP][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_p_c_dp_neon;
219 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pas_c_dp_neon;
220 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP][CPU_NEON] = _op_copy_rel_pt_pan_c_dp_neon;
221 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_p_can_dp_neon;
222 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pas_can_dp_neon;
223 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_pan_can_dp_neon;
224 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_p_caa_dp_neon;
225 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pas_caa_dp_neon;
226 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_pan_caa_dp_neon;
227
228 op_copy_rel_pt_funcs[SP][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_c_dpan_neon;
229 op_copy_rel_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_c_dpan_neon;
230 op_copy_rel_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_c_dpan_neon;
231 op_copy_rel_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_can_dpan_neon;
232 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_can_dpan_neon;
233 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_can_dpan_neon;
234 op_copy_rel_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_caa_dpan_neon;
235 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_caa_dpan_neon;
236 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_caa_dpan_neon;
237}
238#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 @@
1/* copy pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l - 15;
7 for (; d < e; d+=16, s+=16) {
8 MOVE_16DWORDS_MMX(s, d);
9 }
10 e+=15;
11 for (; d < e; d++, s++) {
12 *d = *s;
13 }
14}
15
16#define _op_copy_pan_dp_mmx _op_copy_p_dp_mmx
17#define _op_copy_pas_dp_mmx _op_copy_p_dp_mmx
18
19#define _op_copy_p_dpan_mmx _op_copy_p_dp_mmx
20#define _op_copy_pan_dpan_mmx _op_copy_pan_dp_mmx
21#define _op_copy_pas_dpan_mmx _op_copy_pas_dp_mmx
22
23static void
24init_copy_pixel_span_funcs_mmx(void)
25{
26 op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_p_dp_mmx;
27 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pan_dp_mmx;
28 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pas_dp_mmx;
29
30 op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_p_dpan_mmx;
31 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_dpan_mmx;
32 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_dpan_mmx;
33}
34#endif
35
36#ifdef BUILD_MMX
37static void
38_op_copy_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
39 *d = s;
40}
41
42#define _op_copy_pt_pan_dp_mmx _op_copy_pt_p_dp_mmx
43#define _op_copy_pt_pas_dp_mmx _op_copy_pt_p_dp_mmx
44
45#define _op_copy_pt_p_dpan_mmx _op_copy_pt_p_dp_mmx
46#define _op_copy_pt_pan_dpan_mmx _op_copy_pt_pan_dp_mmx
47#define _op_copy_pt_pas_dpan_mmx _op_copy_pt_pas_dp_mmx
48
49static void
50init_copy_pixel_pt_funcs_mmx(void)
51{
52 op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_p_dp_mmx;
53 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_dp_mmx;
54 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_dp_mmx;
55
56 op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_dpan_mmx;
57 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_dpan_mmx;
58 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_dpan_mmx;
59}
60#endif
61
62/*-----*/
63
64/* copy_rel pixel --> dst */
65
66#ifdef BUILD_MMX
67static void
68_op_copy_rel_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
69 DATA32 *e = d + l;
70 pxor_r2r(mm0, mm0);
71 MOV_A2R(ALPHA_255, mm5)
72 for (; d < e; d++, s++) {
73 MOV_PA2R(*d, mm1)
74 MOV_P2R(*s, mm2, mm0)
75 MUL4_SYM_R2R(mm2, mm1, mm5)
76 MOV_R2P(mm1, *d, mm0)
77 }
78}
79
80
81#define _op_copy_rel_pas_dp_mmx _op_copy_rel_p_dp_mmx
82#define _op_copy_rel_pan_dp_mmx _op_copy_rel_p_dp_mmx
83
84#define _op_copy_rel_p_dpan_mmx _op_copy_p_dpan_mmx
85#define _op_copy_rel_pan_dpan_mmx _op_copy_pan_dpan_mmx
86#define _op_copy_rel_pas_dpan_mmx _op_copy_pas_dpan_mmx
87
88static void
89init_copy_rel_pixel_span_funcs_mmx(void)
90{
91 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_p_dp_mmx;
92 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_dp_mmx;
93 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_dp_mmx;
94
95 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_dpan_mmx;
96 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_dpan_mmx;
97 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_dpan_mmx;
98}
99#endif
100
101#ifdef BUILD_MMX
102static void
103_op_copy_rel_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
104 c = 1 + (*d >> 24);
105 MOV_A2R(c, mm1)
106 pxor_r2r(mm0, mm0);
107 MOV_P2R(s, mm2, mm0)
108 MUL4_256_R2R(mm2, mm1)
109 MOV_R2P(mm1, *d, mm0)
110}
111
112
113#define _op_copy_rel_pt_pan_dp_mmx _op_copy_rel_pt_p_dp_mmx
114#define _op_copy_rel_pt_pas_dp_mmx _op_copy_rel_pt_p_dp_mmx
115
116#define _op_copy_rel_pt_p_dpan_mmx _op_copy_pt_p_dpan_mmx
117#define _op_copy_rel_pt_pan_dpan_mmx _op_copy_pt_pan_dpan_mmx
118#define _op_copy_rel_pt_pas_dpan_mmx _op_copy_pt_pas_dpan_mmx
119
120static void
121init_copy_rel_pixel_pt_funcs_mmx(void)
122{
123 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_dp_mmx;
124 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_dp_mmx;
125 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_dp_mmx;
126
127 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_dpan_mmx;
128 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_dpan_mmx;
129 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_dpan_mmx;
130}
131#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 @@
1/* copy pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_copy_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e;
7 int color;
8 UNROLL8_PLD_WHILE(d, l, e,
9 {
10 color = *m;
11 switch(color)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 color++;
20 *d = INTERP_256(color, *s, *d);
21 break;
22 }
23 m++; s++; d++;
24 });
25}
26
27
28#define _op_copy_pan_mas_dp _op_copy_p_mas_dp
29#define _op_copy_pas_mas_dp _op_copy_p_mas_dp
30
31#define _op_copy_p_mas_dpan _op_copy_p_mas_dp
32#define _op_copy_pan_mas_dpan _op_copy_p_mas_dpan
33#define _op_copy_pas_mas_dpan _op_copy_p_mas_dpan
34
35static void
36init_copy_pixel_mask_span_funcs_c(void)
37{
38 op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_p_mas_dp;
39 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pan_mas_dp;
40 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pas_mas_dp;
41
42 op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_p_mas_dpan;
43 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pan_mas_dpan;
44 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pas_mas_dpan;
45}
46#endif
47
48#ifdef BUILD_C
49static void
50_op_copy_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
51 *d = INTERP_256(m + 1, s, *d);
52}
53
54#define _op_copy_pt_pan_mas_dp _op_copy_pt_p_mas_dp
55#define _op_copy_pt_pas_mas_dp _op_copy_pt_p_mas_dp
56
57#define _op_copy_pt_p_mas_dpan _op_copy_pt_p_mas_dp
58#define _op_copy_pt_pan_mas_dpan _op_copy_pt_p_mas_dpan
59#define _op_copy_pt_pas_mas_dpan _op_copy_pt_p_mas_dpan
60
61static void
62init_copy_pixel_mask_pt_funcs_c(void)
63{
64 op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_p_mas_dp;
65 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pan_mas_dp;
66 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_pt_pas_mas_dp;
67
68 op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_p_mas_dpan;
69 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pan_mas_dpan;
70 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_pt_pas_mas_dpan;
71}
72#endif
73
74/*-----*/
75
76/* copy_rel pixel x mask --> dst */
77
78#ifdef BUILD_C
79static void
80_op_copy_rel_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
81 DATA32 *e;
82 int color;
83 UNROLL8_PLD_WHILE(d, l, e,
84 {
85 color = *m;
86 switch(color)
87 {
88 case 0:
89 break;
90 case 255:
91 *d = MUL_SYM(*d >> 24, *s);
92 break;
93 default:
94 c = MUL_SYM(*d >> 24, *s);
95 l++;
96 *d = INTERP_256(l, c, *d);
97 break;
98 }
99 m++; s++; d++;
100 });
101}
102
103
104#define _op_copy_rel_pan_mas_dp _op_copy_rel_p_mas_dp
105#define _op_copy_rel_pas_mas_dp _op_copy_rel_p_mas_dp
106
107#define _op_copy_rel_p_mas_dpan _op_copy_p_mas_dpan
108#define _op_copy_rel_pan_mas_dpan _op_copy_pan_mas_dpan
109#define _op_copy_rel_pas_mas_dpan _op_copy_pas_mas_dpan
110
111static void
112init_copy_rel_pixel_mask_span_funcs_c(void)
113{
114 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_p_mas_dp;
115 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pan_mas_dp;
116 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pas_mas_dp;
117
118 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_p_mas_dpan;
119 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pan_mas_dpan;
120 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pas_mas_dpan;
121}
122#endif
123
124#ifdef BUILD_C
125static void
126_op_copy_rel_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
127 c = MUL_SYM(*d >> 24, s);
128 *d = INTERP_256(m + 1, c, *d);
129}
130
131
132#define _op_copy_rel_pt_pan_mas_dp _op_copy_rel_pt_p_mas_dp
133#define _op_copy_rel_pt_pas_mas_dp _op_copy_rel_pt_p_mas_dp
134
135#define _op_copy_rel_pt_p_mas_dpan _op_copy_pt_p_mas_dpan
136#define _op_copy_rel_pt_pan_mas_dpan _op_copy_pt_pan_mas_dpan
137#define _op_copy_rel_pt_pas_mas_dpan _op_copy_pt_pas_mas_dpan
138
139static void
140init_copy_rel_pixel_mask_pt_funcs_c(void)
141{
142 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_p_mas_dp;
143 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pan_mas_dp;
144 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_copy_rel_pt_pas_mas_dp;
145
146 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_p_mas_dpan;
147 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pan_mas_dpan;
148 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_copy_rel_pt_pas_mas_dpan;
149}
150#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 @@
1/* copy pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_copy_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_255, mm5)
9 while (d < e) {
10 l = *m;
11 switch(l)
12 {
13 case 0:
14 break;
15 case 255:
16 *d = *s;
17 break;
18 default:
19 l++;
20 MOV_A2R(l, mm3)
21 MOV_P2R(*s, mm2, mm0)
22 MOV_P2R(*d, mm1, mm0)
23 INTERP_256_R2R(mm3, mm2, mm1, mm5);
24 MOV_R2P(mm1, *d, mm0)
25 break;
26 }
27 m++; d++;
28 }
29}
30
31#define _op_copy_pan_mas_dp_mmx _op_copy_p_mas_dp_mmx
32#define _op_copy_pas_mas_dp_mmx _op_copy_p_mas_dp_mmx
33
34#define _op_copy_p_mas_dpan_mmx _op_copy_p_mas_dp_mmx
35#define _op_copy_pan_mas_dpan_mmx _op_copy_p_mas_dpan_mmx
36#define _op_copy_pas_mas_dpan_mmx _op_copy_p_mas_dpan_mmx
37
38static void
39init_copy_pixel_mask_span_funcs_mmx(void)
40{
41 op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_p_mas_dp_mmx;
42 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pan_mas_dp_mmx;
43 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pas_mas_dp_mmx;
44
45 op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_p_mas_dpan_mmx;
46 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pan_mas_dpan_mmx;
47 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pas_mas_dpan_mmx;
48}
49#endif
50
51#ifdef BUILD_MMX
52static void
53_op_copy_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
54 c = m + 1;
55 MOV_A2R(ALPHA_255, mm5)
56 MOV_A2R(c, mm3)
57 pxor_r2r(mm0, mm0);
58 MOV_P2R(s, mm2, mm0)
59 MOV_P2R(*d, mm1, mm0)
60 INTERP_256_R2R(mm3, mm2, mm1, mm5);
61 MOV_R2P(mm1, *d, mm0)
62}
63
64#define _op_copy_pt_pan_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx
65#define _op_copy_pt_pas_mas_dp_mmx _op_copy_pt_p_mas_dp_mmx
66
67#define _op_copy_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dp_mmx
68#define _op_copy_pt_pan_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx
69#define _op_copy_pt_pas_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx
70
71static void
72init_copy_pixel_mask_pt_funcs_mmx(void)
73{
74 op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_p_mas_dp_mmx;
75 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pan_mas_dp_mmx;
76 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_pt_pas_mas_dp_mmx;
77
78 op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_p_mas_dpan_mmx;
79 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pan_mas_dpan_mmx;
80 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_pt_pas_mas_dpan_mmx;
81}
82#endif
83
84/*-----*/
85
86/* copy_rel pixel x mask --> dst */
87
88#ifdef BUILD_MMX
89static void
90_op_copy_rel_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
91 DATA32 *e = d + l;
92 pxor_r2r(mm0, mm0);
93 MOV_A2R(ALPHA_255, mm5)
94 while (d < e) {
95 l = *m;
96 switch(l)
97 {
98 case 0:
99 break;
100 case 255:
101 MOV_P2R(*s, mm2, mm0)
102 MOV_PA2R(*d, mm1)
103 MUL4_SYM_R2R(mm2, mm1, mm5)
104 MOV_R2P(mm1, *d, mm0)
105 break;
106 default:
107 l++;
108 MOV_P2R(*s, mm3, mm0)
109 MOV_P2R(*d, mm1, mm0)
110 MOV_RA2R(mm1, mm2)
111 MUL4_SYM_R2R(mm3, mm2, mm5)
112 MOV_A2R(l, mm3)
113 INTERP_256_R2R(mm3, mm2, mm1, mm5)
114 MOV_R2P(mm1, *d, mm0)
115 break;
116 }
117 m++; s++; d++;
118 }
119}
120
121#define _op_copy_rel_pan_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx
122#define _op_copy_rel_pas_mas_dp_mmx _op_copy_rel_p_mas_dp_mmx
123
124#define _op_copy_rel_p_mas_dpan_mmx _op_copy_p_mas_dpan_mmx
125#define _op_copy_rel_pan_mas_dpan_mmx _op_copy_pan_mas_dpan_mmx
126#define _op_copy_rel_pas_mas_dpan_mmx _op_copy_pas_mas_dpan_mmx
127
128static void
129init_copy_rel_pixel_mask_span_funcs_mmx(void)
130{
131 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_p_mas_dp_mmx;
132 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pan_mas_dp_mmx;
133 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pas_mas_dp_mmx;
134
135 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_p_mas_dpan_mmx;
136 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pan_mas_dpan_mmx;
137 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pas_mas_dpan_mmx;
138}
139#endif
140
141#ifdef BUILD_MMX
142static void
143_op_copy_rel_pt_p_mas_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
144 c = m + 1;
145 pxor_r2r(mm0, mm0);
146 MOV_A2R(ALPHA_255, mm5)
147 MOV_P2R(s, mm3, mm0)
148 MOV_P2R(*d, mm1, mm0)
149 MOV_RA2R(mm1, mm2)
150 MUL4_SYM_R2R(mm3, mm2, mm5)
151 MOV_A2R(c, mm3)
152 INTERP_256_R2R(mm3, mm2, mm1, mm5)
153 MOV_R2P(mm1, *d, mm0)
154}
155
156
157#define _op_copy_rel_pt_pan_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx
158#define _op_copy_rel_pt_pas_mas_dp_mmx _op_copy_rel_pt_p_mas_dp_mmx
159
160#define _op_copy_rel_pt_p_mas_dpan_mmx _op_copy_pt_p_mas_dpan_mmx
161#define _op_copy_rel_pt_pan_mas_dpan_mmx _op_copy_pt_pan_mas_dpan_mmx
162#define _op_copy_rel_pt_pas_mas_dpan_mmx _op_copy_pt_pas_mas_dpan_mmx
163
164static void
165init_copy_rel_pixel_mask_pt_funcs_mmx(void)
166{
167 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_p_mas_dp_mmx;
168 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pan_mas_dp_mmx;
169 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_copy_rel_pt_pas_mas_dp_mmx;
170
171 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_p_mas_dpan_mmx;
172 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pan_mas_dpan_mmx;
173 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_copy_rel_pt_pas_mas_dpan_mmx;
174}
175#endif
176
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 @@
1/* copy pixel x mask --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 // FIXME: neon-it
7 DATA32 *e;
8 int color;
9 UNROLL8_PLD_WHILE(d, l, e,
10 {
11 color = *m;
12 switch(color)
13 {
14 case 0:
15 break;
16 case 255:
17 *d = *s;
18 break;
19 default:
20 color++;
21 *d = INTERP_256(color, *s, *d);
22 break;
23 }
24 m++; s++; d++;
25 });
26}
27
28#define _op_copy_pan_mas_dp_neon _op_copy_p_mas_dp_neon
29#define _op_copy_pas_mas_dp_neon _op_copy_p_mas_dp_neon
30
31#define _op_copy_p_mas_dpan_neon _op_copy_p_mas_dp_neon
32#define _op_copy_pan_mas_dpan_neon _op_copy_p_mas_dpan_neon
33#define _op_copy_pas_mas_dpan_neon _op_copy_p_mas_dpan_neon
34
35static void
36init_copy_pixel_mask_span_funcs_neon(void)
37{
38 op_copy_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_p_mas_dp_neon;
39 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pan_mas_dp_neon;
40 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pas_mas_dp_neon;
41
42 op_copy_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_p_mas_dpan_neon;
43 op_copy_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_mas_dpan_neon;
44 op_copy_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_mas_dpan_neon;
45}
46#endif
47
48#ifdef BUILD_NEON
49static void
50_op_copy_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
51 *d = INTERP_256(m + 1, s, *d);
52}
53
54#define _op_copy_pt_pan_mas_dp_neon _op_copy_pt_p_mas_dp_neon
55#define _op_copy_pt_pas_mas_dp_neon _op_copy_pt_p_mas_dp_neon
56
57#define _op_copy_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dp_neon
58#define _op_copy_pt_pan_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon
59#define _op_copy_pt_pas_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon
60
61static void
62init_copy_pixel_mask_pt_funcs_neon(void)
63{
64 op_copy_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_p_mas_dp_neon;
65 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_mas_dp_neon;
66 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_mas_dp_neon;
67
68 op_copy_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_mas_dpan_neon;
69 op_copy_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_mas_dpan_neon;
70 op_copy_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_mas_dpan_neon;
71}
72#endif
73
74/*-----*/
75
76/* copy_rel pixel x mask --> dst */
77
78#ifdef BUILD_NEON
79static void
80_op_copy_rel_p_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
81 // FIXME: neon-it
82 DATA32 *e;
83 int color;
84 UNROLL8_PLD_WHILE(d, l, e,
85 {
86 color = *m;
87 switch(color)
88 {
89 case 0:
90 break;
91 case 255:
92 *d = MUL_SYM(*d >> 24, *s);
93 break;
94 default:
95 c = MUL_SYM(*d >> 24, *s);
96 l++;
97 *d = INTERP_256(l, c, *d);
98 break;
99 }
100 m++; s++; d++;
101 });
102}
103
104#define _op_copy_rel_pan_mas_dp_neon _op_copy_rel_p_mas_dp_neon
105#define _op_copy_rel_pas_mas_dp_neon _op_copy_rel_p_mas_dp_neon
106
107#define _op_copy_rel_p_mas_dpan_neon _op_copy_p_mas_dpan_neon
108#define _op_copy_rel_pan_mas_dpan_neon _op_copy_pan_mas_dpan_neon
109#define _op_copy_rel_pas_mas_dpan_neon _op_copy_pas_mas_dpan_neon
110
111static void
112init_copy_rel_pixel_mask_span_funcs_neon(void)
113{
114 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_p_mas_dp_neon;
115 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_mas_dp_neon;
116 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_mas_dp_neon;
117
118 op_copy_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_mas_dpan_neon;
119 op_copy_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_mas_dpan_neon;
120 op_copy_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_mas_dpan_neon;
121}
122#endif
123
124#ifdef BUILD_NEON
125static void
126_op_copy_rel_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
127 c = MUL_SYM(*d >> 24, s);
128 *d = INTERP_256(m + 1, c, *d);
129}
130
131
132#define _op_copy_rel_pt_pan_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon
133#define _op_copy_rel_pt_pas_mas_dp_neon _op_copy_rel_pt_p_mas_dp_neon
134
135#define _op_copy_rel_pt_p_mas_dpan_neon _op_copy_pt_p_mas_dpan_neon
136#define _op_copy_rel_pt_pan_mas_dpan_neon _op_copy_pt_pan_mas_dpan_neon
137#define _op_copy_rel_pt_pas_mas_dpan_neon _op_copy_pt_pas_mas_dpan_neon
138
139static void
140init_copy_rel_pixel_mask_pt_funcs_neon(void)
141{
142 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_mas_dp_neon;
143 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_mas_dp_neon;
144 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_mas_dp_neon;
145
146 op_copy_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_mas_dpan_neon;
147 op_copy_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_mas_dpan_neon;
148 op_copy_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_mas_dpan_neon;
149}
150#endif
151
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 @@
1/* copy pixel --> dst */
2
3#ifdef BUILD_NEON
4static void
5_op_copy_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6//#define USENEON 1
7#ifndef USENEON
8 memcpy(d, s, l * sizeof(DATA32));
9 return;
10#else
11 DATA32 *e;
12 e = d + l - 23;
13 if (e > d)
14 {
15 int dl;
16
17 asm volatile
18 (".fpu neon \n\t"
19 "_op_copy_p_dp_neon_asmloop: \n\t"
20 "pld [%[s], #192] \n\t" // preload 256 bytes ahead
21 "pld [%[s], #320] \n\t" // preload 320 bytes ahead
22 "vld1.32 {d0-d3}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned
23 "vld1.32 {d4-d7} , [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned
24 "vld1.32 {d8-d11}, [%[s]]! \n\t" // load 256bits (32 bytes 8 pix), 32bit aligned
25 "vst1.32 {d0-d3}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned
26 "vst1.32 {d4-d7}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned
27 "vst1.32 {d8-d11}, [%[d]]! \n\t" // store 256bits (32 bytes 8 pix), 32bit aligned
28 "cmp %[e], %[d] \n\t" // compare current and end ptr
29 "bgt _op_copy_p_dp_neon_asmloop \n\t"
30 : /*out*/
31 : /*in */ [s] "r" (s), [e] "r" (e), [d] "r" (d)
32 : /*clobber*/
33 "q0", "q1", "q2","q3", "q4", "q5", "q6",
34 "d0", "d1", "d2", "d3",
35 "d4", "d5", "d6", "d7",
36 "d8", "d9", "d10", "d11",
37 "memory" // clobbered
38 );
39 dl = l % 24; // dl is how many pixels at end that is not a multiple of 24
40 l = l - dl; // jump to there at the end of the run?
41 s = s + l;
42 d = d + l;
43 }
44 e += 23;
45 for (;d < e; d++, s++) *d = *s;
46#endif
47}
48
49#define _op_copy_pan_dp_neon _op_copy_p_dp_neon
50#define _op_copy_pas_dp_neon _op_copy_p_dp_neon
51
52#define _op_copy_p_dpan_neon _op_copy_p_dp_neon
53#define _op_copy_pan_dpan_neon _op_copy_pan_dp_neon
54#define _op_copy_pas_dpan_neon _op_copy_pas_dp_neon
55
56static void
57init_copy_pixel_span_funcs_neon(void)
58{
59 op_copy_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_p_dp_neon;
60 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pan_dp_neon;
61 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pas_dp_neon;
62
63 op_copy_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_p_dpan_neon;
64 op_copy_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pan_dpan_neon;
65 op_copy_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pas_dpan_neon;
66}
67#endif
68
69#ifdef BUILD_NEON
70static void
71_op_copy_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
72 *d = s;
73}
74
75#define _op_copy_pt_pan_dp_neon _op_copy_pt_p_dp_neon
76#define _op_copy_pt_pas_dp_neon _op_copy_pt_p_dp_neon
77
78#define _op_copy_pt_p_dpan_neon _op_copy_pt_p_dp_neon
79#define _op_copy_pt_pan_dpan_neon _op_copy_pt_pan_dp_neon
80#define _op_copy_pt_pas_dpan_neon _op_copy_pt_pas_dp_neon
81
82static void
83init_copy_pixel_pt_funcs_neon(void)
84{
85 op_copy_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_p_dp_neon;
86 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pan_dp_neon;
87 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_pt_pas_dp_neon;
88
89 op_copy_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_p_dpan_neon;
90 op_copy_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pan_dpan_neon;
91 op_copy_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_pas_dpan_neon;
92}
93#endif
94
95/*-----*/
96
97/* copy_rel pixel --> dst */
98
99#ifdef BUILD_NEON
100static void
101_op_copy_rel_p_dp_neon(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
102 // FIXME: neon-it
103 DATA32 *e;
104 UNROLL8_PLD_WHILE(d, l, e,
105 {
106 *d = MUL_SYM(*d >> 24, c);
107 d++;
108 });
109}
110
111
112#define _op_copy_rel_pas_dp_neon _op_copy_rel_p_dp_neon
113#define _op_copy_rel_pan_dp_neon _op_copy_rel_p_dp_neon
114
115#define _op_copy_rel_p_dpan_neon _op_copy_p_dpan_neon
116#define _op_copy_rel_pan_dpan_neon _op_copy_pan_dpan_neon
117#define _op_copy_rel_pas_dpan_neon _op_copy_pas_dpan_neon
118
119static void
120init_copy_rel_pixel_span_funcs_neon(void)
121{
122 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_p_dp_neon;
123 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pan_dp_neon;
124 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pas_dp_neon;
125
126 op_copy_rel_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_p_dpan_neon;
127 op_copy_rel_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pan_dpan_neon;
128 op_copy_rel_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pas_dpan_neon;
129}
130#endif
131
132#ifdef BUILD_NEON
133static void
134_op_copy_rel_pt_p_dp_neon(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
135 s = 1 + (*d >> 24);
136 *d = MUL_256(s, c);
137}
138
139
140#define _op_copy_rel_pt_pan_dp_neon _op_copy_rel_pt_p_dp_neon
141#define _op_copy_rel_pt_pas_dp_neon _op_copy_rel_pt_p_dp_neon
142
143#define _op_copy_rel_pt_p_dpan_neon _op_copy_pt_p_dpan_neon
144#define _op_copy_rel_pt_pan_dpan_neon _op_copy_pt_pan_dpan_neon
145#define _op_copy_rel_pt_pas_dpan_neon _op_copy_pt_pas_dpan_neon
146
147static void
148init_copy_rel_pixel_pt_funcs_neon(void)
149{
150 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_p_dp_neon;
151 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pan_dp_neon;
152 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_pas_dp_neon;
153
154 op_copy_rel_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_p_dpan_neon;
155 op_copy_rel_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pan_dpan_neon;
156 op_copy_rel_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_pas_dpan_neon;
157}
158#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 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4static RGBA_Gfx_Func op_copy_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5static RGBA_Gfx_Pt_Func op_copy_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
6
7static void op_copy_init(void);
8static void op_copy_shutdown(void);
9
10static RGBA_Gfx_Func op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
14static RGBA_Gfx_Func op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
15
16static RGBA_Gfx_Pt_Func op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_copy_color_pt_get(DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
20static RGBA_Gfx_Pt_Func op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
21
22static RGBA_Gfx_Compositor _composite_copy = { "copy",
23 op_copy_init, op_copy_shutdown,
24 op_copy_pixel_span_get, op_copy_color_span_get,
25 op_copy_pixel_color_span_get, op_copy_mask_color_span_get,
26 op_copy_pixel_mask_span_get,
27 op_copy_pixel_pt_get, op_copy_color_pt_get,
28 op_copy_pixel_color_pt_get, op_copy_mask_color_pt_get,
29 op_copy_pixel_mask_pt_get
30 };
31
32RGBA_Gfx_Compositor *
33evas_common_gfx_compositor_copy_get(void)
34{
35 return &(_composite_copy);
36}
37
38
39static RGBA_Gfx_Func op_copy_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
40static RGBA_Gfx_Pt_Func op_copy_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
41
42static void op_copy_rel_init(void);
43static void op_copy_rel_shutdown(void);
44
45static RGBA_Gfx_Func op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
47static RGBA_Gfx_Func op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
48static RGBA_Gfx_Func op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
49static RGBA_Gfx_Func op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
50
51static RGBA_Gfx_Pt_Func op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
52/* XXX: doesn't exist
53static RGBA_Gfx_Pt_Func op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
54 */
55static RGBA_Gfx_Pt_Func op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
56static RGBA_Gfx_Pt_Func op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
57static RGBA_Gfx_Pt_Func op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
58
59static RGBA_Gfx_Compositor _composite_copy_rel = { "copy_rel",
60 op_copy_rel_init, op_copy_rel_shutdown,
61 op_copy_rel_pixel_span_get, op_copy_rel_color_span_get,
62 op_copy_rel_pixel_color_span_get, op_copy_rel_mask_color_span_get,
63 op_copy_rel_pixel_mask_span_get,
64 op_copy_rel_pixel_pt_get, op_copy_color_pt_get,
65 op_copy_rel_pixel_color_pt_get, op_copy_rel_mask_color_pt_get,
66 op_copy_rel_pixel_mask_pt_get
67 };
68
69RGBA_Gfx_Compositor *
70evas_common_gfx_compositor_copy_rel_get(void)
71{
72 return &(_composite_copy_rel);
73}
74
75
76# include "./evas_op_copy/op_copy_pixel_.c"
77# include "./evas_op_copy/op_copy_color_.c"
78# include "./evas_op_copy/op_copy_pixel_color_.c"
79# include "./evas_op_copy/op_copy_pixel_mask_.c"
80# include "./evas_op_copy/op_copy_mask_color_.c"
81//# include "./evas_op_copy/op_copy_pixel_mask_color_.c"
82
83# include "./evas_op_copy/op_copy_pixel_i386.c"
84# include "./evas_op_copy/op_copy_color_i386.c"
85# include "./evas_op_copy/op_copy_pixel_color_i386.c"
86# include "./evas_op_copy/op_copy_pixel_mask_i386.c"
87# include "./evas_op_copy/op_copy_mask_color_i386.c"
88//# include "./evas_op_copy/op_copy_pixel_mask_color_i386.c"
89
90# include "./evas_op_copy/op_copy_pixel_neon.c"
91# include "./evas_op_copy/op_copy_color_neon.c"
92# include "./evas_op_copy/op_copy_pixel_color_neon.c"
93# include "./evas_op_copy/op_copy_pixel_mask_neon.c"
94# include "./evas_op_copy/op_copy_mask_color_neon.c"
95//# include "./evas_op_copy/op_copy_pixel_mask_color_neon.c"
96
97
98static void
99op_copy_init(void)
100{
101 memset(op_copy_span_funcs, 0, sizeof(op_copy_span_funcs));
102 memset(op_copy_pt_funcs, 0, sizeof(op_copy_pt_funcs));
103#ifdef BUILD_MMX
104 init_copy_pixel_span_funcs_mmx();
105 init_copy_pixel_color_span_funcs_mmx();
106 init_copy_pixel_mask_span_funcs_mmx();
107 init_copy_color_span_funcs_mmx();
108 init_copy_mask_color_span_funcs_mmx();
109
110 init_copy_pixel_pt_funcs_mmx();
111 init_copy_pixel_color_pt_funcs_mmx();
112 init_copy_pixel_mask_pt_funcs_mmx();
113 init_copy_color_pt_funcs_mmx();
114 init_copy_mask_color_pt_funcs_mmx();
115#endif
116#ifdef BUILD_NEON
117 init_copy_pixel_span_funcs_neon();
118 init_copy_pixel_color_span_funcs_neon();
119 init_copy_pixel_mask_span_funcs_neon();
120 init_copy_color_span_funcs_neon();
121 init_copy_mask_color_span_funcs_neon();
122
123 init_copy_pixel_pt_funcs_neon();
124 init_copy_pixel_color_pt_funcs_neon();
125 init_copy_pixel_mask_pt_funcs_neon();
126 init_copy_color_pt_funcs_neon();
127 init_copy_mask_color_pt_funcs_neon();
128#endif
129#ifdef BUILD_C
130 init_copy_pixel_span_funcs_c();
131 init_copy_pixel_color_span_funcs_c();
132 init_copy_pixel_mask_span_funcs_c();
133 init_copy_color_span_funcs_c();
134 init_copy_mask_color_span_funcs_c();
135
136 init_copy_pixel_pt_funcs_c();
137 init_copy_pixel_color_pt_funcs_c();
138 init_copy_pixel_mask_pt_funcs_c();
139 init_copy_color_pt_funcs_c();
140 init_copy_mask_color_pt_funcs_c();
141#endif
142}
143
144static void
145op_copy_shutdown(void)
146{
147}
148
149static RGBA_Gfx_Func
150copy_gfx_span_func_cpu(int s, int m, int c, int d)
151{
152 RGBA_Gfx_Func func = NULL;
153 int cpu = CPU_N;
154#ifdef BUILD_MMX
155 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
156 {
157 cpu = CPU_MMX;
158 func = op_copy_span_funcs[s][m][c][d][cpu];
159 if (func) return func;
160 }
161#endif
162#ifdef BUILD_NEON
163 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
164 {
165 cpu = CPU_NEON;
166 func = op_copy_span_funcs[s][m][c][d][cpu];
167 if (func) return func;
168 }
169#endif
170#ifdef BUILD_C
171 cpu = CPU_C;
172 func = op_copy_span_funcs[s][m][c][d][cpu];
173 if (func) return func;
174#endif
175 return func;
176}
177
178static RGBA_Gfx_Func
179op_copy_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
180{
181 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
182
183 if (src && src->cache_entry.flags.alpha)
184 {
185 dst->cache_entry.flags.alpha = 1;
186 s = SP;
187 }
188 if (dst && dst->cache_entry.flags.alpha)
189 d = DP;
190 return copy_gfx_span_func_cpu(s, m, c, d);
191}
192
193static RGBA_Gfx_Func
194op_copy_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
195{
196 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
197
198 if ((col >> 24) < 255)
199 {
200 if (dst)
201 dst->cache_entry.flags.alpha = 1;
202 c = SC;
203 }
204 if (col == ((col >> 24) * 0x01010101))
205 c = SC_AA;
206 if (col == 0xffffffff)
207 c = SC_N;
208 if (dst && dst->cache_entry.flags.alpha)
209 d = DP;
210 return copy_gfx_span_func_cpu(s, m, c, d);
211}
212
213static RGBA_Gfx_Func
214op_copy_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
215{
216 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
217
218 if (src && src->cache_entry.flags.alpha)
219 {
220 if (dst)
221 dst->cache_entry.flags.alpha = 1;
222 s = SP;
223 }
224 if ((col >> 24) < 255)
225 {
226 if (dst)
227 dst->cache_entry.flags.alpha = 1;
228 c = SC;
229 }
230 if (col == ((col >> 24) * 0x01010101))
231 c = SC_AA;
232 if (col == 0xffffffff)
233 c = SC_N;
234 if (dst && dst->cache_entry.flags.alpha)
235 d = DP;
236 return copy_gfx_span_func_cpu(s, m, c, d);
237}
238
239static RGBA_Gfx_Func
240op_copy_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
241{
242 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
243
244 if (dst)
245 dst->cache_entry.flags.alpha = 1;
246 if ((col >> 24) < 255)
247 c = SC;
248 if (col == ((col >> 24) * 0x01010101))
249 c = SC_AA;
250 if (col == 0xffffffff)
251 c = SC_N;
252 return copy_gfx_span_func_cpu(s, m, c, d);
253}
254
255static RGBA_Gfx_Func
256op_copy_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
257{
258 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
259
260 if (dst)
261 dst->cache_entry.flags.alpha = 1;
262 if (src && src->cache_entry.flags.alpha)
263 s = SP;
264 return copy_gfx_span_func_cpu(s, m, c, d);
265}
266
267static RGBA_Gfx_Pt_Func
268copy_gfx_pt_func_cpu(int s, int m, int c, int d)
269{
270 RGBA_Gfx_Pt_Func func = NULL;
271 int cpu = CPU_N;
272#ifdef BUILD_MMX
273 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
274 {
275 cpu = CPU_MMX;
276 func = op_copy_pt_funcs[s][m][c][d][cpu];
277 if (func) return func;
278 }
279#endif
280#ifdef BUILD_NEON
281 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
282 {
283 cpu = CPU_NEON;
284 func = op_copy_pt_funcs[s][m][c][d][cpu];
285 if (func) return func;
286 }
287#endif
288#ifdef BUILD_C
289 cpu = CPU_C;
290 func = op_copy_pt_funcs[s][m][c][d][cpu];
291 if (func) return func;
292#endif
293 return func;
294}
295
296static RGBA_Gfx_Pt_Func
297op_copy_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
298{
299 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
300
301 if (src_flags.alpha)
302 {
303 dst->cache_entry.flags.alpha = 1;
304 s = SP;
305 }
306 if (dst && dst->cache_entry.flags.alpha)
307 d = DP;
308 return copy_gfx_pt_func_cpu(s, m, c, d);
309}
310
311static RGBA_Gfx_Pt_Func
312op_copy_color_pt_get(DATA32 col, RGBA_Image *dst)
313{
314 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
315
316 if ((col >> 24) < 255)
317 {
318 if (dst)
319 dst->cache_entry.flags.alpha = 1;
320 c = SC;
321 }
322 if (col == ((col >> 24) * 0x01010101))
323 c = SC_AA;
324 if (col == 0xffffffff)
325 c = SC_N;
326 if (dst && dst->cache_entry.flags.alpha)
327 d = DP;
328 return copy_gfx_pt_func_cpu(s, m, c, d);
329}
330
331static RGBA_Gfx_Pt_Func
332op_copy_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
333{
334 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
335
336 if (src_flags.alpha)
337 {
338 if (dst)
339 dst->cache_entry.flags.alpha = 1;
340 s = SP;
341 }
342 if ((col >> 24) < 255)
343 {
344 if (dst)
345 dst->cache_entry.flags.alpha = 1;
346 c = SC;
347 }
348 if (col == ((col >> 24) * 0x01010101))
349 c = SC_AA;
350 if (col == 0xffffffff)
351 c = SC_N;
352 if (dst && dst->cache_entry.flags.alpha)
353 d = DP;
354 return copy_gfx_pt_func_cpu(s, m, c, d);
355}
356
357static RGBA_Gfx_Pt_Func
358op_copy_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
359{
360 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
361
362 if (dst)
363 dst->cache_entry.flags.alpha = 1;
364 if ((col >> 24) < 255)
365 c = SC;
366 if (col == ((col >> 24) * 0x01010101))
367 c = SC_AA;
368 if (col == 0xffffffff)
369 c = SC_N;
370 return copy_gfx_pt_func_cpu(s, m, c, d);
371}
372
373static RGBA_Gfx_Pt_Func
374op_copy_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
375{
376 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
377
378 if (dst)
379 dst->cache_entry.flags.alpha = 1;
380 if (src_flags.alpha)
381 s = SP;
382 return copy_gfx_pt_func_cpu(s, m, c, d);
383}
384
385
386static void
387op_copy_rel_init(void)
388{
389 memset(op_copy_rel_span_funcs, 0, sizeof(op_copy_rel_span_funcs));
390 memset(op_copy_rel_pt_funcs, 0, sizeof(op_copy_rel_pt_funcs));
391#ifdef BUILD_MMX
392 init_copy_rel_pixel_span_funcs_mmx();
393 init_copy_rel_pixel_color_span_funcs_mmx();
394 init_copy_rel_pixel_mask_span_funcs_mmx();
395 init_copy_rel_color_span_funcs_mmx();
396 init_copy_rel_mask_color_span_funcs_mmx();
397
398 init_copy_rel_pixel_pt_funcs_mmx();
399 init_copy_rel_pixel_color_pt_funcs_mmx();
400 init_copy_rel_pixel_mask_pt_funcs_mmx();
401 init_copy_rel_color_pt_funcs_mmx();
402 init_copy_rel_mask_color_pt_funcs_mmx();
403#endif
404#ifdef BUILD_NEON
405 init_copy_rel_pixel_span_funcs_neon();
406 init_copy_rel_pixel_color_span_funcs_neon();
407 init_copy_rel_pixel_mask_span_funcs_neon();
408 init_copy_rel_color_span_funcs_neon();
409 init_copy_rel_mask_color_span_funcs_neon();
410
411 init_copy_rel_pixel_pt_funcs_neon();
412 init_copy_rel_pixel_color_pt_funcs_neon();
413 init_copy_rel_pixel_mask_pt_funcs_neon();
414 init_copy_rel_color_pt_funcs_neon();
415 init_copy_rel_mask_color_pt_funcs_neon();
416#endif
417#ifdef BUILD_C
418 init_copy_rel_pixel_span_funcs_c();
419 init_copy_rel_pixel_color_span_funcs_c();
420 init_copy_rel_pixel_mask_span_funcs_c();
421 init_copy_rel_color_span_funcs_c();
422 init_copy_rel_mask_color_span_funcs_c();
423
424 init_copy_rel_pixel_pt_funcs_c();
425 init_copy_rel_pixel_color_pt_funcs_c();
426 init_copy_rel_pixel_mask_pt_funcs_c();
427 init_copy_rel_color_pt_funcs_c();
428 init_copy_rel_mask_color_pt_funcs_c();
429#endif
430}
431
432static void
433op_copy_rel_shutdown(void)
434{
435}
436
437static RGBA_Gfx_Func
438copy_rel_gfx_span_func_cpu(int s, int m, int c, int d)
439{
440 RGBA_Gfx_Func func = NULL;
441 int cpu = CPU_N;
442#ifdef BUILD_MMX
443 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
444 {
445 cpu = CPU_MMX;
446 func = op_copy_rel_span_funcs[s][m][c][d][cpu];
447 if (func) return func;
448 }
449#endif
450#ifdef BUILD_NEON
451 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
452 {
453 cpu = CPU_NEON;
454 func = op_copy_rel_span_funcs[s][m][c][d][cpu];
455 if (func) return func;
456 }
457#endif
458#ifdef BUILD_C
459 cpu = CPU_C;
460 func = op_copy_rel_span_funcs[s][m][c][d][cpu];
461 if (func) return func;
462#endif
463 return func;
464}
465
466static RGBA_Gfx_Func
467op_copy_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
468{
469 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
470
471 if (src && src->cache_entry.flags.alpha)
472 {
473 if (dst)
474 dst->cache_entry.flags.alpha = 1;
475 s = SP;
476 }
477 if (dst && dst->cache_entry.flags.alpha)
478 d = DP;
479 return copy_rel_gfx_span_func_cpu(s, m, c, d);
480}
481
482static RGBA_Gfx_Func
483op_copy_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
484{
485 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
486
487 if ((col >> 24) < 255)
488 {
489 if (dst)
490 dst->cache_entry.flags.alpha = 1;
491 c = SC;
492 }
493 if (col == ((col >> 24) * 0x01010101))
494 c = SC_AA;
495 if (col == 0xffffffff)
496 c = SC_N;
497 if (dst && dst->cache_entry.flags.alpha)
498 d = DP;
499 return copy_rel_gfx_span_func_cpu(s, m, c, d);
500}
501
502static RGBA_Gfx_Func
503op_copy_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
504{
505 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
506
507 if (src && src->cache_entry.flags.alpha)
508 {
509 if (dst)
510 dst->cache_entry.flags.alpha = 1;
511 s = SP;
512 }
513 if ((col >> 24) < 255)
514 {
515 if (dst)
516 dst->cache_entry.flags.alpha = 1;
517 c = SC;
518 }
519 if (col == ((col >> 24) * 0x01010101))
520 c = SC_AA;
521 if (col == 0xffffffff)
522 c = SC_N;
523 if (dst && dst->cache_entry.flags.alpha)
524 d = DP;
525 return copy_rel_gfx_span_func_cpu(s, m, c, d);
526}
527
528static RGBA_Gfx_Func
529op_copy_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
530{
531 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
532
533 if (dst)
534 dst->cache_entry.flags.alpha = 1;
535 if ((col >> 24) < 255)
536 c = SC;
537 if (col == ((col >> 24) * 0x01010101))
538 c = SC_AA;
539 if (col == 0xffffffff)
540 c = SC_N;
541 return copy_rel_gfx_span_func_cpu(s, m, c, d);
542}
543
544static RGBA_Gfx_Func
545op_copy_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
546{
547 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
548
549 if (dst)
550 dst->cache_entry.flags.alpha = 1;
551 if (src && src->cache_entry.flags.alpha)
552 s = SP;
553 return copy_rel_gfx_span_func_cpu(s, m, c, d);
554}
555
556static RGBA_Gfx_Pt_Func
557copy_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
558{
559 RGBA_Gfx_Pt_Func func = NULL;
560 int cpu = CPU_N;
561#ifdef BUILD_MMX
562 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
563 {
564 cpu = CPU_MMX;
565 func = op_copy_rel_pt_funcs[s][m][c][d][cpu];
566 if (func) return func;
567 }
568#endif
569#ifdef BUILD_NEON
570 if (evas_common_cpu_has_feature(CPU_FEATURE_NEON))
571 {
572 cpu = CPU_NEON;
573 func = op_copy_rel_pt_funcs[s][m][c][d][cpu];
574 if (func) return func;
575 }
576#endif
577#ifdef BUILD_C
578 cpu = CPU_C;
579 func = op_copy_rel_pt_funcs[s][m][c][d][cpu];
580 if (func) return func;
581#endif
582 return func;
583}
584
585static RGBA_Gfx_Pt_Func
586op_copy_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
587{
588 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
589
590 if (src_flags.alpha)
591 {
592 if (dst)
593 dst->cache_entry.flags.alpha = 1;
594 s = SP;
595 }
596 if (dst && dst->cache_entry.flags.alpha)
597 d = DP;
598 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
599}
600
601/* XXX: not used
602static RGBA_Gfx_Pt_Func
603op_copy_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
604{
605 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
606
607 if ((col >> 24) < 255)
608 {
609 if (dst)
610 dst->cache_entry.flags.alpha = 1;
611 c = SC;
612 }
613 if (col == ((col >> 24) * 0x01010101))
614 c = SC_AA;
615 if (col == 0xffffffff)
616 c = SC_N;
617 if (dst && dst->cache_entry.flags.alpha)
618 d = DP;
619 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
620}
621*/
622
623static RGBA_Gfx_Pt_Func
624op_copy_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
625{
626 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
627
628 if (src_flags.alpha)
629 {
630 if (dst)
631 dst->cache_entry.flags.alpha = 1;
632 s = SP;
633 }
634 if ((col >> 24) < 255)
635 {
636 if (dst)
637 dst->cache_entry.flags.alpha = 1;
638 c = SC;
639 }
640 if (col == ((col >> 24) * 0x01010101))
641 c = SC_AA;
642 if (col == 0xffffffff)
643 c = SC_N;
644 if (dst && dst->cache_entry.flags.alpha)
645 d = DP;
646 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
647}
648
649static RGBA_Gfx_Pt_Func
650op_copy_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
651{
652 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
653
654 if (dst)
655 dst->cache_entry.flags.alpha = 1;
656 if ((col >> 24) < 255)
657 c = SC;
658 if (col == ((col >> 24) * 0x01010101))
659 c = SC_AA;
660 if (col == 0xffffffff)
661 c = SC_N;
662 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
663}
664
665static RGBA_Gfx_Pt_Func
666op_copy_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
667{
668 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
669
670 if (dst)
671 dst->cache_entry.flags.alpha = 1;
672 if (src_flags.alpha)
673 s = SP;
674 return copy_rel_gfx_pt_func_cpu(s, m, c, d);
675}
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_mask_color_.c \
5op_mask_color_i386.c \
6op_mask_mask_color_.c \
7op_mask_mask_color_i386.c \
8op_mask_pixel_.c \
9op_mask_pixel_color_.c \
10op_mask_pixel_color_i386.c \
11op_mask_pixel_i386.c \
12op_mask_pixel_mask_.c \
13op_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_mask
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
120EXOTIC_LIBS = @EXOTIC_LIBS@
121FGREP = @FGREP@
122FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
123FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
124FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
125FREETYPE_LIBS = @FREETYPE_LIBS@
126FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
127FRIBIDI_LIBS = @FRIBIDI_LIBS@
128GL_EET_CFLAGS = @GL_EET_CFLAGS@
129GL_EET_LIBS = @GL_EET_LIBS@
130GREP = @GREP@
131HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
132HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
133INSTALL = @INSTALL@
134INSTALL_DATA = @INSTALL_DATA@
135INSTALL_PROGRAM = @INSTALL_PROGRAM@
136INSTALL_SCRIPT = @INSTALL_SCRIPT@
137INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
138LD = @LD@
139LDFLAGS = @LDFLAGS@
140LIBOBJS = @LIBOBJS@
141LIBS = @LIBS@
142LIBTOOL = @LIBTOOL@
143LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
144LINEBREAK_LIBS = @LINEBREAK_LIBS@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MKDIR_P = @MKDIR_P@
150MODULE_ARCH = @MODULE_ARCH@
151NM = @NM@
152NMEDIT = @NMEDIT@
153OBJC = @OBJC@
154OBJCDEPMODE = @OBJCDEPMODE@
155OBJCFLAGS = @OBJCFLAGS@
156OBJDUMP = @OBJDUMP@
157OBJEXT = @OBJEXT@
158OTOOL = @OTOOL@
159OTOOL64 = @OTOOL64@
160PACKAGE = @PACKAGE@
161PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162PACKAGE_NAME = @PACKAGE_NAME@
163PACKAGE_STRING = @PACKAGE_STRING@
164PACKAGE_TARNAME = @PACKAGE_TARNAME@
165PACKAGE_URL = @PACKAGE_URL@
166PACKAGE_VERSION = @PACKAGE_VERSION@
167PATH_SEPARATOR = @PATH_SEPARATOR@
168PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
169PIXMAN_LIBS = @PIXMAN_LIBS@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173PNG_CFLAGS = @PNG_CFLAGS@
174PNG_LIBS = @PNG_LIBS@
175RANLIB = @RANLIB@
176SDL_CFLAGS = @SDL_CFLAGS@
177SDL_LIBS = @SDL_LIBS@
178SED = @SED@
179SET_MAKE = @SET_MAKE@
180SHELL = @SHELL@
181SHM_OPEN_LINK = @SHM_OPEN_LINK@
182STRIP = @STRIP@
183SVG_CFLAGS = @SVG_CFLAGS@
184SVG_LIBS = @SVG_LIBS@
185VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
186VALGRIND_LIBS = @VALGRIND_LIBS@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
190WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
191XCB_CFLAGS = @XCB_CFLAGS@
192XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
193XCB_GL_LIBS = @XCB_GL_LIBS@
194XCB_LIBS = @XCB_LIBS@
195XEXT_CFLAGS = @XEXT_CFLAGS@
196XEXT_LIBS = @XEXT_LIBS@
197XMKMF = @XMKMF@
198X_CFLAGS = @X_CFLAGS@
199X_EXTRA_LIBS = @X_EXTRA_LIBS@
200X_LIBS = @X_LIBS@
201X_PRE_LIBS = @X_PRE_LIBS@
202abs_builddir = @abs_builddir@
203abs_srcdir = @abs_srcdir@
204abs_top_builddir = @abs_top_builddir@
205abs_top_srcdir = @abs_top_srcdir@
206ac_ct_CC = @ac_ct_CC@
207ac_ct_CXX = @ac_ct_CXX@
208ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
209ac_ct_OBJC = @ac_ct_OBJC@
210altivec_cflags = @altivec_cflags@
211am__include = @am__include@
212am__leading_dot = @am__leading_dot@
213am__quote = @am__quote@
214am__tar = @am__tar@
215am__untar = @am__untar@
216bindir = @bindir@
217build = @build@
218build_alias = @build_alias@
219build_cpu = @build_cpu@
220build_os = @build_os@
221build_vendor = @build_vendor@
222builddir = @builddir@
223datadir = @datadir@
224datarootdir = @datarootdir@
225dlopen_libs = @dlopen_libs@
226docdir = @docdir@
227dvidir = @dvidir@
228edje_cc = @edje_cc@
229efl_doxygen = @efl_doxygen@
230efl_have_doxygen = @efl_have_doxygen@
231evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
232evas_engine_buffer_libs = @evas_engine_buffer_libs@
233evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
234evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
235evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
236evas_engine_directfb_libs = @evas_engine_directfb_libs@
237evas_engine_fb_cflags = @evas_engine_fb_cflags@
238evas_engine_fb_libs = @evas_engine_fb_libs@
239evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
240evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
241evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
242evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
243evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
244evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
245evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
246evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
247evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
248evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
249evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
250evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
251evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
252evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
253evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
254evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
255evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
256evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
257evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
258evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
259evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
260evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
261evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
262evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
263evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
269evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
270evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
271evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
272evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
273evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
274evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
275evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
276evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
277evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
278evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
279evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
280evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
281evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
282evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
283evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
284evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
285evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
286evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
287evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
288evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
289evas_image_loader_png_libs = @evas_image_loader_png_libs@
290evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
291evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
292evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
293evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
294evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
295evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
296evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
297evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
298evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
299evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
300evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
301evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
302exec_prefix = @exec_prefix@
303have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
304have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
305have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
306have_evas_engine_software_x11 = @have_evas_engine_software_x11@
307have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
308have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
309have_lcov = @have_lcov@
310host = @host@
311host_alias = @host_alias@
312host_cpu = @host_cpu@
313host_os = @host_os@
314host_vendor = @host_vendor@
315htmldir = @htmldir@
316includedir = @includedir@
317infodir = @infodir@
318install_sh = @install_sh@
319libdir = @libdir@
320libexecdir = @libexecdir@
321localedir = @localedir@
322localstatedir = @localstatedir@
323lt_ECHO = @lt_ECHO@
324lt_enable_auto_import = @lt_enable_auto_import@
325mandir = @mandir@
326mkdir_p = @mkdir_p@
327oldincludedir = @oldincludedir@
328pdfdir = @pdfdir@
329pkgconfig_requires_private = @pkgconfig_requires_private@
330prefix = @prefix@
331program_transform_name = @program_transform_name@
332psdir = @psdir@
333pthread_cflags = @pthread_cflags@
334pthread_libs = @pthread_libs@
335release_info = @release_info@
336requirement_evas = @requirement_evas@
337sbindir = @sbindir@
338sharedstatedir = @sharedstatedir@
339srcdir = @srcdir@
340sysconfdir = @sysconfdir@
341target_alias = @target_alias@
342top_build_prefix = @top_build_prefix@
343top_builddir = @top_builddir@
344top_srcdir = @top_srcdir@
345version_info = @version_info@
346MAINTAINERCLEANFILES = Makefile.in
347EXTRA_DIST = \
348op_mask_color_.c \
349op_mask_color_i386.c \
350op_mask_mask_color_.c \
351op_mask_mask_color_i386.c \
352op_mask_pixel_.c \
353op_mask_pixel_color_.c \
354op_mask_pixel_color_i386.c \
355op_mask_pixel_i386.c \
356op_mask_pixel_mask_.c \
357op_mask_pixel_mask_i386.c
358
359all: all-am
360
361.SUFFIXES:
362$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
363 @for dep in $?; do \
364 case '$(am__configure_deps)' in \
365 *$$dep*) \
366 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
367 && { if test -f $@; then exit 0; else break; fi; }; \
368 exit 1;; \
369 esac; \
370 done; \
371 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile'; \
372 $(am__cd) $(top_srcdir) && \
373 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mask/Makefile
374.PRECIOUS: Makefile
375Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
376 @case '$?' in \
377 *config.status*) \
378 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
379 *) \
380 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
381 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
382 esac;
383
384$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
385 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
386
387$(top_srcdir)/configure: $(am__configure_deps)
388 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
389$(ACLOCAL_M4): $(am__aclocal_m4_deps)
390 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
391$(am__aclocal_m4_deps):
392
393mostlyclean-libtool:
394 -rm -f *.lo
395
396clean-libtool:
397 -rm -rf .libs _libs
398tags: TAGS
399TAGS:
400
401ctags: CTAGS
402CTAGS:
403
404
405distdir: $(DISTFILES)
406 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
407 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
408 list='$(DISTFILES)'; \
409 dist_files=`for file in $$list; do echo $$file; done | \
410 sed -e "s|^$$srcdirstrip/||;t" \
411 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
412 case $$dist_files in \
413 */*) $(MKDIR_P) `echo "$$dist_files" | \
414 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
415 sort -u` ;; \
416 esac; \
417 for file in $$dist_files; do \
418 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
419 if test -d $$d/$$file; then \
420 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
421 if test -d "$(distdir)/$$file"; then \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
425 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
426 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
427 fi; \
428 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
429 else \
430 test -f "$(distdir)/$$file" \
431 || cp -p $$d/$$file "$(distdir)/$$file" \
432 || exit 1; \
433 fi; \
434 done
435check-am: all-am
436check: check-am
437all-am: Makefile
438installdirs:
439install: install-am
440install-exec: install-exec-am
441install-data: install-data-am
442uninstall: uninstall-am
443
444install-am: all-am
445 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
446
447installcheck: installcheck-am
448install-strip:
449 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
450 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
451 `test -z '$(STRIP)' || \
452 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
453mostlyclean-generic:
454
455clean-generic:
456
457distclean-generic:
458 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
459 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
460
461maintainer-clean-generic:
462 @echo "This command is intended for maintainers to use"
463 @echo "it deletes files that may require special tools to rebuild."
464 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
465clean: clean-am
466
467clean-am: clean-generic clean-libtool mostlyclean-am
468
469distclean: distclean-am
470 -rm -f Makefile
471distclean-am: clean-am distclean-generic
472
473dvi: dvi-am
474
475dvi-am:
476
477html: html-am
478
479html-am:
480
481info: info-am
482
483info-am:
484
485install-data-am:
486
487install-dvi: install-dvi-am
488
489install-dvi-am:
490
491install-exec-am:
492
493install-html: install-html-am
494
495install-html-am:
496
497install-info: install-info-am
498
499install-info-am:
500
501install-man:
502
503install-pdf: install-pdf-am
504
505install-pdf-am:
506
507install-ps: install-ps-am
508
509install-ps-am:
510
511installcheck-am:
512
513maintainer-clean: maintainer-clean-am
514 -rm -f Makefile
515maintainer-clean-am: distclean-am maintainer-clean-generic
516
517mostlyclean: mostlyclean-am
518
519mostlyclean-am: mostlyclean-generic mostlyclean-libtool
520
521pdf: pdf-am
522
523pdf-am:
524
525ps: ps-am
526
527ps-am:
528
529uninstall-am:
530
531.MAKE: install-am install-strip
532
533.PHONY: all all-am check check-am clean clean-generic clean-libtool \
534 distclean distclean-generic distclean-libtool distdir dvi \
535 dvi-am html html-am info info-am install install-am \
536 install-data install-data-am install-dvi install-dvi-am \
537 install-exec install-exec-am install-html install-html-am \
538 install-info install-info-am install-man install-pdf \
539 install-pdf-am install-ps install-ps-am install-strip \
540 installcheck installcheck-am installdirs maintainer-clean \
541 maintainer-clean-generic mostlyclean mostlyclean-generic \
542 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
543
544
545# Tell versions [3.59,3.63) of GNU make to not export all variables.
546# Otherwise a system limit (for SysV at least) may be exceeded.
547.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 @@
1/* mask color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 c = 1 + (c >> 24);
8 for (; d < e; d++) {
9 *d = MUL_256(c, *d);
10 }
11}
12
13#define _op_mask_caa_dp _op_mask_c_dp
14
15#define _op_mask_c_dpan _op_mask_c_dp
16#define _op_mask_caa_dpan _op_mask_caa_dp
17
18static void
19init_mask_color_span_funcs_c(void)
20{
21 op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_c_dp;
22 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_caa_dp;
23
24 op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_c_dpan;
25 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_caa_dpan;
26}
27#endif
28
29#ifdef BUILD_C
30static void
31_op_mask_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
32 *d = MUL_SYM(c >> 24, *d);
33}
34
35#define _op_mask_pt_caa_dp _op_mask_pt_c_dp
36
37#define _op_mask_pt_c_dpan _op_mask_pt_c_dp
38#define _op_mask_pt_caa_dpan _op_mask_pt_caa_dp
39
40static void
41init_mask_color_pt_funcs_c(void)
42{
43 op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mask_pt_c_dp;
44 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_caa_dp;
45
46 op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_c_dpan;
47 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_caa_dpan;
48}
49#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 @@
1/* mask color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mask_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 c = 1 + (c >> 24);
8 MOV_A2R(c, mm2)
9 pxor_r2r(mm0, mm0);
10 for (; d < e; d++) {
11 MOV_P2R(*d, mm1, mm0)
12 MUL4_256_R2R(mm2, mm1)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mask_caa_dp_mmx _op_mask_c_dp_mmx
18
19#define _op_mask_c_dpan_mmx _op_mask_c_dp_mmx
20#define _op_mask_caa_dpan_mmx _op_mask_caa_dp_mmx
21
22static void
23init_mask_color_span_funcs_mmx(void)
24{
25 op_mask_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_c_dp_mmx;
26 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_caa_dp_mmx;
27
28 op_mask_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_c_dpan_mmx;
29 op_mask_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_caa_dpan_mmx;
30}
31#endif
32
33#ifdef BUILD_MMX
34static void
35_op_mask_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
36 c = 1 + (c >> 24);
37 MOV_A2R(c, mm2)
38 pxor_r2r(mm0, mm0);
39 MOV_P2R(*d, mm1, mm0)
40 MUL4_256_R2R(mm2, mm1)
41 MOV_R2P(mm1, *d, mm0)
42}
43
44#define _op_mask_pt_caa_dp_mmx _op_mask_pt_c_dp_mmx
45
46#define _op_mask_pt_c_dpan_mmx _op_mask_pt_c_dp_mmx
47#define _op_mask_pt_caa_dpan_mmx _op_mask_pt_caa_dp_mmx
48
49static void
50init_mask_color_pt_funcs_mmx(void)
51{
52 op_mask_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mask_pt_c_dp_mmx;
53 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mask_pt_caa_dp_mmx;
54
55 op_mask_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mask_pt_c_dpan_mmx;
56 op_mask_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mask_pt_caa_dpan_mmx;
57}
58#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 @@
1/* mask mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 c = 1 + (c >> 24);
8 while (d < e) {
9 l = *m;
10 switch(l)
11 {
12 case 0:
13 break;
14 case 255:
15 *d = MUL_256(c, *d);
16 break;
17 default:
18 l = 256 - (((257 - c) * l) >> 8);
19 *d = MUL_256(l, *d);
20 break;
21 }
22 m++; d++;
23 }
24}
25
26#define _op_mask_mas_caa_dp _op_mask_mas_c_dp
27
28#define _op_mask_mas_c_dpan _op_mask_mas_c_dp
29#define _op_mask_mas_caa_dpan _op_mask_mas_caa_dp
30
31static void
32init_mask_mask_color_span_funcs_c(void)
33{
34 op_mask_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_mas_c_dp;
35 op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_mas_caa_dp;
36
37 op_mask_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_mas_c_dpan;
38 op_mask_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_mas_caa_dpan;
39}
40#endif
41
42#ifdef BUILD_C
43static void
44_op_mask_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
45 c = 256 - (((256 - (c >> 24)) * m) >> 8);
46 *d = MUL_256(c, *d);
47}
48
49#define _op_mask_pt_mas_caa_dp _op_mask_pt_mas_c_dp
50
51#define _op_mask_pt_mas_c_dpan _op_mask_pt_mas_c_dp
52#define _op_mask_pt_mas_caa_dpan _op_mask_pt_mas_caa_dp
53
54static void
55init_mask_mask_color_pt_funcs_c(void)
56{
57 op_mask_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mask_pt_mas_c_dp;
58 op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mask_pt_mas_caa_dp;
59
60 op_mask_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mask_pt_mas_c_dpan;
61 op_mask_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mask_pt_mas_caa_dpan;
62}
63#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 @@
1/* mask mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_mask_mask_color_span_funcs_mmx(void)
6{}
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_mask_mask_color_pt_funcs_mmx(void)
12{}
13#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 @@
1/* mask pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 for (; d < e; d++, s++) {
8 *d = MUL_SYM(*s >> 24, *d);
9 }
10}
11
12#define _op_mask_pas_dp _op_mask_p_dp
13
14#define _op_mask_p_dpan _op_mask_p_dp
15#define _op_mask_pas_dpan _op_mask_pas_dp
16
17static void
18init_mask_pixel_span_funcs_c(void)
19{
20 op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_p_dp;
21 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pas_dp;
22
23 op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_p_dpan;
24 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pas_dpan;
25}
26#endif
27
28#ifdef BUILD_C
29static void
30_op_mask_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
31 *d = MUL_SYM(s >> 24, *d);
32}
33
34#define _op_mask_pt_pas_dp _op_mask_pt_p_dp
35
36#define _op_mask_pt_p_dpan _op_mask_pt_p_dp
37#define _op_mask_pt_pas_dpan _op_mask_pt_pas_dp
38
39static void
40init_mask_pixel_pt_funcs_c(void)
41{
42 op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_p_dp;
43 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mask_pt_pas_dp;
44
45 op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_dpan;
46 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_dpan;
47}
48#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 @@
1/* mask pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 l = 1 + (c >> 24);
8 while (d < e) {
9 c = 1 + ((l * (*s >> 24)) >> 8);
10 *d = MUL_256(c, *d);
11 s++; d++;
12 }
13}
14
15#define _op_mask_pas_c_dp _op_mask_p_c_dp
16#define _op_mask_pan_c_dp _op_mask_p_c_dp
17#define _op_mask_p_can_dp _op_mask_p_c_dp
18#define _op_mask_pas_can_dp _op_mask_p_c_dp
19#define _op_mask_p_caa_dp _op_mask_p_c_dp
20#define _op_mask_pas_caa_dp _op_mask_p_c_dp
21#define _op_mask_pan_caa_dp _op_mask_p_c_dp
22
23#define _op_mask_p_c_dpan _op_mask_p_c_dp
24#define _op_mask_pas_c_dpan _op_mask_p_c_dp
25#define _op_mask_pan_c_dpan _op_mask_p_c_dp
26#define _op_mask_p_can_dpan _op_mask_p_c_dp
27#define _op_mask_pas_can_dpan _op_mask_p_c_dp
28#define _op_mask_p_caa_dpan _op_mask_p_c_dp
29#define _op_mask_pas_caa_dpan _op_mask_p_c_dp
30#define _op_mask_pan_caa_dpan _op_mask_p_c_dp
31
32static void
33init_mask_pixel_color_span_funcs_c(void)
34{
35 op_mask_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_p_c_dp;
36 op_mask_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pas_c_dp;
37 op_mask_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pan_c_dp;
38 op_mask_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_p_can_dp;
39 op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pas_can_dp;
40 op_mask_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_p_caa_dp;
41 op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pas_caa_dp;
42 op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pan_caa_dp;
43
44 op_mask_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_p_c_dpan;
45 op_mask_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pas_c_dpan;
46 op_mask_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pan_c_dpan;
47 op_mask_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_p_can_dpan;
48 op_mask_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pas_can_dpan;
49 op_mask_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_p_caa_dpan;
50 op_mask_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pas_caa_dpan;
51 op_mask_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pan_caa_dpan;
52}
53#endif
54
55#ifdef BUILD_C
56static void
57_op_mask_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
58 c = 1 + ((((c >> 24) * (s >> 24)) + 255) >> 8);
59 *d = MUL_256(c, *d);
60}
61
62#define _op_mask_pt_pas_c_dp _op_mask_pt_p_c_dp
63#define _op_mask_pt_pan_c_dp _op_mask_pt_p_c_dp
64#define _op_mask_pt_p_can_dp _op_mask_pt_p_c_dp
65#define _op_mask_pt_pas_can_dp _op_mask_pt_p_c_dp
66#define _op_mask_pt_p_caa_dp _op_mask_pt_p_c_dp
67#define _op_mask_pt_pas_caa_dp _op_mask_pt_p_c_dp
68#define _op_mask_pt_pan_caa_dp _op_mask_pt_p_c_dp
69
70#define _op_mask_pt_p_c_dpan _op_mask_pt_p_c_dp
71#define _op_mask_pt_pas_c_dpan _op_mask_pt_p_c_dp
72#define _op_mask_pt_pan_c_dpan _op_mask_pt_p_c_dp
73#define _op_mask_pt_p_can_dpan _op_mask_pt_p_c_dp
74#define _op_mask_pt_pas_can_dpan _op_mask_pt_p_c_dp
75#define _op_mask_pt_p_caa_dpan _op_mask_pt_p_c_dp
76#define _op_mask_pt_pas_caa_dpan _op_mask_pt_p_c_dp
77#define _op_mask_pt_pan_caa_dpan _op_mask_pt_p_c_dp
78
79static void
80init_mask_pixel_color_pt_funcs_c(void)
81{
82 op_mask_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mask_pt_p_c_dp;
83 op_mask_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mask_pt_pas_c_dp;
84 op_mask_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mask_pt_pan_c_dp;
85 op_mask_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_p_can_dp;
86 op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mask_pt_pas_can_dp;
87 op_mask_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_p_caa_dp;
88 op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pas_caa_dp;
89 op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mask_pt_pan_caa_dp;
90
91 op_mask_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_p_c_dpan;
92 op_mask_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pas_c_dpan;
93 op_mask_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mask_pt_pan_c_dpan;
94 op_mask_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_p_can_dpan;
95 op_mask_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mask_pt_pas_can_dpan;
96 op_mask_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_p_caa_dpan;
97 op_mask_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pas_caa_dpan;
98 op_mask_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mask_pt_pan_caa_dpan;
99}
100#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 @@
1/* mask pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_mask_pixel_color_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_mask_pixel_color_pt_funcs_mmx(void)
12{ }
13#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 @@
1/* mask pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mask_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_255, mm5)
8 pxor_r2r(mm0, mm0);
9 for (; d < e; d++) {
10 MOV_P2R(*d, mm1, mm0)
11 MOV_PA2R(*s, mm2)
12 MUL4_SYM_R2R(mm2, mm1, mm5)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mask_pas_dp_mmx _op_mask_p_dp_mmx
18
19#define _op_mask_p_dpan_mmx _op_mask_p_dp_mmx
20#define _op_mask_pas_dpan_mmx _op_mask_pas_dp_mmx
21
22static void
23init_mask_pixel_span_funcs_mmx(void)
24{
25 op_mask_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_p_dp_mmx;
26 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pas_dp_mmx;
27
28 op_mask_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_p_dpan_mmx;
29 op_mask_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pas_dpan_mmx;
30}
31#endif
32
33#ifdef BUILD_MMX
34static void
35_op_mask_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
36 MOV_A2R(ALPHA_255, mm5)
37 pxor_r2r(mm0, mm0);
38 MOV_P2R(*d, mm1, mm0)
39 MOV_PA2R(s, mm2)
40 MUL4_SYM_R2R(mm2, mm1, mm5)
41 MOV_R2P(mm1, *d, mm0)
42}
43
44#define _op_mask_pt_pas_dp_mmx _op_mask_pt_p_dp_mmx
45
46#define _op_mask_pt_p_dpan_mmx _op_mask_pt_p_dp_mmx
47#define _op_mask_pt_pas_dpan_mmx _op_mask_pt_pas_dp_mmx
48
49static void
50init_mask_pixel_pt_funcs_mmx(void)
51{
52 op_mask_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_p_dp_mmx;
53 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mask_pt_pas_dp_mmx;
54
55 op_mask_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_p_dpan_mmx;
56 op_mask_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mask_pt_pas_dpan_mmx;
57}
58#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 @@
1/* mask pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mask_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 while (d < e) {
8 l = *m;
9 switch(l)
10 {
11 case 0:
12 break;
13 case 255:
14 *d = MUL_SYM(*s >> 24, *d);
15 break;
16 default:
17 l = 256 - (((256 - (*s >> 24)) * l) >> 8);
18 *d = MUL_256(l, *d);
19 break;
20 }
21 m++; s++; d++;
22 }
23}
24
25#define _op_mask_pas_mas_dp _op_mask_p_mas_dp
26
27#define _op_mask_p_mas_dpan _op_mask_p_mas_dp
28#define _op_mask_pas_mas_dpan _op_mask_pas_mas_dp
29
30static void
31init_mask_pixel_mask_span_funcs_c(void)
32{
33 op_mask_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_p_mas_dp;
34 op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pas_mas_dp;
35
36 op_mask_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_p_mas_dpan;
37 op_mask_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pas_mas_dpan;
38}
39#endif
40
41#ifdef BUILD_C
42static void
43_op_mask_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
44 s = 256 - (((256 - (s >> 24)) * m) >> 8);
45 *d = MUL_256(s, *d);
46}
47
48#define _op_mask_pt_pas_mas_dp _op_mask_pt_p_mas_dp
49
50#define _op_mask_pt_p_mas_dpan _op_mask_pt_p_mas_dp
51#define _op_mask_pt_pas_mas_dpan _op_mask_pt_pas_mas_dp
52
53static void
54init_mask_pixel_mask_pt_funcs_c(void)
55{
56 op_mask_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_p_mas_dp;
57 op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mask_pt_pas_mas_dp;
58
59 op_mask_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_p_mas_dpan;
60 op_mask_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mask_pt_pas_mas_dpan;
61}
62#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 @@
1/* mask pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_mask_pixel_mask_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_mask_pixel_mask_pt_funcs_mmx(void)
12{ }
13#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 @@
1#include "evas_common.h"
2
3static RGBA_Gfx_Func op_mask_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4static RGBA_Gfx_Pt_Func op_mask_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_mask_init(void);
7static void op_mask_shutdown(void);
8
9static RGBA_Gfx_Func op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_mask = { "mask",
22 op_mask_init, op_mask_shutdown,
23 op_mask_pixel_span_get, op_mask_color_span_get,
24 op_mask_pixel_color_span_get, op_mask_mask_color_span_get,
25 op_mask_pixel_mask_span_get,
26 op_mask_pixel_pt_get, op_mask_color_pt_get,
27 op_mask_pixel_color_pt_get, op_mask_mask_color_pt_get,
28 op_mask_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_mask_get(void)
33{
34 return &(_composite_mask);
35}
36
37
38# include "./evas_op_mask/op_mask_pixel_.c"
39# include "./evas_op_mask/op_mask_color_.c"
40# include "./evas_op_mask/op_mask_pixel_color_.c"
41# include "./evas_op_mask/op_mask_pixel_mask_.c"
42# include "./evas_op_mask/op_mask_mask_color_.c"
43//# include "./evas_op_mask/op_mask_pixel_mask_color_.c"
44
45# include "./evas_op_mask/op_mask_pixel_i386.c"
46# include "./evas_op_mask/op_mask_color_i386.c"
47# include "./evas_op_mask/op_mask_pixel_color_i386.c"
48# include "./evas_op_mask/op_mask_pixel_mask_i386.c"
49# include "./evas_op_mask/op_mask_mask_color_i386.c"
50//# include "./evas_op_mask/op_mask_pixel_mask_color_i386.c"
51
52
53static void
54op_mask_init(void)
55{
56 memset(op_mask_span_funcs, 0, sizeof(op_mask_span_funcs));
57 memset(op_mask_pt_funcs, 0, sizeof(op_mask_pt_funcs));
58#ifdef BUILD_MMX
59 init_mask_pixel_span_funcs_mmx();
60 init_mask_pixel_color_span_funcs_mmx();
61 init_mask_pixel_mask_span_funcs_mmx();
62 init_mask_color_span_funcs_mmx();
63 init_mask_mask_color_span_funcs_mmx();
64
65 init_mask_pixel_pt_funcs_mmx();
66 init_mask_pixel_color_pt_funcs_mmx();
67 init_mask_pixel_mask_pt_funcs_mmx();
68 init_mask_color_pt_funcs_mmx();
69 init_mask_mask_color_pt_funcs_mmx();
70#endif
71#ifdef BUILD_C
72 init_mask_pixel_span_funcs_c();
73 init_mask_pixel_color_span_funcs_c();
74 init_mask_pixel_mask_span_funcs_c();
75 init_mask_color_span_funcs_c();
76 init_mask_mask_color_span_funcs_c();
77
78 init_mask_pixel_pt_funcs_c();
79 init_mask_pixel_color_pt_funcs_c();
80 init_mask_pixel_mask_pt_funcs_c();
81 init_mask_color_pt_funcs_c();
82 init_mask_mask_color_pt_funcs_c();
83#endif
84}
85
86static void
87op_mask_shutdown(void)
88{
89}
90
91static RGBA_Gfx_Func
92mask_gfx_span_func_cpu(int s, int m, int c, int d)
93{
94 RGBA_Gfx_Func func = NULL;
95 int cpu = CPU_N;
96#ifdef BUILD_MMX
97 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
98 {
99 cpu = CPU_MMX;
100 func = op_mask_span_funcs[s][m][c][d][cpu];
101 if (func) return func;
102 }
103#endif
104#ifdef BUILD_C
105 cpu = CPU_C;
106 func = op_mask_span_funcs[s][m][c][d][cpu];
107 if (func) return func;
108#endif
109 return func;
110}
111
112static RGBA_Gfx_Func
113op_mask_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
114{
115 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
116
117 if (src && src->cache_entry.flags.alpha)
118 {
119 dst->cache_entry.flags.alpha = 1;
120 s = SP;
121 }
122 if (dst && dst->cache_entry.flags.alpha)
123 d = DP;
124 return mask_gfx_span_func_cpu(s, m, c, d);
125}
126
127static RGBA_Gfx_Func
128op_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
129{
130 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
131
132 if ((col >> 24) < 255)
133 {
134 if (dst)
135 dst->cache_entry.flags.alpha = 1;
136 c = SC;
137 }
138 if (col == (col | 0x00ffffff))
139 c = SC_AA;
140 if (col == 0xffffffff)
141 c = SC_N;
142 if (dst && dst->cache_entry.flags.alpha)
143 d = DP;
144 return mask_gfx_span_func_cpu(s, m, c, d);
145}
146
147static RGBA_Gfx_Func
148op_mask_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
149{
150 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
151
152 if (src && src->cache_entry.flags.alpha)
153 {
154 if (dst)
155 dst->cache_entry.flags.alpha = 1;
156 s = SP;
157 }
158 if ((col >> 24) < 255)
159 {
160 if (dst)
161 dst->cache_entry.flags.alpha = 1;
162 c = SC;
163 }
164 if (col == (col | 0x00ffffff))
165 c = SC_AA;
166 if (col == 0xffffffff)
167 c = SC_N;
168 if (dst && dst->cache_entry.flags.alpha)
169 d = DP;
170 return mask_gfx_span_func_cpu(s, m, c, d);
171}
172
173static RGBA_Gfx_Func
174op_mask_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
175{
176 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
177
178 if (dst)
179 dst->cache_entry.flags.alpha = 1;
180 if ((col >> 24) < 255)
181 c = SC;
182 if (col == (col | 0x00ffffff))
183 c = SC_AA;
184 if (col == 0xffffffff)
185 c = SC_N;
186 return mask_gfx_span_func_cpu(s, m, c, d);
187}
188
189static RGBA_Gfx_Func
190op_mask_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
191{
192 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
193
194 if (dst)
195 dst->cache_entry.flags.alpha = 1;
196 if (src && src->cache_entry.flags.alpha)
197 s = SP;
198 return mask_gfx_span_func_cpu(s, m, c, d);
199}
200
201static RGBA_Gfx_Pt_Func
202mask_gfx_pt_func_cpu(int s, int m, int c, int d)
203{
204 RGBA_Gfx_Pt_Func func = NULL;
205 int cpu = CPU_N;
206#ifdef BUILD_MMX
207 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
208 {
209 cpu = CPU_MMX;
210 func = op_mask_pt_funcs[s][m][c][d][cpu];
211 if (func) return func;
212 }
213#endif
214#ifdef BUILD_C
215 cpu = CPU_C;
216 func = op_mask_pt_funcs[s][m][c][d][cpu];
217 if (func) return func;
218#endif
219 return func;
220}
221
222static RGBA_Gfx_Pt_Func
223op_mask_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
224{
225 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
226
227 if (src_flags.alpha)
228 {
229 dst->cache_entry.flags.alpha = 1;
230 s = SP;
231 }
232 if (dst && dst->cache_entry.flags.alpha)
233 d = DP;
234 return mask_gfx_pt_func_cpu(s, m, c, d);
235}
236
237static RGBA_Gfx_Pt_Func
238op_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
239{
240 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
241
242 if ((col >> 24) < 255)
243 {
244 if (dst)
245 dst->cache_entry.flags.alpha = 1;
246 c = SC;
247 }
248 if (col == (col | 0x00ffffff))
249 c = SC_AA;
250 if (col == 0xffffffff)
251 c = SC_N;
252 if (dst && dst->cache_entry.flags.alpha)
253 d = DP;
254 return mask_gfx_pt_func_cpu(s, m, c, d);
255}
256
257static RGBA_Gfx_Pt_Func
258op_mask_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
259{
260 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
261
262 if (src_flags.alpha)
263 {
264 if (dst)
265 dst->cache_entry.flags.alpha = 1;
266 s = SP;
267 }
268 if ((col >> 24) < 255)
269 {
270 if (dst)
271 dst->cache_entry.flags.alpha = 1;
272 c = SC;
273 }
274 if (col == (col | 0x00ffffff))
275 c = SC_AA;
276 if (col == 0xffffffff)
277 c = SC_N;
278 if (dst && dst->cache_entry.flags.alpha)
279 d = DP;
280 return mask_gfx_pt_func_cpu(s, m, c, d);
281}
282
283static RGBA_Gfx_Pt_Func
284op_mask_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
285{
286 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
287
288 if (dst)
289 dst->cache_entry.flags.alpha = 1;
290 if ((col >> 24) < 255)
291 c = SC;
292 if (col == (col | 0x00ffffff))
293 c = SC_AA;
294 if (col == 0xffffffff)
295 c = SC_N;
296 return mask_gfx_pt_func_cpu(s, m, c, d);
297}
298
299static RGBA_Gfx_Pt_Func
300op_mask_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
301{
302 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
303
304 if (dst)
305 dst->cache_entry.flags.alpha = 1;
306 if (src_flags.alpha)
307 s = SP;
308 return mask_gfx_pt_func_cpu(s, m, c, d);
309}
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_mul_color_.c \
5op_mul_color_i386.c \
6op_mul_mask_color_.c \
7op_mul_mask_color_i386.c \
8op_mul_pixel_.c \
9op_mul_pixel_color_.c \
10op_mul_pixel_color_i386.c \
11op_mul_pixel_i386.c \
12op_mul_pixel_mask_.c \
13op_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_mul
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
120EXOTIC_LIBS = @EXOTIC_LIBS@
121FGREP = @FGREP@
122FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
123FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
124FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
125FREETYPE_LIBS = @FREETYPE_LIBS@
126FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
127FRIBIDI_LIBS = @FRIBIDI_LIBS@
128GL_EET_CFLAGS = @GL_EET_CFLAGS@
129GL_EET_LIBS = @GL_EET_LIBS@
130GREP = @GREP@
131HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
132HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
133INSTALL = @INSTALL@
134INSTALL_DATA = @INSTALL_DATA@
135INSTALL_PROGRAM = @INSTALL_PROGRAM@
136INSTALL_SCRIPT = @INSTALL_SCRIPT@
137INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
138LD = @LD@
139LDFLAGS = @LDFLAGS@
140LIBOBJS = @LIBOBJS@
141LIBS = @LIBS@
142LIBTOOL = @LIBTOOL@
143LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
144LINEBREAK_LIBS = @LINEBREAK_LIBS@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MKDIR_P = @MKDIR_P@
150MODULE_ARCH = @MODULE_ARCH@
151NM = @NM@
152NMEDIT = @NMEDIT@
153OBJC = @OBJC@
154OBJCDEPMODE = @OBJCDEPMODE@
155OBJCFLAGS = @OBJCFLAGS@
156OBJDUMP = @OBJDUMP@
157OBJEXT = @OBJEXT@
158OTOOL = @OTOOL@
159OTOOL64 = @OTOOL64@
160PACKAGE = @PACKAGE@
161PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162PACKAGE_NAME = @PACKAGE_NAME@
163PACKAGE_STRING = @PACKAGE_STRING@
164PACKAGE_TARNAME = @PACKAGE_TARNAME@
165PACKAGE_URL = @PACKAGE_URL@
166PACKAGE_VERSION = @PACKAGE_VERSION@
167PATH_SEPARATOR = @PATH_SEPARATOR@
168PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
169PIXMAN_LIBS = @PIXMAN_LIBS@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173PNG_CFLAGS = @PNG_CFLAGS@
174PNG_LIBS = @PNG_LIBS@
175RANLIB = @RANLIB@
176SDL_CFLAGS = @SDL_CFLAGS@
177SDL_LIBS = @SDL_LIBS@
178SED = @SED@
179SET_MAKE = @SET_MAKE@
180SHELL = @SHELL@
181SHM_OPEN_LINK = @SHM_OPEN_LINK@
182STRIP = @STRIP@
183SVG_CFLAGS = @SVG_CFLAGS@
184SVG_LIBS = @SVG_LIBS@
185VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
186VALGRIND_LIBS = @VALGRIND_LIBS@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
190WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
191XCB_CFLAGS = @XCB_CFLAGS@
192XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
193XCB_GL_LIBS = @XCB_GL_LIBS@
194XCB_LIBS = @XCB_LIBS@
195XEXT_CFLAGS = @XEXT_CFLAGS@
196XEXT_LIBS = @XEXT_LIBS@
197XMKMF = @XMKMF@
198X_CFLAGS = @X_CFLAGS@
199X_EXTRA_LIBS = @X_EXTRA_LIBS@
200X_LIBS = @X_LIBS@
201X_PRE_LIBS = @X_PRE_LIBS@
202abs_builddir = @abs_builddir@
203abs_srcdir = @abs_srcdir@
204abs_top_builddir = @abs_top_builddir@
205abs_top_srcdir = @abs_top_srcdir@
206ac_ct_CC = @ac_ct_CC@
207ac_ct_CXX = @ac_ct_CXX@
208ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
209ac_ct_OBJC = @ac_ct_OBJC@
210altivec_cflags = @altivec_cflags@
211am__include = @am__include@
212am__leading_dot = @am__leading_dot@
213am__quote = @am__quote@
214am__tar = @am__tar@
215am__untar = @am__untar@
216bindir = @bindir@
217build = @build@
218build_alias = @build_alias@
219build_cpu = @build_cpu@
220build_os = @build_os@
221build_vendor = @build_vendor@
222builddir = @builddir@
223datadir = @datadir@
224datarootdir = @datarootdir@
225dlopen_libs = @dlopen_libs@
226docdir = @docdir@
227dvidir = @dvidir@
228edje_cc = @edje_cc@
229efl_doxygen = @efl_doxygen@
230efl_have_doxygen = @efl_have_doxygen@
231evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
232evas_engine_buffer_libs = @evas_engine_buffer_libs@
233evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
234evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
235evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
236evas_engine_directfb_libs = @evas_engine_directfb_libs@
237evas_engine_fb_cflags = @evas_engine_fb_cflags@
238evas_engine_fb_libs = @evas_engine_fb_libs@
239evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
240evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
241evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
242evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
243evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
244evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
245evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
246evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
247evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
248evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
249evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
250evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
251evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
252evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
253evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
254evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
255evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
256evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
257evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
258evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
259evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
260evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
261evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
262evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
263evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
269evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
270evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
271evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
272evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
273evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
274evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
275evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
276evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
277evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
278evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
279evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
280evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
281evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
282evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
283evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
284evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
285evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
286evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
287evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
288evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
289evas_image_loader_png_libs = @evas_image_loader_png_libs@
290evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
291evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
292evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
293evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
294evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
295evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
296evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
297evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
298evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
299evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
300evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
301evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
302exec_prefix = @exec_prefix@
303have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
304have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
305have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
306have_evas_engine_software_x11 = @have_evas_engine_software_x11@
307have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
308have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
309have_lcov = @have_lcov@
310host = @host@
311host_alias = @host_alias@
312host_cpu = @host_cpu@
313host_os = @host_os@
314host_vendor = @host_vendor@
315htmldir = @htmldir@
316includedir = @includedir@
317infodir = @infodir@
318install_sh = @install_sh@
319libdir = @libdir@
320libexecdir = @libexecdir@
321localedir = @localedir@
322localstatedir = @localstatedir@
323lt_ECHO = @lt_ECHO@
324lt_enable_auto_import = @lt_enable_auto_import@
325mandir = @mandir@
326mkdir_p = @mkdir_p@
327oldincludedir = @oldincludedir@
328pdfdir = @pdfdir@
329pkgconfig_requires_private = @pkgconfig_requires_private@
330prefix = @prefix@
331program_transform_name = @program_transform_name@
332psdir = @psdir@
333pthread_cflags = @pthread_cflags@
334pthread_libs = @pthread_libs@
335release_info = @release_info@
336requirement_evas = @requirement_evas@
337sbindir = @sbindir@
338sharedstatedir = @sharedstatedir@
339srcdir = @srcdir@
340sysconfdir = @sysconfdir@
341target_alias = @target_alias@
342top_build_prefix = @top_build_prefix@
343top_builddir = @top_builddir@
344top_srcdir = @top_srcdir@
345version_info = @version_info@
346MAINTAINERCLEANFILES = Makefile.in
347EXTRA_DIST = \
348op_mul_color_.c \
349op_mul_color_i386.c \
350op_mul_mask_color_.c \
351op_mul_mask_color_i386.c \
352op_mul_pixel_.c \
353op_mul_pixel_color_.c \
354op_mul_pixel_color_i386.c \
355op_mul_pixel_i386.c \
356op_mul_pixel_mask_.c \
357op_mul_pixel_mask_i386.c
358
359all: all-am
360
361.SUFFIXES:
362$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
363 @for dep in $?; do \
364 case '$(am__configure_deps)' in \
365 *$$dep*) \
366 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
367 && { if test -f $@; then exit 0; else break; fi; }; \
368 exit 1;; \
369 esac; \
370 done; \
371 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile'; \
372 $(am__cd) $(top_srcdir) && \
373 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_mul/Makefile
374.PRECIOUS: Makefile
375Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
376 @case '$?' in \
377 *config.status*) \
378 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
379 *) \
380 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
381 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
382 esac;
383
384$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
385 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
386
387$(top_srcdir)/configure: $(am__configure_deps)
388 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
389$(ACLOCAL_M4): $(am__aclocal_m4_deps)
390 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
391$(am__aclocal_m4_deps):
392
393mostlyclean-libtool:
394 -rm -f *.lo
395
396clean-libtool:
397 -rm -rf .libs _libs
398tags: TAGS
399TAGS:
400
401ctags: CTAGS
402CTAGS:
403
404
405distdir: $(DISTFILES)
406 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
407 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
408 list='$(DISTFILES)'; \
409 dist_files=`for file in $$list; do echo $$file; done | \
410 sed -e "s|^$$srcdirstrip/||;t" \
411 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
412 case $$dist_files in \
413 */*) $(MKDIR_P) `echo "$$dist_files" | \
414 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
415 sort -u` ;; \
416 esac; \
417 for file in $$dist_files; do \
418 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
419 if test -d $$d/$$file; then \
420 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
421 if test -d "$(distdir)/$$file"; then \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
425 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
426 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
427 fi; \
428 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
429 else \
430 test -f "$(distdir)/$$file" \
431 || cp -p $$d/$$file "$(distdir)/$$file" \
432 || exit 1; \
433 fi; \
434 done
435check-am: all-am
436check: check-am
437all-am: Makefile
438installdirs:
439install: install-am
440install-exec: install-exec-am
441install-data: install-data-am
442uninstall: uninstall-am
443
444install-am: all-am
445 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
446
447installcheck: installcheck-am
448install-strip:
449 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
450 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
451 `test -z '$(STRIP)' || \
452 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
453mostlyclean-generic:
454
455clean-generic:
456
457distclean-generic:
458 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
459 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
460
461maintainer-clean-generic:
462 @echo "This command is intended for maintainers to use"
463 @echo "it deletes files that may require special tools to rebuild."
464 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
465clean: clean-am
466
467clean-am: clean-generic clean-libtool mostlyclean-am
468
469distclean: distclean-am
470 -rm -f Makefile
471distclean-am: clean-am distclean-generic
472
473dvi: dvi-am
474
475dvi-am:
476
477html: html-am
478
479html-am:
480
481info: info-am
482
483info-am:
484
485install-data-am:
486
487install-dvi: install-dvi-am
488
489install-dvi-am:
490
491install-exec-am:
492
493install-html: install-html-am
494
495install-html-am:
496
497install-info: install-info-am
498
499install-info-am:
500
501install-man:
502
503install-pdf: install-pdf-am
504
505install-pdf-am:
506
507install-ps: install-ps-am
508
509install-ps-am:
510
511installcheck-am:
512
513maintainer-clean: maintainer-clean-am
514 -rm -f Makefile
515maintainer-clean-am: distclean-am maintainer-clean-generic
516
517mostlyclean: mostlyclean-am
518
519mostlyclean-am: mostlyclean-generic mostlyclean-libtool
520
521pdf: pdf-am
522
523pdf-am:
524
525ps: ps-am
526
527ps-am:
528
529uninstall-am:
530
531.MAKE: install-am install-strip
532
533.PHONY: all all-am check check-am clean clean-generic clean-libtool \
534 distclean distclean-generic distclean-libtool distdir dvi \
535 dvi-am html html-am info info-am install install-am \
536 install-data install-data-am install-dvi install-dvi-am \
537 install-exec install-exec-am install-html install-html-am \
538 install-info install-info-am install-man install-pdf \
539 install-pdf-am install-ps install-ps-am install-strip \
540 installcheck installcheck-am installdirs maintainer-clean \
541 maintainer-clean-generic mostlyclean mostlyclean-generic \
542 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
543
544
545# Tell versions [3.59,3.63) of GNU make to not export all variables.
546# Otherwise a system limit (for SysV at least) may be exceeded.
547.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 @@
1/* mul color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_c_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 for (; d < e; d++) {
8 *d = MUL4_SYM(c, *d);
9 }
10}
11
12static void
13_op_mul_caa_dp(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
14 DATA32 *e = d + l;
15 c = 1 + (c >> 24);
16 for (; d < e; d++) {
17 *d = MUL_256(c, *d);
18 }
19}
20
21#define _op_mul_can_dp _op_mul_c_dp
22
23#define _op_mul_c_dpan _op_mul_c_dp
24#define _op_mul_can_dpan _op_mul_can_dp
25#define _op_mul_caa_dpan _op_mul_caa_dp
26
27static void
28init_mul_color_span_funcs_c(void)
29{
30 op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_c_dp;
31 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_can_dp;
32 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_caa_dp;
33
34 op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_c_dpan;
35 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_can_dpan;
36 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_caa_dpan;
37}
38#endif
39
40#ifdef BUILD_C
41static void
42_op_mul_pt_c_dp(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
43 *d = MUL4_SYM(c, *d);
44}
45
46#define _op_mul_pt_can_dp _op_mul_pt_c_dp
47#define _op_mul_pt_caa_dp _op_mul_pt_c_dp
48
49#define _op_mul_pt_c_dpan _op_mul_pt_c_dp
50#define _op_mul_pt_can_dpan _op_mul_pt_can_dp
51#define _op_mul_pt_caa_dpan _op_mul_pt_caa_dp
52
53static void
54init_mul_color_pt_funcs_c(void)
55{
56 op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_C] = _op_mul_pt_c_dp;
57 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_can_dp;
58 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_caa_dp;
59
60 op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_c_dpan;
61 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_can_dpan;
62 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_caa_dpan;
63}
64#endif
65
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 @@
1/* mul color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_255, mm5)
9 MOV_P2R(c, mm2, mm0)
10 for (; d < e; d++) {
11 MOV_P2R(*d, mm1, mm0)
12 MUL4_SYM_R2R(mm2, mm1, mm5)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mul_can_dp_mmx _op_mul_c_dp_mmx
18#define _op_mul_caa_dp_mmx _op_mul_c_dp_mmx
19
20#define _op_mul_c_dpan_mmx _op_mul_c_dp_mmx
21#define _op_mul_can_dpan_mmx _op_mul_can_dp_mmx
22#define _op_mul_caa_dpan_mmx _op_mul_caa_dp_mmx
23
24static void
25init_mul_color_span_funcs_mmx(void)
26{
27 op_mul_span_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_c_dp_mmx;
28 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_can_dp_mmx;
29 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_caa_dp_mmx;
30
31 op_mul_span_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_c_dpan_mmx;
32 op_mul_span_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_can_dpan_mmx;
33 op_mul_span_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_caa_dpan_mmx;
34}
35#endif
36
37#ifdef BUILD_MMX
38static void
39_op_mul_pt_c_dp_mmx(DATA32 s __UNUSED__, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
40 pxor_r2r(mm0, mm0);
41 MOV_A2R(ALPHA_255, mm5)
42 MOV_P2R(c, mm2, mm0)
43 MOV_P2R(*d, mm1, mm0)
44 MUL4_SYM_R2R(mm2, mm1, mm5)
45 MOV_R2P(mm1, *d, mm0)
46}
47
48#define _op_mul_pt_caa_dp_mmx _op_mul_pt_c_dp_mmx
49#define _op_mul_pt_can_dp_mmx _op_mul_pt_c_dp_mmx
50
51#define _op_mul_pt_c_dpan_mmx _op_mul_pt_c_dp_mmx
52#define _op_mul_pt_can_dpan_mmx _op_mul_pt_can_dp_mmx
53#define _op_mul_pt_caa_dpan_mmx _op_mul_pt_caa_dp_mmx
54
55static void
56init_mul_color_pt_funcs_mmx(void)
57{
58 op_mul_pt_funcs[SP_N][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_c_dp_mmx;
59 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_can_dp_mmx;
60 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_caa_dp_mmx;
61
62 op_mul_pt_funcs[SP_N][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_c_dpan_mmx;
63 op_mul_pt_funcs[SP_N][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_can_dpan_mmx;
64 op_mul_pt_funcs[SP_N][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_caa_dpan_mmx;
65}
66#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 @@
1/* mul mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_mas_c_dp(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l, nc = ~c;
7 while (d < e)
8 {
9 DATA32 a = *m;
10 switch(a)
11 {
12 case 0:
13 break;
14 case 255:
15 *d = MUL4_SYM(c, *d);
16 break;
17 default:
18 a = ~MUL_SYM(a, nc);
19 *d = MUL4_SYM(a, *d);
20 break;
21 }
22 m++; d++;
23 }
24}
25
26#define _op_mul_mas_can_dp _op_mul_mas_c_dp
27#define _op_mul_mas_caa_dp _op_mul_mas_c_dp
28
29#define _op_mul_mas_c_dpan _op_mul_mas_c_dp
30#define _op_mul_mas_can_dpan _op_mul_mas_can_dp
31#define _op_mul_mas_caa_dpan _op_mul_mas_caa_dp
32
33static void
34init_mul_mask_color_span_funcs_c(void)
35{
36 op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_mas_c_dp;
37 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_mas_can_dp;
38 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_mas_caa_dp;
39
40 op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_mas_c_dpan;
41 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_mas_can_dpan;
42 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_mas_caa_dpan;
43}
44#endif
45
46#ifdef BUILD_C
47static void
48_op_mul_pt_mas_c_dp(DATA32 s __UNUSED__, DATA8 m, DATA32 c, DATA32 *d) {
49 c = ~c;
50 c = ~MUL_SYM(m, c);
51 *d = MUL4_SYM(c, *d);
52}
53
54#define _op_mul_pt_mas_can_dp _op_mul_pt_mas_c_dp
55#define _op_mul_pt_mas_caa_dp _op_mul_pt_mas_c_dp
56
57#define _op_mul_pt_mas_c_dpan _op_mul_pt_mas_c_dp
58#define _op_mul_pt_mas_can_dpan _op_mul_pt_mas_can_dp
59#define _op_mul_pt_mas_caa_dpan _op_mul_pt_mas_caa_dp
60
61static void
62init_mul_mask_color_pt_funcs_c(void)
63{
64 op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_C] = _op_mul_pt_mas_c_dp;
65 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_C] = _op_mul_pt_mas_can_dp;
66 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_C] = _op_mul_pt_mas_caa_dp;
67
68 op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_C] = _op_mul_pt_mas_c_dpan;
69 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_C] = _op_mul_pt_mas_can_dpan;
70 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_C] = _op_mul_pt_mas_caa_dpan;
71}
72#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 @@
1/* mul mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_mas_c_dp_mmx(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_P2R(c, mm2, mm0)
8 c = ~c;
9 MOV_P2R(c, mm3, mm0)
10 MOV_A2R(ALPHA_255, mm5)
11 pxor_r2r(mm0, mm0);
12 while (d < e) {
13 DATA32 a = *m;
14 switch(a)
15 {
16 case 0:
17 break;
18 case 255:
19 MOV_P2R(*d, mm1, mm0)
20 MUL4_SYM_R2R(mm2, mm1, mm5)
21 MOV_R2P(mm1, *d, mm0)
22 break;
23 default:
24 a++;
25 MOV_A2R(a, mm1)
26 MUL4_256_R2R(mm3, mm1)
27 movq_r2r(mm5, mm4);
28 psubw_r2r(mm1, mm4);
29 MOV_P2R(*d, mm1, mm0)
30 MUL4_SYM_R2R(mm4, mm1, mm5)
31 MOV_R2P(mm1, *d, mm0)
32 break;
33 }
34 m++; d++;
35 }
36}
37
38#define _op_mul_mas_can_dp_mmx _op_mul_mas_c_dp_mmx
39#define _op_mul_mas_caa_dp_mmx _op_mul_mas_c_dp_mmx
40
41#define _op_mul_mas_c_dpan_mmx _op_mul_mas_c_dp_mmx
42#define _op_mul_mas_can_dpan_mmx _op_mul_mas_can_dp_mmx
43#define _op_mul_mas_caa_dpan_mmx _op_mul_mas_caa_dp_mmx
44
45static void
46init_mul_mask_color_span_funcs_mmx(void)
47{
48 op_mul_span_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_mas_c_dp_mmx;
49 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_mas_can_dp_mmx;
50 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_mas_caa_dp_mmx;
51
52 op_mul_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_mas_c_dpan_mmx;
53 op_mul_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_mas_can_dpan_mmx;
54 op_mul_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_mas_caa_dpan_mmx;
55}
56#endif
57
58#ifdef BUILD_MMX
59static void
60_op_mul_pt_mas_c_dp_mmx(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
61 s = m + 1;
62 c = ~c;
63 MOV_P2R(c, mm3, mm0)
64 MOV_A2R(ALPHA_255, mm4)
65 pxor_r2r(mm0, mm0);
66 MOV_A2R(s, mm1)
67 MUL4_256_R2R(mm3, mm1)
68 psubw_r2r(mm1, mm4);
69 MOV_P2R(*d, mm1, mm0)
70 MUL4_SYM_R2R(mm4, mm1, mm5)
71 MOV_R2P(mm1, *d, mm0)
72}
73
74#define _op_mul_pt_mas_can_dp_mmx _op_mul_pt_mas_c_dp_mmx
75#define _op_mul_pt_mas_caa_dp_mmx _op_mul_pt_mas_c_dp_mmx
76
77#define _op_mul_pt_mas_c_dpan_mmx _op_mul_pt_mas_c_dp_mmx
78#define _op_mul_pt_mas_can_dpan_mmx _op_mul_pt_mas_can_dp_mmx
79#define _op_mul_pt_mas_caa_dpan_mmx _op_mul_pt_mas_caa_dp_mmx
80
81static void
82init_mul_mask_color_pt_funcs_mmx(void)
83{
84 op_mul_pt_funcs[SP_N][SM_AS][SC][DP][CPU_MMX] = _op_mul_pt_mas_c_dp_mmx;
85 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_MMX] = _op_mul_pt_mas_can_dp_mmx;
86 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_MMX] = _op_mul_pt_mas_caa_dp_mmx;
87
88 op_mul_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_MMX] = _op_mul_pt_mas_c_dpan_mmx;
89 op_mul_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_mas_can_dpan_mmx;
90 op_mul_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_mas_caa_dpan_mmx;
91}
92#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 @@
1/* mul pixel --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_p_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 for (; d < e; d++, s++) {
8 *d = MUL4_SYM(*s, *d);
9 }
10}
11
12#define _op_mul_pas_dp _op_mul_p_dp
13#define _op_mul_pan_dp _op_mul_p_dp
14
15#define _op_mul_p_dpan _op_mul_p_dp
16#define _op_mul_pas_dpan _op_mul_pas_dp
17#define _op_mul_pan_dpan _op_mul_pan_dp
18
19static void
20init_mul_pixel_span_funcs_c(void)
21{
22 op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_p_dp;
23 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pas_dp;
24 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pan_dp;
25
26 op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_p_dpan;
27 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pas_dpan;
28 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pan_dpan;
29}
30#endif
31
32#ifdef BUILD_C
33static void
34_op_mul_pt_p_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
35 *d = MUL4_SYM(s, *d);
36}
37
38#define _op_mul_pt_pas_dp _op_mul_pt_p_dp
39#define _op_mul_pt_pan_dp _op_mul_pt_p_dp
40
41#define _op_mul_pt_p_dpan _op_mul_pt_p_dp
42#define _op_mul_pt_pan_dpan _op_mul_pt_pan_dp
43#define _op_mul_pt_pas_dpan _op_mul_pt_pas_dp
44
45static void
46init_mul_pixel_pt_funcs_c(void)
47{
48 op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_p_dp;
49 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pas_dp;
50 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_C] = _op_mul_pt_pan_dp;
51
52 op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_dpan;
53 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_dpan;
54 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_dpan;
55}
56#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 @@
1/* mul pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_p_c_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 while (d < e) {
8 DATA32 cs = MUL4_SYM(c, *s);
9 *d = MUL4_SYM(cs, *d);
10 s++; d++;
11 }
12}
13
14static void
15_op_mul_p_caa_dp(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
16 DATA32 *e = d + l;
17 c = 1 + (c >> 24);
18 while (d < e)
19 {
20 DATA32 cs = MUL_256(c, *s);
21 *d = MUL4_SYM(cs, *d);
22 s++; d++;
23 }
24}
25
26#define _op_mul_pas_c_dp _op_mul_p_c_dp
27#define _op_mul_pan_c_dp _op_mul_p_c_dp
28#define _op_mul_p_can_dp _op_mul_p_c_dp
29#define _op_mul_pas_can_dp _op_mul_p_c_dp
30#define _op_mul_pan_can_dp _op_mul_p_c_dp
31#define _op_mul_pas_caa_dp _op_mul_p_caa_dp
32#define _op_mul_pan_caa_dp _op_mul_p_caa_dp
33
34#define _op_mul_p_c_dpan _op_mul_p_c_dp
35#define _op_mul_pas_c_dpan _op_mul_pas_c_dp
36#define _op_mul_pan_c_dpan _op_mul_pan_c_dp
37#define _op_mul_p_can_dpan _op_mul_p_can_dp
38#define _op_mul_pas_can_dpan _op_mul_pas_can_dp
39#define _op_mul_pan_can_dpan _op_mul_pan_can_dp
40#define _op_mul_p_caa_dpan _op_mul_p_caa_dp
41#define _op_mul_pas_caa_dpan _op_mul_pas_caa_dp
42#define _op_mul_pan_caa_dpan _op_mul_pan_caa_dp
43
44static void
45init_mul_pixel_color_span_funcs_c(void)
46{
47 op_mul_span_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_p_c_dp;
48 op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pas_c_dp;
49 op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pan_c_dp;
50 op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_p_can_dp;
51 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pas_can_dp;
52 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pan_can_dp;
53 op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_p_caa_dp;
54 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pas_caa_dp;
55 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pan_caa_dp;
56
57 op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_p_c_dpan;
58 op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pas_c_dpan;
59 op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pan_c_dpan;
60 op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_p_can_dpan;
61 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pas_can_dpan;
62 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pan_can_dpan;
63 op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_p_caa_dpan;
64 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pas_caa_dpan;
65 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pan_caa_dpan;
66}
67#endif
68
69#ifdef BUILD_C
70static void
71_op_mul_pt_p_c_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
72 s = MUL4_SYM(c, s);
73 *d = MUL4_SYM(s, *d);
74}
75
76static void
77_op_mul_pt_p_caa_dp(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
78 s = MUL_SYM(c >> 24, s);
79 *d = MUL4_SYM(s, *d);
80}
81
82#define _op_mul_pt_pas_c_dp _op_mul_pt_p_c_dp
83#define _op_mul_pt_pan_c_dp _op_mul_pt_p_c_dp
84#define _op_mul_pt_p_can_dp _op_mul_pt_p_c_dp
85#define _op_mul_pt_pas_can_dp _op_mul_pt_p_c_dp
86#define _op_mul_pt_pan_can_dp _op_mul_pt_p_c_dp
87#define _op_mul_pt_pas_caa_dp _op_mul_pt_p_caa_dp
88#define _op_mul_pt_pan_caa_dp _op_mul_pt_p_caa_dp
89
90#define _op_mul_pt_p_c_dpan _op_mul_pt_p_c_dp
91#define _op_mul_pt_pan_c_dpan _op_mul_pt_pan_c_dp
92#define _op_mul_pt_pas_c_dpan _op_mul_pt_pas_c_dp
93#define _op_mul_pt_p_can_dpan _op_mul_pt_p_can_dp
94#define _op_mul_pt_pan_can_dpan _op_mul_pt_pan_can_dp
95#define _op_mul_pt_pas_can_dpan _op_mul_pt_pas_can_dp
96#define _op_mul_pt_p_caa_dpan _op_mul_pt_p_caa_dp
97#define _op_mul_pt_pan_caa_dpan _op_mul_pt_pan_caa_dp
98#define _op_mul_pt_pas_caa_dpan _op_mul_pt_pas_caa_dp
99static void
100init_mul_pixel_color_pt_funcs_c(void)
101{
102 op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_C] = _op_mul_pt_p_c_dp;
103 op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_C] = _op_mul_pt_pas_c_dp;
104 op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_C] = _op_mul_pt_pan_c_dp;
105 op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_p_can_dp;
106 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pas_can_dp;
107 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_C] = _op_mul_pt_pan_can_dp;
108 op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_p_caa_dp;
109 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pas_caa_dp;
110 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_C] = _op_mul_pt_pan_caa_dp;
111
112 op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_p_c_dpan;
113 op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pas_c_dpan;
114 op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_C] = _op_mul_pt_pan_c_dpan;
115 op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_p_can_dpan;
116 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pas_can_dpan;
117 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_C] = _op_mul_pt_pan_can_dpan;
118 op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_p_caa_dpan;
119 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pas_caa_dpan;
120 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_C] = _op_mul_pt_pan_caa_dpan;
121}
122#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 @@
1/* mul pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_p_c_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_255, mm5)
8 pxor_r2r(mm0, mm0);
9 MOV_P2R(c, mm2, mm0)
10 while (d < e)
11 {
12 MOV_P2R(*s, mm3, mm0)
13 MUL4_SYM_R2R(mm2, mm3, mm5)
14 MOV_P2R(*d, mm1, mm0)
15 MUL4_SYM_R2R(mm3, mm1, mm5)
16 MOV_R2P(mm1, *d, mm0)
17 s++; d++;
18 }
19}
20
21#define _op_mul_pas_c_dp_mmx _op_mul_p_c_dp_mmx
22#define _op_mul_pan_c_dp_mmx _op_mul_p_c_dp_mmx
23#define _op_mul_p_can_dp_mmx _op_mul_p_c_dp_mmx
24#define _op_mul_pas_can_dp_mmx _op_mul_p_c_dp_mmx
25#define _op_mul_pan_can_dp_mmx _op_mul_p_c_dp_mmx
26#define _op_mul_p_caa_dp_mmx _op_mul_p_c_dp_mmx
27#define _op_mul_pas_caa_dp_mmx _op_mul_p_c_dp_mmx
28#define _op_mul_pan_caa_dp_mmx _op_mul_p_c_dp_mmx
29
30#define _op_mul_p_c_dpan_mmx _op_mul_p_c_dp_mmx
31#define _op_mul_pan_c_dpan_mmx _op_mul_pan_c_dp_mmx
32#define _op_mul_pas_c_dpan_mmx _op_mul_pas_c_dp_mmx
33#define _op_mul_p_can_dpan_mmx _op_mul_p_can_dp_mmx
34#define _op_mul_pan_can_dpan_mmx _op_mul_pan_can_dp_mmx
35#define _op_mul_pas_can_dpan_mmx _op_mul_pas_can_dp_mmx
36#define _op_mul_p_caa_dpan_mmx _op_mul_p_caa_dp_mmx
37#define _op_mul_pan_caa_dpan_mmx _op_mul_pan_caa_dp_mmx
38#define _op_mul_pas_caa_dpan_mmx _op_mul_pas_caa_dp_mmx
39
40static void
41init_mul_pixel_color_span_funcs_mmx(void)
42{
43 op_mul_span_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_p_c_dp_mmx;
44 op_mul_span_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pas_c_dp_mmx;
45 op_mul_span_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pan_c_dp_mmx;
46 op_mul_span_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_p_can_dp_mmx;
47 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pas_can_dp_mmx;
48 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pan_can_dp_mmx;
49 op_mul_span_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_p_caa_dp_mmx;
50 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pas_caa_dp_mmx;
51 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pan_caa_dp_mmx;
52
53 op_mul_span_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_p_c_dpan_mmx;
54 op_mul_span_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pas_c_dpan_mmx;
55 op_mul_span_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pan_c_dpan_mmx;
56 op_mul_span_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_p_can_dpan_mmx;
57 op_mul_span_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pas_can_dpan_mmx;
58 op_mul_span_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pan_can_dpan_mmx;
59 op_mul_span_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_p_caa_dpan_mmx;
60 op_mul_span_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pas_caa_dpan_mmx;
61 op_mul_span_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pan_caa_dpan_mmx;
62}
63#endif
64
65#ifdef BUILD_MMX
66static void
67_op_mul_pt_p_c_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c, DATA32 *d) {
68 MOV_A2R(ALPHA_255, mm5)
69 pxor_r2r(mm0, mm0);
70 MOV_P2R(c, mm2, mm0)
71 MOV_P2R(s, mm3, mm0)
72 MUL4_SYM_R2R(mm2, mm3, mm5)
73 MOV_P2R(*d, mm1, mm0)
74 MUL4_SYM_R2R(mm3, mm1, mm5)
75 MOV_R2P(mm1, *d, mm0)
76}
77
78#define _op_mul_pt_pas_c_dp_mmx _op_mul_pt_p_c_dp_mmx
79#define _op_mul_pt_pan_c_dp_mmx _op_mul_pt_p_c_dp_mmx
80#define _op_mul_pt_p_can_dp_mmx _op_mul_pt_p_c_dp_mmx
81#define _op_mul_pt_pas_can_dp_mmx _op_mul_pt_p_c_dp_mmx
82#define _op_mul_pt_pan_can_dp_mmx _op_mul_pt_p_c_dp_mmx
83#define _op_mul_pt_p_caa_dp_mmx _op_mul_pt_p_c_dp_mmx
84#define _op_mul_pt_pas_caa_dp_mmx _op_mul_pt_p_c_dp_mmx
85#define _op_mul_pt_pan_caa_dp_mmx _op_mul_pt_p_c_dp_mmx
86
87#define _op_mul_pt_p_c_dpan_mmx _op_mul_pt_p_c_dp_mmx
88#define _op_mul_pt_pan_c_dpan_mmx _op_mul_pt_pan_c_dp_mmx
89#define _op_mul_pt_pas_c_dpan_mmx _op_mul_pt_pas_c_dp_mmx
90#define _op_mul_pt_p_can_dpan_mmx _op_mul_pt_p_can_dp_mmx
91#define _op_mul_pt_pan_can_dpan_mmx _op_mul_pt_pan_can_dp_mmx
92#define _op_mul_pt_pas_can_dpan_mmx _op_mul_pt_pas_can_dp_mmx
93#define _op_mul_pt_p_caa_dpan_mmx _op_mul_pt_p_caa_dp_mmx
94#define _op_mul_pt_pan_caa_dpan_mmx _op_mul_pt_pan_caa_dp_mmx
95#define _op_mul_pt_pas_caa_dpan_mmx _op_mul_pt_pas_caa_dp_mmx
96
97static void
98init_mul_pixel_color_pt_funcs_mmx(void)
99{
100 op_mul_pt_funcs[SP][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_p_c_dp_mmx;
101 op_mul_pt_funcs[SP_AS][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pas_c_dp_mmx;
102 op_mul_pt_funcs[SP_AN][SM_N][SC][DP][CPU_MMX] = _op_mul_pt_pan_c_dp_mmx;
103 op_mul_pt_funcs[SP][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_p_can_dp_mmx;
104 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pas_can_dp_mmx;
105 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP][CPU_MMX] = _op_mul_pt_pan_can_dp_mmx;
106 op_mul_pt_funcs[SP][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_p_caa_dp_mmx;
107 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pas_caa_dp_mmx;
108 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP][CPU_MMX] = _op_mul_pt_pan_caa_dp_mmx;
109
110 op_mul_pt_funcs[SP][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_p_c_dpan_mmx;
111 op_mul_pt_funcs[SP_AS][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pas_c_dpan_mmx;
112 op_mul_pt_funcs[SP_AN][SM_N][SC][DP_AN][CPU_MMX] = _op_mul_pt_pan_c_dpan_mmx;
113 op_mul_pt_funcs[SP][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_p_can_dpan_mmx;
114 op_mul_pt_funcs[SP_AS][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pas_can_dpan_mmx;
115 op_mul_pt_funcs[SP_AN][SM_N][SC_AN][DP_AN][CPU_MMX] = _op_mul_pt_pan_can_dpan_mmx;
116 op_mul_pt_funcs[SP][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_p_caa_dpan_mmx;
117 op_mul_pt_funcs[SP_AS][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pas_caa_dpan_mmx;
118 op_mul_pt_funcs[SP_AN][SM_N][SC_AA][DP_AN][CPU_MMX] = _op_mul_pt_pan_caa_dpan_mmx;
119}
120#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 @@
1/* mul pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_p_dp_mmx(DATA32 *s, DATA8 *m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d, int l) {
6 DATA32 *e = s + l;
7 pxor_r2r(mm0, mm0);
8 MOV_A2R(ALPHA_255, mm5)
9 for (; s < e; s++, d++) {
10 MOV_P2R(*d, mm1, mm0)
11 MOV_P2R(*s, mm2, mm0)
12 MUL4_SYM_R2R(mm2, mm1, mm5)
13 MOV_R2P(mm1, *d, mm0)
14 }
15}
16
17#define _op_mul_pas_dp_mmx _op_mul_p_dp_mmx
18#define _op_mul_pan_dp_mmx _op_mul_p_dp_mmx
19
20#define _op_mul_p_dpan_mmx _op_mul_p_dp_mmx
21#define _op_mul_pan_dpan_mmx _op_mul_pan_dp_mmx
22#define _op_mul_pas_dpan_mmx _op_mul_pas_dp_mmx
23
24static void
25init_mul_pixel_span_funcs_mmx(void)
26{
27 op_mul_span_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_p_dp_mmx;
28 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pan_dp_mmx;
29 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pas_dp_mmx;
30
31 op_mul_span_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_p_dpan_mmx;
32 op_mul_span_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_dpan_mmx;
33 op_mul_span_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_dpan_mmx;
34}
35#endif
36
37#ifdef BUILD_MMX
38static void
39_op_mul_pt_p_dp_mmx(DATA32 s, DATA8 m __UNUSED__, DATA32 c __UNUSED__, DATA32 *d) {
40 pxor_r2r(mm0, mm0);
41 MOV_A2R(ALPHA_255, mm5)
42 MOV_P2R(*d, mm1, mm0)
43 MOV_P2R(s, mm2, mm0)
44 MUL4_SYM_R2R(mm2, mm1, mm5)
45 MOV_R2P(mm1, *d, mm0)
46}
47
48#define _op_mul_pt_pan_dp_mmx _op_mul_pt_p_dp_mmx
49#define _op_mul_pt_pas_dp_mmx _op_mul_pt_p_dp_mmx
50
51#define _op_mul_pt_p_dpan_mmx _op_mul_pt_p_dp_mmx
52#define _op_mul_pt_pan_dpan_mmx _op_mul_pt_pan_dp_mmx
53#define _op_mul_pt_pas_dpan_mmx _op_mul_pt_pas_dp_mmx
54
55static void
56init_mul_pixel_pt_funcs_mmx(void)
57{
58 op_mul_pt_funcs[SP][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_p_dp_mmx;
59 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pan_dp_mmx;
60 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP][CPU_MMX] = _op_mul_pt_pas_dp_mmx;
61
62 op_mul_pt_funcs[SP][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_p_dpan_mmx;
63 op_mul_pt_funcs[SP_AN][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pan_dpan_mmx;
64 op_mul_pt_funcs[SP_AS][SM_N][SC_N][DP_AN][CPU_MMX] = _op_mul_pt_pas_dpan_mmx;
65}
66#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 @@
1/* mul pixel x mask --> dst */
2
3#ifdef BUILD_C
4static void
5_op_mul_p_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 while (d < e)
8 {
9 c = *m;
10 switch(c)
11 {
12 case 0:
13 break;
14 case 255:
15 *d = MUL4_SYM(*s, *d);
16 break;
17 default:
18 c = ~(*s);
19 c = ~MUL_SYM(*m, c);
20 *d = MUL4_SYM(c, *d);
21 break;
22 }
23 m++; s++; d++;
24 }
25}
26
27static void
28_op_mul_pan_mas_dp(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
29 DATA32 *e = d + l;
30 while (d < e)
31 {
32 c = *m;
33 switch(c)
34 {
35 case 0:
36 break;
37 case 255:
38 *d = (*d & 0xff000000) + MUL3_SYM(*s, *d);
39 break;
40 default:
41 c = ~(*s);
42 c = ~MUL_SYM(*m, c);
43 *d = (*d & 0xff000000) + MUL3_SYM(c, *d);
44 break;
45 }
46 m++; s++; d++;
47 }
48}
49
50static void
51_op_mul_p_mas_dpan(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
52 DATA32 *e = d + l;
53 while (d < e)
54 {
55 c = *m;
56 switch(c)
57 {
58 case 0:
59 break;
60 case 255:
61 *d = (*s & 0xff000000) + MUL3_SYM(*s, *d);
62 break;
63 default:
64 c = ~(*s);
65 c = ~MUL_SYM(*m, c);
66 *d = (c & 0xff000000) + MUL3_SYM(c, *d);
67 break;
68 }
69 m++; d++;
70 }
71}
72
73#define _op_mul_pas_mas_dp _op_mul_p_mas_dp
74
75#define _op_mul_pan_mas_dpan _op_mul_p_mas_dpan
76#define _op_mul_pas_mas_dpan _op_mul_p_mas_dpan
77
78static void
79init_mul_pixel_mask_span_funcs_c(void)
80{
81 op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_p_mas_dp;
82 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pas_mas_dp;
83 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pan_mas_dp;
84
85 op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_p_mas_dpan;
86 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pas_mas_dpan;
87 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pan_mas_dpan;
88}
89#endif
90
91#ifdef BUILD_C
92static void
93_op_mul_pt_p_mas_dp(DATA32 s, DATA8 m, DATA32 c __UNUSED__, DATA32 *d) {
94 s = ~s;
95 s = ~MUL_SYM(m, s);
96 *d = MUL4_SYM(s, *d);
97}
98
99#define _op_mul_pt_pas_mas_dp _op_mul_pt_p_mas_dp
100#define _op_mul_pt_pan_mas_dp _op_mul_pt_p_mas_dp
101
102#define _op_mul_pt_p_mas_dpan _op_mul_pt_p_mas_dp
103#define _op_mul_pt_pas_mas_dpan _op_mul_pt_p_mas_dp
104#define _op_mul_pt_pan_mas_dpan _op_mul_pt_p_mas_dp
105
106static void
107init_mul_pixel_mask_pt_funcs_c(void)
108{
109 op_mul_pt_funcs[SP][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_p_mas_dp;
110 op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pas_mas_dp;
111 op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_C] = _op_mul_pt_pan_mas_dp;
112
113 op_mul_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_p_mas_dpan;
114 op_mul_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pas_mas_dpan;
115 op_mul_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_C] = _op_mul_pt_pan_mas_dpan;
116}
117#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 @@
1/* mul pixel x mask --> dst */
2
3#ifdef BUILD_MMX
4static void
5_op_mul_p_mas_dp_mmx(DATA32 *s, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 DATA32 *e = d + l;
7 MOV_A2R(ALPHA_255, mm5)
8 pxor_r2r(mm0, mm0);
9 while (d < e) {
10 c = *m;
11 switch(c)
12 {
13 case 0:
14 break;
15 case 255:
16 MOV_P2R(*d, mm1, mm0)
17 MOV_P2R(*s, mm2, mm0)
18 MUL4_SYM_R2R(mm2, mm1, mm5)
19 MOV_R2P(mm1, *d, mm0)
20 break;
21 default:
22 c++;
23 MOV_A2R(c, mm1)
24 c = ~(*s);
25 MOV_P2R(c, mm3, mm0)
26 MUL4_256_R2R(mm3, mm1)
27 movq_r2r(mm5, mm4);
28 psubw_r2r(mm1, mm4);
29 MOV_P2R(*d, mm1, mm0)
30 MUL4_SYM_R2R(mm4, mm1, mm5)
31 MOV_R2P(mm1, *d, mm0)
32 break;
33 }
34 s++; m++; d++;
35 }
36}
37
38#define _op_mul_pas_mas_dp_mmx _op_mul_p_mas_dp_mmx
39#define _op_mul_pan_mas_dp_mmx _op_mul_p_mas_dp_mmx
40
41#define _op_mul_p_mas_dpan_mmx _op_mul_p_mas_dp_mmx
42#define _op_mul_pas_mas_dpan_mmx _op_mul_pas_mas_dp_mmx
43#define _op_mul_pan_mas_dpan_mmx _op_mul_pan_mas_dp_mmx
44
45static void
46init_mul_pixel_mask_span_funcs_mmx(void)
47{
48 op_mul_span_funcs[SP][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_p_mas_dp_mmx;
49 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pas_mas_dp_mmx;
50 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_MMX] = _op_mul_pan_mas_dp_mmx;
51
52 op_mul_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_p_mas_dpan_mmx;
53 op_mul_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pas_mas_dpan_mmx;
54 op_mul_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_MMX] = _op_mul_pan_mas_dpan_mmx;
55}
56#endif
57
58#ifdef BUILD_MMX
59static void
60init_mul_pixel_mask_pt_funcs_mmx(void)
61{
62}
63#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 @@
1#include "evas_common.h"
2
3static RGBA_Gfx_Func op_mul_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4static RGBA_Gfx_Pt_Func op_mul_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_mul_init(void);
7static void op_mul_shutdown(void);
8
9static RGBA_Gfx_Func op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_mul_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_mul = { "mul",
22 op_mul_init, op_mul_shutdown,
23 op_mul_pixel_span_get, op_mul_color_span_get,
24 op_mul_pixel_color_span_get, op_mul_mask_color_span_get,
25 op_mul_pixel_mask_span_get,
26 op_mul_pixel_pt_get, op_mul_color_pt_get,
27 op_mul_pixel_color_pt_get, op_mul_mask_color_pt_get,
28 op_mul_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_mul_get(void)
33{
34 return &(_composite_mul);
35}
36
37
38# include "./evas_op_mul/op_mul_pixel_.c"
39# include "./evas_op_mul/op_mul_color_.c"
40# include "./evas_op_mul/op_mul_pixel_color_.c"
41# include "./evas_op_mul/op_mul_pixel_mask_.c"
42# include "./evas_op_mul/op_mul_mask_color_.c"
43//# include "./evas_op_mul/op_mul_pixel_mask_color_.c"
44
45# include "./evas_op_mul/op_mul_pixel_i386.c"
46# include "./evas_op_mul/op_mul_color_i386.c"
47# include "./evas_op_mul/op_mul_pixel_color_i386.c"
48# include "./evas_op_mul/op_mul_pixel_mask_i386.c"
49# include "./evas_op_mul/op_mul_mask_color_i386.c"
50// # include "./evas_op_mul/op_mul_pixel_mask_color_i386.c"
51
52static void
53op_mul_init(void)
54{
55 memset(op_mul_span_funcs, 0, sizeof(op_mul_span_funcs));
56 memset(op_mul_pt_funcs, 0, sizeof(op_mul_pt_funcs));
57#ifdef BUILD_MMX
58 init_mul_pixel_span_funcs_mmx();
59 init_mul_pixel_color_span_funcs_mmx();
60 init_mul_pixel_mask_span_funcs_mmx();
61 init_mul_color_span_funcs_mmx();
62 init_mul_mask_color_span_funcs_mmx();
63
64 init_mul_pixel_pt_funcs_mmx();
65 init_mul_pixel_color_pt_funcs_mmx();
66 init_mul_pixel_mask_pt_funcs_mmx();
67 init_mul_color_pt_funcs_mmx();
68 init_mul_mask_color_pt_funcs_mmx();
69#endif
70#ifdef BUILD_C
71 init_mul_pixel_span_funcs_c();
72 init_mul_pixel_color_span_funcs_c();
73 init_mul_pixel_mask_span_funcs_c();
74 init_mul_color_span_funcs_c();
75 init_mul_mask_color_span_funcs_c();
76
77 init_mul_pixel_pt_funcs_c();
78 init_mul_pixel_color_pt_funcs_c();
79 init_mul_pixel_mask_pt_funcs_c();
80 init_mul_color_pt_funcs_c();
81 init_mul_mask_color_pt_funcs_c();
82#endif
83}
84
85static void
86op_mul_shutdown(void)
87{
88}
89
90static RGBA_Gfx_Func
91mul_gfx_span_func_cpu(int s, int m, int c, int d)
92{
93 RGBA_Gfx_Func func = NULL;
94 int cpu = CPU_N;
95#ifdef BUILD_MMX
96 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
97 {
98 cpu = CPU_MMX;
99 func = op_mul_span_funcs[s][m][c][d][cpu];
100 if (func) return func;
101 }
102#endif
103#ifdef BUILD_C
104 cpu = CPU_C;
105 func = op_mul_span_funcs[s][m][c][d][cpu];
106 if (func) return func;
107#endif
108 return func;
109}
110
111static RGBA_Gfx_Func
112op_mul_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
113{
114 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
115
116 if (src && src->cache_entry.flags.alpha)
117 {
118 dst->cache_entry.flags.alpha = 1;
119 s = SP;
120 }
121 if (dst && dst->cache_entry.flags.alpha)
122 d = DP;
123 return mul_gfx_span_func_cpu(s, m, c, d);
124}
125
126static RGBA_Gfx_Func
127op_mul_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
128{
129 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
130
131 if ((col >> 24) < 255)
132 {
133 if (dst)
134 dst->cache_entry.flags.alpha = 1;
135 c = SC;
136 }
137 if (col == (col | 0x00ffffff))
138 c = SC_AA;
139 if (col == 0xffffffff)
140 c = SC_N;
141 if (dst && dst->cache_entry.flags.alpha)
142 d = DP;
143 return mul_gfx_span_func_cpu(s, m, c, d);
144}
145
146static RGBA_Gfx_Func
147op_mul_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
148{
149 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
150
151 if (src && src->cache_entry.flags.alpha)
152 {
153 if (dst)
154 dst->cache_entry.flags.alpha = 1;
155 s = SP;
156 }
157 if ((col >> 24) < 255)
158 {
159 if (dst)
160 dst->cache_entry.flags.alpha = 1;
161 c = SC;
162 }
163 if (col == (col | 0x00ffffff))
164 c = SC_AA;
165 if (col == 0xffffffff)
166 c = SC_N;
167 if (dst && dst->cache_entry.flags.alpha)
168 d = DP;
169 return mul_gfx_span_func_cpu(s, m, c, d);
170}
171
172static RGBA_Gfx_Func
173op_mul_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
174{
175 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
176
177 if (dst)
178 dst->cache_entry.flags.alpha = 1;
179 if ((col >> 24) < 255)
180 c = SC;
181 if (col == (col | 0x00ffffff))
182 c = SC_AA;
183 if (col == 0xffffffff)
184 c = SC_N;
185 return mul_gfx_span_func_cpu(s, m, c, d);
186}
187
188static RGBA_Gfx_Func
189op_mul_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
190{
191 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
192
193 if (dst)
194 dst->cache_entry.flags.alpha = 1;
195 if (src && src->cache_entry.flags.alpha)
196 s = SP;
197 return mul_gfx_span_func_cpu(s, m, c, d);
198}
199
200static RGBA_Gfx_Pt_Func
201mul_gfx_pt_func_cpu(int s, int m, int c, int d)
202{
203 RGBA_Gfx_Pt_Func func = NULL;
204 int cpu = CPU_N;
205#ifdef BUILD_MMX
206 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
207 {
208 cpu = CPU_MMX;
209 func = op_mul_pt_funcs[s][m][c][d][cpu];
210 if (func) return func;
211 }
212#endif
213#ifdef BUILD_C
214 cpu = CPU_C;
215 func = op_mul_pt_funcs[s][m][c][d][cpu];
216 if (func) return func;
217#endif
218 return func;
219}
220
221static RGBA_Gfx_Pt_Func
222op_mul_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
223{
224 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
225
226 if (src_flags.alpha)
227 {
228 dst->cache_entry.flags.alpha = 1;
229 s = SP;
230 }
231 if (dst && dst->cache_entry.flags.alpha)
232 d = DP;
233 return mul_gfx_pt_func_cpu(s, m, c, d);
234}
235
236static RGBA_Gfx_Pt_Func
237op_mul_color_pt_get(DATA32 col, RGBA_Image *dst)
238{
239 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
240
241 if ((col >> 24) < 255)
242 {
243 if (dst)
244 dst->cache_entry.flags.alpha = 1;
245 c = SC;
246 }
247 if (col == (col | 0x00ffffff))
248 c = SC_AA;
249 if (col == 0xffffffff)
250 c = SC_N;
251 if (dst && dst->cache_entry.flags.alpha)
252 d = DP;
253 return mul_gfx_pt_func_cpu(s, m, c, d);
254}
255
256static RGBA_Gfx_Pt_Func
257op_mul_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
258{
259 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
260
261 if (src_flags.alpha)
262 {
263 if (dst)
264 dst->cache_entry.flags.alpha = 1;
265 s = SP;
266 }
267 if ((col >> 24) < 255)
268 {
269 if (dst)
270 dst->cache_entry.flags.alpha = 1;
271 c = SC;
272 }
273 if (col == (col | 0x00ffffff))
274 c = SC_AA;
275 if (col == 0xffffffff)
276 c = SC_N;
277 if (dst && dst->cache_entry.flags.alpha)
278 d = DP;
279 return mul_gfx_pt_func_cpu(s, m, c, d);
280}
281
282static RGBA_Gfx_Pt_Func
283op_mul_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
284{
285 int s = SP_N, m = SM_AS, c = SC_AN, d = DP;
286
287 if (dst)
288 dst->cache_entry.flags.alpha = 1;
289 if ((col >> 24) < 255)
290 c = SC;
291 if (col == (col | 0x00ffffff))
292 c = SC_AA;
293 if (col == 0xffffffff)
294 c = SC_N;
295 return mul_gfx_pt_func_cpu(s, m, c, d);
296}
297
298static RGBA_Gfx_Pt_Func
299op_mul_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
300{
301 int s = SP_AN, m = SM_AS, c = SC_N, d = DP;
302
303 if (dst)
304 dst->cache_entry.flags.alpha = 1;
305 if (src_flags.alpha)
306 s = SP;
307 return mul_gfx_pt_func_cpu(s, m, c, d);
308}
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 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3EXTRA_DIST = \
4op_sub_color_.c \
5op_sub_color_i386.c \
6op_sub_mask_color_.c \
7op_sub_mask_color_i386.c \
8op_sub_pixel_.c \
9op_sub_pixel_color_.c \
10op_sub_pixel_color_i386.c \
11op_sub_pixel_i386.c \
12op_sub_pixel_mask_.c \
13op_sub_pixel_mask_i386.c
14
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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/engines/common/evas_op_sub
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
120EXOTIC_LIBS = @EXOTIC_LIBS@
121FGREP = @FGREP@
122FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
123FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
124FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
125FREETYPE_LIBS = @FREETYPE_LIBS@
126FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
127FRIBIDI_LIBS = @FRIBIDI_LIBS@
128GL_EET_CFLAGS = @GL_EET_CFLAGS@
129GL_EET_LIBS = @GL_EET_LIBS@
130GREP = @GREP@
131HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
132HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
133INSTALL = @INSTALL@
134INSTALL_DATA = @INSTALL_DATA@
135INSTALL_PROGRAM = @INSTALL_PROGRAM@
136INSTALL_SCRIPT = @INSTALL_SCRIPT@
137INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
138LD = @LD@
139LDFLAGS = @LDFLAGS@
140LIBOBJS = @LIBOBJS@
141LIBS = @LIBS@
142LIBTOOL = @LIBTOOL@
143LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
144LINEBREAK_LIBS = @LINEBREAK_LIBS@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MKDIR_P = @MKDIR_P@
150MODULE_ARCH = @MODULE_ARCH@
151NM = @NM@
152NMEDIT = @NMEDIT@
153OBJC = @OBJC@
154OBJCDEPMODE = @OBJCDEPMODE@
155OBJCFLAGS = @OBJCFLAGS@
156OBJDUMP = @OBJDUMP@
157OBJEXT = @OBJEXT@
158OTOOL = @OTOOL@
159OTOOL64 = @OTOOL64@
160PACKAGE = @PACKAGE@
161PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162PACKAGE_NAME = @PACKAGE_NAME@
163PACKAGE_STRING = @PACKAGE_STRING@
164PACKAGE_TARNAME = @PACKAGE_TARNAME@
165PACKAGE_URL = @PACKAGE_URL@
166PACKAGE_VERSION = @PACKAGE_VERSION@
167PATH_SEPARATOR = @PATH_SEPARATOR@
168PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
169PIXMAN_LIBS = @PIXMAN_LIBS@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173PNG_CFLAGS = @PNG_CFLAGS@
174PNG_LIBS = @PNG_LIBS@
175RANLIB = @RANLIB@
176SDL_CFLAGS = @SDL_CFLAGS@
177SDL_LIBS = @SDL_LIBS@
178SED = @SED@
179SET_MAKE = @SET_MAKE@
180SHELL = @SHELL@
181SHM_OPEN_LINK = @SHM_OPEN_LINK@
182STRIP = @STRIP@
183SVG_CFLAGS = @SVG_CFLAGS@
184SVG_LIBS = @SVG_LIBS@
185VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
186VALGRIND_LIBS = @VALGRIND_LIBS@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
190WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
191XCB_CFLAGS = @XCB_CFLAGS@
192XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
193XCB_GL_LIBS = @XCB_GL_LIBS@
194XCB_LIBS = @XCB_LIBS@
195XEXT_CFLAGS = @XEXT_CFLAGS@
196XEXT_LIBS = @XEXT_LIBS@
197XMKMF = @XMKMF@
198X_CFLAGS = @X_CFLAGS@
199X_EXTRA_LIBS = @X_EXTRA_LIBS@
200X_LIBS = @X_LIBS@
201X_PRE_LIBS = @X_PRE_LIBS@
202abs_builddir = @abs_builddir@
203abs_srcdir = @abs_srcdir@
204abs_top_builddir = @abs_top_builddir@
205abs_top_srcdir = @abs_top_srcdir@
206ac_ct_CC = @ac_ct_CC@
207ac_ct_CXX = @ac_ct_CXX@
208ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
209ac_ct_OBJC = @ac_ct_OBJC@
210altivec_cflags = @altivec_cflags@
211am__include = @am__include@
212am__leading_dot = @am__leading_dot@
213am__quote = @am__quote@
214am__tar = @am__tar@
215am__untar = @am__untar@
216bindir = @bindir@
217build = @build@
218build_alias = @build_alias@
219build_cpu = @build_cpu@
220build_os = @build_os@
221build_vendor = @build_vendor@
222builddir = @builddir@
223datadir = @datadir@
224datarootdir = @datarootdir@
225dlopen_libs = @dlopen_libs@
226docdir = @docdir@
227dvidir = @dvidir@
228edje_cc = @edje_cc@
229efl_doxygen = @efl_doxygen@
230efl_have_doxygen = @efl_have_doxygen@
231evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
232evas_engine_buffer_libs = @evas_engine_buffer_libs@
233evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
234evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
235evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
236evas_engine_directfb_libs = @evas_engine_directfb_libs@
237evas_engine_fb_cflags = @evas_engine_fb_cflags@
238evas_engine_fb_libs = @evas_engine_fb_libs@
239evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
240evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
241evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
242evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
243evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
244evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
245evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
246evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
247evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
248evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
249evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
250evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
251evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
252evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
253evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
254evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
255evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
256evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
257evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
258evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
259evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
260evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
261evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
262evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
263evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
269evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
270evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
271evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
272evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
273evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
274evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
275evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
276evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
277evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
278evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
279evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
280evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
281evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
282evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
283evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
284evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
285evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
286evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
287evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
288evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
289evas_image_loader_png_libs = @evas_image_loader_png_libs@
290evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
291evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
292evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
293evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
294evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
295evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
296evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
297evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
298evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
299evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
300evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
301evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
302exec_prefix = @exec_prefix@
303have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
304have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
305have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
306have_evas_engine_software_x11 = @have_evas_engine_software_x11@
307have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
308have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
309have_lcov = @have_lcov@
310host = @host@
311host_alias = @host_alias@
312host_cpu = @host_cpu@
313host_os = @host_os@
314host_vendor = @host_vendor@
315htmldir = @htmldir@
316includedir = @includedir@
317infodir = @infodir@
318install_sh = @install_sh@
319libdir = @libdir@
320libexecdir = @libexecdir@
321localedir = @localedir@
322localstatedir = @localstatedir@
323lt_ECHO = @lt_ECHO@
324lt_enable_auto_import = @lt_enable_auto_import@
325mandir = @mandir@
326mkdir_p = @mkdir_p@
327oldincludedir = @oldincludedir@
328pdfdir = @pdfdir@
329pkgconfig_requires_private = @pkgconfig_requires_private@
330prefix = @prefix@
331program_transform_name = @program_transform_name@
332psdir = @psdir@
333pthread_cflags = @pthread_cflags@
334pthread_libs = @pthread_libs@
335release_info = @release_info@
336requirement_evas = @requirement_evas@
337sbindir = @sbindir@
338sharedstatedir = @sharedstatedir@
339srcdir = @srcdir@
340sysconfdir = @sysconfdir@
341target_alias = @target_alias@
342top_build_prefix = @top_build_prefix@
343top_builddir = @top_builddir@
344top_srcdir = @top_srcdir@
345version_info = @version_info@
346MAINTAINERCLEANFILES = Makefile.in
347EXTRA_DIST = \
348op_sub_color_.c \
349op_sub_color_i386.c \
350op_sub_mask_color_.c \
351op_sub_mask_color_i386.c \
352op_sub_pixel_.c \
353op_sub_pixel_color_.c \
354op_sub_pixel_color_i386.c \
355op_sub_pixel_i386.c \
356op_sub_pixel_mask_.c \
357op_sub_pixel_mask_i386.c
358
359all: all-am
360
361.SUFFIXES:
362$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
363 @for dep in $?; do \
364 case '$(am__configure_deps)' in \
365 *$$dep*) \
366 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
367 && { if test -f $@; then exit 0; else break; fi; }; \
368 exit 1;; \
369 esac; \
370 done; \
371 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile'; \
372 $(am__cd) $(top_srcdir) && \
373 $(AUTOMAKE) --gnu src/lib/engines/common/evas_op_sub/Makefile
374.PRECIOUS: Makefile
375Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
376 @case '$?' in \
377 *config.status*) \
378 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
379 *) \
380 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
381 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
382 esac;
383
384$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
385 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
386
387$(top_srcdir)/configure: $(am__configure_deps)
388 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
389$(ACLOCAL_M4): $(am__aclocal_m4_deps)
390 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
391$(am__aclocal_m4_deps):
392
393mostlyclean-libtool:
394 -rm -f *.lo
395
396clean-libtool:
397 -rm -rf .libs _libs
398tags: TAGS
399TAGS:
400
401ctags: CTAGS
402CTAGS:
403
404
405distdir: $(DISTFILES)
406 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
407 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
408 list='$(DISTFILES)'; \
409 dist_files=`for file in $$list; do echo $$file; done | \
410 sed -e "s|^$$srcdirstrip/||;t" \
411 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
412 case $$dist_files in \
413 */*) $(MKDIR_P) `echo "$$dist_files" | \
414 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
415 sort -u` ;; \
416 esac; \
417 for file in $$dist_files; do \
418 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
419 if test -d $$d/$$file; then \
420 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
421 if test -d "$(distdir)/$$file"; then \
422 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
423 fi; \
424 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
425 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
426 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
427 fi; \
428 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
429 else \
430 test -f "$(distdir)/$$file" \
431 || cp -p $$d/$$file "$(distdir)/$$file" \
432 || exit 1; \
433 fi; \
434 done
435check-am: all-am
436check: check-am
437all-am: Makefile
438installdirs:
439install: install-am
440install-exec: install-exec-am
441install-data: install-data-am
442uninstall: uninstall-am
443
444install-am: all-am
445 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
446
447installcheck: installcheck-am
448install-strip:
449 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
450 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
451 `test -z '$(STRIP)' || \
452 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
453mostlyclean-generic:
454
455clean-generic:
456
457distclean-generic:
458 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
459 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
460
461maintainer-clean-generic:
462 @echo "This command is intended for maintainers to use"
463 @echo "it deletes files that may require special tools to rebuild."
464 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
465clean: clean-am
466
467clean-am: clean-generic clean-libtool mostlyclean-am
468
469distclean: distclean-am
470 -rm -f Makefile
471distclean-am: clean-am distclean-generic
472
473dvi: dvi-am
474
475dvi-am:
476
477html: html-am
478
479html-am:
480
481info: info-am
482
483info-am:
484
485install-data-am:
486
487install-dvi: install-dvi-am
488
489install-dvi-am:
490
491install-exec-am:
492
493install-html: install-html-am
494
495install-html-am:
496
497install-info: install-info-am
498
499install-info-am:
500
501install-man:
502
503install-pdf: install-pdf-am
504
505install-pdf-am:
506
507install-ps: install-ps-am
508
509install-ps-am:
510
511installcheck-am:
512
513maintainer-clean: maintainer-clean-am
514 -rm -f Makefile
515maintainer-clean-am: distclean-am maintainer-clean-generic
516
517mostlyclean: mostlyclean-am
518
519mostlyclean-am: mostlyclean-generic mostlyclean-libtool
520
521pdf: pdf-am
522
523pdf-am:
524
525ps: ps-am
526
527ps-am:
528
529uninstall-am:
530
531.MAKE: install-am install-strip
532
533.PHONY: all all-am check check-am clean clean-generic clean-libtool \
534 distclean distclean-generic distclean-libtool distdir dvi \
535 dvi-am html html-am info info-am install install-am \
536 install-data install-data-am install-dvi install-dvi-am \
537 install-exec install-exec-am install-html install-html-am \
538 install-info install-info-am install-man install-pdf \
539 install-pdf-am install-ps install-ps-am install-strip \
540 installcheck installcheck-am installdirs maintainer-clean \
541 maintainer-clean-generic mostlyclean mostlyclean-generic \
542 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
543
544
545# Tell versions [3.59,3.63) of GNU make to not export all variables.
546# Otherwise a system limit (for SysV at least) may be exceeded.
547.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 @@
1/* sub color -> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel color -> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_color_pt_funcs_c(void)
31{
32}
33#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 @@
1/* sub color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_color_pt_funcs_mmx(void)
31{
32}
33#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 @@
1/* sub mask x color -> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_mask_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_mask_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel mask x color -> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_mask_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_mask_color_pt_funcs_c(void)
31{
32}
33#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 @@
1/* sub mask x color -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_mask_color_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_mask_color_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel mask x color -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_mask_color_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_mask_color_pt_funcs_mmx(void)
31{
32}
33#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 @@
1/* sub pixel --> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_pixel_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_pixel_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel --> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_pixel_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_pixel_pt_funcs_c(void)
31{
32}
33#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 @@
1/* sub pixel x color --> dst */
2
3#ifdef BUILD_C
4static void
5init_sub_pixel_color_span_funcs_c(void)
6{
7}
8#endif
9
10#ifdef BUILD_C
11static void
12init_sub_pixel_color_pt_funcs_c(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel x color --> dst */
20
21#ifdef BUILD_C
22static void
23init_sub_rel_pixel_color_span_funcs_c(void)
24{
25}
26#endif
27
28#ifdef BUILD_C
29static void
30init_sub_rel_pixel_color_pt_funcs_c(void)
31{
32}
33#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 @@
1/* sub pixel x color --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_pixel_color_span_funcs_mmx(void)
6{ }
7#endif
8
9#ifdef BUILD_MMX
10static void
11init_sub_pixel_color_pt_funcs_mmx(void)
12{ }
13#endif
14
15/*-----*/
16
17/* sub_rel pixel x color --> dst */
18
19#ifdef BUILD_MMX
20static void
21init_sub_rel_pixel_color_span_funcs_mmx(void)
22{ }
23#endif
24
25#ifdef BUILD_MMX
26static void
27init_sub_rel_pixel_color_pt_funcs_mmx(void)
28{ }
29#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 @@
1/* sub pixel --> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_pixel_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_pixel_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel --> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_pixel_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_pixel_pt_funcs_mmx(void)
31{
32}
33#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 @@
1/* sub pixel x mask --> dst */
2
3#ifdef BUILD_C
4/* XXX: not used
5static void
6init_sub_pixel_mask_span_funcs_c(void)
7{
8}
9*/
10#endif
11
12#ifdef BUILD_C
13/* XXX: not used
14static void
15init_sub_pixel_mask_pt_funcs_c(void)
16{
17}
18*/
19#endif
20
21/*-----*/
22
23/* sub_rel pixel x mask --> dst */
24
25#ifdef BUILD_C
26static void
27init_sub_rel_pixel_mask_span_funcs_c(void)
28{
29}
30#endif
31
32#ifdef BUILD_C
33static void
34init_sub_rel_pixel_mask_pt_funcs_c(void)
35{
36}
37#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 @@
1/* sub pixel x mask -> dst */
2
3#ifdef BUILD_MMX
4static void
5init_sub_pixel_mask_span_funcs_mmx(void)
6{
7}
8#endif
9
10#ifdef BUILD_MMX
11static void
12init_sub_pixel_mask_pt_funcs_mmx(void)
13{
14}
15#endif
16
17/*-----*/
18
19/* sub_rel pixel x mask -> dst */
20
21#ifdef BUILD_MMX
22static void
23init_sub_rel_pixel_mask_span_funcs_mmx(void)
24{
25}
26#endif
27
28#ifdef BUILD_MMX
29static void
30init_sub_rel_pixel_mask_pt_funcs_mmx(void)
31{
32}
33#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 @@
1#include "evas_common.h"
2
3static RGBA_Gfx_Func op_sub_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
4static RGBA_Gfx_Pt_Func op_sub_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
5
6static void op_sub_init(void);
7static void op_sub_shutdown(void);
8
9static RGBA_Gfx_Func op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
10static RGBA_Gfx_Func op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
11static RGBA_Gfx_Func op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
12static RGBA_Gfx_Func op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
13static RGBA_Gfx_Func op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
14
15static RGBA_Gfx_Pt_Func op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
16static RGBA_Gfx_Pt_Func op_sub_color_pt_get(DATA32 col, RGBA_Image *dst);
17static RGBA_Gfx_Pt_Func op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
18static RGBA_Gfx_Pt_Func op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
19static RGBA_Gfx_Pt_Func op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
20
21static RGBA_Gfx_Compositor _composite_sub = { "sub",
22 op_sub_init, op_sub_shutdown,
23 op_sub_pixel_span_get, op_sub_color_span_get,
24 op_sub_pixel_color_span_get, op_sub_mask_color_span_get,
25 op_sub_pixel_mask_span_get,
26 op_sub_pixel_pt_get, op_sub_color_pt_get,
27 op_sub_pixel_color_pt_get, op_sub_mask_color_pt_get,
28 op_sub_pixel_mask_pt_get
29 };
30
31RGBA_Gfx_Compositor *
32evas_common_gfx_compositor_sub_get(void)
33{
34 return &(_composite_sub);
35}
36
37static RGBA_Gfx_Func op_sub_rel_span_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
38static RGBA_Gfx_Pt_Func op_sub_rel_pt_funcs[SP_LAST][SM_LAST][SC_LAST][DP_LAST][CPU_LAST];
39
40static void op_sub_rel_init(void);
41static void op_sub_rel_shutdown(void);
42
43static RGBA_Gfx_Func op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
44static RGBA_Gfx_Func op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
45static RGBA_Gfx_Func op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
46static RGBA_Gfx_Func op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels);
47static RGBA_Gfx_Func op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels);
48
49static RGBA_Gfx_Pt_Func op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
50static RGBA_Gfx_Pt_Func op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst);
51static RGBA_Gfx_Pt_Func op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
52static RGBA_Gfx_Pt_Func op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst);
53static RGBA_Gfx_Pt_Func op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst);
54
55static RGBA_Gfx_Compositor _composite_sub_rel = { "sub_rel",
56 op_sub_rel_init, op_sub_rel_shutdown,
57 op_sub_rel_pixel_span_get, op_sub_rel_color_span_get,
58 op_sub_rel_pixel_color_span_get, op_sub_rel_mask_color_span_get,
59 op_sub_rel_pixel_mask_span_get,
60 op_sub_rel_pixel_pt_get, op_sub_rel_color_pt_get,
61 op_sub_rel_pixel_color_pt_get, op_sub_rel_mask_color_pt_get,
62 op_sub_rel_pixel_mask_pt_get
63 };
64
65RGBA_Gfx_Compositor *
66evas_common_gfx_compositor_sub_rel_get(void)
67{
68 return &(_composite_sub_rel);
69}
70
71
72# include "./evas_op_sub/op_sub_pixel_.c"
73# include "./evas_op_sub/op_sub_color_.c"
74# include "./evas_op_sub/op_sub_pixel_color_.c"
75# include "./evas_op_sub/op_sub_pixel_mask_.c"
76# include "./evas_op_sub/op_sub_mask_color_.c"
77//# include "./evas_op_sub/op_sub_pixel_mask_color_.c"
78
79# include "./evas_op_sub/op_sub_pixel_i386.c"
80# include "./evas_op_sub/op_sub_color_i386.c"
81# include "./evas_op_sub/op_sub_pixel_color_i386.c"
82# include "./evas_op_sub/op_sub_pixel_mask_i386.c"
83# include "./evas_op_sub/op_sub_mask_color_i386.c"
84//# include "./evas_op_sub/op_sub_pixel_mask_color_i386.c"
85
86static void
87op_sub_init(void)
88{
89 memset(op_sub_span_funcs, 0, sizeof(op_sub_span_funcs));
90 memset(op_sub_pt_funcs, 0, sizeof(op_sub_pt_funcs));
91#ifdef BUILD_MMX
92 init_sub_pixel_span_funcs_mmx();
93 init_sub_pixel_color_span_funcs_mmx();
94 init_sub_pixel_mask_span_funcs_mmx();
95 init_sub_color_span_funcs_mmx();
96 init_sub_mask_color_span_funcs_mmx();
97
98 init_sub_pixel_pt_funcs_mmx();
99 init_sub_pixel_color_pt_funcs_mmx();
100 init_sub_pixel_mask_pt_funcs_mmx();
101 init_sub_color_pt_funcs_mmx();
102 init_sub_mask_color_pt_funcs_mmx();
103#endif
104#ifdef BUILD_C
105 init_sub_pixel_span_funcs_c();
106 init_sub_pixel_color_span_funcs_c();
107 init_sub_rel_pixel_mask_span_funcs_c();
108 init_sub_color_span_funcs_c();
109 init_sub_mask_color_span_funcs_c();
110
111 init_sub_pixel_pt_funcs_c();
112 init_sub_pixel_color_pt_funcs_c();
113 init_sub_rel_pixel_mask_pt_funcs_c();
114 init_sub_color_pt_funcs_c();
115 init_sub_mask_color_pt_funcs_c();
116#endif
117}
118
119static void
120op_sub_shutdown(void)
121{
122}
123
124static RGBA_Gfx_Func
125sub_gfx_span_func_cpu(int s, int m, int c, int d)
126{
127 RGBA_Gfx_Func func = NULL;
128 int cpu = CPU_N;
129#ifdef BUILD_MMX
130 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
131 {
132 cpu = CPU_MMX;
133 func = op_sub_span_funcs[s][m][c][d][cpu];
134 if (func) return func;
135 }
136#endif
137#ifdef BUILD_C
138 cpu = CPU_C;
139 func = op_sub_span_funcs[s][m][c][d][cpu];
140 if (func) return func;
141#endif
142 return func;
143}
144
145static RGBA_Gfx_Func
146op_sub_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
147{
148 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
149
150 if (src && src->cache_entry.flags.alpha)
151 s = SP;
152 if (dst && dst->cache_entry.flags.alpha)
153 d = DP;
154 return sub_gfx_span_func_cpu(s, m, c, d);
155}
156
157static RGBA_Gfx_Func
158op_sub_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
159{
160 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
161
162 if ((col >> 24) < 255)
163 c = SC;
164 if (col == (col | 0x00ffffff))
165 c = SC_AA;
166 if (col == 0xffffffff)
167 c = SC_N;
168 if (dst && dst->cache_entry.flags.alpha)
169 d = DP;
170 return sub_gfx_span_func_cpu(s, m, c, d);
171}
172
173static RGBA_Gfx_Func
174op_sub_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
175{
176 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
177
178 if (src && src->cache_entry.flags.alpha)
179 s = SP;
180 if ((col >> 24) < 255)
181 c = SC;
182 if (col == (col | 0x00ffffff))
183 c = SC_AA;
184 if (col == 0xffffffff)
185 c = SC_N;
186 if (dst && dst->cache_entry.flags.alpha)
187 d = DP;
188 return sub_gfx_span_func_cpu(s, m, c, d);
189}
190
191static RGBA_Gfx_Func
192op_sub_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
193{
194 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
195
196 if ((col >> 24) < 255)
197 c = SC;
198 if (col == (col | 0x00ffffff))
199 c = SC_AA;
200 if (col == 0xffffffff)
201 c = SC_N;
202 if (dst && dst->cache_entry.flags.alpha)
203 d = DP;
204 return sub_gfx_span_func_cpu(s, m, c, d);
205}
206
207static RGBA_Gfx_Func
208op_sub_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
209{
210 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
211
212 if (src && src->cache_entry.flags.alpha)
213 s = SP;
214 if (dst && dst->cache_entry.flags.alpha)
215 d = DP;
216 return sub_gfx_span_func_cpu(s, m, c, d);
217}
218
219static RGBA_Gfx_Pt_Func
220sub_gfx_pt_func_cpu(int s, int m, int c, int d)
221{
222 RGBA_Gfx_Pt_Func func = NULL;
223 int cpu = CPU_N;
224#ifdef BUILD_MMX
225 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
226 {
227 cpu = CPU_MMX;
228 func = op_sub_pt_funcs[s][m][c][d][cpu];
229 if (func) return func;
230 }
231#endif
232#ifdef BUILD_C
233 cpu = CPU_C;
234 func = op_sub_pt_funcs[s][m][c][d][cpu];
235 if (func) return func;
236#endif
237 return func;
238}
239
240static RGBA_Gfx_Pt_Func
241op_sub_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
242{
243 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
244
245 if (src_flags.alpha)
246 s = SP;
247 if (dst && dst->cache_entry.flags.alpha)
248 d = DP;
249 return sub_gfx_pt_func_cpu(s, m, c, d);
250}
251
252static RGBA_Gfx_Pt_Func
253op_sub_color_pt_get(DATA32 col, RGBA_Image *dst)
254{
255 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
256
257 if ((col >> 24) < 255)
258 c = SC;
259 if (col == (col | 0x00ffffff))
260 c = SC_AA;
261 if (col == 0xffffffff)
262 c = SC_N;
263 if (dst && dst->cache_entry.flags.alpha)
264 d = DP;
265 return sub_gfx_pt_func_cpu(s, m, c, d);
266}
267
268static RGBA_Gfx_Pt_Func
269op_sub_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
270{
271 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
272
273 if (src_flags.alpha)
274 s = SP;
275 if ((col >> 24) < 255)
276 c = SC;
277 if (col == (col | 0x00ffffff))
278 c = SC_AA;
279 if (col == 0xffffffff)
280 c = SC_N;
281 if (dst && dst->cache_entry.flags.alpha)
282 d = DP;
283 return sub_gfx_pt_func_cpu(s, m, c, d);
284}
285
286static RGBA_Gfx_Pt_Func
287op_sub_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
288{
289 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
290
291 if ((col >> 24) < 255)
292 c = SC;
293 if (col == (col | 0x00ffffff))
294 c = SC_AA;
295 if (col == 0xffffffff)
296 c = SC_N;
297 if (dst && dst->cache_entry.flags.alpha)
298 d = DP;
299 return sub_gfx_pt_func_cpu(s, m, c, d);
300}
301
302static RGBA_Gfx_Pt_Func
303op_sub_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
304{
305 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
306
307 if (src_flags.alpha)
308 s = SP;
309 if (dst && dst->cache_entry.flags.alpha)
310 d = DP;
311 return sub_gfx_pt_func_cpu(s, m, c, d);
312}
313
314
315
316static void
317op_sub_rel_init(void)
318{
319 memset(op_sub_rel_span_funcs, 0, sizeof(op_sub_rel_span_funcs));
320 memset(op_sub_rel_pt_funcs, 0, sizeof(op_sub_rel_pt_funcs));
321#ifdef BUILD_MMX
322 init_sub_rel_pixel_span_funcs_mmx();
323 init_sub_rel_pixel_color_span_funcs_mmx();
324 init_sub_rel_pixel_mask_span_funcs_mmx();
325 init_sub_rel_color_span_funcs_mmx();
326 init_sub_rel_mask_color_span_funcs_mmx();
327
328 init_sub_rel_pixel_pt_funcs_mmx();
329 init_sub_rel_pixel_color_pt_funcs_mmx();
330 init_sub_rel_pixel_mask_pt_funcs_mmx();
331 init_sub_rel_color_pt_funcs_mmx();
332 init_sub_rel_mask_color_pt_funcs_mmx();
333#endif
334#ifdef BUILD_C
335 init_sub_rel_pixel_span_funcs_c();
336 init_sub_rel_pixel_color_span_funcs_c();
337 init_sub_rel_pixel_mask_span_funcs_c();
338 init_sub_rel_color_span_funcs_c();
339 init_sub_rel_mask_color_span_funcs_c();
340
341 init_sub_rel_pixel_pt_funcs_c();
342 init_sub_rel_pixel_color_pt_funcs_c();
343 init_sub_rel_pixel_mask_pt_funcs_c();
344 init_sub_rel_color_pt_funcs_c();
345 init_sub_rel_mask_color_pt_funcs_c();
346#endif
347}
348
349static void
350op_sub_rel_shutdown(void)
351{
352}
353
354static RGBA_Gfx_Func
355sub_rel_gfx_span_func_cpu(int s, int m, int c, int d)
356{
357 RGBA_Gfx_Func func = NULL;
358 int cpu = CPU_N;
359#ifdef BUILD_MMX
360 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
361 {
362 cpu = CPU_MMX;
363 func = op_sub_rel_span_funcs[s][m][c][d][cpu];
364 if (func) return func;
365 }
366#endif
367#ifdef BUILD_C
368 cpu = CPU_C;
369 func = op_sub_rel_span_funcs[s][m][c][d][cpu];
370 if (func) return func;
371#endif
372 return func;
373}
374
375static RGBA_Gfx_Func
376op_sub_rel_pixel_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
377{
378 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
379
380 if (src && src->cache_entry.flags.alpha)
381 s = SP;
382 if (dst && dst->cache_entry.flags.alpha)
383 d = DP;
384 return sub_rel_gfx_span_func_cpu(s, m, c, d);
385}
386
387static RGBA_Gfx_Func
388op_sub_rel_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
389{
390 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
391
392 if ((col >> 24) < 255)
393 c = SC;
394 if (col == (col | 0x00ffffff))
395 c = SC_AA;
396 if (col == 0xffffffff)
397 c = SC_N;
398 if (dst && dst->cache_entry.flags.alpha)
399 d = DP;
400 return sub_rel_gfx_span_func_cpu(s, m, c, d);
401}
402
403static RGBA_Gfx_Func
404op_sub_rel_pixel_color_span_get(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
405{
406 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
407
408 if (src && src->cache_entry.flags.alpha)
409 s = SP;
410 if ((col >> 24) < 255)
411 c = SC;
412 if (col == (col | 0x00ffffff))
413 c = SC_AA;
414 if (col == 0xffffffff)
415 c = SC_N;
416 if (dst && dst->cache_entry.flags.alpha)
417 d = DP;
418 return sub_rel_gfx_span_func_cpu(s, m, c, d);
419}
420
421static RGBA_Gfx_Func
422op_sub_rel_mask_color_span_get(DATA32 col, RGBA_Image *dst, int pixels __UNUSED__)
423{
424 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
425
426 if ((col >> 24) < 255)
427 c = SC;
428 if (col == (col | 0x00ffffff))
429 c = SC_AA;
430 if (col == 0xffffffff)
431 c = SC_N;
432 if (dst && dst->cache_entry.flags.alpha)
433 d = DP;
434 return sub_rel_gfx_span_func_cpu(s, m, c, d);
435}
436
437static RGBA_Gfx_Func
438op_sub_rel_pixel_mask_span_get(RGBA_Image *src, RGBA_Image *dst, int pixels __UNUSED__)
439{
440 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
441
442 if (src && src->cache_entry.flags.alpha)
443 s = SP;
444 if (dst && dst->cache_entry.flags.alpha)
445 d = DP;
446 return sub_rel_gfx_span_func_cpu(s, m, c, d);
447}
448
449static RGBA_Gfx_Pt_Func
450sub_rel_gfx_pt_func_cpu(int s, int m, int c, int d)
451{
452 RGBA_Gfx_Pt_Func func = NULL;
453 int cpu = CPU_N;
454#ifdef BUILD_MMX
455 if (evas_common_cpu_has_feature(CPU_FEATURE_MMX))
456 {
457 cpu = CPU_MMX;
458 func = op_sub_rel_pt_funcs[s][m][c][d][cpu];
459 if (func) return func;
460 }
461#endif
462#ifdef BUILD_C
463 cpu = CPU_C;
464 func = op_sub_rel_pt_funcs[s][m][c][d][cpu];
465 if (func) return func;
466#endif
467 return func;
468}
469
470static RGBA_Gfx_Pt_Func
471op_sub_rel_pixel_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
472{
473 int s = SP_AN, m = SM_N, c = SC_N, d = DP_AN;
474
475 if (src_flags.alpha)
476 s = SP;
477 if (dst && dst->cache_entry.flags.alpha)
478 d = DP;
479 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
480}
481
482static RGBA_Gfx_Pt_Func
483op_sub_rel_color_pt_get(DATA32 col, RGBA_Image *dst)
484{
485 int s = SP_N, m = SM_N, c = SC_AN, d = DP_AN;
486
487 if ((col >> 24) < 255)
488 c = SC;
489 if (col == (col | 0x00ffffff))
490 c = SC_AA;
491 if (col == 0xffffffff)
492 c = SC_N;
493 if (dst && dst->cache_entry.flags.alpha)
494 d = DP;
495 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
496}
497
498static RGBA_Gfx_Pt_Func
499op_sub_rel_pixel_color_pt_get(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst)
500{
501 int s = SP_AN, m = SM_N, c = SC_AN, d = DP_AN;
502
503 if (src_flags.alpha)
504 s = SP;
505 if ((col >> 24) < 255)
506 c = SC;
507 if (col == (col | 0x00ffffff))
508 c = SC_AA;
509 if (col == 0xffffffff)
510 c = SC_N;
511 if (dst && dst->cache_entry.flags.alpha)
512 d = DP;
513 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
514}
515
516static RGBA_Gfx_Pt_Func
517op_sub_rel_mask_color_pt_get(DATA32 col, RGBA_Image *dst)
518{
519 int s = SP_N, m = SM_AS, c = SC_AN, d = DP_AN;
520
521 if ((col >> 24) < 255)
522 c = SC;
523 if (col == (col | 0x00ffffff))
524 c = SC_AA;
525 if (col == 0xffffffff)
526 c = SC_N;
527 if (dst && dst->cache_entry.flags.alpha)
528 d = DP;
529 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
530}
531
532static RGBA_Gfx_Pt_Func
533op_sub_rel_pixel_mask_pt_get(Image_Entry_Flags src_flags, RGBA_Image *dst)
534{
535 int s = SP_AN, m = SM_AS, c = SC_N, d = DP_AN;
536
537 if (src_flags.alpha)
538 s = SP;
539 if (dst && dst->cache_entry.flags.alpha)
540 d = DP;
541 return sub_rel_gfx_pt_func_cpu(s, m, c, d);
542}
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 @@
1// THIS IS DEPRECATED. WILL GO EVENTUALLTY. NO NEED TO SUPPORT ANYMORE
2
3#include "evas_common.h"
4#include <unistd.h>
5
6#ifdef BUILD_PIPE_RENDER
7
8#ifdef EVAS_FRAME_QUEUING
9#define SCALECACHE
10static Evas_FrameQ gframeq; // global frameQ
11
12static Evas_Surface *
13evas_common_surface_alloc(void *surface, int x, int y, int w, int h)
14{
15 Evas_Surface *e_surface;
16
17 e_surface = calloc(1, sizeof(Evas_Surface));
18 e_surface->im = surface;
19 LKL(e_surface->im->cache_entry.ref_fq_add);
20 e_surface->im->cache_entry.ref_fq[0]++;
21 LKU(e_surface->im->cache_entry.ref_fq_add);
22 e_surface->x = x;
23 e_surface->y = y;
24 e_surface->w = w;
25 e_surface->h = h;
26
27 return e_surface;
28}
29
30static void
31evas_common_surface_dealloc(Evas_Surface *surface)
32{
33 Evas_Surface *d_surface;
34
35 while (surface)
36 {
37 d_surface = surface;
38 surface = (Evas_Surface *)eina_inlist_remove(EINA_INLIST_GET(surface), EINA_INLIST_GET(d_surface));
39 LKL(d_surface->im->cache_entry.ref_fq_del);
40 d_surface->im->cache_entry.ref_fq[1]++;
41 LKU(d_surface->im->cache_entry.ref_fq_del);
42 free(d_surface);
43 }
44}
45
46static void
47evas_common_surface_add(Evas_Frame *frame, Evas_Surface *surface)
48{
49 frame->surfaces = (Evas_Surface *)eina_inlist_append(EINA_INLIST_GET(frame->surfaces), EINA_INLIST_GET(surface));
50}
51
52static Evas_Frame *
53evas_common_frame_alloc(void)
54{
55 Evas_Frame *frame;
56
57 frame = calloc(1, sizeof(Evas_Frame));
58 frame->surfaces = NULL;
59 return frame;
60}
61
62static void
63evas_common_frame_dealloc(Evas_Frame *frame)
64{
65 evas_common_surface_dealloc(frame->surfaces);
66 free(frame);
67}
68
69static void
70evas_common_frame_add(Evas_FrameQ *frameq, Evas_Frame *frame)
71{
72 Evas_Frame *temp_frame;
73
74 LKL(frameq->mutex);
75 while ((int)eina_inlist_count(EINA_INLIST_GET(frameq->frames)) >= frameq->frameq_sz)
76 {
77 /* wait a worker thread finish previous frame */
78 eina_condition_wait(&(frameq->cond_done));
79 }
80 frameq->frames = (Evas_Frame *) eina_inlist_append(EINA_INLIST_GET(frameq->frames), EINA_INLIST_GET(frame));
81
82 // this frame need not to be scheduled for flushing time
83 EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame)
84 {
85 if (!temp_frame->ready)
86 {
87 break;
88 }
89 }
90 if (temp_frame && temp_frame == frame)
91 frame->dont_schedule = 1;
92
93 LKU(frameq->mutex);
94
95 eina_condition_signal(&(frameq->cond_new));
96}
97
98EAPI Evas_Surface *
99evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h)
100{
101 return evas_common_surface_alloc(surface, x, y, w, h);
102}
103
104EAPI void
105evas_common_frameq_add_surface(Evas_Surface *surface)
106{
107 evas_common_surface_add(gframeq.cur_frame, surface);
108}
109
110EAPI void
111evas_common_frameq_set_frame_data(void *data,
112 void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h),
113 void (*fn_output_flush) (void *data),
114 void (*fn_output_set_priv)(void *data, void *cur, void *prev))
115{
116 if (gframeq.cur_frame)
117 {
118 gframeq.cur_frame->data = data;
119 gframeq.cur_frame->output_redraws_next_update_push = fn_output_redraws_next_update_push;
120 gframeq.cur_frame->output_flush = fn_output_flush;
121 gframeq.cur_frame->output_set_priv = fn_output_set_priv;
122 }
123}
124
125EAPI void
126evas_common_frameq_prepare_frame(void)
127{
128 if (!gframeq.cur_frame )
129 {
130 gframeq.cur_frame = evas_common_frame_alloc();
131 }
132}
133
134EAPI void
135evas_common_frameq_ready_frame(void)
136{
137 if (gframeq.cur_frame)
138 {
139 evas_common_frame_add(&gframeq, gframeq.cur_frame);
140 gframeq.cur_frame = NULL; // create a new frame for the next frame later
141 }
142}
143
144
145EAPI void
146evas_common_frameq_init(void)
147{
148 gframeq.frames = NULL;
149 LKI(gframeq.mutex);
150 eina_condition_new(&(gframeq.cond_new), &(gframeq.mutex));
151 eina_condition_new(&(gframeq.cond_ready), &(gframeq.mutex));
152 eina_condition_new(&(gframeq.cond_done), &(gframeq.mutex));
153 gframeq.initialised = 0; // worker thread are not created yet
154 gframeq.frameq_sz = 1; // this value ensures the first frame can be enqueued.
155}
156
157EAPI void
158evas_common_frameq_destroy(void)
159{
160#if 0 // let them destroyed indirectly with program exit
161 LKL(gframeq.mutex);
162 eina_condition_free(&(gframeq.cond_new));
163 eina_condition_free(&(gframeq.cond_ready));
164 eina_condition_free(&(gframeq.cond_done));
165 LKU(gframeq.mutex);
166#endif
167 LKD(gframeq.mutex);
168
169 gframeq.frames = NULL;
170 gframeq.initialised = 0;
171}
172
173EAPI void
174evas_common_frameq_flush(void)
175{
176 if (! evas_common_frameq_enabled())
177 return;
178
179 LKL(gframeq.mutex);
180 while(eina_inlist_count(EINA_INLIST_GET(gframeq.frames)) > 0)
181 {
182 /* wait a worker thread finish previous frame */
183 eina_condition_wait(&(gframeq.cond_done));
184 }
185 LKU(gframeq.mutex);
186}
187
188
189EAPI void
190evas_common_frameq_flush_ready(void)
191{
192 return;
193}
194
195EAPI int
196evas_common_frameq_get_frameq_sz(void)
197{
198 return gframeq.frameq_sz;
199}
200
201EAPI int
202evas_common_frameq_enabled(void)
203{
204 return gframeq.initialised;
205}
206#endif
207
208static RGBA_Pipe *evas_common_pipe_add(RGBA_Pipe *pipe, RGBA_Pipe_Op **op);
209static void evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op);
210static void evas_common_pipe_op_free(RGBA_Pipe_Op *op);
211
212/* utils */
213static RGBA_Pipe *
214evas_common_pipe_add(RGBA_Pipe *rpipe, RGBA_Pipe_Op **op)
215{
216 RGBA_Pipe *p;
217 int first_pipe = 0;
218
219 if (!rpipe)
220 {
221 first_pipe = 1;
222 p = calloc(1, sizeof(RGBA_Pipe));
223 if (!p) return NULL;
224 rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p));
225 }
226 p = (RGBA_Pipe *)(EINA_INLIST_GET(rpipe))->last;
227 if (p->op_num == PIPE_LEN)
228 {
229 p = calloc(1, sizeof(RGBA_Pipe));
230 if (!p) return NULL;
231 rpipe = (RGBA_Pipe *)eina_inlist_append(EINA_INLIST_GET(rpipe), EINA_INLIST_GET(p));
232 }
233 p->op_num++;
234 *op = &(p->op[p->op_num - 1]);
235 if (first_pipe)
236 {
237 /* FIXME: PTHREAD init any thread locks etc */
238 }
239 return rpipe;
240}
241
242static void
243evas_common_pipe_draw_context_copy(RGBA_Draw_Context *dc, RGBA_Pipe_Op *op)
244{
245 memcpy(&(op->context), dc, sizeof(RGBA_Draw_Context));
246 if (op->context.cutout.active > 0)
247 {
248 op->context.cutout.rects = malloc(sizeof(Cutout_Rect) * op->context.cutout.active);
249 memcpy(op->context.cutout.rects, dc->cutout.rects, sizeof(Cutout_Rect) * op->context.cutout.active);
250 }
251 else
252 {
253 op->context.cutout.rects = NULL;
254 }
255}
256
257static void
258evas_common_pipe_op_free(RGBA_Pipe_Op *op)
259{
260 evas_common_draw_context_apply_clean_cutouts(&op->context.cutout);
261}
262
263#ifdef BUILD_PTHREAD
264/* main api calls */
265static void *
266evas_common_pipe_thread(void *data)
267{
268 Thinfo *thinfo;
269
270// INF("TH [...........");
271 thinfo = data;
272 for (;;)
273 {
274 RGBA_Pipe_Thread_Info *info;
275 RGBA_Pipe *p;
276
277 /* wait for start signal */
278// INF(" TH %i START...", thinfo->thread_num);
279 pthread_barrier_wait(&(thinfo->barrier[0]));
280 info = thinfo->info;
281// if (info)
282// {
283// thinfo->info = NULL;
284// INF(" TH %i GO", thinfo->thread_num);
285 EINA_INLIST_FOREACH(EINA_INLIST_GET(info->im->cache_entry.pipe), p)
286 {
287 int i;
288
289 for (i = 0; i < p->op_num; i++)
290 {
291 if (p->op[i].op_func)
292 p->op[i].op_func(info->im, &(p->op[i]), info);
293 }
294 }
295 free(info);
296// }
297// INF(" TH %i DONE", thinfo->thread_num);
298 /* send finished signal */
299 pthread_barrier_wait(&(thinfo->barrier[1]));
300 }
301 return NULL;
302}
303
304#ifdef EVAS_FRAME_QUEUING
305static void
306evas_common_frameq_release(void *data)
307{
308 Evas_FrameQ *frameq;
309 Evas_Frameq_Thread_Info *fq_info;
310 Thinfo *thinfo;
311
312 thinfo = data;
313 fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info);
314 frameq = fq_info->frameq;
315
316 /* This thread may or may not own the mutex.
317 * But there's no way to determine the ownership of the mutex, so release it anyway
318 */
319 LKU(frameq->mutex);
320}
321
322static void *
323evas_common_frameq_thread(void *data)
324{
325 Evas_FrameQ *frameq;
326 Evas_Frame *frame;
327 Evas_Surface *surface;
328 RGBA_Pipe *p;
329 Thinfo *thinfo;
330 Evas_Frameq_Thread_Info *fq_info;
331 RGBA_Pipe_Thread_Info p_info;
332
333 thinfo = data;
334 fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info);
335 frameq = fq_info->frameq;
336
337 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
338 pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
339 /* install thread cancelation cleanup handler */
340 pthread_cleanup_push(evas_common_frameq_release, data);
341
342 for (;;)
343 {
344 frame = NULL;
345
346 /* 1. pick a frame to draw */
347 LKL(frameq->mutex);
348 while(!frame)
349 {
350 EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), frame)
351 {
352 if (!frame->in_process)
353 {
354 frame->in_process = 1;
355 break;
356 }
357 }
358 if (frame)
359 {
360 break;
361 }
362 pthread_testcancel();
363 eina_condition_wait(&(frameq->cond_new));
364 }
365 LKU(frameq->mutex);
366
367 /* 2. draw selected frame */
368 EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface)
369 {
370 p_info.im = surface->im;
371 p_info.x = 0;
372 p_info.y = 0;
373 p_info.w = surface->im->cache_entry.w;
374 p_info.h = surface->im->cache_entry.h;
375
376 EINA_INLIST_FOREACH(EINA_INLIST_GET(p_info.im->cache_entry.pipe), p)
377 {
378 int i;
379
380 for (i = 0; i < p->op_num; i++)
381 {
382 if (p->op[i].op_func)
383 {
384 p->op[i].op_func(p_info.im, &(p->op[i]), &p_info);
385 }
386 }
387 }
388
389 /* push surface out */
390 if (! surface->dontpush)
391 {
392 frame->output_redraws_next_update_push(frame->data,
393 surface->im, surface->x, surface->y, surface->w, surface->h);
394 }
395 }
396
397 // record frame ready time, will be used in post worker thread, evas_common_frameq_thread_post()
398 gettimeofday(&frame->ready_time, NULL);
399
400 LKL(frameq->mutex);
401 frame->ready = 1;
402 eina_condition_signal(&(frameq->cond_ready));
403 LKU(frameq->mutex);
404 }
405
406 // Remove cleanup handler
407 pthread_cleanup_pop(0);
408 return NULL;
409}
410
411
412#define INTERVAL_QSIZE 17 // Actual size is 'INTERVAL_QSIZE - 1' because of not using index
413#define SATISFACTION_THRESHOLD 4 // 4 ms --> 250 FPS
414#define RESET_RATIO 4 // RESET_RATIO * [Average Ready Gap | get_max_interval()] --> Reset Threshold
415#define DOUBLE_RESET_TIME_INTERVAL_THRESHOLD 16000 // make it double in case of less 16ms
416#define RESET_ABSOLUTE_INTERVAL 600000 // 600 msec
417
418struct iq_node
419{
420 long long rt;
421 long long ri;
422};
423
424static struct iq_node _IQ[INTERVAL_QSIZE];
425static int _IQ_head = 0, _IQ_tail = 0;
426static int _IQ_length = 0;
427static long long min_ready, max_ready;
428static long long average_interval;
429
430static int
431_IQ_next_index(int i)
432{
433 return (i + 1) % INTERVAL_QSIZE;
434}
435
436static int
437_IQ_previous_index(int i)
438{
439 if (--i < 0) i += INTERVAL_QSIZE;
440 return i;
441}
442
443static void
444_IQ_init(void)
445{
446 _IQ_length = _IQ_head = _IQ_tail = 0;
447 min_ready = LLONG_MAX, max_ready = LLONG_MIN;
448 average_interval = 0;
449}
450
451static int
452_IQ_empty(void)
453{
454 return (_IQ_head == _IQ_tail) ? 1 : 0;
455}
456
457static int
458_IQ_full(void)
459{
460 return (_IQ_head == ((_IQ_tail + 1) % INTERVAL_QSIZE)) ? 1 : 0;
461}
462
463static void
464_IQ_insert(long long ready_time, long long last_interval)
465{
466 if (_IQ_full()) return;
467
468 if (_IQ_empty())
469 {
470 if (last_interval < 0)
471 {
472 last_interval = -last_interval;
473 }
474 _IQ[_IQ_tail].rt = ready_time;
475 _IQ[_IQ_tail].ri = last_interval;
476 min_ready = ready_time - last_interval;
477 max_ready = ready_time;
478 _IQ_tail = _IQ_next_index(_IQ_tail);
479 _IQ_length++;
480 }
481 else
482 {
483 if (max_ready < ready_time)
484 {
485 _IQ[_IQ_tail].rt = ready_time;
486 _IQ[_IQ_tail].ri = ready_time - max_ready;
487 _IQ_tail = _IQ_next_index(_IQ_tail);
488 _IQ_length++;
489 max_ready = ready_time;
490 }
491 else if (ready_time < min_ready)
492 {
493 last_interval = _IQ[_IQ_head].ri;
494 _IQ[_IQ_head].ri = _IQ[_IQ_head].rt - ready_time;
495 _IQ_head = _IQ_previous_index(_IQ_head);
496 _IQ[_IQ_head].rt = ready_time;
497 _IQ[_IQ_head].ri = last_interval;
498 min_ready = ready_time;
499 _IQ_length++;
500 }
501 else
502 {
503 int i, j, k, l = 0;
504 for (i = _IQ_head; i != _IQ_tail; i = j)
505 {
506 j = _IQ_next_index(i);
507 if (_IQ[j].rt < ready_time)
508 {
509 continue;
510 }
511 break;
512 }
513 for (k = _IQ_tail; k != j; k = l)
514 {
515 l = _IQ_previous_index(k);
516 _IQ[k] = _IQ[l];
517 }
518 i = _IQ_next_index(j);
519 _IQ[j].ri -= (_IQ[j].rt - ready_time);
520 _IQ[j].rt = ready_time;
521 _IQ[i].ri = _IQ[i].rt - ready_time;
522 _IQ_tail = _IQ_next_index(_IQ_tail);
523 _IQ_length++;
524 }
525 }
526 average_interval = (max_ready - min_ready) / _IQ_length;
527}
528
529static long long
530_IQ_delete(void)
531{
532 struct iq_node oldest;
533
534 if (_IQ_empty()) return 0;
535 oldest = _IQ[_IQ_head];
536 _IQ_head = (_IQ_head + 1) % INTERVAL_QSIZE;
537 if ((--_IQ_length) == 0)
538 {
539 _IQ_init();
540 }
541 else
542 {
543 min_ready = _IQ[_IQ_head].rt;
544 average_interval = (max_ready - min_ready) / _IQ_length;
545 }
546
547 return oldest.ri;
548}
549
550static long long
551get_max_interval(void)
552{
553 int i;
554 long long max = LLONG_MIN;
555
556 for ( i= _IQ_head ; i != _IQ_tail ; i = _IQ_next_index(i))
557 {
558 if (_IQ[i].ri > max)
559 {
560 max = _IQ[i].ri;
561 }
562 }
563
564 return max;
565}
566
567static long long
568tv_to_long_long(struct timeval *tv)
569{
570 if (!tv)
571 {
572 return 0;
573 }
574
575 return tv->tv_sec * 1000000LL + tv->tv_usec;
576}
577
578static long long
579evas_common_frameq_schedule_flush_time(int frameq_sz, int thread_no,
580 long long last_ready_time, long long current_ready_time,
581 long long last_flush_time, int ready_frames_num,
582 int dont_schedule)
583{
584 // to get each time and to do others
585 long long current_time = 0LL;
586 long long current_ready_interval = 0LL;
587 long long theshold_time = SATISFACTION_THRESHOLD * 1000LL; // ms -> usec
588 long long reset_time_interval = 0LL;
589 long long sleep_time = 0LL;
590 long long saved_ready_time, saved_ready_interval;
591 long long time_slept = 0LL;
592 static long long time_lag = 0;
593 struct timeval now;
594 int frameq_full_threshold =0;
595 int need_reset = 0;
596 int need_schedule = 0;
597
598 frameq_full_threshold = frameq_sz -thread_no; // Qsize - threads#
599
600 /* 1.5 defer flush time of current frame if need */
601 // in case of the first time, just keep ready time only
602 if (last_ready_time == 0LL)
603 {
604 last_ready_time = current_ready_time;
605 }
606 else
607 {
608 /* 1.5.1 get current ready time & interval */
609 saved_ready_time = current_ready_time;
610 saved_ready_interval = current_ready_interval = current_ready_time - last_ready_time;
611 // compensate a case which current ready time is older than previous one,
612 // doesn't work on the interval queue
613 if (current_ready_interval < 0)
614 {
615 current_ready_time = last_ready_time;
616 current_ready_interval = 0;
617 }
618
619 /* 1.5.2 get the reset time interval before keeping a new one */
620 if (!_IQ_empty())
621 {
622 reset_time_interval = RESET_RATIO * average_interval;
623 if (average_interval < DOUBLE_RESET_TIME_INTERVAL_THRESHOLD)
624 {
625 reset_time_interval *= 2;
626 }
627 }
628
629 /* 1.5.3 reset - if too late, discard all saved interval and start from here */
630 if (current_ready_interval > RESET_ABSOLUTE_INTERVAL)
631 {
632 need_reset = 1;
633 }
634 else if (_IQ_length >= thread_no * 2 && current_ready_interval > reset_time_interval)
635 {
636 need_reset = 1;
637 }
638 else if (_IQ_length >= thread_no && _IQ_length < thread_no * 2
639 && current_ready_interval > get_max_interval() * RESET_RATIO)
640 {
641 need_reset = 1;
642 }
643
644 if (need_reset)
645 {
646 _IQ_init();
647 }
648 else
649 {
650 /* 1.5.4 enqueue - keep a new interval for next average interval */
651 if (_IQ_full())
652 {
653 _IQ_delete();
654 }
655 _IQ_insert(saved_ready_time, saved_ready_interval);
656
657 /* 1.5.5 schedule - if faster than average interval, figure out sleep time to meet it */
658 if (!dont_schedule)
659 {
660 need_schedule = 0;
661 sleep_time = 0;
662 if (_IQ_length >= thread_no * 2 && average_interval > theshold_time)
663 {
664 need_schedule = 1;
665 }
666 // compensate the case that postworker blocks the workers from getting a new fresh frame
667 // It's actually occurred when during the wait time of postworker, the frame queue is full
668 // Consequently check the number of currently ready frames and apply some time drop to average time according to the number
669 if (ready_frames_num >= frameq_full_threshold)
670 {
671 need_schedule = 0;
672 }
673 if (need_schedule)
674 {
675 gettimeofday(&now, NULL);
676 current_time = tv_to_long_long(&now);
677 time_lag += (current_time - last_flush_time);
678 sleep_time = (average_interval < time_lag) ? 0 : (average_interval - time_lag);
679 }
680 }
681
682 /* 1.5.6 sleep - actually sleep and get over-slept time (time_lag) for next frame */
683 if (sleep_time > 0)
684 {
685 sleep_time = sleep_time * 9 / 10;
686 usleep((unsigned int)sleep_time);
687 gettimeofday(&now, NULL);
688 time_slept = tv_to_long_long(&now) - current_time;
689 time_lag = time_slept - sleep_time;
690 }
691 else
692 {
693 time_lag = 0;
694 }
695 }
696 last_ready_time = current_ready_time;
697 }
698
699 return last_ready_time;
700}
701
702static void *
703evas_common_frameq_thread_post(void *data)
704{
705 Evas_FrameQ *frameq;
706 Evas_Frame *frame;
707 Evas_Surface *surface;
708 Thinfo *thinfo;
709 Evas_Frameq_Thread_Info *fq_info;
710 Eina_List *pending_writes = NULL;
711 Eina_List *prev_pending_writes = NULL;
712
713 long long last_ready_time = 0LL;
714 long long current_ready_time;
715 Evas_Frame *temp_frame = NULL;
716 int ready_frames_num;
717 long long last_flush_time = 0LL;
718 struct timeval now;
719 int dont_schedule = 0;
720
721 thinfo = data;
722 fq_info = (Evas_Frameq_Thread_Info *)(thinfo->fq_info);
723 frameq = fq_info->frameq;
724
725 pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
726 pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
727 /* install thread cancelation cleanup handler */
728 pthread_cleanup_push(evas_common_frameq_release, data);
729
730 _IQ_init();
731
732 for (;;)
733 {
734 /* 1. wait the first frame being done */
735 LKL(frameq->mutex);
736 while(!frameq->frames || !frameq->frames->ready)
737 {
738 eina_condition_wait(&(frameq->cond_ready));
739 }
740 frame = frameq->frames;
741
742 /* 1.5. prepare to schedule flush time */
743 current_ready_time = tv_to_long_long(&frame->ready_time);
744 ready_frames_num = 0;
745 EINA_INLIST_FOREACH(EINA_INLIST_GET(frameq->frames), temp_frame)
746 {
747 if (temp_frame->ready == 1)
748 {
749 ready_frames_num++;
750 }
751 }
752 dont_schedule = (frame->dont_schedule)?1:0;
753 LKU(frameq->mutex);
754
755 /* 2. generate pending_writes */
756 EINA_INLIST_FOREACH(EINA_INLIST_GET(frame->surfaces), surface)
757 {
758 evas_common_pipe_flush(surface->im);
759 if (! surface->dontpush)
760 {
761 pending_writes = eina_list_append(pending_writes, surface->im);
762 }
763 }
764
765 /* 2.5. schedule flush time */
766 last_ready_time = evas_common_frameq_schedule_flush_time(
767 frameq->frameq_sz, frameq->thread_num,
768 last_ready_time, current_ready_time,
769 last_flush_time, ready_frames_num, dont_schedule);
770
771 /* 3. flush redraws */
772 frame->output_set_priv(frame->data, pending_writes, prev_pending_writes);
773 frame->output_flush(frame->data);
774 gettimeofday(&now, NULL);
775 // keep as the last flush time
776 last_flush_time = now.tv_sec * 1000000LL + now.tv_usec;
777
778 prev_pending_writes = pending_writes;
779 pending_writes = NULL;
780
781 /* 4. remove this frame from the frame queue */
782 LKL(frameq->mutex);
783 frameq->frames =
784 (Evas_Frame *)eina_inlist_remove(EINA_INLIST_GET(frameq->frames),
785 EINA_INLIST_GET(frame));
786
787 LKU(frameq->mutex);
788 eina_condition_broadcast(&frameq->cond_done);
789 evas_common_frame_dealloc(frame);
790 }
791
792 // Remove cleanup handler
793 pthread_cleanup_pop(0);
794 return NULL;
795}
796
797#endif /* EVAS_FRAME_QUEUING */
798#endif
799
800#ifdef BUILD_PTHREAD
801static int thread_num = 0;
802static Thinfo thinfo[TH_MAX];
803static pthread_barrier_t thbarrier[2];
804#endif
805
806static void
807evas_common_pipe_begin(RGBA_Image *im)
808{
809#ifdef BUILD_PTHREAD
810 int i, y, h;
811
812#ifdef EVAS_FRAME_QUEUING
813 return;
814#endif
815
816 if (!im->cache_entry.pipe) return;
817 if (thread_num == 1) return;
818 y = 0;
819 h = im->cache_entry.h / thread_num;
820 if (h < 1) h = 1;
821 for (i = 0; i < thread_num; i++)
822 {
823 RGBA_Pipe_Thread_Info *info;
824
825// if (y >= im->cache_entry.h) break;
826 info = calloc(1, sizeof(RGBA_Pipe_Thread_Info));
827 info->im = im;
828#ifdef EVAS_SLI
829 info->x = 0;
830 info->w = im->cache_entry.w;
831 info->y = i;
832 info->h = thread_num;
833#else
834 info->x = 0;
835 info->y = y;
836 info->w = im->cache_entry.w;
837 if (i == (thread_num - 1))
838 {
839 info->h = im->cache_entry.h - y;
840 }
841 else
842 {
843 info->h = h;
844 }
845 y += info->h;
846#endif
847 thinfo[i].info = info;
848 }
849 /* tell worker threads to start */
850 pthread_barrier_wait(&(thbarrier[0]));
851#endif
852}
853
854#ifdef EVAS_FRAME_QUEUING
855EAPI void
856evas_common_frameq_begin(void)
857{
858#ifdef BUILD_PTHREAD
859 int i;
860 Evas_Frameq_Thread_Info *fp_info;
861 pthread_attr_t attr;
862 cpu_set_t cpu;
863
864 if (!gframeq.initialised)
865 {
866 int cpunum, set_cpu_affinity = 0;
867
868 cpunum = eina_cpu_count();
869 gframeq.thread_num = cpunum;
870 gframeq.frameq_sz = cpunum * FRAMEQ_SZ_PER_THREAD;
871
872 eina_threads_init();
873
874 for (i = 0; i < gframeq.thread_num; i++)
875 {
876
877 fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info));
878 fp_info->frameq = &gframeq;
879
880 gframeq.thinfo[i].thread_num = i;
881 gframeq.thinfo[i].fq_info = fp_info;
882
883 pthread_attr_init(&attr);
884 if (set_cpu_affinity)
885 {
886 CPU_ZERO(&cpu);
887 CPU_SET((i+1) % cpunum, &cpu);
888 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
889 }
890
891 pthread_create(&(gframeq.thinfo[i].thread_id), &attr,
892 evas_common_frameq_thread, &(gframeq.thinfo[i]));
893
894 pthread_attr_destroy(&attr);
895 pthread_detach(gframeq.thinfo[i].thread_id);
896 }
897
898 {
899 fp_info = calloc(1, sizeof(Evas_Frameq_Thread_Info));
900 fp_info->frameq = &gframeq;
901
902 gframeq.thinfo[i].thread_num = i;
903 gframeq.thinfo[i].fq_info = fp_info;
904
905 pthread_attr_init(&attr);
906 if (set_cpu_affinity)
907 {
908 CPU_ZERO(&cpu);
909 CPU_SET((i+1) % cpunum, &cpu);
910 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
911 }
912
913 pthread_create(&(gframeq.thinfo[i].thread_id), &attr,
914 evas_common_frameq_thread_post, &(gframeq.thinfo[i]));
915 pthread_attr_destroy(&attr);
916 pthread_detach(gframeq.thinfo[i].thread_id);
917 }
918 gframeq.initialised = 1; // now worker threads are created.
919
920 INF("initialised");
921 DBG("%d cpus, set_cpu_affinity=%d, frameq_sz=%d",
922 cpunum, set_cpu_affinity, gframeq.frameq_sz);
923 }
924#endif /* BUILD_PTHREAD */
925}
926
927EAPI void
928evas_common_frameq_finish(void)
929{
930 int i;
931
932 /* 1. cancel all worker threads */
933 for (i = 0; i < gframeq.thread_num; i++)
934 {
935 pthread_cancel(gframeq.thinfo[i].thread_id);
936 }
937 // cancel post-worker thread
938 pthread_cancel(gframeq.thinfo[i].thread_id);
939
940 /* 2. send signal to worker threads so that they enter to the thread cancelation cleanup handler */
941 for (i = 0; i < gframeq.thread_num; i++)
942 {
943 eina_condition_signal(&(gframeq.cond_new));
944 }
945 // send signal to post-worker thread
946 eina_condition_signal(&(gframeq.cond_ready));
947
948 /* all the workers were created and detached before
949 * so don't need to join them here.
950 */
951
952}
953
954#endif /* EVAS_FRAME_QUEUING */
955
956EAPI void
957evas_common_pipe_flush(RGBA_Image *im)
958{
959 if (!im->cache_entry.pipe) return;
960#ifndef EVAS_FRAME_QUEUING
961#ifdef BUILD_PTHREAD
962 if (thread_num > 1)
963 {
964 /* sync worker threads */
965 pthread_barrier_wait(&(thbarrier[1]));
966 }
967 else
968#endif
969 {
970 RGBA_Pipe *p;
971 int i;
972
973 /* process pipe - 1 thead */
974 for (p = im->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next)
975 {
976 for (i = 0; i < p->op_num; i++)
977 {
978 if (p->op[i].op_func)
979 {
980 p->op[i].op_func(im, &(p->op[i]), NULL);
981 }
982 }
983 }
984 }
985#endif /* !EVAS_FRAME_QUEUING */
986 evas_common_cpu_end_opt();
987 evas_common_pipe_free(im);
988}
989
990EAPI void
991evas_common_pipe_free(RGBA_Image *im)
992{
993
994 RGBA_Pipe *p;
995 int i;
996
997 if (!im->cache_entry.pipe) return;
998 /* FIXME: PTHREAD join all threads here (if not finished) */
999
1000 /* free pipe */
1001 while (im->cache_entry.pipe)
1002 {
1003 p = im->cache_entry.pipe;
1004 for (i = 0; i < p->op_num; i++)
1005 {
1006 if (p->op[i].free_func)
1007 {
1008 p->op[i].free_func(&(p->op[i]));
1009 }
1010 }
1011 im->cache_entry.pipe = (RGBA_Pipe *)eina_inlist_remove(EINA_INLIST_GET(im->cache_entry.pipe), EINA_INLIST_GET(p));
1012 free(p);
1013 }
1014}
1015
1016
1017
1018/* draw ops */
1019/**************** RECT ******************/
1020static void
1021evas_common_pipe_rectangle_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1022{
1023 if (info)
1024 {
1025 RGBA_Draw_Context context;
1026
1027 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1028#ifdef EVAS_SLI
1029 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1030#else
1031 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1032#endif
1033 evas_common_rectangle_draw(dst, &(context),
1034 op->op.rect.x, op->op.rect.y,
1035 op->op.rect.w, op->op.rect.h);
1036 }
1037 else
1038 {
1039 evas_common_rectangle_draw(dst, &(op->context),
1040 op->op.rect.x, op->op.rect.y,
1041 op->op.rect.w, op->op.rect.h);
1042 }
1043}
1044
1045EAPI void
1046evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
1047{
1048 RGBA_Pipe_Op *op;
1049
1050 if ((w < 1) || (h < 1)) return;
1051 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1052 if (!dst->cache_entry.pipe) return;
1053 op->op.rect.x = x;
1054 op->op.rect.y = y;
1055 op->op.rect.w = w;
1056 op->op.rect.h = h;
1057 op->op_func = evas_common_pipe_rectangle_draw_do;
1058 op->free_func = evas_common_pipe_op_free;
1059 evas_common_pipe_draw_context_copy(dc, op);
1060}
1061
1062/**************** LINE ******************/
1063static void
1064evas_common_pipe_line_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1065{
1066 if (info)
1067 {
1068 RGBA_Draw_Context context;
1069
1070 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1071#ifdef EVAS_SLI
1072 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1073#else
1074 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1075#endif
1076 evas_common_line_draw(dst, &(context),
1077 op->op.line.x0, op->op.line.y0,
1078 op->op.line.x1, op->op.line.y1);
1079 }
1080 else
1081 {
1082 evas_common_line_draw(dst, &(op->context),
1083 op->op.line.x0, op->op.line.y0,
1084 op->op.line.x1, op->op.line.y1);
1085 }
1086}
1087
1088EAPI void
1089evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
1090 int x0, int y0, int x1, int y1)
1091{
1092 RGBA_Pipe_Op *op;
1093
1094 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1095 if (!dst->cache_entry.pipe) return;
1096 op->op.line.x0 = x0;
1097 op->op.line.y0 = y0;
1098 op->op.line.x1 = x1;
1099 op->op.line.y1 = y1;
1100 op->op_func = evas_common_pipe_line_draw_do;
1101 op->free_func = evas_common_pipe_op_free;
1102 evas_common_pipe_draw_context_copy(dc, op);
1103}
1104
1105/**************** POLY ******************/
1106static void
1107evas_common_pipe_op_poly_free(RGBA_Pipe_Op *op)
1108{
1109 RGBA_Polygon_Point *p;
1110
1111 while (op->op.poly.points)
1112 {
1113 p = op->op.poly.points;
1114 op->op.poly.points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(op->op.poly.points),
1115 EINA_INLIST_GET(p));
1116 free(p);
1117 }
1118 evas_common_pipe_op_free(op);
1119}
1120
1121static void
1122evas_common_pipe_poly_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1123{
1124 if (info)
1125 {
1126 RGBA_Draw_Context context;
1127
1128 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1129#ifdef EVAS_SLI
1130 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1131#else
1132 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1133#endif
1134 evas_common_polygon_draw(dst, &(context),
1135 op->op.poly.points, 0, 0);
1136 }
1137 else
1138 {
1139 evas_common_polygon_draw(dst, &(op->context),
1140 op->op.poly.points, 0, 0);
1141 }
1142}
1143
1144EAPI void
1145evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
1146 RGBA_Polygon_Point *points, int x, int y)
1147{
1148 RGBA_Pipe_Op *op;
1149 RGBA_Polygon_Point *pts = NULL, *p, *pp;
1150
1151 if (!points) return;
1152 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1153 if (!dst->cache_entry.pipe) return;
1154 /* FIXME: copy points - maybe we should refcount? */
1155 for (p = points; p; p = (RGBA_Polygon_Point *)(EINA_INLIST_GET(p))->next)
1156 {
1157 pp = calloc(1, sizeof(RGBA_Polygon_Point));
1158 if (pp)
1159 {
1160 pp->x = p->x + x;
1161 pp->y = p->y + y;
1162 pts = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(pts), EINA_INLIST_GET(pp));
1163 }
1164 }
1165 op->op.poly.points = pts;
1166 op->op_func = evas_common_pipe_poly_draw_do;
1167 op->free_func = evas_common_pipe_op_poly_free;
1168 evas_common_pipe_draw_context_copy(dc, op);
1169}
1170
1171/**************** TEXT ******************/
1172static void
1173evas_common_pipe_op_text_free(RGBA_Pipe_Op *op)
1174{
1175#ifdef EVAS_FRAME_QUEUING
1176 LKL(op->op.text.font->ref_fq_del);
1177 op->op.text.font->ref_fq[1]++;
1178 LKU(op->op.text.font->ref_fq_del);
1179 eina_condition_signal(&(op->op.text.font->cond_fq_del));
1180#else
1181 evas_common_font_free(op->op.text.font);
1182#endif
1183 evas_common_text_props_content_unref(&(op->op.text.intl_props));
1184 evas_common_pipe_op_free(op);
1185}
1186
1187#ifdef EVAS_FRAME_QUEUING
1188/* flush all op using @fn */
1189EAPI void
1190evas_common_pipe_op_text_flush(RGBA_Font *fn)
1191{
1192 if (! evas_common_frameq_enabled())
1193 return;
1194
1195 LKL(fn->ref_fq_add);
1196 LKL(fn->ref_fq_del);
1197
1198 while (fn->ref_fq[0] != fn->ref_fq[1])
1199 eina_condition_wait(&(fn->cond_fq_del));
1200
1201 LKU(fn->ref_fq_del);
1202 LKU(fn->ref_fq_add);
1203}
1204#endif
1205
1206static void
1207evas_common_pipe_text_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1208{
1209 if (info)
1210 {
1211 RGBA_Draw_Context context;
1212
1213 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1214#ifdef EVAS_SLI
1215 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1216#else
1217 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1218#endif
1219 evas_common_font_draw(dst, &(context),
1220 op->op.text.font, op->op.text.x, op->op.text.y,
1221 &op->op.text.intl_props);
1222 }
1223 else
1224 {
1225 evas_common_font_draw(dst, &(op->context),
1226 op->op.text.font, op->op.text.x, op->op.text.y,
1227 &op->op.text.intl_props);
1228 }
1229}
1230
1231EAPI void
1232evas_common_pipe_text_draw(RGBA_Image *dst, RGBA_Draw_Context *dc,
1233 RGBA_Font *fn, int x, int y, const Evas_Text_Props *intl_props)
1234{
1235 RGBA_Pipe_Op *op;
1236
1237 if (!fn) return;
1238 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1239 if (!dst->cache_entry.pipe) return;
1240 op->op.text.x = x;
1241 op->op.text.y = y;
1242 evas_common_text_props_content_copy_and_ref(&(op->op.text.intl_props),
1243 intl_props);
1244#ifdef EVAS_FRAME_QUEUING
1245 LKL(fn->ref_fq_add);
1246 fn->ref_fq[0]++;
1247 LKU(fn->ref_fq_add);
1248#else
1249 fn->references++;
1250#endif
1251 op->op.text.font = fn;
1252 op->op_func = evas_common_pipe_text_draw_do;
1253 op->free_func = evas_common_pipe_op_text_free;
1254 evas_common_pipe_draw_context_copy(dc, op);
1255}
1256
1257/**************** IMAGE *****************/
1258static void
1259evas_common_pipe_op_image_free(RGBA_Pipe_Op *op)
1260{
1261#ifdef EVAS_FRAME_QUEUING
1262 LKL(op->op.image.src->cache_entry.ref_fq_del);
1263 op->op.image.src->cache_entry.ref_fq[1]++;
1264 LKU(op->op.image.src->cache_entry.ref_fq_del);
1265 eina_condition_signal(&(op->op.image.src->cache_entry.cond_fq_del));
1266#else
1267 op->op.image.src->ref--;
1268 if (op->op.image.src->ref == 0)
1269 {
1270 evas_cache_image_drop(&op->op.image.src->cache_entry);
1271 }
1272#endif
1273 evas_common_pipe_op_free(op);
1274}
1275
1276#ifdef EVAS_FRAME_QUEUING
1277EAPI void
1278evas_common_pipe_op_image_flush(RGBA_Image *im)
1279{
1280 if (! evas_common_frameq_enabled())
1281 return;
1282
1283 LKL(im->cache_entry.ref_fq_add);
1284 LKL(im->cache_entry.ref_fq_del);
1285
1286 while (im->cache_entry.ref_fq[0] != im->cache_entry.ref_fq[1])
1287 eina_condition_wait(&(im->cache_entry.cond_fq_del));
1288
1289 LKU(im->cache_entry.ref_fq_del);
1290 LKU(im->cache_entry.ref_fq_add);
1291}
1292#endif
1293
1294static void
1295evas_common_pipe_image_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1296{
1297 if (info)
1298 {
1299 RGBA_Draw_Context context;
1300
1301 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1302#ifdef EVAS_SLI
1303 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1304#else
1305 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1306#endif
1307
1308#ifdef SCALECACHE
1309 evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src),
1310 dst, &(context),
1311 op->op.image.smooth,
1312 op->op.image.sx,
1313 op->op.image.sy,
1314 op->op.image.sw,
1315 op->op.image.sh,
1316 op->op.image.dx,
1317 op->op.image.dy,
1318 op->op.image.dw,
1319 op->op.image.dh);
1320#else
1321 if (op->op.image.smooth)
1322 {
1323 evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src,
1324 dst, &(context),
1325 op->op.image.sx,
1326 op->op.image.sy,
1327 op->op.image.sw,
1328 op->op.image.sh,
1329 op->op.image.dx,
1330 op->op.image.dy,
1331 op->op.image.dw,
1332 op->op.image.dh);
1333 }
1334 else
1335 {
1336 evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src,
1337 dst, &(context),
1338 op->op.image.sx,
1339 op->op.image.sy,
1340 op->op.image.sw,
1341 op->op.image.sh,
1342 op->op.image.dx,
1343 op->op.image.dy,
1344 op->op.image.dw,
1345 op->op.image.dh);
1346 }
1347#endif
1348 }
1349 else
1350 {
1351#ifdef SCALECACHE
1352 evas_common_rgba_image_scalecache_do((Image_Entry *)(op->op.image.src),
1353 dst, &(op->context),
1354 op->op.image.smooth,
1355 op->op.image.sx,
1356 op->op.image.sy,
1357 op->op.image.sw,
1358 op->op.image.sh,
1359 op->op.image.dx,
1360 op->op.image.dy,
1361 op->op.image.dw,
1362 op->op.image.dh);
1363#else
1364 if (op->op.image.smooth)
1365 {
1366 evas_common_scale_rgba_in_to_out_clip_smooth(op->op.image.src,
1367 dst, &(op->context),
1368 op->op.image.sx,
1369 op->op.image.sy,
1370 op->op.image.sw,
1371 op->op.image.sh,
1372 op->op.image.dx,
1373 op->op.image.dy,
1374 op->op.image.dw,
1375 op->op.image.dh);
1376 }
1377 else
1378 {
1379 evas_common_scale_rgba_in_to_out_clip_sample(op->op.image.src,
1380 dst, &(op->context),
1381 op->op.image.sx,
1382 op->op.image.sy,
1383 op->op.image.sw,
1384 op->op.image.sh,
1385 op->op.image.dx,
1386 op->op.image.dy,
1387 op->op.image.dw,
1388 op->op.image.dh);
1389 }
1390#endif
1391 }
1392}
1393
1394EAPI void
1395evas_common_pipe_image_draw(RGBA_Image *src, RGBA_Image *dst,
1396 RGBA_Draw_Context *dc, int smooth,
1397 int src_region_x, int src_region_y,
1398 int src_region_w, int src_region_h,
1399 int dst_region_x, int dst_region_y,
1400 int dst_region_w, int dst_region_h)
1401{
1402 RGBA_Pipe_Op *op;
1403
1404 if (!src) return;
1405// evas_common_pipe_flush(src);
1406 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1407 if (!dst->cache_entry.pipe) return;
1408 op->op.image.smooth = smooth;
1409 op->op.image.sx = src_region_x;
1410 op->op.image.sy = src_region_y;
1411 op->op.image.sw = src_region_w;
1412 op->op.image.sh = src_region_h;
1413 op->op.image.dx = dst_region_x;
1414 op->op.image.dy = dst_region_y;
1415 op->op.image.dw = dst_region_w;
1416 op->op.image.dh = dst_region_h;
1417#ifdef EVAS_FRAME_QUEUING
1418 LKL(src->cache_entry.ref_fq_add);
1419 src->cache_entry.ref_fq[0]++;
1420 LKU(src->cache_entry.ref_fq_add);
1421#else
1422 src->ref++;
1423#endif
1424 op->op.image.src = src;
1425 op->op_func = evas_common_pipe_image_draw_do;
1426 op->free_func = evas_common_pipe_op_image_free;
1427 evas_common_pipe_draw_context_copy(dc, op);
1428
1429#ifdef EVAS_FRAME_QUEUING
1430 /* laod every src image here.
1431 * frameq utilize all cpu cores already by worker threads
1432 * so another threads and barrier waiting can't be of any benefit.
1433 * therefore, not instantiate loader threads.
1434 */
1435 if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1436 evas_cache_image_load_data(&src->cache_entry);
1437 evas_common_image_colorspace_normalize(src);
1438#else
1439 evas_common_pipe_image_load(src);
1440#endif
1441}
1442
1443static void
1444evas_common_pipe_op_map_free(RGBA_Pipe_Op *op)
1445{
1446#ifdef EVAS_FRAME_QUEUING
1447 LKL(op->op.image.src->cache_entry.ref_fq_del);
1448 op->op.image.src->cache_entry.ref_fq[1]++;
1449 LKU(op->op.image.src->cache_entry.ref_fq_del);
1450#else
1451 op->op.map.src->ref--;
1452 if (op->op.map.src->ref == 0)
1453 evas_cache_image_drop(&op->op.map.src->cache_entry);
1454#endif
1455 free(op->op.map.p);
1456 evas_common_pipe_op_free(op);
1457}
1458
1459static void
1460evas_common_pipe_map_draw_do(RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info)
1461{
1462 if (info)
1463 {
1464 RGBA_Draw_Context context;
1465
1466 memcpy(&(context), &(op->context), sizeof(RGBA_Draw_Context));
1467#ifdef EVAS_SLI
1468 evas_common_draw_context_set_sli(&(context), info->y, info->h);
1469#else
1470 evas_common_draw_context_clip_clip(&(context), info->x, info->y, info->w, info->h);
1471#endif
1472
1473 evas_common_map_rgba(op->op.map.src, dst,
1474 &context, op->op.map.npoints, op->op.map.p,
1475 op->op.map.smooth, op->op.map.level);
1476 }
1477 else
1478 {
1479 evas_common_map_rgba(op->op.map.src, dst,
1480 &(op->context), op->op.map.npoints, op->op.map.p,
1481 op->op.map.smooth, op->op.map.level);
1482 }
1483}
1484
1485EAPI void
1486evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
1487 RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p,
1488 int smooth, int level)
1489{
1490 RGBA_Pipe_Op *op;
1491 RGBA_Map_Point *pts_copy;
1492 int i;
1493
1494 if (!src) return;
1495 pts_copy = malloc(sizeof (RGBA_Map_Point) * 4);
1496 if (!pts_copy) return;
1497 dst->cache_entry.pipe = evas_common_pipe_add(dst->cache_entry.pipe, &op);
1498 if (!dst->cache_entry.pipe)
1499 {
1500 free(pts_copy);
1501 return;
1502 }
1503
1504 for (i = 0; i < 4; ++i)
1505 pts_copy[i] = p[i];
1506
1507 op->op.map.npoints = npoints;
1508 op->op.map.smooth = smooth;
1509 op->op.map.level = level;
1510#ifdef EVAS_FRAME_QUEUING
1511 LKL(src->cache_entry.ref_fq_add);
1512 src->cache_entry.ref_fq[0]++;
1513 LKU(src->cache_entry.ref_fq_add);
1514#else
1515 src->ref++;
1516#endif
1517 op->op.map.src = src;
1518 op->op.map.p = pts_copy;
1519 op->op_func = evas_common_pipe_map_draw_do;
1520 op->free_func = evas_common_pipe_op_map_free;
1521 evas_common_pipe_draw_context_copy(dc, op);
1522
1523#ifdef EVAS_FRAME_QUEUING
1524 /* laod every src image here.
1525 * frameq utilize all cpu cores already by worker threads
1526 * so another threads and barrier waiting can't be of any benefit.
1527 * therefore, not instantiate loader threads.
1528 */
1529 if (src->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1530 evas_cache_image_load_data(&src->cache_entry);
1531 evas_common_image_colorspace_normalize(src);
1532#else
1533 evas_common_pipe_image_load(src);
1534#endif
1535}
1536
1537static void
1538evas_common_pipe_map_render(RGBA_Image *root)
1539{
1540 RGBA_Pipe *p;
1541 int i;
1542
1543 /* Map imply that we need to process them recursively first. */
1544 for (p = root->cache_entry.pipe; p; p = (RGBA_Pipe *)(EINA_INLIST_GET(p))->next)
1545 {
1546 for (i = 0; i < p->op_num; i++)
1547 {
1548 if (p->op[i].op_func == evas_common_pipe_map_draw_do)
1549 {
1550 if (p->op[i].op.map.src->cache_entry.pipe)
1551 evas_common_pipe_map_render(p->op[i].op.map.src);
1552 }
1553 else if (p->op[i].op_func == evas_common_pipe_image_draw_do)
1554 {
1555 if (p->op[i].op.image.src->cache_entry.pipe)
1556 evas_common_pipe_map_render(p->op[i].op.image.src);
1557 }
1558 }
1559 }
1560
1561 evas_common_pipe_begin(root);
1562 evas_common_pipe_flush(root);
1563}
1564
1565#ifdef BUILD_PTHREAD
1566static Eina_List *task = NULL;
1567static Thinfo task_thinfo[TH_MAX];
1568static pthread_barrier_t task_thbarrier[2];
1569static LK(task_mutext);
1570#endif
1571
1572#ifdef BUILD_PTHREAD
1573static void*
1574evas_common_pipe_load(void *data)
1575{
1576 Thinfo *tinfo;
1577
1578 tinfo = data;
1579 for (;;)
1580 {
1581 /* wait for start signal */
1582 pthread_barrier_wait(&(tinfo->barrier[0]));
1583
1584 while (task)
1585 {
1586 RGBA_Image *im = NULL;
1587
1588 LKL(task_mutext);
1589 im = eina_list_data_get(task);
1590 task = eina_list_remove_list(task, task);
1591 LKU(task_mutext);
1592
1593 if (im)
1594 {
1595 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1596 evas_cache_image_load_data(&im->cache_entry);
1597 evas_common_image_colorspace_normalize(im);
1598
1599 im->flags &= ~RGBA_IMAGE_TODO_LOAD;
1600 }
1601 }
1602
1603 /* send finished signal */
1604 pthread_barrier_wait(&(tinfo->barrier[1]));
1605 }
1606
1607 return NULL;
1608}
1609#endif
1610
1611static volatile int bval = 0;
1612
1613static void
1614evas_common_pipe_image_load_do(void)
1615{
1616#ifdef BUILD_PTHREAD
1617 /* Notify worker thread. */
1618 pthread_barrier_wait(&(task_thbarrier[0]));
1619
1620 /* sync worker threads */
1621 pthread_barrier_wait(&(task_thbarrier[1]));
1622#endif
1623}
1624
1625static Eina_Bool
1626evas_common_pipe_init(void)
1627{
1628#ifdef BUILD_PTHREAD
1629 if (thread_num == 0)
1630 {
1631 int cpunum;
1632 int i;
1633
1634 cpunum = eina_cpu_count();
1635 thread_num = cpunum;
1636// on single cpu we still want this initted.. otherwise we block forever
1637// waiting onm pthread barriers for async rendering on a single core!
1638// if (thread_num == 1) return EINA_FALSE;
1639
1640 eina_threads_init();
1641
1642 LKI(task_mutext);
1643
1644 pthread_barrier_init(&(thbarrier[0]), NULL, thread_num + 1);
1645 pthread_barrier_init(&(thbarrier[1]), NULL, thread_num + 1);
1646 for (i = 0; i < thread_num; i++)
1647 {
1648 pthread_attr_t attr;
1649 cpu_set_t cpu;
1650
1651 pthread_attr_init(&attr);
1652 CPU_ZERO(&cpu);
1653 CPU_SET(i % cpunum, &cpu);
1654 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
1655 thinfo[i].thread_num = i;
1656 thinfo[i].info = NULL;
1657 thinfo[i].barrier = thbarrier;
1658 /* setup initial locks */
1659 pthread_create(&(thinfo[i].thread_id), &attr,
1660 evas_common_pipe_thread, &(thinfo[i]));
1661 pthread_attr_destroy(&attr);
1662 }
1663
1664 pthread_barrier_init(&(task_thbarrier[0]), NULL, thread_num + 1);
1665 pthread_barrier_init(&(task_thbarrier[1]), NULL, thread_num + 1);
1666 for (i = 0; i < thread_num; i++)
1667 {
1668 pthread_attr_t attr;
1669 cpu_set_t cpu;
1670
1671 pthread_attr_init(&attr);
1672 CPU_ZERO(&cpu);
1673 CPU_SET(i % cpunum, &cpu);
1674 pthread_attr_setaffinity_np(&attr, sizeof(cpu), &cpu);
1675 task_thinfo[i].thread_num = i;
1676 task_thinfo[i].info = NULL;
1677 task_thinfo[i].barrier = task_thbarrier;
1678 /* setup initial locks */
1679 pthread_create(&(task_thinfo[i].thread_id), &attr,
1680 evas_common_pipe_load, &(task_thinfo[i]));
1681 pthread_attr_destroy(&attr);
1682 }
1683 }
1684
1685 if (thread_num == 1) return EINA_FALSE;
1686 return EINA_TRUE;
1687#endif
1688 return EINA_FALSE;
1689}
1690
1691EAPI void
1692evas_common_pipe_image_load(RGBA_Image *im)
1693{
1694 if (im->flags & RGBA_IMAGE_TODO_LOAD)
1695 return ;
1696
1697 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888
1698 && !evas_cache_image_is_loaded(&(im->cache_entry)))
1699 goto add_task;
1700
1701 if ((!im->cs.data) || ((!im->cs.dirty) && (!(im->flags & RGBA_IMAGE_IS_DIRTY))))
1702 goto add_task;
1703
1704 return ;
1705
1706 add_task:
1707 task = eina_list_append(task, im);
1708 im->flags |= RGBA_IMAGE_TODO_LOAD;
1709}
1710
1711EAPI void
1712evas_common_pipe_map_begin(RGBA_Image *root)
1713{
1714 if (!evas_common_pipe_init())
1715 {
1716 RGBA_Image *im;
1717
1718 EINA_LIST_FREE(task, im)
1719 {
1720 if (im->cache_entry.space == EVAS_COLORSPACE_ARGB8888)
1721 evas_cache_image_load_data(&im->cache_entry);
1722 evas_common_image_colorspace_normalize(im);
1723
1724 im->flags &= ~RGBA_IMAGE_TODO_LOAD;
1725 }
1726 }
1727
1728 evas_common_pipe_image_load_do();
1729
1730 evas_common_pipe_map_render(root);
1731}
1732
1733#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 @@
1#ifndef _EVAS_PIPE_H
2#define _EVAS_PIPE_H
3
4#include <sys/time.h>
5#include "language/evas_bidi_utils.h"
6
7#ifdef BUILD_PTHREAD
8typedef struct _Thinfo
9{
10 int thread_num;
11 pthread_t thread_id;
12 pthread_barrier_t *barrier;
13 RGBA_Pipe_Thread_Info *info;
14# ifdef EVAS_FRAME_QUEUING
15 void *fq_info;
16#endif
17} Thinfo;
18#endif
19
20#ifdef EVAS_FRAME_QUEUING
21struct _Evas_Surface
22{
23 EINA_INLIST;
24 RGBA_Image *im;
25 int x, y, w, h;
26 int dontpush; // dont push the surface out after drawing done
27};
28typedef struct _Evas_Surface Evas_Surface;
29
30struct _Evas_Frame
31{
32 EINA_INLIST;
33 Evas_Surface *surfaces;
34 void *data;
35 int in_process;
36 int ready;
37 int dont_schedule;
38 struct timeval ready_time;
39
40 void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
41 void (*output_flush) (void *data);
42 void (*output_set_priv)(void *data, void *cur, void *prev);
43};
44typedef struct _Evas_Frame Evas_Frame;
45
46
47struct _Evas_FrameQ
48{
49 int initialised;
50 Evas_Frame *frames;
51 Eina_Condition cond_new;
52 Eina_Condition cond_ready;
53 Eina_Condition cond_done;
54 LK(mutex);
55
56 int thread_num;
57 Thinfo thinfo[TH_MAX];
58 int frameq_sz;
59
60 Evas_Frame *cur_frame;
61};
62typedef struct _Evas_FrameQ Evas_FrameQ;
63#define FRAMEQ_SZ_PER_THREAD 2
64
65struct _Evas_Frameq_Thread_Info
66{
67 Evas_FrameQ *frameq;
68};
69typedef struct _Evas_Frameq_Thread_Info Evas_Frameq_Thread_Info;
70
71EAPI Evas_Surface *evas_common_frameq_new_surface(void *surface, int x, int y, int w, int h);
72EAPI void evas_common_frameq_add_surface(Evas_Surface *surface);
73EAPI void evas_common_frameq_set_frame_data(void *data,
74 void (*fn_output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h),
75 void (*fn_output_flush) (void *data),
76 void (*fn_output_set_priv)(void *data, void *cur, void *prev));
77EAPI void evas_common_frameq_prepare_frame(void);
78EAPI void evas_common_frameq_ready_frame(void);
79EAPI void evas_common_frameq_init(void);
80EAPI void evas_common_frameq_destroy(void);
81EAPI void evas_common_frameq_flush(void);
82EAPI void evas_common_frameq_flush_ready(void);
83EAPI int evas_common_frameq_get_frameq_sz(void);
84EAPI int evas_common_frameq_enabled(void);
85EAPI void evas_common_frameq_begin(void);
86EAPI void evas_common_frameq_finish(void);
87#endif
88
89/* image rendering pipelines... new optional system - non-immediate and
90 * threadable
91 */
92
93EAPI void evas_common_pipe_free(RGBA_Image *im);
94EAPI void evas_common_pipe_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
95EAPI void evas_common_pipe_line_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
96EAPI void evas_common_pipe_poly_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
97EAPI 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);
98EAPI void evas_common_pipe_image_load(RGBA_Image *im);
99EAPI 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);
100EAPI void evas_common_pipe_map_begin(RGBA_Image *root);
101EAPI void evas_common_pipe_map_draw(RGBA_Image *src, RGBA_Image *dst,
102 RGBA_Draw_Context *dc, int npoints, RGBA_Map_Point *p,
103 int smooth, int level);
104EAPI void evas_common_pipe_flush(RGBA_Image *im);
105
106#ifdef EVAS_FRAME_QUEUING
107EAPI void evas_common_pipe_op_text_flush(RGBA_Font *fn);
108EAPI void evas_common_pipe_op_image_flush(RGBA_Image *im);
109#endif
110
111#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 @@
1#ifndef _EVAS_POLYGON_H
2#define _EVAS_POLYGON_H
3
4
5EAPI void evas_common_polygon_init (void);
6
7EAPI RGBA_Polygon_Point *evas_common_polygon_point_add (RGBA_Polygon_Point *points, int x, int y);
8EAPI RGBA_Polygon_Point *evas_common_polygon_points_clear (RGBA_Polygon_Point *points);
9EAPI void evas_common_polygon_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
10
11
12#endif /* _EVAS_POLYGON_H */
13
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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <math.h>
6
7#include "evas_common.h"
8#include "evas_blend_private.h"
9
10typedef struct _RGBA_Span RGBA_Span;
11typedef struct _RGBA_Edge RGBA_Edge;
12typedef struct _RGBA_Vertex RGBA_Vertex;
13
14struct _RGBA_Span
15{
16 EINA_INLIST;
17 int x, y, w;
18};
19
20struct _RGBA_Edge
21{
22 double x, dx;
23 int i;
24};
25
26struct _RGBA_Vertex
27{
28 double x, y;
29 int i;
30};
31
32#define POLY_EDGE_DEL(_i) \
33{ \
34 int _j; \
35 \
36 for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \
37 if (_j < num_active_edges) \
38 { \
39 num_active_edges--; \
40 memmove(&(edges[_j]), &(edges[_j + 1]), \
41 (num_active_edges - _j) * sizeof(RGBA_Edge)); \
42 } \
43}
44
45#define POLY_EDGE_ADD(_i, _y) \
46{ \
47 int _j; \
48 float _dx; \
49 RGBA_Vertex *_p, *_q; \
50 if (_i < (n - 1)) _j = _i + 1; \
51 else _j = 0; \
52 if (point[_i].y < point[_j].y) \
53 { \
54 _p = &(point[_i]); \
55 _q = &(point[_j]); \
56 } \
57 else \
58 { \
59 _p = &(point[_j]); \
60 _q = &(point[_i]); \
61 } \
62 edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
63 edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
64 edges[num_active_edges].i = _i; \
65 num_active_edges++; \
66}
67
68EAPI void
69evas_common_polygon_init(void)
70{
71}
72
73EAPI RGBA_Polygon_Point *
74evas_common_polygon_point_add(RGBA_Polygon_Point *points, int x, int y)
75{
76 RGBA_Polygon_Point *pt;
77
78 pt = malloc(sizeof(RGBA_Polygon_Point));
79 if (!pt) return points;
80 pt->x = x;
81 pt->y = y;
82 points = (RGBA_Polygon_Point *)eina_inlist_append(EINA_INLIST_GET(points), EINA_INLIST_GET(pt));
83 return points;
84}
85
86EAPI RGBA_Polygon_Point *
87evas_common_polygon_points_clear(RGBA_Polygon_Point *points)
88{
89 if (points)
90 {
91 while (points)
92 {
93 RGBA_Polygon_Point *old_p;
94
95 old_p = points;
96 points = (RGBA_Polygon_Point *)eina_inlist_remove(EINA_INLIST_GET(points), EINA_INLIST_GET(points));
97 free(old_p);
98 }
99 }
100 return NULL;
101}
102
103static int
104polygon_point_sorter(const void *a, const void *b)
105{
106 RGBA_Vertex *p, *q;
107
108 p = (RGBA_Vertex *)a;
109 q = (RGBA_Vertex *)b;
110 if (p->y <= q->y) return -1;
111 return 1;
112}
113
114static int
115polygon_edge_sorter(const void *a, const void *b)
116{
117 RGBA_Edge *p, *q;
118
119 p = (RGBA_Edge *)a;
120 q = (RGBA_Edge *)b;
121 if (p->x <= q->x) return -1;
122 return 1;
123}
124
125EAPI void
126evas_common_polygon_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
127{
128 RGBA_Gfx_Func func;
129 RGBA_Polygon_Point *pt;
130 RGBA_Vertex *point;
131 RGBA_Edge *edges;
132 Eina_Inlist *spans;
133 int num_active_edges;
134 int n;
135 int i, j, k;
136 int yy0, yy1, yi;
137 int ext_x, ext_y, ext_w, ext_h;
138 int *sorted_index;
139
140#ifdef HAVE_PIXMAN
141# ifdef PIXMAN_POLY
142 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
143 if (dc->render_op == _EVAS_RENDER_BLEND)
144 op = PIXMAN_OP_OVER;
145# endif
146#endif
147
148 ext_x = 0;
149 ext_y = 0;
150 ext_w = dst->cache_entry.w;
151 ext_h = dst->cache_entry.h;
152 if (dc->clip.use)
153 {
154 if (dc->clip.x > ext_x)
155 {
156 ext_w += ext_x - dc->clip.x;
157 ext_x = dc->clip.x;
158 }
159 if ((ext_x + ext_w) > (dc->clip.x + dc->clip.w))
160 {
161 ext_w = (dc->clip.x + dc->clip.w) - ext_x;
162 }
163 if (dc->clip.y > ext_y)
164 {
165 ext_h += ext_y - dc->clip.y;
166 ext_y = dc->clip.y;
167 }
168 if ((ext_y + ext_h) > (dc->clip.y + dc->clip.h))
169 {
170 ext_h = (dc->clip.y + dc->clip.h) - ext_y;
171 }
172 }
173 if ((ext_w <= 0) || (ext_h <= 0)) return;
174
175 evas_common_cpu_end_opt();
176
177 n = 0; EINA_INLIST_FOREACH(points, pt) n++;
178 if (n < 3) return;
179 edges = malloc(sizeof(RGBA_Edge) * n);
180 if (!edges) return;
181 point = malloc(sizeof(RGBA_Vertex) * n);
182 if (!point)
183 {
184 free(edges);
185 return;
186 }
187 sorted_index = malloc(sizeof(int) * n);
188 if (!sorted_index)
189 {
190 free(edges);
191 free(point);
192 return;
193 }
194
195 k = 0;
196 EINA_INLIST_FOREACH(points, pt)
197 {
198 point[k].x = pt->x + x;
199 point[k].y = pt->y + y;
200 point[k].i = k;
201 k++;
202 }
203 qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
204 for (k = 0; k < n; k++) sorted_index[k] = point[k].i;
205 k = 0;
206 EINA_INLIST_FOREACH(points, pt)
207 {
208 point[k].x = pt->x + x;
209 point[k].y = pt->y + y;
210 point[k].i = k;
211 k++;
212 }
213
214 yy0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5));
215 yy1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5));
216
217 k = 0;
218 num_active_edges = 0;
219 spans = NULL;
220
221 for (yi = yy0; yi <= yy1; yi++)
222 {
223 for (; (k < n) && (point[sorted_index[k]].y <= ((double)yi + 0.5)); k++)
224 {
225 i = sorted_index[k];
226
227 if (i > 0) j = i - 1;
228 else j = n - 1;
229 if (point[j].y <= ((double)yi - 0.5))
230 {
231 POLY_EDGE_DEL(j)
232 }
233 else if (point[j].y > ((double)yi + 0.5))
234 {
235 POLY_EDGE_ADD(j, yi)
236 }
237 if (i < (n - 1)) j = i + 1;
238 else j = 0;
239 if (point[j].y <= ((double)yi - 0.5))
240 {
241 POLY_EDGE_DEL(i)
242 }
243 else if (point[j].y > ((double)yi + 0.5))
244 {
245 POLY_EDGE_ADD(i, yi)
246 }
247 }
248
249 qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter);
250
251 for (j = 0; j < num_active_edges; j += 2)
252 {
253 int x0, x1;
254
255 x0 = ceil(edges[j].x - 0.5);
256 if (j < (num_active_edges - 1))
257 x1 = floor(edges[j + 1].x - 0.5);
258 else
259 x1 = x0;
260 if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1))
261 {
262 RGBA_Span *span;
263
264 if (x0 < ext_x) x0 = ext_x;
265 if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1;
266 span = malloc(sizeof(RGBA_Span));
267 spans = eina_inlist_append(spans, EINA_INLIST_GET(span));
268 span->y = yi;
269 span->x = x0;
270 span->w = (x1 - x0) + 1;
271 }
272 edges[j].x += edges[j].dx;
273 edges[j + 1].x += edges[j + 1].dx;
274 }
275 }
276
277 free(edges);
278 free(point);
279 free(sorted_index);
280
281 func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, 1, dc->render_op);
282 if (spans)
283 {
284 RGBA_Span *span;
285
286 EINA_INLIST_FOREACH(spans, span)
287 {
288 DATA32 *ptr;
289
290#ifdef EVAS_SLI
291 if (((span->y) % dc->sli.h) == dc->sli.y)
292#endif
293 {
294#ifdef HAVE_PIXMAN
295# ifdef PIXMAN_POLY
296 if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
297 (!dc->mask.mask))
298 pixman_image_composite(op, dc->col.pixman_color_image,
299 NULL, dst->pixman.im,
300 span->x, span->y, 0, 0,
301 span->x, span->y, span->w, 1);
302 else if ((dst->pixman.im) && (dc->col.pixman_color_image) &&
303 (dc->mask.mask))
304 pixman_image_composite(op, dc->col.pixman_color_image,
305 dc->mask.mask->pixman.im,
306 dst->pixman.im,
307 span->x, span->y, 0, 0,
308 span->x, span->y, span->w, 1);
309 else
310# endif
311#endif
312 {
313 ptr = dst->image.data + (span->y * (dst->cache_entry.w)) + span->x;
314 func(NULL, NULL, dc->col.col, ptr, span->w);
315 }
316 }
317 }
318 while (spans)
319 {
320 span = (RGBA_Span *)spans;
321 spans = eina_inlist_remove(spans, spans);
322 free(span);
323 }
324 }
325}
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 @@
1#ifndef _EVAS_RECTANGLE_H
2#define _EVAS_RECTANGLE_H
3
4
5EAPI void evas_common_rectangle_init (void);
6
7EAPI void evas_common_rectangle_draw (RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
8
9
10#endif /* _EVAS_RECTANGLE_H */
11
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 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4static void rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
5
6EAPI void
7evas_common_rectangle_init(void)
8{
9}
10
11EAPI void
12evas_common_rectangle_draw(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
13{
14 Cutout_Rects *rects;
15 Cutout_Rect *r;
16 int c, cx, cy, cw, ch;
17 int i;
18 /* handle cutouts here! */
19
20 if ((w <= 0) || (h <= 0)) return;
21 if (!(RECTS_INTERSECT(x, y, w, h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
22 return;
23 /* save out clip info */
24 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
25 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
26 /* no cutouts - cut right to the chase */
27 if (!dc->cutout.rects)
28 {
29 rectangle_draw_internal(dst, dc, x, y, w, h);
30 }
31 else
32 {
33 evas_common_draw_context_clip_clip(dc, x, y, w, h);
34 /* our clip is 0 size.. abort */
35 if ((dc->clip.w > 0) && (dc->clip.h > 0))
36 {
37 rects = evas_common_draw_context_apply_cutouts(dc);
38 for (i = 0; i < rects->active; ++i)
39 {
40 r = rects->rects + i;
41 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
42 rectangle_draw_internal(dst, dc, x, y, w, h);
43 }
44 evas_common_draw_context_apply_clear_cutouts(rects);
45 }
46 }
47 /* restore clip info */
48 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
49}
50
51static void
52rectangle_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h)
53{
54 RGBA_Gfx_Func func;
55 int yy;
56 DATA32 *ptr;
57
58 RECTS_CLIP_TO_RECT(x, y, w, h, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
59 if ((w <= 0) || (h <= 0)) return;
60
61#ifdef HAVE_PIXMAN
62# ifdef PIXMAN_RECT
63 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
64
65 if (dc->render_op == _EVAS_RENDER_BLEND)
66 op = PIXMAN_OP_OVER;
67
68 if ((dst->pixman.im) && (dc->col.pixman_color_image))
69 {
70 pixman_image_composite(op, dc->col.pixman_color_image, NULL,
71 dst->pixman.im, x, y, 0, 0,
72 x, y, w, h);
73 }
74 else
75# endif
76#endif
77 {
78 func = evas_common_gfx_func_composite_color_span_get(dc->col.col, dst, w, dc->render_op);
79 ptr = dst->image.data + (y * dst->cache_entry.w) + x;
80 for (yy = 0; yy < h; yy++)
81 {
82#ifdef EVAS_SLI
83 if (((yy + y) % dc->sli.h) == dc->sli.y)
84#endif
85 {
86 func(NULL, NULL, dc->col.col, ptr, w);
87 }
88 ptr += dst->cache_entry.w;
89 }
90 }
91}
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 @@
1#include "evas_common.h"
2
3#if 0
4Regionbuf *
5evas_common_regionbuf_new(int w, int h)
6{
7 Regionbuf *rb;
8
9 rb = calloc(1, sizeof(Regionbuf) + (h * sizeof(Regionspan)));
10 if (!rb) return NULL;
11 rb->spans = (Regionspan **)(rb + sizeof(Regionbuf));
12 rb->w = w;
13 rb->h = h;
14 return rb;
15}
16
17void
18evas_common_regionbuf_free(Regionbuf *rb)
19{
20 evas_common_regionbuf_clear(rb);
21 free(rb);
22}
23
24void
25evas_common_regionbuf_clear(Regionbuf *rb)
26{
27 int y;
28
29 for (y = 0; y < rb->h; y++)
30 {
31 while (rb->spans[y])
32 {
33 Regionspan *span;
34
35 span = rb->spans[y];
36 rb->spans[y] = eina_inlist_remove(rb->spans[y], rb->spans[y]);
37 free(span);
38 }
39 }
40}
41
42void
43evas_common_regionbuf_span_add(Regionbuf *rb, int x1, int x2, int y)
44{
45 Regionspan *span, *span2, *nspan, *sp_start, *sp_stop;
46
47 /* abort if outside */
48 if ((y < 0) ||
49 (y >= rb->h) ||
50 (x2 < 0) ||
51 (x1 >= rb->w)) return;
52 /* clip to horiz bounds */
53 if (x1 < 0) x1 = 0;
54 if (x2 < (rb->w - 1)) x2 = rb->w - 1;
55 sp_start = NULL;
56 sp_stop = NULL;
57 EINA_INLIST_FOREACH(rb->spans[y], span)
58 {
59 nspan = (Regionspan *)(EINA_INLIST_GET(span))->next;
60 /* we dont know what t do with the span yet */
61 if (!sp_start)
62 {
63 /* if new span starts before or on this span or just after
64 * with no gap */
65 if (x1 <= (span->x2 + 1))
66 sp_start = span;
67 /* if there is no next span */
68 if (!nspan)
69 {
70 sp_stop = span;
71 break;
72 }
73 /* if new span ends before the next span starts with a gap of
74 * 1 pixel (or more) */
75 else if (x2 < (nspan->x1 - 1))
76 {
77 sp_stop = span;
78 break;
79 }
80 }
81 /* we already know it already starts before or in sp_start */
82 else
83 {
84 /* there is no span after this one, so this has to be the stop */
85 if (!nspan)
86 {
87 sp_stop = span;
88 break;
89 }
90 /* if new span ends before the next span starts with a gap of
91 * 1 pixel (or more) */
92 else if (x2 < (nspan->x1 - 1))
93 {
94 sp_stop = span;
95 break;
96 }
97 }
98 }
99 /* sp_start is where the new span starts in or before */
100 /* sp_stop is where the new span stops in or after */
101 if ((sp_start) && (sp_stop))
102 {
103 /* same start and stop */
104 if (sp_start == sp_stop)
105 {
106 if (x2 < (sp_start->x1 - 1))
107 {
108 span2 = calloc(1, sizeof(Regionspan));
109 span2->x1 = x1;
110 span2->x2 = x2;
111 rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start);
112 return;
113 }
114 if (x1 < sp_start->x1)
115 sp_start->x1 = x1;
116 if (x2 > sp_start->x2)
117 sp_start->x2 = x2;
118 return;
119 }
120 else
121 {
122 Eina_Inlist *l;
123
124 /* remove all nodes after sp_start and before_sp_stop because
125 * the new */
126 for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);)
127 {
128 span = (Regionspan *)l;
129 l = l->next;
130 rb->spans[y] = eina_inlist_remove(rb->spans[y], span);
131 free(span);
132 }
133 /* remove the end span */
134 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop);
135 /* if the new span is before the start span - extend */
136 if (x1 < sp_start->x1)
137 sp_start->x1 = x1;
138 /* if it goes beyond the stop span - extend stop span */
139 if (x2 > sp_stop->x2)
140 sp_stop->x2 = x2;
141 /* extend start span to stop span */
142 sp_start->x2 = sp_stop->x2;
143 /* don't need stop span anymore */
144 free(sp_stop);
145 return;
146 }
147 }
148 /* no start AND stop... just append */
149 span2 = calloc(1, sizeof(Regionspan));
150 span2->x1 = x1;
151 span2->x2 = x2;
152 rb->spans[y] = eina_inlist_append(rb->spans[y], span2);
153}
154
155void
156evas_common_regionbuf_span_del(Regionbuf *rb, int x1, int x2, int y)
157{
158 /* FIXME: del span */
159 Regionspan *span, *span2, *nspan, *sp_start, *sp_stop;
160
161 /* abort if outside */
162 if ((y < 0) ||
163 (y >= rb->h) ||
164 (x2 < 0) ||
165 (x1 >= rb->w)) return;
166 /* clip to horiz bounds */
167 if (x1 < 0) x1 = 0;
168 if (x2 < (rb->w - 1)) x2 = rb->w - 1;
169 sp_start = NULL;
170 sp_stop = NULL;
171 EINA_INLIST_FOREACH(rb->spans[y], span)
172 {
173 nspan = (Regionspan *)(EINA_INLIST_GET(l))->next;
174 /* we dont know what t do with the span yet */
175 if (!sp_start)
176 {
177 /* if new span starts before or on this span or just after
178 * with no gap */
179 if (x1 <= (span->x2))
180 sp_start = span;
181 /* if there is no next span */
182 if (!nspan)
183 {
184 sp_stop = span;
185 break;
186 }
187 /* if new span ends before the next span starts with a gap of
188 * 1 pixel (or more) */
189 else if (x2 < nspan->x1)
190 {
191 sp_stop = span;
192 break;
193 }
194 }
195 /* we already know it already starts before or in sp_start */
196 else
197 {
198 /* there is no span after this one, so this has to be the stop */
199 if (!nspan)
200 {
201 sp_stop = span;
202 break;
203 }
204 /* if new span ends before the next span starts with a gap of
205 * 1 pixel (or more) */
206 else if (x2 < nspan->x1)
207 {
208 sp_stop = span;
209 break;
210 }
211 }
212 }
213 /* sp_start is where the new span starts in or before */
214 /* sp_stop is where the new span stops in or after */
215 if ((sp_start) && (sp_stop))
216 {
217 /* same start and stop */
218 if (sp_start == sp_stop)
219 {
220 /* if it ends before this the span start starts... return */
221 if (x2 < sp_start->x1)
222 return;
223 /* it starts on or before this span */
224 else if (x1 <= sp_start->x1)
225 {
226 /* right edge is within the span */
227 if (x2 < sp_start->x2)
228 {
229 sp_start->x2 = x2;
230 return;
231 }
232 else
233 {
234 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
235 return;
236 }
237 }
238 /* it ends on or after the end of this span */
239 else if (x2 >= sp_start->x2)
240 {
241 /* it starts after the start */
242 if (x1 > sp_start->x1)
243 {
244 sp_start->x1 = x1;
245 return;
246 }
247 /* remove it all */
248 else
249 {
250 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
251 return;
252 }
253 return;
254 }
255 /* this breaks the span into 2 */
256 else
257 {
258 span2 = calloc(1, sizeof(Regionspan));
259 span2->x1 = sp_start->x1;
260 span2->x2 = x1 - 1;
261 rb->spans[y] = eina_inlist_prepend_relative(rb->spans[y], span2, sp_start);
262 sp_start->x1 = x2 + 1;
263 return;
264 }
265 }
266 else
267 {
268 Eina_Inlist *l;
269
270 /* remove all nodes after sp_start and before_sp_stop because
271 * the new */
272 for (l = (EINA_INLIST_GET(sp_start))->next; l != EINA_INLIST_GET(sp_stop);)
273 {
274 span = (Regionspan *)l;
275 l = l->next;
276 rb->spans[y] = eina_inlist_remove(rb->spans[y], span);
277 free(span);
278 }
279 /* all of the start span is cut out */
280 if (x1 <= sp_start->x1)
281 {
282 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
283 free(sp_start);
284 }
285 /* chup it off at the new span start */
286 else
287 sp_start->x2 = x1 - 1;
288 /* all of the end span is cut out */
289 if (x2 >= sp_stop->x2)
290 {
291 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_stop);
292 free(sp_stop);
293 }
294 /* chop it up at the end */
295 else
296 sp_stop->x1 = x2 + 1;
297 return;
298 }
299 }
300}
301
302Tilebuf_Rect *
303evas_common_regionbuf_rects_get(Regionbuf *rb)
304{
305 Tilebuf_Rect *rects = NULL, *r;
306 int y;
307
308 /* FIXME: take spans, make rects */
309 for (y = 0; y < rb->h; y++)
310 {
311 Regionspan *sp_start;
312 Eina_Inlist *l, *ll;
313
314 for (l = EINA_INLIST_GET(rb->spans[y]); l;)
315 {
316 Regionspan *span;
317 int yy;
318
319 sp_start = (Regionspan *)l;
320 l = l->next;
321 rb->spans[y] = eina_inlist_remove(rb->spans[y], sp_start);
322 for (yy = y + 1; yy < rb->h; yy++)
323 {
324 int match = 0;
325
326 for (ll = EINA_INLIST_GET(rb->spans[yy]); ll;)
327 {
328 span = (Regionspan *)ll;
329 ll = ll->next;
330 if (span->x1 == sp_start->x1)
331 {
332 if ((span->x1 != sp_start->x1) ||
333 (span->x2 != sp_start->x2))
334 {
335 goto coallate;
336 }
337 match = 1;
338 rb->spans[yy] = eina_inlist_remove(rb->spans[yy], span);
339 free(span);
340 }
341 }
342 if (!match) goto coallate;
343 }
344 coallate:
345 r = calloc(1, sizeof(Tilebuf_Rect));
346 r->x = sp_start->x1;
347 r->y = y;
348 r->w = sp_start->x2 - sp_start->x1 + 1;
349 r->h = yy - y;
350 rects = eina_inlist_append(rects, r);
351 free(sp_start);
352 }
353 }
354 evas_common_regionbuf_clear(rb);
355 return rects;
356}
357#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 @@
1#include "evas_common.h"
2
3EAPI void
4evas_common_scale_init(void)
5{
6}
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 @@
1#ifndef _EVAS_SCALE_MAIN_H
2#define _EVAS_SCALE_MAIN_H
3
4
5EAPI void evas_common_scale_init (void);
6
7EAPI 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);
8
9EAPI 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);
10
11EAPI void evas_common_rgba_image_scalecache_dump(void);
12
13#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 @@
1#include "evas_common.h"
2#include "evas_blend_private.h"
3
4void 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);
5
6#ifndef BUILD_SCALE_SMOOTH
7#ifdef BUILD_SCALE_SAMPLE
8EAPI void
9evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
10 RGBA_Draw_Context *dc,
11 int src_region_x, int src_region_y,
12 int src_region_w, int src_region_h,
13 int dst_region_x, int dst_region_y,
14 int dst_region_w, int dst_region_h)
15{
16 evas_common_scale_rgba_in_to_out_clip_sample(src, dst, dc,
17 src_region_x, src_region_y,
18 src_region_w, src_region_h,
19 dst_region_x, dst_region_y,
20 dst_region_w, dst_region_h);
21}
22#endif
23#endif
24
25#ifdef BUILD_SCALE_SAMPLE
26EAPI void
27evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
28 RGBA_Draw_Context *dc,
29 int src_region_x, int src_region_y,
30 int src_region_w, int src_region_h,
31 int dst_region_x, int dst_region_y,
32 int dst_region_w, int dst_region_h)
33{
34 Cutout_Rects *rects;
35 Cutout_Rect *r;
36 int c, cx, cy, cw, ch;
37 int i;
38 /* handle cutouts here! */
39
40 if ((dst_region_w <= 0) || (dst_region_h <= 0)) return;
41 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)))
42 return;
43 /* no cutouts - cut right to the chase */
44 if (!dc->cutout.rects)
45 {
46 scale_rgba_in_to_out_clip_sample_internal(src, dst, dc,
47 src_region_x, src_region_y,
48 src_region_w, src_region_h,
49 dst_region_x, dst_region_y,
50 dst_region_w, dst_region_h);
51 return;
52 }
53 /* save out clip info */
54 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
55 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
56 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
57 /* our clip is 0 size.. abort */
58 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
59 {
60 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
61 return;
62 }
63 rects = evas_common_draw_context_apply_cutouts(dc);
64 for (i = 0; i < rects->active; ++i)
65 {
66 r = rects->rects + i;
67 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
68 scale_rgba_in_to_out_clip_sample_internal(src, dst, dc,
69 src_region_x, src_region_y,
70 src_region_w, src_region_h,
71 dst_region_x, dst_region_y,
72 dst_region_w, dst_region_h);
73
74 }
75 evas_common_draw_context_apply_clear_cutouts(rects);
76 /* restore clip info */
77 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
78}
79
80void
81scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
82 RGBA_Draw_Context *dc,
83 int src_region_x, int src_region_y,
84 int src_region_w, int src_region_h,
85 int dst_region_x, int dst_region_y,
86 int dst_region_w, int dst_region_h)
87{
88 int x, y;
89 int *lin_ptr;
90 DATA32 *buf, *dptr;
91 DATA32 **row_ptr;
92 DATA32 *ptr, *dst_ptr, *src_data, *dst_data;
93 int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
94 int m_clip_x = 0, m_clip_y = 0, m_clip_w = 0, m_clip_h = 0, mdx = 0, mdy = 0;
95 int src_w, src_h, dst_w, dst_h;
96 RGBA_Gfx_Func func;
97 RGBA_Image *maskobj = NULL;
98 DATA8 *mask = NULL;
99
100 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)))
101 return;
102 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)))
103 return;
104
105 src_w = src->cache_entry.w;
106 src_h = src->cache_entry.h;
107 dst_w = dst->cache_entry.w;
108 dst_h = dst->cache_entry.h;
109
110 src_data = src->image.data;
111 dst_data = dst->image.data;
112
113 if (dc->clip.use)
114 {
115 dst_clip_x = dc->clip.x;
116 dst_clip_y = dc->clip.y;
117 dst_clip_w = dc->clip.w;
118 dst_clip_h = dc->clip.h;
119 if (dst_clip_x < 0)
120 {
121 dst_clip_w += dst_clip_x;
122 dst_clip_x = 0;
123 }
124 if (dst_clip_y < 0)
125 {
126 dst_clip_h += dst_clip_y;
127 dst_clip_y = 0;
128 }
129 if ((dst_clip_x + dst_clip_w) > dst_w)
130 dst_clip_w = dst_w - dst_clip_x;
131 if ((dst_clip_y + dst_clip_h) > dst_h)
132 dst_clip_h = dst_h - dst_clip_y;
133 }
134 else
135 {
136 dst_clip_x = 0;
137 dst_clip_y = 0;
138 dst_clip_w = dst_w;
139 dst_clip_h = dst_h;
140 }
141
142 if (dc->mask.mask)
143 {
144 m_clip_x = dc->mask.x;
145 m_clip_y = dc->mask.y;
146 m_clip_w = dc->mask.mask->cache_entry.w;
147 m_clip_h = dc->mask.mask->cache_entry.h;
148 RECTS_CLIP_TO_RECT(m_clip_x, m_clip_y, m_clip_w, m_clip_h,
149 dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h);
150 if ((m_clip_w <= 0) || (m_clip_h <= 0)) return;
151 dst_clip_x = m_clip_x;
152 dst_clip_y = m_clip_y;
153 dst_clip_w = m_clip_w;
154 dst_clip_h = m_clip_h;
155 }
156
157 if (dst_clip_x < dst_region_x)
158 {
159 dst_clip_w += dst_clip_x - dst_region_x;
160 dst_clip_x = dst_region_x;
161 }
162 if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w))
163 dst_clip_w = dst_region_x + dst_region_w - dst_clip_x;
164 if (dst_clip_y < dst_region_y)
165 {
166 dst_clip_h += dst_clip_y - dst_region_y;
167 dst_clip_y = dst_region_y;
168 }
169 if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h))
170 dst_clip_h = dst_region_y + dst_region_h - dst_clip_y;
171
172 if ((src_region_w <= 0) || (src_region_h <= 0) ||
173 (dst_region_w <= 0) || (dst_region_h <= 0) ||
174 (dst_clip_w <= 0) || (dst_clip_h <= 0))
175 return;
176
177 /* sanitise x */
178 if (src_region_x < 0)
179 {
180 dst_region_x -= (src_region_x * dst_region_w) / src_region_w;
181 dst_region_w += (src_region_x * dst_region_w) / src_region_w;
182 src_region_w += src_region_x;
183 src_region_x = 0;
184 }
185 if (src_region_x >= src_w) return;
186 if ((src_region_x + src_region_w) > src_w)
187 {
188 dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w);
189 src_region_w = src_w - src_region_x;
190 }
191 if (dst_region_w <= 0) return;
192 if (src_region_w <= 0) return;
193 if (dst_clip_x < 0)
194 {
195 dst_clip_w += dst_clip_x;
196 dst_clip_x = 0;
197 }
198 if (dst_clip_w <= 0) return;
199 if (dst_clip_x >= dst_w) return;
200 if (dst_clip_x < dst_region_x)
201 {
202 dst_clip_w += (dst_clip_x - dst_region_x);
203 dst_clip_x = dst_region_x;
204 }
205 if ((dst_clip_x + dst_clip_w) > dst_w)
206 {
207 dst_clip_w = dst_w - dst_clip_x;
208 }
209 if (dst_clip_w <= 0) return;
210
211 /* sanitise y */
212 if (src_region_y < 0)
213 {
214 dst_region_y -= (src_region_y * dst_region_h) / src_region_h;
215 dst_region_h += (src_region_y * dst_region_h) / src_region_h;
216 src_region_h += src_region_y;
217 src_region_y = 0;
218 }
219 if (src_region_y >= src_h) return;
220 if ((src_region_y + src_region_h) > src_h)
221 {
222 dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h);
223 src_region_h = src_h - src_region_y;
224 }
225 if (dst_region_h <= 0) return;
226 if (src_region_h <= 0) return;
227 if (dst_clip_y < 0)
228 {
229 dst_clip_h += dst_clip_y;
230 dst_clip_y = 0;
231 }
232 if (dst_clip_h <= 0) return;
233 if (dst_clip_y >= dst_h) return;
234 if (dst_clip_y < dst_region_y)
235 {
236 dst_clip_h += (dst_clip_y - dst_region_y);
237 dst_clip_y = dst_region_y;
238 }
239 if ((dst_clip_y + dst_clip_h) > dst_h)
240 {
241 dst_clip_h = dst_h - dst_clip_y;
242 }
243 if (dst_clip_h <= 0) return;
244
245 /* allocate scale lookup tables */
246 lin_ptr = alloca(dst_clip_w * sizeof(int));
247 row_ptr = alloca(dst_clip_h * sizeof(DATA32 *));
248
249 /* figure out dst jump */
250 //dst_jump = dst_w - dst_clip_w;
251
252 /* figure out dest start ptr */
253 dst_ptr = dst_data + dst_clip_x + (dst_clip_y * dst_w);
254
255 if (dc->mask.mask)
256 {
257 func = evas_common_gfx_func_composite_pixel_mask_span_get(src, dst, dst_clip_w, dc->render_op);
258 maskobj = dc->mask.mask;
259 mask = maskobj->mask.mask;
260/*
261 if (1 || dst_region_w > src_region_w || dst_region_h > src_region_h){
262 printf("Mask w/h: %d/%d\n",maskobj->cache_entry.w,
263 maskobj->cache_entry.h);
264 printf("Warning: Unscaled mask (%d/%d) // (%d/%d)\n",
265 dst_region_w,src_region_w,
266 dst_region_h,src_region_h);
267 }
268 */
269 }
270 else if (dc->mul.use)
271 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
272 else
273 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
274
275 if ((dst_region_w == src_region_w) && (dst_region_h == src_region_h))
276 {
277#ifdef HAVE_PIXMAN
278# ifdef PIXMAN_IMAGE_SCALE_SAMPLE
279 if ((src->pixman.im) && (dst->pixman.im) && (!dc->mask.mask) &&
280 ((!dc->mul.use) ||
281 ((dc->mul.use) && (dc->mul.col == 0xffffffff))) &&
282 ((dc->render_op == _EVAS_RENDER_COPY) ||
283 (dc->render_op == _EVAS_RENDER_BLEND)))
284 {
285 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
286 if (dc->render_op == _EVAS_RENDER_BLEND)
287 op = PIXMAN_OP_OVER;
288
289 pixman_image_composite(op,
290 src->pixman.im, NULL,
291 dst->pixman.im,
292 (dst_clip_x - dst_region_x) + src_region_x,
293 (dst_clip_y - dst_region_y) + src_region_y,
294 0, 0,
295 dst_clip_x, dst_clip_y,
296 dst_clip_w, dst_clip_h);
297 }
298 else if ((src->pixman.im) && (dst->pixman.im) &&
299 (dc->mask.mask) && (dc->mask.mask->pixman.im) &&
300 ((dc->render_op == _EVAS_RENDER_COPY) ||
301 (dc->render_op == _EVAS_RENDER_BLEND)))
302 {
303 // In case of pixel and color operation.
304 pixman_op_t op = PIXMAN_OP_SRC; // _EVAS_RENDER_COPY
305 if (dc->render_op == _EVAS_RENDER_BLEND)
306 op = PIXMAN_OP_OVER;
307
308 pixman_image_composite(op,
309 src->pixman.im, dc->mask.mask->pixman.im,
310 dst->pixman.im,
311 (dst_clip_x - dst_region_x) + src_region_x,
312 (dst_clip_y - dst_region_y) + src_region_y,
313 0, 0,
314 dst_clip_x, dst_clip_y,
315 dst_clip_w, dst_clip_h);
316 }
317 else
318# endif
319#endif
320 {
321 ptr = src_data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
322 if (mask)
323 {
324 mdx = (m_clip_x - dc->mask.x) + (m_clip_x - dst_clip_x);
325 mdy = (m_clip_y - dc->mask.y) + (m_clip_y - dst_clip_y);
326 mask += mdx + (mdy * maskobj->cache_entry.w);
327 }
328 for (y = 0; y < dst_clip_h; y++)
329 {
330 /* * blend here [clip_w *] ptr -> dst_ptr * */
331#ifdef EVAS_SLI
332 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
333#endif
334 {
335 func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
336 }
337 ptr += src_w;
338 dst_ptr += dst_w;
339 if (mask) mask += maskobj->cache_entry.w;
340 }
341 }
342 }
343 else
344 {
345 /* fill scale tables */
346 for (x = 0; x < dst_clip_w; x++)
347 lin_ptr[x] = (((x + dst_clip_x - dst_region_x) * src_region_w) / dst_region_w) + src_region_x;
348 for (y = 0; y < dst_clip_h; y++)
349 row_ptr[y] = src_data + (((((y + dst_clip_y - dst_region_y) * src_region_h) / dst_region_h)
350 + src_region_y) * src_w);
351 /* scale to dst */
352 dptr = dst_ptr;
353#ifdef DIRECT_SCALE
354 if ((!src->cache_entry.flags.alpha) &&
355 (!dst->cache_entry.flags.alpha) &&
356 (!dc->mul.use))
357 {
358 for (y = 0; y < dst_clip_h; y++)
359 {
360# ifdef EVAS_SLI
361 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
362# endif
363 {
364 dst_ptr = dptr;
365 for (x = 0; x < dst_clip_w; x++)
366 {
367 ptr = row_ptr[y] + lin_ptr[x];
368 *dst_ptr = *ptr;
369 dst_ptr++;
370 }
371 }
372 dptr += dst_w;
373 }
374 }
375 else
376#endif
377 {
378 /* a scanline buffer */
379 buf = alloca(dst_clip_w * sizeof(DATA32));
380 for (y = 0; y < dst_clip_h; y++)
381 {
382#ifdef EVAS_SLI
383 if (((y + dst_clip_y) % dc->sli.h) == dc->sli.y)
384#endif
385 {
386 dst_ptr = buf;
387 for (x = 0; x < dst_clip_w; x++)
388 {
389 ptr = row_ptr[y] + lin_ptr[x];
390 *dst_ptr = *ptr;
391 dst_ptr++;
392 }
393 /* * blend here [clip_w *] buf -> dptr * */
394 func(buf, NULL, dc->mul.col, dptr, dst_clip_w);
395 }
396 dptr += dst_w;
397 }
398 }
399 }
400}
401#else
402#ifdef BUILD_SCALE_SMOOTH
403EAPI void
404evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
405 RGBA_Draw_Context *dc,
406 int src_region_x, int src_region_y,
407 int src_region_w, int src_region_h,
408 int dst_region_x, int dst_region_y,
409 int dst_region_w, int dst_region_h)
410{
411 evas_common_scale_rgba_in_to_out_clip_smooth(src, dst, dc,
412 src_region_x, src_region_y,
413 src_region_w, src_region_h,
414 dst_region_x, dst_region_y,
415 dst_region_w, dst_region_h);
416}
417#endif
418#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 @@
1#include "evas_common.h"
2#include "evas_scale_smooth.h"
3#include "evas_blend_private.h"
4
5#define SCALE_CALC_X_POINTS(P, SW, DW, CX, CW) \
6 P = alloca((CW + 1) * sizeof (int)); \
7 scale_calc_x_points(P, SW, DW, CX, CW);
8
9#define SCALE_CALC_Y_POINTS(P, SRC, SW, SH, DH, CY, CH) \
10 P = alloca((CH + 1) * sizeof (DATA32 *)); \
11 scale_calc_y_points(P, SRC, SW, SH, DH, CY, CH);
12
13#define SCALE_CALC_A_POINTS(P, S, D, C, CC) \
14 P = alloca(CC * sizeof (int)); \
15 scale_calc_a_points(P, S, D, C, CC);
16
17static void scale_calc_y_points(DATA32 **p, DATA32 *src, int sw, int sh, int dh, int cy, int ch);
18static void scale_calc_x_points(int *p, int sw, int dw, int cx, int cw);
19static void scale_calc_a_points(int *p, int s, int d, int c, int cc);
20
21static void
22scale_calc_y_points(DATA32** p, DATA32 *src, int sw, int sh, int dh, int cy, int ch)
23{
24 int i, val, inc;
25 if (sh > SCALE_SIZE_MAX) return;
26 val = 0;
27 inc = (sh << 16) / dh;
28 for (i = 0; i < dh; i++)
29 {
30 if ((i >= cy) && (i < (cy + ch)))
31 p[i - cy] = src + ((val >> 16) * sw);
32 val += inc;
33 }
34 if ((i >= cy) && (i < (cy + ch)))
35 p[i - cy] = p[i - cy - 1];
36}
37
38static void
39scale_calc_x_points(int *p, int sw, int dw, int cx, int cw)
40{
41 int i, val, inc;
42 if (sw > SCALE_SIZE_MAX) return;
43 val = 0;
44 inc = (sw << 16) / dw;
45 for (i = 0; i < dw; i++)
46 {
47 if ((i >= cx) && (i < (cx + cw)))
48 p[i - cx] = val >> 16;
49 val += inc;
50 }
51 if ((i >= cx) && (i < (cx + cw)))
52 p[i - cx] = p[i - cx - 1];
53}
54
55static void
56scale_calc_a_points(int *p, int s, int d, int c, int cc)
57{
58 int i, val, inc;
59
60 if (s > SCALE_SIZE_MAX) return;
61 if (d >= s)
62 {
63 val = 0;
64 inc = (s << 16) / d;
65 for (i = 0; i < d; i++)
66 {
67 if ((i >= c) && (i < (c + cc)))
68 {
69 p[i - c] = (val >> 8) - ((val >> 8) & 0xffffff00);
70 if ((val >> 16) >= (s - 1)) p[i - c] = 0;
71 }
72 val += inc;
73 }
74 }
75 else
76 {
77 int ap, Cp;
78
79 val = 0;
80 inc = (s << 16) / d;
81 Cp = ((d << 14) / s) + 1;
82 for (i = 0; i < d; i++)
83 {
84 ap = ((0x100 - ((val >> 8) & 0xff)) * Cp) >> 8;
85 if ((i >= c) && (i < (c + cc)))
86 p[i - c] = ap | (Cp << 16);
87 val += inc;
88 }
89 }
90}
91
92#ifdef BUILD_SCALE_SMOOTH
93#ifdef BUILD_C
94EAPI void
95evas_common_scale_rgba_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
96{
97 int x, y, dst_w, dst_h;
98 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
99
100 dst_w = src_w >> 1;
101 dst_h = src_h >> 1;
102
103 if (dst_w < 1) dst_w = 1;
104 if (dst_h < 1) dst_h = 1;
105
106 src_ptr = src;
107 src_ptr2 = src + src_w;
108 dst_ptr = dst;
109 for (y = 0; y < dst_h; y++)
110 {
111 src_ptr = src + (y * src_w * 2);
112 src_ptr2 = src_ptr + src_w;
113 for (x = 0; x < dst_w; x++)
114 {
115 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2;
116 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2;
117 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2;
118 A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1) + A_VAL(src_ptr2) + A_VAL(src_ptr2 + 1)) >> 2;
119
120 src_ptr+=2;
121 src_ptr2+=2;
122 dst_ptr++;
123 }
124 }
125}
126#endif
127#endif
128
129#ifdef BUILD_SCALE_SMOOTH
130#ifdef BUILD_C
131EAPI void
132evas_common_scale_rgba_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
133{
134 int x, y, dst_w, dst_h;
135 DATA32 *src_ptr, *dst_ptr;
136
137 dst_w = src_w >> 1;
138 dst_h = src_h >> 1;
139
140 if (dst_w < 1) dst_w = 1;
141 if (dst_h < 1) dst_h = 1;
142
143 src_ptr = src;
144 dst_ptr = dst;
145 for (y = 0; y < dst_h; y++)
146 {
147 src_ptr = src + (y * src_w * 2);
148 for (x = 0; x < dst_w; x++)
149 {
150 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1;
151 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1;
152 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1;
153 A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1)) >> 1;
154
155 src_ptr+=2;
156 dst_ptr++;
157 }
158 }
159}
160#endif
161#endif
162
163#ifdef BUILD_SCALE_SMOOTH
164#ifdef BUILD_C
165EAPI void
166evas_common_scale_rgba_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
167{
168 int x, y, dst_w, dst_h;
169 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
170
171 dst_w = src_w >> 1;
172 dst_h = src_h >> 1;
173
174 if (dst_w < 1) dst_w = 1;
175 if (dst_h < 1) dst_h = 1;
176
177 src_ptr = src;
178 dst_ptr = dst;
179 for (y = 0; y < dst_h; y++)
180 {
181 src_ptr = src + (y * src_w * 2);
182 src_ptr2 = src_ptr + src_w;
183 for (x = 0; x < dst_w; x++)
184 {
185 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1;
186 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1;
187 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1;
188 A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr2)) >> 1;
189
190 src_ptr+=2;
191 src_ptr2+=2;
192 dst_ptr++;
193 }
194 }
195}
196#endif
197#endif
198
199#ifdef BUILD_SCALE_SMOOTH
200#ifdef BUILD_C
201EAPI void
202evas_common_scale_rgb_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
203{
204 int x, y, dst_w, dst_h;
205 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
206
207 dst_w = src_w >> 1;
208 dst_h = src_h >> 1;
209
210 if (dst_w < 1) dst_w = 1;
211 if (dst_h < 1) dst_h = 1;
212
213 src_ptr = src;
214 src_ptr2 = src + src_w;
215 dst_ptr = dst;
216 for (y = 0; y < dst_h; y++)
217 {
218 for (x = 0; x < dst_w; x++)
219 {
220 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2;
221 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2;
222 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2;
223 A_VAL(dst_ptr) = 0xff;
224
225 src_ptr+=2;
226 src_ptr2+=2;
227 dst_ptr++;
228 }
229 src_ptr += src_w;
230 src_ptr2 += src_w;
231 }
232}
233#endif
234#endif
235
236#ifdef BUILD_SCALE_SMOOTH
237#ifdef BUILD_C
238EAPI void
239evas_common_scale_rgb_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
240{
241 int x, y, dst_w, dst_h;
242 DATA32 *src_ptr, *dst_ptr;
243
244 dst_w = src_w >> 1;
245 dst_h = src_h >> 1;
246
247 if (dst_w < 1) dst_w = 1;
248 if (dst_h < 1) dst_h = 1;
249
250 src_ptr = src;
251 dst_ptr = dst;
252 for (y = 0; y < dst_h; y++)
253 {
254 for (x = 0; x < dst_w; x++)
255 {
256 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1;
257 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1;
258 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1;
259 A_VAL(dst_ptr) = 0xff;
260
261 src_ptr+=2;
262 dst_ptr++;
263 }
264 src_ptr += src_w;
265 }
266}
267#endif
268#endif
269
270#ifdef BUILD_SCALE_SMOOTH
271#ifdef BUILD_C
272EAPI void
273evas_common_scale_rgb_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
274{
275 int x, y, dst_w, dst_h;
276 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
277
278 dst_w = src_w >> 1;
279 dst_h = src_h >> 1;
280
281 if (dst_w < 1) dst_w = 1;
282 if (dst_h < 1) dst_h = 1;
283
284 src_ptr = src;
285 src_ptr2 = src + src_w;
286 dst_ptr = dst;
287 for (y = 0; y < dst_h; y++)
288 {
289 for (x = 0; x < dst_w; x++)
290 {
291 R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1;
292 G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1;
293 B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1;
294 A_VAL(dst_ptr) = 0xff;
295
296 src_ptr+=2;
297 src_ptr2+=2;
298 dst_ptr++;
299 }
300 src_ptr += src_w;
301 src_ptr2 += src_w;
302 }
303}
304#endif
305#endif
306
307#ifdef BUILD_SCALE_SMOOTH
308#ifdef BUILD_MMX
309EAPI void
310evas_common_scale_rgba_mipmap_down_2x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
311{
312 int x, y, dst_w, dst_h;
313 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
314
315 dst_w = src_w >> 1;
316 dst_h = src_h >> 1;
317
318 if (dst_w < 1) dst_w = 1;
319 if (dst_h < 1) dst_h = 1;
320
321 /* NB: Dead assignments (reassigned to different values below)
322 src_ptr = src;
323 src_ptr2 = src + src_w;
324 */
325
326 dst_ptr = dst;
327 for (y = 0; y < dst_h; y++)
328 {
329 src_ptr = src + (y * src_w * 2);
330 src_ptr2 = src_ptr + src_w;
331 for (x = 0; x < dst_w; x++)
332 {
333 punpcklbw_m2r(src_ptr[0], mm0);
334 punpcklbw_m2r(src_ptr[1], mm1);
335 punpcklbw_m2r(src_ptr2[0], mm2);
336 punpcklbw_m2r(src_ptr2[1], mm3);
337 psrlw_i2r(8, mm0);
338 psrlw_i2r(8, mm1);
339 psrlw_i2r(8, mm2);
340 psrlw_i2r(8, mm3);
341 paddw_r2r(mm1, mm0);
342 paddw_r2r(mm2, mm0);
343 paddw_r2r(mm3, mm0);
344 psrlw_i2r(2, mm0);
345 packuswb_r2r(mm0, mm0);
346 movd_r2m(mm0, dst_ptr[0]);
347
348 src_ptr+=2;
349 src_ptr2+=2;
350 dst_ptr++;
351 }
352 }
353}
354#endif
355#endif
356
357#ifdef BUILD_SCALE_SMOOTH
358#ifdef BUILD_MMX
359EAPI void
360evas_common_scale_rgba_mipmap_down_2x1_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
361{
362 int x, y, dst_w, dst_h;
363 DATA32 *src_ptr, *dst_ptr;
364
365 dst_w = src_w >> 1;
366 dst_h = src_h >> 1;
367
368 if (dst_w < 1) dst_w = 1;
369 if (dst_h < 1) dst_h = 1;
370
371 src_ptr = src;
372 dst_ptr = dst;
373 for (y = 0; y < dst_h; y++)
374 {
375 src_ptr = src + (y * src_w * 2);
376 for (x = 0; x < dst_w; x++)
377 {
378 punpcklbw_m2r(src_ptr[0], mm0);
379 punpcklbw_m2r(src_ptr[1], mm1);
380 psrlw_i2r(8, mm0);
381 psrlw_i2r(8, mm1);
382 paddw_r2r(mm1, mm0);
383 psrlw_i2r(1, mm0);
384 packuswb_r2r(mm0, mm0);
385 movd_r2m(mm0, dst_ptr[0]);
386
387 src_ptr+=2;
388 dst_ptr++;
389 }
390 }
391}
392#endif
393#endif
394
395#ifdef BUILD_SCALE_SMOOTH
396#ifdef BUILD_MMX
397EAPI void
398evas_common_scale_rgba_mipmap_down_1x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
399{
400 int x, y, dst_w, dst_h;
401 DATA32 *src_ptr, *src_ptr2, *dst_ptr;
402
403 dst_w = src_w >> 1;
404 dst_h = src_h >> 1;
405
406 if (dst_w < 1) dst_w = 1;
407 if (dst_h < 1) dst_h = 1;
408
409 /* NB: Dead assignment (gets reassigned later) */
410// src_ptr = src;
411
412 src_ptr2 = src + src_w;
413 dst_ptr = dst;
414 for (y = 0; y < dst_h; y++)
415 {
416 src_ptr = src + (y * src_w * 2);
417 src_ptr2 = src_ptr + src_w;
418 for (x = 0; x < dst_w; x++)
419 {
420 punpcklbw_m2r(src_ptr[0], mm0);
421 punpcklbw_m2r(src_ptr2[0], mm1);
422 psrlw_i2r(8, mm0);
423 psrlw_i2r(8, mm1);
424 paddw_r2r(mm1, mm0);
425 psrlw_i2r(1, mm0);
426 packuswb_r2r(mm0, mm0);
427 movd_r2m(mm0, dst_ptr[0]);
428
429 src_ptr+=2;
430 src_ptr2+=2;
431 dst_ptr++;
432 }
433 }
434}
435#endif
436#endif
437
438#ifdef BUILD_SCALE_SMOOTH
439# ifdef BUILD_MMX
440# undef SCALE_FUNC
441# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx
442# undef SCALE_USING_MMX
443# define SCALE_USING_MMX
444# include "evas_scale_smooth_scaler.c"
445# endif
446# ifdef BUILD_C
447# undef SCALE_FUNC
448# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c
449# undef SCALE_USING_MMX
450# include "evas_scale_smooth_scaler.c"
451# endif
452EAPI void
453evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
454 RGBA_Draw_Context *dc,
455 int src_region_x, int src_region_y,
456 int src_region_w, int src_region_h,
457 int dst_region_x, int dst_region_y,
458 int dst_region_w, int dst_region_h)
459{
460# ifdef BUILD_MMX
461 int mmx, sse, sse2;
462# endif
463 Cutout_Rects *rects;
464 Cutout_Rect *r;
465 int c, cx, cy, cw, ch;
466 int i;
467 /* handle cutouts here! */
468
469 if ((dst_region_w <= 0) || (dst_region_h <= 0)) return;
470 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)))
471 return;
472# ifdef BUILD_MMX
473 evas_common_cpu_can_do(&mmx, &sse, &sse2);
474# endif
475 /* no cutouts - cut right to the chase */
476 if (!dc->cutout.rects)
477 {
478# ifdef BUILD_MMX
479 if (mmx)
480 evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc,
481 src_region_x, src_region_y,
482 src_region_w, src_region_h,
483 dst_region_x, dst_region_y,
484 dst_region_w, dst_region_h);
485 else
486# endif
487# ifdef BUILD_C
488 evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc,
489 src_region_x, src_region_y,
490 src_region_w, src_region_h,
491 dst_region_x, dst_region_y,
492 dst_region_w, dst_region_h);
493# endif
494 return;
495 }
496 /* save out clip info */
497 c = dc->clip.use; cx = dc->clip.x; cy = dc->clip.y; cw = dc->clip.w; ch = dc->clip.h;
498 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
499 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
500 /* our clip is 0 size.. abort */
501 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
502 {
503 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
504 return;
505 }
506 rects = evas_common_draw_context_apply_cutouts(dc);
507 for (i = 0; i < rects->active; ++i)
508 {
509 r = rects->rects + i;
510 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
511# ifdef BUILD_MMX
512 if (mmx)
513 evas_common_scale_rgba_in_to_out_clip_smooth_mmx(src, dst, dc,
514 src_region_x, src_region_y,
515 src_region_w, src_region_h,
516 dst_region_x, dst_region_y,
517 dst_region_w, dst_region_h);
518 else
519# endif
520# ifdef BUILD_C
521 evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc,
522 src_region_x, src_region_y,
523 src_region_w, src_region_h,
524 dst_region_x, dst_region_y,
525 dst_region_w, dst_region_h);
526# endif
527 }
528 evas_common_draw_context_apply_clear_cutouts(rects);
529 /* restore clip info */
530 dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
531}
532#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 @@
1#ifndef _EVAS_SCALE_SMOOTH_H
2#define _EVAS_SCALE_SMOOTH_H
3
4EAPI void evas_common_scale_rgba_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
5EAPI void evas_common_scale_rgba_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
6EAPI void evas_common_scale_rgba_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
7EAPI void evas_common_scale_rgb_mipmap_down_2x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
8EAPI void evas_common_scale_rgb_mipmap_down_2x1_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
9EAPI void evas_common_scale_rgb_mipmap_down_1x2_c (DATA32 *src, DATA32 *dst, int src_w, int src_h);
10
11EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
12EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
13EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx (DATA32 *src, DATA32 *dst, int src_w, int src_h);
14
15EAPI 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);
16EAPI 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);
17
18
19#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 @@
1void
2SCALE_FUNC(RGBA_Image *src, RGBA_Image *dst,
3 RGBA_Draw_Context *dc,
4 int src_region_x, int src_region_y,
5 int src_region_w, int src_region_h,
6 int dst_region_x, int dst_region_y,
7 int dst_region_w, int dst_region_h)
8{
9 DATA32 *dst_ptr;
10 int dst_clip_x, dst_clip_y, dst_clip_w, dst_clip_h;
11 int src_w, src_h, dst_w, dst_h;
12
13 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)))
14 return;
15 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)))
16 return;
17
18 src_w = src->cache_entry.w;
19 src_h = src->cache_entry.h;
20 dst_w = dst->cache_entry.w;
21 dst_h = dst->cache_entry.h;
22
23 if (dc->clip.use)
24 {
25 dst_clip_x = dc->clip.x;
26 dst_clip_y = dc->clip.y;
27 dst_clip_w = dc->clip.w;
28 dst_clip_h = dc->clip.h;
29 if (dst_clip_x < 0)
30 {
31 dst_clip_w += dst_clip_x;
32 dst_clip_x = 0;
33 }
34 if (dst_clip_y < 0)
35 {
36 dst_clip_h += dst_clip_y;
37 dst_clip_y = 0;
38 }
39 if ((dst_clip_w <= 0) || (dst_clip_h <= 0)) return;
40 if ((dst_clip_x + dst_clip_w) > dst_w) dst_clip_w = dst_w - dst_clip_x;
41 if ((dst_clip_y + dst_clip_h) > dst_h) dst_clip_h = dst_h - dst_clip_y;
42 }
43 else
44 {
45 dst_clip_x = 0;
46 dst_clip_y = 0;
47 dst_clip_w = dst_w;
48 dst_clip_h = dst_h;
49 }
50
51 if (dst_clip_x < dst_region_x)
52 {
53 dst_clip_w += dst_clip_x - dst_region_x;
54 dst_clip_x = dst_region_x;
55 }
56 if ((dst_clip_x + dst_clip_w) > (dst_region_x + dst_region_w))
57 dst_clip_w = dst_region_x + dst_region_w - dst_clip_x;
58 if (dst_clip_y < dst_region_y)
59 {
60 dst_clip_h += dst_clip_y - dst_region_y;
61 dst_clip_y = dst_region_y;
62 }
63 if ((dst_clip_y + dst_clip_h) > (dst_region_y + dst_region_h))
64 dst_clip_h = dst_region_y + dst_region_h - dst_clip_y;
65
66 if ((src_region_w <= 0) || (src_region_h <= 0) ||
67 (dst_region_w <= 0) || (dst_region_h <= 0) ||
68 (dst_clip_w <= 0) || (dst_clip_h <= 0))
69 return;
70
71 /* sanitise x */
72 if (src_region_x < 0)
73 {
74 dst_region_x -= (src_region_x * dst_region_w) / src_region_w;
75 dst_region_w += (src_region_x * dst_region_w) / src_region_w;
76 src_region_w += src_region_x;
77 src_region_x = 0;
78 }
79 if (src_region_x >= src_w) return;
80 if ((src_region_x + src_region_w) > src_w)
81 {
82 dst_region_w = (dst_region_w * (src_w - src_region_x)) / (src_region_w);
83 src_region_w = src_w - src_region_x;
84 }
85 if (dst_region_w <= 0) return;
86 if (src_region_w <= 0) return;
87 if (dst_clip_x < 0)
88 {
89 dst_clip_w += dst_clip_x;
90 dst_clip_x = 0;
91 }
92 if (dst_clip_w <= 0) return;
93 if (dst_clip_x >= dst_w) return;
94 if (dst_clip_x < dst_region_x)
95 {
96 dst_clip_w += (dst_clip_x - dst_region_x);
97 dst_clip_x = dst_region_x;
98 }
99 if ((dst_clip_x + dst_clip_w) > dst_w)
100 {
101 dst_clip_w = dst_w - dst_clip_x;
102 }
103 if (dst_clip_w <= 0) return;
104
105 /* sanitise y */
106 if (src_region_y < 0)
107 {
108 dst_region_y -= (src_region_y * dst_region_h) / src_region_h;
109 dst_region_h += (src_region_y * dst_region_h) / src_region_h;
110 src_region_h += src_region_y;
111 src_region_y = 0;
112 }
113 if (src_region_y >= src_h) return;
114 if ((src_region_y + src_region_h) > src_h)
115 {
116 dst_region_h = (dst_region_h * (src_h - src_region_y)) / (src_region_h);
117 src_region_h = src_h - src_region_y;
118 }
119 if (dst_region_h <= 0) return;
120 if (src_region_h <= 0) return;
121 if (dst_clip_y < 0)
122 {
123 dst_clip_h += dst_clip_y;
124 dst_clip_y = 0;
125 }
126 if (dst_clip_h <= 0) return;
127 if (dst_clip_y >= dst_h) return;
128 if (dst_clip_y < dst_region_y)
129 {
130 dst_clip_h += (dst_clip_y - dst_region_y);
131 dst_clip_y = dst_region_y;
132 }
133 if ((dst_clip_y + dst_clip_h) > dst_h)
134 {
135 dst_clip_h = dst_h - dst_clip_y;
136 }
137 if (dst_clip_h <= 0) return;
138
139 /* some maximum region sizes to avoid insane calc point tables */
140 if (dst_clip_w > 65536) return;
141 if (dst_clip_h > 65536) return;
142 if (dst_region_w > (65536 * 1024)) return;
143 if (dst_region_h > (65536 * 1024)) return;
144
145 /* figure out dst jump
146 * NB: Unused currently, so commented out */
147// dst_jump = dst_w - dst_clip_w;
148
149 /* figure out dest start ptr */
150 dst_ptr = dst->image.data + dst_clip_x + (dst_clip_y * dst_w);
151
152/* FIXME:
153 *
154 * things to do later for speedups:
155 *
156 * break upscale into 3 cases (as listed below - up:up, 1:up, up:1)
157 *
158 * break downscale into more cases (as listed below)
159 *
160 * roll func (blend/copy/cultiply/cmod) code into inner loop of scaler.
161 * (578 fps vs 550 in mmx upscale in evas demo - this means probably
162 * a good 10-15% speedup over the func call, but means massively larger
163 * code)
164 *
165 * anything involving downscaling has no mmx equivalent code and maybe the
166 * C could do with a little work.
167 *
168 * ---------------------------------------------------------------------------
169 *
170 * (1 = no scaling (1:1 ratio), + = scale up, - = scale down)
171 * (* == fully optimised mmx, # = fully optimised C)
172 *
173 * h:v mmx C
174 *
175 * 1:1 * #
176 *
177 * +:+ * #
178 * 1:+ * #
179 * +:1 * #
180 *
181 * 1:-
182 * -:1
183 * +:-
184 * -:+
185 * -:-
186 *
187 */
188
189 /* if 1:1 scale */
190 if ((dst_region_w == src_region_w) &&
191 (dst_region_h == src_region_h))
192 {
193#include "evas_scale_smooth_scaler_noscale.c"
194 }
195 else
196 {
197 /* scaling up only - dont need anything except original */
198// if ((!dc->anti_alias) || ((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h)))
199 if (((dst_region_w >= src_region_w) && (dst_region_h >= src_region_h)))
200 {
201#include "evas_scale_smooth_scaler_up.c"
202 return;
203 }
204 else
205 /* scaling down... funkiness */
206 {
207#include "evas_scale_smooth_scaler_down.c"
208 return;
209 }
210 }
211}
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 @@
1{
2 DATA32 **ypoints;
3 int *xpoints;
4 int *xapoints, *xapp;
5 int *yapoints, *yapp;
6 DATA32 *buf, *src_data;
7
8 RGBA_Gfx_Func func;
9
10 src_data = src->image.data;
11
12 /* some maximum region sizes to avoid insane calc point tables */
13 SCALE_CALC_X_POINTS(xpoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w);
14 SCALE_CALC_Y_POINTS(ypoints, src_data, src_w, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h);
15 SCALE_CALC_A_POINTS(xapoints, src_region_w, dst_region_w, dst_clip_x - dst_region_x, dst_clip_w);
16 SCALE_CALC_A_POINTS(yapoints, src_region_h, dst_region_h, dst_clip_y - dst_region_y, dst_clip_h);
17
18 /* a scanline buffer */
19 buf = alloca(dst_clip_w * sizeof(DATA32));
20
21 if (dc->mul.use)
22 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
23 else
24 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
25 /* scaling down vertically */
26 if ((dst_region_w >= src_region_w) &&
27 (dst_region_h < src_region_h))
28 {
29#include "evas_scale_smooth_scaler_downy.c"
30 }
31 /* scaling down horizontally */
32 else if ((dst_region_w < src_region_w) &&
33 (dst_region_h >= src_region_h))
34 {
35#include "evas_scale_smooth_scaler_downx.c"
36 }
37 /* scaling down both vertically & horizontally */
38 else if ((dst_region_w < src_region_w) &&
39 (dst_region_h < src_region_h))
40 {
41#include "evas_scale_smooth_scaler_downx_downy.c"
42 }
43}
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 @@
1{
2 int Cx, j;
3 DATA32 *pix, *dptr, *pbuf, **yp;
4 int r, g, b, a, rr, gg, bb, aa;
5 int *xp, xap, yap, pos;
6 //int dyy, dxx;
7 int w = dst_clip_w;
8#ifdef EVAS_SLI
9 int ysli = dst_clip_y;
10#endif
11
12 dptr = dst_ptr;
13 pos = (src_region_y * src_w) + src_region_x;
14 //dyy = dst_clip_y - dst_region_y;
15 //dxx = dst_clip_x - dst_region_x;
16
17 xp = xpoints;// + dxx;
18 yp = ypoints;// + dyy;
19 xapp = xapoints;// + dxx;
20 yapp = yapoints;// + dyy;
21 pbuf = buf;
22
23 if (src->cache_entry.flags.alpha)
24 {
25 while (dst_clip_h--)
26 {
27#ifdef EVAS_SLI
28 if (((ysli) % dc->sli.h) == dc->sli.y)
29#endif
30 {
31 while (dst_clip_w--)
32 {
33 Cx = *xapp >> 16;
34 xap = *xapp & 0xffff;
35 pix = *yp + *xp + pos;
36
37 a = (A_VAL(pix) * xap) >> 10;
38 r = (R_VAL(pix) * xap) >> 10;
39 g = (G_VAL(pix) * xap) >> 10;
40 b = (B_VAL(pix) * xap) >> 10;
41 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
42 {
43 pix++;
44 a += (A_VAL(pix) * Cx) >> 10;
45 r += (R_VAL(pix) * Cx) >> 10;
46 g += (G_VAL(pix) * Cx) >> 10;
47 b += (B_VAL(pix) * Cx) >> 10;
48 }
49 if (j > 0)
50 {
51 pix++;
52 a += (A_VAL(pix) * j) >> 10;
53 r += (R_VAL(pix) * j) >> 10;
54 g += (G_VAL(pix) * j) >> 10;
55 b += (B_VAL(pix) * j) >> 10;
56 }
57 if ((yap = *yapp) > 0)
58 {
59 pix = *yp + *xp + src_w + pos;
60 aa = (A_VAL(pix) * xap) >> 10;
61 rr = (R_VAL(pix) * xap) >> 10;
62 gg = (G_VAL(pix) * xap) >> 10;
63 bb = (B_VAL(pix) * xap) >> 10;
64 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
65 {
66 pix++;
67 aa += (A_VAL(pix) * Cx) >> 10;
68 rr += (R_VAL(pix) * Cx) >> 10;
69 gg += (G_VAL(pix) * Cx) >> 10;
70 bb += (B_VAL(pix) * Cx) >> 10;
71 }
72 if (j > 0)
73 {
74 pix++;
75 aa += (A_VAL(pix) * j) >> 10;
76 rr += (R_VAL(pix) * j) >> 10;
77 gg += (G_VAL(pix) * j) >> 10;
78 bb += (B_VAL(pix) * j) >> 10;
79 }
80 a += ((aa - a) * yap) >> 8;
81 r += ((rr - r) * yap) >> 8;
82 g += ((gg - g) * yap) >> 8;
83 b += ((bb - b) * yap) >> 8;
84 }
85 *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
86 ((r + (1 << 3)) >> 4),
87 ((g + (1 << 3)) >> 4),
88 ((b + (1 << 3)) >> 4));
89 xp++; xapp++;
90 }
91
92 func(buf, NULL, dc->mul.col, dptr, w);
93 }
94#ifdef EVAS_SLI
95 ysli++;
96#endif
97 pbuf = buf;
98 dptr += dst_w; dst_clip_w = w;
99 yp++; yapp++;
100 xp = xpoints;// + dxx;
101 xapp = xapoints;// + dxx;
102 }
103 }
104 else
105 {
106#ifdef DIRECT_SCALE
107 if ((!src->cache_entry.flags.alpha) &&
108 (!dst->cache_entry.flags.alpha) &&
109 (!dc->mul.use))
110 {
111 while (dst_clip_h--)
112 {
113 pbuf = dptr;
114#ifdef EVAS_SLI
115 if (((ysli) % dc->sli.h) == dc->sli.y)
116#endif
117 {
118 while (dst_clip_w--)
119 {
120 Cx = *xapp >> 16;
121 xap = *xapp & 0xffff;
122 pix = *yp + *xp + pos;
123
124 r = (R_VAL(pix) * xap) >> 10;
125 g = (G_VAL(pix) * xap) >> 10;
126 b = (B_VAL(pix) * xap) >> 10;
127 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
128 {
129 pix++;
130 r += (R_VAL(pix) * Cx) >> 10;
131 g += (G_VAL(pix) * Cx) >> 10;
132 b += (B_VAL(pix) * Cx) >> 10;
133 }
134 if (j > 0)
135 {
136 pix++;
137 r += (R_VAL(pix) * j) >> 10;
138 g += (G_VAL(pix) * j) >> 10;
139 b += (B_VAL(pix) * j) >> 10;
140 }
141 if ((yap = *yapp) > 0)
142 {
143 pix = *yp + *xp + src_w + pos;
144 rr = (R_VAL(pix) * xap) >> 10;
145 gg = (G_VAL(pix) * xap) >> 10;
146 bb = (B_VAL(pix) * xap) >> 10;
147 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
148 {
149 pix++;
150 rr += (R_VAL(pix) * Cx) >> 10;
151 gg += (G_VAL(pix) * Cx) >> 10;
152 bb += (B_VAL(pix) * Cx) >> 10;
153 }
154 if (j > 0)
155 {
156 pix++;
157 rr += (R_VAL(pix) * j) >> 10;
158 gg += (G_VAL(pix) * j) >> 10;
159 bb += (B_VAL(pix) * j) >> 10;
160 }
161 r += ((rr - r) * yap) >> 8;
162 g += ((gg - g) * yap) >> 8;
163 b += ((bb - b) * yap) >> 8;
164 }
165 *pbuf++ = ARGB_JOIN(0xff,
166 ((r + (1 << 3)) >> 4),
167 ((g + (1 << 3)) >> 4),
168 ((b + (1 << 3)) >> 4));
169 xp++; xapp++;
170 }
171 }
172#ifdef EVAS_SLI
173 ysli++;
174#endif
175
176 dptr += dst_w; dst_clip_w = w;
177 yp++; yapp++;
178 xp = xpoints;// + dxx;
179 xapp = xapoints;// + dxx;
180 }
181 }
182 else
183#endif
184 {
185 while (dst_clip_h--)
186 {
187#ifdef EVAS_SLI
188 if (((ysli) % dc->sli.h) == dc->sli.y)
189#endif
190 {
191 while (dst_clip_w--)
192 {
193 Cx = *xapp >> 16;
194 xap = *xapp & 0xffff;
195 pix = *yp + *xp + pos;
196
197 r = (R_VAL(pix) * xap) >> 10;
198 g = (G_VAL(pix) * xap) >> 10;
199 b = (B_VAL(pix) * xap) >> 10;
200 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
201 {
202 pix++;
203 r += (R_VAL(pix) * Cx) >> 10;
204 g += (G_VAL(pix) * Cx) >> 10;
205 b += (B_VAL(pix) * Cx) >> 10;
206 }
207 if (j > 0)
208 {
209 pix++;
210 r += (R_VAL(pix) * j) >> 10;
211 g += (G_VAL(pix) * j) >> 10;
212 b += (B_VAL(pix) * j) >> 10;
213 }
214 if ((yap = *yapp) > 0)
215 {
216 pix = *yp + *xp + src_w + pos;
217 rr = (R_VAL(pix) * xap) >> 10;
218 gg = (G_VAL(pix) * xap) >> 10;
219 bb = (B_VAL(pix) * xap) >> 10;
220 for (j = (1 << 14) - xap; j > Cx; j -= Cx)
221 {
222 pix++;
223 rr += (R_VAL(pix) * Cx) >> 10;
224 gg += (G_VAL(pix) * Cx) >> 10;
225 bb += (B_VAL(pix) * Cx) >> 10;
226 }
227 if (j > 0)
228 {
229 pix++;
230 rr += (R_VAL(pix) * j) >> 10;
231 gg += (G_VAL(pix) * j) >> 10;
232 bb += (B_VAL(pix) * j) >> 10;
233 }
234 r += ((rr - r) * yap) >> 8;
235 g += ((gg - g) * yap) >> 8;
236 b += ((bb - b) * yap) >> 8;
237 }
238 *pbuf++ = ARGB_JOIN(0xff,
239 ((r + (1 << 3)) >> 4),
240 ((g + (1 << 3)) >> 4),
241 ((b + (1 << 3)) >> 4));
242 xp++; xapp++;
243 }
244
245 func(buf, NULL, dc->mul.col, dptr, w);
246 }
247#ifdef EVAS_SLI
248 ysli++;
249#endif
250
251 pbuf = buf;
252 dptr += dst_w; dst_clip_w = w;
253 yp++; yapp++;
254 xp = xpoints;// + dxx;
255 xapp = xapoints;// + dxx;
256 }
257 }
258 }
259}
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 @@
1{
2 int Cx, Cy, i, j;
3 DATA32 *dptr, *sptr, *pix, *pbuf;
4 int a, r, g, b, rx, gx, bx, ax;
5 int xap, yap, pos;
6 //int dyy, dxx;
7#ifdef EVAS_SLI
8 int ysli = dst_clip_y;
9#endif
10
11 DATA32 **yp;
12 int *xp;
13 int w = dst_clip_w;
14
15 dptr = dst_ptr;
16 pos = (src_region_y * src_w) + src_region_x;
17 //dyy = dst_clip_y - dst_region_y;
18 //dxx = dst_clip_x - dst_region_x;
19
20 xp = xpoints;// + dxx;
21 yp = ypoints;// + dyy;
22 xapp = xapoints;// + dxx;
23 yapp = yapoints;// + dyy;
24 pbuf = buf;
25/*#ifndef SCALE_USING_MMX */
26/* for now there's no mmx down scaling - so C only */
27#if 1
28 if (src->cache_entry.flags.alpha)
29 {
30 while (dst_clip_h--)
31 {
32#ifdef EVAS_SLI
33 if (((ysli) % dc->sli.h) == dc->sli.y)
34#endif
35 {
36 Cy = *yapp >> 16;
37 yap = *yapp & 0xffff;
38
39 while (dst_clip_w--)
40 {
41 Cx = *xapp >> 16;
42 xap = *xapp & 0xffff;
43
44 sptr = *yp + *xp + pos;
45 pix = sptr;
46 sptr += src_w;
47
48 ax = (A_VAL(pix) * xap) >> 9;
49 rx = (R_VAL(pix) * xap) >> 9;
50 gx = (G_VAL(pix) * xap) >> 9;
51 bx = (B_VAL(pix) * xap) >> 9;
52 pix++;
53 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
54 {
55 ax += (A_VAL(pix) * Cx) >> 9;
56 rx += (R_VAL(pix) * Cx) >> 9;
57 gx += (G_VAL(pix) * Cx) >> 9;
58 bx += (B_VAL(pix) * Cx) >> 9;
59 pix++;
60 }
61 if (i > 0)
62 {
63 ax += (A_VAL(pix) * i) >> 9;
64 rx += (R_VAL(pix) * i) >> 9;
65 gx += (G_VAL(pix) * i) >> 9;
66 bx += (B_VAL(pix) * i) >> 9;
67 }
68
69 a = (ax * yap) >> 14;
70 r = (rx * yap) >> 14;
71 g = (gx * yap) >> 14;
72 b = (bx * yap) >> 14;
73
74 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
75 {
76 pix = sptr;
77 sptr += src_w;
78 ax = (A_VAL(pix) * xap) >> 9;
79 rx = (R_VAL(pix) * xap) >> 9;
80 gx = (G_VAL(pix) * xap) >> 9;
81 bx = (B_VAL(pix) * xap) >> 9;
82 pix++;
83 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
84 {
85 ax += (A_VAL(pix) * Cx) >> 9;
86 rx += (R_VAL(pix) * Cx) >> 9;
87 gx += (G_VAL(pix) * Cx) >> 9;
88 bx += (B_VAL(pix) * Cx) >> 9;
89 pix++;
90 }
91 if (i > 0)
92 {
93 ax += (A_VAL(pix) * i) >> 9;
94 rx += (R_VAL(pix) * i) >> 9;
95 gx += (G_VAL(pix) * i) >> 9;
96 bx += (B_VAL(pix) * i) >> 9;
97 }
98
99 a += (ax * Cy) >> 14;
100 r += (rx * Cy) >> 14;
101 g += (gx * Cy) >> 14;
102 b += (bx * Cy) >> 14;
103 }
104 if (j > 0)
105 {
106 pix = sptr;
107 sptr += src_w;
108 ax = (A_VAL(pix) * xap) >> 9;
109 rx = (R_VAL(pix) * xap) >> 9;
110 gx = (G_VAL(pix) * xap) >> 9;
111 bx = (B_VAL(pix) * xap) >> 9;
112 pix++;
113 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
114 {
115 ax += (A_VAL(pix) * Cx) >> 9;
116 rx += (R_VAL(pix) * Cx) >> 9;
117 gx += (G_VAL(pix) * Cx) >> 9;
118 bx += (B_VAL(pix) * Cx) >> 9;
119 pix++;
120 }
121 if (i > 0)
122 {
123 ax += (A_VAL(pix) * i) >> 9;
124 rx += (R_VAL(pix) * i) >> 9;
125 gx += (G_VAL(pix) * i) >> 9;
126 bx += (B_VAL(pix) * i) >> 9;
127 }
128
129 a += (ax * j) >> 14;
130 r += (rx * j) >> 14;
131 g += (gx * j) >> 14;
132 b += (bx * j) >> 14;
133 }
134 *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5),
135 ((r + (1 << 4)) >> 5),
136 ((g + (1 << 4)) >> 5),
137 ((b + (1 << 4)) >> 5));
138 xp++; xapp++;
139 }
140
141 func(buf, NULL, dc->mul.col, dptr, w);
142 }
143#ifdef EVAS_SLI
144 ysli++;
145#endif
146 pbuf = buf;
147 dptr += dst_w; dst_clip_w = w;
148 xp = xpoints;// + dxx;
149 xapp = xapoints;// + dxx;
150 yp++; yapp++;
151 }
152 }
153 else
154 {
155#ifdef DIRECT_SCALE
156 if ((!src->cache_entry.flags.alpha) &&
157 (!dst->cache_entry.flags.alpha) &&
158 (!dc->mul.use))
159 {
160 while (dst_clip_h--)
161 {
162#ifdef EVAS_SLI
163 if (((ysli) % dc->sli.h) == dc->sli.y)
164#endif
165 {
166 Cy = *yapp >> 16;
167 yap = *yapp & 0xffff;
168
169 pbuf = dptr;
170 while (dst_clip_w--)
171 {
172 Cx = *xapp >> 16;
173 xap = *xapp & 0xffff;
174
175 sptr = *yp + *xp + pos;
176 pix = sptr;
177 sptr += src_w;
178
179 rx = (R_VAL(pix) * xap) >> 9;
180 gx = (G_VAL(pix) * xap) >> 9;
181 bx = (B_VAL(pix) * xap) >> 9;
182 pix++;
183 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
184 {
185 rx += (R_VAL(pix) * Cx) >> 9;
186 gx += (G_VAL(pix) * Cx) >> 9;
187 bx += (B_VAL(pix) * Cx) >> 9;
188 pix++;
189 }
190 if (i > 0)
191 {
192 rx += (R_VAL(pix) * i) >> 9;
193 gx += (G_VAL(pix) * i) >> 9;
194 bx += (B_VAL(pix) * i) >> 9;
195 }
196
197 r = (rx * yap) >> 14;
198 g = (gx * yap) >> 14;
199 b = (bx * yap) >> 14;
200
201 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
202 {
203 pix = sptr;
204 sptr += src_w;
205 rx = (R_VAL(pix) * xap) >> 9;
206 gx = (G_VAL(pix) * xap) >> 9;
207 bx = (B_VAL(pix) * xap) >> 9;
208 pix++;
209 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
210 {
211 rx += (R_VAL(pix) * Cx) >> 9;
212 gx += (G_VAL(pix) * Cx) >> 9;
213 bx += (B_VAL(pix) * Cx) >> 9;
214 pix++;
215 }
216 if (i > 0)
217 {
218 rx += (R_VAL(pix) * i) >> 9;
219 gx += (G_VAL(pix) * i) >> 9;
220 bx += (B_VAL(pix) * i) >> 9;
221 }
222
223 r += (rx * Cy) >> 14;
224 g += (gx * Cy) >> 14;
225 b += (bx * Cy) >> 14;
226 }
227 if (j > 0)
228 {
229 pix = sptr;
230 sptr += src_w;
231 rx = (R_VAL(pix) * xap) >> 9;
232 gx = (G_VAL(pix) * xap) >> 9;
233 bx = (B_VAL(pix) * xap) >> 9;
234 pix++;
235 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
236 {
237 rx += (R_VAL(pix) * Cx) >> 9;
238 gx += (G_VAL(pix) * Cx) >> 9;
239 bx += (B_VAL(pix) * Cx) >> 9;
240 pix++;
241 }
242 if (i > 0)
243 {
244 rx += (R_VAL(pix) * i) >> 9;
245 gx += (G_VAL(pix) * i) >> 9;
246 bx += (B_VAL(pix) * i) >> 9;
247 }
248
249 r += (rx * j) >> 14;
250 g += (gx * j) >> 14;
251 b += (bx * j) >> 14;
252 }
253 *pbuf++ = ARGB_JOIN(0xff,
254 ((r + (1 << 4)) >> 5),
255 ((g + (1 << 4)) >> 5),
256 ((b + (1 << 4)) >> 5));
257 xp++; xapp++;
258 }
259 }
260#ifdef EVAS_SLI
261 ysli++;
262#endif
263 dptr += dst_w; dst_clip_w = w;
264 xp = xpoints;// + dxx;
265 xapp = xapoints;// + dxx;
266 yp++; yapp++;
267 }
268 }
269 else
270#endif
271 {
272 while (dst_clip_h--)
273 {
274#ifdef EVAS_SLI
275 if (((ysli) % dc->sli.h) == dc->sli.y)
276#endif
277 {
278 Cy = *yapp >> 16;
279 yap = *yapp & 0xffff;
280
281 while (dst_clip_w--)
282 {
283 Cx = *xapp >> 16;
284 xap = *xapp & 0xffff;
285
286 sptr = *yp + *xp + pos;
287 pix = sptr;
288 sptr += src_w;
289
290 rx = (R_VAL(pix) * xap) >> 9;
291 gx = (G_VAL(pix) * xap) >> 9;
292 bx = (B_VAL(pix) * xap) >> 9;
293 pix++;
294 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
295 {
296 rx += (R_VAL(pix) * Cx) >> 9;
297 gx += (G_VAL(pix) * Cx) >> 9;
298 bx += (B_VAL(pix) * Cx) >> 9;
299 pix++;
300 }
301 if (i > 0)
302 {
303 rx += (R_VAL(pix) * i) >> 9;
304 gx += (G_VAL(pix) * i) >> 9;
305 bx += (B_VAL(pix) * i) >> 9;
306 }
307
308 r = (rx * yap) >> 14;
309 g = (gx * yap) >> 14;
310 b = (bx * yap) >> 14;
311
312 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
313 {
314 pix = sptr;
315 sptr += src_w;
316 rx = (R_VAL(pix) * xap) >> 9;
317 gx = (G_VAL(pix) * xap) >> 9;
318 bx = (B_VAL(pix) * xap) >> 9;
319 pix++;
320 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
321 {
322 rx += (R_VAL(pix) * Cx) >> 9;
323 gx += (G_VAL(pix) * Cx) >> 9;
324 bx += (B_VAL(pix) * Cx) >> 9;
325 pix++;
326 }
327 if (i > 0)
328 {
329 rx += (R_VAL(pix) * i) >> 9;
330 gx += (G_VAL(pix) * i) >> 9;
331 bx += (B_VAL(pix) * i) >> 9;
332 }
333
334 r += (rx * Cy) >> 14;
335 g += (gx * Cy) >> 14;
336 b += (bx * Cy) >> 14;
337 }
338 if (j > 0)
339 {
340 pix = sptr;
341 sptr += src_w;
342 rx = (R_VAL(pix) * xap) >> 9;
343 gx = (G_VAL(pix) * xap) >> 9;
344 bx = (B_VAL(pix) * xap) >> 9;
345 pix++;
346 for (i = (1 << 14) - xap; i > Cx; i -= Cx)
347 {
348 rx += (R_VAL(pix) * Cx) >> 9;
349 gx += (G_VAL(pix) * Cx) >> 9;
350 bx += (B_VAL(pix) * Cx) >> 9;
351 pix++;
352 }
353 if (i > 0)
354 {
355 rx += (R_VAL(pix) * i) >> 9;
356 gx += (G_VAL(pix) * i) >> 9;
357 bx += (B_VAL(pix) * i) >> 9;
358 }
359
360 r += (rx * j) >> 14;
361 g += (gx * j) >> 14;
362 b += (bx * j) >> 14;
363 }
364 *pbuf++ = ARGB_JOIN(0xff,
365 ((r + (1 << 4)) >> 5),
366 ((g + (1 << 4)) >> 5),
367 ((b + (1 << 4)) >> 5));
368 xp++; xapp++;
369 }
370
371 func(buf, NULL, dc->mul.col, dptr, w);
372 }
373#ifdef EVAS_SLI
374 ysli++;
375#endif
376 pbuf = buf;
377 dptr += dst_w; dst_clip_w = w;
378 xp = xpoints;// + dxx;
379 xapp = xapoints;// + dxx;
380 yp++; yapp++;
381 }
382 }
383 }
384#else
385 /* MMX scaling down would go here */
386#endif
387}
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 @@
1{
2 int Cy, j;
3 DATA32 *dptr, *pix, *pbuf, **yp;
4 int r, g, b, a, rr, gg, bb, aa;
5 int *xp, xap, yap, pos;
6 //int dyy, dxx;
7 int w = dst_clip_w;
8#ifdef EVAS_SLI
9 int ysli = dst_clip_y;
10#endif
11
12 dptr = dst_ptr;
13 pos = (src_region_y * src_w) + src_region_x;
14 //dyy = dst_clip_y - dst_region_y;
15 //dxx = dst_clip_x - dst_region_x;
16
17 xp = xpoints;// + dxx;
18 yp = ypoints;// + dyy;
19 xapp = xapoints;// + dxx;
20 yapp = yapoints;// + dyy;
21 pbuf = buf;
22
23 if (src->cache_entry.flags.alpha)
24 {
25 while (dst_clip_h--)
26 {
27#ifdef EVAS_SLI
28 if (((ysli) % dc->sli.h) == dc->sli.y)
29#endif
30 {
31 Cy = *yapp >> 16;
32 yap = *yapp & 0xffff;
33
34 while (dst_clip_w--)
35 {
36 pix = *yp + *xp + pos;
37
38 a = (A_VAL(pix) * yap) >> 10;
39 r = (R_VAL(pix) * yap) >> 10;
40 g = (G_VAL(pix) * yap) >> 10;
41 b = (B_VAL(pix) * yap) >> 10;
42 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
43 {
44 pix += src_w;
45 a += (A_VAL(pix) * Cy) >> 10;
46 r += (R_VAL(pix) * Cy) >> 10;
47 g += (G_VAL(pix) * Cy) >> 10;
48 b += (B_VAL(pix) * Cy) >> 10;
49 }
50 if (j > 0)
51 {
52 pix += src_w;
53 a += (A_VAL(pix) * j) >> 10;
54 r += (R_VAL(pix) * j) >> 10;
55 g += (G_VAL(pix) * j) >> 10;
56 b += (B_VAL(pix) * j) >> 10;
57 }
58 if ((xap = *xapp) > 0)
59 {
60 pix = *yp + *xp + 1 + pos;
61 aa = (A_VAL(pix) * yap) >> 10;
62 rr = (R_VAL(pix) * yap) >> 10;
63 gg = (G_VAL(pix) * yap) >> 10;
64 bb = (B_VAL(pix) * yap) >> 10;
65 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
66 {
67 pix += src_w;
68 aa += (A_VAL(pix) * Cy) >> 10;
69 rr += (R_VAL(pix) * Cy) >> 10;
70 gg += (G_VAL(pix) * Cy) >> 10;
71 bb += (B_VAL(pix) * Cy) >> 10;
72 }
73 if (j > 0)
74 {
75 pix += src_w;
76 aa += (A_VAL(pix) * j) >> 10;
77 rr += (R_VAL(pix) * j) >> 10;
78 gg += (G_VAL(pix) * j) >> 10;
79 bb += (B_VAL(pix) * j) >> 10;
80 }
81 a += ((aa - a) * xap) >> 8;
82 r += ((rr - r) * xap) >> 8;
83 g += ((gg - g) * xap) >> 8;
84 b += ((bb - b) * xap) >> 8;
85 }
86 *pbuf++ = ARGB_JOIN(((a + (1 << 3)) >> 4),
87 ((r + (1 << 3)) >> 4),
88 ((g + (1 << 3)) >> 4),
89 ((b + (1 << 3)) >> 4));
90 xp++; xapp++;
91 }
92
93 func(buf, NULL, dc->mul.col, dptr, w);
94 }
95#ifdef EVAS_SLI
96 ysli++;
97#endif
98 pbuf = buf;
99 dptr += dst_w; dst_clip_w = w;
100 yp++; yapp++;
101 xp = xpoints;// + dxx;
102 xapp = xapoints;// + dxx;
103 }
104 }
105 else
106 {
107#ifdef DIRECT_SCALE
108 if ((!src->cache_entry.flags.alpha) &&
109 (!dst->cache_entry.flags.alpha) &&
110 (!dc->mul.use))
111 {
112 while (dst_clip_h--)
113 {
114#ifdef EVAS_SLI
115 if (((ysli) % dc->sli.h) == dc->sli.y)
116#endif
117 {
118 Cy = *yapp >> 16;
119 yap = *yapp & 0xffff;
120
121 pbuf = dptr;
122 while (dst_clip_w--)
123 {
124 pix = *yp + *xp + pos;
125
126 r = (R_VAL(pix) * yap) >> 10;
127 g = (G_VAL(pix) * yap) >> 10;
128 b = (B_VAL(pix) * yap) >> 10;
129 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
130 {
131 pix += src_w;
132 r += (R_VAL(pix) * Cy) >> 10;
133 g += (G_VAL(pix) * Cy) >> 10;
134 b += (B_VAL(pix) * Cy) >> 10;
135 }
136 if (j > 0)
137 {
138 pix += src_w;
139 r += (R_VAL(pix) * j) >> 10;
140 g += (G_VAL(pix) * j) >> 10;
141 b += (B_VAL(pix) * j) >> 10;
142 }
143 if ((xap = *xapp) > 0)
144 {
145 pix = *yp + *xp + 1 + pos;
146 rr = (R_VAL(pix) * yap) >> 10;
147 gg = (G_VAL(pix) * yap) >> 10;
148 bb = (B_VAL(pix) * yap) >> 10;
149 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
150 {
151 pix += src_w;
152 rr += (R_VAL(pix) * Cy) >> 10;
153 gg += (G_VAL(pix) * Cy) >> 10;
154 bb += (B_VAL(pix) * Cy) >> 10;
155 }
156 if (j > 0)
157 {
158 pix += src_w;
159 rr += (R_VAL(pix) * j) >> 10;
160 gg += (G_VAL(pix) * j) >> 10;
161 bb += (B_VAL(pix) * j) >> 10;
162 }
163 r += ((rr - r) * xap) >> 8;
164 g += ((gg - g) * xap) >> 8;
165 b += ((bb - b) * xap) >> 8;
166 }
167 *pbuf++ = ARGB_JOIN(0xff,
168 ((r + (1 << 3)) >> 4),
169 ((g + (1 << 3)) >> 4),
170 ((b + (1 << 3)) >> 4));
171 xp++; xapp++;
172 }
173 }
174#ifdef EVAS_SLI
175 ysli++;
176#endif
177 dptr += dst_w; dst_clip_w = w;
178 yp++; yapp++;
179 xp = xpoints;// + dxx;
180 xapp = xapoints;// + dxx;
181 }
182 }
183 else
184#endif
185 {
186 while (dst_clip_h--)
187 {
188#ifdef EVAS_SLI
189 if (((ysli) % dc->sli.h) == dc->sli.y)
190#endif
191 {
192 Cy = *yapp >> 16;
193 yap = *yapp & 0xffff;
194
195 while (dst_clip_w--)
196 {
197 pix = *yp + *xp + pos;
198
199 r = (R_VAL(pix) * yap) >> 10;
200 g = (G_VAL(pix) * yap) >> 10;
201 b = (B_VAL(pix) * yap) >> 10;
202 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
203 {
204 pix += src_w;
205 r += (R_VAL(pix) * Cy) >> 10;
206 g += (G_VAL(pix) * Cy) >> 10;
207 b += (B_VAL(pix) * Cy) >> 10;
208 }
209 if (j > 0)
210 {
211 pix += src_w;
212 r += (R_VAL(pix) * j) >> 10;
213 g += (G_VAL(pix) * j) >> 10;
214 b += (B_VAL(pix) * j) >> 10;
215 }
216 if ((xap = *xapp) > 0)
217 {
218 pix = *yp + *xp + 1 + pos;
219 rr = (R_VAL(pix) * yap) >> 10;
220 gg = (G_VAL(pix) * yap) >> 10;
221 bb = (B_VAL(pix) * yap) >> 10;
222 for (j = (1 << 14) - yap; j > Cy; j -= Cy)
223 {
224 pix += src_w;
225 rr += (R_VAL(pix) * Cy) >> 10;
226 gg += (G_VAL(pix) * Cy) >> 10;
227 bb += (B_VAL(pix) * Cy) >> 10;
228 }
229 if (j > 0)
230 {
231 pix += src_w;
232 rr += (R_VAL(pix) * j) >> 10;
233 gg += (G_VAL(pix) * j) >> 10;
234 bb += (B_VAL(pix) * j) >> 10;
235 }
236 r += ((rr - r) * xap) >> 8;
237 g += ((gg - g) * xap) >> 8;
238 b += ((bb - b) * xap) >> 8;
239 }
240 *pbuf++ = ARGB_JOIN(0xff,
241 ((r + (1 << 3)) >> 4),
242 ((g + (1 << 3)) >> 4),
243 ((b + (1 << 3)) >> 4));
244 xp++; xapp++;
245 }
246
247 func(buf, NULL, dc->mul.col, dptr, w);
248 }
249#ifdef EVAS_SLI
250 ysli++;
251#endif
252 pbuf = buf;
253 dptr += dst_w; dst_clip_w = w;
254 yp++; yapp++;
255 xp = xpoints;// + dxx;
256 xapp = xapoints;// + dxx;
257 }
258 }
259 }
260}
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 @@
1{
2 DATA32 *ptr;
3 RGBA_Gfx_Func func;
4 RGBA_Image *maskobj;
5 DATA8 *mask = NULL;
6#ifdef EVAS_SLI
7 int ysli = dst_clip_y;
8#endif
9
10 ptr = src->image.data + ((dst_clip_y - dst_region_y + src_region_y) * src_w) + (dst_clip_x - dst_region_x) + src_region_x;
11 if (dc->mask.mask)
12 {
13 func = evas_common_gfx_func_composite_pixel_mask_span_get(NULL, NULL, dst_clip_w, dc->render_op);
14 maskobj = dc->mask.mask;
15 mask = maskobj->mask.mask;
16 }
17 else if (dc->mul.use)
18 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
19 else
20 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
21
22 if (mask)
23 {
24 // mask += dst_clip_x - dc->mask.x;
25 // mask += (dst_clip_y - dc->mask.y) * maskobj->cache_entry.w;
26 while (dst_clip_h--)
27 {
28
29#ifdef EVAS_SLI
30 if (((ysli) % dc->sli.h) == dc->sli.y)
31#endif
32 {
33 func(ptr, mask, dc->mul.col, dst_ptr, dst_clip_w);
34 }
35#ifdef EVAS_SLI
36 ysli++;
37#endif
38 ptr += src_w;
39 dst_ptr += dst_w;
40 mask += maskobj->cache_entry.w;
41 }
42 }
43 else
44 {
45 while (dst_clip_h--)
46 {
47#ifdef EVAS_SLI
48 if (((ysli) % dc->sli.h) == dc->sli.y)
49#endif
50 {
51 func(ptr, NULL, dc->mul.col, dst_ptr, dst_clip_w);
52 }
53#ifdef EVAS_SLI
54 ysli++;
55#endif
56 ptr += src_w;
57 dst_ptr += dst_w;
58 }
59 }
60}
61
62/* 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 @@
1{
2 int srx = src_region_x, sry = src_region_y;
3 int srw = src_region_w, srh = src_region_h;
4 int drx = dst_region_x, dry = dst_region_y;
5 int drw = dst_region_w, drh = dst_region_h;
6
7 int dsxx, dsyy, sxx, syy, sx, sy;
8 int cx, cy;
9 int direct_scale = 0, buf_step = 0;
10
11 DATA32 *psrc, *pdst, *pdst_end;
12 DATA32 *buf, *pbuf, *pbuf_end;
13 RGBA_Gfx_Func func = NULL;
14
15 /* check value to make overflow(only check value related with overflow) */
16 if ((src_region_w > SCALE_SIZE_MAX) ||
17 (src_region_h > SCALE_SIZE_MAX)) return;
18
19 /* a scanline buffer */
20 pdst = dst_ptr; // it's been set at (dst_clip_x, dst_clip_y)
21 pdst_end = pdst + (dst_clip_h * dst_w);
22 if (!dc->mul.use)
23 {
24 if ((dc->render_op == _EVAS_RENDER_BLEND) && !src->cache_entry.flags.alpha)
25 { direct_scale = 1; buf_step = dst->cache_entry.w; }
26 else if (dc->render_op == _EVAS_RENDER_COPY)
27 {
28 direct_scale = 1; buf_step = dst->cache_entry.w;
29 if (src->cache_entry.flags.alpha)
30 dst->cache_entry.flags.alpha = 1;
31 }
32 }
33 if (!direct_scale)
34 {
35 buf = alloca(dst_clip_w * sizeof(DATA32));
36 if (dc->mul.use)
37 func = evas_common_gfx_func_composite_pixel_color_span_get(src, dc->mul.col, dst, dst_clip_w, dc->render_op);
38 else
39 func = evas_common_gfx_func_composite_pixel_span_get(src, dst, dst_clip_w, dc->render_op);
40 }
41 else
42 buf = pdst;
43
44 if ((srw > 1) && (drw > 1))
45 dsxx = ((srw - 1) << 16) / (drw - 1);
46 else
47 dsxx = (srw << 16) / drw;
48 if ((srh > 1) && (drh > 1))
49 dsyy = ((srh - 1) << 16) / (drh - 1);
50 else
51 dsyy = (srh << 16) / drh;
52
53 cx = dst_clip_x - drx;
54 cy = dst_clip_y - dry;
55
56 sxx = (dsxx * cx);
57 syy = (dsyy * cy);
58
59 sy = syy >> 16;
60
61 if (drh == srh)
62 {
63 int sxx0 = sxx;
64#ifdef EVAS_SLI
65 int ysli = dst_clip_y;
66#endif
67 psrc = src->image.data + (src_w * (sry + cy)) + srx;
68 while (pdst < pdst_end)
69 {
70#ifdef EVAS_SLI
71 if (((ysli) % dc->sli.h) == dc->sli.y)
72#endif
73 {
74 pbuf = buf; pbuf_end = buf + dst_clip_w;
75 sxx = sxx0;
76#ifdef SCALE_USING_MMX
77 pxor_r2r(mm0, mm0);
78 MOV_A2R(ALPHA_255, mm5)
79#endif
80 while (pbuf < pbuf_end)
81 {
82 DATA32 p0, p1;
83 int ax;
84
85 sx = (sxx >> 16);
86 ax = 1 + ((sxx - (sx << 16)) >> 8);
87 p0 = p1 = *(psrc + sx);
88 if ((sx + 1) < srw)
89 p1 = *(psrc + sx + 1);
90#ifdef SCALE_USING_MMX
91 MOV_P2R(p0, mm1, mm0)
92 if (p0 | p1)
93 {
94 MOV_A2R(ax, mm3)
95 MOV_P2R(p1, mm2, mm0)
96 INTERP_256_R2R(mm3, mm2, mm1, mm5)
97 }
98 MOV_R2P(mm1, *pbuf, mm0)
99 pbuf++;
100#else
101 if (p0 | p1)
102 p0 = INTERP_256(ax, p1, p0);
103 *pbuf++ = p0;
104#endif
105 sxx += dsxx;
106 }
107 /* * blend here [clip_w *] buf -> dptr * */
108 if (!direct_scale)
109 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
110 }
111#ifdef EVAS_SLI
112 ysli++;
113#endif
114 pdst += dst_w;
115 psrc += src_w;
116 buf += buf_step;
117 }
118
119 goto done_scale_up;
120 }
121 else if (drw == srw)
122 {
123 DATA32 *ps = src->image.data + (src_w * sry) + srx + cx;
124#ifdef EVAS_SLI
125 int ysli = dst_clip_y;
126#endif
127
128 while (pdst < pdst_end)
129 {
130#ifdef EVAS_SLI
131 if (((ysli) % dc->sli.h) == dc->sli.y)
132#endif
133 {
134 int ay;
135
136 sy = syy >> 16;
137 psrc = ps + (sy * src_w);
138 ay = 1 + ((syy - (sy << 16)) >> 8);
139#ifdef SCALE_USING_MMX
140 pxor_r2r(mm0, mm0);
141 MOV_A2R(ALPHA_255, mm5)
142 MOV_A2R(ay, mm4)
143#endif
144 pbuf = buf; pbuf_end = buf + dst_clip_w;
145 while (pbuf < pbuf_end)
146 {
147 DATA32 p0 = *psrc, p2 = p0;
148
149 if ((sy + 1) < srh)
150 p2 = *(psrc + src_w);
151#ifdef SCALE_USING_MMX
152 MOV_P2R(p0, mm1, mm0)
153 if (p0 | p2)
154 {
155 MOV_P2R(p2, mm2, mm0)
156 INTERP_256_R2R(mm4, mm2, mm1, mm5)
157 }
158 MOV_R2P(mm1, *pbuf, mm0)
159 pbuf++;
160#else
161 if (p0 | p2)
162 p0 = INTERP_256(ay, p2, p0);
163 *pbuf++ = p0;
164#endif
165 psrc++;
166 }
167 /* * blend here [clip_w *] buf -> dptr * */
168 if (!direct_scale)
169 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
170 }
171#ifdef EVAS_SLI
172 ysli++;
173#endif
174 pdst += dst_w;
175 syy += dsyy;
176 buf += buf_step;
177 }
178 goto done_scale_up;
179 }
180
181 {
182 DATA32 *ps = src->image.data + (src_w * sry) + srx;
183 int sxx0 = sxx;
184#ifdef EVAS_SLI
185 int ysli = dst_clip_y;
186#endif
187
188 while (pdst < pdst_end)
189 {
190#ifdef EVAS_SLI
191 if (((ysli) % dc->sli.h) == dc->sli.y)
192#endif
193 {
194 int ay;
195
196 sy = syy >> 16;
197 psrc = ps + (sy * src_w);
198 ay = 1 + ((syy - (sy << 16)) >> 8);
199#ifdef SCALE_USING_MMX
200 MOV_A2R(ay, mm4)
201 pxor_r2r(mm0, mm0);
202 MOV_A2R(ALPHA_255, mm5)
203#endif
204 pbuf = buf; pbuf_end = buf + dst_clip_w;
205 sxx = sxx0;
206 while (pbuf < pbuf_end)
207 {
208 int ax;
209 DATA32 *p, *q;
210 DATA32 p0, p1, p2, p3;
211
212 sx = sxx >> 16;
213 ax = 1 + ((sxx - (sx << 16)) >> 8);
214 p = psrc + sx; q = p + src_w;
215 p0 = p1 = p2 = p3 = *p;
216 if ((sx + 1) < srw)
217 p1 = *(p + 1);
218 if ((sy + 1) < srh)
219 {
220 p2 = *q; p3 = p2;
221 if ((sx + 1) < srw)
222 p3 = *(q + 1);
223 }
224#ifdef SCALE_USING_MMX
225 MOV_A2R(ax, mm6)
226 MOV_P2R(p0, mm1, mm0)
227 if (p0 | p1)
228 {
229 MOV_P2R(p1, mm2, mm0)
230 INTERP_256_R2R(mm6, mm2, mm1, mm5)
231 }
232 MOV_P2R(p2, mm2, mm0)
233 if (p2 | p3)
234 {
235 MOV_P2R(p3, mm3, mm0)
236 INTERP_256_R2R(mm6, mm3, mm2, mm5)
237 }
238 INTERP_256_R2R(mm4, mm2, mm1, mm5)
239 MOV_R2P(mm1, *pbuf, mm0)
240 pbuf++;
241#else
242 if (p0 | p1)
243 p0 = INTERP_256(ax, p1, p0);
244 if (p2 | p3)
245 p2 = INTERP_256(ax, p3, p2);
246 if (p0 | p2)
247 p0 = INTERP_256(ay, p2, p0);
248 *pbuf++ = p0;
249#endif
250 sxx += dsxx;
251 }
252 /* * blend here [clip_w *] buf -> dptr * */
253 if (!direct_scale)
254 func(buf, NULL, dc->mul.col, pdst, dst_clip_w);
255 }
256#ifdef EVAS_SLI
257 ysli++;
258#endif
259 pdst += dst_w;
260 syy += dsyy;
261 buf += buf_step;
262 }
263 }
264 done_scale_up:
265 return;
266}
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 @@
1#include "evas_common.h"
2#include "evas_convert_color.h"
3#include "evas_scale_span.h"
4
5static void
6evas_common_scale_rgba_span_(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
7{
8 int mul = 0, step = 1;
9 DATA32 *pdst = dst;
10
11 if (!src || !dst) return;
12 if ((src_len < 1) || (dst_len < 1)) return;
13 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
14 if (mul_col != 0xffffffff)
15 mul = 1;
16 if (dir < 0)
17 {
18 pdst += dst_len - 1;
19 step = -1;
20 }
21
22 if ((src_len == 1) || (dst_len == 1))
23 {
24 DATA32 c = *src;
25
26 if (mul) c = MUL4_SYM(mul_col, c);
27 while (dst_len--)
28 *dst++ = c;
29 return;
30 }
31
32 if (src_len == dst_len)
33 {
34 if (mul)
35 {
36#ifdef BUILD_MMX
37 pxor_r2r(mm0, mm0);
38 MOV_A2R(ALPHA_255, mm5)
39 MOV_P2R(mul_col, mm7, mm0)
40#endif
41 while (dst_len--)
42 {
43#ifdef BUILD_MMX
44 MOV_P2R(*src, mm1, mm0)
45 MUL4_SYM_R2R(mm7, mm1, mm5)
46 MOV_R2P(mm1, *pdst, mm0)
47#else
48 *pdst = MUL4_SYM(mul_col, *src);
49#endif
50 src++; pdst += step;
51 }
52 return;
53 }
54 while (dst_len--)
55 {
56 *pdst = *src;
57 src++; pdst += step;
58 }
59 return;
60 }
61
62 {
63 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
64 DATA32 sxx = 0;
65 int sx = sxx >> 16;
66
67#ifdef BUILD_MMX
68 pxor_r2r(mm0, mm0);
69 MOV_A2R(ALPHA_255, mm5)
70 if (mul)
71 {
72 MOV_P2R(mul_col, mm7, mm0)
73 }
74#endif
75 while (dst_len--)
76 {
77 DATA32 p2, p1 = 0;
78 int a;
79
80 sx = (sxx >> 16);
81 if (sx < src_len)
82 p1 = *(src + sx);
83 p2 = p1;
84 if ((sx + 1) < src_len)
85 p2 = *(src + sx + 1);
86 a = 1 + ((sxx - (sx << 16)) >> 8);
87#ifdef BUILD_MMX
88 MOV_A2R(a, mm3)
89 MOV_P2R(p1, mm1, mm0)
90 MOV_P2R(p2, mm2, mm0)
91 INTERP_256_R2R(mm3, mm2, mm1, mm5)
92 if (mul)
93 {
94 MUL4_SYM_R2R(mm7, mm1, mm5)
95 }
96 MOV_R2P(mm1, *pdst, mm0)
97#else
98 p1 = INTERP_256(a, p2, p1);
99 if (mul)
100 p1 = MUL4_SYM(mul_col, p1);
101 *pdst = p1;
102#endif
103 pdst += step; sxx += dsxx;
104 }
105 return;
106 }
107}
108
109static void
110evas_common_scale_rgba_a8_span_(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
111{
112 int mul = 0, step = 1;
113 DATA32 *pdst = dst;
114
115 if (!src || !mask || !dst) return;
116 if ((src_len < 1) || (dst_len < 1)) return;
117 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
118 if (mul_col != 0xffffffff)
119 mul = 1;
120 if (dir < 0)
121 {
122 pdst += dst_len - 1;
123 step = -1;
124 }
125
126 if ((src_len == 1) || (dst_len == 1))
127 {
128 DATA32 c = MUL_SYM(*mask, *src);
129
130 if (mul) c = MUL4_SYM(mul_col, c);
131 while (dst_len--)
132 *dst++ = c;
133 return;
134 }
135
136 if (src_len == dst_len)
137 {
138#ifdef BUILD_MMX
139 pxor_r2r(mm0, mm0);
140 MOV_A2R(ALPHA_255, mm5)
141#endif
142 if (mul)
143 {
144#ifdef BUILD_MMX
145 MOV_P2R(mul_col, mm7, mm0)
146#endif
147 while (dst_len--)
148 {
149#ifdef BUILD_MMX
150 MOV_P2R(*src, mm1, mm0)
151 MOV_A2R(*mask, mm3)
152 MUL4_SYM_R2R(mm3, mm1, mm5)
153 MUL4_SYM_R2R(mm7, mm1, mm5)
154 MOV_R2P(mm1, *pdst, mm0)
155#else
156 DATA32 c = MUL_SYM(*mask, *src);
157 *pdst = MUL4_SYM(mul_col, c);
158#endif
159 src++; mask++; pdst += step;
160 }
161 return;
162 }
163 while (dst_len--)
164 {
165#ifdef BUILD_MMX
166 MOV_P2R(*src, mm1, mm0)
167 MOV_A2R(*mask, mm3)
168 MUL4_SYM_R2R(mm3, mm1, mm5)
169 MOV_R2P(mm1, *pdst, mm0)
170#else
171 *pdst = MUL_SYM(*mask, *src);
172#endif
173 src++; mask++; pdst += step;
174 }
175 return;
176 }
177
178 {
179 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
180 DATA32 sxx = 0;
181 int sx = sxx >> 16;
182
183#ifdef BUILD_MMX
184 pxor_r2r(mm0, mm0);
185 MOV_A2R(ALPHA_255, mm5)
186 if (mul)
187 {
188 MOV_P2R(mul_col, mm7, mm0)
189 }
190#endif
191 while (dst_len--)
192 {
193 DATA32 p2, p1 = 0;
194 int a, a2, a1 = 0;
195
196 sx = (sxx >> 16);
197 if (sx < src_len)
198 {
199 p1 = *(src + sx);
200 a1 = *(mask + sx);
201 }
202 p2 = p1; a2 = a1;
203 if ((sx + 1) < src_len)
204 {
205 p2 = *(src + sx + 1);
206 a2 = *(mask + sx + 1);
207 }
208 a = 1 + ((sxx - (sx << 16)) >> 8);
209#ifdef BUILD_MMX
210 MOV_A2R(a, mm3)
211 MOV_P2R(p1, mm1, mm0)
212 MOV_P2R(p2, mm2, mm0)
213 INTERP_256_R2R(mm3, mm2, mm1, mm5)
214 a1 += 1 + ((a * (a2 - a1)) >> 8);
215 MOV_A2R(a1, mm3)
216 MUL4_256_R2R(mm3, mm1)
217 if (mul)
218 {
219 MUL4_SYM_R2R(mm7, mm1, mm5)
220 }
221 MOV_R2P(mm1, *pdst, mm0)
222#else
223 p1 = INTERP_256(a, p2, p1);
224 a1 += 1 + ((a * (a2 - a1)) >> 8);
225 p1 = MUL_256(a1, p1);
226 if (mul)
227 p1 = MUL4_SYM(mul_col, p1);
228 *pdst = p1;
229#endif
230 pdst += step; sxx += dsxx;
231 }
232 return;
233 }
234}
235
236static void
237evas_common_scale_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
238{
239 int step = 1;
240 DATA32 *pdst = dst;
241
242 if (!mask || !dst) return;
243 if ((src_len < 1) || (dst_len < 1)) return;
244 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
245 if (dir < 0)
246 {
247 pdst += dst_len - 1;
248 step = -1;
249 }
250
251 if ((src_len == 1) || (dst_len == 1))
252 {
253 DATA32 c = MUL_SYM(*mask, mul_col);
254
255 while (dst_len--)
256 *dst++ = c;
257 return;
258 }
259
260#ifdef BUILD_MMX
261 pxor_r2r(mm0, mm0);
262 MOV_A2R(ALPHA_255, mm5)
263 MOV_P2R(mul_col, mm7, mm0)
264#endif
265 if (src_len == dst_len)
266 {
267 while (dst_len--)
268 {
269#ifdef BUILD_MMX
270 MOV_A2R(*mask, mm3)
271 MUL4_SYM_R2R(mm7, mm3, mm5)
272 MOV_R2P(mm3, *pdst, mm0)
273#else
274 *pdst = MUL_SYM(*mask, mul_col);
275#endif
276 mask++; pdst += step;
277 }
278 return;
279 }
280
281 {
282 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
283 DATA32 sxx = 0;
284 int sx = sxx >> 16;
285
286 while (dst_len--)
287 {
288 int a, a2, a1 = 0;
289
290 sx = (sxx >> 16);
291 if (sx < src_len)
292 a1 = *(mask + sx);
293 a2 = a1;
294 if ((sx + 1) < src_len)
295 a2 = *(mask + sx + 1);
296 a = 1 + ((sxx - (sx << 16)) >> 8);
297 a1 += 1 + ((a * (a2 - a1)) >> 8);
298#ifdef BUILD_MMX
299 MOV_A2R(a1, mm3)
300 MUL4_256_R2R(mm7, mm3)
301 MOV_R2P(mm3, *pdst, mm0)
302#else
303 *pdst = MUL_256(a1, mul_col);
304#endif
305 pdst += step; sxx += dsxx;
306 }
307 return;
308 }
309}
310
311static void
312evas_common_scale_clip_a8_span_(DATA32 *src __UNUSED__, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
313{
314 int mul = 0, step = 1;
315 DATA32 *pdst = dst;
316
317 if (!mask || !dst) return;
318 if ((src_len < 1) || (dst_len < 1)) return;
319 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
320 if (mul_col != 0xffffffff)
321 mul = 1;
322 if (dir < 0)
323 {
324 pdst += dst_len - 1;
325 step = -1;
326 }
327
328#ifdef BUILD_MMX
329 pxor_r2r(mm0, mm0);
330 MOV_A2R(ALPHA_255, mm5)
331 if (mul)
332 {
333 MOV_P2R(mul_col, mm7, mm0)
334 }
335#endif
336 if ((src_len == 1) || (dst_len == 1))
337 {
338#ifdef BUILD_MMX
339 MOV_A2R(*mask, mm3)
340#else
341 DATA32 c = *mask;
342#endif
343 if (mul)
344 {
345#ifdef BUILD_MMX
346 MUL4_SYM_R2R(mm7, mm3, mm5)
347#else
348 c = MUL_SYM(c, mul_col);
349#endif
350 while (dst_len--)
351 {
352#ifdef BUILD_MMX
353 MOV_P2R(*dst, mm1, mm0)
354 MUL4_SYM_R2R(mm3, mm1, mm5)
355 MOV_R2P(mm1, *dst, mm0)
356#else
357 *dst = MUL4_SYM(c, *dst);
358#endif
359 dst++;
360 }
361 return;
362 }
363 while (dst_len--)
364 {
365#ifdef BUILD_MMX
366 MOV_P2R(*dst, mm1, mm0)
367 MUL4_SYM_R2R(mm3, mm1, mm5)
368 MOV_R2P(mm1, *dst, mm0)
369#else
370 *dst = MUL_SYM(c, *dst);
371#endif
372 dst++;
373 }
374 return;
375 }
376
377 if (src_len == dst_len)
378 {
379 if (mul)
380 {
381 while (dst_len--)
382 {
383#ifdef BUILD_MMX
384 MOV_A2R(*mask, mm3)
385 MUL4_SYM_R2R(mm7, mm3, mm5)
386 MOV_P2R(*pdst, mm1, mm0)
387 MUL4_SYM_R2R(mm3, mm1, mm5)
388 MOV_R2P(mm1, *pdst, mm0)
389#else
390 DATA32 c = MUL_SYM(*mask, mul_col);
391
392 *pdst = MUL4_SYM(c, *pdst);
393#endif
394 mask++; pdst += step;
395 }
396 return;
397 }
398 while (dst_len--)
399 {
400#ifdef BUILD_MMX
401 MOV_A2R(*mask, mm3)
402 MOV_P2R(*pdst, mm1, mm0)
403 MUL4_SYM_R2R(mm3, mm1, mm5)
404 MOV_R2P(mm1, *pdst, mm0)
405#else
406 *pdst = MUL_SYM(*mask, *pdst);
407#endif
408 mask++; pdst += step;
409 }
410 return;
411 }
412
413 {
414 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
415 DATA32 sxx = 0;
416 int sx = sxx >> 16;
417
418 while (dst_len--)
419 {
420 int a, a2, a1 = 0;
421
422 sx = (sxx >> 16);
423 if (sx < src_len)
424 a1 = *(mask + sx);
425 a2 = a1;
426 if ((sx + 1) < src_len)
427 a2 = *(mask + sx + 1);
428 a = 1 + ((sxx - (sx << 16)) >> 8);
429 a1 += 1 + ((a * (a2 - a1)) >> 8);
430#ifdef BUILD_MMX
431 MOV_A2R(a1, mm3)
432 MOV_P2R(*pdst, mm1, mm0)
433 MUL4_256_R2R(mm3, mm1)
434 if (mul)
435 {
436 MUL4_SYM_R2R(mm7, mm1, mm5)
437 }
438 MOV_R2P(mm1, *pdst, mm0)
439#else
440 *pdst = MUL_256(a1, *pdst);
441 if (mul)
442 *pdst = MUL4_SYM(mul_col, *pdst);
443#endif
444 pdst += step; sxx += dsxx;
445 }
446 return;
447 }
448}
449
450EAPI void
451evas_common_scale_rgba_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
452{
453 evas_common_scale_rgba_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
454 evas_common_cpu_end_opt();
455}
456
457EAPI void
458evas_common_scale_rgba_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
459{
460 evas_common_scale_rgba_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
461 evas_common_cpu_end_opt();
462}
463
464EAPI void
465evas_common_scale_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
466{
467 evas_common_scale_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
468 evas_common_cpu_end_opt();
469}
470
471EAPI void
472evas_common_scale_clip_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
473{
474 evas_common_scale_clip_a8_span_(src, mask, src_len, mul_col, dst, dst_len, dir);
475 evas_common_cpu_end_opt();
476}
477
478EAPI void
479evas_common_scale_hsva_span(DATA32 *src, DATA8 *mask __UNUSED__, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
480{
481 int mul = 0, step = 1;
482 DATA32 *pdst = dst;
483
484 if (!src || !dst) return;
485 if ((src_len < 1) || (dst_len < 1)) return;
486 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
487 if (mul_col != 0xffffffff)
488 mul = 1;
489 if (dir < 0)
490 {
491 pdst += dst_len - 1;
492 step = -1;
493 }
494
495 if ((src_len == 1) || (dst_len == 1))
496 {
497 DATA32 c = *src;
498
499 if (mul) c = MUL4_SYM(mul_col, c);
500 while (dst_len--)
501 *dst++ = c;
502 return;
503 }
504
505 if (src_len == dst_len)
506 {
507 if (mul)
508 {
509 while (dst_len--)
510 {
511 *pdst = MUL4_SYM(mul_col, *src);
512 src++; pdst += step;
513 }
514 return;
515 }
516 while (dst_len--)
517 {
518 *pdst = *src;
519 src++; pdst += step;
520 }
521 return;
522 }
523
524 {
525 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
526 DATA32 sxx = 0;
527 int sx = sxx >> 16;
528
529 while (dst_len--)
530 {
531 DATA32 p2, p1 = 0;
532 int a, h1, s1, v1, h2, s2, v2;
533
534 sx = (sxx >> 16);
535 if (sx < src_len)
536 p1 = *(src + sx);
537 evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff,
538 &h1, &s1, &v1);
539 p2 = p1;
540 if ((sx + 1) < src_len)
541 p2 = *(src + sx + 1);
542 evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff,
543 &h2, &s2, &v2);
544 a = 1 + ((sxx - (sx << 16)) >> 8);
545 h1 += (a * (h2 - h1)) >> 8;
546 s1 += (a * (s2 - s1)) >> 8;
547 v1 += (a * (v2 - v1)) >> 8;
548 a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) +
549 (p1 & 0xff000000)) & 0xff000000;
550 evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2);
551 p1 = a + RGB_JOIN(h2,s2,v2);
552 if (mul)
553 p1 = MUL4_SYM(mul_col, p1);
554 *pdst = p1;
555 pdst += step; sxx += dsxx;
556 }
557 return;
558 }
559}
560
561EAPI void
562evas_common_scale_hsva_a8_span(DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir)
563{
564 int mul = 0, step = 1;
565 DATA32 *pdst = dst;
566
567 if (!src || !mask || !dst) return;
568 if ((src_len < 1) || (dst_len < 1)) return;
569 if ((src_len > SCALE_SIZE_MAX) || (dst_len > SCALE_SIZE_MAX)) return;
570 if (mul_col != 0xffffffff)
571 mul = 1;
572 if (dir < 0)
573 {
574 pdst += dst_len - 1;
575 step = -1;
576 }
577
578 if ((src_len == 1) || (dst_len == 1))
579 {
580 DATA32 c = MUL_SYM(*mask, *src);
581
582 if (mul) c = MUL4_SYM(mul_col, c);
583 while (dst_len--)
584 *dst++ = c;
585 return;
586 }
587
588 if (src_len == dst_len)
589 {
590 if (mul)
591 {
592 while (dst_len--)
593 {
594 DATA32 c = MUL_SYM(*mask, *src);
595 *pdst = MUL4_SYM(mul_col, c);
596 src++; mask++; pdst += step;
597 }
598 return;
599 }
600 while (dst_len--)
601 {
602 *pdst = MUL_SYM(*mask, *src);
603 src++; mask++; pdst += step;
604 }
605 return;
606 }
607
608 {
609 DATA32 dsxx = (((src_len - 1) << 16) / (dst_len - 1));
610 DATA32 sxx = 0;
611 int sx = sxx >> 16;
612
613 while (dst_len--)
614 {
615 DATA32 p2, p1 = 0;
616 int a, a2, a1 = 0;
617 int h1, s1, v1, h2, s2, v2;
618
619 sx = (sxx >> 16);
620 if (sx < src_len)
621 {
622 p1 = *(src + sx);
623 a1 = *(mask + sx);
624 }
625 p2 = p1; a2 = a1;
626 if ((sx + 1) < src_len)
627 {
628 p2 = *(src + sx + 1);
629 a2 = *(mask + sx + 1);
630 }
631 evas_common_convert_color_rgb_to_hsv_int((p1 >> 16) & 0xff, (p1 >> 8) & 0xff, p1 & 0xff,
632 &h1, &s1, &v1);
633 evas_common_convert_color_rgb_to_hsv_int((p2 >> 16) & 0xff, (p2 >> 8) & 0xff, p2 & 0xff,
634 &h2, &s2, &v2);
635 a = 1 + ((sxx - (sx << 16)) >> 8);
636 a1 += (a * (a2 - a1)) >> 8;
637 h1 += (a * (h2 - h1)) >> 8;
638 s1 += (a * (s2 - s1)) >> 8;
639 v1 += (a * (v2 - v1)) >> 8;
640 a = (((((p2 >> 8) & 0xff0000) - ((p1 >> 8) & 0xff0000)) * a) +
641 (p1 & 0xff000000)) & 0xff000000;
642
643 evas_common_convert_color_hsv_to_rgb_int(h1, s1, v1, &h2, &s2, &v2);
644 p1 = a + RGB_JOIN(h2,s2,v2);
645 p1 = MUL_SYM(a1, p1);
646 if (mul)
647 p1 = MUL4_SYM(mul_col, p1);
648 *pdst = p1;
649 pdst += step; sxx += dsxx;
650 }
651 return;
652 }
653}
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 @@
1#ifndef _EVAS_SCALE_SPAN_H
2#define _EVAS_SCALE_SPAN_H
3
4
5EAPI void evas_common_scale_rgba_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
6EAPI void evas_common_scale_rgba_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
7EAPI void evas_common_scale_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
8EAPI void evas_common_scale_clip_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
9
10EAPI void evas_common_scale_hsva_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
11EAPI void evas_common_scale_hsva_a8_span (DATA32 *src, DATA8 *mask, int src_len, DATA32 mul_col, DATA32 *dst, int dst_len, int dir);
12
13
14#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 @@
1#include "evas_common.h"
2#include "evas_font_private.h"
3#include "evas_text_utils.h"
4#include "language/evas_bidi_utils.h"
5#include "language/evas_language_utils.h"
6#include "evas_font_ot.h"
7
8void
9evas_common_text_props_bidi_set(Evas_Text_Props *props,
10 Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start)
11{
12#ifdef BIDI_SUPPORT
13 props->bidi.dir = (evas_bidi_is_rtl_char(
14 bidi_par_props,
15 0,
16 start)) ? EVAS_BIDI_DIRECTION_RTL : EVAS_BIDI_DIRECTION_LTR;
17#else
18 (void) start;
19 (void) bidi_par_props;
20 props->bidi.dir = EVAS_BIDI_DIRECTION_LTR;
21#endif
22}
23
24void
25evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr)
26{
27 props->script = scr;
28}
29
30void
31evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst,
32 const Evas_Text_Props *src)
33{
34 memcpy(dst, src, sizeof(Evas_Text_Props));
35 evas_common_text_props_content_ref(dst);
36}
37
38void
39evas_common_text_props_content_ref(Evas_Text_Props *props)
40{
41 /* No content in this case */
42 if (!props->info)
43 return;
44
45 props->info->refcount++;
46}
47
48void
49evas_common_text_props_content_unref(Evas_Text_Props *props)
50{
51 /* No content in this case */
52 if (!props->info)
53 return;
54
55 if (--(props->info->refcount) == 0)
56 {
57 if (props->info->glyph)
58 free(props->info->glyph);
59#ifdef OT_SUPPORT
60 if (props->info->ot)
61 free(props->info->ot);
62#endif
63 free(props->info);
64 props->info = NULL;
65 }
66}
67
68static int
69_evas_common_text_props_cluster_move(const Evas_Text_Props *props, int pos,
70 Eina_Bool right)
71{
72 int prop_pos = evas_common_text_props_index_find(props, pos);
73 if (!right && (prop_pos > 0))
74 {
75#ifdef OT_SUPPORT
76 return props->info->ot[props->start + prop_pos - 1].source_cluster -
77 props->text_offset;
78#else
79 return props->start + prop_pos - 1 - props->text_offset;
80#endif
81 }
82 else if (right && (prop_pos < (int) (props->len - 1)))
83 {
84#ifdef OT_SUPPORT
85 return props->info->ot[props->start + prop_pos + 1].source_cluster -
86 props->text_offset;
87#else
88 return props->start + prop_pos + 1 - props->text_offset;
89#endif
90 }
91
92 return pos;
93}
94
95EAPI int
96evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos)
97{
98 Eina_Bool right;
99 /* Move right if we are in a non-rtl text */
100 right = (props->bidi.dir != EVAS_BIDI_DIRECTION_RTL);
101 return _evas_common_text_props_cluster_move(props, pos, right);
102}
103
104EAPI int
105evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos)
106{
107 Eina_Bool right;
108 /* Move right if we are in an rtl text */
109 right = (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL);
110 return _evas_common_text_props_cluster_move(props, pos, right);
111}
112
113/* Returns the index of the logical char in the props. */
114EAPI int
115evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff)
116{
117#ifdef OT_SUPPORT
118 Evas_Font_OT_Info *ot_info;
119 int min = 0;
120 int max = props->len - 1;
121 int mid;
122
123 _cutoff += props->text_offset;
124 ot_info = props->info->ot + props->start;
125 /* Should get us closer to the right place. */
126 if ((min <= _cutoff) && (_cutoff <= max))
127 mid = _cutoff;
128 else
129 mid = (min + max) / 2;
130
131 if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
132 {
133 /* Monotonic in a descending order */
134 do
135 {
136 if (_cutoff > (int) ot_info[mid].source_cluster)
137 max = mid - 1;
138 else if (_cutoff < (int) ot_info[mid].source_cluster)
139 min = mid + 1;
140 else
141 break;
142
143 mid = (min + max) / 2;
144 }
145 while (min <= max);
146 }
147 else
148 {
149 /* Monotonic in an ascending order */
150 do
151 {
152 if (_cutoff < (int) ot_info[mid].source_cluster)
153 max = mid - 1;
154 else if (_cutoff > (int) ot_info[mid].source_cluster)
155 min = mid + 1;
156 else
157 break;
158
159 mid = (min + max) / 2;
160 }
161 while (min <= max);
162 }
163
164 /* If we didn't find, abort */
165 if (min > max)
166 return -1;
167
168 ot_info += mid;
169 if (props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
170 {
171 /* Walk to the last one of the same cluster */
172 for ( ; mid < (int) props->len ; mid++, ot_info++)
173 {
174 if (ot_info->source_cluster != (size_t) _cutoff)
175 break;
176 }
177 mid--;
178 }
179 else
180 {
181 /* Walk to the last one of the same cluster */
182 for ( ; mid >= 0 ; mid--, ot_info--)
183 {
184 if (ot_info->source_cluster != (size_t) _cutoff)
185 break;
186 }
187 mid++;
188 }
189
190 return mid;
191#else
192 return _cutoff;
193 (void) props;
194#endif
195}
196
197/* Won't work in the middle of ligatures, assumes cutoff < len.
198 * Also won't work in the middle of indic words, should handle that in a
199 * smart way. */
200EAPI void
201evas_common_text_props_split(Evas_Text_Props *base,
202 Evas_Text_Props *ext, int _cutoff)
203{
204 size_t cutoff;
205
206 /* Translate text cutoff pos to string object cutoff point */
207#ifdef OT_SUPPORT
208 _cutoff = evas_common_text_props_index_find(base, _cutoff);
209
210 if (_cutoff >= 0)
211 {
212 cutoff = (size_t) _cutoff;
213 }
214 else
215 {
216 ERR("Couldn't find the cutoff position. Is it inside a cluster?");
217 return;
218 }
219#else
220 cutoff = (size_t) _cutoff;
221#endif
222
223 evas_common_text_props_content_copy_and_ref(ext, base);
224 if (base->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
225 {
226 ext->start = base->start;
227 ext->len = cutoff + 1;
228 base->start = base->start + ext->len;
229 base->len = base->len - ext->len;
230
231#ifdef OT_SUPPORT
232 ext->text_offset =
233 ext->info->ot[ext->start + ext->len - 1].source_cluster;
234#else
235 ext->text_offset = base->text_offset + base->len;
236#endif
237 }
238 else
239 {
240 ext->start = base->start + cutoff;
241 ext->len = base->len - cutoff;
242 base->len = cutoff;
243
244#ifdef OT_SUPPORT
245 ext->text_offset = ext->info->ot[ext->start].source_cluster;
246#else
247 ext->text_offset = base->text_offset + base->len;
248#endif
249 }
250 ext->text_len = base->text_len - (ext->text_offset - base->text_offset);
251 base->text_len = (ext->text_offset - base->text_offset);
252}
253
254/* Won't work in the middle of ligatures */
255EAPI void
256evas_common_text_props_merge(Evas_Text_Props *item1,
257 const Evas_Text_Props *item2)
258{
259 if (item1->info != item2->info)
260 {
261 ERR("tried merge back items that weren't together in the first place.");
262 return;
263 }
264 if (item1->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
265 {
266 item1->start = item2->start;
267 }
268
269 item1->len += item2->len;
270 item1->text_len += item2->text_len;
271}
272
273EAPI Eina_Bool
274evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
275 Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
276 size_t par_pos, int len)
277{
278 RGBA_Font_Int *fi = (RGBA_Font_Int *) _fi;
279
280 if (text_props->info)
281 {
282 evas_common_text_props_content_unref(text_props);
283 }
284 if (len == 0)
285 {
286 text_props->info = NULL;
287 text_props->start = text_props->len = text_props->text_offset = 0;
288 }
289 text_props->info = calloc(1, sizeof(Evas_Text_Props_Info));
290
291 text_props->font_instance = fi;
292
293 evas_common_font_int_reload(fi);
294 if (fi->src->current_size != fi->size)
295 {
296 FTLOCK();
297 FT_Activate_Size(fi->ft.size);
298 FTUNLOCK();
299 fi->src->current_size = fi->size;
300 }
301
302#ifdef OT_SUPPORT
303 size_t char_index;
304 Evas_Font_Glyph_Info *gl_itr;
305 Evas_Coord pen_x = 0, adjust_x = 0;
306 (void) par_props;
307 (void) par_pos;
308
309 evas_common_font_ot_populate_text_props(text, text_props, len);
310
311 gl_itr = text_props->info->glyph;
312 for (char_index = 0 ; char_index < text_props->len ; char_index++)
313 {
314 FT_UInt idx;
315 RGBA_Font_Glyph *fg;
316 Eina_Bool is_replacement = EINA_FALSE;
317 /* If we got a malformed index, show the replacement char instead */
318 if (gl_itr->index == 0)
319 {
320 gl_itr->index = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
321 is_replacement = EINA_TRUE;
322 }
323 idx = gl_itr->index;
324 LKL(fi->ft_mutex);
325 fg = evas_common_font_int_cache_glyph_get(fi, idx);
326 if (!fg)
327 {
328 LKU(fi->ft_mutex);
329 continue;
330 }
331 LKU(fi->ft_mutex);
332
333 gl_itr->x_bear = fg->glyph_out->left;
334 gl_itr->width = fg->glyph_out->bitmap.width;
335 /* text_props->info->glyph[char_index].advance =
336 * text_props->info->glyph[char_index].index =
337 * already done by the ot function */
338 if (EVAS_FONT_CHARACTER_IS_INVISIBLE(
339 text[text_props->info->ot[char_index].source_cluster]))
340 {
341 gl_itr->index = 0;
342 /* Reduce the current advance */
343 if (gl_itr > text_props->info->glyph)
344 {
345 adjust_x -= gl_itr->pen_after - (gl_itr - 1)->pen_after;
346 }
347 else
348 {
349 adjust_x -= gl_itr->pen_after;
350 }
351 }
352 else
353 {
354 if (is_replacement)
355 {
356 /* Update the advance accordingly */
357 adjust_x += (pen_x + (fg->glyph->advance.x >> 16)) -
358 gl_itr->pen_after;
359 }
360 pen_x = gl_itr->pen_after;
361 }
362 gl_itr->pen_after += adjust_x;
363
364 fi = text_props->font_instance;
365 gl_itr++;
366 }
367#else
368 /* We are walking the string in visual ordering */
369 Evas_Font_Glyph_Info *gl_itr;
370 Eina_Bool use_kerning;
371 FT_UInt prev_index;
372 FT_Face pface = NULL;
373 Evas_Coord pen_x = 0;
374 int adv_d, i;
375#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
376 Eina_Unicode *base_str = NULL;
377 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
378 {
379 text = base_str = eina_unicode_strndup(text, len);
380 evas_bidi_shape_string(base_str, par_props, par_pos, len);
381 }
382#else
383 (void) par_props;
384 (void) par_pos;
385#endif
386
387 FTLOCK();
388 use_kerning = FT_HAS_KERNING(fi->src->ft.face);
389 FTUNLOCK();
390 prev_index = 0;
391
392 i = len;
393 text_props->info->glyph = calloc(len,
394 sizeof(Evas_Font_Glyph_Info));
395
396 if (text_props->bidi.dir == EVAS_BIDI_DIRECTION_RTL)
397 {
398 text += len - 1;
399 adv_d = -1;
400 }
401 else
402 {
403 adv_d = 1;
404 }
405
406 gl_itr = text_props->info->glyph;
407 for ( ; i > 0 ; gl_itr++, text += adv_d, i--)
408 {
409 FT_UInt idx;
410 RGBA_Font_Glyph *fg;
411 int _gl, kern;
412 Evas_Coord adv;
413 _gl = *text;
414 if (_gl == 0) break;
415
416 idx = evas_common_get_char_index(fi, _gl);
417 if (idx == 0)
418 {
419 idx = evas_common_get_char_index(fi, REPLACEMENT_CHAR);
420 }
421
422 LKL(fi->ft_mutex);
423 fg = evas_common_font_int_cache_glyph_get(fi, idx);
424 if (!fg)
425 {
426 LKU(fi->ft_mutex);
427 continue;
428 }
429 kern = 0;
430
431 if ((use_kerning) && (prev_index) && (idx) &&
432 (pface == fi->src->ft.face))
433 {
434 if (evas_common_font_query_kerning(fi, prev_index, idx, &kern))
435 {
436 pen_x += kern;
437 (gl_itr - 1)->pen_after +=
438 EVAS_FONT_ROUND_26_6_TO_INT(kern);
439 }
440 }
441
442 pface = fi->src->ft.face;
443 LKU(fi->ft_mutex);
444
445 gl_itr->index = idx;
446 gl_itr->x_bear = fg->glyph_out->left;
447 adv = fg->glyph->advance.x >> 10;
448 gl_itr->width = fg->glyph_out->bitmap.width;
449
450 if (EVAS_FONT_CHARACTER_IS_INVISIBLE(_gl))
451 {
452 gl_itr->index = 0;
453 }
454 else
455 {
456 pen_x += adv;
457 }
458
459 gl_itr->pen_after = EVAS_FONT_ROUND_26_6_TO_INT(pen_x);
460
461 prev_index = idx;
462 }
463 text_props->len = len;
464# if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
465 if (base_str)
466 free(base_str);
467# endif
468#endif
469 text_props->text_len = len;
470 text_props->info->refcount = 1;
471 return EINA_TRUE;
472}
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 @@
1#ifndef _EVAS_TEXT_UTILS_H
2# define _EVAS_TEXT_UTILS_H
3
4typedef struct _Evas_Text_Props Evas_Text_Props;
5typedef struct _Evas_Text_Props_Info Evas_Text_Props_Info;
6typedef struct _Evas_Font_Glyph_Info Evas_Font_Glyph_Info;
7
8# include "evas_font_ot.h"
9# include "language/evas_bidi_utils.h"
10# include "language/evas_language_utils.h"
11
12/* Used for showing "malformed" or missing chars */
13#define REPLACEMENT_CHAR 0xFFFD
14
15struct _Evas_Text_Props
16{
17 /* Start and len represent the start offset and the length in the
18 * glyphs_info and ot_data fields, they are both internal */
19 size_t start;
20 size_t len;
21 size_t text_offset; /* The text offset from the start of the info */
22 size_t text_len; /* The length of the original text */
23 Evas_BiDi_Props bidi;
24 Evas_Script_Type script;
25 Evas_Text_Props_Info *info;
26 void *font_instance;
27};
28
29struct _Evas_Text_Props_Info
30{
31 unsigned int refcount;
32 Evas_Font_Glyph_Info *glyph;
33 Evas_Font_OT_Info *ot;
34};
35
36/* Sorted in visual order when created */
37struct _Evas_Font_Glyph_Info
38{
39 unsigned int index; /* Should conform to FT */
40 Evas_Coord x_bear;
41#if 0
42 /* This one is rarely used, only in draw, in which we already get the glyph
43 * so it doesn't really save time. Leaving it here just so no one will
44 * add it thinking it was accidentally skipped */
45 Evas_Coord y_bear;
46#endif
47 Evas_Coord width;
48 Evas_Coord pen_after;
49};
50
51
52void
53evas_common_text_props_bidi_set(Evas_Text_Props *props,
54 Evas_BiDi_Paragraph_Props *bidi_par_props, size_t start);
55
56void
57evas_common_text_props_script_set(Evas_Text_Props *props, Evas_Script_Type scr);
58
59EAPI Eina_Bool
60evas_common_text_props_content_create(void *_fi, const Eina_Unicode *text,
61 Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props,
62 size_t par_pos, int len);
63
64void
65evas_common_text_props_content_copy_and_ref(Evas_Text_Props *dst,
66 const Evas_Text_Props *src);
67
68void
69evas_common_text_props_content_ref(Evas_Text_Props *props);
70
71void
72evas_common_text_props_content_unref(Evas_Text_Props *props);
73
74EAPI int
75evas_common_text_props_cluster_next(const Evas_Text_Props *props, int pos);
76
77EAPI int
78evas_common_text_props_cluster_prev(const Evas_Text_Props *props, int pos);
79
80EAPI int
81evas_common_text_props_index_find(const Evas_Text_Props *props, int _cutoff);
82
83EAPI void
84evas_common_text_props_split(Evas_Text_Props *base, Evas_Text_Props *ext,
85 int cutoff);
86EAPI void
87evas_common_text_props_merge(Evas_Text_Props *item1, const Evas_Text_Props *item2);
88
89#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 @@
1#include "evas_common.h"
2#ifdef EVAS_RECT_SPLIT
3
4static inline void rect_list_node_pool_set_max(int max);
5static inline void rect_list_node_pool_flush(void);
6static inline list_node_t *rect_list_node_pool_get(void);
7static inline void rect_list_node_pool_put(list_node_t *node);
8static inline void rect_init(rect_t *r, int x, int y, int w, int h);
9static inline void rect_list_append_node(list_t *rects, list_node_t *node);
10static inline void rect_list_append(list_t *rects, const rect_t r);
11static inline void rect_list_append_xywh(list_t *rects, int x, int y, int w, int h);
12static inline void rect_list_concat(list_t *rects, list_t *other);
13static inline list_node_t *rect_list_unlink_next(list_t *rects, list_node_t *parent_node);
14static inline void rect_list_del_next(list_t *rects, list_node_t *parent_node);
15static inline void rect_list_clear(list_t *rects);
16static inline void rect_list_del_split_strict(list_t *rects, const rect_t del_r);
17static inline void rect_list_add_split_strict(list_t *rects, list_node_t *node);
18static inline list_node_t *rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error);
19static inline void rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error);
20static inline void rect_list_add_split_fuzzy_and_merge(list_t *rects, list_node_t *node, int split_accepted_error, int merge_accepted_error);
21static inline void rect_print(const rect_t r);
22#if 0
23static inline void rect_list_print(const list_t rects);
24#endif
25
26static const list_node_t list_node_zeroed = { NULL };
27static const list_t list_zeroed = { NULL, NULL };
28
29typedef struct list_node_pool
30{
31 list_node_t *node;
32 int len;
33 int max;
34} list_node_pool_t;
35
36static list_node_pool_t list_node_pool = { NULL, 0, 1024 };
37
38static inline void
39rect_list_node_pool_set_max(int max)
40{
41 int diff;
42
43 diff = list_node_pool.len - max;
44 for (; diff > 0 && list_node_pool.node; diff--)
45 {
46 list_node_t *node;
47
48 node = list_node_pool.node;
49 list_node_pool.node = node->next;
50 list_node_pool.len--;
51
52 free(node);
53 }
54
55 list_node_pool.max = max;
56}
57
58static inline void
59rect_list_node_pool_flush(void)
60{
61 while (list_node_pool.node)
62 {
63 list_node_t *node;
64
65 node = list_node_pool.node;
66 list_node_pool.node = node->next;
67 list_node_pool.len--;
68
69 free(node);
70 }
71}
72
73static inline list_node_t *
74rect_list_node_pool_get(void)
75{
76 if (list_node_pool.node)
77 {
78 list_node_t *node;
79
80 node = list_node_pool.node;
81 list_node_pool.node = node->next;
82 list_node_pool.len--;
83
84 return node;
85 }
86 else return malloc(sizeof(rect_node_t));
87}
88
89static inline void
90rect_list_node_pool_put(list_node_t *node)
91{
92 if (list_node_pool.len < list_node_pool.max)
93 {
94 node->next = list_node_pool.node;
95 list_node_pool.node = node;
96 list_node_pool.len++;
97 }
98 else free(node);
99}
100
101static inline void
102rect_init(rect_t *r, int x, int y, int w, int h)
103{
104 r->area = w * h;
105
106 r->left = x;
107 r->top = y;
108
109 r->right = x + w;
110 r->bottom = y + h;
111
112 r->width = w;
113 r->height = h;
114}
115
116static inline void
117rect_print(const rect_t r)
118{
119 INF("<rect(%d, %d, %d, %d)>", r.left, r.top, r.width, r.height);
120}
121
122#if 0
123static inline void
124rect_list_print(const list_t rects)
125{
126 list_node_t *node;
127 int len;
128
129 len = 0;
130 for (node = rects.head; node; node = node->next) len++;
131
132 putchar('[');
133 for (node = rects.head; node; node = node->next)
134 {
135 rect_print(((rect_node_t *)node)->rect);
136 if (node->next)
137 {
138 putchar(',');
139 if (len < 4) putchar(' ');
140 else
141 {
142 putchar('\n');
143 putchar(' ');
144 }
145 }
146 }
147 putchar(']');
148}
149#endif
150
151static inline void
152rect_list_append_node(list_t *rects, list_node_t *node)
153{
154 if (rects->tail)
155 {
156 rects->tail->next = node;
157 rects->tail = node;
158 }
159 else
160 {
161 rects->head = node;
162 rects->tail = node;
163 }
164}
165
166static inline void
167rect_list_append(list_t *rects, const rect_t r)
168{
169 rect_node_t *rect_node;
170
171 rect_node = (rect_node_t *)rect_list_node_pool_get();
172 rect_node->rect = r;
173 rect_node->_lst = list_node_zeroed;
174
175 rect_list_append_node(rects, (list_node_t *)rect_node);
176}
177
178static inline void
179rect_list_append_xywh(list_t *rects, int x, int y, int w, int h)
180{
181 rect_t r;
182
183 rect_init(&r, x, y, w, h);
184 rect_list_append(rects, r);
185}
186
187static inline void
188rect_list_concat(list_t *rects, list_t *other)
189{
190 if (!other->head)
191 return;
192
193 if (rects->tail)
194 {
195 rects->tail->next = other->head;
196 rects->tail = other->tail;
197 }
198 else
199 {
200 rects->head = other->head;
201 rects->tail = other->tail;
202 }
203 *other = list_zeroed;
204}
205
206static inline list_node_t *
207rect_list_unlink_next(list_t *rects, list_node_t *parent_node)
208{
209 list_node_t *node;
210
211 if (parent_node)
212 {
213 node = parent_node->next;
214 parent_node->next = node->next;
215 }
216 else
217 {
218 node = rects->head;
219 rects->head = node->next;
220 }
221
222 if (rects->tail == node) rects->tail = parent_node;
223 *node = list_node_zeroed;
224 return node;
225}
226
227static inline void
228rect_list_del_next(list_t *rects, list_node_t *parent_node)
229{
230 list_node_t *node;
231
232 node = rect_list_unlink_next(rects, parent_node);
233 rect_list_node_pool_put(node);
234}
235
236static inline void
237rect_list_clear(list_t *rects)
238{
239 list_node_t *node;
240
241 node = rects->head;
242 while (node)
243 {
244 list_node_t *aux;
245
246 aux = node->next;
247 rect_list_node_pool_put(node);
248 node = aux;
249 }
250 *rects = list_zeroed;
251}
252
253static inline void
254_calc_intra_rect_area(const rect_t a, const rect_t b, int *width, int *height)
255{
256 int max_left, min_right, max_top, min_bottom;
257
258 if (a.left < b.left) max_left = b.left;
259 else max_left = a.left;
260
261 if (a.right < b.right) min_right = a.right;
262 else min_right = b.right;
263
264 *width = min_right - max_left;
265
266 if (a.top < b.top) max_top = b.top;
267 else max_top = a.top;
268
269 if (a.bottom < b.bottom) min_bottom = a.bottom;
270 else min_bottom = b.bottom;
271
272 *height = min_bottom - max_top;
273}
274
275static inline void
276_split_strict(list_t *dirty, const rect_t current, rect_t r)
277{
278 int h_1, h_2, w_1, w_2;
279
280 h_1 = current.top - r.top;
281 h_2 = r.bottom - current.bottom;
282 w_1 = current.left - r.left;
283 w_2 = r.right - current.right;
284
285 if (h_1 > 0)
286 {
287 /* .--.r (b) .---.r2
288 * | | | |
289 * .-------.cur (a) .---.r '---'
290 * | | | | -> | | +
291 * | `--' | `---'
292 * `-------'
293 */
294 rect_list_append_xywh(dirty, r.left, r.top, r.width, h_1);
295 r.height -= h_1;
296 r.top = current.top;
297 }
298
299 if (h_2 > 0)
300 {
301 /* .-------.cur (a)
302 * | .---. | .---.r
303 * | | | | -> | |
304 * `-------' `---' + .---.r2
305 * | | | |
306 * `---'r (b) `---'
307 */
308 rect_list_append_xywh(dirty, r.left, current.bottom, r.width, h_2);
309 r.height -= h_2;
310 }
311
312 if (w_1 > 0)
313 {
314 /* (b) r .----.cur (a)
315 * .--|-. | .--.r2 .-.r
316 * | | | | -> | | + | |
317 * `--|-' | `--' `-'
318 * `----'
319 */
320 rect_list_append_xywh(dirty, r.left, r.top, w_1, r.height);
321 /* not necessary to keep these, r (b) will be destroyed */
322 /* r.width -= w_1; */
323 /* r.left = current.left; */
324 }
325
326 if (w_2 > 0)
327 {
328 /* .----.cur (a)
329 * | |
330 * | .-|--.r (b) .-.r .--.r2
331 * | | | | -> | | + | |
332 * | `-|--' `-' `--'
333 * `----'
334 */
335 rect_list_append_xywh(dirty, current.right, r.top, w_2, r.height);
336 /* not necessary to keep this, r (b) will be destroyed */
337 /* r.width -= w_2; */
338 }
339}
340
341static inline void
342rect_list_del_split_strict(list_t *rects, const rect_t del_r)
343{
344 list_t modified = list_zeroed;
345 list_node_t *cur_node, *prev_node;
346
347 prev_node = NULL;
348 cur_node = rects->head;
349 while (cur_node)
350 {
351 int intra_width, intra_height;
352 rect_t current;
353
354 current = ((rect_node_t*)cur_node)->rect;
355
356 _calc_intra_rect_area(del_r, current, &intra_width, &intra_height);
357 if ((intra_width <= 0) || (intra_height <= 0))
358 {
359 /* .---.current .---.del_r
360 * | | | |
361 * `---+---.del_r `---+---.current
362 * | | | |
363 * `---' `---'
364 * no interception, nothing to do
365 */
366 prev_node = cur_node;
367 cur_node = cur_node->next;
368 }
369 else if ((intra_width == current.width) &&
370 (intra_height == current.height))
371 {
372 /* .-------.del_r
373 * | .---. |
374 * | | | |
375 * | `---'current
376 * `-------'
377 * current is contained, remove from rects
378 */
379 cur_node = cur_node->next;
380 rect_list_del_next(rects, prev_node);
381 }
382 else
383 {
384 _split_strict(&modified, del_r, current);
385 cur_node = cur_node->next;
386 rect_list_del_next(rects, prev_node);
387 }
388 }
389
390 rect_list_concat(rects, &modified);
391}
392
393static inline void
394rect_list_add_split_strict(list_t *rects, list_node_t *node)
395{
396 list_t dirty = list_zeroed;
397 list_t new_dirty = list_zeroed;
398 list_node_t *cur_node;
399
400 if (!rects->head)
401 {
402 rect_list_append_node(rects, node);
403 return;
404 }
405
406 rect_list_append_node(&dirty, node);
407
408 cur_node = rects->head;
409 while (dirty.head)
410 {
411 rect_t current;
412
413 if (!cur_node)
414 {
415 rect_list_concat(rects, &dirty);
416 break;
417 }
418
419 current = ((rect_node_t*)cur_node)->rect;
420
421 while (dirty.head)
422 {
423 int intra_width, intra_height;
424 rect_t r;
425
426 r = ((rect_node_t *)dirty.head)->rect;
427 _calc_intra_rect_area(r, current, &intra_width, &intra_height);
428 if ((intra_width == r.width) && (intra_height == r.height))
429 /* .-------.cur
430 * | .---.r|
431 * | | | |
432 * | `---' |
433 * `-------'
434 */
435 rect_list_del_next(&dirty, NULL);
436 else if ((intra_width <= 0) || (intra_height <= 0))
437 {
438 /* .---.cur .---.r
439 * | | | |
440 * `---+---.r `---+---.cur
441 * | | | |
442 * `---' `---'
443 */
444 list_node_t *tmp;
445 tmp = rect_list_unlink_next(&dirty, NULL);
446 rect_list_append_node(&new_dirty, tmp);
447 }
448 else
449 {
450 _split_strict(&new_dirty, current, r);
451 rect_list_del_next(&dirty, NULL);
452 }
453 }
454 dirty = new_dirty;
455 new_dirty = list_zeroed;
456
457 cur_node = cur_node->next;
458 }
459}
460
461static inline void
462_calc_intra_outer_rect_area(const rect_t a, const rect_t b,
463 rect_t *intra, rect_t *outer)
464{
465 int min_left, max_left, min_right, max_right;
466 int min_top, max_top, min_bottom, max_bottom;
467
468 if (a.left < b.left)
469 {
470 max_left = b.left;
471 min_left = a.left;
472 }
473 else
474 {
475 max_left = a.left;
476 min_left = b.left;
477 }
478
479 if (a.right < b.right)
480 {
481 min_right = a.right;
482 max_right = b.right;
483 }
484 else
485 {
486 min_right = b.right;
487 max_right = a.right;
488 }
489
490 intra->left = max_left;
491 intra->right = min_right;
492 intra->width = min_right - max_left;
493
494 outer->left = min_left;
495 outer->right = max_right;
496 outer->width = max_right - min_left;
497
498 if (a.top < b.top)
499 {
500 max_top = b.top;
501 min_top = a.top;
502 }
503 else
504 {
505 max_top = a.top;
506 min_top = b.top;
507 }
508
509 if (a.bottom < b.bottom)
510 {
511 min_bottom = a.bottom;
512 max_bottom = b.bottom;
513 }
514 else
515 {
516 min_bottom = b.bottom;
517 max_bottom = a.bottom;
518 }
519
520 intra->top = max_top;
521 intra->bottom = min_bottom;
522 intra->height = min_bottom - max_top;
523 if ((intra->width > 0) && (intra->height > 0))
524 intra->area = intra->width * intra->height;
525 else
526 intra->area = 0;
527
528 outer->top = min_top;
529 outer->bottom = max_bottom;
530 outer->height = max_bottom - min_top;
531 outer->area = outer->width * outer->height;
532}
533
534enum
535{
536 SPLIT_FUZZY_ACTION_NONE,
537 SPLIT_FUZZY_ACTION_SPLIT,
538 SPLIT_FUZZY_ACTION_MERGE
539};
540
541static inline int
542_split_fuzzy(list_t *dirty, const rect_t a, rect_t *b)
543{
544 int h_1, h_2, w_1, w_2, action;
545
546 h_1 = a.top - b->top;
547 h_2 = b->bottom - a.bottom;
548 w_1 = a.left - b->left;
549 w_2 = b->right - a.right;
550
551 action = SPLIT_FUZZY_ACTION_NONE;
552
553 if (h_1 > 0)
554 {
555 /* .--.r (b) .---.r2
556 * | | | |
557 * .-------.cur (a) .---.r '---'
558 * | | | | -> | | +
559 * | `--' | `---'
560 * `-------'
561 */
562 rect_list_append_xywh(dirty, b->left, b->top, b->width, h_1);
563 b->height -= h_1;
564 b->top = a.top;
565 action = SPLIT_FUZZY_ACTION_SPLIT;
566 }
567
568 if (h_2 > 0)
569 {
570 /* .-------.cur (a)
571 * | .---. | .---.r
572 * | | | | -> | |
573 * `-------' `---' + .---.r2
574 * | | | |
575 * `---'r (b) `---'
576 */
577 rect_list_append_xywh(dirty, b->left, a.bottom, b->width, h_2);
578 b->height -= h_2;
579 action = SPLIT_FUZZY_ACTION_SPLIT;
580 }
581
582 if (((w_1 > 0) || (w_2 > 0)) && (a.height == b->height))
583 return SPLIT_FUZZY_ACTION_MERGE;
584
585 if (w_1 > 0)
586 {
587 /* (b) r .----.cur (a)
588 * .--|-. | .--.r2 .-.r
589 * | | | | -> | | + | |
590 * `--|-' | `--' `-'
591 * `----'
592 */
593 rect_list_append_xywh(dirty, b->left, b->top, w_1, b->height);
594 /* not necessary to keep these, r (b) will be destroyed */
595 /* b->width -= w_1; */
596 /* b->left = a.left; */
597 action = SPLIT_FUZZY_ACTION_SPLIT;
598 }
599
600 if (w_2 > 0)
601 {
602 /* .----.cur (a)
603 * | |
604 * | .-|--.r (b) .-.r .--.r2
605 * | | | | -> | | + | |
606 * | `-|--' `-' `--'
607 * `----'
608 */
609 rect_list_append_xywh(dirty, a.right, b->top, w_2, b->height);
610 /* not necessary to keep these, r (b) will be destroyed */
611 /* b->width -= w_2; */
612 action = SPLIT_FUZZY_ACTION_SPLIT;
613 }
614
615 return action;
616}
617
618static inline list_node_t *
619rect_list_add_split_fuzzy(list_t *rects, list_node_t *node, int accepted_error)
620{
621 list_t dirty = list_zeroed;
622 list_node_t *old_last;
623
624 old_last = rects->tail;
625
626 if (!rects->head)
627 {
628 rect_list_append_node(rects, node);
629 return old_last;
630 }
631
632 rect_list_append_node(&dirty, node);
633 while (dirty.head)
634 {
635 list_node_t *d_node, *cur_node, *prev_cur_node;
636 int keep_dirty;
637 rect_t r;
638
639 d_node = rect_list_unlink_next(&dirty, NULL);
640 r = ((rect_node_t *)d_node)->rect;
641
642 prev_cur_node = NULL;
643 cur_node = rects->head;
644 keep_dirty = 1;
645 while (cur_node)
646 {
647 int area, action;
648 rect_t current, intra, outer;
649
650 current = ((rect_node_t *)cur_node)->rect;
651
652 _calc_intra_outer_rect_area(r, current, &intra, &outer);
653 area = current.area + r.area - intra.area;
654
655 if ((intra.width == r.width) && (intra.height == r.height))
656 {
657 /* .-------.cur
658 * | .---.r|
659 * | | | |
660 * | `---' |
661 * `-------'
662 */
663 keep_dirty = 0;
664 break;
665 }
666 else if ((intra.width == current.width) &&
667 (intra.height == current.height))
668 {
669 /* .-------.r
670 * | .---.cur
671 * | | | |
672 * | `---' |
673 * `-------'
674 */
675 if (old_last == cur_node)
676 old_last = prev_cur_node;
677 cur_node = cur_node->next;
678 rect_list_del_next(rects, prev_cur_node);
679 }
680 else if ((outer.area - area) <= accepted_error)
681 {
682 /* .-----------. bounding box (outer)
683 * |.---. .---.|
684 * ||cur| |r ||
685 * || | | ||
686 * |`---' `---'|
687 * `-----------'
688 * merge them, remove both and add merged
689 */
690 rect_node_t *n;
691
692 if (old_last == cur_node)
693 old_last = prev_cur_node;
694
695 n = (rect_node_t *)rect_list_unlink_next(rects, prev_cur_node);
696 n->rect = outer;
697 rect_list_append_node(&dirty, (list_node_t *)n);
698
699 keep_dirty = 0;
700 break;
701 }
702 else if (intra.area <= accepted_error)
703 {
704 /* .---.cur .---.r
705 * | | | |
706 * `---+---.r `---+---.cur
707 * | | | |
708 * `---' `---'
709 * no split, no merge
710 */
711 prev_cur_node = cur_node;
712 cur_node = cur_node->next;
713 }
714 else
715 {
716 /* split is required */
717 action = _split_fuzzy(&dirty, current, &r);
718 if (action == SPLIT_FUZZY_ACTION_MERGE)
719 {
720 /* horizontal merge is possible: remove both, add merged */
721 rect_node_t *n;
722
723 if (old_last == cur_node)
724 old_last = prev_cur_node;
725
726 n = (rect_node_t *)
727 rect_list_unlink_next(rects, prev_cur_node);
728
729 n->rect.left = outer.left;
730 n->rect.width = outer.width;
731 n->rect.right = outer.right;
732 n->rect.area = outer.width * r.height;
733 rect_list_append_node(&dirty, (list_node_t *)n);
734 }
735 else if (action == SPLIT_FUZZY_ACTION_NONE)
736 {
737 /*
738 * this rect check was totally useless,
739 * should never happen
740 */
741 /* prev_cur_node = cur_node; */
742 /* cur_node = cur_node->next; */
743 WRN("Should not get here!");
744 abort();
745 }
746
747 keep_dirty = 0;
748 break;
749 }
750 }
751
752 if (UNLIKELY(keep_dirty)) rect_list_append_node(rects, d_node);
753 else rect_list_node_pool_put(d_node);
754 }
755
756 return old_last;
757}
758
759static inline void
760_calc_outer_rect_area(const rect_t a, const rect_t b, rect_t *outer)
761{
762 int min_left, max_right;
763 int min_top, max_bottom;
764
765 if (a.left < b.left) min_left = a.left;
766 else min_left = b.left;
767
768 if (a.right < b.right) max_right = b.right;
769 else max_right = a.right;
770
771 outer->left = min_left;
772 outer->right = max_right;
773 outer->width = max_right - min_left;
774
775 if (a.top < b.top) min_top = a.top;
776 else min_top = b.top;
777
778 if (a.bottom < b.bottom) max_bottom = b.bottom;
779 else max_bottom = a.bottom;
780
781 outer->top = min_top;
782 outer->bottom = max_bottom;
783 outer->height = max_bottom - min_top;
784
785 outer->area = outer->width * outer->height;
786}
787
788static inline void
789rect_list_merge_rects(list_t *rects, list_t *to_merge, int accepted_error)
790{
791 while (to_merge->head)
792 {
793 list_node_t *node, *parent_node;
794 rect_t r1;
795 int merged;
796
797 r1 = ((rect_node_t *)to_merge->head)->rect;
798
799 merged = 0;
800 parent_node = NULL;
801 node = rects->head;
802 while (node)
803 {
804 rect_t r2, outer;
805 int area;
806
807 r2 = ((rect_node_t *)node)->rect;
808
809 _calc_outer_rect_area(r1, r2, &outer);
810 area = r1.area + r2.area; /* intra area is taken as 0 */
811 if (outer.area - area <= accepted_error)
812 {
813 /*
814 * remove both r1 and r2, create r3
815 * actually r3 uses r2 instance, saves memory
816 */
817 rect_node_t *n;
818
819 n = (rect_node_t *)rect_list_unlink_next(rects, parent_node);
820 n->rect = outer;
821 rect_list_append_node(to_merge, (list_node_t *)n);
822 merged = 1;
823 break;
824 }
825
826 parent_node = node;
827 node = node->next;
828 }
829
830 if (!merged)
831 {
832 list_node_t *n;
833 n = rect_list_unlink_next(to_merge, NULL);
834 rect_list_append_node(rects, n);
835 }
836 else
837 rect_list_del_next(to_merge, NULL);
838 }
839}
840
841static inline void
842rect_list_add_split_fuzzy_and_merge(list_t *rects,
843 list_node_t *node,
844 int split_accepted_error,
845 int merge_accepted_error)
846{
847 list_node_t *n;
848
849 n = rect_list_add_split_fuzzy(rects, node, split_accepted_error);
850 if (n && n->next)
851 {
852 list_t to_merge;
853
854 /* split list into 2 segments, already merged and to merge */
855 to_merge.head = n->next;
856 to_merge.tail = rects->tail;
857 rects->tail = n;
858 n->next = NULL;
859
860 rect_list_merge_rects(rects, &to_merge, merge_accepted_error);
861 }
862}
863#endif /* EVAS_RECT_SPLIT */
864
865#define TILE(tb, x, y) ((tb)->tiles.tiles[((y) * (tb)->tiles.w) + (x)])
866
867#ifdef RECTUPDATE
868#elif defined(EVAS_RECT_SPLIT)
869#else
870/*
871static int tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill);
872static int tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill);
873static int tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill);
874 */
875#endif
876/*
877static void tilebuf_setup(Tilebuf *tb);
878 */
879
880EAPI void
881evas_common_tilebuf_init(void)
882{
883}
884
885EAPI Tilebuf *
886evas_common_tilebuf_new(int w, int h)
887{
888 Tilebuf *tb;
889
890 tb = calloc(1, sizeof(Tilebuf));
891 if (!tb) return NULL;
892
893 tb->tile_size.w = 8;
894 tb->tile_size.h = 8;
895 tb->outbuf_w = w;
896 tb->outbuf_h = h;
897
898 return tb;
899}
900
901EAPI void
902evas_common_tilebuf_free(Tilebuf *tb)
903{
904#ifdef RECTUPDATE
905/*
906 evas_common_regionbuf_free(tb->rb);
907 */
908#elif defined(EVAS_RECT_SPLIT)
909 rect_list_clear(&tb->rects);
910 rect_list_node_pool_flush();
911#else
912/*
913 if (tb->tiles.tiles) free(tb->tiles.tiles);
914 */
915#endif
916 free(tb);
917}
918
919EAPI void
920evas_common_tilebuf_set_tile_size(Tilebuf *tb, int tw, int th)
921{
922 tb->tile_size.w = tw;
923 tb->tile_size.h = th;
924/*
925 tilebuf_setup(tb);
926 */
927}
928
929EAPI void
930evas_common_tilebuf_get_tile_size(Tilebuf *tb, int *tw, int *th)
931{
932 if (tw) *tw = tb->tile_size.w;
933 if (th) *th = tb->tile_size.h;
934}
935
936#ifdef EVAS_RECT_SPLIT
937static inline int
938_add_redraw(list_t *rects, int x, int y, int w, int h)
939{
940 rect_node_t *rn;
941/* we dont need to do this fuzz stuff - it actually creates overdraw bugs
942 * when evas shouldnt draw at all.
943 x >>= 1;
944 y >>= 1;
945 w += 2;
946 w >>= 1;
947 h += 2;
948 h >>= 1;
949 */
950 rn = (rect_node_t *)rect_list_node_pool_get();
951 rn->_lst = list_node_zeroed;
952 rect_init(&rn->rect, x, y, w, h);
953 //INF("ACCOUNTING: add_redraw: %4d,%4d %3dx%3d", x, y, w, h);
954 //testing on my core2 duo desktop - fuzz of 32 or 48 is best.
955#define FUZZ 32
956 rect_list_add_split_fuzzy_and_merge(rects, (list_node_t *)rn,
957 FUZZ * FUZZ, FUZZ * FUZZ);
958 return 1;
959}
960#endif
961
962EAPI int
963evas_common_tilebuf_add_redraw(Tilebuf *tb, int x, int y, int w, int h)
964{
965#ifdef RECTUPDATE
966/*
967 int i;
968
969 if ((w <= 0) || (h <= 0)) return 0;
970 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
971 if ((w <= 0) || (h <= 0)) return 0;
972 for (i = 0; i < h; i++)
973 evas_common_regionbuf_span_add(tb->rb, x, x + w - 1, y + i);
974 return 1;
975 */
976#elif defined(EVAS_RECT_SPLIT)
977 if ((w <= 0) || (h <= 0)) return 0;
978 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
979 if ((w <= 0) || (h <= 0)) return 0;
980 // optimize a common case -> adding the exact same rect 2x in a row
981 if ((tb->prev_add.x == x) && (tb->prev_add.y == y) &&
982 (tb->prev_add.w == w) && (tb->prev_add.h == h)) return 1;
983 tb->prev_add.x = x; tb->prev_add.y = y;
984 tb->prev_add.w = w; tb->prev_add.h = h;
985 tb->prev_del.w = 0; tb->prev_del.h = 0;
986 return _add_redraw(&tb->rects, x, y, w, h);
987#else
988/*
989 int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy;
990 int num;
991
992 if ((w <= 0) || (h <= 0)) return 0;
993 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
994 if ((w <= 0) || (h <= 0)) return 0;
995 num = 0;
996 // wipes out any motion vectors in tiles it touches into redraws
997 if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) &&
998 tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2))
999 {
1000 Tilebuf_Tile *tbt;
1001 int delta_x;
1002 int delta_y;
1003
1004 tbt = &(TILE(tb, tx1, ty1));
1005 delta_x = tx2 - tx1 + 1;
1006 delta_y = ty2 - ty1 + 1;
1007 for (yy = delta_y; yy > 0; yy--)
1008 {
1009 Tilebuf_Tile *tbti;
1010
1011 tbti = tbt;
1012 for (xx = delta_x; xx > 0; xx--)
1013 {
1014 tbti->redraw = 1;
1015 tbti++;
1016 }
1017 tbt += tb->tiles.w;
1018 }
1019 num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1);
1020 }
1021 return num;
1022 */
1023#endif
1024}
1025
1026EAPI int
1027evas_common_tilebuf_del_redraw(Tilebuf *tb, int x, int y, int w, int h)
1028{
1029#ifdef RECTUPDATE
1030/*
1031 int i;
1032
1033 for (i = 0; i < h; i++)
1034 evas_common_regionbuf_span_del(tb->rb, x, x + w - 1, y + i);
1035 */
1036#elif defined(EVAS_RECT_SPLIT)
1037 rect_t r;
1038
1039 if (!tb->rects.head) return 0;
1040 if ((w <= 0) || (h <= 0)) return 0;
1041 RECTS_CLIP_TO_RECT(x, y, w, h, 0, 0, tb->outbuf_w, tb->outbuf_h);
1042 if ((w <= 0) || (h <= 0)) return 0;
1043
1044/* we dont need to do this fuzz stuff - it actually creates overdraw bugs
1045 * when evas shouldnt draw at all.
1046 x += 1;
1047 y += 1;
1048 x >>= 1;
1049 y >>= 1;
1050 w -= 1;
1051 w >>= 1;
1052 h -= 1;
1053 h >>= 1;
1054
1055 if ((w <= 0) || (h <= 0)) return 0;
1056 */
1057
1058 // optimize a common case -> deleting the exact same rect 2x in a row
1059 if ((tb->prev_del.x == x) && (tb->prev_del.y == y) &&
1060 (tb->prev_del.w == w) && (tb->prev_del.h == h)) return 1;
1061 tb->prev_del.x = x; tb->prev_del.y = y;
1062 tb->prev_del.w = w; tb->prev_del.h = h;
1063 tb->prev_add.w = 0; tb->prev_add.h = 0;
1064 rect_init(&r, x, y, w, h);
1065
1066 rect_list_del_split_strict(&tb->rects, r);
1067 tb->need_merge = 1;
1068 return 0;
1069#else
1070/*
1071 int tx1, tx2, ty1, ty2, tfx1, tfx2, tfy1, tfy2, xx, yy;
1072 int num;
1073
1074 num = 0;
1075 // wipes out any motion vectors in tiles it touches into redraws
1076 if (tilebuf_x_intersect(tb, x, w, &tx1, &tx2, &tfx1, &tfx2) &&
1077 tilebuf_y_intersect(tb, y, h, &ty1, &ty2, &tfy1, &tfy2))
1078 {
1079 Tilebuf_Tile *tbt;
1080 int delta_y;
1081 int delta_x;
1082
1083 if (!tfx1) tx1++;
1084 if (!tfx2) tx2--;
1085 if (!tfy1) ty1++;
1086 if (!tfy2) ty2--;
1087
1088 tbt = &(TILE(tb, tx1, ty1));
1089 delta_x = tx2 - tx1 + 1;
1090 delta_y = ty2 - ty1 + 1;
1091 for (yy = delta_y; yy > 0; yy--)
1092 {
1093 Tilebuf_Tile *tbti;
1094
1095 tbti = tbt;
1096 for (xx = delta_x; xx > 0; xx--)
1097 {
1098 tbti->redraw = 0;
1099 tbti++;
1100 }
1101 tbt += tb->tiles.w;
1102 }
1103 num = (tx2 - tx1 + 1) * (ty2 - ty1 + 1);
1104 }
1105 return num;
1106 */
1107#endif
1108}
1109
1110EAPI int
1111evas_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__)
1112{
1113#ifdef EVAS_RECT_SPLIT
1114/* motion vector handling never has been used -> disable it
1115 list_t lr = list_zeroed;
1116 int num;
1117
1118 num = _add_redraw(&lr, x, y, w, h);
1119 num += _add_redraw(&lr, x + dx, y + dy, w, h);
1120 while (lr.head)
1121 {
1122 list_node_t *node = rect_list_unlink_next(&lr, NULL);
1123 rect_list_add_split_fuzzy_and_merge(&tb->rects, node,
1124 FUZZ * FUZZ, FUZZ * FUZZ);
1125 }
1126 return num;
1127 */
1128 return 0;
1129#else
1130/*
1131 int num;
1132
1133 num = evas_common_tilebuf_add_redraw(tb, x, y, w, h);
1134 num += evas_common_tilebuf_add_redraw(tb, x + dx, y + dy, w, h);
1135 return num;
1136 */
1137#endif
1138}
1139
1140EAPI void
1141evas_common_tilebuf_clear(Tilebuf *tb)
1142{
1143#ifdef RECTUPDATE
1144/*
1145 evas_common_regionbuf_clear(tb->rb);
1146 */
1147#elif defined(EVAS_RECT_SPLIT)
1148 tb->prev_add.x = tb->prev_add.y = tb->prev_add.w = tb->prev_add.h = 0;
1149 tb->prev_del.x = tb->prev_del.y = tb->prev_del.w = tb->prev_del.h = 0;
1150 rect_list_clear(&tb->rects);
1151 tb->need_merge = 0;
1152#else
1153/*
1154 if (!tb->tiles.tiles) return;
1155 memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile));
1156 */
1157#endif
1158}
1159
1160EAPI Tilebuf_Rect *
1161evas_common_tilebuf_get_render_rects(Tilebuf *tb)
1162{
1163#ifdef RECTUPDATE
1164/*
1165 return evas_common_regionbuf_rects_get(tb->rb);
1166 */
1167#elif defined(EVAS_RECT_SPLIT)
1168 list_node_t *n;
1169 Tilebuf_Rect *rects = NULL;
1170 int bx1 = 0, bx2 = 0, by1 = 0, by2 = 0, num = 0;
1171
1172 if (tb->need_merge)
1173 {
1174 list_t to_merge;
1175 to_merge = tb->rects;
1176 tb->rects = list_zeroed;
1177 rect_list_merge_rects(&tb->rects, &to_merge, FUZZ * FUZZ);
1178 tb->need_merge = 0;
1179 }
1180
1181 n = tb->rects.head;
1182 if (n)
1183 {
1184 bx1 = ((rect_node_t *)n)->rect.left;
1185 bx2 = bx1 + ((rect_node_t *)n)->rect.width;
1186 by1 = ((rect_node_t *)n)->rect.top;
1187 by2 = by1 + ((rect_node_t *)n)->rect.height;
1188 n = n->next;
1189 for (; n; n = n->next)
1190 {
1191
1192 int x1, x2, y1, y2;
1193
1194 x1 = ((rect_node_t *)n)->rect.left;
1195 if (x1 < bx1) bx1 = x1;
1196 x2 = x1 + ((rect_node_t *)n)->rect.width;
1197 if (x2 > bx2) bx2 = x2;
1198
1199 y1 = ((rect_node_t *)n)->rect.top;
1200 if (y1 < by1) by1 = y1;
1201 y2 = y1 + ((rect_node_t *)n)->rect.height;
1202 if (y2 > by2) by2 = y2;
1203 num++;
1204 }
1205 }
1206#define MAXREG 24
1207 /* magic number - but if we have > MAXREG regions to update, take bounding box */
1208 if (num > MAXREG)
1209 {
1210 Tilebuf_Rect *r;
1211
1212 r = malloc(sizeof(Tilebuf_Rect));
1213 r->x = bx1;
1214 r->y = by1;
1215 r->w = bx2 - bx1;
1216 r->h = by2 - by1;
1217
1218 rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r));
1219 return rects;
1220 }
1221
1222 for (n = tb->rects.head; n; n = n->next)
1223 {
1224 rect_t cur;
1225
1226 cur = ((rect_node_t *)n)->rect;
1227/* disable fuzz - created bugs.
1228 cur.left <<= 1;
1229 cur.top <<= 1;
1230 cur.width <<= 1;
1231 cur.height <<= 1;
1232 */
1233 RECTS_CLIP_TO_RECT(cur.left, cur.top, cur.width, cur.height,
1234 0, 0, tb->outbuf_w, tb->outbuf_h);
1235 if ((cur.width > 0) && (cur.height > 0))
1236 {
1237 Tilebuf_Rect *r;
1238
1239 r = malloc(sizeof(Tilebuf_Rect));
1240 r->x = cur.left;
1241 r->y = cur.top;
1242 r->w = cur.width;
1243 r->h = cur.height;
1244
1245 rects = (Tilebuf_Rect *)eina_inlist_append(EINA_INLIST_GET(rects), EINA_INLIST_GET(r));
1246 }
1247 }
1248 return rects;
1249
1250#else
1251/*
1252 Tilebuf_Rect *rects = NULL;
1253 Tilebuf_Tile *tbt;
1254 int x, y;
1255
1256 tbt = &(TILE(tb, 0, 0));
1257 for (y = 0; y < tb->tiles.h; y++)
1258 {
1259 for (x = 0; x < tb->tiles.w; x++, tbt++)
1260 {
1261 if (tbt->redraw)
1262 {
1263 Tilebuf_Tile *tbti;
1264 int can_expand_x = 1, can_expand_y = 1;
1265 Tilebuf_Rect *r = NULL;
1266 int xx = 0, yy = 0;
1267 r = malloc(sizeof(Tilebuf_Rect));
1268 r->_list_data.next = NULL;
1269 r->_list_data.prev = NULL;
1270 r->_list_data.last = NULL;
1271
1272 // amalgamate tiles
1273#if 1
1274 tbti = tbt;
1275 while (can_expand_x)
1276 {
1277 tbti++;
1278 xx++;
1279 if ((x + xx) >= tb->tiles.w)
1280 can_expand_x = 0;
1281 else if (!(tbti->redraw))
1282 can_expand_x = 0;
1283 if (can_expand_x)
1284 tbti->redraw = 0;
1285 }
1286 tbti = tbt;
1287 while (can_expand_y)
1288 {
1289 int i;
1290
1291 tbti += tb->tiles.w;
1292 yy++;
1293 if ((y + yy) >= tb->tiles.h)
1294 can_expand_y = 0;
1295 if (can_expand_y)
1296 {
1297 Tilebuf_Tile *tbtj;
1298
1299 tbtj = tbti;
1300 for (i = x; i < x + xx; i++, tbtj++)
1301 {
1302 if (!(tbtj->redraw))
1303 {
1304 can_expand_y = 0;
1305 break;
1306 }
1307 }
1308 }
1309 if (can_expand_y)
1310 {
1311 Tilebuf_Tile *tbtj;
1312
1313 tbtj = tbti;
1314 for (i = x; i < x + xx; i++, tbtj++)
1315 tbtj->redraw = 0;
1316 }
1317 }
1318 tbt->redraw = 0;
1319#else
1320 xx = 1;
1321 yy = 1;
1322#endif
1323 r->x = x * tb->tile_size.w;
1324 r->y = y * tb->tile_size.h;
1325 r->w = (xx) * tb->tile_size.w;
1326 r->h = (yy) * tb->tile_size.h;
1327 rects = eina_inlist_append(rects, r);
1328 x = x + (xx - 1);
1329 tbt += xx - 1;
1330 }
1331 }
1332 }
1333 return rects;
1334 */
1335#endif
1336}
1337
1338EAPI void
1339evas_common_tilebuf_free_render_rects(Tilebuf_Rect *rects)
1340{
1341 while (rects)
1342 {
1343 Tilebuf_Rect *r;
1344
1345 r = rects;
1346 rects = (Tilebuf_Rect *)eina_inlist_remove(EINA_INLIST_GET(rects), EINA_INLIST_GET(r));
1347 free(r);
1348 }
1349}
1350
1351/* need a way of getting rectangles to: blit, re-render */
1352
1353
1354
1355
1356
1357/* internal usage */
1358/*
1359static void
1360tilebuf_setup(Tilebuf *tb)
1361{
1362 if ((tb->outbuf_w <= 0) || (tb->outbuf_h <= 0)) return;
1363#ifdef RECTUPDATE
1364 tb->rb = evas_common_regionbuf_new(tb->outbuf_w, tb->outbuf_h);
1365#elif defined(EVAS_RECT_SPLIT)
1366 tb->rects = list_zeroed;
1367#else
1368 if (tb->tiles.tiles) free(tb->tiles.tiles);
1369 tb->tiles.tiles = NULL;
1370
1371 tb->tiles.w = (tb->outbuf_w + (tb->tile_size.w - 1)) / tb->tile_size.w;
1372 tb->tiles.h = (tb->outbuf_h + (tb->tile_size.h - 1)) / tb->tile_size.h;
1373
1374 tb->tiles.tiles = malloc(tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile));
1375
1376 if (!tb->tiles.tiles)
1377 {
1378 tb->tiles.w = 0;
1379 tb->tiles.h = 0;
1380 return;
1381 }
1382 memset(tb->tiles.tiles, 0, tb->tiles.w * tb->tiles.h * sizeof(Tilebuf_Tile));
1383#endif
1384}
1385*/
1386
1387#ifdef RECTUPDATE
1388#elif defined(EVAS_RECT_SPLIT)
1389#else
1390/*
1391static int
1392tilebuf_x_intersect(Tilebuf *tb, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill)
1393{
1394 return tilebuf_intersect(tb->tile_size.w, tb->outbuf_w, tb->tiles.w,
1395 x, w, x1, x2, x1_fill, x2_fill);
1396}
1397
1398static int
1399tilebuf_y_intersect(Tilebuf *tb, int y, int h, int *y1, int *y2, int *y1_fill, int *y2_fill)
1400{
1401 return tilebuf_intersect(tb->tile_size.h, tb->outbuf_h, tb->tiles.h,
1402 y, h, y1, y2, y1_fill, y2_fill);
1403}
1404
1405static int
1406tilebuf_intersect(int tsize, int tlen, int tnum, int x, int w, int *x1, int *x2, int *x1_fill, int *x2_fill)
1407{
1408 int p1, p2;
1409
1410 // initial clip out of region
1411 if ((x + w) <= 0) return 0;
1412 if (x >= tlen) return 0;
1413
1414 // adjust x & w so it all fits in region
1415 if (x < 0)
1416 {
1417 w += x;
1418 x = 0;
1419 }
1420 if (w < 0) return 0;
1421 if ((x + w) > tlen) w = tlen - x;
1422
1423 // now figure if the first edge is fully filling its tile
1424 p1 = (x) / tsize;
1425 if ((p1 * tsize) == (x)) *x1_fill = 1;
1426 else *x1_fill = 0;
1427 *x1 = p1;
1428
1429 // now figure if the last edge is fully filling its tile
1430 p2 = (x + w - 1) / tsize;
1431 if (((p2 + 1) * tsize) == (x + w)) *x2_fill = 1;
1432 else *x2_fill = 0;
1433 *x2 = p2;
1434
1435 return 1;
1436 tnum = 0;
1437}
1438*/
1439#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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <string.h>
6#include <stdlib.h>
7
8#include "evas_common.h"
9#include "evas_bidi_utils.h"
10
11#include "evas_font_private.h"
12
13#ifdef BIDI_SUPPORT
14#include <fribidi/fribidi.h>
15/**
16 * @internal
17 * @addtogroup Evas_Utils
18 *
19 * @{
20 */
21/**
22 * @internal
23 * @addtogroup Evas_BiDi
24 *
25 * @{
26 */
27
28/**
29 * @internal
30 * @def _SAFE_FREE(x)
31 * checks if x is not NULL, if it's not, it's freed and set to NULL.
32 */
33#define _SAFE_FREE(x) \
34 do { \
35 if (x) \
36 { \
37 free(x); \
38 x = NULL; \
39 } \
40 } while(0)
41
42#if SIZEOF_FRIBIDICHAR != SIZEOF_EINA_UNICODE
43# define EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
44#endif
45
46#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
47/* Convert bidichar to eina_unicode assume both are valid pointers */
48static Eina_Unicode *
49_evas_bidi_fribidichar_to_unicode(Eina_Unicode *dest, const FriBidiChar *src)
50{
51 Eina_Unicode *ret = dest;
52
53 while (*src)
54 *dest++ = *src++;
55 *dest = 0;
56 return ret;
57}
58
59/* Convert eina_unicode to bidi_char assume both are valid pointers */
60static FriBidiChar *
61_evas_bidi_unicode_to_fribidichar(FriBidiChar *dest, const Eina_Unicode *src)
62{
63 FriBidiChar *ret = dest;
64
65 while (*src)
66 *dest++ = *src++;
67 *dest = 0;
68 return ret;
69}
70#endif
71
72/**
73 * @internal
74 * Checks if the string has RTL characters.
75 *
76 * @param str The string to be checked
77 * @return #EINA_TRUE if true, #EINA_FALSE otherwise.
78 */
79Eina_Bool
80evas_bidi_is_rtl_str(const Eina_Unicode *str)
81{
82 EvasBiDiCharType type;
83
84 if (!str)
85 return EINA_FALSE;
86
87 for ( ; *str ; str++)
88 {
89 type = fribidi_get_bidi_type((FriBidiChar) *str);
90 if (FRIBIDI_IS_LETTER(type) && FRIBIDI_IS_RTL(type))
91 {
92 return EINA_TRUE;
93 }
94 }
95 return EINA_FALSE;
96}
97
98/**
99 * @internal
100 * Shapes the string ustr according to the bidi properties.
101 *
102 * @param str The string to shape
103 * @param bidi_props the bidi props to shaped according.
104 * @param start the start of the string to shape (offset in bidi_props)
105 * @param len the length of th string.
106 * @return #EINA_TRUE on success, #EINA_FALSE otherwise.
107 */
108EAPI Eina_Bool
109evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len)
110{
111 FriBidiChar *ustr, *base_ustr = NULL;
112
113 if (!bidi_props)
114 return EINA_FALSE;
115
116 /* The size of fribidichar is different than eina_unicode, convert */
117#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
118 base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
119 ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
120#else
121 (void) base_ustr;
122 ustr = (FriBidiChar *) eina_ustr;
123#endif
124
125
126 EvasBiDiJoiningType *join_types = NULL;
127 join_types = (EvasBiDiJoiningType *) malloc(sizeof(EvasBiDiJoiningType) * len);
128 if (!join_types)
129 {
130 return EINA_FALSE;
131 }
132 fribidi_get_joining_types(ustr, len, join_types);
133
134 fribidi_join_arabic(bidi_props->char_types + start, len,
135 bidi_props->embedding_levels + start, join_types);
136
137
138 /* Actually modify the string */
139 fribidi_shape(FRIBIDI_FLAGS_DEFAULT | FRIBIDI_FLAGS_ARABIC,
140 bidi_props->embedding_levels + start, len, join_types, ustr);
141
142 if (join_types) free(join_types);
143
144 /* Convert back */
145#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
146 eina_ustr = _evas_bidi_fribidichar_to_unicode(eina_ustr, ustr);
147 if (base_ustr) free(base_ustr);
148#endif
149 return EINA_TRUE;
150}
151
152/**
153 * @internal
154 * Return a -1 terminated array of the indexes of the delimiters (passed in
155 * delim) found in the string. This result should be used with par_props_get.
156 *
157 * @param str The string to parse
158 * @param delim a list of delimiters to work with.
159 * @return returns a -1 terminated array of indexes according to positions of the delimiters found. NULL if there were none.
160 */
161int *
162evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim)
163{
164 Eina_Unicode *udelim;
165 const Eina_Unicode *str_base = str;
166 int *ret, *tmp_ret;
167 int ret_idx = 0, ret_len = 10; /* arbitrary choice */
168 udelim = eina_unicode_utf8_to_unicode(delim, NULL);
169 ret = malloc(ret_len * sizeof(int));
170 for ( ; *str ; str++)
171 {
172 const Eina_Unicode *del;
173 for (del = udelim ; *del ; del++)
174 {
175 if (*str == *del)
176 {
177 if (ret_idx >= ret_len)
178 {
179 /* arbitrary choice */
180 ret_len += 20;
181 tmp_ret = realloc(ret, ret_len * sizeof(int));
182 if (!tmp_ret)
183 {
184 free(ret);
185 return NULL;
186 }
187 }
188 ret[ret_idx++] = str - str_base;
189 break;
190 }
191 }
192 }
193 free(udelim);
194
195 /* If no indexes were found return NULL */
196 if (ret_idx == 0)
197 {
198 free(ret);
199 return NULL;
200 }
201
202 ret[ret_idx] = -1;
203 tmp_ret = realloc(ret, (ret_idx + 1) * sizeof(int));
204
205 return (tmp_ret) ? tmp_ret : ret;
206}
207
208/**
209 * @internal
210 * Allocates bidi properties according to ustr. First checks to see if the
211 * passed has rtl chars, if not, it returns NULL.
212 *
213 * Assumes all the segment_idxs are either -1 or legal, and > 0 indexes.
214 * Also assumes that the characters at the override points are of weak/neutral
215 * bidi type, otherwise unexpected results may occur.
216 *
217 * @param ustr The string to update according to.
218 * @param len The length of the string
219 * @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.
220 * @return returns allocated paragraph props on success, NULL otherwise.
221 */
222Evas_BiDi_Paragraph_Props *
223evas_bidi_paragraph_props_get(const Eina_Unicode *eina_ustr, size_t len,
224 int *segment_idxs)
225{
226 Evas_BiDi_Paragraph_Props *bidi_props = NULL;
227 EvasBiDiCharType *char_types = NULL;
228 EvasBiDiLevel *embedding_levels = NULL;
229 const FriBidiChar *ustr;
230 FriBidiChar *base_ustr = NULL;
231
232 if (!eina_ustr)
233 return NULL;
234
235
236 if (!evas_bidi_is_rtl_str(eina_ustr)) /* No need to handle bidi */
237 {
238 len = -1;
239 goto cleanup;
240 }
241
242 len = eina_unicode_strlen(eina_ustr);
243 /* The size of fribidichar s different than eina_unicode, convert */
244#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
245 base_ustr = calloc(len + 1, sizeof(FriBidiChar));
246 base_ustr = _evas_bidi_unicode_to_fribidichar(base_ustr, eina_ustr);
247 ustr = base_ustr;
248#else
249 ustr = (const FriBidiChar *) eina_ustr;
250#endif
251
252 bidi_props = evas_bidi_paragraph_props_new();
253
254 /* Prep work for reordering */
255 char_types = (EvasBiDiCharType *) malloc(sizeof(EvasBiDiCharType) * len);
256 if (!char_types)
257 {
258 len = -2;
259 goto cleanup;
260 }
261 fribidi_get_bidi_types(ustr, len, char_types);
262
263 embedding_levels = (EvasBiDiLevel *)malloc(sizeof(EvasBiDiLevel) * len);
264 if (!embedding_levels)
265 {
266 len = -2;
267 goto cleanup;
268 }
269
270 if (segment_idxs)
271 {
272 size_t pos = 0;
273 int *itr;
274 EvasBiDiLevel base_level = 0;
275 EvasBiDiParType direction;
276
277 for (itr = segment_idxs ; *itr > 0 ; itr++)
278 {
279 direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
280 if (!fribidi_get_par_embedding_levels(char_types + pos,
281 *itr - pos,
282 &direction,
283 embedding_levels + pos))
284 {
285 len = -2;
286 goto cleanup;
287 }
288
289 /* Only on the first run */
290 if (itr == segment_idxs)
291 {
292 bidi_props->direction = direction;
293 /* adjust base_level to be 1 for rtl paragraphs, and 0 for
294 * ltr paragraphs. */
295 base_level =
296 EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(bidi_props) ? 1 : 0;
297 }
298
299 /* We want those chars at the override points to be on the base
300 * level and we also remove -2 cause we later increment them,
301 * just for simpler code paths */
302 embedding_levels[*itr] = base_level - 2;
303 pos = *itr + 1;
304 }
305
306 direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
307 if (!fribidi_get_par_embedding_levels(char_types + pos,
308 len - pos,
309 &direction,
310 embedding_levels + pos))
311 {
312 len = -2;
313 goto cleanup;
314 }
315
316 /* Increment all levels by 2 to emulate embedding. */
317 {
318 EvasBiDiLevel *bitr = embedding_levels, *end;
319 end = bitr + len;
320 for ( ; bitr < end ; bitr++)
321 {
322 *bitr += 2;
323 }
324 }
325 }
326 else
327 {
328 if (!fribidi_get_par_embedding_levels(char_types, len,
329 &bidi_props->direction, embedding_levels))
330 {
331 len = -2;
332 goto cleanup;
333 }
334 }
335
336
337 /* clean up */
338 if (bidi_props->embedding_levels)
339 {
340 free(bidi_props->embedding_levels);
341 }
342 bidi_props->embedding_levels = embedding_levels;
343
344 /* clean up */
345
346 if (bidi_props->char_types)
347 {
348 free(bidi_props->char_types);
349 }
350 bidi_props->char_types = char_types;
351
352 if (base_ustr) free(base_ustr);
353
354
355 return bidi_props;
356
357/* Cleanup */
358cleanup:
359 if (char_types) free(char_types);
360 if (embedding_levels) free(embedding_levels);
361 if (base_ustr) free(base_ustr);
362 if (bidi_props) evas_bidi_paragraph_props_unref(bidi_props); /* Clean up the bidi props */
363 return NULL;
364}
365
366/**
367 * @internal
368 * Copies dst to src and refs (doesn't copy) the paragraph props.
369 *
370 * @param src the props to copy
371 * @param dst the props to copy to.
372 */
373void
374evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst)
375{
376 dst->dir = src->dir;
377}
378
379/**
380 * @internal
381 * Reorders ustr according to the bidi props.
382 *
383 * @param ustr the string to reorder. - Null is ok, will just populate the map.
384 * @param start the start of the line
385 * @param len the length of the line
386 * @param props the paragraph props to reorder according to
387 * @param _v_to_l The visual to logical map to populate - if NULL it won't populate it.
388 * @return #EINA_FALSE on success, #EINA_TRUE on error.
389 */
390Eina_Bool
391evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l)
392{
393 EvasBiDiStrIndex *v_to_l = NULL;
394 FriBidiChar *ustr = NULL, *base_ustr = NULL;
395
396 if (!props)
397 return EINA_FALSE;
398
399 if (eina_ustr)
400 {
401 /* The size of fribidichar is different than eina_unicode, convert */
402#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
403 base_ustr = ustr = calloc(len + 1, sizeof(FriBidiChar));
404 ustr = _evas_bidi_unicode_to_fribidichar(ustr, eina_ustr);
405#else
406 ustr = (FriBidiChar *) eina_ustr;
407#endif
408 }
409
410
411 if (_v_to_l) {
412 size_t i;
413 v_to_l = *_v_to_l = calloc(len, sizeof(EvasBiDiStrIndex));
414 if (!v_to_l)
415 {
416 goto error;
417 }
418 /* init the array for fribidi */
419 for (i = 0 ; i < len ; i++)
420 {
421 v_to_l[i] = i;
422 }
423 }
424
425 {
426 EvasBiDiLevel *emb_lvl;
427 emb_lvl = malloc((start + len) * sizeof(EvasBiDiLevel));
428 memcpy(emb_lvl, props->embedding_levels,
429 (start + len) * sizeof(EvasBiDiLevel));
430 /* We pass v_to_l - start, because fribidi assumes start is the offset
431 * from the start of v_to_l as well, not just the props. */
432 if (!fribidi_reorder_line (FRIBIDI_FLAGS_DEFAULT, props->char_types,
433 len, start, props->direction, emb_lvl, ustr, v_to_l - start))
434 {
435 free(emb_lvl);
436 goto error;
437 }
438 free(emb_lvl);
439 }
440
441
442 /* The size of fribidichar is different than eina_unicode, convert */
443#ifdef EVAS_FRIBIDI_EINA_UNICODE_UNEQUAL
444 _evas_bidi_fribidichar_to_unicode(eina_ustr, base_ustr);
445 free(base_ustr);
446#endif
447 return EINA_FALSE;
448/* ERROR HANDLING */
449error:
450 if (base_ustr) free(base_ustr);
451 _SAFE_FREE(v_to_l);
452 return EINA_TRUE;
453}
454
455/**
456 * @internal
457 * Returns the end of the current run of text
458 *
459 * @param bidi_props the paragraph properties
460 * @param start where to start looking from
461 * @param len the length of the string
462 * @return the position of the end of the run (offset from
463 * bidi_props->props->start), 0 when there is no end (i.e all the text)
464 */
465int
466evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props,
467 size_t start, int len)
468{
469 EvasBiDiLevel *i;
470 EvasBiDiLevel base;
471
472 if (!bidi_props || (len <= 0))
473 return 0;
474
475 i = bidi_props->embedding_levels + start;
476 base = *i;
477 for ( ; (len > 0) && (base == *i) ; len--, i++)
478 ;
479
480 if (len == 0)
481 {
482 return 0;
483 }
484 return i - (bidi_props->embedding_levels + start);
485}
486
487/**
488 * @internal
489 * Returns the visual string index from the logical string index.
490 *
491 * @param v_to_l the visual to logical map
492 * @param len the length of the map.
493 * @param position the position to convert.
494 * @return on success the visual position, on failure the same position.
495 */
496EvasBiDiStrIndex
497evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position)
498{
499 int i;
500 EvasBiDiStrIndex *ind;
501 if (position >= len || !v_to_l)
502 return position;
503
504 for (i = 0, ind = v_to_l ; i < len ; i++, ind++)
505 {
506 if (*ind == position)
507 {
508 return i;
509 }
510 }
511 return position;
512}
513
514/**
515 * @internal
516 * Returns the reversed pos of the index.
517 *
518 * @param dir the direction of the string
519 * @param len the length of the map.
520 * @param position the position to convert.
521 * @return on success the visual position, on failure the same position.
522 */
523EvasBiDiStrIndex
524evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position)
525{
526 if (!props || position >= len)
527 return position;
528
529 return (props->dir == EVAS_BIDI_DIRECTION_RTL) ? (len - 1) - position : position;
530}
531
532/**
533 * @internal
534 * Checks if the char is rtl oriented. I.e even a neutral char can become rtl
535 * if surrounded by rtl chars.
536 *
537 * @param bidi_props The bidi paragraph properties
538 * @param start the base position
539 * @param index the offset from the base position.
540 * @return #EINA_TRUE if true, #EINA_FALSE otherwise.
541 */
542Eina_Bool
543evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex ind)
544{
545 if(!bidi_props || ind < 0)
546 return EINA_FALSE;
547 return (FRIBIDI_IS_RTL(
548 bidi_props->embedding_levels[ind + start]))
549 ? EINA_TRUE : EINA_FALSE;
550}
551
552Evas_BiDi_Paragraph_Props *
553evas_bidi_paragraph_props_new(void)
554{
555 Evas_BiDi_Paragraph_Props *ret;
556 ret = calloc(1, sizeof(Evas_BiDi_Paragraph_Props));
557 ret->direction = EVAS_BIDI_PARAGRAPH_NEUTRAL;
558 ret->refcount = 1;
559
560 return ret;
561}
562
563/**
564 * @internal
565 * Refs the bidi props.
566 *
567 * @param bidi_props the props to ref.
568 */
569Evas_BiDi_Paragraph_Props *
570evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props)
571{
572 if (!bidi_props) return NULL;
573 BIDILOCK();
574
575 bidi_props->refcount++;
576 BIDIUNLOCK();
577 return bidi_props;
578}
579
580/**
581 * @internal
582 * Unrefs and potentially frees the props.
583 *
584 * @param bidi_props the properties to unref
585 */
586void
587evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props)
588{
589 if (!bidi_props) return;
590 BIDILOCK();
591
592 if (--bidi_props->refcount == 0)
593 {
594 evas_bidi_paragraph_props_clean(bidi_props);
595 free(bidi_props);
596 }
597 BIDIUNLOCK();
598}
599
600
601/**
602 * @internal
603 * Cleans the paragraph properties.
604 *
605 * @param bidi_props the properties to clean.
606 */
607void
608evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props)
609{
610 _SAFE_FREE(bidi_props->embedding_levels);
611 _SAFE_FREE(bidi_props->char_types);
612}
613
614/**
615 * @internal
616 * Cleans the bidi properties.
617 *
618 * @param bidi_props the properties to clean.
619 */
620void
621evas_bidi_props_clean(Evas_BiDi_Props *bidi_props)
622{
623 if (!bidi_props) return;
624 bidi_props->dir = EVAS_BIDI_DIRECTION_NEUTRAL;
625}
626/**
627 * @}
628 */
629/**
630 * @}
631 */
632#endif
633
634#if 0
635/* Good for debugging */
636static void
637dump_levels(Eina_Unicode *ustr, EvasBiDiLevel *emb)
638{
639 for ( ; *ustr ; ustr++, emb++)
640 {
641 printf("%lc %d\n", *ustr, *emb);
642 }
643}
644#endif
645
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 @@
1#ifndef _EVAS_BIDI_UTILS
2#define _EVAS_BIDI_UTILS
3
4/**
5 * @internal
6 * @addtogroup Evas_Utils
7 *
8 * @{
9 */
10/**
11 * @internal
12 * @defgroup Evas_BiDi Evas BiDi utility functions
13 *
14 * This set of functions and types helps evas handle BiDi strings correctly.
15 * @todo Document types, structures and macros.
16 *
17 * @{
18 */
19#ifdef HAVE_CONFIG_H
20# include "config.h"
21#endif
22
23#ifdef HAVE_FRIBIDI
24# define USE_FRIBIDI
25# define BIDI_SUPPORT
26#endif
27
28#include <Eina.h>
29
30#ifdef USE_FRIBIDI
31# include <fribidi/fribidi.h>
32#endif
33
34/* abstract fribidi - we statically define sizes here because otherwise we would
35 * have to ifdef everywhere (because function decorations may change with/without
36 * bidi support)
37 * These types should only be passed as pointers! i.e do not directely use any of
38 * these types in function declarations. Defining as void should help ensuring that.
39 */
40
41/* Evas_BiDi_Direction is defined in evas.h */
42
43#ifdef USE_FRIBIDI
44# define _EVAS_BIDI_TYPEDEF(type) \
45 typedef FriBidi ## type EvasBiDi ## type
46#else
47# define _EVAS_BIDI_TYPEDEF(type) \
48 typedef void EvasBiDi ## type
49#endif
50
51#if 0 /* We are using Eina_Unicode instead */
52_EVAS_BIDI_TYPEDEF(Char);
53#endif
54_EVAS_BIDI_TYPEDEF(CharType);
55_EVAS_BIDI_TYPEDEF(ParType);
56_EVAS_BIDI_TYPEDEF(StrIndex);
57_EVAS_BIDI_TYPEDEF(Level);
58_EVAS_BIDI_TYPEDEF(JoiningType);
59
60typedef struct _Evas_BiDi_Paragraph_Props Evas_BiDi_Paragraph_Props;
61typedef struct _Evas_BiDi_Props Evas_BiDi_Props;
62
63/* This structure defines a set of properties of a BiDi string. In case of a
64 * non-bidi string, all values should be NULL.
65 * To check if a structure describes a bidi string or not, use the macro
66 * EVAS_BIDI_IS_BIDI_PROP. RTL-only strings are also treated as bidi ATM.
67 */
68struct _Evas_BiDi_Paragraph_Props {
69 EvasBiDiCharType *char_types; /* BiDi char types */
70 EvasBiDiLevel *embedding_levels; /* BiDi embedding levels */
71 int refcount; /* The number of references to this object */
72#ifdef USE_FRIBIDI
73 EvasBiDiParType direction;
74#endif
75};
76
77#include "Evas.h"
78struct _Evas_BiDi_Props
79{
80 Evas_BiDi_Direction dir;
81};
82
83
84
85#ifdef USE_FRIBIDI
86
87#define EVAS_BIDI_PARAGRAPH_NEUTRAL FRIBIDI_PAR_ON
88#define EVAS_BIDI_PARAGRAPH_LTR FRIBIDI_PAR_LTR
89#define EVAS_BIDI_PARAGRAPH_RTL FRIBIDI_PAR_RTL
90#define EVAS_BIDI_PARAGRAPH_WLTR FRIBIDI_PAR_WLTR
91#define EVAS_BIDI_PARAGRAPH_WRTL FRIBIDI_PAR_WRTL
92
93#define EVAS_BIDI_PARAGRAPH_DIRECTION_IS_RTL(x) \
94 (((x) && \
95 ((x->direction == EVAS_BIDI_PARAGRAPH_RTL) || \
96 (x->direction == EVAS_BIDI_PARAGRAPH_WRTL))) ? \
97 EINA_TRUE : EINA_FALSE)
98
99
100# define evas_bidi_position_visual_to_logical(list, position) \
101 (list) ? list[position] : position;
102
103EvasBiDiStrIndex
104evas_bidi_position_logical_to_visual(EvasBiDiStrIndex *v_to_l, int len, EvasBiDiStrIndex position);
105
106EvasBiDiStrIndex
107evas_bidi_position_reverse(const Evas_BiDi_Props *props, int len, EvasBiDiStrIndex position);
108
109Eina_Bool
110evas_bidi_is_rtl_str(const Eina_Unicode *str);
111
112Eina_Bool
113evas_bidi_is_rtl_char(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, EvasBiDiStrIndex index);
114
115int
116evas_bidi_end_of_run_get(const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
117
118Eina_Bool
119evas_bidi_props_reorder_line(Eina_Unicode *eina_ustr, size_t start, size_t len, const Evas_BiDi_Paragraph_Props *props, EvasBiDiStrIndex **_v_to_l);
120
121Evas_BiDi_Paragraph_Props *
122evas_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;
123
124void
125evas_bidi_props_copy_and_ref(const Evas_BiDi_Props *src, Evas_BiDi_Props *dst);
126
127EAPI Eina_Bool
128evas_bidi_shape_string(Eina_Unicode *eina_ustr, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, size_t len);
129
130void
131evas_bidi_props_clean(Evas_BiDi_Props *intl_props) EINA_ARG_NONNULL(1);
132
133void
134evas_bidi_paragraph_props_clean(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1);
135
136Evas_BiDi_Paragraph_Props *
137evas_bidi_paragraph_props_ref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1);
138
139void
140evas_bidi_paragraph_props_unref(Evas_BiDi_Paragraph_Props *bidi_props) EINA_ARG_NONNULL(1);
141
142Evas_BiDi_Paragraph_Props *
143evas_bidi_paragraph_props_new(void) EINA_MALLOC EINA_WARN_UNUSED_RESULT;
144
145int *
146evas_bidi_segment_idxs_get(const Eina_Unicode *str, const char *delim) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT EINA_MALLOC;
147
148#endif
149/**
150 * @}
151 */
152/**
153 * @}
154 */
155
156#endif
157
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 @@
1/**
2 * @internal
3 * @addtogroup Evas_Utils
4 *
5 * @{
6 */
7/**
8 * @internal
9 * @defgroup Evas_Script Evas Script (language) utility functions
10 *
11 * This set of functions and types helps evas handle scripts correctly.
12 * @todo Document types, structures and macros.
13 *
14 * @{
15 */
16#ifdef HAVE_CONFIG_H
17# include <config.h>
18#endif
19
20#include <stdlib.h>
21
22#include <Eina.h>
23
24#include "evas_language_utils.h"
25#include "evas_bidi_utils.h" /* Used for splitting according to bidi */
26#include "../evas_font_ot.h" /* Used for harfbuzz info */
27
28#ifdef USE_HARFBUZZ
29# include <hb.h>
30#endif
31
32#include "evas_script_table.h"
33
34static Evas_Script_Type
35_evas_common_language_char_script_search(Eina_Unicode unicode)
36{
37 int min = 0;
38 int max = (sizeof(_evas_script_slow_table) /
39 sizeof(_evas_script_slow_table[0])) - 1;
40 int mid;
41
42 do
43 {
44 mid = (min + max) / 2;
45
46 if (unicode < _evas_script_slow_table[mid].start)
47 max = mid - 1;
48 else if (unicode >= _evas_script_slow_table[mid].start +
49 _evas_script_slow_table[mid].len)
50 min = mid + 1;
51 else
52 return _evas_script_slow_table[mid].script;
53 }
54 while (min <= max);
55
56 return EVAS_SCRIPT_UNKNOWN;
57}
58
59Evas_Script_Type
60evas_common_language_char_script_get(Eina_Unicode unicode)
61{
62 if ((unicode >= 0) && (unicode < EVAS_SCRIPT_DIRECT_TABLE_LIMIT))
63 return _evas_script_fast_table[unicode];
64 else
65 return _evas_common_language_char_script_search(unicode);
66}
67
68int
69evas_common_language_script_end_of_run_get(const Eina_Unicode *str,
70 const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len)
71{
72 /* FIXME: Use the standard segmentation instead */
73 Evas_Script_Type first = EVAS_SCRIPT_UNKNOWN;
74 int i;
75 for (i = 0 ; i < len ; i++, str++)
76 {
77 Evas_Script_Type tmp;
78 tmp = evas_common_language_char_script_get(*str);
79 /* Arabic is the first script in the array that's not
80 * common/inherited. */
81 if ((first == EVAS_SCRIPT_UNKNOWN) && (tmp >= EVAS_SCRIPT_ARABIC))
82 {
83 first = tmp;
84 continue;
85 }
86 if ((first != tmp) && (tmp >= EVAS_SCRIPT_ARABIC))
87 {
88 break;
89 }
90 }
91#ifdef BIDI_SUPPORT
92 {
93 int bidi_end;
94 bidi_end = evas_bidi_end_of_run_get(bidi_props, start, len);
95 if (bidi_end > 0)
96 {
97 i = (i < bidi_end) ? i : bidi_end;
98 }
99 }
100#else
101 (void) bidi_props;
102 (void) start;
103#endif
104 return (i < len) ? i : 0;
105}
106
107Evas_Script_Type
108evas_common_language_script_type_get(const Eina_Unicode *str, size_t len)
109{
110 Evas_Script_Type script = EVAS_SCRIPT_COMMON;
111 const Eina_Unicode *end = str + len;
112 /* Arabic is the first script in the array that's not a common/inherited */
113 for ( ; str < end && ((script = evas_common_language_char_script_get(*str)) < EVAS_SCRIPT_ARABIC) ; str++)
114 ;
115 return script;
116}
117
118const char *
119evas_common_language_from_locale_get(void)
120{
121 static char lang[6]; /* FIXME: Maximum length I know about */
122 if (*lang) return lang;
123
124 const char *locale;
125 locale = getenv("LANG");
126 if (locale && *locale)
127 {
128 char *itr;
129 strncpy(lang, locale, 5);
130 lang[5] = '\0';
131 itr = lang;
132 while (*itr)
133 {
134 if (*itr == '_')
135 {
136 *itr = '\0';
137 }
138 itr++;
139 }
140 return lang;
141 }
142
143 return "";
144}
145
146/*
147 * @}
148 */
149/*
150 * @}
151 */
152
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 @@
1#ifndef _EVAS_LANGUAGE_UTILS
2#define _EVAS_LANGUAGE_UTILS
3
4#include <Eina.h>
5#include "evas_bidi_utils.h"
6
7/* Unicode Script property */
8typedef enum
9{
10 EVAS_SCRIPT_COMMON = 0, /* Zyyy */
11 EVAS_SCRIPT_INHERITED, /* Qaai */
12 EVAS_SCRIPT_ARABIC, /* Arab */
13 EVAS_SCRIPT_ARMENIAN, /* Armn */
14 EVAS_SCRIPT_BENGALI, /* Beng */
15 EVAS_SCRIPT_BOPOMOFO, /* Bopo */
16 EVAS_SCRIPT_CHEROKEE, /* Cher */
17 EVAS_SCRIPT_COPTIC, /* Qaac */
18 EVAS_SCRIPT_CYRILLIC, /* Cyrl (Cyrs) */
19 EVAS_SCRIPT_DESERET, /* Dsrt */
20 EVAS_SCRIPT_DEVANAGARI, /* Deva */
21 EVAS_SCRIPT_ETHIOPIC, /* Ethi */
22 EVAS_SCRIPT_GEORGIAN, /* Geor (Geon, Geoa) */
23 EVAS_SCRIPT_GOTHIC, /* Goth */
24 EVAS_SCRIPT_GREEK, /* Grek */
25 EVAS_SCRIPT_GUJARATI, /* Gujr */
26 EVAS_SCRIPT_GURMUKHI, /* Guru */
27 EVAS_SCRIPT_HAN, /* Hani */
28 EVAS_SCRIPT_HANGUL, /* Hang */
29 EVAS_SCRIPT_HEBREW, /* Hebr */
30 EVAS_SCRIPT_HIRAGANA, /* Hira */
31 EVAS_SCRIPT_KANNADA, /* Knda */
32 EVAS_SCRIPT_KATAKANA, /* Kana */
33 EVAS_SCRIPT_KHMER, /* Khmr */
34 EVAS_SCRIPT_LAO, /* Laoo */
35 EVAS_SCRIPT_LATIN, /* Latn (Latf, Latg) */
36 EVAS_SCRIPT_MALAYALAM, /* Mlym */
37 EVAS_SCRIPT_MONGOLIAN, /* Mong */
38 EVAS_SCRIPT_MYANMAR, /* Mymr */
39 EVAS_SCRIPT_OGHAM, /* Ogam */
40 EVAS_SCRIPT_OLD_ITALIC, /* Ital */
41 EVAS_SCRIPT_ORIYA, /* Orya */
42 EVAS_SCRIPT_RUNIC, /* Runr */
43 EVAS_SCRIPT_SINHALA, /* Sinh */
44 EVAS_SCRIPT_SYRIAC, /* Syrc (Syrj, Syrn, Syre) */
45 EVAS_SCRIPT_TAMIL, /* Taml */
46 EVAS_SCRIPT_TELUGU, /* Telu */
47 EVAS_SCRIPT_THAANA, /* Thaa */
48 EVAS_SCRIPT_THAI, /* Thai */
49 EVAS_SCRIPT_TIBETAN, /* Tibt */
50 EVAS_SCRIPT_CANADIAN_ABORIGINAL, /* Cans */
51 EVAS_SCRIPT_YI, /* Yiii */
52 EVAS_SCRIPT_TAGALOG, /* Tglg */
53 EVAS_SCRIPT_HANUNOO, /* Hano */
54 EVAS_SCRIPT_BUHID, /* Buhd */
55 EVAS_SCRIPT_TAGBANWA, /* Tagb */
56
57 /* Unicode-4.0 additions */
58 EVAS_SCRIPT_BRAILLE, /* Brai */
59 EVAS_SCRIPT_CYPRIOT, /* Cprt */
60 EVAS_SCRIPT_LIMBU, /* Limb */
61 EVAS_SCRIPT_OSMANYA, /* Osma */
62 EVAS_SCRIPT_SHAVIAN, /* Shaw */
63 EVAS_SCRIPT_LINEAR_B, /* Linb */
64 EVAS_SCRIPT_TAI_LE, /* Tale */
65 EVAS_SCRIPT_UGARITIC, /* Ugar */
66
67 /* Unicode-4.1 additions */
68 EVAS_SCRIPT_NEW_TAI_LUE, /* Talu */
69 EVAS_SCRIPT_BUGINESE, /* Bugi */
70 EVAS_SCRIPT_GLAGOLITIC, /* Glag */
71 EVAS_SCRIPT_TIFINAGH, /* Tfng */
72 EVAS_SCRIPT_SYLOTI_NAGRI, /* Sylo */
73 EVAS_SCRIPT_OLD_PERSIAN, /* Xpeo */
74 EVAS_SCRIPT_KHAROSHTHI, /* Khar */
75
76 /* Unicode-5.0 additions */
77 EVAS_SCRIPT_UNKNOWN, /* Zzzz */
78 EVAS_SCRIPT_BALINESE, /* Bali */
79 EVAS_SCRIPT_CUNEIFORM, /* Xsux */
80 EVAS_SCRIPT_PHOENICIAN, /* Phnx */
81 EVAS_SCRIPT_PHAGS_PA, /* Phag */
82 EVAS_SCRIPT_NKO, /* Nkoo */
83
84 /* Unicode-5.1 additions */
85 EVAS_SCRIPT_KAYAH_LI, /* Kali */
86 EVAS_SCRIPT_LEPCHA, /* Lepc */
87 EVAS_SCRIPT_REJANG, /* Rjng */
88 EVAS_SCRIPT_SUNDANESE, /* Sund */
89 EVAS_SCRIPT_SAURASHTRA, /* Saur */
90 EVAS_SCRIPT_CHAM, /* Cham */
91 EVAS_SCRIPT_OL_CHIKI, /* Olck */
92 EVAS_SCRIPT_VAI, /* Vaii */
93 EVAS_SCRIPT_CARIAN, /* Cari */
94 EVAS_SCRIPT_LYCIAN, /* Lyci */
95 EVAS_SCRIPT_LYDIAN, /* Lydi */
96
97 /* Unicode-5.2 additions */
98 EVAS_SCRIPT_AVESTAN, /* Avst */
99 EVAS_SCRIPT_BAMUM, /* Bamu */
100 EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS, /* Egyp */
101 EVAS_SCRIPT_IMPERIAL_ARAMAIC, /* Armi */
102 EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI, /* Phli */
103 EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN, /* Prti */
104 EVAS_SCRIPT_JAVANESE, /* Java */
105 EVAS_SCRIPT_KAITHI, /* Kthi */
106 EVAS_SCRIPT_LISU, /* Lisu */
107 EVAS_SCRIPT_MEETEI_MAYEK, /* Mtei */
108 EVAS_SCRIPT_OLD_SOUTH_ARABIAN, /* Sarb */
109 EVAS_SCRIPT_OLD_TURKIC, /* Orkh */
110 EVAS_SCRIPT_SAMARITAN, /* Samr */
111 EVAS_SCRIPT_TAI_THAM, /* Lana */
112 EVAS_SCRIPT_TAI_VIET, /* Tavt */
113
114 /* Unicode-6.0 additions */
115 EVAS_SCRIPT_BATAK, /* Batk */
116 EVAS_SCRIPT_BRAHMI, /* Brah */
117 EVAS_SCRIPT_MANDAIC, /* Mand */
118} Evas_Script_Type;
119
120int
121evas_common_language_script_end_of_run_get(const Eina_Unicode *str, const Evas_BiDi_Paragraph_Props *bidi_props, size_t start, int len);
122
123Evas_Script_Type
124evas_common_language_script_type_get(const Eina_Unicode *str, size_t len);
125
126Evas_Script_Type
127evas_common_language_char_script_get(Eina_Unicode unicode);
128
129const char *
130evas_common_language_from_locale_get(void);
131#endif
132
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 @@
1/* evas_script_table.h: Mostly based on output by gen-script-table.pl
2 * which is available in glib's tools.
3 *
4 * NOTICE: This is temporary and will only stay here until there will be
5 * a nice "UNICODE DATA" library to use. From my understanding it's already
6 * being worked on.
7 *
8 * Date: Sun May 1 15:48:56 2011
9 * Source: Scripts-6.0.0.txt
10 *
11 * Do not edit.
12 */
13
14#define EVAS_SCRIPT_DIRECT_TABLE_LIMIT 8192
15
16static const
17Eina_Unicode _evas_script_fast_table[EVAS_SCRIPT_DIRECT_TABLE_LIMIT] = {
18 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
19 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
20 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
21 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
22 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
23 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
24 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
25 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
26 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
27 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
28 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
29 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
30 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
31 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
32 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
33 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
34 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
35 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
36 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
37 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
38 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
39 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
40 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
41 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
42 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
43 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
44 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
45 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
46 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
47 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
48 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
49 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
50 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
51 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
52 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
53 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
54 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
55 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
56 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
57 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
58 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
59 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
60 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
61 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
62 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
63 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
64 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
65 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
66 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
67 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
68 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
69 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
70 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
71 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
72 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
73 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
74 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
75 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
76 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
77 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
78 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
79 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
80 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
81 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
82 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
83 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
84 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
85 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
86 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
87 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
88 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
89 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON,
90 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
91 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
92 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
93 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
94 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
95 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
96 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
97 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
98 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
99 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
100 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN,
101 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
102 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
103 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
104 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
105 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
106 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
107 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
108 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
109 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
110 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
111 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
112 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
113 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
114 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
115 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
116 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
117 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
118 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
119 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
120 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
121 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
122 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
123 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
124 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
125 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
126 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
127 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
128 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
129 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
130 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
131 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
132 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
133 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
134 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
135 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
136 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
137 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
138 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
139 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
140 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
141 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
142 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
143 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
144 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
145 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
146 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
147 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
148 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
149 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
150 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
151 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
152 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
153 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
154 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
155 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
156 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
157 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
158 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
159 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
160 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
161 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
162 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
163 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
164 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
165 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
166 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
167 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
168 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
169 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
170 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
171 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
172 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
173 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
174 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
175 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
176 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
177 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
178 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
179 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
180 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
181 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
182 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
183 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
184 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
185 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
186 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
187 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
188 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
189 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
190 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
191 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
192 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
193 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
194 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
195 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
196 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
197 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
198 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
199 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
200 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
201 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
202 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
203 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
204 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
205 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
206 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
207 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
208 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
209 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
210 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
211 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
212 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
213 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
214 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
215 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
216 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
217 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
218 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
219 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
220 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
221 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
222 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
223 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
224 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
225 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
226 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
227 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
228 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
229 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
230 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
231 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
232 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
233 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
234 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
235 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
236 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
237 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
238 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
239 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
240 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
241 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
242 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
243 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
244 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
245 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
246 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
247 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
248 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
249 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
250 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
251 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
252 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
253 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
254 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
255 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
256 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
257 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
258 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
259 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
260 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
261 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
262 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
263 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
264 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
265 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
266 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_BOPOMOFO,
267 EVAS_SCRIPT_BOPOMOFO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
268 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
269 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
270 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
271 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
272 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
273 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
274 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
275 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
276 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
277 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
278 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
279 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
280 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
281 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
282 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
283 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
284 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
285 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
286 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
287 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
288 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
289 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
290 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
291 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
292 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
293 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
294 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
295 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
296 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
297 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
298 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
299 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
300 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
301 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
302 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
303 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
304 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
305 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
306 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
307 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
308 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
309 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
310 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
311 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
312 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON,
313 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
314 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
315 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
316 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
317 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
318 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK,
319 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
320 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
321 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
322 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
323 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
324 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
325 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
326 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
327 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
328 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
329 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
330 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
331 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
332 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
333 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
334 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
335 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
336 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
337 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
338 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
339 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
340 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
341 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
342 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
343 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
344 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
345 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
346 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
347 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
348 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
349 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
350 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
351 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
352 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
353 EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC, EVAS_SCRIPT_COPTIC,
354 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
355 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
356 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
357 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
358 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
359 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
360 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
361 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
362 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
363 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
364 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
365 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
366 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
367 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
368 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
369 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
370 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
371 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
372 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
373 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
374 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
375 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
376 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
377 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
378 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
379 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
380 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
381 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
382 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
383 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
384 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
385 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
386 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
387 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
388 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
389 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
390 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
391 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
392 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
393 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
394 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
395 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
396 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
397 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
398 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
399 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
400 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
401 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
402 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
403 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_INHERITED,
404 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
405 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
406 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
407 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
408 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
409 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
410 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
411 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
412 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
413 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
414 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
415 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
416 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
417 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
418 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
419 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
420 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
421 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
422 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
423 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
424 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
425 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
426 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
427 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
428 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
429 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
430 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
431 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
432 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
433 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
434 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
435 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
436 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
437 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
438 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
439 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
440 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
441 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
442 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
443 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
444 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
445 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
446 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
447 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
448 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
449 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
450 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
451 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
452 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
453 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
454 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
455 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
456 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
457 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_CYRILLIC,
458 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
459 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
460 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
461 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
462 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
463 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
464 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
465 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
466 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
467 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
468 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
469 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
470 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
471 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
472 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
473 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN,
474 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
475 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
476 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_UNKNOWN,
477 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
478 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
479 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
480 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
481 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
482 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
483 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
484 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
485 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
486 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
487 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
488 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
489 EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN, EVAS_SCRIPT_ARMENIAN,
490 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARMENIAN,
491 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
492 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
493 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
494 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
495 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
496 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
497 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
498 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
499 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
500 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
501 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
502 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
503 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
504 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
505 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
506 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
507 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
508 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
509 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
510 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
511 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
512 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
513 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
514 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
515 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
516 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
517 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
518 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
519 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
520 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
521 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
522 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
523 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
524 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HEBREW,
525 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_HEBREW,
526 EVAS_SCRIPT_HEBREW, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
527 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
528 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
529 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
530 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
531 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
532 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
533 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
534 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
535 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
536 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
537 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
538 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
539 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
540 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC,
541 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
542 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
543 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
544 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
545 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
546 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
547 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
548 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
549 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
550 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
551 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC,
552 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
553 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
554 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
555 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
556 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
557 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
558 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC,
559 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
560 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
561 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED,
562 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
563 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
564 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
565 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
566 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
567 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_ARABIC,
568 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
569 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
570 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
571 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
572 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
573 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
574 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
575 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
576 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
577 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
578 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
579 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
580 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
581 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
582 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
583 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
584 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
585 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
586 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
587 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
588 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
589 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
590 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
591 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
592 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
593 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
594 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
595 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
596 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
597 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
598 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
599 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
600 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
601 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
602 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
603 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_COMMON,
604 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
605 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
606 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
607 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
608 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
609 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
610 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
611 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
612 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
613 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
614 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
615 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
616 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
617 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
618 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
619 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
620 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
621 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
622 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
623 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
624 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
625 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
626 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
627 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
628 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
629 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
630 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
631 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
632 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
633 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
634 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
635 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
636 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
637 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
638 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
639 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
640 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
641 EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC, EVAS_SCRIPT_SYRIAC,
642 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
643 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
644 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
645 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
646 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
647 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
648 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
649 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
650 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
651 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
652 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
653 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
654 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
655 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
656 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
657 EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC, EVAS_SCRIPT_ARABIC,
658 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
659 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
660 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
661 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
662 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
663 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
664 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
665 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
666 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
667 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
668 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
669 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
670 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
671 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
672 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
673 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA,
674 EVAS_SCRIPT_THAANA, EVAS_SCRIPT_THAANA, EVAS_SCRIPT_UNKNOWN,
675 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
676 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
677 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
678 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
679 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
680 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
681 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
682 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
683 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
684 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
685 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
686 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
687 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
688 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
689 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
690 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
691 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
692 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
693 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
694 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
695 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
696 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
697 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
698 EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO, EVAS_SCRIPT_NKO,
699 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
700 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN,
701 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
702 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
703 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
704 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
705 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
706 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
707 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
708 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
709 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
710 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
711 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
712 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
713 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
714 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
715 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
716 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SAMARITAN,
717 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
718 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
719 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
720 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN,
721 EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_SAMARITAN, EVAS_SCRIPT_UNKNOWN,
722 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
723 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
724 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
725 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
726 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
727 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
728 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
729 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
730 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_MANDAIC,
731 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
732 EVAS_SCRIPT_MANDAIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
733 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
734 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
735 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
736 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
737 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
738 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
739 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
740 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
741 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
742 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
743 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
744 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
745 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
746 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
747 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
748 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
749 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
750 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
751 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
752 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
753 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
754 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
755 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
756 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
757 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
758 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
759 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
760 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
761 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
762 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
763 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
764 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
765 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
766 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
767 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
768 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
769 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
770 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
771 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
772 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
773 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
774 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
775 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
776 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
777 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
778 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
779 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
780 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
781 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
782 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
783 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
784 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
785 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
786 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
787 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
788 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
789 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
790 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
791 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
792 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
793 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
794 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
795 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
796 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
797 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
798 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
799 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
800 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
801 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
802 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
803 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
804 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
805 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
806 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
807 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
808 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
809 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
810 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
811 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
812 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
813 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_DEVANAGARI,
814 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
815 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
816 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
817 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
818 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
819 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
820 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
821 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
822 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
823 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_DEVANAGARI,
824 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
825 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
826 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
827 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI,
828 EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_DEVANAGARI, EVAS_SCRIPT_UNKNOWN,
829 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
830 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
831 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
832 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
833 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
834 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
835 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
836 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
837 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
838 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
839 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
840 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
841 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
842 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
843 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
844 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
845 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN,
846 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
847 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
848 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
849 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
850 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
851 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_UNKNOWN,
852 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
853 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
854 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
855 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
856 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
857 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
858 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
859 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
860 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
861 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
862 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BENGALI,
863 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
864 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
865 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
866 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
867 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
868 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
869 EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI, EVAS_SCRIPT_BENGALI,
870 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
871 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
872 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
873 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
874 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
875 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
876 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
877 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
878 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
879 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
880 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
881 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
882 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
883 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
884 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
885 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
886 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
887 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
888 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
889 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
890 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
891 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
892 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
893 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
894 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
895 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
896 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
897 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
898 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
899 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
900 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
901 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
902 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI,
903 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
904 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
905 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
906 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
907 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
908 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
909 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI,
910 EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_GURMUKHI, EVAS_SCRIPT_UNKNOWN,
911 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
912 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
913 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
914 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
915 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
916 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
917 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
918 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
919 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
920 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
921 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
922 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
923 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
924 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
925 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
926 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
927 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
928 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
929 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
930 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
931 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
932 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
933 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
934 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
935 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
936 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
937 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
938 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN,
939 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
940 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
941 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
942 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
943 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
944 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
945 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
946 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
947 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
948 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
949 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
950 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_GUJARATI,
951 EVAS_SCRIPT_GUJARATI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GUJARATI,
952 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
953 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
954 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
955 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
956 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
957 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
958 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
959 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
960 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
961 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
962 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
963 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
964 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
965 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
966 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
967 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
968 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
969 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
970 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
971 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
972 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
973 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
974 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
975 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
976 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
977 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
978 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
979 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
980 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
981 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
982 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
983 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
984 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
985 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
986 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
987 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
988 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
989 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
990 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ORIYA,
991 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
992 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
993 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
994 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
995 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA,
996 EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_ORIYA, EVAS_SCRIPT_UNKNOWN,
997 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
998 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
999 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1000 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1001 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1002 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1003 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1004 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1005 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1006 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1007 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1008 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1009 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1010 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1011 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1012 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1013 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1014 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1015 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1016 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1017 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1018 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1019 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1020 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1021 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1022 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL,
1023 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1024 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1025 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1026 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1027 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1028 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN,
1029 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1030 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1031 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1032 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1033 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1034 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1035 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1036 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1037 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1038 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1039 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_TAMIL,
1040 EVAS_SCRIPT_TAMIL, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1041 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1042 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1043 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1044 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1045 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1046 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1047 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
1048 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1049 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1050 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1051 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1052 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1053 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1054 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1055 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
1056 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1057 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1058 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1059 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1060 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1061 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1062 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1063 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1064 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1065 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1066 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU,
1067 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1068 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1069 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1070 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1071 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1072 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1073 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1074 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1075 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1076 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1077 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1078 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1079 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1080 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1081 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1082 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1083 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU,
1084 EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_TELUGU, EVAS_SCRIPT_UNKNOWN,
1085 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1086 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1087 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1088 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1089 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1090 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1091 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1092 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1093 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1094 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1095 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1096 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1097 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1098 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1099 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1100 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1101 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1102 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1103 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1104 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1105 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1106 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1107 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
1108 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1109 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1110 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
1111 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1112 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1113 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN,
1114 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1115 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1116 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1117 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1118 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA,
1119 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1120 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1121 EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1122 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KANNADA, EVAS_SCRIPT_KANNADA,
1123 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1124 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1125 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1126 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1127 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1128 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1129 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1130 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1131 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1132 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1133 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1134 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1135 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1136 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1137 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1138 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1139 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1140 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1141 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1142 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1143 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1144 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1145 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1146 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1147 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
1148 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1149 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1150 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
1151 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1152 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1153 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1154 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1155 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1156 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1157 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1158 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1159 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1160 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1161 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1162 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1163 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1164 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1165 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1166 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_UNKNOWN,
1167 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MALAYALAM,
1168 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1169 EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM, EVAS_SCRIPT_MALAYALAM,
1170 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1171 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1172 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1173 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1174 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1175 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1176 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1177 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1178 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1179 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1180 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1181 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1182 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1183 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1184 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1185 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1186 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1187 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1188 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1189 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1190 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1191 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1192 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1193 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN,
1194 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1195 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1196 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1197 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1198 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA,
1199 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1200 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1201 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1202 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1203 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1204 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1205 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1206 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1207 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1208 EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA, EVAS_SCRIPT_SINHALA,
1209 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1210 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1211 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1212 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1213 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1214 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1215 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1216 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1217 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1218 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1219 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1220 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1221 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1222 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1223 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1224 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1225 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1226 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1227 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1228 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1229 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1230 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1231 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1232 EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1233 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_COMMON,
1234 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1235 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1236 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1237 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1238 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1239 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1240 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1241 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1242 EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI, EVAS_SCRIPT_THAI,
1243 EVAS_SCRIPT_THAI, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1244 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1245 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1246 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1247 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1248 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1249 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1250 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1251 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1252 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1253 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1254 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1255 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1256 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1257 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1258 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1259 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1260 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1261 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1262 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1263 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1264 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1265 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1266 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1267 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1268 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
1269 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1270 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1271 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1272 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1273 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1274 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
1275 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1276 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1277 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1278 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO,
1279 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1280 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1281 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1282 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1283 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1284 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO,
1285 EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1286 EVAS_SCRIPT_LAO, EVAS_SCRIPT_LAO, EVAS_SCRIPT_UNKNOWN,
1287 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1288 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1289 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1290 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1291 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1292 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1293 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1294 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1295 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1296 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1297 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1298 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1299 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1300 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1301 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1302 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1303 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1304 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1305 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1306 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1307 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1308 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1309 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1310 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1311 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1312 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1313 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1314 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1315 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1316 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1317 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1318 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1319 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1320 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1321 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1322 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1323 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1324 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1325 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1326 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1327 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1328 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1329 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1330 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1331 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1332 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1333 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1334 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1335 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN,
1336 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1337 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1338 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1339 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1340 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1341 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1342 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1343 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1344 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1345 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1346 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1347 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1348 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN,
1349 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1350 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1351 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1352 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1353 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1354 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1355 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1356 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1357 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1358 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1359 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1360 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1361 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1362 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1363 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1364 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1365 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1366 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TIBETAN,
1367 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1368 EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1369 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
1370 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_TIBETAN, EVAS_SCRIPT_TIBETAN,
1371 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1372 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1373 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1374 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1375 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1376 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1377 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1378 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1379 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1380 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1381 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1382 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1383 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1384 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1385 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1386 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1387 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1388 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1389 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1390 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1391 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1392 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1393 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1394 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1395 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1396 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1397 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1398 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1399 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1400 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1401 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1402 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1403 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1404 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1405 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1406 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1407 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1408 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1409 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1410 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1411 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1412 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1413 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1414 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1415 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1416 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1417 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1418 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1419 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1420 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1421 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1422 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1423 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1424 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1425 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1426 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1427 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1428 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1429 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1430 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1431 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1432 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1433 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1434 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1435 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR,
1436 EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_MYANMAR, EVAS_SCRIPT_GEORGIAN,
1437 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1438 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1439 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1440 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1441 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1442 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1443 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1444 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1445 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1446 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1447 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1448 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1449 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1450 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1451 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1452 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GEORGIAN,
1453 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1454 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1455 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1456 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1457 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1458 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1459 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1460 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1461 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1462 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1463 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1464 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1465 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1466 EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_GEORGIAN,
1467 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_GEORGIAN, EVAS_SCRIPT_UNKNOWN,
1468 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANGUL,
1469 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1470 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1471 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1472 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1473 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1474 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1475 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1476 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1477 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1478 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1479 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1480 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1481 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1482 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1483 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1484 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1485 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1486 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1487 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1488 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1489 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1490 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1491 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1492 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1493 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1494 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1495 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1496 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1497 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1498 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1499 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1500 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1501 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1502 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1503 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1504 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1505 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1506 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1507 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1508 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1509 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1510 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1511 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1512 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1513 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1514 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1515 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1516 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1517 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1518 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1519 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1520 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1521 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1522 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1523 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1524 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1525 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1526 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1527 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1528 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1529 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1530 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1531 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1532 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1533 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1534 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1535 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1536 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1537 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1538 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1539 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1540 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1541 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1542 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1543 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1544 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1545 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1546 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1547 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1548 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1549 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1550 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1551 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1552 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1553 EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL, EVAS_SCRIPT_HANGUL,
1554 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1555 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1556 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1557 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1558 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1559 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1560 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1561 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1562 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1563 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1564 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1565 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1566 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1567 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1568 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1569 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1570 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1571 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1572 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1573 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1574 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1575 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1576 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1577 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1578 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1579 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1580 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1581 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1582 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1583 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1584 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1585 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1586 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1587 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1588 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1589 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1590 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1591 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1592 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1593 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1594 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1595 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1596 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1597 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1598 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1599 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1600 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1601 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1602 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1603 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1604 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1605 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1606 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1607 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1608 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1609 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1610 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1611 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1612 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1613 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1614 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1615 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1616 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1617 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1618 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1619 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1620 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC,
1621 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1622 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1623 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1624 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1625 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1626 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1627 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1628 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1629 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1630 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1631 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1632 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1633 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1634 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1635 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1636 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1637 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1638 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1639 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1640 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1641 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1642 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1643 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1644 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1645 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1646 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1647 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1648 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1649 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1650 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1651 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1652 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1653 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1654 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1655 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1656 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1657 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1658 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1659 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1660 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1661 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1662 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1663 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1664 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1665 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1666 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1667 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1668 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1669 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1670 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1671 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1672 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1673 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1674 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1675 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1676 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1677 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1678 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1679 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1680 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1681 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1682 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1683 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1684 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1685 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1686 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1687 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1688 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1689 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC,
1690 EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_ETHIOPIC, EVAS_SCRIPT_UNKNOWN,
1691 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1692 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CHEROKEE,
1693 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1694 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1695 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1696 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1697 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1698 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1699 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1700 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1701 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1702 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1703 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1704 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1705 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1706 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1707 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1708 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1709 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1710 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1711 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1712 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1713 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1714 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1715 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1716 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1717 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1718 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1719 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1720 EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE, EVAS_SCRIPT_CHEROKEE,
1721 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1722 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1723 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1724 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1725 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1726 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1727 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1728 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1729 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1730 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1731 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1732 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1733 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1734 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1735 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1736 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1737 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1738 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1739 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1740 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1741 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1742 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1743 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1744 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1745 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1746 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1747 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1748 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1749 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1750 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1751 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1752 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1753 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1754 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1755 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1756 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1757 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1758 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1759 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1760 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1761 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1762 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1763 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1764 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1765 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1766 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1767 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1768 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1769 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1770 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1771 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1772 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1773 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1774 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1775 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1776 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1777 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1778 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1779 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1780 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1781 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1782 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1783 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1784 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1785 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1786 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1787 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1788 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1789 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1790 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1791 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1792 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1793 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1794 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1795 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1796 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1797 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1798 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1799 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1800 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1801 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1802 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1803 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1804 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1805 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1806 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1807 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1808 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1809 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1810 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1811 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1812 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1813 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1814 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1815 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1816 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1817 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1818 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1819 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1820 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1821 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1822 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1823 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1824 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1825 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1826 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1827 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1828 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1829 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1830 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1831 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1832 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1833 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1834 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1835 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1836 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1837 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1838 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1839 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1840 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1841 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1842 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1843 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1844 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1845 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1846 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1847 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1848 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1849 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1850 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1851 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1852 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1853 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1854 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1855 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1856 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1857 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1858 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1859 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1860 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1861 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1862 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1863 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1864 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1865 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1866 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1867 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1868 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1869 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1870 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1871 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1872 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1873 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1874 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1875 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1876 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1877 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1878 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1879 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1880 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1881 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1882 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1883 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1884 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1885 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1886 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1887 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1888 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1889 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1890 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1891 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1892 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1893 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1894 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1895 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1896 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1897 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1898 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1899 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1900 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1901 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1902 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1903 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1904 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1905 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1906 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1907 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1908 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1909 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1910 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1911 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1912 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1913 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1914 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1915 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1916 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1917 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1918 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1919 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1920 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1921 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1922 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1923 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1924 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1925 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1926 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1927 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1928 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1929 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1930 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1931 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1932 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1933 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1934 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1935 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1936 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1937 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
1938 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1939 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1940 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1941 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1942 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1943 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1944 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1945 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1946 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM,
1947 EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_OGHAM, EVAS_SCRIPT_UNKNOWN,
1948 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_RUNIC,
1949 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1950 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1951 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1952 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1953 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1954 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1955 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1956 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1957 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1958 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1959 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1960 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1961 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1962 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1963 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1964 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1965 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1966 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1967 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1968 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1969 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1970 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1971 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1972 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC,
1973 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_COMMON,
1974 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_RUNIC,
1975 EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_RUNIC, EVAS_SCRIPT_UNKNOWN,
1976 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1977 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1978 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1979 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1980 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG,
1981 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1982 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1983 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1984 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1985 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1986 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG,
1987 EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_TAGALOG, EVAS_SCRIPT_UNKNOWN,
1988 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1989 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1990 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
1991 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1992 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1993 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1994 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1995 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1996 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1997 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_HANUNOO,
1998 EVAS_SCRIPT_HANUNOO, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
1999 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2000 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2001 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2002 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2003 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2004 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2005 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2006 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2007 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID,
2008 EVAS_SCRIPT_BUHID, EVAS_SCRIPT_BUHID, EVAS_SCRIPT_UNKNOWN,
2009 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2010 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2011 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2012 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA,
2013 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2014 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2015 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2016 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2017 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_TAGBANWA,
2018 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAGBANWA,
2019 EVAS_SCRIPT_TAGBANWA, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2020 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2021 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2022 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2023 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2024 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2025 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2026 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2027 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2028 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2029 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2030 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2031 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2032 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2033 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2034 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2035 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2036 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2037 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2038 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2039 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2040 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2041 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2042 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2043 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2044 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2045 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2046 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2047 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2048 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2049 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2050 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2051 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2052 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2053 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2054 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN,
2055 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2056 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2057 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2058 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_UNKNOWN,
2059 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2060 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_KHMER,
2061 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2062 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2063 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2064 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2065 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2066 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON,
2067 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_COMMON,
2068 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2069 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2070 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2071 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2072 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2073 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2074 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_UNKNOWN,
2075 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2076 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN,
2077 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2078 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2079 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2080 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2081 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2082 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2083 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2084 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2085 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2086 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2087 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2088 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2089 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2090 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2091 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2092 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2093 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2094 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2095 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2096 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2097 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2098 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2099 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2100 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2101 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2102 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2103 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2104 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2105 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2106 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2107 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2108 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_MONGOLIAN,
2109 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2110 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2111 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2112 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2113 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2114 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2115 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2116 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2117 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2118 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2119 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2120 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2121 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2122 EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN, EVAS_SCRIPT_MONGOLIAN,
2123 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2124 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2125 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2126 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2127 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2128 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2129 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2130 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2131 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2132 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2133 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2134 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2135 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2136 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2137 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2138 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2139 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2140 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2141 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2142 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2143 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2144 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2145 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2146 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2147 EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL, EVAS_SCRIPT_CANADIAN_ABORIGINAL,
2148 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2149 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2150 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2151 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2152 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2153 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2154 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2155 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2156 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2157 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2158 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2159 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2160 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2161 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2162 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2163 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2164 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2165 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2166 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2167 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2168 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2169 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2170 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2171 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2172 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LIMBU,
2173 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2174 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2175 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2176 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2177 EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU, EVAS_SCRIPT_LIMBU,
2178 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2179 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2180 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2181 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2182 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2183 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2184 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2185 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2186 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2187 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2188 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_LE,
2189 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_TAI_LE,
2190 EVAS_SCRIPT_TAI_LE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2191 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2192 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2193 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2194 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2195 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2196 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2197 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2198 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2199 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2200 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2201 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2202 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2203 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2204 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2205 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2206 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2207 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2208 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN,
2209 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2210 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2211 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2212 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2213 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2214 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2215 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2216 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2217 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2218 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN,
2219 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2220 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE,
2221 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2222 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2223 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2224 EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2225 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_NEW_TAI_LUE, EVAS_SCRIPT_NEW_TAI_LUE,
2226 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2227 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2228 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2229 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2230 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2231 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2232 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2233 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2234 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2235 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER,
2236 EVAS_SCRIPT_KHMER, EVAS_SCRIPT_KHMER, EVAS_SCRIPT_BUGINESE,
2237 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2238 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2239 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2240 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2241 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2242 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2243 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2244 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2245 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_BUGINESE,
2246 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BUGINESE,
2247 EVAS_SCRIPT_BUGINESE, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2248 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2249 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2250 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2251 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2252 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2253 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2254 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2255 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2256 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2257 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2258 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2259 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2260 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2261 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2262 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2263 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2264 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2265 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2266 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2267 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2268 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM,
2269 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2270 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2271 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2272 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2273 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2274 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2275 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2276 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2277 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2278 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2279 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2280 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2281 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2282 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN,
2283 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2284 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_TAI_THAM,
2285 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2286 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2287 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2288 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2289 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2290 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2291 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2292 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2293 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM,
2294 EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_TAI_THAM, EVAS_SCRIPT_UNKNOWN,
2295 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2296 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2297 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2298 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2299 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2300 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2301 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2302 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2303 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2304 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2305 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2306 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2307 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2308 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2309 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2310 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2311 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2312 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2313 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2314 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2315 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2316 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2317 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2318 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2319 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2320 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2321 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2322 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2323 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2324 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2325 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2326 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2327 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2328 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2329 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2330 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2331 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2332 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2333 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2334 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2335 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2336 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2337 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2338 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2339 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2340 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2341 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2342 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2343 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2344 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2345 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2346 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2347 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2348 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_BALINESE,
2349 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2350 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2351 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2352 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2353 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2354 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2355 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2356 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2357 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2358 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2359 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2360 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2361 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2362 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE,
2363 EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_BALINESE, EVAS_SCRIPT_UNKNOWN,
2364 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_SUNDANESE,
2365 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2366 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2367 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2368 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2369 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2370 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2371 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2372 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2373 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2374 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2375 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2376 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2377 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2378 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2379 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2380 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2381 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2382 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2383 EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE, EVAS_SCRIPT_SUNDANESE,
2384 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2385 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2386 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2387 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2388 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2389 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2390 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2391 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2392 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2393 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2394 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2395 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2396 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2397 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2398 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2399 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2400 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2401 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2402 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2403 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2404 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2405 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2406 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK, EVAS_SCRIPT_BATAK,
2407 EVAS_SCRIPT_BATAK, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2408 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2409 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2410 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2411 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2412 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2413 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2414 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2415 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2416 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2417 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2418 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2419 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2420 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2421 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2422 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2423 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2424 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2425 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2426 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2427 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2428 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2429 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2430 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2431 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2432 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2433 EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA, EVAS_SCRIPT_LEPCHA,
2434 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2435 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2436 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2437 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2438 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2439 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2440 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2441 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2442 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2443 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2444 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2445 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2446 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2447 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2448 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2449 EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI, EVAS_SCRIPT_OL_CHIKI,
2450 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2451 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2452 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2453 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2454 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2455 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2456 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2457 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2458 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2459 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2460 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2461 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2462 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2463 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2464 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2465 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2466 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2467 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2468 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2469 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2470 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2471 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2472 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2473 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2474 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2475 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2476 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED,
2477 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON,
2478 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2479 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2480 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2481 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2482 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED,
2483 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2484 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2485 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
2486 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_COMMON,
2487 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON, EVAS_SCRIPT_COMMON,
2488 EVAS_SCRIPT_COMMON, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2489 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2490 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2491 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2492 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_LATIN,
2493 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2494 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2495 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2496 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2497 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2498 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2499 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2500 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2501 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2502 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2503 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2504 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2505 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2506 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2507 EVAS_SCRIPT_CYRILLIC, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2508 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2509 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2510 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2511 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2512 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2513 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2514 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2515 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2516 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2517 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2518 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2519 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2520 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2521 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2522 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2523 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK,
2524 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2525 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2526 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK,
2527 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2528 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2529 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2530 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2531 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2532 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_CYRILLIC,
2533 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2534 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2535 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2536 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2537 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2538 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2539 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2540 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2541 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2542 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2543 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2544 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2545 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2546 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2547 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2548 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2549 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2550 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2551 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2552 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2553 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2554 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2555 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2556 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_INHERITED,
2557 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2558 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2559 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2560 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2561 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2562 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2563 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2564 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2565 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2566 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2567 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2568 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2569 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_UNKNOWN,
2570 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2571 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2572 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2573 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2574 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2575 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2576 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_INHERITED,
2577 EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED, EVAS_SCRIPT_INHERITED,
2578 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2579 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2580 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2581 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2582 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2583 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2584 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2585 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2586 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2587 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2588 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2589 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2590 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2591 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2592 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2593 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2594 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2595 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2596 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2597 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2598 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2599 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2600 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2601 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2602 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2603 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2604 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2605 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2606 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2607 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2608 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2609 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2610 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2611 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2612 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2613 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2614 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2615 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2616 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2617 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2618 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2619 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2620 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2621 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2622 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2623 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2624 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2625 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2626 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2627 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2628 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2629 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2630 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2631 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2632 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2633 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2634 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2635 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2636 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2637 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2638 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2639 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2640 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2641 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2642 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2643 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2644 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2645 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2646 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2647 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2648 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2649 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2650 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2651 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2652 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2653 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2654 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2655 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2656 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2657 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2658 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2659 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2660 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2661 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2662 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN, EVAS_SCRIPT_LATIN,
2663 EVAS_SCRIPT_LATIN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2664 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2665 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2666 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2667 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2668 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2669 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2670 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2671 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2672 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2673 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2674 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2675 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2676 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2677 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2678 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2679 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2680 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2681 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2682 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2683 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2684 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2685 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2686 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2687 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2688 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2689 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2690 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2691 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2692 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2693 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
2694 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2695 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2696 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2697 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2698 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2699 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2700 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2701 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2702 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2703 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2704 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2705 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2706 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2707 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2708 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2709 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2710 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2711 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2712 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2713 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2714 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2715 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2716 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2717 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2718 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2719 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2720 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2721 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2722 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2723 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2724 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2725 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2726 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2727 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2728 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2729 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2730 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2731 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2732 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2733 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2734 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK,
2735 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2736 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2737 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2738 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2739 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2740 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2741 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2742 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2743 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_UNKNOWN,
2744 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2745 EVAS_SCRIPT_UNKNOWN, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2746 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2747 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK, EVAS_SCRIPT_GREEK,
2748 EVAS_SCRIPT_GREEK, EVAS_SCRIPT_UNKNOWN,
2749};
2750
2751static const struct {
2752 Eina_Unicode start;
2753 short len;
2754 Evas_Script_Type script;
2755} _evas_script_slow_table[] = {
2756 { 0x2000, 12, EVAS_SCRIPT_COMMON },
2757 { 0x200c, 2, EVAS_SCRIPT_INHERITED },
2758 { 0x200e, 87, EVAS_SCRIPT_COMMON },
2759 { 0x206a, 7, EVAS_SCRIPT_COMMON },
2760 { 0x2071, 1, EVAS_SCRIPT_LATIN },
2761 { 0x2074, 11, EVAS_SCRIPT_COMMON },
2762 { 0x207f, 1, EVAS_SCRIPT_LATIN },
2763 { 0x2080, 15, EVAS_SCRIPT_COMMON },
2764 { 0x2090, 13, EVAS_SCRIPT_LATIN },
2765 { 0x20a0, 26, EVAS_SCRIPT_COMMON },
2766 { 0x20d0, 33, EVAS_SCRIPT_INHERITED },
2767 { 0x2100, 38, EVAS_SCRIPT_COMMON },
2768 { 0x2126, 1, EVAS_SCRIPT_GREEK },
2769 { 0x2127, 3, EVAS_SCRIPT_COMMON },
2770 { 0x212a, 2, EVAS_SCRIPT_LATIN },
2771 { 0x212c, 6, EVAS_SCRIPT_COMMON },
2772 { 0x2132, 1, EVAS_SCRIPT_LATIN },
2773 { 0x2133, 27, EVAS_SCRIPT_COMMON },
2774 { 0x214e, 1, EVAS_SCRIPT_LATIN },
2775 { 0x214f, 17, EVAS_SCRIPT_COMMON },
2776 { 0x2160, 41, EVAS_SCRIPT_LATIN },
2777 { 0x2189, 1, EVAS_SCRIPT_COMMON },
2778 { 0x2190, 612, EVAS_SCRIPT_COMMON },
2779 { 0x2400, 39, EVAS_SCRIPT_COMMON },
2780 { 0x2440, 11, EVAS_SCRIPT_COMMON },
2781 { 0x2460, 672, EVAS_SCRIPT_COMMON },
2782 { 0x2701, 202, EVAS_SCRIPT_COMMON },
2783 { 0x27cc, 1, EVAS_SCRIPT_COMMON },
2784 { 0x27ce, 50, EVAS_SCRIPT_COMMON },
2785 { 0x2800, 256, EVAS_SCRIPT_BRAILLE },
2786 { 0x2900, 589, EVAS_SCRIPT_COMMON },
2787 { 0x2b50, 10, EVAS_SCRIPT_COMMON },
2788 { 0x2c00, 47, EVAS_SCRIPT_GLAGOLITIC },
2789 { 0x2c30, 47, EVAS_SCRIPT_GLAGOLITIC },
2790 { 0x2c60, 32, EVAS_SCRIPT_LATIN },
2791 { 0x2c80, 114, EVAS_SCRIPT_COPTIC },
2792 { 0x2cf9, 7, EVAS_SCRIPT_COPTIC },
2793 { 0x2d00, 38, EVAS_SCRIPT_GEORGIAN },
2794 { 0x2d30, 54, EVAS_SCRIPT_TIFINAGH },
2795 { 0x2d6f, 2, EVAS_SCRIPT_TIFINAGH },
2796 { 0x2d7f, 1, EVAS_SCRIPT_TIFINAGH },
2797 { 0x2d80, 23, EVAS_SCRIPT_ETHIOPIC },
2798 { 0x2da0, 7, EVAS_SCRIPT_ETHIOPIC },
2799 { 0x2da8, 7, EVAS_SCRIPT_ETHIOPIC },
2800 { 0x2db0, 7, EVAS_SCRIPT_ETHIOPIC },
2801 { 0x2db8, 7, EVAS_SCRIPT_ETHIOPIC },
2802 { 0x2dc0, 7, EVAS_SCRIPT_ETHIOPIC },
2803 { 0x2dc8, 7, EVAS_SCRIPT_ETHIOPIC },
2804 { 0x2dd0, 7, EVAS_SCRIPT_ETHIOPIC },
2805 { 0x2dd8, 7, EVAS_SCRIPT_ETHIOPIC },
2806 { 0x2de0, 32, EVAS_SCRIPT_CYRILLIC },
2807 { 0x2e00, 50, EVAS_SCRIPT_COMMON },
2808 { 0x2e80, 26, EVAS_SCRIPT_HAN },
2809 { 0x2e9b, 89, EVAS_SCRIPT_HAN },
2810 { 0x2f00, 214, EVAS_SCRIPT_HAN },
2811 { 0x2ff0, 12, EVAS_SCRIPT_COMMON },
2812 { 0x3000, 5, EVAS_SCRIPT_COMMON },
2813 { 0x3005, 1, EVAS_SCRIPT_HAN },
2814 { 0x3006, 1, EVAS_SCRIPT_COMMON },
2815 { 0x3007, 1, EVAS_SCRIPT_HAN },
2816 { 0x3008, 25, EVAS_SCRIPT_COMMON },
2817 { 0x3021, 9, EVAS_SCRIPT_HAN },
2818 { 0x302a, 4, EVAS_SCRIPT_INHERITED },
2819 { 0x302e, 2, EVAS_SCRIPT_HANGUL },
2820 { 0x3030, 8, EVAS_SCRIPT_COMMON },
2821 { 0x3038, 4, EVAS_SCRIPT_HAN },
2822 { 0x303c, 4, EVAS_SCRIPT_COMMON },
2823 { 0x3041, 86, EVAS_SCRIPT_HIRAGANA },
2824 { 0x3099, 2, EVAS_SCRIPT_INHERITED },
2825 { 0x309b, 2, EVAS_SCRIPT_COMMON },
2826 { 0x309d, 3, EVAS_SCRIPT_HIRAGANA },
2827 { 0x30a0, 1, EVAS_SCRIPT_COMMON },
2828 { 0x30a1, 90, EVAS_SCRIPT_KATAKANA },
2829 { 0x30fb, 2, EVAS_SCRIPT_COMMON },
2830 { 0x30fd, 3, EVAS_SCRIPT_KATAKANA },
2831 { 0x3105, 41, EVAS_SCRIPT_BOPOMOFO },
2832 { 0x3131, 94, EVAS_SCRIPT_HANGUL },
2833 { 0x3190, 16, EVAS_SCRIPT_COMMON },
2834 { 0x31a0, 27, EVAS_SCRIPT_BOPOMOFO },
2835 { 0x31c0, 36, EVAS_SCRIPT_COMMON },
2836 { 0x31f0, 16, EVAS_SCRIPT_KATAKANA },
2837 { 0x3200, 31, EVAS_SCRIPT_HANGUL },
2838 { 0x3220, 64, EVAS_SCRIPT_COMMON },
2839 { 0x3260, 31, EVAS_SCRIPT_HANGUL },
2840 { 0x327f, 81, EVAS_SCRIPT_COMMON },
2841 { 0x32d0, 47, EVAS_SCRIPT_KATAKANA },
2842 { 0x3300, 88, EVAS_SCRIPT_KATAKANA },
2843 { 0x3358, 168, EVAS_SCRIPT_COMMON },
2844 { 0x3400, 6582, EVAS_SCRIPT_HAN },
2845 { 0x4dc0, 64, EVAS_SCRIPT_COMMON },
2846 { 0x4e00, 20940, EVAS_SCRIPT_HAN },
2847 { 0xa000, 1165, EVAS_SCRIPT_YI },
2848 { 0xa490, 55, EVAS_SCRIPT_YI },
2849 { 0xa4d0, 48, EVAS_SCRIPT_LISU },
2850 { 0xa500, 300, EVAS_SCRIPT_VAI },
2851 { 0xa640, 52, EVAS_SCRIPT_CYRILLIC },
2852 { 0xa67c, 28, EVAS_SCRIPT_CYRILLIC },
2853 { 0xa6a0, 88, EVAS_SCRIPT_BAMUM },
2854 { 0xa700, 34, EVAS_SCRIPT_COMMON },
2855 { 0xa722, 102, EVAS_SCRIPT_LATIN },
2856 { 0xa788, 3, EVAS_SCRIPT_COMMON },
2857 { 0xa78b, 4, EVAS_SCRIPT_LATIN },
2858 { 0xa790, 2, EVAS_SCRIPT_LATIN },
2859 { 0xa7a0, 10, EVAS_SCRIPT_LATIN },
2860 { 0xa7fa, 6, EVAS_SCRIPT_LATIN },
2861 { 0xa800, 44, EVAS_SCRIPT_SYLOTI_NAGRI },
2862 { 0xa830, 10, EVAS_SCRIPT_COMMON },
2863 { 0xa840, 56, EVAS_SCRIPT_PHAGS_PA },
2864 { 0xa880, 69, EVAS_SCRIPT_SAURASHTRA },
2865 { 0xa8ce, 12, EVAS_SCRIPT_SAURASHTRA },
2866 { 0xa8e0, 28, EVAS_SCRIPT_DEVANAGARI },
2867 { 0xa900, 48, EVAS_SCRIPT_KAYAH_LI },
2868 { 0xa930, 36, EVAS_SCRIPT_REJANG },
2869 { 0xa95f, 1, EVAS_SCRIPT_REJANG },
2870 { 0xa960, 29, EVAS_SCRIPT_HANGUL },
2871 { 0xa980, 78, EVAS_SCRIPT_JAVANESE },
2872 { 0xa9cf, 11, EVAS_SCRIPT_JAVANESE },
2873 { 0xa9de, 2, EVAS_SCRIPT_JAVANESE },
2874 { 0xaa00, 55, EVAS_SCRIPT_CHAM },
2875 { 0xaa40, 14, EVAS_SCRIPT_CHAM },
2876 { 0xaa50, 10, EVAS_SCRIPT_CHAM },
2877 { 0xaa5c, 4, EVAS_SCRIPT_CHAM },
2878 { 0xaa60, 28, EVAS_SCRIPT_MYANMAR },
2879 { 0xaa80, 67, EVAS_SCRIPT_TAI_VIET },
2880 { 0xaadb, 5, EVAS_SCRIPT_TAI_VIET },
2881 { 0xab01, 6, EVAS_SCRIPT_ETHIOPIC },
2882 { 0xab09, 6, EVAS_SCRIPT_ETHIOPIC },
2883 { 0xab11, 6, EVAS_SCRIPT_ETHIOPIC },
2884 { 0xab20, 7, EVAS_SCRIPT_ETHIOPIC },
2885 { 0xab28, 7, EVAS_SCRIPT_ETHIOPIC },
2886 { 0xabc0, 46, EVAS_SCRIPT_MEETEI_MAYEK },
2887 { 0xabf0, 10, EVAS_SCRIPT_MEETEI_MAYEK },
2888 { 0xac00, 11172, EVAS_SCRIPT_HANGUL },
2889 { 0xd7b0, 23, EVAS_SCRIPT_HANGUL },
2890 { 0xd7cb, 49, EVAS_SCRIPT_HANGUL },
2891 { 0xf900, 302, EVAS_SCRIPT_HAN },
2892 { 0xfa30, 62, EVAS_SCRIPT_HAN },
2893 { 0xfa70, 106, EVAS_SCRIPT_HAN },
2894 { 0xfb00, 7, EVAS_SCRIPT_LATIN },
2895 { 0xfb13, 5, EVAS_SCRIPT_ARMENIAN },
2896 { 0xfb1d, 26, EVAS_SCRIPT_HEBREW },
2897 { 0xfb38, 5, EVAS_SCRIPT_HEBREW },
2898 { 0xfb3e, 1, EVAS_SCRIPT_HEBREW },
2899 { 0xfb40, 2, EVAS_SCRIPT_HEBREW },
2900 { 0xfb43, 2, EVAS_SCRIPT_HEBREW },
2901 { 0xfb46, 10, EVAS_SCRIPT_HEBREW },
2902 { 0xfb50, 114, EVAS_SCRIPT_ARABIC },
2903 { 0xfbd3, 363, EVAS_SCRIPT_ARABIC },
2904 { 0xfd3e, 2, EVAS_SCRIPT_COMMON },
2905 { 0xfd50, 64, EVAS_SCRIPT_ARABIC },
2906 { 0xfd92, 54, EVAS_SCRIPT_ARABIC },
2907 { 0xfdf0, 13, EVAS_SCRIPT_ARABIC },
2908 { 0xfdfd, 1, EVAS_SCRIPT_COMMON },
2909 { 0xfe00, 16, EVAS_SCRIPT_INHERITED },
2910 { 0xfe10, 10, EVAS_SCRIPT_COMMON },
2911 { 0xfe20, 7, EVAS_SCRIPT_INHERITED },
2912 { 0xfe30, 35, EVAS_SCRIPT_COMMON },
2913 { 0xfe54, 19, EVAS_SCRIPT_COMMON },
2914 { 0xfe68, 4, EVAS_SCRIPT_COMMON },
2915 { 0xfe70, 5, EVAS_SCRIPT_ARABIC },
2916 { 0xfe76, 135, EVAS_SCRIPT_ARABIC },
2917 { 0xfeff, 1, EVAS_SCRIPT_COMMON },
2918 { 0xff01, 32, EVAS_SCRIPT_COMMON },
2919 { 0xff21, 26, EVAS_SCRIPT_LATIN },
2920 { 0xff3b, 6, EVAS_SCRIPT_COMMON },
2921 { 0xff41, 26, EVAS_SCRIPT_LATIN },
2922 { 0xff5b, 11, EVAS_SCRIPT_COMMON },
2923 { 0xff66, 10, EVAS_SCRIPT_KATAKANA },
2924 { 0xff70, 1, EVAS_SCRIPT_COMMON },
2925 { 0xff71, 45, EVAS_SCRIPT_KATAKANA },
2926 { 0xff9e, 2, EVAS_SCRIPT_COMMON },
2927 { 0xffa0, 31, EVAS_SCRIPT_HANGUL },
2928 { 0xffc2, 6, EVAS_SCRIPT_HANGUL },
2929 { 0xffca, 6, EVAS_SCRIPT_HANGUL },
2930 { 0xffd2, 6, EVAS_SCRIPT_HANGUL },
2931 { 0xffda, 3, EVAS_SCRIPT_HANGUL },
2932 { 0xffe0, 7, EVAS_SCRIPT_COMMON },
2933 { 0xffe8, 7, EVAS_SCRIPT_COMMON },
2934 { 0xfff9, 5, EVAS_SCRIPT_COMMON },
2935 { 0x10000, 12, EVAS_SCRIPT_LINEAR_B },
2936 { 0x1000d, 26, EVAS_SCRIPT_LINEAR_B },
2937 { 0x10028, 19, EVAS_SCRIPT_LINEAR_B },
2938 { 0x1003c, 2, EVAS_SCRIPT_LINEAR_B },
2939 { 0x1003f, 15, EVAS_SCRIPT_LINEAR_B },
2940 { 0x10050, 14, EVAS_SCRIPT_LINEAR_B },
2941 { 0x10080, 123, EVAS_SCRIPT_LINEAR_B },
2942 { 0x10100, 3, EVAS_SCRIPT_COMMON },
2943 { 0x10107, 45, EVAS_SCRIPT_COMMON },
2944 { 0x10137, 9, EVAS_SCRIPT_COMMON },
2945 { 0x10140, 75, EVAS_SCRIPT_GREEK },
2946 { 0x10190, 12, EVAS_SCRIPT_COMMON },
2947 { 0x101d0, 45, EVAS_SCRIPT_COMMON },
2948 { 0x101fd, 1, EVAS_SCRIPT_INHERITED },
2949 { 0x10280, 29, EVAS_SCRIPT_LYCIAN },
2950 { 0x102a0, 49, EVAS_SCRIPT_CARIAN },
2951 { 0x10300, 31, EVAS_SCRIPT_OLD_ITALIC },
2952 { 0x10320, 4, EVAS_SCRIPT_OLD_ITALIC },
2953 { 0x10330, 27, EVAS_SCRIPT_GOTHIC },
2954 { 0x10380, 30, EVAS_SCRIPT_UGARITIC },
2955 { 0x1039f, 1, EVAS_SCRIPT_UGARITIC },
2956 { 0x103a0, 36, EVAS_SCRIPT_OLD_PERSIAN },
2957 { 0x103c8, 14, EVAS_SCRIPT_OLD_PERSIAN },
2958 { 0x10400, 80, EVAS_SCRIPT_DESERET },
2959 { 0x10450, 48, EVAS_SCRIPT_SHAVIAN },
2960 { 0x10480, 30, EVAS_SCRIPT_OSMANYA },
2961 { 0x104a0, 10, EVAS_SCRIPT_OSMANYA },
2962 { 0x10800, 6, EVAS_SCRIPT_CYPRIOT },
2963 { 0x10808, 1, EVAS_SCRIPT_CYPRIOT },
2964 { 0x1080a, 44, EVAS_SCRIPT_CYPRIOT },
2965 { 0x10837, 2, EVAS_SCRIPT_CYPRIOT },
2966 { 0x1083c, 1, EVAS_SCRIPT_CYPRIOT },
2967 { 0x1083f, 1, EVAS_SCRIPT_CYPRIOT },
2968 { 0x10840, 22, EVAS_SCRIPT_IMPERIAL_ARAMAIC },
2969 { 0x10857, 9, EVAS_SCRIPT_IMPERIAL_ARAMAIC },
2970 { 0x10900, 28, EVAS_SCRIPT_PHOENICIAN },
2971 { 0x1091f, 1, EVAS_SCRIPT_PHOENICIAN },
2972 { 0x10920, 26, EVAS_SCRIPT_LYDIAN },
2973 { 0x1093f, 1, EVAS_SCRIPT_LYDIAN },
2974 { 0x10a00, 4, EVAS_SCRIPT_KHAROSHTHI },
2975 { 0x10a05, 2, EVAS_SCRIPT_KHAROSHTHI },
2976 { 0x10a0c, 8, EVAS_SCRIPT_KHAROSHTHI },
2977 { 0x10a15, 3, EVAS_SCRIPT_KHAROSHTHI },
2978 { 0x10a19, 27, EVAS_SCRIPT_KHAROSHTHI },
2979 { 0x10a38, 3, EVAS_SCRIPT_KHAROSHTHI },
2980 { 0x10a3f, 9, EVAS_SCRIPT_KHAROSHTHI },
2981 { 0x10a50, 9, EVAS_SCRIPT_KHAROSHTHI },
2982 { 0x10a60, 32, EVAS_SCRIPT_OLD_SOUTH_ARABIAN },
2983 { 0x10b00, 54, EVAS_SCRIPT_AVESTAN },
2984 { 0x10b39, 7, EVAS_SCRIPT_AVESTAN },
2985 { 0x10b40, 22, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN },
2986 { 0x10b58, 8, EVAS_SCRIPT_INSCRIPTIONAL_PARTHIAN },
2987 { 0x10b60, 19, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI },
2988 { 0x10b78, 8, EVAS_SCRIPT_INSCRIPTIONAL_PAHLAVI },
2989 { 0x10c00, 73, EVAS_SCRIPT_OLD_TURKIC },
2990 { 0x10e60, 31, EVAS_SCRIPT_ARABIC },
2991 { 0x11000, 78, EVAS_SCRIPT_BRAHMI },
2992 { 0x11052, 30, EVAS_SCRIPT_BRAHMI },
2993 { 0x11080, 66, EVAS_SCRIPT_KAITHI },
2994 { 0x12000, 879, EVAS_SCRIPT_CUNEIFORM },
2995 { 0x12400, 99, EVAS_SCRIPT_CUNEIFORM },
2996 { 0x12470, 4, EVAS_SCRIPT_CUNEIFORM },
2997 { 0x13000, 1071, EVAS_SCRIPT_EGYPTIAN_HIEROGLYPHS },
2998 { 0x16800, 569, EVAS_SCRIPT_BAMUM },
2999 { 0x1b000, 1, EVAS_SCRIPT_KATAKANA },
3000 { 0x1b001, 1, EVAS_SCRIPT_HIRAGANA },
3001 { 0x1d000, 246, EVAS_SCRIPT_COMMON },
3002 { 0x1d100, 39, EVAS_SCRIPT_COMMON },
3003 { 0x1d129, 62, EVAS_SCRIPT_COMMON },
3004 { 0x1d167, 3, EVAS_SCRIPT_INHERITED },
3005 { 0x1d16a, 17, EVAS_SCRIPT_COMMON },
3006 { 0x1d17b, 8, EVAS_SCRIPT_INHERITED },
3007 { 0x1d183, 2, EVAS_SCRIPT_COMMON },
3008 { 0x1d185, 7, EVAS_SCRIPT_INHERITED },
3009 { 0x1d18c, 30, EVAS_SCRIPT_COMMON },
3010 { 0x1d1aa, 4, EVAS_SCRIPT_INHERITED },
3011 { 0x1d1ae, 48, EVAS_SCRIPT_COMMON },
3012 { 0x1d200, 70, EVAS_SCRIPT_GREEK },
3013 { 0x1d300, 87, EVAS_SCRIPT_COMMON },
3014 { 0x1d360, 18, EVAS_SCRIPT_COMMON },
3015 { 0x1d400, 85, EVAS_SCRIPT_COMMON },
3016 { 0x1d456, 71, EVAS_SCRIPT_COMMON },
3017 { 0x1d49e, 2, EVAS_SCRIPT_COMMON },
3018 { 0x1d4a2, 1, EVAS_SCRIPT_COMMON },
3019 { 0x1d4a5, 2, EVAS_SCRIPT_COMMON },
3020 { 0x1d4a9, 4, EVAS_SCRIPT_COMMON },
3021 { 0x1d4ae, 12, EVAS_SCRIPT_COMMON },
3022 { 0x1d4bb, 1, EVAS_SCRIPT_COMMON },
3023 { 0x1d4bd, 7, EVAS_SCRIPT_COMMON },
3024 { 0x1d4c5, 65, EVAS_SCRIPT_COMMON },
3025 { 0x1d507, 4, EVAS_SCRIPT_COMMON },
3026 { 0x1d50d, 8, EVAS_SCRIPT_COMMON },
3027 { 0x1d516, 7, EVAS_SCRIPT_COMMON },
3028 { 0x1d51e, 28, EVAS_SCRIPT_COMMON },
3029 { 0x1d53b, 4, EVAS_SCRIPT_COMMON },
3030 { 0x1d540, 5, EVAS_SCRIPT_COMMON },
3031 { 0x1d546, 1, EVAS_SCRIPT_COMMON },
3032 { 0x1d54a, 7, EVAS_SCRIPT_COMMON },
3033 { 0x1d552, 340, EVAS_SCRIPT_COMMON },
3034 { 0x1d6a8, 292, EVAS_SCRIPT_COMMON },
3035 { 0x1d7ce, 50, EVAS_SCRIPT_COMMON },
3036 { 0x1f000, 44, EVAS_SCRIPT_COMMON },
3037 { 0x1f030, 100, EVAS_SCRIPT_COMMON },
3038 { 0x1f0a0, 15, EVAS_SCRIPT_COMMON },
3039 { 0x1f0b1, 14, EVAS_SCRIPT_COMMON },
3040 { 0x1f0c1, 15, EVAS_SCRIPT_COMMON },
3041 { 0x1f0d1, 15, EVAS_SCRIPT_COMMON },
3042 { 0x1f100, 11, EVAS_SCRIPT_COMMON },
3043 { 0x1f110, 31, EVAS_SCRIPT_COMMON },
3044 { 0x1f130, 58, EVAS_SCRIPT_COMMON },
3045 { 0x1f170, 43, EVAS_SCRIPT_COMMON },
3046 { 0x1f1e6, 26, EVAS_SCRIPT_COMMON },
3047 { 0x1f200, 1, EVAS_SCRIPT_HIRAGANA },
3048 { 0x1f201, 2, EVAS_SCRIPT_COMMON },
3049 { 0x1f210, 43, EVAS_SCRIPT_COMMON },
3050 { 0x1f240, 9, EVAS_SCRIPT_COMMON },
3051 { 0x1f250, 2, EVAS_SCRIPT_COMMON },
3052 { 0x1f300, 33, EVAS_SCRIPT_COMMON },
3053 { 0x1f330, 6, EVAS_SCRIPT_COMMON },
3054 { 0x1f337, 70, EVAS_SCRIPT_COMMON },
3055 { 0x1f380, 20, EVAS_SCRIPT_COMMON },
3056 { 0x1f3a0, 37, EVAS_SCRIPT_COMMON },
3057 { 0x1f3c6, 5, EVAS_SCRIPT_COMMON },
3058 { 0x1f3e0, 17, EVAS_SCRIPT_COMMON },
3059 { 0x1f400, 63, EVAS_SCRIPT_COMMON },
3060 { 0x1f440, 1, EVAS_SCRIPT_COMMON },
3061 { 0x1f442, 182, EVAS_SCRIPT_COMMON },
3062 { 0x1f4f9, 4, EVAS_SCRIPT_COMMON },
3063 { 0x1f500, 62, EVAS_SCRIPT_COMMON },
3064 { 0x1f550, 24, EVAS_SCRIPT_COMMON },
3065 { 0x1f5fb, 5, EVAS_SCRIPT_COMMON },
3066 { 0x1f601, 16, EVAS_SCRIPT_COMMON },
3067 { 0x1f612, 3, EVAS_SCRIPT_COMMON },
3068 { 0x1f616, 1, EVAS_SCRIPT_COMMON },
3069 { 0x1f618, 1, EVAS_SCRIPT_COMMON },
3070 { 0x1f61a, 1, EVAS_SCRIPT_COMMON },
3071 { 0x1f61c, 3, EVAS_SCRIPT_COMMON },
3072 { 0x1f620, 6, EVAS_SCRIPT_COMMON },
3073 { 0x1f628, 4, EVAS_SCRIPT_COMMON },
3074 { 0x1f62d, 1, EVAS_SCRIPT_COMMON },
3075 { 0x1f630, 4, EVAS_SCRIPT_COMMON },
3076 { 0x1f635, 12, EVAS_SCRIPT_COMMON },
3077 { 0x1f645, 11, EVAS_SCRIPT_COMMON },
3078 { 0x1f680, 70, EVAS_SCRIPT_COMMON },
3079 { 0x1f700, 116, EVAS_SCRIPT_COMMON },
3080 { 0x20000, 42711, EVAS_SCRIPT_HAN },
3081 { 0x2a700, 4149, EVAS_SCRIPT_HAN },
3082 { 0x2b740, 222, EVAS_SCRIPT_HAN },
3083 { 0x2f800, 542, EVAS_SCRIPT_HAN },
3084 { 0xe0001, 1, EVAS_SCRIPT_COMMON },
3085 { 0xe0020, 96, EVAS_SCRIPT_COMMON },
3086 { 0xe0100, 240, EVAS_SCRIPT_INHERITED },
3087};
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 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir)/src/lib/include \
8@FREETYPE_CFLAGS@ \
9@PIXMAN_CFLAGS@ \
10@VALGRIND_CFLAGS@ \
11@EINA_CFLAGS@ \
12@EET_CFLAGS@ \
13@pthread_cflags@
14
15noinst_LTLIBRARIES = libevas_engine_common_16.la
16
17libevas_engine_common_16_la_SOURCES = \
18evas_soft16_dither_mask.c \
19evas_soft16_font.c \
20evas_soft16_image_scaled_sampled.c \
21evas_soft16_image_unscaled.c \
22evas_soft16_main.c \
23evas_soft16_rectangle.c \
24evas_soft16_line.c \
25evas_soft16_polygon.c
26
27libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h
28
29EXTRA_DIST = \
30evas_soft16_point_blend.c \
31evas_soft16_scanline_blend.c \
32evas_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common_16
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_engine_common_16_la_LIBADD =
61am_libevas_engine_common_16_la_OBJECTS = evas_soft16_dither_mask.lo \
62 evas_soft16_font.lo evas_soft16_image_scaled_sampled.lo \
63 evas_soft16_image_unscaled.lo evas_soft16_main.lo \
64 evas_soft16_rectangle.lo evas_soft16_line.lo \
65 evas_soft16_polygon.lo
66libevas_engine_common_16_la_OBJECTS = \
67 $(am_libevas_engine_common_16_la_OBJECTS)
68AM_V_lt = $(am__v_lt_$(V))
69am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
70am__v_lt_0 = --silent
71DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
72depcomp = $(SHELL) $(top_srcdir)/depcomp
73am__depfiles_maybe = depfiles
74am__mv = mv -f
75COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
76 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
77LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
78 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
79 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
80 $(AM_CFLAGS) $(CFLAGS)
81AM_V_CC = $(am__v_CC_$(V))
82am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
83am__v_CC_0 = @echo " CC " $@;
84AM_V_at = $(am__v_at_$(V))
85am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
86am__v_at_0 = @
87CCLD = $(CC)
88LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
89 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
90 $(AM_LDFLAGS) $(LDFLAGS) -o $@
91AM_V_CCLD = $(am__v_CCLD_$(V))
92am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
93am__v_CCLD_0 = @echo " CCLD " $@;
94AM_V_GEN = $(am__v_GEN_$(V))
95am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
96am__v_GEN_0 = @echo " GEN " $@;
97SOURCES = $(libevas_engine_common_16_la_SOURCES)
98DIST_SOURCES = $(libevas_engine_common_16_la_SOURCES)
99ETAGS = etags
100CTAGS = ctags
101DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
102ACLOCAL = @ACLOCAL@
103ALLOCA = @ALLOCA@
104AMTAR = @AMTAR@
105AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
106AR = @AR@
107AS = @AS@
108AUTOCONF = @AUTOCONF@
109AUTOHEADER = @AUTOHEADER@
110AUTOMAKE = @AUTOMAKE@
111AWK = @AWK@
112CC = @CC@
113CCDEPMODE = @CCDEPMODE@
114CFLAGS = @CFLAGS@
115CHECK_CFLAGS = @CHECK_CFLAGS@
116CHECK_LIBS = @CHECK_LIBS@
117CPP = @CPP@
118CPPFLAGS = @CPPFLAGS@
119CXX = @CXX@
120CXXCPP = @CXXCPP@
121CXXDEPMODE = @CXXDEPMODE@
122CXXFLAGS = @CXXFLAGS@
123CYGPATH_W = @CYGPATH_W@
124DEFS = @DEFS@
125DEPDIR = @DEPDIR@
126DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
127DIRECTFB_LIBS = @DIRECTFB_LIBS@
128DLLTOOL = @DLLTOOL@
129DSYMUTIL = @DSYMUTIL@
130DUMPBIN = @DUMPBIN@
131ECHO_C = @ECHO_C@
132ECHO_N = @ECHO_N@
133ECHO_T = @ECHO_T@
134ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
135ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
136EDB_CFLAGS = @EDB_CFLAGS@
137EDB_LIBS = @EDB_LIBS@
138EDJE_CFLAGS = @EDJE_CFLAGS@
139EDJE_LIBS = @EDJE_LIBS@
140EET_CFLAGS = @EET_CFLAGS@
141EET_LIBS = @EET_LIBS@
142EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
143EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
144EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
145EGREP = @EGREP@
146EINA_CFLAGS = @EINA_CFLAGS@
147EINA_LIBS = @EINA_LIBS@
148EVAS_CFLAGS = @EVAS_CFLAGS@
149EVAS_LIBS = @EVAS_LIBS@
150EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
151EVIL_CFLAGS = @EVIL_CFLAGS@
152EVIL_LIBS = @EVIL_LIBS@
153EXEEXT = @EXEEXT@
154EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
155EXOTIC_LIBS = @EXOTIC_LIBS@
156FGREP = @FGREP@
157FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
158FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
159FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
160FREETYPE_LIBS = @FREETYPE_LIBS@
161FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
162FRIBIDI_LIBS = @FRIBIDI_LIBS@
163GL_EET_CFLAGS = @GL_EET_CFLAGS@
164GL_EET_LIBS = @GL_EET_LIBS@
165GREP = @GREP@
166HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
167HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
168INSTALL = @INSTALL@
169INSTALL_DATA = @INSTALL_DATA@
170INSTALL_PROGRAM = @INSTALL_PROGRAM@
171INSTALL_SCRIPT = @INSTALL_SCRIPT@
172INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
173LD = @LD@
174LDFLAGS = @LDFLAGS@
175LIBOBJS = @LIBOBJS@
176LIBS = @LIBS@
177LIBTOOL = @LIBTOOL@
178LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
179LINEBREAK_LIBS = @LINEBREAK_LIBS@
180LIPO = @LIPO@
181LN_S = @LN_S@
182LTLIBOBJS = @LTLIBOBJS@
183MAKEINFO = @MAKEINFO@
184MKDIR_P = @MKDIR_P@
185MODULE_ARCH = @MODULE_ARCH@
186NM = @NM@
187NMEDIT = @NMEDIT@
188OBJC = @OBJC@
189OBJCDEPMODE = @OBJCDEPMODE@
190OBJCFLAGS = @OBJCFLAGS@
191OBJDUMP = @OBJDUMP@
192OBJEXT = @OBJEXT@
193OTOOL = @OTOOL@
194OTOOL64 = @OTOOL64@
195PACKAGE = @PACKAGE@
196PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
197PACKAGE_NAME = @PACKAGE_NAME@
198PACKAGE_STRING = @PACKAGE_STRING@
199PACKAGE_TARNAME = @PACKAGE_TARNAME@
200PACKAGE_URL = @PACKAGE_URL@
201PACKAGE_VERSION = @PACKAGE_VERSION@
202PATH_SEPARATOR = @PATH_SEPARATOR@
203PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
204PIXMAN_LIBS = @PIXMAN_LIBS@
205PKG_CONFIG = @PKG_CONFIG@
206PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
207PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
208PNG_CFLAGS = @PNG_CFLAGS@
209PNG_LIBS = @PNG_LIBS@
210RANLIB = @RANLIB@
211SDL_CFLAGS = @SDL_CFLAGS@
212SDL_LIBS = @SDL_LIBS@
213SED = @SED@
214SET_MAKE = @SET_MAKE@
215SHELL = @SHELL@
216SHM_OPEN_LINK = @SHM_OPEN_LINK@
217STRIP = @STRIP@
218SVG_CFLAGS = @SVG_CFLAGS@
219SVG_LIBS = @SVG_LIBS@
220VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
221VALGRIND_LIBS = @VALGRIND_LIBS@
222VERSION = @VERSION@
223VMAJ = @VMAJ@
224WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
225WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
226XCB_CFLAGS = @XCB_CFLAGS@
227XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
228XCB_GL_LIBS = @XCB_GL_LIBS@
229XCB_LIBS = @XCB_LIBS@
230XEXT_CFLAGS = @XEXT_CFLAGS@
231XEXT_LIBS = @XEXT_LIBS@
232XMKMF = @XMKMF@
233X_CFLAGS = @X_CFLAGS@
234X_EXTRA_LIBS = @X_EXTRA_LIBS@
235X_LIBS = @X_LIBS@
236X_PRE_LIBS = @X_PRE_LIBS@
237abs_builddir = @abs_builddir@
238abs_srcdir = @abs_srcdir@
239abs_top_builddir = @abs_top_builddir@
240abs_top_srcdir = @abs_top_srcdir@
241ac_ct_CC = @ac_ct_CC@
242ac_ct_CXX = @ac_ct_CXX@
243ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
244ac_ct_OBJC = @ac_ct_OBJC@
245altivec_cflags = @altivec_cflags@
246am__include = @am__include@
247am__leading_dot = @am__leading_dot@
248am__quote = @am__quote@
249am__tar = @am__tar@
250am__untar = @am__untar@
251bindir = @bindir@
252build = @build@
253build_alias = @build_alias@
254build_cpu = @build_cpu@
255build_os = @build_os@
256build_vendor = @build_vendor@
257builddir = @builddir@
258datadir = @datadir@
259datarootdir = @datarootdir@
260dlopen_libs = @dlopen_libs@
261docdir = @docdir@
262dvidir = @dvidir@
263edje_cc = @edje_cc@
264efl_doxygen = @efl_doxygen@
265efl_have_doxygen = @efl_have_doxygen@
266evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
267evas_engine_buffer_libs = @evas_engine_buffer_libs@
268evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
269evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
270evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
271evas_engine_directfb_libs = @evas_engine_directfb_libs@
272evas_engine_fb_cflags = @evas_engine_fb_cflags@
273evas_engine_fb_libs = @evas_engine_fb_libs@
274evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
275evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
276evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
277evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
278evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
279evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
280evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
281evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
282evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
283evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
284evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
285evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
286evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
287evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
288evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
289evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
290evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
291evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
292evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
293evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
294evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
295evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
296evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
297evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
298evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
299evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
300evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
301evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
302evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
303evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
304evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
305evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
306evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
307evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
308evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
309evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
310evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
311evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
312evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
313evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
314evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
315evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
316evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
317evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
318evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
319evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
320evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
321evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
322evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
323evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
324evas_image_loader_png_libs = @evas_image_loader_png_libs@
325evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
326evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
327evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
328evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
329evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
330evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
331evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
332evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
333evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
334evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
335evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
336evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
337exec_prefix = @exec_prefix@
338have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
339have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
340have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
341have_evas_engine_software_x11 = @have_evas_engine_software_x11@
342have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
343have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
344have_lcov = @have_lcov@
345host = @host@
346host_alias = @host_alias@
347host_cpu = @host_cpu@
348host_os = @host_os@
349host_vendor = @host_vendor@
350htmldir = @htmldir@
351includedir = @includedir@
352infodir = @infodir@
353install_sh = @install_sh@
354libdir = @libdir@
355libexecdir = @libexecdir@
356localedir = @localedir@
357localstatedir = @localstatedir@
358lt_ECHO = @lt_ECHO@
359lt_enable_auto_import = @lt_enable_auto_import@
360mandir = @mandir@
361mkdir_p = @mkdir_p@
362oldincludedir = @oldincludedir@
363pdfdir = @pdfdir@
364pkgconfig_requires_private = @pkgconfig_requires_private@
365prefix = @prefix@
366program_transform_name = @program_transform_name@
367psdir = @psdir@
368pthread_cflags = @pthread_cflags@
369pthread_libs = @pthread_libs@
370release_info = @release_info@
371requirement_evas = @requirement_evas@
372sbindir = @sbindir@
373sharedstatedir = @sharedstatedir@
374srcdir = @srcdir@
375sysconfdir = @sysconfdir@
376target_alias = @target_alias@
377top_build_prefix = @top_build_prefix@
378top_builddir = @top_builddir@
379top_srcdir = @top_srcdir@
380version_info = @version_info@
381MAINTAINERCLEANFILES = Makefile.in
382AM_CPPFLAGS = \
383-I. \
384-I$(top_srcdir)/src/lib \
385-I$(top_srcdir)/src/lib/include \
386@FREETYPE_CFLAGS@ \
387@PIXMAN_CFLAGS@ \
388@VALGRIND_CFLAGS@ \
389@EINA_CFLAGS@ \
390@EET_CFLAGS@ \
391@pthread_cflags@
392
393noinst_LTLIBRARIES = libevas_engine_common_16.la
394libevas_engine_common_16_la_SOURCES = \
395evas_soft16_dither_mask.c \
396evas_soft16_font.c \
397evas_soft16_image_scaled_sampled.c \
398evas_soft16_image_unscaled.c \
399evas_soft16_main.c \
400evas_soft16_rectangle.c \
401evas_soft16_line.c \
402evas_soft16_polygon.c
403
404libevas_engine_common_16_la_DEPENDENCIES = $(top_builddir)/config.h
405EXTRA_DIST = \
406evas_soft16_point_blend.c \
407evas_soft16_scanline_blend.c \
408evas_soft16_scanline_fill.c
409
410all: all-am
411
412.SUFFIXES:
413.SUFFIXES: .c .lo .o .obj
414$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
415 @for dep in $?; do \
416 case '$(am__configure_deps)' in \
417 *$$dep*) \
418 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
419 && { if test -f $@; then exit 0; else break; fi; }; \
420 exit 1;; \
421 esac; \
422 done; \
423 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile'; \
424 $(am__cd) $(top_srcdir) && \
425 $(AUTOMAKE) --gnu src/lib/engines/common_16/Makefile
426.PRECIOUS: Makefile
427Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
428 @case '$?' in \
429 *config.status*) \
430 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
431 *) \
432 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
433 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
434 esac;
435
436$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
437 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
438
439$(top_srcdir)/configure: $(am__configure_deps)
440 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
441$(ACLOCAL_M4): $(am__aclocal_m4_deps)
442 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
443$(am__aclocal_m4_deps):
444
445clean-noinstLTLIBRARIES:
446 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
447 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
448 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
449 test "$$dir" != "$$p" || dir=.; \
450 echo "rm -f \"$${dir}/so_locations\""; \
451 rm -f "$${dir}/so_locations"; \
452 done
453libevas_engine_common_16.la: $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_DEPENDENCIES)
454 $(AM_V_CCLD)$(LINK) $(libevas_engine_common_16_la_OBJECTS) $(libevas_engine_common_16_la_LIBADD) $(LIBS)
455
456mostlyclean-compile:
457 -rm -f *.$(OBJEXT)
458
459distclean-compile:
460 -rm -f *.tab.c
461
462@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_dither_mask.Plo@am__quote@
463@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_font.Plo@am__quote@
464@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_scaled_sampled.Plo@am__quote@
465@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_image_unscaled.Plo@am__quote@
466@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_line.Plo@am__quote@
467@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_main.Plo@am__quote@
468@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_polygon.Plo@am__quote@
469@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft16_rectangle.Plo@am__quote@
470
471.c.o:
472@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
473@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
474@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
475@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
476@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
477@am__fastdepCC_FALSE@ $(COMPILE) -c $<
478
479.c.obj:
480@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
481@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
482@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
483@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
484@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
485@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
486
487.c.lo:
488@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
489@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
490@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
491@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
492@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
493@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
494
495mostlyclean-libtool:
496 -rm -f *.lo
497
498clean-libtool:
499 -rm -rf .libs _libs
500
501ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
502 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
503 unique=`for i in $$list; do \
504 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
505 done | \
506 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
507 END { if (nonempty) { for (i in files) print i; }; }'`; \
508 mkid -fID $$unique
509tags: TAGS
510
511TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
512 $(TAGS_FILES) $(LISP)
513 set x; \
514 here=`pwd`; \
515 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
516 unique=`for i in $$list; do \
517 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
518 done | \
519 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
520 END { if (nonempty) { for (i in files) print i; }; }'`; \
521 shift; \
522 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
523 test -n "$$unique" || unique=$$empty_fix; \
524 if test $$# -gt 0; then \
525 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
526 "$$@" $$unique; \
527 else \
528 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
529 $$unique; \
530 fi; \
531 fi
532ctags: CTAGS
533CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
534 $(TAGS_FILES) $(LISP)
535 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
536 unique=`for i in $$list; do \
537 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
538 done | \
539 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
540 END { if (nonempty) { for (i in files) print i; }; }'`; \
541 test -z "$(CTAGS_ARGS)$$unique" \
542 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
543 $$unique
544
545GTAGS:
546 here=`$(am__cd) $(top_builddir) && pwd` \
547 && $(am__cd) $(top_srcdir) \
548 && gtags -i $(GTAGS_ARGS) "$$here"
549
550distclean-tags:
551 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
552
553distdir: $(DISTFILES)
554 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
555 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
556 list='$(DISTFILES)'; \
557 dist_files=`for file in $$list; do echo $$file; done | \
558 sed -e "s|^$$srcdirstrip/||;t" \
559 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
560 case $$dist_files in \
561 */*) $(MKDIR_P) `echo "$$dist_files" | \
562 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
563 sort -u` ;; \
564 esac; \
565 for file in $$dist_files; do \
566 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
567 if test -d $$d/$$file; then \
568 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
569 if test -d "$(distdir)/$$file"; then \
570 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
571 fi; \
572 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
573 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
574 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
575 fi; \
576 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
577 else \
578 test -f "$(distdir)/$$file" \
579 || cp -p $$d/$$file "$(distdir)/$$file" \
580 || exit 1; \
581 fi; \
582 done
583check-am: all-am
584check: check-am
585all-am: Makefile $(LTLIBRARIES)
586installdirs:
587install: install-am
588install-exec: install-exec-am
589install-data: install-data-am
590uninstall: uninstall-am
591
592install-am: all-am
593 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
594
595installcheck: installcheck-am
596install-strip:
597 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
598 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
599 `test -z '$(STRIP)' || \
600 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
601mostlyclean-generic:
602
603clean-generic:
604
605distclean-generic:
606 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
607 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
608
609maintainer-clean-generic:
610 @echo "This command is intended for maintainers to use"
611 @echo "it deletes files that may require special tools to rebuild."
612 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
613clean: clean-am
614
615clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
616 mostlyclean-am
617
618distclean: distclean-am
619 -rm -rf ./$(DEPDIR)
620 -rm -f Makefile
621distclean-am: clean-am distclean-compile distclean-generic \
622 distclean-tags
623
624dvi: dvi-am
625
626dvi-am:
627
628html: html-am
629
630html-am:
631
632info: info-am
633
634info-am:
635
636install-data-am:
637
638install-dvi: install-dvi-am
639
640install-dvi-am:
641
642install-exec-am:
643
644install-html: install-html-am
645
646install-html-am:
647
648install-info: install-info-am
649
650install-info-am:
651
652install-man:
653
654install-pdf: install-pdf-am
655
656install-pdf-am:
657
658install-ps: install-ps-am
659
660install-ps-am:
661
662installcheck-am:
663
664maintainer-clean: maintainer-clean-am
665 -rm -rf ./$(DEPDIR)
666 -rm -f Makefile
667maintainer-clean-am: distclean-am maintainer-clean-generic
668
669mostlyclean: mostlyclean-am
670
671mostlyclean-am: mostlyclean-compile mostlyclean-generic \
672 mostlyclean-libtool
673
674pdf: pdf-am
675
676pdf-am:
677
678ps: ps-am
679
680ps-am:
681
682uninstall-am:
683
684.MAKE: install-am install-strip
685
686.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
687 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
688 distclean-compile distclean-generic distclean-libtool \
689 distclean-tags distdir dvi dvi-am html html-am info info-am \
690 install install-am install-data install-data-am install-dvi \
691 install-dvi-am install-exec install-exec-am install-html \
692 install-html-am install-info install-info-am install-man \
693 install-pdf install-pdf-am install-ps install-ps-am \
694 install-strip installcheck installcheck-am installdirs \
695 maintainer-clean maintainer-clean-generic mostlyclean \
696 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
697 pdf pdf-am ps ps-am tags uninstall uninstall-am
698
699
700# Tell versions [3.59,3.63) of GNU make to not export all variables.
701# Otherwise a system limit (for SysV at least) may be exceeded.
702.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 @@
1#include "evas_common_soft16.h"
2
3#define S16_DM_SIZE 128
4#define S16_DM_BITS 6
5#define S16_DM_DIV 64
6#define S16_DM_MSK (S16_DM_SIZE - 1)
7#define S16_DM_SHF(_b) (S16_DM_BITS - (8 - _b))
8
9static const DATA8 dither_table[S16_DM_SIZE][S16_DM_SIZE] =
10{
11 { 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 },
12 { 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 },
13 { 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 },
14 { 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 },
15 { 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 },
16 { 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 },
17 { 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 },
18 { 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 },
19 { 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 },
20 { 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 },
21 { 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 },
22 { 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 },
23 { 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 },
24 { 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 },
25 { 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 },
26 { 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 },
27 { 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 },
28 { 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 },
29 { 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 },
30 { 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 },
31 { 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 },
32 { 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 },
33 { 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 },
34 { 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 },
35 { 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 },
36 { 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 },
37 { 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 },
38 { 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 },
39 { 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 },
40 { 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 },
41 { 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 { 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 },
43 { 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 },
44 { 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 },
45 { 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 },
46 { 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 },
47 { 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 },
48 { 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 },
49 { 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 },
50 { 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 },
51 { 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 },
52 { 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 },
53 { 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 },
54 { 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 },
55 { 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 },
56 { 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 },
57 { 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 },
58 { 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 },
59 { 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 },
60 { 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 },
61 { 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 },
62 { 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 },
63 { 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 },
64 { 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 },
65 { 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 },
66 { 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 },
67 { 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 },
68 { 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 },
69 { 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 },
70 { 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 },
71 { 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 },
72 { 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 },
73 { 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 },
74 { 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 },
75 { 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 },
76 { 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 },
77 { 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 },
78 { 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 },
79 { 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 },
80 { 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 },
81 { 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 },
82 { 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 },
83 { 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 },
84 { 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 },
85 { 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 },
86 { 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 },
87 { 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 },
88 { 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 },
89 { 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 },
90 { 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 },
91 { 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 },
92 { 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 },
93 { 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 },
94 { 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 },
95 { 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 },
96 { 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 },
97 { 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 },
98 { 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 },
99 { 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 },
100 { 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 },
101 { 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 },
102 { 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 },
103 { 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 },
104 { 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 },
105 { 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 },
106 { 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 },
107 { 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 },
108 { 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 },
109 { 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 },
110 { 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 },
111 { 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 },
112 { 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 },
113 { 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 },
114 { 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 },
115 { 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 },
116 { 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 },
117 { 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 },
118 { 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 },
119 { 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 },
120 { 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 },
121 { 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 },
122 { 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 },
123 { 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 },
124 { 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 },
125 { 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 },
126 { 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 },
127 { 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 },
128 { 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 },
129 { 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 },
130 { 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 },
131 { 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 },
132 { 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 },
133 { 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 },
134 { 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 },
135 { 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 },
136 { 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 },
137 { 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 },
138 { 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 }
139};
140
141EFL_ALWAYS_INLINE void
142_soft16_convert_from_rgba_pt(const DATA32 *src, DATA16 *dst, DATA8 *alpha,
143 const int x, const int y)
144{
145 DATA8 orig_r, orig_g, orig_b, orig_a;
146
147 orig_r = R_VAL(src);
148 orig_g = G_VAL(src);
149 orig_b = B_VAL(src);
150 orig_a = A_VAL(src);
151
152 if (orig_a == 255)
153 {
154 DATA8 dith5, dith6, dith, r, g, b;
155
156 dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK];
157 dith5 = dith >> S16_DM_SHF(5);
158 dith6 = dith >> S16_DM_SHF(6);
159
160 r = orig_r >> 3;
161 g = orig_g >> 2;
162 b = orig_b >> 3;
163
164 if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++;
165 if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++;
166 if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++;
167
168 *dst = (r << 11) | (g << 5) | b;
169 *alpha = 31;
170 }
171 else if (orig_a == 0)
172 {
173 *dst = 0;
174 *alpha = 0;
175 }
176 else
177 {
178 DATA8 r, g, b, a;
179 r = orig_r >> 3;
180 g = orig_g >> 2;
181 b = orig_b >> 3;
182 a = (orig_a >> 3) + 1;
183
184 *dst = (r << 11) | (g << 5) | b;
185 *alpha = a;
186 }
187}
188
189static inline void
190_soft16_convert_from_rgba_scanline(const DATA32 *src, DATA16 *dst,
191 DATA8 *alpha, const int y, const int w)
192{
193 int x, m;
194
195 m = (w & ~7);
196 x = 0;
197 pld(src, 0);
198
199 while (x < m)
200 {
201 pld(src, 32);
202 UNROLL8({
203 _soft16_convert_from_rgba_pt(src, dst, alpha, x, y);
204 src++;
205 dst++;
206 alpha++;
207 x++;
208 });
209 }
210
211 for (; x < w; x++, src++, dst++, alpha++)
212 _soft16_convert_from_rgba_pt(src, dst, alpha, x, y);
213}
214
215void
216evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
217{
218 const DATA32 *sp;
219 DATA16 *dp;
220 DATA8 *ap;
221 unsigned int y;
222
223 sp = src;
224 dp = im->pixels;
225 ap = im->alpha;
226
227 for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride)
228 _soft16_convert_from_rgba_scanline(sp, dp, ap, y, im->cache_entry.w);
229}
230
231EFL_ALWAYS_INLINE void
232_soft16_convert_from_rgb_pt(const DATA32 *src, DATA16 *dst,
233 const int x, const int y)
234{
235 DATA8 orig_r, orig_g, orig_b, r, g, b, dith5, dith6, dith;
236
237 orig_r = R_VAL(src);
238 orig_g = G_VAL(src);
239 orig_b = B_VAL(src);
240
241 r = orig_r >> 3;
242 g = orig_g >> 2;
243 b = orig_b >> 3;
244
245 dith = dither_table[x & S16_DM_MSK][y & S16_DM_MSK];
246 dith5 = dith >> S16_DM_SHF(5);
247 dith6 = dith >> S16_DM_SHF(6);
248
249 if (((orig_r - (r << 3)) >= dith5) && (r < 0x1f)) r++;
250 if (((orig_g - (g << 2)) >= dith6) && (g < 0x3f)) g++;
251 if (((orig_b - (b << 3)) >= dith5) && (b < 0x1f)) b++;
252
253 *dst = (r << 11) | (g << 5) | b;
254}
255
256static inline void
257_soft16_convert_from_rgb_scanline(const DATA32 *src, DATA16 *dst, const int y,
258 const int w)
259{
260 int x, m;
261
262 m = (w & ~7);
263 x = 0;
264 pld(src, 0);
265
266 while (x < m)
267 {
268 pld(src, 32);
269 UNROLL8({
270 _soft16_convert_from_rgb_pt(src, dst, x, y);
271 src++;
272 dst++;
273 x++;
274 });
275 }
276
277 for (; x < w; x++, src++, dst++)
278 _soft16_convert_from_rgb_pt(src, dst, x, y);
279}
280
281void
282evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src)
283{
284 const DATA32 *sp;
285 DATA16 *dp;
286 unsigned int y;
287
288 sp = src;
289 dp = im->pixels;
290
291 for (y = 0; y < im->cache_entry.h; y++, sp += im->cache_entry.w, dp += im->stride)
292 _soft16_convert_from_rgb_scanline(sp, dp, y, im->cache_entry.w);
293}
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 @@
1#include "evas_common_soft16.h"
2
3EFL_ALWAYS_INLINE void
4_glyph_pt_mask_solid_solid(DATA16 *dst,
5 const DATA16 rgb565,
6 const DATA32 rgb565_unpack,
7 const DATA8 *mask)
8{
9 DATA8 alpha = *mask >> 3;
10
11 if (alpha == 31) *dst = rgb565;
12 else if (alpha > 0)
13 {
14 DATA32 d;
15
16 d = RGB_565_UNPACK(*dst);
17 d = RGB_565_UNPACKED_BLEND_UNMUL(rgb565_unpack, d, alpha);
18 *dst = RGB_565_PACK(d);
19 }
20}
21
22static void
23_glyph_scanline_mask_solid_solid(DATA16 *dst,
24 int size,
25 const DATA16 rgb565,
26 const DATA32 rgb565_unpack,
27 const DATA8 *mask)
28{
29 DATA16 *start, *end;
30
31 start = dst;
32 pld(start, 0);
33 pld(mask, 0);
34 end = start + (size & ~3);
35
36 while (start < end)
37 {
38 pld(start, 16);
39 pld(mask, 4);
40 UNROLL4({
41 _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
42 start++;
43 mask++;
44 });
45 }
46
47 end = start + (size & 3);
48 for (; start < end; start++, mask++)
49 _glyph_pt_mask_solid_solid(start, rgb565, rgb565_unpack, mask);
50}
51
52EFL_ALWAYS_INLINE void
53_glyph_pt_mask_transp_solid(DATA16 *dst,
54 DATA32 rgb565_unpack,
55 DATA8 alpha,
56 const DATA8 *mask)
57{
58 DATA32 a, b;
59 int rel_alpha;
60
61 rel_alpha = *mask >> 3;
62 alpha = (alpha * rel_alpha) >> 5;
63 if (alpha == 0)
64 return;
65
66 alpha++;
67
68 a = ((rgb565_unpack * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK;
69 b = RGB_565_UNPACK(*dst);
70 b = RGB_565_UNPACKED_BLEND(a, b, alpha);
71 *dst = RGB_565_PACK(b);
72}
73
74static void
75_glyph_scanline_mask_transp_solid(DATA16 *dst,
76 int size,
77 const DATA32 rgb565_unpack,
78 const DATA8 rel_alpha,
79 const DATA8 *mask)
80{
81 DATA16 *start, *end;
82
83 start = dst;
84 pld(start, 0);
85 pld(mask, 0);
86 end = start + (size & ~3);
87
88 while (start < end)
89 {
90 pld(start, 16);
91 pld(mask, 4);
92 UNROLL4({
93 _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask);
94 start++;
95 mask++;
96 });
97 }
98
99 end = start + (size & 3);
100 for (; start < end; start++, mask++)
101 _glyph_pt_mask_transp_solid(start, rgb565_unpack, rel_alpha, mask);
102}
103
104static inline void
105_calc_ext(const Soft16_Image *dst, const RGBA_Draw_Context *dc,
106 Eina_Rectangle *ext)
107{
108 EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
109
110 if (dc->clip.use)
111 {
112 int v;
113
114 EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
115 if (ext->x < 0)
116 {
117 ext->w += ext->x;
118 ext->x = 0;
119 }
120 if (ext->y < 0)
121 {
122 ext->h += ext->y;
123 ext->y = 0;
124 }
125
126 v = dst->cache_entry.w - ext->x;
127 if (ext->w > v) ext->w = v;
128
129 v = dst->cache_entry.h - ext->y;
130 if (ext->h > v) ext->h = v;
131 }
132}
133
134static inline void
135_glyph_scanline(Soft16_Image *dst, const DATA8 *p_mask,
136 const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y,
137 int w, DATA8 alpha, const DATA16 rgb565,
138 const DATA32 rgb565_unpack)
139{
140 int size, in_x, in_w;
141 DATA16 *p_pixels;
142
143 if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y)) return;
144
145 in_x = 0;
146 in_w = 0;
147
148 if (dx + w > max_x) in_w += (dx + w) - max_x;
149
150 if (dx < ext.x)
151 {
152 in_w += ext.x - dx;
153 in_x = ext.x - dx;
154 dx = ext.x;
155 }
156
157 size = w - in_w;
158 p_pixels = dst->pixels + (dy * dst->stride) + dx;
159 p_mask += in_x;
160
161 if (size > 1)
162 {
163 if (alpha == 31)
164 _glyph_scanline_mask_solid_solid
165 (p_pixels, size, rgb565, rgb565_unpack, p_mask);
166 else if (alpha != 0)
167 _glyph_scanline_mask_transp_solid
168 (p_pixels, size, rgb565_unpack, alpha, p_mask);
169 }
170 else if (size == 1)
171 {
172 if (alpha == 31)
173 _glyph_pt_mask_solid_solid(p_pixels, rgb565, rgb565_unpack, p_mask);
174 else if (alpha != 0)
175 _glyph_pt_mask_transp_solid(p_pixels, rgb565_unpack, alpha, p_mask);
176 }
177}
178
179static void
180_soft16_font_glyph_draw_grayscale(Soft16_Image *dst,
181 RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__,
182 int x, int y, DATA8 alpha, DATA16 rgb565,
183 const Eina_Rectangle ext, int bw, int bh,
184 int bpitch, const DATA8 *bitmap)
185{
186 const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565);
187 int i, max_x, max_y;
188
189 max_x = ext.x + ext.w;
190 max_y = ext.y + ext.h;
191
192 for (i = 0; i < bh; i++, bitmap += bpitch)
193 _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw,
194 alpha, rgb565, rgb565_unpack);
195}
196
197static inline void
198_glyph_create_mask_line(DATA8 *mask, const DATA8 *bitmap, int w)
199{
200 const DATA8 bitrepl[2] = {0x0, 0xff};
201 int i;
202
203 for (i = 0; i < w; i += 8, bitmap++)
204 {
205 int j, size;
206 DATA32 bits;
207
208 if (i + 8 < w) size = 8;
209 else size = w - i;
210
211 bits = *bitmap;
212
213 for (j = size - 1; j >= 0; j--, mask++)
214 *mask = bitrepl[(bits >> j) & 0x1];
215 }
216}
217
218static void
219_soft16_font_glyph_draw_mono(Soft16_Image *dst,
220 RGBA_Draw_Context *dc __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__,
221 int x, int y, DATA8 alpha, DATA16 rgb565,
222 const Eina_Rectangle ext, int bw, int bh,
223 int bpitch, const DATA8 *bitmap)
224{
225 const DATA32 rgb565_unpack = RGB_565_UNPACK(rgb565);
226 DATA8 *mask;
227 int i, max_x, max_y;
228
229 max_x = ext.x + ext.w;
230 max_y = ext.y + ext.h;
231
232 mask = alloca(bpitch);
233 for (i = 0; i < bh; i++, bitmap += bpitch)
234 {
235 _glyph_create_mask_line(mask, bitmap, bw);
236 _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw,
237 alpha, rgb565, rgb565_unpack);
238 }
239}
240
241void
242evas_common_soft16_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
243 RGBA_Font_Glyph *fg, int x, int y)
244{
245 Soft16_Image *dst;
246 RGBA_Draw_Context *dc;
247 const DATA8 *bitmap;
248 DATA8 alpha, r, g, b;
249 DATA16 rgb565;
250 Eina_Rectangle ext;
251 int bpitch, bw, bh;
252
253 dst = data;
254 dc = context;
255
256 alpha = A_VAL(&dc->col.col) >> 3;
257 if (alpha == 0) return; /* precision is 5 bits, 3 bits lost */
258
259 r = R_VAL(&dc->col.col) >> 3;
260 g = G_VAL(&dc->col.col) >> 2;
261 b = B_VAL(&dc->col.col) >> 3;
262
263 if (r > alpha) r = alpha;
264 if (g > (alpha << 1)) g = (alpha << 1);
265 if (b > alpha) b = alpha;
266
267 rgb565 = (r << 11) | (g << 5) | b;
268
269 bitmap = fg->glyph_out->bitmap.buffer;
270 bh = fg->glyph_out->bitmap.rows;
271 bw = fg->glyph_out->bitmap.width;
272 bpitch = fg->glyph_out->bitmap.pitch;
273 if (bpitch < bw) bpitch = bw;
274
275 _calc_ext(dst, dc, &ext);
276
277 if ((fg->glyph_out->bitmap.num_grays == 256) &&
278 (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays))
279 _soft16_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, rgb565,
280 ext, bw, bh, bpitch, bitmap);
281 else
282 _soft16_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, rgb565,
283 ext, bw, bh, bpitch, bitmap);
284}
285
286void *
287evas_common_soft16_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph *fg __UNUSED__)
288{
289 return (void *)1; /* core requires != NULL to work */
290}
291
292void
293evas_common_soft16_font_glyph_free(void *ext_dat __UNUSED__)
294{
295}
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 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_point_blend.c"
3
4static void
5_soft16_image_draw_scaled_solid_solid(Soft16_Image *src,
6 Soft16_Image *dst,
7 RGBA_Draw_Context *dc __UNUSED__,
8 int dst_offset, int w, int h,
9 int *offset_x, int *offset_y)
10{
11 DATA16 *dst_itr;
12 int y, w_align;
13
14 w_align = w & ~7;
15
16 dst_itr = dst->pixels + dst_offset;
17 for (y = 0; y < h; y++, dst_itr += dst->stride)
18 {
19 DATA16 *d, *s;
20 int x;
21
22 s = src->pixels + offset_y[y];
23 pld(s, 0);
24 pld(offset_x, 0);
25
26 d = dst_itr;
27 x = 0;
28 while (x < w_align)
29 {
30 pld(s, 32);
31 pld(offset_x + x, 32);
32
33 UNROLL8({
34 _soft16_pt_blend_solid_solid(d, s[offset_x[x]]);
35 x++;
36 d++;
37 });
38 }
39
40 for (; x < w; x++, d++)
41 _soft16_pt_blend_solid_solid(d, s[offset_x[x]]);
42 }
43}
44static void
45_soft16_image_draw_scaled_transp_solid(Soft16_Image *src,
46 Soft16_Image *dst,
47 RGBA_Draw_Context *dc __UNUSED__,
48 int dst_offset, int w, int h,
49 int *offset_x, int *offset_y)
50{
51 DATA16 *dst_itr;
52 int y, w_align;
53
54 w_align = w & ~7;
55
56 dst_itr = dst->pixels + dst_offset;
57 for (y = 0; y < h; y++, dst_itr += dst->stride)
58 {
59 DATA16 *d, *s;
60 DATA8 *a;
61 int x;
62
63 s = src->pixels + offset_y[y];
64 a = src->alpha + offset_y[y];
65 pld(s, 0);
66 pld(a, 0);
67 pld(offset_x, 0);
68
69 d = dst_itr;
70 x = 0;
71 while (x < w_align)
72 {
73 pld(s, 32);
74 pld(a, 8);
75 pld(offset_x + x, 32);
76
77 UNROLL8({
78 int off_x = offset_x[x];
79 _soft16_pt_blend_transp_solid(d, s[off_x], a[off_x]);
80 x++;
81 d++;
82 });
83 }
84
85 for (; x < w; x++, d++)
86 _soft16_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]);
87 }
88}
89
90static inline void
91_soft16_image_draw_scaled_no_mul(Soft16_Image *src, Soft16_Image *dst,
92 RGBA_Draw_Context *dc,
93 int dst_offset, int w, int h,
94 int *offset_x, int *offset_y)
95{
96 if ((src->cache_entry.flags.alpha && src->alpha) &&
97 (!dst->cache_entry.flags.alpha))
98 _soft16_image_draw_scaled_transp_solid
99 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
100 else if (!dst->cache_entry.flags.alpha)
101 _soft16_image_draw_scaled_solid_solid
102 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
103 else
104 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
105 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
106 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
107}
108
109static void
110_soft16_image_draw_scaled_solid_solid_mul_alpha(Soft16_Image *src,
111 Soft16_Image *dst,
112 RGBA_Draw_Context *dc __UNUSED__,
113 int dst_offset, int w, int h,
114 int *offset_x, int *offset_y,
115 DATA8 alpha)
116{
117 DATA16 *dst_itr;
118 int y, w_align;
119
120 w_align = w & ~7;
121
122 dst_itr = dst->pixels + dst_offset;
123 for (y = 0; y < h; y++, dst_itr += dst->stride)
124 {
125 DATA16 *d, *s;
126 int x;
127
128 s = src->pixels + offset_y[y];
129 pld(s, 0);
130 pld(offset_x, 0);
131
132 d = dst_itr;
133 x = 0;
134 while (x < w_align)
135 {
136 pld(s, 32);
137 pld(offset_x + x, 32);
138
139 UNROLL8({
140 _soft16_pt_blend_solid_solid_mul_alpha
141 (d, s[offset_x[x]], alpha);
142 x++;
143 d++;
144 });
145 }
146
147 for (; x < w; x++, d++)
148 _soft16_pt_blend_solid_solid_mul_alpha
149 (d, s[offset_x[x]], alpha);
150 }
151}
152
153static void
154_soft16_image_draw_scaled_transp_solid_mul_alpha(Soft16_Image *src,
155 Soft16_Image *dst,
156 RGBA_Draw_Context *dc __UNUSED__,
157 int dst_offset, int w, int h,
158 int *offset_x, int *offset_y,
159 DATA8 alpha)
160{
161 DATA16 *dst_itr;
162 int y, w_align;
163
164 w_align = w & ~7;
165
166 dst_itr = dst->pixels + dst_offset;
167 for (y = 0; y < h; y++, dst_itr += dst->stride)
168 {
169 DATA16 *d, *s;
170 DATA8 *a;
171 int x;
172
173 s = src->pixels + offset_y[y];
174 a = src->alpha + offset_y[y];
175 pld(s, 0);
176 pld(a, 0);
177 pld(offset_x, 0);
178
179 d = dst_itr;
180 x = 0;
181 while (x < w_align)
182 {
183 pld(s, 32);
184 pld(a, 8);
185 pld(offset_x + x, 32);
186
187 UNROLL8({
188 int off_x = offset_x[x];
189 _soft16_pt_blend_transp_solid_mul_alpha
190 (d, s[off_x], a[off_x], alpha);
191 x++;
192 d++;
193 });
194 }
195
196 for (; x < w; x++, d++)
197 _soft16_pt_blend_transp_solid_mul_alpha
198 (d, s[offset_x[x]], a[offset_x[x]], alpha);
199 }
200}
201
202static inline void
203_soft16_image_draw_scaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst,
204 RGBA_Draw_Context *dc,
205 int dst_offset, int w, int h,
206 int *offset_x, int *offset_y, DATA8 a)
207{
208 if ((src->cache_entry.flags.alpha && src->alpha) &&
209 (!dst->cache_entry.flags.alpha))
210 _soft16_image_draw_scaled_transp_solid_mul_alpha
211 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
212 else if (!dst->cache_entry.flags.alpha)
213 _soft16_image_draw_scaled_solid_solid_mul_alpha
214 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
215 else
216 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
217 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
218 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
219}
220
221static void
222_soft16_image_draw_scaled_solid_solid_mul_color(Soft16_Image *src,
223 Soft16_Image *dst,
224 RGBA_Draw_Context *dc __UNUSED__,
225 int dst_offset, int w, int h,
226 int *offset_x, int *offset_y,
227 DATA8 r, DATA8 g, DATA8 b,
228 DATA8 alpha)
229{
230 DATA16 *dst_itr;
231 int y, w_align;
232
233 w_align = w & ~7;
234
235 dst_itr = dst->pixels + dst_offset;
236
237 if (alpha == 31)
238 for (y = 0; y < h; y++, dst_itr += dst->stride)
239 {
240 DATA16 *d, *s;
241 int x;
242
243 s = src->pixels + offset_y[y];
244 pld(s, 0);
245 pld(offset_x, 0);
246
247 d = dst_itr;
248 x = 0;
249 while (x < w_align)
250 {
251 pld(s, 32);
252 pld(offset_x + x, 32);
253
254 UNROLL8({
255 _soft16_pt_blend_solid_solid_mul_color_solid
256 (d, s[offset_x[x]], r, g, b);
257 x++;
258 d++;
259 });
260 }
261
262 for (; x < w; x++, d++)
263 _soft16_pt_blend_solid_solid_mul_color_solid
264 (d, s[offset_x[x]], r, g, b);
265 }
266 else
267 for (y = 0; y < h; y++, dst_itr += dst->stride)
268 {
269 DATA16 *d, *s;
270 int x;
271
272 s = src->pixels + offset_y[y];
273 pld(s, 0);
274 pld(offset_x, 0);
275
276 d = dst_itr;
277 x = 0;
278 while (x < w_align)
279 {
280 pld(s, 32);
281 pld(offset_x + x, 32);
282
283 UNROLL8({
284 _soft16_pt_blend_solid_solid_mul_color_transp
285 (d, s[offset_x[x]], alpha, r, g, b);
286 x++;
287 d++;
288 });
289 }
290
291 for (; x < w; x++, d++)
292 _soft16_pt_blend_solid_solid_mul_color_transp
293 (d, s[offset_x[x]], alpha, r, g, b);
294 }
295}
296
297static void
298_soft16_image_draw_scaled_transp_solid_mul_color(Soft16_Image *src,
299 Soft16_Image *dst,
300 RGBA_Draw_Context *dc __UNUSED__,
301 int dst_offset, int w, int h,
302 int *offset_x, int *offset_y,
303 DATA8 r, DATA8 g, DATA8 b,
304 DATA8 alpha)
305{
306 DATA16 *dst_itr;
307 int y, w_align;
308
309 w_align = w & ~7;
310
311 dst_itr = dst->pixels + dst_offset;
312
313 if (alpha == 31)
314 for (y = 0; y < h; y++, dst_itr += dst->stride)
315 {
316 DATA16 *d, *s;
317 DATA8 *a;
318 int x;
319
320 s = src->pixels + offset_y[y];
321 a = src->alpha + offset_y[y];
322 pld(s, 0);
323 pld(a, 0);
324 pld(offset_x, 0);
325
326 d = dst_itr;
327 x = 0;
328 while (x < w_align)
329 {
330 pld(s, 32);
331 pld(a, 8);
332 pld(offset_x + x, 32);
333
334 UNROLL8({
335 int off_x = offset_x[x];
336 _soft16_pt_blend_transp_solid_mul_color_solid
337 (d, s[off_x], a[off_x], r, g, b);
338 x++;
339 d++;
340 });
341 }
342
343 for (; x < w; x++, d++)
344 _soft16_pt_blend_transp_solid_mul_color_solid
345 (d, s[offset_x[x]], a[offset_x[x]], r, g, b);
346 }
347 else
348 for (y = 0; y < h; y++, dst_itr += dst->stride)
349 {
350 DATA16 *d, *s;
351 DATA8 *a;
352 int x;
353
354 s = src->pixels + offset_y[y];
355 a = src->alpha + offset_y[y];
356 pld(s, 0);
357 pld(a, 0);
358 pld(offset_x, 0);
359
360 d = dst_itr;
361 x = 0;
362 while (x < w_align)
363 {
364 pld(s, 32);
365 pld(a, 8);
366 pld(offset_x + x, 32);
367
368 UNROLL8({
369 int off_x = offset_x[x];
370 _soft16_pt_blend_transp_solid_mul_color_transp
371 (d, s[off_x], a[off_x], alpha, r, g, b);
372 x++;
373 d++;
374 });
375 }
376
377 for (; x < w; x++, d++)
378 _soft16_pt_blend_transp_solid_mul_color_transp
379 (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b);
380 }
381}
382
383static inline void
384_soft16_image_draw_scaled_mul_color(Soft16_Image *src, Soft16_Image *dst,
385 RGBA_Draw_Context *dc,
386 int dst_offset, int w, int h,
387 int *offset_x, int *offset_y,
388 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
389{
390 if ((src->cache_entry.flags.alpha && src->alpha) &&
391 (!dst->cache_entry.flags.alpha))
392 _soft16_image_draw_scaled_transp_solid_mul_color
393 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
394 else if (!dst->cache_entry.flags.alpha)
395 _soft16_image_draw_scaled_solid_solid_mul_color
396 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
397 else
398 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
399 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
400 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
401}
402
403static inline void
404_soft16_image_draw_scaled_mul(Soft16_Image *src, Soft16_Image *dst,
405 RGBA_Draw_Context *dc,
406 int dst_offset, int w, int h,
407 int *offset_x, int *offset_y, DATA8 r, DATA8 g,
408 DATA8 b, DATA8 a)
409{
410 if ((a == r) && (a == (g >> 1)) && (a == b))
411 _soft16_image_draw_scaled_mul_alpha
412 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
413 else
414 _soft16_image_draw_scaled_mul_color
415 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
416}
417
418void
419evas_common_soft16_image_draw_scaled_sampled(Soft16_Image *src, Soft16_Image *dst,
420 RGBA_Draw_Context *dc,
421 const Eina_Rectangle sr,
422 const Eina_Rectangle dr,
423 const Eina_Rectangle cr)
424{
425 int x, y, dst_offset, *offset_x, *offset_y;
426 DATA16 mul_rgb565;
427 DATA8 r, g, b, a;
428
429 if (!dc->mul.use)
430 {
431 r = b = a = 31;
432 g = 63;
433 mul_rgb565 = 0xffff;
434 }
435 else
436 {
437 a = A_VAL(&dc->mul.col) >> 3;
438 if (a == 0)
439 return;
440
441 r = R_VAL(&dc->mul.col) >> 3;
442 g = G_VAL(&dc->mul.col) >> 2;
443 b = B_VAL(&dc->mul.col) >> 3;
444
445 if (r > a) r = a;
446 if (g > (a << 1)) g = (a << 1);
447 if (b > a) b = a;
448
449 mul_rgb565 = (r << 11) || (g << 5) | b;
450 }
451
452 /* pre-calculated scale tables */
453 offset_x = alloca(cr.w * sizeof(*offset_x));
454 for (x = 0; x < cr.w; x++)
455 offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x;
456
457 offset_y = alloca(cr.h * sizeof(*offset_y));
458 for (y = 0; y < cr.h; y++)
459 offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y)
460 * src->stride);
461
462 dst_offset = cr.x + (cr.y * dst->stride);
463
464
465 if (mul_rgb565 == 0xffff)
466 _soft16_image_draw_scaled_no_mul
467 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y);
468 else
469 _soft16_image_draw_scaled_mul
470 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b, a);
471}
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 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_scanline_blend.c"
3
4static void
5_soft16_image_draw_unscaled_solid_solid(Soft16_Image *src, Soft16_Image *dst,
6 RGBA_Draw_Context *dc __UNUSED__,
7 int src_offset, int dst_offset,
8 int w, int h)
9{
10 DATA16 *src_itr, *dst_itr;
11 int y;
12
13 src_itr = src->pixels + src_offset;
14 dst_itr = dst->pixels + dst_offset;
15
16 for (y = 0; y < h; y++)
17 {
18 _soft16_scanline_blend_solid_solid(src_itr, dst_itr, w);
19 src_itr += src->stride;
20 dst_itr += dst->stride;
21 }
22}
23
24static void
25_soft16_image_draw_unscaled_transp_solid(Soft16_Image *src, Soft16_Image *dst,
26 RGBA_Draw_Context *dc __UNUSED__,
27 int src_offset, int dst_offset,
28 int w, int h)
29
30{
31 DATA16 *src_itr, *dst_itr;
32 DATA8 *alpha_itr;
33 int y;
34
35 src_itr = src->pixels + src_offset;
36 alpha_itr = src->alpha + src_offset;
37 dst_itr = dst->pixels + dst_offset;
38
39 for (y = 0; y < h; y++)
40 {
41 _soft16_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w);
42 src_itr += src->stride;
43 alpha_itr += src->stride;
44 dst_itr += dst->stride;
45 }
46}
47
48static inline void
49_soft16_image_draw_unscaled_no_mul(Soft16_Image *src, Soft16_Image *dst,
50 RGBA_Draw_Context *dc,
51 int src_offset, int dst_offset,
52 int width, int height)
53{
54 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
55 _soft16_image_draw_unscaled_transp_solid(src, dst, dc,
56 src_offset, dst_offset,
57 width, height);
58 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
59 _soft16_image_draw_unscaled_solid_solid(src, dst, dc,
60 src_offset, dst_offset,
61 width, height);
62 else
63 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
64 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
65 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
66}
67
68static void
69_soft16_image_draw_unscaled_solid_solid_mul_alpha(Soft16_Image *src,
70 Soft16_Image *dst,
71 RGBA_Draw_Context *dc __UNUSED__,
72 int src_offset,
73 int dst_offset,
74 int w, int h, DATA8 a)
75{
76 DATA16 *src_itr, *dst_itr;
77 int y;
78
79 src_itr = src->pixels + src_offset;
80 dst_itr = dst->pixels + dst_offset;
81
82 for (y = 0; y < h; y++)
83 {
84 _soft16_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a);
85 src_itr += src->stride;
86 dst_itr += dst->stride;
87 }
88}
89
90static void
91_soft16_image_draw_unscaled_transp_solid_mul_alpha(Soft16_Image *src,
92 Soft16_Image *dst,
93 RGBA_Draw_Context *dc __UNUSED__,
94 int src_offset,
95 int dst_offset,
96 int w, int h, DATA8 a)
97
98{
99 DATA16 *src_itr, *dst_itr;
100 DATA8 *alpha_itr;
101 int y;
102
103 src_itr = src->pixels + src_offset;
104 alpha_itr = src->alpha + src_offset;
105 dst_itr = dst->pixels + dst_offset;
106
107 for (y = 0; y < h; y++)
108 {
109 _soft16_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr,
110 dst_itr, w, a);
111 src_itr += src->stride;
112 alpha_itr += src->stride;
113 dst_itr += dst->stride;
114 }
115}
116
117static inline void
118_soft16_image_draw_unscaled_mul_alpha(Soft16_Image *src, Soft16_Image *dst,
119 RGBA_Draw_Context *dc,
120 int src_offset, int dst_offset,
121 int width, int height, DATA8 a)
122{
123 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
124 _soft16_image_draw_unscaled_transp_solid_mul_alpha
125 (src, dst, dc, src_offset, dst_offset, width, height, a);
126 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
127 _soft16_image_draw_unscaled_solid_solid_mul_alpha
128 (src, dst, dc, src_offset, dst_offset, width, height, a);
129 else
130 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
131 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
132 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
133}
134
135static void
136_soft16_image_draw_unscaled_solid_solid_mul_color(Soft16_Image *src,
137 Soft16_Image *dst,
138 RGBA_Draw_Context *dc __UNUSED__,
139 int src_offset,
140 int dst_offset,
141 int w, int h, DATA8 r,
142 DATA8 g, DATA8 b, DATA8 a)
143{
144 DATA16 *src_itr, *dst_itr;
145 int y;
146
147 src_itr = src->pixels + src_offset;
148 dst_itr = dst->pixels + dst_offset;
149
150 if (a == 31)
151 for (y = 0; y < h; y++)
152 {
153 _soft16_scanline_blend_solid_solid_mul_color_solid
154 (src_itr, dst_itr, w, r, g, b);
155 src_itr += src->stride;
156 dst_itr += dst->stride;
157 }
158 else
159 for (y = 0; y < h; y++)
160 {
161 _soft16_scanline_blend_solid_solid_mul_color_transp
162 (src_itr, dst_itr, w, a, r, g, b);
163 src_itr += src->stride;
164 dst_itr += dst->stride;
165 }
166}
167
168static void
169_soft16_image_draw_unscaled_transp_solid_mul_color(Soft16_Image *src,
170 Soft16_Image *dst,
171 RGBA_Draw_Context *dc __UNUSED__,
172 int src_offset,
173 int dst_offset,
174 int w, int h, DATA8 r,
175 DATA8 g, DATA8 b, DATA8 a)
176
177{
178 DATA16 *src_itr, *dst_itr;
179 DATA8 *alpha_itr;
180 int y;
181
182 src_itr = src->pixels + src_offset;
183 alpha_itr = src->alpha + src_offset;
184 dst_itr = dst->pixels + dst_offset;
185
186 if (a == 31)
187 for (y = 0; y < h; y++)
188 {
189 _soft16_scanline_blend_transp_solid_mul_color_solid
190 (src_itr, alpha_itr, dst_itr, w, r, g, b);
191 src_itr += src->stride;
192 alpha_itr += src->stride;
193 dst_itr += dst->stride;
194 }
195 else
196 for (y = 0; y < h; y++)
197 {
198 _soft16_scanline_blend_transp_solid_mul_color_transp
199 (src_itr, alpha_itr, dst_itr, w, a, r, g, b);
200 src_itr += src->stride;
201 alpha_itr += src->stride;
202 dst_itr += dst->stride;
203 }
204}
205
206static inline void
207_soft16_image_draw_unscaled_mul_color(Soft16_Image *src, Soft16_Image *dst,
208 RGBA_Draw_Context *dc,
209 int src_offset, int dst_offset,
210 int width, int height,
211 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
212{
213 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
214 _soft16_image_draw_unscaled_transp_solid_mul_color
215 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
216 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
217 _soft16_image_draw_unscaled_solid_solid_mul_color
218 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
219 else
220 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
221 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
222 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
223}
224
225static inline void
226_soft16_image_draw_unscaled_mul(Soft16_Image *src, Soft16_Image *dst,
227 RGBA_Draw_Context *dc,
228 int src_offset, int dst_offset,
229 int width, int height, DATA8 r, DATA8 g,
230 DATA8 b, DATA8 a)
231{
232 if ((a == r) && (a == (g >> 1)) && (a == b))
233 _soft16_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset,
234 dst_offset, width, height, a);
235 else
236 _soft16_image_draw_unscaled_mul_color(src, dst, dc, src_offset,
237 dst_offset, width, height,
238 r, g, b, a);
239}
240
241void
242evas_common_soft16_image_draw_unscaled(Soft16_Image *src, Soft16_Image *dst,
243 RGBA_Draw_Context *dc,
244 const Eina_Rectangle sr,
245 const Eina_Rectangle dr,
246 const Eina_Rectangle cr)
247{
248 int src_offset_rows, src_offset, dst_offset;
249 DATA16 mul_rgb565;
250 DATA8 r, g, b, a;
251
252 if (!dc->mul.use)
253 {
254 r = b = a = 31;
255 g = 63;
256 mul_rgb565 = 0xffff;
257 }
258 else
259 {
260 a = A_VAL(&dc->mul.col) >> 3;
261 if (a == 0)
262 return;
263
264 r = R_VAL(&dc->mul.col) >> 3;
265 g = G_VAL(&dc->mul.col) >> 2;
266 b = B_VAL(&dc->mul.col) >> 3;
267
268 if (r > a) r = a;
269 if (g > (a << 1)) g = (a << 1);
270 if (b > a) b = a;
271
272 mul_rgb565 = (r << 11) || (g << 5) | b;
273 }
274
275
276 src_offset_rows = (cr.y - dr.y) + sr.y;
277 src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x;
278
279 dst_offset = cr.x + (cr.y * dst->stride);
280
281 if (mul_rgb565 == 0xffff)
282 _soft16_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset,
283 cr.w, cr.h);
284 else
285 _soft16_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset,
286 cr.w, cr.h, r, g, b, a);
287}
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 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_scanline_fill.c"
3
4/*
5 * All functions except by evas_common_soft16_line_draw() expect x0 <= x1.
6 */
7
8static inline int
9_in_range(int value, int min, int max)
10{
11 return min <= value && value <= max;
12}
13
14static inline int
15_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip)
16{
17 if (!clip.use)
18 return 1;
19
20 if (!_in_range(x, clip.x, clip.x + clip.w - 1))
21 return 0;
22
23 if (!_in_range(y, clip.y, clip.y + clip.h - 1))
24 return 0;
25
26 return 1;
27}
28
29static inline int
30_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip)
31{
32 if (!clip.use)
33 return 1;
34
35 return _in_range(x, clip.x, clip.x + clip.w - 1);
36}
37
38static inline int
39_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip)
40{
41 if (!clip.use)
42 return 1;
43
44 return _in_range(y, clip.y, clip.y + clip.h - 1);
45}
46
47static inline int
48_is_xy_inside_rect(int x, int y, int w, int h)
49{
50 return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1);
51}
52
53static inline int
54_is_empty_clip(const struct RGBA_Draw_Context_clip clip)
55{
56 return clip.w < 1 || clip.h < 1;
57}
58
59static void
60_soft16_line_point(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y)
61{
62 DATA16 rgb565, *dst_itr;
63 DATA8 alpha;
64
65 if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h))
66 return;
67
68 if (!_is_xy_inside_clip(x, y, dc->clip))
69 return;
70
71 dst_itr = dst->pixels + (dst->stride * y) + x;
72 alpha = A_VAL(&dc->col.col) >> 3;
73 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
74 G_VAL(&dc->col.col),
75 B_VAL(&dc->col.col));
76
77 if (alpha == 31)
78 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
79 else if (alpha > 0)
80 {
81 DATA32 rgb565_unpack;
82
83 rgb565_unpack = RGB_565_UNPACK(rgb565);
84 alpha++;
85 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
86 }
87}
88
89static void
90_soft16_line_horiz(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int x1, int y)
91{
92 DATA16 rgb565, *dst_itr;
93 DATA8 alpha;
94 int w;
95
96 if (!_is_y_inside_clip(y, dc->clip))
97 return;
98
99 if (x0 < dc->clip.x)
100 x0 = dc->clip.x;
101
102 if (x1 >= dc->clip.x + dc->clip.w)
103 x1 = dc->clip.x + dc->clip.w - 1;
104
105 w = x1 - x0;
106 if (w < 1)
107 return;
108
109 dst_itr = dst->pixels + (dst->stride * y) + x0;
110 alpha = A_VAL(&dc->col.col) >> 3;
111 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
112 G_VAL(&dc->col.col),
113 B_VAL(&dc->col.col));
114
115 if (alpha == 31)
116 _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565);
117 else if (alpha > 0)
118 {
119 DATA32 rgb565_unpack;
120
121 rgb565_unpack = RGB_565_UNPACK(rgb565);
122 alpha++;
123 _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha);
124 }
125}
126
127static void
128_soft16_line_vert(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y0, int y1)
129{
130 DATA16 rgb565, *dst_itr;
131 DATA8 alpha;
132 int h;
133
134 if (!_is_x_inside_clip(x, dc->clip))
135 return;
136
137 if (y1 < y0)
138 {
139 int t;
140 t = y0;
141 y0 = y1;
142 y1 = t;
143 }
144
145 if (y0 < dc->clip.y)
146 y0 = dc->clip.y;
147
148 if (y1 >= dc->clip.y + dc->clip.h)
149 y1 = dc->clip.y + dc->clip.h - 1;
150
151 h = y1 - y0;
152 if (h < 1)
153 return;
154
155 dst_itr = dst->pixels + (dst->stride * y0) + x;
156 alpha = A_VAL(&dc->col.col) >> 3;
157 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
158 G_VAL(&dc->col.col),
159 B_VAL(&dc->col.col));
160
161 if (alpha == 31)
162 {
163 for (; h > 0; h--, dst_itr += dst->stride)
164 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
165 }
166 else if (alpha > 0)
167 {
168 DATA32 rgb565_unpack;
169
170 rgb565_unpack = RGB_565_UNPACK(rgb565);
171 alpha++;
172
173 for (; h > 0; h--, dst_itr += dst->stride)
174 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
175 }
176}
177
178static inline void
179_soft16_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip, int *p_x0, int *p_y0, int *p_x1, int *p_y1)
180{
181 int diff, dy, x0, y0, x1, y1;
182
183 x0 = *p_x0;
184 y0 = *p_y0;
185 x1 = *p_x1;
186 y1 = *p_y1;
187
188 dy = y1 - y0;
189
190 diff = clip.x - x0;
191 if (diff > 0)
192 {
193 x0 = clip.x;
194 y0 += (dy > 0) ? diff : -diff;
195 }
196
197 diff = x1 - (clip.x + clip.w);
198 if (diff > 0)
199 {
200 x1 = clip.x + clip.w;
201 y1 += (dy > 0) ? -diff : diff;
202 }
203
204 if (dy > 0)
205 {
206 diff = clip.y - y0;
207 if (diff > 0)
208 {
209 y0 = clip.y;
210 x0 += diff;
211 }
212
213 diff = y1 - (clip.y + clip.h);
214 if (diff > 0)
215 {
216 y1 = clip.y + clip.h;
217 x1 -= diff;
218 }
219 }
220 else
221 {
222 diff = clip.y - y1;
223 if (diff > 0)
224 {
225 y1 = clip.y;
226 x1 -= diff;
227 }
228
229 diff = y0 - (clip.y + clip.h - 1);
230 if (diff > 0)
231 {
232 y0 = clip.y + clip.h - 1;
233 x0 += diff;
234 }
235 }
236
237 *p_x0 = x0;
238 *p_y0 = y0;
239 *p_x1 = x1;
240 *p_y1 = y1;
241}
242
243static void
244_soft16_line_45deg(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
245{
246 int dy, step_dst_itr, len;
247 DATA8 alpha;
248 DATA16 *dst_itr, rgb565;
249
250 alpha = A_VAL(&dc->col.col) >> 3;
251 if (alpha < 1)
252 return;
253
254 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
255 G_VAL(&dc->col.col),
256 B_VAL(&dc->col.col));
257
258 dy = y1 - y0;
259 step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride);
260
261 _soft16_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1);
262
263 len = (dy > 0) ? (y1 - y0) : (y0 - y1);
264 if (len < 1)
265 return;
266
267 dst_itr = dst->pixels + dst->stride * y0 + x0;
268 if (alpha == 31)
269 {
270 for (; len > 0; len--, dst_itr += step_dst_itr)
271 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
272 }
273 else
274 {
275 DATA32 rgb565_unpack;
276
277 rgb565_unpack = RGB_565_UNPACK(rgb565);
278 alpha++;
279 for (; len > 0; len--, dst_itr += step_dst_itr)
280 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
281 }
282}
283
284EFL_ALWAYS_INLINE void
285_soft16_line_aliased_pt(DATA16 *dst_itr, DATA16 rgb565, DATA32 rgb565_unpack, DATA8 alpha)
286{
287 if (alpha == 32)
288 _soft16_pt_fill_solid_solid(dst_itr, rgb565);
289 else
290 _soft16_pt_fill_transp_solid(dst_itr, rgb565_unpack, alpha);
291}
292
293static void
294_soft16_line_aliased(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
295{
296 int dx, dy, step_y, step_dst_itr;
297 DATA32 rgb565_unpack;
298 DATA16 rgb565;
299 DATA8 alpha;
300
301 alpha = A_VAL(&dc->col.col) >> 3;
302 if (alpha == 0)
303 return;
304 alpha++;
305
306 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
307 G_VAL(&dc->col.col),
308 B_VAL(&dc->col.col));
309 rgb565_unpack = RGB_565_UNPACK(rgb565);
310
311 dx = x1 - x0;
312 dy = y1 - y0;
313
314 if (dy >= 0)
315 {
316 step_y = 1;
317 step_dst_itr = dst->stride;
318 }
319 else
320 {
321 dy = -dy;
322 step_y = -1;
323 step_dst_itr = -dst->stride;
324 }
325
326 if (dx > dy)
327 {
328 DATA16 *dst_itr;
329 int e, x, y;
330
331 e = - (dx / 2);
332 y = y0;
333 dst_itr = dst->pixels + dst->stride * y0 + x0;
334 for (x=x0; x <= x1; x++, dst_itr++)
335 {
336 if (_is_xy_inside_clip(x, y, dc->clip))
337 _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha);
338
339 e += dy;
340 if (e >= 0)
341 {
342 dst_itr += step_dst_itr;
343 y += step_y;
344 e -= dx;
345 }
346 }
347 }
348 else
349 {
350 DATA16 *dst_itr;
351 int e, x, y;
352
353 e = - (dy / 2);
354 x = x0;
355 dst_itr = dst->pixels + dst->stride * y0 + x0;
356 for (y=y0; y != y1; y += step_y, dst_itr += step_dst_itr)
357 {
358 if (_is_xy_inside_clip(x, y, dc->clip))
359 _soft16_line_aliased_pt(dst_itr, rgb565, rgb565_unpack, alpha);
360
361 e += dx;
362 if (e >= 0)
363 {
364 dst_itr++;
365 x++;
366 e -= dy;
367 }
368 }
369 }
370}
371
372void
373evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1)
374{
375 struct RGBA_Draw_Context_clip c_bkp, c_tmp;
376 int dx, dy;
377 int x, y, w, h;
378
379 c_tmp.use = 1;
380 c_tmp.x = 0;
381 c_tmp.y = 0;
382 c_tmp.w = dst->cache_entry.w;
383 c_tmp.h = dst->cache_entry.h;
384
385 /* save out clip info */
386 c_bkp = dc->clip;
387 if (c_bkp.use)
388 {
389 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h,
390 c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h);
391 if (_is_empty_clip(c_tmp))
392 return;
393 }
394
395 x = MIN(x0, x1);
396 y = MIN(y0, y1);
397 w = MAX(x0, x1) - x + 1;
398 h = MAX(y0, y1) - y + 1;
399
400 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h);
401 if (_is_empty_clip(c_tmp))
402 return;
403
404 /* Check if the line doesn't cross the clip area */
405 if (x0 < c_tmp.x && x1 < c_tmp.x)
406 return;
407 if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w)
408 return;
409 if (y0 < c_tmp.y && y1 < c_tmp.y)
410 return;
411 if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h)
412 return;
413
414 dc->clip = c_tmp;
415 dx = x1 - x0;
416 dy = y1 - y0;
417
418 if (dx < 0)
419 {
420 int t;
421
422 t = x0;
423 x0 = x1;
424 x1 = t;
425
426 t = y0;
427 y0 = y1;
428 y1 = t;
429 }
430
431 if (dx == 0 && dy == 0)
432 _soft16_line_point(dst, dc, x0, y0);
433 else if (dx == 0)
434 _soft16_line_vert(dst, dc, x0, y0, y1);
435 else if (dy == 0)
436 _soft16_line_horiz(dst, dc, x0, x1, y0);
437 else if (dy == dx || dy == -dx)
438 _soft16_line_45deg(dst, dc, x0, y0, x1, y1);
439 else
440 _soft16_line_aliased(dst, dc, x0, y0, x1, y1);
441
442 /* restore clip info */
443 dc->clip = c_bkp;
444}
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 @@
1#include "evas_common_soft16.h"
2
3static Evas_Cache_Image *eci = NULL;
4static int reference = 0;
5
6static Image_Entry *_evas_common_soft16_image_new(void);
7static void _evas_common_soft16_image_delete(Image_Entry *ie);
8
9static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h);
10static void _evas_common_soft16_image_surface_delete(Image_Entry *ie);
11static DATA32 *_evas_common_soft16_image_surface_pixels(Image_Entry *ie);
12
13static int _evas_common_load_soft16_image_from_file(Image_Entry *ie);
14static void _evas_common_soft16_image_unload(Image_Entry *ie);
15
16static void _evas_common_soft16_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
17static int _evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src);
18
19static int _evas_common_soft16_image_ram_usage(Image_Entry *ie);
20
21static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h);
22static 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);
23static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
24static int _evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst, int cspace);
25
26static int _evas_common_load_soft16_image_data_from_file(Image_Entry *ie);
27
28/* static void */
29/* _evas_common_soft16_image_debug(const char* context, Image_Entry *eim) */
30/* { */
31/* DBG("[16] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h); */
32/* } */
33
34static const Evas_Cache_Image_Func _evas_common_soft16_image_func =
35{
36 _evas_common_soft16_image_new,
37 _evas_common_soft16_image_delete,
38 _evas_common_soft16_image_surface_alloc,
39 _evas_common_soft16_image_surface_delete,
40 _evas_common_soft16_image_surface_pixels,
41 _evas_common_load_soft16_image_from_file,
42 _evas_common_soft16_image_unload,
43 _evas_common_soft16_image_dirty_region,
44 _evas_common_soft16_image_dirty,
45 _evas_common_soft16_image_size_set,
46 _evas_common_soft16_image_from_copied_data,
47 _evas_common_soft16_image_from_data,
48 _evas_common_soft16_image_colorspace_set,
49 _evas_common_load_soft16_image_data_from_file,
50 _evas_common_soft16_image_ram_usage,
51/* _evas_common_soft16_image_debug */
52 NULL
53};
54
55EAPI void
56evas_common_soft16_image_init(void)
57{
58 if (!eci)
59 eci = evas_cache_image_init(&_evas_common_soft16_image_func);
60 reference++;
61}
62
63EAPI void
64evas_common_soft16_image_shutdown(void)
65{
66 if (--reference == 0)
67 {
68// DISABLE for now - something wrong with cache shutdown freeing things
69// still in use - rage_thumb segv's now.
70//
71// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
72// because in eng_setup() when a buffer changes size it is FIRST freed
73// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
74// where it should stay at 1. - see evas_engine.c in the buffer enigne for
75// example. eng_output_free() is called BEFORE _output_setup(). although this
76// is only a SIGNE of the problem. we can patch this up with either freeing
77// after the setup (so we just pt a ref of 2 then back to 1), or just
78// evas_common_image_init() at the start and evas_common_image_shutdown()
79// after it all. really ref 0 should only be reached when no more canvases
80// with no more objects exist anywhere.
81
82// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009.
83 evas_cache_image_shutdown(eci);
84 eci = NULL;
85 }
86}
87
88EAPI Evas_Cache_Image *
89evas_common_soft16_image_cache_get(void)
90{
91 return eci;
92}
93
94static Image_Entry *
95_evas_common_soft16_image_new(void)
96{
97 Soft16_Image *im;
98
99 im = calloc(1, sizeof(Soft16_Image));
100 if (!im) return NULL;
101
102 im->stride = -1;
103
104 return (Image_Entry *) im;
105}
106
107static void
108_evas_common_soft16_image_delete(Image_Entry *ie)
109{
110 memset(ie, 0xFF, sizeof (Soft16_Image));
111 free(ie);
112}
113
114static int
115_evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
116{
117 Soft16_Image *im = (Soft16_Image *) ie;
118
119 if (im->stride < 0) im->stride = _calc_stride(w);
120
121 im->pixels = realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha));
122 if (!im->pixels) return -1;
123
124 if (ie->flags.alpha)
125 {
126 im->alpha = (DATA8 *)(im->pixels + (im->stride * h));
127 im->flags.free_alpha = 0;
128 }
129 im->flags.free_pixels = 1;
130
131 return 0;
132}
133
134static void
135_evas_common_soft16_image_surface_delete(Image_Entry *ie)
136{
137 Soft16_Image *im = (Soft16_Image *) ie;
138
139 if (im->flags.free_pixels)
140 free(im->pixels);
141 im->pixels = NULL;
142 im->flags.free_pixels = 0;
143
144 if (im->flags.free_alpha)
145 free(im->alpha);
146 im->alpha = NULL;
147 im->flags.free_alpha = 0;
148}
149
150static DATA32 *
151_evas_common_soft16_image_surface_pixels(Image_Entry *ie __UNUSED__)
152{
153 abort();
154
155 return NULL;
156}
157
158static int
159_evas_common_load_soft16_image_from_file(Image_Entry *ie)
160{
161 Soft16_Image *sim = (Soft16_Image *) ie;
162 RGBA_Image *im;
163 int error = 0;
164
165 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);
166 sim->source = im;
167 if (!sim->source) return -1;
168
169 sim->cache_entry.w = sim->source->cache_entry.w;
170 sim->cache_entry.h = sim->source->cache_entry.h;
171 ie->flags.alpha = im->cache_entry.flags.alpha;
172 sim->cache_entry.info = im->cache_entry.info;
173 if (sim->stride < 0) sim->stride = _calc_stride(sim->cache_entry.w);
174
175 return 0;
176}
177
178static void
179_evas_common_soft16_image_unload(Image_Entry *ie __UNUSED__)
180{
181}
182
183static void
184_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__)
185{
186}
187
188static int
189_evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src)
190{
191 Soft16_Image *dst = (Soft16_Image *) ie_dst;
192 Soft16_Image *src = (Soft16_Image *) ie_src;
193
194 evas_cache_image_load_data(&src->cache_entry);
195 evas_cache_image_surface_alloc(&dst->cache_entry,
196 src->cache_entry.w, src->cache_entry.h);
197
198/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */
199
200 return 0;
201}
202
203static int
204_evas_common_soft16_image_ram_usage(Image_Entry *ie)
205{
206 Soft16_Image *im = (Soft16_Image *) ie;
207
208 if (im->pixels && im->flags.free_pixels)
209 return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha);
210 return 0;
211}
212
213static int
214_evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w __UNUSED__, unsigned int h __UNUSED__)
215{
216 Soft16_Image *dst = (Soft16_Image *) ie_dst;
217 Soft16_Image *im = (Soft16_Image *) ie_im;
218
219 dst->flags = im->flags;
220
221 return 0;
222}
223
224static int
225_evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace __UNUSED__)
226{
227 Soft16_Image *im = (Soft16_Image *) ie_dst;
228
229 /* FIXME: handle colorspace */
230 ie_dst->w = w;
231 ie_dst->h = h;
232 ie_dst->flags.alpha = alpha;
233
234 im->flags.free_pixels = 0;
235 im->flags.free_alpha = 0;
236 if (im->stride < 0)
237 im->stride = _calc_stride(w);
238
239 /* FIXME: That's bad, the application must be aware of the engine internal. */
240 im->pixels = (DATA16 *) image_data;
241 if (ie_dst->flags.alpha)
242 im->alpha = (DATA8 *)(im->pixels + (im->stride * h));
243
244 return 0;
245}
246
247static int
248_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__)
249{
250 Soft16_Image *im = (Soft16_Image *) ie_dst;
251
252 /* FIXME: handle colorspace */
253 if (image_data)
254 memcpy(im->pixels, image_data, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
255 else
256 memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
257
258 return 0;
259}
260
261static int
262_evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst __UNUSED__, int cspace __UNUSED__)
263{
264 /* FIXME: handle colorspace */
265 return 0;
266}
267
268static int
269_evas_common_load_soft16_image_data_from_file(Image_Entry *ie)
270{
271 Soft16_Image *im = (Soft16_Image *) ie;
272
273 if (im->pixels) return 0;
274 if (!im->source) return -1;
275
276 evas_cache_image_load_data(&im->source->cache_entry);
277 if (im->source->image.data)
278 {
279 DATA32 *sp;
280
281 evas_cache_image_surface_alloc(&im->cache_entry,
282 im->source->cache_entry.w,
283 im->source->cache_entry.h);
284
285 sp = im->source->image.data;
286 if (im->alpha)
287 evas_common_soft16_image_convert_from_rgba(im, sp);
288 else
289 evas_common_soft16_image_convert_from_rgb(im, sp);
290 }
291 evas_cache_image_drop(&im->source->cache_entry);
292 im->cache_entry.info.module = NULL;
293 im->cache_entry.info.loader = NULL;
294 im->source = NULL;
295
296 return 0;
297}
298
299/* Soft16_Image * */
300/* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */
301/* int copy) */
302/* { */
303/* Soft16_Image *im; */
304
305/* if (stride < 0) stride = _calc_stride(w); */
306
307/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */
308/* if (!im) return NULL; */
309
310/* if (pixels) */
311/* { */
312/* if (copy) */
313/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */
314/* else */
315/* { */
316/* im->pixels = pixels; */
317/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */
318/* } */
319/* } */
320/* return im; */
321/* } */
322
323static inline void
324_get_clip(const RGBA_Draw_Context *dc, const Soft16_Image *im,
325 Eina_Rectangle *clip)
326{
327 if (dc->clip.use)
328 {
329 EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
330 if (clip->x < 0)
331 {
332 clip->w += clip->x;
333 clip->x = 0;
334 }
335 if (clip->y < 0)
336 {
337 clip->h += clip->y;
338 clip->y = 0;
339 }
340 if ((clip->x + clip->w) > (int)im->cache_entry.w) clip->w = im->cache_entry.w - clip->x;
341 if ((clip->y + clip->h) > (int)im->cache_entry.h) clip->h = im->cache_entry.h - clip->y;
342 }
343 else
344 {
345 EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h);
346 }
347}
348
349static inline int
350_is_empty_rectangle(const Eina_Rectangle *r)
351{
352 return (r->w < 1) || (r->h < 1);
353}
354
355static inline void
356_shrink(int *s_pos, int *s_size, int pos, int size)
357{
358 int d;
359
360 d = (*s_pos) - pos;
361 if (d < 0)
362 {
363 (*s_size) += d;
364 (*s_pos) = pos;
365 }
366
367 d = size + pos - (*s_pos);
368 if ((*s_size) > d)
369 (*s_size) = d;
370}
371
372static int
373_soft16_adjust_areas(Eina_Rectangle *src,
374 int src_max_x, int src_max_y,
375 Eina_Rectangle *dst,
376 int dst_max_x, int dst_max_y,
377 Eina_Rectangle *dst_clip)
378{
379 if (_is_empty_rectangle(src) ||
380 _is_empty_rectangle(dst) ||
381 _is_empty_rectangle(dst_clip))
382 return 0;
383
384 /* shrink clip */
385 _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w);
386 _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h);
387 if (_is_empty_rectangle(dst_clip)) return 0;
388
389 /* sanitise x */
390 if (src->x < 0)
391 {
392 dst->x -= (src->x * dst->w) / src->w;
393 dst->w += (src->x * dst->w) / src->w;
394 src->w += src->x;
395 src->x = 0;
396 }
397 if (src->x >= src_max_x) return 0;
398 if ((src->x + src->w) > src_max_x)
399 {
400 dst->w = (dst->w * (src_max_x - src->x)) / (src->w);
401 src->w = src_max_x - src->x;
402 }
403 if (dst->w <= 0) return 0;
404 if (src->w <= 0) return 0;
405 if (dst_clip->x < 0)
406 {
407 dst_clip->w += dst_clip->x;
408 dst_clip->x = 0;
409 }
410 if (dst_clip->w <= 0) return 0;
411 if (dst_clip->x >= dst_max_x) return 0;
412
413 _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x);
414 if (dst_clip->w <= 0) return 0;
415
416 /* sanitise y */
417 if (src->y < 0)
418 {
419 dst->y -= (src->y * dst->h) / src->h;
420 dst->h += (src->y * dst->h) / src->h;
421 src->h += src->y;
422 src->y = 0;
423 }
424 if (src->y >= src_max_y) return 0;
425 if ((src->y + src->h) > src_max_y)
426 {
427 dst->h = (dst->h * (src_max_y - src->y)) / (src->h);
428 src->h = src_max_y - src->y;
429 }
430 if (dst->h <= 0) return 0;
431 if (src->h <= 0) return 0;
432 if (dst_clip->y < 0)
433 {
434 dst_clip->h += dst_clip->y;
435 dst_clip->y = 0;
436 }
437 if (dst_clip->h <= 0) return 0;
438 if (dst_clip->y >= dst_max_y) return 0;
439
440 _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y);
441 if (dst_clip->h <= 0) return 0;
442
443 return 1;
444}
445
446static void
447_soft16_image_draw_sampled_int(Soft16_Image *src, Soft16_Image *dst,
448 RGBA_Draw_Context *dc,
449 Eina_Rectangle sr, Eina_Rectangle dr)
450{
451 Eina_Rectangle cr;
452
453 if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
454 return;
455 if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
456 return;
457
458 _get_clip(dc, dst, &cr);
459 if (!_soft16_adjust_areas(&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w, dst->cache_entry.h, &cr))
460 return;
461
462 if ((dr.w == sr.w) && (dr.h == sr.h))
463 evas_common_soft16_image_draw_unscaled(src, dst, dc, sr, dr, cr);
464 else
465 evas_common_soft16_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
466}
467
468EAPI void
469evas_common_soft16_image_draw(Soft16_Image *src, Soft16_Image *dst,
470 RGBA_Draw_Context *dc,
471 int src_region_x, int src_region_y,
472 int src_region_w, int src_region_h,
473 int dst_region_x, int dst_region_y,
474 int dst_region_w, int dst_region_h,
475 int smooth __UNUSED__)
476{
477 Eina_Rectangle sr, dr;
478 Cutout_Rects *rects;
479 Cutout_Rect *r;
480 struct RGBA_Draw_Context_clip clip_bkp;
481 int i;
482
483 /* handle cutouts here! */
484 EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
485
486 if (_is_empty_rectangle(&dr)) return;
487 if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
488 return;
489
490 EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w, src_region_h);
491
492 if (_is_empty_rectangle(&sr)) return;
493 if (!(RECTS_INTERSECT(sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
494 return;
495
496 /* no cutouts - cut right to the chase */
497 if (!dc->cutout.rects)
498 {
499 _soft16_image_draw_sampled_int(src, dst, dc, sr, dr);
500 return;
501 }
502
503 /* save out clip info */
504 clip_bkp = dc->clip;
505 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
506 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y, dst_region_w, dst_region_h);
507 /* our clip is 0 size.. abort */
508 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
509 {
510 dc->clip = clip_bkp;
511 return;
512 }
513 rects = evas_common_draw_context_apply_cutouts(dc);
514 for (i = 0; i < rects->active; i++)
515 {
516 r = rects->rects + i;
517 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
518 _soft16_image_draw_sampled_int(src, dst, dc, sr, dr);
519 }
520 evas_common_draw_context_apply_clear_cutouts(rects);
521 dc->clip = clip_bkp;
522}
523
524EAPI Soft16_Image *
525evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha)
526{
527 Soft16_Image *new_im;
528
529 if (im->cache_entry.flags.alpha == have_alpha) return im;
530
531 new_im = (Soft16_Image *) evas_cache_image_alone(&im->cache_entry);
532
533 new_im->cache_entry.flags.alpha = have_alpha;
534
535 if (im->cache_entry.w > 0
536 && im->cache_entry.h)
537 new_im = (Soft16_Image *) evas_cache_image_size_set(&new_im->cache_entry, im->cache_entry.w, im->cache_entry.h);
538
539 return new_im;
540}
541
542/* Soft16_Image * */
543/* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */
544/* { */
545/* Soft16_Image *new_im; */
546/* DATA16 *dp, *sp; */
547/* int i, cw, ch, ew; */
548
549/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */
550
551/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
552
553/* if (old_im->cache_entry.w < new_im->cache_entry.w) */
554/* cw = old_im->cache_entry.w; */
555/* else */
556/* cw = new_im->cache_entry.w; */
557
558/* ew = new_im->cache_entry.w - cw; */
559
560/* if (old_im->cache_entry.h < new_im->cache_entry.h) */
561/* ch = old_im->cache_entry.h; */
562/* else */
563/* ch = new_im->cache_entry.h; */
564
565/* dp = new_im->pixels; */
566/* sp = old_im->pixels; */
567/* for (i = 0; i < ch; i++) */
568/* { */
569/* memcpy(dp, sp, cw * sizeof(DATA16)); */
570/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */
571
572/* dp += new_im->stride; */
573/* sp += old_im->stride; */
574/* } */
575
576/* if (old_im->flags.have_alpha) */
577/* { */
578/* DATA8 *dp, *sp; */
579
580/* dp = new_im->alpha; */
581/* sp = old_im->alpha; */
582/* for (i = 0; i < ch; i++) */
583/* { */
584/* memcpy(dp, sp, cw * sizeof(DATA8)); */
585/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */
586
587/* dp += new_im->stride; */
588/* sp += old_im->stride; */
589/* } */
590/* } */
591
592/* evas_cache_image_drop(&old_im->cache_entry); */
593/* return new_im; */
594/* } */
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 @@
1/** NOTE: This file is meant to be included by users **/
2
3/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive.
4 ** this is due our division by 256 when multiplying the color.
5 **/
6
7/*****************************************************************************
8 * Scanline processing
9 *
10 * _soft16_pt_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13
14/***********************************************************************
15 * Regular blend operations
16 */
17
18EFL_ALWAYS_INLINE void
19_soft16_pt_blend_transp_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha)
20{
21 if (alpha == 31) *p_dst = src;
22 else if (alpha != 0)
23 {
24 DATA32 a, b;
25
26 a = RGB_565_UNPACK(src);
27 b = RGB_565_UNPACK(*p_dst);
28 b = RGB_565_UNPACKED_BLEND(a, b, alpha);
29 *p_dst = RGB_565_PACK(b);
30 }
31}
32
33EFL_ALWAYS_INLINE void
34_soft16_pt_blend_solid_solid(DATA16 *p_dst, DATA16 src)
35{
36 *p_dst = src;
37}
38
39/***********************************************************************
40 * Blend operations taking an extra alpha (fade in, out)
41 */
42
43EFL_ALWAYS_INLINE void
44_soft16_pt_blend_transp_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha)
45{
46 DATA32 a, b;
47
48 alpha = (alpha * rel_alpha) >> 5;
49 if (alpha == 0)
50 return;
51
52 alpha++;
53
54 a = ((RGB_565_UNPACK(src) * rel_alpha) >> 5) & RGB_565_UNPACKED_MASK;
55 b = RGB_565_UNPACK(*p_dst);
56 b = RGB_565_UNPACKED_BLEND(a, b, alpha);
57 *p_dst = RGB_565_PACK(b);
58}
59
60EFL_ALWAYS_INLINE void
61_soft16_pt_blend_solid_solid_mul_alpha(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha)
62{
63 DATA32 a, b;
64 a = RGB_565_UNPACK(src);
65 b = RGB_565_UNPACK(*p_dst);
66 b = RGB_565_UNPACKED_BLEND_UNMUL(a, b, rel_alpha);
67 *p_dst = RGB_565_PACK(b);
68}
69
70/***********************************************************************
71 * Blend operations with extra alpha and multiply color
72 */
73
74EFL_ALWAYS_INLINE void
75_soft16_pt_blend_transp_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
76{
77 DATA32 rgb, d;
78 int r1, g1, b1;
79
80 alpha = (alpha * rel_alpha) >> 5;
81 if (alpha == 0)
82 return;
83
84 alpha++;
85
86 r1 = ((((src) >> 11) & 0x1f) * r) >> 5;
87 g1 = ((((src) >> 5) & 0x3f) * g) >> 6;
88 b1 = (((src) & 0x1f) * b) >> 5;
89 rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK;
90 d = RGB_565_UNPACK(*p_dst);
91 d = RGB_565_UNPACKED_BLEND(rgb, d, alpha);
92
93 *p_dst = RGB_565_PACK(d);
94}
95
96EFL_ALWAYS_INLINE void
97_soft16_pt_blend_solid_solid_mul_color_transp(DATA16 *p_dst, DATA16 src, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
98{
99 int r1, g1, b1;
100 DATA32 rgb, d;
101
102 r1 = ((((src) >> 11) & 0x1f) * r) >> 5;
103 g1 = ((((src) >> 5) & 0x3f) * g) >> 6;
104 b1 = (((src) & 0x1f) * b) >> 5;
105
106 rgb = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK;
107 d = RGB_565_UNPACK(*p_dst);
108 d = RGB_565_UNPACKED_BLEND(rgb, d, rel_alpha);
109 *p_dst = RGB_565_PACK(d);
110}
111
112/***********************************************************************
113 * Blend operations with extra multiply color
114 */
115
116EFL_ALWAYS_INLINE void
117_soft16_pt_blend_transp_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA8 alpha, DATA8 r, DATA8 g, DATA8 b)
118{
119 int r1, g1, b1;
120
121 if (alpha == 0) return;
122
123 r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f;
124 g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f;
125 b1 = (((src & 0x1f) * b) >> 5) & 0x1f;
126
127 if (alpha == 31) *p_dst = (r1 << 11) | (g1 << 5) | b1;
128 else
129 {
130 DATA32 rgb_unpack, d;
131
132 rgb_unpack = ((r1 << 11) | (g1 << 21) | b1) & RGB_565_UNPACKED_MASK;
133 d = RGB_565_UNPACK(*p_dst);
134 d = RGB_565_UNPACKED_BLEND(rgb_unpack, d, alpha);
135 *p_dst = RGB_565_PACK(d);
136 }
137}
138
139EFL_ALWAYS_INLINE void
140_soft16_pt_blend_solid_solid_mul_color_solid(DATA16 *p_dst, DATA16 src, DATA16 r, DATA16 g, DATA16 b)
141{
142 int r1, g1, b1;
143
144 r1 = ((((src >> 11) & 0x1f) * r) >> 5) & 0x1f;
145 g1 = ((((src >> 5) & 0x3f) * g) >> 6) & 0x3f;
146 b1 = (((src & 0x1f) * b) >> 5) & 0x1f;
147
148 *p_dst = (r1 << 11) | (g1 << 5) | b1;
149}
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 @@
1#include <math.h>
2#include <evas_common_soft16.h>
3#include "evas_soft16_scanline_fill.c"
4
5typedef struct _RGBA_Edge RGBA_Edge;
6typedef struct _RGBA_Vertex RGBA_Vertex;
7
8struct _RGBA_Edge
9{
10 float x, dx;
11 int i;
12};
13
14struct _RGBA_Vertex
15{
16 float x, y;
17 int i;
18};
19
20#define POLY_EDGE_DEL(_i) \
21{ \
22 int _j; \
23 \
24 for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \
25 if (_j < num_active_edges) \
26 { \
27 num_active_edges--; \
28 memmove(&(edges[_j]), &(edges[_j + 1]), \
29 (num_active_edges - _j) * sizeof(RGBA_Edge)); \
30 } \
31}
32
33#define POLY_EDGE_ADD(_i, _y) \
34{ \
35 int _j; \
36 float _dx; \
37 RGBA_Vertex *_p, *_q; \
38 if (_i < (n - 1)) _j = _i + 1; \
39 else _j = 0; \
40 if (point[_i].y < point[_j].y) \
41 { \
42 _p = &(point[_i]); \
43 _q = &(point[_j]); \
44 } \
45 else \
46 { \
47 _p = &(point[_j]); \
48 _q = &(point[_i]); \
49 } \
50 edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
51 edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
52 edges[num_active_edges].i = _i; \
53 num_active_edges++; \
54}
55
56static int
57polygon_point_sorter(const void *a, const void *b)
58{
59 RGBA_Vertex *p, *q;
60
61 p = (RGBA_Vertex *)a;
62 q = (RGBA_Vertex *)b;
63 if (p->y <= q->y) return -1;
64 return 1;
65}
66
67static int
68polygon_edge_sorter(const void *a, const void *b)
69{
70 RGBA_Edge *p, *q;
71
72 p = (RGBA_Edge *)a;
73 q = (RGBA_Edge *)b;
74 if (p->x <= q->x) return -1;
75 return 1;
76}
77
78void
79evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y)
80{
81 RGBA_Polygon_Point *pt;
82 RGBA_Vertex *point;
83 RGBA_Edge *edges;
84 int num_active_edges;
85 int n;
86 int i, j, k;
87 int y0, y1, yi;
88 int ext_x, ext_y, ext_w, ext_h;
89 int *sorted_index;
90 DATA8 alpha;
91 DATA16 rgb565;
92 DATA32 rgb565_unpack;
93
94 alpha = A_VAL(&dc->col.col) >> 3;
95 if (alpha == 0)
96 return;
97 alpha++;
98
99 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
100 G_VAL(&dc->col.col),
101 B_VAL(&dc->col.col));
102 rgb565_unpack = RGB_565_UNPACK(rgb565);
103
104 ext_x = 0;
105 ext_y = 0;
106 ext_w = dst->cache_entry.w;
107 ext_h = dst->cache_entry.h;
108 if (dc->clip.use)
109 RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h,
110 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
111
112 if ((ext_w <= 0) || (ext_h <= 0))
113 return;
114
115 n = 0;
116 EINA_INLIST_FOREACH(points, pt) n++;
117
118 if (n < 3)
119 return;
120
121 edges = malloc(sizeof(RGBA_Edge) * n);
122 if (!edges)
123 return;
124
125 point = malloc(sizeof(RGBA_Vertex) * n);
126 if (!point)
127 {
128 free(edges);
129 return;
130 }
131
132 sorted_index = malloc(sizeof(int) * n);
133 if (!sorted_index)
134 {
135 free(edges);
136 free(point);
137 return;
138 }
139
140 k = 0;
141 EINA_INLIST_FOREACH(points, pt)
142 {
143 point[k].x = pt->x + x;
144 point[k].y = pt->y + y;
145 point[k].i = k;
146 k++;
147 }
148 qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
149
150 for (k = 0; k < n; k++)
151 sorted_index[k] = point[k].i;
152
153 k = 0;
154 EINA_INLIST_FOREACH(points, pt)
155 {
156 point[k].x = pt->x + x;
157 point[k].y = pt->y + y;
158 point[k].i = k;
159 k++;
160 }
161
162 y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5));
163 y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5));
164
165 k = 0;
166 num_active_edges = 0;
167
168 for (yi = y0; yi <= y1; yi++)
169 {
170 for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++)
171 {
172 i = sorted_index[k];
173
174 if (i > 0) j = i - 1;
175 else j = n - 1;
176 if (point[j].y <= ((float)yi - 0.5))
177 {
178 POLY_EDGE_DEL(j)
179 }
180 else if (point[j].y > ((float)yi + 0.5))
181 {
182 POLY_EDGE_ADD(j, yi)
183 }
184 if (i < (n - 1)) j = i + 1;
185 else j = 0;
186 if (point[j].y <= ((float)yi - 0.5))
187 {
188 POLY_EDGE_DEL(i)
189 }
190 else if (point[j].y > ((float)yi + 0.5))
191 {
192 POLY_EDGE_ADD(i, yi)
193 }
194 }
195
196 qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter);
197
198 for (j = 0; j < num_active_edges; j += 2)
199 {
200 int x0, x1;
201
202 x0 = ceil(edges[j].x - 0.5);
203 if (j < (num_active_edges - 1))
204 x1 = floor(edges[j + 1].x - 0.5);
205 else
206 x1 = x0;
207 if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1))
208 {
209 DATA16 *dst_itr;
210 int w;
211
212 if (x0 < ext_x) x0 = ext_x;
213 if (x1 >= (ext_x + ext_w)) x1 = ext_x + ext_w - 1;
214
215 w = (x1 - x0) + 1;
216 dst_itr = dst->pixels + (yi * dst->stride) + x0;
217
218 if (alpha == 32)
219 _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565);
220 else
221 _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha);
222 }
223 edges[j].x += edges[j].dx;
224 edges[j + 1].x += edges[j + 1].dx;
225 }
226 }
227
228 free(edges);
229 free(point);
230 free(sorted_index);
231}
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 @@
1#include "evas_common_soft16.h"
2#include "evas_soft16_scanline_fill.c"
3
4static inline int
5_is_empty_rectangle(const Eina_Rectangle *r)
6{
7 return (r->w < 1) || (r->h < 1);
8}
9
10static inline void
11_soft16_rectangle_draw_solid_solid(Soft16_Image *dst, int offset, int w, int h,
12 DATA16 rgb565)
13{
14 DATA16 *dst_itr;
15 int i;
16
17 dst_itr = dst->pixels + offset;
18
19 for (i = 0; i < h; i++, dst_itr += dst->stride)
20 _soft16_scanline_fill_solid_solid(dst_itr, w, rgb565);
21}
22
23static inline void
24_soft16_rectangle_draw_transp_solid(Soft16_Image *dst, int offset, int w, int h,
25 DATA16 rgb565, DATA8 alpha)
26{
27 DATA16 *dst_itr;
28 DATA32 rgb565_unpack;
29 int i;
30
31 dst_itr = dst->pixels + offset;
32 rgb565_unpack = RGB_565_UNPACK(rgb565);
33 alpha++;
34
35 for (i = 0; i < h; i++, dst_itr += dst->stride)
36 _soft16_scanline_fill_transp_solid(dst_itr, w, rgb565_unpack, alpha);
37}
38
39static void
40_soft16_rectangle_draw_int(Soft16_Image *dst, RGBA_Draw_Context *dc,
41 Eina_Rectangle dr)
42{
43 int dst_offset;
44
45 if (_is_empty_rectangle(&dr)) return;
46 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
47 if (_is_empty_rectangle(&dr)) return;
48
49 if (dc->clip.use)
50 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x,
51 dc->clip.y, dc->clip.w, dc->clip.h);
52 if (_is_empty_rectangle(&dr)) return;
53 if (A_VAL(&dc->col.col) == 0) return;
54
55 dst_offset = dr.x + (dr.y * dst->cache_entry.w);
56
57 if (!dst->cache_entry.flags.alpha)
58 {
59 DATA16 rgb565;
60 DATA8 alpha;
61
62 alpha = A_VAL(&dc->col.col) >> 3;
63 rgb565 = RGB_565_FROM_COMPONENTS(R_VAL(&dc->col.col),
64 G_VAL(&dc->col.col),
65 B_VAL(&dc->col.col));
66 if (alpha == 31)
67 _soft16_rectangle_draw_solid_solid
68 (dst, dst_offset, dr.w, dr.h, rgb565);
69 else if (alpha > 0)
70 _soft16_rectangle_draw_transp_solid
71 (dst, dst_offset, dr.w, dr.h, rgb565, alpha);
72 }
73 else
74 ERR("Unsupported feature: drawing rectangle to non-opaque destination.");
75}
76
77void
78evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc,
79 int x, int y, int w, int h)
80{
81 Eina_Rectangle dr;
82 Cutout_Rects *rects;
83 Cutout_Rect *r;
84 struct RGBA_Draw_Context_clip c_bkp;
85 int i;
86
87 /* handle cutouts here! */
88 EINA_RECTANGLE_SET(&dr, x, y, w, h);
89
90 if (_is_empty_rectangle(&dr)) return;
91 if (!(RECTS_INTERSECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
92 return;
93
94 /* no cutouts - cut right to the chase */
95 if (!dc->cutout.rects)
96 {
97 _soft16_rectangle_draw_int(dst, dc, dr);
98 return;
99 }
100
101 c_bkp = dc->clip;
102
103 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
104 evas_common_draw_context_clip_clip(dc, x, y, w, h);
105 /* our clip is 0 size.. abort */
106 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
107 {
108 dc->clip = c_bkp;
109 return;
110 }
111 rects = evas_common_draw_context_apply_cutouts(dc);
112 for (i = 0; i < rects->active; ++i)
113 {
114 r = rects->rects + i;
115 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
116 _soft16_rectangle_draw_int(dst, dc, dr);
117 }
118 evas_common_draw_context_apply_clear_cutouts(rects);
119 dc->clip = c_bkp;
120}
121
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 @@
1/** NOTE: This file is meant to be included by users **/
2
3/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive.
4 ** this is due our division by 256 when multiplying the color.
5 **/
6
7/*****************************************************************************
8 * Scanline processing
9 *
10 * _soft16_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13
14#include "evas_soft16_point_blend.c"
15
16/***********************************************************************
17 * Regular blend operations
18 */
19static void
20_soft16_scanline_blend_transp_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size)
21{
22 DATA16 *start, *end;
23
24 start = dst;
25 end = start + (size & ~7);
26
27 pld(alpha, 0);
28 pld(src, 0);
29
30 /* work on 8 pixels per time, do data preload */
31 while (start < end)
32 {
33 DATA8 alpha1, alpha2;
34
35 alpha1 = alpha[0];
36 alpha += 8;
37
38 /* empirical tests show these give the best performance */
39 pld(alpha, 8);
40 pld(src, 32);
41
42 src += 8;
43 start += 8;
44
45 alpha2 = alpha[-7];
46 _soft16_pt_blend_transp_solid(start - 8, src[-8], alpha1);
47
48 alpha1 = alpha[-6];
49 _soft16_pt_blend_transp_solid(start - 7, src[-7], alpha2);
50
51 alpha2 = alpha[-5];
52 _soft16_pt_blend_transp_solid(start - 6, src[-6], alpha1);
53
54 alpha1 = alpha[-4];
55 _soft16_pt_blend_transp_solid(start - 5, src[-5], alpha2);
56
57 alpha2 = alpha[-3];
58 _soft16_pt_blend_transp_solid(start - 4, src[-4], alpha1);
59
60 alpha1 = alpha[-2];
61 _soft16_pt_blend_transp_solid(start - 3, src[-3], alpha2);
62
63 alpha2 = alpha[-1];
64 _soft16_pt_blend_transp_solid(start - 2, src[-2], alpha1);
65
66 _soft16_pt_blend_transp_solid(start - 1, src[-1], alpha2);
67 }
68
69 /* remaining pixels (up to 7) */
70 end = start + (size & 7);
71 for (; start < end; start++, src++, alpha++)
72 _soft16_pt_blend_transp_solid(start, *src, *alpha);
73}
74
75static inline void
76_soft16_scanline_blend_solid_solid(DATA16 *src, DATA16 *dst, int size)
77{
78 memcpy(dst, src, size * sizeof(DATA16));
79}
80
81/***********************************************************************
82 * Blend operations taking an extra alpha (fade in, out)
83 */
84
85static void
86_soft16_scanline_blend_transp_solid_mul_alpha(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, const DATA8 rel_alpha)
87{
88 DATA16 *start, *end;
89
90 start = dst;
91 end = start + (size & ~7);
92
93 pld(alpha, 0);
94 pld(src, 0);
95
96 while (start < end)
97 {
98 DATA8 alpha1, alpha2;
99
100 alpha1 = alpha[0];
101 alpha += 8;
102
103 pld(alpha, 8);
104 pld(src, 32);
105
106 src += 8;
107 start += 8;
108
109 alpha2 = alpha[-7];
110 _soft16_pt_blend_transp_solid_mul_alpha
111 (start - 8, src[-8], alpha1, rel_alpha);
112
113 alpha1 = alpha[-6];
114 _soft16_pt_blend_transp_solid_mul_alpha
115 (start - 7, src[-7], alpha2, rel_alpha);
116
117 alpha2 = alpha[-5];
118 _soft16_pt_blend_transp_solid_mul_alpha
119 (start - 6, src[-6], alpha1, rel_alpha);
120
121 alpha1 = alpha[-4];
122 _soft16_pt_blend_transp_solid_mul_alpha
123 (start - 5, src[-5], alpha2, rel_alpha);
124
125 alpha2 = alpha[-3];
126 _soft16_pt_blend_transp_solid_mul_alpha
127 (start - 4, src[-4], alpha1, rel_alpha);
128
129 alpha1 = alpha[-2];
130 _soft16_pt_blend_transp_solid_mul_alpha
131 (start - 3, src[-3], alpha2, rel_alpha);
132
133 alpha2 = alpha[-1];
134 _soft16_pt_blend_transp_solid_mul_alpha
135 (start - 2, src[-2], alpha1, rel_alpha);
136
137 _soft16_pt_blend_transp_solid_mul_alpha
138 (start - 1, src[-1], alpha2, rel_alpha);
139 }
140
141 end = start + (size & 7);
142 for (; start < end; start++, src++, alpha++)
143 _soft16_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha);
144}
145
146static void
147_soft16_scanline_blend_solid_solid_mul_alpha(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha)
148{
149 DATA16 *start, *end;
150
151 start = dst;
152 end = start + (size & ~7);
153
154 pld(src, 0);
155
156 while (start < end)
157 {
158 pld(src, 32);
159 UNROLL8({
160 _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
161 start++;
162 src++;
163 });
164 }
165
166 end = start + (size & 7);
167 for (; start < end; start++, src++)
168 _soft16_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
169}
170
171/***********************************************************************
172 * Blend operations with extra alpha and multiply color
173 */
174
175static void
176_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)
177{
178 DATA16 *start, *end;
179
180 start = dst;
181 end = start + (size & ~7);
182
183 pld(alpha, 0);
184 pld(src, 0);
185
186 while (start < end)
187 {
188 DATA8 alpha1, alpha2;
189
190 alpha1 = alpha[0];
191 alpha += 8;
192
193 pld(src, 32);
194 pld(start, 32);
195
196 src += 8;
197 start += 8;
198
199 alpha2 = alpha[-7];
200 _soft16_pt_blend_transp_solid_mul_color_transp
201 (start - 8, src[-8], alpha1, rel_alpha, r, g, b);
202
203 alpha1 = alpha[-6];
204 _soft16_pt_blend_transp_solid_mul_color_transp
205 (start - 7, src[-7], alpha2, rel_alpha, r, g, b);
206
207 alpha2 = alpha[-5];
208 _soft16_pt_blend_transp_solid_mul_color_transp
209 (start - 6, src[-6], alpha1, rel_alpha, r, g, b);
210
211 alpha1 = alpha[-4];
212 _soft16_pt_blend_transp_solid_mul_color_transp
213 (start - 5, src[-5], alpha2, rel_alpha, r, g, b);
214
215 alpha2 = alpha[-3];
216 _soft16_pt_blend_transp_solid_mul_color_transp
217 (start - 4, src[-4], alpha1, rel_alpha, r, g, b);
218
219 alpha1 = alpha[-2];
220 _soft16_pt_blend_transp_solid_mul_color_transp
221 (start - 3, src[-3], alpha2, rel_alpha, r, g, b);
222
223 alpha2 = alpha[-1];
224 _soft16_pt_blend_transp_solid_mul_color_transp
225 (start - 2, src[-2], alpha1, rel_alpha, r, g, b);
226
227 _soft16_pt_blend_transp_solid_mul_color_transp
228 (start - 1, src[-1], alpha2, rel_alpha, r, g, b);
229 }
230
231 end = start + (size & 7);
232 for (; start < end; start++, src++, alpha++)
233 _soft16_pt_blend_transp_solid_mul_color_transp
234 (start, *src, *alpha, rel_alpha, r, g, b);
235}
236
237static void
238_soft16_scanline_blend_solid_solid_mul_color_transp(DATA16 *src, DATA16 *dst, int size, DATA8 rel_alpha, DATA16 r, DATA16 g, DATA16 b)
239{
240 DATA16 *start, *end;
241
242 start = dst;
243 end = start + (size & ~7);
244
245 pld(src, 0);
246
247 while (start < end)
248 {
249 pld(src, 32);
250 UNROLL8({
251 _soft16_pt_blend_solid_solid_mul_color_transp
252 (start, *src, rel_alpha, r, g, b);
253 start++;
254 src++;
255 });
256 }
257
258 end = start + (size & 7);
259 for (; start < end; start++, src++)
260 _soft16_pt_blend_solid_solid_mul_color_transp
261 (start, *src, rel_alpha, r, g, b);
262}
263
264/***********************************************************************
265 * Blend operations with extra multiply color
266 */
267
268static void
269_soft16_scanline_blend_transp_solid_mul_color_solid(DATA16 *src, DATA8 *alpha, DATA16 *dst, int size, DATA16 r, DATA16 g, DATA16 b)
270{
271 DATA16 *start, *end;
272
273 start = dst;
274 end = start + (size & ~7);
275
276 pld(alpha, 0);
277 pld(src, 0);
278
279 while (start < end)
280 {
281 DATA8 alpha1, alpha2;
282
283 alpha1 = alpha[0];
284 alpha += 8;
285
286 pld(alpha, 8);
287 pld(src, 32);
288
289 src += 8;
290 start += 8;
291
292 alpha2 = alpha[-7];
293 _soft16_pt_blend_transp_solid_mul_color_solid
294 (start - 8, src[-8], alpha1, r, g, b);
295
296 alpha1 = alpha[-6];
297 _soft16_pt_blend_transp_solid_mul_color_solid
298 (start - 7, src[-7], alpha2, r, g, b);
299
300 alpha2 = alpha[-5];
301 _soft16_pt_blend_transp_solid_mul_color_solid
302 (start - 6, src[-6], alpha1, r, g, b);
303
304 alpha1 = alpha[-4];
305 _soft16_pt_blend_transp_solid_mul_color_solid
306 (start - 5, src[-5], alpha2, r, g, b);
307
308 alpha2 = alpha[-3];
309 _soft16_pt_blend_transp_solid_mul_color_solid
310 (start - 4, src[-4], alpha1, r, g, b);
311
312 alpha1 = alpha[-2];
313 _soft16_pt_blend_transp_solid_mul_color_solid
314 (start - 3, src[-3], alpha2, r, g, b);
315
316 alpha2 = alpha[-1];
317 _soft16_pt_blend_transp_solid_mul_color_solid
318 (start - 2, src[-2], alpha1, r, g, b);
319
320 _soft16_pt_blend_transp_solid_mul_color_solid
321 (start - 1, src[-1], alpha2, r, g, b);
322 }
323
324 end = start + (size & 7);
325 for (; start < end; start++, src++, alpha++)
326 _soft16_pt_blend_transp_solid_mul_color_solid
327 (start, *src, *alpha, r, g, b);
328}
329
330static void
331_soft16_scanline_blend_solid_solid_mul_color_solid(DATA16 *src, DATA16 *dst, int size, DATA8 r, DATA8 g, DATA8 b)
332{
333 DATA16 *start, *end;
334
335 start = dst;
336 end = start + (size & ~7);
337
338 pld(src, 0);
339
340 while (start < end)
341 {
342 pld(src, 32);
343 UNROLL8({
344 _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b);
345 start++;
346 src++;
347 });
348 }
349
350 end = start + (size & 7);
351 for (; start < end; start++, src++)
352 _soft16_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b);
353}
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 @@
1/** NOTE: This file is meant to be included by users **/
2
3/*****************************************************************************
4 * Point processing
5 *
6 * _soft16_pt_<description>_<src>_<dst>[_<modifier>]()
7 *
8 * Scanline processing
9 *
10 * _soft16_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13EFL_ALWAYS_INLINE void
14_soft16_pt_fill_solid_solid(DATA16 *dst, DATA16 rgb565)
15{
16 *dst = rgb565;
17}
18
19static void
20_soft16_scanline_fill_solid_solid(DATA16 *dst, int size, DATA16 rgb565)
21{
22 DATA16 *start, *end;
23 DATA32 rgb565_double;
24
25 start = dst;
26
27 if ((long)start & 0x2)
28 {
29 *start = rgb565;
30 start++;
31 size--;
32 }
33
34 end = start + (size & ~7);
35
36 rgb565_double = (rgb565 << 16) | rgb565;
37
38 while (start < end)
39 {
40 DATA32 *p = (DATA32 *)start;
41
42 p[0] = rgb565_double;
43 p[1] = rgb565_double;
44 p[2] = rgb565_double;
45 p[3] = rgb565_double;
46
47 start += 8;
48 }
49
50 end = start + (size & 7);
51 for (; start < end; start++)
52 *start = rgb565;
53}
54
55EFL_ALWAYS_INLINE void
56_soft16_pt_fill_transp_solid(DATA16 *dst, DATA32 rgb565_unpack, DATA8 alpha)
57{
58 DATA32 d;
59
60 d = RGB_565_UNPACK(*dst);
61 d = RGB_565_UNPACKED_BLEND(rgb565_unpack, d, alpha);
62 *dst = RGB_565_PACK(d);
63}
64
65static void
66_soft16_scanline_fill_transp_solid(DATA16 *dst, int size, DATA32 rgb565_unpack, DATA8 alpha)
67{
68 DATA16 *start, *end;
69
70 start = dst;
71 pld(start, 0);
72 end = start + (size & ~7);
73
74 while (start < end)
75 {
76 pld(start, 32);
77 UNROLL8({
78 _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha);
79 start++;
80 });
81 }
82
83 end = start + (size & 7);
84 for (; start < end; start++)
85 _soft16_pt_fill_transp_solid(start, rgb565_unpack, alpha);
86}
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 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir)/src/lib/include \
8@FREETYPE_CFLAGS@ \
9@PIXMAN_CFLAGS@ \
10@VALGRIND_CFLAGS@ \
11@EINA_CFLAGS@ \
12@EET_CFLAGS@ \
13@pthread_cflags@
14
15noinst_LTLIBRARIES = libevas_engine_common_8.la
16
17libevas_engine_common_8_la_SOURCES = \
18evas_soft8_dither_mask.c \
19evas_soft8_font.c \
20evas_soft8_image_unscaled.c \
21evas_soft8_main.c \
22evas_soft8_rectangle.c \
23evas_soft8_line.c \
24evas_soft8_polygon.c \
25evas_soft8_image_scaled_sampled.c
26
27
28libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h
29
30EXTRA_DIST = \
31evas_soft8_scanline_blend.c \
32evas_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/engines/common_8
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_engine_common_8_la_LIBADD =
61am_libevas_engine_common_8_la_OBJECTS = evas_soft8_dither_mask.lo \
62 evas_soft8_font.lo evas_soft8_image_unscaled.lo \
63 evas_soft8_main.lo evas_soft8_rectangle.lo evas_soft8_line.lo \
64 evas_soft8_polygon.lo evas_soft8_image_scaled_sampled.lo
65libevas_engine_common_8_la_OBJECTS = \
66 $(am_libevas_engine_common_8_la_OBJECTS)
67AM_V_lt = $(am__v_lt_$(V))
68am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
69am__v_lt_0 = --silent
70DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
71depcomp = $(SHELL) $(top_srcdir)/depcomp
72am__depfiles_maybe = depfiles
73am__mv = mv -f
74COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
75 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
76LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
77 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
78 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
79 $(AM_CFLAGS) $(CFLAGS)
80AM_V_CC = $(am__v_CC_$(V))
81am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
82am__v_CC_0 = @echo " CC " $@;
83AM_V_at = $(am__v_at_$(V))
84am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
85am__v_at_0 = @
86CCLD = $(CC)
87LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
88 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
89 $(AM_LDFLAGS) $(LDFLAGS) -o $@
90AM_V_CCLD = $(am__v_CCLD_$(V))
91am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
92am__v_CCLD_0 = @echo " CCLD " $@;
93AM_V_GEN = $(am__v_GEN_$(V))
94am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
95am__v_GEN_0 = @echo " GEN " $@;
96SOURCES = $(libevas_engine_common_8_la_SOURCES)
97DIST_SOURCES = $(libevas_engine_common_8_la_SOURCES)
98ETAGS = etags
99CTAGS = ctags
100DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
101ACLOCAL = @ACLOCAL@
102ALLOCA = @ALLOCA@
103AMTAR = @AMTAR@
104AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
105AR = @AR@
106AS = @AS@
107AUTOCONF = @AUTOCONF@
108AUTOHEADER = @AUTOHEADER@
109AUTOMAKE = @AUTOMAKE@
110AWK = @AWK@
111CC = @CC@
112CCDEPMODE = @CCDEPMODE@
113CFLAGS = @CFLAGS@
114CHECK_CFLAGS = @CHECK_CFLAGS@
115CHECK_LIBS = @CHECK_LIBS@
116CPP = @CPP@
117CPPFLAGS = @CPPFLAGS@
118CXX = @CXX@
119CXXCPP = @CXXCPP@
120CXXDEPMODE = @CXXDEPMODE@
121CXXFLAGS = @CXXFLAGS@
122CYGPATH_W = @CYGPATH_W@
123DEFS = @DEFS@
124DEPDIR = @DEPDIR@
125DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
126DIRECTFB_LIBS = @DIRECTFB_LIBS@
127DLLTOOL = @DLLTOOL@
128DSYMUTIL = @DSYMUTIL@
129DUMPBIN = @DUMPBIN@
130ECHO_C = @ECHO_C@
131ECHO_N = @ECHO_N@
132ECHO_T = @ECHO_T@
133ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
134ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
135EDB_CFLAGS = @EDB_CFLAGS@
136EDB_LIBS = @EDB_LIBS@
137EDJE_CFLAGS = @EDJE_CFLAGS@
138EDJE_LIBS = @EDJE_LIBS@
139EET_CFLAGS = @EET_CFLAGS@
140EET_LIBS = @EET_LIBS@
141EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
142EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
143EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
144EGREP = @EGREP@
145EINA_CFLAGS = @EINA_CFLAGS@
146EINA_LIBS = @EINA_LIBS@
147EVAS_CFLAGS = @EVAS_CFLAGS@
148EVAS_LIBS = @EVAS_LIBS@
149EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
150EVIL_CFLAGS = @EVIL_CFLAGS@
151EVIL_LIBS = @EVIL_LIBS@
152EXEEXT = @EXEEXT@
153EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
154EXOTIC_LIBS = @EXOTIC_LIBS@
155FGREP = @FGREP@
156FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
157FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
158FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
159FREETYPE_LIBS = @FREETYPE_LIBS@
160FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
161FRIBIDI_LIBS = @FRIBIDI_LIBS@
162GL_EET_CFLAGS = @GL_EET_CFLAGS@
163GL_EET_LIBS = @GL_EET_LIBS@
164GREP = @GREP@
165HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
166HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
167INSTALL = @INSTALL@
168INSTALL_DATA = @INSTALL_DATA@
169INSTALL_PROGRAM = @INSTALL_PROGRAM@
170INSTALL_SCRIPT = @INSTALL_SCRIPT@
171INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
172LD = @LD@
173LDFLAGS = @LDFLAGS@
174LIBOBJS = @LIBOBJS@
175LIBS = @LIBS@
176LIBTOOL = @LIBTOOL@
177LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
178LINEBREAK_LIBS = @LINEBREAK_LIBS@
179LIPO = @LIPO@
180LN_S = @LN_S@
181LTLIBOBJS = @LTLIBOBJS@
182MAKEINFO = @MAKEINFO@
183MKDIR_P = @MKDIR_P@
184MODULE_ARCH = @MODULE_ARCH@
185NM = @NM@
186NMEDIT = @NMEDIT@
187OBJC = @OBJC@
188OBJCDEPMODE = @OBJCDEPMODE@
189OBJCFLAGS = @OBJCFLAGS@
190OBJDUMP = @OBJDUMP@
191OBJEXT = @OBJEXT@
192OTOOL = @OTOOL@
193OTOOL64 = @OTOOL64@
194PACKAGE = @PACKAGE@
195PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
196PACKAGE_NAME = @PACKAGE_NAME@
197PACKAGE_STRING = @PACKAGE_STRING@
198PACKAGE_TARNAME = @PACKAGE_TARNAME@
199PACKAGE_URL = @PACKAGE_URL@
200PACKAGE_VERSION = @PACKAGE_VERSION@
201PATH_SEPARATOR = @PATH_SEPARATOR@
202PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
203PIXMAN_LIBS = @PIXMAN_LIBS@
204PKG_CONFIG = @PKG_CONFIG@
205PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
206PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
207PNG_CFLAGS = @PNG_CFLAGS@
208PNG_LIBS = @PNG_LIBS@
209RANLIB = @RANLIB@
210SDL_CFLAGS = @SDL_CFLAGS@
211SDL_LIBS = @SDL_LIBS@
212SED = @SED@
213SET_MAKE = @SET_MAKE@
214SHELL = @SHELL@
215SHM_OPEN_LINK = @SHM_OPEN_LINK@
216STRIP = @STRIP@
217SVG_CFLAGS = @SVG_CFLAGS@
218SVG_LIBS = @SVG_LIBS@
219VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
220VALGRIND_LIBS = @VALGRIND_LIBS@
221VERSION = @VERSION@
222VMAJ = @VMAJ@
223WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
224WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
225XCB_CFLAGS = @XCB_CFLAGS@
226XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
227XCB_GL_LIBS = @XCB_GL_LIBS@
228XCB_LIBS = @XCB_LIBS@
229XEXT_CFLAGS = @XEXT_CFLAGS@
230XEXT_LIBS = @XEXT_LIBS@
231XMKMF = @XMKMF@
232X_CFLAGS = @X_CFLAGS@
233X_EXTRA_LIBS = @X_EXTRA_LIBS@
234X_LIBS = @X_LIBS@
235X_PRE_LIBS = @X_PRE_LIBS@
236abs_builddir = @abs_builddir@
237abs_srcdir = @abs_srcdir@
238abs_top_builddir = @abs_top_builddir@
239abs_top_srcdir = @abs_top_srcdir@
240ac_ct_CC = @ac_ct_CC@
241ac_ct_CXX = @ac_ct_CXX@
242ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
243ac_ct_OBJC = @ac_ct_OBJC@
244altivec_cflags = @altivec_cflags@
245am__include = @am__include@
246am__leading_dot = @am__leading_dot@
247am__quote = @am__quote@
248am__tar = @am__tar@
249am__untar = @am__untar@
250bindir = @bindir@
251build = @build@
252build_alias = @build_alias@
253build_cpu = @build_cpu@
254build_os = @build_os@
255build_vendor = @build_vendor@
256builddir = @builddir@
257datadir = @datadir@
258datarootdir = @datarootdir@
259dlopen_libs = @dlopen_libs@
260docdir = @docdir@
261dvidir = @dvidir@
262edje_cc = @edje_cc@
263efl_doxygen = @efl_doxygen@
264efl_have_doxygen = @efl_have_doxygen@
265evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
266evas_engine_buffer_libs = @evas_engine_buffer_libs@
267evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
268evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
269evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
270evas_engine_directfb_libs = @evas_engine_directfb_libs@
271evas_engine_fb_cflags = @evas_engine_fb_cflags@
272evas_engine_fb_libs = @evas_engine_fb_libs@
273evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
274evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
275evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
276evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
277evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
278evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
279evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
280evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
281evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
282evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
283evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
284evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
285evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
286evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
287evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
288evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
289evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
290evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
291evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
292evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
293evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
294evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
295evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
296evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
297evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
298evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
299evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
300evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
301evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
302evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
303evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
304evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
305evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
306evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
307evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
308evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
309evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
310evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
311evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
312evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
313evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
314evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
315evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
316evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
317evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
318evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
319evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
320evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
321evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
322evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
323evas_image_loader_png_libs = @evas_image_loader_png_libs@
324evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
325evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
326evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
327evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
328evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
329evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
330evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
331evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
332evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
333evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
334evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
335evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
336exec_prefix = @exec_prefix@
337have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
338have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
339have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
340have_evas_engine_software_x11 = @have_evas_engine_software_x11@
341have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
342have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
343have_lcov = @have_lcov@
344host = @host@
345host_alias = @host_alias@
346host_cpu = @host_cpu@
347host_os = @host_os@
348host_vendor = @host_vendor@
349htmldir = @htmldir@
350includedir = @includedir@
351infodir = @infodir@
352install_sh = @install_sh@
353libdir = @libdir@
354libexecdir = @libexecdir@
355localedir = @localedir@
356localstatedir = @localstatedir@
357lt_ECHO = @lt_ECHO@
358lt_enable_auto_import = @lt_enable_auto_import@
359mandir = @mandir@
360mkdir_p = @mkdir_p@
361oldincludedir = @oldincludedir@
362pdfdir = @pdfdir@
363pkgconfig_requires_private = @pkgconfig_requires_private@
364prefix = @prefix@
365program_transform_name = @program_transform_name@
366psdir = @psdir@
367pthread_cflags = @pthread_cflags@
368pthread_libs = @pthread_libs@
369release_info = @release_info@
370requirement_evas = @requirement_evas@
371sbindir = @sbindir@
372sharedstatedir = @sharedstatedir@
373srcdir = @srcdir@
374sysconfdir = @sysconfdir@
375target_alias = @target_alias@
376top_build_prefix = @top_build_prefix@
377top_builddir = @top_builddir@
378top_srcdir = @top_srcdir@
379version_info = @version_info@
380MAINTAINERCLEANFILES = Makefile.in
381AM_CPPFLAGS = \
382-I. \
383-I$(top_srcdir)/src/lib \
384-I$(top_srcdir)/src/lib/include \
385@FREETYPE_CFLAGS@ \
386@PIXMAN_CFLAGS@ \
387@VALGRIND_CFLAGS@ \
388@EINA_CFLAGS@ \
389@EET_CFLAGS@ \
390@pthread_cflags@
391
392noinst_LTLIBRARIES = libevas_engine_common_8.la
393libevas_engine_common_8_la_SOURCES = \
394evas_soft8_dither_mask.c \
395evas_soft8_font.c \
396evas_soft8_image_unscaled.c \
397evas_soft8_main.c \
398evas_soft8_rectangle.c \
399evas_soft8_line.c \
400evas_soft8_polygon.c \
401evas_soft8_image_scaled_sampled.c
402
403libevas_engine_common_8_la_DEPENDENCIES = $(top_builddir)/config.h
404EXTRA_DIST = \
405evas_soft8_scanline_blend.c \
406evas_soft8_scanline_fill.c
407
408all: all-am
409
410.SUFFIXES:
411.SUFFIXES: .c .lo .o .obj
412$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
413 @for dep in $?; do \
414 case '$(am__configure_deps)' in \
415 *$$dep*) \
416 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
417 && { if test -f $@; then exit 0; else break; fi; }; \
418 exit 1;; \
419 esac; \
420 done; \
421 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile'; \
422 $(am__cd) $(top_srcdir) && \
423 $(AUTOMAKE) --gnu src/lib/engines/common_8/Makefile
424.PRECIOUS: Makefile
425Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
426 @case '$?' in \
427 *config.status*) \
428 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
429 *) \
430 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
431 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
432 esac;
433
434$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
435 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
436
437$(top_srcdir)/configure: $(am__configure_deps)
438 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
439$(ACLOCAL_M4): $(am__aclocal_m4_deps)
440 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
441$(am__aclocal_m4_deps):
442
443clean-noinstLTLIBRARIES:
444 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
445 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
446 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
447 test "$$dir" != "$$p" || dir=.; \
448 echo "rm -f \"$${dir}/so_locations\""; \
449 rm -f "$${dir}/so_locations"; \
450 done
451libevas_engine_common_8.la: $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_DEPENDENCIES)
452 $(AM_V_CCLD)$(LINK) $(libevas_engine_common_8_la_OBJECTS) $(libevas_engine_common_8_la_LIBADD) $(LIBS)
453
454mostlyclean-compile:
455 -rm -f *.$(OBJEXT)
456
457distclean-compile:
458 -rm -f *.tab.c
459
460@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_dither_mask.Plo@am__quote@
461@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_font.Plo@am__quote@
462@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_scaled_sampled.Plo@am__quote@
463@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_image_unscaled.Plo@am__quote@
464@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_line.Plo@am__quote@
465@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_main.Plo@am__quote@
466@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_polygon.Plo@am__quote@
467@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_soft8_rectangle.Plo@am__quote@
468
469.c.o:
470@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
471@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
472@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
473@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
474@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
475@am__fastdepCC_FALSE@ $(COMPILE) -c $<
476
477.c.obj:
478@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
479@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
480@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
481@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
482@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
483@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
484
485.c.lo:
486@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
487@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
488@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
489@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
490@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
491@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
492
493mostlyclean-libtool:
494 -rm -f *.lo
495
496clean-libtool:
497 -rm -rf .libs _libs
498
499ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
500 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
501 unique=`for i in $$list; do \
502 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
503 done | \
504 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
505 END { if (nonempty) { for (i in files) print i; }; }'`; \
506 mkid -fID $$unique
507tags: TAGS
508
509TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
510 $(TAGS_FILES) $(LISP)
511 set x; \
512 here=`pwd`; \
513 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
514 unique=`for i in $$list; do \
515 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
516 done | \
517 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
518 END { if (nonempty) { for (i in files) print i; }; }'`; \
519 shift; \
520 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
521 test -n "$$unique" || unique=$$empty_fix; \
522 if test $$# -gt 0; then \
523 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
524 "$$@" $$unique; \
525 else \
526 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
527 $$unique; \
528 fi; \
529 fi
530ctags: CTAGS
531CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
532 $(TAGS_FILES) $(LISP)
533 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
534 unique=`for i in $$list; do \
535 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
536 done | \
537 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
538 END { if (nonempty) { for (i in files) print i; }; }'`; \
539 test -z "$(CTAGS_ARGS)$$unique" \
540 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
541 $$unique
542
543GTAGS:
544 here=`$(am__cd) $(top_builddir) && pwd` \
545 && $(am__cd) $(top_srcdir) \
546 && gtags -i $(GTAGS_ARGS) "$$here"
547
548distclean-tags:
549 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
550
551distdir: $(DISTFILES)
552 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
553 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
554 list='$(DISTFILES)'; \
555 dist_files=`for file in $$list; do echo $$file; done | \
556 sed -e "s|^$$srcdirstrip/||;t" \
557 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
558 case $$dist_files in \
559 */*) $(MKDIR_P) `echo "$$dist_files" | \
560 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
561 sort -u` ;; \
562 esac; \
563 for file in $$dist_files; do \
564 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
565 if test -d $$d/$$file; then \
566 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
567 if test -d "$(distdir)/$$file"; then \
568 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
569 fi; \
570 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
571 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
572 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
573 fi; \
574 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
575 else \
576 test -f "$(distdir)/$$file" \
577 || cp -p $$d/$$file "$(distdir)/$$file" \
578 || exit 1; \
579 fi; \
580 done
581check-am: all-am
582check: check-am
583all-am: Makefile $(LTLIBRARIES)
584installdirs:
585install: install-am
586install-exec: install-exec-am
587install-data: install-data-am
588uninstall: uninstall-am
589
590install-am: all-am
591 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
592
593installcheck: installcheck-am
594install-strip:
595 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
596 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
597 `test -z '$(STRIP)' || \
598 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
599mostlyclean-generic:
600
601clean-generic:
602
603distclean-generic:
604 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
605 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
606
607maintainer-clean-generic:
608 @echo "This command is intended for maintainers to use"
609 @echo "it deletes files that may require special tools to rebuild."
610 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
611clean: clean-am
612
613clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
614 mostlyclean-am
615
616distclean: distclean-am
617 -rm -rf ./$(DEPDIR)
618 -rm -f Makefile
619distclean-am: clean-am distclean-compile distclean-generic \
620 distclean-tags
621
622dvi: dvi-am
623
624dvi-am:
625
626html: html-am
627
628html-am:
629
630info: info-am
631
632info-am:
633
634install-data-am:
635
636install-dvi: install-dvi-am
637
638install-dvi-am:
639
640install-exec-am:
641
642install-html: install-html-am
643
644install-html-am:
645
646install-info: install-info-am
647
648install-info-am:
649
650install-man:
651
652install-pdf: install-pdf-am
653
654install-pdf-am:
655
656install-ps: install-ps-am
657
658install-ps-am:
659
660installcheck-am:
661
662maintainer-clean: maintainer-clean-am
663 -rm -rf ./$(DEPDIR)
664 -rm -f Makefile
665maintainer-clean-am: distclean-am maintainer-clean-generic
666
667mostlyclean: mostlyclean-am
668
669mostlyclean-am: mostlyclean-compile mostlyclean-generic \
670 mostlyclean-libtool
671
672pdf: pdf-am
673
674pdf-am:
675
676ps: ps-am
677
678ps-am:
679
680uninstall-am:
681
682.MAKE: install-am install-strip
683
684.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
685 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
686 distclean-compile distclean-generic distclean-libtool \
687 distclean-tags distdir dvi dvi-am html html-am info info-am \
688 install install-am install-data install-data-am install-dvi \
689 install-dvi-am install-exec install-exec-am install-html \
690 install-html-am install-info install-info-am install-man \
691 install-pdf install-pdf-am install-ps install-ps-am \
692 install-strip installcheck installcheck-am installdirs \
693 maintainer-clean maintainer-clean-generic mostlyclean \
694 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
695 pdf pdf-am ps ps-am tags uninstall uninstall-am
696
697
698# Tell versions [3.59,3.63) of GNU make to not export all variables.
699# Otherwise a system limit (for SysV at least) may be exceeded.
700.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 @@
1#include "evas_common_soft8.h"
2
3EFL_ALWAYS_INLINE void
4_soft8_convert_from_rgba_pt(const DATA32 * src, DATA8 * dst, DATA8 * alpha)
5{
6 if (A_VAL(src) == 0)
7 {
8 *dst = 0;
9 *alpha = 0;
10 }
11 else
12 {
13 *dst = GRY_8_FROM_RGB(src);
14 *alpha = A_VAL(src);
15 }
16}
17
18static inline void
19_soft8_convert_from_rgba_scanline(const DATA32 * src, DATA8 * dst,
20 DATA8 * alpha, const int w)
21{
22 int x, m;
23
24 m = (w & ~7);
25 x = 0;
26 pld(src, 0);
27
28 while (x < m)
29 {
30 pld(src, 32);
31 UNROLL8(
32 {
33 _soft8_convert_from_rgba_pt(src, dst, alpha);
34 src++; dst++; alpha++; x++;}
35 );
36 }
37
38 for (; x < w; x++, src++, dst++, alpha++)
39 _soft8_convert_from_rgba_pt(src, dst, alpha);
40}
41
42void
43evas_common_soft8_image_convert_from_rgba(Soft8_Image * im, const DATA32 * src)
44{
45 const DATA32 *sp;
46 DATA8 *dp;
47 DATA8 *ap;
48 unsigned int y;
49
50 sp = src;
51 dp = im->pixels;
52 ap = im->alpha;
53
54 for (y = 0; y < im->cache_entry.h;
55 y++, sp += im->cache_entry.w, dp += im->stride, ap += im->stride)
56 _soft8_convert_from_rgba_scanline(sp, dp, ap, im->cache_entry.w);
57}
58
59EFL_ALWAYS_INLINE void
60_soft8_convert_from_rgb_pt(const DATA32 * src, DATA8 * dst)
61{
62 *dst = GRY_8_FROM_RGB(src);
63}
64
65static inline void
66_soft8_convert_from_rgb_scanline(const DATA32 * src, DATA8 * dst, const int w)
67{
68 int x, m;
69
70 m = (w & ~7);
71 x = 0;
72 pld(src, 0);
73
74 while (x < m)
75 {
76 pld(src, 32);
77 UNROLL8(
78 {
79 _soft8_convert_from_rgb_pt(src, dst); src++; dst++; x++;}
80 );
81 }
82
83 for (; x < w; x++, src++, dst++)
84 _soft8_convert_from_rgb_pt(src, dst);
85}
86
87void
88evas_common_soft8_image_convert_from_rgb(Soft8_Image * im, const DATA32 * src)
89{
90 const DATA32 *sp;
91 DATA8 *dp;
92 unsigned int y;
93
94 sp = src;
95 dp = im->pixels;
96
97 for (y = 0; y < im->cache_entry.h;
98 y++, sp += im->cache_entry.w, dp += im->stride)
99 _soft8_convert_from_rgb_scanline(sp, dp, im->cache_entry.w);
100}
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 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_blend.c"
3
4EFL_ALWAYS_INLINE void
5_glyph_pt_mask_solid_solid(DATA8 * dst, const DATA8 gry8, const DATA8 * mask)
6{
7 DATA8 alpha = *mask;
8
9 if (alpha == 0xff)
10 *dst = gry8;
11 else if (alpha > 0)
12 {
13 *dst = GRY_8_BLEND_UNMUL(gry8, *dst, alpha);
14 }
15}
16
17static void
18_glyph_scanline_mask_solid_solid(DATA8 * dst,
19 int size, const DATA8 gry8, const DATA8 * mask)
20{
21 DATA8 *start, *end;
22
23 start = dst;
24 pld(start, 0);
25 pld(mask, 0);
26 end = start + (size & ~3);
27
28 while (start < end)
29 {
30 pld(start, 8);
31 pld(mask, 4);
32 UNROLL4(
33 {
34 _glyph_pt_mask_solid_solid(start, gry8, mask);
35 start++; mask++;}
36 );
37 }
38
39 end = start + (size & 3);
40 for (; start < end; start++, mask++)
41 _glyph_pt_mask_solid_solid(start, gry8, mask);
42}
43
44EFL_ALWAYS_INLINE void
45_glyph_pt_mask_transp_solid(DATA8 * dst,
46 DATA8 gry8, DATA8 alpha, const DATA8 * mask)
47{
48 int rel_alpha;
49
50 rel_alpha = *mask;
51 alpha = (alpha * rel_alpha) >> 8;
52 if (alpha == 0)
53 return;
54
55 alpha++;
56
57 *dst = GRY_8_BLEND((gry8 * rel_alpha) >> 8, *dst, alpha);
58}
59
60static void
61_glyph_scanline_mask_transp_solid(DATA8 * dst,
62 int size,
63 const DATA8 gry8,
64 const DATA8 rel_alpha, const DATA8 * mask)
65{
66 DATA8 *start, *end;
67
68 start = dst;
69 pld(start, 0);
70 pld(mask, 0);
71 end = start + (size & ~3);
72
73 while (start < end)
74 {
75 pld(start, 8);
76 pld(mask, 4);
77 UNROLL4(
78 {
79 _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask);
80 start++; mask++;}
81 );
82 }
83
84 end = start + (size & 3);
85 for (; start < end; start++, mask++)
86 _glyph_pt_mask_transp_solid(start, gry8, rel_alpha, mask);
87}
88
89static inline void
90_calc_ext(const Soft8_Image * dst, const RGBA_Draw_Context * dc,
91 Eina_Rectangle * ext)
92{
93 EINA_RECTANGLE_SET(ext, 0, 0, dst->cache_entry.w, dst->cache_entry.h);
94
95 if (dc->clip.use)
96 {
97 int v;
98
99 EINA_RECTANGLE_SET(ext, dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
100 if (ext->x < 0)
101 {
102 ext->w += ext->x;
103 ext->x = 0;
104 }
105 if (ext->y < 0)
106 {
107 ext->h += ext->y;
108 ext->y = 0;
109 }
110
111 v = dst->cache_entry.w - ext->x;
112 if (ext->w > v)
113 ext->w = v;
114
115 v = dst->cache_entry.h - ext->y;
116 if (ext->h > v)
117 ext->h = v;
118 }
119}
120
121static inline void
122_glyph_scanline(Soft8_Image * dst, const DATA8 * p_mask,
123 const Eina_Rectangle ext, int dx, int dy, int max_x, int max_y,
124 int w, DATA8 alpha, const DATA8 gry8)
125{
126 int size, in_x, in_w;
127 DATA8 *p_pixels;
128
129 if ((dx >= max_x) || (dy < ext.y) || (dy >= max_y))
130 return;
131
132 in_x = 0;
133 in_w = 0;
134
135 if (dx + w > max_x)
136 in_w += (dx + w) - max_x;
137
138 if (dx < ext.x)
139 {
140 in_w += ext.x - dx;
141 in_x = ext.x - dx;
142 dx = ext.x;
143 }
144
145 size = w - in_w;
146 p_pixels = dst->pixels + (dy * dst->stride) + dx;
147 p_mask += in_x;
148
149 if (size > 1)
150 {
151 if (alpha == 0xff)
152 _glyph_scanline_mask_solid_solid(p_pixels, size, gry8, p_mask);
153 else if (alpha != 0)
154 _glyph_scanline_mask_transp_solid
155 (p_pixels, size, gry8, alpha, p_mask);
156 }
157 else if (size == 1)
158 {
159 if (alpha == 0xff)
160 _glyph_pt_mask_solid_solid(p_pixels, gry8, p_mask);
161 else if (alpha != 0)
162 _glyph_pt_mask_transp_solid(p_pixels, gry8, alpha, p_mask);
163 }
164}
165
166static void
167_soft8_font_glyph_draw_grayscale(Soft8_Image * dst,
168 RGBA_Draw_Context * dc __UNUSED__,
169 RGBA_Font_Glyph * fg __UNUSED__, int x, int y,
170 DATA8 alpha, DATA8 gry8,
171 const Eina_Rectangle ext, int bw, int bh,
172 int bpitch, const DATA8 * bitmap)
173{
174 int i, max_x, max_y;
175
176 max_x = ext.x + ext.w;
177 max_y = ext.y + ext.h;
178
179 for (i = 0; i < bh; i++, bitmap += bpitch)
180 _glyph_scanline(dst, bitmap, ext, x, y + i, max_x, max_y, bw,
181 alpha, gry8);
182}
183
184static inline void
185_glyph_create_mask_line(DATA8 * mask, const DATA8 * bitmap, int w)
186{
187 const DATA8 bitrepl[2] = { 0x0, 0xff };
188 int i;
189
190 for (i = 0; i < w; i += 8, bitmap++)
191 {
192 int j, size;
193 DATA32 bits;
194
195 if (i + 8 < w)
196 size = 8;
197 else
198 size = w - i;
199
200 bits = *bitmap;
201
202 for (j = size - 1; j >= 0; j--, mask++)
203 *mask = bitrepl[(bits >> j) & 0x1];
204 }
205}
206
207static void
208_soft8_font_glyph_draw_mono(Soft8_Image * dst,
209 RGBA_Draw_Context * dc __UNUSED__,
210 RGBA_Font_Glyph * fg __UNUSED__, int x, int y,
211 DATA8 alpha, DATA8 gry8, const Eina_Rectangle ext,
212 int bw, int bh, int bpitch, const DATA8 * bitmap)
213{
214 DATA8 *mask;
215 int i, max_x, max_y;
216
217 max_x = ext.x + ext.w;
218 max_y = ext.y + ext.h;
219
220 mask = alloca(bpitch);
221 for (i = 0; i < bh; i++, bitmap += bpitch)
222 {
223 _glyph_create_mask_line(mask, bitmap, bw);
224 _glyph_scanline(dst, mask, ext, x, y + i, max_x, max_y, bw,
225 alpha, gry8);
226 }
227}
228
229void
230evas_common_soft8_font_glyph_draw(void *data, void *dest __UNUSED__, void *context,
231 RGBA_Font_Glyph * fg, int x, int y)
232{
233 Soft8_Image *dst;
234 RGBA_Draw_Context *dc;
235 const DATA8 *bitmap;
236 DATA8 alpha; // r, g, b
237 DATA8 gry8;
238 Eina_Rectangle ext;
239 int bpitch, bw, bh;
240
241 dst = data;
242 dc = context;
243
244 alpha = A_VAL(&dc->col.col);
245 if (alpha == 0)
246 return;
247
248 gry8 = GRY_8_FROM_RGB(&dc->col.col);
249
250 /*
251 * if (r > alpha) r = alpha;
252 * if (g > alpha) g = alpha;
253 * if (b > alpha) b = alpha;
254 *
255 * gry8 = GRY_8_FROM_COMPONENTS(r, g, b);
256 */
257
258 bitmap = fg->glyph_out->bitmap.buffer;
259 bh = fg->glyph_out->bitmap.rows;
260 bw = fg->glyph_out->bitmap.width;
261 bpitch = fg->glyph_out->bitmap.pitch;
262 if (bpitch < bw)
263 bpitch = bw;
264
265 _calc_ext(dst, dc, &ext);
266
267 if ((fg->glyph_out->bitmap.num_grays == 256) &&
268 (fg->glyph_out->bitmap.pixel_mode == ft_pixel_mode_grays))
269 _soft8_font_glyph_draw_grayscale(dst, dc, fg, x, y, alpha, gry8,
270 ext, bw, bh, bpitch, bitmap);
271 else
272 _soft8_font_glyph_draw_mono(dst, dc, fg, x, y, alpha, gry8,
273 ext, bw, bh, bpitch, bitmap);
274}
275
276void *
277evas_common_soft8_font_glyph_new(void *data __UNUSED__, RGBA_Font_Glyph * fg __UNUSED__)
278{
279 return (void *)1; /* core requires != NULL to work */
280}
281
282void
283evas_common_soft8_font_glyph_free(void *ext_dat __UNUSED__)
284{
285}
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 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_blend.c"
3
4static void
5_soft8_image_draw_scaled_solid_solid(Soft8_Image * src,
6 Soft8_Image * dst,
7 RGBA_Draw_Context * dc __UNUSED__,
8 int dst_offset, int w, int h,
9 int *offset_x, int *offset_y)
10{
11 DATA8 *dst_itr;
12 int y, w_align;
13
14 w_align = w & ~7;
15
16 dst_itr = dst->pixels + dst_offset;
17 for (y = 0; y < h; y++, dst_itr += dst->stride)
18 {
19 DATA8 *d, *s;
20 int x;
21
22 s = src->pixels + offset_y[y];
23 pld(s, 0);
24 pld(offset_x, 0);
25
26 d = dst_itr;
27 x = 0;
28 while (x < w_align)
29 {
30 pld(s, 32);
31 pld(offset_x + x, 32);
32
33 UNROLL8(
34 {
35 _soft8_pt_blend_solid_solid(d, s[offset_x[x]]); x++; d++;}
36 );
37 }
38
39 for (; x < w; x++, d++)
40 _soft8_pt_blend_solid_solid(d, s[offset_x[x]]);
41 }
42}
43static void
44_soft8_image_draw_scaled_transp_solid(Soft8_Image * src,
45 Soft8_Image * dst,
46 RGBA_Draw_Context * dc __UNUSED__,
47 int dst_offset, int w, int h,
48 int *offset_x, int *offset_y)
49{
50 DATA8 *dst_itr;
51 int y, w_align;
52
53 w_align = w & ~7;
54
55 dst_itr = dst->pixels + dst_offset;
56 for (y = 0; y < h; y++, dst_itr += dst->stride)
57 {
58 DATA8 *d, *s;
59 DATA8 *a;
60 int x;
61
62 s = src->pixels + offset_y[y];
63 a = src->alpha + offset_y[y];
64 pld(s, 0);
65 pld(a, 0);
66 pld(offset_x, 0);
67
68 d = dst_itr;
69 x = 0;
70 while (x < w_align)
71 {
72 pld(s, 32);
73 pld(a, 8);
74 pld(offset_x + x, 32);
75
76 UNROLL8(
77 {
78 int off_x = offset_x[x];
79 _soft8_pt_blend_transp_solid(d, s[off_x], a[off_x]);
80 x++; d++;});
81 }
82
83 for (; x < w; x++, d++)
84 _soft8_pt_blend_transp_solid(d, s[offset_x[x]], a[offset_x[x]]);
85 }
86}
87
88static inline void
89_soft8_image_draw_scaled_no_mul(Soft8_Image * src, Soft8_Image * dst,
90 RGBA_Draw_Context * dc,
91 int dst_offset, int w, int h,
92 int *offset_x, int *offset_y)
93{
94 if ((src->cache_entry.flags.alpha && src->alpha) &&
95 (!dst->cache_entry.flags.alpha))
96 _soft8_image_draw_scaled_transp_solid
97 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
98 else if (!dst->cache_entry.flags.alpha)
99 _soft8_image_draw_scaled_solid_solid
100 (src, dst, dc, dst_offset, w, h, offset_x, offset_y);
101 else
102 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
103 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
104 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
105}
106
107static void
108_soft8_image_draw_scaled_solid_solid_mul_alpha(Soft8_Image * src,
109 Soft8_Image * dst,
110 RGBA_Draw_Context *
111 dc __UNUSED__, int dst_offset,
112 int w, int h, int *offset_x,
113 int *offset_y, DATA8 alpha)
114{
115 DATA8 *dst_itr;
116 int y, w_align;
117
118 w_align = w & ~7;
119
120 dst_itr = dst->pixels + dst_offset;
121 for (y = 0; y < h; y++, dst_itr += dst->stride)
122 {
123 DATA8 *d, *s;
124 int x;
125
126 s = src->pixels + offset_y[y];
127 pld(s, 0);
128 pld(offset_x, 0);
129
130 d = dst_itr;
131 x = 0;
132 while (x < w_align)
133 {
134 pld(s, 32);
135 pld(offset_x + x, 32);
136
137 UNROLL8(
138 {
139 _soft8_pt_blend_solid_solid_mul_alpha
140 (d, s[offset_x[x]], alpha); x++; d++;}
141 );
142 }
143
144 for (; x < w; x++, d++)
145 _soft8_pt_blend_solid_solid_mul_alpha(d, s[offset_x[x]], alpha);
146 }
147}
148
149static void
150_soft8_image_draw_scaled_transp_solid_mul_alpha(Soft8_Image * src,
151 Soft8_Image * dst,
152 RGBA_Draw_Context *
153 dc __UNUSED__, int dst_offset,
154 int w, int h, int *offset_x,
155 int *offset_y, DATA8 alpha)
156{
157 DATA8 *dst_itr;
158 int y, w_align;
159
160 w_align = w & ~7;
161
162 dst_itr = dst->pixels + dst_offset;
163 for (y = 0; y < h; y++, dst_itr += dst->stride)
164 {
165 DATA8 *d, *s;
166 DATA8 *a;
167 int x;
168
169 s = src->pixels + offset_y[y];
170 a = src->alpha + offset_y[y];
171 pld(s, 0);
172 pld(a, 0);
173 pld(offset_x, 0);
174
175 d = dst_itr;
176 x = 0;
177 while (x < w_align)
178 {
179 pld(s, 32);
180 pld(a, 8);
181 pld(offset_x + x, 32);
182
183 UNROLL8(
184 {
185 int off_x = offset_x[x];
186 _soft8_pt_blend_transp_solid_mul_alpha
187 (d, s[off_x], a[off_x], alpha); x++; d++;});
188 }
189
190 for (; x < w; x++, d++)
191 _soft8_pt_blend_transp_solid_mul_alpha
192 (d, s[offset_x[x]], a[offset_x[x]], alpha);
193 }
194}
195
196static inline void
197_soft8_image_draw_scaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst,
198 RGBA_Draw_Context * dc,
199 int dst_offset, int w, int h,
200 int *offset_x, int *offset_y, DATA8 a)
201{
202 if ((src->cache_entry.flags.alpha && src->alpha) &&
203 (!dst->cache_entry.flags.alpha))
204 _soft8_image_draw_scaled_transp_solid_mul_alpha
205 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
206 else if (!dst->cache_entry.flags.alpha)
207 _soft8_image_draw_scaled_solid_solid_mul_alpha
208 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
209 else
210 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
211 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
212 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha,
213 A_VAL(&dc->mul.col));
214}
215
216static void
217_soft8_image_draw_scaled_solid_solid_mul_color(Soft8_Image * src,
218 Soft8_Image * dst,
219 RGBA_Draw_Context *
220 dc __UNUSED__, int dst_offset,
221 int w, int h, int *offset_x,
222 int *offset_y, DATA8 r, DATA8 g,
223 DATA8 b, DATA8 alpha)
224{
225 DATA8 *dst_itr;
226 int y, w_align;
227
228 w_align = w & ~7;
229
230 dst_itr = dst->pixels + dst_offset;
231
232 if (alpha == 0xff)
233 for (y = 0; y < h; y++, dst_itr += dst->stride)
234 {
235 DATA8 *d, *s;
236 int x;
237
238 s = src->pixels + offset_y[y];
239 pld(s, 0);
240 pld(offset_x, 0);
241
242 d = dst_itr;
243 x = 0;
244 while (x < w_align)
245 {
246 pld(s, 32);
247 pld(offset_x + x, 32);
248
249 UNROLL8(
250 {
251 _soft8_pt_blend_solid_solid_mul_color_solid
252 (d, s[offset_x[x]], r, g, b); x++; d++;}
253 );
254 }
255
256 for (; x < w; x++, d++)
257 _soft8_pt_blend_solid_solid_mul_color_solid
258 (d, s[offset_x[x]], r, g, b);
259 }
260 else
261 for (y = 0; y < h; y++, dst_itr += dst->stride)
262 {
263 DATA8 *d, *s;
264 int x;
265
266 s = src->pixels + offset_y[y];
267 pld(s, 0);
268 pld(offset_x, 0);
269
270 d = dst_itr;
271 x = 0;
272 while (x < w_align)
273 {
274 pld(s, 32);
275 pld(offset_x + x, 32);
276
277 UNROLL8(
278 {
279 _soft8_pt_blend_solid_solid_mul_color_transp
280 (d, s[offset_x[x]], alpha, r, g, b); x++; d++;}
281 );
282 }
283
284 for (; x < w; x++, d++)
285 _soft8_pt_blend_solid_solid_mul_color_transp
286 (d, s[offset_x[x]], alpha, r, g, b);
287 }
288}
289
290static void
291_soft8_image_draw_scaled_transp_solid_mul_color(Soft8_Image * src,
292 Soft8_Image * dst,
293 RGBA_Draw_Context *
294 dc __UNUSED__, int dst_offset,
295 int w, int h, int *offset_x,
296 int *offset_y, DATA8 r, DATA8 g,
297 DATA8 b, DATA8 alpha)
298{
299 DATA8 *dst_itr;
300 int y, w_align;
301
302 w_align = w & ~7;
303
304 dst_itr = dst->pixels + dst_offset;
305
306 if (alpha == 0xff)
307 for (y = 0; y < h; y++, dst_itr += dst->stride)
308 {
309 DATA8 *d, *s;
310 DATA8 *a;
311 int x;
312
313 s = src->pixels + offset_y[y];
314 a = src->alpha + offset_y[y];
315 pld(s, 0);
316 pld(a, 0);
317 pld(offset_x, 0);
318
319 d = dst_itr;
320 x = 0;
321 while (x < w_align)
322 {
323 pld(s, 32);
324 pld(a, 8);
325 pld(offset_x + x, 32);
326
327 UNROLL8(
328 {
329 int off_x = offset_x[x];
330 _soft8_pt_blend_transp_solid_mul_color_solid
331 (d, s[off_x], a[off_x], r, g, b); x++; d++;});
332 }
333
334 for (; x < w; x++, d++)
335 _soft8_pt_blend_transp_solid_mul_color_solid
336 (d, s[offset_x[x]], a[offset_x[x]], r, g, b);
337 }
338 else
339 for (y = 0; y < h; y++, dst_itr += dst->stride)
340 {
341 DATA8 *d, *s;
342 DATA8 *a;
343 int x;
344
345 s = src->pixels + offset_y[y];
346 a = src->alpha + offset_y[y];
347 pld(s, 0);
348 pld(a, 0);
349 pld(offset_x, 0);
350
351 d = dst_itr;
352 x = 0;
353 while (x < w_align)
354 {
355 pld(s, 32);
356 pld(a, 8);
357 pld(offset_x + x, 32);
358
359 UNROLL8(
360 {
361 int off_x = offset_x[x];
362 _soft8_pt_blend_transp_solid_mul_color_transp
363 (d, s[off_x], a[off_x], alpha, r, g, b); x++; d++;});
364 }
365
366 for (; x < w; x++, d++)
367 _soft8_pt_blend_transp_solid_mul_color_transp
368 (d, s[offset_x[x]], a[offset_x[x]], alpha, r, g, b);
369 }
370}
371
372static inline void
373_soft8_image_draw_scaled_mul_color(Soft8_Image * src, Soft8_Image * dst,
374 RGBA_Draw_Context * dc,
375 int dst_offset, int w, int h,
376 int *offset_x, int *offset_y,
377 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
378{
379 if ((src->cache_entry.flags.alpha && src->alpha) &&
380 (!dst->cache_entry.flags.alpha))
381 _soft8_image_draw_scaled_transp_solid_mul_color
382 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
383 else if (!dst->cache_entry.flags.alpha)
384 _soft8_image_draw_scaled_solid_solid_mul_color
385 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
386 else
387 ERR("Unsupported draw of scaled images src->cache_entry.flags.alpha=%d, "
388 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
389 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha,
390 dc->mul.col);
391}
392
393static inline void
394_soft8_image_draw_scaled_mul(Soft8_Image * src, Soft8_Image * dst,
395 RGBA_Draw_Context * dc,
396 int dst_offset, int w, int h,
397 int *offset_x, int *offset_y, DATA8 r, DATA8 g,
398 DATA8 b, DATA8 a)
399{
400 if ((a == r) && (a == g) && (a == b))
401 _soft8_image_draw_scaled_mul_alpha
402 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, a);
403 else
404 _soft8_image_draw_scaled_mul_color
405 (src, dst, dc, dst_offset, w, h, offset_x, offset_y, r, g, b, a);
406}
407
408void
409evas_common_soft8_image_draw_scaled_sampled(Soft8_Image * src, Soft8_Image * dst,
410 RGBA_Draw_Context * dc,
411 const Eina_Rectangle sr,
412 const Eina_Rectangle dr,
413 const Eina_Rectangle cr)
414{
415 int x, y, dst_offset, *offset_x, *offset_y;
416 DATA8 mul_gry8;
417 DATA8 r, g, b, a;
418
419 if (!dc->mul.use)
420 {
421 r = g = b = a = 0xff;
422 mul_gry8 = 0xff;
423 }
424 else
425 {
426 a = A_VAL(&dc->mul.col);
427 if (a == 0)
428 return;
429
430 r = R_VAL(&dc->mul.col);
431 g = G_VAL(&dc->mul.col);
432 b = B_VAL(&dc->mul.col);
433
434 if (r > a)
435 r = a;
436 if (g > a)
437 g = a;
438 if (b > a)
439 b = a;
440
441 mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b);
442 }
443
444 /* pre-calculated scale tables */
445 offset_x = alloca(cr.w * sizeof(*offset_x));
446 for (x = 0; x < cr.w; x++)
447 offset_x[x] = (((x + cr.x - dr.x) * sr.w) / dr.w) + sr.x;
448
449 offset_y = alloca(cr.h * sizeof(*offset_y));
450 for (y = 0; y < cr.h; y++)
451 offset_y[y] = (((((y + cr.y - dr.y) * sr.h) / dr.h) + sr.y)
452 * src->stride);
453
454 dst_offset = cr.x + (cr.y * dst->stride);
455
456 if (mul_gry8 == 0xff)
457 _soft8_image_draw_scaled_no_mul
458 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y);
459 else
460 _soft8_image_draw_scaled_mul
461 (src, dst, dc, dst_offset, cr.w, cr.h, offset_x, offset_y, r, g, b,
462 a);
463}
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 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_blend.c"
3
4static void
5_soft8_image_draw_unscaled_solid_solid(Soft8_Image * src, Soft8_Image * dst,
6 RGBA_Draw_Context * dc __UNUSED__,
7 int src_offset, int dst_offset,
8 int w, int h)
9{
10 DATA8 *src_itr, *dst_itr;
11 int y;
12
13 src_itr = src->pixels + src_offset;
14 dst_itr = dst->pixels + dst_offset;
15
16 for (y = 0; y < h; y++)
17 {
18 _soft8_scanline_blend_solid_solid(src_itr, dst_itr, w);
19 src_itr += src->stride;
20 dst_itr += dst->stride;
21 }
22}
23
24static void
25_soft8_image_draw_unscaled_transp_solid(Soft8_Image * src, Soft8_Image * dst,
26 RGBA_Draw_Context * dc __UNUSED__,
27 int src_offset, int dst_offset,
28 int w, int h)
29{
30 DATA8 *src_itr, *dst_itr;
31 DATA8 *alpha_itr;
32 int y;
33
34 src_itr = src->pixels + src_offset;
35 alpha_itr = src->alpha + src_offset;
36 dst_itr = dst->pixels + dst_offset;
37
38 for (y = 0; y < h; y++)
39 {
40 _soft8_scanline_blend_transp_solid(src_itr, alpha_itr, dst_itr, w);
41 src_itr += src->stride;
42 alpha_itr += src->stride;
43 dst_itr += dst->stride;
44 }
45}
46
47static inline void
48_soft8_image_draw_unscaled_no_mul(Soft8_Image * src, Soft8_Image * dst,
49 RGBA_Draw_Context * dc,
50 int src_offset, int dst_offset,
51 int width, int height)
52{
53 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
54 _soft8_image_draw_unscaled_transp_solid(src, dst, dc,
55 src_offset, dst_offset,
56 width, height);
57 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
58 _soft8_image_draw_unscaled_solid_solid(src, dst, dc,
59 src_offset, dst_offset,
60 width, height);
61 else
62 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
63 "dst->cache_entry.flags.alpha=%d, WITHOUT COLOR MUL",
64 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha);
65}
66
67static void
68_soft8_image_draw_unscaled_solid_solid_mul_alpha(Soft8_Image * src,
69 Soft8_Image * dst,
70 RGBA_Draw_Context *
71 dc __UNUSED__, int src_offset,
72 int dst_offset, int w, int h,
73 DATA8 a)
74{
75 DATA8 *src_itr, *dst_itr;
76 int y;
77
78 src_itr = src->pixels + src_offset;
79 dst_itr = dst->pixels + dst_offset;
80
81 for (y = 0; y < h; y++)
82 {
83 _soft8_scanline_blend_solid_solid_mul_alpha(src_itr, dst_itr, w, a);
84 src_itr += src->stride;
85 dst_itr += dst->stride;
86 }
87}
88
89static void
90_soft8_image_draw_unscaled_transp_solid_mul_alpha(Soft8_Image * src,
91 Soft8_Image * dst,
92 RGBA_Draw_Context *
93 dc __UNUSED__, int src_offset,
94 int dst_offset, int w, int h,
95 DATA8 a)
96{
97 DATA8 *src_itr, *dst_itr;
98 DATA8 *alpha_itr;
99 int y;
100
101 src_itr = src->pixels + src_offset;
102 alpha_itr = src->alpha + src_offset;
103 dst_itr = dst->pixels + dst_offset;
104
105 for (y = 0; y < h; y++)
106 {
107 _soft8_scanline_blend_transp_solid_mul_alpha(src_itr, alpha_itr,
108 dst_itr, w, a);
109 src_itr += src->stride;
110 alpha_itr += src->stride;
111 dst_itr += dst->stride;
112 }
113}
114
115static inline void
116_soft8_image_draw_unscaled_mul_alpha(Soft8_Image * src, Soft8_Image * dst,
117 RGBA_Draw_Context * dc,
118 int src_offset, int dst_offset,
119 int width, int height, DATA8 a)
120{
121 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
122 _soft8_image_draw_unscaled_transp_solid_mul_alpha
123 (src, dst, dc, src_offset, dst_offset, width, height, a);
124 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
125 _soft8_image_draw_unscaled_solid_solid_mul_alpha
126 (src, dst, dc, src_offset, dst_offset, width, height, a);
127 else
128 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
129 "dst->cache_entry.flags.alpha=%d, WITH ALPHA MUL %d",
130 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, A_VAL(&dc->mul.col));
131}
132
133static void
134_soft8_image_draw_unscaled_solid_solid_mul_color(Soft8_Image * src,
135 Soft8_Image * dst,
136 RGBA_Draw_Context *
137 dc __UNUSED__, int src_offset,
138 int dst_offset, int w, int h,
139 DATA8 r, DATA8 g, DATA8 b,
140 DATA8 a)
141{
142 DATA8 *src_itr, *dst_itr;
143 int y;
144
145 src_itr = src->pixels + src_offset;
146 dst_itr = dst->pixels + dst_offset;
147
148 if (a == 0xff)
149 for (y = 0; y < h; y++)
150 {
151 _soft8_scanline_blend_solid_solid_mul_color_solid
152 (src_itr, dst_itr, w, r, g, b);
153 src_itr += src->stride;
154 dst_itr += dst->stride;
155 }
156 else
157 for (y = 0; y < h; y++)
158 {
159 _soft8_scanline_blend_solid_solid_mul_color_transp
160 (src_itr, dst_itr, w, a, r, g, b);
161 src_itr += src->stride;
162 dst_itr += dst->stride;
163 }
164}
165
166static void
167_soft8_image_draw_unscaled_transp_solid_mul_color(Soft8_Image * src,
168 Soft8_Image * dst,
169 RGBA_Draw_Context *
170 dc __UNUSED__, int src_offset,
171 int dst_offset, int w, int h,
172 DATA8 r, DATA8 g, DATA8 b,
173 DATA8 a)
174{
175 DATA8 *src_itr, *dst_itr;
176 DATA8 *alpha_itr;
177 int y;
178
179 src_itr = src->pixels + src_offset;
180 alpha_itr = src->alpha + src_offset;
181 dst_itr = dst->pixels + dst_offset;
182
183 if (a == 0xff)
184 for (y = 0; y < h; y++)
185 {
186 _soft8_scanline_blend_transp_solid_mul_color_solid
187 (src_itr, alpha_itr, dst_itr, w, r, g, b);
188 src_itr += src->stride;
189 alpha_itr += src->stride;
190 dst_itr += dst->stride;
191 }
192 else
193 for (y = 0; y < h; y++)
194 {
195 _soft8_scanline_blend_transp_solid_mul_color_transp
196 (src_itr, alpha_itr, dst_itr, w, a, r, g, b);
197 src_itr += src->stride;
198 alpha_itr += src->stride;
199 dst_itr += dst->stride;
200 }
201}
202
203static inline void
204_soft8_image_draw_unscaled_mul_color(Soft8_Image * src, Soft8_Image * dst,
205 RGBA_Draw_Context * dc,
206 int src_offset, int dst_offset,
207 int width, int height,
208 DATA8 r, DATA8 g, DATA8 b, DATA8 a)
209{
210 if (src->cache_entry.flags.alpha && (!dst->cache_entry.flags.alpha))
211 _soft8_image_draw_unscaled_transp_solid_mul_color
212 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
213 else if ((!src->cache_entry.flags.alpha) && (!dst->cache_entry.flags.alpha))
214 _soft8_image_draw_unscaled_solid_solid_mul_color
215 (src, dst, dc, src_offset, dst_offset, width, height, r, g, b, a);
216 else
217 ERR("Unsupported draw of unscaled images src->cache_entry.flags.alpha=%d, "
218 "dst->cache_entry.flags.alpha=%d, WITH COLOR MUL 0x%08x",
219 src->cache_entry.flags.alpha, dst->cache_entry.flags.alpha, dc->mul.col);
220}
221
222static inline void
223_soft8_image_draw_unscaled_mul(Soft8_Image * src, Soft8_Image * dst,
224 RGBA_Draw_Context * dc,
225 int src_offset, int dst_offset,
226 int width, int height, DATA8 r, DATA8 g,
227 DATA8 b, DATA8 a)
228{
229 if ((a == r) && (a == g) && (a == b))
230 _soft8_image_draw_unscaled_mul_alpha(src, dst, dc, src_offset,
231 dst_offset, width, height, a);
232 else
233 _soft8_image_draw_unscaled_mul_color(src, dst, dc, src_offset,
234 dst_offset, width, height,
235 r, g, b, a);
236}
237
238void
239evas_common_soft8_image_draw_unscaled(Soft8_Image * src, Soft8_Image * dst,
240 RGBA_Draw_Context * dc,
241 const Eina_Rectangle sr,
242 const Eina_Rectangle dr, const Eina_Rectangle cr)
243{
244 int src_offset_rows, src_offset, dst_offset;
245 DATA8 mul_gry8;
246 DATA8 r, g, b, a;
247
248 if (!dc->mul.use)
249 {
250 r = g = b = a = 0xff;
251 mul_gry8 = 0xff;
252 }
253 else
254 {
255 a = A_VAL(&dc->mul.col);
256 if (a == 0)
257 return;
258
259 r = R_VAL(&dc->mul.col);
260 g = G_VAL(&dc->mul.col);
261 b = B_VAL(&dc->mul.col);
262
263 if (r > a)
264 r = a;
265 if (g > a)
266 g = a;
267 if (b > a)
268 b = a;
269
270 mul_gry8 = GRY_8_FROM_COMPONENTS(r, g, b);
271 }
272
273 src_offset_rows = (cr.y - dr.y) + sr.y;
274 src_offset = (src_offset_rows * src->stride) + (cr.x - dr.x) + sr.x;
275
276 dst_offset = cr.x + (cr.y * dst->stride);
277
278 if (mul_gry8 == 0xff)
279 _soft8_image_draw_unscaled_no_mul(src, dst, dc, src_offset, dst_offset,
280 cr.w, cr.h);
281 else
282 _soft8_image_draw_unscaled_mul(src, dst, dc, src_offset, dst_offset,
283 cr.w, cr.h, r, g, b, a);
284}
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 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_fill.c"
3
4/*
5 * All functions except by evas_common_soft8_line_draw() expect x0 <= x1.
6 */
7
8static inline int
9_in_range(int value, int min, int max)
10{
11 return min <= value && value <= max;
12}
13
14static inline int
15_is_xy_inside_clip(int x, int y, const struct RGBA_Draw_Context_clip clip)
16{
17 if (!clip.use)
18 return 1;
19
20 if (!_in_range(x, clip.x, clip.x + clip.w - 1))
21 return 0;
22
23 if (!_in_range(y, clip.y, clip.y + clip.h - 1))
24 return 0;
25
26 return 1;
27}
28
29static inline int
30_is_x_inside_clip(int x, const struct RGBA_Draw_Context_clip clip)
31{
32 if (!clip.use)
33 return 1;
34
35 return _in_range(x, clip.x, clip.x + clip.w - 1);
36}
37
38static inline int
39_is_y_inside_clip(int y, const struct RGBA_Draw_Context_clip clip)
40{
41 if (!clip.use)
42 return 1;
43
44 return _in_range(y, clip.y, clip.y + clip.h - 1);
45}
46
47static inline int
48_is_xy_inside_rect(int x, int y, int w, int h)
49{
50 return _in_range(x, 0, w - 1) && _in_range(y, 0, h - 1);
51}
52
53static inline int
54_is_empty_clip(const struct RGBA_Draw_Context_clip clip)
55{
56 return clip.w < 1 || clip.h < 1;
57}
58
59static void
60_soft8_line_point(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y)
61{
62 DATA8 gry8, *dst_itr;
63 DATA8 alpha;
64
65 if (!_is_xy_inside_rect(x, y, dst->cache_entry.w, dst->cache_entry.h))
66 return;
67
68 if (!_is_xy_inside_clip(x, y, dc->clip))
69 return;
70
71 dst_itr = dst->pixels + (dst->stride * y) + x;
72 alpha = A_VAL(&dc->col.col);
73 gry8 = GRY_8_FROM_RGB(&dc->col.col);
74
75 if (alpha == 0xff)
76 _soft8_pt_fill_solid_solid(dst_itr, gry8);
77 else if (alpha > 0)
78 {
79 alpha++;
80 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
81 }
82}
83
84static void
85_soft8_line_horiz(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int x1,
86 int y)
87{
88 DATA8 gry8, *dst_itr;
89 DATA8 alpha;
90 int w;
91
92 if (!_is_y_inside_clip(y, dc->clip))
93 return;
94
95 if (x0 < dc->clip.x)
96 x0 = dc->clip.x;
97
98 if (x1 >= dc->clip.x + dc->clip.w)
99 x1 = dc->clip.x + dc->clip.w - 1;
100
101 w = x1 - x0;
102 if (w < 1)
103 return;
104
105 dst_itr = dst->pixels + (dst->stride * y) + x0;
106 alpha = A_VAL(&dc->col.col);
107 gry8 = GRY_8_FROM_RGB(&dc->col.col);
108
109 if (alpha == 0xff)
110 _soft8_scanline_fill_solid_solid(dst_itr, w, gry8);
111 else if (alpha > 0)
112 {
113 alpha++;
114 _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha);
115 }
116}
117
118static void
119_soft8_line_vert(Soft8_Image * dst, RGBA_Draw_Context * dc, int x, int y0,
120 int y1)
121{
122 DATA8 gry8, *dst_itr;
123 DATA8 alpha;
124 int h;
125
126 if (!_is_x_inside_clip(x, dc->clip))
127 return;
128
129 if (y1 < y0)
130 {
131 int t;
132 t = y0;
133 y0 = y1;
134 y1 = t;
135 }
136
137 if (y0 < dc->clip.y)
138 y0 = dc->clip.y;
139
140 if (y1 >= dc->clip.y + dc->clip.h)
141 y1 = dc->clip.y + dc->clip.h - 1;
142
143 h = y1 - y0;
144 if (h < 1)
145 return;
146
147 dst_itr = dst->pixels + (dst->stride * y0) + x;
148 alpha = A_VAL(&dc->col.col);
149 gry8 = GRY_8_FROM_RGB(&dc->col.col);
150
151 if (alpha == 0xff)
152 {
153 for (; h > 0; h--, dst_itr += dst->stride)
154 _soft8_pt_fill_solid_solid(dst_itr, gry8);
155 }
156 else if (alpha > 0)
157 {
158 alpha++;
159
160 for (; h > 0; h--, dst_itr += dst->stride)
161 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
162 }
163}
164
165static inline void
166_soft8_line_45deg_adjust_boundaries(const struct RGBA_Draw_Context_clip clip,
167 int *p_x0, int *p_y0, int *p_x1, int *p_y1)
168{
169 int diff, dy, x0, y0, x1, y1;
170
171 x0 = *p_x0;
172 y0 = *p_y0;
173 x1 = *p_x1;
174 y1 = *p_y1;
175
176 dy = y1 - y0;
177
178 diff = clip.x - x0;
179 if (diff > 0)
180 {
181 x0 = clip.x;
182 y0 += (dy > 0) ? diff : -diff;
183 }
184
185 diff = x1 - (clip.x + clip.w);
186 if (diff > 0)
187 {
188 x1 = clip.x + clip.w;
189 y1 += (dy > 0) ? -diff : diff;
190 }
191
192 if (dy > 0)
193 {
194 diff = clip.y - y0;
195 if (diff > 0)
196 {
197 y0 = clip.y;
198 x0 += diff;
199 }
200
201 diff = y1 - (clip.y + clip.h);
202 if (diff > 0)
203 {
204 y1 = clip.y + clip.h;
205 x1 -= diff;
206 }
207 }
208 else
209 {
210 diff = clip.y - y1;
211 if (diff > 0)
212 {
213 y1 = clip.y;
214 x1 -= diff;
215 }
216
217 diff = y0 - (clip.y + clip.h - 1);
218 if (diff > 0)
219 {
220 y0 = clip.y + clip.h - 1;
221 x0 += diff;
222 }
223 }
224
225 *p_x0 = x0;
226 *p_y0 = y0;
227 *p_x1 = x1;
228 *p_y1 = y1;
229}
230
231static void
232_soft8_line_45deg(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
233 int x1, int y1)
234{
235 int dy, step_dst_itr, len;
236 DATA8 alpha;
237 DATA8 *dst_itr, gry8;
238
239 alpha = A_VAL(&dc->col.col);
240 if (alpha < 1)
241 return;
242
243 gry8 = GRY_8_FROM_RGB(&dc->col.col);
244
245 dy = y1 - y0;
246 step_dst_itr = 1 + ((dy > 0) ? dst->stride : -dst->stride);
247
248 _soft8_line_45deg_adjust_boundaries(dc->clip, &x0, &y0, &x1, &y1);
249
250 len = (dy > 0) ? (y1 - y0) : (y0 - y1);
251 if (len < 1)
252 return;
253
254 dst_itr = dst->pixels + dst->stride * y0 + x0;
255 if (alpha == 0xff)
256 {
257 for (; len > 0; len--, dst_itr += step_dst_itr)
258 _soft8_pt_fill_solid_solid(dst_itr, gry8);
259 }
260 else
261 {
262 alpha++;
263 for (; len > 0; len--, dst_itr += step_dst_itr)
264 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
265 }
266}
267
268EFL_ALWAYS_INLINE void
269_soft8_line_aliased_pt(DATA8 * dst_itr, DATA8 gry8, DATA8 alpha)
270{
271 if (alpha == 32)
272 _soft8_pt_fill_solid_solid(dst_itr, gry8);
273 else
274 _soft8_pt_fill_transp_solid(dst_itr, gry8, alpha);
275}
276
277static void
278_soft8_line_aliased(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
279 int x1, int y1)
280{
281 int dx, dy, step_y, step_dst_itr;
282 DATA8 gry8;
283 DATA8 alpha;
284
285 alpha = A_VAL(&dc->col.col);
286 if (alpha == 0)
287 return;
288 alpha++;
289
290 gry8 = GRY_8_FROM_RGB(&dc->col.col);
291
292 dx = x1 - x0;
293 dy = y1 - y0;
294
295 if (dy >= 0)
296 {
297 step_y = 1;
298 step_dst_itr = dst->stride;
299 }
300 else
301 {
302 dy = -dy;
303 step_y = -1;
304 step_dst_itr = -dst->stride;
305 }
306
307 if (dx > dy)
308 {
309 DATA8 *dst_itr;
310 int e, x, y;
311
312 e = -(dx / 2);
313 y = y0;
314 dst_itr = dst->pixels + dst->stride * y0 + x0;
315 for (x = x0; x <= x1; x++, dst_itr++)
316 {
317 if (_is_xy_inside_clip(x, y, dc->clip))
318 _soft8_line_aliased_pt(dst_itr, gry8, alpha);
319
320 e += dy;
321 if (e >= 0)
322 {
323 dst_itr += step_dst_itr;
324 y += step_y;
325 e -= dx;
326 }
327 }
328 }
329 else
330 {
331 DATA8 *dst_itr;
332 int e, x, y;
333
334 e = -(dy / 2);
335 x = x0;
336 dst_itr = dst->pixels + dst->stride * y0 + x0;
337 for (y = y0; y != y1; y += step_y, dst_itr += step_dst_itr)
338 {
339 if (_is_xy_inside_clip(x, y, dc->clip))
340 _soft8_line_aliased_pt(dst_itr, gry8, alpha);
341
342 e += dx;
343 if (e >= 0)
344 {
345 dst_itr++;
346 x++;
347 e -= dy;
348 }
349 }
350 }
351}
352
353void
354evas_common_soft8_line_draw(Soft8_Image * dst, RGBA_Draw_Context * dc, int x0, int y0,
355 int x1, int y1)
356{
357 struct RGBA_Draw_Context_clip c_bkp, c_tmp;
358 int dx, dy;
359 int x, y, w, h;
360
361 c_tmp.use = 1;
362 c_tmp.x = 0;
363 c_tmp.y = 0;
364 c_tmp.w = dst->cache_entry.w;
365 c_tmp.h = dst->cache_entry.h;
366
367 /* save out clip info */
368 c_bkp = dc->clip;
369 if (c_bkp.use)
370 {
371 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h,
372 c_bkp.x, c_bkp.y, c_bkp.w, c_bkp.h);
373 if (_is_empty_clip(c_tmp))
374 return;
375 }
376
377 x = MIN(x0, x1);
378 y = MIN(y0, y1);
379 w = MAX(x0, x1) - x + 1;
380 h = MAX(y0, y1) - y + 1;
381
382 RECTS_CLIP_TO_RECT(c_tmp.x, c_tmp.y, c_tmp.w, c_tmp.h, x, y, w, h);
383 if (_is_empty_clip(c_tmp))
384 return;
385
386 /* Check if the line doesn't cross the clip area */
387 if (x0 < c_tmp.x && x1 < c_tmp.x)
388 return;
389 if (x0 >= c_tmp.x + c_tmp.w && x1 >= c_tmp.x + c_tmp.w)
390 return;
391 if (y0 < c_tmp.y && y1 < c_tmp.y)
392 return;
393 if (y0 >= c_tmp.y + c_tmp.h && y1 >= c_tmp.y + c_tmp.h)
394 return;
395
396 dc->clip = c_tmp;
397 dx = x1 - x0;
398 dy = y1 - y0;
399
400 if (dx < 0)
401 {
402 int t;
403
404 t = x0;
405 x0 = x1;
406 x1 = t;
407
408 t = y0;
409 y0 = y1;
410 y1 = t;
411 }
412
413 if (dx == 0 && dy == 0)
414 _soft8_line_point(dst, dc, x0, y0);
415 else if (dx == 0)
416 _soft8_line_vert(dst, dc, x0, y0, y1);
417 else if (dy == 0)
418 _soft8_line_horiz(dst, dc, x0, x1, y0);
419 else if (dy == dx || dy == -dx)
420 _soft8_line_45deg(dst, dc, x0, y0, x1, y1);
421 else
422 _soft8_line_aliased(dst, dc, x0, y0, x1, y1);
423
424 /* restore clip info */
425 dc->clip = c_bkp;
426}
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 @@
1#include "evas_common_soft8.h"
2
3static Evas_Cache_Image *eci = NULL;
4static int reference = 0;
5
6static Image_Entry *_evas_common_soft8_image_new(void);
7static void _evas_common_soft8_image_delete(Image_Entry * ie);
8
9static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h);
10static void _evas_common_soft8_image_surface_delete(Image_Entry * ie);
11static DATA32 *_evas_common_soft8_image_surface_pixels(Image_Entry * ie);
12
13static int _evas_common_load_soft8_image_from_file(Image_Entry * ie);
14static void _evas_common_soft8_image_unload(Image_Entry * ie);
15
16static void _evas_common_soft8_image_dirty_region(Image_Entry * im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
17static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst,
18 const Image_Entry * ie_src);
19
20static int _evas_common_soft8_image_ram_usage(Image_Entry * ie);
21
22static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst,
23 const Image_Entry * ie_im, unsigned int w, unsigned int h);
24static 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);
25static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace);
26static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst,
27 int cspace);
28
29static int _evas_common_load_soft8_image_data_from_file(Image_Entry * ie);
30
31/*
32static void
33_evas_common_soft8_image_debug(const char* context, Image_Entry *eim)
34{
35 DBG("[8] %p = [%s] {%s,%s} %i [%i|%i]", eim, context, eim->file, eim->key, eim->references, eim->w, eim->h);
36}
37*/
38
39static const Evas_Cache_Image_Func _evas_common_soft8_image_func = {
40 _evas_common_soft8_image_new,
41 _evas_common_soft8_image_delete,
42 _evas_common_soft8_image_surface_alloc,
43 _evas_common_soft8_image_surface_delete,
44 _evas_common_soft8_image_surface_pixels,
45 _evas_common_load_soft8_image_from_file,
46 _evas_common_soft8_image_unload,
47 _evas_common_soft8_image_dirty_region,
48 _evas_common_soft8_image_dirty,
49 _evas_common_soft8_image_size_set,
50 _evas_common_soft8_image_from_copied_data,
51 _evas_common_soft8_image_from_data,
52 _evas_common_soft8_image_colorspace_set,
53 _evas_common_load_soft8_image_data_from_file,
54 _evas_common_soft8_image_ram_usage,
55/* _evas_common_soft8_image_debug */
56 NULL
57};
58
59EAPI void
60evas_common_soft8_image_init(void)
61{
62 if (!eci)
63 eci = evas_cache_image_init(&_evas_common_soft8_image_func);
64 reference++;
65}
66
67EAPI void
68evas_common_soft8_image_shutdown(void)
69{
70 if (--reference == 0)
71 {
72// DISABLE for now - something wrong with cache shutdown freeing things
73// still in use - rage_thumb segv's now.
74//
75// actually - i think i see it. cache ref goes to 0 (and thus gets freed)
76// because in eng_setup() when a buffer changes size it is FIRST freed
77// THEN allocated again - thus brignhjing ref to 0 then back to 1 immediately
78// where it should stay at 1. - see evas_engine.c in the buffer enigne for
79// example. eng_output_free() is called BEFORE _output_setup(). although this
80// is only a SIGNE of the problem. we can patch this up with either freeing
81// after the setup (so we just pt a ref of 2 then back to 1), or just
82// evas_common_image_init() at the start and evas_common_image_shutdown()
83// after it all. really ref 0 should only be reached when no more canvases
84// with no more objects exist anywhere.
85
86// ENABLE IT AGAIN, hope it is fixed. Gustavo @ January 22nd, 2009.
87 //evas_cache_image_shutdown(eci);
88 //eci = NULL;
89 }
90}
91
92EAPI Evas_Cache_Image *
93evas_common_soft8_image_cache_get(void)
94{
95 return eci;
96}
97
98static Image_Entry *
99_evas_common_soft8_image_new(void)
100{
101 Soft8_Image *im;
102
103 im = calloc(1, sizeof(Soft8_Image));
104 if (!im)
105 return NULL;
106
107 im->stride = -1;
108
109 return (Image_Entry *) im;
110}
111
112static void
113_evas_common_soft8_image_delete(Image_Entry * ie)
114{
115 memset(ie, 0xFF, sizeof(Soft8_Image));
116 free(ie);
117}
118
119static int
120_evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h)
121{
122 Soft8_Image *im = (Soft8_Image *) ie;
123
124 if (im->stride < 0)
125 im->stride = _calc_stride(w);
126
127 im->pixels =
128 realloc(im->pixels, IMG_BYTE_SIZE(im->stride, h, ie->flags.alpha));
129 if (!im->pixels)
130 return -1;
131
132 if (ie->flags.alpha)
133 {
134 im->alpha = (DATA8 *) (im->pixels + (im->stride * h));
135 im->flags.free_alpha = 0;
136 }
137 im->flags.free_pixels = 1;
138
139 return 0;
140}
141
142static void
143_evas_common_soft8_image_surface_delete(Image_Entry * ie)
144{
145 Soft8_Image *im = (Soft8_Image *) ie;
146
147 if (im->flags.free_pixels)
148 free(im->pixels);
149 im->pixels = NULL;
150 im->flags.free_pixels = 0;
151
152 if (im->flags.free_alpha)
153 free(im->alpha);
154 im->alpha = NULL;
155 im->flags.free_alpha = 0;
156}
157
158static DATA32 *
159_evas_common_soft8_image_surface_pixels(Image_Entry * ie __UNUSED__)
160{
161 abort();
162
163 return NULL;
164}
165
166static int
167_evas_common_load_soft8_image_from_file(Image_Entry * ie)
168{
169 Soft8_Image *sim = (Soft8_Image *) ie;
170 RGBA_Image *im;
171 int error = 0;
172
173 im = (RGBA_Image *) evas_cache_image_request(evas_common_image_cache_get(),
174 sim->cache_entry.file,
175 sim->cache_entry.key,
176 &sim->cache_entry.load_opts,
177 &error);
178 sim->source = im;
179 if (!sim->source)
180 return -1;
181
182 sim->cache_entry.w = sim->source->cache_entry.w;
183 sim->cache_entry.h = sim->source->cache_entry.h;
184 ie->flags.alpha = im->cache_entry.flags.alpha;
185 if (sim->stride < 0)
186 sim->stride = _calc_stride(sim->cache_entry.w);
187
188 return 0;
189}
190
191static void
192_evas_common_soft8_image_unload(Image_Entry * ie __UNUSED__)
193{
194}
195
196static void
197_evas_common_soft8_image_dirty_region(Image_Entry * im __UNUSED__,
198 unsigned int x __UNUSED__,
199 unsigned int y __UNUSED__,
200 unsigned int w __UNUSED__,
201 unsigned int h __UNUSED__)
202{
203}
204
205static int
206_evas_common_soft8_image_dirty(Image_Entry * ie_dst, const Image_Entry * ie_src)
207{
208 Soft8_Image *dst = (Soft8_Image *) ie_dst;
209 Soft8_Image *src = (Soft8_Image *) ie_src;
210
211 evas_cache_image_load_data(&src->cache_entry);
212 evas_cache_image_surface_alloc(&dst->cache_entry,
213 src->cache_entry.w, src->cache_entry.h);
214
215/* evas_common_blit_rectangle(src, dst, 0, 0, src->cache_entry.w, src->cache_entry.h, 0, 0); */
216
217 return 0;
218}
219
220static int
221_evas_common_soft8_image_ram_usage(Image_Entry * ie)
222{
223 Soft8_Image *im = (Soft8_Image *) ie;
224
225 if (im->pixels && im->flags.free_pixels)
226 return IMG_BYTE_SIZE(im->stride, im->cache_entry.h, ie->flags.alpha);
227 return 0;
228}
229
230static int
231_evas_common_soft8_image_size_set(Image_Entry * ie_dst,
232 const Image_Entry * ie_im,
233 unsigned int w __UNUSED__,
234 unsigned int h __UNUSED__)
235{
236 Soft8_Image *dst = (Soft8_Image *) ie_dst;
237 Soft8_Image *im = (Soft8_Image *) ie_im;
238
239 dst->flags = im->flags;
240
241 return 0;
242}
243
244static int
245_evas_common_soft8_image_from_data(Image_Entry * ie_dst,
246 unsigned int w, unsigned int h,
247 DATA32 * image_data, int alpha,
248 int cspace __UNUSED__)
249{
250 Soft8_Image *im = (Soft8_Image *) ie_dst;
251
252 /* FIXME: handle colorspace */
253 ie_dst->w = w;
254 ie_dst->h = h;
255 ie_dst->flags.alpha = alpha;
256
257 im->flags.free_pixels = 0;
258 im->flags.free_alpha = 0;
259 if (im->stride < 0)
260 im->stride = _calc_stride(w);
261
262 /* FIXME: That's bad, the application must be aware of the engine internal. */
263 im->pixels = (DATA8 *) image_data;
264 if (ie_dst->flags.alpha)
265 im->alpha = (DATA8 *) (im->pixels + (im->stride * h));
266
267 return 0;
268}
269
270static int
271_evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst,
272 unsigned int w __UNUSED__,
273 unsigned int h,
274 DATA32 * image_data,
275 int alpha __UNUSED__,
276 int cspace __UNUSED__)
277{
278 Soft8_Image *im = (Soft8_Image *) ie_dst;
279
280 /* FIXME: handle colorspace */
281 if (image_data)
282 memcpy(im->pixels, image_data,
283 IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
284 else
285 memset(im->pixels, 0, IMG_BYTE_SIZE(im->stride, h, ie_dst->flags.alpha));
286
287 return 0;
288}
289
290static int
291_evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst __UNUSED__,
292 int cspace __UNUSED__)
293{
294 /* FIXME: handle colorspace */
295 return 0;
296}
297
298static int
299_evas_common_load_soft8_image_data_from_file(Image_Entry * ie)
300{
301 Soft8_Image *im = (Soft8_Image *) ie;
302
303 if (im->pixels)
304 return 0;
305 if (!im->source)
306 return -1;
307
308 evas_cache_image_load_data(&im->source->cache_entry);
309 if (im->source->image.data)
310 {
311 DATA32 *sp;
312
313 evas_cache_image_surface_alloc(&im->cache_entry,
314 im->source->cache_entry.w,
315 im->source->cache_entry.h);
316
317 sp = im->source->image.data;
318 if (im->alpha)
319 evas_common_soft8_image_convert_from_rgba(im, sp);
320 else
321 evas_common_soft8_image_convert_from_rgb(im, sp);
322 }
323 evas_cache_image_drop(&im->source->cache_entry);
324 im->source = NULL;
325
326 return 0;
327}
328
329/* Soft16_Image * */
330/* evas_common_soft16_image_new(int w, unsigned int h, unsigned int stride, int have_alpha, DATA16 *pixels, */
331/* int copy) */
332/* { */
333/* Soft16_Image *im; */
334
335/* if (stride < 0) stride = _calc_stride(w); */
336
337/* im = evas_common_soft16_image_alloc(w, h, stride, have_alpha, copy); */
338/* if (!im) return NULL; */
339
340/* if (pixels) */
341/* { */
342/* if (copy) */
343/* memcpy(im->pixels, pixels, IMG_BYTE_SIZE(stride, h, have_alpha)); */
344/* else */
345/* { */
346/* im->pixels = pixels; */
347/* if (have_alpha) im->alpha = (DATA8 *)(im->pixels + (stride * h)); */
348/* } */
349/* } */
350/* return im; */
351/* } */
352
353static inline void
354_get_clip(const RGBA_Draw_Context * dc, const Soft8_Image * im,
355 Eina_Rectangle * clip)
356{
357 if (dc->clip.use)
358 {
359 EINA_RECTANGLE_SET(clip, dc->clip.x, dc->clip.y, dc->clip.w,
360 dc->clip.h);
361 if (clip->x < 0)
362 {
363 clip->w += clip->x;
364 clip->x = 0;
365 }
366 if (clip->y < 0)
367 {
368 clip->h += clip->y;
369 clip->y = 0;
370 }
371 if ((clip->x + clip->w) > (int)im->cache_entry.w)
372 clip->w = im->cache_entry.w - clip->x;
373 if ((clip->y + clip->h) > (int)im->cache_entry.h)
374 clip->h = im->cache_entry.h - clip->y;
375 }
376 else
377 {
378 EINA_RECTANGLE_SET(clip, 0, 0, im->cache_entry.w, im->cache_entry.h);
379 }
380}
381
382static inline int
383_is_empty_rectangle(const Eina_Rectangle * r)
384{
385 return (r->w < 1) || (r->h < 1);
386}
387
388static inline void
389_shrink(int *s_pos, int *s_size, int pos, int size)
390{
391 int d;
392
393 d = (*s_pos) - pos;
394 if (d < 0)
395 {
396 (*s_size) += d;
397 (*s_pos) = pos;
398 }
399
400 d = size + pos - (*s_pos);
401 if ((*s_size) > d)
402 (*s_size) = d;
403}
404
405static int
406_soft8_adjust_areas(Eina_Rectangle * src,
407 int src_max_x, int src_max_y, Eina_Rectangle * dst,
408 int dst_max_x, int dst_max_y, Eina_Rectangle * dst_clip)
409{
410 if (_is_empty_rectangle(src) ||
411 _is_empty_rectangle(dst) || _is_empty_rectangle(dst_clip))
412 return 0;
413
414 /* shrink clip */
415 _shrink(&dst_clip->x, &dst_clip->w, dst->x, dst->w);
416 _shrink(&dst_clip->y, &dst_clip->h, dst->y, dst->h);
417 if (_is_empty_rectangle(dst_clip))
418 return 0;
419
420 /* sanitise x */
421 if (src->x < 0)
422 {
423 dst->x -= (src->x * dst->w) / src->w;
424 dst->w += (src->x * dst->w) / src->w;
425 src->w += src->x;
426 src->x = 0;
427 }
428 if (src->x >= src_max_x)
429 return 0;
430 if ((src->x + src->w) > src_max_x)
431 {
432 dst->w = (dst->w * (src_max_x - src->x)) / (src->w);
433 src->w = src_max_x - src->x;
434 }
435 if (dst->w <= 0)
436 return 0;
437 if (src->w <= 0)
438 return 0;
439 if (dst_clip->x < 0)
440 {
441 dst_clip->w += dst_clip->x;
442 dst_clip->x = 0;
443 }
444 if (dst_clip->w <= 0)
445 return 0;
446 if (dst_clip->x >= dst_max_x)
447 return 0;
448
449 _shrink(&dst_clip->x, &dst_clip->w, 0, dst_max_x);
450 if (dst_clip->w <= 0)
451 return 0;
452
453 /* sanitise y */
454 if (src->y < 0)
455 {
456 dst->y -= (src->y * dst->h) / src->h;
457 dst->h += (src->y * dst->h) / src->h;
458 src->h += src->y;
459 src->y = 0;
460 }
461 if (src->y >= src_max_y)
462 return 0;
463 if ((src->y + src->h) > src_max_y)
464 {
465 dst->h = (dst->h * (src_max_y - src->y)) / (src->h);
466 src->h = src_max_y - src->y;
467 }
468 if (dst->h <= 0)
469 return 0;
470 if (src->h <= 0)
471 return 0;
472 if (dst_clip->y < 0)
473 {
474 dst_clip->h += dst_clip->y;
475 dst_clip->y = 0;
476 }
477 if (dst_clip->h <= 0)
478 return 0;
479 if (dst_clip->y >= dst_max_y)
480 return 0;
481
482 _shrink(&dst_clip->y, &dst_clip->h, 0, dst_max_y);
483 if (dst_clip->h <= 0)
484 return 0;
485
486 return 1;
487}
488
489static void
490_soft8_image_draw_sampled_int(Soft8_Image * src, Soft8_Image * dst,
491 RGBA_Draw_Context * dc,
492 Eina_Rectangle sr, Eina_Rectangle dr)
493{
494 Eina_Rectangle cr;
495
496 if (!
497 (RECTS_INTERSECT
498 (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
499 return;
500 if (!
501 (RECTS_INTERSECT
502 (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
503 return;
504
505 _get_clip(dc, dst, &cr);
506 if (!_soft8_adjust_areas
507 (&sr, src->cache_entry.w, src->cache_entry.h, &dr, dst->cache_entry.w,
508 dst->cache_entry.h, &cr))
509 return;
510
511 if ((dr.w == sr.w) && (dr.h == sr.h))
512 evas_common_soft8_image_draw_unscaled(src, dst, dc, sr, dr, cr);
513 else
514 evas_common_soft8_image_draw_scaled_sampled(src, dst, dc, sr, dr, cr);
515}
516
517EAPI void
518evas_common_soft8_image_draw(Soft8_Image * src, Soft8_Image * dst,
519 RGBA_Draw_Context * dc,
520 int src_region_x, int src_region_y,
521 int src_region_w, int src_region_h,
522 int dst_region_x, int dst_region_y,
523 int dst_region_w, int dst_region_h,
524 int smooth __UNUSED__)
525{
526 Eina_Rectangle sr, dr;
527 Cutout_Rects *rects;
528 Cutout_Rect *r;
529 struct RGBA_Draw_Context_clip clip_bkp;
530 int i;
531
532 /* handle cutouts here! */
533 EINA_RECTANGLE_SET(&dr, dst_region_x, dst_region_y, dst_region_w,
534 dst_region_h);
535
536 if (_is_empty_rectangle(&dr))
537 return;
538 if (!
539 (RECTS_INTERSECT
540 (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
541 return;
542
543 EINA_RECTANGLE_SET(&sr, src_region_x, src_region_y, src_region_w,
544 src_region_h);
545
546 if (_is_empty_rectangle(&sr))
547 return;
548 if (!
549 (RECTS_INTERSECT
550 (sr.x, sr.y, sr.w, sr.h, 0, 0, src->cache_entry.w, src->cache_entry.h)))
551 return;
552
553 /* no cutouts - cut right to the chase */
554 if (!dc->cutout.rects)
555 {
556 _soft8_image_draw_sampled_int(src, dst, dc, sr, dr);
557 return;
558 }
559
560 /* save out clip info */
561 clip_bkp = dc->clip;
562 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w,
563 dst->cache_entry.h);
564 evas_common_draw_context_clip_clip(dc, dst_region_x, dst_region_y,
565 dst_region_w, dst_region_h);
566 /* our clip is 0 size.. abort */
567 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
568 {
569 dc->clip = clip_bkp;
570 return;
571 }
572 rects = evas_common_draw_context_apply_cutouts(dc);
573 for (i = 0; i < rects->active; i++)
574 {
575 r = rects->rects + i;
576 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
577 _soft8_image_draw_sampled_int(src, dst, dc, sr, dr);
578 }
579 evas_common_draw_context_apply_clear_cutouts(rects);
580 dc->clip = clip_bkp;
581}
582
583EAPI Soft8_Image *
584evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha)
585{
586 Soft8_Image *new_im;
587
588 if (im->cache_entry.flags.alpha == have_alpha)
589 return im;
590
591 new_im = (Soft8_Image *) evas_cache_image_alone(&im->cache_entry);
592
593 new_im->cache_entry.flags.alpha = have_alpha;
594
595 if (im->cache_entry.w > 0 && im->cache_entry.h)
596 new_im =
597 (Soft8_Image *) evas_cache_image_size_set(&new_im->cache_entry,
598 im->cache_entry.w,
599 im->cache_entry.h);
600
601 return new_im;
602}
603
604/* Soft16_Image * */
605/* evas_common_soft16_image_size_set(Soft16_Image *old_im, unsigned int w, unsigned int h) */
606/* { */
607/* Soft16_Image *new_im; */
608/* DATA16 *dp, *sp; */
609/* int i, cw, ch, ew; */
610
611/* if ((old_im->cache_entry.w == w) && (old_im->cache_entry.h == h)) return old_im; */
612
613/* new_im = evas_common_soft16_image_new(w, h, -1, old_im->flags.have_alpha, NULL, 1); */
614
615/* if (old_im->cache_entry.w < new_im->cache_entry.w) */
616/* cw = old_im->cache_entry.w; */
617/* else */
618/* cw = new_im->cache_entry.w; */
619
620/* ew = new_im->cache_entry.w - cw; */
621
622/* if (old_im->cache_entry.h < new_im->cache_entry.h) */
623/* ch = old_im->cache_entry.h; */
624/* else */
625/* ch = new_im->cache_entry.h; */
626
627/* dp = new_im->pixels; */
628/* sp = old_im->pixels; */
629/* for (i = 0; i < ch; i++) */
630/* { */
631/* memcpy(dp, sp, cw * sizeof(DATA16)); */
632/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA16)); */
633
634/* dp += new_im->stride; */
635/* sp += old_im->stride; */
636/* } */
637
638/* if (old_im->flags.have_alpha) */
639/* { */
640/* DATA8 *dp, *sp; */
641
642/* dp = new_im->alpha; */
643/* sp = old_im->alpha; */
644/* for (i = 0; i < ch; i++) */
645/* { */
646/* memcpy(dp, sp, cw * sizeof(DATA8)); */
647/* if (ew > 0) memset(dp, 0, ew * sizeof(DATA8)); */
648
649/* dp += new_im->stride; */
650/* sp += old_im->stride; */
651/* } */
652/* } */
653
654/* evas_cache_image_drop(&old_im->cache_entry); */
655/* return new_im; */
656/* } */
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 @@
1#include <evas_common_soft8.h>
2#include "evas_soft8_scanline_fill.c"
3#include <math.h>
4
5typedef struct _RGBA_Edge RGBA_Edge;
6typedef struct _RGBA_Vertex RGBA_Vertex;
7
8struct _RGBA_Edge {
9 float x, dx;
10 int i;
11};
12
13struct _RGBA_Vertex {
14 float x, y;
15 int i;
16};
17
18#define POLY_EDGE_DEL(_i) \
19{ \
20 int _j; \
21 \
22 for (_j = 0; (_j < num_active_edges) && (edges[_j].i != _i); _j++); \
23 if (_j < num_active_edges) \
24 { \
25 num_active_edges--; \
26 memmove(&(edges[_j]), &(edges[_j + 1]), \
27 (num_active_edges - _j) * sizeof(RGBA_Edge)); \
28 } \
29}
30
31#define POLY_EDGE_ADD(_i, _y) \
32{ \
33 int _j; \
34 float _dx; \
35 RGBA_Vertex *_p, *_q; \
36 if (_i < (n - 1)) _j = _i + 1; \
37 else _j = 0; \
38 if (point[_i].y < point[_j].y) \
39 { \
40 _p = &(point[_i]); \
41 _q = &(point[_j]); \
42 } \
43 else \
44 { \
45 _p = &(point[_j]); \
46 _q = &(point[_i]); \
47 } \
48 edges[num_active_edges].dx = _dx = (_q->x - _p->x) / (_q->y - _p->y); \
49 edges[num_active_edges].x = (_dx * ((float)_y + 0.5 - _p->y)) + _p->x; \
50 edges[num_active_edges].i = _i; \
51 num_active_edges++; \
52}
53
54static int
55polygon_point_sorter(const void *a, const void *b)
56{
57 RGBA_Vertex *p, *q;
58
59 p = (RGBA_Vertex *) a;
60 q = (RGBA_Vertex *) b;
61 if (p->y <= q->y)
62 return -1;
63 return 1;
64}
65
66static int
67polygon_edge_sorter(const void *a, const void *b)
68{
69 RGBA_Edge *p, *q;
70
71 p = (RGBA_Edge *) a;
72 q = (RGBA_Edge *) b;
73 if (p->x <= q->x)
74 return -1;
75 return 1;
76}
77
78void
79evas_common_soft8_polygon_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
80 RGBA_Polygon_Point * points, int x, int y)
81{
82 RGBA_Polygon_Point *pt;
83 RGBA_Vertex *point;
84 RGBA_Edge *edges;
85 int num_active_edges;
86 int n;
87 int i, j, k;
88 int y0, y1, yi;
89 int ext_x, ext_y, ext_w, ext_h;
90 int *sorted_index;
91 DATA8 alpha;
92 DATA8 gry8;
93
94 alpha = A_VAL(&dc->col.col);
95 if (alpha == 0)
96 return;
97 alpha++;
98
99 gry8 = GRY_8_FROM_RGB(&dc->col.col);
100
101 ext_x = 0;
102 ext_y = 0;
103 ext_w = dst->cache_entry.w;
104 ext_h = dst->cache_entry.h;
105 if (dc->clip.use)
106 RECTS_CLIP_TO_RECT(ext_x, ext_y, ext_w, ext_h,
107 dc->clip.x, dc->clip.y, dc->clip.w, dc->clip.h);
108
109 if ((ext_w <= 0) || (ext_h <= 0))
110 return;
111
112 n = 0;
113 EINA_INLIST_FOREACH(points, pt) n++;
114
115 if (n < 3)
116 return;
117
118 edges = malloc(sizeof(RGBA_Edge) * n);
119 if (!edges)
120 return;
121
122 point = malloc(sizeof(RGBA_Vertex) * n);
123 if (!point)
124 {
125 free(edges);
126 return;
127 }
128
129 sorted_index = malloc(sizeof(int) * n);
130 if (!sorted_index)
131 {
132 free(edges);
133 free(point);
134 return;
135 }
136
137 k = 0;
138 EINA_INLIST_FOREACH(points, pt)
139 {
140 point[k].x = pt->x + x;
141 point[k].y = pt->y + y;
142 point[k].i = k;
143 k++;
144 }
145 qsort(point, n, sizeof(RGBA_Vertex), polygon_point_sorter);
146
147 for (k = 0; k < n; k++)
148 sorted_index[k] = point[k].i;
149
150 k = 0;
151 EINA_INLIST_FOREACH(points, pt)
152 {
153 point[k].x = pt->x + x;
154 point[k].y = pt->y + y;
155 point[k].i = k;
156 k++;
157 }
158
159 y0 = MAX(ext_y, ceil(point[sorted_index[0]].y - 0.5));
160 y1 = MIN(ext_y + ext_h - 1, floor(point[sorted_index[n - 1]].y - 0.5));
161
162 k = 0;
163 num_active_edges = 0;
164
165 for (yi = y0; yi <= y1; yi++)
166 {
167 for (; (k < n) && (point[sorted_index[k]].y <= ((float)yi + 0.5)); k++)
168 {
169 i = sorted_index[k];
170
171 if (i > 0)
172 j = i - 1;
173 else
174 j = n - 1;
175 if (point[j].y <= ((float)yi - 0.5))
176 {
177 POLY_EDGE_DEL(j)}
178 else if (point[j].y > ((float)yi + 0.5))
179 {
180 POLY_EDGE_ADD(j, yi)}
181 if (i < (n - 1))
182 j = i + 1;
183 else
184 j = 0;
185 if (point[j].y <= ((float)yi - 0.5))
186 {
187 POLY_EDGE_DEL(i)}
188 else if (point[j].y > ((float)yi + 0.5))
189 {
190 POLY_EDGE_ADD(i, yi)}
191 }
192
193 qsort(edges, num_active_edges, sizeof(RGBA_Edge), polygon_edge_sorter);
194
195 for (j = 0; j < num_active_edges; j += 2)
196 {
197 int x0, x1;
198
199 x0 = ceil(edges[j].x - 0.5);
200 if (j < (num_active_edges - 1))
201 x1 = floor(edges[j + 1].x - 0.5);
202 else
203 x1 = x0;
204 if ((x1 >= ext_x) && (x0 < (ext_x + ext_w)) && (x0 <= x1))
205 {
206 DATA8 *dst_itr;
207 int w;
208
209 if (x0 < ext_x)
210 x0 = ext_x;
211 if (x1 >= (ext_x + ext_w))
212 x1 = ext_x + ext_w - 1;
213
214 w = (x1 - x0) + 1;
215 dst_itr = dst->pixels + (yi * dst->stride) + x0;
216
217 if (alpha == 0xff)
218 _soft8_scanline_fill_solid_solid(dst_itr, w, gry8);
219 else
220 _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha);
221 }
222 edges[j].x += edges[j].dx;
223 edges[j + 1].x += edges[j + 1].dx;
224 }
225 }
226
227 free(edges);
228 free(point);
229 free(sorted_index);
230}
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 @@
1#include "evas_common_soft8.h"
2#include "evas_soft8_scanline_fill.c"
3
4static inline int
5_is_empty_rectangle(const Eina_Rectangle * r)
6{
7 return (r->w < 1) || (r->h < 1);
8}
9
10static inline void
11_soft8_rectangle_draw_solid_solid(Soft8_Image * dst, int offset, int w, int h,
12 DATA8 gry8)
13{
14 DATA8 *dst_itr;
15 int i;
16
17 dst_itr = dst->pixels + offset;
18
19 for (i = 0; i < h; i++, dst_itr += dst->stride)
20 _soft8_scanline_fill_solid_solid(dst_itr, w, gry8);
21}
22
23static inline void
24_soft8_rectangle_draw_transp_solid(Soft8_Image * dst, int offset, int w, int h,
25 DATA8 gry8, DATA8 alpha)
26{
27 DATA8 *dst_itr;
28 int i;
29
30 dst_itr = dst->pixels + offset;
31 alpha++;
32
33 for (i = 0; i < h; i++, dst_itr += dst->stride)
34 _soft8_scanline_fill_transp_solid(dst_itr, w, gry8, alpha);
35}
36
37static void
38_soft8_rectangle_draw_int(Soft8_Image * dst, RGBA_Draw_Context * dc,
39 Eina_Rectangle dr)
40{
41 int dst_offset;
42
43 if (_is_empty_rectangle(&dr))
44 return;
45 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w,
46 dst->cache_entry.h);
47 if (_is_empty_rectangle(&dr))
48 return;
49
50 if (dc->clip.use)
51 RECTS_CLIP_TO_RECT(dr.x, dr.y, dr.w, dr.h, dc->clip.x,
52 dc->clip.y, dc->clip.w, dc->clip.h);
53 if (_is_empty_rectangle(&dr))
54 return;
55 if (A_VAL(&dc->col.col) == 0)
56 return;
57
58 dst_offset = dr.x + (dr.y * dst->stride);
59
60 if (!dst->cache_entry.flags.alpha)
61 {
62 DATA8 gry8;
63 DATA8 alpha;
64
65 alpha = A_VAL(&dc->col.col);
66 gry8 = GRY_8_FROM_RGB(&dc->col.col);
67
68 if (alpha == 0xff)
69 _soft8_rectangle_draw_solid_solid(dst, dst_offset, dr.w, dr.h, gry8);
70 else if (alpha > 0)
71 _soft8_rectangle_draw_transp_solid
72 (dst, dst_offset, dr.w, dr.h, gry8, alpha);
73 }
74 else
75 ERR("Unsupported feature: drawing rectangle to non-opaque destination.");
76}
77
78void
79evas_common_soft8_rectangle_draw(Soft8_Image * dst, RGBA_Draw_Context * dc,
80 int x, int y, int w, int h)
81{
82 Eina_Rectangle dr;
83 Cutout_Rects *rects;
84 Cutout_Rect *r;
85 struct RGBA_Draw_Context_clip c_bkp;
86 int i;
87
88 /* handle cutouts here! */
89 EINA_RECTANGLE_SET(&dr, x, y, w, h);
90
91 if (_is_empty_rectangle(&dr))
92 return;
93 if (!
94 (RECTS_INTERSECT
95 (dr.x, dr.y, dr.w, dr.h, 0, 0, dst->cache_entry.w, dst->cache_entry.h)))
96 return;
97
98 /* no cutouts - cut right to the chase */
99 if (!dc->cutout.rects)
100 {
101 _soft8_rectangle_draw_int(dst, dc, dr);
102 return;
103 }
104
105 c_bkp = dc->clip;
106
107 evas_common_draw_context_clip_clip(dc, 0, 0, dst->cache_entry.w,
108 dst->cache_entry.h);
109 evas_common_draw_context_clip_clip(dc, x, y, w, h);
110 /* our clip is 0 size.. abort */
111 if ((dc->clip.w <= 0) || (dc->clip.h <= 0))
112 {
113 dc->clip = c_bkp;
114 return;
115 }
116 rects = evas_common_draw_context_apply_cutouts(dc);
117 for (i = 0; i < rects->active; ++i)
118 {
119 r = rects->rects + i;
120 evas_common_draw_context_set_clip(dc, r->x, r->y, r->w, r->h);
121 _soft8_rectangle_draw_int(dst, dc, dr);
122 }
123 evas_common_draw_context_apply_clear_cutouts(rects);
124 dc->clip = c_bkp;
125}
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 @@
1/** NOTE: This file is meant to be included by users **/
2
3/** NOTE2: r, g, b parameters are 16bits, so you can pass 0 to 256 inclusive.
4 ** this is due our division by 256 when multiplying the color.
5 **/
6
7/*****************************************************************************
8 * Scanline processing
9 *
10 * _soft8_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13
14EFL_ALWAYS_INLINE void
15_soft8_pt_blend_transp_solid(DATA8 * p_dst, DATA8 src, DATA8 alpha)
16{
17 if (alpha == 0xff)
18 *p_dst = src;
19 else if (alpha != 0)
20 {
21 *p_dst = GRY_8_BLEND(src, *p_dst, alpha);
22 }
23}
24
25/***********************************************************************
26 * Regular blend operations
27 */
28static void
29_soft8_scanline_blend_transp_solid(DATA8 * src, DATA8 * alpha, DATA8 * dst,
30 int size)
31{
32 DATA8 *start, *end;
33
34 start = dst;
35 end = start + (size & ~7);
36
37 pld(alpha, 0);
38 pld(src, 0);
39
40 /* work on 8 pixels per time, do data preload */
41 while (start < end)
42 {
43 DATA8 alpha1, alpha2;
44
45 alpha1 = alpha[0];
46 alpha += 8;
47
48 /* empirical tests show these give the best performance */
49 pld(alpha, 8);
50 pld(src, 32);
51
52 src += 8;
53 start += 8;
54
55 alpha2 = alpha[-7];
56 _soft8_pt_blend_transp_solid(start - 8, src[-8], alpha1);
57
58 alpha1 = alpha[-6];
59 _soft8_pt_blend_transp_solid(start - 7, src[-7], alpha2);
60
61 alpha2 = alpha[-5];
62 _soft8_pt_blend_transp_solid(start - 6, src[-6], alpha1);
63
64 alpha1 = alpha[-4];
65 _soft8_pt_blend_transp_solid(start - 5, src[-5], alpha2);
66
67 alpha2 = alpha[-3];
68 _soft8_pt_blend_transp_solid(start - 4, src[-4], alpha1);
69
70 alpha1 = alpha[-2];
71 _soft8_pt_blend_transp_solid(start - 3, src[-3], alpha2);
72
73 alpha2 = alpha[-1];
74 _soft8_pt_blend_transp_solid(start - 2, src[-2], alpha1);
75
76 _soft8_pt_blend_transp_solid(start - 1, src[-1], alpha2);
77 }
78
79 /* remaining pixels (up to 7) */
80 end = start + (size & 7);
81 for (; start < end; start++, src++, alpha++)
82 _soft8_pt_blend_transp_solid(start, *src, *alpha);
83}
84
85EFL_ALWAYS_INLINE void
86_soft8_pt_blend_solid_solid(DATA8 * p_dst, DATA8 src)
87{
88 *p_dst = src;
89}
90
91static inline void
92_soft8_scanline_blend_solid_solid(DATA8 * src, DATA8 * dst, int size)
93{
94 memcpy(dst, src, size * sizeof(DATA8));
95}
96
97/***********************************************************************
98 * Blend operations taking an extra alpha (fade in, out)
99 */
100
101static inline void
102_soft8_pt_blend_transp_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 alpha,
103 DATA8 rel_alpha)
104{
105 alpha = alpha * rel_alpha;
106 if (alpha == 0)
107 return;
108
109 alpha++;
110 *p_dst = GRY_8_BLEND((src * rel_alpha) & 0xff, *p_dst, alpha);
111}
112
113static void
114_soft8_scanline_blend_transp_solid_mul_alpha(DATA8 * src, DATA8 * alpha,
115 DATA8 * dst, int size,
116 const DATA8 rel_alpha)
117{
118 DATA8 *start, *end;
119
120 start = dst;
121 end = start + (size & ~7);
122
123 pld(alpha, 0);
124 pld(src, 0);
125
126 while (start < end)
127 {
128 DATA8 alpha1, alpha2;
129
130 alpha1 = alpha[0];
131 alpha += 8;
132
133 pld(alpha, 8);
134 pld(src, 32);
135
136 src += 8;
137 start += 8;
138
139 alpha2 = alpha[-7];
140 _soft8_pt_blend_transp_solid_mul_alpha
141 (start - 8, src[-8], alpha1, rel_alpha);
142
143 alpha1 = alpha[-6];
144 _soft8_pt_blend_transp_solid_mul_alpha
145 (start - 7, src[-7], alpha2, rel_alpha);
146
147 alpha2 = alpha[-5];
148 _soft8_pt_blend_transp_solid_mul_alpha
149 (start - 6, src[-6], alpha1, rel_alpha);
150
151 alpha1 = alpha[-4];
152 _soft8_pt_blend_transp_solid_mul_alpha
153 (start - 5, src[-5], alpha2, rel_alpha);
154
155 alpha2 = alpha[-3];
156 _soft8_pt_blend_transp_solid_mul_alpha
157 (start - 4, src[-4], alpha1, rel_alpha);
158
159 alpha1 = alpha[-2];
160 _soft8_pt_blend_transp_solid_mul_alpha
161 (start - 3, src[-3], alpha2, rel_alpha);
162
163 alpha2 = alpha[-1];
164 _soft8_pt_blend_transp_solid_mul_alpha
165 (start - 2, src[-2], alpha1, rel_alpha);
166
167 _soft8_pt_blend_transp_solid_mul_alpha
168 (start - 1, src[-1], alpha2, rel_alpha);
169 }
170
171 end = start + (size & 7);
172 for (; start < end; start++, src++, alpha++)
173 _soft8_pt_blend_transp_solid_mul_alpha(start, *src, *alpha, rel_alpha);
174}
175
176EFL_ALWAYS_INLINE void
177_soft8_pt_blend_solid_solid_mul_alpha(DATA8 * p_dst, DATA8 src, DATA8 rel_alpha)
178{
179 *p_dst = GRY_8_BLEND_UNMUL(src, *p_dst, rel_alpha);
180}
181
182static void
183_soft8_scanline_blend_solid_solid_mul_alpha(DATA8 * src, DATA8 * dst, int size,
184 DATA8 rel_alpha)
185{
186 DATA8 *start, *end;
187
188 start = dst;
189 end = start + (size & ~7);
190
191 pld(src, 0);
192
193 while (start < end)
194 {
195 pld(src, 32);
196 UNROLL8(
197 {
198 _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
199 start++; src++;}
200 );
201 }
202
203 end = start + (size & 7);
204 for (; start < end; start++, src++)
205 _soft8_pt_blend_solid_solid_mul_alpha(start, *src, rel_alpha);
206}
207
208/***********************************************************************
209 * Blend operations with extra alpha and multiply color
210 */
211
212EFL_ALWAYS_INLINE void
213_soft8_pt_blend_transp_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
214 DATA8 alpha, DATA8 rel_alpha,
215 DATA8 r, DATA8 g, DATA8 b)
216{
217 alpha = alpha * rel_alpha;
218 if (alpha == 0)
219 return;
220
221 alpha++;
222
223 DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
224 *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha);
225}
226
227static void
228_soft8_scanline_blend_transp_solid_mul_color_transp(DATA8 * src, DATA8 * alpha,
229 DATA8 * dst, int size,
230 DATA8 rel_alpha, DATA8 r,
231 DATA8 g, DATA8 b)
232{
233 DATA8 *start, *end;
234
235 start = dst;
236 end = start + (size & ~7);
237
238 pld(alpha, 0);
239 pld(src, 0);
240
241 while (start < end)
242 {
243 DATA8 alpha1, alpha2;
244
245 alpha1 = alpha[0];
246 alpha += 8;
247
248 pld(src, 32);
249 pld(start, 32);
250
251 src += 8;
252 start += 8;
253
254 alpha2 = alpha[-7];
255 _soft8_pt_blend_transp_solid_mul_color_transp
256 (start - 8, src[-8], alpha1, rel_alpha, r, g, b);
257
258 alpha1 = alpha[-6];
259 _soft8_pt_blend_transp_solid_mul_color_transp
260 (start - 7, src[-7], alpha2, rel_alpha, r, g, b);
261
262 alpha2 = alpha[-5];
263 _soft8_pt_blend_transp_solid_mul_color_transp
264 (start - 6, src[-6], alpha1, rel_alpha, r, g, b);
265
266 alpha1 = alpha[-4];
267 _soft8_pt_blend_transp_solid_mul_color_transp
268 (start - 5, src[-5], alpha2, rel_alpha, r, g, b);
269
270 alpha2 = alpha[-3];
271 _soft8_pt_blend_transp_solid_mul_color_transp
272 (start - 4, src[-4], alpha1, rel_alpha, r, g, b);
273
274 alpha1 = alpha[-2];
275 _soft8_pt_blend_transp_solid_mul_color_transp
276 (start - 3, src[-3], alpha2, rel_alpha, r, g, b);
277
278 alpha2 = alpha[-1];
279 _soft8_pt_blend_transp_solid_mul_color_transp
280 (start - 2, src[-2], alpha1, rel_alpha, r, g, b);
281
282 _soft8_pt_blend_transp_solid_mul_color_transp
283 (start - 1, src[-1], alpha2, rel_alpha, r, g, b);
284 }
285
286 end = start + (size & 7);
287 for (; start < end; start++, src++, alpha++)
288 _soft8_pt_blend_transp_solid_mul_color_transp
289 (start, *src, *alpha, rel_alpha, r, g, b);
290}
291
292EFL_ALWAYS_INLINE void
293_soft8_pt_blend_solid_solid_mul_color_transp(DATA8 * p_dst, DATA8 src,
294 DATA8 rel_alpha, DATA8 r, DATA8 g,
295 DATA8 b)
296{
297 DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
298 *p_dst = GRY_8_BLEND(gry8, *p_dst, rel_alpha);
299}
300
301static void
302_soft8_scanline_blend_solid_solid_mul_color_transp(DATA8 * src, DATA8 * dst,
303 int size, DATA8 rel_alpha,
304 DATA8 r, DATA8 g, DATA8 b)
305{
306 DATA8 *start, *end;
307
308 start = dst;
309 end = start + (size & ~7);
310
311 pld(src, 0);
312
313 while (start < end)
314 {
315 pld(src, 32);
316 UNROLL8(
317 {
318 _soft8_pt_blend_solid_solid_mul_color_transp
319 (start, *src, rel_alpha, r, g, b); start++; src++;}
320 );
321 }
322
323 end = start + (size & 7);
324 for (; start < end; start++, src++)
325 _soft8_pt_blend_solid_solid_mul_color_transp
326 (start, *src, rel_alpha, r, g, b);
327}
328
329/***********************************************************************
330 * Blend operations with extra multiply color
331 */
332EFL_ALWAYS_INLINE void
333_soft8_pt_blend_transp_solid_mul_color_solid(DATA8 * p_dst, DATA8 src,
334 DATA8 alpha, DATA8 r, DATA8 g,
335 DATA8 b)
336{
337 if (alpha == 0)
338 return;
339
340 DATA8 gry8 = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
341
342 if (alpha == 0xff)
343 *p_dst = gry8;
344 else
345 {
346 *p_dst = GRY_8_BLEND(gry8, *p_dst, alpha);
347 }
348}
349
350static void
351_soft8_scanline_blend_transp_solid_mul_color_solid(DATA8 * src, DATA8 * alpha,
352 DATA8 * dst, int size,
353 DATA8 r, DATA8 g, DATA8 b)
354{
355 DATA8 *start, *end;
356
357 start = dst;
358 end = start + (size & ~7);
359
360 pld(alpha, 0);
361 pld(src, 0);
362
363 while (start < end)
364 {
365 DATA8 alpha1, alpha2;
366
367 alpha1 = alpha[0];
368 alpha += 8;
369
370 pld(alpha, 8);
371 pld(src, 32);
372
373 src += 8;
374 start += 8;
375
376 alpha2 = alpha[-7];
377 _soft8_pt_blend_transp_solid_mul_color_solid
378 (start - 8, src[-8], alpha1, r, g, b);
379
380 alpha1 = alpha[-6];
381 _soft8_pt_blend_transp_solid_mul_color_solid
382 (start - 7, src[-7], alpha2, r, g, b);
383
384 alpha2 = alpha[-5];
385 _soft8_pt_blend_transp_solid_mul_color_solid
386 (start - 6, src[-6], alpha1, r, g, b);
387
388 alpha1 = alpha[-4];
389 _soft8_pt_blend_transp_solid_mul_color_solid
390 (start - 5, src[-5], alpha2, r, g, b);
391
392 alpha2 = alpha[-3];
393 _soft8_pt_blend_transp_solid_mul_color_solid
394 (start - 4, src[-4], alpha1, r, g, b);
395
396 alpha1 = alpha[-2];
397 _soft8_pt_blend_transp_solid_mul_color_solid
398 (start - 3, src[-3], alpha2, r, g, b);
399
400 alpha2 = alpha[-1];
401 _soft8_pt_blend_transp_solid_mul_color_solid
402 (start - 2, src[-2], alpha1, r, g, b);
403
404 _soft8_pt_blend_transp_solid_mul_color_solid
405 (start - 1, src[-1], alpha2, r, g, b);
406 }
407
408 end = start + (size & 7);
409 for (; start < end; start++, src++, alpha++)
410 _soft8_pt_blend_transp_solid_mul_color_solid
411 (start, *src, *alpha, r, g, b);
412}
413
414EFL_ALWAYS_INLINE void
415_soft8_pt_blend_solid_solid_mul_color_solid(DATA8 * p_dst, DATA8 src, DATA8 r,
416 DATA8 g, DATA8 b)
417{
418 *p_dst = (src * GRY_8_FROM_COMPONENTS(r, g, b)) >> 8;
419}
420
421static void
422_soft8_scanline_blend_solid_solid_mul_color_solid(DATA8 * src, DATA8 * dst,
423 int size, DATA8 r, DATA8 g,
424 DATA8 b)
425{
426 DATA8 *start, *end;
427
428 start = dst;
429 end = start + (size & ~7);
430
431 pld(src, 0);
432
433 while (start < end)
434 {
435 pld(src, 32);
436 UNROLL8(
437 {
438 _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g,
439 b); start++;
440 src++;}
441 );
442 }
443
444 end = start + (size & 7);
445 for (; start < end; start++, src++)
446 _soft8_pt_blend_solid_solid_mul_color_solid(start, *src, r, g, b);
447}
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 @@
1/** NOTE: This file is meant to be included by users **/
2
3/*****************************************************************************
4 * Point processing
5 *
6 * _soft8_pt_<description>_<src>_<dst>[_<modifier>]()
7 *
8 * Scanline processing
9 *
10 * _soft8_scanline_<description>_<src>_<dst>[_<modifier>]()
11 *
12 ****************************************************************************/
13EFL_ALWAYS_INLINE void
14_soft8_pt_fill_solid_solid(DATA8 * dst, DATA8 gry8)
15{
16 *dst = gry8;
17}
18
19EFL_ALWAYS_INLINE void
20_soft8_scanline_fill_solid_solid(DATA8 * dst, int size, DATA8 gry8)
21{
22 memset(dst, gry8, size);
23}
24
25EFL_ALWAYS_INLINE void
26_soft8_pt_fill_transp_solid(DATA8 * dst, DATA8 gry8, DATA8 alpha)
27{
28 *dst = GRY_8_BLEND(gry8, *dst, alpha);
29}
30
31static void
32_soft8_scanline_fill_transp_solid(DATA8 * dst, int size, DATA8 gry8,
33 DATA8 alpha)
34{
35 DATA8 *start, *end;
36
37 start = dst;
38 pld(start, 0);
39 end = start + (size & ~7);
40
41 while (start < end)
42 {
43 pld(start, 32);
44 UNROLL8(
45 {
46 _soft8_pt_fill_transp_solid(start, gry8, alpha); start++;}
47 );
48 }
49
50 end = start + (size & 7);
51 for (; start < end; start++)
52 _soft8_pt_fill_transp_solid(start, gry8, alpha);
53}
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 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4AM_CPPFLAGS = \
5-I. \
6-I$(top_srcdir)/src/lib \
7-I$(top_srcdir)/src/lib/include \
8-DPACKAGE_BIN_DIR=\"$(bindir)\" \
9-DPACKAGE_LIB_DIR=\"$(libdir)\" \
10-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
11@FREETYPE_CFLAGS@ \
12@EINA_CFLAGS@ \
13@EVIL_CFLAGS@ \
14@PIXMAN_CFLAGS@
15
16noinst_LTLIBRARIES = libevas_file.la
17libevas_file_la_SOURCES = \
18evas_path.c \
19evas_module.c
20libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@
21
22EXTRA_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18VPATH = @srcdir@
19pkgdatadir = $(datadir)/@PACKAGE@
20pkgincludedir = $(includedir)/@PACKAGE@
21pkglibdir = $(libdir)/@PACKAGE@
22pkglibexecdir = $(libexecdir)/@PACKAGE@
23am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
24install_sh_DATA = $(install_sh) -c -m 644
25install_sh_PROGRAM = $(install_sh) -c
26install_sh_SCRIPT = $(install_sh) -c
27INSTALL_HEADER = $(INSTALL_DATA)
28transform = $(program_transform_name)
29NORMAL_INSTALL = :
30PRE_INSTALL = :
31POST_INSTALL = :
32NORMAL_UNINSTALL = :
33PRE_UNINSTALL = :
34POST_UNINSTALL = :
35build_triplet = @build@
36host_triplet = @host@
37subdir = src/lib/file
38DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
39ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
41 $(top_srcdir)/m4/efl_coverage.m4 \
42 $(top_srcdir)/m4/efl_doxygen.m4 \
43 $(top_srcdir)/m4/efl_fnmatch.m4 \
44 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
45 $(top_srcdir)/m4/evas_check_engine.m4 \
46 $(top_srcdir)/m4/evas_check_loader.m4 \
47 $(top_srcdir)/m4/evas_converter.m4 \
48 $(top_srcdir)/m4/evas_dither.m4 \
49 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
50 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
51 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
52 $(top_srcdir)/configure.ac
53am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
54 $(ACLOCAL_M4)
55mkinstalldirs = $(install_sh) -d
56CONFIG_HEADER = $(top_builddir)/config.h
57CONFIG_CLEAN_FILES =
58CONFIG_CLEAN_VPATH_FILES =
59LTLIBRARIES = $(noinst_LTLIBRARIES)
60libevas_file_la_DEPENDENCIES =
61am_libevas_file_la_OBJECTS = evas_path.lo evas_module.lo
62libevas_file_la_OBJECTS = $(am_libevas_file_la_OBJECTS)
63AM_V_lt = $(am__v_lt_$(V))
64am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
65am__v_lt_0 = --silent
66DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
67depcomp = $(SHELL) $(top_srcdir)/depcomp
68am__depfiles_maybe = depfiles
69am__mv = mv -f
70COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
71 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
72LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
73 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
74 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
75 $(AM_CFLAGS) $(CFLAGS)
76AM_V_CC = $(am__v_CC_$(V))
77am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
78am__v_CC_0 = @echo " CC " $@;
79AM_V_at = $(am__v_at_$(V))
80am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
81am__v_at_0 = @
82CCLD = $(CC)
83LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
84 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
85 $(AM_LDFLAGS) $(LDFLAGS) -o $@
86AM_V_CCLD = $(am__v_CCLD_$(V))
87am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
88am__v_CCLD_0 = @echo " CCLD " $@;
89AM_V_GEN = $(am__v_GEN_$(V))
90am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
91am__v_GEN_0 = @echo " GEN " $@;
92SOURCES = $(libevas_file_la_SOURCES)
93DIST_SOURCES = $(libevas_file_la_SOURCES)
94ETAGS = etags
95CTAGS = ctags
96DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
97ACLOCAL = @ACLOCAL@
98ALLOCA = @ALLOCA@
99AMTAR = @AMTAR@
100AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
101AR = @AR@
102AS = @AS@
103AUTOCONF = @AUTOCONF@
104AUTOHEADER = @AUTOHEADER@
105AUTOMAKE = @AUTOMAKE@
106AWK = @AWK@
107CC = @CC@
108CCDEPMODE = @CCDEPMODE@
109CFLAGS = @CFLAGS@
110CHECK_CFLAGS = @CHECK_CFLAGS@
111CHECK_LIBS = @CHECK_LIBS@
112CPP = @CPP@
113CPPFLAGS = @CPPFLAGS@
114CXX = @CXX@
115CXXCPP = @CXXCPP@
116CXXDEPMODE = @CXXDEPMODE@
117CXXFLAGS = @CXXFLAGS@
118CYGPATH_W = @CYGPATH_W@
119DEFS = @DEFS@
120DEPDIR = @DEPDIR@
121DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
122DIRECTFB_LIBS = @DIRECTFB_LIBS@
123DLLTOOL = @DLLTOOL@
124DSYMUTIL = @DSYMUTIL@
125DUMPBIN = @DUMPBIN@
126ECHO_C = @ECHO_C@
127ECHO_N = @ECHO_N@
128ECHO_T = @ECHO_T@
129ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
130ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
131EDB_CFLAGS = @EDB_CFLAGS@
132EDB_LIBS = @EDB_LIBS@
133EDJE_CFLAGS = @EDJE_CFLAGS@
134EDJE_LIBS = @EDJE_LIBS@
135EET_CFLAGS = @EET_CFLAGS@
136EET_LIBS = @EET_LIBS@
137EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
138EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
139EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
140EGREP = @EGREP@
141EINA_CFLAGS = @EINA_CFLAGS@
142EINA_LIBS = @EINA_LIBS@
143EVAS_CFLAGS = @EVAS_CFLAGS@
144EVAS_LIBS = @EVAS_LIBS@
145EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
146EVIL_CFLAGS = @EVIL_CFLAGS@
147EVIL_LIBS = @EVIL_LIBS@
148EXEEXT = @EXEEXT@
149EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
150EXOTIC_LIBS = @EXOTIC_LIBS@
151FGREP = @FGREP@
152FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
153FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
154FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
155FREETYPE_LIBS = @FREETYPE_LIBS@
156FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
157FRIBIDI_LIBS = @FRIBIDI_LIBS@
158GL_EET_CFLAGS = @GL_EET_CFLAGS@
159GL_EET_LIBS = @GL_EET_LIBS@
160GREP = @GREP@
161HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
162HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
163INSTALL = @INSTALL@
164INSTALL_DATA = @INSTALL_DATA@
165INSTALL_PROGRAM = @INSTALL_PROGRAM@
166INSTALL_SCRIPT = @INSTALL_SCRIPT@
167INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
168LD = @LD@
169LDFLAGS = @LDFLAGS@
170LIBOBJS = @LIBOBJS@
171LIBS = @LIBS@
172LIBTOOL = @LIBTOOL@
173LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
174LINEBREAK_LIBS = @LINEBREAK_LIBS@
175LIPO = @LIPO@
176LN_S = @LN_S@
177LTLIBOBJS = @LTLIBOBJS@
178MAKEINFO = @MAKEINFO@
179MKDIR_P = @MKDIR_P@
180MODULE_ARCH = @MODULE_ARCH@
181NM = @NM@
182NMEDIT = @NMEDIT@
183OBJC = @OBJC@
184OBJCDEPMODE = @OBJCDEPMODE@
185OBJCFLAGS = @OBJCFLAGS@
186OBJDUMP = @OBJDUMP@
187OBJEXT = @OBJEXT@
188OTOOL = @OTOOL@
189OTOOL64 = @OTOOL64@
190PACKAGE = @PACKAGE@
191PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
192PACKAGE_NAME = @PACKAGE_NAME@
193PACKAGE_STRING = @PACKAGE_STRING@
194PACKAGE_TARNAME = @PACKAGE_TARNAME@
195PACKAGE_URL = @PACKAGE_URL@
196PACKAGE_VERSION = @PACKAGE_VERSION@
197PATH_SEPARATOR = @PATH_SEPARATOR@
198PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
199PIXMAN_LIBS = @PIXMAN_LIBS@
200PKG_CONFIG = @PKG_CONFIG@
201PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
202PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
203PNG_CFLAGS = @PNG_CFLAGS@
204PNG_LIBS = @PNG_LIBS@
205RANLIB = @RANLIB@
206SDL_CFLAGS = @SDL_CFLAGS@
207SDL_LIBS = @SDL_LIBS@
208SED = @SED@
209SET_MAKE = @SET_MAKE@
210SHELL = @SHELL@
211SHM_OPEN_LINK = @SHM_OPEN_LINK@
212STRIP = @STRIP@
213SVG_CFLAGS = @SVG_CFLAGS@
214SVG_LIBS = @SVG_LIBS@
215VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
216VALGRIND_LIBS = @VALGRIND_LIBS@
217VERSION = @VERSION@
218VMAJ = @VMAJ@
219WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
220WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
221XCB_CFLAGS = @XCB_CFLAGS@
222XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
223XCB_GL_LIBS = @XCB_GL_LIBS@
224XCB_LIBS = @XCB_LIBS@
225XEXT_CFLAGS = @XEXT_CFLAGS@
226XEXT_LIBS = @XEXT_LIBS@
227XMKMF = @XMKMF@
228X_CFLAGS = @X_CFLAGS@
229X_EXTRA_LIBS = @X_EXTRA_LIBS@
230X_LIBS = @X_LIBS@
231X_PRE_LIBS = @X_PRE_LIBS@
232abs_builddir = @abs_builddir@
233abs_srcdir = @abs_srcdir@
234abs_top_builddir = @abs_top_builddir@
235abs_top_srcdir = @abs_top_srcdir@
236ac_ct_CC = @ac_ct_CC@
237ac_ct_CXX = @ac_ct_CXX@
238ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
239ac_ct_OBJC = @ac_ct_OBJC@
240altivec_cflags = @altivec_cflags@
241am__include = @am__include@
242am__leading_dot = @am__leading_dot@
243am__quote = @am__quote@
244am__tar = @am__tar@
245am__untar = @am__untar@
246bindir = @bindir@
247build = @build@
248build_alias = @build_alias@
249build_cpu = @build_cpu@
250build_os = @build_os@
251build_vendor = @build_vendor@
252builddir = @builddir@
253datadir = @datadir@
254datarootdir = @datarootdir@
255dlopen_libs = @dlopen_libs@
256docdir = @docdir@
257dvidir = @dvidir@
258edje_cc = @edje_cc@
259efl_doxygen = @efl_doxygen@
260efl_have_doxygen = @efl_have_doxygen@
261evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
262evas_engine_buffer_libs = @evas_engine_buffer_libs@
263evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
264evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
265evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
266evas_engine_directfb_libs = @evas_engine_directfb_libs@
267evas_engine_fb_cflags = @evas_engine_fb_cflags@
268evas_engine_fb_libs = @evas_engine_fb_libs@
269evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
270evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
271evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
272evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
273evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
274evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
275evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
276evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
277evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
278evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
279evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
280evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
281evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
282evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
283evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
284evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
285evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
286evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
287evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
288evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
289evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
290evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
291evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
292evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
293evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
294evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
295evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
296evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
297evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
298evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
299evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
300evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
301evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
302evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
303evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
304evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
305evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
306evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
307evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
308evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
309evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
310evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
311evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
312evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
313evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
314evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
315evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
316evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
317evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
318evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
319evas_image_loader_png_libs = @evas_image_loader_png_libs@
320evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
321evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
322evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
323evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
324evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
325evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
326evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
327evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
328evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
329evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
330evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
331evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
332exec_prefix = @exec_prefix@
333have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
334have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
335have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
336have_evas_engine_software_x11 = @have_evas_engine_software_x11@
337have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
338have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
339have_lcov = @have_lcov@
340host = @host@
341host_alias = @host_alias@
342host_cpu = @host_cpu@
343host_os = @host_os@
344host_vendor = @host_vendor@
345htmldir = @htmldir@
346includedir = @includedir@
347infodir = @infodir@
348install_sh = @install_sh@
349libdir = @libdir@
350libexecdir = @libexecdir@
351localedir = @localedir@
352localstatedir = @localstatedir@
353lt_ECHO = @lt_ECHO@
354lt_enable_auto_import = @lt_enable_auto_import@
355mandir = @mandir@
356mkdir_p = @mkdir_p@
357oldincludedir = @oldincludedir@
358pdfdir = @pdfdir@
359pkgconfig_requires_private = @pkgconfig_requires_private@
360prefix = @prefix@
361program_transform_name = @program_transform_name@
362psdir = @psdir@
363pthread_cflags = @pthread_cflags@
364pthread_libs = @pthread_libs@
365release_info = @release_info@
366requirement_evas = @requirement_evas@
367sbindir = @sbindir@
368sharedstatedir = @sharedstatedir@
369srcdir = @srcdir@
370sysconfdir = @sysconfdir@
371target_alias = @target_alias@
372top_build_prefix = @top_build_prefix@
373top_builddir = @top_builddir@
374top_srcdir = @top_srcdir@
375version_info = @version_info@
376MAINTAINERCLEANFILES = Makefile.in
377AM_CPPFLAGS = \
378-I. \
379-I$(top_srcdir)/src/lib \
380-I$(top_srcdir)/src/lib/include \
381-DPACKAGE_BIN_DIR=\"$(bindir)\" \
382-DPACKAGE_LIB_DIR=\"$(libdir)\" \
383-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
384@FREETYPE_CFLAGS@ \
385@EINA_CFLAGS@ \
386@EVIL_CFLAGS@ \
387@PIXMAN_CFLAGS@
388
389noinst_LTLIBRARIES = libevas_file.la
390libevas_file_la_SOURCES = \
391evas_path.c \
392evas_module.c
393
394libevas_file_la_LIBADD = @EINA_LIBS@ @EVIL_LIBS@
395EXTRA_DIST = evas_module.h evas_path.h
396all: all-am
397
398.SUFFIXES:
399.SUFFIXES: .c .lo .o .obj
400$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
401 @for dep in $?; do \
402 case '$(am__configure_deps)' in \
403 *$$dep*) \
404 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
405 && { if test -f $@; then exit 0; else break; fi; }; \
406 exit 1;; \
407 esac; \
408 done; \
409 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/file/Makefile'; \
410 $(am__cd) $(top_srcdir) && \
411 $(AUTOMAKE) --gnu src/lib/file/Makefile
412.PRECIOUS: Makefile
413Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
414 @case '$?' in \
415 *config.status*) \
416 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
417 *) \
418 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
419 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
420 esac;
421
422$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
423 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
424
425$(top_srcdir)/configure: $(am__configure_deps)
426 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
427$(ACLOCAL_M4): $(am__aclocal_m4_deps)
428 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
429$(am__aclocal_m4_deps):
430
431clean-noinstLTLIBRARIES:
432 -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
433 @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
434 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
435 test "$$dir" != "$$p" || dir=.; \
436 echo "rm -f \"$${dir}/so_locations\""; \
437 rm -f "$${dir}/so_locations"; \
438 done
439libevas_file.la: $(libevas_file_la_OBJECTS) $(libevas_file_la_DEPENDENCIES)
440 $(AM_V_CCLD)$(LINK) $(libevas_file_la_OBJECTS) $(libevas_file_la_LIBADD) $(LIBS)
441
442mostlyclean-compile:
443 -rm -f *.$(OBJEXT)
444
445distclean-compile:
446 -rm -f *.tab.c
447
448@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_module.Plo@am__quote@
449@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evas_path.Plo@am__quote@
450
451.c.o:
452@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
453@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
454@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
455@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
456@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
457@am__fastdepCC_FALSE@ $(COMPILE) -c $<
458
459.c.obj:
460@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
461@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
462@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
463@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
464@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
465@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
466
467.c.lo:
468@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
469@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
470@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
471@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
472@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
473@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
474
475mostlyclean-libtool:
476 -rm -f *.lo
477
478clean-libtool:
479 -rm -rf .libs _libs
480
481ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
482 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
483 unique=`for i in $$list; do \
484 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
485 done | \
486 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
487 END { if (nonempty) { for (i in files) print i; }; }'`; \
488 mkid -fID $$unique
489tags: TAGS
490
491TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
492 $(TAGS_FILES) $(LISP)
493 set x; \
494 here=`pwd`; \
495 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
496 unique=`for i in $$list; do \
497 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
498 done | \
499 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
500 END { if (nonempty) { for (i in files) print i; }; }'`; \
501 shift; \
502 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
503 test -n "$$unique" || unique=$$empty_fix; \
504 if test $$# -gt 0; then \
505 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
506 "$$@" $$unique; \
507 else \
508 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
509 $$unique; \
510 fi; \
511 fi
512ctags: CTAGS
513CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
514 $(TAGS_FILES) $(LISP)
515 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
516 unique=`for i in $$list; do \
517 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
518 done | \
519 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
520 END { if (nonempty) { for (i in files) print i; }; }'`; \
521 test -z "$(CTAGS_ARGS)$$unique" \
522 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
523 $$unique
524
525GTAGS:
526 here=`$(am__cd) $(top_builddir) && pwd` \
527 && $(am__cd) $(top_srcdir) \
528 && gtags -i $(GTAGS_ARGS) "$$here"
529
530distclean-tags:
531 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
532
533distdir: $(DISTFILES)
534 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
535 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
536 list='$(DISTFILES)'; \
537 dist_files=`for file in $$list; do echo $$file; done | \
538 sed -e "s|^$$srcdirstrip/||;t" \
539 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
540 case $$dist_files in \
541 */*) $(MKDIR_P) `echo "$$dist_files" | \
542 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
543 sort -u` ;; \
544 esac; \
545 for file in $$dist_files; do \
546 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
547 if test -d $$d/$$file; then \
548 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
549 if test -d "$(distdir)/$$file"; then \
550 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
551 fi; \
552 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
553 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
554 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
555 fi; \
556 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
557 else \
558 test -f "$(distdir)/$$file" \
559 || cp -p $$d/$$file "$(distdir)/$$file" \
560 || exit 1; \
561 fi; \
562 done
563check-am: all-am
564check: check-am
565all-am: Makefile $(LTLIBRARIES)
566installdirs:
567install: install-am
568install-exec: install-exec-am
569install-data: install-data-am
570uninstall: uninstall-am
571
572install-am: all-am
573 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
574
575installcheck: installcheck-am
576install-strip:
577 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
578 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
579 `test -z '$(STRIP)' || \
580 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
581mostlyclean-generic:
582
583clean-generic:
584
585distclean-generic:
586 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
587 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
588
589maintainer-clean-generic:
590 @echo "This command is intended for maintainers to use"
591 @echo "it deletes files that may require special tools to rebuild."
592 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
593clean: clean-am
594
595clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
596 mostlyclean-am
597
598distclean: distclean-am
599 -rm -rf ./$(DEPDIR)
600 -rm -f Makefile
601distclean-am: clean-am distclean-compile distclean-generic \
602 distclean-tags
603
604dvi: dvi-am
605
606dvi-am:
607
608html: html-am
609
610html-am:
611
612info: info-am
613
614info-am:
615
616install-data-am:
617
618install-dvi: install-dvi-am
619
620install-dvi-am:
621
622install-exec-am:
623
624install-html: install-html-am
625
626install-html-am:
627
628install-info: install-info-am
629
630install-info-am:
631
632install-man:
633
634install-pdf: install-pdf-am
635
636install-pdf-am:
637
638install-ps: install-ps-am
639
640install-ps-am:
641
642installcheck-am:
643
644maintainer-clean: maintainer-clean-am
645 -rm -rf ./$(DEPDIR)
646 -rm -f Makefile
647maintainer-clean-am: distclean-am maintainer-clean-generic
648
649mostlyclean: mostlyclean-am
650
651mostlyclean-am: mostlyclean-compile mostlyclean-generic \
652 mostlyclean-libtool
653
654pdf: pdf-am
655
656pdf-am:
657
658ps: ps-am
659
660ps-am:
661
662uninstall-am:
663
664.MAKE: install-am install-strip
665
666.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
667 clean-libtool clean-noinstLTLIBRARIES ctags distclean \
668 distclean-compile distclean-generic distclean-libtool \
669 distclean-tags distdir dvi dvi-am html html-am info info-am \
670 install install-am install-data install-data-am install-dvi \
671 install-dvi-am install-exec install-exec-am install-html \
672 install-html-am install-info install-info-am install-man \
673 install-pdf install-pdf-am install-ps install-ps-am \
674 install-strip installcheck installcheck-am installdirs \
675 maintainer-clean maintainer-clean-generic mostlyclean \
676 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
677 pdf pdf-am ps ps-am tags uninstall uninstall-am
678
679
680# Tell versions [3.59,3.63) of GNU make to not export all variables.
681# Otherwise a system limit (for SysV at least) may be exceeded.
682.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 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <string.h>
6
7#include <evas_common.h>
8#include <evas_private.h>
9#include <evas_module.h>
10
11
12static Eina_Hash *evas_modules[4] = {
13 NULL,
14 NULL,
15 NULL,
16 NULL
17};
18
19static Eina_List *eina_evas_modules = NULL;
20static Eina_List *evas_module_paths = NULL;
21static Eina_Array *evas_engines = NULL;
22
23static Eina_List *
24_evas_module_append(Eina_List *list, char *path)
25{
26 if (path)
27 {
28 if (evas_file_path_exists(path))
29 list = eina_list_append(list, path);
30 else
31 free(path);
32 }
33 return list;
34}
35
36/* this will alloc a list of paths to search for the modules */
37/* by now these are: */
38/* 1. ~/.evas/modules/ */
39/* 2. $(EVAS_MODULE_DIR)/evas/modules/ */
40/* 3. dladdr/evas/modules/ */
41/* 4. PREFIX/evas/modules/ */
42void
43evas_module_paths_init(void)
44{
45 char *path;
46
47 /* 1. ~/.evas/modules/ */
48 path = eina_module_environment_path_get("HOME", "/.evas/modules");
49 evas_module_paths = _evas_module_append(evas_module_paths, path);
50
51 /* 2. $(EVAS_MODULE_DIR)/evas/modules/ */
52 path = eina_module_environment_path_get("EVAS_MODULES_DIR", "/evas/modules");
53 if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
54 free(path);
55 else
56 evas_module_paths = _evas_module_append(evas_module_paths, path);
57
58 /* 3. libevas.so/../evas/modules/ */
59 path = eina_module_symbol_path_get(evas_module_paths_init, "/evas/modules");
60 if (eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
61 free(path);
62 else
63 evas_module_paths = _evas_module_append(evas_module_paths, path);
64
65 /* 4. PREFIX/evas/modules/ */
66#ifndef _MSC_VER
67 path = PACKAGE_LIB_DIR "/evas/modules";
68 if (!eina_list_search_unsorted(evas_module_paths, (Eina_Compare_Cb) strcmp, path))
69 {
70 path = strdup(path);
71 if (path)
72 evas_module_paths = _evas_module_append(evas_module_paths, path);
73 }
74#endif
75}
76
77#define EVAS_EINA_STATIC_MODULE_DEFINE(Tn, Name) \
78 Eina_Bool evas_##Tn##_##Name##_init(void); \
79 void evas_##Tn##_##Name##_shutdown(void);
80
81#define EVAS_EINA_STATIC_MODULE_USE(Tn, Name) \
82 { evas_##Tn##_##Name##_init, evas_##Tn##_##Name##_shutdown }
83
84EVAS_EINA_STATIC_MODULE_DEFINE(engine, buffer);
85EVAS_EINA_STATIC_MODULE_DEFINE(engine, direct3d);
86EVAS_EINA_STATIC_MODULE_DEFINE(engine, directfb);
87EVAS_EINA_STATIC_MODULE_DEFINE(engine, fb);
88EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_x11);
89EVAS_EINA_STATIC_MODULE_DEFINE(engine, gl_sdl);
90EVAS_EINA_STATIC_MODULE_DEFINE(engine, psl1ght);
91EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16);
92EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_ddraw);
93EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_sdl);
94EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_wince);
95EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_16_x11);
96EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8);
97EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_8_x11);
98EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_ddraw);
99EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_gdi);
100EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_generic);
101EVAS_EINA_STATIC_MODULE_DEFINE(engine, software_x11);
102EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, bmp);
103EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, edb);
104EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, eet);
105EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, generic);
106EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, gif);
107EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, ico);
108EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, jpeg);
109EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, pmaps);
110EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, png);
111EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, psd);
112EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, svg);
113EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tga);
114EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, tiff);
115EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, wbmp);
116EVAS_EINA_STATIC_MODULE_DEFINE(image_loader, xpm);
117EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, edb);
118EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, eet);
119EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, jpeg);
120EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, png);
121EVAS_EINA_STATIC_MODULE_DEFINE(image_saver, tiff);
122
123static const struct {
124 Eina_Bool (*init)(void);
125 void (*shutdown)(void);
126} evas_static_module[] = {
127#ifdef EVAS_STATIC_BUILD_BUFFER
128 EVAS_EINA_STATIC_MODULE_USE(engine, buffer),
129#endif
130#ifdef EVAS_STATIC_BUILD_DIRECT3D
131 EVAS_EINA_STATIC_MODULE_USE(engine, direct3d),
132#endif
133#ifdef EVAS_STATIC_BUILD_DIRECTFB
134 EVAS_EINA_STATIC_MODULE_USE(engine, directfb),
135#endif
136#ifdef EVAS_STATIC_BUILD_FB
137 EVAS_EINA_STATIC_MODULE_USE(engine, fb),
138#endif
139#ifdef EVAS_STATIC_BUILD_GL_X11
140 EVAS_EINA_STATIC_MODULE_USE(engine, gl_x11),
141#endif
142#ifdef EVAS_STATIC_BUILD_GL_SDL
143 EVAS_EINA_STATIC_MODULE_USE(engine, gl_sdl),
144#endif
145#ifdef EVAS_STATIC_BUILD_PSL1GHT
146 EVAS_EINA_STATIC_MODULE_USE(engine, psl1ght),
147#endif
148#ifdef EVAS_STATIC_BUILD_SOFTWARE_16
149 EVAS_EINA_STATIC_MODULE_USE(engine, software_16),
150#endif
151#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
152 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_ddraw),
153#endif
154#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_SDL
155 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_sdl),
156#endif
157#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_WINCE
158 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_wince),
159#endif
160#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_X11
161 EVAS_EINA_STATIC_MODULE_USE(engine, software_16_x11),
162#endif
163#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_DDRAW
164 EVAS_EINA_STATIC_MODULE_USE(engine, software_ddraw),
165#endif
166#ifdef EVAS_STATIC_BUILD_SOFTWARE_16_GDI
167 EVAS_EINA_STATIC_MODULE_USE(engine, software_gdi),
168#endif
169#ifdef EVAS_STATIC_BUILD_SOFTWARE_8
170 EVAS_EINA_STATIC_MODULE_USE(engine, software_8),
171#endif
172#ifdef EVAS_STATIC_BUILD_SOFTWARE_8_X11
173 EVAS_EINA_STATIC_MODULE_USE(engine, software_8_x11),
174#endif
175#ifdef EVAS_STATIC_BUILD_SOFTWARE_GENERIC
176 EVAS_EINA_STATIC_MODULE_USE(engine, software_generic),
177#endif
178#ifdef EVAS_STATIC_BUILD_SOFTWARE_X11
179 EVAS_EINA_STATIC_MODULE_USE(engine, software_x11),
180#endif
181#ifdef EVAS_STATIC_BUILD_BMP
182 EVAS_EINA_STATIC_MODULE_USE(image_loader, bmp),
183#endif
184#ifdef EVAS_STATIC_BUILD_EDB
185 EVAS_EINA_STATIC_MODULE_USE(image_loader, edb),
186#endif
187#ifdef EVAS_STATIC_BUILD_EET
188 EVAS_EINA_STATIC_MODULE_USE(image_loader, eet),
189#endif
190#ifdef EVAS_STATIC_BUILD_GENERIC
191 EVAS_EINA_STATIC_MODULE_USE(image_loader, generic),
192#endif
193#ifdef EVAS_STATIC_BUILD_GIF
194 EVAS_EINA_STATIC_MODULE_USE(image_loader, gif),
195#endif
196#ifdef EVAS_STATIC_BUILD_ICO
197 EVAS_EINA_STATIC_MODULE_USE(image_loader, ico),
198#endif
199#ifdef EVAS_STATIC_BUILD_JPEG
200 EVAS_EINA_STATIC_MODULE_USE(image_loader, jpeg),
201#endif
202#ifdef EVAS_STATIC_BUILD_PMAPS
203 EVAS_EINA_STATIC_MODULE_USE(image_loader, pmaps),
204#endif
205#ifdef EVAS_STATIC_BUILD_PNG
206 EVAS_EINA_STATIC_MODULE_USE(image_loader, png),
207#endif
208#ifdef EVAS_STATIC_BUILD_PSD
209 EVAS_EINA_STATIC_MODULE_USE(image_loader, psd),
210#endif
211#ifdef EVAS_STATIC_BUILD_SVG
212 EVAS_EINA_STATIC_MODULE_USE(image_loader, svg),
213#endif
214#ifdef EVAS_STATIC_BUILD_TGA
215 EVAS_EINA_STATIC_MODULE_USE(image_loader, tga),
216#endif
217#ifdef EVAS_STATIC_BUILD_TIFF
218 EVAS_EINA_STATIC_MODULE_USE(image_loader, tiff),
219#endif
220#ifdef EVAS_STATIC_BUILD_WBMP
221 EVAS_EINA_STATIC_MODULE_USE(image_loader, wbmp),
222#endif
223#ifdef EVAS_STATIC_BUILD_XPM
224 EVAS_EINA_STATIC_MODULE_USE(image_loader, xpm),
225#endif
226#ifdef EVAS_STATIC_BUILD_EDB
227 EVAS_EINA_STATIC_MODULE_USE(image_saver, edb),
228#endif
229#ifdef EVAS_STATIC_BUILD_EET
230 EVAS_EINA_STATIC_MODULE_USE(image_saver, eet),
231#endif
232#if defined (EVAS_BUILD_SAVER_JPEG) && defined (EVAS_STATIC_BUILD_JPEG)
233 EVAS_EINA_STATIC_MODULE_USE(image_saver, jpeg),
234#endif
235#ifdef EVAS_STATIC_BUILD_PNG
236 EVAS_EINA_STATIC_MODULE_USE(image_saver, png),
237#endif
238#ifdef EVAS_STATIC_BUILD_TIFF
239 EVAS_EINA_STATIC_MODULE_USE(image_saver, tiff),
240#endif
241 { NULL, NULL }
242};
243
244/* this will alloc an Evas_Module struct for each module
245 * it finds on the paths */
246void
247evas_module_init(void)
248{
249 int i;
250
251 evas_module_paths_init();
252
253 evas_modules[EVAS_MODULE_TYPE_ENGINE] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
254 evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
255 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
256 evas_modules[EVAS_MODULE_TYPE_OBJECT] = eina_hash_string_small_new(/* FIXME: Add a function to cleanup stuff. */ NULL);
257
258 evas_engines = eina_array_new(4);
259
260 for (i = 0; evas_static_module[i].init; ++i)
261 evas_static_module[i].init();
262}
263
264Eina_Bool
265evas_module_register(const Evas_Module_Api *module, Evas_Module_Type type)
266{
267 Evas_Module *em;
268
269 if ((unsigned int)type > 3) return EINA_FALSE;
270 if (!module) return EINA_FALSE;
271 if (module->version != EVAS_MODULE_API_VERSION) return EINA_FALSE;
272
273 em = eina_hash_find(evas_modules[type], module->name);
274 if (em) return EINA_FALSE;
275
276 em = calloc(1, sizeof (Evas_Module));
277 if (!em) return EINA_FALSE;
278
279 em->definition = module;
280
281 if (type == EVAS_MODULE_TYPE_ENGINE)
282 {
283 eina_array_push(evas_engines, em);
284 em->id_engine = eina_array_count(evas_engines);
285 }
286
287 eina_hash_direct_add(evas_modules[type], module->name, em);
288
289 return EINA_TRUE;
290}
291
292Eina_List *
293evas_module_engine_list(void)
294{
295 Evas_Module *em;
296 Eina_List *r = NULL;
297 Eina_Array_Iterator iterator;
298 unsigned int i;
299
300 EINA_ARRAY_ITER_NEXT(evas_engines, i, em, iterator)
301 r = eina_list_append(r, em->definition->name);
302
303 return r;
304}
305
306Eina_Bool
307evas_module_unregister(const Evas_Module_Api *module, Evas_Module_Type type)
308{
309 Evas_Module *em;
310
311 if ((unsigned int)type > 3) return EINA_FALSE;
312 if (!module) return EINA_FALSE;
313
314 em = eina_hash_find(evas_modules[type], module->name);
315 if (!em || em->definition != module) return EINA_FALSE;
316
317 if (type == EVAS_MODULE_TYPE_ENGINE)
318 eina_array_data_set(evas_engines, em->id_engine, NULL);
319
320 eina_hash_del(evas_modules[type], module->name, em);
321 free(em);
322
323 return EINA_TRUE;
324}
325
326#if defined(__CEGCC__) || defined(__MINGW32CE__)
327# define EVAS_MODULE_NAME_IMAGE_SAVER "saver_%s.dll"
328# define EVAS_MODULE_NAME_IMAGE_LOADER "loader_%s.dll"
329# define EVAS_MODULE_NAME_ENGINE "engine_%s.dll"
330# define EVAS_MODULE_NAME_OBJECT "object_%s.dll"
331#elif _WIN32
332# define EVAS_MODULE_NAME_IMAGE_SAVER "module.dll"
333# define EVAS_MODULE_NAME_IMAGE_LOADER "module.dll"
334# define EVAS_MODULE_NAME_ENGINE "module.dll"
335# define EVAS_MODULE_NAME_OBJECT "module.dll"
336#else
337# define EVAS_MODULE_NAME_IMAGE_SAVER "module.so"
338# define EVAS_MODULE_NAME_IMAGE_LOADER "module.so"
339# define EVAS_MODULE_NAME_ENGINE "module.so"
340# define EVAS_MODULE_NAME_OBJECT "module.so"
341#endif
342
343Evas_Module *
344evas_module_find_type(Evas_Module_Type type, const char *name)
345{
346 const char *path;
347 const char *format = NULL;
348 char buffer[4096];
349 Evas_Module *em;
350 Eina_Module *en;
351 Eina_List *l;
352
353 if ((unsigned int)type > 3) return NULL;
354
355 em = eina_hash_find(evas_modules[type], name);
356 if (em) return em;
357
358 EINA_LIST_FOREACH(evas_module_paths, l, path)
359 {
360 switch (type)
361 {
362 case EVAS_MODULE_TYPE_ENGINE: format = "%s/engines/%s/%s/" EVAS_MODULE_NAME_ENGINE; break;
363 case EVAS_MODULE_TYPE_IMAGE_LOADER: format = "%s/loaders/%s/%s/" EVAS_MODULE_NAME_IMAGE_LOADER; break;
364 case EVAS_MODULE_TYPE_IMAGE_SAVER: format = "%s/savers/%s/%s/" EVAS_MODULE_NAME_IMAGE_SAVER; break;
365 case EVAS_MODULE_TYPE_OBJECT: format = "%s/object/%s/%s/" EVAS_MODULE_NAME_OBJECT; break;
366 }
367
368 snprintf(buffer, sizeof (buffer), format, path, name, MODULE_ARCH, name);
369 if (!evas_file_path_is_file(buffer)) continue;
370
371 en = eina_module_new(buffer);
372 if (!en) continue;
373
374 if (!eina_module_load(en))
375 {
376 eina_module_free(en);
377 continue;
378 }
379
380 em = eina_hash_find(evas_modules[type], name);
381 if (em)
382 {
383 eina_evas_modules = eina_list_append(eina_evas_modules, en);
384 return em;
385 }
386
387 eina_module_free(en);
388 }
389
390 return NULL;
391}
392
393Evas_Module *
394evas_module_engine_get(int render_method)
395{
396 if ((render_method <= 0) ||
397 ((unsigned int)render_method > eina_array_count(evas_engines)))
398 return NULL;
399 return eina_array_data_get(evas_engines, render_method - 1);
400}
401
402void
403evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata)
404{
405 eina_hash_foreach(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER], cb, fdata);
406}
407
408int
409evas_module_load(Evas_Module *em)
410{
411 if (em->loaded) return 1;
412 if (!em->definition) return 0;
413
414 if (!em->definition->func.open(em)) return 0;
415 em->loaded = 1;
416
417#ifdef BUILD_ASYNC_PRELOAD
418 LKI(em->lock);
419#endif
420 return 1;
421}
422
423void
424evas_module_unload(Evas_Module *em)
425{
426 if (!em->loaded)
427 return;
428 if (!em->definition)
429 return ;
430
431// for now lets not unload modules - they may still be in use.
432// em->definition->func.close(em);
433// em->loaded = 0;
434
435#ifdef BUILD_ASYNC_PRELOAD
436 LKD(em->lock);
437#endif
438}
439
440void
441evas_module_ref(Evas_Module *em)
442{
443#ifdef BUILD_ASYNC_PRELOAD
444 LKL(em->lock);
445#endif
446 em->ref++;
447#ifdef BUILD_ASYNC_PRELOAD
448 LKU(em->lock);
449#endif
450}
451
452void
453evas_module_unref(Evas_Module *em)
454{
455#ifdef BUILD_ASYNC_PRELOAD
456 LKL(em->lock);
457#endif
458 em->ref--;
459#ifdef BUILD_ASYNC_PRELOAD
460 LKU(em->lock);
461#endif
462}
463
464static int use_count = 0;
465
466void
467evas_module_use(Evas_Module *em)
468{
469 em->last_used = use_count;
470}
471
472void
473evas_module_clean(void)
474{
475 static int call_count = 0;
476/* int ago; */
477 int noclean = -1;
478/* Eina_List *l; */
479/* Evas_Module *em; */
480
481 /* only clean modules every 256 calls */
482 call_count++;
483 if (call_count <= 256) return;
484 call_count = 0;
485
486 if (noclean == -1)
487 {
488 if (getenv("EVAS_NOCLEAN"))
489 noclean = 1;
490 else
491 noclean = 0;
492 }
493 if (noclean == 1) return;
494
495 /* disable module cleaning for now - may cause instability with some modules */
496 return;
497
498 /* FIXME: Don't know what it is supposed to do. */
499/* /\* incriment use counter = 28bits *\/ */
500/* use_count++; */
501/* if (use_count > 0x0fffffff) use_count = 0; */
502
503/* /\* printf("CLEAN!\n"); *\/ */
504/* /\* go through all modules *\/ */
505/* EINA_LIST_FOREACH(evas_modules, l, em) */
506/* { */
507/* /\* printf("M %s %i %i\n", em->name, em->ref, em->loaded); *\/ */
508/* /\* if the module is refernced - skip *\/ */
509/* if ((em->ref > 0) || (!em->loaded)) continue; */
510/* /\* how many clean cycles ago was this module last used *\/ */
511/* ago = use_count - em->last_used; */
512/* if (em->last_used > use_count) ago += 0x10000000; */
513/* /\* if it was used last more than N clean cycles ago - unload *\/ */
514/* if (ago > 5) */
515/* { */
516/* /\* printf(" UNLOAD %s\n", em->name); *\/ */
517/* evas_module_unload(em); */
518/* } */
519/* } */
520}
521
522/* will dlclose all the modules loaded and free all the structs */
523void
524evas_module_shutdown(void)
525{
526 Eina_Module *en;
527 char *path;
528 int i;
529
530 for (i = 0; evas_static_module[i].shutdown; ++i)
531 evas_static_module[i].shutdown();
532
533 EINA_LIST_FREE(eina_evas_modules, en)
534 eina_module_free(en);
535
536 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_ENGINE]);
537 evas_modules[EVAS_MODULE_TYPE_ENGINE] = NULL;
538 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER]);
539 evas_modules[EVAS_MODULE_TYPE_IMAGE_LOADER] = NULL;
540 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER]);
541 evas_modules[EVAS_MODULE_TYPE_IMAGE_SAVER] = NULL;
542 eina_hash_free(evas_modules[EVAS_MODULE_TYPE_OBJECT]);
543 evas_modules[EVAS_MODULE_TYPE_OBJECT] = NULL;
544
545 EINA_LIST_FREE(evas_module_paths, path)
546 free(path);
547
548 eina_array_free(evas_engines);
549 evas_engines = NULL;
550}
551
552EAPI int
553_evas_module_engine_inherit(Evas_Func *funcs, char *name)
554{
555 Evas_Module *em;
556
557 em = evas_module_find_type(EVAS_MODULE_TYPE_ENGINE, name);
558 if (em)
559 {
560 if (evas_module_load(em))
561 {
562 /* FIXME: no way to unref */
563 evas_module_ref(em);
564 evas_module_use(em);
565 *funcs = *((Evas_Func *)(em->functions));
566 return 1;
567 }
568 }
569 return 0;
570}
571
572static Eina_Prefix *pfx = NULL;
573
574EAPI const char *
575_evas_module_libdir_get(void)
576{
577 if (!pfx) pfx = eina_prefix_new
578 (NULL, _evas_module_libdir_get, "EVAS", "evas", NULL,
579 PACKAGE_BIN_DIR, PACKAGE_LIB_DIR, PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
580 if (!pfx) return NULL;
581 return eina_prefix_lib_get(pfx);
582}
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 @@
1#ifndef _EVAS_MODULE_H
2#define _EVAS_MODULE_H
3
4
5/* the module api version */
6#define EVAS_MODULE_API_VERSION 2
7
8
9/* the module types */
10typedef enum _Evas_Module_Type
11{
12 EVAS_MODULE_TYPE_ENGINE = 0,
13 EVAS_MODULE_TYPE_IMAGE_LOADER = 1,
14 EVAS_MODULE_TYPE_IMAGE_SAVER = 2,
15 EVAS_MODULE_TYPE_OBJECT = 3
16} Evas_Module_Type;
17
18
19typedef struct _Evas_Module_Api Evas_Module_Api;
20typedef struct _Evas_Module Evas_Module;
21typedef struct _Evas_Module_Path Evas_Module_Path;
22typedef struct _Evas_Module_Engine Evas_Module_Engine;
23typedef struct _Evas_Module_Public Evas_Module_Public;
24
25/* the module api structure, all modules should define this struct */
26struct _Evas_Module_Api
27{
28 int version;
29 const char *name;
30 const char *author;
31
32 struct
33 {
34 int (*open)(Evas_Module *);
35 void (*close)(Evas_Module *);
36 } func;
37};
38
39/* the module structure */
40struct _Evas_Module
41{
42 const Evas_Module_Api *definition;
43
44 void *functions; /* this are the functions exported by the module */
45 int id_engine; /* some internal data for the module i.e the id for engines */
46
47 int ref; /* how many refs */
48 int last_used; /* the cycle count when it was last used */
49
50 LK(lock);
51
52 unsigned char loaded : 1;
53};
54
55
56/* the internals of the module api use this struct to reference a path with a module type
57 * instead of deduce the type from the path.
58 * */
59struct _Evas_Module_Path
60{
61 Evas_Module_Type type;
62 char *path;
63};
64
65void evas_module_paths_init (void);
66void evas_module_init (void);
67Evas_Module *evas_module_find_type (Evas_Module_Type type, const char *name);
68Evas_Module *evas_module_engine_get(int render_method);
69void evas_module_foreach_image_loader(Eina_Hash_Foreach cb, const void *fdata);
70int evas_module_load (Evas_Module *em);
71void evas_module_unload (Evas_Module *em);
72void evas_module_ref (Evas_Module *em);
73void evas_module_unref (Evas_Module *em);
74void evas_module_use (Evas_Module *em);
75void evas_module_clean (void);
76void evas_module_shutdown (void);
77EAPI Eina_Bool evas_module_register (const Evas_Module_Api *module, Evas_Module_Type type);
78EAPI Eina_Bool evas_module_unregister (const Evas_Module_Api *module, Evas_Module_Type type);
79
80#define EVAS_MODULE_DEFINE(Type, Tn, Name) \
81 Eina_Bool evas_##Tn##_##Name##_init(void) \
82 { \
83 return evas_module_register(&evas_modapi, Type); \
84 } \
85 void evas_##Tn##_##Name##_shutdown(void) \
86 { \
87 evas_module_unregister(&evas_modapi, Type); \
88 }
89
90#define EVAS_EINA_MODULE_DEFINE(Tn, Name) \
91 EINA_MODULE_INIT(evas_##Tn##_##Name##_init); \
92 EINA_MODULE_SHUTDOWN(evas_##Tn##_##Name##_shutdown);
93
94#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 @@
1/* os dependent file code. for unix-y like fs's only for now */
2/* if your os doesn't use unix-like fs starting with "/" for the root and */
3/* the file path separator isn't "/" then you may need to help out by */
4/* adding in a new set of functions here */
5
6#ifdef HAVE_CONFIG_H
7# include <config.h>
8#endif
9
10#include <limits.h>
11#include <stdlib.h>
12#include <sys/types.h>
13#include <sys/stat.h>
14/* get the casefold feature! */
15#include <fnmatch.h>
16#ifndef _MSC_VER
17# include <unistd.h>
18# include <sys/param.h>
19#endif
20
21#ifdef HAVE_EVIL
22# include <Evil.h>
23#endif
24
25#include "evas_common.h"
26#include "evas_private.h"
27
28#ifdef _WIN32
29# define EVAS_PATH_SEPARATOR "\\"
30#else
31# define EVAS_PATH_SEPARATOR "/"
32#endif
33
34int
35evas_file_path_is_full_path(const char *path)
36{
37 if (!path) return 0;
38#if defined _WIN32_WCE
39 if (path[0] == '\\') return 1;
40#elif defined _WIN32
41 if (evil_path_is_absolute(path)) return 1;
42#else
43 if (path[0] == '/') return 1;
44#endif
45 return 0;
46}
47
48char *
49evas_file_path_join(const char *path, const char *end)
50{
51 char *res = NULL;
52 size_t len;
53
54 if ((!path) && (!end)) return NULL;
55 if (!path) return strdup(end);
56 if (!end) return strdup(path);
57 len = strlen(path);
58 len += strlen(end);
59 len += strlen(EVAS_PATH_SEPARATOR);
60 res = malloc(len + 1);
61 if (!res) return NULL;
62 strcpy(res, path);
63 strcat(res, EVAS_PATH_SEPARATOR);
64 strcat(res, end);
65 return res;
66}
67
68int
69evas_file_path_exists(const char *path)
70{
71 struct stat st;
72
73 if (!stat(path, &st)) return 1;
74 return 0;
75}
76
77int
78evas_file_path_is_file(const char *path)
79{
80 struct stat st;
81
82 if (stat(path, &st) == -1) return 0;
83 if (S_ISREG(st.st_mode)) return 1;
84 return 0;
85}
86
87int
88evas_file_path_is_dir(const char *path)
89{
90 struct stat st;
91
92 if (stat(path, &st) == -1) return 0;
93 if (S_ISDIR(st.st_mode)) return 1;
94 return 0;
95}
96
97Eina_List *
98evas_file_path_list(char *path, const char *match, int match_case)
99{
100 Eina_File_Direct_Info *info;
101 Eina_Iterator *it;
102 Eina_List *files = NULL;
103 int flags;
104
105 flags = FNM_PATHNAME;
106#ifdef FNM_CASEFOLD
107 if (!match_case)
108 flags |= FNM_CASEFOLD;
109#else
110/*#warning "Your libc does not provide case-insensitive matching!"*/
111#endif
112
113 it = eina_file_direct_ls(path);
114 EINA_ITERATOR_FOREACH(it, info)
115 {
116 if (match)
117 {
118 if (fnmatch(match, info->path + info->name_start, flags) == 0)
119 files = eina_list_append(files, strdup(info->path + info->name_start));
120 }
121 else
122 files = eina_list_append(files, strdup(info->path + info->name_start));
123 }
124 if (it) eina_iterator_free(it);
125 return files;
126}
127
128DATA64
129evas_file_modified_time(const char *file)
130{
131 struct stat st;
132
133 if (stat(file, &st) < 0) return 0;
134 if (st.st_ctime > st.st_mtime) return (DATA64)st.st_ctime;
135 else return (DATA64)st.st_mtime;
136 return 0;
137}
138
139char *
140evas_file_path_resolve(const char *file)
141{
142#if 0
143 char buf[PATH_MAX], *buf2;
144#endif
145
146 return strdup(file);
147#if 0
148 if (!realpath(file, buf)) return NULL;
149 buf2 = strdup(buf);
150 return buf2;
151#endif
152}
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 @@
1#ifndef _EVAS_PATH_H
2#define _EVAS_PATH_H
3
4
5int evas_file_path_is_full_path (const char *path);
6char *evas_file_path_join (const char *path, const char *end);
7int evas_file_path_exists (const char *path);
8int evas_file_path_is_file (const char *path);
9int evas_file_path_is_dir (const char *path);
10Eina_List *evas_file_path_list (char *path, const char *match, int match_case);
11DATA64 evas_file_modified_time (const char *file);
12char *evas_file_path_resolve (const char *file);
13
14
15#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 @@
1
2MAINTAINERCLEANFILES = Makefile.in
3
4EXTRA_DIST = \
5evas_inline.x \
6evas_private.h \
7evas_options.h \
8evas_macros.h \
9evas_mmx.h \
10evas_common.h \
11evas_common_soft8.h \
12evas_common_soft16.h \
13evas_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 @@
1# Makefile.in generated by automake 1.11.1 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6# Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17VPATH = @srcdir@
18pkgdatadir = $(datadir)/@PACKAGE@
19pkgincludedir = $(includedir)/@PACKAGE@
20pkglibdir = $(libdir)/@PACKAGE@
21pkglibexecdir = $(libexecdir)/@PACKAGE@
22am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
23install_sh_DATA = $(install_sh) -c -m 644
24install_sh_PROGRAM = $(install_sh) -c
25install_sh_SCRIPT = $(install_sh) -c
26INSTALL_HEADER = $(INSTALL_DATA)
27transform = $(program_transform_name)
28NORMAL_INSTALL = :
29PRE_INSTALL = :
30POST_INSTALL = :
31NORMAL_UNINSTALL = :
32PRE_UNINSTALL = :
33POST_UNINSTALL = :
34build_triplet = @build@
35host_triplet = @host@
36subdir = src/lib/include
37DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
38ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
39am__aclocal_m4_deps = $(top_srcdir)/m4/efl_attribute.m4 \
40 $(top_srcdir)/m4/efl_coverage.m4 \
41 $(top_srcdir)/m4/efl_doxygen.m4 \
42 $(top_srcdir)/m4/efl_fnmatch.m4 \
43 $(top_srcdir)/m4/efl_path_max.m4 $(top_srcdir)/m4/efl_tests.m4 \
44 $(top_srcdir)/m4/evas_check_engine.m4 \
45 $(top_srcdir)/m4/evas_check_loader.m4 \
46 $(top_srcdir)/m4/evas_converter.m4 \
47 $(top_srcdir)/m4/evas_dither.m4 \
48 $(top_srcdir)/m4/evas_scaler.m4 $(top_srcdir)/m4/libtool.m4 \
49 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
50 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
51 $(top_srcdir)/configure.ac
52am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54mkinstalldirs = $(install_sh) -d
55CONFIG_HEADER = $(top_builddir)/config.h
56CONFIG_CLEAN_FILES =
57CONFIG_CLEAN_VPATH_FILES =
58AM_V_GEN = $(am__v_GEN_$(V))
59am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
60am__v_GEN_0 = @echo " GEN " $@;
61AM_V_at = $(am__v_at_$(V))
62am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
63am__v_at_0 = @
64SOURCES =
65DIST_SOURCES =
66DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67ACLOCAL = @ACLOCAL@
68ALLOCA = @ALLOCA@
69AMTAR = @AMTAR@
70AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
71AR = @AR@
72AS = @AS@
73AUTOCONF = @AUTOCONF@
74AUTOHEADER = @AUTOHEADER@
75AUTOMAKE = @AUTOMAKE@
76AWK = @AWK@
77CC = @CC@
78CCDEPMODE = @CCDEPMODE@
79CFLAGS = @CFLAGS@
80CHECK_CFLAGS = @CHECK_CFLAGS@
81CHECK_LIBS = @CHECK_LIBS@
82CPP = @CPP@
83CPPFLAGS = @CPPFLAGS@
84CXX = @CXX@
85CXXCPP = @CXXCPP@
86CXXDEPMODE = @CXXDEPMODE@
87CXXFLAGS = @CXXFLAGS@
88CYGPATH_W = @CYGPATH_W@
89DEFS = @DEFS@
90DEPDIR = @DEPDIR@
91DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@
92DIRECTFB_LIBS = @DIRECTFB_LIBS@
93DLLTOOL = @DLLTOOL@
94DSYMUTIL = @DSYMUTIL@
95DUMPBIN = @DUMPBIN@
96ECHO_C = @ECHO_C@
97ECHO_N = @ECHO_N@
98ECHO_T = @ECHO_T@
99ECORE_EVAS_CFLAGS = @ECORE_EVAS_CFLAGS@
100ECORE_EVAS_LIBS = @ECORE_EVAS_LIBS@
101EDB_CFLAGS = @EDB_CFLAGS@
102EDB_LIBS = @EDB_LIBS@
103EDJE_CFLAGS = @EDJE_CFLAGS@
104EDJE_LIBS = @EDJE_LIBS@
105EET_CFLAGS = @EET_CFLAGS@
106EET_LIBS = @EET_LIBS@
107EFL_COVERAGE_CFLAGS = @EFL_COVERAGE_CFLAGS@
108EFL_COVERAGE_LIBS = @EFL_COVERAGE_LIBS@
109EFL_FNMATCH_LIBS = @EFL_FNMATCH_LIBS@
110EGREP = @EGREP@
111EINA_CFLAGS = @EINA_CFLAGS@
112EINA_LIBS = @EINA_LIBS@
113EVAS_CFLAGS = @EVAS_CFLAGS@
114EVAS_LIBS = @EVAS_LIBS@
115EVAS_SSE3_CFLAGS = @EVAS_SSE3_CFLAGS@
116EVIL_CFLAGS = @EVIL_CFLAGS@
117EVIL_LIBS = @EVIL_LIBS@
118EXEEXT = @EXEEXT@
119EXOTIC_CFLAGS = @EXOTIC_CFLAGS@
120EXOTIC_LIBS = @EXOTIC_LIBS@
121FGREP = @FGREP@
122FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
123FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
124FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
125FREETYPE_LIBS = @FREETYPE_LIBS@
126FRIBIDI_CFLAGS = @FRIBIDI_CFLAGS@
127FRIBIDI_LIBS = @FRIBIDI_LIBS@
128GL_EET_CFLAGS = @GL_EET_CFLAGS@
129GL_EET_LIBS = @GL_EET_LIBS@
130GREP = @GREP@
131HARFBUZZ_CFLAGS = @HARFBUZZ_CFLAGS@
132HARFBUZZ_LIBS = @HARFBUZZ_LIBS@
133INSTALL = @INSTALL@
134INSTALL_DATA = @INSTALL_DATA@
135INSTALL_PROGRAM = @INSTALL_PROGRAM@
136INSTALL_SCRIPT = @INSTALL_SCRIPT@
137INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
138LD = @LD@
139LDFLAGS = @LDFLAGS@
140LIBOBJS = @LIBOBJS@
141LIBS = @LIBS@
142LIBTOOL = @LIBTOOL@
143LINEBREAK_CFLAGS = @LINEBREAK_CFLAGS@
144LINEBREAK_LIBS = @LINEBREAK_LIBS@
145LIPO = @LIPO@
146LN_S = @LN_S@
147LTLIBOBJS = @LTLIBOBJS@
148MAKEINFO = @MAKEINFO@
149MKDIR_P = @MKDIR_P@
150MODULE_ARCH = @MODULE_ARCH@
151NM = @NM@
152NMEDIT = @NMEDIT@
153OBJC = @OBJC@
154OBJCDEPMODE = @OBJCDEPMODE@
155OBJCFLAGS = @OBJCFLAGS@
156OBJDUMP = @OBJDUMP@
157OBJEXT = @OBJEXT@
158OTOOL = @OTOOL@
159OTOOL64 = @OTOOL64@
160PACKAGE = @PACKAGE@
161PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
162PACKAGE_NAME = @PACKAGE_NAME@
163PACKAGE_STRING = @PACKAGE_STRING@
164PACKAGE_TARNAME = @PACKAGE_TARNAME@
165PACKAGE_URL = @PACKAGE_URL@
166PACKAGE_VERSION = @PACKAGE_VERSION@
167PATH_SEPARATOR = @PATH_SEPARATOR@
168PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
169PIXMAN_LIBS = @PIXMAN_LIBS@
170PKG_CONFIG = @PKG_CONFIG@
171PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
172PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
173PNG_CFLAGS = @PNG_CFLAGS@
174PNG_LIBS = @PNG_LIBS@
175RANLIB = @RANLIB@
176SDL_CFLAGS = @SDL_CFLAGS@
177SDL_LIBS = @SDL_LIBS@
178SED = @SED@
179SET_MAKE = @SET_MAKE@
180SHELL = @SHELL@
181SHM_OPEN_LINK = @SHM_OPEN_LINK@
182STRIP = @STRIP@
183SVG_CFLAGS = @SVG_CFLAGS@
184SVG_LIBS = @SVG_LIBS@
185VALGRIND_CFLAGS = @VALGRIND_CFLAGS@
186VALGRIND_LIBS = @VALGRIND_LIBS@
187VERSION = @VERSION@
188VMAJ = @VMAJ@
189WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
190WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
191XCB_CFLAGS = @XCB_CFLAGS@
192XCB_GL_CFLAGS = @XCB_GL_CFLAGS@
193XCB_GL_LIBS = @XCB_GL_LIBS@
194XCB_LIBS = @XCB_LIBS@
195XEXT_CFLAGS = @XEXT_CFLAGS@
196XEXT_LIBS = @XEXT_LIBS@
197XMKMF = @XMKMF@
198X_CFLAGS = @X_CFLAGS@
199X_EXTRA_LIBS = @X_EXTRA_LIBS@
200X_LIBS = @X_LIBS@
201X_PRE_LIBS = @X_PRE_LIBS@
202abs_builddir = @abs_builddir@
203abs_srcdir = @abs_srcdir@
204abs_top_builddir = @abs_top_builddir@
205abs_top_srcdir = @abs_top_srcdir@
206ac_ct_CC = @ac_ct_CC@
207ac_ct_CXX = @ac_ct_CXX@
208ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
209ac_ct_OBJC = @ac_ct_OBJC@
210altivec_cflags = @altivec_cflags@
211am__include = @am__include@
212am__leading_dot = @am__leading_dot@
213am__quote = @am__quote@
214am__tar = @am__tar@
215am__untar = @am__untar@
216bindir = @bindir@
217build = @build@
218build_alias = @build_alias@
219build_cpu = @build_cpu@
220build_os = @build_os@
221build_vendor = @build_vendor@
222builddir = @builddir@
223datadir = @datadir@
224datarootdir = @datarootdir@
225dlopen_libs = @dlopen_libs@
226docdir = @docdir@
227dvidir = @dvidir@
228edje_cc = @edje_cc@
229efl_doxygen = @efl_doxygen@
230efl_have_doxygen = @efl_have_doxygen@
231evas_engine_buffer_cflags = @evas_engine_buffer_cflags@
232evas_engine_buffer_libs = @evas_engine_buffer_libs@
233evas_engine_direct3d_cflags = @evas_engine_direct3d_cflags@
234evas_engine_direct3d_libs = @evas_engine_direct3d_libs@
235evas_engine_directfb_cflags = @evas_engine_directfb_cflags@
236evas_engine_directfb_libs = @evas_engine_directfb_libs@
237evas_engine_fb_cflags = @evas_engine_fb_cflags@
238evas_engine_fb_libs = @evas_engine_fb_libs@
239evas_engine_gl_cocoa_cflags = @evas_engine_gl_cocoa_cflags@
240evas_engine_gl_cocoa_libs = @evas_engine_gl_cocoa_libs@
241evas_engine_gl_common_libs = @evas_engine_gl_common_libs@
242evas_engine_gl_sdl_cflags = @evas_engine_gl_sdl_cflags@
243evas_engine_gl_sdl_libs = @evas_engine_gl_sdl_libs@
244evas_engine_gl_xcb_cflags = @evas_engine_gl_xcb_cflags@
245evas_engine_gl_xcb_libs = @evas_engine_gl_xcb_libs@
246evas_engine_gl_xlib_cflags = @evas_engine_gl_xlib_cflags@
247evas_engine_gl_xlib_libs = @evas_engine_gl_xlib_libs@
248evas_engine_psl1ght_cflags = @evas_engine_psl1ght_cflags@
249evas_engine_psl1ght_libs = @evas_engine_psl1ght_libs@
250evas_engine_software_16_ddraw_cflags = @evas_engine_software_16_ddraw_cflags@
251evas_engine_software_16_ddraw_libs = @evas_engine_software_16_ddraw_libs@
252evas_engine_software_16_sdl_cflags = @evas_engine_software_16_sdl_cflags@
253evas_engine_software_16_sdl_libs = @evas_engine_software_16_sdl_libs@
254evas_engine_software_16_wince_cflags = @evas_engine_software_16_wince_cflags@
255evas_engine_software_16_wince_libs = @evas_engine_software_16_wince_libs@
256evas_engine_software_16_x11_cflags = @evas_engine_software_16_x11_cflags@
257evas_engine_software_16_x11_libs = @evas_engine_software_16_x11_libs@
258evas_engine_software_8_x11_cflags = @evas_engine_software_8_x11_cflags@
259evas_engine_software_8_x11_libs = @evas_engine_software_8_x11_libs@
260evas_engine_software_ddraw_cflags = @evas_engine_software_ddraw_cflags@
261evas_engine_software_ddraw_libs = @evas_engine_software_ddraw_libs@
262evas_engine_software_gdi_cflags = @evas_engine_software_gdi_cflags@
263evas_engine_software_gdi_libs = @evas_engine_software_gdi_libs@
264evas_engine_software_xcb_cflags = @evas_engine_software_xcb_cflags@
265evas_engine_software_xcb_libs = @evas_engine_software_xcb_libs@
266evas_engine_software_xlib_cflags = @evas_engine_software_xlib_cflags@
267evas_engine_software_xlib_libs = @evas_engine_software_xlib_libs@
268evas_engine_wayland_egl_cflags = @evas_engine_wayland_egl_cflags@
269evas_engine_wayland_egl_libs = @evas_engine_wayland_egl_libs@
270evas_engine_wayland_shm_cflags = @evas_engine_wayland_shm_cflags@
271evas_engine_wayland_shm_libs = @evas_engine_wayland_shm_libs@
272evas_image_loader_bmp_cflags = @evas_image_loader_bmp_cflags@
273evas_image_loader_bmp_libs = @evas_image_loader_bmp_libs@
274evas_image_loader_edb_cflags = @evas_image_loader_edb_cflags@
275evas_image_loader_edb_libs = @evas_image_loader_edb_libs@
276evas_image_loader_eet_cflags = @evas_image_loader_eet_cflags@
277evas_image_loader_eet_libs = @evas_image_loader_eet_libs@
278evas_image_loader_generic_cflags = @evas_image_loader_generic_cflags@
279evas_image_loader_generic_libs = @evas_image_loader_generic_libs@
280evas_image_loader_gif_cflags = @evas_image_loader_gif_cflags@
281evas_image_loader_gif_libs = @evas_image_loader_gif_libs@
282evas_image_loader_ico_cflags = @evas_image_loader_ico_cflags@
283evas_image_loader_ico_libs = @evas_image_loader_ico_libs@
284evas_image_loader_jpeg_cflags = @evas_image_loader_jpeg_cflags@
285evas_image_loader_jpeg_libs = @evas_image_loader_jpeg_libs@
286evas_image_loader_pmaps_cflags = @evas_image_loader_pmaps_cflags@
287evas_image_loader_pmaps_libs = @evas_image_loader_pmaps_libs@
288evas_image_loader_png_cflags = @evas_image_loader_png_cflags@
289evas_image_loader_png_libs = @evas_image_loader_png_libs@
290evas_image_loader_psd_cflags = @evas_image_loader_psd_cflags@
291evas_image_loader_psd_libs = @evas_image_loader_psd_libs@
292evas_image_loader_svg_cflags = @evas_image_loader_svg_cflags@
293evas_image_loader_svg_libs = @evas_image_loader_svg_libs@
294evas_image_loader_tga_cflags = @evas_image_loader_tga_cflags@
295evas_image_loader_tga_libs = @evas_image_loader_tga_libs@
296evas_image_loader_tiff_cflags = @evas_image_loader_tiff_cflags@
297evas_image_loader_tiff_libs = @evas_image_loader_tiff_libs@
298evas_image_loader_wbmp_cflags = @evas_image_loader_wbmp_cflags@
299evas_image_loader_wbmp_libs = @evas_image_loader_wbmp_libs@
300evas_image_loader_xpm_cflags = @evas_image_loader_xpm_cflags@
301evas_image_loader_xpm_libs = @evas_image_loader_xpm_libs@
302exec_prefix = @exec_prefix@
303have_evas_engine_gl_x11 = @have_evas_engine_gl_x11@
304have_evas_engine_gl_xcb = @have_evas_engine_gl_xcb@
305have_evas_engine_gl_xlib = @have_evas_engine_gl_xlib@
306have_evas_engine_software_x11 = @have_evas_engine_software_x11@
307have_evas_engine_software_xcb = @have_evas_engine_software_xcb@
308have_evas_engine_software_xlib = @have_evas_engine_software_xlib@
309have_lcov = @have_lcov@
310host = @host@
311host_alias = @host_alias@
312host_cpu = @host_cpu@
313host_os = @host_os@
314host_vendor = @host_vendor@
315htmldir = @htmldir@
316includedir = @includedir@
317infodir = @infodir@
318install_sh = @install_sh@
319libdir = @libdir@
320libexecdir = @libexecdir@
321localedir = @localedir@
322localstatedir = @localstatedir@
323lt_ECHO = @lt_ECHO@
324lt_enable_auto_import = @lt_enable_auto_import@
325mandir = @mandir@
326mkdir_p = @mkdir_p@
327oldincludedir = @oldincludedir@
328pdfdir = @pdfdir@
329pkgconfig_requires_private = @pkgconfig_requires_private@
330prefix = @prefix@
331program_transform_name = @program_transform_name@
332psdir = @psdir@
333pthread_cflags = @pthread_cflags@
334pthread_libs = @pthread_libs@
335release_info = @release_info@
336requirement_evas = @requirement_evas@
337sbindir = @sbindir@
338sharedstatedir = @sharedstatedir@
339srcdir = @srcdir@
340sysconfdir = @sysconfdir@
341target_alias = @target_alias@
342top_build_prefix = @top_build_prefix@
343top_builddir = @top_builddir@
344top_srcdir = @top_srcdir@
345version_info = @version_info@
346MAINTAINERCLEANFILES = Makefile.in
347EXTRA_DIST = \
348evas_inline.x \
349evas_private.h \
350evas_options.h \
351evas_macros.h \
352evas_mmx.h \
353evas_common.h \
354evas_common_soft8.h \
355evas_common_soft16.h \
356evas_blend_ops.h
357
358all: all-am
359
360.SUFFIXES:
361$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
362 @for dep in $?; do \
363 case '$(am__configure_deps)' in \
364 *$$dep*) \
365 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
366 && { if test -f $@; then exit 0; else break; fi; }; \
367 exit 1;; \
368 esac; \
369 done; \
370 echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/lib/include/Makefile'; \
371 $(am__cd) $(top_srcdir) && \
372 $(AUTOMAKE) --gnu src/lib/include/Makefile
373.PRECIOUS: Makefile
374Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
375 @case '$?' in \
376 *config.status*) \
377 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
378 *) \
379 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
380 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
381 esac;
382
383$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
384 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
385
386$(top_srcdir)/configure: $(am__configure_deps)
387 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
388$(ACLOCAL_M4): $(am__aclocal_m4_deps)
389 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
390$(am__aclocal_m4_deps):
391
392mostlyclean-libtool:
393 -rm -f *.lo
394
395clean-libtool:
396 -rm -rf .libs _libs
397tags: TAGS
398TAGS:
399
400ctags: CTAGS
401CTAGS:
402
403
404distdir: $(DISTFILES)
405 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
406 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
407 list='$(DISTFILES)'; \
408 dist_files=`for file in $$list; do echo $$file; done | \
409 sed -e "s|^$$srcdirstrip/||;t" \
410 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
411 case $$dist_files in \
412 */*) $(MKDIR_P) `echo "$$dist_files" | \
413 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
414 sort -u` ;; \
415 esac; \
416 for file in $$dist_files; do \
417 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
418 if test -d $$d/$$file; then \
419 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
420 if test -d "$(distdir)/$$file"; then \
421 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
422 fi; \
423 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
424 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
425 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
426 fi; \
427 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
428 else \
429 test -f "$(distdir)/$$file" \
430 || cp -p $$d/$$file "$(distdir)/$$file" \
431 || exit 1; \
432 fi; \
433 done
434check-am: all-am
435check: check-am
436all-am: Makefile
437installdirs:
438install: install-am
439install-exec: install-exec-am
440install-data: install-data-am
441uninstall: uninstall-am
442
443install-am: all-am
444 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
445
446installcheck: installcheck-am
447install-strip:
448 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
449 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
450 `test -z '$(STRIP)' || \
451 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
452mostlyclean-generic:
453
454clean-generic:
455
456distclean-generic:
457 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
458 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
459
460maintainer-clean-generic:
461 @echo "This command is intended for maintainers to use"
462 @echo "it deletes files that may require special tools to rebuild."
463 -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
464clean: clean-am
465
466clean-am: clean-generic clean-libtool mostlyclean-am
467
468distclean: distclean-am
469 -rm -f Makefile
470distclean-am: clean-am distclean-generic
471
472dvi: dvi-am
473
474dvi-am:
475
476html: html-am
477
478html-am:
479
480info: info-am
481
482info-am:
483
484install-data-am:
485
486install-dvi: install-dvi-am
487
488install-dvi-am:
489
490install-exec-am:
491
492install-html: install-html-am
493
494install-html-am:
495
496install-info: install-info-am
497
498install-info-am:
499
500install-man:
501
502install-pdf: install-pdf-am
503
504install-pdf-am:
505
506install-ps: install-ps-am
507
508install-ps-am:
509
510installcheck-am:
511
512maintainer-clean: maintainer-clean-am
513 -rm -f Makefile
514maintainer-clean-am: distclean-am maintainer-clean-generic
515
516mostlyclean: mostlyclean-am
517
518mostlyclean-am: mostlyclean-generic mostlyclean-libtool
519
520pdf: pdf-am
521
522pdf-am:
523
524ps: ps-am
525
526ps-am:
527
528uninstall-am:
529
530.MAKE: install-am install-strip
531
532.PHONY: all all-am check check-am clean clean-generic clean-libtool \
533 distclean distclean-generic distclean-libtool distdir dvi \
534 dvi-am html html-am info info-am install install-am \
535 install-data install-data-am install-dvi install-dvi-am \
536 install-exec install-exec-am install-html install-html-am \
537 install-info install-info-am install-man install-pdf \
538 install-pdf-am install-ps install-ps-am install-strip \
539 installcheck installcheck-am installdirs maintainer-clean \
540 maintainer-clean-generic mostlyclean mostlyclean-generic \
541 mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
542
543
544# Tell versions [3.59,3.63) of GNU make to not export all variables.
545# Otherwise a system limit (for SysV at least) may be exceeded.
546.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 @@
1#ifndef EVAS_BLEND_OPS_H
2#define EVAS_BLEND_OPS_H
3
4#if defined BUILD_MMX || defined BUILD_SSE
5#include "evas_mmx.h"
6#endif
7
8#include "config.h"
9
10#ifdef NEED_SSE3
11# if defined BUILD_SSE3
12# include <immintrin.h>
13# endif
14#endif
15
16/* src pixel flags: */
17
18/* pixels none */
19#define SP_N 0
20/* pixels (argb default) */
21#define SP 1
22/* pixels are rgb (ie. alphas == 255) */
23#define SP_AN 2
24/* pixels alpha are sparse */
25#define SP_AS 3
26/* src pixels flags count */
27#define SP_LAST 4
28
29/* src mask flags: */
30
31/* mask none */
32#define SM_N 0
33/* mask (alpha) */
34#define SM 1
35/* mask alphas are 'trivial - ie. only 0 or 255 */
36#define SM_AT 2
37/* mask alphas are sparse */
38#define SM_AS 3
39/* src mask flags count */
40#define SM_LAST 4
41
42/* src color flags: */
43
44/* color is 0xffffffff */
45#define SC_N 0
46/* color (argb default) */
47#define SC 1
48/* color is rgb (ie. 0xffrrggbb) */
49#define SC_AN 2
50/* color is 'alpha' (ie. 0xaaaaaaaa) */
51#define SC_AA 3
52/* src color flags count */
53#define SC_LAST 4
54
55/* dst pixels flags: */
56
57/* pixels (argb default) */
58#define DP 0
59/* pixels are rgb (ie. alphas == 255) */
60#define DP_AN 1
61/* dst pixels flags count */
62#define DP_LAST 2
63
64/* cpu types flags */
65
66/* none, bad news */
67#define CPU_N 0
68/* cpu C */
69#define CPU_C 1
70/* cpu MMX */
71#define CPU_MMX 2
72/* cpu SSE */
73#define CPU_SSE 3
74/* cpu SSE2 */
75#define CPU_SSE2 4
76/* cpu flags count */
77#define CPU_NEON 5
78/* CPU SSE3 */
79#define CPU_SSE3 6
80/* cpu flags count */
81#define CPU_LAST 7
82
83
84/* some useful constants */
85
86extern const DATA32 ALPHA_255;
87extern const DATA32 ALPHA_256;
88
89/* some useful C macros */
90
91#define MUL4_256(a, r, g, b, c) \
92 ( (((((c) >> 8) & 0xff0000) * (a)) & 0xff000000) + \
93 (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \
94 (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \
95 ((((c) & 0xff) * (b)) >> 8) )
96
97#define MUL3_256(r, g, b, c) \
98 ( (((((c) & 0xff0000) * (r)) >> 8) & 0xff0000) + \
99 (((((c) & 0xff00) * (g)) >> 8) & 0xff00) + \
100 ((((c) & 0xff) * (b)) >> 8) )
101
102#define MUL_256(a, c) \
103 ( (((((c) >> 8) & 0x00ff00ff) * (a)) & 0xff00ff00) + \
104 (((((c) & 0x00ff00ff) * (a)) >> 8) & 0x00ff00ff) )
105
106#define MUL4_SYM(x, y) \
107 ( ((((((x) >> 16) & 0xff00) * (((y) >> 16) & 0xff00)) + 0xff0000) & 0xff000000) + \
108 ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \
109 ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \
110 (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) )
111
112#define MUL3_SYM(x, y) \
113 ( ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \
114 ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \
115 (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) )
116
117#define MUL_SYM(a, x) \
118 ( (((((x) >> 8) & 0x00ff00ff) * (a) + 0xff00ff) & 0xff00ff00) + \
119 (((((x) & 0x00ff00ff) * (a) + 0xff00ff) >> 8) & 0x00ff00ff) )
120
121#define MUL_A_256(a, c) \
122 ( ((((c) >> 8) & 0x00ff0000) * (a)) & 0xff000000 )
123
124#define MUL_A_SYM(a, c) \
125 ( (((((c) >> 8) & 0x00ff0000) * (a)) + 0x00ff0000) & 0xff000000 )
126
127#define INTERP_256(a, c0, c1) \
128 ( (((((((c0) >> 8) & 0xff00ff) - (((c1) >> 8) & 0xff00ff)) * (a)) \
129 + ((c1) & 0xff00ff00)) & 0xff00ff00) + \
130 (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \
131 + ((c1) & 0xff00ff)) & 0xff00ff) )
132
133#define INTERP_RGB_256(a, c0, c1) \
134 ( (((((((c0) >> 8) & 0xff) - (((c1) >> 8) & 0xff)) * (a)) \
135 + ((c1) & 0xff00)) & 0xff00) + \
136 (((((((c0) & 0xff00ff) - ((c1) & 0xff00ff)) * (a)) >> 8) \
137 + ((c1) & 0xff00ff)) & 0xff00ff) )
138
139#define INTERP_A_256(a, c0, c1) \
140 ( (((((((c0) >> 8) & 0xff0000) - (((c1) >> 8) & 0xff0000)) * (a)) \
141 + ((c1) & 0xff000000)) & 0xff000000) )
142
143
144/* some useful MMX macros */
145
146#ifdef BUILD_MMX
147#define MOV_A2R(a, mma) \
148 movd_m2r(a, mma); \
149 punpcklwd_r2r(mma, mma); \
150 punpckldq_r2r(mma, mma);
151
152#define MOV_P2R(c, mmc, mmz) \
153 movd_m2r(c, mmc); \
154 punpcklbw_r2r(mmz, mmc);
155
156#define MOV_R2P(mmc, c, mmz) \
157 packuswb_r2r(mmz, mmc); \
158 movd_r2m(mmc, c);
159
160#define MUL4_256_R2R(mmx, mmy) \
161 pmullw_r2r(mmx, mmy); \
162 psrlw_i2r(8, mmy);
163
164#define MUL4_SYM_R2R(mmx, mmy, mm255) \
165 pmullw_r2r(mmx, mmy); \
166 paddw_r2r(mm255, mmy); \
167 psrlw_i2r(8, mmy);
168
169#define MOV_RA2R(mmx, mma) \
170 movq_r2r(mmx, mma); \
171 punpckhwd_r2r(mma, mma); \
172 punpckhdq_r2r(mma, mma);
173
174#define MOV_PA2R(c, mma) \
175 movd_m2r(c, mma); \
176 punpcklbw_r2r(mma, mma); \
177 punpckhwd_r2r(mma, mma); \
178 punpckhdq_r2r(mma, mma);
179
180#define INTERP_256_R2R(mma, mmx, mmy, mm255) \
181 psubw_r2r(mmy, mmx); \
182 pmullw_r2r(mma, mmx); \
183 psrlw_i2r(8, mmx); \
184 paddw_r2r(mmx, mmy); \
185 pand_r2r(mm255, mmy);
186
187#endif
188
189
190/* some useful SSE3 inline functions */
191
192#ifdef NEED_SSE3
193#ifdef BUILD_SSE3
194
195static __m128i GA_MASK_SSE3;
196static __m128i RB_MASK_SSE3;
197static __m128i SYM4_MASK_SSE3;
198static __m128i RGB_MASK_SSE3;
199//static __m128i A_MASK_SSE3;
200
201static __m128i ALPHA_SSE3;
202
203static EFL_ALWAYS_INLINE __m128i
204mul_256_sse3(__m128i a, __m128i c) {
205
206 /* prepare alpha for word multiplication */
207 __m128i a_l = a;
208 __m128i a_h = a;
209 a_l = _mm_unpacklo_epi16(a_l, a_l);
210 a_h = _mm_unpackhi_epi16(a_h, a_h);
211 __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88);
212
213 /* first half of calc */
214 __m128i c0 = c;
215 c0 = _mm_srli_epi32(c0, 8);
216 c0 = _mm_and_si128(GA_MASK_SSE3, c0);
217 c0 = _mm_mullo_epi16(a0, c0);
218 c0 = _mm_and_si128(RB_MASK_SSE3, c0);
219
220 /* second half of calc */
221 __m128i c1 = c;
222 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
223 c1 = _mm_mullo_epi16(a0, c1);
224 c1 = _mm_srli_epi32(c1, 8);
225 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
226
227 /* combine */
228 return _mm_add_epi32(c0, c1);
229}
230
231static EFL_ALWAYS_INLINE __m128i
232sub4_alpha_sse3(__m128i c) {
233
234 __m128i c0 = c;
235
236 c0 = _mm_srli_epi32(c0, 24);
237 return _mm_sub_epi32(ALPHA_SSE3, c0);
238}
239
240static EFL_ALWAYS_INLINE __m128i
241interp4_256_sse3(__m128i a, __m128i c0, __m128i c1)
242{
243 const __m128i zero = _mm_setzero_si128();
244
245 __m128i a_l = a;
246 __m128i a_h = a;
247 a_l = _mm_unpacklo_epi16(a_l, a_l);
248 a_h = _mm_unpackhi_epi16(a_h, a_h);
249
250 __m128i a_t = _mm_slli_epi64(a_l, 32);
251 __m128i a_t0 = _mm_slli_epi64(a_h, 32);
252
253 a_l = _mm_add_epi32(a_l, a_t);
254 a_h = _mm_add_epi32(a_h, a_t0);
255
256 __m128i c0_l = c0;
257 __m128i c0_h = c0;
258
259 c0_l = _mm_unpacklo_epi8(c0_l, zero);
260 c0_h = _mm_unpackhi_epi8(c0_h, zero);
261
262 __m128i c1_l = c1;
263 __m128i c1_h = c1;
264
265 c1_l = _mm_unpacklo_epi8(c1_l, zero);
266 c1_h = _mm_unpackhi_epi8(c1_h, zero);
267
268 __m128i cl_sub = _mm_sub_epi16(c0_l, c1_l);
269 __m128i ch_sub = _mm_sub_epi16(c0_h, c1_h);
270
271 cl_sub = _mm_mullo_epi16(cl_sub, a_l);
272 ch_sub = _mm_mullo_epi16(ch_sub, a_h);
273
274 __m128i c1ls = _mm_slli_epi16(c1_l, 8);
275 __m128i c1hs = _mm_slli_epi16(c1_h, 8);
276
277 cl_sub = _mm_add_epi16(cl_sub, c1ls);
278 ch_sub = _mm_add_epi16(ch_sub, c1hs);
279
280 cl_sub = _mm_and_si128(cl_sub, RB_MASK_SSE3);
281 ch_sub = _mm_and_si128(ch_sub, RB_MASK_SSE3);
282
283 cl_sub = _mm_srli_epi64(cl_sub, 8);
284 ch_sub = _mm_srli_epi64(ch_sub, 8);
285
286 cl_sub = _mm_packus_epi16(cl_sub, cl_sub);
287 ch_sub = _mm_packus_epi16(ch_sub, ch_sub);
288
289 return (__m128i) _mm_shuffle_ps( (__m128)cl_sub, (__m128)ch_sub, 0x44);
290}
291
292static EFL_ALWAYS_INLINE __m128i
293mul_sym_sse3(__m128i a, __m128i c) {
294
295 /* Prepare alpha for word mult */
296 __m128i a_l = a;
297 __m128i a_h = a;
298 a_l = _mm_unpacklo_epi16(a_l, a_l);
299 a_h = _mm_unpackhi_epi16(a_h, a_h);
300 __m128i a0 = (__m128i) _mm_shuffle_ps( (__m128)a_l, (__m128)a_h, 0x88);
301
302 /* first part */
303 __m128i c0 = c;
304 c0 = _mm_srli_epi32(c0, 8);
305 c0 = _mm_and_si128(GA_MASK_SSE3, c0);
306 c0 = _mm_mullo_epi16(a0, c0);
307 c0 = _mm_add_epi32(c0, GA_MASK_SSE3);
308 c0 = _mm_and_si128(RB_MASK_SSE3, c0);
309
310 /* second part */
311 __m128i c1 = c;
312 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
313 c1 = _mm_mullo_epi16(a0, c1);
314 c1 = _mm_add_epi32(c1, GA_MASK_SSE3);
315 c1 = _mm_srli_epi32(c1, 8);
316 c1 = _mm_and_si128(GA_MASK_SSE3, c1);
317
318 return _mm_add_epi32(c0, c1);
319}
320
321static EFL_ALWAYS_INLINE __m128i
322mul4_sym_sse3(__m128i x, __m128i y) {
323
324 const __m128i zero = _mm_setzero_si128();
325
326 __m128i x_l = _mm_unpacklo_epi8(x, zero);
327 __m128i x_h = _mm_unpackhi_epi8(x, zero);
328
329 __m128i y_l = _mm_unpacklo_epi8(y, zero);
330 __m128i y_h = _mm_unpackhi_epi8(y, zero);
331
332 __m128i r_l = _mm_mullo_epi16(x_l, y_l);
333 __m128i r_h = _mm_mullo_epi16(x_h, y_h);
334
335 r_l = _mm_add_epi16(r_l, SYM4_MASK_SSE3);
336 r_h = _mm_add_epi16(r_h, SYM4_MASK_SSE3);
337
338 r_l = _mm_srli_epi16(r_l, 8);
339 r_h = _mm_srli_epi16(r_h, 8);
340
341 return _mm_packus_epi16(r_l, r_h);
342}
343
344static EFL_ALWAYS_INLINE __m128i
345mul3_sym_sse3(__m128i x, __m128i y) {
346
347 __m128i res = mul4_sym_sse3(x, y);
348 return _mm_and_si128(res, RGB_MASK_SSE3);
349}
350
351#define LOOP_ALIGNED_U1_A48_SSE3(DEST, LENGTH, UOP, A4OP, A8OP) \
352 { \
353 while((uintptr_t)DEST & 0xF && LENGTH) UOP \
354 \
355 while(LENGTH) { \
356 switch(LENGTH) { \
357 case 3: UOP \
358 case 2: UOP \
359 case 1: UOP \
360 break; \
361 case 7: \
362 case 6: \
363 case 5: \
364 case 4: \
365 A4OP \
366 break; \
367 default: \
368 A8OP \
369 break; \
370 } \
371 } \
372 }
373
374
375#endif
376#endif
377
378#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 @@
1#ifndef EVAS_COMMON_H
2#define EVAS_COMMON_H
3
4//#ifdef HAVE_CONFIG_H
5#include "config.h" /* so that EAPI in Evas.h is correctly defined */
6//#endif
7
8#ifdef STDC_HEADERS
9# include <stdlib.h>
10# include <stddef.h>
11#else
12# ifdef HAVE_STDLIB_H
13# include <stdlib.h>
14# endif
15#endif
16#ifdef HAVE_ALLOCA_H
17# include <alloca.h>
18#elif !defined alloca
19# ifdef __GNUC__
20# define alloca __builtin_alloca
21# elif defined _AIX
22# define alloca __alloca
23# elif defined _MSC_VER
24# include <malloc.h>
25# define alloca _alloca
26# elif !defined HAVE_ALLOCA
27# ifdef __cplusplus
28extern "C"
29# endif
30void *alloca (size_t);
31# endif
32#endif
33
34#include <stdio.h>
35#include <stdlib.h>
36#include <string.h>
37#include <sys/types.h>
38#include <sys/stat.h>
39#include <time.h>
40#include <ctype.h>
41
42#ifndef _MSC_VER
43# include <stdint.h>
44#include <unistd.h>
45#endif
46
47#ifdef HAVE_EVIL
48# include <Evil.h>
49#endif
50
51#ifdef HAVE_ESCAPE
52# include <Escape.h>
53#endif
54
55#ifdef HAVE_PIXMAN
56#include <pixman.h>
57#endif
58
59#include <sys/types.h>
60#include <sys/stat.h>
61#include <unistd.h>
62
63#ifdef HAVE_EXOTIC
64# include <Exotic.h>
65#endif
66
67#include <Eina.h>
68#include "Evas.h"
69//#include "Evas_GL.h"
70
71#ifndef HAVE_LROUND
72/* right now i dont care about rendering bugs on platforms without lround
73 (e.g. windows/vc++... yay!)
74 FIXME: http://cgit.freedesktop.org/cairo/tree/src/cairo-misc.c#n487
75*/
76#define lround(x) (((x) < 0) ? (long int)ceil((x) - 0.5) : (long int)floor((x) + 0.5))
77#endif
78
79/* macros needed to log message through eina_log */
80extern EAPI int _evas_log_dom_global;
81#ifdef _EVAS_DEFAULT_LOG_DOM
82# undef _EVAS_DEFAULT_LOG_DOM
83#endif
84#define _EVAS_DEFAULT_LOG_DOM _evas_log_dom_global
85
86#ifdef EVAS_DEFAULT_LOG_COLOR
87# undef EVAS_DEFAULT_LOG_COLOR
88#endif
89#define EVAS_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
90
91#ifdef ERR
92# undef ERR
93#endif
94#define ERR(...) EINA_LOG_DOM_ERR(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
95
96#ifdef DBG
97# undef DBG
98#endif
99#define DBG(...) EINA_LOG_DOM_DBG(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
100
101#ifdef INF
102# undef INF
103#endif
104#define INF(...) EINA_LOG_DOM_INFO(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
105
106#ifdef WRN
107# undef WRN
108#endif
109#define WRN(...) EINA_LOG_DOM_WARN(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
110
111#ifdef CRIT
112# undef CRIT
113#endif
114#define CRIT(...) EINA_LOG_DOM_CRIT(_EVAS_DEFAULT_LOG_DOM, __VA_ARGS__)
115
116#include "evas_options.h"
117
118#if defined(__ARM_ARCH_3M__)
119# define __ARM_ARCH__ 40
120#endif
121#if defined(__ARM_ARCH_4__)
122# define __ARM_ARCH__ 40
123#endif
124#if defined(__ARM_ARCH_4T__)
125# define __ARM_ARCH__ 41
126#endif
127
128#if defined(__ARM_ARCH_5__)
129# define __ARM_ARCH__ 50
130#endif
131#if defined(__ARM_ARCH_5T__)
132# define __ARM_ARCH__ 51
133#endif
134#if defined(__ARM_ARCH_5E__)
135# define __ARM_ARCH__ 52
136#endif
137#if defined(__ARM_ARCH_5TE__)
138# define __ARM_ARCH__ 53
139#endif
140#if defined(__ARM_ARCH_5TEJ__)
141# define __ARM_ARCH__ 54
142#endif
143
144#if defined(__ARM_ARCH_6__)
145# define __ARM_ARCH__ 60
146#endif
147#if defined(__ARM_ARCH_6J__)
148# define __ARM_ARCH__ 61
149#endif
150#if defined(__ARM_ARCH_6K__)
151# define __ARM_ARCH__ 62
152#endif
153#if defined(__ARM_ARCH_6Z__)
154# define __ARM_ARCH__ 63
155#endif
156#if defined(__ARM_ARCH_6ZK__)
157# define __ARM_ARCH__ 64
158#endif
159#if defined(__ARM_ARCH_6T2__)
160# define __ARM_ARCH__ 65
161#endif
162
163#if defined(__ARM_ARCH_7__)
164# define __ARM_ARCH__ 70
165#endif
166#if defined(__ARM_ARCH_7A__)
167# define __ARM_ARCH__ 71
168#endif
169#if defined(__ARM_ARCH_7R__)
170# define __ARM_ARCH__ 72
171#endif
172#if defined(__ARM_ARCH_7M__)
173# define __ARM_ARCH__ 73
174#endif
175
176#ifndef BUILD_PTHREAD
177# undef BUILD_PIPE_RENDER
178#endif
179
180#if defined(BUILD_ASYNC_PRELOAD) && !defined(BUILD_PTHREAD)
181# define BUILD_PTHREAD
182#endif
183
184#define LK(x) Eina_Lock x
185#define LKI(x) eina_lock_new(&(x))
186#define LKD(x) eina_lock_free(&(x))
187#define LKL(x) eina_lock_take(&(x))
188#define LKT(x) eina_lock_take_try(&(x))
189#define LKU(x) eina_lock_release(&(x))
190#define LKDBG(x) eina_lock_debug(&(x))
191
192/* for rwlocks */
193#define RWLK(x) Eina_RWLock x
194#define RWLKI(x) eina_rwlock_new(&(x))
195#define RWLKD(x) eina_rwlock_free(&(x))
196#define RDLKL(x) eina_rwlock_take_read(&(x))
197#define WRLKL(x) eina_rwlock_take_write(&(x))
198#define RWLKU(x) eina_rwlock_release(&(x))
199
200#ifdef BUILD_PTHREAD
201
202# define TH(x) pthread_t x
203# define THI(x) int x
204# define TH_MAX 8
205
206// even though in theory having every Nth rendered line done by a different
207// thread might even out load across threads - it actually slows things down.
208//#define EVAS_SLI 1
209
210#else
211# define TH(x)
212# define THI(x)
213# define TH_MAX 0
214
215#endif
216
217#include <ft2build.h>
218#include FT_FREETYPE_H
219#include FT_GLYPH_H
220#include FT_SIZES_H
221#include FT_MODULE_H
222
223#ifdef __GNUC__
224# if __GNUC__ >= 4
225// BROKEN in gcc 4 on amd64
226//# pragma GCC visibility push(hidden)
227# endif
228#define LIKELY(x) __builtin_expect(!!(x), 1)
229#define UNLIKELY(x) __builtin_expect(!!(x), 0)
230#else
231#define LIKELY(x) (x)
232#define UNLIKELY(x) (x)
233#endif
234
235/*****************************************************************************/
236
237/* use exact rects for updates not tiles */
238/* #define RECTUPDATE */
239#define TILESIZE 8
240#define IMG_MAX_SIZE 65000
241
242#define IMG_TOO_BIG(w, h) \
243 ((((unsigned long long)w) * ((unsigned long long)h)) >= \
244 ((1ULL << (29 * (sizeof(void *) / 4))) - 2048))
245
246#ifdef BUILD_SMALL_DITHER_MASK
247# define DM_TABLE _evas_dither_44
248# define DM_SIZE 4
249# define DM_BITS 4
250# define DM_DIV 16
251# define USE_DITHER_44 1
252#else
253# define DM_TABLE _evas_dither_128128
254# define DM_SIZE 128
255# define DM_BITS 6
256# define DM_DIV 64
257# define USE_DITHER_128128 1
258#endif
259
260#define DM_MSK (DM_SIZE - 1)
261#define DM_SHF(_b) (DM_BITS - (8 - _b))
262/* Supports negative right shifts */
263#define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
264 ((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
265
266/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
267 * alpha flag gets set */
268#define ALPHA_SPARSE_INV_FRACTION 3
269
270/*****************************************************************************/
271
272#if defined(__ARM_ARCH_3M__)
273# define __ARM_ARCH__ 40
274#endif
275#if defined(__ARM_ARCH_4__)
276# define __ARM_ARCH__ 40
277#endif
278#if defined(__ARM_ARCH_4T__)
279# define __ARM_ARCH__ 41
280#endif
281
282#if defined(__ARM_ARCH_5__)
283# define __ARM_ARCH__ 50
284#endif
285#if defined(__ARM_ARCH_5T__)
286# define __ARM_ARCH__ 51
287#endif
288#if defined(__ARM_ARCH_5E__)
289# define __ARM_ARCH__ 52
290#endif
291#if defined(__ARM_ARCH_5TE__)
292# define __ARM_ARCH__ 53
293#endif
294#if defined(__ARM_ARCH_5TEJ__)
295# define __ARM_ARCH__ 54
296#endif
297
298#if defined(__ARM_ARCH_6__)
299# define __ARM_ARCH__ 60
300#endif
301#if defined(__ARM_ARCH_6J__)
302# define __ARM_ARCH__ 61
303#endif
304#if defined(__ARM_ARCH_6K__)
305# define __ARM_ARCH__ 62
306#endif
307#if defined(__ARM_ARCH_6Z__)
308# define __ARM_ARCH__ 63
309#endif
310#if defined(__ARM_ARCH_6ZK__)
311# define __ARM_ARCH__ 64
312#endif
313#if defined(__ARM_ARCH_6T2__)
314# define __ARM_ARCH__ 65
315#endif
316
317#if defined(__ARM_ARCH_7__)
318# define __ARM_ARCH__ 70
319#endif
320#if defined(__ARM_ARCH_7A__)
321# define __ARM_ARCH__ 71
322#endif
323#if defined(__ARM_ARCH_7R__)
324# define __ARM_ARCH__ 72
325#endif
326#if defined(__ARM_ARCH_7M__)
327# define __ARM_ARCH__ 73
328#endif
329
330#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
331/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
332#define pld(addr, off) \
333 __asm__("pld [%[address], %[offset]]":: \
334 [address] "r" (addr), [offset] "i" (off))
335#else
336#define pld(addr, off)
337#endif /* __ARMEL__ */
338
339// these here are in config.h - just here for documentation
340//#ifdef __ARM_ARCH__
341// *IF* you enable pixman, this determines which things pixman will do
342////#define PIXMAN_FONT 1
343////#define PIXMAN_RECT 1
344////#define PIXMAN_LINE 1
345////#define PIXMAN_POLY 1
346//#define PIXMAN_IMAGE 1
347//#define PIXMAN_IMAGE_SCALE_SAMPLE 1
348//#endif
349// not related to pixman but an alternate rotate code
350//#define TILE_ROTATE 1
351
352#define TILE_CACHE_LINE_SIZE 64
353
354/*****************************************************************************/
355
356#define UNROLL2(op...) op op
357#define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
358#define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
359#define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
360
361#define UNROLL8_PLD_WHILE(start, size, end, op) \
362 pld(start, 0); \
363 end = start + (size & ~7); \
364 while (start < end) \
365 { \
366 pld(start, 32); \
367 UNROLL8(op); \
368 } \
369 end += (size & 7); \
370 pld(start, 32); \
371 while (start < end) \
372 { \
373 op; \
374 }
375
376/*****************************************************************************/
377
378typedef unsigned long long DATA64;
379typedef unsigned int DATA32;
380typedef unsigned short DATA16;
381typedef unsigned char DATA8;
382
383typedef struct _Image_Entry Image_Entry;
384typedef struct _Image_Entry_Flags Image_Entry_Flags;
385typedef struct _Image_Entry_Frame Image_Entry_Frame;
386typedef struct _Image_Timestamp Image_Timestamp;
387typedef struct _Engine_Image_Entry Engine_Image_Entry;
388typedef struct _Evas_Cache_Target Evas_Cache_Target;
389typedef struct _Evas_Preload_Pthread Evas_Preload_Pthread;
390
391typedef struct _RGBA_Image_Loadopts RGBA_Image_Loadopts;
392#ifdef BUILD_PIPE_RENDER
393typedef struct _RGBA_Pipe_Op RGBA_Pipe_Op;
394typedef struct _RGBA_Pipe RGBA_Pipe;
395typedef struct _RGBA_Pipe_Thread_Info RGBA_Pipe_Thread_Info;
396#endif
397typedef struct _RGBA_Image RGBA_Image;
398typedef struct _RGBA_Image_Span RGBA_Image_Span;
399typedef struct _RGBA_Draw_Context RGBA_Draw_Context;
400typedef struct _RGBA_Polygon_Point RGBA_Polygon_Point;
401typedef struct _RGBA_Map_Point RGBA_Map_Point;
402typedef struct _RGBA_Font RGBA_Font;
403typedef struct _RGBA_Font_Int RGBA_Font_Int;
404typedef struct _RGBA_Font_Source RGBA_Font_Source;
405typedef struct _RGBA_Font_Glyph RGBA_Font_Glyph;
406typedef struct _RGBA_Gfx_Compositor RGBA_Gfx_Compositor;
407
408typedef struct _Cutout_Rect Cutout_Rect;
409typedef struct _Cutout_Rects Cutout_Rects;
410
411typedef struct _Convert_Pal Convert_Pal;
412
413typedef struct _Tilebuf Tilebuf;
414typedef struct _Tilebuf_Tile Tilebuf_Tile;
415typedef struct _Tilebuf_Rect Tilebuf_Rect;
416
417typedef struct _Evas_Common_Transform Evas_Common_Transform;
418
419// RGBA_Map_Point
420// all coords are 20.12
421// fp type - an int for now
422typedef int FPc;
423// fp # of bits of float accuracy
424#define FP 8
425// fp half (half of an fp unit)
426#define FPH (1 << (FP - 1))
427// one fp unit
428#define FP1 (1 << (FP))
429
430/*
431typedef struct _Regionbuf Regionbuf;
432typedef struct _Regionspan Regionspan;
433*/
434
435typedef void (*RGBA_Gfx_Func) (DATA32 *src, DATA8 *mask, DATA32 col, DATA32 *dst, int len);
436typedef void (*RGBA_Gfx_Pt_Func) (DATA32 src, DATA8 mask, DATA32 col, DATA32 *dst);
437typedef void (*Gfx_Func_Copy) (DATA32 *src, DATA32 *dst, int len);
438
439typedef 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);
440
441#include "../cache/evas_cache.h"
442
443/*****************************************************************************/
444
445typedef enum _RGBA_Image_Flags
446{
447 RGBA_IMAGE_NOTHING = (0),
448/* RGBA_IMAGE_HAS_ALPHA = (1 << 0), */
449 RGBA_IMAGE_IS_DIRTY = (1 << 1),
450 RGBA_IMAGE_INDEXED = (1 << 2),
451 RGBA_IMAGE_ALPHA_ONLY = (1 << 3),
452 RGBA_IMAGE_ALPHA_TILES = (1 << 4),
453/* RGBA_IMAGE_ALPHA_SPARSE = (1 << 5), */
454/* RGBA_IMAGE_LOADED = (1 << 6), */
455/* RGBA_IMAGE_NEED_DATA = (1 << 7) */
456 RGBA_IMAGE_TODO_LOAD = (1 << 8),
457} RGBA_Image_Flags;
458
459typedef enum _Convert_Pal_Mode
460{
461 PAL_MODE_NONE,
462 PAL_MODE_MONO,
463 PAL_MODE_GRAY4,
464 PAL_MODE_GRAY16,
465 PAL_MODE_GRAY64,
466 PAL_MODE_GRAY256,
467 PAL_MODE_RGB111,
468 PAL_MODE_RGB121,
469 PAL_MODE_RGB221,
470 PAL_MODE_RGB222,
471 PAL_MODE_RGB232,
472 PAL_MODE_RGB332,
473 PAL_MODE_RGB666,
474 PAL_MODE_LAST
475} Convert_Pal_Mode;
476
477typedef enum _CPU_Features
478{
479 CPU_FEATURE_C = 0,
480 CPU_FEATURE_MMX = (1 << 0),
481 CPU_FEATURE_MMX2 = (1 << 1),
482 CPU_FEATURE_SSE = (1 << 2),
483 CPU_FEATURE_ALTIVEC = (1 << 3),
484 CPU_FEATURE_VIS = (1 << 4),
485 CPU_FEATURE_VIS2 = (1 << 5),
486 CPU_FEATURE_NEON = (1 << 6),
487 CPU_FEATURE_SSE3 = (1 << 7)
488} CPU_Features;
489
490typedef enum _Font_Hint_Flags
491{
492 FONT_NO_HINT,
493 FONT_AUTO_HINT,
494 FONT_BYTECODE_HINT
495} Font_Hint_Flags;
496
497typedef enum _Font_Rend_Flags
498{
499 FONT_REND_REGULAR = 0,
500 FONT_REND_SLANT = (1 << 0),
501 FONT_REND_WEIGHT = (1 << 1),
502} Font_Rend_Flags;
503
504/*****************************************************************************/
505
506#if 0 // filtering disabled
507typedef struct _Filtered_Image Filtered_Image;
508#endif
509
510struct _RGBA_Image_Loadopts
511{
512 int scale_down_by; // if > 1 then use this
513 double dpi; // if > 0.0 use this
514 unsigned int w, h; // if > 0 use this
515 unsigned int degree;//if>0 there is some info related with rotation
516 struct {
517 unsigned int x, y, w, h;
518 } region;
519
520 Eina_Bool orientation; // if EINA_TRUE => should honor orientation information provided by file (like jpeg exif info)
521};
522
523struct _Image_Entry_Flags
524{
525 Eina_Bool loaded : 1;
526 Eina_Bool in_progress : 1;
527 Eina_Bool dirty : 1;
528 Eina_Bool activ : 1;
529
530 Eina_Bool need_data : 1;
531 Eina_Bool lru_nodata : 1;
532 Eina_Bool cached : 1;
533 Eina_Bool alpha : 1;
534
535 Eina_Bool lru : 1;
536 Eina_Bool alpha_sparse : 1;
537#ifdef BUILD_ASYNC_PRELOAD
538 Eina_Bool preload_done : 1;
539 Eina_Bool delete_me : 1;
540 Eina_Bool pending : 1;
541#endif
542 Eina_Bool animated : 1;
543 Eina_Bool rotated : 1;
544};
545
546struct _Image_Entry_Frame
547{
548 int index;
549 DATA32 *data; /* frame decoding data */
550 void *info; /* special image type info */
551 Eina_Bool loaded : 1;
552};
553
554struct _Evas_Cache_Target
555{
556 EINA_INLIST;
557 const void *target;
558 void *data;
559};
560
561struct _Image_Timestamp
562{
563 time_t mtime;
564 off_t size;
565 ino_t ino;
566#ifdef _STAT_VER_LINUX
567 unsigned long int mtime_nsec;
568#endif
569};
570
571struct _Image_Entry
572{
573 EINA_INLIST;
574
575 Evas_Cache_Image *cache;
576
577 const char *cache_key;
578
579 const char *file;
580 const char *key;
581
582 Evas_Cache_Target *targets;
583 Evas_Preload_Pthread *preload;
584
585 Image_Timestamp tstamp;
586
587 int references;
588#ifdef EVAS_FRAME_QUEUING
589 LK(lock_references); // needed for accessing references
590#endif
591
592#ifdef BUILD_PIPE_RENDER
593 RGBA_Pipe *pipe;
594#ifdef EVAS_FRAME_QUEUING
595 LK(ref_fq_add);
596 LK(ref_fq_del);
597 Eina_Condition cond_fq_del;
598 int ref_fq[2]; // ref_fq[0] is for addition, ref_fq[1] is for deletion
599#endif
600#endif
601
602 unsigned char scale;
603
604 RGBA_Image_Loadopts load_opts;
605 int space;
606 unsigned int w;
607 unsigned int h;
608
609 struct
610 {
611 unsigned int w;
612 unsigned int h;
613 } allocated;
614
615 struct
616 {
617 void *module;
618 void *loader;
619 } info;
620
621#ifdef BUILD_ASYNC_PRELOAD
622 LK(lock);
623 LK(lock_cancel);
624 Eina_Bool unload_cancel : 1;
625#endif
626
627 Image_Entry_Flags flags;
628 Evas_Image_Scale_Hint scale_hint;
629 void *data1, *data2;
630 int server_id;
631 int connect_num;
632 int channel;
633 int load_error;
634
635 /* for animation feature */
636 int frame_count;
637 Evas_Image_Animated_Loop_Hint loop_hint;
638 int loop_count;
639 int cur_frame;
640 Eina_List *frames;
641};
642
643struct _Engine_Image_Entry
644{
645 EINA_INLIST;
646
647 /* Upper Engine data. */
648 Image_Entry *src;
649
650 /* Cache stuff. */
651 Evas_Cache_Engine_Image *cache;
652 const char *cache_key;
653
654 struct
655 {
656 Eina_Bool cached : 1;
657 Eina_Bool activ : 1;
658 Eina_Bool dirty : 1;
659 Eina_Bool loaded : 1;
660 Eina_Bool need_parent : 1;
661 } flags;
662
663 int references;
664 int w;
665 int h;
666};
667
668struct _Cutout_Rect
669{
670 int x, y, w, h;
671};
672
673struct _Cutout_Rects
674{
675 Cutout_Rect* rects;
676 int active;
677 int max;
678};
679
680struct _Evas_Common_Transform
681{
682 float mxx, mxy, mxz;
683 float myx, myy, myz;
684 float mzx, mzy, mzz;
685};
686
687struct _RGBA_Draw_Context
688{
689 struct {
690 Eina_Bool use : 1;
691 DATA32 col;
692 } mul;
693 struct {
694#ifdef HAVE_PIXMAN
695 pixman_image_t *pixman_color_image;
696#endif
697 DATA32 col;
698 } col;
699 struct RGBA_Draw_Context_clip {
700 int x, y, w, h;
701 Eina_Bool use : 1;
702 } clip;
703 struct {
704 int x, y, w, h;
705 RGBA_Image *mask;
706 } mask;
707 Cutout_Rects cutout;
708 struct {
709 struct {
710 void *(*gl_new) (void *data, RGBA_Font_Glyph *fg);
711 void (*gl_free) (void *ext_dat);
712 void (*gl_draw) (void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
713 } func;
714 void *data;
715 } font_ext;
716 struct {
717 int color_space;
718 } interpolation;
719 struct {
720 int y, h;
721 } sli;
722 int render_op;
723 Eina_Bool anti_alias : 1;
724};
725
726#ifdef BUILD_PIPE_RENDER
727#include "../engines/common/evas_map_image.h"
728#include "../engines/common/evas_text_utils.h"
729
730struct _RGBA_Pipe_Op
731{
732 RGBA_Draw_Context context;
733 void (*op_func) (RGBA_Image *dst, RGBA_Pipe_Op *op, RGBA_Pipe_Thread_Info *info);
734 void (*free_func) (RGBA_Pipe_Op *op);
735
736 union {
737 struct {
738 int x, y, w, h;
739 } rect;
740 struct {
741 int x0, y0, x1, y1;
742 } line;
743 struct {
744 RGBA_Polygon_Point *points;
745 } poly;
746 struct {
747 RGBA_Font *font;
748 int x, y;
749 Evas_Text_Props intl_props;
750 } text;
751 struct {
752 RGBA_Image *src;
753 int sx, sy, sw, sh, dx, dy, dw, dh;
754 int smooth;
755 char *text;
756 } image;
757 struct {
758 RGBA_Image *src;
759 RGBA_Map_Point *p;
760 int npoints;
761 int smooth;
762 int level;
763 } map;
764 } op;
765};
766
767#define PIPE_LEN 256
768
769struct _RGBA_Pipe
770{
771 EINA_INLIST;
772 int op_num;
773 RGBA_Pipe_Op op[PIPE_LEN];
774};
775
776struct _RGBA_Pipe_Thread_Info
777{
778 RGBA_Image *im;
779 int x, y, w, h;
780};
781#endif
782
783struct _RGBA_Image
784{
785 Image_Entry cache_entry;
786
787 RGBA_Image_Flags flags;
788 struct
789 {
790/* void *module; */
791/* void *loader; */
792/* char *real_file; */
793 char *comment;
794// int format;
795 } info;
796
797 void *extended_info;
798 int ref;
799
800/* unsigned char scale; */
801
802 /* Colorspace stuff. */
803 struct {
804 void *data;
805 Eina_Bool no_free : 1;
806 Eina_Bool dirty : 1;
807 } cs;
808
809 /* RGBA stuff */
810 struct {
811 DATA32 *data;
812 Eina_Bool no_free : 1;
813 } image;
814
815 struct {
816 DATA8 *mask;
817 Eina_Bool dirty: 1;
818 } mask;
819
820#if 0 // filtering disabled
821 Eina_List *filtered;
822#endif
823
824 struct {
825 LK(lock);
826 Eina_List *list;
827 unsigned long long orig_usage;
828 unsigned long long usage_count;
829 int populate_count;
830 unsigned long long newest_usage;
831 unsigned long long newest_usage_count;
832 } cache;
833
834#ifdef HAVE_PIXMAN
835 struct {
836 pixman_image_t *im;
837 } pixman;
838#endif
839};
840
841struct _RGBA_Polygon_Point
842{
843 EINA_INLIST;
844 int x, y;
845};
846
847struct _RGBA_Map_Point
848{
849 FPc x, y; // x, y screenspace
850 float fx, fy, fz; // x, y, z in floats
851// FPc x3, y3; // x, y 3d space
852 FPc z; // z in world space. optional
853 FPc u, v; // u, v in tex coords
854 DATA32 col; // color at this point
855 // for perspective correctness - only point 0 has relevant info
856 FPc px, py, z0, foc;
857};
858
859#if 0 // filtering disabled
860struct _Filtered_Image
861{
862 void *key;
863 size_t keylen;
864 RGBA_Image *image;
865 int ref;
866};
867#endif
868
869// for fonts...
870/////
871typedef struct _Fash_Item_Index_Map Fash_Item_Index_Map;
872typedef struct _Fash_Int_Map Fash_Int_Map;
873typedef struct _Fash_Int_Map2 Fash_Int_Map2;
874typedef struct _Fash_Int Fash_Int;
875struct _Fash_Item_Index_Map
876{
877 RGBA_Font_Int *fint;
878 int index;
879};
880struct _Fash_Int_Map
881{
882 Fash_Item_Index_Map item[256];
883};
884struct _Fash_Int_Map2
885{
886 Fash_Int_Map *bucket[256];
887};
888struct _Fash_Int
889{
890 Fash_Int_Map2 *bucket[256];
891 void (*freeme) (Fash_Int *fash);
892};
893
894/////
895typedef struct _Fash_Glyph_Map Fash_Glyph_Map;
896typedef struct _Fash_Glyph_Map2 Fash_Glyph_Map2;
897typedef struct _Fash_Glyph Fash_Glyph;
898struct _Fash_Glyph_Map
899{
900 RGBA_Font_Glyph *item[256];
901};
902struct _Fash_Glyph_Map2
903{
904 Fash_Glyph_Map *bucket[256];
905};
906struct _Fash_Glyph
907{
908 Fash_Glyph_Map2 *bucket[256];
909 void (*freeme) (Fash_Glyph *fash);
910};
911/////
912
913struct _RGBA_Font
914{
915 Eina_List *fonts;
916 Fash_Int *fash;
917 Font_Hint_Flags hinting;
918 int references;
919#ifdef EVAS_FRAME_QUEUING
920 int ref_fq[2]; //ref_fq[0] is for addition, ref_fq[1] is for deletion
921 Eina_Condition cond_fq_del;
922 LK(ref_fq_add);
923 LK(ref_fq_del);
924#endif
925 LK(lock);
926 unsigned char sizeok : 1;
927};
928
929#include "../engines/common/evas_font_ot.h"
930
931struct _RGBA_Font_Int
932{
933 EINA_INLIST;
934 RGBA_Font_Source *src;
935 Eina_Hash *kerning;
936 Fash_Glyph *fash;
937 unsigned int size;
938 int real_size;
939 int max_h;
940 int references;
941 int usage;
942 struct {
943 FT_Size size;
944#ifdef USE_HARFBUZZ
945 void *hb_font;
946#endif
947 } ft;
948 LK(ft_mutex);
949 Font_Hint_Flags hinting;
950 Font_Rend_Flags wanted_rend; /* The wanted rendering style */
951 Font_Rend_Flags runtime_rend; /* The rendering we need to do on runtime
952 in order to comply with the wanted_rend. */
953 unsigned char sizeok : 1;
954 unsigned char inuse : 1;
955};
956
957struct _RGBA_Font_Source
958{
959 const char *name;
960 const char *file;
961 void *data;
962 unsigned int current_size;
963 int data_size;
964 int references;
965 struct {
966 int orig_upem;
967 FT_Face face;
968 } ft;
969};
970
971struct _RGBA_Font_Glyph
972{
973 FT_UInt index;
974 FT_Glyph glyph;
975 FT_BitmapGlyph glyph_out;
976 /* this is a problem - only 1 engine at a time can extend such a font... grrr */
977 void *ext_dat;
978 void (*ext_dat_free) (void *ext_dat);
979 RGBA_Font_Int *fi;
980};
981
982struct _RGBA_Gfx_Compositor
983{
984 const char *name;
985
986 void (*init)(void);
987 void (*shutdown)(void);
988
989 RGBA_Gfx_Func (*composite_pixel_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
990 RGBA_Gfx_Func (*composite_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
991 RGBA_Gfx_Func (*composite_pixel_color_span_get)(RGBA_Image *src, DATA32 col, RGBA_Image *dst, int pixels);
992 RGBA_Gfx_Func (*composite_mask_color_span_get)(DATA32 col, RGBA_Image *dst, int pixels);
993 RGBA_Gfx_Func (*composite_pixel_mask_span_get)(RGBA_Image *src, RGBA_Image *dst, int pixels);
994
995 RGBA_Gfx_Pt_Func (*composite_pixel_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
996 RGBA_Gfx_Pt_Func (*composite_color_pt_get)(DATA32 col, RGBA_Image *dst);
997 RGBA_Gfx_Pt_Func (*composite_pixel_color_pt_get)(Image_Entry_Flags src_flags, DATA32 col, RGBA_Image *dst);
998 RGBA_Gfx_Pt_Func (*composite_mask_color_pt_get)(DATA32 col, RGBA_Image *dst);
999 RGBA_Gfx_Pt_Func (*composite_pixel_mask_pt_get)(Image_Entry_Flags src_flags, RGBA_Image *dst);
1000};
1001
1002#define EVAS_RECT_SPLIT 1
1003#ifdef EVAS_RECT_SPLIT
1004typedef struct list_node list_node_t;
1005typedef struct list list_t;
1006typedef struct rect rect_t;
1007typedef struct rect_node rect_node_t;
1008
1009struct list_node
1010{
1011 struct list_node *next;
1012};
1013
1014struct list
1015{
1016 struct list_node *head;
1017 struct list_node *tail;
1018};
1019
1020struct rect
1021{
1022 int left;
1023 int top;
1024 int right;
1025 int bottom;
1026 int width;
1027 int height;
1028 int area;
1029};
1030
1031struct rect_node
1032{
1033 struct list_node _lst;
1034 struct rect rect;
1035};
1036#endif /* EVAS_RECT_SPLIT */
1037
1038struct _Tilebuf
1039{
1040 int outbuf_w;
1041 int outbuf_h;
1042
1043 struct {
1044 int w, h;
1045 } tile_size;
1046
1047 struct {
1048 int x, y, w, h;
1049 } prev_add, prev_del;
1050#ifdef RECTUPDATE
1051/*
1052 Regionbuf *rb;
1053 */
1054#elif defined(EVAS_RECT_SPLIT)
1055 int need_merge;
1056 list_t rects;
1057#else
1058/*
1059 struct {
1060 int w, h;
1061 Tilebuf_Tile *tiles;
1062 } tiles;
1063 */
1064#endif
1065};
1066
1067struct _Tilebuf_Tile
1068{
1069 Eina_Bool redraw : 1;
1070/* FIXME: need these flags later - but not now */
1071/*
1072 Eina_Bool done : 1;
1073 Eina_Bool edge : 1;
1074 Eina_Bool from : 1;
1075
1076 struct {
1077 int dx, dy;
1078 } vector;
1079 */
1080};
1081
1082struct _Tilebuf_Rect
1083{
1084 EINA_INLIST;
1085 int x, y, w, h;
1086};
1087/*
1088struct _Regionbuf
1089{
1090 int w, h;
1091 Regionspan **spans;
1092};
1093
1094struct _Regionspan
1095{
1096 EINA_INLIST;
1097 int x1, x2;
1098};
1099*/
1100
1101struct _Convert_Pal
1102{
1103 int references;
1104 int count;
1105 Convert_Pal_Mode colors;
1106 DATA8 *lookup;
1107 void *data;
1108};
1109
1110/****/
1111
1112/*****************************************************************************/
1113#include "evas_macros.h"
1114
1115#ifndef WORDS_BIGENDIAN
1116/* x86 */
1117#define A_VAL(p) (((DATA8 *)(p))[3])
1118#define R_VAL(p) (((DATA8 *)(p))[2])
1119#define G_VAL(p) (((DATA8 *)(p))[1])
1120#define B_VAL(p) (((DATA8 *)(p))[0])
1121#define AR_VAL(p) ((DATA16 *)(p)[1])
1122#define GB_VAL(p) ((DATA16 *)(p)[0])
1123#else
1124/* ppc */
1125#define A_VAL(p) (((DATA8 *)(p))[0])
1126#define R_VAL(p) (((DATA8 *)(p))[1])
1127#define G_VAL(p) (((DATA8 *)(p))[2])
1128#define B_VAL(p) (((DATA8 *)(p))[3])
1129#define AR_VAL(p) ((DATA16 *)(p)[0])
1130#define GB_VAL(p) ((DATA16 *)(p)[1])
1131#endif
1132
1133#define RGB_JOIN(r,g,b) \
1134 (((r) << 16) + ((g) << 8) + (b))
1135
1136#define ARGB_JOIN(a,r,g,b) \
1137 (((a) << 24) + ((r) << 16) + ((g) << 8) + (b))
1138
1139#include "evas_blend_ops.h"
1140
1141#define _EVAS_RENDER_FILL -1
1142#define _EVAS_RENDER_BLEND 0
1143#define _EVAS_RENDER_BLEND_REL 1
1144#define _EVAS_RENDER_COPY 2
1145#define _EVAS_RENDER_COPY_REL 3
1146#define _EVAS_RENDER_ADD 4
1147#define _EVAS_RENDER_ADD_REL 5
1148#define _EVAS_RENDER_SUB 6
1149#define _EVAS_RENDER_SUB_REL 7
1150#define _EVAS_RENDER_TINT 8
1151#define _EVAS_RENDER_TINT_REL 9
1152#define _EVAS_RENDER_MASK 10
1153#define _EVAS_RENDER_MUL 11
1154#define _EVAS_RENDER_CLIP 12
1155
1156#define _EVAS_TEXTURE_REFLECT 0
1157#define _EVAS_TEXTURE_REPEAT 1
1158#define _EVAS_TEXTURE_RESTRICT 2
1159#define _EVAS_TEXTURE_RESTRICT_REFLECT 3
1160#define _EVAS_TEXTURE_RESTRICT_REPEAT 4
1161#define _EVAS_TEXTURE_PAD 5
1162
1163#define _EVAS_COLOR_SPACE_ARGB 0
1164#define _EVAS_COLOR_SPACE_AHSV 1
1165
1166/*****************************************************************************/
1167
1168#define SCALE_SIZE_MAX ((1 << 15) - 1)
1169
1170#ifdef __cplusplus
1171extern "C" {
1172#endif
1173
1174/****/
1175void evas_common_init (void);
1176void evas_common_shutdown (void);
1177
1178EAPI void evas_common_cpu_init (void);
1179
1180int evas_common_cpu_have_cpuid (void);
1181int evas_common_cpu_has_feature (unsigned int feature);
1182EAPI void evas_common_cpu_can_do (int *mmx, int *sse, int *sse2);
1183EAPI void evas_common_cpu_end_opt (void);
1184
1185/****/
1186#include "../engines/common/evas_blend.h"
1187
1188EAPI Gfx_Func_Copy evas_common_draw_func_copy_get (int pixels, int reverse);
1189
1190/****/
1191#include "../engines/common/evas_convert_color.h"
1192#include "../engines/common/evas_convert_colorspace.h"
1193#include "../engines/common/evas_convert_main.h"
1194#include "../engines/common/evas_convert_yuv.h"
1195#include "../engines/common/evas_scale_main.h"
1196#include "../engines/common/evas_scale_smooth.h"
1197#include "../engines/common/evas_scale_span.h"
1198
1199/****/
1200#include "../engines/common/evas_image.h"
1201
1202/****/
1203#include "../engines/common/evas_line.h"
1204#include "../engines/common/evas_polygon.h"
1205#include "../engines/common/evas_rectangle.h"
1206
1207/****/
1208EAPI void evas_common_blit_init (void);
1209
1210EAPI 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);
1211
1212/****/
1213#include "../engines/common/evas_font.h"
1214
1215/****/
1216EAPI void evas_common_tilebuf_init (void);
1217
1218EAPI Tilebuf *evas_common_tilebuf_new (int w, int h);
1219EAPI void evas_common_tilebuf_free (Tilebuf *tb);
1220EAPI void evas_common_tilebuf_set_tile_size (Tilebuf *tb, int tw, int th);
1221EAPI void evas_common_tilebuf_get_tile_size (Tilebuf *tb, int *tw, int *th);
1222EAPI int evas_common_tilebuf_add_redraw (Tilebuf *tb, int x, int y, int w, int h);
1223EAPI int evas_common_tilebuf_del_redraw (Tilebuf *tb, int x, int y, int w, int h);
1224EAPI int evas_common_tilebuf_add_motion_vector (Tilebuf *tb, int x, int y, int w, int h, int dx, int dy, int alpha);
1225EAPI void evas_common_tilebuf_clear (Tilebuf *tb);
1226EAPI Tilebuf_Rect *evas_common_tilebuf_get_render_rects (Tilebuf *tb);
1227EAPI void evas_common_tilebuf_free_render_rects (Tilebuf_Rect *rects);
1228
1229/*
1230Regionbuf *evas_common_regionbuf_new (int w, int h);
1231void evas_common_regionbuf_free (Regionbuf *rb);
1232void evas_common_regionbuf_clear (Regionbuf *rb);
1233void evas_common_regionbuf_span_add (Regionbuf *rb, int x1, int x2, int y);
1234void evas_common_regionbuf_span_del (Regionbuf *rb, int x1, int x2, int y);
1235Tilebuf_Rect *evas_common_regionbuf_rects_get (Regionbuf *rb);
1236*/
1237
1238/****/
1239#include "../engines/common/evas_draw.h"
1240
1241#include "../engines/common/evas_map_image.h"
1242
1243/****/
1244#ifdef BUILD_PIPE_RENDER
1245# include "../engines/common/evas_pipe.h"
1246#endif
1247
1248void evas_font_dir_cache_free(void);
1249
1250/****/
1251
1252/*****************************************************************************/
1253
1254#ifdef __cplusplus
1255}
1256#endif
1257
1258#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 @@
1#ifndef EVAS_COMMON_SOFT16_H
2#define EVAS_COMMON_SOFT16_H
3
4#include "evas_common.h"
5#include "evas_private.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define RGB_565_UNPACKED_MASK 0x07e0f81f
12#define RGB_565_UNPACK(rgb) \
13 (((rgb) | ((rgb) << 16)) & RGB_565_UNPACKED_MASK)
14#define RGB_565_PACK(rgb) \
15 ((((rgb) & RGB_565_UNPACKED_MASK) | \
16 ((rgb) & RGB_565_UNPACKED_MASK) >> 16) & 0xffff)
17#define RGB_565_UNPACKED_BLEND(a, b, alpha) \
18 ((b) + (a) - ((((b) * (alpha)) >> 5) & RGB_565_UNPACKED_MASK))
19#define RGB_565_UNPACKED_BLEND_UNMUL(a, b, alpha) \
20 ((b) + ((((a) - (b)) * (alpha)) >> 5))
21
22#define RGB_565_FROM_COMPONENTS(r, g, b) \
23 (((((r) >> 3) & 0x1f) << 11) | \
24 ((((g) >> 2) & 0x3f) << 5) | \
25 (((b) >> 3) & 0x1f))
26
27static inline unsigned int
28_calc_stride(unsigned int w)
29{
30 unsigned int pad = w % 4;
31 if (!pad) return w;
32 else return w + 4 - pad;
33}
34
35#define IMG_BYTE_SIZE(stride, height, has_alpha) \
36 ((stride) * (height) * (!(has_alpha) ? 2 : 3))
37
38typedef struct _Soft16_Image Soft16_Image;
39struct _Soft16_Image
40{
41 Image_Entry cache_entry;
42
43 RGBA_Image *source;
44
45 int stride; // pixel stride - likely a multiple of 2
46 DATA16 *pixels; // 16bpp pixels rgb565
47 DATA8 *alpha; // 8bit alpha mask - optional. points into pixels
48
49 struct
50 {
51/* unsigned char have_alpha : 1; // 1 if we have halpha */
52 unsigned char free_pixels : 1; // 1 if pixels should be freed
53 unsigned char free_alpha : 1; // 1 if alpha mask should be freed
54 } flags;
55};
56
57/**
58 * Image (evas_soft16_main.c)
59 */
60EAPI void evas_common_soft16_image_init(void);
61EAPI void evas_common_soft16_image_shutdown(void);
62EAPI Evas_Cache_Image *evas_common_soft16_image_cache_get(void);
63
64EAPI 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);
65EAPI Soft16_Image *evas_common_soft16_image_alpha_set(Soft16_Image *im, int have_alpha);
66
67void 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);
68void 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);
69
70/* convert/dither functions */
71void evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src);
72void evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src);
73
74/**
75 * Rectangle (evas_soft16_rectangle.c)
76 */
77EAPI void evas_common_soft16_rectangle_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
78
79/**
80 * Polygon (evas_soft16_polygon.c)
81 */
82 EAPI void evas_common_soft16_polygon_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
83
84/**
85 * Line (evas_soft16_line.c)
86 */
87EAPI void evas_common_soft16_line_draw(Soft16_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
88
89/**
90 * Font (evas_soft16_font.c)
91 */
92EAPI void *evas_common_soft16_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
93EAPI void evas_common_soft16_font_glyph_free(void *ext_dat);
94EAPI void evas_common_soft16_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
95
96#ifdef __cplusplus
97}
98#endif
99
100#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 @@
1#ifndef EVAS_COMMON_SOFT8_H
2#define EVAS_COMMON_SOFT8_H
3
4#include "evas_common.h"
5#include "evas_private.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define GRY_8_BLEND(a, b, alpha) \
12 ((b) + (a) - ((((b) * ((alpha) + 1)) >> 8) & 0xff))
13
14#define GRY_8_BLEND_UNMUL(a, b, alpha) \
15 ((b) + ((((a) - (b)) * ((alpha) + 1)) >> 8))
16
17#if 0
18#define GRY_8_FROM_COMPONENTS(r, g, b) \
19 (((307 * (r)) + \
20 (604 * (g)) + \
21 (113 * (b))) >> 10)
22
23#define GRY_8_FROM_RGB(rgb) \
24 GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb))
25#endif
26
27//Y = R * 0.2126 + G * 0.7152 + B * 0.0722
28
29#define GRY_8_FROM_COMPONENTS(r, g, b) \
30 (((218 * (r)) + \
31 (732 * (g)) + \
32 (74 * (b))) >> 10)
33
34#define GRY_8_FROM_RGB(rgb) \
35 GRY_8_FROM_COMPONENTS(R_VAL(rgb), G_VAL(rgb), B_VAL(rgb))
36
37#define UNROLL2(op...) op op
38#define UNROLL4(op...) UNROLL2(op) UNROLL2(op)
39#define UNROLL8(op...) UNROLL4(op) UNROLL4(op)
40#define UNROLL16(op...) UNROLL8(op) UNROLL8(op)
41
42#if defined(__ARM_ARCH_3M__)
43# define __ARM_ARCH__ 40
44#endif
45#if defined(__ARM_ARCH_4__)
46# define __ARM_ARCH__ 40
47#endif
48#if defined(__ARM_ARCH_4T__)
49# define __ARM_ARCH__ 41
50#endif
51
52#if defined(__ARM_ARCH_5__)
53# define __ARM_ARCH__ 50
54#endif
55#if defined(__ARM_ARCH_5T__)
56# define __ARM_ARCH__ 51
57#endif
58#if defined(__ARM_ARCH_5E__)
59# define __ARM_ARCH__ 52
60#endif
61#if defined(__ARM_ARCH_5TE__)
62# define __ARM_ARCH__ 53
63#endif
64#if defined(__ARM_ARCH_5TEJ__)
65# define __ARM_ARCH__ 54
66#endif
67
68#if defined(__ARM_ARCH_6__)
69# define __ARM_ARCH__ 60
70#endif
71#if defined(__ARM_ARCH_6J__)
72# define __ARM_ARCH__ 61
73#endif
74#if defined(__ARM_ARCH_6K__)
75# define __ARM_ARCH__ 62
76#endif
77#if defined(__ARM_ARCH_6Z__)
78# define __ARM_ARCH__ 63
79#endif
80#if defined(__ARM_ARCH_6ZK__)
81# define __ARM_ARCH__ 64
82#endif
83#if defined(__ARM_ARCH_6T2__)
84# define __ARM_ARCH__ 65
85#endif
86
87#if defined(__ARM_ARCH_7__)
88# define __ARM_ARCH__ 70
89#endif
90#if defined(__ARM_ARCH_7A__)
91# define __ARM_ARCH__ 71
92#endif
93#if defined(__ARM_ARCH_7R__)
94# define __ARM_ARCH__ 72
95#endif
96#if defined(__ARM_ARCH_7M__)
97# define __ARM_ARCH__ 73
98#endif
99
100#if defined(__ARM_ARCH__) && (__ARM_ARCH__ >= 52)
101/* tested on ARMv6 (arm1136j-s), Nokia N800 CPU */
102#define pld(addr, off) \
103 __asm__("pld [%[address], %[offset]]":: \
104 [address] "r" (addr), [offset] "i" (off))
105#else
106#define pld(addr, off)
107#endif /* __ARMEL__ */
108
109static inline unsigned int
110_calc_stride(unsigned int w)
111{
112 unsigned int pad = w % 4;
113 if (!pad) return w;
114 else return w + 4 - pad;
115}
116
117#define IMG_BYTE_SIZE(stride, height, has_alpha) \
118 ((stride) * (height) * (!(has_alpha) ? 1 : 2))
119
120typedef struct _Soft8_Image Soft8_Image;
121struct _Soft8_Image
122{
123 Image_Entry cache_entry;
124
125 RGBA_Image *source;
126
127 int stride; // pixel stride
128 DATA8 *pixels; // 8bpp pixels gry8
129 DATA8 *alpha; // 8bit alpha mask - optional. points into pixels
130
131 void *extended_info;
132
133 struct
134 {
135/* unsigned char have_alpha : 1; // 1 if we have halpha */
136 unsigned char free_pixels : 1; // 1 if pixels should be freed
137 unsigned char free_alpha : 1; // 1 if alpha mask should be freed
138 } flags;
139};
140
141/**
142 * Image (evas_soft8_main.c)
143 */
144EAPI void evas_common_soft8_image_init(void);
145EAPI void evas_common_soft8_image_shutdown(void);
146EAPI Evas_Cache_Image *evas_common_soft8_image_cache_get(void);
147
148EAPI 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);
149EAPI Soft8_Image *evas_common_soft8_image_alpha_set(Soft8_Image *im, int have_alpha);
150
151void 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);
152void 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);
153
154/* convert/dither functions */
155void evas_common_soft8_image_convert_from_rgb(Soft8_Image *im, const DATA32 *src);
156void evas_common_soft8_image_convert_from_rgba(Soft8_Image *im, const DATA32 *src);
157
158/**
159 * Rectangle (evas_soft8_rectangle.c)
160 */
161EAPI void evas_common_soft8_rectangle_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x, int y, int w, int h);
162
163/**
164 * Polygon (evas_soft8_polygon.c)
165 */
166EAPI void evas_common_soft8_polygon_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, RGBA_Polygon_Point *points, int x, int y);
167
168/**
169 * Line (evas_soft8_line.c)
170 */
171EAPI void evas_common_soft8_line_draw(Soft8_Image *dst, RGBA_Draw_Context *dc, int x0, int y0, int x1, int y1);
172
173/**
174 * Font (evas_soft8_font.c)
175 */
176EAPI void *evas_common_soft8_font_glyph_new(void *data, RGBA_Font_Glyph *fg);
177EAPI void evas_common_soft8_font_glyph_free(void *ext_dat);
178EAPI void evas_common_soft8_font_glyph_draw(void *data, void *dest, void *context, RGBA_Font_Glyph *fg, int x, int y);
179
180#ifdef __cplusplus
181}
182#endif
183
184#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 @@
1#ifndef EVAS_INLINE_H
2#define EVAS_INLINE_H
3
4static inline void
5_evas_object_event_new(void)
6{
7 _evas_event_counter++;
8}
9
10static inline int
11evas_object_was_visible(Evas_Object *obj)
12{
13 if ((obj->prev.visible) &&
14 ((obj->prev.cache.clip.visible) || (obj->smart.smart)) &&
15 ((obj->prev.cache.clip.a > 0 && obj->prev.render_op == EVAS_RENDER_BLEND)
16 || obj->prev.render_op != EVAS_RENDER_BLEND))
17 {
18 if (obj->func->was_visible)
19 return obj->func->was_visible(obj);
20 return 1;
21 }
22 return 0;
23}
24
25static inline void
26evas_add_rect(Eina_Array *rects, int x, int y, int w, int h)
27{
28 Eina_Rectangle *r;
29
30 NEW_RECT(r, x, y, w, h);
31 if (r) eina_array_push(rects, r);
32}
33
34static inline Cutout_Rect*
35evas_common_draw_context_cutouts_add(Cutout_Rects* rects,
36 int x, int y, int w, int h)
37{
38 Cutout_Rect* rect;
39
40 if (rects->max < (rects->active + 1))
41 {
42 rects->max += 128;
43 rects->rects = (Cutout_Rect *)realloc(rects->rects, sizeof(Cutout_Rect) * rects->max);
44 }
45
46 rect = rects->rects + rects->active;
47 rect->x = x;
48 rect->y = y;
49 rect->w = w;
50 rect->h = h;
51 rects->active++;
52
53 return rect;
54}
55
56static inline int
57evas_object_is_opaque(Evas_Object *obj)
58{
59 if (obj->smart.smart) return 0;
60 /* If a mask: Assume alpha */
61 if (obj->cur.mask) return 0;
62 if (obj->cur.cache.clip.a == 255)
63 {
64 if (obj->func->is_opaque)
65 return obj->func->is_opaque(obj);
66 return 1;
67 }
68 if (obj->cur.render_op == EVAS_RENDER_COPY)
69 return 1;
70 return 0;
71}
72
73static inline int
74evas_event_freezes_through(Evas_Object *obj)
75{
76 if (obj->freeze_events) return 1;
77 if (obj->parent_cache.freeze_events_valid)
78 return obj->parent_cache.freeze_events;
79 if (!obj->smart.parent) return 0;
80 obj->parent_cache.freeze_events =
81 evas_event_freezes_through(obj->smart.parent);
82 obj->parent_cache.freeze_events_valid = EINA_TRUE;
83 return obj->parent_cache.freeze_events;
84}
85
86static inline int
87evas_event_passes_through(Evas_Object *obj)
88{
89 if (obj->pass_events) return 1;
90 if (obj->parent_cache.pass_events_valid)
91 return obj->parent_cache.pass_events;
92 if (!obj->smart.parent) return 0;
93 obj->parent_cache.pass_events =
94 evas_event_passes_through(obj->smart.parent);
95 obj->parent_cache.pass_events_valid = EINA_TRUE;
96 return obj->parent_cache.pass_events;
97}
98
99static inline int
100evas_object_is_visible(Evas_Object *obj)
101{ /* post 1.0 -> enable? */
102 if ((obj->cur.visible)/* && (obj->cur.color.a > 0)*/ &&
103 ((obj->cur.cache.clip.visible) || (obj->smart.smart)) &&
104 ((obj->cur.cache.clip.a > 0 && obj->cur.render_op == EVAS_RENDER_BLEND)
105 || obj->cur.render_op != EVAS_RENDER_BLEND))
106 {
107 if (obj->func->is_visible)
108 return obj->func->is_visible(obj);
109 return 1;
110 }
111 return 0;
112}
113
114static inline int
115evas_object_clippers_is_visible(Evas_Object *obj)
116{
117 if (obj->cur.visible)
118 {
119 if (obj->cur.clipper)
120 return evas_object_clippers_is_visible(obj->cur.clipper);
121 return 1;
122 }
123 return 0;
124}
125
126static inline int
127evas_object_is_in_output_rect(Evas_Object *obj, int x, int y, int w, int h)
128{
129 /* assumes coords have been recalced */
130 if ((RECTS_INTERSECT(x, y, w, h,
131 obj->cur.cache.clip.x,
132 obj->cur.cache.clip.y,
133 obj->cur.cache.clip.w,
134 obj->cur.cache.clip.h)))
135 return 1;
136 return 0;
137}
138
139static inline int
140evas_object_is_active(Evas_Object *obj)
141{
142 if (evas_object_is_visible(obj) || evas_object_was_visible(obj))
143 {
144 if (obj->smart.smart)
145 {
146 int mapsmt = 0;
147 if (obj->smart.smart && (obj->cur.map && obj->cur.usemap)) mapsmt = 1;
148 if (!mapsmt) return 1;
149 if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
150 obj->layer->evas->output.h) ||
151 evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
152 obj->layer->evas->output.h))
153 return 1;
154 }
155 else
156 {
157 if (evas_object_is_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
158 obj->layer->evas->output.h) ||
159 evas_object_was_in_output_rect(obj, 0, 0, obj->layer->evas->output.w,
160 obj->layer->evas->output.h))
161 return 1;
162 }
163 }
164 return 0;
165}
166
167static inline void
168evas_object_coords_recalc(Evas_Object *obj)
169{
170//// if (obj->cur.cache.geometry.validity == obj->layer->evas->output_validity)
171//// return;
172//// obj->cur.cache.geometry.x =
173//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.x);
174//// obj->cur.cache.geometry.y =
175//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.y);
176//// obj->cur.cache.geometry.w =
177//// evas_coord_world_x_to_screen(obj->layer->evas, obj->cur.geometry.w) -
178//// evas_coord_world_x_to_screen(obj->layer->evas, 0);
179//// obj->cur.cache.geometry.h =
180//// evas_coord_world_y_to_screen(obj->layer->evas, obj->cur.geometry.h) -
181//// evas_coord_world_y_to_screen(obj->layer->evas, 0);
182 if (obj->func->coords_recalc) obj->func->coords_recalc(obj);
183//// obj->cur.cache.geometry.validity = obj->layer->evas->output_validity;
184}
185
186static inline void
187evas_object_clip_recalc(Evas_Object *obj)
188{
189 int cx, cy, cw, ch, cvis, cr, cg, cb, ca;
190 int nx, ny, nw, nh, nvis, nr, ng, nb, na;
191
192 if ((!obj->cur.cache.clip.dirty) &&
193 !(!obj->cur.clipper || obj->cur.clipper->cur.cache.clip.dirty))
194 return;
195 if (obj->layer->evas->events_frozen > 0) return;
196 evas_object_coords_recalc(obj);
197 if ((obj->cur.map) && (obj->cur.usemap))
198 {
199 cx = obj->cur.map->normal_geometry.x;
200 cy = obj->cur.map->normal_geometry.y;
201 cw = obj->cur.map->normal_geometry.w;
202 ch = obj->cur.map->normal_geometry.h;
203 }
204 else
205 {
206 cx = obj->cur.geometry.x;
207 cy = obj->cur.geometry.y;
208 cw = obj->cur.geometry.w;
209 ch = obj->cur.geometry.h;
210 }
211//// cx = obj->cur.cache.geometry.x; cy = obj->cur.cache.geometry.y;
212//// cw = obj->cur.cache.geometry.w; ch = obj->cur.cache.geometry.h;
213 if (obj->cur.color.a == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) cvis = 0;
214 else cvis = obj->cur.visible;
215 cr = obj->cur.color.r; cg = obj->cur.color.g;
216 cb = obj->cur.color.b; ca = obj->cur.color.a;
217 if (obj->cur.clipper)
218 {
219// this causes problems... hmmm ?????
220 if (obj->cur.clipper->cur.cache.clip.dirty)
221 evas_object_clip_recalc(obj->cur.clipper);
222
223 // I don't know why this test was here in the first place. As I have
224 // no issue showing up due to this, I keep it and move color out of it.
225// breaks cliping of mapped images!!!
226 if (obj->cur.clipper->cur.map_parent == obj->cur.map_parent)
227 {
228 nx = obj->cur.clipper->cur.cache.clip.x;
229 ny = obj->cur.clipper->cur.cache.clip.y;
230 nw = obj->cur.clipper->cur.cache.clip.w;
231 nh = obj->cur.clipper->cur.cache.clip.h;
232 RECTS_CLIP_TO_RECT(cx, cy, cw, ch, nx, ny, nw, nh);
233 }
234
235 nvis = obj->cur.clipper->cur.cache.clip.visible;
236 nr = obj->cur.clipper->cur.cache.clip.r;
237 ng = obj->cur.clipper->cur.cache.clip.g;
238 nb = obj->cur.clipper->cur.cache.clip.b;
239 na = obj->cur.clipper->cur.cache.clip.a;
240 cvis = cvis * nvis;
241 cr = (cr * (nr + 1)) >> 8;
242 cg = (cg * (ng + 1)) >> 8;
243 cb = (cb * (nb + 1)) >> 8;
244 ca = (ca * (na + 1)) >> 8;
245 }
246 if ((ca == 0 && obj->cur.render_op == EVAS_RENDER_BLEND) || (cw <= 0) || (ch <= 0)) cvis = 0;
247 obj->cur.cache.clip.x = cx;
248 obj->cur.cache.clip.y = cy;
249 obj->cur.cache.clip.w = cw;
250 obj->cur.cache.clip.h = ch;
251 obj->cur.cache.clip.visible = cvis;
252 obj->cur.cache.clip.r = cr;
253 obj->cur.cache.clip.g = cg;
254 obj->cur.cache.clip.b = cb;
255 obj->cur.cache.clip.a = ca;
256 obj->cur.cache.clip.dirty = 0;
257}
258
259#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 @@
1#ifndef EVAS_MACROS_H
2#define EVAS_MACROS_H
3
4#undef ABS
5#define ABS(x) (((x) < 0) ? -(x) : (x))
6
7#undef SGN
8#define SGN(x) (((x) < 0) ? -1 : 1)
9
10#undef MIN
11#define MIN(x, y) (((x) < (y)) ? (x) : (y))
12
13#undef MAX
14#define MAX(x, y) (((x) > (y)) ? (x) : (y))
15
16#define SWAP32(x) (x) = \
17 ((((x) & 0x000000ff ) << 24) | \
18 (((x) & 0x0000ff00 ) << 8) | \
19 (((x) & 0x00ff0000 ) >> 8) | \
20 (((x) & 0xff000000 ) >> 24))
21
22#define SWAP16(x) (x) = \
23 ((((x) & 0x00ff ) << 8) | \
24 (((x) & 0xff00 ) >> 8))
25
26#define SPANS_COMMON(x1, w1, x2, w2) \
27(!(( (int)((x2) + (int)(w2)) <= (int)(x1)) || (int)((x2) >= (int)((x1) + (int)(w1)))))
28
29#define RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
30((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
31
32#define RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \
33{ \
34 if (RECTS_INTERSECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \
35 { \
36 if ((int)_x < (int)(_cx)) \
37 { \
38 if ((int)_w + ((int)_x - (int)(_cx)) < 0) _w = 0; \
39 else _w += ((int)_x - (int)(_cx)); \
40 _x = (_cx); \
41 } \
42 if ((int)(_x + _w) > (int)((_cx) + (_cw))) \
43 _w = (_cx) + (_cw) - _x; \
44 if ((int)_y < (int)(_cy)) \
45 { \
46 if ((int)_h + ((int)_y - (int)(_cy)) < 0) _h = 0; \
47 else _h += ((int)_y - (int)(_cy)); \
48 _y = (_cy); \
49 } \
50 if ((int)(_y + _h) > (int)((_cy) + (_ch))) \
51 _h = (_cy) + (_ch) - _y; \
52 } \
53 else \
54 { \
55 _w = 0; _h = 0; \
56 } \
57}
58
59
60#define INTERP_VAL(out, in1, in2, in3, in4, interp_x, interp_y) \
61 { \
62 int _v, _vv; \
63 \
64 _v = (256 - (interp_x)) * (in1); \
65 if ((interp_x) > 0) _v += (interp_x) * (in2); \
66 _v *= (256 - (interp_y)); \
67 if ((interp_y) > 0) \
68 { \
69 _vv = (256 - (interp_x)) * (in3); \
70 if ((interp_x) > 0) _vv += (interp_x) * (in4); \
71 _vv *= (interp_y); \
72 (out) = ((_v + _vv) >> 16); \
73 } \
74 else (out) = (_v >> 16); \
75 }
76
77#define INTERP_2(in1, in2, interp, interp_inv) \
78 ((in1 * interp_inv) + (in2 * interp)) >> 8
79
80
81#define CONVERT_LOOP_START_ROT_0() \
82 src_ptr = src; \
83 for (y = 0; y < h; y++) \
84 { \
85 for (x = 0; x < w; x++) \
86 {
87
88#define CONVERT_LOOP_END_ROT_0() \
89 dst_ptr++; \
90 src_ptr++; \
91 } \
92 src_ptr += src_jump; \
93 dst_ptr += dst_jump; \
94 }
95
96#define CONVERT_LOOP_START_ROT_180() \
97 src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \
98 for (y = 0; y < h; y++) \
99 { \
100 for (x = 0; x < w; x++) \
101 {
102
103#define CONVERT_LOOP_END_ROT_180() \
104 dst_ptr++; \
105 src_ptr--; \
106 } \
107 src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \
108 dst_ptr += dst_jump; \
109 }
110
111#define CONVERT_LOOP_START_ROT_270() \
112 src_ptr = src + ((w - 1) * (h + src_jump)); \
113 for (y = 0; y < h; y++) \
114 { \
115 for (x = 0; x < w; x++) \
116 {
117
118#define CONVERT_LOOP_END_ROT_270() \
119 dst_ptr++; \
120 src_ptr -= (h + src_jump); \
121 } \
122 src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \
123 dst_ptr += dst_jump; \
124 }
125
126#define CONVERT_LOOP_START_ROT_90() \
127 src_ptr = src + (h - 1); \
128 for (y = 0; y < h; y++) \
129 { \
130 for (x = 0; x < w; x++) \
131 {
132
133#define CONVERT_LOOP_END_ROT_90() \
134 dst_ptr++; \
135 src_ptr += (h + src_jump); \
136 } \
137 src_ptr = src + (h - 1) - y - 1; \
138 dst_ptr += dst_jump; \
139 }
140
141#define CONVERT_LOOP2_START_ROT_0() \
142 src_ptr = src; \
143 for (y = 0; y < h; y++) \
144 { \
145 for (x = 0; x < w; x++) \
146 {
147
148#define CONVERT_LOOP2_INC_ROT_0() \
149src_ptr++; \
150x++;
151
152#define CONVERT_LOOP2_END_ROT_0() \
153 dst_ptr+=2; \
154 src_ptr++; \
155 } \
156 src_ptr += src_jump; \
157 dst_ptr += dst_jump; \
158 }
159
160#define CONVERT_LOOP2_START_ROT_180() \
161 src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \
162 for (y = 0; y < h; y++) \
163 { \
164 for (x = 0; x < w; x++) \
165 {
166
167#define CONVERT_LOOP2_INC_ROT_180() \
168src_ptr--; \
169x++;
170
171#define CONVERT_LOOP2_END_ROT_180() \
172 dst_ptr+=2; \
173 src_ptr--; \
174 } \
175 src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \
176 dst_ptr += dst_jump; \
177 }
178
179#define CONVERT_LOOP2_START_ROT_270() \
180 src_ptr = src + ((w - 1) * (h + src_jump)); \
181 for (y = 0; y < h; y++) \
182 { \
183 for (x = 0; x < w; x++) \
184 {
185
186#define CONVERT_LOOP2_INC_ROT_270() \
187src_ptr -= (h + src_jump); \
188x++;
189
190#define CONVERT_LOOP2_END_ROT_270() \
191 dst_ptr+=2; \
192 src_ptr -= (h + src_jump); \
193 } \
194 src_ptr = src + ((w - 1) * (h + src_jump)) + (y + 1); \
195 dst_ptr += dst_jump; \
196 }
197
198#define CONVERT_LOOP2_START_ROT_90() \
199 src_ptr = src + (h - 1); \
200 for (y = 0; y < h; y++) \
201 { \
202 for (x = 0; x < w; x++) \
203 {
204
205#define CONVERT_LOOP2_INC_ROT_90() \
206src_ptr += (h + src_jump); \
207x++;
208
209#define CONVERT_LOOP2_END_ROT_90() \
210 dst_ptr+=2; \
211 src_ptr += (h + src_jump); \
212 } \
213 src_ptr = src + (h - 1) - y - 1; \
214 dst_ptr += dst_jump; \
215 }
216
217#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 @@
1/* mmx.h
2
3 MultiMedia eXtensions GCC interface library for IA32.
4
5 To use this library, simply include this header file
6 and compile with GCC. You MUST have inlining enabled
7 in order for mmx_ok() to work; this can be done by
8 simply using -O on the GCC command line.
9
10 Compiling with -DMMX_TRACE will cause detailed trace
11 output to be sent to stderr for each mmx operation.
12 This adds lots of code, and obviously slows execution to
13 a crawl, but can be very useful for debugging.
14
15 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY
16 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT
17 LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18 AND FITNESS FOR ANY PARTICULAR PURPOSE.
19
20 1997-98 by H. Dietz and R. Fisher
21
22 History:
23 97-98* R.Fisher Early versions
24 980501 R.Fisher Original Release
25 980611* H.Dietz Rewrite, correctly implementing inlines, and
26 R.Fisher including direct register accesses.
27 980616 R.Fisher Release of 980611 as 980616.
28 980714 R.Fisher Minor corrections to Makefile, etc.
29 980715 R.Fisher mmx_ok() now prevents optimizer from using
30 clobbered values.
31 mmx_ok() now checks if cpuid instruction is
32 available before trying to use it.
33 980726* R.Fisher mm_support() searches for AMD 3DNow, Cyrix
34 Extended MMX, and standard MMX. It returns a
35 value which is positive if any of these are
36 supported, and can be masked with constants to
37 see which. mmx_ok() is now a call to this
38 980726* R.Fisher Added i2r support for shift functions
39 980919 R.Fisher Fixed AMD extended feature recognition bug.
40 980921 R.Fisher Added definition/check for _MMX_H.
41 Added "float s[2]" to mmx_t for use with
42 3DNow and EMMX. So same mmx_t can be used.
43 981013 R.Fisher Fixed cpuid function 1 bug (looked at wrong reg)
44 Fixed psllq_i2r error in mmxtest.c
45
46 * Unreleased (internal or interim) versions
47
48 Notes:
49 It appears that the latest gas has the pand problem fixed, therefore
50 I'll undefine BROKEN_PAND by default.
51 String compares may be quicker than the multiple test/jumps in vendor
52 test sequence in mmx_ok(), but I'm not concerned with that right now.
53
54 Acknowledgments:
55 Jussi Laako for pointing out the errors ultimately found to be
56 connected to the failure to notify the optimizer of clobbered values.
57 Roger Hardiman for reminding us that CPUID isn't everywhere, and that
58 someone may actually try to use this on a machine without CPUID.
59 Also for suggesting code for checking this.
60 Robert Dale for pointing out the AMD recognition bug.
61 Jimmy Mayfield and Carl Witty for pointing out the Intel recognition
62 bug.
63 Carl Witty for pointing out the psllq_i2r test bug.
64*/
65
66#ifndef _MMX_H
67#define _MMX_H
68
69/* Warning: at this writing, the version of GAS packaged
70 with most Linux distributions does not handle the
71 parallel AND operation mnemonic correctly. If the
72 symbol BROKEN_PAND is defined, a slower alternative
73 coding will be used. If execution of mmxtest results
74 in an illegal instruction fault, define this symbol.
75*/
76#undef BROKEN_PAND
77
78
79/* The type of an value that fits in an MMX register
80 (note that long long constant values MUST be suffixed
81 by LL and unsigned long long values by ULL, lest
82 they be truncated by the compiler)
83*/
84typedef union {
85 long long q; /* Quadword (64-bit) value */
86 unsigned long long uq; /* Unsigned Quadword */
87 int d[2]; /* 2 Doubleword (32-bit) values */
88 unsigned int ud[2]; /* 2 Unsigned Doubleword */
89 short w[4]; /* 4 Word (16-bit) values */
90 unsigned short uw[4]; /* 4 Unsigned Word */
91 char b[8]; /* 8 Byte (8-bit) values */
92 unsigned char ub[8]; /* 8 Unsigned Byte */
93 float s[2]; /* Single-precision (32-bit) value */
94} __attribute__ ((aligned (8))) mmx_t;
95
96/* Helper functions for the instruction macros that follow...
97 (note that memory-to-register, m2r, instructions are nearly
98 as efficient as register-to-register, r2r, instructions;
99 however, memory-to-memory instructions are really simulated
100 as a convenience, and are only 1/3 as efficient)
101*/
102
103/* These macros are a lot simpler without the tracing...
104*/
105
106#define mmx_i2r(op, imm, reg) \
107 __asm__ __volatile__ (#op " $" #imm ", %%" #reg \
108 : /* nothing */ \
109 : /* nothing */);
110
111#define mmx_m2r(op, mem, reg) \
112 __asm__ __volatile__ (#op " %0, %%" #reg \
113 : /* nothing */ \
114 : "m" (mem))
115
116#define mmx_r2m(op, reg, mem) \
117 __asm__ __volatile__ (#op " %%" #reg ", %0" \
118 : "=m" (mem) \
119 : /* nothing */ )
120
121#define mmx_a2r(op, mem, reg) \
122 __asm__ __volatile__ (#op " %0, %%" #reg \
123 : /* nothing */ \
124 : "m" (mem))
125
126#define mmx_r2a(op, reg, mem) \
127 __asm__ __volatile__ (#op " %%" #reg ", %0" \
128 : "=m" (mem) \
129 : /* nothing */ )
130
131#define mmx_r2r(op, regs, regd) \
132 __asm__ __volatile__ (#op " %" #regs ", %" #regd)
133
134#define mmx_m2m(op, mems, memd) \
135 __asm__ __volatile__ ("movq %0, %%mm0\n\t" \
136 #op " %1, %%mm0\n\t" \
137 "movq %%mm0, %0" \
138 : "=X" (memd) \
139 : "X" (mems))
140
141/* 1x64 MOVE Quadword
142 (this is both a load and a store...
143 in fact, it is the only way to store)
144*/
145#define movq_m2r(var, reg) mmx_m2r(movq, var, reg)
146#define movq_r2m(reg, var) mmx_r2m(movq, reg, var)
147#define movq_r2r(regs, regd) mmx_r2r(movq, regs, regd)
148#define movq(vars, vard) \
149 __asm__ __volatile__ ("movq %1, %%mm0\n\t" \
150 "movq %%mm0, %0" \
151 : "=X" (vard) \
152 : "X" (vars))
153#define movntq_r2m(reg, var) mmx_r2m(movntq, reg, var)
154
155
156/* 1x32 MOVE Doubleword
157 (like movq, this is both load and store...
158 but is most useful for moving things between
159 mmx registers and ordinary registers)
160*/
161#define movd_m2r(var, reg) mmx_a2r(movd, var, reg)
162#define movd_r2m(reg, var) mmx_r2a(movd, reg, var)
163#define movd_r2r(regs, regd) mmx_r2r(movd, regs, regd)
164#define movd(vars, vard) \
165 __asm__ __volatile__ ("movd %1, %%mm0\n\t" \
166 "movd %%mm0, %0" \
167 : "=X" (vard) \
168 : "X" (vars))
169
170
171/* 2x32, 4x16, and 8x8 Parallel ADDs
172*/
173#define paddd_m2r(var, reg) mmx_m2r(paddd, var, reg)
174#define paddd_r2r(regs, regd) mmx_r2r(paddd, regs, regd)
175#define paddd(vars, vard) mmx_m2m(paddd, vars, vard)
176
177#define paddw_m2r(var, reg) mmx_m2r(paddw, var, reg)
178#define paddw_r2r(regs, regd) mmx_r2r(paddw, regs, regd)
179#define paddw(vars, vard) mmx_m2m(paddw, vars, vard)
180
181#define paddb_m2r(var, reg) mmx_m2r(paddb, var, reg)
182#define paddb_r2r(regs, regd) mmx_r2r(paddb, regs, regd)
183#define paddb(vars, vard) mmx_m2m(paddb, vars, vard)
184
185
186/* 4x16 and 8x8 Parallel ADDs using Saturation arithmetic
187*/
188#define paddsw_m2r(var, reg) mmx_m2r(paddsw, var, reg)
189#define paddsw_r2r(regs, regd) mmx_r2r(paddsw, regs, regd)
190#define paddsw(vars, vard) mmx_m2m(paddsw, vars, vard)
191
192#define paddsb_m2r(var, reg) mmx_m2r(paddsb, var, reg)
193#define paddsb_r2r(regs, regd) mmx_r2r(paddsb, regs, regd)
194#define paddsb(vars, vard) mmx_m2m(paddsb, vars, vard)
195
196
197/* 4x16 and 8x8 Parallel ADDs using Unsigned Saturation arithmetic
198*/
199#define paddusw_m2r(var, reg) mmx_m2r(paddusw, var, reg)
200#define paddusw_r2r(regs, regd) mmx_r2r(paddusw, regs, regd)
201#define paddusw(vars, vard) mmx_m2m(paddusw, vars, vard)
202
203#define paddusb_m2r(var, reg) mmx_m2r(paddusb, var, reg)
204#define paddusb_r2r(regs, regd) mmx_r2r(paddusb, regs, regd)
205#define paddusb(vars, vard) mmx_m2m(paddusb, vars, vard)
206
207
208/* 2x32, 4x16, and 8x8 Parallel SUBs
209*/
210#define psubd_m2r(var, reg) mmx_m2r(psubd, var, reg)
211#define psubd_r2r(regs, regd) mmx_r2r(psubd, regs, regd)
212#define psubd(vars, vard) mmx_m2m(psubd, vars, vard)
213
214#define psubw_m2r(var, reg) mmx_m2r(psubw, var, reg)
215#define psubw_r2r(regs, regd) mmx_r2r(psubw, regs, regd)
216#define psubw(vars, vard) mmx_m2m(psubw, vars, vard)
217
218#define psubb_m2r(var, reg) mmx_m2r(psubb, var, reg)
219#define psubb_r2r(regs, regd) mmx_r2r(psubb, regs, regd)
220#define psubb(vars, vard) mmx_m2m(psubb, vars, vard)
221
222
223/* 4x16 and 8x8 Parallel SUBs using Saturation arithmetic
224*/
225#define psubsw_m2r(var, reg) mmx_m2r(psubsw, var, reg)
226#define psubsw_r2r(regs, regd) mmx_r2r(psubsw, regs, regd)
227#define psubsw(vars, vard) mmx_m2m(psubsw, vars, vard)
228
229#define psubsb_m2r(var, reg) mmx_m2r(psubsb, var, reg)
230#define psubsb_r2r(regs, regd) mmx_r2r(psubsb, regs, regd)
231#define psubsb(vars, vard) mmx_m2m(psubsb, vars, vard)
232
233
234/* 4x16 and 8x8 Parallel SUBs using Unsigned Saturation arithmetic
235*/
236#define psubusw_m2r(var, reg) mmx_m2r(psubusw, var, reg)
237#define psubusw_r2r(regs, regd) mmx_r2r(psubusw, regs, regd)
238#define psubusw(vars, vard) mmx_m2m(psubusw, vars, vard)
239
240#define psubusb_m2r(var, reg) mmx_m2r(psubusb, var, reg)
241#define psubusb_r2r(regs, regd) mmx_r2r(psubusb, regs, regd)
242#define psubusb(vars, vard) mmx_m2m(psubusb, vars, vard)
243
244
245/* 4x16 Parallel MULs giving Low 4x16 portions of results
246*/
247#define pmullw_m2r(var, reg) mmx_m2r(pmullw, var, reg)
248#define pmullw_r2r(regs, regd) mmx_r2r(pmullw, regs, regd)
249#define pmullw(vars, vard) mmx_m2m(pmullw, vars, vard)
250
251
252/* 4x16 Parallel MULs giving High 4x16 portions of results
253*/
254#define pmulhw_m2r(var, reg) mmx_m2r(pmulhw, var, reg)
255#define pmulhw_r2r(regs, regd) mmx_r2r(pmulhw, regs, regd)
256#define pmulhw(vars, vard) mmx_m2m(pmulhw, vars, vard)
257
258
259/* 4x16->2x32 Parallel Mul-ADD
260 (muls like pmullw, then adds adjacent 16-bit fields
261 in the multiply result to make the final 2x32 result)
262*/
263#define pmaddwd_m2r(var, reg) mmx_m2r(pmaddwd, var, reg)
264#define pmaddwd_r2r(regs, regd) mmx_r2r(pmaddwd, regs, regd)
265#define pmaddwd(vars, vard) mmx_m2m(pmaddwd, vars, vard)
266
267
268/* 1x64 bitwise AND
269*/
270#ifdef BROKEN_PAND
271#define pand_m2r(var, reg) \
272 { \
273 mmx_m2r(pandn, (mmx_t) -1LL, reg); \
274 mmx_m2r(pandn, var, reg); \
275 }
276#define pand_r2r(regs, regd) \
277 { \
278 mmx_m2r(pandn, (mmx_t) -1LL, regd); \
279 mmx_r2r(pandn, regs, regd) \
280 }
281#define pand(vars, vard) \
282 { \
283 movq_m2r(vard, mm0); \
284 mmx_m2r(pandn, (mmx_t) -1LL, mm0); \
285 mmx_m2r(pandn, vars, mm0); \
286 movq_r2m(mm0, vard); \
287 }
288#else
289#define pand_m2r(var, reg) mmx_m2r(pand, var, reg)
290#define pand_r2r(regs, regd) mmx_r2r(pand, regs, regd)
291#define pand(vars, vard) mmx_m2m(pand, vars, vard)
292#endif
293
294
295/* 1x64 bitwise AND with Not the destination
296*/
297#define pandn_m2r(var, reg) mmx_m2r(pandn, var, reg)
298#define pandn_r2r(regs, regd) mmx_r2r(pandn, regs, regd)
299#define pandn(vars, vard) mmx_m2m(pandn, vars, vard)
300
301
302/* 1x64 bitwise OR
303*/
304#define por_m2r(var, reg) mmx_m2r(por, var, reg)
305#define por_r2r(regs, regd) mmx_r2r(por, regs, regd)
306#define por(vars, vard) mmx_m2m(por, vars, vard)
307
308
309/* 1x64 bitwise eXclusive OR
310*/
311#define pxor_m2r(var, reg) mmx_m2r(pxor, var, reg)
312#define pxor_r2r(regs, regd) mmx_r2r(pxor, regs, regd)
313#define pxor(vars, vard) mmx_m2m(pxor, vars, vard)
314
315
316/* 2x32, 4x16, and 8x8 Parallel CoMPare for EQuality
317 (resulting fields are either 0 or -1)
318*/
319#define pcmpeqd_m2r(var, reg) mmx_m2r(pcmpeqd, var, reg)
320#define pcmpeqd_r2r(regs, regd) mmx_r2r(pcmpeqd, regs, regd)
321#define pcmpeqd(vars, vard) mmx_m2m(pcmpeqd, vars, vard)
322
323#define pcmpeqw_m2r(var, reg) mmx_m2r(pcmpeqw, var, reg)
324#define pcmpeqw_r2r(regs, regd) mmx_r2r(pcmpeqw, regs, regd)
325#define pcmpeqw(vars, vard) mmx_m2m(pcmpeqw, vars, vard)
326
327#define pcmpeqb_m2r(var, reg) mmx_m2r(pcmpeqb, var, reg)
328#define pcmpeqb_r2r(regs, regd) mmx_r2r(pcmpeqb, regs, regd)
329#define pcmpeqb(vars, vard) mmx_m2m(pcmpeqb, vars, vard)
330
331
332/* 2x32, 4x16, and 8x8 Parallel CoMPare for Greater Than
333 (resulting fields are either 0 or -1)
334*/
335#define pcmpgtd_m2r(var, reg) mmx_m2r(pcmpgtd, var, reg)
336#define pcmpgtd_r2r(regs, regd) mmx_r2r(pcmpgtd, regs, regd)
337#define pcmpgtd(vars, vard) mmx_m2m(pcmpgtd, vars, vard)
338
339#define pcmpgtw_m2r(var, reg) mmx_m2r(pcmpgtw, var, reg)
340#define pcmpgtw_r2r(regs, regd) mmx_r2r(pcmpgtw, regs, regd)
341#define pcmpgtw(vars, vard) mmx_m2m(pcmpgtw, vars, vard)
342
343#define pcmpgtb_m2r(var, reg) mmx_m2r(pcmpgtb, var, reg)
344#define pcmpgtb_r2r(regs, regd) mmx_r2r(pcmpgtb, regs, regd)
345#define pcmpgtb(vars, vard) mmx_m2m(pcmpgtb, vars, vard)
346
347
348/* 1x64, 2x32, and 4x16 Parallel Shift Left Logical
349*/
350#define psllq_i2r(imm, reg) mmx_i2r(psllq, imm, reg)
351#define psllq_m2r(var, reg) mmx_m2r(psllq, var, reg)
352#define psllq_r2r(regs, regd) mmx_r2r(psllq, regs, regd)
353#define psllq(vars, vard) mmx_m2m(psllq, vars, vard)
354
355#define pslld_i2r(imm, reg) mmx_i2r(pslld, imm, reg)
356#define pslld_m2r(var, reg) mmx_m2r(pslld, var, reg)
357#define pslld_r2r(regs, regd) mmx_r2r(pslld, regs, regd)
358#define pslld(vars, vard) mmx_m2m(pslld, vars, vard)
359
360#define psllw_i2r(imm, reg) mmx_i2r(psllw, imm, reg)
361#define psllw_m2r(var, reg) mmx_m2r(psllw, var, reg)
362#define psllw_r2r(regs, regd) mmx_r2r(psllw, regs, regd)
363#define psllw(vars, vard) mmx_m2m(psllw, vars, vard)
364
365
366/* 1x64, 2x32, and 4x16 Parallel Shift Right Logical
367*/
368#define psrlq_i2r(imm, reg) mmx_i2r(psrlq, imm, reg)
369#define psrlq_m2r(var, reg) mmx_m2r(psrlq, var, reg)
370#define psrlq_r2r(regs, regd) mmx_r2r(psrlq, regs, regd)
371#define psrlq(vars, vard) mmx_m2m(psrlq, vars, vard)
372
373#define psrld_i2r(imm, reg) mmx_i2r(psrld, imm, reg)
374#define psrld_m2r(var, reg) mmx_m2r(psrld, var, reg)
375#define psrld_r2r(regs, regd) mmx_r2r(psrld, regs, regd)
376#define psrld(vars, vard) mmx_m2m(psrld, vars, vard)
377
378#define psrlw_i2r(imm, reg) mmx_i2r(psrlw, imm, reg)
379#define psrlw_m2r(var, reg) mmx_m2r(psrlw, var, reg)
380#define psrlw_r2r(regs, regd) mmx_r2r(psrlw, regs, regd)
381#define psrlw(vars, vard) mmx_m2m(psrlw, vars, vard)
382
383
384/* 2x32 and 4x16 Parallel Shift Right Arithmetic
385*/
386#define psrad_i2r(imm, reg) mmx_i2r(psrad, imm, reg)
387#define psrad_m2r(var, reg) mmx_m2r(psrad, var, reg)
388#define psrad_r2r(regs, regd) mmx_r2r(psrad, regs, regd)
389#define psrad(vars, vard) mmx_m2m(psrad, vars, vard)
390
391#define psraw_i2r(imm, reg) mmx_i2r(psraw, imm, reg)
392#define psraw_m2r(var, reg) mmx_m2r(psraw, var, reg)
393#define psraw_r2r(regs, regd) mmx_r2r(psraw, regs, regd)
394#define psraw(vars, vard) mmx_m2m(psraw, vars, vard)
395
396
397/* 2x32->4x16 and 4x16->8x8 PACK and Signed Saturate
398 (packs source and dest fields into dest in that order)
399*/
400#define packssdw_m2r(var, reg) mmx_m2r(packssdw, var, reg)
401#define packssdw_r2r(regs, regd) mmx_r2r(packssdw, regs, regd)
402#define packssdw(vars, vard) mmx_m2m(packssdw, vars, vard)
403
404#define packsswb_m2r(var, reg) mmx_m2r(packsswb, var, reg)
405#define packsswb_r2r(regs, regd) mmx_r2r(packsswb, regs, regd)
406#define packsswb(vars, vard) mmx_m2m(packsswb, vars, vard)
407
408
409/* 4x16->8x8 PACK and Unsigned Saturate
410 (packs source and dest fields into dest in that order)
411*/
412#define packuswb_m2r(var, reg) mmx_m2r(packuswb, var, reg)
413#define packuswb_r2r(regs, regd) mmx_r2r(packuswb, regs, regd)
414#define packuswb(vars, vard) mmx_m2m(packuswb, vars, vard)
415
416
417/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK Low
418 (interleaves low half of dest with low half of source
419 as padding in each result field)
420*/
421#define punpckldq_m2r(var, reg) mmx_m2r(punpckldq, var, reg)
422#define punpckldq_r2r(regs, regd) mmx_r2r(punpckldq, regs, regd)
423#define punpckldq(vars, vard) mmx_m2m(punpckldq, vars, vard)
424
425#define punpcklwd_m2r(var, reg) mmx_m2r(punpcklwd, var, reg)
426#define punpcklwd_r2r(regs, regd) mmx_r2r(punpcklwd, regs, regd)
427#define punpcklwd(vars, vard) mmx_m2m(punpcklwd, vars, vard)
428
429#define punpcklbw_m2r(var, reg) mmx_m2r(punpcklbw, var, reg)
430#define punpcklbw_r2r(regs, regd) mmx_r2r(punpcklbw, regs, regd)
431#define punpcklbw(vars, vard) mmx_m2m(punpcklbw, vars, vard)
432
433
434/* 2x32->1x64, 4x16->2x32, and 8x8->4x16 UNPaCK High
435 (interleaves high half of dest with high half of source
436 as padding in each result field)
437*/
438#define punpckhdq_m2r(var, reg) mmx_m2r(punpckhdq, var, reg)
439#define punpckhdq_r2r(regs, regd) mmx_r2r(punpckhdq, regs, regd)
440#define punpckhdq(vars, vard) mmx_m2m(punpckhdq, vars, vard)
441
442#define punpckhwd_m2r(var, reg) mmx_m2r(punpckhwd, var, reg)
443#define punpckhwd_r2r(regs, regd) mmx_r2r(punpckhwd, regs, regd)
444#define punpckhwd(vars, vard) mmx_m2m(punpckhwd, vars, vard)
445
446#define punpckhbw_m2r(var, reg) mmx_m2r(punpckhbw, var, reg)
447#define punpckhbw_r2r(regs, regd) mmx_r2r(punpckhbw, regs, regd)
448#define punpckhbw(vars, vard) mmx_m2m(punpckhbw, vars, vard)
449
450#define MOVE_8DWORDS_MMX(src,dst) \
451 __asm__ ( \
452 "movq (%1), %%mm0 \n" \
453 "movq 0x8(%1), %%mm1 \n" \
454 "movq 0x10(%1), %%mm2 \n" \
455 "movq 0x18(%1), %%mm3 \n" \
456 "movq %%mm0, (%0) \n" \
457 "movq %%mm1, 0x8(%0) \n" \
458 "movq %%mm2, 0x10(%0) \n" \
459 "movq %%mm3, 0x18(%0) \n" \
460 : \
461 : "q" (dst), "r" (src) \
462 : "memory", "st");
463
464#define MOVE_10DWORDS_MMX(src,dst) \
465 __asm__ ( \
466 "movq (%1), %%mm0 \n" \
467 "movq 0x8(%1), %%mm1 \n" \
468 "movq 0x10(%1), %%mm2 \n" \
469 "movq 0x18(%1), %%mm3 \n" \
470 "movq 0x20(%1), %%mm4 \n" \
471 "movq %%mm0, (%0) \n" \
472 "movq %%mm1, 0x8(%0) \n" \
473 "movq %%mm2, 0x10(%0) \n" \
474 "movq %%mm3, 0x18(%0) \n" \
475 "movq %%mm4, 0x20(%0) \n" \
476 : \
477 : "q" (dst), "r" (src) \
478 : "memory", "st");
479
480#define MOVE_16DWORDS_MMX(src,dst) \
481 __asm__ ( \
482 "movq (%1), %%mm0 \n" \
483 "movq 0x8(%1), %%mm1 \n" \
484 "movq 0x10(%1), %%mm2 \n" \
485 "movq 0x18(%1), %%mm3 \n" \
486 "movq 0x20(%1), %%mm4 \n" \
487 "movq 0x28(%1), %%mm5 \n" \
488 "movq 0x30(%1), %%mm6 \n" \
489 "movq 0x38(%1), %%mm7 \n" \
490 "movq %%mm0, (%0) \n" \
491 "movq %%mm1, 0x8(%0) \n" \
492 "movq %%mm2, 0x10(%0) \n" \
493 "movq %%mm3, 0x18(%0) \n" \
494 "movq %%mm4, 0x20(%0) \n" \
495 "movq %%mm5, 0x28(%0) \n" \
496 "movq %%mm6, 0x30(%0) \n" \
497 "movq %%mm7, 0x38(%0) \n" \
498 : \
499 : "q" (dst), "r" (src) \
500 : "memory", "st");
501
502#define MOVE_16DWORDS_MMX2(src,dst) \
503 __asm__ ( \
504 "movq (%1), %%mm0 \n" \
505 "movq 0x8(%1), %%mm1 \n" \
506 "movq 0x10(%1), %%mm2 \n" \
507 "movq 0x18(%1), %%mm3 \n" \
508 "movq 0x20(%1), %%mm4 \n" \
509 "movq 0x28(%1), %%mm5 \n" \
510 "movq 0x30(%1), %%mm6 \n" \
511 "movq 0x38(%1), %%mm7 \n" \
512 "movntq %%mm0, (%0) \n" \
513 "movntq %%mm1, 0x8(%0) \n" \
514 "movntq %%mm2, 0x10(%0) \n" \
515 "movntq %%mm3, 0x18(%0) \n" \
516 "movntq %%mm4, 0x20(%0) \n" \
517 "movntq %%mm5, 0x28(%0) \n" \
518 "movntq %%mm6, 0x30(%0) \n" \
519 "movntq %%mm7, 0x38(%0) \n" \
520 : \
521 : "q" (dst), "r" (src) \
522 : "memory", "st");
523
524#define MOVE_32DWORDS_SSE2(src,dst) \
525 __asm__ ( \
526 "movdqu (%1), %%xmm0 \n" \
527 "movdqu 0x10(%1), %%xmm1 \n" \
528 "movdqu 0x20(%1), %%xmm2 \n" \
529 "movdqu 0x30(%1), %%xmm3 \n" \
530 "movdqu 0x40(%1), %%xmm4 \n" \
531 "movdqu 0x50(%1), %%xmm5 \n" \
532 "movdqu 0x60(%1), %%xmm6 \n" \
533 "movdqu 0x70(%1), %%xmm7 \n" \
534 "movntdq %%xmm0, (%0) \n" \
535 "movntdq %%xmm1, 0x10(%0) \n" \
536 "movntdq %%xmm2, 0x20(%0) \n" \
537 "movntdq %%xmm3, 0x30(%0) \n" \
538 "movntdq %%xmm4, 0x40(%0) \n" \
539 "movntdq %%xmm5, 0x50(%0) \n" \
540 "movntdq %%xmm6, 0x60(%0) \n" \
541 "movntdq %%xmm7, 0x70(%0) \n" \
542 : \
543 : "q" (dst), "r" (src) \
544 : "memory", "st");
545
546#define MOVE_32DWORDS_ALIGNED_SSE2(src,dst) \
547 __asm__ ( \
548 "movdqa (%1), %%xmm0 \n" \
549 "movdqa 0x10(%1), %%xmm1 \n" \
550 "movdqa 0x20(%1), %%xmm2 \n" \
551 "movdqa 0x30(%1), %%xmm3 \n" \
552 "movdqa 0x40(%1), %%xmm4 \n" \
553 "movdqa 0x50(%1), %%xmm5 \n" \
554 "movdqa 0x60(%1), %%xmm6 \n" \
555 "movdqa 0x70(%1), %%xmm7 \n" \
556 "movntdq %%xmm0, (%0) \n" \
557 "movntdq %%xmm1, 0x10(%0) \n" \
558 "movntdq %%xmm2, 0x20(%0) \n" \
559 "movntdq %%xmm3, 0x30(%0) \n" \
560 "movntdq %%xmm4, 0x40(%0) \n" \
561 "movntdq %%xmm5, 0x50(%0) \n" \
562 "movntdq %%xmm6, 0x60(%0) \n" \
563 "movntdq %%xmm7, 0x70(%0) \n" \
564 : \
565 : "q" (dst), "r" (src) \
566 : "memory", "st");
567
568/* Empty MMx State
569 (used to clean-up when going from mmx to float use
570 of the registers that are shared by both; note that
571 there is no float-to-mmx operation needed, because
572 only the float tag word info is corruptible)
573*/
574
575#define emms() __asm__ __volatile__ ("emms":::"memory")
576#define sfence() __asm__ __volatile__ ("sfence":::"memory")
577
578/* additions to detect mmx - */
579/* Raster <raster@rasterman.com> */
580
581#define CPUID_MMX (1 << 23) /* flags: mmx */
582#define CPUID_SSE (1 << 25) /* flags: xmm */
583#define CPUID_SSE2 (1 << 26) /* flags: ? */
584
585/*
586#ifdef __amd64
587#define have_cpuid(cpuid_ret) \
588 __asm__ __volatile__ ( \
589 ".align 32 \n" \
590 " pushq %%rbx \n" \
591 " pushfq \n" \
592 " popq %%rax \n" \
593 " movq %%rax, %%rbx \n" \
594 " xorq $0x200000, %%rax \n" \
595 " pushq %%rax \n" \
596 " popfq \n" \
597 " pushfq \n" \
598 " popq %%rax \n" \
599 " cmpq %%rax, %%rbx \n" \
600 " je 1f \n" \
601 " movl $1, %0 \n" \
602 " jmp 2f \n" \
603 "1: \n" \
604 " movl $0, %0 \n" \
605 "2: \n" \
606 " popq %%rbx \n" \
607 : "=m" (cpuid_ret) \
608 );
609
610#define get_cpuid(cpuid_ret) \
611 __asm__ __volatile__ ( \
612 ".align 32 \n" \
613 " pushq %%rax \n" \
614 " movl $1, %%eax \n" \
615 " cpuid \n" \
616 " test $0x00800000, %%edx\n" \
617 "1: \n" \
618 " movl %%edx, %0 \n" \
619 " jmp 2f \n" \
620 "2: \n" \
621 " movl $0, %0 \n" \
622 " popq %%rax \n" \
623 : "=m" (cpuid_ret) \
624 );
625#else
626#define have_cpuid(cpuid_ret) \
627 __asm__ __volatile__ ( \
628 ".align 32 \n" \
629 " pushl %%ebx \n" \
630 " pushfl \n" \
631 " popl %%eax \n" \
632 " movl %%eax, %%ebx \n" \
633 " xorl $0x200000, %%eax \n" \
634 " pushl %%eax \n" \
635 " popfl \n" \
636 " pushfl \n" \
637 " popl %%eax \n" \
638 " cmpl %%eax, %%ebx \n" \
639 " je 1f \n" \
640 " movl $1, %0 \n" \
641 " jmp 2f \n" \
642 "1: \n" \
643 " movl $0, %0 \n" \
644 "2: \n" \
645 " popl %%ebx \n" \
646 : "=m" (cpuid_ret) \
647 );
648
649#define get_cpuid(cpuid_ret) \
650 __asm__ __volatile__ ( \
651 ".align 32 \n" \
652 " pushl %%eax \n" \
653 " movl $1, %%eax \n" \
654 " cpuid \n" \
655 " test $0x00800000, %%edx\n" \
656 "1: \n" \
657 " movl %%edx, %0 \n" \
658 " jmp 2f \n" \
659 "2: \n" \
660 " movl $0, %0 \n" \
661 " popl %%eax \n" \
662 : "=m" (cpuid_ret) \
663 );
664#endif
665 */
666
667#define prefetch(var) \
668 __asm__ __volatile__ ( \
669 "prefetchnta (%0) \n" \
670 : \
671 : "r" (var) \
672 );
673#define prefetch0(var) \
674 __asm__ __volatile__ ( \
675 "prefetcht0 (%0) \n" \
676 : \
677 : "r" (var) \
678 );
679#define prefetch1(var) \
680 __asm__ __volatile__ ( \
681 "prefetcht1 (%0) \n" \
682 : \
683 : "r" (var) \
684 );
685#define prefetch2(var) \
686 __asm__ __volatile__ ( \
687 "prefetcht2 (%0) \n" \
688 : \
689 : "r" (var) \
690 );
691#define pshufw(r1, r2, imm) \
692 __asm__ __volatile__ ( \
693 "pshufw $" #imm ", %" #r1 ", %" #r2 " \n" \
694 );
695
696#define pshufhw(r1, r2, imm) \
697 __asm__ __volatile__ ( \
698 "pshufhw $" #imm ", %" #r1 ", %" #r2 " \n" \
699 );
700
701#define pshuflw(r1, r2, imm) \
702 __asm__ __volatile__ ( \
703 "pshuflw $" #imm ", %" #r1 ", %" #r2 " \n" \
704 );
705#define pshufd(r1, r2, imm) \
706 __asm__ __volatile__ ( \
707 "pshufd $" #imm ", %" #r1 ", %" #r2 " \n" \
708 );
709
710/* 1x238 MOVE Doouble Quadword
711 (this is both a load and a store...
712 in fact, it is the only way to store)
713*/
714#define movdqu_m2r(var, reg) mmx_m2r(movdqu, var, reg)
715#define movdqu_r2m(reg, var) mmx_r2m(movdqu, reg, var)
716#define movdqu_r2r(regs, regd) mmx_r2r(movdqu, regs, regd)
717#define movdqu(vars, vard) \
718 __asm__ __volatile__ ("movdqu %1, %%xmm0\n\t" \
719 "movdqu %%xmm0, %0" \
720 : "=X" (vard) \
721 : "X" (vars))
722#define movdqa_m2r(var, reg) mmx_m2r(movdqa, var, reg)
723#define movdqa_r2m(reg, var) mmx_r2m(movdqa, reg, var)
724#define movdqa_r2r(regs, regd) mmx_r2r(movdqa, regs, regd)
725#define movdqa(vars, vard) \
726 __asm__ __volatile__ ("movdqa %1, %%xmm0\n\t" \
727 "movdqa %%xmm0, %0" \
728 : "=X" (vard) \
729 : "X" (vars))
730#define movntdq_r2m(reg, var) mmx_r2m(movntdq, reg, var)
731
732
733/* end additions */
734
735#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 @@
1#ifndef EVAS_OPTIONS_H
2#define EVAS_OPTIONS_H 1
3
4/* these may vary per OS */
5
6/* what to build *//* small dither table is MUCH faster on ipaq */
7/*#define BUILD_SMALL_DITHER_MASK*/
8
9/*#define HARD_CODED_P3*/
10/*#define HARD_CODED_P2*/
11
12/*#define BUILD_CONVERT_1_GRY_1*/
13/*#define BUILD_CONVERT_4_GRY_1*/
14/*#define BUILD_CONVERT_4_GRY_4*/
15/*#define BUILD_CONVERT_8_GRY_1*/
16/*#define BUILD_CONVERT_8_GRY_4*/
17/*#define BUILD_CONVERT_8_GRY_16*/
18/*#define BUILD_CONVERT_8_GRY_64*/
19/*#define BUILD_CONVERT_8_GRY_256*/
20/*#define BUILD_CONVERT_8_RGB_332*/
21/*#define BUILD_CONVERT_8_RGB_666*/
22/*#define BUILD_CONVERT_8_RGB_232*/
23/*#define BUILD_CONVERT_8_RGB_222*/
24/*#define BUILD_CONVERT_8_RGB_221*/
25/*#define BUILD_CONVERT_8_RGB_121*/
26/*#define BUILD_CONVERT_8_RGB_111*/
27/*#define BUILD_CONVERT_16_RGB_565*/
28/*#define BUILD_CONVERT_16_RGB_555*/
29/*#define BUILD_CONVERT_16_RGB_444*/
30/*#define BUILD_CONVERT_16_RGB_454645*/
31/*#define BUILD_CONVERT_16_RGB_ROT0*/
32/*#define BUILD_CONVERT_16_RGB_ROT270*/
33/*#define BUILD_CONVERT_24_RGB_888*/
34/*#define BUILD_CONVERT_24_BGR_888*/
35/*#define BUILD_CONVERT_32_RGB_8888*/
36/*#define BUILD_CONVERT_32_BGR_8888*/
37/*#define BUILD_CONVERT_32_RGB_ROT0*/
38/*#define BUILD_CONVERT_32_RGB_ROT270*/
39
40/*#define BUILD_SCALE_SAMPLE*/
41/*#define BUILD_SCALE_SMOOTH*/
42/*#define BUILD_SCALE_TRILINEAR*/
43
44/*#define BUILD_MMX*/
45/*#define BUILD_SSE*/
46/*#define BUILD_SSE3*/
47/*#define BUILD_C*/
48
49/*#define BUILD_LOADER_PNG*/
50/*#define BUILD_LOADER_JPEG*/
51/*#define BUILD_LOADER_EET*/
52/*#define BUILD_LOADER_EDB*/
53
54/*#define BUILD_FMEMOPEN*/
55
56/* check in that the user configured it right */
57#ifndef BUILD_MMX
58# ifndef BUILD_SSE3
59# ifndef BUILD_SSE
60# ifndef BUILD_C
61# error "Please Read the README"
62 #endif
63# endif
64# endif
65#endif
66
67#define DIRECT_SCALE
68
69#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 @@
1#ifndef EVAS_PRIVATE_H
2#define EVAS_PRIVATE_H
3
4#ifdef HAVE_CONFIG_H
5# include <config.h>
6#endif
7
8#include <Eina.h>
9#include <eina_safety_checks.h>
10#include "Evas.h"
11
12#include "../file/evas_module.h"
13#include "../file/evas_path.h"
14#include "../engines/common/evas_text_utils.h"
15#include "../engines/common/language/evas_bidi_utils.h"
16#include "../engines/common/language/evas_language_utils.h"
17
18#ifdef EVAS_MAGIC_DEBUG
19/* complain when peole pass in wrong object types etc. */
20# define MAGIC_DEBUG
21#endif
22
23#define RENDER_METHOD_INVALID 0x00000000
24
25typedef struct _Evas_Layer Evas_Layer;
26typedef struct _Evas_Size Evas_Size;
27typedef struct _Evas_Aspect Evas_Aspect;
28typedef struct _Evas_Border Evas_Border;
29typedef struct _Evas_Double_Pair Evas_Double_Pair;
30typedef struct _Evas_Size_Hints Evas_Size_Hints;
31typedef struct _Evas_Font_Dir Evas_Font_Dir;
32typedef struct _Evas_Font Evas_Font;
33typedef struct _Evas_Font_Alias Evas_Font_Alias;
34typedef struct _Evas_Font_Description Evas_Font_Description;
35typedef struct _Evas_Data_Node Evas_Data_Node;
36typedef struct _Evas_Func_Node Evas_Func_Node;
37typedef RGBA_Image_Loadopts Evas_Image_Load_Opts;
38typedef struct _Evas_Func Evas_Func;
39typedef struct _Evas_Image_Load_Func Evas_Image_Load_Func;
40typedef struct _Evas_Image_Save_Func Evas_Image_Save_Func;
41typedef struct _Evas_Object_Func Evas_Object_Func;
42typedef struct _Evas_Intercept_Func Evas_Intercept_Func;
43typedef struct _Evas_Key_Grab Evas_Key_Grab;
44typedef struct _Evas_Callbacks Evas_Callbacks;
45typedef struct _Evas_Format Evas_Format;
46typedef struct _Evas_Map_Point Evas_Map_Point;
47typedef struct _Evas_Smart_Cb_Description_Array Evas_Smart_Cb_Description_Array;
48typedef struct _Evas_Post_Callback Evas_Post_Callback;
49typedef struct _Evas_Coord_Touch_Point Evas_Coord_Touch_Point;
50
51enum _Evas_Font_Style
52{
53 EVAS_FONT_STYLE_SLANT,
54 EVAS_FONT_STYLE_WEIGHT,
55 EVAS_FONT_STYLE_WIDTH
56};
57
58enum _Evas_Font_Slant
59{
60 EVAS_FONT_SLANT_NORMAL,
61 EVAS_FONT_SLANT_OBLIQUE,
62 EVAS_FONT_SLANT_ITALIC
63};
64
65enum _Evas_Font_Weight
66{
67 EVAS_FONT_WEIGHT_NORMAL,
68 EVAS_FONT_WEIGHT_THIN,
69 EVAS_FONT_WEIGHT_ULTRALIGHT,
70 EVAS_FONT_WEIGHT_LIGHT,
71 EVAS_FONT_WEIGHT_BOOK,
72 EVAS_FONT_WEIGHT_MEDIUM,
73 EVAS_FONT_WEIGHT_SEMIBOLD,
74 EVAS_FONT_WEIGHT_BOLD,
75 EVAS_FONT_WEIGHT_ULTRABOLD,
76 EVAS_FONT_WEIGHT_BLACK,
77 EVAS_FONT_WEIGHT_EXTRABLACK
78};
79
80enum _Evas_Font_Width
81{
82 EVAS_FONT_WIDTH_NORMAL,
83 EVAS_FONT_WIDTH_ULTRACONDENSED,
84 EVAS_FONT_WIDTH_EXTRACONDENSED,
85 EVAS_FONT_WIDTH_CONDENSED,
86 EVAS_FONT_WIDTH_SEMICONDENSED,
87 EVAS_FONT_WIDTH_SEMIEXPANDED,
88 EVAS_FONT_WIDTH_EXPANDED,
89 EVAS_FONT_WIDTH_EXTRAEXPANDED,
90 EVAS_FONT_WIDTH_ULTRAEXPANDED
91};
92
93typedef enum _Evas_Font_Style Evas_Font_Style;
94typedef enum _Evas_Font_Slant Evas_Font_Slant;
95typedef enum _Evas_Font_Weight Evas_Font_Weight;
96typedef enum _Evas_Font_Width Evas_Font_Width;
97
98/* General types - used for script type chceking */
99#define OPAQUE_TYPE(type) struct __##type { int a; }; \
100 typedef struct __##type type
101
102OPAQUE_TYPE(Evas_Font_Set); /* General type for RGBA_Font */
103OPAQUE_TYPE(Evas_Font_Instance); /* General type for RGBA_Font_Int */
104/* End of general types */
105
106#define MAGIC_EVAS 0x70777770
107#define MAGIC_OBJ 0x71777770
108#define MAGIC_OBJ_RECTANGLE 0x71777771
109#define MAGIC_OBJ_LINE 0x71777772
110#define MAGIC_OBJ_POLYGON 0x71777774
111#define MAGIC_OBJ_IMAGE 0x71777775
112#define MAGIC_OBJ_TEXT 0x71777776
113#define MAGIC_OBJ_SMART 0x71777777
114#define MAGIC_OBJ_TEXTBLOCK 0x71777778
115#define MAGIC_SMART 0x72777770
116#define MAGIC_OBJ_SHAPE 0x72777773
117#define MAGIC_OBJ_CONTAINER 0x72777774
118#define MAGIC_OBJ_CUSTOM 0x72777775
119#define MAGIC_EVAS_GL 0x72777776
120#define MAGIC_MAP 0x72777777
121
122#ifdef MAGIC_DEBUG
123# define MAGIC_CHECK_FAILED(o, t, m) \
124{evas_debug_error(); \
125 if (!o) evas_debug_input_null(); \
126 else if (((t *)o)->magic == 0) evas_debug_magic_null(); \
127 else evas_debug_magic_wrong((m), ((t *)o)->magic); \
128}
129# define MAGIC_CHECK(o, t, m) \
130{if ((!o) || (!(((t *)o)->magic == (m)))) { \
131MAGIC_CHECK_FAILED(o, t, m)
132# define MAGIC_CHECK_END() }}
133#else
134# define MAGIC_CHECK_FAILED(o, t, m)
135# define MAGIC_CHECK(o, t, m) { if (!o) {
136# define MAGIC_CHECK_END() }}
137#endif
138
139#define NEW_RECT(_r, _x, _y, _w, _h) (_r) = eina_rectangle_new(_x, _y, _w, _h);
140
141#define MERR_NONE() _evas_alloc_error = EVAS_ALLOC_ERROR_NONE
142#define MERR_FATAL() _evas_alloc_error = EVAS_ALLOC_ERROR_FATAL
143#define MERR_BAD() _evas_alloc_error = EVAS_ALLOC_ERROR_RECOVERED
144
145#define EVAS_OBJECT_IMAGE_FREE_FILE_AND_KEY(o) \
146 if ((o)->cur.file) \
147 { \
148 eina_stringshare_del((o)->cur.file); \
149 if ((o)->prev.file == (o)->cur.file) \
150 (o)->prev.file = NULL; \
151 (o)->cur.file = NULL; \
152 } \
153 if ((o)->cur.key) \
154 { \
155 eina_stringshare_del((o)->cur.key); \
156 if ((o)->prev.key == (o)->cur.key) \
157 (o)->prev.key = NULL; \
158 (o)->cur.key = NULL; \
159 } \
160 if ((o)->prev.file) \
161 { \
162 eina_stringshare_del((o)->prev.file); \
163 (o)->prev.file = NULL; \
164 } \
165 if ((o)->prev.key) \
166 { \
167 eina_stringshare_del((o)->prev.key); \
168 (o)->prev.key = NULL; \
169 }
170
171struct _Evas_Coord_Touch_Point
172{
173 Evas_Coord x, y; // point's x, y position
174 int id; // id in order to distinguish each point
175 Evas_Touch_Point_State state;
176};
177
178struct _Evas_Key_Grab
179{
180 char *keyname;
181 Evas_Modifier_Mask modifiers;
182 Evas_Modifier_Mask not_modifiers;
183 Evas_Object *object;
184 Eina_Bool exclusive : 1;
185 Eina_Bool just_added : 1;
186 Eina_Bool delete_me : 1;
187};
188
189struct _Evas_Intercept_Func
190{
191 struct {
192 Evas_Object_Intercept_Show_Cb func;
193 void *data;
194 } show;
195 struct {
196 Evas_Object_Intercept_Hide_Cb func;
197 void *data;
198 } hide;
199 struct {
200 Evas_Object_Intercept_Move_Cb func;
201 void *data;
202 } move;
203 struct {
204 Evas_Object_Intercept_Resize_Cb func;
205 void *data;
206 } resize;
207 struct {
208 Evas_Object_Intercept_Raise_Cb func;
209 void *data;
210 } raise;
211 struct {
212 Evas_Object_Intercept_Lower_Cb func;
213 void *data;
214 } lower;
215 struct {
216 Evas_Object_Intercept_Stack_Above_Cb func;
217 void *data;
218 } stack_above;
219 struct {
220 Evas_Object_Intercept_Stack_Below_Cb func;
221 void *data;
222 } stack_below;
223 struct {
224 Evas_Object_Intercept_Layer_Set_Cb func;
225 void *data;
226 } layer_set;
227 struct {
228 Evas_Object_Intercept_Color_Set_Cb func;
229 void *data;
230 } color_set;
231 struct {
232 Evas_Object_Intercept_Clip_Set_Cb func;
233 void *data;
234 } clip_set;
235 struct {
236 Evas_Object_Intercept_Clip_Unset_Cb func;
237 void *data;
238 } clip_unset;
239};
240
241struct _Evas_Smart_Cb_Description_Array
242{
243 unsigned int size;
244 const Evas_Smart_Cb_Description **array;
245};
246
247struct _Evas_Smart
248{
249 DATA32 magic;
250
251 int usage;
252
253 const Evas_Smart_Class *smart_class;
254
255 Evas_Smart_Cb_Description_Array callbacks;
256
257 unsigned char delete_me : 1;
258 unsigned char class_allocated : 1;
259
260};
261
262struct _Evas_Modifier
263{
264 struct {
265 int count;
266 char **list;
267 } mod;
268 Evas_Modifier_Mask mask; /* ok we have a max of 64 modifiers */
269};
270
271struct _Evas_Lock
272{
273 struct {
274 int count;
275 char **list;
276 } lock;
277 Evas_Modifier_Mask mask; /* we have a max of 64 locks */
278};
279
280struct _Evas_Post_Callback
281{
282 Evas_Object *obj;
283 Evas_Object_Event_Post_Cb func;
284 const void *data;
285 unsigned char delete_me : 1;
286};
287
288struct _Evas_Callbacks
289{
290 Eina_Inlist *callbacks;
291 int walking_list;
292 unsigned char deletions_waiting : 1;
293};
294
295struct _Evas
296{
297 EINA_INLIST;
298
299 DATA32 magic;
300
301 struct {
302 unsigned char inside : 1;
303 int mouse_grabbed;
304 int downs;
305 DATA32 button;
306 Evas_Coord x, y;
307 int nogrep;
308 struct {
309 Eina_List *in;
310 } object;
311 } pointer;
312
313 struct {
314 Evas_Coord x, y, w, h;
315 unsigned char changed : 1;
316 } viewport;
317
318 struct {
319 int w, h;
320 DATA32 render_method;
321 unsigned char changed : 1;
322 } output;
323
324 struct
325 {
326 Evas_Coord x, y, w, h;
327 Eina_Bool changed : 1;
328 } framespace;
329
330 Eina_List *damages;
331 Eina_List *obscures;
332
333 Evas_Layer *layers;
334
335 Eina_Hash *name_hash;
336
337 int output_validity;
338
339 int walking_list;
340 int events_frozen;
341 Evas_Event_Flags default_event_flags;
342
343 struct {
344 Evas_Module *module;
345 Evas_Func *func;
346 struct {
347 void *output;
348
349 void *context;
350 } data;
351
352 void *info;
353 int info_magic;
354 } engine;
355
356 Eina_Array delete_objects;
357 Eina_Array active_objects;
358 Eina_Array restack_objects;
359 Eina_Array render_objects;
360 Eina_Array pending_objects;
361 Eina_Array obscuring_objects;
362 Eina_Array temporary_objects;
363 Eina_Array calculate_objects;
364 Eina_Array clip_changes;
365
366 Eina_Clist calc_list;
367 Eina_Clist calc_done;
368 Eina_List *video_objects;
369
370 Eina_List *post_events; // free me on evas_free
371
372 Evas_Callbacks *callbacks;
373
374 int delete_grabs;
375 int walking_grabs;
376 Eina_List *grabs;
377
378 Eina_List *font_path;
379
380 int in_smart_calc;
381 int smart_calc_count;
382
383 Evas_Object *focused;
384 void *attach_data;
385 Evas_Modifier modifiers;
386 Evas_Lock locks;
387 unsigned int last_timestamp;
388 int last_mouse_down_counter;
389 int last_mouse_up_counter;
390 int nochange;
391 Evas_Font_Hinting_Flags hinting;
392 unsigned char changed : 1;
393 unsigned char delete_me : 1;
394 unsigned char invalidate : 1;
395 unsigned char cleanup : 1;
396 unsigned char focus : 1;
397
398 Eina_List *touch_points;
399};
400
401struct _Evas_Layer
402{
403 EINA_INLIST;
404
405 short layer;
406 Evas_Object *objects;
407
408 Evas *evas;
409
410 void *engine_data;
411 int usage;
412 unsigned char delete_me : 1;
413};
414
415struct _Evas_Size
416{
417 Evas_Coord w, h;
418};
419
420struct _Evas_Aspect
421{
422 Evas_Aspect_Control mode;
423 Evas_Size size;
424};
425
426struct _Evas_Border
427{
428 Evas_Coord l, r, t, b;
429};
430
431struct _Evas_Double_Pair
432{
433 double x, y;
434};
435
436struct _Evas_Size_Hints
437{
438 Evas_Size min, max, request;
439 Evas_Aspect aspect;
440 Evas_Double_Pair align, weight;
441 Evas_Border padding;
442};
443
444struct _Evas_Map_Point
445{
446 double x, y, z, px, py;
447 double u, v;
448 unsigned char r, g, b, a;
449};
450
451struct _Evas_Map
452{
453 DATA32 magic;
454 int count; // num of points
455 Evas_Coord_Rectangle normal_geometry; // bounding box of map geom actually
456 void *surface; // surface holding map if needed
457 int surface_w, surface_h; // current surface w & h alloc
458 Evas_Coord mx, my; // mouse x, y after conversion to map space
459 struct {
460 Evas_Coord px, py, z0, foc;
461 } persp;
462 Eina_Bool alpha : 1;
463 Eina_Bool smooth : 1;
464 Evas_Map_Point points[]; // actual points
465};
466
467#if 0 // filtering disabled
468/* nash: Split into two bits */
469typedef struct Evas_Filter_Info
470{
471 Evas_Filter filter;
472 Evas_Filter_Mode mode;
473
474 Eina_Bool dirty : 1;
475
476 int datalen;
477 void *data;
478 void (*data_free)(void *);
479
480 uint8_t *key;
481 uint32_t len;
482 Filtered_Image *cached;
483} Evas_Filter_Info;
484
485typedef Eina_Bool (*Evas_Software_Filter_Fn)(Evas_Filter_Info *, RGBA_Image *, RGBA_Image *);
486
487int evas_filter_get_size(Evas_Filter_Info *info, int inw, int inh,
488 int *outw, int *outh, Eina_Bool inv);
489Eina_Bool evas_filter_always_alpha(Evas_Filter_Info *info);
490uint8_t *evas_filter_key_get(const Evas_Filter_Info *info, uint32_t *lenp);
491// expose for use in engines
492EAPI Evas_Software_Filter_Fn evas_filter_software_get(Evas_Filter_Info *info);
493void evas_filter_free(Evas_Object *o);
494#endif
495
496struct _Evas_Object
497{
498 EINA_INLIST;
499
500 DATA32 magic;
501
502 const char *type;
503 Evas_Layer *layer;
504
505 struct {
506 Evas_Map *map;
507 Evas_Object *clipper;
508 Evas_Object *mask;
509 Evas_Object *map_parent;
510 double scale;
511 Evas_Coord_Rectangle geometry;
512 struct {
513 struct {
514 Evas_Coord x, y, w, h;
515 unsigned char r, g, b, a;
516 Eina_Bool visible : 1;
517 Eina_Bool dirty : 1;
518 } clip;
519 } cache;
520 short layer;
521 struct {
522 unsigned char r, g, b, a;
523 } color;
524 Eina_Bool usemap : 1;
525 Eina_Bool visible : 1;
526 Eina_Bool have_clipees : 1;
527 Eina_Bool anti_alias : 1;
528 Evas_Render_Op render_op : 4;
529 } cur, prev;
530
531 char *name;
532
533 Evas_Intercept_Func *interceptors;
534
535 struct {
536 Eina_List *elements;
537 } data;
538
539 Eina_List *grabs;
540
541 Evas_Callbacks *callbacks;
542
543 struct {
544 Eina_List *clipees;
545 Eina_List *changes;
546 } clip;
547
548 const Evas_Object_Func *func;
549
550 void *object_data;
551
552 struct {
553 Evas_Smart *smart;
554 Evas_Object *parent;
555 } smart;
556
557 struct {
558 Eina_List *proxies;
559 void *surface;
560 int w,h;
561 Eina_Bool redraw;
562 } proxy;
563
564#if 0 // filtering disabled
565 Evas_Filter_Info *filter;
566#endif
567
568 Evas_Size_Hints *size_hints;
569
570 int last_mouse_down_counter;
571 int last_mouse_up_counter;
572 int mouse_grabbed;
573
574 int last_event;
575 Evas_Callback_Type last_event_type;
576
577 struct {
578 int in_move, in_resize;
579 } doing;
580
581 unsigned int ref;
582
583 unsigned char delete_me;
584
585 unsigned char recalculate_cycle;
586 Eina_Clist calc_entry;
587
588 Evas_Object_Pointer_Mode pointer_mode : 2;
589
590 Eina_Bool store : 1;
591 Eina_Bool pass_events : 1;
592 Eina_Bool freeze_events : 1;
593 Eina_Bool repeat_events : 1;
594 struct {
595 Eina_Bool pass_events : 1;
596 Eina_Bool pass_events_valid : 1;
597 Eina_Bool freeze_events : 1;
598 Eina_Bool freeze_events_valid : 1;
599 } parent_cache;
600 Eina_Bool restack : 1;
601 Eina_Bool is_active : 1;
602 Eina_Bool precise_is_inside : 1;
603 Eina_Bool is_static_clip : 1;
604
605 Eina_Bool render_pre : 1;
606 Eina_Bool rect_del : 1;
607 Eina_Bool mouse_in : 1;
608 Eina_Bool pre_render_done : 1;
609 Eina_Bool intercepted : 1;
610 Eina_Bool focused : 1;
611 Eina_Bool in_layer : 1;
612 Eina_Bool no_propagate : 1;
613
614 Eina_Bool changed : 1;
615 Eina_Bool changed_move : 1;
616 Eina_Bool changed_move_only : 1;
617 Eina_Bool changed_nomove : 1;
618 Eina_Bool changed_map : 1;
619 Eina_Bool changed_pchange : 1;
620 Eina_Bool del_ref : 1;
621
622 Eina_Bool is_frame : 1;
623};
624
625struct _Evas_Func_Node
626{
627 EINA_INLIST;
628 void (*func) ();
629 void *data;
630 Evas_Callback_Type type;
631 Evas_Callback_Priority priority;
632 unsigned char delete_me : 1;
633};
634
635struct _Evas_Data_Node
636{
637 char *key;
638 void *data;
639};
640
641struct _Evas_Font_Dir
642{
643 Eina_Hash *lookup;
644 Eina_List *fonts;
645 Eina_List *aliases;
646 DATA64 dir_mod_time;
647 DATA64 fonts_dir_mod_time;
648 DATA64 fonts_alias_mod_time;
649};
650
651struct _Evas_Font
652{
653 struct {
654 const char *prop[14];
655 } x;
656 struct {
657 const char *name;
658 } simple;
659 const char *path;
660 char type;
661};
662
663struct _Evas_Font_Alias
664{
665 const char *alias;
666 Evas_Font *fn;
667};
668
669struct _Evas_Font_Description
670{
671 int ref;
672 /* We assume everywhere this is stringshared */
673 const char *name;
674 const char *fallbacks;
675 const char *lang;
676
677 Evas_Font_Slant slant;
678 Evas_Font_Weight weight;
679 Evas_Font_Width width;
680
681 Eina_Bool is_new : 1;
682};
683
684struct _Evas_Object_Func
685{
686 void (*free) (Evas_Object *obj);
687 void (*render) (Evas_Object *obj, void *output, void *context, void *surface, int x, int y);
688 void (*render_pre) (Evas_Object *obj);
689 void (*render_post) (Evas_Object *obj);
690
691 unsigned int (*type_id_get) (Evas_Object *obj);
692 unsigned int (*visual_id_get) (Evas_Object *obj);
693 void *(*engine_data_get) (Evas_Object *obj);
694
695 void (*store) (Evas_Object *obj);
696 void (*unstore) (Evas_Object *obj);
697
698 int (*is_visible) (Evas_Object *obj);
699 int (*was_visible) (Evas_Object *obj);
700
701 int (*is_opaque) (Evas_Object *obj);
702 int (*was_opaque) (Evas_Object *obj);
703
704 int (*is_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
705 int (*was_inside) (Evas_Object *obj, Evas_Coord x, Evas_Coord y);
706
707 void (*coords_recalc) (Evas_Object *obj);
708
709 void (*scale_update) (Evas_Object *obj);
710
711 int (*has_opaque_rect) (Evas_Object *obj);
712 int (*get_opaque_rect) (Evas_Object *obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
713
714 int (*can_map) (Evas_Object *obj);
715};
716
717struct _Evas_Func
718{
719 void *(*info) (Evas *e);
720 void (*info_free) (Evas *e, void *info);
721 int (*setup) (Evas *e, void *info);
722
723 void (*output_free) (void *data);
724 void (*output_resize) (void *data, int w, int h);
725 void (*output_tile_size_set) (void *data, int w, int h);
726 void (*output_redraws_rect_add) (void *data, int x, int y, int w, int h);
727 void (*output_redraws_rect_del) (void *data, int x, int y, int w, int h);
728 void (*output_redraws_clear) (void *data);
729 void *(*output_redraws_next_update_get) (void *data, int *x, int *y, int *w, int *h, int *cx, int *cy, int *cw, int *ch);
730 void (*output_redraws_next_update_push) (void *data, void *surface, int x, int y, int w, int h);
731 void (*output_flush) (void *data);
732 void (*output_idle_flush) (void *data);
733 void (*output_dump) (void *data);
734
735 void *(*context_new) (void *data);
736 Eina_Bool (*canvas_alpha_get) (void *data, void *context);
737 void (*context_free) (void *data, void *context);
738 void (*context_clip_set) (void *data, void *context, int x, int y, int w, int h);
739 void (*context_clip_clip) (void *data, void *context, int x, int y, int w, int h);
740 void (*context_clip_unset) (void *data, void *context);
741 int (*context_clip_get) (void *data, void *context, int *x, int *y, int *w, int *h);
742 void (*context_mask_set) (void *data, void *context, void *mask, int x, int y, int w, int h);
743 void (*context_mask_unset) (void *data, void *context);
744 void (*context_color_set) (void *data, void *context, int r, int g, int b, int a);
745 int (*context_color_get) (void *data, void *context, int *r, int *g, int *b, int *a);
746 void (*context_multiplier_set) (void *data, void *context, int r, int g, int b, int a);
747 void (*context_multiplier_unset) (void *data, void *context);
748 int (*context_multiplier_get) (void *data, void *context, int *r, int *g, int *b, int *a);
749 void (*context_cutout_add) (void *data, void *context, int x, int y, int w, int h);
750 void (*context_cutout_clear) (void *data, void *context);
751 void (*context_anti_alias_set) (void *data, void *context, unsigned char aa);
752 unsigned char (*context_anti_alias_get) (void *data, void *context);
753 void (*context_color_interpolation_set) (void *data, void *context, int color_space);
754 int (*context_color_interpolation_get) (void *data, void *context);
755 void (*context_render_op_set) (void *data, void *context, int render_op);
756 int (*context_render_op_get) (void *data, void *context);
757
758 void (*rectangle_draw) (void *data, void *context, void *surface, int x, int y, int w, int h);
759
760 void (*line_draw) (void *data, void *context, void *surface, int x1, int y1, int x2, int y2);
761
762 void *(*polygon_point_add) (void *data, void *context, void *polygon, int x, int y);
763 void *(*polygon_points_clear) (void *data, void *context, void *polygon);
764 void (*polygon_draw) (void *data, void *context, void *surface, void *polygon, int x, int y);
765
766 void *(*image_load) (void *data, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo);
767 void *(*image_new_from_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
768 void *(*image_new_from_copied_data) (void *data, int w, int h, DATA32 *image_data, int alpha, int cspace);
769 void (*image_free) (void *data, void *image);
770 void (*image_size_get) (void *data, void *image, int *w, int *h);
771 void *(*image_size_set) (void *data, void *image, int w, int h);
772 void (*image_stride_get) (void *data, void *image, int *stride);
773 void *(*image_dirty_region) (void *data, void *image, int x, int y, int w, int h);
774 void *(*image_data_get) (void *data, void *image, int to_write, DATA32 **image_data, int *err);
775 void *(*image_data_put) (void *data, void *image, DATA32 *image_data);
776 void (*image_data_preload_request) (void *data, void *image, const void *target);
777 void (*image_data_preload_cancel) (void *data, void *image, const void *target);
778 void *(*image_alpha_set) (void *data, void *image, int has_alpha);
779 int (*image_alpha_get) (void *data, void *image);
780 void *(*image_border_set) (void *data, void *image, int l, int r, int t, int b);
781 void (*image_border_get) (void *data, void *image, int *l, int *r, int *t, int *b);
782 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);
783 char *(*image_comment_get) (void *data, void *image, char *key);
784 char *(*image_format_get) (void *data, void *image);
785 void (*image_colorspace_set) (void *data, void *image, int cspace);
786 int (*image_colorspace_get) (void *data, void *image);
787 Eina_Bool (*image_can_region_get) (void *data, void *image);
788 void (*image_mask_create) (void *data, void *image);
789 void *(*image_native_set) (void *data, void *image, void *native);
790 void *(*image_native_get) (void *data, void *image);
791
792 void (*image_cache_flush) (void *data);
793 void (*image_cache_set) (void *data, int bytes);
794 int (*image_cache_get) (void *data);
795
796 Evas_Font_Set *(*font_load) (void *data, const char *name, int size, Font_Rend_Flags wanted_rend);
797 Evas_Font_Set *(*font_memory_load) (void *data, char *name, int size, const void *fdata, int fdata_size, Font_Rend_Flags wanted_rend);
798 Evas_Font_Set *(*font_add) (void *data, Evas_Font_Set *font, const char *name, int size, Font_Rend_Flags wanted_rend);
799 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);
800 void (*font_free) (void *data, Evas_Font_Set *font);
801 int (*font_ascent_get) (void *data, Evas_Font_Set *font);
802 int (*font_descent_get) (void *data, Evas_Font_Set *font);
803 int (*font_max_ascent_get) (void *data, Evas_Font_Set *font);
804 int (*font_max_descent_get) (void *data, Evas_Font_Set *font);
805 void (*font_string_size_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int *w, int *h);
806 int (*font_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
807 int (*font_h_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
808 int (*font_v_advance_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props);
809 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);
810 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);
811 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);
812
813 void (*font_cache_flush) (void *data);
814 void (*font_cache_set) (void *data, int bytes);
815 int (*font_cache_get) (void *data);
816
817 /* Engine functions will over time expand from here */
818
819 void (*font_hinting_set) (void *data, Evas_Font_Set *font, int hinting);
820 int (*font_hinting_can_hint) (void *data, int hinting);
821
822/* void (*image_rotation_set) (void *data, void *image); */
823
824 void (*image_scale_hint_set) (void *data, void *image, int hint);
825 int (*image_scale_hint_get) (void *data, void *image);
826 int (*font_last_up_to_pos) (void *data, Evas_Font_Set *font, const Evas_Text_Props *intl_props, int x, int y);
827
828 void (*image_map_draw) (void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level);
829 void *(*image_map_surface_new) (void *data, int w, int h, int alpha);
830 void (*image_map_surface_free) (void *data, void *surface);
831
832 void (*image_content_hint_set) (void *data, void *surface, int hint);
833 int (*image_content_hint_get) (void *data, void *surface);
834 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);
835 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);
836 int (*font_right_inset_get) (void *data, Evas_Font_Set *font, const Evas_Text_Props *text_props);
837
838#if 0 // filtering disabled
839 void (*image_draw_filtered) (void *data, void *context, void *surface, void *image, Evas_Filter_Info *filter);
840 Filtered_Image *(*image_filtered_get) (void *image, uint8_t *key, size_t len);
841 Filtered_Image *(*image_filtered_save) (void *image, void *filtered, uint8_t *key, size_t len);
842 void (*image_filtered_free) (void *image, Filtered_Image *);
843#endif
844
845 /* EFL-GL Glue Layer */
846 void *(*gl_surface_create) (void *data, void *config, int w, int h);
847 int (*gl_surface_destroy) (void *data, void *surface);
848 void *(*gl_context_create) (void *data, void *share_context);
849 int (*gl_context_destroy) (void *data, void *context);
850 int (*gl_make_current) (void *data, void *surface, void *context);
851 void *(*gl_string_query) (void *data, int name);
852 void *(*gl_proc_address_get) (void *data, const char *name);
853 int (*gl_native_surface_get) (void *data, void *surface, void *native_surface);
854 void *(*gl_api_get) (void *data);
855 void (*gl_img_obj_set) (void *data, void *image, int has_alpha);
856
857 int (*image_load_error_get) (void *data, void *image);
858 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);
859
860 /* animated feature */
861 Eina_Bool (*image_animated_get) (void *data, void *image);
862 int (*image_animated_frame_count_get) (void *data, void *image);
863 Evas_Image_Animated_Loop_Hint (*image_animated_loop_type_get) (void *data, void *image);
864 int (*image_animated_loop_count_get) (void *data, void *image);
865 double (*image_animated_frame_duration_get) (void *data, void *image, int start_frame, int frame_num);
866 Eina_Bool (*image_animated_frame_set) (void *data, void *image, int frame_index);
867
868 /* max size query */
869 void (*image_max_size_get) (void *data, int *maxw, int *maxh);
870};
871
872struct _Evas_Image_Load_Func
873{
874 Eina_Bool threadable;
875 Eina_Bool (*file_head) (Image_Entry *ie, const char *file, const char *key, int *error);
876 Eina_Bool (*file_data) (Image_Entry *ie, const char *file, const char *key, int *error);
877 double (*frame_duration) (Image_Entry *ie, const char *file, const int start, const int frame_num);
878 Eina_Bool do_region;
879};
880
881struct _Evas_Image_Save_Func
882{
883 int (*image_save) (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
884};
885
886#ifdef __cplusplus
887extern "C" {
888#endif
889
890Evas_Object *evas_object_new(Evas *e);
891void evas_object_free(Evas_Object *obj, int clean_layer);
892void evas_object_inject(Evas_Object *obj, Evas *e);
893void evas_object_release(Evas_Object *obj, int clean_layer);
894void evas_object_change(Evas_Object *obj);
895void evas_object_clip_changes_clean(Evas_Object *obj);
896void evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
897void evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *obj);
898void evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *obj);
899void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj, int is_v, int was_v);
900void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
901
902void evas_object_clip_dirty(Evas_Object *obj);
903void evas_object_recalc_clippees(Evas_Object *obj);
904Evas_Layer *evas_layer_new(Evas *e);
905void evas_layer_pre_free(Evas_Layer *lay);
906void evas_layer_free_objects(Evas_Layer *lay);
907void evas_layer_clean(Evas *e);
908Evas_Layer *evas_layer_find(Evas *e, short layer_num);
909void evas_layer_add(Evas_Layer *lay);
910void evas_layer_del(Evas_Layer *lay);
911
912int evas_object_was_in_output_rect(Evas_Object *obj, int x, int y, int w, int h);
913
914int evas_object_was_opaque(Evas_Object *obj);
915int evas_object_is_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
916int evas_object_was_inside(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
917int evas_object_clippers_was_visible(Evas_Object *obj);
918void evas_object_clip_across_check(Evas_Object *obj);
919void evas_object_clip_across_clippees_check(Evas_Object *obj);
920void evas_object_mapped_clip_across_mark(Evas_Object *obj);
921void evas_event_callback_call(Evas *e, Evas_Callback_Type type, void *event_info);
922void evas_object_event_callback_call(Evas_Object *obj, Evas_Callback_Type type, void *event_info, int event_id);
923Eina_List *evas_event_objects_event_list(Evas *e, Evas_Object *stop, int x, int y);
924int evas_mem_free(int mem_required);
925int evas_mem_degrade(int mem_required);
926void evas_debug_error(void);
927void evas_debug_input_null(void);
928void evas_debug_magic_null(void);
929void evas_debug_magic_wrong(DATA32 expected, DATA32 supplied);
930void evas_debug_generic(const char *str);
931const char *evas_debug_magic_string_get(DATA32 magic);
932void evas_object_smart_use(Evas_Smart *s);
933void evas_object_smart_unuse(Evas_Smart *s);
934void evas_smart_cb_descriptions_fix(Evas_Smart_Cb_Description_Array *a) EINA_ARG_NONNULL(1);
935Eina_Bool evas_smart_cb_descriptions_resize(Evas_Smart_Cb_Description_Array *a, unsigned int size) EINA_ARG_NONNULL(1);
936const 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;
937
938Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj);
939void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading);
940void _evas_object_image_preloading_check(Evas_Object *obj);
941Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj);
942void _evas_object_image_video_overlay_show(Evas_Object *obj);
943void _evas_object_image_video_overlay_hide(Evas_Object *obj);
944void evas_object_smart_del(Evas_Object *obj);
945void evas_object_smart_cleanup(Evas_Object *obj);
946void evas_object_smart_member_raise(Evas_Object *member);
947void evas_object_smart_member_lower(Evas_Object *member);
948void evas_object_smart_member_stack_above(Evas_Object *member, Evas_Object *other);
949void evas_object_smart_member_stack_below(Evas_Object *member, Evas_Object *other);
950const Eina_Inlist *evas_object_smart_members_get_direct(const Evas_Object *obj);
951void _evas_object_smart_members_all_del(Evas_Object *obj);
952void evas_call_smarts_calculate(Evas *e);
953void *evas_mem_calloc(int size);
954void _evas_post_event_callback_call(Evas *e);
955void _evas_post_event_callback_free(Evas *e);
956void evas_event_callback_list_post_free(Eina_Inlist **list);
957void evas_object_event_callback_all_del(Evas_Object *obj);
958void evas_object_event_callback_cleanup(Evas_Object *obj);
959void evas_event_callback_all_del(Evas *e);
960void evas_event_callback_cleanup(Evas *e);
961void evas_object_inform_call_show(Evas_Object *obj);
962void evas_object_inform_call_hide(Evas_Object *obj);
963void evas_object_inform_call_move(Evas_Object *obj);
964void evas_object_inform_call_resize(Evas_Object *obj);
965void evas_object_inform_call_restack(Evas_Object *obj);
966void evas_object_inform_call_changed_size_hints(Evas_Object *obj);
967void evas_object_inform_call_image_preloaded(Evas_Object *obj);
968void evas_object_inform_call_image_unloaded(Evas_Object *obj);
969void evas_object_intercept_cleanup(Evas_Object *obj);
970int evas_object_intercept_call_show(Evas_Object *obj);
971int evas_object_intercept_call_hide(Evas_Object *obj);
972int evas_object_intercept_call_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
973int evas_object_intercept_call_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
974int evas_object_intercept_call_raise(Evas_Object *obj);
975int evas_object_intercept_call_lower(Evas_Object *obj);
976int evas_object_intercept_call_stack_above(Evas_Object *obj, Evas_Object *above);
977int evas_object_intercept_call_stack_below(Evas_Object *obj, Evas_Object *below);
978int evas_object_intercept_call_layer_set(Evas_Object *obj, int l);
979int evas_object_intercept_call_color_set(Evas_Object *obj, int r, int g, int b, int a);
980int evas_object_intercept_call_clip_set(Evas_Object *obj, Evas_Object *clip);
981int evas_object_intercept_call_clip_unset(Evas_Object *obj);
982void evas_object_grabs_cleanup(Evas_Object *obj);
983void evas_key_grab_free(Evas_Object *obj, const char *keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);
984void evas_font_dir_cache_free(void);
985const char *evas_font_dir_cache_find(char *dir, char *font);
986Eina_List *evas_font_dir_available_list(const Evas* evas);
987void evas_font_dir_available_list_free(Eina_List *available);
988void evas_font_free(Evas *evas, void *font);
989void evas_fonts_zero_free(Evas *evas);
990void evas_fonts_zero_presure(Evas *evas);
991void evas_font_name_parse(Evas_Font_Description *fdesc, const char *name);
992int evas_font_style_find(const char *start, const char *end, Evas_Font_Style style);
993Evas_Font_Description *evas_font_desc_new(void);
994Evas_Font_Description *evas_font_desc_dup(const Evas_Font_Description *fdesc);
995void evas_font_desc_unref(Evas_Font_Description *fdesc);
996int evas_font_desc_cmp(const Evas_Font_Description *a, const Evas_Font_Description *b);
997Evas_Font_Description *evas_font_desc_ref(Evas_Font_Description *fdesc);
998void * evas_font_load(Evas *evas, Evas_Font_Description *fdesc, const char *source, Evas_Font_Size size);
999void evas_font_load_hinting_set(Evas *evas, void *font, int hinting);
1000void evas_object_smart_member_cache_invalidate(Evas_Object *obj, Eina_Bool pass_events, Eina_Bool freeze_events);
1001void evas_text_style_pad_get(Evas_Text_Style_Type style, int *l, int *r, int *t, int *b);
1002void _evas_object_text_rehint(Evas_Object *obj);
1003void _evas_object_textblock_rehint(Evas_Object *obj);
1004
1005extern int _evas_alloc_error;
1006extern int _evas_event_counter;
1007
1008struct _Evas_Imaging_Image
1009{
1010 RGBA_Image *image;
1011};
1012
1013struct _Evas_Imaging_Font
1014{
1015 RGBA_Font *font;
1016};
1017
1018int evas_async_events_init(void);
1019int evas_async_events_shutdown(void);
1020int evas_async_target_del(const void *target);
1021
1022void _evas_preload_thread_init(void);
1023void _evas_preload_thread_shutdown(void);
1024Evas_Preload_Pthread *evas_preload_thread_run(void (*func_heavy)(void *data),
1025 void (*func_end)(void *data),
1026 void (*func_cancel)(void *data),
1027 const void *data);
1028Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
1029
1030void _evas_walk(Evas *e);
1031void _evas_unwalk(Evas *e);
1032
1033// expose for use in engines
1034EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
1035EAPI const char *_evas_module_libdir_get(void);
1036
1037Eina_Bool evas_render_mapped(Evas *e, Evas_Object *obj,
1038 void *context, void *surface,
1039 int off_x, int off_y, int mapped,
1040 int ecx, int ecy, int ecw, int ech);
1041void evas_render_invalidate(Evas *e);
1042void evas_render_object_recalc(Evas_Object *obj);
1043
1044Eina_Bool evas_map_inside_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y);
1045Eina_Bool evas_map_coords_get(const Evas_Map *m, Evas_Coord x, Evas_Coord y, Evas_Coord *mx, Evas_Coord *my, int grab);
1046
1047Eina_List *evas_module_engine_list(void);
1048
1049/* for updating touch point list */
1050void _evas_touch_point_append(Evas *e, int id, Evas_Coord x, Evas_Coord y);
1051void _evas_touch_point_update(Evas *e, int id, Evas_Coord x, Evas_Coord y, Evas_Touch_Point_State state);
1052void _evas_touch_point_remove(Evas *e, int id);
1053
1054/****************************************************************************/
1055/*****************************************/
1056/********************/
1057#define MPOOL 1
1058
1059#ifdef MPOOL
1060typedef struct _Evas_Mempool Evas_Mempool;
1061
1062struct _Evas_Mempool
1063{
1064 int count;
1065 int num_allocs;
1066 int num_frees;
1067 Eina_Mempool *mp;
1068};
1069# define EVAS_MEMPOOL(x) \
1070 static Evas_Mempool x = {0, 0, 0, NULL}
1071# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret) \
1072 do { \
1073 if (!x.mp) { \
1074 x.mp = eina_mempool_add("chained_mempool", nam, NULL, sizeof(siz), cnt); \
1075 if (!x.mp) { \
1076 return ret; \
1077 } \
1078 } \
1079 } while (0)
1080# define EVAS_MEMPOOL_ALLOC(x, siz) \
1081 eina_mempool_malloc(x.mp, sizeof(siz))
1082# define EVAS_MEMPOOL_PREP(x, p, siz) \
1083 do { \
1084 x.count++; \
1085 x.num_allocs++; \
1086 memset(p, 0, sizeof(siz)); \
1087 } while (0)
1088# define EVAS_MEMPOOL_FREE(x, p) \
1089 do { \
1090 eina_mempool_free(x.mp, p); \
1091 x.count--; \
1092 x.num_frees++; \
1093 if (x.count <= 0) { \
1094 eina_mempool_del(x.mp); \
1095 x.mp = NULL; \
1096 x.count = 0; \
1097 } \
1098 } while (0)
1099#else
1100# define EVAS_MEMPOOL(x)
1101# define EVAS_MEMPOOL_INIT(x, nam, siz, cnt, ret)
1102# define EVAS_MEMPOOL_PREP(x, p, siz)
1103# define EVAS_MEMPOOL_ALLOC(x, siz) \
1104 calloc(1, sizeof(siz))
1105# define EVAS_MEMPOOL_FREE(x, p) \
1106 free(p)
1107#endif
1108/********************/
1109/*****************************************/
1110/****************************************************************************/
1111
1112#define EVAS_API_OVERRIDE(func, api, prefix) \
1113 (api)->func = prefix##func
1114#define EVAS_API_RESET(func, api) \
1115 (api)->func = NULL
1116
1117#include "evas_inline.x"
1118
1119#ifdef __cplusplus
1120}
1121#endif
1122#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 @@
1#include "evas_common.h"
2#include "evas_private.h"
3
4static Evas_Version _version = { VMAJ, VMIN, VMIC, VREV };
5EAPI Evas_Version *evas_version = &_version;
6
7int _evas_alloc_error = 0;
8static int _evas_debug_init = 0;
9static int _evas_debug_show = 0;
10static int _evas_debug_abort = 0;
11
12EAPI Evas_Alloc_Error
13evas_alloc_error(void)
14{
15 return _evas_alloc_error;
16}
17
18/* free cached items only in ram for speed reasons. return 0 if can't free */
19int
20evas_mem_free(int mem_required __UNUSED__)
21{
22 return 0;
23}
24
25/* start reducing quality of images etc. return 0 if can't free anything */
26int
27evas_mem_degrade(int mem_required __UNUSED__)
28{
29 return 0;
30}
31
32void *
33evas_mem_calloc(int size)
34{
35 void *ptr;
36
37 ptr = calloc(1, size);
38 if (ptr) return ptr;
39 MERR_BAD();
40 while ((!ptr) && (evas_mem_free(size))) ptr = calloc(1, size);
41 if (ptr) return ptr;
42 while ((!ptr) && (evas_mem_degrade(size))) ptr = calloc(1, size);
43 if (ptr) return ptr;
44 MERR_FATAL();
45 return NULL;
46}
47
48void
49evas_debug_error(void)
50{
51 if (!_evas_debug_init)
52 {
53 if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1;
54 if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1;
55 _evas_debug_init = 1;
56 }
57 if (_evas_debug_show)
58 CRIT("Evas Magic Check Failed!!!");
59}
60
61void
62evas_debug_input_null(void)
63{
64 if (!_evas_debug_init)
65 {
66 if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1;
67 if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1;
68 _evas_debug_init = 1;
69 }
70 if (_evas_debug_show)
71 CRIT("Input object pointer is NULL!");
72 if (_evas_debug_abort) abort();
73}
74
75void
76evas_debug_magic_null(void)
77{
78 if (!_evas_debug_init)
79 {
80 if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1;
81 if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1;
82 _evas_debug_init = 1;
83 }
84 if (_evas_debug_show)
85 CRIT("Input object is zero'ed out (maybe a freed object or zero-filled RAM)!");
86 if (_evas_debug_abort) abort();
87}
88
89void
90evas_debug_magic_wrong(DATA32 expected, DATA32 supplied)
91{
92 if (!_evas_debug_init)
93 {
94 if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1;
95 if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1;
96 _evas_debug_init = 1;
97 }
98 if (_evas_debug_show)
99 CRIT("Input object is wrong type\n"
100 " Expected: %08x - %s\n"
101 " Supplied: %08x - %s",
102 expected, evas_debug_magic_string_get(expected),
103 supplied, evas_debug_magic_string_get(supplied));
104 if (_evas_debug_abort) abort();
105}
106
107void
108evas_debug_generic(const char *str)
109{
110 if (!_evas_debug_init)
111 {
112 if (getenv("EVAS_DEBUG_SHOW")) _evas_debug_show = 1;
113 if (getenv("EVAS_DEBUG_ABORT")) _evas_debug_abort = 1;
114 _evas_debug_init = 1;
115 }
116 if (_evas_debug_show)
117 CRIT("%s", str);
118 if (_evas_debug_abort) abort();
119}
120
121const char *
122evas_debug_magic_string_get(DATA32 magic)
123{
124 switch (magic)
125 {
126 case MAGIC_EVAS:
127 return "Evas";
128 case MAGIC_OBJ:
129 return "Evas_Object";
130 case MAGIC_OBJ_RECTANGLE:
131 return "Evas_Object (Rectangle)";
132 case MAGIC_OBJ_LINE:
133 return "Evas_Object (Line)";
134 case MAGIC_OBJ_POLYGON:
135 return "Evas_Object (Polygon)";
136 case MAGIC_OBJ_IMAGE:
137 return "Evas_Object (Image)";
138 case MAGIC_OBJ_TEXT:
139 return "Evas_Object (Text)";
140 case MAGIC_OBJ_SMART:
141 return "Evas_Object (Smart)";
142 case MAGIC_EVAS_GL:
143 return "Evas_GL";
144 case MAGIC_MAP:
145 return "Evas_Map";
146 default:
147 return "<UNKNOWN>";
148 };
149 return "<UNKNOWN>";
150}