View is something that is expected in the context of MVVM, so using it somewhere else is
going to lead to some confusion. Spotlight does descrive the objective of all of this
widget in actually a more explicit way as they all give the spotlight to one sub widget
at a time.
I have also renamed the View_Manager to be just Manager as the View there wasn't useful.
'test_panes.c',
'test_ui_panes.c',
'test_ui_panel.c',
- 'test_ui_active_view.c',
+ 'test_ui_spotlight.c',
'test_ui_radio.c',
'test_part_bg.c',
'test_part_shadow.c',
void test_gesture_framework(void *data, Evas_Object *obj, void *event_info);
void test_ui_tab_pager(void *data, Evas_Object *obj, void *event_info);
-void test_ui_active_view_stack(void *data, Evas_Object *obj, void *event_info);
-void test_ui_active_view_plain(void *data, Evas_Object *obj, void *event_info);
-void test_ui_active_view_scroll(void *data, Evas_Object *obj, void *event_info);
+void test_ui_spotlight_stack(void *data, Evas_Object *obj, void *event_info);
+void test_ui_spotlight_plain(void *data, Evas_Object *obj, void *event_info);
+void test_ui_spotlight_scroll(void *data, Evas_Object *obj, void *event_info);
void test_ui_relative_layout(void *data, Evas_Object *obj, void *event_info);
void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info);
//------------------------------//
ADD_TEST_EO(NULL, "Tab Pager", "Efl.Ui.Tab_Pager", test_ui_tab_pager);
- ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Plain", test_ui_active_view_plain);
- ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Scroll", test_ui_active_view_scroll);
- ADD_TEST_EO(NULL, "Active View", "Efl.Ui.Active_View Stack", test_ui_active_view_stack);
- ADD_TEST_EO(NULL, "Active View", "Navigation stack", test_ui_stack);
+ ADD_TEST_EO(NULL, "Spotlight", "Efl.Ui.Spotlight Plain", test_ui_spotlight_plain);
+ ADD_TEST_EO(NULL, "Spotlight", "Efl.Ui.Spotlight Scroll", test_ui_spotlight_scroll);
+ ADD_TEST_EO(NULL, "Spotlight", "Efl.Ui.Spotlight Stack", test_ui_spotlight_stack);
+ ADD_TEST_EO(NULL, "Spotlight", "Navigation stack", test_ui_stack);
//------------------------------//
ADD_TEST(NULL, "Popups", "Ctxpopup", test_ctxpopup);
ADD_TEST(NULL, "Popups", "Hover", test_hover);
typedef struct _Params
{
Evas_Object *navi;
- Eo *active_view;
+ Eo *spotlight;
Eo *indicator;
int w, h;
Eina_Bool wfill, hfill;
typedef struct _Page_Set_Params
{
- Eo *active_view;
+ Eo *spotlight;
Eo *spinner;
} Page_Set_Params;
typedef struct _Pack_Params
{
Pack_Type type;
- Eo *active_view;
+ Eo *spotlight;
Eo *pack_sp;
Eo *unpack_sp;
Eo *unpack_btn;
typedef struct _Size_Params
{
- Eo *active_view;
+ Eo *spotlight;
Eo *slider;
Params *params;
} Size_Params;
static void
prev_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Eo *active_view = data;
- int active_index = efl_ui_active_view_active_index_get(active_view);
+ Eo *spotlight = data;
+ int active_index = efl_ui_spotlight_active_index_get(spotlight);
if (active_index - 1 > -1)
- efl_ui_active_view_active_index_set(active_view, active_index - 1);
+ efl_ui_spotlight_active_index_set(spotlight, active_index - 1);
}
static void
next_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Eo *active_view = data;
- int active_index = efl_ui_active_view_active_index_get(active_view);
+ Eo *spotlight = data;
+ int active_index = efl_ui_spotlight_active_index_get(spotlight);
- if (active_index + 1 < efl_content_count(active_view))
- efl_ui_active_view_active_index_set(active_view, active_index + 1);
+ if (active_index + 1 < efl_content_count(spotlight))
+ efl_ui_spotlight_active_index_set(spotlight, active_index + 1);
}
static void
else h = params->h;
params->w = efl_ui_range_value_get(ev->object);
- efl_ui_active_view_size_set(params->active_view, EINA_SIZE2D(params->w, h));
+ efl_ui_spotlight_size_set(params->spotlight, EINA_SIZE2D(params->w, h));
}
static void
else w = params->w;
params->h = efl_ui_range_value_get(ev->object);
- efl_ui_active_view_size_set(params->active_view, EINA_SIZE2D(w, params->h));
+ efl_ui_spotlight_size_set(params->spotlight, EINA_SIZE2D(w, params->h));
}
static void
if (params->params->hfill) h = -1;
else h = params->params->h;
- efl_ui_active_view_size_set(params->active_view, EINA_SIZE2D(w, h));
+ efl_ui_spotlight_size_set(params->spotlight, EINA_SIZE2D(w, h));
}
static void
if (params->params->hfill) h = -1;
else h = params->params->h;
- efl_ui_active_view_size_set(params->active_view, EINA_SIZE2D(w, h));
+ efl_ui_spotlight_size_set(params->spotlight, EINA_SIZE2D(w, h));
}
static void
pack_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Pack_Params *param = data;
- Eo *active_view = param->active_view;
+ Eo *spotlight = param->spotlight;
Eo *page = NULL, *curr_page;
int index, cnt;
if ((param->type != UNPACK_AT) && (param->type != CLEAR))
{
- index = efl_content_count(active_view);
+ index = efl_content_count(spotlight);
switch (index % 3)
{
case 0:
- page = view_add(LAYOUT, active_view);
+ page = view_add(LAYOUT, spotlight);
break;
case 1:
- page = view_add(LIST, active_view);
+ page = view_add(LIST, spotlight);
break;
case 2:
- page = view_add(BUTTON, active_view);
+ page = view_add(BUTTON, spotlight);
break;
default:
- page = view_add(LAYOUT, active_view);
+ page = view_add(LAYOUT, spotlight);
break;
}
}
switch (param->type)
{
case PACK_BEGIN:
- efl_pack_begin(active_view, page);
+ efl_pack_begin(spotlight, page);
break;
case PACK_END:
- efl_pack_end(active_view, page);
+ efl_pack_end(spotlight, page);
break;
case PACK_BEFORE:
- index = efl_ui_active_view_active_index_get(active_view);
- curr_page = efl_pack_content_get(active_view, index);
- efl_pack_before(active_view, page, curr_page);
+ index = efl_ui_spotlight_active_index_get(spotlight);
+ curr_page = efl_pack_content_get(spotlight, index);
+ efl_pack_before(spotlight, page, curr_page);
break;
case PACK_AFTER:
- index = efl_ui_active_view_active_index_get(active_view);
- curr_page = efl_pack_content_get(active_view, index);
- efl_pack_after(active_view, page, curr_page);
+ index = efl_ui_spotlight_active_index_get(spotlight);
+ curr_page = efl_pack_content_get(spotlight, index);
+ efl_pack_after(spotlight, page, curr_page);
break;
case PACK_AT:
index = efl_ui_range_value_get(param->pack_sp);
- efl_pack_at(active_view, page, index);
+ efl_pack_at(spotlight, page, index);
break;
case UNPACK_AT:
index = efl_ui_range_value_get(param->unpack_sp);
- page = efl_pack_unpack_at(active_view, index);
+ page = efl_pack_unpack_at(spotlight, index);
efl_del(page);
break;
case CLEAR:
- efl_pack_clear(active_view);
+ efl_pack_clear(spotlight);
break;
}
- cnt = efl_content_count(active_view);
+ cnt = efl_content_count(spotlight);
index = efl_ui_range_value_get(param->pack_sp);
if (index > cnt)
{
Page_Set_Params *psp = data;
- efl_ui_active_view_active_index_set(psp->active_view,
+ efl_ui_spotlight_active_index_set(psp->spotlight,
efl_ui_range_value_get(psp->spinner));
}
{
Params *params = data;
- params->indicator = efl_add(EFL_UI_ACTIVE_VIEW_INDICATOR_ICON_CLASS, params->active_view);
- efl_ui_active_view_indicator_set(params->active_view, params->indicator);
+ params->indicator = efl_add(EFL_UI_SPOTLIGHT_INDICATOR_ICON_CLASS, params->spotlight);
+ efl_ui_spotlight_indicator_set(params->spotlight, params->indicator);
}
static void
indicator_none_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Params *params = data;
- efl_ui_active_view_indicator_set(params->active_view, NULL);
+ efl_ui_spotlight_indicator_set(params->spotlight, NULL);
}
static void
-active_view_size(void *data,
+spotlight_size(void *data,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
if (!size_params) return;
size_params->slider = sl;
- size_params->active_view = params->active_view;
+ size_params->spotlight = params->spotlight;
size_params->params = params;
efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, width_check_cb,
if (!size_params) return;
size_params->slider = sl;
- size_params->active_view = params->active_view;
+ size_params->spotlight = params->spotlight;
size_params->params = params;
efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, height_check_cb,
{
Params *params = data;
- efl_ui_active_view_view_manager_animation_enabled_set(efl_ui_active_view_manager_get(params->active_view), efl_ui_check_selected_get(ev->object));
+ efl_ui_spotlight_manager_animation_enabled_set(efl_ui_spotlight_manager_get(params->spotlight), efl_ui_check_selected_get(ev->object));
}
static void
ck = efl_add(EFL_UI_CHECK_CLASS, box);
efl_event_callback_add(ck, EFL_UI_CHECK_EVENT_SELECTED_CHANGED, _animation_cb, params);
- efl_ui_check_selected_set(ck, efl_ui_active_view_view_manager_animation_enabled_get(efl_ui_active_view_manager_get(params->active_view)));
+ efl_ui_check_selected_set(ck, efl_ui_spotlight_manager_animation_enabled_get(efl_ui_spotlight_manager_get(params->spotlight)));
efl_text_set(ck, "Animation");
efl_pack_end(box, ck);
efl_gfx_entity_visible_set(ck, 1);
{
Params *params = (Params *)data;
Evas_Object *navi = params->navi;
- Eo *active_view = params->active_view;
+ Eo *spotlight = params->spotlight;
Eo *btn, *box, *in_box1, *in_box2, *sp1, *sp2;
Pack_Params *pack_param;
sp1 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box1,
efl_ui_range_limits_set(efl_added, 0,
- efl_content_count(active_view)),
+ efl_content_count(spotlight)),
efl_ui_range_value_set(efl_added,
- efl_ui_active_view_active_index_get(active_view)));
+ efl_ui_spotlight_active_index_get(spotlight)));
in_box2 = efl_add(EFL_UI_BOX_CLASS, box,
efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
- pack_param->active_view = active_view;
+ pack_param->spotlight = spotlight;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
pack_param->unpack_btn = btn;
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
- pack_param->active_view = active_view;
+ pack_param->spotlight = spotlight;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
pack_param->unpack_btn = btn;
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
- pack_param->active_view = active_view;
+ pack_param->spotlight = spotlight;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
pack_param->unpack_btn = btn;
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
- pack_param->active_view = active_view;
+ pack_param->spotlight = spotlight;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
pack_param->unpack_btn = btn;
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
- pack_param->active_view = active_view;
+ pack_param->spotlight = spotlight;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
pack_param->unpack_btn = btn;
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
- pack_param->active_view = active_view;
+ pack_param->spotlight = spotlight;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
pack_param->unpack_btn = btn;
efl_event_callback_add(btn, EFL_EVENT_DEL,
pack_btn_del_cb, pack_param);
- if (efl_content_count(active_view) > 0)
+ if (efl_content_count(spotlight) > 0)
{
efl_ui_range_limits_set(sp2, 0,
- (efl_content_count(active_view) - 1));
+ (efl_content_count(spotlight) - 1));
efl_ui_range_value_set(sp2,
- efl_ui_active_view_active_index_get(active_view));
+ efl_ui_spotlight_active_index_get(spotlight));
}
else
{
pack_param = calloc(1, sizeof(Pack_Params));
if (!pack_param) return;
- pack_param->active_view = active_view;
+ pack_param->spotlight = spotlight;
pack_param->pack_sp = sp1;
pack_param->unpack_sp = sp2;
pack_param->unpack_btn = btn;
{
Params *params = (Params *)data;
Evas_Object *navi = params->navi;
- Eo *active_view = params->active_view;
+ Eo *spotlight = params->spotlight;
Eo *btn, *box, *sp;
Page_Set_Params *psp = calloc(1, sizeof(Page_Set_Params));
if (!psp) return;
efl_gfx_hint_align_set(efl_added, -1, -1),
efl_pack_end(box, efl_added));
- if (efl_content_count(active_view) > 0)
+ if (efl_content_count(spotlight) > 0)
{
efl_ui_range_limits_set(sp, 0,
- (efl_content_count(active_view) - 1));
+ (efl_content_count(spotlight) - 1));
efl_ui_range_value_set(sp,
- efl_ui_active_view_active_index_get(active_view));
+ efl_ui_spotlight_active_index_get(spotlight));
}
else
{
elm_object_disabled_set(sp, EINA_TRUE);
}
- psp->active_view = active_view;
+ psp->spotlight = spotlight;
psp->spinner = sp;
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, page_set_btn_cb, psp);
}
void
-test_ui_active_view_stack(void *data EINA_UNUSED,
+test_ui_spotlight_stack(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- Eo *win, *panes, *navi, *list, *layout, *active_view, *view;
+ Eo *win, *panes, *navi, *list, *layout, *spotlight, *view;
Params *params = NULL;
char buf[PATH_MAX];
int i;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
- efl_text_set(efl_added, "Efl.Ui.Active_View Stack"),
+ efl_text_set(efl_added, "Efl.Ui.Spotlight Stack"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
panes = efl_add(EFL_UI_PANES_CLASS, win,
efl_file_load(efl_added),
efl_content_set(efl_part(panes, "second"), efl_added));
- active_view = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, layout,
+ spotlight = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, layout,
efl_content_set(efl_part(layout, "pager"), efl_added),
- efl_ui_active_view_size_set(efl_added, EINA_SIZE2D(200, 300)));
+ efl_ui_spotlight_size_set(efl_added, EINA_SIZE2D(200, 300)));
- efl_ui_active_view_manager_set(active_view, efl_new(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_STACK_CLASS));
+ efl_ui_spotlight_manager_set(spotlight, efl_new(EFL_UI_SPOTLIGHT_MANAGER_STACK_CLASS));
efl_add(EFL_UI_BUTTON_CLASS, layout,
efl_text_set(efl_added, "Prev"),
efl_event_callback_add(efl_added,
- EFL_UI_EVENT_CLICKED, prev_btn_cb, active_view),
+ EFL_UI_EVENT_CLICKED, prev_btn_cb, spotlight),
efl_content_set(efl_part(layout, "prev_btn"), efl_added));
efl_add(EFL_UI_BUTTON_CLASS, layout,
efl_text_set(efl_added, "Next"),
efl_event_callback_add(efl_added,
- EFL_UI_EVENT_CLICKED, next_btn_cb, active_view),
+ EFL_UI_EVENT_CLICKED, next_btn_cb, spotlight),
efl_content_set(efl_part(layout, "next_btn"), efl_added));
params = calloc(1, sizeof(Params));
if (!params) return;
params->navi = navi;
- params->active_view = active_view;
+ params->spotlight = spotlight;
params->indicator = NULL;
params->w = 200;
params->h = 300;
params->wfill = EINA_FALSE;
params->hfill = EINA_FALSE;
- elm_list_item_append(list, "View Size", NULL, NULL, active_view_size, params);
+ elm_list_item_append(list, "View Size", NULL, NULL, spotlight_size, params);
elm_list_item_append(list, "Pack / Unpack", NULL, NULL, pack_cb, params);
elm_list_item_append(list, "Active Index", NULL, NULL, active_index_cb, params);
elm_list_item_append(list, "Indicator", NULL, NULL, indicator_cb, params);
switch (i % 3)
{
case 0:
- view = view_add(LAYOUT, active_view);
+ view = view_add(LAYOUT, spotlight);
break;
case 1:
- view = view_add(LIST, active_view);
+ view = view_add(LIST, spotlight);
break;
case 2:
- view = view_add(BUTTON, active_view);
+ view = view_add(BUTTON, spotlight);
break;
default:
- view = view_add(LAYOUT, active_view);
+ view = view_add(LAYOUT, spotlight);
break;
}
- efl_pack_end(active_view, view);
+ efl_pack_end(spotlight, view);
}
efl_gfx_entity_size_set(win, EINA_SIZE2D(580, 320));
}
void
-test_ui_active_view_plain(void *data EINA_UNUSED,
+test_ui_spotlight_plain(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- Eo *win, *panes, *navi, *list, *layout, *active_view, *view;
+ Eo *win, *panes, *navi, *list, *layout, *spotlight, *view;
Params *params = NULL;
char buf[PATH_MAX];
int i;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
- efl_text_set(efl_added, "Efl.Ui.Active_View Plain"),
+ efl_text_set(efl_added, "Efl.Ui.Spotlight Plain"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
panes = efl_add(EFL_UI_PANES_CLASS, win,
efl_file_load(efl_added),
efl_content_set(efl_part(panes, "second"), efl_added));
- active_view = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, layout,
+ spotlight = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, layout,
efl_content_set(efl_part(layout, "pager"), efl_added),
- efl_ui_active_view_size_set(efl_added, EINA_SIZE2D(200, 300)));
+ efl_ui_spotlight_size_set(efl_added, EINA_SIZE2D(200, 300)));
efl_add(EFL_UI_BUTTON_CLASS, layout,
efl_text_set(efl_added, "Prev"),
efl_event_callback_add(efl_added,
- EFL_UI_EVENT_CLICKED, prev_btn_cb, active_view),
+ EFL_UI_EVENT_CLICKED, prev_btn_cb, spotlight),
efl_content_set(efl_part(layout, "prev_btn"), efl_added));
efl_add(EFL_UI_BUTTON_CLASS, layout,
efl_text_set(efl_added, "Next"),
efl_event_callback_add(efl_added,
- EFL_UI_EVENT_CLICKED, next_btn_cb, active_view),
+ EFL_UI_EVENT_CLICKED, next_btn_cb, spotlight),
efl_content_set(efl_part(layout, "next_btn"), efl_added));
params = calloc(1, sizeof(Params));
if (!params) return;
params->navi = navi;
- params->active_view = active_view;
+ params->spotlight = spotlight;
params->indicator = NULL;
params->w = 200;
params->h = 300;
params->wfill = EINA_FALSE;
params->hfill = EINA_FALSE;
- elm_list_item_append(list, "View Size", NULL, NULL, active_view_size, params);
+ elm_list_item_append(list, "View Size", NULL, NULL, spotlight_size, params);
elm_list_item_append(list, "Pack / Unpack", NULL, NULL, pack_cb, params);
elm_list_item_append(list, "Active Index", NULL, NULL, active_index_cb, params);
elm_list_item_append(list, "Indicator", NULL, NULL, indicator_cb, params);
switch (i % 3)
{
case 0:
- view = view_add(LAYOUT, active_view);
+ view = view_add(LAYOUT, spotlight);
break;
case 1:
- view = view_add(LIST, active_view);
+ view = view_add(LIST, spotlight);
break;
case 2:
- view = view_add(BUTTON, active_view);
+ view = view_add(BUTTON, spotlight);
break;
default:
- view = view_add(LAYOUT, active_view);
+ view = view_add(LAYOUT, spotlight);
break;
}
- efl_pack_end(active_view, view);
+ efl_pack_end(spotlight, view);
}
efl_gfx_entity_size_set(win, EINA_SIZE2D(580, 320));
}
void
-test_ui_active_view_scroll(void *data EINA_UNUSED,
+test_ui_spotlight_scroll(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- Eo *win, *panes, *navi, *list, *layout, *active_view, *view;
+ Eo *win, *panes, *navi, *list, *layout, *spotlight, *view;
Params *params = NULL;
char buf[PATH_MAX];
int i;
win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
- efl_text_set(efl_added, "Efl.Ui.Active_View Scroll"),
+ efl_text_set(efl_added, "Efl.Ui.Spotlight Scroll"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE));
panes = efl_add(EFL_UI_PANES_CLASS, win,
efl_file_load(efl_added),
efl_content_set(efl_part(panes, "second"), efl_added));
- active_view = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, layout,
+ spotlight = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, layout,
efl_content_set(efl_part(layout, "pager"), efl_added),
- efl_ui_active_view_size_set(efl_added, EINA_SIZE2D(200, 300)));
+ efl_ui_spotlight_size_set(efl_added, EINA_SIZE2D(200, 300)));
- efl_ui_active_view_manager_set(active_view, efl_new(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_SCROLL_CLASS));
+ efl_ui_spotlight_manager_set(spotlight, efl_new(EFL_UI_SPOTLIGHT_MANAGER_SCROLL_CLASS));
efl_add(EFL_UI_BUTTON_CLASS, layout,
efl_text_set(efl_added, "Prev"),
efl_event_callback_add(efl_added,
- EFL_UI_EVENT_CLICKED, prev_btn_cb, active_view),
+ EFL_UI_EVENT_CLICKED, prev_btn_cb, spotlight),
efl_content_set(efl_part(layout, "prev_btn"), efl_added));
efl_add(EFL_UI_BUTTON_CLASS, layout,
efl_text_set(efl_added, "Next"),
efl_event_callback_add(efl_added,
- EFL_UI_EVENT_CLICKED, next_btn_cb, active_view),
+ EFL_UI_EVENT_CLICKED, next_btn_cb, spotlight),
efl_content_set(efl_part(layout, "next_btn"), efl_added));
params = calloc(1, sizeof(Params));
if (!params) return;
params->navi = navi;
- params->active_view = active_view;
+ params->spotlight = spotlight;
params->indicator = NULL;
params->w = 200;
params->h = 300;
params->wfill = EINA_FALSE;
params->hfill = EINA_FALSE;
- elm_list_item_append(list, "View Size", NULL, NULL, active_view_size, params);
+ elm_list_item_append(list, "View Size", NULL, NULL, spotlight_size, params);
elm_list_item_append(list, "Pack / Unpack", NULL, NULL, pack_cb, params);
elm_list_item_append(list, "Active Index", NULL, NULL, active_index_cb, params);
elm_list_item_append(list, "Indicator", NULL, NULL, indicator_cb, params);
switch (i % 3)
{
case 0:
- view = view_add(LAYOUT, active_view);
+ view = view_add(LAYOUT, spotlight);
break;
case 1:
- view = view_add(LIST, active_view);
+ view = view_add(LIST, spotlight);
break;
case 2:
- view = view_add(BUTTON, active_view);
+ view = view_add(BUTTON, spotlight);
break;
default:
- view = view_add(LAYOUT, active_view);
+ view = view_add(LAYOUT, spotlight);
break;
}
- efl_pack_end(active_view, view);
+ efl_pack_end(spotlight, view);
}
efl_gfx_entity_size_set(win, EINA_SIZE2D(580, 320));
_stack_pop(void *data, const Efl_Event *ev EINA_UNUSED)
{
Eo *stack = data;
- efl_ui_active_view_pop(stack, EINA_TRUE);
+ efl_ui_spotlight_pop(stack, EINA_TRUE);
}
static void
Eo *nl = _navigation_layout_create(stack, "5th layout", btn);
- efl_ui_active_view_push(stack, nl);
+ efl_ui_spotlight_push(stack, nl);
}
static void
_bar_right_btn_set(nl, _fifth_layout_insert, stack);
- efl_ui_active_view_push(stack, nl);
+ efl_ui_spotlight_push(stack, nl);
}
static void
_bar_right_btn_set(nl, _third_layout_push, stack);
- efl_ui_active_view_push(stack, nl);
+ efl_ui_spotlight_push(stack, nl);
}
static void
_bar_left_btn_set(nl, _win_del, win);
_bar_right_btn_set(nl, _second_layout_push, stack);
- efl_ui_active_view_push(stack, nl);
+ efl_ui_spotlight_push(stack, nl);
}
void
efl_gfx_entity_size_set(win, EINA_SIZE2D(500, 500));
- Eo *stack = efl_ui_active_view_util_stack_gen(win);
+ Eo *stack = efl_ui_spotlight_util_stack_gen(win);
efl_content_set(win, stack);
efl_pack_end(tp, page);
}
- efl_ui_active_view_active_index_set(tp, 0);
+ efl_ui_spotlight_active_index_set(tp, 0);
ad = (App_Data*)calloc(1, sizeof(App_Data));
_tab_set_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Tab_Set_Data *tsd = data;
- efl_ui_active_view_active_index_set(tsd->tab_pager, elm_spinner_value_get(tsd->spinner));
+ efl_ui_spotlight_active_index_set(tsd->tab_pager, elm_spinner_value_get(tsd->spinner));
}
static void
sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, box,
efl_ui_range_limits_set(efl_added, 0, efl_content_count(tab_pager) - 1),
- efl_ui_range_value_set(efl_added, efl_ui_active_view_active_index_get(tab_pager)),
+ efl_ui_range_value_set(efl_added, efl_ui_spotlight_active_index_get(tab_pager)),
efl_pack_end(box, efl_added));
tsd->tab_pager = tab_pager;
Eo *tab_page, *cur_tab_page;
int index;
- index = efl_ui_active_view_active_index_get(tab_pager);
+ index = efl_ui_spotlight_active_index_get(tab_pager);
cur_tab_page = efl_pack_content_get(tab_pager, index);
tab_page = tab_page_add(tab_pager);
Eo *tab_page, *cur_tab_page;
int index;
- index = efl_ui_active_view_active_index_get(tab_pager);
+ index = efl_ui_spotlight_active_index_get(tab_pager);
cur_tab_page = efl_pack_content_get(tab_pager, index);
tab_page = tab_page_add(tab_pager);
sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box,
efl_ui_range_limits_set(efl_added, 0, efl_content_count(tab_pager) - 1),
- efl_ui_range_value_set(efl_added, efl_ui_active_view_active_index_get(tab_pager)),
+ efl_ui_range_value_set(efl_added, efl_ui_spotlight_active_index_get(tab_pager)),
efl_pack_end(in_box, efl_added));
tsd->tab_pager = tab_pager;
_unpack_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
Eo *tab_pager = data;
- int index = efl_ui_active_view_active_index_get(tab_pager);
+ int index = efl_ui_spotlight_active_index_get(tab_pager);
Eo *tab_page = efl_pack_content_get(tab_pager, index);
efl_pack_unpack(tab_pager, tab_page);
efl_del(tab_page);
sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box,
efl_ui_range_limits_set(efl_added, 0, efl_content_count(tab_pager) - 1),
- efl_ui_range_value_set(efl_added, efl_ui_active_view_active_index_get(tab_pager)),
+ efl_ui_range_value_set(efl_added, efl_ui_spotlight_active_index_get(tab_pager)),
efl_pack_end(in_box, efl_added));
tsd->tab_pager = tab_pager;
char *label = NULL;
char *icon = NULL;
int cur;
- cur = efl_ui_active_view_active_index_get(tcd->tab_pager);
+ cur = efl_ui_spotlight_active_index_get(tcd->tab_pager);
tab_page = efl_pack_content_get(tcd->tab_pager, cur);
if (efl_ui_check_selected_get(tcd->label_check))
static void
_tran_set_btn_scroll_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Efl_Ui_Active_View_View_Manager_Scroll *scroll = efl_new(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_SCROLL_CLASS);
- efl_ui_active_view_manager_set(data, scroll);
+ Efl_Ui_Spotlight_Manager_Scroll *scroll = efl_new(EFL_UI_SPOTLIGHT_MANAGER_SCROLL_CLASS);
+ efl_ui_spotlight_manager_set(data, scroll);
efl_unref(scroll);
}
static void
_tran_set_btn_stack_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Efl_Ui_Active_View_View_Manager_Scroll *stack = efl_new(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_STACK_CLASS);
- efl_ui_active_view_manager_set(data, stack);
+ Efl_Ui_Spotlight_Manager_Scroll *stack = efl_new(EFL_UI_SPOTLIGHT_MANAGER_STACK_CLASS);
+ efl_ui_spotlight_manager_set(data, stack);
efl_unref(stack);
}
static void
_tran_unset_btn_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- efl_ui_active_view_manager_set(data, NULL);
+ efl_ui_spotlight_manager_set(data, NULL);
}
static void
#include <Elementary.h>
-static Efl_Ui_Active_View_Container *container;
+static Efl_Ui_Spotlight_Container *container;
static Eina_Bool play_state = EINA_FALSE;
static Efl_Loop_Timer *show_timer = NULL;
efl_del(show_timer);
show_timer = NULL;
- int current_index = efl_ui_active_view_active_index_get(container);
+ int current_index = efl_ui_spotlight_active_index_get(container);
int new_index = (current_index + 1) % efl_content_count(container);
- efl_ui_active_view_active_index_set(container, new_index);
+ efl_ui_spotlight_active_index_set(container, new_index);
}
static void
table = efl_add(EFL_UI_TABLE_CLASS, win);
efl_content_set(win, table);
- container = efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, win,
- efl_event_callback_add(efl_added, EFL_UI_ACTIVE_VIEW_EVENT_TRANSITION_END, _container_end, NULL),
+ container = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, win,
+ efl_event_callback_add(efl_added, EFL_UI_SPOTLIGHT_EVENT_TRANSITION_END, _container_end, NULL),
efl_pack_table(table, efl_added, 0, 0, 1, 1));
- efl_ui_active_view_indicator_set(container, efl_new(EFL_UI_ACTIVE_VIEW_INDICATOR_ICON_CLASS));
- efl_ui_active_view_manager_set(container, efl_new(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_STACK_CLASS));
+ efl_ui_spotlight_indicator_set(container, efl_new(EFL_UI_SPOTLIGHT_INDICATOR_ICON_CLASS));
+ efl_ui_spotlight_manager_set(container, efl_new(EFL_UI_SPOTLIGHT_MANAGER_STACK_CLASS));
for (int i = 0; i < IMG_NUM; i++)
{
# include <efl_ui_panes_eo.h>
# include <efl_ui_panes_part.eo.h>
-#define _EFL_UI_ACTIVE_VIEW_VIEW_MANAGEREO_CLASS_TYPE
-typedef Eo Efl_Ui_Active_View_View_Manager;
-#define _EFL_UI_ACTIVE_VIEW_INDICATOR_EO_CLASS_TYPE
-typedef Eo Efl_Ui_Active_View_Indicator;
-
-# include <efl_ui_active_view_container.eo.h>
-# include <efl_ui_active_view_view_manager.eo.h>
-# include <efl_ui_active_view_indicator.eo.h>
-# include <efl_ui_active_view_indicator_icon.eo.h>
-# include <efl_ui_active_view_view_manager_scroll.eo.h>
-# include <efl_ui_active_view_view_manager_stack.eo.h>
-# include <efl_ui_active_view_util.eo.h>
+#define _EFL_UI_SPOTLIGHT_MANAGEREO_EO_CLASS_TYPE
+typedef Eo Efl_Ui_Spotlight_Manager;
+#define _EFL_UI_SPOTLIGHT_INDICATOR_EO_CLASS_TYPE
+typedef Eo Efl_Ui_Spotlight_Indicator;
+
+# include <efl_ui_spotlight_container.eo.h>
+# include <efl_ui_spotlight_manager.eo.h>
+# include <efl_ui_spotlight_indicator.eo.h>
+# include <efl_ui_spotlight_indicator_icon.eo.h>
+# include <efl_ui_spotlight_manager_scroll.eo.h>
+# include <efl_ui_spotlight_manager_stack.eo.h>
+# include <efl_ui_spotlight_util.eo.h>
# include <efl_ui_navigation_bar.eo.h>
# include <efl_ui_navigation_bar_part.eo.h>
+++ /dev/null
-struct @beta Efl.Ui.Active_View.Transition_Event {
- [[Information regarding transition events.]]
- from : int; [[The view index from where the transition started, -1 if not known.]]
- to : int; [[The view index to where the transition is headed, -1 if not known.]]
-}
-
-class @beta Efl.Ui.Active_View.Container extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
-{
- [[The Active View widget is a container for other sub-widgets (views), where only one sub-widget is active at any given time.
-
- Views are added using the @Efl.Pack_Linear interface and the active view is selected using @.active_index.
-
- The way the different views are rendered can be customized through the @.view_manager object. For example, only the active view
- might be shown, or it might be shown in a central position whereas the other views are displayed on the sides, or grayed-out.
- All views are displayed with the same size, selected with @.active_view_size.
-
- Additionally, the transition from one view to another can be animated. This animation is also controlled by the @.view_manager object.
-
- Also, an indicator widget can be used to show a visual cue of how many views are there and which one is the active one.
-
- This class can be used to create other widgets like Pagers, Tabbed pagers or Stacks, where each view represents a "page" full
- of other widgets. All these cases can be implemented with a different @.view_manager and use the same @Efl.Ui.Active_View.Container.
- ]]
- c_prefix: efl_ui_active_view;
- methods {
- @property view_manager {
- [[This object defines how views are rendered and animated.
- If it is not set, only the active view is shown and transitions are instantaneous (not animated).
- ]]
- values {
- view_manager : Efl.Ui.Active_View.View_Manager @owned; [[The View Manager object or $NULL.]]
- }
- }
- @property indicator {
- [[An indicator object to use, which will display the current state of the Active View (number of views and active one).
- When this object is set, it is immediately updated to reflect the current state of the widget.
- Its location inside the container is controlled by the @.view_manager.
- ]]
- values {
- indicator : Efl.Ui.Active_View.Indicator @owned; [[The Indicator object or $NULL.]]
- }
- }
- @property active_index {
- [[Currently active view among all the views added to this widget.
-
- Changing this value might trigger an animation.
- ]]
- values {
- index: int; [[Index of the active view, from 0 to the number of views - 1 (@Efl.Container.content_count - 1).]]
- }
- }
- @property active_view_size {
- [[The size to use when displaying the Active View. This is used by the @.view_manager to perform the rendering.
- Views other than the Active one may or may not use this size.]]
- values {
- size: Eina.Size2D; [[Render size for the Active View. (-1, -1) means that all available space inside the container is used.]]
- }
- }
- push @beta {
- [[Packs a new view at the position indicated by @.active_index (0 by default).
-
- This is the same behavior as a push operation on a stack.
-
- An animation might be triggered to make the new active view come into position.
- ]]
- params {
- view : Efl.Gfx.Entity; [[View to add and set to be the active view.]]
- }
- }
- pop @beta {
- [[Removes the active view from the widget.
-
- The views behind it naturally flow down so the next one becomes the active view. This is the same behavior as a pop operation on a stack.
- When combined with @.push you don't have to worry about @.active_index since only the first view is manipulated.
-
- An animation might be triggered to make the new active view come into position and the old one disappear.
-
- The removed view can be returned to the caller or deleted (depending on $delete_on_transition_end).
- ]]
- params {
- deletion_on_transition_end : bool; [[ if $true, then the object will be deleted before resolving the future, and a NULL pointer is the value of the future. $false if no operation should be applied to it]]
- }
- return : future<Efl.Gfx.Entity>; [[ This Future gets resolved when any transition animation finishes and the popped view is ready for collection.
- If there is no animation, the Future resolves immediately.
- If $deletion_on_transition_end is $true then this widget will destroy the popped view and the Future will contain no Value. Otherwise, the caller becomes the owner of the view contained in the Future and must dispose of it appropriately. ]]
- }
- }
- events {
- transition,start : Efl.Ui.Active_View.Transition_Event; [[A transition animation has started.]]
- transition,end : Efl.Ui.Active_View.Transition_Event; [[A transition animation has ended.]]
- }
- implements {
- Efl.Object.constructor;
- Efl.Object.finalize;
- Efl.Object.invalidate;
- Efl.Container.content_count;
- Efl.Container.content_iterate;
- Efl.Pack.pack_clear;
- Efl.Pack.unpack_all;
- Efl.Pack.unpack;
- Efl.Pack.pack;
- Efl.Pack_Linear.pack_begin;
- Efl.Pack_Linear.pack_end;
- Efl.Pack_Linear.pack_before;
- Efl.Pack_Linear.pack_after;
- Efl.Pack_Linear.pack_at;
- Efl.Pack_Linear.pack_content_get;
- Efl.Pack_Linear.pack_index_get;
- Efl.Pack_Linear.pack_unpack_at;
- }
-}
+++ /dev/null
-class @beta Efl.Ui.Active_View.Indicator_Icon extends Efl.Ui.Active_View.Indicator {
- implements {
- Efl.Ui.Active_View.Indicator.bind;
- Efl.Ui.Active_View.Indicator.content_del;
- Efl.Ui.Active_View.Indicator.content_add;
- Efl.Ui.Active_View.Indicator.position_update;
- }
-}
+++ /dev/null
-#ifdef HAVE_CONFIG_H
-# include "elementary_config.h"
-#endif
-
-#include <Efl_Ui.h>
-#include "elm_priv.h"
-
-typedef struct {
-
-} Efl_Ui_Active_View_Util_Data;
-
-EOLIAN static Efl_Ui_Active_View_Container*
-_efl_ui_active_view_util_stack_gen(Efl_Ui_Widget *parent)
-{
- Efl_Ui_Active_View_View_Manager *manager = efl_add(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_STACK_CLASS, parent);
- return efl_add(EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS, parent,
- efl_ui_active_view_manager_set(efl_added, manager));
-}
-
-
-#include "efl_ui_active_view_util.eo.c"
+++ /dev/null
-class @beta Efl.Ui.Active_View.View_Manager_Plain extends Efl.Ui.Active_View.View_Manager
-{
- implements {
- Efl.Ui.Active_View.View_Manager.bind;
- Efl.Ui.Active_View.View_Manager.content_add;
- Efl.Ui.Active_View.View_Manager.content_del;
- Efl.Ui.Active_View.View_Manager.switch_to;
- Efl.Ui.Active_View.View_Manager.view_size {set;}
- Efl.Ui.Active_View.View_Manager.animation_enabled {set; get;}
- Efl.Object.destructor;
- }
-}
+++ /dev/null
-class @beta Efl.Ui.Active_View.View_Manager_Scroll extends Efl.Ui.Active_View.View_Manager
-{
- implements {
- Efl.Ui.Active_View.View_Manager.bind;
- Efl.Ui.Active_View.View_Manager.content_add;
- Efl.Ui.Active_View.View_Manager.content_del;
- Efl.Ui.Active_View.View_Manager.switch_to;
- Efl.Ui.Active_View.View_Manager.view_size {set;}
- Efl.Ui.Active_View.View_Manager.animation_enabled {set; get;}
- Efl.Object.destructor;
- }
-}
+++ /dev/null
-class @beta Efl.Ui.Active_View.View_Manager_Stack extends Efl.Ui.Active_View.View_Manager
-{
- implements {
- Efl.Ui.Active_View.View_Manager.bind;
- Efl.Ui.Active_View.View_Manager.content_add;
- Efl.Ui.Active_View.View_Manager.content_del;
- Efl.Ui.Active_View.View_Manager.switch_to;
- Efl.Ui.Active_View.View_Manager.view_size {set;}
- Efl.Ui.Active_View.View_Manager.animation_enabled {set; get;}
- Efl.Object.destructor;
- }
-}
{
Eo *navigation_bar = data;
- Eo *active_view = efl_provider_find(navigation_bar, EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS);
- if (!active_view)
+ Eo *spotlight = efl_provider_find(navigation_bar, EFL_UI_SPOTLIGHT_CONTAINER_CLASS);
+ if (!spotlight)
{
- ERR("Cannot find EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS instance!");
+ ERR("Cannot find EFL_UI_SPOTLIGHT_CONTAINER_CLASS instance!");
return;
}
- efl_ui_active_view_pop(active_view, EINA_TRUE);
+ efl_ui_spotlight_pop(spotlight, EINA_TRUE);
}
EOLIAN static Eo *
#include <Efl_Ui.h>
#include "elm_priv.h"
-#include "efl_ui_active_view_view_manager_plain.eo.h"
+#include "efl_ui_spotlight_manager_plain.eo.h"
-typedef struct _Efl_Ui_Active_View_Container_Data
+typedef struct _Efl_Ui_Spotlight_Container_Data
{
Eina_List *content_list;
Eo *page_root, *event;
Eina_Promise *transition_done;
Efl_Gfx_Entity *content;
} transition_done;
- Efl_Ui_Active_View_View_Manager *transition;
- Efl_Ui_Active_View_Indicator *indicator;
+ Efl_Ui_Spotlight_Manager *transition;
+ Efl_Ui_Spotlight_Indicator *indicator;
double position;
Eina_Bool fill_width: 1;
Eina_Bool fill_height: 1;
Eina_Bool prevent_transition_interaction : 1;
-} Efl_Ui_Active_View_Container_Data;
+} Efl_Ui_Spotlight_Container_Data;
-#define MY_CLASS EFL_UI_ACTIVE_VIEW_CONTAINER_CLASS
+#define MY_CLASS EFL_UI_SPOTLIGHT_CONTAINER_CLASS
-static void _unpack(Eo *obj, Efl_Ui_Active_View_Container_Data *pd, Efl_Gfx_Entity *subobj, int index);
-static void _unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd, Eina_Bool clear);
+static void _unpack(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd, Efl_Gfx_Entity *subobj, int index);
+static void _unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd, Eina_Bool clear);
static int
-clamp_index(Efl_Ui_Active_View_Container_Data *pd, int index)
+clamp_index(Efl_Ui_Spotlight_Container_Data *pd, int index)
{
if (index < ((int)eina_list_count(pd->content_list)) * -1)
return -1;
}
static int
-index_rollover(Efl_Ui_Active_View_Container_Data *pd, int index)
+index_rollover(Efl_Ui_Spotlight_Container_Data *pd, int index)
{
int c = eina_list_count(pd->content_list);
if (index < c * -1)
}
static void
-_transition_end(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd)
+_transition_end(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd)
{
- Efl_Ui_Active_View_Transition_Event ev;
+ Efl_Ui_Spotlight_Transition_Event ev;
if (pd->prevent_transition_interaction) return;
ev.from = pd->show_request.from;
ev.to = pd->show_request.to;
- efl_event_callback_call(obj, EFL_UI_ACTIVE_VIEW_EVENT_TRANSITION_END, &ev);
+ efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_EVENT_TRANSITION_END, &ev);
pd->show_request.active = EINA_FALSE;
pd->show_request.from = -1;
pd->show_request.to = -1;
}
static void
-_transition_start(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd, int from, int to, double progress)
+_transition_start(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd, int from, int to, double progress)
{
- Efl_Ui_Active_View_Transition_Event ev;
+ Efl_Ui_Spotlight_Transition_Event ev;
if (pd->prevent_transition_interaction) return;
pd->show_request.last_pos = progress;
ev.from = pd->show_request.from;
ev.to = pd->show_request.to;
- efl_event_callback_call(obj, EFL_UI_ACTIVE_VIEW_EVENT_TRANSITION_START, &ev);
+ efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_EVENT_TRANSITION_START, &ev);
}
static void
-_position_set(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd, double progress)
+_position_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd, double progress)
{
if (progress < -1.0) progress = -1.0;
if (progress > eina_list_count(pd->content_list)) progress = eina_list_count(pd->content_list);
if (pd->indicator)
{
- efl_ui_active_view_indicator_position_update(pd->indicator, progress);
+ efl_ui_spotlight_indicator_position_update(pd->indicator, progress);
}
pd->position = progress;
}
static void
-_transition_event_emission(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd)
+_transition_event_emission(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd)
{
if (pd->show_request.active)
{
static void
_resize_cb(void *data, const Efl_Event *ev)
{
- Efl_Ui_Active_View_Container_Data *pd = data;
+ Efl_Ui_Spotlight_Container_Data *pd = data;
Eina_Size2D sz;
sz = efl_gfx_entity_size_get(ev->object);
if (pd->fill_height) pd->page_spec.sz.h = sz.h;
if (pd->transition)
- efl_ui_active_view_view_manager_view_size_set(pd->transition, pd->page_spec.sz);
+ efl_ui_spotlight_manager_size_set(pd->transition, pd->page_spec.sz);
}
EOLIAN static Eo *
-_efl_ui_active_view_container_efl_object_constructor(Eo *obj,
- Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_efl_object_constructor(Eo *obj,
+ Efl_Ui_Spotlight_Container_Data *pd)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
pd->fill_width = EINA_TRUE;
pd->fill_height = EINA_TRUE;
- efl_ui_active_view_size_set(obj, EINA_SIZE2D(-1, -1));
+ efl_ui_spotlight_size_set(obj, EINA_SIZE2D(-1, -1));
elm_widget_can_focus_set(obj, EINA_FALSE);
}
EOLIAN static Efl_Object*
-_efl_ui_active_view_container_efl_object_finalize(Eo *obj, Efl_Ui_Active_View_Container_Data *pd EINA_UNUSED)
+_efl_ui_spotlight_container_efl_object_finalize(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd EINA_UNUSED)
{
- Efl_Ui_Active_View_View_Manager *manager;
+ Efl_Ui_Spotlight_Manager *manager;
obj = efl_finalize(efl_super(obj, MY_CLASS));
- manager = efl_ui_active_view_manager_get(obj);
+ manager = efl_ui_spotlight_manager_get(obj);
//set a view manager in case nothing is here
if (!manager)
{
Eo *plain;
- plain = efl_add(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_PLAIN_CLASS, obj);
- efl_ui_active_view_manager_set(obj, plain);
+ plain = efl_add(EFL_UI_SPOTLIGHT_MANAGER_PLAIN_CLASS, obj);
+ efl_ui_spotlight_manager_set(obj, plain);
}
else
{
- efl_ui_active_view_view_manager_animation_enabled_set(manager, EINA_TRUE);
+ efl_ui_spotlight_manager_animation_enabled_set(manager, EINA_TRUE);
}
return obj;
}
EOLIAN static void
-_efl_ui_active_view_container_efl_object_invalidate(Eo *obj,
- Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_efl_object_invalidate(Eo *obj,
+ Efl_Ui_Spotlight_Container_Data *pd)
{
_unpack_all(obj, pd, EINA_TRUE);
efl_invalidate(efl_super(obj, MY_CLASS));
}
EOLIAN static int
-_efl_ui_active_view_container_efl_container_content_count(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_efl_container_content_count(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd)
{
return eina_list_count(pd->content_list);
}
static void
_child_inv(void *data, const Efl_Event *ev)
{
- Efl_Ui_Active_View_Container_Data *pd = efl_data_scope_get(data, MY_CLASS);
+ Efl_Ui_Spotlight_Container_Data *pd = efl_data_scope_get(data, MY_CLASS);
int index = eina_list_data_idx(pd->content_list, ev->object);
_unpack(data, pd, ev->object, index);
}
static Eina_Bool
-_register_child(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd, Efl_Gfx_Entity *subobj)
+_register_child(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd, Efl_Gfx_Entity *subobj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj, EINA_FALSE);
if (eina_list_data_find(pd->content_list, subobj))
}
static void
-_update_internals(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index)
+_update_internals(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index)
{
Eina_Bool curr_page_update = EINA_FALSE;
pd->prevent_transition_interaction = EINA_TRUE;
if (pd->transition)
- efl_ui_active_view_view_manager_content_add(pd->transition, subobj, index);
+ efl_ui_spotlight_manager_content_add(pd->transition, subobj, index);
if (pd->indicator)
- efl_ui_active_view_indicator_content_add(pd->indicator, subobj, index);
+ efl_ui_spotlight_indicator_content_add(pd->indicator, subobj, index);
if (curr_page_update && !pd->transition && eina_list_count(pd->content_list) != 1)
_position_set(obj, pd, pd->curr.page);
pd->prevent_transition_interaction = EINA_FALSE;
if (eina_list_count(pd->content_list) == 1)
- efl_ui_active_view_active_index_set(obj, 0);
+ efl_ui_spotlight_active_index_set(obj, 0);
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd,
Efl_Gfx_Entity *subobj)
{
if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd,
Efl_Gfx_Entity *subobj)
{
if (!_register_child(obj, pd, subobj)) return EINA_FALSE;
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd,
Efl_Gfx_Entity *subobj,
const Efl_Gfx_Entity *existing)
{
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd,
Efl_Gfx_Entity *subobj,
const Efl_Gfx_Entity *existing)
{
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_linear_pack_at(Eo *obj,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_at(Eo *obj,
+ Efl_Ui_Spotlight_Container_Data *pd,
Efl_Gfx_Entity *subobj,
int index)
{
}
EOLIAN static Efl_Gfx_Entity *
-_efl_ui_active_view_container_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd,
int index)
{
return eina_list_nth(pd->content_list, index_rollover(pd, index));
}
EOLIAN static int
-_efl_ui_active_view_container_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd,
const Efl_Gfx_Entity *subobj)
{
return eina_list_data_idx(pd->content_list, (void *)subobj);
}
EOLIAN static void
-_efl_ui_active_view_container_active_index_set(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_active_index_set(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd,
int index)
{
int before;
int old_curr_page = pd->curr.page;
pd->curr.page = index;
- efl_ui_active_view_view_manager_switch_to(pd->transition, old_curr_page, pd->curr.page);
+ efl_ui_spotlight_manager_switch_to(pd->transition, old_curr_page, pd->curr.page);
}
EOLIAN static int
-_efl_ui_active_view_container_active_index_get(const Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_active_index_get(const Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd)
{
return pd->curr.page;
}
EOLIAN Eina_Size2D
-_efl_ui_active_view_container_active_view_size_get(const Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_spotlight_size_get(const Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd)
{
return pd->page_spec.sz;
}
EOLIAN static void
-_efl_ui_active_view_container_active_view_size_set(Eo *obj,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_spotlight_size_set(Eo *obj,
+ Efl_Ui_Spotlight_Container_Data *pd,
Eina_Size2D sz)
{
Eina_Size2D size;
pd->page_spec.sz.w = size.w;
if (pd->transition)
- efl_ui_active_view_view_manager_view_size_set(pd->transition, pd->page_spec.sz);
+ efl_ui_spotlight_manager_size_set(pd->transition, pd->page_spec.sz);
}
static void
_unpack_all(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd,
+ Efl_Ui_Spotlight_Container_Data *pd,
Eina_Bool clear)
{
pd->curr.page = -1;
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_pack_clear(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_efl_pack_pack_clear(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd)
{
_unpack_all(obj, pd, EINA_TRUE);
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_unpack_all(Eo *obj EINA_UNUSED,
- Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_efl_pack_unpack_all(Eo *obj EINA_UNUSED,
+ Efl_Ui_Spotlight_Container_Data *pd)
{
_unpack_all(obj, pd, EINA_FALSE);
static void
_unpack(Eo *obj,
- Efl_Ui_Active_View_Container_Data *pd,
+ Efl_Ui_Spotlight_Container_Data *pd,
Efl_Gfx_Entity *subobj,
int index)
{
pd->curr.page--;
if (pd->transition)
- efl_ui_active_view_view_manager_content_del(pd->transition, subobj, index);
+ efl_ui_spotlight_manager_content_del(pd->transition, subobj, index);
if (pd->indicator)
- efl_ui_active_view_indicator_content_del(pd->indicator, subobj, index);
+ efl_ui_spotlight_indicator_content_del(pd->indicator, subobj, index);
//we deleted the current index
if (early_curr_page == index)
if (deletion_of_active && new_curr_page == pd->curr.page)
pd->curr.page = index -1;
if (eina_list_count(pd->content_list) > 0 && efl_alive_get(obj))
- efl_ui_active_view_active_index_set(obj, new_curr_page);
+ efl_ui_spotlight_active_index_set(obj, new_curr_page);
else
pd->curr.page = -1;
}
//position has updated
if (early_curr_page != pd->curr.page && early_curr_page != index &&
pd->indicator && !pd->transition)
- efl_ui_active_view_indicator_position_update(pd->indicator, pd->curr.page);
+ efl_ui_spotlight_indicator_position_update(pd->indicator, pd->curr.page);
efl_event_callback_del(subobj, EFL_EVENT_INVALIDATE, _child_inv, obj);
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_unpack(Eo *obj,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_unpack(Eo *obj,
+ Efl_Ui_Spotlight_Container_Data *pd,
Efl_Gfx_Entity *subobj)
{
if (!subobj) return EINA_FALSE;
}
EOLIAN static Efl_Gfx_Entity *
-_efl_ui_active_view_container_efl_pack_linear_pack_unpack_at(Eo *obj,
- Efl_Ui_Active_View_Container_Data *pd,
+_efl_ui_spotlight_container_efl_pack_linear_pack_unpack_at(Eo *obj,
+ Efl_Ui_Spotlight_Container_Data *pd,
int index)
{
Efl_Gfx_Entity *subobj = eina_list_nth(pd->content_list, index_rollover(pd, index_rollover(pd, index)));
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_container_efl_pack_pack(Eo *obj, Efl_Ui_Active_View_Container_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
+_efl_ui_spotlight_container_efl_pack_pack(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
{
return efl_pack_begin(obj, subobj);
}
EOLIAN static Eina_Iterator*
-_efl_ui_active_view_container_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd)
+_efl_ui_spotlight_container_efl_container_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd)
{
return eina_list_iterator_new(pd->content_list);
}
static void
_pos_updated(void *data, const Efl_Event *event)
{
- Efl_Ui_Active_View_Container_Data *pd = efl_data_scope_get(data, MY_CLASS);
+ Efl_Ui_Spotlight_Container_Data *pd = efl_data_scope_get(data, MY_CLASS);
double progress = *((double*)event->info);
//ignore this here, this could result in unintendet transition,start / end calls
if (EINA_DBL_EQ(progress, pd->position))
}
EOLIAN static void
-_efl_ui_active_view_container_view_manager_set(Eo *obj, Efl_Ui_Active_View_Container_Data *pd, Efl_Ui_Active_View_View_Manager *transition)
+_efl_ui_spotlight_container_spotlight_manager_set(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd, Efl_Ui_Spotlight_Manager *transition)
{
if (!transition)
- pd->transition = efl_add(EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_PLAIN_CLASS, obj);
+ pd->transition = efl_add(EFL_UI_SPOTLIGHT_MANAGER_PLAIN_CLASS, obj);
else
- EINA_SAFETY_ON_FALSE_RETURN(efl_isa(transition, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_CLASS));
+ EINA_SAFETY_ON_FALSE_RETURN(efl_isa(transition, EFL_UI_SPOTLIGHT_MANAGER_CLASS));
if (pd->transition)
{
- efl_ui_active_view_view_manager_bind(pd->transition, NULL, NULL);
+ efl_ui_spotlight_manager_bind(pd->transition, NULL, NULL);
efl_del(pd->transition);
}
{
efl_parent_set(pd->transition, obj);
//disable animation when not finalized yet, this help reducing the overhead of scheduling a animation that will not be displayed
- efl_ui_active_view_view_manager_animation_enabled_set(pd->transition, efl_finalized_get(obj));
- efl_ui_active_view_view_manager_bind(pd->transition, obj,
+ efl_ui_spotlight_manager_animation_enabled_set(pd->transition, efl_finalized_get(obj));
+ efl_ui_spotlight_manager_bind(pd->transition, obj,
pd->page_root);
- efl_ui_active_view_view_manager_view_size_set(pd->transition, pd->page_spec.sz);
- efl_event_callback_add(pd->transition, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_EVENT_POS_UPDATE, _pos_updated, obj);
+ efl_ui_spotlight_manager_size_set(pd->transition, pd->page_spec.sz);
+ efl_event_callback_add(pd->transition, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, _pos_updated, obj);
}
}
-EOLIAN static Efl_Ui_Active_View_View_Manager*
-_efl_ui_active_view_container_view_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd)
+EOLIAN static Efl_Ui_Spotlight_Manager*
+_efl_ui_spotlight_container_spotlight_manager_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd)
{
- if (efl_isa(pd->transition, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_PLAIN_CLASS))
+ if (efl_isa(pd->transition, EFL_UI_SPOTLIGHT_MANAGER_PLAIN_CLASS))
return NULL;
else
return pd->transition;
}
EOLIAN static void
-_efl_ui_active_view_container_indicator_set(Eo *obj, Efl_Ui_Active_View_Container_Data *pd, Efl_Ui_Active_View_Indicator *indicator)
+_efl_ui_spotlight_container_indicator_set(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd, Efl_Ui_Spotlight_Indicator *indicator)
{
if (pd->indicator)
{
- efl_ui_active_view_indicator_bind(pd->indicator, obj);
+ efl_ui_spotlight_indicator_bind(pd->indicator, obj);
efl_del(pd->indicator);
}
pd->indicator = indicator;
if (pd->indicator)
{
- efl_ui_active_view_indicator_bind(pd->indicator, obj);
+ efl_ui_spotlight_indicator_bind(pd->indicator, obj);
if (pd->position != -1)
- efl_ui_active_view_indicator_position_update(pd->indicator, pd->position);
+ efl_ui_spotlight_indicator_position_update(pd->indicator, pd->position);
}
}
-EOLIAN static Efl_Ui_Active_View_Indicator*
-_efl_ui_active_view_container_indicator_get(const Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Container_Data *pd)
+EOLIAN static Efl_Ui_Spotlight_Indicator*
+_efl_ui_spotlight_container_indicator_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Container_Data *pd)
{
return pd->indicator;
}
EOLIAN static void
-_efl_ui_active_view_container_push(Eo *obj, Efl_Ui_Active_View_Container_Data *pd EINA_UNUSED, Efl_Gfx_Entity *view)
+_efl_ui_spotlight_container_push(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd EINA_UNUSED, Efl_Gfx_Entity *view)
{
- int old_active_index = efl_ui_active_view_active_index_get(obj);
+ int old_active_index = efl_ui_spotlight_active_index_get(obj);
if (old_active_index == -1)
old_active_index = 0;
efl_pack_at(obj, view, old_active_index);
- efl_ui_active_view_active_index_set(obj, old_active_index);
+ efl_ui_spotlight_active_index_set(obj, old_active_index);
}
static Eina_Value
}
EOLIAN static Eina_Future*
-_efl_ui_active_view_container_pop(Eo *obj, Efl_Ui_Active_View_Container_Data *pd, Eina_Bool del)
+_efl_ui_spotlight_container_pop(Eo *obj, Efl_Ui_Spotlight_Container_Data *pd, Eina_Bool del)
{
Eina_Future *transition_done;
int new_index;
if (eina_list_count(pd->content_list) < 2)
new_index = -1;
- new_index = efl_ui_active_view_active_index_get(obj) + 1;
+ new_index = efl_ui_spotlight_active_index_get(obj) + 1;
if (new_index >= (int)eina_list_count(pd->content_list))
new_index -= 2;
- pd->transition_done.content = efl_pack_content_get(obj, efl_ui_active_view_active_index_get(obj));
+ pd->transition_done.content = efl_pack_content_get(obj, efl_ui_spotlight_active_index_get(obj));
pd->transition_done.transition_done = efl_loop_promise_new(obj);
transition_done = eina_future_new(pd->transition_done.transition_done);
if (del)
transition_done = eina_future_then(transition_done, _delete_obj, NULL);
- efl_ui_active_view_active_index_set(obj, new_index);
+ efl_ui_spotlight_active_index_set(obj, new_index);
return transition_done;
}
-#include "efl_ui_active_view_container.eo.c"
+#include "efl_ui_spotlight_container.eo.c"
--- /dev/null
+struct @beta Efl.Ui.Spotlight.Transition_Event {
+ [[Information regarding transition events.]]
+ from : int; [[The index from where the transition started, -1 if not known.]]
+ to : int; [[The index to where the transition is headed, -1 if not known.]]
+}
+
+class @beta Efl.Ui.Spotlight.Container extends Efl.Ui.Layout_Base implements Efl.Pack_Linear
+{
+ [[The Spotlight widget is a container for other sub-widgets, where only one sub-widget is active at any given time.
+
+ Sub-widgets are added using the @Efl.Pack_Linear interface and the active one (the one in the "spotlight") is selected using @.active_index.
+
+ The way the different sub-widgets are rendered can be customized through the @.spotlight_manager object. For example, only the active sub-widget
+ might be shown, or it might be shown in a central position whereas the other sub-widgets are displayed on the sides, or grayed-out.
+ All sub-widgets are displayed with the same size, selected with @.spotlight_size.
+
+ Additionally, the transition from one sub-widget to another can be animated. This animation is also controlled by the @.spotlight_manager object.
+
+ Also, an indicator widget can be used to show a visual cue of how many sub-widgets are there and which one is the active one.
+
+ This class can be used to create other widgets like Pagers, Tabbed pagers or Stacks, where each sub-widget represents a "page" full
+ of other widgets. All these cases can be implemented with a different @.spotlight_manager and use the same @Efl.Ui.Spotlight.Container.
+ ]]
+ c_prefix: efl_ui_spotlight;
+ methods {
+ @property spotlight_manager {
+ [[This object defines how sub-widgets are rendered and animated.
+ If it is not set, only the active sub-widget is shown and transitions are instantaneous (not animated).
+ ]]
+ values {
+ spotlight_manager : Efl.Ui.Spotlight.Manager @owned; [[The Spotlight Manager object or $NULL.]]
+ }
+ }
+ @property indicator {
+ [[An indicator object to use, which will display the current state of the spotlight (number of sub-widgets and active one).
+ When this object is set, it is immediately updated to reflect the current state of the widget.
+ Its location inside the container is controlled by the @.spotlight_manager.
+ ]]
+ values {
+ indicator : Efl.Ui.Spotlight.Indicator @owned; [[The Indicator object or $NULL.]]
+ }
+ }
+ @property active_index {
+ [[Currently active sub-widget (the one with the spotlight) among all the sub-widgets added to this widget
+
+ Changing this value might trigger an animation.
+ ]]
+ values {
+ index: int; [[Index of the sub-widget that has the spotlight, from 0 to the number of sub-widgets - 1 (@Efl.Container.content_count - 1).]]
+ }
+ }
+ @property spotlight_size {
+ [[The size to use when displaying the Sub-Widget which has the spotlight. This is used by the @.spotlight_manager to perform the rendering.
+ Sub-Widgets other than the Active one may or may not use this size.]]
+ values {
+ size: Eina.Size2D; [[Render size for the spotlight. (-1, -1) means that all available space inside the container is used.]]
+ }
+ }
+ push @beta {
+ [[Packs a new sub-widget at the position indicated by @.active_index (0 by default).
+
+ This is the same behavior as a push operation on a stack.
+
+ An animation might be triggered to give the new sub-widget the spotlight and come into position.
+ ]]
+ params {
+ widget : Efl.Gfx.Entity; [[Sub-Widget to add and set to be the spotlight sub-widget.]]
+ }
+ }
+ pop @beta {
+ [[Removes the sub-widget that has the spotlight from the widget.
+
+ The sub-widgets behind it naturally flow down so the next one gets the spotlight. This is the same behavior as a pop operation on a stack.
+ When combined with @.push you don't have to worry about @.active_index since only the first sub-widget is manipulated.
+
+ An animation might be triggered to give the new sub-widget the spotlight, come into position and the old one disappear.
+
+ The removed sub-widget can be returned to the caller or deleted (depending on $delete_on_transition_end).
+ ]]
+ params {
+ deletion_on_transition_end : bool; [[ if $true, then the object will be deleted before resolving the future, and a NULL pointer is the value of the future. $false if no operation should be applied to it]]
+ }
+ return : future<Efl.Gfx.Entity>; [[ This Future gets resolved when any transition animation finishes and the popped sub-widget is ready for collection.
+ If there is no animation, the Future resolves immediately.
+ If $deletion_on_transition_end is $true then this widget will destroy the popped sub-widget and the Future will contain no Value. Otherwise, the caller becomes the owner of the sub-widget contained in the Future and must dispose of it appropriately. ]]
+ }
+ }
+ events {
+ transition,start : Efl.Ui.Spotlight.Transition_Event; [[A transition animation has started.]]
+ transition,end : Efl.Ui.Spotlight.Transition_Event; [[A transition animation has ended.]]
+ }
+ implements {
+ Efl.Object.constructor;
+ Efl.Object.finalize;
+ Efl.Object.invalidate;
+ Efl.Container.content_count;
+ Efl.Container.content_iterate;
+ Efl.Pack.pack_clear;
+ Efl.Pack.unpack_all;
+ Efl.Pack.unpack;
+ Efl.Pack.pack;
+ Efl.Pack_Linear.pack_begin;
+ Efl.Pack_Linear.pack_end;
+ Efl.Pack_Linear.pack_before;
+ Efl.Pack_Linear.pack_after;
+ Efl.Pack_Linear.pack_at;
+ Efl.Pack_Linear.pack_content_get;
+ Efl.Pack_Linear.pack_index_get;
+ Efl.Pack_Linear.pack_unpack_at;
+ }
+}
typedef struct {
-} Efl_Ui_Active_View_Indicator_Data;
+} Efl_Ui_Spotlight_Indicator_Data;
-#include "efl_ui_active_view_indicator.eo.c"
+#include "efl_ui_spotlight_indicator.eo.c"
-abstract @beta Efl.Ui.Active_View.Indicator extends Efl.Object {
- [[Object used by @Efl.Ui.Active_View.Container to render an indication of the active view's position among
- the rest of the container's views.
+abstract @beta Efl.Ui.Spotlight.Indicator extends Efl.Object {
+ [[Object used by @Efl.Ui.Spotlight.Container to render an indication of the active widgets's position among
+ the rest of the container's widgets.
An example would be Android's little dots in the home screen.
]]
methods {
bind @pure_virtual {
- [[This method is called the first time an @Efl.Ui.Active_View.Indicator is assigned to an @Efl.Ui.Active_View.Container, binding them together.
+ [[This method is called the first time an @Efl.Ui.Spotlight.Indicator is assigned to an @Efl.Ui.Spotlight.Container, binding them together.
- This call can be used to setup the indicator part of the $active_view.
+ This call can be used to setup the indicator part of the $spotlight.
The Active View of the container (if there is any) will be informed to the indicator by a later call to @.position_update.
]]
params {
- active_view : Efl.Ui.Active_View.Container; [[The container to bind this indicator to.]]
+ spotlight : Efl.Ui.Spotlight.Container; [[The container to bind this indicator to.]]
}
}
content_add @pure_virtual {
[[A $subobj has been added at position $index in the bound container.
- The manager should check the container's @Efl.Ui.Active_View.Container.active_index since indices might have
+ The manager should check the container's @Efl.Ui.Spotlight.Container.active_index since indices might have
shifted due to the insertion of the new object.
]]
params {
content_del @pure_virtual {
[[The $subobj at position $index in the bound container has been removed.
- The manager should check the container's @Efl.Ui.Active_View.Container.active_index since indices might have
+ The manager should check the container's @Efl.Ui.Spotlight.Container.active_index since indices might have
shifted due to the removal of the object.
]]
params {
}
}
position_update @pure_virtual {
- [[This method tells the indicator that @Efl.Ui.Active_View.Container.active_index has changed in the bound container.
+ [[This method tells the indicator that @Efl.Ui.Spotlight.Container.active_index has changed in the bound container.
$position ranges from -1 to the number of views in the bound container (@Efl.Container.content_count).
Notice this allows moving to a position before the first view or past the last view, which might happen if the view
typedef struct {
Efl_Ui_Box *indicator;
- Efl_Ui_Active_View_Container *container;
+ Efl_Ui_Spotlight_Container *container;
double last_position;
-} Efl_Ui_Active_View_Indicator_Icon_Data;
+} Efl_Ui_Spotlight_Indicator_Icon_Data;
static void
_flush_state(Eo *item, double val)
}
static void
-_add_item(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Indicator_Icon_Data *pd)
+_add_item(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Indicator_Icon_Data *pd)
{
Efl_Canvas_Layout *item;
}
static void
-_flush_position(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Indicator_Icon_Data *pd)
+_flush_position(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Indicator_Icon_Data *pd)
{
int next = -1, closer;
double closer_val;
}
EOLIAN static void
-_efl_ui_active_view_indicator_icon_efl_ui_active_view_indicator_bind(Eo *obj, Efl_Ui_Active_View_Indicator_Icon_Data *pd, Efl_Ui_Active_View_Container *active_view)
+_efl_ui_spotlight_indicator_icon_efl_ui_spotlight_indicator_bind(Eo *obj, Efl_Ui_Spotlight_Indicator_Icon_Data *pd, Efl_Ui_Spotlight_Container *spotlight)
{
- if (active_view)
+ if (spotlight)
{
- pd->container = active_view;
- pd->indicator = efl_add(EFL_UI_BOX_CLASS, active_view);
+ pd->container = spotlight;
+ pd->indicator = efl_add(EFL_UI_BOX_CLASS, spotlight);
efl_ui_widget_internal_set(pd->indicator, EINA_TRUE);
efl_content_set(efl_part(pd->container, "efl.indicator"), pd->indicator);
efl_gfx_entity_visible_set(pd->indicator, EINA_TRUE);
}
EOLIAN static void
-_efl_ui_active_view_indicator_icon_efl_ui_active_view_indicator_content_add(Eo *obj, Efl_Ui_Active_View_Indicator_Icon_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index EINA_UNUSED)
+_efl_ui_spotlight_indicator_icon_efl_ui_spotlight_indicator_content_add(Eo *obj, Efl_Ui_Spotlight_Indicator_Icon_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index EINA_UNUSED)
{
_add_item(obj, pd);
_flush_position(obj, pd);
}
EOLIAN static void
-_efl_ui_active_view_indicator_icon_efl_ui_active_view_indicator_content_del(Eo *obj, Efl_Ui_Active_View_Indicator_Icon_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index EINA_UNUSED)
+_efl_ui_spotlight_indicator_icon_efl_ui_spotlight_indicator_content_del(Eo *obj, Efl_Ui_Spotlight_Indicator_Icon_Data *pd, Efl_Gfx_Entity *subobj EINA_UNUSED, int index EINA_UNUSED)
{
efl_del(efl_pack_content_get(pd->indicator, 0));
_flush_position(obj, pd);
}
EOLIAN static void
-_efl_ui_active_view_indicator_icon_efl_ui_active_view_indicator_position_update(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_Indicator_Icon_Data *pd, double position)
+_efl_ui_spotlight_indicator_icon_efl_ui_spotlight_indicator_position_update(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Indicator_Icon_Data *pd, double position)
{
pd->last_position = position;
_flush_position(obj, pd);
}
-#include "efl_ui_active_view_indicator_icon.eo.c"
+#include "efl_ui_spotlight_indicator_icon.eo.c"
--- /dev/null
+class @beta Efl.Ui.Spotlight.Indicator_Icon extends Efl.Ui.Spotlight.Indicator {
+ implements {
+ Efl.Ui.Spotlight.Indicator.bind;
+ Efl.Ui.Spotlight.Indicator.content_del;
+ Efl.Ui.Spotlight.Indicator.content_add;
+ Efl.Ui.Spotlight.Indicator.position_update;
+ }
+}
typedef struct {
-} Efl_Ui_Active_View_View_Manager_Data;
+} Efl_Ui_Spotlight_Manager_Data;
-#include "efl_ui_active_view_view_manager.eo.c"
+#include "efl_ui_spotlight_manager.eo.c"
-abstract @beta Efl.Ui.Active_View.View_Manager extends Efl.Object {
- [[Manager object used by @Efl.Ui.Active_View.Container to handle rendering and animation of its views, and user interaction.
+abstract @beta Efl.Ui.Spotlight.Manager extends Efl.Object {
+ [[Manager object used by @Efl.Ui.Spotlight.Container to handle rendering and animation of its sub-widgets, and user interaction.
- For instance, changes to the currently active view (@Efl.Ui.Active_View.Container.active_index) can be animated with a transition.
- This object can also handle user interaction. For example, dragging the active view to one side to get to a different view (like an Android home screen).
- Such user interactions should end up setting a new @Efl.Ui.Active_View.Container.active_index.
+ For instance, changes to the current sub-widget in the spotlight (@Efl.Ui.Spotlight.Container.active_index) can be animated with a transition.
+ This object can also handle user interaction. For example, dragging the sub-widget to one side to get to a different sub-widget (like an smartphone home screen).
+ Such user interactions should end up setting a new @Efl.Ui.Spotlight.Container.active_index.
During a transition, the evolution of the current position should be exposed by emitting $pos_update events.
]]
methods {
bind @pure_virtual {
- [[This method is called the first time an @Efl.Ui.Active_View.View_Manager is assigned to an @Efl.Ui.Active_View.Container, binding them together.
+ [[This method is called the first time an @Efl.Ui.Spotlight.Manager is assigned to an @Efl.Ui.Spotlight.Container, binding them together.
The manager can read the current content of the container, subscribe to events, or do any initialization it requires.
]]
params {
- active_view : Efl.Ui.Active_View.Container; [[The container to bind the view manager to.]]
+ spotlight : Efl.Ui.Spotlight.Container; [[The container to bind the manager to.]]
group : Efl.Canvas.Group; [[The graphical group where the views should be added with @Efl.Canvas.Group.group_member_add and removed with @Efl.Canvas.Group.group_member_remove.]]
}
}
content_add @pure_virtual {
[[A $subobj has been added at position $index in the bound container.
- The manager should check the container's @Efl.Ui.Active_View.Container.active_index since indices might have
+ The manager should check the container's @Efl.Ui.Spotlight.Container.active_index since indices might have
shifted due to the insertion of the new object.
]]
params {
content_del @pure_virtual {
[[The $subobj at position $index in the bound container has been removed.
- The manager should check the container's @Efl.Ui.Active_View.Container.active_index since indices might have
+ The manager should check the container's @Efl.Ui.Spotlight.Container.active_index since indices might have
shifted due to the removal of the object.
]]
params {
}
}
switch_to @pure_virtual {
- [[Switch from one view to another. If there was no previous view, $from might be -1.
- This function should display an animation if the @Efl.Ui.Active_View.View_Manager supports them.
+ [[Switch from one sub-widget to another. If there was no previous sub-widget, $from might be -1.
+ This function should display an animation if the @Efl.Ui.Spotlight.Manager supports them.
]]
params {
- from : int; [[Index of the starting view in the container's list. Might be -1 if unknown.]]
- to : int; [[Index of the target view in the container's list.]]
+ from : int; [[Index of the starting sub-widget in the container's list. Might be -1 if unknown.]]
+ to : int; [[Index of the target sub-widget in the container's list.]]
}
}
- @property view_size @pure_virtual {
- [[Will be called whenever the @Efl.Ui.Active_View.Container.active_view_size changes so the @Efl.Ui.Active_View.View_Manager can update itself.]]
+ @property size @pure_virtual {
+ [[Will be called whenever the @Efl.Ui.Spotlight.Container.spotlight_size changes so the @Efl.Ui.Spotlight.Manager can update itself.]]
set {
}
values {
- size : Eina.Size2D; [[The new size of the views.]]
+ size : Eina.Size2D; [[The new size of the sub-widgets.]]
}
}
@property animation_enabled @pure_virtual {
}
}
events {
- pos_update : double; [[Index of the view currently being displayed. Fractional values indicate a position in-between views.
- For instance, when transitioning from view 2 to view 3, this event should be emitted with monotonically
+ pos_update : double; [[Index of the sub-widget currently being displayed. Fractional values indicate a position in-between sub-widgets.
+ For instance, when transitioning from sub-widget 2 to sub-widget 3, this event should be emitted with monotonically
increasing values ranging from 2.0 to 3.0.
Animations can perform any movement they want, but the reported $pos_update must move in the same direction.]]
}
#include <Efl_Ui.h>
#include "elm_priv.h"
-#include "efl_ui_active_view_view_manager_plain.eo.h"
+#include "efl_ui_spotlight_manager_plain.eo.h"
typedef struct {
- Efl_Ui_Active_View_Container * container;
+ Efl_Ui_Spotlight_Container * container;
Efl_Gfx_Entity *group;
Eina_Size2D page_size;
int current_content;
Eina_Bool animation;
-} Efl_Ui_Active_View_View_Manager_Plain_Data;
+} Efl_Ui_Spotlight_Manager_Plain_Data;
-#define MY_CLASS EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_PLAIN_CLASS
+#define MY_CLASS EFL_UI_SPOTLIGHT_MANAGER_PLAIN_CLASS
static void
-_emit_position(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Plain_Data *pd)
+_emit_position(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd)
{
double absolut_position = pd->current_content;
- efl_event_callback_call(obj, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_EVENT_POS_UPDATE, &absolut_position);
+ efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &absolut_position);
}
static void
-_geom_sync(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Plain_Data *pd)
+_geom_sync(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd)
{
Efl_Gfx_Entity *entity = efl_pack_content_get(pd->container, pd->current_content);
Eina_Rect group_pos = efl_gfx_entity_geometry_get(pd->group);
)
EOLIAN static void
-_efl_ui_active_view_view_manager_plain_efl_ui_active_view_view_manager_bind(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd, Efl_Ui_Active_View_Container *active_view, Efl_Canvas_Group *group)
+_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Ui_Spotlight_Container *spotlight, Efl_Canvas_Group *group)
{
- if (active_view && group)
+ if (spotlight && group)
{
int index;
- pd->container = active_view;
+ pd->container = spotlight;
pd->group = group;
efl_event_callback_array_add(pd->group, group_callback(), obj);
- for (int i = 0; i < efl_content_count(active_view) ; ++i) {
- Efl_Gfx_Entity *elem = efl_pack_content_get(active_view, i);
+ for (int i = 0; i < efl_content_count(spotlight) ; ++i) {
+ Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i);
efl_canvas_group_member_add(pd->group, elem);
efl_gfx_entity_visible_set(elem, EINA_FALSE);
}
- index = efl_ui_active_view_active_index_get(active_view);
+ index = efl_ui_spotlight_active_index_get(spotlight);
if (index != -1)
{
pd->current_content = index;
}
static void
-_content_changed(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd)
+_content_changed(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd)
{
- if (efl_ui_active_view_active_index_get(pd->container) != pd->current_content)
+ if (efl_ui_spotlight_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);
+ pd->current_content = efl_ui_spotlight_active_index_get(pd->container);
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);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_plain_efl_ui_active_view_view_manager_content_add(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
+_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_add(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
{
efl_canvas_group_member_add(pd->group, subobj);
efl_gfx_entity_visible_set(subobj, EINA_FALSE);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_plain_efl_ui_active_view_view_manager_content_del(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
+_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_content_del(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
{
efl_canvas_group_member_remove(pd->group, subobj);
_content_changed(obj, pd);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_plain_efl_ui_active_view_view_manager_switch_to(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd, int from EINA_UNUSED, int to)
+_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_switch_to(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, int from EINA_UNUSED, int to)
{
Efl_Gfx_Entity *to_obj, *from_obj;
to_obj = efl_pack_content_get(pd->container, to);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_plain_efl_ui_active_view_view_manager_view_size_set(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd, Eina_Size2D size)
+_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_size_set(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Eina_Size2D size)
{
pd->page_size = size;
_geom_sync(obj, pd);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_plain_efl_object_destructor(Eo *obj, Efl_Ui_Active_View_View_Manager_Plain_Data *pd EINA_UNUSED)
+_efl_ui_spotlight_manager_plain_efl_object_destructor(Eo *obj, Efl_Ui_Spotlight_Manager_Plain_Data *pd EINA_UNUSED)
{
efl_destructor(efl_super(obj, MY_CLASS));
}
EOLIAN static void
-_efl_ui_active_view_view_manager_plain_efl_ui_active_view_view_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Plain_Data *pd, Eina_Bool animation)
+_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd, Eina_Bool animation)
{
pd->animation = animation;
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_view_manager_plain_efl_ui_active_view_view_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Plain_Data *pd)
+_efl_ui_spotlight_manager_plain_efl_ui_spotlight_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Plain_Data *pd)
{
return pd->animation;
}
-#include "efl_ui_active_view_view_manager_plain.eo.c"
+#include "efl_ui_spotlight_manager_plain.eo.c"
--- /dev/null
+class @beta Efl.Ui.Spotlight.Manager_Plain extends Efl.Ui.Spotlight.Manager
+{
+ implements {
+ Efl.Ui.Spotlight.Manager.bind;
+ Efl.Ui.Spotlight.Manager.content_add;
+ Efl.Ui.Spotlight.Manager.content_del;
+ Efl.Ui.Spotlight.Manager.switch_to;
+ Efl.Ui.Spotlight.Manager.size {set;}
+ Efl.Ui.Spotlight.Manager.animation_enabled {set; get;}
+ Efl.Object.destructor;
+ }
+}
#include "elm_priv.h"
typedef struct {
- Efl_Ui_Active_View_Container * container;
+ Efl_Ui_Spotlight_Container * container;
Efl_Gfx_Entity *group, *foreclip, *backclip;
Eina_Size2D page_size;
struct {
Eina_Position2D mouse_start;
} mouse_move;
Eina_Bool animation;
-} Efl_Ui_Active_View_View_Manager_Scroll_Data;
+} Efl_Ui_Spotlight_Manager_Scroll_Data;
-#define MY_CLASS EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_SCROLL_CLASS
+#define MY_CLASS EFL_UI_SPOTLIGHT_MANAGER_SCROLL_CLASS
static void _page_set_animation(void *data, const Efl_Event *event);
static void
_propagate_progress(Eo *obj, double pos)
{
- efl_event_callback_call(obj, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_EVENT_POS_UPDATE, &pos);
+ efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &pos);
}
static void
-_apply_box_properties(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd)
+_apply_box_properties(Eo *obj, Efl_Ui_Spotlight_Manager_Scroll_Data *pd)
{
Eina_Rect geometry = EINA_RECT_EMPTY();
Eina_Rect group_pos = efl_gfx_entity_geometry_get(pd->group);
if (pd->transition.active)
current_pos = pd->transition.from + ((double)pd->transition.to - pd->transition.from)*pd->transition.progress;
else
- current_pos = efl_ui_active_view_active_index_get(pd->container);
+ current_pos = efl_ui_spotlight_active_index_get(pd->container);
efl_gfx_entity_geometry_set(pd->foreclip, group_pos);
//first calculate the size
static void
_resize_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- _apply_box_properties(data, efl_data_scope_get(data, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_SCROLL_CLASS));
+ _apply_box_properties(data, efl_data_scope_get(data, EFL_UI_SPOTLIGHT_MANAGER_SCROLL_CLASS));
}
static void
_move_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- _apply_box_properties(data, efl_data_scope_get(data, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_SCROLL_CLASS));
+ _apply_box_properties(data, efl_data_scope_get(data, EFL_UI_SPOTLIGHT_MANAGER_SCROLL_CLASS));
}
static void
{
Efl_Input_Pointer *ev = event->info;
Eo *obj = data;
- Efl_Ui_Active_View_View_Manager_Scroll_Data *pd = efl_data_scope_get(obj, MY_CLASS);
+ Efl_Ui_Spotlight_Manager_Scroll_Data *pd = efl_data_scope_get(obj, MY_CLASS);
if (efl_input_pointer_button_get(ev) != 1) return;
if (efl_input_event_flags_get(ev) & EFL_INPUT_FLAGS_PROCESSED) return;
efl_event_callback_del(pd->container, EFL_CANVAS_OBJECT_EVENT_ANIMATOR_TICK, _page_set_animation, obj);
pd->mouse_move.active = EINA_TRUE;
- pd->mouse_move.from = efl_ui_active_view_active_index_get(pd->container);
+ pd->mouse_move.from = efl_ui_spotlight_active_index_get(pd->container);
pd->mouse_move.mouse_start = efl_input_pointer_position_get(ev);
pd->transition.from = pd->mouse_move.from;
{
Efl_Input_Pointer *ev = event->info;
Eo *obj = data;
- Efl_Ui_Active_View_View_Manager_Scroll_Data *pd = efl_data_scope_get(obj, MY_CLASS);
+ Efl_Ui_Spotlight_Manager_Scroll_Data *pd = efl_data_scope_get(obj, MY_CLASS);
Eina_Position2D pos;
int pos_y_diff;
{
Efl_Input_Pointer *ev = event->info;
Eo *obj = data;
- Efl_Ui_Active_View_View_Manager_Scroll_Data *pd = efl_data_scope_get(obj, MY_CLASS);
+ Efl_Ui_Spotlight_Manager_Scroll_Data *pd = efl_data_scope_get(obj, MY_CLASS);
if (efl_input_event_flags_get(ev) & EFL_INPUT_FLAGS_PROCESSED) return;
if (!pd->mouse_move.active) return;
double absolut_current_position = (double)pd->transition.from + pd->transition.progress;
int result = round(absolut_current_position);
- efl_ui_active_view_active_index_set(pd->container, MIN(MAX(result, 0), efl_content_count(pd->container) - 1));
+ efl_ui_spotlight_active_index_set(pd->container, MIN(MAX(result, 0), efl_content_count(pd->container) - 1));
}
EFL_CALLBACKS_ARRAY_DEFINE(mouse_listeners,
);
EOLIAN static void
-_efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_bind(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, Efl_Ui_Active_View_Container *active_view, Efl_Canvas_Group *group)
+_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, Efl_Ui_Spotlight_Container *spotlight, Efl_Canvas_Group *group)
{
- if (active_view && group)
+ if (spotlight && group)
{
- pd->container = active_view;
+ pd->container = spotlight;
pd->group = group;
efl_event_callback_add(pd->group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj);
efl_event_callback_add(pd->group, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, obj);
evas_object_static_clip_set(pd->backclip, EINA_TRUE);
efl_gfx_entity_visible_set(pd->backclip, EINA_FALSE);
- for (int i = 0; i < efl_content_count(active_view) ; ++i) {
- Efl_Gfx_Entity *elem = efl_pack_content_get(active_view, i);
+ for (int i = 0; i < efl_content_count(spotlight) ; ++i) {
+ Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i);
efl_canvas_object_clipper_set(elem, pd->backclip);
efl_canvas_group_member_add(pd->group, elem);
efl_gfx_entity_visible_set(elem, EINA_TRUE);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_content_add(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
+_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_content_add(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
{
efl_gfx_entity_visible_set(subobj, EINA_TRUE);
efl_canvas_object_clipper_set(subobj, pd->backclip);
EOLIAN static void
-_efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_content_del(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
+_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_content_del(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
{
efl_canvas_object_clipper_set(subobj, NULL);
efl_canvas_group_member_remove(pd->group, subobj);
static void
_page_set_animation(void *data, const Efl_Event *event EINA_UNUSED)
{
- Efl_Ui_Active_View_View_Manager_Scroll_Data *pd = efl_data_scope_get(data, MY_CLASS);
+ Efl_Ui_Spotlight_Manager_Scroll_Data *pd = efl_data_scope_get(data, MY_CLASS);
double p = (ecore_loop_time_get() - pd->transition.start_time) / pd->transition.max_time;
if (p >= 1.0) p = 1.0;
}
static void
-_animation_request_switch(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, int from, int to)
+_animation_request_switch(Eo *obj, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, int from, int to)
{
//if there is already a transition ongoing, which is no mouse transition, but goes to the same position, then do nothing
if (pd->transition.active && !pd->mouse_move.active && pd->transition.to == to)
}
EOLIAN static void
-_efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_switch_to(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, int from, int to)
+_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_switch_to(Eo *obj, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, int from, int to)
{
if (pd->animation)
{
}
EOLIAN static void
-_efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_view_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, Eina_Size2D size)
+_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_size_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, Eina_Size2D size)
{
pd->page_size = size;
if (!pd->transition.active)
}
EOLIAN static void
-_efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd, Eina_Bool animation)
+_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd, Eina_Bool animation)
{
pd->animation = animation;
if (pd->transition.active && !animation)
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_view_manager_scroll_efl_ui_active_view_view_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd)
+_efl_ui_spotlight_manager_scroll_efl_ui_spotlight_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Scroll_Data *pd)
{
return pd->animation;
}
EOLIAN static void
-_efl_ui_active_view_view_manager_scroll_efl_object_destructor(Eo *obj, Efl_Ui_Active_View_View_Manager_Scroll_Data *pd EINA_UNUSED)
+_efl_ui_spotlight_manager_scroll_efl_object_destructor(Eo *obj, Efl_Ui_Spotlight_Manager_Scroll_Data *pd EINA_UNUSED)
{
efl_event_callback_del(pd->group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj);
efl_event_callback_del(pd->group, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, obj);
}
-#include "efl_ui_active_view_view_manager_scroll.eo.c"
+#include "efl_ui_spotlight_manager_scroll.eo.c"
--- /dev/null
+class @beta Efl.Ui.Spotlight.Manager_Scroll extends Efl.Ui.Spotlight.Manager
+{
+ implements {
+ Efl.Ui.Spotlight.Manager.bind;
+ Efl.Ui.Spotlight.Manager.content_add;
+ Efl.Ui.Spotlight.Manager.content_del;
+ Efl.Ui.Spotlight.Manager.switch_to;
+ Efl.Ui.Spotlight.Manager.size {set;}
+ Efl.Ui.Spotlight.Manager.animation_enabled {set; get;}
+ Efl.Object.destructor;
+ }
+}
typedef struct {
- Efl_Ui_Active_View_Container * container;
+ Efl_Ui_Spotlight_Container * container;
Efl_Gfx_Entity *group;
Efl_Canvas_Animation_Player *hide, *show;
int from, to;
Efl_Gfx_Entity *content;
Eina_Size2D page_size;
Eina_Bool animation;
-} Efl_Ui_Active_View_View_Manager_Stack_Data;
+} Efl_Ui_Spotlight_Manager_Stack_Data;
-#define MY_CLASS EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_STACK_CLASS
+#define MY_CLASS EFL_UI_SPOTLIGHT_MANAGER_STACK_CLASS
static void
-_geom_sync(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Stack_Data *pd)
+_geom_sync(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd)
{
Eina_Array *array = eina_array_new(2);
Eina_Rect group_pos = efl_gfx_entity_geometry_get(pd->group);
static void
_running_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Efl_Ui_Active_View_View_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
+ Efl_Ui_Spotlight_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
//calculate absolut position, multiply pos with 2.0 because duration is only 0.5)
double absolut_position = pd->from + (pd->to - pd->from)*(efl_player_pos_get(pd->show)*2.0);
- efl_event_callback_call(data, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_EVENT_POS_UPDATE, &absolut_position);
+ efl_event_callback_call(data, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &absolut_position);
}
static void
static void
_hide_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED)
{
- Efl_Ui_Active_View_View_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
+ Efl_Ui_Spotlight_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
Efl_Canvas_Object *content;
EINA_SAFETY_ON_NULL_RETURN(pd);
static void
_show_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED)
{
- Efl_Ui_Active_View_View_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
+ Efl_Ui_Spotlight_Manager_Stack_Data *pd = efl_data_scope_safe_get(data, MY_CLASS);
Efl_Canvas_Object *content;
EINA_SAFETY_ON_NULL_RETURN(pd);
)
EOLIAN static void
-_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_bind(Eo *obj, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, Efl_Ui_Active_View_Container *active_view, Efl_Canvas_Group *group)
+_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_bind(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Ui_Spotlight_Container *spotlight, Efl_Canvas_Group *group)
{
- if (active_view && group)
+ if (spotlight && group)
{
Efl_Canvas_Animation_Alpha *show_anim, *hide_anim;
- pd->container = active_view;
+ pd->container = spotlight;
pd->group = group;
efl_event_callback_add(pd->group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj);
efl_player_play_set(pd->hide, EINA_FALSE);
efl_event_callback_array_add(pd->hide, _anim_hide_event_cb(), obj);
- for (int i = 0; i < efl_content_count(active_view) ; ++i) {
- Efl_Gfx_Entity *elem = efl_pack_content_get(active_view, i);
+ for (int i = 0; i < efl_content_count(spotlight) ; ++i) {
+ Efl_Gfx_Entity *elem = efl_pack_content_get(spotlight, i);
efl_canvas_group_member_add(pd->group, elem);
efl_gfx_entity_visible_set(elem, EINA_FALSE);
}
- if (efl_ui_active_view_active_index_get(active_view) != -1)
+ if (efl_ui_spotlight_active_index_get(spotlight) != -1)
{
- pd->content = efl_pack_content_get(pd->container, efl_ui_active_view_active_index_get(active_view));
+ pd->content = efl_pack_content_get(pd->container, efl_ui_spotlight_active_index_get(spotlight));
efl_gfx_entity_visible_set(pd->content, EINA_TRUE);
_geom_sync(obj, pd);
}
}
EOLIAN static void
-_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_content_add(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
+_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_content_add(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
{
efl_canvas_group_member_add(pd->group, subobj);
efl_gfx_entity_visible_set(subobj, EINA_FALSE);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_content_del(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
+_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_content_del(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Efl_Gfx_Entity *subobj, int index EINA_UNUSED)
{
efl_canvas_group_member_remove(pd->group, subobj);
}
}
EOLIAN static void
-_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_switch_to(Eo *obj, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, int from, int to)
+_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_switch_to(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd, int from, int to)
{
if (efl_pack_content_get(pd->container, to) == pd->content)
return;
pd->content = efl_pack_content_get(pd->container, to);
efl_gfx_entity_visible_set(pd->content, EINA_TRUE);
- efl_event_callback_call(obj, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_EVENT_POS_UPDATE, &pos);
+ efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &pos);
}
_geom_sync(obj, pd);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_view_size_set(Eo *obj, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, Eina_Size2D size)
+_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_size_set(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Eina_Size2D size)
{
pd->page_size = size;
_geom_sync(obj, pd);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_stack_efl_object_destructor(Eo *obj, Efl_Ui_Active_View_View_Manager_Stack_Data *pd EINA_UNUSED)
+_efl_ui_spotlight_manager_stack_efl_object_destructor(Eo *obj, Efl_Ui_Spotlight_Manager_Stack_Data *pd EINA_UNUSED)
{
efl_event_callback_del(pd->group, EFL_GFX_ENTITY_EVENT_SIZE_CHANGED, _resize_cb, obj);
efl_event_callback_del(pd->group, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, _move_cb, obj);
}
EOLIAN static void
-_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Stack_Data *pd, Eina_Bool animation)
+_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_animation_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd, Eina_Bool animation)
{
_reset_player(pd->hide, EINA_FALSE);
_reset_player(pd->show, EINA_TRUE);
}
EOLIAN static Eina_Bool
-_efl_ui_active_view_view_manager_stack_efl_ui_active_view_view_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Active_View_View_Manager_Stack_Data *pd)
+_efl_ui_spotlight_manager_stack_efl_ui_spotlight_manager_animation_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Spotlight_Manager_Stack_Data *pd)
{
return pd->animation;
}
-#include "efl_ui_active_view_view_manager_stack.eo.c"
+#include "efl_ui_spotlight_manager_stack.eo.c"
--- /dev/null
+class @beta Efl.Ui.Spotlight.Manager_Stack extends Efl.Ui.Spotlight.Manager
+{
+ implements {
+ Efl.Ui.Spotlight.Manager.bind;
+ Efl.Ui.Spotlight.Manager.content_add;
+ Efl.Ui.Spotlight.Manager.content_del;
+ Efl.Ui.Spotlight.Manager.switch_to;
+ Efl.Ui.Spotlight.Manager.size {set;}
+ Efl.Ui.Spotlight.Manager.animation_enabled {set; get;}
+ Efl.Object.destructor;
+ }
+}
--- /dev/null
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+
+#include <Efl_Ui.h>
+#include "elm_priv.h"
+
+typedef struct {
+
+} Efl_Ui_Spotlight_Util_Data;
+
+EOLIAN static Efl_Ui_Spotlight_Container*
+_efl_ui_spotlight_util_stack_gen(Efl_Ui_Widget *parent)
+{
+ Efl_Ui_Spotlight_Manager *manager = efl_add(EFL_UI_SPOTLIGHT_MANAGER_STACK_CLASS, parent);
+ return efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, parent,
+ efl_ui_spotlight_manager_set(efl_added, manager));
+}
+
+
+#include "efl_ui_spotlight_util.eo.c"
-class @beta Efl.Ui.Active_View.Util {
+class @beta Efl.Ui.Spotlight.Util {
methods {
stack_gen @class {
[[Get a preconfigured stack obejct]]
params {
parent : Efl.Ui.Widget;
}
- return : Efl.Ui.Active_View.Container;
+ return : Efl.Ui.Spotlight.Container;
}
}
}
_tab_select_cb(void *data, const Efl_Event *event)
{
int index = efl_ui_tab_bar_current_tab_get(event->object);
- if (efl_ui_active_view_active_index_get(data) != index)
- efl_ui_active_view_active_index_set(data, index);
+ if (efl_ui_spotlight_active_index_get(data) != index)
+ efl_ui_spotlight_active_index_set(data, index);
}
static void
}
EOLIAN static void
-_efl_ui_tab_pager_efl_ui_active_view_container_active_index_set(Eo *obj, Efl_Ui_Tab_Pager_Data *sd EINA_UNUSED, int index)
+_efl_ui_tab_pager_efl_ui_spotlight_container_active_index_set(Eo *obj, Efl_Ui_Tab_Pager_Data *sd EINA_UNUSED, int index)
{
- efl_ui_active_view_active_index_set(efl_super(obj, MY_CLASS), index);
+ efl_ui_spotlight_active_index_set(efl_super(obj, MY_CLASS), index);
_select(obj, index);
}
-class @beta Efl.Ui.Tab_Pager extends Efl.Ui.Active_View.Container
+class @beta Efl.Ui.Tab_Pager extends Efl.Ui.Spotlight.Container
{
[[Tab Pager class]]
methods {
Efl.Pack_Linear.pack_content_get;
Efl.Pack_Linear.pack_index_get;
Efl.Pack_Linear.pack_unpack_at; // TODO
- Efl.Ui.Active_View.Container.active_index { set; }
+ Efl.Ui.Spotlight.Container.active_index { set; }
}
}
'efl_ui_dnd.eo',
'efl_ui_dnd_container.eo',
'efl_ui_focus_manager_window_root.eo',
- 'efl_ui_active_view_container.eo',
- 'efl_ui_active_view_view_manager.eo',
- 'efl_ui_active_view_view_manager_scroll.eo',
- 'efl_ui_active_view_view_manager_stack.eo',
- 'efl_ui_active_view_indicator.eo',
- 'efl_ui_active_view_indicator_icon.eo',
- 'efl_ui_active_view_util.eo',
+ 'efl_ui_spotlight_container.eo',
+ 'efl_ui_spotlight_manager.eo',
+ 'efl_ui_spotlight_manager_scroll.eo',
+ 'efl_ui_spotlight_manager_stack.eo',
+ 'efl_ui_spotlight_indicator.eo',
+ 'efl_ui_spotlight_indicator_icon.eo',
+ 'efl_ui_spotlight_util.eo',
'efl_ui_tab_pager.eo',
'efl_ui_tab_bar.eo',
'efl_ui_tab_page.eo',
'efl_ui_homogeneous_model.eo',
'efl_ui_exact_model.eo',
'efl_ui_average_model.eo',
- 'efl_ui_active_view_view_manager_plain.eo',
+ 'efl_ui_spotlight_manager_plain.eo',
]
priv_eo_file_target = []
'efl_datetime_manager.c',
'efl_ui_dnd.c',
'elm_focus_legacy.c',
- 'efl_ui_active_view_container.c',
- 'efl_ui_active_view_view_manager.c',
- 'efl_ui_active_view_view_manager_plain.c',
- 'efl_ui_active_view_view_manager_scroll.c',
- 'efl_ui_active_view_view_manager_stack.c',
- 'efl_ui_active_view_indicator.c',
- 'efl_ui_active_view_indicator_icon.c',
- 'efl_ui_active_view_util.c',
+ 'efl_ui_spotlight_container.c',
+ 'efl_ui_spotlight_manager.c',
+ 'efl_ui_spotlight_manager_plain.c',
+ 'efl_ui_spotlight_manager_scroll.c',
+ 'efl_ui_spotlight_manager_stack.c',
+ 'efl_ui_spotlight_indicator.c',
+ 'efl_ui_spotlight_indicator_icon.c',
+ 'efl_ui_spotlight_util.c',
'efl_ui_focus_graph.h',
'efl_ui_focus_graph.c',
'efl_ui_tab_pager.c',
{ "efl_ui_layout", efl_ui_test_layout},
{ "Efl_Ui_Model", efl_ui_model },
{ "efl_ui_widget", efl_ui_test_widget },
- { "efl_ui_active_view", efl_ui_test_active_view},
+ { "efl_ui_spotlight", efl_ui_test_spotlight},
{ "efl_ui_check", efl_ui_test_check },
{ "efl_ui_progressbar", efl_ui_test_progressbar },
{ "efl_ui_radio_group", efl_ui_test_radio_group },
void efl_ui_test_focus_sub(TCase *tc);
void efl_ui_model(TCase *tc);
void efl_ui_test_widget(TCase *tc);
-void efl_ui_test_active_view(TCase *tc);
+void efl_ui_test_spotlight(TCase *tc);
void efl_ui_test_check(TCase *tc);
void efl_ui_test_progressbar(TCase *tc);
void efl_ui_test_radio_group(TCase *tc);
#include "efl_ui_suite.h"
#include "eo_internal.h"
-EFL_CLASS_SIMPLE_CLASS(efl_ui_active_view_view_manager, "efl_ui_active_view_view_manager", EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_CLASS);
-EFL_CLASS_SIMPLE_CLASS(efl_ui_active_view_indicator, "efl_ui_active_view_indicator", EFL_UI_ACTIVE_VIEW_INDICATOR_CLASS);
+EFL_CLASS_SIMPLE_CLASS(efl_ui_spotlight_manager, "efl_ui_spotlight_manager", EFL_UI_SPOTLIGHT_MANAGER_CLASS);
+EFL_CLASS_SIMPLE_CLASS(efl_ui_spotlight_indicator, "efl_ui_spotlight_indicator", EFL_UI_SPOTLIGHT_INDICATOR_CLASS);
static Efl_Ui_Win *win;
-static Efl_Ui_Active_View_Container *container;
+static Efl_Ui_Spotlight_Container *container;
typedef struct {
struct {
} content_add;
struct {
int called;
- Efl_Ui_Active_View_Container *active_view;
- } active_view;
+ Efl_Ui_Spotlight_Container *spotlight;
+ } spotlight;
} Indicator_Calls;
Indicator_Calls indicator_calls = { 0 };
indicator_calls.content_del.called ++;
indicator_calls.content_del.subobj = subobj;
indicator_calls.content_del.index = index;
- indicator_calls.content_del.current_page_at_call = efl_ui_active_view_active_index_get(container);
+ indicator_calls.content_del.current_page_at_call = efl_ui_spotlight_active_index_get(container);
}
static void
indicator_calls.content_add.called ++;
indicator_calls.content_add.subobj = subobj;
indicator_calls.content_add.index = index;
- indicator_calls.content_add.current_page_at_call = efl_ui_active_view_active_index_get(container);
+ indicator_calls.content_add.current_page_at_call = efl_ui_spotlight_active_index_get(container);
}
static void
}
static void
-_indicator_bind(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Active_View_Container *active_view)
+_indicator_bind(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Spotlight_Container *spotlight)
{
- indicator_calls.active_view.called++;
- indicator_calls.active_view.active_view = active_view;
+ indicator_calls.spotlight.called++;
+ indicator_calls.spotlight.spotlight = spotlight;
}
EFL_OPS_DEFINE(indicator_tracker,
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_indicator_content_add, _indicator_content_add),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_indicator_content_del, _indicator_content_del),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_indicator_position_update, _indicator_position_update),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_indicator_bind, _indicator_bind),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_indicator_content_add, _indicator_content_add),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_indicator_content_del, _indicator_content_del),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_indicator_position_update, _indicator_position_update),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_indicator_bind, _indicator_bind),
);
-static Efl_Ui_Active_View_View_Manager*
+static Efl_Ui_Spotlight_Manager*
_create_indicator(void)
{
Eo *obj;
- obj = efl_add(efl_ui_active_view_indicator_realized_class_get(), win);
+ obj = efl_add(efl_ui_spotlight_indicator_realized_class_get(), win);
efl_object_override(obj, &indicator_tracker);
return obj;
} page_size;
struct {
int called;
- Efl_Ui_Active_View_Container *active_view;
+ Efl_Ui_Spotlight_Container *spotlight;
Efl_Canvas_Group *group;
- } active_view;
+ } spotlight;
struct {
int called;
} animation;
_emit_pos(Eo *obj, double d)
{
if (d == transition_calls.last_position) return;
- efl_event_callback_call(obj, EFL_UI_ACTIVE_VIEW_VIEW_MANAGER_EVENT_POS_UPDATE, &d);
+ efl_event_callback_call(obj, EFL_UI_SPOTLIGHT_MANAGER_EVENT_POS_UPDATE, &d);
transition_calls.last_position = d;
}
transition_calls.content_add.called ++;
transition_calls.content_add.subobj = subobj;
transition_calls.content_add.index = index;
- transition_calls.content_add.current_page_at_call = efl_ui_active_view_active_index_get(container);
+ transition_calls.content_add.current_page_at_call = efl_ui_spotlight_active_index_get(container);
- int i = efl_ui_active_view_active_index_get(container);
+ int i = efl_ui_spotlight_active_index_get(container);
if (i != -1)
_emit_pos(obj, i);
}
transition_calls.content_del.called ++;
transition_calls.content_del.subobj = subobj;
transition_calls.content_del.index = index;
- transition_calls.content_del.current_page_at_call = efl_ui_active_view_active_index_get(container);
+ transition_calls.content_del.current_page_at_call = efl_ui_spotlight_active_index_get(container);
- int i = efl_ui_active_view_active_index_get(container);
+ int i = efl_ui_spotlight_active_index_get(container);
if (i != -1)
_emit_pos(obj, i);
}
}
static void
-_transition_bind(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Active_View_Container *active_view, Efl_Canvas_Group *group)
+_transition_bind(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Ui_Spotlight_Container *spotlight, Efl_Canvas_Group *group)
{
- transition_calls.active_view.called++;
- transition_calls.active_view.active_view = active_view;
- transition_calls.active_view.group = group;
+ transition_calls.spotlight.called++;
+ transition_calls.spotlight.spotlight = spotlight;
+ transition_calls.spotlight.group = group;
}
static void
}
EFL_OPS_DEFINE(transition_tracker,
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_view_manager_animation_enabled_set, _transition_animation_set),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_view_manager_animation_enabled_get, _transition_animation_get),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_view_manager_content_add, _transition_content_add),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_view_manager_content_del, _transition_content_del),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_view_manager_switch_to, _transition_request_switch),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_view_manager_view_size_set, _transition_page_size_set),
- EFL_OBJECT_OP_FUNC(efl_ui_active_view_view_manager_bind, _transition_bind),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_manager_animation_enabled_set, _transition_animation_set),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_manager_animation_enabled_get, _transition_animation_get),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_manager_content_add, _transition_content_add),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_manager_content_del, _transition_content_del),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_manager_switch_to, _transition_request_switch),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_manager_size_set, _transition_page_size_set),
+ EFL_OBJECT_OP_FUNC(efl_ui_spotlight_manager_bind, _transition_bind),
);
-static Efl_Ui_Active_View_View_Manager*
+static Efl_Ui_Spotlight_Manager*
_create_transition(void)
{
Eo *obj;
- obj = efl_add(efl_ui_active_view_view_manager_realized_class_get(), win);
+ obj = efl_add(efl_ui_spotlight_manager_realized_class_get(), win);
efl_object_override(obj, &transition_tracker);
return obj;
}
-EFL_START_TEST (efl_ui_active_view_init)
+EFL_START_TEST (efl_ui_spotlight_init)
{
ck_assert_ptr_ne(container, NULL);
ck_assert_ptr_ne(win, NULL);
- ck_assert_ptr_eq(efl_ui_active_view_indicator_get(container), NULL);
- ck_assert_ptr_eq(efl_ui_active_view_manager_get(container), NULL);
- Eina_Size2D s = efl_ui_active_view_size_get(container);
+ ck_assert_ptr_eq(efl_ui_spotlight_indicator_get(container), NULL);
+ ck_assert_ptr_eq(efl_ui_spotlight_manager_get(container), NULL);
+ Eina_Size2D s = efl_ui_spotlight_size_get(container);
ck_assert_int_eq(s.w, 0); //FIXME
ck_assert_int_eq(s.h, 0); //FIXME
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), -1);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), -1);
}
EFL_END_TEST
-EFL_START_TEST (efl_ui_active_view_active_index)
+EFL_START_TEST (efl_ui_spotlight_active_index)
{
Efl_Ui_Widget *w = efl_add(WIDGET_CLASS, win);
efl_pack(container, w);
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), 0);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), 0);
for (int i = -20; i < 20; ++i)
{
if (i == 0) continue;
EXPECT_ERROR_START;
- efl_ui_active_view_active_index_set(container, i);
+ efl_ui_spotlight_active_index_set(container, i);
EXPECT_ERROR_END;
}
efl_del(w);
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), -1);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), -1);
}
EFL_END_TEST
EFL_START_TEST (efl_ui_smart_transition_calls)
{
Efl_Ui_Widget *w, *w1, *w2;
- Efl_Ui_Active_View_View_Manager*t = _create_transition();
+ Efl_Ui_Spotlight_Manager*t = _create_transition();
w = efl_add(WIDGET_CLASS, win);
w1 = efl_add(WIDGET_CLASS, win);
w2 = efl_add(WIDGET_CLASS, win);
- efl_ui_active_view_manager_set(container, t);
+ efl_ui_spotlight_manager_set(container, t);
transition_calls.last_position = -2.0;
ck_assert_int_eq(transition_calls.animation.called, 1);
- ck_assert_int_eq(transition_calls.active_view.called, 1);
- ck_assert_ptr_eq(transition_calls.active_view.active_view, container);
+ ck_assert_int_eq(transition_calls.spotlight.called, 1);
+ ck_assert_ptr_eq(transition_calls.spotlight.spotlight, container);
//We cannot verify group
ck_assert_int_eq(transition_calls.page_size.called, 1);
ck_assert_int_eq(transition_calls.page_size.size.w, 0); //FIXME
ck_assert_int_eq(transition_calls.request_switch.called, 0);
ck_assert_int_eq(transition_calls.content_add.called, 0);
ck_assert_int_eq(transition_calls.content_del.called, 0);
- transition_calls.active_view.called = 0;
+ transition_calls.spotlight.called = 0;
transition_calls.page_size.called = 0;
//must update content, and request a switch from -1 to 1
efl_pack(container, w);
- ck_assert_int_eq(transition_calls.active_view.called, 0);
+ ck_assert_int_eq(transition_calls.spotlight.called, 0);
ck_assert_int_eq(transition_calls.page_size.called, 0);
ck_assert_int_eq(transition_calls.request_switch.called, 1);
ck_assert_int_eq(transition_calls.request_switch.from, -1);
//this must update content and a updated current page, but no other call
efl_pack_begin(container, w1);
- ck_assert_int_eq(transition_calls.active_view.called, 0);
+ ck_assert_int_eq(transition_calls.spotlight.called, 0);
ck_assert_int_eq(transition_calls.page_size.called, 0);
ck_assert_int_eq(transition_calls.request_switch.called, 0);
ck_assert_int_eq(transition_calls.content_add.called, 1);
ck_assert_int_eq(transition_calls.content_del.called, 0);
transition_calls.content_add.called = 0;
transition_calls.request_switch.called = 0;
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), 1);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), 1);
//new object, must update the content and a not update current page
efl_pack_end(container, w2);
- ck_assert_int_eq(transition_calls.active_view.called, 0);
+ ck_assert_int_eq(transition_calls.spotlight.called, 0);
ck_assert_int_eq(transition_calls.page_size.called, 0);
ck_assert_int_eq(transition_calls.request_switch.called, 0);
ck_assert_int_eq(transition_calls.content_add.called, 1);
ck_assert_int_eq(transition_calls.content_add.current_page_at_call, 1);
ck_assert_int_eq(transition_calls.content_del.called, 0);
transition_calls.content_add.called = 0;
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), 1);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), 1);
//page change must result in a call to request a switch
- efl_ui_active_view_active_index_set(container, 2);
- ck_assert_int_eq(transition_calls.active_view.called, 0);
+ efl_ui_spotlight_active_index_set(container, 2);
+ ck_assert_int_eq(transition_calls.spotlight.called, 0);
ck_assert_int_eq(transition_calls.page_size.called, 0);
ck_assert_int_eq(transition_calls.request_switch.called, 1);
ck_assert_int_eq(transition_calls.request_switch.from, 1);
//deletion of object must result in a content update
efl_del(w);
- ck_assert_int_eq(transition_calls.active_view.called, 0);
+ ck_assert_int_eq(transition_calls.spotlight.called, 0);
ck_assert_int_eq(transition_calls.page_size.called, 0);
ck_assert_int_eq(transition_calls.request_switch.called, 0);
ck_assert_int_eq(transition_calls.content_add.called, 0);
EFL_START_TEST (efl_ui_smart_transition_lifetime)
{
- Efl_Ui_Active_View_View_Manager*t, *t1;
+ Efl_Ui_Spotlight_Manager*t, *t1;
t = _create_transition();
efl_wref_add(t, &t);
t1 = _create_transition();
efl_wref_add(t1, &t1);
- efl_ui_active_view_manager_set(container, t);
- efl_ui_active_view_manager_set(container, t1);
+ efl_ui_spotlight_manager_set(container, t);
+ efl_ui_spotlight_manager_set(container, t1);
ck_assert_ptr_eq(t, NULL);
}
EFL_END_TEST
w1 = efl_add(WIDGET_CLASS, win);
w2 = efl_add(WIDGET_CLASS, win);
- ck_assert_int_eq(indicator_calls.active_view.called, 1);
- ck_assert_ptr_eq(indicator_calls.active_view.active_view, container);
+ ck_assert_int_eq(indicator_calls.spotlight.called, 1);
+ ck_assert_ptr_eq(indicator_calls.spotlight.spotlight, container);
ck_assert_int_eq(indicator_calls.content_add.called, 0);
ck_assert_int_eq(indicator_calls.content_del.called, 0);
ck_assert_int_eq(indicator_calls.position_update.called, 0);
- indicator_calls.active_view.called = 0;
+ indicator_calls.spotlight.called = 0;
efl_pack(container, w);
- ck_assert_int_eq(indicator_calls.active_view.called, 0);
+ ck_assert_int_eq(indicator_calls.spotlight.called, 0);
ck_assert_int_eq(indicator_calls.content_add.called, 1);
ck_assert_int_eq(indicator_calls.content_add.index, 0);
ck_assert_ptr_eq(indicator_calls.content_add.subobj, w);
indicator_calls.position_update.called = 0;
efl_pack_begin(container, w1);
- ck_assert_int_eq(indicator_calls.active_view.called, 0);
+ ck_assert_int_eq(indicator_calls.spotlight.called, 0);
ck_assert_int_eq(indicator_calls.content_add.called, 1);
ck_assert_int_eq(indicator_calls.content_add.index, 0);
ck_assert_ptr_eq(indicator_calls.content_add.subobj, w1);
indicator_calls.position_update.called = 0;
efl_pack_end(container, w2);
- ck_assert_int_eq(indicator_calls.active_view.called, 0);
+ ck_assert_int_eq(indicator_calls.spotlight.called, 0);
ck_assert_int_eq(indicator_calls.content_add.called, 1);
ck_assert_int_eq(indicator_calls.content_add.index, 2);
ck_assert_ptr_eq(indicator_calls.content_add.subobj, w2);
indicator_calls.position_update.called = 0;
efl_del(w1);
- ck_assert_int_eq(indicator_calls.active_view.called, 0);
+ ck_assert_int_eq(indicator_calls.spotlight.called, 0);
ck_assert_int_eq(indicator_calls.content_add.called, 0);
ck_assert_int_eq(indicator_calls.content_del.called, 1);
ck_assert_int_eq(indicator_calls.content_del.index, 0);
EFL_START_TEST (efl_ui_smart_indicator_calls)
{
- Efl_Ui_Active_View_View_Manager*i = _create_indicator();
- efl_ui_active_view_indicator_set(container, i);
+ Efl_Ui_Spotlight_Manager*i = _create_indicator();
+ efl_ui_spotlight_indicator_set(container, i);
_verify_indicator_calls();
}
EFL_END_TEST
EFL_START_TEST (efl_ui_smart_indicator_transition_calls)
{
- Efl_Ui_Active_View_View_Manager *i = _create_indicator();
- Efl_Ui_Active_View_View_Manager *t = _create_transition();
+ Efl_Ui_Spotlight_Manager *i = _create_indicator();
+ Efl_Ui_Spotlight_Manager *t = _create_transition();
transition_calls.last_position = -2.0;
- efl_ui_active_view_indicator_set(container, i);
- efl_ui_active_view_manager_set(container, t);
+ efl_ui_spotlight_indicator_set(container, i);
+ efl_ui_spotlight_manager_set(container, t);
_verify_indicator_calls();
}
EFL_END_TEST
-Efl_Ui_Active_View_Transition_Event start;
-Efl_Ui_Active_View_Transition_Event end;
+Efl_Ui_Spotlight_Transition_Event start;
+Efl_Ui_Spotlight_Transition_Event end;
static void
_start(void *data EINA_UNUSED, const Efl_Event *ev)
{
- Efl_Ui_Active_View_Transition_Event *e = ev->info;
+ Efl_Ui_Spotlight_Transition_Event *e = ev->info;
- memcpy(&start, e, sizeof(Efl_Ui_Active_View_Transition_Event));
+ memcpy(&start, e, sizeof(Efl_Ui_Spotlight_Transition_Event));
}
static void
_end(void *data EINA_UNUSED, const Efl_Event *ev)
{
- Efl_Ui_Active_View_Transition_Event *e = ev->info;
+ Efl_Ui_Spotlight_Transition_Event *e = ev->info;
- memcpy(&end, e, sizeof(Efl_Ui_Active_View_Transition_Event));
+ memcpy(&end, e, sizeof(Efl_Ui_Spotlight_Transition_Event));
}
#define EV_RESET \
w1 = efl_add(WIDGET_CLASS, win);
w2 = efl_add(WIDGET_CLASS, win);
- efl_event_callback_add(container, EFL_UI_ACTIVE_VIEW_EVENT_TRANSITION_START, _start, NULL);
- efl_event_callback_add(container, EFL_UI_ACTIVE_VIEW_EVENT_TRANSITION_END, _end, NULL);
+ efl_event_callback_add(container, EFL_UI_SPOTLIGHT_EVENT_TRANSITION_START, _start, NULL);
+ efl_event_callback_add(container, EFL_UI_SPOTLIGHT_EVENT_TRANSITION_END, _end, NULL);
EV_RESET
efl_pack_end(container, w);
ck_assert_int_eq(end.from, -8);
EV_RESET
- efl_ui_active_view_active_index_set(container, 2);
+ efl_ui_spotlight_active_index_set(container, 2);
ck_assert_int_eq(start.to, 2);
ck_assert_int_eq(end.to, 2);
ck_assert_int_eq(start.from, 1);
ck_assert_int_eq(end.from, 1);
}
-EFL_START_TEST (efl_ui_active_view_view_manager_start_end)
+EFL_START_TEST (efl_ui_spotlight_manager_start_end)
{
transition_calls.last_position = -2.0;
}
EFL_END_TEST
-EFL_START_TEST (efl_ui_active_view_test_push1)
+EFL_START_TEST (efl_ui_spotlight_test_push1)
{
for (int i = 0; i < 5; ++i)
{
efl_pack_end(container, w);
}
Efl_Ui_Widget *w = efl_add(WIDGET_CLASS, win);
- efl_ui_active_view_push(container, w);
+ efl_ui_spotlight_push(container, w);
ck_assert_int_eq(efl_pack_index_get(container, w), 0);
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), 0);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), 0);
}
EFL_END_TEST
-EFL_START_TEST (efl_ui_active_view_test_push2)
+EFL_START_TEST (efl_ui_spotlight_test_push2)
{
for (int i = 0; i < 5; ++i)
{
Efl_Ui_Widget *w = efl_add(WIDGET_CLASS, win);
efl_pack_end(container, w);
}
- efl_ui_active_view_active_index_set(container, 3);
+ efl_ui_spotlight_active_index_set(container, 3);
Efl_Ui_Widget *w = efl_add(WIDGET_CLASS, win);
- efl_ui_active_view_push(container, w);
+ efl_ui_spotlight_push(container, w);
ck_assert_int_eq(efl_pack_index_get(container, w), 3);
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), 3);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), 3);
}
EFL_END_TEST
return EINA_VALUE_EMPTY;
}
-EFL_START_TEST (efl_ui_active_view_test_pop1)
+EFL_START_TEST (efl_ui_spotlight_test_pop1)
{
Eo *called;
for (int i = 0; i < 5; ++i)
efl_pack_end(container, w);
}
Efl_Ui_Widget *w = efl_add(WIDGET_CLASS, win);
- efl_ui_active_view_push(container, w);
- Eina_Future *f = efl_ui_active_view_pop(container, EINA_FALSE);
+ efl_ui_spotlight_push(container, w);
+ Eina_Future *f = efl_ui_spotlight_pop(container, EINA_FALSE);
eina_future_then(f, _then_cb, &called);
for (int i = 0; i < 10; ++i)
{
}
EFL_END_TEST
-EFL_START_TEST (efl_ui_active_view_test_pop2)
+EFL_START_TEST (efl_ui_spotlight_test_pop2)
{
for (int i = 0; i < 5; ++i)
{
efl_pack_end(container, w);
}
Efl_Ui_Widget *w = efl_add(WIDGET_CLASS, win);
- efl_ui_active_view_push(container, w);
- Eina_Future *f = efl_ui_active_view_pop(container, EINA_TRUE);
+ efl_ui_spotlight_push(container, w);
+ Eina_Future *f = efl_ui_spotlight_pop(container, EINA_TRUE);
for (int i = 0; i < 10; ++i)
{
efl_loop_iterate(efl_provider_find(container, EFL_LOOP_CLASS));
}
EFL_END_TEST
-EFL_START_TEST (efl_ui_active_view_test_pop3)
+EFL_START_TEST (efl_ui_spotlight_test_pop3)
{
for (int i = 0; i < 5; ++i)
{
efl_pack_end(container, w);
}
Efl_Ui_Widget *w = efl_add(WIDGET_CLASS, win);
- efl_ui_active_view_active_index_set(container, 3);
- efl_ui_active_view_push(container, w);
- Eina_Future *f = efl_ui_active_view_pop(container, EINA_TRUE);
+ efl_ui_spotlight_active_index_set(container, 3);
+ efl_ui_spotlight_push(container, w);
+ Eina_Future *f = efl_ui_spotlight_pop(container, EINA_TRUE);
for (int i = 0; i < 10; ++i)
{
efl_loop_iterate(efl_provider_find(container, EFL_LOOP_CLASS));
}
- ck_assert_int_eq(efl_ui_active_view_active_index_get(container), 3);
+ ck_assert_int_eq(efl_ui_spotlight_active_index_get(container), 3);
ck_assert_int_eq(efl_ref_count(w), 0);
ck_assert_int_eq(efl_content_count(container), 5);
ck_assert_ptr_ne(f, NULL);
EFL_END_TEST
static void
-active_view_setup()
+spotlight_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,
+ container = efl_add(EFL_UI_SPOTLIGHT_CONTAINER_CLASS, win,
efl_content_set(win, efl_added));
efl_gfx_entity_size_set(win, EINA_SIZE2D(200, 200));
}
static void
-active_view_teardown()
+spotlight_teardown()
{
memset(&transition_calls, 0, sizeof(transition_calls));
memset(&indicator_calls, 0, sizeof(indicator_calls));
}
-void efl_ui_test_active_view(TCase *tc)
+void efl_ui_test_spotlight(TCase *tc)
{
tcase_add_checked_fixture(tc, fail_on_errors_setup, fail_on_errors_teardown);
- tcase_add_checked_fixture(tc, active_view_setup, active_view_teardown);
- tcase_add_test(tc, efl_ui_active_view_init);
- tcase_add_test(tc, efl_ui_active_view_active_index);
+ tcase_add_checked_fixture(tc, spotlight_setup, spotlight_teardown);
+ tcase_add_test(tc, efl_ui_spotlight_init);
+ tcase_add_test(tc, efl_ui_spotlight_active_index);
tcase_add_test(tc, efl_ui_smart_transition_calls);
tcase_add_test(tc, efl_ui_smart_transition_lifetime);
tcase_add_test(tc, efl_ui_smart_indicator_calls);
tcase_add_test(tc, efl_ui_smart_indicator_transition_calls);
- tcase_add_test(tc, efl_ui_active_view_view_manager_start_end);
- tcase_add_test(tc, efl_ui_active_view_test_push1);
- tcase_add_test(tc, efl_ui_active_view_test_push2);
- tcase_add_test(tc, efl_ui_active_view_test_pop1);
- tcase_add_test(tc, efl_ui_active_view_test_pop2);
- tcase_add_test(tc, efl_ui_active_view_test_pop3);
+ tcase_add_test(tc, efl_ui_spotlight_manager_start_end);
+ tcase_add_test(tc, efl_ui_spotlight_test_push1);
+ tcase_add_test(tc, efl_ui_spotlight_test_push2);
+ tcase_add_test(tc, efl_ui_spotlight_test_pop1);
+ tcase_add_test(tc, efl_ui_spotlight_test_pop2);
+ tcase_add_test(tc, efl_ui_spotlight_test_pop3);
}
'efl_ui_suite.h',
'efl_ui_model.c',
'efl_ui_test_widget.c',
- 'efl_ui_test_active_view.c',
+ 'efl_ui_test_spotlight.c',
'efl_ui_test_check.c',
'efl_ui_test_radio_group.c',
'efl_ui_test_progressbar.c',
/* spec-meta-start
{"test-interface":"Efl.Pack_Linear",
- "test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid", "Efl.Ui.Active_View.Container"],
+ "test-widgets": ["Efl.Ui.Box", "Efl.Ui.Grid", "Efl.Ui.Spotlight.Container"],
"custom-mapping" : {
"Efl.Ui.Grid" : "EFL_UI_GRID_DEFAULT_ITEM_CLASS"
}