Initial Commit.
[profile/tv/apps/native/musicplayer.git] / include / song-layout.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __SONG_LAYOUT_H__
18 #define __SONG_LAYOUT_H__
19
20
21 class CSongLayout : public CExtBaseLayout, public CListenerMgr, public IKeyDownListener {
22 private:
23         struct SSongLayout *m;
24
25 private:
26         static char *sm_CbGetListItemText(void *data, Evas_Object *obj, const char *part);
27         static Evas_Object *sm_CbGetListItemContent(void *data, Evas_Object *obj, const char *part);
28         static void sm_CbRemoveListItem(void *data, Evas_Object *obj);
29         static void sm_CbGenlistKeyDown(void *dt, Evas *e, Evas_Object *obj, void *ei);
30
31         static void sm_CbSelectItem(void *cookie);
32         void m_OnSelectItem(void);
33
34 private:
35         void m_GotoPlayback(void);
36         void m_GotoPlaybackUri(void);
37         void m_CreateSongList(void);
38
39 protected:
40         virtual void t_OnShow(void);
41
42 public:
43         CSongLayout(const char *pLayoutId) : CExtBaseLayout(pLayoutId), IKeyDownListener(this), m(0) {}
44         virtual ~CSongLayout() {}
45
46         bool Create(CLayoutMgr *mgr, const char *uri);
47         virtual void Destroy(void);
48
49         virtual void Update(bool focusFlag);
50
51 public:
52         virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev);
53 };
54
55
56 #endif /*__SONG_LAYOUT_H__*/