EAPI void elm_transit_object_add(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
EAPI void elm_transit_object_remove(Elm_Transit *transit, Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
EAPI const Eina_List *elm_transit_objects_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
- EAPI void elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled) EINA_ARG_NONNULL(1);
- EAPI Eina_Bool elm_transit_event_block_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI void elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled) EINA_ARG_NONNULL(1);
+ EINA_DEPRECATED EAPI Eina_Bool elm_transit_event_block_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+ EAPI void elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled) EINA_ARG_NONNULL(1);
+ EAPI Eina_Bool elm_transit_event_enabled_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
EAPI void elm_transit_del_cb_set(Elm_Transit *transit, void (*cb)(void *data, Elm_Transit* transit), void *data) EINA_ARG_NONNULL(1);
EAPI void elm_transit_auto_reverse_set(Elm_Transit *transit, Eina_Bool reverse) EINA_ARG_NONNULL(1);
EAPI Eina_Bool elm_transit_auto_reverse_get(Elm_Transit *transit) EINA_ARG_NONNULL(1) EINA_ARG_NONNULL(1);
EAPI void elm_transit_repeat_times_set(Elm_Transit *transit, int repeat) EINA_ARG_NONNULL(1);
EAPI int elm_transit_repeat_times_get(Elm_Transit *transit) EINA_ARG_NONNULL(1);
EAPI void elm_transit_tween_mode_set(Elm_Transit *transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1);
- EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(Elm_Transit *transit) EINA_ARG_NONNULL(1) EINA_ARG_NONNULL(1);
+ EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1) EINA_ARG_NONNULL(1);
EAPI void *elm_transit_effect_resizing_context_new(Evas_Coord from_w, Evas_Coord from_h, Evas_Coord to_w, Evas_Coord to_h);
EAPI void elm_transit_effect_resizing_op(void *data, Elm_Transit *transit, double progress) EINA_ARG_NONNULL(1, 2);
Eina_List *effect_list;
Eina_List *objs;
Elm_Transit_Tween_Mode tween_mode;
- Eina_Bool auto_reverse:1;
- Eina_Bool block:1;
- Eina_Bool deleted:1;
unsigned int effects_pending_del;
int walking;
struct
int current;
Eina_Bool reverse;
} repeat;
+ Eina_Bool auto_reverse:1;
+ Eina_Bool event_enabled:1;
+ Eina_Bool deleted:1;
};
struct _Elm_Effect
EINA_MAGIC_SET(transit, ELM_TRANSIT_MAGIC);
elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_LINEAR);
-
+
transit->time.duration = duration;
-
transit->time.begin = ecore_loop_time_get();
transit->animator = ecore_animator_add(_animator_animate_cb, transit);
transit->objs = eina_list_append(transit->objs, obj);
-
- if (transit->block)
+ if (!transit->event_enabled)
evas_object_pass_events_set(obj, EINA_TRUE);
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
}
/**
- * Set the event blocked when transit is operating.
+ * Set the event enabled when transit is operating.
*
- * If @p disabled is EINA_TRUE, the objects of the transit will not receives
+ * If @p enabled is EINA_TRUE, the objects of the transit will receives
* events from mouse and keyboard during the animation.
* @note When you add an object with elm_transit_object_add(), its state from
* evas_object_pass_events_get(obj) is saved, and it is applied when the
* run.
*
* @param transit The transit object.
- * @param disabled Disable or enable.
+ * @param enabled Disable or enable.
*
* @ingroup Transit
*/
EAPI void
-elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled)
+elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit);
- if (transit->block == disabled) return;
+ if (transit->event_enabled == enabled) return;
Evas_Object *obj;
Eina_List *elist;
+ Elm_Obj_Data *obj_data;
- transit->block = disabled;
+ transit->event_enabled = enabled;
- if (!transit->block)
+ if (enabled)
{
EINA_LIST_FOREACH(transit->objs, elist, obj)
{
- Elm_Obj_Data *obj_data = evas_object_data_get(obj, _transit_key);
+ obj_data = evas_object_data_get(obj, _transit_key);
evas_object_pass_events_set(obj, obj_data->state);
}
}
}
/**
- * Get the value of event blocked status.
+ * Get the value of event enabled status.
*
- * @see elm_transit_event_block_set()
+ * @see elm_transit_event_enabled_set()
*
* @param transit The Transit object
- * @return EINA_TRUE, when event block is enabled. If @p transit is NULL
+ * @return EINA_TRUE, when event is enabled. If @p transit is NULL
* EINA_FALSE is returned
*
* @ingroup Transit
*/
EAPI Eina_Bool
-elm_transit_event_block_get(const Elm_Transit *transit)
+elm_transit_event_enabled_get(const Elm_Transit *transit)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, EINA_FALSE);
- return transit->block;
+ return transit->event_enabled;
+}
+
+
+/**
+ * Set the event enabled when transit is operating.
+ *
+ * If @p disabled is EINA_TRUE, the objects of the transit will receives
+ * events from mouse and keyboard during the animation.
+ * @note When you add an object with elm_transit_object_add(), its state from
+ * evas_object_pass_events_get(obj) is saved, and it is applied when the
+ * transit ends, if you change this state with evas_object_pass_events_set()
+ * after add the object, this state will change again when @p transit stops to
+ * run.
+ *
+ * @see elm_transit_event_enabled_set()
+ *
+ * @param transit The transit object.
+ * @param disabled Disable or enable.
+ *
+ * @ingroup Transit
+ */
+EINA_DEPRECATED EAPI void
+elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled)
+{
+ elm_transit_event_enabled_set(transit, disabled);
+}
+
+
+/**
+ * Get the value of event block enabled status.
+ *
+ * @see elm_transit_event_enabled_set(), elm_transit_event_enabled_get()
+ *
+ * @param transit The Transit object
+ * @return EINA_TRUE, when event is enabled. If @p transit is NULL
+ * EINA_FALSE is returned
+ *
+ * @ingroup Transit
+ */
+EINA_DEPRECATED EAPI Eina_Bool
+elm_transit_event_block_get(const Elm_Transit *transit)
+{
+ return !elm_transit_event_enabled_get(transit);
}
/**
* @ingroup Transit
*/
EAPI Elm_Transit_Tween_Mode
-elm_transit_tween_mode_get(Elm_Transit *transit)
+elm_transit_tween_mode_get(const Elm_Transit *transit)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, ELM_TRANSIT_TWEEN_MODE_LINEAR);
if ((degree < 90) && (degree > -90))
{
obj = front;
- evas_object_hide(back);
- evas_object_show(front);
+ if (front != back)
+ {
+ evas_object_hide(back);
+ evas_object_show(front);
+ }
}
else
{
obj = back;
- evas_object_hide(front);
- evas_object_show(back);
+ if (front != back)
+ {
+ evas_object_hide(front);
+ evas_object_show(back);
+ }
}
evas_map_smooth_set(map, EINA_TRUE);
if ((degree < 90) && (degree > -90))
{
obj = resizable_flip_node->front;
- evas_object_hide(resizable_flip_node->back);
- evas_object_show(resizable_flip_node->front);
+ if (resizable_flip_node->front != resizable_flip_node->back)
+ {
+ evas_object_hide(resizable_flip_node->back);
+ evas_object_show(resizable_flip_node->front);
+ }
}
else
{
obj = resizable_flip_node->back;
- evas_object_hide(resizable_flip_node->front);
- evas_object_show(resizable_flip_node->back);
+ if (resizable_flip_node->front != resizable_flip_node->back)
+ {
+ evas_object_hide(resizable_flip_node->front);
+ evas_object_show(resizable_flip_node->back);
+ }
}
evas_map_smooth_set(map, EINA_TRUE);
evas_map_point_image_uv_set(map, 3, 0, h2);
evas_map_point_coord_set(map, 0, x, y, 0);
evas_map_point_coord_set(map, 1, w2, y, 0);
- evas_map_point_coord_set(map, 2, w2, h2, 0);
- evas_map_point_coord_set(map, 3, x, h2, 0);
+ evas_map_point_coord_set(map, 2, w2, y+h2, 0);
+ evas_map_point_coord_set(map, 3, x, y+h2, 0);
break;
case ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN:
w2 = (x + w);