summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2020-02-10 20:38:33 +0900
committerHermet Park <hermetpark@gmail.com>2020-02-10 20:38:33 +0900
commitd7cec13ba15747df2bce96e931aac3ef9fd97f73 (patch)
treeaf79770471f3b0ef05e9d1d13a772eee20abf2d3
parentf959b1054674c0606267a431b9cd6d42047fbb85 (diff)
parent7f727c13666f20adc48513a3c039cd201d2f2d68 (diff)
Merge branch 'master' into devs/hermet/lottie
-rw-r--r--.ci/asan-ignore-leaks.supp1
-rwxr-xr-x.ci/ubuntu-bionic-install-deps.sh4
-rw-r--r--data/elementary/config/default/base.src.in53
-rw-r--r--data/elementary/config/mobile/base.src.in53
-rw-r--r--data/elementary/config/standard/base.src.in53
-rw-r--r--data/elementary/objects/test_tab_pager.edc9
-rw-r--r--data/elementary/themes/edc/efl/tab_bar.edc139
-rw-r--r--meson.build1
-rw-r--r--src/benchmarks/eina/eina_bench.h2
-rw-r--r--src/benchmarks/eina/eina_bench_crc_hash.c1
-rw-r--r--src/bin/elementary/meson.build14
-rw-r--r--src/bin/elementary/test_efl_gfx_vg_value_provider.c13
-rw-r--r--src/bin/elementary/test_ui_clock.c90
-rw-r--r--src/bin/elementary/test_ui_tab_pager.c20
-rw-r--r--src/bin/eolian_mono/eolian/mono/blacklist.hh3
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh30
-rw-r--r--src/bin/exactness/.gitignore5
-rw-r--r--src/bin/exactness/exactness.c671
-rw-r--r--src/bin/exactness/injector.c467
-rw-r--r--src/bin/exactness/inspect.c1643
-rw-r--r--src/bin/exactness/meson.build42
-rw-r--r--src/bin/exactness/player.c1359
-rw-r--r--src/bin/exactness/player_entry.edc932
-rw-r--r--src/bin/exactness/recorder.c521
-rw-r--r--src/bindings/mono/efl_mono/GenericModel.cs22
-rw-r--r--src/bindings/mono/efl_mono/efl_csharp_application.cs6
-rw-r--r--src/bindings/mono/eo_mono/workaround.cs64
-rw-r--r--src/examples/ecore/efl_net_control_example.c4
-rw-r--r--src/lib/ecore/ecore_internal.h33
-rw-r--r--src/lib/ecore/efl_filter_model.c35
-rw-r--r--src/lib/ecore/efl_loop_model.c36
-rw-r--r--src/lib/ecore/efl_loop_model.eo1
-rw-r--r--src/lib/ecore_con/efl_net_control-connman.c9
-rw-r--r--src/lib/ecore_con/efl_net_control_manager.eo2
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h12
-rw-r--r--src/lib/edje/edje_entry.c2
-rw-r--r--src/lib/edje/edje_legacy.c47
-rw-r--r--src/lib/edje/edje_lua.c20
-rw-r--r--src/lib/edje/edje_match.c10
-rw-r--r--src/lib/edje/edje_util.c16
-rw-r--r--src/lib/efl/interfaces/efl_gfx_types.eot22
-rw-r--r--src/lib/efl/interfaces/efl_input_text.eo12
-rw-r--r--src/lib/efl/interfaces/efl_model.eo12
-rw-r--r--src/lib/efl/interfaces/efl_text_font_properties.eo27
-rw-r--r--src/lib/efl/interfaces/efl_text_format.eo15
-rw-r--r--src/lib/efl/interfaces/efl_text_markup.eo3
-rw-r--r--src/lib/efl/interfaces/efl_text_style.eo34
-rw-r--r--src/lib/efl/interfaces/efl_text_types.eot13
-rw-r--r--src/lib/efl/interfaces/efl_types.eot4
-rw-r--r--src/lib/eina/eina_inarray.c2
-rw-r--r--src/lib/eina/eina_inline_value.x5
-rw-r--r--src/lib/eina/eina_matrix.c206
-rw-r--r--src/lib/eina/eina_matrix.h64
-rw-r--r--src/lib/eina/eina_promise.c69
-rw-r--r--src/lib/eina/eina_promise.h32
-rw-r--r--src/lib/elementary/efl_text_interactive.eo3
-rw-r--r--src/lib/elementary/efl_ui.eot9
-rw-r--r--src/lib/elementary/efl_ui_focus_manager.c8
-rw-r--r--src/lib/elementary/efl_ui_focus_manager.eo8
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.c105
-rw-r--r--src/lib/elementary/efl_ui_focus_manager_calc.eo19
-rw-r--r--src/lib/elementary/efl_ui_image.eo2
-rw-r--r--src/lib/elementary/efl_ui_internal_text_interactive.c34
-rw-r--r--src/lib/elementary/efl_ui_pager.eo2
-rw-r--r--src/lib/elementary/efl_ui_progressbar.eo4
-rw-r--r--src/lib/elementary/efl_ui_spotlight_container.c2
-rw-r--r--src/lib/elementary/efl_ui_spotlight_container.eo2
-rw-r--r--src/lib/elementary/efl_ui_stack.eo1
-rw-r--r--src/lib/elementary/efl_ui_tab_pager.c140
-rw-r--r--src/lib/elementary/efl_ui_tab_pager.eo24
-rw-r--r--src/lib/elementary/efl_ui_tab_pager_private.h1
-rw-r--r--src/lib/elementary/efl_ui_textbox.c447
-rw-r--r--src/lib/elementary/efl_ui_textbox.eo1
-rw-r--r--src/lib/elementary/efl_ui_vg_animation.eo51
-rw-r--r--src/lib/elementary/efl_ui_widget.c2
-rw-r--r--src/lib/elementary/efl_ui_widget_scrollable_content.eo2
-rw-r--r--src/lib/elementary/elm_code_widget.c14
-rw-r--r--src/lib/elementary/elm_config.c26
-rw-r--r--src/lib/elementary/elm_index.c12
-rw-r--r--src/lib/elementary/elm_priv.h6
-rw-r--r--src/lib/eo/eina_types.eot6
-rw-r--r--src/lib/eolian/Eolian.h5
-rw-r--r--src/lib/eolian/database_validate.c8
-rw-r--r--src/lib/eolian/eo_parser.c2
-rw-r--r--src/lib/evas/Efl_Canvas.h4
-rw-r--r--src/lib/evas/Evas_Common.h7
-rw-r--r--src/lib/evas/Evas_Eo.h2
-rw-r--r--src/lib/evas/canvas/efl_canvas_object.eo6
-rw-r--r--src/lib/evas/canvas/efl_canvas_textblock.eo69
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.c8
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.eo2
-rw-r--r--src/lib/evas/canvas/efl_gfx_vg_value_provider.h2
-rw-r--r--src/lib/evas/canvas/efl_input_types.eot17
-rw-r--r--src/lib/evas/canvas/efl_text_cursor.eo21
-rw-r--r--src/lib/evas/canvas/efl_text_formatter.eo7
-rw-r--r--src/lib/evas/canvas/evas_events.c42
-rw-r--r--src/lib/evas/canvas/evas_object_grid.c20
-rw-r--r--src/lib/evas/canvas/evas_object_image.c5
-rw-r--r--src/lib/evas/canvas/evas_object_main.c9
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c4
-rw-r--r--src/lib/evas/canvas/evas_object_textblock.c1044
-rw-r--r--src/lib/evas/canvas/evas_render.c12
-rw-r--r--src/lib/evas/filters/evas_filter.c2
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture.c15
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture.eo10
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_custom.c38
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_custom.eo28
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_events.eo4
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.c506
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_manager.eo10
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_private.h75
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.c37
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer.eo19
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.c32
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_custom.eo23
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_double_tap.c154
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c216
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_long_tap.c127
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c253
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_tap.c84
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_triple_tap.c153
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_zoom.c212
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_touch.c100
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_touch.eo31
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_types.eot20
-rw-r--r--src/lib/evas/gesture/meson.build4
-rw-r--r--src/lib/exactness/Exactness.h268
-rw-r--r--src/lib/exactness/exactness_private.h10
-rw-r--r--src/lib/exactness/legacy_file.c875
-rw-r--r--src/lib/exactness/meson.build31
-rw-r--r--src/lib/exactness/unit.c409
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c5
-rw-r--r--src/modules/evas/engines/gl_generic/filters/gl_filter_mask.c4
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c5
-rw-r--r--src/static_libs/vg_common/vg_common_json.c49
-rw-r--r--src/tests/ecore/efl_app_test_promise.c29
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_suite.c1
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_suite.h1
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_ecore_wl2.c11
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_input.c56
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_output.c33
-rw-r--r--src/tests/ecore_wl2/ecore_wl2_test_window.c20
-rw-r--r--src/tests/ecore_wl2/meson.build3
-rw-r--r--src/tests/efl/efl_test_composite_model.c27
-rw-r--r--src/tests/efl_js/benchmark_object.eo5
-rw-r--r--src/tests/efl_mono/Eina.cs3
-rw-r--r--src/tests/efl_mono/Events.cs24
-rw-r--r--src/tests/efl_mono/Model.cs2
-rw-r--r--src/tests/efl_mono/dummy_child.eo4
-rw-r--r--src/tests/efl_mono/dummy_hidden_object.eo1
-rw-r--r--src/tests/efl_mono/dummy_inherit_helper.eo4
-rw-r--r--src/tests/efl_mono/dummy_inherit_iface.eo1
-rw-r--r--src/tests/efl_mono/dummy_numberwrapper.eo1
-rw-r--r--src/tests/efl_mono/dummy_part_holder.eo1
-rw-r--r--src/tests/efl_mono/dummy_test_object.eo83
-rw-r--r--src/tests/eina/eina_test_matrix.c123
-rw-r--r--src/tests/eina/eina_test_value.c43
-rw-r--r--src/tests/eina_cxx/eina_simple.eo4
-rw-r--r--src/tests/eio/eio_test_map.c10
-rw-r--r--src/tests/elementary/custom_recognizer.c44
-rw-r--r--src/tests/elementary/custom_recognizer.eo11
-rw-r--r--src/tests/elementary/custom_recognizer2.c47
-rw-r--r--src/tests/elementary/custom_recognizer2.eo11
-rw-r--r--src/tests/elementary/efl_ui_suite.c1
-rw-r--r--src/tests/elementary/efl_ui_suite.h1
-rw-r--r--src/tests/elementary/efl_ui_test_focus.c18
-rw-r--r--src/tests/elementary/efl_ui_test_focus_common.h2
-rw-r--r--src/tests/elementary/efl_ui_test_gesture.c593
-rw-r--r--src/tests/elementary/meson.build5
-rw-r--r--src/tests/elementary/suite_helpers.c199
-rw-r--r--src/tests/elementary/suite_helpers.h14
-rw-r--r--src/tests/eolian/data/base.eo1
-rw-r--r--src/tests/eolian/data/class_funcs.eo1
-rw-r--r--src/tests/eolian/data/class_requires.eo1
-rw-r--r--src/tests/eolian/data/class_simple.eo4
-rw-r--r--src/tests/eolian/data/class_simple_ref_eo.h10
-rw-r--r--src/tests/eolian/data/consts.eo1
-rw-r--r--src/tests/eolian/data/ctor_dtor.eo1
-rw-r--r--src/tests/eolian/data/docs_ref.h18
-rw-r--r--src/tests/eolian/data/enum.eo9
-rw-r--r--src/tests/eolian/data/eo_docs.eo10
-rw-r--r--src/tests/eolian/data/error.eo2
-rw-r--r--src/tests/eolian/data/events.eo1
-rw-r--r--src/tests/eolian/data/extern.eo13
-rw-r--r--src/tests/eolian/data/free_func.eo7
-rw-r--r--src/tests/eolian/data/function_as_argument.eo1
-rw-r--r--src/tests/eolian/data/function_as_argument_ref.h6
-rw-r--r--src/tests/eolian/data/iface.eo1
-rw-r--r--src/tests/eolian/data/import.eo3
-rw-r--r--src/tests/eolian/data/mixins_require.eo1
-rw-r--r--src/tests/eolian/data/nmsp1_class1.eo4
-rw-r--r--src/tests/eolian/data/nmsp1_nmsp11_class2.eo4
-rw-r--r--src/tests/eolian/data/nmsp2_class1.eo4
-rw-r--r--src/tests/eolian/data/no_nmsp.eo4
-rw-r--r--src/tests/eolian/data/object_impl.eo11
-rw-r--r--src/tests/eolian/data/override.eo1
-rw-r--r--src/tests/eolian/data/scope.eo1
-rw-r--r--src/tests/eolian/data/struct.eo6
-rw-r--r--src/tests/eolian/data/struct_ref.h26
-rw-r--r--src/tests/eolian/data/struct_ref_stub.h18
-rw-r--r--src/tests/eolian/data/typedef.eo15
-rw-r--r--src/tests/eolian/data/typedef_ref.h36
-rw-r--r--src/tests/eolian/data/typedef_ref_stub.h24
-rw-r--r--src/tests/eolian/data/unimpl.eo1
-rw-r--r--src/tests/eolian/data/var.eo3
-rw-r--r--src/tests/eolian/data_aux/aux_a.eo1
-rw-r--r--src/tests/eolian/data_aux/aux_b.eo1
-rw-r--r--src/tests/eolian/data_aux/aux_c.eo1
-rw-r--r--src/tests/eolian/eolian_parsing.c4
-rw-r--r--src/tests/eolian/generated_future.eo4
-rw-r--r--src/tests/eolian_cxx/a.eo4
-rw-r--r--src/tests/eolian_cxx/b.eo4
-rw-r--r--src/tests/eolian_cxx/c.eo4
-rw-r--r--src/tests/eolian_cxx/callback.eo8
-rw-r--r--src/tests/eolian_cxx/complex.eo20
-rw-r--r--src/tests/eolian_cxx/cyclic1.eo4
-rw-r--r--src/tests/eolian_cxx/cyclic2.eo4
-rw-r--r--src/tests/eolian_cxx/docs.eo15
-rw-r--r--src/tests/eolian_cxx/eolian_cxx_test_documentation.cc26
-rw-r--r--src/tests/eolian_cxx/generic.eo30
-rw-r--r--src/tests/eolian_cxx/generic_interface.eo4
-rw-r--r--src/tests/eolian_cxx/name_name.eo1
-rw-r--r--src/tests/eolian_cxx/ns_name.eo1
-rw-r--r--src/tests/eolian_cxx/ns_name_other.eo1
-rw-r--r--src/tests/eolian_cxx/property_holder.eo4
-rw-r--r--src/tests/eolian_cxx/simple.eo4
-rw-r--r--src/tests/eolian_js/constructor_method_class.eo4
-rw-r--r--src/tests/eolian_js/test_object.eo3
-rw-r--r--src/tests/evas/evas_test_image.c45
-rw-r--r--src/tests/evas/evas_test_textblock.c40
230 files changed, 12504 insertions, 2419 deletions
diff --git a/.ci/asan-ignore-leaks.supp b/.ci/asan-ignore-leaks.supp
index 027800d..1d1b0b9 100644
--- a/.ci/asan-ignore-leaks.supp
+++ b/.ci/asan-ignore-leaks.supp
@@ -7,6 +7,7 @@ leak:handle_directive
7leak:edje_cc 7leak:edje_cc
8leak:_efl_loop_message_handler_message_send 8leak:_efl_loop_message_handler_message_send
9leak:ecore_ipc_client_add 9leak:ecore_ipc_client_add
10leak:_evas_pointer_data_add
10# Elm_prefs_cc 11# Elm_prefs_cc
11leak:st_collection_page_items_item_label 12leak:st_collection_page_items_item_label
12leak:st_collection_page_items_item_name 13leak:st_collection_page_items_item_name
diff --git a/.ci/ubuntu-bionic-install-deps.sh b/.ci/ubuntu-bionic-install-deps.sh
index 70f0287..998e74b 100755
--- a/.ci/ubuntu-bionic-install-deps.sh
+++ b/.ci/ubuntu-bionic-install-deps.sh
@@ -1,4 +1,4 @@
1#!/bin/sh 1#!/bin/sh
2sudo apt-get update -y 2sudo apt-get update -y
3sudo apt-get install -y build-essential autoconf automake autopoint doxygen check luajit libharfbuzz-dev libpng-dev libudev-dev libwebp-dev libssl-dev libluajit-5.1-dev libfribidi-dev libcogl-gles2-dev libgif-dev libtiff5-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdbus-1-dev libmount-dev libblkid-dev libpulse-dev libxrandr-dev libxtst-dev libxcursor-dev libxcomposite-dev libxinerama-dev libxkbfile-dev libbullet-dev libvlc-dev libsndfile1-dev libraw-dev libspectre-dev libpoppler-cpp-dev libpam0g-dev liblz4-dev faenza-icon-theme gettext git imagemagick libasound2-dev libbluetooth-dev libfontconfig1-dev libfreetype6-dev libibus-1.0-dev libiconv-hook-dev libjpeg-dev libjpeg-turbo8-dev libpoppler-dev libpoppler-private-dev libproxy-dev librsvg2-dev libscim-dev libsystemd-dev libtool libudisks2-dev libunibreak-dev libxcb-keysyms1-dev libxine2-dev libxss-dev linux-tools-common libcurl4-openssl-dev systemd ccache git binutils-gold python3-pip ninja-build dbus-x11 libavahi-client-dev python3-setuptools 3sudo apt-get install -y build-essential autoconf automake autopoint doxygen check luajit libharfbuzz-dev libpng-dev libudev-dev libwebp-dev libssl-dev libluajit-5.1-dev libfribidi-dev libcogl-gles2-dev libgif-dev libtiff5-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libdbus-1-dev libmount-dev libblkid-dev libpulse-dev libxrandr-dev libxtst-dev libxcursor-dev libxcomposite-dev libxinerama-dev libxkbfile-dev libbullet-dev libvlc-dev libsndfile1-dev libraw-dev libspectre-dev libpoppler-cpp-dev libpam0g-dev liblz4-dev faenza-icon-theme gettext git imagemagick libasound2-dev libbluetooth-dev libfontconfig1-dev libfreetype6-dev libibus-1.0-dev libiconv-hook-dev libjpeg-dev libjpeg-turbo8-dev libpoppler-dev libpoppler-private-dev libproxy-dev librsvg2-dev libscim-dev libsystemd-dev libtool libudisks2-dev libunibreak-dev libxcb-keysyms1-dev libxine2-dev libxss-dev linux-tools-common libcurl4-openssl-dev systemd ccache git binutils-gold python3-pip ninja-build dbus-x11 libavahi-client-dev python3-setuptools libopenjp2-7-dev
4pip3 install meson 4sudo pip3 install meson
diff --git a/data/elementary/config/default/base.src.in b/data/elementary/config/default/base.src.in
index c39aeee..d45a704 100644
--- a/data/elementary/config/default/base.src.in
+++ b/data/elementary/config/default/base.src.in
@@ -1,5 +1,5 @@
1group "Elm_Config" struct { 1group "Elm_Config" struct {
2 value "config_version" int: 131094; 2 value "config_version" int: 131095;
3 value "entry_select_allow" uchar: 1; 3 value "entry_select_allow" uchar: 1;
4 value "engine" string: ""; 4 value "engine" string: "";
5 value "vsync" uchar: 0; 5 value "vsync" uchar: 0;
@@ -3275,7 +3275,54 @@ group "Elm_Config" struct {
3275 value "action" string: "move"; 3275 value "action" string: "move";
3276 value "params" string: "next"; 3276 value "params" string: "next";
3277 } 3277 }
3278 } 3278 }
3279 } 3279 }
3280 group "Elm_Config_Bindings_Widget" struct {
3281 value "name" string: "Efl.Ui.Textbox";
3282 group "key_bindings" list {
3283 group "Elm_Config_Binding_Key" struct {
3284 value "context" int: 0;
3285 value "key" string: "c";
3286 value "action" string: "copy";
3287 value "params" string: "";
3288 group "modifiers" list {
3289 group "Elm_Config_Binding_Modifier" struct {
3290 value "mod" string: "Control";
3291 value "flag" uchar: 1;
3292 }
3293 }
3294 }
3295 group "Elm_Config_Binding_Key" struct {
3296 value "context" int: 0;
3297 value "key" string: "x";
3298 value "action" string: "cut";
3299 value "params" string: "";
3300 group "modifiers" list {
3301 group "Elm_Config_Binding_Modifier" struct {
3302 value "mod" string: "Control";
3303 value "flag" uchar: 1;
3304 }
3305 }
3306 }
3307 group "Elm_Config_Binding_Key" struct {
3308 value "context" int: 0;
3309 value "key" string: "v";
3310 value "action" string: "paste";
3311 value "params" string: "";
3312 group "modifiers" list {
3313 group "Elm_Config_Binding_Modifier" struct {
3314 value "mod" string: "Control";
3315 value "flag" uchar: 1;
3316 }
3317 }
3318 }
3319 group "Elm_Config_Binding_Key" struct {
3320 value "context" int: 0;
3321 value "key" string: "menu";
3322 value "action" string: "menu";
3323 value "params" string: "";
3324 }
3325 }
3326 }
3280 } 3327 }
3281} 3328}
diff --git a/data/elementary/config/mobile/base.src.in b/data/elementary/config/mobile/base.src.in
index 520ba90..0883545 100644
--- a/data/elementary/config/mobile/base.src.in
+++ b/data/elementary/config/mobile/base.src.in
@@ -1,5 +1,5 @@
1group "Elm_Config" struct { 1group "Elm_Config" struct {
2 value "config_version" int: 131094; 2 value "config_version" int: 131095;
3 value "entry_select_allow" uchar: 1; 3 value "entry_select_allow" uchar: 1;
4 value "engine" string: ""; 4 value "engine" string: "";
5 value "vsync" uchar: 0; 5 value "vsync" uchar: 0;
@@ -3261,7 +3261,54 @@ group "Elm_Config" struct {
3261 value "action" string: "move"; 3261 value "action" string: "move";
3262 value "params" string: "next"; 3262 value "params" string: "next";
3263 } 3263 }
3264 } 3264 }
3265 } 3265 }
3266 group "Elm_Config_Bindings_Widget" struct {
3267 value "name" string: "Efl.Ui.Textbox";
3268 group "key_bindings" list {
3269 group "Elm_Config_Binding_Key" struct {
3270 value "context" int: 0;
3271 value "key" string: "c";
3272 value "action" string: "copy";
3273 value "params" string: "";
3274 group "modifiers" list {
3275 group "Elm_Config_Binding_Modifier" struct {
3276 value "mod" string: "Control";
3277 value "flag" uchar: 1;
3278 }
3279 }
3280 }
3281 group "Elm_Config_Binding_Key" struct {
3282 value "context" int: 0;
3283 value "key" string: "x";
3284 value "action" string: "cut";
3285 value "params" string: "";
3286 group "modifiers" list {
3287 group "Elm_Config_Binding_Modifier" struct {
3288 value "mod" string: "Control";
3289 value "flag" uchar: 1;
3290 }
3291 }
3292 }
3293 group "Elm_Config_Binding_Key" struct {
3294 value "context" int: 0;
3295 value "key" string: "v";
3296 value "action" string: "paste";
3297 value "params" string: "";
3298 group "modifiers" list {
3299 group "Elm_Config_Binding_Modifier" struct {
3300 value "mod" string: "Control";
3301 value "flag" uchar: 1;
3302 }
3303 }
3304 }
3305 group "Elm_Config_Binding_Key" struct {
3306 value "context" int: 0;
3307 value "key" string: "menu";
3308 value "action" string: "menu";
3309 value "params" string: "";
3310 }
3311 }
3312 }
3266 } 3313 }
3267} 3314}
diff --git a/data/elementary/config/standard/base.src.in b/data/elementary/config/standard/base.src.in
index 0aa4e8f..391eb5b 100644
--- a/data/elementary/config/standard/base.src.in
+++ b/data/elementary/config/standard/base.src.in
@@ -1,5 +1,5 @@
1group "Elm_Config" struct { 1group "Elm_Config" struct {
2 value "config_version" int: 131094; 2 value "config_version" int: 131095;
3 value "entry_select_allow" uchar: 1; 3 value "entry_select_allow" uchar: 1;
4 value "engine" string: ""; 4 value "engine" string: "";
5 value "vsync" uchar: 0; 5 value "vsync" uchar: 0;
@@ -3258,7 +3258,54 @@ group "Elm_Config" struct {
3258 value "action" string: "move"; 3258 value "action" string: "move";
3259 value "params" string: "next"; 3259 value "params" string: "next";
3260 } 3260 }
3261 } 3261 }
3262 } 3262 }
3263 group "Elm_Config_Bindings_Widget" struct {
3264 value "name" string: "Efl.Ui.Textbox";
3265 group "key_bindings" list {
3266 group "Elm_Config_Binding_Key" struct {
3267 value "context" int: 0;
3268 value "key" string: "c";
3269 value "action" string: "copy";
3270 value "params" string: "";
3271 group "modifiers" list {
3272 group "Elm_Config_Binding_Modifier" struct {
3273 value "mod" string: "Control";
3274 value "flag" uchar: 1;
3275 }
3276 }
3277 }
3278 group "Elm_Config_Binding_Key" struct {
3279 value "context" int: 0;
3280 value "key" string: "x";
3281 value "action" string: "cut";
3282 value "params" string: "";
3283 group "modifiers" list {
3284 group "Elm_Config_Binding_Modifier" struct {
3285 value "mod" string: "Control";
3286 value "flag" uchar: 1;
3287 }
3288 }
3289 }
3290 group "Elm_Config_Binding_Key" struct {
3291 value "context" int: 0;
3292 value "key" string: "v";
3293 value "action" string: "paste";
3294 value "params" string: "";
3295 group "modifiers" list {
3296 group "Elm_Config_Binding_Modifier" struct {
3297 value "mod" string: "Control";
3298 value "flag" uchar: 1;
3299 }
3300 }
3301 }
3302 group "Elm_Config_Binding_Key" struct {
3303 value "context" int: 0;
3304 value "key" string: "menu";
3305 value "action" string: "menu";
3306 value "params" string: "";
3307 }
3308 }
3309 }
3263 } 3310 }
3264} 3311}
diff --git a/data/elementary/objects/test_tab_pager.edc b/data/elementary/objects/test_tab_pager.edc
index 9571571..c4ae78b 100644
--- a/data/elementary/objects/test_tab_pager.edc
+++ b/data/elementary/objects/test_tab_pager.edc
@@ -45,19 +45,12 @@ collections {
45 desc { "default"; 45 desc { "default";
46 } 46 }
47 } 47 }
48 rect { "bg";
49 scale;
50 desc { "default";
51 rel.to: "base";
52 color: 255 255 255 255;
53 }
54 }
55 text { "text"; 48 text { "text";
56 scale; 49 scale;
57 desc { "default"; 50 desc { "default";
58 rel.to: "base"; 51 rel.to: "base";
59 align: 0.5 0.5; 52 align: 0.5 0.5;
60 color: 0 0 0 255; 53 color: 255 255 255 255;
61 text.size: 20; 54 text.size: 20;
62 } 55 }
63 } 56 }
diff --git a/data/elementary/themes/edc/efl/tab_bar.edc b/data/elementary/themes/edc/efl/tab_bar.edc
index 8f1a105..cd4a51c 100644
--- a/data/elementary/themes/edc/efl/tab_bar.edc
+++ b/data/elementary/themes/edc/efl/tab_bar.edc
@@ -2,7 +2,6 @@ group { "efl/tab_bar";
2 data.item: "version" "123"; 2 data.item: "version" "123";
3 images.image: "vgrad_med_lighter.png" COMP; 3 images.image: "vgrad_med_lighter.png" COMP;
4 images.image: "bevel_out.png" COMP; 4 images.image: "bevel_out.png" COMP;
5 images.image: "shine.png" COMP;
6 images.image: "shadow_square_tiny.png" COMP; 5 images.image: "shadow_square_tiny.png" COMP;
7 parts { 6 parts {
8 spacer { "base"; 7 spacer { "base";
@@ -10,53 +9,12 @@ group { "efl/tab_bar";
10 desc { "default"; 9 desc { "default";
11 } 10 }
12 } 11 }
13 image { "shadow";
14 nomouse;
15 desc { "default";
16 rel.to: "base";
17 rel1.offset: -3 -2;
18 rel2.offset: 2 3;
19 image.normal: "shadow_square_tiny.png";
20 image.border: 6 6 6 6;
21 fill.smooth: 0;
22 }
23 }
24 image { "bg";
25 desc { "default";
26 rel.to: "base";
27 image.normal: "vgrad_med_lighter.png";
28 rel1.offset: 0 0;
29 rel2.offset: -1 -1;
30 fill.smooth: 0;
31 }
32 }
33 swallow { "efl.content"; 12 swallow { "efl.content";
34 scale; 13 scale;
35 desc { "default"; 14 desc { "default";
36 rel.to: "base"; 15 rel.to: "base";
37 } 16 }
38 } 17 }
39 image { "bevel";
40 nomouse;
41 desc { "default";
42 rel.to: "base";
43 image.normal: "bevel_out.png";
44 image.border: 1 1 1 1;
45 image.middle: 0;
46 fill.smooth: 0;
47 }
48 }
49 image { "shine";
50 nomouse;
51 desc { "default";
52 image.normal: "shine.png";
53 rel.to: "base";
54 rel1.offset: 0 -2;
55 rel2.relative: 1.0 0.0;
56 rel2.offset: -1 2;
57 FIXED_SIZE(69, 5)
58 }
59 }
60 } 18 }
61} 19}
62 20
@@ -134,64 +92,20 @@ group { "efl/tab_bar/tab";
134 desc { "default"; 92 desc { "default";
135 } 93 }
136 desc { "vert"; 94 desc { "vert";
137 rel1.offset: -1 0;
138 rel2.offset: 0 -1;
139 } 95 }
140 } 96 }
141 image { "shadow1"; 97 rect { "shadow1";
142 nomouse; 98 nomouse;
143 desc { "default"; 99 desc { "default";
144 rel.to: "base"; 100 rel.to: "base";
145 image.normal: "shadow_inset_bevels.png"; 101 rel2.offset: 0 0;
146 image.border: 2 2 0 1; 102 color: 0 0 0 50;
147 hid;
148 }
149 desc { "selected";
150 inherit: "default";
151 vis; 103 vis;
152 } 104 }
153 }
154 image { "shadow2";
155 nomouse;
156 desc { "default";
157 rel.to: "shadow1";
158 rel1.offset: 1 0;
159 rel2.offset: -2 -1;
160 image.normal: "shadow_angled_in_sides.png";
161 image.border: 8 8 0 1;
162 image.middle: 0;
163 hid;
164 }
165 desc { "selected"; 105 desc { "selected";
166 inherit: "default"; 106 inherit: "default";
167 vis;
168 }
169 }
170 rect { "bend_clip";
171 desc { "default";
172 hid; 107 hid;
173 } 108 }
174 desc { "vert";
175 vis;
176 }
177 }
178 image { "bend";
179 clip_to: "bend_clip";
180 desc { "default";
181 min: 2 2;
182 max: 99999 2;
183 rel2.offset: -1 1;
184 rel2.relative: 1.0 0.0;
185 image.normal: "bevel_dark_in.png";
186 image.border: 2 2 2 2;
187 fill.smooth: 0;
188 hid;
189 fixed: 1 1;
190 }
191 desc { "selected";
192 inherit: "default";
193 vis;
194 }
195 } 109 }
196 rect { "icon_clip"; 110 rect { "icon_clip";
197 desc { "default"; 111 desc { "default";
@@ -384,30 +298,12 @@ group { "efl/tab_bar/tab";
384 nomouse; 298 nomouse;
385 desc { "default"; 299 desc { "default";
386 fixed: 0 1; 300 fixed: 0 1;
387 rel1.offset: -3 -7; 301 rel1.relative: 0.0 0.0;
388 rel1.relative: 0.0 1.0; 302 rel1.to: "shadow1";
389 rel1.to: "shadow2"; 303 rel1.offset: -2 -2;
390 rel2.offset: 2 2; 304 rel2.relative: 1.0 0.0;
391 rel2.to: "shadow2"; 305 rel2.offset: 0 7;
392 image.normal: "horizontal_separated_bar_small_glow.png"; 306 rel2.to: "shadow1";
393 image.border: 4 4 4 4;
394 fill.smooth: 0;
395 hid;
396 }
397 desc { "selected";
398 inherit: "default";
399 vis;
400 }
401 }
402 image { "highlight";
403 nomouse;
404 desc { "default";
405 fixed: 0 1;
406 rel1.offset: -3 -7;
407 rel1.relative: 0.0 1.0;
408 rel1.to: "shadow2";
409 rel2.offset: 2 2;
410 rel2.to: "shadow2";
411 image.normal: "horizontal_separated_bar_small_glow.png"; 307 image.normal: "horizontal_separated_bar_small_glow.png";
412 image.border: 4 4 4 4; 308 image.border: 4 4 4 4;
413 fill.smooth: 0; 309 fill.smooth: 0;
@@ -439,13 +335,11 @@ group { "efl/tab_bar/tab";
439 signal: "efl,state,horizontal"; source: "efl"; 335 signal: "efl,state,horizontal"; source: "efl";
440 action: STATE_SET "default" 0.0; 336 action: STATE_SET "default" 0.0;
441 target: "base"; 337 target: "base";
442 target: "bend_clip";
443 } 338 }
444 program { 339 program {
445 signal: "efl,state,vertical"; source: "efl"; 340 signal: "efl,state,vertical"; source: "efl";
446 action: STATE_SET "vert" 0.0; 341 action: STATE_SET "vert" 0.0;
447 target: "base"; 342 target: "base";
448 target: "bend_clip";
449 } 343 }
450 program { name: "st0"; 344 program { name: "st0";
451 signal: "load"; source: ""; 345 signal: "load"; source: "";
@@ -459,9 +353,7 @@ group { "efl/tab_bar/tab";
459 target: "efl.text"; 353 target: "efl.text";
460 target: "label2"; 354 target: "label2";
461 target: "shadow1"; 355 target: "shadow1";
462 target: "shadow2";
463 target: "bar"; 356 target: "bar";
464 target: "bend";
465 } 357 }
466 program { 358 program {
467 signal: "efl,state,unselected"; source: "efl"; 359 signal: "efl,state,unselected"; source: "efl";
@@ -469,19 +361,7 @@ group { "efl/tab_bar/tab";
469 target: "efl.text"; 361 target: "efl.text";
470 target: "label2"; 362 target: "label2";
471 target: "shadow1"; 363 target: "shadow1";
472 target: "shadow2";
473 target: "bar"; 364 target: "bar";
474 target: "bend";
475 }
476 program {
477 signal: "efl,highlight,on"; source: "efl";
478 action: STATE_SET "selected" 0.0;
479 target: "highlight";
480 }
481 program {
482 signal: "efl,highlight,off"; source: "efl";
483 action: STATE_SET "default" 0.0;
484 target: "highlight";
485 } 365 }
486 program { name: "st1"; 366 program { name: "st1";
487 signal: "efl,text,unset"; source: "efl"; 367 signal: "efl,text,unset"; source: "efl";
@@ -535,7 +415,6 @@ group { "efl/tab_bar/tab";
535 signal: "efl,state,moving"; source: "efl"; 415 signal: "efl,state,moving"; source: "efl";
536 action: STATE_SET "default" 0.0; 416 action: STATE_SET "default" 0.0;
537 target: "shadow1"; 417 target: "shadow1";
538 target: "shadow2";
539 } 418 }
540 program { name: "icon_set,animation"; 419 program { name: "icon_set,animation";
541 signal: "efl,state,icon_new,set"; source: "efl"; 420 signal: "efl,state,icon_new,set"; source: "efl";
diff --git a/meson.build b/meson.build
index 9a6a84e..27216df 100644
--- a/meson.build
+++ b/meson.build
@@ -335,6 +335,7 @@ subprojects = [
335['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []], 335['elua' ,['elua'] , false, true, true, false, true, false, ['eina', 'luajit'], []],
336['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []], 336['ecore_wayland' ,['wl-deprecated'] , false, true, false, false, false, false, ['eina'], []],
337['ecore_drm' ,['drm-deprecated'] , false, true, false, false, false, false, ['eina'], []], 337['ecore_drm' ,['drm-deprecated'] , false, true, false, false, false, false, ['eina'], []],
338['exactness' ,[] , false, true, true, false, false, false, ['eina, evas, eet'], []],
338] 339]
339 340
340# We generate Efl_Config.h and config.h later, they will be available here 341# We generate Efl_Config.h and config.h later, they will be available here
diff --git a/src/benchmarks/eina/eina_bench.h b/src/benchmarks/eina/eina_bench.h
index a38d704..747ac6f 100644
--- a/src/benchmarks/eina/eina_bench.h
+++ b/src/benchmarks/eina/eina_bench.h
@@ -21,7 +21,7 @@
21 21
22#include "eina_benchmark.h" 22#include "eina_benchmark.h"
23 23
24int key_size; 24extern int key_size;
25 25
26void eina_bench_hash(Eina_Benchmark *bench); 26void eina_bench_hash(Eina_Benchmark *bench);
27void eina_bench_crc_hash_short(Eina_Benchmark *bench); 27void eina_bench_crc_hash_short(Eina_Benchmark *bench);
diff --git a/src/benchmarks/eina/eina_bench_crc_hash.c b/src/benchmarks/eina/eina_bench_crc_hash.c
index b673448..7750233 100644
--- a/src/benchmarks/eina/eina_bench_crc_hash.c
+++ b/src/benchmarks/eina/eina_bench_crc_hash.c
@@ -26,6 +26,7 @@
26uint64_t CityHash64(const char *buf, size_t len); 26uint64_t CityHash64(const char *buf, size_t len);
27#endif 27#endif
28 28
29int key_size;
29char *key_str=NULL; 30char *key_str=NULL;
30 31
31void repchar(int n) 32void repchar(int n)
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 7eddf03..0f8d793 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -169,9 +169,11 @@ elementary_test_src = [
169 169
170if sys_windows == false 170if sys_windows == false
171 link_args = ['-rdynamic', '-fPIC', '-pie'] 171 link_args = ['-rdynamic', '-fPIC', '-pie']
172 link_args_lib = ['-rdynamic', '-fPIC']
172 package_c_args = package_c_args + ['-fPIC'] 173 package_c_args = package_c_args + ['-fPIC']
173else 174else
174 link_args = [] 175 link_args = []
176 link_args_lib = []
175endif 177endif
176elementary_test = executable('elementary_test', 178elementary_test = executable('elementary_test',
177 elementary_test_src, 179 elementary_test_src,
@@ -185,6 +187,18 @@ elementary_test = executable('elementary_test',
185 link_args: link_args 187 link_args: link_args
186) 188)
187 189
190library('elementary_test',
191 elementary_test_src,
192 dependencies: [elementary] + elementary_deps + elementary_pub_deps,
193 install: false,
194 c_args : package_c_args + [
195 '-Delementary_test_BIN_DIR="'+dir_bin+'"',
196 '-Delementary_test_LIB_DIR="'+dir_lib+'"',
197 '-Delementary_test_DATA_DIR="'+join_paths(dir_data,'elementary')+'"'
198 ],
199 link_args: link_args_lib
200)
201
188elementary_config_src = [ 202elementary_config_src = [
189 'config.c' 203 'config.c'
190] 204]
diff --git a/src/bin/elementary/test_efl_gfx_vg_value_provider.c b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
index f8c204e..d7c3af8 100644
--- a/src/bin/elementary/test_efl_gfx_vg_value_provider.c
+++ b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
@@ -73,7 +73,7 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
73 if (strstr(type, "Tr")) 73 if (strstr(type, "Tr"))
74 { 74 {
75 double value[2], value_cnt; 75 double value[2], value_cnt;
76 Eina_Matrix3 m; 76 Eina_Matrix4 m;
77 Eo *vp = efl_add(EFL_GFX_VG_VALUE_PROVIDER_CLASS, anim_view); 77 Eo *vp = efl_add(EFL_GFX_VG_VALUE_PROVIDER_CLASS, anim_view);
78 78
79 efl_gfx_vg_value_provider_keypath_set(vp, (char*)path); 79 efl_gfx_vg_value_provider_keypath_set(vp, (char*)path);
@@ -85,23 +85,26 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
85 if (v) value[i] = atof(v); 85 if (v) value[i] = atof(v);
86 } 86 }
87 87
88 eina_matrix3_identity(&m); 88 eina_matrix4_identity(&m);
89 if (!strcmp(type, "TrPosition")) 89 if (!strcmp(type, "TrPosition"))
90 { 90 {
91 eina_matrix3_translate(&m, value[0], value[1]); 91 // Z projection
92 eina_matrix4_translate(&m, value[0], value[1], 0);
92 sprintf(new_type, "TrPosition"); 93 sprintf(new_type, "TrPosition");
93 sprintf(new_values, "%f %f",value[0], value[1]); 94 sprintf(new_values, "%f %f",value[0], value[1]);
94 95
95 } 96 }
96 else if (!strcmp(type, "TrScale")) 97 else if (!strcmp(type, "TrScale"))
97 { 98 {
98 eina_matrix3_scale(&m, value[0], value[1]); 99 // Z projection
100 eina_matrix4_scale(&m, value[0], value[1], 1);
99 sprintf(new_type, "TrScale"); 101 sprintf(new_type, "TrScale");
100 sprintf(new_values, "%f %f",value[0], value[1]); 102 sprintf(new_values, "%f %f",value[0], value[1]);
101 } 103 }
102 else if (!strcmp(type, "TrRotation")) 104 else if (!strcmp(type, "TrRotation"))
103 { 105 {
104 eina_matrix3_rotate(&m, value[0]); 106 // Z projection
107 eina_matrix4_rotate(&m, value[0] * (M_PI / 180), EINA_MATRIX_AXIS_Z); //degree to radian
105 sprintf(new_values, "%f",value[0]); 108 sprintf(new_values, "%f",value[0]);
106 sprintf(new_type, "TrRotation"); 109 sprintf(new_type, "TrRotation");
107 } 110 }
diff --git a/src/bin/elementary/test_ui_clock.c b/src/bin/elementary/test_ui_clock.c
index 79e9074..9973b25 100644
--- a/src/bin/elementary/test_ui_clock.c
+++ b/src/bin/elementary/test_ui_clock.c
@@ -6,7 +6,7 @@
6 6
7/* A simple test, just displaying clock in its default format */ 7/* A simple test, just displaying clock in its default format */
8 8
9Evas_Object *dt1, *dt2, *dt3, *dt4; 9Evas_Object *uicdt1, *uicdt2, *uicdt3, *uicdt4;
10 10
11static void 11static void
12_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED) 12_changed_cb(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
@@ -28,19 +28,19 @@ _bt_clicked(void *data EINA_UNUSED, const Efl_Event *ev)
28 new_time.tm_mday = 26; 28 new_time.tm_mday = 26;
29 new_time.tm_hour = 9; 29 new_time.tm_hour = 9;
30 new_time.tm_min = 0; 30 new_time.tm_min = 0;
31 efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_HOUR, EINA_TRUE); 31 efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_HOUR, EINA_TRUE);
32 efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_MINUTE, EINA_TRUE); 32 efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_MINUTE, EINA_TRUE);
33 efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_AMPM, EINA_TRUE); 33 efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_AMPM, EINA_TRUE);
34 efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_SECOND, EINA_TRUE); 34 efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_SECOND, EINA_TRUE);
35 efl_ui_clock_field_visible_set(dt1, EFL_UI_CLOCK_TYPE_DAY, EINA_TRUE); 35 efl_ui_clock_field_visible_set(uicdt1, EFL_UI_CLOCK_TYPE_DAY, EINA_TRUE);
36 efl_ui_clock_time_set(dt1, new_time); 36 efl_ui_clock_time_set(uicdt1, new_time);
37 37
38 elm_object_disabled_set(dt1, EINA_TRUE); 38 elm_object_disabled_set(uicdt1, EINA_TRUE);
39 elm_object_disabled_set(ev->object, EINA_TRUE); 39 elm_object_disabled_set(ev->object, EINA_TRUE);
40 40
41 efl_del(dt2); 41 efl_del(uicdt2);
42 efl_del(dt3); 42 efl_del(uicdt3);
43 dt2 = dt3 = NULL; 43 uicdt2 = uicdt3 = NULL;
44} 44}
45 45
46void 46void
@@ -56,33 +56,33 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
56 efl_content_set(win, efl_added), 56 efl_content_set(win, efl_added),
57 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240))); 57 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(360, 240)));
58 58
59 dt1 = efl_add(EFL_UI_CLOCK_CLASS, bx, 59 uicdt1 = efl_add(EFL_UI_CLOCK_CLASS, bx,
60 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 60 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
61 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE), 61 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
62 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_HOUR, EINA_FALSE), 62 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_HOUR, EINA_FALSE),
63 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MINUTE, EINA_FALSE), 63 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MINUTE, EINA_FALSE),
64 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_AMPM, EINA_FALSE), 64 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_AMPM, EINA_FALSE),
65 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_SECOND, EINA_FALSE), 65 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_SECOND, EINA_FALSE),
66 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_DAY, EINA_FALSE), 66 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_DAY, EINA_FALSE),
67 efl_ui_clock_pause_set(efl_added, EINA_TRUE), 67 efl_ui_clock_pause_set(efl_added, EINA_TRUE),
68 efl_event_callback_add(efl_added, EFL_UI_CLOCK_EVENT_CHANGED, _changed_cb, NULL), 68 efl_event_callback_add(efl_added, EFL_UI_CLOCK_EVENT_CHANGED, _changed_cb, NULL),
69 efl_pack(bx, efl_added)); 69 efl_pack(bx, efl_added));
70 70
71 dt2 = efl_add(EFL_UI_CLOCK_CLASS, bx, 71 uicdt2 = efl_add(EFL_UI_CLOCK_CLASS, bx,
72 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 72 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
73 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE), 73 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
74 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_YEAR, EINA_FALSE), 74 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_YEAR, EINA_FALSE),
75 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MONTH, EINA_FALSE), 75 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_MONTH, EINA_FALSE),
76 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_DATE, EINA_FALSE), 76 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_DATE, EINA_FALSE),
77 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_SECOND, EINA_FALSE), 77 efl_ui_clock_field_visible_set(efl_added, EFL_UI_CLOCK_TYPE_SECOND, EINA_FALSE),
78 efl_ui_clock_pause_set(efl_added, EINA_TRUE), 78 efl_ui_clock_pause_set(efl_added, EINA_TRUE),
79 efl_pack(bx, efl_added)); 79 efl_pack(bx, efl_added));
80 elm_object_disabled_set(dt2, EINA_TRUE); 80 elm_object_disabled_set(uicdt2, EINA_TRUE);
81 81
82 dt3 = efl_add(EFL_UI_CLOCK_CLASS, bx, 82 uicdt3 = efl_add(EFL_UI_CLOCK_CLASS, bx,
83 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 83 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
84 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE), 84 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
85 efl_pack(bx, efl_added)); 85 efl_pack(bx, efl_added));
86 86
87 efl_add(EFL_UI_TEXTBOX_CLASS, bx, 87 efl_add(EFL_UI_TEXTBOX_CLASS, bx,
88 efl_text_set(efl_added, "Editable Clock:"), 88 efl_text_set(efl_added, "Editable Clock:"),
@@ -92,12 +92,12 @@ test_ui_clock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
92 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 25)), 92 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(100, 25)),
93 efl_pack(bx, efl_added)); 93 efl_pack(bx, efl_added));
94 94
95 dt4 = efl_add(EFL_UI_CLOCK_CLASS, bx, 95 uicdt4 = efl_add(EFL_UI_CLOCK_CLASS, bx,
96 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND), 96 efl_gfx_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
97 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE), 97 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
98 efl_ui_clock_edit_mode_set(efl_added, EINA_TRUE), 98 efl_ui_clock_edit_mode_set(efl_added, EINA_TRUE),
99 efl_ui_clock_pause_set(efl_added, EINA_TRUE), 99 efl_ui_clock_pause_set(efl_added, EINA_TRUE),
100 efl_pack(bx, efl_added)); 100 efl_pack(bx, efl_added));
101 101
102 efl_add(EFL_UI_BUTTON_CLASS, win, 102 efl_add(EFL_UI_BUTTON_CLASS, win,
103 efl_text_set(efl_added, "Back to the future..."), 103 efl_text_set(efl_added, "Back to the future..."),
diff --git a/src/bin/elementary/test_ui_tab_pager.c b/src/bin/elementary/test_ui_tab_pager.c
index 1cc0055..2c948dc 100644
--- a/src/bin/elementary/test_ui_tab_pager.c
+++ b/src/bin/elementary/test_ui_tab_pager.c
@@ -139,7 +139,7 @@ test_ui_tab_pager(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev
139 page = tab_page_add(tp); 139 page = tab_page_add(tp);
140 efl_pack_end(tp, page); 140 efl_pack_end(tp, page);
141 if (i == 0) 141 if (i == 0)
142 efl_ui_spotlight_active_element_set(tp, page); 142 efl_ui_selectable_selected_set(efl_ui_tab_page_tab_bar_item_get(page), EINA_TRUE);
143 } 143 }
144 144
145 ad = (App_Data*)calloc(1, sizeof(App_Data)); 145 ad = (App_Data*)calloc(1, sizeof(App_Data));
@@ -174,7 +174,9 @@ static void
174_tab_set_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED) 174_tab_set_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
175{ 175{
176 Tab_Set_Data *tsd = data; 176 Tab_Set_Data *tsd = data;
177 efl_ui_spotlight_active_element_set(tsd->tab_pager, efl_pack_content_get(tsd->tab_pager, elm_spinner_value_get(tsd->spinner))); 177 Efl_Ui_Tab_Page *page = efl_pack_content_get(tsd->tab_pager, elm_spinner_value_get(tsd->spinner));
178
179 efl_ui_selectable_selected_set(efl_ui_tab_page_tab_bar_item_get(page), EINA_TRUE);
178} 180}
179 181
180static void 182static void
@@ -246,7 +248,7 @@ _pack_before_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
246 Eo *tab_pager = data; 248 Eo *tab_pager = data;
247 Eo *tab_page, *cur_tab_page; 249 Eo *tab_page, *cur_tab_page;
248 250
249 cur_tab_page = efl_ui_spotlight_active_element_get(tab_pager); 251 cur_tab_page = efl_ui_selectable_last_selected_get(tab_pager);
250 252
251 tab_page = tab_page_add(tab_pager); 253 tab_page = tab_page_add(tab_pager);
252 254
@@ -259,7 +261,7 @@ _pack_after_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
259 Eo *tab_pager = data; 261 Eo *tab_pager = data;
260 Eo *tab_page, *cur_tab_page; 262 Eo *tab_page, *cur_tab_page;
261 263
262 cur_tab_page = efl_ui_spotlight_active_element_get(tab_pager); 264 cur_tab_page = efl_ui_selectable_last_selected_get(tab_pager);
263 265
264 tab_page = tab_page_add(tab_pager); 266 tab_page = tab_page_add(tab_pager);
265 267
@@ -361,7 +363,7 @@ _unpack_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
361{ 363{
362 Eo *tab_pager = data; 364 Eo *tab_pager = data;
363 365
364 Eo *tab_page = efl_ui_spotlight_active_element_get(tab_pager); 366 Eo *tab_page = efl_ui_selectable_last_selected_get(tab_pager);
365 367
366 efl_pack_unpack(tab_pager, tab_page); 368 efl_pack_unpack(tab_pager, tab_page);
367 efl_del(tab_page); 369 efl_del(tab_page);
@@ -460,7 +462,7 @@ _change_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
460 char *label = NULL; 462 char *label = NULL;
461 char *icon = NULL; 463 char *icon = NULL;
462 464
463 tab_page = efl_ui_spotlight_active_element_get(tcd->tab_pager); 465 tab_page = efl_ui_selectable_last_selected_get(tcd->tab_pager);
464 466
465 if (efl_ui_selectable_selected_get(tcd->label_check)) 467 if (efl_ui_selectable_selected_get(tcd->label_check))
466 { 468 {
@@ -528,20 +530,20 @@ static void
528_tran_set_btn_scroll_cb(void *data, const Efl_Event *ev EINA_UNUSED) 530_tran_set_btn_scroll_cb(void *data, const Efl_Event *ev EINA_UNUSED)
529{ 531{
530 Efl_Ui_Spotlight_Scroll_Manager *scroll = efl_new(EFL_UI_SPOTLIGHT_SCROLL_MANAGER_CLASS); 532 Efl_Ui_Spotlight_Scroll_Manager *scroll = efl_new(EFL_UI_SPOTLIGHT_SCROLL_MANAGER_CLASS);
531 efl_ui_spotlight_manager_set(data, scroll); 533 efl_ui_tab_pager_spotlight_manager_set(data, scroll);
532} 534}
533 535
534static void 536static void
535_tran_set_btn_stack_cb(void *data, const Efl_Event *ev EINA_UNUSED) 537_tran_set_btn_stack_cb(void *data, const Efl_Event *ev EINA_UNUSED)
536{ 538{
537 Efl_Ui_Spotlight_Scroll_Manager *stack = efl_new(EFL_UI_SPOTLIGHT_FADE_MANAGER_CLASS); 539 Efl_Ui_Spotlight_Scroll_Manager *stack = efl_new(EFL_UI_SPOTLIGHT_FADE_MANAGER_CLASS);
538 efl_ui_spotlight_manager_set(data, stack); 540 efl_ui_tab_pager_spotlight_manager_set(data, stack);
539} 541}
540 542
541static void 543static void
542_tran_unset_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED) 544_tran_unset_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
543{ 545{
544 efl_ui_spotlight_manager_set(data, NULL); 546 efl_ui_tab_pager_spotlight_manager_set(data, NULL);
545} 547}
546 548
547static void 549static void
diff --git a/src/bin/eolian_mono/eolian/mono/blacklist.hh b/src/bin/eolian_mono/eolian/mono/blacklist.hh
index 8d8de9d..683095f 100644
--- a/src/bin/eolian_mono/eolian/mono/blacklist.hh
+++ b/src/bin/eolian_mono/eolian/mono/blacklist.hh
@@ -32,7 +32,6 @@ inline bool is_function_blacklisted(std::string const& c_name)
32 return 32 return
33 c_name == "efl_event_callback_array_priority_add" 33 c_name == "efl_event_callback_array_priority_add"
34 || c_name == "efl_constructor" 34 || c_name == "efl_constructor"
35 || c_name == "efl_player_playback_position_get"
36 || c_name == "efl_ui_widget_focus_set" 35 || c_name == "efl_ui_widget_focus_set"
37 || c_name == "efl_ui_widget_focus_get" 36 || c_name == "efl_ui_widget_focus_get"
38 || c_name == "efl_ui_text_password_get" 37 || c_name == "efl_ui_text_password_get"
@@ -70,6 +69,8 @@ inline bool is_function_blacklisted(std::string const& c_name)
70 || c_name == "efl_access_object_event_handler_add" 69 || c_name == "efl_access_object_event_handler_add"
71 || c_name == "efl_access_object_event_handler_del" 70 || c_name == "efl_access_object_event_handler_del"
72 || c_name == "efl_access_object_event_emit" 71 || c_name == "efl_access_object_event_emit"
72 || c_name == "efl_access_widget_action_elm_actions_get"
73 || c_name == "efl_access_action_actions_get"
73 ; 74 ;
74} 75}
75 76
diff --git a/src/bin/eolian_mono/eolian/mono/events.hh b/src/bin/eolian_mono/eolian/mono/events.hh
index b6cb4aa..2040a2e 100644
--- a/src/bin/eolian_mono/eolian/mono/events.hh
+++ b/src/bin/eolian_mono/eolian/mono/events.hh
@@ -170,7 +170,7 @@ struct pack_event_info_and_call_visitor
170 { 170 {
171 return as_generator( 171 return as_generator(
172 indent.inc() << "Contract.Requires(e != null, nameof(e));\n" 172 indent.inc() << "Contract.Requires(e != null, nameof(e));\n"
173 << indent.inc() << "IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.arg));\n" 173 << indent.inc() << "IntPtr info = Marshal.AllocHGlobal(Marshal.SizeOf(e.Arg));\n"
174 << indent.inc() << "CallNativeEventCallback(" + library_name + ", \"_" + evt_c_name + "\", info, " << "(p) => Marshal.FreeHGlobal(p));\n" 174 << indent.inc() << "CallNativeEventCallback(" + library_name + ", \"_" + evt_c_name + "\", info, " << "(p) => Marshal.FreeHGlobal(p));\n"
175 ).generate(sink, attributes::unused, *context); 175 ).generate(sink, attributes::unused, *context);
176 } 176 }
@@ -190,8 +190,8 @@ struct pack_event_info_and_call_visitor
190 190
191 match const str_table[] = 191 match const str_table[] =
192 { 192 {
193 {"string", [] { return "e.arg"; }} 193 {"string", [] { return "e.Arg"; }}
194 , {"stringshare", [] { return "e.arg"; }} 194 , {"stringshare", [] { return "e.Arg"; }}
195 }; 195 };
196 196
197 auto str_accept_func = [&](std::string const& conversion) 197 auto str_accept_func = [&](std::string const& conversion)
@@ -208,9 +208,9 @@ struct pack_event_info_and_call_visitor
208 208
209 match const value_table [] = 209 match const value_table [] =
210 { 210 {
211 {"bool", [] { return "e.arg ? (byte) 1 : (byte) 0"; }} 211 {"bool", [] { return "e.Arg ? (byte) 1 : (byte) 0"; }}
212 , {"Eina.Error", [] { return "(int)e.arg"; }} 212 , {"Eina.Error", [] { return "(int)e.Arg"; }}
213 , {nullptr, [] { return "e.arg"; }} 213 , {nullptr, [] { return "e.Arg"; }}
214 }; 214 };
215 215
216 auto value_accept_func = [&](std::string const& conversion) 216 auto value_accept_func = [&](std::string const& conversion)
@@ -225,14 +225,14 @@ struct pack_event_info_and_call_visitor
225 if (eina::optional<bool> b = type_match::get_match(value_table, filter_func, value_accept_func)) 225 if (eina::optional<bool> b = type_match::get_match(value_table, filter_func, value_accept_func))
226 return *b; 226 return *b;
227 227
228 return value_accept_func("e.args"); 228 return value_accept_func("e.Args");
229 } 229 }
230 bool operator()(grammar::attributes::klass_name const&) const 230 bool operator()(grammar::attributes::klass_name const&) const
231 { 231 {
232 auto const& indent = current_indentation(*context); 232 auto const& indent = current_indentation(*context);
233 return as_generator( 233 return as_generator(
234 indent.inc() << "Contract.Requires(e != null, nameof(e));\n" 234 indent.inc() << "Contract.Requires(e != null, nameof(e));\n"
235 << indent.inc() << "IntPtr info = e.arg.NativeHandle;\n" 235 << indent.inc() << "IntPtr info = e.Arg.NativeHandle;\n"
236 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n" 236 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n"
237 ).generate(sink, attributes::unused, *context); 237 ).generate(sink, attributes::unused, *context);
238 } 238 }
@@ -243,15 +243,15 @@ struct pack_event_info_and_call_visitor
243 std::string info_variable; 243 std::string info_variable;
244 244
245 if (type.outer.base_type == "iterator") 245 if (type.outer.base_type == "iterator")
246 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToIterator(e.arg, ") + (is_own ? "true" : "false") + ");\n"; 246 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToIterator(e.Arg, ") + (is_own ? "true" : "false") + ");\n";
247 else if (type.outer.base_type == "accessor") 247 else if (type.outer.base_type == "accessor")
248 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToAccessor(e.arg, ") + (is_own ? "true" : "false") + ");\n"; 248 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IEnumerableToAccessor(e.Arg, ") + (is_own ? "true" : "false") + ");\n";
249 else if (type.outer.base_type == "array") 249 else if (type.outer.base_type == "array")
250 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeArray(e.arg, ") + (is_own ? "true" : "false") + ");\n"; 250 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeArray(e.Arg, ") + (is_own ? "true" : "false") + ");\n";
251 else if (type.outer.base_type == "list") 251 else if (type.outer.base_type == "list")
252 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeList(e.arg, ") + (is_own ? "true" : "false") + ");\n"; 252 info_variable = std::string("IntPtr info = Efl.Eo.Globals.IListToNativeList(e.Arg, ") + (is_own ? "true" : "false") + ");\n";
253 else 253 else
254 info_variable = "IntPtr info = e.arg.Handle;\n"; 254 info_variable = "IntPtr info = e.Arg.Handle;\n";
255 return as_generator(indent.inc() << "Contract.Requires(e != null, nameof(e));\n" 255 return as_generator(indent.inc() << "Contract.Requires(e != null, nameof(e));\n"
256 << indent.inc() << info_variable 256 << indent.inc() << info_variable
257 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n" 257 << indent.inc() << "CallNativeEventCallback(" << library_name << ", \"_" << evt_c_name << "\", info, null);\n"
@@ -326,7 +326,7 @@ struct event_argument_wrapper_generator
326 326
327 if (!as_generator(scope_tab(2) << "/// </summary>\n" 327 if (!as_generator(scope_tab(2) << "/// </summary>\n"
328 << scope_tab(2) << "/// <value>" << documentation_string << "</value>\n" 328 << scope_tab(2) << "/// <value>" << documentation_string << "</value>\n"
329 << scope_tab(2) << "public " << type << " arg { get; set; }\n" 329 << scope_tab(2) << "public " << type << " Arg { get; set; }\n"
330 << scope_tab << "}\n\n" 330 << scope_tab << "}\n\n"
331 ).generate(sink, std::make_tuple(evt.documentation.summary, *etype), context)) 331 ).generate(sink, std::make_tuple(evt.documentation.summary, *etype), context))
332 return false; 332 return false;
@@ -427,7 +427,7 @@ struct event_definition_generator
427 auto sub_context = change_indentation(indent.inc().inc(), context); 427 auto sub_context = change_indentation(indent.inc().inc(), context);
428 428
429 if (!as_generator(", info => new " << wrapper_args_type << "{ " 429 if (!as_generator(", info => new " << wrapper_args_type << "{ "
430 << "arg = ").generate(arg_initializer_sink, attributes::unused, context)) 430 << "Arg = ").generate(arg_initializer_sink, attributes::unused, context))
431 return false; 431 return false;
432 if (!(*etype).original_type.visit(unpack_event_args_visitor<decltype(arg_initializer_sink), decltype(sub_context)>{arg_initializer_sink, &sub_context, *etype})) 432 if (!(*etype).original_type.visit(unpack_event_args_visitor<decltype(arg_initializer_sink), decltype(sub_context)>{arg_initializer_sink, &sub_context, *etype}))
433 return false; 433 return false;
diff --git a/src/bin/exactness/.gitignore b/src/bin/exactness/.gitignore
new file mode 100644
index 0000000..2760101
--- /dev/null
+++ b/src/bin/exactness/.gitignore
@@ -0,0 +1,5 @@
1/exactness
2/exactness_inject
3/exactness_inspect
4/exactness_play
5/exactness_record
diff --git a/src/bin/exactness/exactness.c b/src/bin/exactness/exactness.c
new file mode 100644
index 0000000..47aa438
--- /dev/null
+++ b/src/bin/exactness/exactness.c
@@ -0,0 +1,671 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Ecore.h>
6#include <Ecore_Getopt.h>
7#include <Ecore_Evas.h>
8#include <Ecore_File.h>
9
10#include "exactness_private.h"
11
12#ifdef _WIN32
13# include <evil_private.h> /* mkdir */
14#endif
15
16#define SCHEDULER_CMD_SIZE 1024
17
18#define ORIG_SUBDIR "orig"
19#define CURRENT_SUBDIR "current"
20
21#define EXACTNESS_PATH_MAX 1024
22
23#define BUF_SIZE 1024
24
25typedef struct
26{
27 EINA_INLIST;
28 char *name;
29 const char *command;
30} List_Entry;
31
32typedef enum
33{
34 RUN_SIMULATION,
35 RUN_PLAY,
36 RUN_INIT
37} Run_Mode;
38
39static unsigned short _running_jobs = 0, _max_jobs = 1;
40static Eina_List *_base_dirs = NULL;
41static char *_dest_dir;
42static char *_wrap_command = NULL, *_fonts_dir = NULL;
43static int _verbose = 0;
44static Eina_Bool _scan_objs = EINA_FALSE, _disable_screenshots = EINA_FALSE, _stabilize_shots = EINA_FALSE;
45
46static Run_Mode _mode;
47static List_Entry *_next_test_to_run = NULL;
48static unsigned int _tests_executed = 0;
49
50static Eina_List *_errors;
51static Eina_List *_compare_errors;
52
53static Eina_Bool _job_consume();
54
55static void
56_printf(int verbose, const char *fmt, ...)
57{
58 va_list ap;
59 if (!_verbose || verbose > _verbose) return;
60
61 va_start(ap, fmt);
62 vprintf(fmt, ap);
63 va_end(ap);
64}
65
66static Exactness_Image *
67_image_load(const char *filename)
68{
69 int w, h;
70 Evas_Load_Error err;
71 Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 100, 100, NULL);
72 Eo *e = ecore_evas_get(ee);
73
74 Eo *img = evas_object_image_add(e);
75 evas_object_image_file_set(img, filename, NULL);
76 err = evas_object_image_load_error_get(img);
77 if (err != EVAS_LOAD_ERROR_NONE)
78 {
79 fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n",
80 filename, evas_load_error_str(err));
81 return NULL;
82 }
83
84 Exactness_Image *ex_img = malloc(sizeof(*ex_img));
85 int len;
86 evas_object_image_size_get(img, &w, &h);
87 ex_img->w = w;
88 ex_img->h = h;
89 len = w * h * 4;
90 ex_img->pixels = malloc(len);
91 memcpy(ex_img->pixels, evas_object_image_data_get(img, EINA_FALSE), len);
92
93 ecore_evas_free(ee);
94 return ex_img;
95}
96
97static void
98_image_save(Exactness_Image *ex_img, const char *output)
99{
100 Ecore_Evas *ee;
101 Eo *e, *img;
102 ee = ecore_evas_new(NULL, 0, 0, 100, 100, NULL);
103 e = ecore_evas_get(ee);
104 img = evas_object_image_add(e);
105 evas_object_image_size_set(img, ex_img->w, ex_img->h);
106 evas_object_image_data_set(img, ex_img->pixels);
107 evas_object_image_save(img, output, NULL, NULL);
108 ecore_evas_free(ee);
109}
110
111static Eina_Bool
112_file_compare(const char *orig_dir, const char *ent_name)
113{
114 Eina_Bool result = EINA_FALSE;
115 Exactness_Image *img1, *img2, *imgO = NULL;
116 char *filename1 = alloca(strlen(orig_dir) + strlen(ent_name) + 20);
117 char *filename2 = alloca(strlen(_dest_dir) + strlen(ent_name) + 20);
118 sprintf(filename1, "%s/%s", orig_dir, ent_name);
119 sprintf(filename2, "%s/%s/%s", _dest_dir, CURRENT_SUBDIR, ent_name);
120
121 img1 = _image_load(filename1);
122 img2 = _image_load(filename2);
123
124 if (exactness_image_compare(img1, img2, &imgO))
125 {
126 char *buf = alloca(strlen(_dest_dir) + strlen(ent_name));
127 sprintf(buf, "%s/%s/comp_%s", _dest_dir, CURRENT_SUBDIR, ent_name);
128 _image_save(imgO, buf);
129 _compare_errors = eina_list_append(_compare_errors, strdup(ent_name));
130 result = EINA_TRUE;
131 }
132 exactness_image_free(img1);
133 exactness_image_free(img2);
134 exactness_image_free(imgO);
135 return result;
136}
137
138static void
139_exu_imgs_unpack(const char *exu_path, const char *dir, const char *ent_name)
140{
141 Exactness_Unit *unit = exactness_unit_file_read(exu_path);
142 Exactness_Image *img;
143 Eina_List *itr;
144 Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 100, 100, NULL);
145 Eo *e = ecore_evas_get(ee);
146 int n = 1;
147 if (!unit) return;
148 EINA_LIST_FOREACH(unit->imgs, itr, img)
149 {
150 Eo *o = evas_object_image_add(e);
151 char *filename = alloca(strlen(dir) + strlen(ent_name) + 20);
152 snprintf(filename, EXACTNESS_PATH_MAX, "%s/%s%c%.3d.png",
153 dir, ent_name, SHOT_DELIMITER, n++);
154 evas_object_image_size_set(o, img->w, img->h);
155 evas_object_image_data_set(o, img->pixels);
156 if (!evas_object_image_save(o, filename, NULL, NULL))
157 {
158 printf("Cannot save widget to <%s>\n", filename);
159 }
160 efl_del(o);
161 }
162 efl_del(e);
163 ecore_evas_free(ee);
164}
165
166static void
167_run_test_compare(const List_Entry *ent)
168{
169 char *path = alloca(EXACTNESS_PATH_MAX);
170 char *origdir = alloca(strlen(_dest_dir) + 20);
171 const char *base_dir;
172 Eina_List *itr;
173 int n = 1, nb_fails = 0;
174 printf("STATUS %s: COMPARE\n", ent->name);
175 EINA_LIST_FOREACH(_base_dirs, itr, base_dir)
176 {
177 sprintf(path, "%s/%s.exu", base_dir, ent->name);
178 if (ecore_file_exists(path))
179 {
180 char *currentdir;
181 sprintf(origdir, "%s/%s/%s", _dest_dir, CURRENT_SUBDIR, ORIG_SUBDIR);
182 mkdir(origdir, 0744);
183 _exu_imgs_unpack(path, origdir, ent->name);
184 sprintf(path, "%s/%s/%s.exu", _dest_dir, CURRENT_SUBDIR, ent->name);
185 currentdir = alloca(strlen(_dest_dir) + 20);
186 sprintf(currentdir, "%s/%s", _dest_dir, CURRENT_SUBDIR);
187 _exu_imgs_unpack(path, currentdir, ent->name);
188 goto found;
189 }
190 else
191 {
192 sprintf(path, "%s/%s.rec", base_dir, ent->name);
193 if (ecore_file_exists(path))
194 {
195 sprintf(origdir, "%s/%s", _dest_dir, ORIG_SUBDIR);
196 goto found;
197 }
198 }
199 }
200found:
201 do
202 {
203 sprintf(path, "%s/%s%c%.3d.png", origdir, ent->name, SHOT_DELIMITER, n);
204 if (ecore_file_exists(path))
205 {
206 sprintf(path, "%s%c%.3d.png", ent->name, SHOT_DELIMITER, n);
207 if (_file_compare(origdir, path)) nb_fails++;
208 }
209 else break;
210 n++;
211 } while (EINA_TRUE);
212 if (!nb_fails)
213 printf("STATUS %s: END - SUCCESS\n", ent->name);
214 else
215 printf("STATUS %s: END - FAIL (%d/%d)\n", ent->name, nb_fails, n - 1);
216}
217
218#define CONFIG "ELM_SCALE=1 ELM_FINGER_SIZE=10 "
219static Eina_Bool
220_run_command_prepare(const List_Entry *ent, char *buf)
221{
222 char scn_path[EXACTNESS_PATH_MAX];
223 Eina_Strbuf *sbuf;
224 const char *base_dir;
225 Eina_List *itr;
226 Eina_Bool is_exu;
227 EINA_LIST_FOREACH(_base_dirs, itr, base_dir)
228 {
229 is_exu = EINA_TRUE;
230 sprintf(scn_path, "%s/%s.exu", base_dir, ent->name);
231 if (ecore_file_exists(scn_path)) goto ok;
232 else
233 {
234 is_exu = EINA_FALSE;
235 sprintf(scn_path, "%s/%s.rec", base_dir, ent->name);
236 if (ecore_file_exists(scn_path)) goto ok;
237 }
238 }
239 fprintf(stderr, "Test %s not found in the provided base directories\n", ent->name);
240 return EINA_FALSE;
241ok:
242 sbuf = eina_strbuf_new();
243 printf("STATUS %s: START\n", ent->name);
244 eina_strbuf_append_printf(sbuf,
245 "%s exactness_play %s %s%s %s%.*s %s%s%s-t '%s' ",
246 _wrap_command ? _wrap_command : "",
247 _mode == RUN_SIMULATION ? "-s" : "",
248 _fonts_dir ? "-f " : "", _fonts_dir ? _fonts_dir : "",
249 _verbose ? "-" : "", _verbose, "vvvvvvvvvv",
250 _scan_objs ? "--scan-objects " : "",
251 _disable_screenshots ? "--disable-screenshots " : "",
252 _stabilize_shots ? "--stabilize-shots " : "",
253 scn_path
254 );
255 if (is_exu)
256 {
257 if (_mode == RUN_PLAY)
258 eina_strbuf_append_printf(sbuf, "-o '%s/%s/%s.exu' ", _dest_dir, CURRENT_SUBDIR, ent->name);
259 if (_mode == RUN_INIT)
260 eina_strbuf_append_printf(sbuf, "-o '%s' ", scn_path);
261 }
262 else
263 {
264 if (_mode == RUN_PLAY)
265 eina_strbuf_append_printf(sbuf, "-o '%s/%s' ", _dest_dir, CURRENT_SUBDIR);
266 if (_mode == RUN_INIT)
267 eina_strbuf_append_printf(sbuf, "-o '%s/%s' ", _dest_dir, ORIG_SUBDIR);
268 }
269 if (ent->command)
270 {
271 eina_strbuf_append(sbuf, "-- ");
272 eina_strbuf_append(sbuf, CONFIG);
273 eina_strbuf_append(sbuf, ent->command);
274 }
275 strncpy(buf, eina_strbuf_string_get(sbuf), SCHEDULER_CMD_SIZE-1);
276 eina_strbuf_free(sbuf);
277 _printf(1, "Command: %s\n", buf);
278 return EINA_TRUE;
279}
280
281static void
282_job_compare(void *data)
283{
284 _run_test_compare(data);
285
286 _running_jobs--;
287 _job_consume();
288 /* If all jobs are done. */
289 if (!_running_jobs) ecore_main_loop_quit();
290}
291
292static Eina_Bool
293_job_deleted_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
294{
295 Ecore_Exe_Event_Del *msg = (Ecore_Exe_Event_Del *) event;
296 List_Entry *ent = ecore_exe_data_get(msg->exe);
297
298 if ((msg->exit_code != 0) || (msg->exit_signal != 0))
299 {
300 _errors = eina_list_append(_errors, ent);
301 }
302
303 if (_mode == RUN_PLAY)
304 {
305 ecore_job_add(_job_compare, ent);
306 }
307 else
308 {
309 _running_jobs--;
310 _job_consume();
311 if (!_running_jobs) ecore_main_loop_quit();
312 }
313
314 return ECORE_CALLBACK_RENEW;
315}
316
317static Eina_Bool
318_job_consume()
319{
320 static Ecore_Event_Handler *job_del_callback_handler = NULL;
321 char buf[SCHEDULER_CMD_SIZE];
322 List_Entry *ent = _next_test_to_run;
323
324 if (_running_jobs == _max_jobs) return EINA_FALSE;
325 if (!ent) return EINA_FALSE;
326
327 if (_run_command_prepare(ent, buf))
328 {
329 _running_jobs++;
330 _tests_executed++;
331
332 if (!job_del_callback_handler)
333 {
334 job_del_callback_handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL,
335 _job_deleted_cb, NULL);
336 }
337
338 if (!ecore_exe_pipe_run(buf, ECORE_EXE_TERM_WITH_PARENT, ent))
339 {
340 fprintf(stderr, "Failed executing test '%s'\n", ent->name);
341 }
342 }
343 _next_test_to_run = EINA_INLIST_CONTAINER_GET(
344 EINA_INLIST_GET(ent)->next, List_Entry);
345
346
347 return EINA_TRUE;
348}
349
350static void
351_scheduler_run()
352{
353 while (_job_consume());
354}
355
356static List_Entry *
357_list_file_load(const char *filename)
358{
359 List_Entry *ret = NULL;
360 char buf[BUF_SIZE] = "";
361 FILE *file;
362 file = fopen(filename, "r");
363 if (!file)
364 {
365 perror("Failed opening list file");
366 return NULL;
367 }
368
369 while (fgets(buf, BUF_SIZE, file))
370 {
371 /* Skip comment/empty lines. */
372 if ((*buf == '#') || (*buf == '\n') || (!*buf))
373 continue;
374
375 char *tmp;
376 List_Entry *cur = calloc(1, sizeof(*cur));
377 cur->name = strdup(buf);
378
379 /* Set the command to the second half and put a \0 in between. */
380 tmp = strchr(cur->name, ' ');
381 if (tmp)
382 {
383 *tmp = '\0';
384 cur->command = tmp + 1;
385 }
386 else
387 {
388 /* FIXME: error. */
389 cur->command = "";
390 }
391
392 /* Replace the newline char with a \0. */
393 tmp = strchr(cur->command, '\n');
394 if (tmp)
395 {
396 *tmp = '\0';
397 }
398
399 ret = EINA_INLIST_CONTAINER_GET(
400 eina_inlist_append(EINA_INLIST_GET(ret), EINA_INLIST_GET(cur)),
401 List_Entry);
402 }
403
404 return ret;
405}
406
407static void
408_list_file_free(List_Entry *list)
409{
410 while (list)
411 {
412 List_Entry *ent = list;
413 list = EINA_INLIST_CONTAINER_GET(EINA_INLIST_GET(list)->next,
414 List_Entry);
415
416 free(ent->name);
417 free(ent);
418 /* we don't free ent->command because it's allocated together. */
419 }
420}
421
422static int
423_errors_sort_cb(List_Entry *a, List_Entry *b)
424{
425 return strcmp(a->name, b->name);
426}
427
428static const Ecore_Getopt optdesc = {
429 "exactness",
430 "%prog [options] <-r|-p|-i|-s> <list file>",
431 PACKAGE_VERSION,
432 "(C) 2013 Enlightenment",
433 "BSD",
434 "A pixel perfect test suite for EFL based applications.",
435 0,
436 {
437 ECORE_GETOPT_APPEND('b', "base-dir", "The location of the exu/rec files.", ECORE_GETOPT_TYPE_STR),
438 ECORE_GETOPT_STORE_STR('o', "output", "The location of the images."),
439 ECORE_GETOPT_STORE_STR('w', "wrap", "Use a custom command to launch the tests (e.g valgrind)."),
440 ECORE_GETOPT_STORE_USHORT('j', "jobs", "The number of jobs to run in parallel."),
441 ECORE_GETOPT_STORE_TRUE('p', "play", "Run in play mode."),
442 ECORE_GETOPT_STORE_TRUE('i', "init", "Run in init mode."),
443 ECORE_GETOPT_STORE_TRUE('s', "simulation", "Run in simulation mode."),
444 ECORE_GETOPT_STORE_TRUE(0, "scan-objects", "Extract information of all the objects at every shot."),
445 ECORE_GETOPT_STORE_TRUE(0, "disable-screenshots", "Disable screenshots."),
446 ECORE_GETOPT_STORE_STR('f', "fonts-dir", "Specify a directory of the fonts that should be used."),
447 ECORE_GETOPT_STORE_TRUE(0, "stabilize-shots", "Wait for the frames to be stable before taking the shots."),
448 ECORE_GETOPT_COUNT('v', "verbose", "Turn verbose messages on."),
449
450 ECORE_GETOPT_LICENSE('L', "license"),
451 ECORE_GETOPT_COPYRIGHT('C', "copyright"),
452 ECORE_GETOPT_VERSION('V', "version"),
453 ECORE_GETOPT_HELP('h', "help"),
454 ECORE_GETOPT_SENTINEL
455 }
456};
457
458int
459main(int argc, char *argv[])
460{
461 int ret = 0;
462 List_Entry *test_list;
463 int args = 0;
464 const char *list_file;
465 Eina_List *itr;
466 const char *base_dir;
467 char tmp[EXACTNESS_PATH_MAX];
468 Eina_Bool mode_play = EINA_FALSE, mode_init = EINA_FALSE, mode_simulation = EINA_FALSE;
469 Eina_Bool want_quit = EINA_FALSE, scan_objs = EINA_FALSE;
470 Ecore_Getopt_Value values[] = {
471 ECORE_GETOPT_VALUE_LIST(_base_dirs),
472 ECORE_GETOPT_VALUE_STR(_dest_dir),
473 ECORE_GETOPT_VALUE_STR(_wrap_command),
474 ECORE_GETOPT_VALUE_USHORT(_max_jobs),
475 ECORE_GETOPT_VALUE_BOOL(mode_play),
476 ECORE_GETOPT_VALUE_BOOL(mode_init),
477 ECORE_GETOPT_VALUE_BOOL(mode_simulation),
478 ECORE_GETOPT_VALUE_BOOL(scan_objs),
479 ECORE_GETOPT_VALUE_BOOL(_disable_screenshots),
480 ECORE_GETOPT_VALUE_STR(_fonts_dir),
481 ECORE_GETOPT_VALUE_BOOL(_stabilize_shots),
482 ECORE_GETOPT_VALUE_INT(_verbose),
483
484 ECORE_GETOPT_VALUE_BOOL(want_quit),
485 ECORE_GETOPT_VALUE_BOOL(want_quit),
486 ECORE_GETOPT_VALUE_BOOL(want_quit),
487 ECORE_GETOPT_VALUE_BOOL(want_quit),
488 ECORE_GETOPT_VALUE_NONE
489 };
490
491 ecore_evas_init();
492 _dest_dir = "./";
493 _scan_objs = scan_objs;
494
495 args = ecore_getopt_parse(&optdesc, values, argc, argv);
496 if (args < 0)
497 {
498 fprintf(stderr, "Failed parsing arguments.\n");
499 ret = 1;
500 goto end;
501 }
502 else if (want_quit)
503 {
504 ret = 1;
505 goto end;
506 }
507 else if (args == argc)
508 {
509 fprintf(stderr, "Expected test list as the last argument..\n");
510 ecore_getopt_help(stderr, &optdesc);
511 ret = 1;
512 goto end;
513 }
514 else if (mode_play + mode_init + mode_simulation != 1)
515 {
516 fprintf(stderr, "At least and only one of the running modes can be set.\n");
517 ecore_getopt_help(stderr, &optdesc);
518 ret = 1;
519 goto end;
520 }
521
522 if (!_base_dirs) _base_dirs = eina_list_append(NULL, "./recordings");
523
524 list_file = argv[args];
525
526 /* Load the list file and start iterating over the records. */
527 test_list = _list_file_load(list_file);
528 _next_test_to_run = test_list;
529
530 if (!test_list)
531 {
532 fprintf(stderr, "No matching tests found in '%s'\n", list_file);
533 ret = 1;
534 goto end;
535 }
536
537 /* Pre-run summary */
538 fprintf(stderr, "Running with settings:\n");
539 fprintf(stderr, "\tConcurrent jobs: %d\n", _max_jobs);
540 fprintf(stderr, "\tTest list: %s\n", list_file);
541 fprintf(stderr, "\tBase dirs:\n");
542 EINA_LIST_FOREACH(_base_dirs, itr, base_dir)
543 fprintf(stderr, "\t\t%s\n", base_dir);
544 fprintf(stderr, "\tDest dir: %s\n", _dest_dir);
545
546 if (mode_play)
547 {
548 _mode = RUN_PLAY;
549 if (snprintf(tmp, EXACTNESS_PATH_MAX, "%s/%s", _dest_dir, CURRENT_SUBDIR)
550 >= EXACTNESS_PATH_MAX)
551 {
552 fprintf(stderr, "Path too long: %s", tmp);
553 ret = 1;
554 goto end;
555 }
556 mkdir(tmp, 0744);
557 }
558 else if (mode_init)
559 {
560 _mode = RUN_INIT;
561 if (snprintf(tmp, EXACTNESS_PATH_MAX, "%s/%s", _dest_dir, ORIG_SUBDIR)
562 >= EXACTNESS_PATH_MAX)
563 {
564 fprintf(stderr, "Path too long: %s", tmp);
565 ret = 1;
566 goto end;
567 }
568 mkdir(tmp, 0744);
569 }
570 else if (mode_simulation)
571 {
572 _mode = RUN_SIMULATION;
573 }
574 _scheduler_run();
575
576
577 ecore_main_loop_begin();
578
579 /* Results */
580 printf("*******************************************************\n");
581 if (mode_play && EINA_FALSE)
582 {
583 List_Entry *list_itr;
584
585 EINA_INLIST_FOREACH(test_list, list_itr)
586 {
587 _run_test_compare(list_itr);
588 }
589 }
590
591 printf("Finished executing %u out of %u tests.\n",
592 _tests_executed,
593 eina_inlist_count(EINA_INLIST_GET(test_list)));
594 printf("%u tests executed\n", _tests_executed);
595 printf("%u tests had execution errors\n", eina_list_count(_errors));
596 printf("%u screenshots failed comparison\n", eina_list_count(_compare_errors));
597
598 /* Sort the errors and the compare_errors. */
599 _errors = eina_list_sort(_errors, 0, (Eina_Compare_Cb) _errors_sort_cb);
600 _compare_errors = eina_list_sort(_compare_errors, 0, (Eina_Compare_Cb) strcmp);
601
602 if (_errors || _compare_errors)
603 {
604 FILE *report_file;
605 char report_filename[EXACTNESS_PATH_MAX] = "";
606 /* Generate the filename. */
607 snprintf(report_filename, EXACTNESS_PATH_MAX,
608 "%s/%s/errors.html",
609 _dest_dir, mode_init ? ORIG_SUBDIR : CURRENT_SUBDIR);
610 report_file = fopen(report_filename, "w+");
611 if (report_file)
612 {
613 fprintf(report_file,
614 "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
615 "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head><title>Exactness report</title></head><body>");
616
617 if (_errors)
618 {
619 fprintf(report_file,
620 "<h1>Tests that failed execution:</h1><ul>");
621 List_Entry *ent;
622 printf("List of tests that failed execution:\n");
623 EINA_LIST_FOREACH(_errors, itr, ent)
624 {
625 printf("\t* %s\n", ent->name);
626
627 fprintf(report_file, "<li>%s</li>", ent->name);
628 }
629 fprintf(report_file, "</ul>");
630 }
631
632 if (_compare_errors)
633 {
634 fprintf(report_file,
635 "<h1>Images that failed comparison: (Original, Current, Diff)</h1><ul>");
636 char *test_name;
637 printf("List of images that failed comparison:\n");
638 EINA_LIST_FREE(_compare_errors, test_name)
639 {
640 Eina_Bool is_from_exu;
641 char origpath[EXACTNESS_PATH_MAX];
642 snprintf(origpath, EXACTNESS_PATH_MAX, "%s/%s/orig/%s",
643 _dest_dir, CURRENT_SUBDIR, test_name);
644 is_from_exu = ecore_file_exists(origpath);
645 printf("\t* %s\n", test_name);
646
647 fprintf(report_file, "<li><h2>%s</h2> <img src='%sorig/%s' alt='Original' /> <img src='%s' alt='Current' /> <img src='comp_%s' alt='Diff' /></li>",
648 test_name, is_from_exu ? "" : "../",
649 test_name, test_name, test_name);
650 free(test_name);
651 }
652 fprintf(report_file, "</ul>");
653 }
654 fprintf(report_file,
655 "</body></html>");
656
657 printf("Report html: %s\n", report_filename);
658 ret = 1;
659 }
660 else
661 {
662 perror("Failed opening report file");
663 }
664 }
665
666 _list_file_free(test_list);
667end:
668 ecore_evas_shutdown();
669
670 return ret;
671}
diff --git a/src/bin/exactness/injector.c b/src/bin/exactness/injector.c
new file mode 100644
index 0000000..8b73ff5
--- /dev/null
+++ b/src/bin/exactness/injector.c
@@ -0,0 +1,467 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <stdio.h>
6#include <stdlib.h>
7#include <getopt.h>
8#include <unistd.h>
9
10#include <Eina.h>
11#include <Eet.h>
12#include <Ecore.h>
13#include <Ecore_Getopt.h>
14#include <Elementary.h>
15
16#include <Exactness.h>
17
18typedef struct
19{
20 Eina_Debug_Session *session;
21 int srcid;
22 void *buffer;
23 unsigned int size;
24} _Main_Loop_Info;
25
26#define WRAPPER_TO_XFER_MAIN_LOOP(foo) \
27static void \
28_intern_main_loop ## foo(void *data) \
29{ \
30 _Main_Loop_Info *info = data; \
31 _main_loop ## foo(info->session, info->srcid, info->buffer, info->size); \
32 free(info->buffer); \
33 free(info); \
34} \
35static Eina_Bool \
36foo(Eina_Debug_Session *session, int srcid, void *buffer, int size) \
37{ \
38 _Main_Loop_Info *info = calloc(1, sizeof(*info)); \
39 info->session = session; \
40 info->srcid = srcid; \
41 info->size = size; \
42 if (info->size) \
43 { \
44 info->buffer = malloc(info->size); \
45 memcpy(info->buffer, buffer, info->size); \
46 } \
47 ecore_main_loop_thread_safe_call_async(_intern_main_loop ## foo, info); \
48 return EINA_TRUE; \
49}
50
51#ifndef WORDS_BIGENDIAN
52#define SWAP_64(x) x
53#define SWAP_32(x) x
54#define SWAP_16(x) x
55#define SWAP_DBL(x) x
56#else
57#define SWAP_64(x) eina_swap64(x)
58#define SWAP_32(x) eina_swap32(x)
59#define SWAP_16(x) eina_swap16(x)
60#define SWAP_DBL(x) SWAP_64(x)
61#endif
62
63#define EXTRACT_INT(_buf) \
64({ \
65 int __i; \
66 memcpy(&__i, _buf, sizeof(int)); \
67 _buf += sizeof(int); \
68 SWAP_32(__i); \
69})
70
71#define STORE_INT(_buf, __i) \
72{ \
73 int __i2 = SWAP_32(__i); \
74 memcpy(_buf, &__i2, sizeof(int)); \
75 _buf += sizeof(int); \
76}
77
78#define STORE_DOUBLE(_buf, __d) \
79{ \
80 double __d2 = SWAP_DBL(__d); \
81 memcpy(_buf, &__d2, sizeof(double)); \
82 _buf += sizeof(double); \
83}
84
85#define STORE_STRING(_buf, __s) \
86{ \
87 int __len = (__s ? strlen(__s) : 0) + 1; \
88 if (__s) memcpy(_buf, __s, __len); \
89 else *_buf = '\0'; \
90 _buf += __len; \
91}
92
93static Eina_Stringshare *_src_filename = NULL;
94static Exactness_Unit *_src_unit = NULL;
95static int _verbose = 0;
96
97static Eina_Debug_Session *_session = NULL;
98static int _cid = -1, _pid = -1;
99static Eina_List *_cur_event_list = NULL;
100
101static int _all_apps_get_op = EINA_DEBUG_OPCODE_INVALID;
102static int _mouse_in_op = EINA_DEBUG_OPCODE_INVALID;
103static int _mouse_out_op = EINA_DEBUG_OPCODE_INVALID;
104static int _mouse_wheel_op = EINA_DEBUG_OPCODE_INVALID;
105static int _multi_down_op = EINA_DEBUG_OPCODE_INVALID;
106static int _multi_up_op = EINA_DEBUG_OPCODE_INVALID;
107static int _multi_move_op = EINA_DEBUG_OPCODE_INVALID;
108static int _key_down_op = EINA_DEBUG_OPCODE_INVALID;
109static int _key_up_op = EINA_DEBUG_OPCODE_INVALID;
110static int _take_shot_op = EINA_DEBUG_OPCODE_INVALID;
111static int _efl_event_op = EINA_DEBUG_OPCODE_INVALID;
112static int _click_on_op = EINA_DEBUG_OPCODE_INVALID;
113static int _stabilize_op = EINA_DEBUG_OPCODE_INVALID;
114static int _finish_op = EINA_DEBUG_OPCODE_INVALID;
115
116static Eina_Bool _all_apps_get_cb(Eina_Debug_Session *, int , void *, int);
117
118EINA_DEBUG_OPCODES_ARRAY_DEFINE(_debug_ops,
119 {"Daemon/Client/register_observer", &_all_apps_get_op, NULL},
120 {"Daemon/Client/added", NULL, &_all_apps_get_cb},
121 {"Exactness/Actions/Mouse In", &_mouse_in_op, NULL},
122 {"Exactness/Actions/Mouse Out", &_mouse_out_op, NULL},
123 {"Exactness/Actions/Mouse Wheel", &_mouse_wheel_op, NULL},
124 {"Exactness/Actions/Multi Down", &_multi_down_op, NULL},
125 {"Exactness/Actions/Multi Up", &_multi_up_op, NULL},
126 {"Exactness/Actions/Multi Move", &_multi_move_op, NULL},
127 {"Exactness/Actions/Key Down", &_key_down_op, NULL},
128 {"Exactness/Actions/Key Up", &_key_up_op, NULL},
129 {"Exactness/Actions/Take Shot", &_take_shot_op, NULL},
130 {"Exactness/Actions/EFL Event", &_efl_event_op, NULL},
131 {"Exactness/Actions/Click On", &_click_on_op, NULL},
132 {"Exactness/Actions/Stabilize", &_stabilize_op, NULL},
133 {"Exactness/Actions/Finish", &_finish_op, NULL},
134 {NULL, NULL, NULL}
135 );
136
137static void
138_printf(int verbose, const char *fmt, ...)
139{
140 va_list ap;
141 if (!_verbose || verbose > _verbose) return;
142
143 va_start(ap, fmt);
144 vprintf(fmt, ap);
145 va_end(ap);
146}
147
148static void
149_feed_event(Exactness_Action_Type type, unsigned int n_evas, void *data)
150{
151 switch (type)
152 {
153 case EXACTNESS_ACTION_MOUSE_IN:
154 {
155 _printf(1, "Mouse in\n");
156 _printf(2, "%s evas_event_feed_mouse_in n_evas=<%d>\n", __func__, n_evas);
157 eina_debug_session_send(_session, _cid, _mouse_in_op, &n_evas, sizeof(int));
158 break;
159 }
160 case EXACTNESS_ACTION_MOUSE_OUT:
161 {
162 _printf(1, "Mouse out\n");
163 _printf(2, "%s evas_event_feed_mouse_out n_evas=<%d>\n", __func__, n_evas);
164 eina_debug_session_send(_session, _cid, _mouse_out_op, &n_evas, sizeof(int));
165 break;
166 }
167 case EXACTNESS_ACTION_MOUSE_WHEEL:
168 {
169 Exactness_Action_Mouse_Wheel *t = data;
170 int len = 3*sizeof(int);
171 char *buf = malloc(len), *tmp = buf;
172 _printf(1, "Mouse wheel\n");
173 _printf(2, "%s evas_event_feed_mouse_wheel n_evas=<%d>\n", __func__, n_evas);
174 STORE_INT(tmp, n_evas);
175 STORE_INT(tmp, t->direction);
176 STORE_INT(tmp, t->z);
177 eina_debug_session_send(_session, _cid, _mouse_wheel_op, buf, len);
178 break;
179 }
180 case EXACTNESS_ACTION_MULTI_DOWN:
181 case EXACTNESS_ACTION_MULTI_UP:
182 {
183 Exactness_Action_Multi_Event *t = data;
184 int len = 5*sizeof(int)+7*sizeof(double)+sizeof(int);
185 char *buf = malloc(len), *tmp = buf;
186 _printf(2, "%s %s n_evas=<%d>\n", __func__,
187 type == EXACTNESS_ACTION_MULTI_DOWN ? "evas_event_feed_multi_down" :
188 "evas_event_feed_multi_up", n_evas);
189 STORE_INT(tmp, n_evas);
190 STORE_INT(tmp, t->d);
191 STORE_INT(tmp, t->b);
192 STORE_INT(tmp, t->x);
193 STORE_INT(tmp, t->y);
194 STORE_DOUBLE(tmp, t->rad);
195 STORE_DOUBLE(tmp, t->radx);
196 STORE_DOUBLE(tmp, t->rady);
197 STORE_DOUBLE(tmp, t->pres);
198 STORE_DOUBLE(tmp, t->ang);
199 STORE_DOUBLE(tmp, t->fx);
200 STORE_DOUBLE(tmp, t->fy);
201 STORE_INT(tmp, t->flags);
202 eina_debug_session_send(_session, _cid,
203 type == EXACTNESS_ACTION_MULTI_DOWN ? _multi_down_op : _multi_up_op,
204 buf, len);
205 break;
206 }
207 case EXACTNESS_ACTION_MULTI_MOVE:
208 {
209 Exactness_Action_Multi_Move *t = data;
210 int len = 4*sizeof(int)+7*sizeof(double);
211 char *buf = malloc(len), *tmp = buf;
212 _printf(2, "%s evas_event_feed_multi_move n_evas=<%d>\n", __func__, n_evas);
213 STORE_INT(tmp, n_evas);
214 STORE_INT(tmp, t->d);
215 STORE_INT(tmp, t->x);
216 STORE_INT(tmp, t->y);
217 STORE_DOUBLE(tmp, t->rad);
218 STORE_DOUBLE(tmp, t->radx);
219 STORE_DOUBLE(tmp, t->rady);
220 STORE_DOUBLE(tmp, t->pres);
221 STORE_DOUBLE(tmp, t->ang);
222 STORE_DOUBLE(tmp, t->fx);
223 STORE_DOUBLE(tmp, t->fy);
224 eina_debug_session_send(_session, _cid, _multi_move_op, buf, len);
225 break;
226 }
227 case EXACTNESS_ACTION_KEY_DOWN:
228 case EXACTNESS_ACTION_KEY_UP:
229 {
230 Exactness_Action_Key_Down_Up *t = data;
231 int len = 2*sizeof(int) + 4;
232 len += t->keyname ? strlen(t->keyname) : 0;
233 len += t->key ? strlen(t->key) : 0;
234 len += t->string ? strlen(t->string) : 0;
235 len += t->compose ? strlen(t->compose) : 0;
236 char *buf = malloc(len), *tmp = buf;
237 _printf(2, "%s %s n_evas=<%d>\n", __func__,
238 type == EXACTNESS_ACTION_KEY_DOWN ? "evas_event_feed_key_down " :
239 "evas_event_feed_key_up", n_evas);
240 STORE_INT(tmp, n_evas);
241 STORE_STRING(tmp, t->keyname);
242 STORE_STRING(tmp, t->key);
243 STORE_STRING(tmp, t->string);
244 STORE_STRING(tmp, t->compose);
245 STORE_INT(tmp, t->keycode);
246 eina_debug_session_send(_session, _cid,
247 type == EXACTNESS_ACTION_KEY_DOWN ? _key_down_op : _key_up_op,
248 buf, len);
249 break;
250 }
251 case EXACTNESS_ACTION_TAKE_SHOT:
252 {
253 _printf(2, "%s take shot n_evas=<%d>\n", __func__, n_evas);
254 eina_debug_session_send(_session, _cid, _take_shot_op, &n_evas, sizeof(int));
255 break;
256 }
257 case EXACTNESS_ACTION_EFL_EVENT:
258 {
259 Exactness_Action_Efl_Event *t = data;
260 int len = 0;
261 len += t->wdg_name ? strlen(t->wdg_name) : 0;
262 len += t->event_name ? strlen(t->event_name) : 0;
263 char *buf = malloc(len), *tmp = buf;
264 _printf(2, "%s %s\n", __func__, "EFL event");
265 STORE_STRING(tmp, t->wdg_name);
266 STORE_STRING(tmp, t->event_name);
267 eina_debug_session_send(_session, _cid, _efl_event_op, buf, len);
268 break;
269 }
270 case EXACTNESS_ACTION_CLICK_ON:
271 {
272 Exactness_Action_Click_On *t = data;
273 int len = 0;
274 len += t->wdg_name ? strlen(t->wdg_name) : 0;
275 char *buf = malloc(len), *tmp = buf;
276 _printf(2, "%s %s\n", __func__, "Click On");
277 STORE_STRING(tmp, t->wdg_name);
278 eina_debug_session_send(_session, _cid, _click_on_op, buf, len);
279 break;
280 }
281 case EXACTNESS_ACTION_STABILIZE:
282 {
283 _printf(2, "%s stabilize\n", __func__);
284 eina_debug_session_send(_session, _cid, _stabilize_op, NULL, 0);
285 break;
286 }
287 default: /* All non-input events are not handeled */
288 break;
289 }
290}
291
292static Eina_Bool
293_feed_event_timer_cb(void *data EINA_UNUSED)
294{
295 Exactness_Action *act = eina_list_data_get(_cur_event_list);
296 _feed_event(act->type, act->n_evas, act->data);
297
298 _cur_event_list = eina_list_next(_cur_event_list);
299
300 if (!_cur_event_list)
301 { /* Finished reading all events */
302 eina_debug_session_send(_session, _cid, _finish_op, NULL, 0);
303 ecore_main_loop_quit();
304 }
305 else
306 {
307 Exactness_Action *cur_act = eina_list_data_get(_cur_event_list);
308 ecore_timer_add(cur_act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
309 }
310 return ECORE_CALLBACK_CANCEL;
311}
312
313static Eina_Bool
314_src_open()
315{
316 double diff_time = 0; /* Time to wait before feeding the first event */
317
318 _printf(2, "<%s> Source file is <%s>\n", __func__, _src_filename);
319 if (!strcmp(_src_filename + strlen(_src_filename) - 4,".exu"))
320 {
321 _src_unit = exactness_unit_file_read(_src_filename);
322 }
323 else if (!strcmp(_src_filename + strlen(_src_filename) - 4,".rec"))
324 {
325 _src_unit = legacy_rec_file_read(_src_filename);
326 }
327 if (!_src_unit) return EINA_FALSE;
328 _cur_event_list = _src_unit->actions;
329 Exactness_Action *act = eina_list_data_get(_cur_event_list);
330
331 if (act->delay_ms)
332 {
333 _printf(2, " Waiting <%f>\n", diff_time);
334 ecore_timer_add(act->delay_ms / 1000.0, _feed_event_timer_cb, NULL);
335 }
336 else
337 {
338 _feed_event_timer_cb(NULL);
339 }
340 return EINA_TRUE;
341}
342
343static void
344_main_loop_all_apps_get_cb(Eina_Debug_Session *session EINA_UNUSED, int srcid EINA_UNUSED, void *buffer, int size EINA_UNUSED)
345{
346 char *buf = buffer;
347 int chosen_cid = -1;
348 if (_cid != -1) return;
349 while (size > 0)
350 {
351 int cid, pid, len;
352 cid = EXTRACT_INT(buf);
353 pid = EXTRACT_INT(buf);
354 if (_pid != -1)
355 {
356 if (_pid == pid)
357 {
358 _cid = cid;
359 _src_open();
360 return;
361 }
362 }
363 else
364 {
365 if (!strcmp(buf, "exactness_play"))
366 {
367 if (chosen_cid != -1)
368 {
369 fprintf(stderr, "Need to specify a PID - too much choice\n");
370 return;
371 }
372 chosen_cid = cid;
373 }
374 }
375 len = strlen(buf) + 1;
376 buf += len;
377 size -= (2 * sizeof(int) + len);
378 }
379 if (chosen_cid != -1)
380 {
381 _cid = chosen_cid;
382 _src_open();
383 }
384}
385
386WRAPPER_TO_XFER_MAIN_LOOP(_all_apps_get_cb)
387
388static void
389_ops_ready_cb(void *data EINA_UNUSED, Eina_Bool status)
390{
391 if (status)
392 eina_debug_session_send(_session, 0, _all_apps_get_op, NULL, 0);
393}
394
395static const Ecore_Getopt optdesc = {
396 "exactness_inject",
397 "%prog [options] <-v|-p|-t|-h> command",
398 PACKAGE_VERSION,
399 "(C) 2018 Enlightenment",
400 "BSD",
401 "A scenario events injector for EFL based applications.",
402 1,
403 {
404 ECORE_GETOPT_STORE_STR('t', "test", "Test to run on the given application"),
405 ECORE_GETOPT_STORE_INT('p', "pid", "PID of the application to connect to"),
406 ECORE_GETOPT_STORE_INT('r', "remote-port", "Port to connect remotely to the daemon. Local connection if not specified"),
407 ECORE_GETOPT_COUNT('v', "verbose", "Turn verbose messages on."),
408
409 ECORE_GETOPT_LICENSE('L', "license"),
410 ECORE_GETOPT_COPYRIGHT('C', "copyright"),
411 ECORE_GETOPT_VERSION('V', "version"),
412 ECORE_GETOPT_HELP('h', "help"),
413 ECORE_GETOPT_SENTINEL
414 }
415};
416
417int main(int argc, char **argv)
418{
419 int opt_args = 0, real__ = 1, port = -1;
420 char *src = NULL;
421 Eina_Value *ret__;
422 Eina_Bool want_quit = EINA_FALSE;
423
424 Ecore_Getopt_Value values[] = {
425 ECORE_GETOPT_VALUE_STR(src),
426 ECORE_GETOPT_VALUE_INT(_pid),
427 ECORE_GETOPT_VALUE_INT(port),
428 ECORE_GETOPT_VALUE_INT(_verbose),
429
430 ECORE_GETOPT_VALUE_BOOL(want_quit),
431 ECORE_GETOPT_VALUE_BOOL(want_quit),
432 ECORE_GETOPT_VALUE_BOOL(want_quit),
433 ECORE_GETOPT_VALUE_BOOL(want_quit),
434 ECORE_GETOPT_VALUE_NONE
435 };
436
437 ecore_evas_init();
438
439 opt_args = ecore_getopt_parse(&optdesc, values, argc, argv);
440 if (opt_args < 0)
441 {
442 fprintf(stderr, "Failed parsing arguments.\n");
443 goto end;
444 }
445 if (want_quit) goto end;
446
447 if (!src)
448 {
449 fprintf(stderr, "no test file specified\n");
450 goto end;
451 }
452 _src_filename = eina_stringshare_add(src);
453
454 if (port == -1)
455 _session = eina_debug_local_connect(EINA_TRUE);
456 else
457 _session = eina_debug_remote_connect(port);
458 eina_debug_opcodes_register(_session, _debug_ops(), _ops_ready_cb, NULL);
459
460 elm_init(argc, argv);
461 ret__ = efl_loop_begin(efl_main_loop_get());
462 real__ = efl_loop_exit_code_process(ret__);
463 elm_shutdown();
464end:
465 ecore_evas_shutdown();
466 return real__;
467}
diff --git a/src/bin/exactness/inspect.c b/src/bin/exactness/inspect.c
new file mode 100644
index 0000000..64f5d17
--- /dev/null
+++ b/src/bin/exactness/inspect.c
@@ -0,0 +1,1643 @@
1#ifdef HAVE_CONFIG_H
2# include <config.h>
3#endif
4
5#include <Ecore.h>
6#include <Ecore_Getopt.h>
7#include <Ecore_Evas.h>
8#include <Elementary.h>
9#include <Exactness.h>
10#include <Efl_Ui.h>
11
12#define LDIFF(x) "<b><color=#F0F>"#x"</color></b>"
13#define RDIFF(x) "<b><color=#0FF>"#x"</color></b>"
14
15typedef enum
16{
17 EX_FONTS_DIR,
18 EX_SCENARIO,
19 EX_IMAGE,
20 EX_OBJ_INFO
21} _Data_Type;
22
23typedef struct
24{
25 void *p1;
26 void *p2;
27 _Data_Type dt;
28} _Compare_Item_Data;
29
30typedef struct
31{
32 void *ex_parent;
33 Eo *gl_item;
34} _Item_Info;
35
36static Eo *_main_box = NULL;
37static Eina_List *_gls = NULL;
38static Eina_List *_units = NULL;
39static Eo *_comp_selected_item = NULL;
40
41static Elm_Genlist_Item_Class *_grp_itc = NULL, *_scn_itc = NULL, *_img_itc = NULL;
42static Elm_Genlist_Item_Class *_objs_itc = NULL, *_obj_itc = NULL;
43
44static Eina_Hash *_item_infos_hash = NULL;
45
46static Eina_Bool _show_only_diffs = EINA_FALSE;
47static Eina_List *_comp_vvs = NULL;
48
49static Eina_List *_modified_units = NULL;
50
51static const char *
52_action_name_get(Exactness_Action *act)
53{
54 if (!act) return NULL;
55 switch(act->type)
56 {
57 case EXACTNESS_ACTION_MOUSE_IN: return "Mouse In";
58 case EXACTNESS_ACTION_MOUSE_OUT: return "Mouse Out";
59 case EXACTNESS_ACTION_MOUSE_WHEEL: return "Mouse Wheel";
60 case EXACTNESS_ACTION_MULTI_DOWN: return "Multi Down";
61 case EXACTNESS_ACTION_MULTI_UP: return "Multi Up";
62 case EXACTNESS_ACTION_MULTI_MOVE: return "Multi Move";
63 case EXACTNESS_ACTION_KEY_DOWN: return "Key Down";
64 case EXACTNESS_ACTION_KEY_UP: return "Key Up";
65 case EXACTNESS_ACTION_TAKE_SHOT: return "Take shot";
66 case EXACTNESS_ACTION_EFL_EVENT: return "EFL Event";
67 case EXACTNESS_ACTION_CLICK_ON: return "Click On";
68 case EXACTNESS_ACTION_STABILIZE: return "Stabilize";
69 default: return NULL;
70 }
71}
72
73static int
74_event_struct_len_get(Exactness_Action_Type type)
75{
76 switch(type)
77 {
78 case EXACTNESS_ACTION_MOUSE_WHEEL:
79 return sizeof(Exactness_Action_Mouse_Wheel);
80 case EXACTNESS_ACTION_MULTI_DOWN:
81 case EXACTNESS_ACTION_MULTI_UP:
82 return sizeof(Exactness_Action_Multi_Event);
83 case EXACTNESS_ACTION_MULTI_MOVE:
84 return sizeof(Exactness_Action_Multi_Move);
85 case EXACTNESS_ACTION_KEY_DOWN:
86 case EXACTNESS_ACTION_KEY_UP:
87 return sizeof(Exactness_Action_Key_Down_Up);
88 case EXACTNESS_ACTION_EFL_EVENT:
89 return sizeof(Exactness_Action_Efl_Event);
90 case EXACTNESS_ACTION_CLICK_ON:
91 return sizeof(Exactness_Action_Click_On);
92 default: return 0;
93 }
94}
95
96static void
97_action_specific_info_get(const Exactness_Action *act, char output[1024])
98{
99 switch(act->type)
100 {
101 case EXACTNESS_ACTION_MOUSE_WHEEL:
102 {
103 Exactness_Action_Mouse_Wheel *t = act->data;
104 sprintf(output, "Direction %d Z %d", t->direction, t->z);
105 break;
106 }
107 case EXACTNESS_ACTION_MULTI_UP:
108 case EXACTNESS_ACTION_MULTI_DOWN:
109 {
110 Exactness_Action_Multi_Event *t = act->data;
111 if (!t->d)
112 sprintf(output, "Button %d Flags %d", t->b, t->flags);
113 else
114 sprintf(output, "D %d X %d Y %d Rad %f RadX %f RadY %f Pres %f Ang %f FX %f FY %f Flags %d",
115 t->d, t->x, t->y, t->rad, t->radx, t->rady, t->pres, t->ang, t->fx, t->fy, t->flags);
116 break;
117 }
118 case EXACTNESS_ACTION_MULTI_MOVE:
119 {
120 Exactness_Action_Multi_Move *t = act->data;
121 if (!t->d)
122 sprintf(output, "X %d Y %d", t->x, t->y);
123 else
124 sprintf(output, "D %d X %d Y %d Rad %f RadX %f RadY %f Pres %f Ang %f FX %f FY %f",
125 t->d, t->x, t->y, t->rad, t->radx, t->rady, t->pres, t->ang, t->fx, t->fy);
126 break;
127 }
128 case EXACTNESS_ACTION_KEY_UP:
129 case EXACTNESS_ACTION_KEY_DOWN:
130 {
131 Exactness_Action_Key_Down_Up *t = act->data;
132 sprintf(output, "Keyname %s Key %s String %s Compose %s Keycode %d",
133 t->keyname, t->key, t->string, t->compose, t->keycode);
134 break;
135 }
136 case EXACTNESS_ACTION_EFL_EVENT:
137 {
138 Exactness_Action_Efl_Event *t = act->data;
139 sprintf(output, "Widget %s Event %s", t->wdg_name, t->event_name);
140 break;
141 }
142 case EXACTNESS_ACTION_CLICK_ON:
143 {
144 Exactness_Action_Click_On *t = act->data;
145 sprintf(output, "Widget %s", t->wdg_name);
146 break;
147 }
148 default:
149 {
150 output[0] = '\0';
151 break;
152 }
153 }
154}
155
156static Eina_Bool
157_is_hook_duplicate(const Exactness_Action *cur_act, const Exactness_Action *prev_act)
158{
159 if (!prev_act) return EINA_FALSE;
160 if (cur_act->type == prev_act->type)
161 {
162 int len = _event_struct_len_get(cur_act->type);
163 return (!len || !memcmp(cur_act->data, prev_act->data, len));
164 }
165 return EINA_FALSE;
166}
167
168static Eina_Bool
169_are_scenario_entries_different(Exactness_Action *act1, Exactness_Action *act2)
170{
171 if (!act1 ^ !act2) return EINA_TRUE;
172 if (act1->type != act2->type) return EINA_TRUE;
173 switch(act1->type)
174 {
175 case EXACTNESS_ACTION_MOUSE_WHEEL:
176 return !!memcmp(act1->data, act2->data, sizeof(Exactness_Action_Mouse_Wheel));
177 case EXACTNESS_ACTION_MULTI_DOWN:
178 case EXACTNESS_ACTION_MULTI_UP:
179 return !!memcmp(act1->data, act2->data, sizeof(Exactness_Action_Multi_Event));
180 case EXACTNESS_ACTION_MULTI_MOVE:
181 return !!memcmp(act1->data, act2->data, sizeof(Exactness_Action_Multi_Move));
182 case EXACTNESS_ACTION_KEY_UP:
183 case EXACTNESS_ACTION_KEY_DOWN:
184 return !!memcmp(act1->data, act2->data, sizeof(Exactness_Action_Key_Down_Up));
185 case EXACTNESS_ACTION_EFL_EVENT:
186 {
187 Exactness_Action_Efl_Event *e1 = act1->data;
188 Exactness_Action_Efl_Event *e2 = act2->data;
189 return (!!strcmp(e1->wdg_name, e2->wdg_name) ||
190 !!strcmp(e1->event_name, e2->event_name));
191 }
192 case EXACTNESS_ACTION_CLICK_ON:
193 {
194 Exactness_Action_Click_On *e1 = act1->data;
195 Exactness_Action_Click_On *e2 = act2->data;
196 return (!!strcmp(e1->wdg_name, e2->wdg_name));
197 }
198 default:
199 return EINA_FALSE;
200 }
201 return EINA_FALSE;
202}
203
204static Eina_Bool
205_are_images_different(Exactness_Image *e_img1, Exactness_Image *e_img2)
206{
207 unsigned int w, h;
208 int *pxs1 = NULL;
209 int *pxs2 = NULL;
210 if (!e_img1 ^ !e_img2) return EINA_TRUE;
211 if (e_img1->w != e_img2->w) return EINA_TRUE;
212 if (e_img1->h != e_img2->h) return EINA_TRUE;
213 pxs1 = e_img1->pixels;
214 pxs2 = e_img2->pixels;
215 for (w = 0; w < e_img1->w; w++)
216 {
217 for (h = 0; h < e_img1->h; h++)
218 {
219 if (pxs1[h * e_img1->w + w] != pxs2[h * e_img1->w + w])
220 return EINA_TRUE;
221 }
222 }
223 return EINA_FALSE;
224}
225
226static Eina_Bool
227_are_objs_different(Exactness_Object *e_obj1, Exactness_Object *e_obj2, Eina_Bool check_objs)
228{
229 if (!e_obj1 ^ !e_obj2) return EINA_TRUE;
230 Eina_List *itr1 = e_obj1->children;
231 Eina_List *itr2 = e_obj2->children;
232 if (check_objs &&
233 (strcmp(e_obj1->kl_name, e_obj2->kl_name) ||
234 e_obj1->x != e_obj2->x || e_obj1->y != e_obj2->y ||
235 e_obj1->w != e_obj2->w || e_obj1->h != e_obj2->h)) return EINA_TRUE;
236 while (itr1 || itr2)
237 {
238 if ((!itr1) ^ (!itr2)) return EINA_TRUE;
239 e_obj1 = eina_list_data_get(itr1);
240 e_obj2 = eina_list_data_get(itr2);
241
242 if (_are_objs_different(e_obj1, e_obj2, EINA_TRUE)) return EINA_TRUE;
243
244 itr1 = eina_list_next(itr1);
245 itr2 = eina_list_next(itr2);
246 }
247 return EINA_FALSE;
248}
249
250static Eina_Bool
251_are_objs_trees_different(Exactness_Objects *e_objs1, Exactness_Objects *e_objs2)
252{
253 if (!e_objs1 ^ !e_objs2) return EINA_TRUE;
254 Eina_List *itr1 = e_objs1->objs;
255 Eina_List *itr2 = e_objs2->objs;
256 Exactness_Object *e_obj1, *e_obj2;
257 while (itr1 || itr2)
258 {
259 if ((!itr1) ^ (!itr2)) return EINA_TRUE;
260 e_obj1 = eina_list_data_get(itr1);
261 e_obj2 = eina_list_data_get(itr2);
262
263 if (_are_objs_different(e_obj1, e_obj2, EINA_TRUE)) return EINA_TRUE;
264
265 itr1 = eina_list_next(itr1);
266 itr2 = eina_list_next(itr2);
267 }
268 return EINA_FALSE;
269}
270
271static void
272_win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
273{
274 efl_exit(0); /* exit the program's main loop that runs in elm_run() */
275}
276
277static void
278_gui_win_create()
279{
280 Eo *win, *bg;
281
282 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
283 win = elm_win_add(NULL, "Window", ELM_WIN_BASIC);
284 evas_object_smart_callback_add(win, "delete,request", _win_del, NULL);
285 elm_win_maximized_set(win, EINA_TRUE);
286 elm_win_autodel_set(win, EINA_TRUE);
287 elm_win_title_set(win, "Exactness Inspector");
288 efl_gfx_entity_size_set(win, EINA_SIZE2D(1000, 800));
289
290 bg = elm_bg_add(win);
291 evas_object_size_hint_weight_set(bg, 1.000000, 1.000000);
292 efl_gfx_entity_visible_set(bg, EINA_TRUE);
293 elm_win_resize_object_add(win, bg);
294
295 _main_box = elm_box_add(win);
296 elm_box_horizontal_set(_main_box, EINA_TRUE);
297 elm_box_homogeneous_set(_main_box, EINA_TRUE);
298 evas_object_size_hint_weight_set(_main_box, 1.000000, 1.000000);
299 efl_gfx_entity_visible_set(_main_box, EINA_TRUE);
300 elm_win_resize_object_add(win, _main_box);
301
302 efl_gfx_entity_visible_set(win, EINA_TRUE);
303}
304
305static char *
306_grp_text_get(void *data, Evas_Object *gl, const char *part EINA_UNUSED)
307{
308 char buf[256];
309 const char *str = NULL;
310 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
311 _Data_Type dt = (_Data_Type) data;
312 switch (dt)
313 {
314 case EX_FONTS_DIR:
315 {
316 char buf2[256];
317 if (!compare)
318 {
319 Exactness_Unit *unit = efl_key_data_get(gl, "unit");
320 sprintf(buf2, "Fonts directory: %s", unit->fonts_path ? unit->fonts_path : "None");
321 }
322 else
323 {
324 Eo *gl1 = eina_list_nth(_gls, 0);
325 Eo *gl2 = eina_list_nth(_gls, 1);
326 Exactness_Unit *unit1 = efl_key_data_get(gl1, "unit");
327 Exactness_Unit *unit2 = efl_key_data_get(gl2, "unit");
328 if (!!unit1->fonts_path ^ !!unit2->fonts_path)
329 sprintf(buf2, "Fonts directory comparison: XXXXX");
330 else if (!strcmp(unit1->fonts_path, unit2->fonts_path))
331 sprintf(buf2, "Fonts directory comparison: %s", unit1->fonts_path);
332 else
333 sprintf(buf2, "Fonts directory comparison: "LDIFF(%s)"/"RDIFF(%s),
334 unit1->fonts_path, unit2->fonts_path);
335 }
336 return strdup(buf2);
337 }
338 case EX_SCENARIO: { str = "Scenario"; break; }
339 case EX_IMAGE: { str = "Images"; break; }
340 case EX_OBJ_INFO: { str = "Objects"; break; }
341 default: { str = "Unknown"; break; }
342 }
343 sprintf(buf, "%s%s", str, compare ? " comparison" : "");
344 if (dt == EX_FONTS_DIR) eina_stringshare_del(str);
345 return strdup(buf);
346}
347
348static char *
349_scn_text_get(void *data, Evas_Object *gl, const char *part EINA_UNUSED)
350{
351 Eina_Strbuf *buf = eina_strbuf_new();
352 char *ret = NULL;
353 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
354 if (compare)
355 {
356 _Compare_Item_Data *vv = data;
357 Exactness_Action *a1 = vv->p1;
358 Exactness_Action *a2 = vv->p2;
359
360 if (!a1 ^ !a2) return strdup("XXXXX");
361
362 if (a1->delay_ms != a2->delay_ms) eina_strbuf_append_printf(buf, "[+"LDIFF(%.3f)"/+"RDIFF(%.3f)"]: ", a1->delay_ms/1000.0, a2->delay_ms/1000.0);
363 else eina_strbuf_append_printf(buf, "+%.3f: ", a1->delay_ms / 1000.0);
364
365 if (a1->type != a2->type)
366 eina_strbuf_append_printf(buf, "["LDIFF(%s)"/"RDIFF(%s)"] - XXXXXX", _action_name_get(a1), _action_name_get(a2));
367 else
368 {
369 char params1[1024];
370 char params2[2024];
371 _action_specific_info_get(a1, params1);
372 _action_specific_info_get(a2, params2);
373
374 eina_strbuf_append_printf(buf, "%s", _action_name_get(a1));
375 if (*params1 || *params2)
376 {
377 if (strcmp(params1, params2))
378 eina_strbuf_append_printf(buf, " - ["LDIFF(%s)"/"RDIFF(%s)"]", params1, params2);
379 else
380 eina_strbuf_append_printf(buf, " - %s", params1);
381 }
382 }
383 }
384 else
385 {
386 Exactness_Action *act = data;
387 char specific_output[1024];
388 if (act)
389 {
390 eina_strbuf_append_printf(buf, "+%.3f: ", act->delay_ms / 1000.0);
391 eina_strbuf_append_printf(buf, "%s", _action_name_get(act));
392 _action_specific_info_get(act, specific_output);
393 if (*specific_output) eina_strbuf_append_printf(buf, " - %s", specific_output);
394 }
395 else
396 eina_strbuf_append(buf, "XXXXX");
397 }
398
399 ret = eina_strbuf_string_steal(buf);
400 eina_strbuf_free(buf);
401 return ret;
402}
403
404static int
405_unit_shot_no_get(Exactness_Unit *unit, Exactness_Action *act_ref)
406{
407 Eina_List *itr;
408 Exactness_Action *act;
409 int ret = 0;
410 if (!unit) return -1;
411 EINA_LIST_FOREACH(unit->actions, itr, act)
412 {
413 if (act->type == EXACTNESS_ACTION_TAKE_SHOT)
414 {
415 if (act == act_ref) return ret;
416 ret++;
417 }
418 }
419 return -1;
420}
421
422static void
423_goto_shot(void *data EINA_UNUSED, Evas_Object *bt, void *event_info EINA_UNUSED)
424{
425 Eo *gl = efl_key_data_get(bt, "gl");
426 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
427 if (compare)
428 {
429 _Compare_Item_Data *vv;
430 Eina_List *itr;
431 Eo *gl1 = eina_list_nth(_gls, 0);
432 Eo *gl2 = eina_list_nth(_gls, 1);
433 Exactness_Unit *unit1 = efl_key_data_get(gl1, "unit");
434 Exactness_Unit *unit2 = efl_key_data_get(gl2, "unit");
435 int shot1_no = (intptr_t)efl_key_data_get(bt, "shot1_no");
436 int shot2_no = (intptr_t)efl_key_data_get(bt, "shot2_no");
437 Exactness_Image *ex_img1 = shot1_no != -1 ? eina_list_nth(unit1->imgs, shot1_no) : NULL;
438 Exactness_Image *ex_img2 = shot2_no != -1 ? eina_list_nth(unit2->imgs, shot2_no) : NULL;
439 EINA_LIST_FOREACH(_comp_vvs, itr, vv)
440 {
441 if (vv->p1 == ex_img1 && vv->p2 == ex_img2)
442 {
443 _Item_Info *ii = eina_hash_find(_item_infos_hash, &vv);
444 if (ii && ii->gl_item)
445 elm_genlist_item_show(ii->gl_item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
446 }
447 }
448 }
449 else
450 {
451 Exactness_Unit *unit = efl_key_data_get(gl, "unit");
452 int shot_no = (intptr_t)efl_key_data_get(bt, "shot_no");
453 Exactness_Image *ex_img = shot_no != -1 ? eina_list_nth(unit->imgs, shot_no) : NULL;
454 _Item_Info *ii = eina_hash_find(_item_infos_hash, &ex_img);
455 if (ii && ii->gl_item)
456 elm_genlist_item_show(ii->gl_item, ELM_GENLIST_ITEM_SCROLLTO_MIDDLE);
457 }
458}
459
460static Evas_Object *
461_scn_content_get(void *data, Evas_Object *gl, const char *part)
462{
463 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
464 if (compare)
465 {
466 if (!strcmp(part, "elm.swallow.end"))
467 {
468 _Compare_Item_Data *vv = data;
469 Exactness_Action *v1 = vv->p1;
470 Exactness_Action *v2 = vv->p2;
471 if (v1 && v2 && v1->type == EXACTNESS_ACTION_TAKE_SHOT &&
472 v2->type == EXACTNESS_ACTION_TAKE_SHOT)
473 {
474 Eo *gl1 = eina_list_nth(_gls, 0);
475 Eo *gl2 = eina_list_nth(_gls, 1);
476 Exactness_Unit *unit1 = efl_key_data_get(gl1, "unit");
477 Exactness_Unit *unit2 = efl_key_data_get(gl2, "unit");
478 int shot1_no = _unit_shot_no_get(unit1, v1);
479 int shot2_no = _unit_shot_no_get(unit2, v2);
480 Exactness_Image *ex_img1 = shot1_no != -1 ? eina_list_nth(unit1->imgs, shot1_no) : NULL;
481 Exactness_Image *ex_img2 = shot2_no != -1 ? eina_list_nth(unit2->imgs, shot2_no) : NULL;
482 Exactness_Image *ex_imgO = NULL;
483 exactness_image_compare(ex_img1, ex_img2, &ex_imgO);
484
485 if (ex_imgO)
486 {
487 Eo *bt, *ic, *evas_img;
488
489 bt = elm_button_add(gl);
490 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
491 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
492 evas_object_show(bt);
493 efl_key_data_set(bt, "gl", gl);
494 efl_key_data_set(bt, "shot1_no", (void *)(intptr_t)shot1_no);
495 efl_key_data_set(bt, "shot2_no", (void *)(intptr_t)shot2_no);
496 evas_object_smart_callback_add(bt, "clicked", _goto_shot, NULL);
497
498 ic = elm_icon_add(bt);
499 evas_img = elm_image_object_get(ic);
500 evas_object_image_size_set(evas_img, ex_imgO->w, ex_imgO->h);
501 evas_object_image_data_set(evas_img, ex_imgO->pixels);
502 evas_object_show(ic);
503 elm_object_part_content_set(bt, "icon", ic);
504 return bt;
505 }
506 }
507 }
508 }
509 else
510 {
511 if (!strcmp(part, "elm.swallow.end"))
512 {
513 Exactness_Action *v = data;
514 Exactness_Unit *unit = efl_key_data_get(gl, "unit");
515 int shot_no = _unit_shot_no_get(unit, v);
516 Exactness_Image *ex_img = shot_no != -1 ? eina_list_nth(unit->imgs, shot_no) : NULL;
517
518 if (ex_img)
519 {
520 Eo *bt, *ic, *evas_img;
521
522 bt = elm_button_add(gl);
523 evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
524 evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
525 evas_object_show(bt);
526 efl_key_data_set(bt, "gl", gl);
527 efl_key_data_set(bt, "shot_no", (void *)(intptr_t)shot_no);
528 evas_object_smart_callback_add(bt, "clicked", _goto_shot, NULL);
529
530 ic = elm_icon_add(bt);
531 evas_img = elm_image_object_get(ic);
532 evas_object_image_size_set(evas_img, ex_img->w, ex_img->h);
533 evas_object_image_data_set(evas_img, ex_img->pixels);
534 evas_object_show(ic);
535 elm_object_part_content_set(bt, "icon", ic);
536
537 return bt;
538 }
539 }
540 }
541 return NULL;
542}
543
544static Evas_Object *
545_img_content_get(void *data, Evas_Object *gl, const char *part)
546{
547 if (strcmp(part, "elm.swallow.content")) return NULL;
548 Eo *img = elm_image_add(gl);
549 Eo *evas_img = elm_image_object_get(img);
550 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
551 if (compare)
552 {
553 _Compare_Item_Data *vv = data;
554 Exactness_Image *ex_img1 = vv->p1;
555 Exactness_Image *ex_img2 = vv->p2;
556 Exactness_Image *ex_imgO = NULL;
557 exactness_image_compare(ex_img1, ex_img2, &ex_imgO);
558
559 evas_object_image_size_set(evas_img, ex_imgO->w, ex_imgO->h);
560 evas_object_image_data_set(evas_img, ex_imgO->pixels);
561 evas_object_size_hint_min_set(img, ELM_SCALE_SIZE(300), ELM_SCALE_SIZE(300));
562 }
563 else
564 {
565 if (!data)
566 {
567 efl_del(img);
568 return NULL;
569 }
570 Exactness_Image *ex_img = data;
571 evas_object_image_size_set(evas_img, ex_img->w, ex_img->h);
572 evas_object_image_data_set(evas_img, ex_img->pixels);
573 evas_object_size_hint_min_set(img, ELM_SCALE_SIZE(300), ELM_SCALE_SIZE(300));
574 }
575 return img;
576}
577
578static char *
579_objs_text_get(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, const char *part EINA_UNUSED)
580{
581 return strdup("Shot");
582}
583
584static char *
585_obj_text_get(void *data, Evas_Object *gl, const char *part EINA_UNUSED)
586{
587 Eina_Strbuf *buf = eina_strbuf_new();
588 char *ret = NULL;
589 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
590 if (compare)
591 {
592 _Compare_Item_Data *vv = data;
593 Exactness_Object *e_obj1 = vv->p1;
594 Exactness_Object *e_obj2 = vv->p2;
595 if ((!e_obj1 ^ !e_obj2) || strcmp(e_obj1->kl_name, e_obj2->kl_name))
596 eina_strbuf_append_printf(buf, "("LDIFF(%s)"/"RDIFF(%s)")",
597 e_obj1 ? e_obj1->kl_name : "XXXXX",
598 e_obj2 ? e_obj2->kl_name : "XXXXX");
599 else
600 eina_strbuf_append_printf(buf, "%s", e_obj1->kl_name);
601
602 eina_strbuf_append(buf, " x = ");
603 if ((!e_obj1 ^ !e_obj2) || e_obj1->x != e_obj2->x)
604 eina_strbuf_append_printf(buf, LDIFF(%d)"/"RDIFF(%d),
605 e_obj1 ? e_obj1->x : -1,
606 e_obj2 ? e_obj2->x : -1);
607 else
608 eina_strbuf_append_printf(buf, "%d", e_obj1->x);
609
610 eina_strbuf_append(buf, " y = ");
611 if ((!e_obj1 ^ !e_obj2) || e_obj1->y != e_obj2->y)
612 eina_strbuf_append_printf(buf, LDIFF(%d)"/"RDIFF(%d),
613 e_obj1 ? e_obj1->y : -1,
614 e_obj2 ? e_obj2->y : -1);
615 else
616 eina_strbuf_append_printf(buf, "%d", e_obj1->y);
617
618 eina_strbuf_append(buf, " w = ");
619 if ((!e_obj1 ^ !e_obj2) || e_obj1->w != e_obj2->w)
620 eina_strbuf_append_printf(buf, LDIFF(%d)"/"RDIFF(%d),
621 e_obj1 ? e_obj1->w : -1,
622 e_obj2 ? e_obj2->w : -1);
623 else
624 eina_strbuf_append_printf(buf, "%d", e_obj1->w);
625
626 eina_strbuf_append(buf, " h = ");
627 if ((!e_obj1 ^ !e_obj2) || e_obj1->h != e_obj2->h)
628 eina_strbuf_append_printf(buf, LDIFF(%d)"/"RDIFF(%d),
629 e_obj1 ? e_obj1->h : -1,
630 e_obj2 ? e_obj2->h : -1);
631 else
632 eina_strbuf_append_printf(buf, "%d", e_obj1->h);
633
634 if (e_obj1 && e_obj2 && _are_objs_different(e_obj1, e_obj2, EINA_FALSE))
635 eina_strbuf_append(buf, " - DIFF INSIDE");
636 }
637 else
638 {
639 Exactness_Object *e_obj = data;
640 eina_strbuf_append_printf(buf,
641 "%s: x = %d y = %d w = %d h = %d",
642 e_obj->kl_name,
643 e_obj->x, e_obj->y, e_obj->w, e_obj->h);
644 }
645
646 ret = eina_strbuf_string_steal(buf);
647 eina_strbuf_free(buf);
648 return ret;
649}
650
651static void
652_itc_init()
653{
654 if (!_grp_itc)
655 {
656 _grp_itc = elm_genlist_item_class_new();
657 _grp_itc->item_style = "group_index";
658 _grp_itc->func.text_get = _grp_text_get;
659 }
660
661 if (!_scn_itc)
662 {
663 _scn_itc = elm_genlist_item_class_new();
664 _scn_itc->item_style = "default_style";
665 _scn_itc->func.text_get = _scn_text_get;
666 _scn_itc->func.content_get = _scn_content_get;
667 }
668
669 if (!_img_itc)
670 {
671 _img_itc = elm_genlist_item_class_new();
672 _img_itc->item_style = "full";
673 _img_itc->func.content_get = _img_content_get;
674 }
675
676 if (!_objs_itc)
677 {
678 _objs_itc = elm_genlist_item_class_new();
679 _objs_itc->item_style = "default_style";
680 _objs_itc->func.text_get = _objs_text_get;
681 }
682
683 if (!_obj_itc)
684 {
685 _obj_itc = elm_genlist_item_class_new();
686 _obj_itc->item_style = "default_style";
687 _obj_itc->func.text_get = _obj_text_get;
688 }
689}
690
691static void
692_comp_gl_dragged_cb(Evas_Object *obj, void *data EINA_UNUSED)
693{
694 int x = 0, y = 0;
695 Eo *gl;
696 Eina_List *itr;
697 elm_interface_scrollable_content_pos_get(obj, &x, &y);
698 EINA_LIST_FOREACH(_gls, itr, gl)
699 {
700 if (gl != obj)
701 elm_interface_scrollable_content_pos_set(gl, x, y, EINA_FALSE);
702 }
703}
704
705static void
706_obj_item_realize(Exactness_Object *ex_obj)
707{
708 _Item_Info *ii = eina_hash_find(_item_infos_hash, &ex_obj);
709 if (!ii) return;
710 if (ii->gl_item) return;
711 _obj_item_realize(ii->ex_parent);
712 _Item_Info *iip = eina_hash_find(_item_infos_hash, &(ii->ex_parent));
713 if (iip->gl_item) elm_genlist_item_expanded_set(iip->gl_item, EINA_TRUE);
714}
715
716static void
717_gl_expand_request_cb(void *data EINA_UNUSED, Evas_Object *gl, void *event_info)
718{
719 Elm_Object_Item *glit = event_info;
720 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
721 if (compare)
722 {
723 const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(glit);
724 if (itc == _objs_itc)
725 {
726 _Compare_Item_Data *vv = elm_object_item_data_get(glit);
727 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p1));
728 if (ii) elm_genlist_item_expanded_set(ii->gl_item, EINA_TRUE);
729 ii = eina_hash_find(_item_infos_hash, &(vv->p2));
730 if (ii) elm_genlist_item_expanded_set(ii->gl_item, EINA_TRUE);
731 }
732 else if (itc == _obj_itc)
733 {
734 _Compare_Item_Data *vv = elm_object_item_data_get(glit);
735 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p1));
736 if (!ii || !ii->gl_item) _obj_item_realize(vv->p1);
737 if (!ii) ii = eina_hash_find(_item_infos_hash, &(vv->p1));
738 if (ii && ii->gl_item) elm_genlist_item_expanded_set(ii->gl_item, EINA_TRUE);
739
740 ii = eina_hash_find(_item_infos_hash, &(vv->p2));
741 if (!ii || !ii->gl_item) _obj_item_realize(vv->p2);
742 if (!ii) ii = eina_hash_find(_item_infos_hash, &(vv->p2));
743 if (ii && ii->gl_item) elm_genlist_item_expanded_set(ii->gl_item, EINA_TRUE);
744 }
745 }
746 elm_genlist_item_expanded_set(glit, EINA_TRUE);
747}
748
749static void
750_gl_contract_request_cb(void *data EINA_UNUSED, Evas_Object *gl EINA_UNUSED, void *event_info)
751{
752 Elm_Object_Item *glit = event_info;
753 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
754 if (compare)
755 {
756 const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(glit);
757 if (itc == _objs_itc)
758 {
759 _Compare_Item_Data *vv = elm_object_item_data_get(glit);
760 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p1));
761 if (ii) elm_genlist_item_expanded_set(ii->gl_item, EINA_FALSE);
762 ii = eina_hash_find(_item_infos_hash, &(vv->p2));
763 if (ii) elm_genlist_item_expanded_set(ii->gl_item, EINA_FALSE);
764 }
765 else if (itc == _obj_itc)
766 {
767 _Compare_Item_Data *vv = elm_object_item_data_get(glit);
768 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p1));
769 if (ii && ii->gl_item) elm_genlist_item_expanded_set(ii->gl_item, EINA_FALSE);
770
771 ii = eina_hash_find(_item_infos_hash, &(vv->p2));
772 if (ii && ii->gl_item) elm_genlist_item_expanded_set(ii->gl_item, EINA_FALSE);
773 }
774 }
775 elm_genlist_item_expanded_set(glit, EINA_FALSE);
776}
777
778static void
779_gl_expanded_cb(void *_data EINA_UNUSED, Evas_Object *gl EINA_UNUSED, void *event_info)
780{
781 Elm_Object_Item *glit = event_info;
782 const Elm_Genlist_Item_Class *itc = elm_genlist_item_item_class_get(glit);
783 Eina_Bool compare = !!efl_key_data_get(gl, "_exactness_gl_compare");
784 if (itc == _objs_itc)
785 {
786 if (compare)
787 {
788 _Compare_Item_Data *vv = elm_object_item_data_get(glit);
789 Exactness_Objects *e_objs1 = vv->p1;
790 Exactness_Objects *e_objs2 = vv->p2;
791 Eina_List *itr1 = e_objs1->main_objs, *itr2 = e_objs2->main_objs;
792
793 while (itr1 || itr2)
794 {
795 Exactness_Object *e_obj1 = eina_list_data_get(itr1);
796 Exactness_Object *e_obj2 = eina_list_data_get(itr2);
797 vv = calloc(1, sizeof(*vv));
798 vv->p1 = e_obj1;
799 vv->p2 = e_obj2;
800 vv->dt = EX_OBJ_INFO;
801 elm_genlist_item_append(gl, _obj_itc, vv, glit,
802 e_obj1->children || e_obj2->children ? ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE,
803 NULL, NULL);
804 itr1 = eina_list_next(itr1);
805 itr2 = eina_list_next(itr2);
806 }
807 }
808 else
809 {
810 Exactness_Objects *e_objs = elm_object_item_data_get(glit);
811 Eina_List *itr;
812 Exactness_Object *e_obj;
813 EINA_LIST_FOREACH(e_objs->main_objs, itr, e_obj)
814 {
815 _Item_Info *ii = eina_hash_find(_item_infos_hash, &e_obj);
816 if (!ii)
817 {
818 ii = calloc(1, sizeof(*ii));
819 eina_hash_set(_item_infos_hash, &e_obj, ii);
820 }
821 ii->ex_parent = e_objs;
822 ii->gl_item = elm_genlist_item_append(gl, _obj_itc, e_obj, glit,
823 e_obj->children ? ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE,
824 NULL, NULL);
825 efl_wref_add(ii->gl_item, &(ii->gl_item));
826 }
827 }
828 }
829 else if (itc == _obj_itc)
830 {
831 if (compare)
832 {
833 _Compare_Item_Data *vv = elm_object_item_data_get(glit);
834 Exactness_Object *e_obj1 = vv->p1;
835 Exactness_Object *e_obj2 = vv->p2;
836 Eina_List *itr1 = e_obj1->children, *itr2 = e_obj2->children;
837
838 while (itr1 || itr2)
839 {
840 e_obj1 = eina_list_data_get(itr1);
841 e_obj2 = eina_list_data_get(itr2);
842 vv = calloc(1, sizeof(*vv));
843 vv->p1 = e_obj1;
844 vv->p2 = e_obj2;
845 vv->dt = EX_OBJ_INFO;
846 elm_genlist_item_append(gl, _obj_itc, vv, glit,
847 (e_obj1 && e_obj1->children) || (e_obj2 && e_obj2->children) ?
848 ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE,
849 NULL, NULL);
850 itr1 = eina_list_next(itr1);
851 itr2 = eina_list_next(itr2);
852 }
853 }
854 else
855 {
856 Exactness_Object *e_obj = elm_object_item_data_get(glit), *e_obj2;
857 Eina_List *itr;
858
859 EINA_LIST_FOREACH(e_obj->children, itr, e_obj2)
860 {
861 _Item_Info *ii = eina_hash_find(_item_infos_hash, &e_obj2);
862 if (!ii)
863 {
864 ii = calloc(1, sizeof(*ii));
865 eina_hash_set(_item_infos_hash, &e_obj2, ii);
866 }
867 ii->ex_parent = e_obj;
868 ii->gl_item = elm_genlist_item_append(gl, _obj_itc, e_obj2, glit,
869 e_obj2->children ? ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE,
870 NULL, NULL);
871 efl_wref_add(ii->gl_item, &(ii->gl_item));
872 }
873 }
874 }
875}
876
877static void
878_gl_contracted_cb(void *data EINA_UNUSED, Evas_Object *gl EINA_UNUSED, void *event_info)
879{
880 Elm_Object_Item *glit = event_info;
881 elm_genlist_item_subitems_clear(glit);
882}
883
884static void
885_comp_gl_selected_cb(void *data EINA_UNUSED, Evas_Object *gl EINA_UNUSED, void *event_info)
886{
887 _comp_selected_item = event_info;
888 _Compare_Item_Data *vv = elm_object_item_data_get(_comp_selected_item);
889 if (vv->p1)
890 {
891 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p1));
892 if (!ii || !ii->gl_item) _obj_item_realize(vv->p1);
893 elm_genlist_item_selected_set(ii->gl_item, EINA_TRUE);
894 }
895
896 if (vv->p2)
897 {
898 _Item_Info *ii = eina_hash_find(_item_infos_hash, &(vv->p2));
899 if (!ii || !ii->gl_item) _obj_item_realize(vv->p2);
900 elm_genlist_item_selected_set(ii->gl_item, EINA_TRUE);
901 }
902}
903
904static void
905_scn_item_remove(void *data, Evas_Object *menu EINA_UNUSED, void *item EINA_UNUSED)
906{
907 Eo *glit = data;
908 Exactness_Unit *unit = efl_key_data_get(efl_parent_get(glit), "unit");
909 Exactness_Action *act = elm_object_item_data_get(glit);
910 unit->actions = eina_list_remove(unit->actions, act);
911 if (!eina_list_data_find(_modified_units, unit))
912 _modified_units = eina_list_append(_modified_units, unit);
913 efl_del(glit);
914}
915
916static void
917_gl_clicked_right_cb(void *data, Evas_Object *gl, void *event_info)
918{
919 int x = 0, y = 0;
920 Eo *win = data, *menu;
921 Elm_Object_Item *glit = event_info;
922
923 if (elm_genlist_item_item_class_get(glit) == _scn_itc)
924 {
925 elm_genlist_item_selected_set(glit, EINA_TRUE);
926 evas_pointer_canvas_xy_get(evas_object_evas_get(gl), &x, &y);
927
928 menu = elm_menu_add(win);
929 elm_menu_move(menu, x, y);
930 elm_menu_item_add(menu, NULL, NULL, "Remove", _scn_item_remove, glit);
931 efl_gfx_entity_visible_set(menu, EINA_TRUE);
932 }
933}
934
935static void
936_gl_img_show(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
937{
938 static Eo *_img_win = NULL;
939 Exactness_Image *ex_img = data;
940 if (_img_win) efl_del(_img_win);
941 _img_win = efl_add(EFL_UI_WIN_CLASS, elm_win_get(obj),
942 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_DIALOG_BASIC),
943 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
944 efl_wref_add(_img_win, &_img_win);
945
946 Evas_Object *image = elm_image_add(_img_win);
947 Eo *evas_img = elm_image_object_get(image);
948 evas_object_image_size_set(evas_img, ex_img->w, ex_img->h);
949 evas_object_image_data_set(evas_img, ex_img->pixels);
950 efl_content_set(_img_win, image);
951
952 efl_gfx_entity_size_set(_img_win, EINA_SIZE2D(550, 500));
953}
954
955static void
956_gui_unit_display(Exactness_Unit *unit1, Exactness_Unit *unit2)
957{
958 Eina_List *itr1, *itr2;
959 Eo *gl1, *gl2 = NULL, *glc = NULL;
960
961 gl1 = elm_genlist_add(_main_box);
962 elm_genlist_homogeneous_set(gl1, EINA_TRUE);
963 evas_object_size_hint_weight_set(gl1, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
964 evas_object_size_hint_align_set(gl1, EVAS_HINT_FILL, EVAS_HINT_FILL);
965 efl_gfx_entity_visible_set(gl1, EINA_TRUE);
966 _gls = eina_list_append(_gls, gl1);
967 elm_box_pack_end(_main_box, gl1);
968
969 efl_key_data_set(gl1, "unit", unit1);
970 evas_object_smart_callback_add(gl1, "expand,request", _gl_expand_request_cb, NULL);
971 evas_object_smart_callback_add(gl1, "contract,request", _gl_contract_request_cb, NULL);
972 evas_object_smart_callback_add(gl1, "expanded", _gl_expanded_cb, NULL);
973 evas_object_smart_callback_add(gl1, "contracted", _gl_contracted_cb, NULL);
974 if (!unit2)
975 evas_object_smart_callback_add(gl1, "clicked,right", _gl_clicked_right_cb, elm_win_get(_main_box));
976
977 if (unit2)
978 {
979 glc = elm_genlist_add(_main_box);
980 elm_genlist_homogeneous_set(glc, EINA_TRUE);
981 evas_object_size_hint_weight_set(glc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
982 evas_object_size_hint_align_set(glc, EVAS_HINT_FILL, EVAS_HINT_FILL);
983 efl_gfx_entity_visible_set(glc, EINA_TRUE);
984 elm_box_pack_end(_main_box, glc);
985
986 evas_object_smart_callback_add(glc, "expand,request", _gl_expand_request_cb, NULL);
987 evas_object_smart_callback_add(glc, "contract,request", _gl_contract_request_cb, NULL);
988 evas_object_smart_callback_add(glc, "expanded", _gl_expanded_cb, NULL);
989 evas_object_smart_callback_add(glc, "contracted", _gl_contracted_cb, NULL);
990
991 efl_key_data_set(glc, "_exactness_gl_compare", glc);
992 elm_interface_scrollable_scroll_down_cb_set(glc, _comp_gl_dragged_cb);
993 elm_interface_scrollable_scroll_up_cb_set(glc, _comp_gl_dragged_cb);
994 evas_object_smart_callback_add(glc, "selected", _comp_gl_selected_cb, NULL);
995
996 gl2 = elm_genlist_add(_main_box);
997 elm_genlist_homogeneous_set(gl2, EINA_TRUE);
998 evas_object_size_hint_weight_set(gl2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
999 evas_object_size_hint_align_set(gl2, EVAS_HINT_FILL, EVAS_HINT_FILL);
1000 efl_gfx_entity_visible_set(gl2, EINA_TRUE);
1001 _gls = eina_list_append(_gls, gl2);
1002 elm_box_pack_end(_main_box, gl2);
1003
1004 efl_key_data_set(gl2, "unit", unit2);
1005 evas_object_smart_callback_add(gl2, "expand,request", _gl_expand_request_cb, NULL);
1006 evas_object_smart_callback_add(gl2, "contract,request", _gl_contract_request_cb, NULL);
1007 evas_object_smart_callback_add(gl2, "expanded", _gl_expanded_cb, NULL);
1008 evas_object_smart_callback_add(gl2, "contracted", _gl_contracted_cb, NULL);
1009 }
1010 _itc_init();
1011
1012 if (unit1->fonts_path || (unit2 && unit2->fonts_path))
1013 {
1014 if (!_show_only_diffs || !unit1 || !unit2 ||
1015 !unit1->fonts_path || !unit2->fonts_path ||
1016 strcmp(unit1->fonts_path, unit2->fonts_path))
1017 {
1018 elm_genlist_item_append(gl1, _grp_itc, (void *)EX_FONTS_DIR, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1019 elm_genlist_item_append(gl2, _grp_itc, (void *)EX_FONTS_DIR, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1020 elm_genlist_item_append(glc, _grp_itc, (void *)EX_FONTS_DIR, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1021 }
1022 }
1023 itr1 = unit1 ? unit1->actions : NULL;
1024 itr2 = unit2 ? unit2->actions : NULL;
1025
1026 if (itr1 || itr2)
1027 {
1028 elm_genlist_item_append(gl1, _grp_itc, (void *)EX_SCENARIO, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1029 elm_genlist_item_append(gl2, _grp_itc, (void *)EX_SCENARIO, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1030 elm_genlist_item_append(glc, _grp_itc, (void *)EX_SCENARIO, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1031 }
1032 while (itr1 || itr2)
1033 {
1034 Exactness_Action *v1 = itr1 ? eina_list_data_get(itr1) : NULL;
1035 Exactness_Action *v2 = itr2 ? eina_list_data_get(itr2) : NULL;
1036 if (!_show_only_diffs || _are_scenario_entries_different(v1, v2))
1037 {
1038 _Item_Info *ii = calloc(1, sizeof(*ii));
1039 eina_hash_set(_item_infos_hash, &v1, ii);
1040 ii->gl_item = elm_genlist_item_append(gl1, _scn_itc, v1, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
1041 if (unit2)
1042 {
1043 _Compare_Item_Data *vv = calloc(1, sizeof(*vv));
1044 vv->p1 = v1;
1045 vv->p2 = v2;
1046 vv->dt = EX_SCENARIO;
1047 ii = calloc(1, sizeof(*ii));
1048 eina_hash_set(_item_infos_hash, &v2, ii);
1049 ii->gl_item = elm_genlist_item_append(gl2, _scn_itc, v2, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
1050 elm_genlist_item_append(glc, _scn_itc, vv, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
1051 }
1052 }
1053 if (itr1) itr1 = eina_list_next(itr1);
1054 if (itr2) itr2 = eina_list_next(itr2);
1055 }
1056
1057 itr1 = unit1 ? unit1->imgs : NULL;
1058 itr2 = unit2 ? unit2->imgs : NULL;
1059
1060 if (itr1 || itr2)
1061 {
1062 elm_genlist_item_append(gl1, _grp_itc, (void *)EX_IMAGE, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1063 elm_genlist_item_append(gl2, _grp_itc, (void *)EX_IMAGE, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1064 elm_genlist_item_append(glc, _grp_itc, (void *)EX_IMAGE, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1065 }
1066 while (itr1 || itr2)
1067 {
1068 Exactness_Image *img1 = itr1 ? eina_list_data_get(itr1) : NULL;
1069 Exactness_Image *img2 = itr2 ? eina_list_data_get(itr2) : NULL;
1070 if (!_show_only_diffs || _are_images_different(img1, img2))
1071 {
1072 _Item_Info *ii = calloc(1, sizeof(*ii));
1073 eina_hash_set(_item_infos_hash, &img1, ii);
1074 ii->gl_item = elm_genlist_item_append(gl1, _img_itc, img1, NULL, ELM_GENLIST_ITEM_NONE, _gl_img_show, img1);
1075 if (unit2)
1076 {
1077 _Compare_Item_Data *vv = calloc(1, sizeof(*vv));
1078 vv->p1 = img1;
1079 vv->p2 = img2;
1080 vv->dt = EX_IMAGE;
1081 ii = calloc(1, sizeof(*ii));
1082 eina_hash_set(_item_infos_hash, &img2, ii);
1083 ii->gl_item = elm_genlist_item_append(gl2, _img_itc, img2, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
1084 /* This item info is needed to go to images from scenario shot entry */
1085 ii = calloc(1, sizeof(*ii));
1086 eina_hash_set(_item_infos_hash, &vv, ii);
1087 ii->gl_item = elm_genlist_item_append(glc, _img_itc, vv, NULL, ELM_GENLIST_ITEM_NONE, NULL, NULL);
1088 _comp_vvs = eina_list_append(_comp_vvs, vv);
1089 }
1090 }
1091 if (itr1) itr1 = eina_list_next(itr1);
1092 if (itr2) itr2 = eina_list_next(itr2);
1093 }
1094
1095 itr1 = unit1 ? unit1->objs : NULL;
1096 itr2 = unit2 ? unit2->objs : NULL;
1097
1098 if (itr1 || itr2)
1099 {
1100 elm_genlist_item_append(gl1, _grp_itc, (void *)EX_OBJ_INFO, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1101 elm_genlist_item_append(gl2, _grp_itc, (void *)EX_OBJ_INFO, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1102 elm_genlist_item_append(glc, _grp_itc, (void *)EX_OBJ_INFO, NULL, ELM_GENLIST_ITEM_GROUP, NULL, NULL);
1103 }
1104 while (itr1 || itr2)
1105 {
1106 Exactness_Objects *objs1 = itr1 ? eina_list_data_get(itr1) : NULL;
1107 Exactness_Objects *objs2 = itr2 ? eina_list_data_get(itr2) : NULL;
1108 if (!_show_only_diffs || _are_objs_trees_different(objs1, objs2))
1109 {
1110 _Item_Info *ii = calloc(1, sizeof(*ii));
1111 eina_hash_set(_item_infos_hash, &objs1, ii);
1112 ii->gl_item = elm_genlist_item_append(gl1, _objs_itc, objs1, NULL,
1113 ELM_GENLIST_ITEM_TREE, NULL, NULL);
1114 efl_wref_add(ii->gl_item, &(ii->gl_item));
1115 if (unit2)
1116 {
1117 _Compare_Item_Data *vv = calloc(1, sizeof(*vv));
1118 vv->p1 = objs1;
1119 vv->p2 = objs2;
1120 vv->dt = EX_OBJ_INFO;
1121 ii = calloc(1, sizeof(*ii));
1122 eina_hash_set(_item_infos_hash, &objs2, ii);
1123 ii->gl_item = elm_genlist_item_append(gl2, _objs_itc, objs2, NULL,
1124 ELM_GENLIST_ITEM_TREE, NULL, NULL);
1125 efl_wref_add(ii->gl_item, &(ii->gl_item));
1126 elm_genlist_item_append(glc, _objs_itc, vv, NULL, ELM_GENLIST_ITEM_TREE, NULL, NULL);
1127 }
1128 }
1129 if (itr1) itr1 = eina_list_next(itr1);
1130 if (itr2) itr2 = eina_list_next(itr2);
1131 }
1132}
1133
1134static void
1135_diff_result_print(Exactness_Unit *unit1, Exactness_Unit *unit2)
1136{
1137 Eina_List *itr1, *itr2;
1138
1139 int nb_scenario = 0, nb_diff_scenario = 0;
1140 int nb_image = 0, nb_diff_image = 0;
1141 int nb_objtree= 0, nb_diff_objtree = 0;
1142
1143 itr1 = unit1 ? unit1->actions : NULL;
1144 itr2 = unit2 ? unit2->actions : NULL;
1145
1146 while (itr1 || itr2)
1147 {
1148 Exactness_Action *v1 = itr1 ? eina_list_data_get(itr1) : NULL;
1149 Exactness_Action *v2 = itr2 ? eina_list_data_get(itr2) : NULL;
1150
1151 nb_scenario++;
1152 if (_are_scenario_entries_different(v1, v2))
1153 nb_diff_scenario++;
1154
1155 if (itr1) itr1 = eina_list_next(itr1);
1156 if (itr2) itr2 = eina_list_next(itr2);
1157 }
1158
1159 itr1 = unit1 ? unit1->imgs : NULL;
1160 itr2 = unit2 ? unit2->imgs : NULL;
1161
1162 while (itr1 || itr2)
1163 {
1164 Exactness_Image *img1 = itr1 ? eina_list_data_get(itr1) : NULL;
1165 Exactness_Image *img2 = itr2 ? eina_list_data_get(itr2) : NULL;
1166
1167 nb_image++;
1168 if (_are_images_different(img1, img2))
1169 nb_diff_image++;
1170
1171 if (itr1) itr1 = eina_list_next(itr1);
1172 if (itr2) itr2 = eina_list_next(itr2);
1173 }
1174
1175 itr1 = unit1 ? unit1->objs : NULL;
1176 itr2 = unit2 ? unit2->objs : NULL;
1177
1178 while (itr1 || itr2)
1179 {
1180 Exactness_Objects *objs1 = itr1 ? eina_list_data_get(itr1) : NULL;
1181 Exactness_Objects *objs2 = itr2 ? eina_list_data_get(itr2) : NULL;
1182
1183 nb_objtree++;
1184 if (_are_objs_trees_different(objs1, objs2))
1185 nb_diff_objtree++;
1186
1187 if (itr1) itr1 = eina_list_next(itr1);
1188 if (itr2) itr2 = eina_list_next(itr2);
1189 }
1190
1191 printf("%s\nscenario (%d/%d)\nimage (%d/%d)\nobjs_tree (%d/%d)\n",
1192 nb_diff_scenario || nb_diff_image || nb_diff_objtree ?
1193 "Failure" : "Success",
1194 nb_scenario - nb_diff_scenario, nb_scenario,
1195 nb_image - nb_diff_image, nb_image,
1196 nb_objtree - nb_diff_objtree, nb_objtree);
1197}
1198
1199static Exactness_Image *
1200_image_read(const char *filename)
1201{
1202 int w, h;
1203 Evas_Load_Error err;
1204 Ecore_Evas *ee = ecore_evas_new(NULL, 0, 0, 100, 100, NULL);
1205
1206 /* the canvas pointer, de facto */
1207 Eo *e = ecore_evas_get(ee);
1208
1209 Eo *img = evas_object_image_add(e);
1210 evas_object_image_file_set(img, filename, NULL);
1211 err = evas_object_image_load_error_get(img);
1212 if (err != EVAS_LOAD_ERROR_NONE)
1213 {