struct SAlbumLayout *m;
private:
- static Eina_Bool sm_CbFocusIdler(void *dt);
- void m_OnFocusIdler(void);
-
static char *sm_CbGetGridItemText(void *data, Evas_Object *obj, const char *part);
static Evas_Object *sm_CbGetGridItemContent(void *data, Evas_Object *obj, const char *part);
static void sm_CbRemoveGridItem(void *data, Evas_Object *obj);
struct SSongLayout *m;
private:
- static Eina_Bool sm_CbFocusIdler(void *dt);
- void m_OnFocusIdler(void);
-
static char *sm_CbGetListItemText(void *data, Evas_Object *obj, const char *part);
static Evas_Object *sm_CbGetListItemContent(void *data, Evas_Object *obj, const char *part);
static void sm_CbRemoveListItem(void *data, Evas_Object *obj);
char *album_id;
CAlbumSongsLayout *layoutAlbumSongs;
SCallback callback;
- Ecore_Idler *focusIdler;
SAlbumLayout() {
memset(this, 0, sizeof(SAlbumLayout));
};
-Eina_Bool CAlbumLayout::sm_CbFocusIdler(void *dt)
-{
- CAlbumLayout *root = (CAlbumLayout *)dt;
-
- if (root)
- root->m_OnFocusIdler();
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-
-void CAlbumLayout::m_OnFocusIdler(void)
-{
- m->focusIdler = NULL;
-
- ASSERT(m->focusedItem);
- elm_gengrid_item_show(m->focusedItem, ELM_GENGRID_ITEM_SCROLLTO_IN);
- elm_object_item_focus_set(m->focusedItem, EINA_TRUE);
-}
-
-
char *CAlbumLayout::sm_CbGetGridItemText(void *data, Evas_Object *obj, const char *part)
{
SAlbumItemInfo *itinfo = (SAlbumItemInfo *)data;
void CAlbumLayout::m_OnCtxtClose(void)
{
m->vmgr->PopView();
- m->vmgr->PushView(MUSIC_BASE_VIEW, NULL);
elm_object_item_focus_set(m->focusedItem, EINA_TRUE);
}
void CAlbumLayout::SetFocus(const char *btnStr)
{
ASSERT(m);
- m->focusIdler = ecore_idler_add(sm_CbFocusIdler, this);
+ ASSERT(m->focusedItem);
+
+ elm_gengrid_item_show(m->focusedItem, ELM_GENGRID_ITEM_SCROLLTO_IN);
+ elm_object_item_focus_set(m->focusedItem, EINA_TRUE);
}
void CAlbumSongsLayout::m_OnCtxtClose(void)
{
m->vmgr->PopView();
- m->vmgr->PushView(MUSIC_BASE_VIEW, NULL);
elm_object_item_focus_set(m->focused_item, EINA_TRUE);
}
else {
Evas_Object *focus = NULL;
- if (t.depth == E_DEPTH_CATEGORY) {
- elm_gengrid_item_show(t.focused_item, ELM_GENGRID_ITEM_SCROLLTO_IN);
- elm_object_item_focus_set(t.focused_item, EINA_TRUE);
- }
- else if (t.depth == E_DEPTH_ALBUM) {
- if (!strcmp(m->focusBtnStr, MUSIC_FIRST_BTN))
- focus = m->addBtns[ABTN_PLAY];
- else if (!strcmp(m->focusBtnStr, MUSIC_SECOND_BTN))
- focus = m->addBtns[ABTN_NEXT];
- else // MUSIC_THIRD_BTN
- focus = m->addBtns[ABTN_LAST];
-
- elm_object_focus_set(focus, EINA_TRUE);
- }
+ if (!strcmp(m->focusBtnStr, MUSIC_FIRST_BTN))
+ focus = m->addBtns[ABTN_PLAY];
+ else if (!strcmp(m->focusBtnStr, MUSIC_SECOND_BTN))
+ focus = m->addBtns[ABTN_NEXT];
+ else // MUSIC_THIRD_BTN
+ focus = m->addBtns[ABTN_LAST];
+
+ elm_object_focus_set(focus, EINA_TRUE);
}
}
void CCategoryLayout::m_OnCtxtClose(void)
{
m->vmgr->PopView();
- m->vmgr->PushView(MUSIC_BASE_VIEW, NULL);
elm_object_item_focus_set(t.focused_item, EINA_TRUE);
}
{
ASSERT(m);
- m->idlerType = IDLER_TYPE_FOCUS_MOVE_BY_USER_INPUT;
- m->focusBtnStr = btnStr;
- m->focusIdler = ecore_idler_add(sm_CbFocusIdler, this);
+ if (t.depth == E_DEPTH_CATEGORY) {
+ elm_gengrid_item_show(t.focused_item, ELM_GENGRID_ITEM_SCROLLTO_IN);
+ elm_object_item_focus_set(t.focused_item, EINA_TRUE);
+ }
+ else {
+ m->idlerType = IDLER_TYPE_FOCUS_MOVE_BY_USER_INPUT;
+ m->focusBtnStr = btnStr;
+ m->focusIdler = ecore_idler_add(sm_CbFocusIdler, this);
+ }
}
void CCategorySongsLayout::m_OnCtxtClose(void)
{
m->vmgr->PopView();
- m->vmgr->PushView(MUSIC_BASE_VIEW, NULL);
elm_object_item_focus_set(m->focused_item, EINA_TRUE);
}
void CFolderLayout::m_OnCtxtClose(void)
{
m->vmgr->PopView();
- m->vmgr->PushView(MUSIC_BASE_VIEW, NULL);
elm_object_item_focus_set(m->focused_item, EINA_TRUE);
}
CViewMgr* vmgr;
SContentInfo *ctxtinfo;
char *uri;
- Ecore_Idler *focusIdler;
SSongLayout() {
memset(this, 0, sizeof(SSongLayout));
};
-Eina_Bool CSongLayout::sm_CbFocusIdler(void *dt)
-{
- CSongLayout *root = (CSongLayout *)dt;
-
- if (root)
- root->m_OnFocusIdler();
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-
-void CSongLayout::m_OnFocusIdler(void)
-{
- m->focusIdler = NULL;
-
- Elm_Object_Item *item = elm_genlist_first_item_get(m->songlist);
- ASSERT(item);
-
- elm_genlist_item_show(item, ELM_GENLIST_ITEM_SCROLLTO_IN);
- elm_object_item_focus_set(item, EINA_TRUE);
-}
-
-
char *CSongLayout::sm_CbGetListItemText(void *data, Evas_Object *obj, const char *part)
{
SSongItemInfo *itinfo = (SSongItemInfo *)data;
void CSongLayout::m_OnCtxtClose(void)
{
m->vmgr->PopView();
- m->vmgr->PushView(MUSIC_BASE_VIEW, NULL);
elm_object_item_focus_set(m->focused_item, EINA_TRUE);
}
void CSongLayout::SetFocus(const char *btnStr)
{
ASSERT(m);
- m->focusIdler = ecore_idler_add(sm_CbFocusIdler, this);
+
+ Elm_Object_Item *item = elm_genlist_first_item_get(m->songlist);
+ ASSERT(item);
+
+ elm_genlist_item_show(item, ELM_GENLIST_ITEM_SCROLLTO_IN);
+ elm_object_item_focus_set(item, EINA_TRUE);
}