Animation disable set API provided.
EAPI void elm_pager_content_promote(Evas_Object *obj, Evas_Object *content);
EAPI Evas_Object *elm_pager_content_bottom_get(const Evas_Object *obj);
EAPI Evas_Object *elm_pager_content_top_get(const Evas_Object *obj);
+ EAPI void elm_pager_animation_disable_set(Evas_Object *obj, Eina_Bool disable);
/* available item styles:
* default
EAPI const char *elm_navigationbar_subtitle_label_get(Evas_Object *obj, Evas_Object *content);
EAPI void elm_navigationbar_subtitle_label_set(Evas_Object *obj, Evas_Object *content, const char *subtitle);
EAPI void elm_navigationbar_title_object_list_unset(Evas_Object *obj, Evas_Object *content, Eina_List **list);
+ EAPI void elm_navigationbar_animation_disable_set(Evas_Object *obj, Eina_Bool disable);
/* NavigationBar */
typedef enum
Eina_List *stack;
Evas_Object *base;
Evas_Object *pager;
+ int pushed;
Eina_Bool popped : 1;
Eina_Bool hidden :1;
+ Eina_Bool disable_animation : 1;
};
struct _Item
Widget_Data *wd = elm_widget_data_get(navi_bar);
evas_object_smart_callback_call(navi_bar, "hide,finished", event_info);
wd->popped = EINA_TRUE;
+ wd->pushed = 0;
}
static int
evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE, _resize, NULL);
_sizing_eval(obj);
+ wd->pushed = -1;
return obj;
}
Item *prev_it = NULL;
if (!wd) return;
+ if(!wd->disable_animation)
+ if(wd->pushed == 1) return;
it = _check_item_is_added(obj, content);
if (it) return;
_transition_complete_cb(cb);
free(cb);
//push content to pager
+ if(!cb->first_page)
+ wd->pushed = 1;
elm_pager_content_push(wd->pager, it->content);
-
//push item into the stack. it should be always the tail
if (!_check_item_is_added(obj, content))
wd->stack = eina_list_append(wd->stack, it);
return NULL;
}
+/**
+ * This disables content area animation on push/pop.
+ *
+ * @param[in] obj The NavigationBar object
+ * @param[in] disable if EINA_TRUE animation is disabled.
+ *
+ * @ingroup NavigationBar
+ */
+EAPI void
+elm_navigationbar_animation_disable_set(Evas_Object *obj,
+ Eina_Bool disable)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype)NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ wd->disable_animation = disable;
+ elm_pager_animation_disable_set(wd->pager, disable);
+}
Eina_List *stack;
Item *top, *oldtop;
Evas_Object *rect, *clip;
+ Eina_Bool disable_animation: 1;
};
struct _Item
if (wd->top)
{
o = wd->top->base;
- if (wd->top->popme)
+ if(wd->disable_animation)
+ {
+ edje_object_signal_emit(o, "elm,action,hide,noanimate", "elm");
+ }
+ else if (wd->top->popme)
edje_object_signal_emit(o, "elm,action,pop", "elm");
else
edje_object_signal_emit(o, "elm,action,hide", "elm");
wd->top = ittop;
o = wd->top->base;
evas_object_show(o);
- if (!animate)
- edje_object_signal_emit(o, "elm,action,show,noanimate", "elm");
+ if ((!animate)||(wd->disable_animation))
+ {
+ edje_object_signal_emit(o, "elm,action,show,noanimate", "elm");
+ }
else if (wd->oldtop && wd->oldtop->popme)
edje_object_signal_emit(o, "elm,action,show", "elm");
else
return it->content;
}
+/**
+ * This disables content animation on push/pop.
+ *
+ * @param obj The pager object
+ * @param disable if EINA_TRUE animation is disabled.
+ *
+ * @ingroup Pager
+ */
+EAPI void
+elm_pager_animation_disable_set(Evas_Object *obj,
+ Eina_Bool disable)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype)NULL;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ wd->disable_animation = disable;
+}
+
+