2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __ALBUM_SONGS_LAYOUT_H__
18 #define __ALBUM_SONGS_LAYOUT_H__
21 struct SAlbumSongsItemInfo;
23 class CAlbumSongsLayout : public CExtBaseLayout, public CListenerMgr,
24 public IKeyDownListener, public IMouseMoveListener, public IMouseClickedListener,
25 public IActivatedListener {
27 struct SAlbumSongsLayout *m;
30 static char *sm_CbGetListItemText(void *data, Evas_Object *obj, const char *part);
31 static void sm_CbRemoveListItem(void *data, Evas_Object *obj);
32 static void sm_CbGoToPlaybackView(void *cookie, int mode, char *mediaId);
34 static void sm_CbCtxtUpdate(void *dt, enum EActionType type, int lid);
35 void m_OnCtxtUpdate(EActionType type, int lid);
37 static void sm_CbCtxtClose(void *dt);
38 void m_OnCtxtClose(void);
40 static void sm_CbItemSelect(void *data, Evas_Object *obj, void *event_info);
41 void m_OnItemSelect(Evas_Object *obj, void *event_info);
44 SAlbumSongsItemInfo *m_FindItemInfoFromItem(Eina_List *list, Elm_Object_Item *item);
45 void m_UpdateSongList(void);
46 void m_EmptySongList(void);
47 inline int m_ConvertToMin(int milsec);
48 void m_GotoPlayback(int mode, char *id);
49 Evas_Object *m_AddAlbumCover(void);
50 void m_CreateTopSection(void);
51 void m_CreateSongList(void);
54 virtual void t_OnShow(void);
57 CAlbumSongsLayout(const char *pLayoutId) :
58 CExtBaseLayout(pLayoutId),
59 IKeyDownListener(this),
60 IMouseMoveListener(this),
61 IMouseClickedListener(this),
62 IActivatedListener(this),
64 virtual ~CAlbumSongsLayout() {}
66 bool Create(CLayoutMgr *mgr);
67 virtual void Destroy(void);
70 virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev);
71 virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev);
72 virtual void OnMouseClicked(int id, Evas_Object *obj);
73 virtual void OnActivated(int id, Evas_Object *obj, Elm_Object_Item *item);
77 #endif /*__ALBUM_SONGS_LAYOUT_H__*/