diff --git a/cmakeconfig/meson.build b/cmakeconfig/meson.build index 158b2a9dc6..6140375a87 100644 --- a/cmakeconfig/meson.build +++ b/cmakeconfig/meson.build @@ -31,6 +31,9 @@ cmake_version_src = [ 'Elementary', ] +conf = configuration_data() +conf.set('VERSION', meson.project_version()) + foreach cmake_file : cmake_src configure_file( input: cmake_file+'Config.cmake.in', @@ -38,19 +41,21 @@ foreach cmake_file : cmake_src install_dir: join_paths(dir_lib, 'cmake', cmake_file), copy: true, ) -endforeach - -conf = configuration_data() - -conf.set('VERSION', meson.version()) - -foreach cmake_version_file : cmake_version_src - configure_file( - input: cmake_version_file+'ConfigVersion.cmake.in', - output: cmake_version_file+'ConfigVersion.cmake', - install_dir: join_paths(dir_lib, 'cmake', cmake_version_file), - configuration : conf, - ) + if cmake_version_src.contains(cmake_src) + configure_file( + input: cmake_version_file+'ConfigVersion.cmake.in', + output: cmake_version_file+'ConfigVersion.cmake', + install_dir: join_paths(dir_lib, 'cmake', cmake_version_file), + configuration : conf, + ) + else + configure_file( + input: 'EflConfigVersion.cmake.in', + output: cmake_file+'ConfigVersion.cmake', + install_dir: join_paths(dir_lib, 'cmake', cmake_file), + configuration : conf, + ) + endif endforeach configure_file( diff --git a/data/elementary/themes/edc/elm/fileselector.edc b/data/elementary/themes/edc/elm/fileselector.edc index ac7208b7ff..e4db6a88cb 100644 --- a/data/elementary/themes/edc/elm/fileselector.edc +++ b/data/elementary/themes/edc/elm/fileselector.edc @@ -41,7 +41,9 @@ group { name: "elm/fileselector/base/default"; } swallow { "elm.swallow.search"; desc { "default"; + align: 0.0 0.5; min: 65 0; + fixed: 0 1; rel1 { to: "elm.swallow.home"; relative: 1.0 0.0; diff --git a/meson.build b/meson.build index 05eb78bcfe..04ed2a20f8 100644 --- a/meson.build +++ b/meson.build @@ -503,7 +503,6 @@ efl_config_h.set('EFL_API_LEGACY_DEF', '#define EFL_API_LEGACY_DEF "FIXME NOT IM configure_file( output: 'config.h', - install: false, configuration: config_h ) diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c index 5a8f9e81d9..544fb6aa85 100644 --- a/src/bin/edje/edje_cc_out.c +++ b/src/bin/edje/edje_cc_out.c @@ -734,6 +734,20 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef) { Edje_Part *part; + /* + * we are accessing part with an id, + * if actions is ACTION_STOP or ACTION_TYPE_SCRIPT, then id is from the parts array. + * In order to not crash here, we should continue here. + */ + if (ep->action != EDJE_ACTION_TYPE_ACTION_STOP || ep->action != EDJE_ACTION_TYPE_SCRIPT) + continue; + + if (et->id >= (int) pc->parts_count) + { + ERR("Target id '%d' greater than possible index '%d'.", et->id, (int) pc->parts_count - 1); + exit(-1); + } + part = pc->parts[et->id]; /* verify existence of description in part */ if (ep->action == EDJE_ACTION_TYPE_STATE_SET) diff --git a/src/bin/efreet/efreetd_ipc.c b/src/bin/efreet/efreetd_ipc.c index 949569b729..933abfca9c 100644 --- a/src/bin/efreet/efreetd_ipc.c +++ b/src/bin/efreet/efreetd_ipc.c @@ -113,7 +113,7 @@ _cb_client_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event) if (clients == 0) { if (quit_timer) ecore_timer_del(quit_timer); - quit_timer = ecore_timer_add(10.0, _cb_quit_timer, NULL); + quit_timer = ecore_timer_add(2.0, _cb_quit_timer, NULL); } return ECORE_CALLBACK_DONE; } @@ -211,7 +211,7 @@ ipc_init(void) ecore_ipc_shutdown(); return EINA_FALSE; } - quit_timer = ecore_timer_add(10.0, _cb_quit_timer, NULL); + quit_timer = ecore_timer_add(2.0, _cb_quit_timer, NULL); hnd_add = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_ADD, _cb_client_add, NULL); hnd_del = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DEL, diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c index a469befe9d..25e54ff3aa 100644 --- a/src/bin/elementary/test_bg.c +++ b/src/bin/elementary/test_bg.c @@ -389,7 +389,7 @@ _cb_check_changed_scale_type(void *data, const Efl_Event *ev) if (efl_ui_check_selected_get(ev->object)) efl_gfx_color_set(o_bg, 255, 128, 128, 255); else - efl_gfx_color_set(o_bg, 0, 0, 0, 0); + efl_gfx_color_set(o_bg, 255, 255, 255, 255); efl_gfx_color_get(o_bg, &r, &g, &b, &a); printf("bg color: %d %d %d %d\n", r, g, b, a); diff --git a/src/lib/ecore/efl_core_proc_env.c b/src/lib/ecore/efl_core_proc_env.c index 4c02821474..76f3bd1c0a 100644 --- a/src/lib/ecore/efl_core_proc_env.c +++ b/src/lib/ecore/efl_core_proc_env.c @@ -13,7 +13,12 @@ #define MY_CLASS EFL_CORE_PROC_ENV_CLASS +#if defined (__FreeBSD__) || defined (__OpenBSD__) +# include +static char ***_dl_environ; +#else extern char **environ; +#endif static Efl_Core_Env *env = NULL; @@ -27,6 +32,7 @@ _sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd) Eina_List *existing_keys = NULL, *n; Eina_Iterator *content; const char *key; + char **env = NULL; pd->in_sync = EINA_TRUE; content = efl_core_env_content_get(obj); @@ -36,11 +42,18 @@ _sync(Efl_Core_Env *obj, Efl_Core_Proc_Env_Data *pd) existing_keys = eina_list_append(existing_keys, key); } - if (environ) +#if defined (__FreeBSD__) || defined (__OpenBSD__) + _dl_environ = dlsym(NULL, "environ"); + if (_dl_environ) env = *_dl_environ; + else ERR("Can't find envrion symbol"); +#else + env = environ; +#endif + if (env) { char **p; - for (p = environ; *p; p++) + for (p = env; *p; p++) { char **values; @@ -104,7 +117,13 @@ _efl_core_proc_env_efl_core_env_clear(Eo *obj, Efl_Core_Proc_Env_Data *pd) #ifdef HAVE_CLEARENV clearenv(); #else +# if defined (__FreeBSD__) || defined (__OpenBSD__) + _dl_environ = dlsym(NULL, "environ"); + if (_dl_environ) *_dl_environ = NULL; + else ERR("Can't find envrion symbol"); +# else environ = NULL; +# endif #endif } } diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c index b7cba7292f..75cba04404 100644 --- a/src/lib/ecore/efl_exe.c +++ b/src/lib/ecore/efl_exe.c @@ -30,7 +30,12 @@ # include # endif # ifndef HAVE_CLEARENV +# if defined (__FreeBSD__) || defined (__OpenBSD__) +# include +static char ***_dl_environ; +# else extern char **environ; +# endif # endif #endif @@ -579,7 +584,13 @@ _efl_exe_efl_task_run(Eo *obj, Efl_Exe_Data *pd) # ifdef HAVE_CLEARENV clearenv(); # else +# if defined (__FreeBSD__) || defined (__OpenBSD__) + _dl_environ = dlsym(NULL, "environ"); + if (_dl_environ) *_dl_environ = NULL; + else ERR("Can't find envrion symbol"); +# else environ = NULL; +# endif # endif itr = efl_core_env_content_get(pd->env); diff --git a/src/lib/efl_wl/Efl_Wl.h b/src/lib/efl_wl/Efl_Wl.h index f73e57f6e3..62f43e0d2b 100644 --- a/src/lib/efl_wl/Efl_Wl.h +++ b/src/lib/efl_wl/Efl_Wl.h @@ -154,6 +154,13 @@ EAPI void efl_wl_minmax_set(Evas_Object *obj, Eina_Bool set); * @note The external implementation is expected to restrict access to authorized * clients * @see wl_global_create() docs + * + * @param obj The compositor widget + * @param interface The Wayland protocol interface struct of the protocol's global + * @param version The version of the global to use + * @param data User data to use with this interface + * @param bind_cb The callback which should be triggered when the global is bound by a client + * @return The created global (struct wl_global), or NULL on failure * @since 1.21 */ EAPI void *efl_wl_global_add(Evas_Object *obj, const void *interface, uint32_t version, void *data, void *bind_cb); diff --git a/src/lib/eina/meson.build b/src/lib/eina/meson.build index e4bce4fc96..1642d28b93 100644 --- a/src/lib/eina/meson.build +++ b/src/lib/eina/meson.build @@ -346,7 +346,6 @@ endif eina_config_file = configure_file( output: 'eina_config.h', configuration: eina_config, - install: true, install_dir: dir_package_include) public_headers += eina_config_file diff --git a/src/lib/eio/efl_io_model.c b/src/lib/eio/efl_io_model.c index b4ae262cae..3513852145 100644 --- a/src/lib/eio/efl_io_model.c +++ b/src/lib/eio/efl_io_model.c @@ -623,6 +623,62 @@ static struct { PP(mime_type) }; +typedef struct _Efl_Io_Model_Iterator Efl_Io_Model_Iterator; +struct _Efl_Io_Model_Iterator +{ + Eina_Iterator iterator; + unsigned int i; + unsigned int end; +}; + +static Eina_Bool +_efl_io_model_iterator_next(Efl_Io_Model_Iterator *it, void **data) +{ + const char **name = (const char **)data; + + if (it->i >= it->end) + return EINA_FALSE; + + *name = properties[it->i].name; + it->i++; + + return EINA_TRUE; +} + +static void* +_efl_io_model_iterator_get_container(Efl_Io_Model_Iterator *it EINA_UNUSED) +{ + return &properties; +} + +static void +_efl_io_model_iterator_free(Efl_Io_Model_Iterator *it) +{ + free(it); +} + +Eina_Iterator * +_efl_io_model_properties_iterator_new(void) +{ + Efl_Io_Model_Iterator *it; + + it = calloc(1, sizeof (Efl_Io_Model_Iterator)); + if (!it) return NULL; + + EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR); + + it->i = 0; + it->end = EINA_C_ARRAY_LENGTH(properties); + + it->iterator.version = EINA_ITERATOR_VERSION; + it->iterator.next = FUNC_ITERATOR_NEXT(_efl_io_model_iterator_next); + it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER( + _efl_io_model_iterator_get_container); + it->iterator.free = FUNC_ITERATOR_FREE(_efl_io_model_iterator_free); + + return &it->iterator; +} + /** * Interfaces impl. */ @@ -630,7 +686,7 @@ static Eina_Iterator * _efl_io_model_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Io_Model_Data *pd EINA_UNUSED) { - return EINA_C_ARRAY_ITERATOR_NEW(properties); + return _efl_io_model_properties_iterator_new(); } static Eina_Value * diff --git a/src/lib/elementary/efl_ui_active_view_view_manager_plain.c b/src/lib/elementary/efl_ui_active_view_view_manager_plain.c index 32c530d827..ea60d01627 100644 --- a/src/lib/elementary/efl_ui_active_view_view_manager_plain.c +++ b/src/lib/elementary/efl_ui_active_view_view_manager_plain.c @@ -86,8 +86,10 @@ _content_changed(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd) { if (efl_ui_active_view_active_index_get(pd->container) != pd->current_content) { + int old_current_content = pd->current_content; pd->current_content = efl_ui_active_view_active_index_get(pd->container); - efl_gfx_entity_visible_set(efl_pack_content_get(pd->container, pd->current_content), EINA_FALSE); + efl_gfx_entity_visible_set(efl_pack_content_get(pd->container, old_current_content), EINA_FALSE); + efl_gfx_entity_visible_set(efl_pack_content_get(pd->container, pd->current_content), EINA_TRUE); _geom_sync(obj, pd); _emit_position(obj, pd); } diff --git a/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c b/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c index 975a5df5d1..6918703cf1 100644 --- a/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c +++ b/src/lib/elementary/efl_ui_active_view_view_manager_scroll.c @@ -226,6 +226,7 @@ _page_set_animation(void *data, const Efl_Event *event EINA_UNUSED) efl_event_callback_del(pd->container, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, data); pd->transition.active = EINA_FALSE; + pd->transition.progress = 0.0; } _apply_box_properties(data, pd); } @@ -237,8 +238,12 @@ _animation_request_switch(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data * if (pd->transition.active && !pd->mouse_move.active && pd->transition.to == to) return; - if (!pd->transition.active && !pd->mouse_move.active && from == to) - return; + //In case there is no transition but from and to are the same, ensure that we reset the mouse_move state, and return. + if (!pd->transition.active && from == to) + { + pd->mouse_move.active = EINA_FALSE; + return; + } efl_event_callback_del(pd->container, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, obj); //if there is a ongoing transition, try to guess a better time, and try copy over the position where we are right now @@ -247,13 +252,14 @@ _animation_request_switch(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data * pd->transition.from = MIN(pd->transition.from, pd->transition.to) + pd->transition.progress; pd->transition.max_time = MIN(MAX(fabs(pd->transition.progress), 0.2), 0.5f); pd->mouse_move.active = EINA_FALSE; - pd->transition.progress = 0.0f; } else { pd->transition.from = from; pd->transition.max_time = 0.5; + pd->transition.progress = 0.0; } + pd->transition.start_time = ecore_loop_time_get(); pd->transition.active = EINA_TRUE; pd->transition.to = to; @@ -271,6 +277,7 @@ _efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_switch_t { pd->mouse_move.active = EINA_FALSE; pd->transition.active = EINA_FALSE; + pd->transition.progress = 0.0; _apply_box_properties(obj, pd); } } diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c index 9091e56e73..2e24a00b99 100644 --- a/src/lib/elementary/efl_ui_win.c +++ b/src/lib/elementary/efl_ui_win.c @@ -5118,9 +5118,37 @@ _gesture_manager_config_load(Eo *obj) eina_value_set(&val, _elm_config->glayer_double_tap_timeout); efl_gesture_manager_config_set(gm, "glayer_double_tap_timeout", &val); - eina_value_setup(&val, EINA_VALUE_TYPE_INT); - eina_value_set(&val, _elm_config->glayer_tap_finger_size); - efl_gesture_manager_config_set(gm, "glayer_tap_finger_size", &val); + eina_value_set(&val, _elm_config->thumbscroll_friction); + efl_gesture_manager_config_set(gm, "thumbscroll_friction", &val); + + eina_value_set(&val, _elm_config->thumbscroll_momentum_threshold); + efl_gesture_manager_config_set(gm, "thumbscroll_momentum_threshold", &val); + + eina_value_set(&val, _elm_config->glayer_line_min_length); + efl_gesture_manager_config_set(gm, "glayer_line_min_length", &val); + + eina_value_set(&val, _elm_config->glayer_line_distance_tolerance); + efl_gesture_manager_config_set(gm, "glayer_line_distance_tolerance", &val); + + eina_value_set(&val, _elm_config->glayer_line_angular_tolerance); + efl_gesture_manager_config_set(gm, "glayer_line_angular_tolerance", &val); + + eina_value_set(&val, _elm_config->glayer_zoom_finger_factor); + efl_gesture_manager_config_set(gm, "glayer_zoom_finger_factor", &val); + + eina_value_set(&val, _elm_config->glayer_zoom_distance_tolerance); + efl_gesture_manager_config_set(gm, "glayer_zoom_distance_tolerance", &val); + + eina_value_setup(&val, EINA_VALUE_TYPE_UINT); + eina_value_set(&val, _elm_config->glayer_flick_time_limit_ms); + efl_gesture_manager_config_set(gm, "glayer_flick_time_limit_ms", &val); + + eina_value_setup(&val, EINA_VALUE_TYPE_UCHAR); + eina_value_set(&val, _elm_config->glayer_continues_enable); + efl_gesture_manager_config_set(gm, "glayer_continues_enable", &val); + + eina_value_set(&val, _elm_config->glayer_zoom_finger_enable); + efl_gesture_manager_config_set(gm, "glayer_zoom_finger_enable", &val); } static Eo * diff --git a/src/lib/elementary/elm_priv.h b/src/lib/elementary/elm_priv.h index c8422bf5eb..6af1ae3744 100644 --- a/src/lib/elementary/elm_priv.h +++ b/src/lib/elementary/elm_priv.h @@ -982,7 +982,7 @@ efl_ui_layout_orientation_axis_get(Efl_Ui_Layout_Orientation orient) static inline Eina_Bool efl_ui_layout_orientation_is_inverted(Efl_Ui_Layout_Orientation orient) { - return orient & EFL_UI_LAYOUT_ORIENTATION_INVERTED; + return ((orient & EFL_UI_LAYOUT_ORIENTATION_INVERTED) == EFL_UI_LAYOUT_ORIENTATION_INVERTED) ? EINA_TRUE : EINA_FALSE; } static inline Eina_Bool diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build index 2afddd975a..af84503512 100644 --- a/src/lib/elementary/meson.build +++ b/src/lib/elementary/meson.build @@ -1002,7 +1002,6 @@ endif c = configure_file( output: 'Elementary_Options.h', - install : true, install_dir : dir_package_include, configuration: elm_options) diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c index 42fb2c4127..8466067a12 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_player.c +++ b/src/lib/evas/canvas/efl_canvas_animation_player.c @@ -107,6 +107,10 @@ _animator_cb(void *data) pd->progress = (double)(pd->is_direction_forward); } + /* The previously applied map effect should be reset before applying the + * current map effect. Otherwise, the incrementally added map effects + * increase numerical error. */ + efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj)); efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); Efl_Canvas_Animation_Player_Event_Running event_running; @@ -202,35 +206,70 @@ _efl_canvas_animation_player_efl_player_start(Eo *eo_obj, _start(eo_obj, pd); } +static Eina_Bool +_is_final_state(Efl_Canvas_Animation *anim, double progress) +{ + if (!anim) return EINA_FALSE; + if ((progress != 0.0) && (progress != 1.0)) return EINA_FALSE; + + if (efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) + { + if (efl_animation_repeat_count_get(anim) & 1) + { + if (progress == 0.0) + return EINA_TRUE; + } + else + { + if (progress == 1.0) + return EINA_TRUE; + } + } + else + { + if (progress == 1.0) + return EINA_TRUE; + } + + return EINA_FALSE; +} + EOLIAN static void _efl_canvas_animation_player_efl_player_stop(Eo *eo_obj, Efl_Canvas_Animation_Player_Data *pd) { EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); + + //Reset the state of the target to the initial state + efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj)); + Eina_Bool play = efl_player_play_get(eo_obj); if (play) { efl_player_play_set(eo_obj, EINA_FALSE); - //Reset the state of the target to the initial state - if ((efl_animation_final_state_keep_get(anim)) && - (efl_animation_repeat_mode_get(anim) != EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) && - (!(efl_animation_repeat_count_get(anim) & 1))) + if (efl_animation_final_state_keep_get(anim)) { - pd->progress = 1.0; - efl_animation_apply(anim, pd->progress, - efl_animation_player_target_get(eo_obj)); + if (_is_final_state(anim, pd->progress)) + { + /* Keep the final state only if efl_player_stop is called at + * the end of _animator_cb. */ + efl_animation_apply(anim, pd->progress, + efl_animation_player_target_get(eo_obj)); + } + else + { + pd->progress = 0.0; + } } else { pd->progress = 0.0; - efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj)); } efl_event_callback_call(eo_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, NULL); } else { - pd->progress = 0.0; - efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj)); + pd->progress = 0.0; } if (pd->auto_del) efl_del(eo_obj); @@ -303,6 +342,11 @@ _efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj, EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); double length = efl_animation_duration_get(anim); pd->progress = sec / length; + + /* The previously applied map effect should be reset before applying the + * current map effect. Otherwise, the incrementally added map effects + * increase numerical error. */ + efl_gfx_mapping_reset(efl_animation_player_target_get(eo_obj)); efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); } diff --git a/src/lib/evas/canvas/efl_canvas_animation_private.h b/src/lib/evas/canvas/efl_canvas_animation_private.h index c1fe16ff09..c8f0609103 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_private.h +++ b/src/lib/evas/canvas/efl_canvas_animation_private.h @@ -21,7 +21,7 @@ typedef struct _Efl_Canvas_Animation_Data Efl_Canvas_Animation_Data *pd = efl_data_scope_get(o, EFL_CANVAS_ANIMATION_CLASS) #define GET_STATUS(from, to, progress) \ - ((from) + (((to) - (from)) * (progress))) + ((from * (1.0 - progress)) + (to * progress)) #define FINAL_STATE_IS_REVERSE(anim) \ ((efl_animation_repeat_mode_get(anim) == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) && \ diff --git a/src/lib/evas/canvas/efl_canvas_animation_rotate.c b/src/lib/evas/canvas/efl_canvas_animation_rotate.c index c57f7e1ac2..fe713dec3c 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_rotate.c +++ b/src/lib/evas/canvas/efl_canvas_animation_rotate.c @@ -2,19 +2,6 @@ #define MY_CLASS EFL_CANVAS_ANIMATION_ROTATE_CLASS -static double -_rotation_get(Eo *target) -{ - double x1, x2, y1, y2; - double theta; - - efl_gfx_mapping_coord_absolute_get(target, 0, &x1, &y1, NULL); - efl_gfx_mapping_coord_absolute_get(target, 1, &x2, &y2, NULL); - theta = atan((y2 - y1) / (x2 - x1)); - - return theta * 180 / M_PI; -} - EOLIAN static void _efl_canvas_animation_rotate_rotate_set(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Rotate_Data *pd, @@ -115,26 +102,24 @@ _efl_canvas_animation_rotate_efl_canvas_animation_animation_apply(Eo *eo_obj, Efl_Canvas_Object *target) { double new_degree; - double prev_degree; progress = efl_animation_apply(efl_super(eo_obj, MY_CLASS), progress, target); if (!target) return progress; - prev_degree = _rotation_get(target); new_degree = GET_STATUS(pd->from.degree, pd->to.degree, progress); if (pd->use_rel_pivot) { efl_gfx_mapping_rotate(target, - new_degree - prev_degree, - (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target, - pd->rel_pivot.cx, pd->rel_pivot.cy); + new_degree, + (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target, + pd->rel_pivot.cx, pd->rel_pivot.cy); } else { efl_gfx_mapping_rotate_absolute(target, - new_degree - prev_degree, - pd->abs_pivot.cx, pd->abs_pivot.cy); + new_degree, + pd->abs_pivot.cx, pd->abs_pivot.cy); } return progress; diff --git a/src/lib/evas/canvas/efl_canvas_animation_scale.c b/src/lib/evas/canvas/efl_canvas_animation_scale.c index 90304defc3..1cccbc61b5 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_scale.c +++ b/src/lib/evas/canvas/efl_canvas_animation_scale.c @@ -2,27 +2,6 @@ #define MY_CLASS EFL_CANVAS_ANIMATION_SCALE_CLASS -static Efl_Canvas_Animation_Scale_Property -_scale_get(Eo *target) -{ - double x1, x2, x3, y1, y2, y3, w, h; - Efl_Canvas_Animation_Scale_Property scale; - Eina_Rect geometry; - - geometry = efl_gfx_entity_geometry_get(target); - efl_gfx_mapping_coord_absolute_get(target, 0, &x1, &y1, NULL); - efl_gfx_mapping_coord_absolute_get(target, 1, &x2, &y2, NULL); - efl_gfx_mapping_coord_absolute_get(target, 2, &x3, &y3, NULL); - - w = sqrt(((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1))); - h = sqrt(((x3 - x2) * (x3 - x2)) + ((y3 - y2) * (y3 - y2))); - - scale.scale_x = w / geometry.w; - scale.scale_y = h / geometry.h; - - return scale; -} - EOLIAN static void _efl_canvas_animation_scale_scale_set(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Scale_Data *pd, @@ -149,30 +128,26 @@ _efl_canvas_animation_scale_efl_canvas_animation_animation_apply(Eo *eo_obj, double progress, Efl_Canvas_Object *target) { - Efl_Canvas_Animation_Scale_Property prev_scale; Efl_Canvas_Animation_Scale_Property new_scale; progress = efl_animation_apply(efl_super(eo_obj, MY_CLASS), progress, target); if (!target) return progress; - prev_scale = _scale_get(target); new_scale.scale_x = GET_STATUS(pd->from.scale_x, pd->to.scale_x, progress); new_scale.scale_y = GET_STATUS(pd->from.scale_y, pd->to.scale_y, progress); if (pd->use_rel_pivot) { efl_gfx_mapping_zoom(target, - new_scale.scale_x / prev_scale.scale_x, - new_scale.scale_y / prev_scale.scale_y, - (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target, - pd->rel_pivot.cx, pd->rel_pivot.cy); + new_scale.scale_x, new_scale.scale_y, + (pd->rel_pivot.obj) ? pd->rel_pivot.obj : target, + pd->rel_pivot.cx, pd->rel_pivot.cy); } else { efl_gfx_mapping_zoom_absolute(target, - new_scale.scale_x / prev_scale.scale_x, - new_scale.scale_y / prev_scale.scale_y, - pd->abs_pivot.cx, pd->abs_pivot.cy); + new_scale.scale_x, new_scale.scale_y, + pd->abs_pivot.cx, pd->abs_pivot.cy); } return progress; diff --git a/src/lib/evas/canvas/efl_canvas_animation_translate.c b/src/lib/evas/canvas/efl_canvas_animation_translate.c index 42748eac99..39a052cf26 100644 --- a/src/lib/evas/canvas/efl_canvas_animation_translate.c +++ b/src/lib/evas/canvas/efl_canvas_animation_translate.c @@ -8,23 +8,6 @@ typedef struct __Translate_Property_Double double y; } _Translate_Property_Double; -static _Translate_Property_Double -_translation_get(Eo *target) -{ - double x1, x2, y1, y2; - _Translate_Property_Double translate; - Eina_Rect geometry; - - geometry = efl_gfx_entity_geometry_get(target); - - efl_gfx_mapping_coord_absolute_get(target, 0, &x1, &y1, NULL); - efl_gfx_mapping_coord_absolute_get(target, 2, &x2, &y2, NULL); - translate.x = ((x1 + x2) / 2.0) - (geometry.x + (geometry.w / 2.0)); - translate.y = ((y1 + y2) / 2.0) - (geometry.y + (geometry.h / 2.0)); - - return translate; -} - EOLIAN static void _efl_canvas_animation_translate_translate_set(Eo *eo_obj EINA_UNUSED, Efl_Canvas_Animation_Translate_Data *pd, @@ -115,13 +98,12 @@ _efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj, double progress, Efl_Canvas_Object *target) { - _Translate_Property_Double prev; _Translate_Property_Double new; + Eina_Rect geometry; progress = efl_animation_apply(efl_super(eo_obj, MY_CLASS), progress, target); if (!target) return progress; - prev = _translation_get(target); if (pd->use_rel_move) { new.x = GET_STATUS(pd->from.move_x, pd->to.move_x, progress); @@ -129,11 +111,12 @@ _efl_canvas_animation_translate_efl_canvas_animation_animation_apply(Eo *eo_obj, } else { - new.x = GET_STATUS(pd->from.x, pd->to.x, progress); - new.y = GET_STATUS(pd->from.y, pd->to.y, progress); + geometry = efl_gfx_entity_geometry_get(target); + new.x = GET_STATUS(pd->from.x, pd->to.x, progress) - geometry.x; + new.y = GET_STATUS(pd->from.y, pd->to.y, progress) - geometry.y; } - efl_gfx_mapping_translate(target, new.x - prev.x, new.y - prev.y, 0.0); + efl_gfx_mapping_translate(target, new.x, new.y, 0.0); return progress; } diff --git a/src/lib/evas/gesture/efl_canvas_gesture.c b/src/lib/evas/gesture/efl_canvas_gesture.c index a5936849b6..0cc7f8d423 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.c +++ b/src/lib/evas/gesture/efl_canvas_gesture.c @@ -2,9 +2,11 @@ #define MY_CLASS EFL_CANVAS_GESTURE_CLASS -EOLIAN static const Efl_Event_Description * - _efl_canvas_gesture_type_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Gesture_Data *pd) +const Efl_Event_Description * +_efl_gesture_type_get(const Eo *obj) { + Efl_Canvas_Gesture_Data *pd = efl_data_scope_get(obj, EFL_CANVAS_GESTURE_CLASS); + return pd->type; } diff --git a/src/lib/evas/gesture/efl_canvas_gesture.eo b/src/lib/evas/gesture/efl_canvas_gesture.eo index 2a097d5fad..c703237973 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture.eo +++ b/src/lib/evas/gesture/efl_canvas_gesture.eo @@ -11,14 +11,6 @@ abstract @beta Efl.Canvas.Gesture extends Efl.Object information to the user.]] c_prefix: efl_gesture; methods { - @property type { - [[This property holds the type of the gesture.]] - get { - } - values { - @cref type: Efl.Event_Description; [[gesture type]] - } - } @property state { [[This property holds the current state of the gesture.]] get { diff --git a/src/lib/evas/gesture/efl_canvas_gesture_manager.c b/src/lib/evas/gesture/efl_canvas_gesture_manager.c index 86960046ff..4fbb4d49ee 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_manager.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_manager.c @@ -262,7 +262,7 @@ _efl_canvas_gesture_manager_recognizer_register(Eo *obj EINA_UNUSED, Efl_Canvas_ if (!dummy) return; - const Efl_Event_Description *type = efl_gesture_type_get(dummy); + const Efl_Event_Description *type = _efl_gesture_type_get(dummy); //Add the recognizer to the m_recognizers eina_hash_add(pd->m_recognizers, &type, efl_ref(recognizer)); @@ -288,7 +288,7 @@ _efl_canvas_gesture_manager_recognizer_unregister(Eo *obj EINA_UNUSED, Efl_Canva dummy = efl_gesture_recognizer_add(recognizer, 0); if (!dummy)return; - type = efl_gesture_type_get(dummy); + type = _efl_gesture_type_get(dummy); efl_del(dummy); //Check if its already registered diff --git a/src/lib/evas/gesture/efl_canvas_gesture_private.h b/src/lib/evas/gesture/efl_canvas_gesture_private.h index cfe588abdf..ceb7ca7d42 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_private.h +++ b/src/lib/evas/gesture/efl_canvas_gesture_private.h @@ -10,6 +10,7 @@ #include +const Efl_Event_Description * _efl_gesture_type_get(const Eo *obj); void efl_gesture_manager_gesture_clean_up(Eo *obj, Eo *target, const Efl_Event_Description *type); typedef struct _Efl_Canvas_Gesture_Manager_Data Efl_Canvas_Gesture_Manager_Data; diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index f33de88146..7696125d5f 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -2481,20 +2481,20 @@ _ecore_evas_wl_common_new_internal(const char *disp_name, Ecore_Window parent, i if (!(method = evas_render_method_lookup(engine_name))) { - ERR("Render method lookup failed for %s", engine_name); + WRN("Render method lookup failed for %s", engine_name); return NULL; } if (!ecore_wl2_init()) { - ERR("Failed to initialize Ecore_Wl2"); + WRN("Failed to initialize Ecore_Wl2"); return NULL; } ewd = ecore_wl2_display_connect(disp_name); if (!ewd) { - ERR("Failed to connect to Wayland Display %s", disp_name); + WRN("Failed to connect to Wayland Display %s", disp_name); goto conn_err; } diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index e1df2d7031..2840f51a28 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -1139,7 +1139,7 @@ eng_image_orient_set(void *engine, void *image, Evas_Image_Orient orient) evas_gl_common_image_update(im->gc, im); - im_new = evas_gl_common_image_new(im->gc, im->w, im->h, im->alpha, im->cs.space); + im_new = evas_gl_common_image_new_from_rgbaimage(im->gc, im->im, &im->load_opts, NULL); if (!im_new) return im; im_new->load_opts = im->load_opts; diff --git a/src/tests/elementary/efl_ui_test_active_view.c b/src/tests/elementary/efl_ui_test_active_view.c index 0024b669e2..8643fcb8ed 100644 --- a/src/tests/elementary/efl_ui_test_active_view.c +++ b/src/tests/elementary/efl_ui_test_active_view.c @@ -14,43 +14,6 @@ static Efl_Ui_Active_View_Container *container; static int tree_abort; static int tree_abort_level; -static void -_shutdown(void) -{ - eina_log_abort_on_critical_set(tree_abort); - eina_log_abort_on_critical_level_set(tree_abort_level); -} - -static void -_setup(void) -{ - tree_abort = eina_log_abort_on_critical_get(); - tree_abort_level = eina_log_abort_on_critical_level_get(); - eina_log_abort_on_critical_level_set(2); - eina_log_abort_on_critical_set(1); -} -static void -active_view_setup() -{ - win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), - efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC)); - - container = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, win, - efl_content_set(win, efl_added)); - - efl_gfx_entity_size_set(win, EINA_SIZE2D(200, 200)); -} - -static void -active_view_teardown() -{ - if (win) - { - efl_del(win); - win = NULL; - } -} - typedef struct { struct { int called; @@ -556,6 +519,46 @@ EFL_START_TEST (efl_ui_active_view_active_index_not_update) } EFL_END_TEST +static void +_shutdown(void) +{ + eina_log_abort_on_critical_set(tree_abort); + eina_log_abort_on_critical_level_set(tree_abort_level); +} + +static void +_setup(void) +{ + tree_abort = eina_log_abort_on_critical_get(); + tree_abort_level = eina_log_abort_on_critical_level_get(); + eina_log_abort_on_critical_level_set(2); + eina_log_abort_on_critical_set(1); +} + +static void +active_view_setup() +{ + win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), + efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC)); + + container = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, win, + efl_content_set(win, efl_added)); + + efl_gfx_entity_size_set(win, EINA_SIZE2D(200, 200)); +} + +static void +active_view_teardown() +{ + if (win) + { + efl_del(win); + win = NULL; + } + memset(&transition_calls, 0, sizeof(transition_calls)); + memset(&indicator_calls, 0, sizeof(indicator_calls)); +} + void efl_ui_test_active_view(TCase *tc) { tcase_add_checked_fixture(tc, _setup, _shutdown); diff --git a/src/tests/elementary/spec/generator.py b/src/tests/elementary/spec/generator.py index c11ab21fdd..db6b99b2e3 100755 --- a/src/tests/elementary/spec/generator.py +++ b/src/tests/elementary/spec/generator.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 fixture_gen_template = """ static void