Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-06-11 19:00:41 +09:00
commit b4121c7ef6
29 changed files with 300 additions and 167 deletions

View File

@ -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(

View File

@ -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;

View File

@ -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
)

View File

@ -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)

View File

@ -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,

View File

@ -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);

View File

@ -13,7 +13,12 @@
#define MY_CLASS EFL_CORE_PROC_ENV_CLASS
#if defined (__FreeBSD__) || defined (__OpenBSD__)
# include <dlfcn.h>
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
}
}

View File

@ -30,7 +30,12 @@
# include <sys/wait.h>
# endif
# ifndef HAVE_CLEARENV
# if defined (__FreeBSD__) || defined (__OpenBSD__)
# include <dlfcn.h>
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);

View File

@ -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);

View File

@ -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

View File

@ -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 *

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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 *

View File

@ -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

View File

@ -1002,7 +1002,6 @@ endif
c = configure_file(
output: 'Elementary_Options.h',
install : true,
install_dir : dir_package_include,
configuration: elm_options)

View File

@ -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));
}

View File

@ -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) && \

View File

@ -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;

View File

@ -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;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 {

View File

@ -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

View File

@ -10,6 +10,7 @@
#include <Ecore.h>
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;

View File

@ -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;
}

View File

@ -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;

View File

@ -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);

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
fixture_gen_template = """
static void