void ewl_embed_tab_order_insert_after(Ewl_Embed *e, Ewl_Widget *w, Ewl_Widget *after) { int cur_idx, idx; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("e", e); DCHECK_PARAM_PTR("w", w); DCHECK_PARAM_PTR("before", before); cur_idx = ecore_dlist_index(e->tab_order); if (!ecore_dlist_goto(e->tab_order, after)) { ewl_embed_tab_order_append(e, w); DRETURN(DLEVEL_STABLE); } idx = ecore_dlist_index(e->tab_order); ecore_dlist_goto_index(e->tab_order, cur_idx); ewl_embed_tab_order_insert(e, w, idx + 1); DLEAVE_FUNCTION(DLEVEL_STABLE); } /** * @param e: The embed to insert the widget into the tab order * @param w: The widget ot insert into the tab order * @param before: The widget to insert after * @return Returns no value. * @brief Inserts the @a w widget into the tab order before the @a before widget */ void ewl_embed_tab_order_insert_before(Ewl_Embed *e, Ewl_Widget *w, Ewl_Widget *before) { int cur_idx, idx; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("e", e); DCHECK_PARAM_PTR("w", w); DCHECK_PARAM_PTR("before", before); cur_idx = ecore_dlist_index(e->tab_order); if (!ecore_dlist_goto(e->tab_order, before)) { ewl_embed_tab_order_prepend(e, w); DRETURN(DLEVEL_STABLE); } idx = ecore_dlist_index(e->tab_order); ecore_dlist_goto_index(e->tab_order, cur_idx); ewl_embed_tab_order_insert(e, w, idx); DLEAVE_FUNCTION(DLEVEL_STABLE); }