From c1f177c37d5642c885dac9218ebc890b40d3112c Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Thu, 9 Apr 2015 16:05:59 +0900 Subject: [PATCH 01/16] Modification for CPlaybackView to exist in the view stack always. : CPlaybackView should always exist in view stack to handle remote key event for playback. Change-Id: Ifea2bca8320338dbedac035de06e76ef98bcf787 Signed-off-by: Kim Tae Soo --- src/main.cpp | 7 +++++++ src/views/base-view.cpp | 18 ++++++++++++++---- src/views/common-ui.cpp | 14 ++++++++++++-- src/views/playback-view.cpp | 17 ++++++++++++++++- src/views/song-layout.cpp | 10 ++++++++-- 5 files changed, 57 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a98f343..ce2272d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -223,6 +223,13 @@ public: m_pViewMgr->AddCallback(&cb); _DBG(""); + if (!m_pViewMgr->PushView(MUSIC_PLAYBACK_VIEW, NULL, false)) { + _ERR(" view push failed "); + CViewMgr::Finalize(); + CMusicController::Finalize(); + goto error; + } + if (!m_pViewMgr->PushView(MUSIC_BASE_VIEW, ad.arglist)) { _ERR(" view push failed "); CViewMgr::Finalize(); diff --git a/src/views/base-view.cpp b/src/views/base-view.cpp index c3fc929..ff8cea2 100644 --- a/src/views/base-view.cpp +++ b/src/views/base-view.cpp @@ -319,8 +319,13 @@ void CMusicBaseView::m_GotoPlayback(void) memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_PLAYLIST_UPDATE; - if (!CViewMgr::GetInstance()->PushView(MUSIC_PLAYBACK_VIEW, &parcel)) - _ERR(" viewmgr push view MUSIC_PLAYBACK_VIEW failed "); + t_OnHide(); + + if (!CViewMgr::GetInstance()->UpdateView(MUSIC_PLAYBACK_VIEW, &parcel)) + _ERR("CViewMgr::UpdateView MUSIC_PLAYBACK_VIEW failed "); + + if (!CViewMgr::GetInstance()->ShowView(MUSIC_PLAYBACK_VIEW)) + _ERR("CViewMgr::ShowView MUSIC_PLAYBACK_VIEW failed "); } @@ -1131,8 +1136,13 @@ void CMusicBaseView::OnMouseClicked(int id, Evas_Object *obj) state = m->mhandle->PlayState(); if (state != PLAY_STATUS_INITIAL) { - if (!CViewMgr::GetInstance()->PushView(MUSIC_PLAYBACK_VIEW, NULL)) - _ERR(" viewmgr push view failed "); + t_OnHide(); + + if (!CViewMgr::GetInstance()->UpdateView(MUSIC_PLAYBACK_VIEW, NULL)) + _ERR("CViewMgr::UpdateView failed"); + + if (!CViewMgr::GetInstance()->ShowView(MUSIC_PLAYBACK_VIEW)) + _ERR("CViewMgr::ShowView failed"); return; } diff --git a/src/views/common-ui.cpp b/src/views/common-ui.cpp index 352056f..c52004b 100644 --- a/src/views/common-ui.cpp +++ b/src/views/common-ui.cpp @@ -161,11 +161,21 @@ void CCommonUI::UpdatePlaybackView(EAddType type, switch (type) { case ADD_TYPE_FRESH: { + if (CViewMgr::GetInstance()->CheckTop(MUSIC_CONTEXT_VIEW)) + if (!vmgr->HideView(MUSIC_CONTEXT_VIEW)) + _ERR("CViewMgr::HideView failed"); + + if (!vmgr->HideView(MUSIC_BASE_VIEW)) + _ERR("CViewMgr::HideView failed"); + SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_PLAYLIST_UPDATE; - if (!vmgr->PushView((const char *)MUSIC_PLAYBACK_VIEW, &parcel)) - _ERR("PushView of PlaybackView Failed"); + if (!vmgr->UpdateView((const char *)MUSIC_PLAYBACK_VIEW, &parcel)) + _ERR("UpdateView of PlaybackView Failed"); + + if (!vmgr->ShowView((const char *)MUSIC_PLAYBACK_VIEW)) + _ERR("ShowView of PlaybackView Failed"); } return; diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index f1028f3..6459d9f 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -298,6 +298,11 @@ void CPlaybackView::m_OnCtxtUpdate(EActionType type, int lid) focusedItem = m->focused_item; } + if (!CViewMgr::GetInstance()->HideView(MUSIC_BASE_VIEW)) + _ERR("CViewMgr::HideView failed"); + + t_OnShow(); + if (focusedItem) { elm_genlist_item_show(focusedItem, ELM_GENLIST_ITEM_SCROLLTO_IN); elm_object_item_focus_set(focusedItem, EINA_TRUE); @@ -968,7 +973,17 @@ void CPlaybackView::m_KeyBackPress(void) } t_OnHide(); - m->mgr->PopView(); + + if (!CViewMgr::GetInstance()->ShowView(MUSIC_BASE_VIEW)) + _ERR("CViewMgr::ShowView failed"); + + if (CViewMgr::GetInstance()->CheckTop(MUSIC_CONTEXT_VIEW)) { + if (!CViewMgr::GetInstance()->UpdateView(MUSIC_CONTEXT_VIEW, NULL)) + _ERR("CViewMgr::UpdateView failed"); + + if (!CViewMgr::GetInstance()->ShowView(MUSIC_CONTEXT_VIEW)) + _ERR("CViewMgr::ShowView failed"); + } } diff --git a/src/views/song-layout.cpp b/src/views/song-layout.cpp index 5eb8d35..8e4f1dd 100644 --- a/src/views/song-layout.cpp +++ b/src/views/song-layout.cpp @@ -447,8 +447,14 @@ void CSongLayout::m_GotoPlayback(void) memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_PLAYLIST_UPDATE; - if (!m->vmgr->PushView(MUSIC_PLAYBACK_VIEW, &parcel)) - _ERR(" viewmgr push view MUSIC_PLAYBACK_VIEW failed "); + if (!m->vmgr->HideView(MUSIC_BASE_VIEW)) + _ERR("CViewMgr::HideView MUSIC_BASE_VIEW failed "); + + if (!m->vmgr->UpdateView(MUSIC_PLAYBACK_VIEW, &parcel)) + _ERR("CViewMgr::UpdateView MUSIC_PLAYBACK_VIEW failed "); + + if (!m->vmgr->ShowView(MUSIC_PLAYBACK_VIEW)) + _ERR("CViewMgr::ShowView MUSIC_PLAYBACK_VIEW failed "); } -- 2.7.4 From fea973ecc396581dd0328d5cb43c3c695f48e1b2 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Fri, 10 Apr 2015 15:04:57 +0900 Subject: [PATCH 02/16] Modification due to the AppCommon change. (Addition of key string definitions) Change-Id: I29dc7fd9005a8e11f53f74ed99a10d24e0393fff Signed-off-by: Kim Tae Soo --- include/define.h | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/include/define.h b/include/define.h index ac1b648..39c5cda 100644 --- a/include/define.h +++ b/include/define.h @@ -428,51 +428,6 @@ #define POSITION_PLAY_LIST_POPUP_X 1645 #define POSITION_PLAY_LIST_POPUP_Y 190 -/* TEMP KEY DEFINITION */ -#undef KEY_UP -#define KEY_UP "Up" -#undef KEY_DOWN -#define KEY_DOWN "Down" -#undef KEY_LEFT -#define KEY_LEFT "Left" -#undef KEY_RIGHT -#define KEY_RIGHT "Right" -#undef KEY_VOLUMEUP -#define KEY_VOLUMEUP "F9" -#undef KEY_VOLUMEDOWN -#define KEY_VOLUMEDOWN "F10" -#undef KEY_ENTER -#define KEY_ENTER "Return" -#undef KEY_BACK -#define KEY_BACK "Escape" -#undef KEY_MENU -#define KEY_MENU "Super_L" -#undef KEY_VOLUMEUP_REMOTE -#define KEY_VOLUMEUP_REMOTE "XF86AudioRaiseVolume" -#undef KEY_VOLUMEDOWN_REMOTE -#define KEY_VOLUMEDOWN_REMOTE "XF86AudioLowerVolume" -#undef KEY_ENTER_REMOTE -#define KEY_ENTER_REMOTE "KP_Enter" -#undef KEY_BACK_REMOTE -#define KEY_BACK_REMOTE "XF86Close" -#undef KEY_MENU_REMOTE -#define KEY_MENU_REMOTE "XF86Send" -#undef KEY_PLAY -#define KEY_PLAY "XF86AudioPlay" -#undef KEY_PAUSE -#define KEY_PAUSE "Pause" -#undef KEY_NEXT -#define KEY_NEXT "XF86AudioNext" -#undef KEY_PREVIOUS -#define KEY_PREVIOUS "XF86AudioPrev" -#undef KEY_MUTE -#define KEY_MUTE "XF86AudioMute" - -/* SHOULD BE DEFINED */ -#undef KEY_EXIT -#define KEY_EXIT "Exit" - - /* SORTING ID */ #define SORT_BY_ARTIST_AZ "SORT_BY_ARTIST_AZ" #define SORT_BY_ARTIST_ZA "SORT_BY_ARTIST_ZA" -- 2.7.4 From a57e666ea02f7b0acfcfbd4bb5596d14ebb3ee3c Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Mon, 13 Apr 2015 11:51:54 +0900 Subject: [PATCH 03/16] Clean the source code Change-Id: I97822805b9009326e906c57b7005f2682758fca2 Signed-off-by: Kim Tae Soo --- src/views/entry-popup.cpp | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/views/entry-popup.cpp b/src/views/entry-popup.cpp index e77236a..d92147c 100644 --- a/src/views/entry-popup.cpp +++ b/src/views/entry-popup.cpp @@ -33,6 +33,10 @@ struct SEntryPopup { Ecore_Idler *idler; }; +enum EObject { + EO_ENTRY +}; + Eina_Bool CEntryPopup::sm_CbFocusIdler(void *dt) { @@ -104,7 +108,7 @@ bool CEntryPopup::Create(Evas_Object *base, const char *text, void(*cbEntryName) m->data = data; m->idler = ecore_idler_add(sm_CbFocusIdler, this); - Connect(entry); + Connect(entry, EO_ENTRY, TYPE_KEY_DOWN); return true; } @@ -140,13 +144,20 @@ void CEntryPopup::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Do if (!ev->keyname) return; - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) - Destroy(); - else if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { - str = elm_entry_entry_get(obj); - if (m->cbEntryName && str) - m->cbEntryName(m->data, str); + switch (id) { + case EO_ENTRY: + if (!strcmp(ev->keyname, KEY_BACK) || + !strcmp(ev->keyname, KEY_BACK_REMOTE)) + Destroy(); + else if (!strcmp(ev->keyname, KEY_ENTER) || + !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + str = elm_entry_entry_get(obj); + if (m->cbEntryName && str) + m->cbEntryName(m->data, str); + } + break; + + default: + break; } } -- 2.7.4 From b5141aac84c0dd50b9484f4c3d7883f21d579060 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Mon, 13 Apr 2015 14:56:26 +0900 Subject: [PATCH 04/16] Apply error-checking macro to CPlayListCtxPopup::Create. Change-Id: Icac72ee20ef2d51d382aee59dc029e00b1c51dbb Signed-off-by: Kim Tae Soo --- src/views/PlayListCtxPopup.cpp | 108 ++++++++++++++++++++++------------------- src/views/PlayListCtxPopup.h | 4 ++ 2 files changed, 62 insertions(+), 50 deletions(-) diff --git a/src/views/PlayListCtxPopup.cpp b/src/views/PlayListCtxPopup.cpp index 123c989..be995e1 100644 --- a/src/views/PlayListCtxPopup.cpp +++ b/src/views/PlayListCtxPopup.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include "i18n.h" #include "define.h" #include "dbg.h" @@ -76,75 +77,82 @@ void CPlayListCtxPopup::t_OnBtnClicked(Evas_Object* obj, void* ev) } -bool CPlayListCtxPopup::Create(Evas_Object* base, const SCallback* callback, Eina_List *playList) +bool CPlayListCtxPopup::m_SetBtnString(Eina_List *playlistList) { - Eina_List *l = NULL; - SCtxtPlaylistItem *item = NULL; - int i; - void *obj = NULL; - - m = new SPlayListCtxPopup; - if (!m) { - _ERR("Memory Alloc Failed!!"); - return false; - } - - m->listSize = eina_list_count(playList); - if (m->listSize == 0) { - _DBG("Playlist is empty."); - delete m; - m = NULL; - return false; - } + Eina_List *l; + SCtxtPlaylistItem *item; + void *obj; + int index = 0; - m->settingTexts = new char*[m->listSize]; - m->btnIds = new char*[m->listSize]; - m->dbIds = new int[m->listSize]; - - i = 0; - EINA_LIST_FOREACH(playList, l, obj) { + EINA_LIST_FOREACH(playlistList, l, obj) { item = (SCtxtPlaylistItem *)obj; - m->settingTexts[i] = new char[strlen(N_(item->name)) + 1]; - m->btnIds[i] = new char[strlen(item->name) + 1]; - m->dbIds[i] = item->id; - strcpy(m->settingTexts[i], N_(item->name)); - strcpy(m->btnIds[i], item->name); + _CREATE_BEGIN{ + _CHECK(m->settingTexts[index] = new char[strlen(N_(item->name)) + 1]) + _CHECK(m->btnIds[index] = new char[strlen(item->name) + 1]) - i++; - } + _WHEN_SUCCESS{ + m->dbIds[index] = item->id; + strcpy(m->settingTexts[index], N_(item->name)); + strcpy(m->btnIds[index], item->name); + } - bool r = CCtxPopup::Create(base, callback, true); - if (r == false) { - _ERR("CCtxPopup::Create failed"); - for (i = 0; i < m->listSize; i++) { - delete[] m->settingTexts[i]; - delete[] m->btnIds[i]; - } + _CHECK_FAIL{ delete[] m->btnIds[index]; m->btnIds[index] = NULL; } + _CHECK_FAIL{ delete[] m->settingTexts[index]; m->settingTexts[index] = NULL; } + } _CREATE_END_AND_CATCH{ return false; } - delete[] m->settingTexts; - delete[] m->btnIds; - delete[] m->dbIds; - delete m; - - m = NULL; - return false; + index++; } return true; } -void CPlayListCtxPopup::Destroy(void) +void CPlayListCtxPopup::m_DeleteBtnString(void) { - CCtxPopup::Destroy(); - int i; - for (i = 0; i < m->listSize; i++) { delete[] m->settingTexts[i]; delete[] m->btnIds[i]; } +} + + +bool CPlayListCtxPopup::Create(Evas_Object* base, const SCallback* callback, Eina_List *playList) +{ + Eina_List *l = NULL; + SCtxtPlaylistItem *item = NULL; + + _CREATE_BEGIN{ + _CHECK(m = new SPlayListCtxPopup) + _CHECK(m->listSize = eina_list_count(playList)) + _CHECK(m->settingTexts = new char*[m->listSize]) + _COMMAND{ memset(m->settingTexts, NULL, m->listSize * sizeof(char*)); } + _CHECK(m->btnIds = new char*[m->listSize]) + _COMMAND{ memset(m->btnIds, NULL, m->listSize * sizeof(char*)); } + _CHECK(m->dbIds = new int[m->listSize]) + _COMMAND{ memset(m->dbIds, NULL, m->listSize * sizeof(int)); } + _CHECK(m_SetBtnString(playList)) + _CHECK(CCtxPopup::Create(base, callback, true)) + + _CHECK_FAIL{ CCtxPopup::Destroy(); } + _CHECK_FAIL{ m_DeleteBtnString(); } + _CHECK_FAIL{ delete[] m->dbIds; } + _CHECK_FAIL{ delete[] m->btnIds; } + _CHECK_FAIL{ delete[] m->settingTexts; } + _CHECK_FAIL{} + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return false; } + + return true; +} + + +void CPlayListCtxPopup::Destroy(void) +{ + CCtxPopup::Destroy(); + + m_DeleteBtnString(); delete[] m->settingTexts; delete[] m->btnIds; diff --git a/src/views/PlayListCtxPopup.h b/src/views/PlayListCtxPopup.h index 29888d2..6b6a34f 100644 --- a/src/views/PlayListCtxPopup.h +++ b/src/views/PlayListCtxPopup.h @@ -11,6 +11,10 @@ protected: virtual void t_OnConfiguration(void); virtual void t_OnBtnClicked(Evas_Object* obj, void* ev); +private: + bool m_SetBtnString(Eina_List *playlistList); + void m_DeleteBtnString(void); + public: CPlayListCtxPopup() : m(0) {} -- 2.7.4 From 38d685b6a7c5b8eedf3851b1211540da27433909 Mon Sep 17 00:00:00 2001 From: Kim Youngjin Date: Mon, 13 Apr 2015 21:03:14 +0900 Subject: [PATCH 05/16] Playback module is changed. Playback module make events when playback status is changed. Change-Id: I7a5e9da3b9ed54c62335126e4da4d2eb7abe91c7 Signed-off-by: Kim Youngjin --- CMakeLists.txt | 1 + include/music-controller.h | 80 ++-- include/playback-mgr.h | 12 +- include/playback-view.h | 83 +++- include/playlist-mgr.h | 19 - src/main.cpp | 11 - src/playback/MusicControllerImpl.cpp | 825 +++++++++++++++++++++++++++++++++++ src/playback/MusicControllerImpl.h | 109 +++++ src/playback/music-controller.cpp | 643 +++------------------------ src/playback/playback-mgr.cpp | 17 +- src/views/PlayListCtxPopup.cpp | 10 +- src/views/album-layout.cpp | 50 +-- src/views/album-songs-layout.cpp | 55 ++- src/views/artist-layout.cpp | 6 +- src/views/base-view.cpp | 46 +- src/views/category-layout.cpp | 81 ++-- src/views/category-songs-layout.cpp | 53 ++- src/views/context-view.cpp | 32 +- src/views/folder-layout.cpp | 55 ++- src/views/genre-layout.cpp | 6 +- src/views/playback-view.cpp | 762 +++++++++++++++++++------------- src/views/playlist-layout.cpp | 20 +- src/views/song-layout.cpp | 54 ++- 23 files changed, 1818 insertions(+), 1212 deletions(-) create mode 100644 src/playback/MusicControllerImpl.cpp create mode 100644 src/playback/MusicControllerImpl.h diff --git a/CMakeLists.txt b/CMakeLists.txt index bc0740e..2ce4e77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,7 @@ SET(SRCS src/main.cpp src/views/RemovePopupWindow.cpp src/playback/playlist-mgr.cpp src/playback/music-controller.cpp + src/playback/MusicControllerImpl.cpp src/playback/playback-mgr.cpp src/playback/volume-control.cpp src/data/mediadata.cpp diff --git a/include/music-controller.h b/include/music-controller.h index bd9f3b7..018b18f 100644 --- a/include/music-controller.h +++ b/include/music-controller.h @@ -20,6 +20,7 @@ #include #include +#include "playback-mgr.h" class IMusicControllerListener { @@ -30,59 +31,39 @@ public: }; public: - static void s_CbComplete(void *cookie); - static void s_CbError(void *cookie); - static void s_CbUsbStatusChagned(void *cookie, SUsbStorageStatus status); - static void s_CbUpdateContent(void *cookie); - - virtual void OnComplete(void) = 0; - virtual void OnError(void) = 0; - virtual void OnUsbStatusChanged(SUsbStorageStatus status) = 0; - virtual void OnUpdateContent(void) = 0; + //! This function is invoked when playback is complete. + virtual void OnComplete(void) {} + //! This function is invoked when playback occurs any error. + virtual void OnError(void) {} + //! This function is invoked when usb is connected or not. + virtual void OnUsbStatusChanged(SUsbStorageStatus status) {} + //! This function is invoked when content is updated.. + virtual void OnUpdateContent(void) {} + //! This function is invoked when new song is played. + virtual void OnStartPlayback(void) {} + //! This function is invoked when the playback is stopped. + virtual void OnStopPlayback(void) {} + //! This function is invoked when playback is paused. + virtual void OnPausePlayback(void) {} + //! This function is invoked when playback is resumed. + virtual void OnResumePlayback(void) {} + //! + virtual void OnPosition(int milsec) {} }; -class CMusicController : public CUsbConnectionListener { +class CMusicController { private: - static CMusicController *instance; - static int refCnt; - struct SMusicController *m; -private: - enum EDirectionType { - DIR_PREVIOUS, - DIR_NEXT - }; - - enum ENextType { - E_ON_COMPLETE, - E_BUTTON_CLICK - }; - -private: - CMusicController() {} - virtual ~CMusicController() {} - -private: - static void sm_CbPlaybackCompletion(void *data); - void m_OnPlaybackCompletion(void); - static void sm_CbContentUpdated(void *dt); - void m_OnContentUpdated(void); - - void m_InvokeErrorCallback(SMusicController *m, int type); - -protected: - bool t_PlayNext(int direction, int playnext_type); - SMusicController* t_Create(void); - void t_Destroy(void); - public: - static bool Initialize(void); - static void Finalize(void); - - static CMusicController* GetInstance(void); + CMusicController() : m(0) {} + virtual ~CMusicController() {} + bool FlagCreate(void) { return !!m; } + bool Create(void); + virtual void Destroy(void); + bool Start(void); bool Stop(void); bool Resume(void); @@ -94,7 +75,7 @@ public: bool GetCurrentSongIndex(int *ind); bool GetTotalSongs(int *ts); bool GetSonginfoFromIndex(int index, CSongInfo **const csinfo); - + bool SetPosition(int milsec); bool GetPosition(int *const milseconds); @@ -103,9 +84,11 @@ public: bool UpdatePlaylist(Eina_List *slist, int addmode); bool EmptyPlaylist(void); + bool PlayPreviousSong(void); bool PlayNextSong(void); bool PlayIndexSong(int index); + bool RemoveSong(CSongInfo *sinfo, int index); bool MediaGetList(int EListType, void *info, Eina_List **list); @@ -127,12 +110,7 @@ public: bool SetRepeatState(ERepeatStatus state); ERepeatStatus RepeatState(void); - -public: - virtual void OnStatusChanged(SUsbHostDeviceInfo *changedDevice, - SUsbHostDeviceStatus status); }; - #endif /*__MUSIC_CONTROLLER_H__*/ diff --git a/include/playback-mgr.h b/include/playback-mgr.h index 3edb5c8..0711439 100644 --- a/include/playback-mgr.h +++ b/include/playback-mgr.h @@ -21,12 +21,20 @@ #include +class ICompleteListener { +public: + virtual void t_OnPlayComplete(void) = 0; +}; + + class CPlayback { private: struct SPlayback* m; -public: +private: + static void sm_CbComplete(void *cookie); +public: CPlayback() : m(0) {} virtual ~CPlayback() {} bool FlagCreate(void) { return !!m; } @@ -34,7 +42,7 @@ public: bool Create(void); virtual void Destroy(void); - bool SetCallback(player_completed_cb cbPlaybackCompletion, void *data); + bool SetCallback(ICompleteListener *listener);//player_completed_cb cbPlaybackCompletion, void *data); bool UnsetCallback(void); bool Start(void); diff --git a/include/playback-view.h b/include/playback-view.h index 08ffd3e..4d52667 100644 --- a/include/playback-view.h +++ b/include/playback-view.h @@ -25,20 +25,91 @@ struct SItemInfo; +class CSliderWidget : + public CListenerMgr, + public IMusicControllerListener, + public IMouseMoveListener, + public IChangedListener { +private: + struct SSliderWidget *m; + +private: + static Eina_Bool sm_CbUpdateSlider(void *dt); + Eina_Bool m_OnUpdateSlider(void); + + bool m_AddSlider(void); + void m_RemoveTimer(void); + + void m_UpdateSongInfo(void); + +public: + CSliderWidget() : + IMouseMoveListener(this), + IChangedListener(this), + m(0) {} + virtual ~CSliderWidget() {} + + bool Create(Evas_Object *eoParent); + virtual void Destroy(void); + + Evas_Object* Base(void); + + void Init(void); + + //! This function is invoked when playback is complete. + virtual void OnComplete(void); + //! This function is invoked when new song is played. + virtual void OnStartPlayback(void); + //! + virtual void OnStopPlayback(void); + //! This function is invoked when playback is paused. + virtual void OnPausePlayback(void); + //! This function is invoked when playback is resumed. + virtual void OnResumePlayback(void); + //! + virtual void OnPosition(int milsec); + + virtual void OnChanged(int id, Evas_Object *obj); + virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); +}; + + +class CTimer { +private: + struct STimer *m; + +private: + static Eina_Bool sm_CbTimer(void *data); + +protected: + virtual void t_OnTimer(int id); + +public: + CTimer() : m(0) {} + virtual ~CTimer() {} + + bool Create(void); + virtual void Destroy(void); + + bool SetTimer(int id, int ms); + void KillTimer(int id); +}; + + class CPlaybackView : public CBaseView, public IMouseClickedListener, public IMouseMoveListener, public IPressedListener, public IUnpressedListener, - public IChangedListener, public IRealizedListener, public IActivatedListener, - public IMusicControllerListener { + public IMusicControllerListener, + public CTimer { private: struct SPlaybackView* m; private: - static Eina_Bool sm_CbUpdateSlider(void *dt); + //static Eina_Bool sm_CbUpdateSlider(void *dt); static Eina_Bool sm_CbLongpressTimer(void *dt); void m_OnLongpressTimer(void); @@ -96,7 +167,6 @@ private: void m_HandleOnRepeated(void); void m_DeleteSelectedItems(void); - void m_AddSlider(void); void m_AddAlbumCover(void); void m_AddCurrentSonginfo(void); void m_AddEditPlaylistButtons(void); @@ -129,7 +199,7 @@ protected: public: CPlaybackView(const char *pViewId) : CBaseView(pViewId), IMouseClickedListener(this), IMouseMoveListener(this), - IPressedListener(this), IUnpressedListener(this), IChangedListener(this), + IPressedListener(this), IUnpressedListener(this), IRealizedListener(this), IActivatedListener(this), m(0) {} virtual ~CPlaybackView() {} @@ -146,7 +216,6 @@ public: virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnPressed(int id, Evas_Object *obj); virtual void OnUnpressed(int id, Evas_Object *obj); - virtual void OnChanged(int id, Evas_Object *obj); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); virtual void OnActivated(int id, Evas_Object *obj, Elm_Object_Item *item); @@ -154,6 +223,8 @@ public: virtual void OnError(void); virtual void OnUsbStatusChanged(SUsbStorageStatus status); virtual void OnUpdateContent(void); + virtual void OnStartPlayback(void); + virtual void OnStopPlayback(void); }; diff --git a/include/playlist-mgr.h b/include/playlist-mgr.h index f98919e..12373e0 100644 --- a/include/playlist-mgr.h +++ b/include/playlist-mgr.h @@ -50,24 +50,5 @@ public: bool SetCurrentSong(char *mediaid); }; -/* -struct playlist *playlist_create(Eina_List *songlist); -struct playlist *playlist_update(struct playlist *plist, Eina_List *songlist, - int addmode); -void playlist_destroy(struct playlist *plist); - -const char *playlist_get_songpath_from_index(struct playlist *plist, int index); -int playlist_get_songinfo_from_index(struct playlist *plist, int index, - struct SSongInfo **const csinfo); -int playlist_get_total_songs(struct playlist *plist, int *total_songs); -int playlist_get_cur_song_index(struct playlist *plist, int *index); -int playlist_set_cur_song_index(struct playlist *plist, int index); -int playlist_load_next_song(struct playlist *plist, int shufstate); -int playlist_load_previous_song(struct playlist *plist, int shufstate); -int playlist_remove_song(struct playlist *plist, struct SSongInfo *sinfo, - int index, int shufstate); -void playlist_update_shuffle(struct playlist *plist); -int playlist_set_current_song(struct playlist *plist, char *mediaid); -*/ #endif /*__PLAYLIST_MGR_H__*/ diff --git a/src/main.cpp b/src/main.cpp index ce2272d..d7bf819 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -125,7 +125,6 @@ public: CSortMgr::Finalize(); CViewMgr::Finalize(); - CMusicController::Finalize(); delete m_cBaseView; delete m_cPlaybackView; @@ -184,20 +183,12 @@ public: ad.arglist->uri = uri; ad.arglist->source = source; CViewMgr::Finalize(); - CMusicController::Finalize(); - _DBG(""); - - if (!CMusicController::Initialize()) { - _ERR(" music init failed "); - goto error; - } _DBG(""); CViewMgr::Initialize(ad.win, (void*)"path"); m_pViewMgr = CViewMgr::GetInstance(); if (!m_pViewMgr) { _ERR(" viewmgr init failed "); - CMusicController::Finalize(); goto error; } _DBG(""); @@ -226,14 +217,12 @@ public: if (!m_pViewMgr->PushView(MUSIC_PLAYBACK_VIEW, NULL, false)) { _ERR(" view push failed "); CViewMgr::Finalize(); - CMusicController::Finalize(); goto error; } if (!m_pViewMgr->PushView(MUSIC_BASE_VIEW, ad.arglist)) { _ERR(" view push failed "); CViewMgr::Finalize(); - CMusicController::Finalize(); goto error; } _DBG(""); diff --git a/src/playback/MusicControllerImpl.cpp b/src/playback/MusicControllerImpl.cpp new file mode 100644 index 0000000..b09863d --- /dev/null +++ b/src/playback/MusicControllerImpl.cpp @@ -0,0 +1,825 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +#include +#include +#include +#include "dbg.h" +#include "i18n.h" + +#include + +#include "song_info.h" +#include "album_info.h" +#include "folder_info.h" +#include "common.h" +#include "category_info.h" +#include "music-controller.h" +#include "MusicControllerImpl.h" +#include "playlist-mgr.h" +#include "playback-mgr.h" +#include "mediadata.h" +#include "bus.h" +#include "Info.h" + + +struct SMusicControllerImpl { + CPlayback *pPlayback; + CPlaylist* pPlaylist; + CMediadata* pMediadata; + CAlbumInfo *alinfo; + Eina_List *elListener; + int initial_index; + + EPlayStatus statePlay; + EShuffleStatus stateShuffle; + + ERepeatStatus repeatstate; + SCbInfo *cbinfo; + + SMusicControllerImpl() { + pPlayback = NULL; + pPlaylist = NULL; + pMediadata = NULL; + alinfo = NULL; + elListener = NULL; + initial_index = 0; + statePlay = (EPlayStatus)0; + stateShuffle= (EShuffleStatus)0; + repeatstate= (ERepeatStatus)0; + cbinfo = NULL; + } +}; + + +void CMusicControllerImpl::sm_CbContentUpdated(void *dt) +{ + CMusicControllerImpl *root = (CMusicControllerImpl *)dt; + if (root) + root->m_OnContentUpdated(); +} + + +void CMusicControllerImpl::m_OnContentUpdated(void) +{ + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnUpdateContent(); + } +} + + +void CMusicControllerImpl::m_InvokeErrorCallback(SMusicControllerImpl *m, int type) +{ + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + + if (!m) + return; + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnError(); + } +} + + +bool CMusicControllerImpl::t_PlayNext(int direction, int playnext_type) +{ + bool r; + int index; + + if (!m->pPlaylist->FlagCreate()) + return false; + + Stop(); + + if (playnext_type == E_ON_COMPLETE && + m->repeatstate == REPEAT_STATUS_ONE) + goto finish; + + if (direction == DIR_NEXT) { + r = m->pPlaylist->LoadNextSong(m->stateShuffle); + } + else { + r = m->pPlaylist->LoadPreviousSong(m->stateShuffle); + } + + if (r == false) { + _ERR(" playlist load next/previous failed "); + return false; + } + + if (playnext_type == E_ON_COMPLETE && + m->repeatstate == REPEAT_STATUS_NONE) { + r = m->pPlaylist->GetCurSongIndex(&index); + if (r == false) { + _ERR(" get cur song index failed "); + return false; + } + + if (index == m->initial_index) + return true; + } + +finish: + Start(); + + return true; +} + + +bool CMusicControllerImpl::Create(void) +{ + ASSERT(!m); + + _CREATE_BEGIN{ + _CHECK(m = new SMusicControllerImpl) + _CHECK(m->alinfo = new CAlbumInfo) + _CHECK(m->alinfo->Create() == true) + _CHECK(m->pMediadata = new CMediadata) + _CHECK(m->pMediadata->Create() == true) + _CHECK(m->pPlayback = new CPlayback) + _CHECK(m->pPlayback->Create() == true) + _CHECK(m->pPlayback->SetCallback(this)) + _CHECK(m->pPlaylist = new CPlaylist) + + _WHEN_SUCCESS{ + m->statePlay = PLAY_STATUS_INITIAL; + m->stateShuffle = SHUFFLE_STATUS_OFF; + m->repeatstate = REPEAT_STATUS_ALL; + m->initial_index = 0; + CInfo::SetSortType(E_SORT_TITLE_A_Z); + CInfo::SetSourceType(SOURCE_TYPE_ALL); + m->cbinfo = m->pMediadata->AddCallback(E_CONTENT_UPDATE, sm_CbContentUpdated, this); + + // Even if CUsbConnectionListener creation failed, + // application should run properly. + if (!CUsbConnectionListener::Create()) + _DBG("CUsbConnectionListener::Create failed"); + } + + _CHECK_FAIL{ delete m->pPlaylist; } + _CHECK_FAIL{} + _CHECK_FAIL{ m->pPlayback->Destroy(); } + _CHECK_FAIL{ delete m->pPlayback; } + _CHECK_FAIL{ m->pMediadata->Destroy(); } + _CHECK_FAIL{ delete m->pMediadata; } + _CHECK_FAIL{ m->alinfo->Destroy(); } + _CHECK_FAIL{ delete m->alinfo; } + + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return NULL; } + + return true; +} + + +void CMusicControllerImpl::Destroy(void) +{ + if (CUsbConnectionListener::FlagCreate()) + CUsbConnectionListener::Destroy(); + + if (!m->pPlayback->UnsetCallback()) + _ERR(" playback remove completion callback failed"); + + m->pPlayback->Destroy(); + delete m->pPlayback; + + if (m->pPlaylist->FlagCreate()) { + m->pPlaylist->Destroy(); + } + delete m->pPlaylist; + + m->pMediadata->RemoveCallback(m->cbinfo); + m->pMediadata->Destroy(); + delete m->pMediadata; + + m->alinfo->Destroy(); + delete m->alinfo; + delete m; + m = NULL; +} + + +bool CMusicControllerImpl::Start(void) +{ + ASSERT(m); + + const char *songpath; + int index; + CPlaylist *pPlaylist; + CPlayback *pPlayback; + CSongInfo *sinfo; + char *media_id; + + pPlaylist = m->pPlaylist; + pPlayback = m->pPlayback; + + _CREATE_BEGIN{ + _CHECK(pPlaylist->FlagCreate()) + _CHECK(pPlaylist->GetCurSongIndex(&index)) + _CHECK(songpath = pPlaylist->SongpathFromIndex(index)) + _CHECK(pPlayback->SetUri(songpath)) + _CHECK(pPlayback->Prepare()) + _CHECK(pPlayback->Start()) + + _COMMAND{ m->statePlay = PLAY_STATUS_PLAY; } + + _CHECK(m->pPlaylist->GetSonginfoFromIndex(index, &sinfo)) + _CHECK(media_id = sinfo->Id()) + _CHECK(m->pMediadata->SetPlayedTime(media_id)) + + _WHEN_SUCCESS{ + bus_send_signal(); + } + + _CHECK_FAIL{} + _CHECK_FAIL{} + _CHECK_FAIL{} + + _CHECK_FAIL{} + _CHECK_FAIL{} + _CHECK_FAIL{ _ERR("Playback Failed!!"); m_InvokeErrorCallback(m, E_PLAYBACK_ERROR); } + _CHECK_FAIL{} + _CHECK_FAIL{} + _CHECK_FAIL{ _ERR("CMusicControllerImpl::Start Failed!!"); Stop(); } + } _CREATE_END_AND_CATCH{ return false; } + + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnStartPlayback(); + } + + return true; +} + + +bool CMusicControllerImpl::Stop(void) +{ + ASSERT(m); + + if (!m->pPlayback->Stop()) { + _ERR("playback stop failed"); + return false; + } + + m->statePlay = PLAY_STATUS_STOP; + + if (!m->pPlayback->Unprepare()) { + _ERR("playback unprepare failed"); + return false; + } + + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnStopPlayback(); + } + + + return true; +} + + +bool CMusicControllerImpl::Resume(void) +{ + ASSERT(m); + + if (!m->pPlayback->Resume()) { + _ERR("playback resume failed"); + return false; + } + + m->statePlay = PLAY_STATUS_PLAY; + + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnResumePlayback(); + } + return true; +} + + +bool CMusicControllerImpl::Pause(void) +{ + ASSERT(m); + + if (!m->pPlayback->Pause()) { + _ERR("playback Pause failed"); + return false; + } + + m->statePlay = PLAY_STATUS_PAUSE; + + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnPausePlayback(); + } + + + return true; +} + + +bool CMusicControllerImpl::AddListener(IMusicControllerListener *listener) +{ + ASSERT(m); + ASSERT(listener); + + m->elListener = eina_list_append(m->elListener, listener); + + return true; +} + + +bool CMusicControllerImpl::RemoveListener(IMusicControllerListener *listener) +{ + ASSERT(m); + ASSERT(listener); + + m->elListener = eina_list_remove(m->elListener, listener); + + return true; +} + + +bool CMusicControllerImpl::GetCurrentSongIndex(int *ind) +{ + ASSERT(m); + + int index; + + if (!m || !m->pPlaylist->FlagCreate()) { + _ERR("NULL received"); + return false; + } + + if (!m->pPlaylist->GetCurSongIndex(&index)) { + _ERR(" playlist get current song index failed"); + return false; + } + + *ind = index; + + return true; +} + + +bool CMusicControllerImpl::GetTotalSongs(int *ts) +{ + ASSERT(m); + + int count; + + if (!m->pPlaylist->FlagCreate()) { + _ERR("NULL received"); + return false; + } + + if (!m->pPlaylist->GetTotalSongs(&count)) { + _ERR(" playlist get current song index failed"); + return false; + } + + *ts = count; + + return true; +} + + +bool CMusicControllerImpl::GetSonginfoFromIndex(int index, CSongInfo **const csinfo) +{ + ASSERT(m); + + if (!m->pPlaylist->FlagCreate() || !csinfo) { + _ERR("NULL received"); + return false; + } + + if (!m->pPlaylist->GetSonginfoFromIndex(index, csinfo)) { + _ERR(" playlist get current song info failed"); + return false; + } + + return true; +} + + +bool CMusicControllerImpl::SetPosition(int milseconds) +{ + ASSERT(m); + + if (!m->pPlayback->SetPosition(milseconds)) { + _ERR("playback set position failed"); + return false; + } + + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnPosition(milseconds); + } + return true; +} + + +bool CMusicControllerImpl::GetPosition(int *const milseconds) +{ + ASSERT(m); + + if (!m->pPlayback->GetPosition(milseconds)) { + _ERR("playback get position failed"); + return false; + } + + return true; +} + + +bool CMusicControllerImpl::SetCurrentSong(char *mediaid) +{ + ASSERT(m); + ASSERT(mediaid); + + if (!m->pPlaylist->FlagCreate()) + return false; + + m->pPlaylist->SetCurrentSong(mediaid); + + return true; +} + + +bool CMusicControllerImpl::GetCurrentSong(CSongInfo **const sinfo) +{ + ASSERT(m); + + int index; + + if (!m->pPlaylist->FlagCreate()) + return false; + + if (!m->pPlaylist->GetCurSongIndex(&index)) { + _ERR(" playlist get current song index failed"); + return false; + } + + if (!m->pPlaylist->GetSonginfoFromIndex(index, sinfo)) { + _ERR(" playlist get current song info failed"); + return false; + } + + return true; +} + + +bool CMusicControllerImpl::UpdatePlaylist(Eina_List *slist, int addmode) +{ + ASSERT(m); + ASSERT(slist); + + if (m->pPlaylist->FlagCreate()) + m->pPlaylist->Update(slist, addmode); + else { + if (!m->pPlaylist->Create(slist)) + _ERR(" playlist create failed "); + } + return true; +} + + +bool CMusicControllerImpl::EmptyPlaylist(void) +{ + ASSERT(m); + + if (!m->pPlaylist->FlagCreate()) + return false; + + m->pPlaylist->Destroy(); + + return true; +} + + +bool CMusicControllerImpl::PlayPreviousSong(void) +{ + ASSERT(m); + + return t_PlayNext(DIR_PREVIOUS, E_BUTTON_CLICK); +} + + +bool CMusicControllerImpl::PlayNextSong(void) +{ + ASSERT(m); + + return t_PlayNext(DIR_NEXT, E_BUTTON_CLICK); +} + + +bool CMusicControllerImpl::PlayIndexSong(int index) +{ + ASSERT(m); + + if (!m->pPlaylist->FlagCreate()) + return false; + + Stop(); + + if (!m->pPlaylist->SetCurSongIndex(index)) + return false; + + Start(); + + m->initial_index = index; + + return true; +} + + +bool CMusicControllerImpl::RemoveSong(CSongInfo *sinfo, int index) +{ + ASSERT(m); + ASSERT(sinfo); + + int ind; + + if (!m->pPlaylist->FlagCreate()) + return false; + + if (!GetCurrentSongIndex(&ind)) { + _ERR("unable to find current song index"); + return false; + } + + if (!m->pPlaylist->RemoveSong(sinfo, index, m->stateShuffle)) { + _ERR("Song can not be deleted"); + return false; + } + + if (ind != 0 && ind == index) + Stop(); + + return true; +} + + +bool CMusicControllerImpl::MediaGetList(int EListType, void *info, Eina_List **list) +{ + ASSERT(m); + + Eina_List *mlist; + + mlist = m->pMediadata->Medialist(CInfo::SourceType(), EListType, info); + if (!mlist) + return false; + + *list = eina_list_clone(mlist); + + return true; +} + + +bool CMusicControllerImpl::MediaInsertPlaylist(const char *name, Eina_List *idlist) +{ + ASSERT(m); + ASSERT(name); + ASSERT(idlist); + + return m->pMediadata->Alloc(name, idlist); +} + + +bool CMusicControllerImpl::MediaExistPlaylist(const char *name) +{ + ASSERT(m); + ASSERT(name); + + return m->pMediadata->ExistPlaylist(name); +} + + +bool CMusicControllerImpl::MediaDeletePlaylist(int id) +{ + ASSERT(m); + + return m->pMediadata->Delete(id); +} + + +bool CMusicControllerImpl::MediaRenamePlaylist(int id, const char *name) +{ + ASSERT(m); + ASSERT(name); + + return m->pMediadata->Rename(id, name); +} + + +bool CMusicControllerImpl::MediaAddmediaPlaylist(int id, Eina_List *idlist) +{ + ASSERT(m); + ASSERT(idlist); + + return m->pMediadata->Insert(id, idlist); +} + + +bool CMusicControllerImpl::MediaRemovemediaPlaylist(int id, Eina_List *idlist) +{ + ASSERT(m); + ASSERT(idlist); + + return m->pMediadata->Remove(id, idlist); +} + + +bool CMusicControllerImpl::MediaAddsongsPlaylist(int lid, Eina_List *list) +{ + ASSERT(m); + ASSERT(list); + + Eina_List *idlist, *l; + CSongInfo *sinfo; + void *obj; + char *id; + + idlist = NULL; + EINA_LIST_FOREACH(list, l, obj) { + sinfo = (CSongInfo *)obj; + id = sinfo->Id(); + if (id) + idlist = eina_list_append(idlist, id); + } + + if (!MediaAddmediaPlaylist(lid, idlist)) { + _ERR(" Failed to add songs to playlist "); + return false; + } + + return true; +} + + +CSongInfo *CMusicControllerImpl::MediaSongByUri(char *uri) +{ + ASSERT(m); + ASSERT(uri); + + CSongInfo *sinfo; + + sinfo = m->pMediadata->SongByUri(uri); + if (!sinfo) + return NULL; + + return sinfo; +} + + +bool CMusicControllerImpl::SetPlayState(EPlayStatus state) +{ + ASSERT(m); + + m->statePlay = state; + + return true; +} + + +EPlayStatus CMusicControllerImpl::PlayState(void) +{ + ASSERT(m); + + return m->statePlay; +} + + +bool CMusicControllerImpl::SetShuffleState(EShuffleStatus state) +{ + ASSERT(m); + + m->stateShuffle = state; + if (state && m->pPlaylist->FlagCreate()) + m->pPlaylist->UpdateShuffle(); + + return true; +} + + +EShuffleStatus CMusicControllerImpl::ShuffleState(void) +{ + ASSERT(m); + + return m->stateShuffle; +} + + +bool CMusicControllerImpl::SetRepeatState(ERepeatStatus state) +{ + ASSERT(m); + + m->repeatstate = state; + + return true; +} + + +ERepeatStatus CMusicControllerImpl::RepeatState(void) +{ + ASSERT(m); + + return m->repeatstate; +} + + +void CMusicControllerImpl::OnStatusChanged(SUsbHostDeviceInfo *changedDevice, + SUsbHostDeviceStatus status) +{ + if (!m) + return; + + Eina_List *l; + IMusicControllerListener *mcListener = NULL;; + void *obj; + + if (status == USB_HOST_DEV_CONNECTED) { + if (CInfo::SourceType() == SOURCE_TYPE_USB) { + if (!FlagConnected()) + CInfo::SetSourceType(SOURCE_TYPE_ALL); + } + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnUsbStatusChanged(IMusicControllerListener::USB_STORAGE_CONNECTED); + } + } + else { + if (CInfo::SourceType() == SOURCE_TYPE_USB) { + CInfo::SetSourceType(SOURCE_TYPE_ALL); + } + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnUsbStatusChanged(IMusicControllerListener::USB_STORAGE_DISCONNECTED); + } + } +} + + +void CMusicControllerImpl::t_OnPlayComplete(void) +{ + bool r; + Eina_List *l; + IMusicControllerListener *mcListener = NULL; + void *obj; + + r = t_PlayNext(DIR_NEXT, E_ON_COMPLETE); + if (r == false) + _ERR(" music play next song failed "); + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnComplete(); + } +} diff --git a/src/playback/MusicControllerImpl.h b/src/playback/MusicControllerImpl.h new file mode 100644 index 0000000..251ecbb --- /dev/null +++ b/src/playback/MusicControllerImpl.h @@ -0,0 +1,109 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef __MUSIC_CONTROLLER_IMPL_H__ +#define __MUSIC_CONTROLLER_IMPL_H__ + + +class CMusicControllerImpl : + public CUsbConnectionListener, + public ICompleteListener { +private: + struct SMusicControllerImpl *m; + +private: + enum EDirectionType { + DIR_PREVIOUS, + DIR_NEXT + }; + + enum ENextType { + E_ON_COMPLETE, + E_BUTTON_CLICK + }; + +private: + static void sm_CbContentUpdated(void *dt); + void m_OnContentUpdated(void); + + void m_InvokeErrorCallback(SMusicControllerImpl *m, int type); + +protected: + bool t_PlayNext(int direction, int playnext_type); + +public: + CMusicControllerImpl() {} + virtual ~CMusicControllerImpl() {} + + bool Create(void); + virtual void Destroy(void); + + bool Start(void); + bool Stop(void); + bool Resume(void); + bool Pause(void); + + bool AddListener(IMusicControllerListener *listener); + bool RemoveListener(IMusicControllerListener *listener); + + bool GetCurrentSongIndex(int *ind); + bool GetTotalSongs(int *ts); + bool GetSonginfoFromIndex(int index, CSongInfo **const csinfo); + + bool SetPosition(int milsec); + bool GetPosition(int *const milseconds); + + bool SetCurrentSong(char *mediaid); + bool GetCurrentSong(CSongInfo **const sinfo); + + bool UpdatePlaylist(Eina_List *slist, int addmode); + bool EmptyPlaylist(void); + + bool PlayPreviousSong(void); + bool PlayNextSong(void); + bool PlayIndexSong(int index); + + bool RemoveSong(CSongInfo *sinfo, int index); + + bool MediaGetList(int EListType, void *info, Eina_List **list); + bool MediaInsertPlaylist(const char *name, Eina_List *idlist); + bool MediaExistPlaylist(const char *name); + bool MediaDeletePlaylist(int id); + bool MediaRenamePlaylist(int id, const char *name); + bool MediaAddmediaPlaylist(int id, Eina_List *idlist); + bool MediaRemovemediaPlaylist(int id, Eina_List *idlist); + bool MediaAddsongsPlaylist(int lid, Eina_List *list); + + CSongInfo *MediaSongByUri(char *uri); + + bool SetPlayState(EPlayStatus state); + EPlayStatus PlayState(void); + + bool SetShuffleState(EShuffleStatus state); + EShuffleStatus ShuffleState(void); + + bool SetRepeatState(ERepeatStatus state); + ERepeatStatus RepeatState(void); + +public: + virtual void OnStatusChanged(SUsbHostDeviceInfo *changedDevice, + SUsbHostDeviceStatus status); + + virtual void t_OnPlayComplete(void); +}; + + +#endif /* __MUSIC_CONTROLLER_IMPL_H__ */ \ No newline at end of file diff --git a/src/playback/music-controller.cpp b/src/playback/music-controller.cpp index 19e49aa..e11ed1c 100644 --- a/src/playback/music-controller.cpp +++ b/src/playback/music-controller.cpp @@ -1,320 +1,54 @@ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include #include #include #include "dbg.h" -#include "i18n.h" - #include - #include "song_info.h" -#include "album_info.h" -#include "folder_info.h" #include "common.h" -#include "category_info.h" #include "music-controller.h" -#include "playlist-mgr.h" -#include "playback-mgr.h" -#include "mediadata.h" -#include "bus.h" -#include "Info.h" +#include "MusicControllerImpl.h" struct SMusicController { - CPlayback* pPlayback; - CPlaylist* pPlaylist; - CMediadata* pMediadata; - CAlbumInfo *alinfo; - Eina_List *elListener; - int initial_index; - - EPlayStatus statePlay; - EShuffleStatus stateShuffle; - - ERepeatStatus repeatstate; - SCbInfo *cbinfo; + static CMusicControllerImpl ref; + static int refCnt; }; -CMusicController *CMusicController::instance = NULL; -int CMusicController::refCnt = 0; - - -// Implementation of IMusicControllerListener -void IMusicControllerListener::s_CbComplete(void *cookie) -{ - IMusicControllerListener *root = (IMusicControllerListener *)cookie; - if (root) - root->OnComplete(); -} - - -void IMusicControllerListener::s_CbError(void *cookie) -{ - IMusicControllerListener *root = (IMusicControllerListener *)cookie; - if (root) - root->OnError(); -} - - -void IMusicControllerListener::s_CbUsbStatusChagned(void *cookie, SUsbStorageStatus status) -{ - IMusicControllerListener *root = (IMusicControllerListener *)cookie; - if (root) - root->OnUsbStatusChanged(status); -} - - -void IMusicControllerListener::s_CbUpdateContent(void *cookie) -{ - IMusicControllerListener *root = (IMusicControllerListener *)cookie; - if (root) - root->OnUpdateContent(); -} - - -// Implementation of CMusicController -void CMusicController::sm_CbPlaybackCompletion(void *dt) -{ - CMusicController* root = (CMusicController*)dt; - if (root) - root->m_OnPlaybackCompletion(); -} - - -void CMusicController::m_OnPlaybackCompletion(void) -{ - bool r; - Eina_List *l; - IMusicControllerListener *mcListener = NULL; - void *obj; - - r = t_PlayNext(DIR_NEXT, E_ON_COMPLETE); - if (r == false) - _ERR(" music play next song failed "); - - EINA_LIST_FOREACH(m->elListener, l, obj) { - mcListener = (IMusicControllerListener *)obj; - if (mcListener) - mcListener->s_CbComplete(mcListener); - } -} - - -void CMusicController::sm_CbContentUpdated(void *dt) -{ - CMusicController *root = (CMusicController *)dt; - if (root) - root->m_OnContentUpdated(); -} - - -void CMusicController::m_OnContentUpdated(void) -{ - Eina_List *l; - IMusicControllerListener *mcListener = NULL; - void *obj; - - EINA_LIST_FOREACH(m->elListener, l, obj) { - mcListener = (IMusicControllerListener *)obj; - if (mcListener) - mcListener->s_CbUpdateContent(mcListener); - } -} +CMusicControllerImpl SMusicController::ref; +int SMusicController::refCnt = 0; -void CMusicController::m_InvokeErrorCallback(SMusicController *m, int type) +bool CMusicController::Create(void) { - Eina_List *l; - IMusicControllerListener *mcListener = NULL; - void *obj; + ASSERT(!m); + m = new SMusicController; if (!m) - return; - - EINA_LIST_FOREACH(m->elListener, l, obj) { - mcListener = (IMusicControllerListener *)obj; - if (mcListener) - mcListener->s_CbError(mcListener); - } -} - - -bool CMusicController::t_PlayNext(int direction, int playnext_type) -{ - bool r; - int index; - - if (!m->pPlaylist->FlagCreate()) - return false; - - Stop(); - - if (playnext_type == E_ON_COMPLETE && - m->repeatstate == REPEAT_STATUS_ONE) - goto finish; - - if (direction == DIR_NEXT) { - r = m->pPlaylist->LoadNextSong(m->stateShuffle); - } - else { - r = m->pPlaylist->LoadPreviousSong(m->stateShuffle); - } - - if (r == false) { - _ERR(" playlist load next/previous failed "); return false; - } - if (playnext_type == E_ON_COMPLETE && - m->repeatstate == REPEAT_STATUS_NONE) { - r = m->pPlaylist->GetCurSongIndex(&index); - if (r == false) { - _ERR(" get cur song index failed "); + if (m->refCnt == 0) { + if (!m->ref.Create()) { + delete m; + m = NULL; return false; } - - if (index == m->initial_index) - return true; } - -finish: - Start(); + m->refCnt++; return true; } -SMusicController *CMusicController::t_Create(void) -{ - SMusicController *mhandle = NULL; - - _CREATE_BEGIN { - _CHECK(mhandle = new SMusicController) - - _WHEN_SUCCESS{ - memset(mhandle, 0, sizeof(SMusicController)); - - _CHECK(mhandle->alinfo = new CAlbumInfo) - _CHECK(mhandle->alinfo->Create() == true) - _CHECK(mhandle->pMediadata = new CMediadata) - _CHECK(mhandle->pMediadata->Create() == true) - _CHECK(mhandle->pPlayback = new CPlayback) - _CHECK(mhandle->pPlayback->Create() == true) - _CHECK(mhandle->pPlayback->SetCallback(sm_CbPlaybackCompletion, this) == true) - _CHECK(mhandle->pPlaylist = new CPlaylist) - - _WHEN_SUCCESS{ - mhandle->statePlay = PLAY_STATUS_INITIAL; - mhandle->stateShuffle = SHUFFLE_STATUS_OFF; - mhandle->repeatstate = REPEAT_STATUS_ALL; - mhandle->initial_index = 0; - CInfo::SetSortType(E_SORT_TITLE_A_Z); - CInfo::SetSourceType(SOURCE_TYPE_ALL); - mhandle->cbinfo = mhandle->pMediadata->AddCallback(E_CONTENT_UPDATE, sm_CbContentUpdated, this); - - // Even if CUsbConnectionListener creation failed, - // application should run properly. - if (!CUsbConnectionListener::Create()) - _DBG("CUsbConnectionListener::Create failed"); - } - - _CHECK_FAIL{ delete mhandle->pPlaylist; } - _CHECK_FAIL{} - _CHECK_FAIL{ mhandle->pPlayback->Destroy(); } - _CHECK_FAIL{ delete mhandle->pPlayback; } - _CHECK_FAIL{ mhandle->pMediadata->Destroy(); } - _CHECK_FAIL{ delete mhandle->pMediadata; } - _CHECK_FAIL{ mhandle->alinfo->Destroy(); } - _CHECK_FAIL{ delete mhandle->alinfo; } - } - - _CHECK_FAIL{ delete mhandle; mhandle = NULL; } - } _CREATE_END_AND_CATCH{ return NULL; } - - return mhandle; -} - - -void CMusicController::t_Destroy(void) +void CMusicController::Destroy(void) { - if (CUsbConnectionListener::FlagCreate()) - CUsbConnectionListener::Destroy(); - - if (!m->pPlayback->UnsetCallback()) - _ERR(" playback remove completion callback failed"); - - m->pPlayback->Destroy(); - delete m->pPlayback; + ASSERT(m); - if (m->pPlaylist->FlagCreate()) { - m->pPlaylist->Destroy(); + m->refCnt--; + if (m->refCnt == 0) { + m->ref.Destroy(); } - delete m->pPlaylist; - - m->pMediadata->RemoveCallback(m->cbinfo); - m->pMediadata->Destroy(); - delete m->pMediadata; - - m->alinfo->Destroy(); - delete m->alinfo; delete m; -} - - -bool CMusicController::Initialize(void) -{ - if (refCnt == 0) { - instance = new CMusicController; - if (instance == NULL) { - return false; - } - instance->m = instance->t_Create(); - if (!instance->m) { - _ERR("music_init failed"); - delete instance; - instance = NULL; - return false; - } - } - - refCnt++; - - return true; -} - - -void CMusicController::Finalize(void) -{ - if (refCnt > 0) { - refCnt--; - } - if (refCnt == 0) { - if (instance) { - instance->t_Destroy(); - delete instance; - instance = NULL; - } - } -} - -CMusicController* CMusicController::GetInstance(void) -{ - return instance; + m = NULL; } @@ -322,49 +56,7 @@ bool CMusicController::Start(void) { ASSERT(m); - const char *songpath; - int index; - CPlaylist *pPlaylist; - CPlayback *pPlayback; - CSongInfo *sinfo; - char *media_id; - - pPlaylist = m->pPlaylist; - pPlayback = m->pPlayback; - - _CREATE_BEGIN{ - _CHECK(pPlaylist->FlagCreate()) - _CHECK(pPlaylist->GetCurSongIndex(&index)) - _CHECK(songpath = pPlaylist->SongpathFromIndex(index)) - _CHECK(pPlayback->SetUri(songpath)) - _CHECK(pPlayback->Prepare()) - _CHECK(pPlayback->Start()) - - _WHEN_SUCCESS{ - m->statePlay = PLAY_STATUS_PLAY; - - _CHECK(m->pPlaylist->GetSonginfoFromIndex(index, &sinfo)) - _CHECK(media_id = sinfo->Id()) - _CHECK(m->pMediadata->SetPlayedTime(media_id)) - - _WHEN_SUCCESS{ - bus_send_signal(); - } - - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} - } - - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{ _ERR("Playback Failed!!"); m_InvokeErrorCallback(m, E_PLAYBACK_ERROR); } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{ _ERR("CMusicController::Start Failed!!"); Stop(); } - } _CREATE_END_AND_CATCH{ return false; } - - return true; + return m->ref.Start(); } @@ -372,19 +64,7 @@ bool CMusicController::Stop(void) { ASSERT(m); - if (!m->pPlayback->Stop()) { - _ERR("playback stop failed"); - return false; - } - - m->statePlay = PLAY_STATUS_STOP; - - if (!m->pPlayback->Unprepare()) { - _ERR("playback unprepare failed"); - return false; - } - - return true; + return m->ref.Stop(); } @@ -392,14 +72,7 @@ bool CMusicController::Resume(void) { ASSERT(m); - if (!m->pPlayback->Resume()) { - _ERR("playback resume failed"); - return false; - } - - m->statePlay = PLAY_STATUS_PLAY; - - return true; + return m->ref.Resume(); } @@ -407,36 +80,23 @@ bool CMusicController::Pause(void) { ASSERT(m); - if (!m->pPlayback->Pause()) { - _ERR("playback Pause failed"); - return false; - } - - m->statePlay = PLAY_STATUS_PAUSE; - - return true; + return m->ref.Pause(); } bool CMusicController::AddListener(IMusicControllerListener *listener) { ASSERT(m); - ASSERT(listener); - - m->elListener = eina_list_append(m->elListener, listener); - return true; + return m->ref.AddListener(listener); } bool CMusicController::RemoveListener(IMusicControllerListener *listener) { ASSERT(m); - ASSERT(listener); - m->elListener = eina_list_remove(m->elListener, listener); - - return true; + return m->ref.RemoveListener(listener); } @@ -444,21 +104,7 @@ bool CMusicController::GetCurrentSongIndex(int *ind) { ASSERT(m); - int index; - - if (!m || !m->pPlaylist->FlagCreate()) { - _ERR("NULL received"); - return false; - } - - if (!m->pPlaylist->GetCurSongIndex(&index)) { - _ERR(" playlist get current song index failed"); - return false; - } - - *ind = index; - - return true; + return m->ref.GetCurrentSongIndex(ind); } @@ -466,21 +112,7 @@ bool CMusicController::GetTotalSongs(int *ts) { ASSERT(m); - int count; - - if (!m->pPlaylist->FlagCreate()) { - _ERR("NULL received"); - return false; - } - - if (!m->pPlaylist->GetTotalSongs(&count)) { - _ERR(" playlist get current song index failed"); - return false; - } - - *ts = count; - - return true; + return m->ref.GetTotalSongs(ts); } @@ -488,30 +120,15 @@ bool CMusicController::GetSonginfoFromIndex(int index, CSongInfo **const csinfo) { ASSERT(m); - if (!m->pPlaylist->FlagCreate() || !csinfo) { - _ERR("NULL received"); - return false; - } - - if (!m->pPlaylist->GetSonginfoFromIndex(index, csinfo)) { - _ERR(" playlist get current song info failed"); - return false; - } - - return true; + return m->ref.GetSonginfoFromIndex(index, csinfo); } -bool CMusicController::SetPosition(int milseconds) +bool CMusicController::SetPosition(int milsec) { ASSERT(m); - if (!m->pPlayback->SetPosition(milseconds)) { - _ERR("playback set position failed"); - return false; - } - - return true; + return m->ref.SetPosition(milsec); } @@ -519,26 +136,15 @@ bool CMusicController::GetPosition(int *const milseconds) { ASSERT(m); - if (!m->pPlayback->GetPosition(milseconds)) { - _ERR("playback get position failed"); - return false; - } - - return true; + return m->ref.GetPosition(milseconds); } bool CMusicController::SetCurrentSong(char *mediaid) { ASSERT(m); - ASSERT(mediaid); - if (!m->pPlaylist->FlagCreate()) - return false; - - m->pPlaylist->SetCurrentSong(mediaid); - - return true; + return m->ref.SetCurrentSong(mediaid); } @@ -546,37 +152,15 @@ bool CMusicController::GetCurrentSong(CSongInfo **const sinfo) { ASSERT(m); - int index; - - if (!m->pPlaylist->FlagCreate()) - return false; - - if (!m->pPlaylist->GetCurSongIndex(&index)) { - _ERR(" playlist get current song index failed"); - return false; - } - - if (!m->pPlaylist->GetSonginfoFromIndex(index, sinfo)) { - _ERR(" playlist get current song info failed"); - return false; - } - - return true; + return m->ref.GetCurrentSong(sinfo); } bool CMusicController::UpdatePlaylist(Eina_List *slist, int addmode) { ASSERT(m); - ASSERT(slist); - if (m->pPlaylist->FlagCreate()) - m->pPlaylist->Update(slist, addmode); - else { - if (!m->pPlaylist->Create(slist)) - _ERR(" playlist create failed "); - } - return true; + return m->ref.UpdatePlaylist(slist, addmode); } @@ -584,12 +168,7 @@ bool CMusicController::EmptyPlaylist(void) { ASSERT(m); - if (!m->pPlaylist->FlagCreate()) - return false; - - m->pPlaylist->Destroy(); - - return true; + return m->ref.EmptyPlaylist(); } @@ -597,7 +176,7 @@ bool CMusicController::PlayPreviousSong(void) { ASSERT(m); - return t_PlayNext(DIR_PREVIOUS, E_BUTTON_CLICK); + return m->ref.PlayPreviousSong(); } @@ -605,7 +184,7 @@ bool CMusicController::PlayNextSong(void) { ASSERT(m); - return t_PlayNext(DIR_NEXT, E_BUTTON_CLICK); + return m->ref.PlayNextSong(); } @@ -613,46 +192,15 @@ bool CMusicController::PlayIndexSong(int index) { ASSERT(m); - if (!m->pPlaylist->FlagCreate()) - return false; - - Stop(); - - if (!m->pPlaylist->SetCurSongIndex(index)) - return false; - - Start(); - - m->initial_index = index; - - return true; + return m->ref.PlayIndexSong(index); } bool CMusicController::RemoveSong(CSongInfo *sinfo, int index) { ASSERT(m); - ASSERT(sinfo); - int ind; - - if (!m->pPlaylist->FlagCreate()) - return false; - - if (!GetCurrentSongIndex(&ind)) { - _ERR("unable to find current song index"); - return false; - } - - if (!m->pPlaylist->RemoveSong(sinfo, index, m->stateShuffle)) { - _ERR("Song can not be deleted"); - return false; - } - - if (ind != 0 && ind == index) - Stop(); - - return true; + return m->ref.RemoveSong(sinfo, index); } @@ -660,34 +208,23 @@ bool CMusicController::MediaGetList(int EListType, void *info, Eina_List **list) { ASSERT(m); - Eina_List *mlist; - - mlist = m->pMediadata->Medialist(CInfo::SourceType(), EListType, info); - if (!mlist) - return false; - - *list = eina_list_clone(mlist); - - return true; + return m->ref.MediaGetList(EListType, info, list); } bool CMusicController::MediaInsertPlaylist(const char *name, Eina_List *idlist) { ASSERT(m); - ASSERT(name); - ASSERT(idlist); - return m->pMediadata->Alloc(name, idlist); + return m->ref.MediaInsertPlaylist(name, idlist); } bool CMusicController::MediaExistPlaylist(const char *name) { ASSERT(m); - ASSERT(name); - return m->pMediadata->ExistPlaylist(name); + return m->ref.MediaExistPlaylist(name); } @@ -695,76 +232,47 @@ bool CMusicController::MediaDeletePlaylist(int id) { ASSERT(m); - return m->pMediadata->Delete(id); + return m->ref.MediaDeletePlaylist(id); } bool CMusicController::MediaRenamePlaylist(int id, const char *name) { ASSERT(m); - ASSERT(name); - return m->pMediadata->Rename(id, name); + return m->ref.MediaRenamePlaylist(id, name); } bool CMusicController::MediaAddmediaPlaylist(int id, Eina_List *idlist) { ASSERT(m); - ASSERT(idlist); - return m->pMediadata->Insert(id, idlist); + return m->ref.MediaAddmediaPlaylist(id, idlist); } bool CMusicController::MediaRemovemediaPlaylist(int id, Eina_List *idlist) { ASSERT(m); - ASSERT(idlist); - return m->pMediadata->Remove(id, idlist); + return m->ref.MediaRemovemediaPlaylist(id, idlist); } bool CMusicController::MediaAddsongsPlaylist(int lid, Eina_List *list) { ASSERT(m); - ASSERT(list); - - Eina_List *idlist, *l; - CSongInfo *sinfo; - void *obj; - char *id; - - idlist = NULL; - EINA_LIST_FOREACH(list, l, obj) { - sinfo = (CSongInfo *)obj; - id = sinfo->Id(); - if (id) - idlist = eina_list_append(idlist, id); - } - - if (!MediaAddmediaPlaylist(lid, idlist)) { - _ERR(" Failed to add songs to playlist "); - return false; - } - return true; + return m->ref.MediaAddsongsPlaylist(lid, list); } CSongInfo *CMusicController::MediaSongByUri(char *uri) { ASSERT(m); - ASSERT(uri); - - CSongInfo *sinfo; - - sinfo = m->pMediadata->SongByUri(uri); - if (!sinfo) - return NULL; - return sinfo; + return m->ref.MediaSongByUri(uri); } @@ -772,9 +280,7 @@ bool CMusicController::SetPlayState(EPlayStatus state) { ASSERT(m); - m->statePlay = state; - - return true; + return m->ref.SetPlayState(state); } @@ -782,7 +288,7 @@ EPlayStatus CMusicController::PlayState(void) { ASSERT(m); - return m->statePlay; + return m->ref.PlayState(); } @@ -790,11 +296,7 @@ bool CMusicController::SetShuffleState(EShuffleStatus state) { ASSERT(m); - m->stateShuffle = state; - if (state && m->pPlaylist->FlagCreate()) - m->pPlaylist->UpdateShuffle(); - - return true; + return m->ref.SetShuffleState(state); } @@ -802,7 +304,7 @@ EShuffleStatus CMusicController::ShuffleState(void) { ASSERT(m); - return m->stateShuffle; + return m->ref.ShuffleState(); } @@ -810,9 +312,7 @@ bool CMusicController::SetRepeatState(ERepeatStatus state) { ASSERT(m); - m->repeatstate = state; - - return true; + return m->ref.SetRepeatState(state); } @@ -820,43 +320,8 @@ ERepeatStatus CMusicController::RepeatState(void) { ASSERT(m); - return m->repeatstate; + return m->ref.RepeatState(); } -void CMusicController::OnStatusChanged(SUsbHostDeviceInfo *changedDevice, - SUsbHostDeviceStatus status) -{ - if (!m) - return; - - Eina_List *l; - IMusicControllerListener *mcListener = NULL;; - void *obj; - - if (status == USB_HOST_DEV_CONNECTED) { - if (CInfo::SourceType() == SOURCE_TYPE_USB) { - if (!FlagConnected()) - CInfo::SetSourceType(SOURCE_TYPE_ALL); - } - EINA_LIST_FOREACH(m->elListener, l, obj) { - mcListener = (IMusicControllerListener *)obj; - if (mcListener) - mcListener->s_CbUsbStatusChagned(mcListener, - IMusicControllerListener::USB_STORAGE_CONNECTED); - } - } - else { - if (CInfo::SourceType() == SOURCE_TYPE_USB) { - CInfo::SetSourceType(SOURCE_TYPE_ALL); - } - - EINA_LIST_FOREACH(m->elListener, l, obj) { - mcListener = (IMusicControllerListener *)obj; - if (mcListener) - mcListener->s_CbUsbStatusChagned(mcListener, - IMusicControllerListener::USB_STORAGE_DISCONNECTED); - } - } -} \ No newline at end of file diff --git a/src/playback/playback-mgr.cpp b/src/playback/playback-mgr.cpp index 3906bf3..2ab23fb 100644 --- a/src/playback/playback-mgr.cpp +++ b/src/playback/playback-mgr.cpp @@ -23,6 +23,7 @@ struct SPlayback { player_h player; + ICompleteListener *listener; }; @@ -31,6 +32,14 @@ void _on_seek_completion(void *dt) } +void CPlayback::sm_CbComplete(void *cookie) +{ + CPlayback *root = (CPlayback*)cookie; + if (root) + root->m->listener->t_OnPlayComplete(); +} + + bool CPlayback::Create(void) { ASSERT(!m); @@ -49,6 +58,8 @@ bool CPlayback::Create(void) return false; } + m->listener = NULL; + return true; } @@ -109,12 +120,13 @@ bool CPlayback::Stop(void) } -bool CPlayback::SetCallback(player_completed_cb on_playback_completion, void *data) +bool CPlayback::SetCallback(ICompleteListener *listener)//player_completed_cb on_playback_completion, void *data) { ASSERT(m); ASSERT(m->player); - int r = player_set_completed_cb(m->player, on_playback_completion, data); + m->listener = listener; + int r = player_set_completed_cb(m->player, sm_CbComplete, this);// on_playback_completion, data); if (r != PLAYER_ERROR_NONE) { _ERR("Player set completed callaback failed"); return false; @@ -129,6 +141,7 @@ bool CPlayback::UnsetCallback(void) ASSERT(m); ASSERT(m->player); + m->listener = NULL; int r = player_unset_completed_cb(m->player); if (r != PLAYER_ERROR_NONE) { _ERR("Player unset completed cb failed"); diff --git a/src/views/PlayListCtxPopup.cpp b/src/views/PlayListCtxPopup.cpp index be995e1..07f9b5a 100644 --- a/src/views/PlayListCtxPopup.cpp +++ b/src/views/PlayListCtxPopup.cpp @@ -120,18 +120,18 @@ void CPlayListCtxPopup::m_DeleteBtnString(void) bool CPlayListCtxPopup::Create(Evas_Object* base, const SCallback* callback, Eina_List *playList) { - Eina_List *l = NULL; - SCtxtPlaylistItem *item = NULL; + //Eina_List *l = NULL; + //SCtxtPlaylistItem *item = NULL; _CREATE_BEGIN{ _CHECK(m = new SPlayListCtxPopup) _CHECK(m->listSize = eina_list_count(playList)) _CHECK(m->settingTexts = new char*[m->listSize]) - _COMMAND{ memset(m->settingTexts, NULL, m->listSize * sizeof(char*)); } + _COMMAND{ memset(m->settingTexts, 0, m->listSize * sizeof(char*)); } _CHECK(m->btnIds = new char*[m->listSize]) - _COMMAND{ memset(m->btnIds, NULL, m->listSize * sizeof(char*)); } + _COMMAND{ memset(m->btnIds, 0, m->listSize * sizeof(char*)); } _CHECK(m->dbIds = new int[m->listSize]) - _COMMAND{ memset(m->dbIds, NULL, m->listSize * sizeof(int)); } + _COMMAND{ memset(m->dbIds, 0, m->listSize * sizeof(int)); } _CHECK(m_SetBtnString(playList)) _CHECK(CCtxPopup::Create(base, callback, true)) diff --git a/src/views/album-layout.cpp b/src/views/album-layout.cpp index caa87aa..e12f4b5 100644 --- a/src/views/album-layout.cpp +++ b/src/views/album-layout.cpp @@ -66,7 +66,7 @@ struct SAlbumLayout { Eina_List *alblist; Eina_List *it_infolist; Elm_Gengrid_Item_Class *item_class; - CMusicController *mhandle; + CMusicController *pController; CLayoutMgr *lmgr; CViewMgr *vmgr; SContentInfo *ctxtinfo; @@ -189,7 +189,7 @@ void CAlbumLayout::m_OnCtxtUpdate(EActionType type, int lid) if (!m->ctxtinfo || !m->ctxtinfo->context) return; - m->mhandle->MediaGetList(LIST_TYPE_ALBUM_SONG, + m->pController->MediaGetList(LIST_TYPE_ALBUM_SONG, m->ctxtinfo->context, &list); switch (type) { @@ -206,7 +206,7 @@ void CAlbumLayout::m_OnCtxtUpdate(EActionType type, int lid) break; case ACTION_TYPE_ADDTO: - if (m->mhandle->MediaAddsongsPlaylist(lid, list)) + if (m->pController->MediaAddsongsPlaylist(lid, list)) CCommonUI::CreateMsgBox(m->base, MUSIC_TEXT_ADDTO_MSG); else _ERR(" Adding songs to playlist failed "); @@ -218,13 +218,13 @@ void CAlbumLayout::m_OnCtxtUpdate(EActionType type, int lid) break; } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); sinfo = (CSongInfo *)eina_list_data_get(list); eina_list_free(list); if (type == ACTION_TYPE_PLAY) { - m->mhandle->Stop(); - m->mhandle->SetCurrentSong(sinfo->Id()); + m->pController->Stop(); + m->pController->SetCurrentSong(sinfo->Id()); } CCommonUI::UpdatePlaybackView(mode, Layout(), m->focusedItem); @@ -417,7 +417,7 @@ void CAlbumLayout::m_UpdateAlbumGrid(bool sort_flag) m_EmptyAlbumGrid(sort_flag); if (!sort_flag) { - r = m->mhandle->MediaGetList(LIST_TYPE_ALBUM, NULL, &(m->alblist)); + r = m->pController->MediaGetList(LIST_TYPE_ALBUM, NULL, &(m->alblist)); if (r == false || eina_list_count(m->alblist) == 0) { _ERR(" Fetching album list from media failed "); @@ -452,23 +452,20 @@ bool CAlbumLayout::Create(CLayoutMgr *mgr, const char *albumId) ASSERT(mgr); _CREATE_BEGIN{ - Evas_Object *base = NULL; - Evas_Object *win = NULL; Evas_Object *layout = NULL; - CMusicController *mhandle = NULL; - CViewMgr *vmgr = NULL; CAlbumSongsLayout *layoutAlbumSongs = NULL; SParcel parcel; _CHECK(m = new SAlbumLayout) - _CHECK(vmgr = CViewMgr::GetInstance()) - _CHECK(base = mgr->Base()) - _CHECK(win = vmgr->Window()) - _CHECK(mhandle = CMusicController::GetInstance()) - _CHECK(layout = CCommonUI::AddBase(base, MUSIC_ALBUM_LAYOUT)) + _CHECK(m->vmgr = CViewMgr::GetInstance()) + _CHECK(m->base = mgr->Base()) + _CHECK(m->win = m->vmgr->Window()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) + _CHECK(layout = CCommonUI::AddBase(m->base, MUSIC_ALBUM_LAYOUT)) _CHECK(CExtBaseLayout::Create(layout)) - _CHECK(layoutAlbumSongs = new CAlbumSongsLayout(MUSIC_ALBUM_SONGS_LAYOUT)) - _CHECK(layoutAlbumSongs->Create(mgr)) + _CHECK(m->layoutAlbumSongs = new CAlbumSongsLayout(MUSIC_ALBUM_SONGS_LAYOUT)) + _CHECK(m->layoutAlbumSongs->Create(mgr)) _CHECK(mgr->AddLayout(layoutAlbumSongs)) _WHEN_SUCCESS{ @@ -479,14 +476,9 @@ bool CAlbumLayout::Create(CLayoutMgr *mgr, const char *albumId) else m->album_id = NULL; - m->win = win; - m->base = base; - m->vmgr = vmgr; - m->mhandle = mhandle; m->lmgr = mgr; m->callback.cbHandleEmptyStatus = NULL; m->callback.cookie = NULL; - m->layoutAlbumSongs = layoutAlbumSongs; m_CreateAlbumGrid(); Connect(layout, ALBUM_LAYOUT, TYPE_KEY_DOWN); @@ -503,10 +495,11 @@ bool CAlbumLayout::Create(CLayoutMgr *mgr, const char *albumId) _CHECK_FAIL{ delete m->layoutAlbumSongs; } _CHECK_FAIL{ CExtBaseLayout::Destroy(); } _CHECK_FAIL{ evas_object_del(layout); } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /* Window */ } + _CHECK_FAIL{ /* Base() */ } + _CHECK_FAIL{ /* GetInstance() */} _CHECK_FAIL{ delete m; m = NULL; } } _CREATE_END_AND_CATCH{ return false; } @@ -529,6 +522,9 @@ void CAlbumLayout::Destroy(void) free(m->ctxtinfo); delete[] m->album_id; + + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } diff --git a/src/views/album-songs-layout.cpp b/src/views/album-songs-layout.cpp index 21ff64f..a4b4f5a 100644 --- a/src/views/album-songs-layout.cpp +++ b/src/views/album-songs-layout.cpp @@ -65,7 +65,7 @@ struct SAlbumSongsLayout { Evas_Object *albumCover; Elm_Object_Item *focused_item; - CMusicController* mhandle; + CMusicController* pController; CLayoutMgr *mgr; CViewMgr *vmgr; CAlbumInfo *alinfo; @@ -173,7 +173,7 @@ void CAlbumSongsLayout::m_OnCtxtUpdate(EActionType type, int lid) break; case ACTION_TYPE_ADDTO: - if (m->mhandle->MediaAddsongsPlaylist(lid, list)) + if (m->pController->MediaAddsongsPlaylist(lid, list)) CCommonUI::CreateMsgBox(m->base, MUSIC_TEXT_ADDTO_MSG); else _ERR(" Adding songs to playlist failed "); @@ -185,12 +185,12 @@ void CAlbumSongsLayout::m_OnCtxtUpdate(EActionType type, int lid) break; } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); eina_list_free(list); if (type == ACTION_TYPE_PLAY) { - m->mhandle->Stop(); - m->mhandle->SetCurrentSong(((CSongInfo *)m->ctxtinfo->context)->Id()); + m->pController->Stop(); + m->pController->SetCurrentSong(((CSongInfo *)m->ctxtinfo->context)->Id()); } CCommonUI::UpdatePlaybackView(mode, Layout(), m->focused_item); @@ -296,7 +296,7 @@ void CAlbumSongsLayout::m_UpdateSongList(void) /* Remove existing songlist and prepare afresh */ m_EmptySongList(); - if (!m->mhandle->MediaGetList(LIST_TYPE_ALBUM_SONG, m->alinfo, &(m->slist))) { + if (!m->pController->MediaGetList(LIST_TYPE_ALBUM_SONG, m->alinfo, &(m->slist))) { _ERR(" Fetching song list from media failed "); return; } @@ -374,13 +374,13 @@ void CAlbumSongsLayout::m_GotoPlayback(int mode, char *id) list = eina_list_append(list, itinfo->sinfo); } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); eina_list_free(list); if (mode == ADD_TYPE_FRESH) { - m->mhandle->Stop(); + m->pController->Stop(); if (id) /* If want to play selected song */ - m->mhandle->SetCurrentSong(id); + m->pController->SetCurrentSong(id); } CCommonUI::UpdatePlaybackView((EAddType)mode, Layout(), NULL); @@ -531,41 +531,33 @@ bool CAlbumSongsLayout::Create(CLayoutMgr *mgr) ASSERT(mgr); _CREATE_BEGIN{ - Evas_Object *base = NULL; - Evas_Object *win = NULL; Evas_Object *layout = NULL; - CMusicController *mhandle = NULL; - CViewMgr *vmgr = NULL; - CAlbumInfo *alinfo = NULL; _CHECK(m = new SAlbumSongsLayout) - _CHECK(vmgr = CViewMgr::GetInstance()) - _CHECK(base = mgr->Base()) - _CHECK(win = vmgr->Window()) - _CHECK(mhandle = CMusicController::GetInstance()) - _CHECK(layout = CCommonUI::AddBase(base, MUSIC_ALBUM_SONGS_LAYOUT)) + _CHECK(m->vmgr = CViewMgr::GetInstance()) + _CHECK(m->base = mgr->Base()) + _CHECK(m->win = m->vmgr->Window()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) + _CHECK(layout = CCommonUI::AddBase(m->base, MUSIC_ALBUM_SONGS_LAYOUT)) _CHECK(CExtBaseLayout::Create(layout)) - _CHECK(alinfo = new CAlbumInfo) + _CHECK(m->alinfo = new CAlbumInfo) _WHEN_SUCCESS{ - m->win = win; - m->base = base; - m->vmgr = vmgr; - m->mhandle = mhandle; m->mgr = mgr; - m->alinfo = alinfo; Connect(layout, ALBUM_SONGS_LAYOUT, TYPE_KEY_DOWN); SetCurrentAlbum(NULL); } - _CHECK_FAIL{ delete alinfo; } + _CHECK_FAIL{ delete m->alinfo; } _CHECK_FAIL{ CExtBaseLayout::Destroy(); } _CHECK_FAIL{ evas_object_del(layout); } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /* Window */ } + _CHECK_FAIL{ /* Base() */ } + _CHECK_FAIL{ /* GetInstance */} _CHECK_FAIL{ delete m; m = NULL; } } _CREATE_END_AND_CATCH{ return false; } @@ -587,6 +579,9 @@ void CAlbumSongsLayout::Destroy(void) evas_object_del(Layout()); free(m->ctxtinfo); + + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } diff --git a/src/views/artist-layout.cpp b/src/views/artist-layout.cpp index dc2563f..a32d7d5 100644 --- a/src/views/artist-layout.cpp +++ b/src/views/artist-layout.cpp @@ -84,5 +84,9 @@ void CArtistLayout::t_HandleItemSelect(SCatItemInfo *itinfo) bool CArtistLayout::t_GetMediaList(Eina_List **list) { - return CMusicController::GetInstance()->MediaGetList(LIST_TYPE_ARTIST, NULL, list); + CMusicController mc; + mc.Create(); + bool ret = mc.MediaGetList(LIST_TYPE_ARTIST, NULL, list); + mc.Destroy(); + return ret; } diff --git a/src/views/base-view.cpp b/src/views/base-view.cpp index ff8cea2..9675994 100644 --- a/src/views/base-view.cpp +++ b/src/views/base-view.cpp @@ -153,17 +153,17 @@ struct SMusicBaseView { Evas_Object *popup; Elm_Transit *transit; Evas_Object *c_grpbtn; - CMusicController *mhandle; + CMusicController *pController; CLayoutMgr *lmgr; SArgList *arglist; int btntype; bool fresh_view; bool srcBtnFocusedBySecondBtn; - CSongLayout *layoutSong; - CAlbumLayout *layoutAlbum; + CSongLayout *layoutSong; + CAlbumLayout *layoutAlbum; CArtistLayout *layoutArtist; - CGenreLayout *layoutGenre; + CGenreLayout *layoutGenre; CPlaylistLayout *layoutPlaylists; CFolderLayout *layoutFolder; @@ -528,11 +528,11 @@ void CMusicBaseView::m_UpdatePlaysongLabel(void) char buf[MAX_LENGTH]; int state; - state = m->mhandle->PlayState(); + state = m->pController->PlayState(); if (state != PLAY_STATUS_INITIAL && state != PLAY_STATUS_STOP) { - if (!m->mhandle->GetCurrentSong(&sinfo)) { + if (!m->pController->GetCurrentSong(&sinfo)) { _ERR(" failed to find song info "); return; } @@ -696,7 +696,7 @@ void CMusicBaseView::m_CreateFullView(void) void CMusicBaseView::m_SetSourceType(void) { - if (!m->arglist || !m->arglist->source || !m->mhandle) + if (!m->arglist || !m->arglist->source || !m->pController) return; if (!strcmp(g_sourceArg[SOURCE_TYPE_USB], m->arglist->source)) @@ -735,7 +735,7 @@ bool CMusicBaseView::Create(void *data) _CREATE_BEGIN{ Evas_Object *win = NULL; Evas_Object *base = NULL; - CMusicController *mhandle = NULL; + CMusicController *pController = NULL; CLayoutMgr *lmgr = NULL; CSongLayout *layoutSong = NULL; CAlbumLayout *layoutAlbum = NULL; @@ -747,7 +747,8 @@ bool CMusicBaseView::Create(void *data) _CHECK(m = new SMusicBaseView) _CHECK(win = CViewMgr::GetInstance()->Window()) - _CHECK(mhandle = CMusicController::GetInstance()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) _CHECK(base = CCommonUI::AddBase(win, MUSIC_BASE_VIEW)) _CHECK(lmgr = new CLayoutMgr) _CHECK(lmgr->Create(base, NULL)) @@ -772,12 +773,12 @@ bool CMusicBaseView::Create(void *data) _CHECK(lmgr->AddLayout(layoutFolder)) _CHECK(handleVolume = new CHandleVolume) _CHECK(handleVolume->Create(base)) - _CHECK(mhandle->AddListener(this)) + _CHECK(pController->AddListener(this)) _WHEN_SUCCESS{ m->base = base; m->win = win; - m->mhandle = mhandle; + m->pController = pController; m->lmgr = lmgr; m->fresh_view = true; m->arglist = (SArgList *)data; @@ -806,7 +807,7 @@ bool CMusicBaseView::Create(void *data) Connect(m->base, BASE_VIEW, TYPE_KEY_DOWN | TYPE_KEY_UP); } - _CHECK_FAIL{ m->mhandle->RemoveListener(this); } + _CHECK_FAIL{ m->pController->RemoveListener(this); } _CHECK_FAIL{ handleVolume->Destroy(); } _CHECK_FAIL{ delete handleVolume; } _CHECK_FAIL{ lmgr->RemoveLayout(layoutFolder); } @@ -831,8 +832,9 @@ bool CMusicBaseView::Create(void *data) _CHECK_FAIL{ lmgr->Destroy(); } _CHECK_FAIL{ delete lmgr; } _CHECK_FAIL{ evas_object_del(m->base); } - _CHECK_FAIL{} - _CHECK_FAIL{} + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /* win */ } _CHECK_FAIL{ delete m; m = NULL; } } _CREATE_END_AND_CATCH{ return false; } @@ -844,7 +846,7 @@ void CMusicBaseView::Destroy(void) { ASSERT(m); - m->mhandle->RemoveListener(this); + m->pController->RemoveListener(this); m->pHandleVolume->Destroy(); m->lmgr->RemoveLayout(m->layoutFolder); @@ -876,6 +878,8 @@ void CMusicBaseView::Destroy(void) delete m->lmgr; evas_object_del(m->base); + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } @@ -1005,7 +1009,7 @@ void CMusicBaseView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key switch (id) { case BASE_VIEW: if (!strcmp(ev->keyname, KEY_EXIT)) { - m->mhandle->Stop(); + m->pController->Stop(); elm_exit(); } else if (!strcmp(ev->keyname, KEY_ENTER) || @@ -1070,7 +1074,7 @@ void CMusicBaseView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key case BASE_VIEW_GROUP_PLAYLIST: if (!strcmp(ev->keyname, KEY_BACK) || !strcmp(ev->keyname, KEY_BACK_REMOTE)) { - m->mhandle->Stop(); + m->pController->Stop(); elm_exit(); } break; @@ -1133,7 +1137,7 @@ void CMusicBaseView::OnMouseClicked(int id, Evas_Object *obj) bool r; int state; - state = m->mhandle->PlayState(); + state = m->pController->PlayState(); if (state != PLAY_STATUS_INITIAL) { t_OnHide(); @@ -1147,14 +1151,14 @@ void CMusicBaseView::OnMouseClicked(int id, Evas_Object *obj) return; } - r = m->mhandle->MediaGetList(LIST_TYPE_SONG, NULL, &list); + r = m->pController->MediaGetList(LIST_TYPE_SONG, NULL, &list); if (r == false || eina_list_count(list) == 0) { _ERR(" No songs "); return; } - m->mhandle->Stop(); - m->mhandle->UpdatePlaylist(list, ADD_TYPE_FRESH); + m->pController->Stop(); + m->pController->UpdatePlaylist(list, ADD_TYPE_FRESH); eina_list_free(list); m_GotoPlayback(); diff --git a/src/views/category-layout.cpp b/src/views/category-layout.cpp index 57857d1..b70ee58 100644 --- a/src/views/category-layout.cpp +++ b/src/views/category-layout.cpp @@ -93,7 +93,7 @@ struct SCategoryLayout { Eina_List *songlist; Eina_List *it_infolist; Ecore_Idler *focusIdler; - CMusicController *pMusicController; + CMusicController *pController; CLayoutMgr *lmgr; CViewMgr *vmgr; CSongInfo *c_sinfo; @@ -196,13 +196,13 @@ void CCategoryLayout::m_OnEntrynameSet(const char *name) return; } - if (m->pMusicController->MediaExistPlaylist(str)) { + if (m->pController->MediaExistPlaylist(str)) { CCommonUI::CreateMsgBox(Layout(), MUSIC_TEXT_INUSE_MSG); free(str); return; } - if (!m->pMusicController->MediaInsertPlaylist(str, idlist)) { + if (!m->pController->MediaInsertPlaylist(str, idlist)) { _ERR("Playlist creation failed "); free(str); return; @@ -242,7 +242,7 @@ void CCategoryLayout::t_OnCtxtUpdate(enum EActionType type, int lid) return; if (t.depth == E_DEPTH_ALBUM) { - m->pMusicController->MediaGetList(LIST_TYPE_ALBUM_SONG, + m->pController->MediaGetList(LIST_TYPE_ALBUM_SONG, t.ctxtinfo->context, &list); sinfo = (CSongInfo *)eina_list_data_get(list); } @@ -251,7 +251,7 @@ void CCategoryLayout::t_OnCtxtUpdate(enum EActionType type, int lid) EINA_LIST_FOREACH(alist, l, obj) { alinfo = (CAlbumInfo *)obj; slist = NULL; - if (!m->pMusicController->MediaGetList(LIST_TYPE_ALBUM_SONG, (void *)alinfo, &slist)) { + if (!m->pController->MediaGetList(LIST_TYPE_ALBUM_SONG, (void *)alinfo, &slist)) { _ERR(" Failed to get album songlist "); continue; } @@ -282,7 +282,7 @@ void CCategoryLayout::t_OnCtxtUpdate(enum EActionType type, int lid) case ACTION_TYPE_ADDTO: { - if (m->pMusicController->MediaAddsongsPlaylist(lid, list)) + if (m->pController->MediaAddsongsPlaylist(lid, list)) CCommonUI::CreateMsgBox(t.base, MUSIC_TEXT_ADDTO_MSG); else _ERR(" Adding songs to playlist failed "); @@ -303,10 +303,10 @@ void CCategoryLayout::t_OnCtxtUpdate(enum EActionType type, int lid) break; } - m->pMusicController->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); if (type == ACTION_TYPE_PLAY) { - m->pMusicController->Stop(); - m->pMusicController->SetCurrentSong(sinfo->Id()); + m->pController->Stop(); + m->pController->SetCurrentSong(sinfo->Id()); } if (t.depth == E_DEPTH_CATEGORY) { @@ -632,9 +632,9 @@ void CCategoryLayout::m_GotoPlayback(int mode, char *id) return; if (mode == ADD_TYPE_FRESH) { - m->pMusicController->Stop(); + m->pController->Stop(); if (id) /* If want to play selected song */ - m->pMusicController->SetCurrentSong(id); + m->pController->SetCurrentSong(id); } CCommonUI::UpdatePlaybackView((EAddType)mode, Layout(), NULL); @@ -682,13 +682,13 @@ void CCategoryLayout::m_AddAlbumsToPlayback(int mode) SCatItemInfo *itinfo = NULL; void *obj = NULL; Eina_List *infolist = m->it_infolist; - CMusicController *pMusicController = m->pMusicController; + CMusicController *pController = m->pController; list = NULL; EINA_LIST_FOREACH(infolist, l, obj) { itinfo = (SCatItemInfo *)obj; slist = NULL; - if (!pMusicController->MediaGetList(LIST_TYPE_ALBUM_SONG, itinfo->alinfo, &slist)) { + if (!pController->MediaGetList(LIST_TYPE_ALBUM_SONG, itinfo->alinfo, &slist)) { _ERR(" Failed to get album songlist "); continue; } @@ -704,7 +704,7 @@ void CCategoryLayout::m_AddAlbumsToPlayback(int mode) eina_list_free(slist); } - pMusicController->UpdatePlaylist(list, mode); + pController->UpdatePlaylist(list, mode); EINA_LIST_FREE(list, obj) { sinfo = (CSongInfo *)obj; sinfo->Destroy(); @@ -720,7 +720,7 @@ void CCategoryLayout::m_AddSongsToPlayback(int mode) struct SCatItemInfo *itinfo = NULL; void *obj = NULL; Eina_List *infolist = m->it_infolist; - CMusicController *pMusicController = m->pMusicController; + CMusicController *pController = m->pController; list = NULL; EINA_LIST_FOREACH(infolist, l, obj) { @@ -728,7 +728,7 @@ void CCategoryLayout::m_AddSongsToPlayback(int mode) list = eina_list_append(list, itinfo->sinfo); } - pMusicController->UpdatePlaylist(list, mode); + pController->UpdatePlaylist(list, mode); eina_list_free(list); } @@ -1137,60 +1137,51 @@ bool CCategoryLayout::Create(CLayoutMgr *mgr) ASSERT(!m); ASSERT(mgr); + memset(&t, 0, sizeof(SCategoryLayoutProtected)); + _CREATE_BEGIN{ - Evas_Object *base = NULL; - Evas_Object *win = NULL; Evas_Object *layout = NULL; - CMusicController *pMusicController = NULL; - CViewMgr *vmgr = NULL; CEntryPopup *popup = NULL; - CCategorySongsLayout *layoutCatSongs = NULL; - const char *catSongLayoutId = NULL; _CHECK(m = new SCategoryLayout) - _CHECK(vmgr = CViewMgr::GetInstance()) - _CHECK(base = mgr->Base()) - _CHECK(win = vmgr->Window()) - _CHECK(pMusicController = CMusicController::GetInstance()) - _CHECK(layout = elm_layout_add(base)) + _CHECK(m->vmgr = CViewMgr::GetInstance()) + _CHECK(t.base = mgr->Base()) + _CHECK(m->win = m->vmgr->Window()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) + _CHECK(layout = elm_layout_add(t.base)) _CHECK(CExtBaseLayout::Create(layout)) _CHECK(popup = new CEntryPopup) - _CHECK(catSongLayoutId = m_CategorySongLayoutId()) - _CHECK(layoutCatSongs = new CCategorySongsLayout(catSongLayoutId)) - _CHECK(layoutCatSongs->Create(mgr, this)) - _CHECK(mgr->AddLayout(layoutCatSongs)) + _CHECK(m->catSongLayoutId = m_CategorySongLayoutId()) + _CHECK(m->layoutCatSongs = new CCategorySongsLayout(m->catSongLayoutId)) + _CHECK(m->layoutCatSongs->Create(mgr, this)) + _CHECK(mgr->AddLayout(m->layoutCatSongs)) _WHEN_SUCCESS{ - memset(&t, 0, sizeof(SCategoryLayoutProtected)); - m->win = win; - t.base = base; - m->vmgr = vmgr; - m->pMusicController = pMusicController; m->lmgr = mgr; t.depth = E_DEPTH_CATEGORY; m->callback.cbHandleEmptyStatus = NULL; m->callback.cookie = NULL; t.epopup = popup; - m->catSongLayoutId = catSongLayoutId; - m->layoutCatSongs = layoutCatSongs; t_UpdateLayout(false); Connect(Layout(), CATEGORY_LAYOUT, TYPE_KEY_DOWN); } - _CHECK_FAIL{ mgr->RemoveLayout(layoutCatSongs); } + _CHECK_FAIL{ mgr->RemoveLayout(m->layoutCatSongs); } _CHECK_FAIL{ m->layoutCatSongs->Destroy(); } - _CHECK_FAIL{ delete layoutCatSongs; } + _CHECK_FAIL{ delete m->layoutCatSongs; } _CHECK_FAIL{} _CHECK_FAIL{ delete popup; } _CHECK_FAIL{ CExtBaseLayout::Destroy(); } _CHECK_FAIL{ evas_object_del(layout); } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /* Window */ } + _CHECK_FAIL{ /* Base */ } + _CHECK_FAIL{ /* GetInsteance */ } _CHECK_FAIL{ delete m; m = NULL; } } _CREATE_END_AND_CATCH{ return false; } @@ -1227,6 +1218,8 @@ void CCategoryLayout::Destroy(void) evas_object_del(Layout()); free(t.ctxtinfo); + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } diff --git a/src/views/category-songs-layout.cpp b/src/views/category-songs-layout.cpp index 87b0531..e4aa7a6 100644 --- a/src/views/category-songs-layout.cpp +++ b/src/views/category-songs-layout.cpp @@ -85,7 +85,7 @@ struct SCategorySongsLayout { Evas_Object *albumCover; Ecore_Idler *focusIdler; - CMusicController* mhandle; + CMusicController* pController; CLayoutMgr *mgr; CViewMgr *vmgr; SContentInfo *ctxtinfo; @@ -272,7 +272,7 @@ void CCategorySongsLayout::m_OnCtxtUpdate(EActionType type, int lid) break; case ACTION_TYPE_ADDTO: - if (m->mhandle->MediaAddsongsPlaylist(lid, list)) + if (m->pController->MediaAddsongsPlaylist(lid, list)) CCommonUI::CreateMsgBox(m->base, MUSIC_TEXT_ADDTO_MSG); else _ERR(" Adding songs to playlist failed "); @@ -284,12 +284,12 @@ void CCategorySongsLayout::m_OnCtxtUpdate(EActionType type, int lid) break; } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); eina_list_free(list); if (type == ACTION_TYPE_PLAY) { - m->mhandle->Stop(); - m->mhandle->SetCurrentSong(((CSongInfo *)m->ctxtinfo->context)->Id()); + m->pController->Stop(); + m->pController->SetCurrentSong(((CSongInfo *)m->ctxtinfo->context)->Id()); } CCommonUI::UpdatePlaybackView(mode, Layout(), m->focused_item); @@ -392,16 +392,16 @@ void CCategorySongsLayout::m_UpdateSongList(void) // event handling will be done in OnActivated function item_select_fn = NULL; if (m->selectType == SELECT_TYPE_REMOVE) - m->mhandle->MediaGetList(LIST_TYPE_PLAYLISTS_SONG, m->catInfo, &(m->slist)); + m->pController->MediaGetList(LIST_TYPE_PLAYLISTS_SONG, m->catInfo, &(m->slist)); else - m->mhandle->MediaGetList(LIST_TYPE_SONG, NULL, &(m->slist)); + m->pController->MediaGetList(LIST_TYPE_SONG, NULL, &(m->slist)); } else { item_select_fn = sm_CbSongItemSelect; if (m->depth == DEPTH_SHOW_LIST) - m->mhandle->MediaGetList(LIST_TYPE_PLAYLISTS_SONG, m->catInfo, &(m->slist)); + m->pController->MediaGetList(LIST_TYPE_PLAYLISTS_SONG, m->catInfo, &(m->slist)); else - m->mhandle->MediaGetList(LIST_TYPE_ALBUM_SONG, m->albumInfo, &(m->slist)); + m->pController->MediaGetList(LIST_TYPE_ALBUM_SONG, m->albumInfo, &(m->slist)); } EINA_LIST_FOREACH(m->slist, l, obj) { @@ -481,13 +481,13 @@ void CCategorySongsLayout::m_GotoPlayback(int mode, char *id) list = eina_list_append(list, itinfo->sinfo); } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); eina_list_free(list); if (mode == ADD_TYPE_FRESH) { - m->mhandle->Stop(); + m->pController->Stop(); if (id) /* If want to play selected song */ - m->mhandle->SetCurrentSong(id); + m->pController->SetCurrentSong(id); } CCommonUI::UpdatePlaybackView((EAddType)mode, Layout(), NULL); @@ -769,7 +769,7 @@ void CCategorySongsLayout::m_AddSelectedSongs(void) if (!lid || !idlist) return; - if (!m->mhandle->MediaAddmediaPlaylist(lid, idlist)) { + if (!m->pController->MediaAddmediaPlaylist(lid, idlist)) { _ERR(" Failed to add songs to playlist "); return; } @@ -796,7 +796,7 @@ void CCategorySongsLayout::m_RemoveSelectedSongs(void) if (!lid || !idlist) return; - if (!m->mhandle->MediaRemovemediaPlaylist(lid, idlist)) { + if (!m->pController->MediaRemovemediaPlaylist(lid, idlist)) { _ERR(" Failed to remove songs from playlist "); return; } @@ -828,26 +828,21 @@ bool CCategorySongsLayout::Create(CLayoutMgr *mgr, CCategoryLayout *parent) _CREATE_BEGIN{ Evas_Object *base = NULL; - Evas_Object *win = NULL; Evas_Object *layout = NULL; - CMusicController *mhandle = NULL; - CViewMgr *vmgr = NULL; CCategoryInfo *catInfo = NULL; _CHECK(m = new SCategorySongsLayout) - _CHECK(vmgr = CViewMgr::GetInstance()) + _CHECK(m->vmgr = CViewMgr::GetInstance()) _CHECK(base = mgr->Base()) - _CHECK(win = vmgr->Window()) - _CHECK(mhandle = CMusicController::GetInstance()) + _CHECK(m->win = m->vmgr->Window()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) _CHECK(layout = CCommonUI::AddBase(base, MUSIC_CATEGORY_SONGS_LAYOUT)) _CHECK(CExtBaseLayout::Create(layout)) _CHECK(catInfo = new CCategoryInfo) _WHEN_SUCCESS{ - m->win = win; m->base = base; - m->vmgr = vmgr; - m->mhandle = mhandle; m->mgr = mgr; m->parent = parent; m->curCatInfo = catInfo; @@ -858,10 +853,11 @@ bool CCategorySongsLayout::Create(CLayoutMgr *mgr, CCategoryLayout *parent) _CHECK_FAIL{ delete catInfo; } _CHECK_FAIL{ CExtBaseLayout::Destroy(); } _CHECK_FAIL{ evas_object_del(layout); } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /*Window() */ } + _CHECK_FAIL{ /* mgr->Base() */ } + _CHECK_FAIL{ /* CViewMgr::GetInstance() */ } _CHECK_FAIL{ delete m; m = NULL; } } _CREATE_END_AND_CATCH{ return false; } @@ -884,6 +880,9 @@ void CCategorySongsLayout::Destroy(void) evas_object_del(Layout()); free(m->ctxtinfo); + + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } diff --git a/src/views/context-view.cpp b/src/views/context-view.cpp index 27e0591..0f3dec8 100644 --- a/src/views/context-view.cpp +++ b/src/views/context-view.cpp @@ -106,7 +106,7 @@ struct SContextView { CRemovePopupWindow *popup; CPlayListCtxPopup *ctxpopup; Ecore_Idler *idler; - CMusicController *mhandle; + CMusicController *pController; CViewMgr *vmgr; SContentInfo *ctxtinfo; EContextType type; @@ -1244,10 +1244,6 @@ bool CContextView::Create(void *data) ASSERT(!m); ASSERT(data); - Evas_Object *base = NULL; - Evas_Object *win = NULL; - CMusicController *mhandle = NULL; - CViewMgr *mgr = NULL; SParcel *parcel = (SParcel *)data; SContentInfo *ctxtinfo = parcel->ctxtInfo; @@ -1258,33 +1254,31 @@ bool CContextView::Create(void *data) } _CREATE_BEGIN{ - _CHECK(mgr = CViewMgr::GetInstance()) - _CHECK(win = mgr->Window()) - _CHECK(mhandle = CMusicController::GetInstance()) _CHECK(m = new SContextView) - _CHECK(base = CCommonUI::AddBase(win, MUSIC_CONTEXT_VIEW)) + _CHECK(m->vmgr = CViewMgr::GetInstance()) + _CHECK(m->win = m->vmgr->Window()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) + _CHECK(m->base = CCommonUI::AddBase(m->win, MUSIC_CONTEXT_VIEW)) _CHECK(CBaseView::Create(data)) _WHEN_SUCCESS{ m->type = ctxtinfo->type; - m->vmgr = mgr; - m->win = win; - m->mhandle = mhandle; - m->base = base; m->ctxtinfo = ctxtinfo; - Connect(base, CONTEXT_VIEW, TYPE_KEY_DOWN); + Connect(m->base, CONTEXT_VIEW, TYPE_KEY_DOWN); _CHECK(m_CreateFullView()) _CHECK_FAIL{} } _CHECK_FAIL{ CBaseView::Destroy(); } - _CHECK_FAIL{ evas_object_del(base); } + _CHECK_FAIL{ evas_object_del(m->base); } + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /* Window() */ } + _CHECK_FAIL{ /* CViewMgr::GetInstance() */ } _CHECK_FAIL{ delete m; m = NULL; } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} } _CREATE_END_AND_CATCH{ return false; } return true; @@ -1303,6 +1297,8 @@ void CContextView::Destroy(void) CBaseView::Destroy(); evas_object_del(m->base); + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } diff --git a/src/views/folder-layout.cpp b/src/views/folder-layout.cpp index 65822e4..c956f3a 100644 --- a/src/views/folder-layout.cpp +++ b/src/views/folder-layout.cpp @@ -102,7 +102,7 @@ struct SFolderLayout { Elm_Gengrid_Item_Class *item_class; Elm_Gengrid_Item_Class *songitem_class; Ecore_Idler *focusIdler; - CMusicController *mhandle; + CMusicController *pController; CLayoutMgr *lmgr; CViewMgr *vmgr; CFolderInfo *c_finfo; @@ -306,7 +306,7 @@ void CFolderLayout::m_OnCtxtUpdate(EActionType type, int lid) list = eina_list_append(list, sinfo); } else { - m->mhandle->MediaGetList(LIST_TYPE_FOLDER_SONG, + m->pController->MediaGetList(LIST_TYPE_FOLDER_SONG, m->ctxtinfo->context, &list); sinfo = (CSongInfo *)eina_list_data_get(list); } @@ -325,7 +325,7 @@ void CFolderLayout::m_OnCtxtUpdate(EActionType type, int lid) break; case ACTION_TYPE_ADDTO: - if (m->mhandle->MediaAddsongsPlaylist(lid, list)) + if (m->pController->MediaAddsongsPlaylist(lid, list)) CCommonUI::CreateMsgBox(m->base, MUSIC_TEXT_ADDTO_MSG); else _ERR(" Adding songs to playlist failed "); @@ -337,12 +337,12 @@ void CFolderLayout::m_OnCtxtUpdate(EActionType type, int lid) break; } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); eina_list_free(list); if (type == ACTION_TYPE_PLAY) { - m->mhandle->Stop(); - m->mhandle->SetCurrentSong(sinfo->Id()); + m->pController->Stop(); + m->pController->SetCurrentSong(sinfo->Id()); } CCommonUI::UpdatePlaybackView((EAddType)type, Layout(), m->focused_item); @@ -478,18 +478,18 @@ void CFolderLayout::m_GotoPlayback(int mode, char *id) } } else { - r = m->mhandle->MediaGetList(LIST_TYPE_SONG, NULL, &list); + r = m->pController->MediaGetList(LIST_TYPE_SONG, NULL, &list); if (r == false || eina_list_count(list) == 0) return; } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); eina_list_free(list); if (mode == ADD_TYPE_FRESH) { - m->mhandle->Stop(); + m->pController->Stop(); if (id) /* If want to play selected song */ - m->mhandle->SetCurrentSong(id); + m->pController->SetCurrentSong(id); } CCommonUI::UpdatePlaybackView((EAddType)mode, Layout(), NULL); @@ -623,7 +623,7 @@ void CFolderLayout::m_UpdateFolderGrid(bool sort_flag) if (!sort_flag) { if (m->depth == E_DEPTH_SONG) { - r = m->mhandle->MediaGetList(LIST_TYPE_FOLDER_SONG, m->c_finfo, &(m->flist)); + r = m->pController->MediaGetList(LIST_TYPE_FOLDER_SONG, m->c_finfo, &(m->flist)); if (r == false || eina_list_count(m->flist) == 0) { _ERR(" Fetching folder list failed "); @@ -631,7 +631,7 @@ void CFolderLayout::m_UpdateFolderGrid(bool sort_flag) } } else { - r = m->mhandle->MediaGetList(LIST_TYPE_FOLDER, + r = m->pController->MediaGetList(LIST_TYPE_FOLDER, NULL, &(m->flist)); if (r == false || eina_list_count(m->flist) == 0) { @@ -757,25 +757,18 @@ bool CFolderLayout::Create(CLayoutMgr *mgr) ASSERT(mgr); _CREATE_BEGIN{ - Evas_Object *base = NULL; - Evas_Object *win = NULL; Evas_Object *layout = NULL; - CMusicController *mhandle = NULL; - CViewMgr *vmgr = NULL; _CHECK(m = new SFolderLayout) - _CHECK(vmgr = CViewMgr::GetInstance()) - _CHECK(base = mgr->Base()) - _CHECK(win = vmgr->Window()) - _CHECK(mhandle = CMusicController::GetInstance()) - _CHECK(layout = CCommonUI::AddBase(base, MUSIC_FOLDER_LAYOUT)) + _CHECK(m->vmgr = CViewMgr::GetInstance()) + _CHECK(m->base = mgr->Base()) + _CHECK(m->win = m->vmgr->Window()) + _CHECK(m->pController = new CMusicController); + _CHECK(m->pController->Create()) + _CHECK(layout = CCommonUI::AddBase(m->base, MUSIC_FOLDER_LAYOUT)) _CHECK(CExtBaseLayout::Create(layout)) _WHEN_SUCCESS{ - m->win = win; - m->base = base; - m->vmgr = vmgr; - m->mhandle = mhandle; m->lmgr = mgr; m->depth = E_DEPTH_FOLDER; @@ -792,10 +785,11 @@ bool CFolderLayout::Create(CLayoutMgr *mgr) _CHECK_FAIL{ CExtBaseLayout::Destroy(); } _CHECK_FAIL{ evas_object_del(layout); } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /* Window() */ } + _CHECK_FAIL{ /* Base() */} + _CHECK_FAIL{ /* CViewMgr::GetInstance() */ } _CHECK_FAIL{ delete m; m = NULL; } } _CREATE_END_AND_CATCH{ return false; } @@ -819,6 +813,9 @@ void CFolderLayout::Destroy(void) m->c_sinfo->Destroy(); delete m->c_sinfo; free(m->ctxtinfo); + + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } diff --git a/src/views/genre-layout.cpp b/src/views/genre-layout.cpp index fc6594c..1a774ab 100644 --- a/src/views/genre-layout.cpp +++ b/src/views/genre-layout.cpp @@ -85,5 +85,9 @@ void CGenreLayout::t_HandleItemSelect(SCatItemInfo *itinfo) bool CGenreLayout::t_GetMediaList(Eina_List **list) { - return CMusicController::GetInstance()->MediaGetList(LIST_TYPE_GENRE, NULL, list); + CMusicController mc; + mc.Create(); + bool ret = mc.MediaGetList(LIST_TYPE_GENRE, NULL, list); + mc.Destroy(); + return ret; } diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 6459d9f..a989cbf 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -52,6 +52,356 @@ #define S_INCREMENT 1000 /* milli seconds */ +//////////////////////////////////////////////////////////////////////////////// +// +struct SSliderWidget { + Evas_Object *eoSlider; + Evas_Object *eoBase; + + Ecore_Timer *etSlider; + + CSongInfo *pSongInfo; + + CMusicController controller; + + SSliderWidget() { + eoSlider = NULL; + eoBase = NULL; + etSlider = NULL; + pSongInfo = NULL; + } +}; + + +Eina_Bool CSliderWidget::sm_CbUpdateSlider(void *dt) +{ + CSliderWidget *root = (CSliderWidget*)dt; + Eina_Bool ret = ECORE_CALLBACK_CANCEL; + + if (root) + ret = root->m_OnUpdateSlider(); + + return ret; +} + + +Eina_Bool CSliderWidget::m_OnUpdateSlider(void) +{ + char *timestr = NULL; + int value; + int duration; + + if (!m->controller.GetPosition(&value)) { + m->etSlider = NULL; + return ECORE_CALLBACK_CANCEL; + } + + m_UpdateSongInfo(); + + duration = m->pSongInfo->Duration(); + + value = value + S_INCREMENT; + if (value > duration) { + m->etSlider = NULL; + return ECORE_CALLBACK_CANCEL; + } + + elm_slider_value_set(m->eoSlider, value); + timestr = CCommonUI::TimeStrFromMilSeconds(value); + if (timestr) { + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, + timestr); + free(timestr); + } + + return ECORE_CALLBACK_RENEW; +} + + +bool CSliderWidget::m_AddSlider(void) +{ + Evas_Object *eoSlider = NULL; + + eoSlider = elm_slider_add(m->eoBase); + if (!eoSlider) + return false; + + elm_slider_indicator_show_set(eoSlider, EINA_FALSE); + elm_slider_indicator_show_on_focus_set(eoSlider, EINA_FALSE); + elm_object_style_set(eoSlider, MUSIC_STYLE_SLIDER); + elm_slider_horizontal_set(eoSlider, EINA_TRUE); + elm_object_part_content_set(m->eoBase, MUSIC_PART_PROGRESSBAR, eoSlider); + + Connect(eoSlider, TYPE_CHANGED | TYPE_MOUSE_MOVE); + + evas_object_show(eoSlider); + m->eoSlider = eoSlider; + + return true; +} + + +void CSliderWidget::m_RemoveTimer(void) +{ + if (m->etSlider) { + ecore_timer_del(m->etSlider); + m->etSlider = NULL; + } +} + + +void CSliderWidget::m_UpdateSongInfo(void) +{ + CSongInfo *sinfo = NULL; + int index; + + if (!m->controller.GetCurrentSongIndex(&index)) { + _ERR(" music get current song index failed "); + return; + } + + if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { + _ERR(" music get songinfo failed "); + return; + } + m->pSongInfo = sinfo; +} + + +bool CSliderWidget::Create(Evas_Object *eoBase) +{ + ASSERT(!m); + + _CREATE_BEGIN{ + _CHECK(m = new SSliderWidget) + _CHECK(m->controller.Create()) + _CHECK(m->controller.AddListener(this)) + _CHECK(m_AddSlider()) + + _CHECK_FAIL{} + _CHECK_FAIL{ m->controller.RemoveListener(this); } + _CHECK_FAIL{ m->controller.Destroy(); } + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return false; } + + return true; +} + + +void CSliderWidget::Destroy(void) +{ + ASSERT(m); + + m->controller.RemoveListener(this); + m_RemoveTimer(); + + delete m; + m = NULL; +} + + +Evas_Object* CSliderWidget::Base(void) +{ + ASSERT(m); + + return m->eoSlider; +} + + +void CSliderWidget::Init(void) +{ + elm_object_disabled_set(m->eoSlider, EINA_TRUE); + elm_slider_value_set(m->eoSlider, 0); +} + + +void CSliderWidget::OnComplete(void) +{ +} + + +void CSliderWidget::OnStartPlayback(void) +{ + int duration; + char *timestr = NULL; + double step; + + elm_slider_value_set(m->eoSlider, 0); + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); + + elm_object_disabled_set(m->eoSlider, EINA_FALSE); + + m_UpdateSongInfo(); + duration = m->pSongInfo->Duration(); + + m_RemoveTimer(); + m->etSlider = ecore_timer_add(S_INTERVAL, sm_CbUpdateSlider, this); + + elm_slider_min_max_set(m->eoSlider, 0, duration); + timestr = CCommonUI::TimeStrFromMilSeconds(duration); + if (timestr) { + elm_object_part_text_set(m->eoBase, + MUSIC_PART_FULLTIME, timestr); + free(timestr); + } + + step = (double)SLIDER_STEP / (double)duration; + elm_slider_step_set(m->eoSlider, step); +} + + +void CSliderWidget::OnStopPlayback(void) +{ + elm_slider_value_set(m->eoSlider, 0); + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); + + elm_object_disabled_set(m->eoSlider, EINA_TRUE); + m_RemoveTimer(); +} + + +void CSliderWidget::OnPausePlayback(void) +{ + if (m->etSlider) + ecore_timer_freeze(m->etSlider); +} + + +void CSliderWidget::OnResumePlayback(void) +{ + if (m->etSlider) + ecore_timer_thaw(m->etSlider); +} + + +void CSliderWidget::OnPosition(int milsec) +{ + elm_slider_value_set(m->eoSlider, milsec); +} + + +void CSliderWidget::OnChanged(int id, Evas_Object *obj) +{ + char *timestr = NULL; + int value; + + if (m->controller.PlayState() == PLAY_STATUS_PLAY) { + if (m->etSlider) + ecore_timer_freeze(m->etSlider); + } + + value = elm_slider_value_get(obj); + m->controller.SetPosition(value); + timestr = CCommonUI::TimeStrFromMilSeconds(value); + if (timestr) { + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, + timestr); + free(timestr); + } + + if (m->controller.PlayState() == PLAY_STATUS_PLAY) { + if (m->etSlider) + ecore_timer_thaw(m->etSlider); + } +} + + +void CSliderWidget::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev) +{ + if (!elm_object_focus_get(obj)) + elm_object_focus_set(obj, EINA_TRUE); +} +// +//////////////////////////////////////////////////////////////////////////////// + + +struct STimer { + int count; + int s, e; + struct SCookie { + Ecore_Timer *etTimer; + CTimer *root; + int id; + SCookie(CTimer *timer, int _id) { + root = timer; + id = _id; + } + }; + + Eina_List *elList; +}; + + +Eina_Bool CTimer::sm_CbTimer(void *data) +{ + STimer::SCookie *cookie = (STimer::SCookie*)data; + + if (cookie->root) + cookie->root->t_OnTimer(cookie->id); + + cookie->root->m->elList = eina_list_remove(cookie->root->m->elList, cookie); + + delete cookie; + + return EINA_FALSE; +} + + +void CTimer::t_OnTimer(int id) +{ +} + + +bool CTimer::Create(void) +{ + ASSERT(!m); + + m = new STimer; + if (!m) + return false; + + m->elList = NULL; + + return true; +} + + +void CTimer::Destroy(void) +{ + ASSERT(m); + + delete m; + m = NULL; +} + + +bool CTimer::SetTimer(int id, int ms) +{ + ASSERT(m); + + + STimer::SCookie *cookie = new STimer::SCookie(this, id); + if (!cookie) + return false; + + m->elList = eina_list_append(m->elList, cookie); + cookie->etTimer = ecore_timer_add(ms, sm_CbTimer, cookie); + return true; +} + + +void CTimer::KillTimer(int id) +{ + ASSERT(m); + + +} + + + + + + enum EEvasObject { EO_BASE, @@ -68,11 +418,7 @@ enum EEvasObject { EO_BTN_PLAY, EO_BTN_FORWARD, // TOTAL_CONTROL_BTNS - EO_SLIDER, - EO_PLAYLIST, - - EO_BOX, }; @@ -84,6 +430,15 @@ struct SItemInfo { bool select_status; }; + +enum EPressTypes { + PRESS_SHORT, + PRESS_SHORT_PAUSE, + PRESS_LONG, + PRESS_LONG_PAUSE, +}; + + struct SPlaybackView { Evas_Object *eoWin; @@ -98,28 +453,26 @@ struct SPlaybackView { Evas_Object *eoBtnEdit[TOTAL_EDIT_BTNS]; Evas_Object *eoAlbumCover; - Evas_Object *eoSlider; + //Evas_Object *eoSlider; + CSliderWidget *pSliderWidget; Evas_Object *eoPressedObj; Eina_List *elInfo; - Ecore_Timer *etSlider; Ecore_Timer *etLongPress; Ecore_Timer *etWait; - CMusicController *hMusicController; //! NOT NULL + CMusicController *pController; //! NOT NULL CSongInfo *csinfo; CViewMgr *mgr; SItemInfo *cs_itinfo; SContentInfo *ctxtinfo; - int press_status; + EPressTypes press_status; CHandleVolume *pHandleVolume; SPlaybackView() { memset(this, 0, sizeof(SPlaybackView)); - pHandleVolume = new CHandleVolume; } ~SPlaybackView() { - delete pHandleVolume; } }; @@ -129,12 +482,6 @@ struct SBtnInfo { EEvasObject type; }; -enum EPressTypes { - PRESS_SHORT, - PRESS_SHORT_PAUSE, - PRESS_LONG, - PRESS_LONG_PAUSE, -}; enum EControlBtns { BTN_SETTINGS, @@ -157,47 +504,13 @@ enum EEditBtns { }; enum ETimers { - TIMER_SLIDER, + //TIMER_SLIDER, TIMER_WAIT, TIMER_LONGPRESS, TIMER_VOLUME }; -Eina_Bool CPlaybackView::sm_CbUpdateSlider(void *dt) -{ - SPlaybackView *m = (SPlaybackView *)dt; - char *timestr = NULL; - int value; - int duration; - - if (!m) - return ECORE_CALLBACK_CANCEL; - - if (!m->hMusicController->GetPosition(&value)) { - m->etSlider = NULL; - return ECORE_CALLBACK_CANCEL; - } - - duration = m->csinfo->Duration(); - - value = value + S_INCREMENT; - if (value > duration) { - m->etSlider = NULL; - return ECORE_CALLBACK_CANCEL; - } - - elm_slider_value_set(m->eoSlider, value); - timestr = CCommonUI::TimeStrFromMilSeconds(value); - if (timestr) { - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, - timestr); - free(timestr); - } - - return ECORE_CALLBACK_RENEW; -} - Eina_Bool CPlaybackView::sm_CbLongpressTimer(void *dt) { @@ -228,7 +541,7 @@ Eina_Bool CPlaybackView::sm_CbWaitTimer(void *dt) void CPlaybackView::m_OnWaitTimer(void) { m->press_status = PRESS_LONG; - if (m->hMusicController->PlayState() == PLAY_STATUS_PLAY) { + if (m->pController->PlayState() == PLAY_STATUS_PLAY) { /* Handle long press */ m_PlaybackPause(); m->etLongPress = ecore_timer_add(LP_INTERVAL, sm_CbLongpressTimer, this); @@ -347,8 +660,8 @@ void CPlaybackView::m_CbCtxPopupBtnSelected(CCtxPopup* instance, const char* tex break; case BTN_CLEAR: - m->hMusicController->Stop(); - m->hMusicController->EmptyPlaylist(); + m->pController->Stop(); + m->pController->EmptyPlaylist(); eina_list_free(m->elInfo); m->elInfo = NULL; elm_genlist_clear(m->eoPlaylist); @@ -366,13 +679,6 @@ void CPlaybackView::m_RemoveTimer(int timer_code) ETimers timerCode = (ETimers)timer_code; switch (timerCode) { - case TIMER_SLIDER: - if (m->etSlider) { - ecore_timer_del(m->etSlider); - m->etSlider = NULL; - } - break; - case TIMER_WAIT: if (m->etWait) { ecore_timer_del(m->etWait); @@ -400,19 +706,13 @@ void CPlaybackView::m_RemoveTimer(int timer_code) void CPlaybackView::m_PlaybackPause(void) { - m->hMusicController->Pause(); - - if (m->etSlider) - ecore_timer_freeze(m->etSlider); + m->pController->Pause(); } void CPlaybackView::m_PlaybackResume(void) { - m->hMusicController->Resume(); - - if (m->etSlider) - ecore_timer_thaw(m->etSlider); + m->pController->Resume(); } @@ -470,7 +770,7 @@ void CPlaybackView::m_UpdateControlBtns(void) { int state; - state = m->hMusicController->PlayState(); + state = m->pController->PlayState(); if (state != PLAY_STATUS_STOP) { elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_FALSE); elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_FALSE); @@ -489,7 +789,7 @@ void CPlaybackView::m_UpdateControlBtns(void) elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); } - state = m->hMusicController->ShuffleState(); + state = m->pController->ShuffleState(); if (state == SHUFFLE_STATUS_OFF) { elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); } @@ -497,7 +797,7 @@ void CPlaybackView::m_UpdateControlBtns(void) elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); } - state = m->hMusicController->RepeatState(); + state = m->pController->RepeatState(); if (state == REPEAT_STATUS_NONE) { elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); } @@ -510,49 +810,6 @@ void CPlaybackView::m_UpdateControlBtns(void) } -void CPlaybackView::m_UpdateCurrentSongProgressbar(void) -{ - int duration; - char *timestr = NULL; - double step; - int state; - - if (!m->csinfo) - return; - - elm_slider_value_set(m->eoSlider, 0); - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); - - state = m->hMusicController->PlayState(); - - if (state == PLAY_STATUS_STOP) { - elm_object_disabled_set(m->eoSlider, EINA_TRUE); - m_RemoveTimer(TIMER_SLIDER); - return; - } - - elm_object_disabled_set(m->eoSlider, EINA_FALSE); - - duration = m->csinfo->Duration(); - { - m_RemoveTimer(TIMER_SLIDER); - m->etSlider = ecore_timer_add(S_INTERVAL, - sm_CbUpdateSlider, m); - - elm_slider_min_max_set(m->eoSlider, 0, duration); - timestr = CCommonUI::TimeStrFromMilSeconds(duration); - if (timestr) { - elm_object_part_text_set(m->eoBase, - MUSIC_PART_FULLTIME, timestr); - free(timestr); - } - - step = (double)SLIDER_STEP / (double)duration; - elm_slider_step_set(m->eoSlider, step); - } -} - - void CPlaybackView::m_UpdateCurrentSongThumbnail(void) { char *path = NULL; @@ -601,10 +858,11 @@ void CPlaybackView::m_UpdateEmptySongInfo(void) elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_TRUE); elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_TRUE); elm_object_disabled_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE); - elm_object_disabled_set(m->eoSlider, EINA_TRUE); elm_object_part_text_set(m->eoBase, MUSIC_PART_FULLTIME, "00:00"); elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); - elm_slider_value_set(m->eoSlider, 0); + + m->pSliderWidget->Init(); + elm_object_part_text_set(m->eoBase, MUSIC_PART_SONG_TITLE, _(NO_PLAYLIST_MESSAGE)); elm_object_part_text_set(m->eoBase, MUSIC_PART_ARTIST_ALBUM, @@ -612,7 +870,7 @@ void CPlaybackView::m_UpdateEmptySongInfo(void) snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, MUSIC_IMAGE_DEFAULT_THUMB_450); elm_image_file_set(m->eoAlbumCover, buf, NULL); - m->hMusicController->SetPlayState(PLAY_STATUS_INITIAL); + m->pController->SetPlayState(PLAY_STATUS_INITIAL); } @@ -648,7 +906,7 @@ void CPlaybackView::m_UpdateCurrentSongItem(int index) if (pItemInfo) { m->cs_itinfo = pItemInfo; - if (m->hMusicController->PlayState() == PLAY_STATUS_STOP) { + if (m->pController->PlayState() == PLAY_STATUS_STOP) { elm_genlist_item_bring_in(pItemInfo->item, ELM_GENLIST_ITEM_SCROLLTO_IN); } @@ -662,26 +920,19 @@ void CPlaybackView::m_UpdateCurrentSongItem(int index) void CPlaybackView::m_UpdateEditmodeFocusSequence(void) { - elm_object_focus_next_object_set(m->eoPlaylist, - m->eoBtnEdit[BTN_CANCEL], ELM_FOCUS_LEFT); - elm_object_focus_next_object_set(m->eoBtnEdit[BTN_CANCEL], - m->eoPlaylist, ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->eoSlider, m->eoBtnEdit[BTN_CANCEL], - ELM_FOCUS_DOWN); + elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnEdit[BTN_CANCEL], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnEdit[BTN_CANCEL], m->eoPlaylist, ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoBtnEdit[BTN_CANCEL], ELM_FOCUS_DOWN); } void CPlaybackView::m_UpdatePlaymodeFocusSequence(void) { - elm_object_focus_next_object_set(m->eoSlider, m->eoPlaylist, - ELM_FOCUS_UP); - elm_object_focus_next_object_set(m->eoSlider, m->eoBtnControl[BTN_PLAY], - ELM_FOCUS_DOWN); - if (m->hMusicController->PlayState() == PLAY_STATUS_STOP) { - elm_object_focus_next_object_set(m->eoPlaylist, - m->eoBtnControl[BTN_PLAY], ELM_FOCUS_LEFT); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], - m->eoPlaylist, ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoPlaylist, ELM_FOCUS_UP); + elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoBtnControl[BTN_PLAY], ELM_FOCUS_DOWN); + if (m->pController->PlayState() == PLAY_STATUS_STOP) { + elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnControl[BTN_PLAY], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], m->eoPlaylist, ELM_FOCUS_RIGHT); } else { elm_object_focus_next_object_set(m->eoPlaylist, @@ -704,12 +955,12 @@ void CPlaybackView::m_UpdateCurrentSongInfo(void) return; } - if (!m->hMusicController->GetCurrentSongIndex(&index)) { + if (!m->pController->GetCurrentSongIndex(&index)) { _ERR(" music get current song index failed "); return; } - if (!m->hMusicController->GetSonginfoFromIndex(index, &sinfo)) { + if (!m->pController->GetSonginfoFromIndex(index, &sinfo)) { _ERR(" music get songinfo failed "); return; } @@ -718,7 +969,7 @@ void CPlaybackView::m_UpdateCurrentSongInfo(void) m_UpdateCurrentSongItem(index); m_UpdateCurrentSongLabels(); m_UpdateCurrentSongThumbnail(); - m_UpdateCurrentSongProgressbar(); + //m_UpdateCurrentSongProgressbar(); m_UpdateControlBtns(); m_UpdatePlaymodeFocusSequence(); } @@ -737,12 +988,9 @@ void CPlaybackView::m_DisableEditButtons(bool flag) elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); } else { - elm_object_focus_next_object_set(m->eoBtnEdit[BTN_CANCEL], - m->eoBtnEdit[BTN_DESELECT], ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->eoBtnEdit[BTN_DELETE], - m->eoPlaylist, ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->eoPlaylist, - m->eoBtnEdit[BTN_DELETE], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnEdit[BTN_CANCEL], m->eoBtnEdit[BTN_DESELECT], ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->eoBtnEdit[BTN_DELETE], m->eoPlaylist, ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnEdit[BTN_DELETE], ELM_FOCUS_LEFT); } } @@ -800,14 +1048,12 @@ void CPlaybackView::m_DestroyErrorPopup(void) void CPlaybackView::m_CreateSettingsPopup(void) { - CPlaySettingCtxPopup *eoCtxPopup = new CPlaySettingCtxPopup; CCtxPopup::SCallback cb; cb.cookie = this; cb.onSelected = sm_CbCtxPopupBtnSelected; - eoCtxPopup->Create(m->eoWin, &cb); - - m->eoCtxPopup = eoCtxPopup; + m->eoCtxPopup = new CPlaySettingCtxPopup; + m->eoCtxPopup->Create(m->eoWin, &cb); } @@ -826,7 +1072,7 @@ void CPlaybackView::m_DestroySettingsPopup(void) void CPlaybackView::m_FromEditToPlaybackMode(void) { - if (m->hMusicController->PlayState() == PLAY_STATUS_STOP) { + if (m->pController->PlayState() == PLAY_STATUS_STOP) { elm_genlist_item_bring_in(m->cs_itinfo->item, ELM_GENLIST_ITEM_SCROLLTO_IN); } @@ -874,7 +1120,8 @@ void CPlaybackView::m_HandleOnRepeated(void) obj = m->eoPressedObj; - value = elm_slider_value_get(m->eoSlider); + + m->pController->GetPosition(&value); //value = elm_slider_value_get(m->eoSlider); duration = m->cs_itinfo->sinfo->Duration(); if (obj == m->eoBtnControl[BTN_REWIND]) { @@ -888,10 +1135,7 @@ void CPlaybackView::m_HandleOnRepeated(void) } else { if (value == duration) { - if (m->hMusicController->PlayNextSong()) - m_UpdateCurrentSongInfo(); - else - _ERR(" music play next song failed "); + m->pController->PlayNextSong(); m->press_status = PRESS_LONG_PAUSE; elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PAUSE, @@ -906,8 +1150,7 @@ void CPlaybackView::m_HandleOnRepeated(void) value = duration; } - m->hMusicController->SetPosition(value); - elm_slider_value_set(m->eoSlider, value); + m->pController->SetPosition(value); timestr = CCommonUI::TimeStrFromMilSeconds(value); if (timestr) { elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, @@ -925,25 +1168,21 @@ void CPlaybackView::m_DeleteSelectedItems(void) SItemInfo *pItemInfo = NULL; void *obj = NULL; int index; - bool flag = false; m_DisableEditButtons(true); EINA_LIST_FOREACH_SAFE(m->elInfo, l, l_next, obj) { pItemInfo = (SItemInfo *)obj; if (pItemInfo->check_status) { if (m->cs_itinfo == pItemInfo) { - flag = true; m_UnselectItem(m->cs_itinfo); - m_RemoveTimer(TIMER_SLIDER); m->cs_itinfo = NULL; - m->hMusicController->SetPlayState(PLAY_STATUS_STOP); - m->hMusicController->Stop(); + m->pController->SetPlayState(PLAY_STATUS_STOP); + m->pController->Stop(); } index = elm_genlist_item_index_get(pItemInfo->item); - m->hMusicController->RemoveSong(pItemInfo->sinfo, index); + m->pController->RemoveSong(pItemInfo->sinfo, index); - m->elInfo = eina_list_remove(m->elInfo, - pItemInfo); + m->elInfo = eina_list_remove(m->elInfo, pItemInfo); elm_object_item_del(pItemInfo->item); } } @@ -955,9 +1194,6 @@ void CPlaybackView::m_DeleteSelectedItems(void) return; } - if (flag) - m_UpdateCurrentSongInfo(); - elm_genlist_realized_items_update(m->eoPlaylist); elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); } @@ -967,7 +1203,7 @@ void CPlaybackView::m_KeyBackPress(void) { if (m->eoCtxPopup) { m_DestroySettingsPopup(); - elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_FALSE); + //elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_FALSE); elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_TRUE); return; } @@ -989,8 +1225,7 @@ void CPlaybackView::m_KeyBackPress(void) void CPlaybackView::m_KeyExitPress(void) { - m_RemoveTimer(TIMER_SLIDER); - m->hMusicController->Stop(); + m->pController->Stop(); elm_exit(); } @@ -1002,17 +1237,14 @@ void CPlaybackView::m_KeyPlayPress(void) if (elm_object_disabled_get(m->eoBtnControl[BTN_PLAY])) return; - state = m->hMusicController->PlayState(); + state = m->pController->PlayState(); if (state == PLAY_STATUS_PAUSE) { m_PlaybackResume(); elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); } else if (state != PLAY_STATUS_PLAY) { - if (m->hMusicController) - m->hMusicController->Start(); - - m_UpdateCurrentSongInfo(); + m->pController->Start(); } } @@ -1024,7 +1256,7 @@ void CPlaybackView::m_KeyPausePress(void) if (elm_object_disabled_get(m->eoBtnControl[BTN_PLAY])) return; - state = m->hMusicController->PlayState(); + state = m->pController->PlayState(); if (state == PLAY_STATUS_PLAY) { elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); @@ -1102,27 +1334,6 @@ void CPlaybackView::m_HandleKeyUnpress(char *keyname) } -void CPlaybackView::m_AddSlider(void) -{ - Evas_Object *eoSlider = NULL; - - eoSlider = elm_slider_add(m->eoBase); - if (!eoSlider) - return; - - elm_slider_indicator_show_set(eoSlider, EINA_FALSE); - elm_slider_indicator_show_on_focus_set(eoSlider, EINA_FALSE); - elm_object_style_set(eoSlider, MUSIC_STYLE_SLIDER); - elm_slider_horizontal_set(eoSlider, EINA_TRUE); - elm_object_part_content_set(m->eoBase, MUSIC_PART_PROGRESSBAR, eoSlider); - - Connect(eoSlider, EO_SLIDER, TYPE_CHANGED | TYPE_MOUSE_MOVE); - - evas_object_show(eoSlider); - m->eoSlider = eoSlider; -} - - void CPlaybackView::m_AddAlbumCover(void) { Evas_Object *eoAlbumCover = NULL; @@ -1146,7 +1357,10 @@ void CPlaybackView::m_AddAlbumCover(void) void CPlaybackView::m_AddCurrentSonginfo(void) { m_AddAlbumCover(); - m_AddSlider(); + + m->pSliderWidget = new CSliderWidget; + m->pSliderWidget->Create(m->eoBase); + //m_AddSlider(); } @@ -1170,18 +1384,15 @@ void CPlaybackView::m_AddEditPlaylistButtons(void) return; elm_box_horizontal_set(box, EINA_TRUE); - elm_box_padding_set(box, - MUSIC_EDIT_BTNS_PADDING * elm_config_scale_get(), 0); + elm_box_padding_set(box, MUSIC_EDIT_BTNS_PADDING * elm_config_scale_get(), 0); for (i = 0; i < TOTAL_EDIT_BTNS; i++) { m->eoBtnEdit[i] = elm_button_add(m->eoBase); if (!m->eoBtnEdit[i]) continue; - elm_object_style_set(m->eoBtnEdit[i], - MUSIC_STYLE_EDIT_BTN); - evas_object_size_hint_weight_set(m->eoBtnEdit[i], - EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_style_set(m->eoBtnEdit[i], MUSIC_STYLE_EDIT_BTN); + evas_object_size_hint_weight_set(m->eoBtnEdit[i], EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); elm_box_pack_end(box, m->eoBtnEdit[i]); elm_object_text_set(m->eoBtnEdit[i], _(btninfo[i].txt)); @@ -1190,8 +1401,7 @@ void CPlaybackView::m_AddEditPlaylistButtons(void) evas_object_show(m->eoBtnEdit[i]); } elm_object_part_content_set(m->eoBase, MUSIC_PART_EDITBTNS, box); - elm_object_signal_emit(m->eoBase, MUSIC_SIGNAL_PLAYBACK_MODE, - MUSIC_PLAYBACK_VIEW); + elm_object_signal_emit(m->eoBase, MUSIC_SIGNAL_PLAYBACK_MODE, MUSIC_PLAYBACK_VIEW); } @@ -1450,16 +1660,16 @@ void CPlaybackView::m_AddPlaylist(void) return; } - if (!m->hMusicController->GetTotalSongs(&ts)) { + if (!m->pController->GetTotalSongs(&ts)) { _ERR(" music get total songs failed "); return; } - if (!m->hMusicController->GetCurrentSongIndex(&index)) + if (!m->pController->GetCurrentSongIndex(&index)) _ERR(" music get current song index failed "); for (i = 0; i < ts; i++) { - if (!m->hMusicController->GetSonginfoFromIndex(i, &sinfo)) { + if (!m->pController->GetSonginfoFromIndex(i, &sinfo)) { _ERR(" music get songinfo failed "); continue; } @@ -1505,15 +1715,13 @@ void CPlaybackView::m_HandleRewindBtnClicked(Evas_Object *obj) elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - if (m->hMusicController->PlayState() == PLAY_STATUS_STOP) + if (m->pController->PlayState() == PLAY_STATUS_STOP) return; - if (!m->hMusicController->PlayPreviousSong()){ + if (!m->pController->PlayPreviousSong()){ _ERR(" music play previous song failed "); return; } - - m_UpdateCurrentSongInfo(); } @@ -1522,15 +1730,13 @@ void CPlaybackView::m_HandleForwardBtnClicked(Evas_Object *obj) elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - if (m->hMusicController->PlayState() == PLAY_STATUS_STOP) + if (m->pController->PlayState() == PLAY_STATUS_STOP) return; - if (!m->hMusicController->PlayNextSong()) { + if (!m->pController->PlayNextSong()) { _ERR(" music play next song failed "); return; } - - m_UpdateCurrentSongInfo(); } @@ -1550,7 +1756,7 @@ void CPlaybackView::m_HandleOnUnpressed(Evas_Object *obj) if (m->press_status == PRESS_SHORT) { /* Handle song change */ - if (m->hMusicController->PlayState() == PLAY_STATUS_PLAY) + if (m->pController->PlayState() == PLAY_STATUS_PLAY) m_PlaybackPause(); if (obj == m->eoBtnControl[BTN_FORWARD]) @@ -1558,11 +1764,11 @@ void CPlaybackView::m_HandleOnUnpressed(Evas_Object *obj) else m_HandleRewindBtnClicked(obj); - if (m->hMusicController->PlayState() != PLAY_STATUS_PLAY) + if (m->pController->PlayState() != PLAY_STATUS_PLAY) m_PlaybackResume(); } else if (m->press_status == PRESS_LONG) { - if (m->hMusicController->PlayState() != PLAY_STATUS_PLAY) + if (m->pController->PlayState() != PLAY_STATUS_PLAY) m_PlaybackResume(); } @@ -1592,8 +1798,7 @@ void CPlaybackView::m_HandleGenlistItemActivated(Evas_Object *obj, Elm_Object_It index = elm_genlist_item_index_get(genListItem); - m->hMusicController->PlayIndexSong(--index); - m_UpdateCurrentSongInfo(); + m->pController->PlayIndexSong(--index); } @@ -1605,10 +1810,12 @@ bool CPlaybackView::Create(void *data) _CHECK(m = new SPlaybackView) _CHECK(m->mgr = CViewMgr::GetInstance()) _CHECK(m->eoWin = m->mgr->Window()) - _CHECK(m->hMusicController = CMusicController::GetInstance()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) _CHECK(m->eoBase = CCommonUI::AddBase(m->eoWin, MUSIC_PLAYBACK_VIEW)) _CHECK(CBaseView::Create(data)) - _CHECK(m->hMusicController->AddListener(this)) + _CHECK(CTimer::Create()); + _CHECK(m->pController->AddListener(this)) _WHEN_SUCCESS{ m->press_status = PRESS_SHORT; @@ -1619,16 +1826,19 @@ bool CPlaybackView::Create(void *data) m_AddCurrentSonginfo(); m_AddPlaylist(); + m->pHandleVolume = new CHandleVolume; m->pHandleVolume->Create(m->eoBase); m_UpdatePlaymodeFocusSequence(); Connect(m->eoBase, EO_BASE, TYPE_KEY_DOWN | TYPE_KEY_UP); } - _CHECK_FAIL{ m->hMusicController->RemoveListener(this); } + _CHECK_FAIL{ m->pController->RemoveListener(this); } + _CHECK_FAIL{ CTimer::Destroy(); } _CHECK_FAIL{ CBaseView::Destroy(); } _CHECK_FAIL{ evas_object_del(m->eoBase); } - _CHECK_FAIL{ /* CMusicController::GetInstance())*/ } + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } _CHECK_FAIL{ /* mgr->Window() */ } _CHECK_FAIL{ /* CViewerMgr::GetInstance() */} _CHECK_FAIL{ delete m; m = NULL; } @@ -1643,16 +1853,18 @@ void CPlaybackView::Destroy(void) ASSERT(m); Disconnect(m->eoBase); - m->hMusicController->RemoveListener(this); + m->pController->RemoveListener(this); m_DestroyErrorPopup(); - m_RemoveTimer(TIMER_SLIDER); + m->pSliderWidget->Destroy(); + m_RemoveTimer(TIMER_WAIT); m_RemoveTimer(TIMER_LONGPRESS); m_DestroySettingsPopup(); m->pHandleVolume->Destroy(); + delete m->pHandleVolume; CBaseView::Destroy(); evas_object_del(m->eoBase); @@ -1687,14 +1899,14 @@ void CPlaybackView::t_OnClickedShuffle(Evas_Object *obj) { elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - switch (m->hMusicController->ShuffleState()) { + switch (m->pController->ShuffleState()) { case SHUFFLE_STATUS_OFF: - m->hMusicController->SetShuffleState(SHUFFLE_STATUS_ON); + m->pController->SetShuffleState(SHUFFLE_STATUS_ON); elm_object_signal_emit(obj, MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); break; default: - m->hMusicController->SetShuffleState(SHUFFLE_STATUS_OFF); + m->pController->SetShuffleState(SHUFFLE_STATUS_OFF); elm_object_signal_emit(obj, MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); break; } @@ -1705,19 +1917,19 @@ void CPlaybackView::t_OnClickedRepeat(Evas_Object *obj) { elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - switch (m->hMusicController->RepeatState()) { + switch (m->pController->RepeatState()) { case REPEAT_STATUS_NONE: - m->hMusicController->SetRepeatState(REPEAT_STATUS_ALL); + m->pController->SetRepeatState(REPEAT_STATUS_ALL); elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_ALL, MUSIC_PLAYBACK_VIEW); break; case REPEAT_STATUS_ALL: - m->hMusicController->SetRepeatState(REPEAT_STATUS_ONE); + m->pController->SetRepeatState(REPEAT_STATUS_ONE); elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_ONE, MUSIC_PLAYBACK_VIEW); break; default: - m->hMusicController->SetRepeatState(REPEAT_STATUS_NONE); + m->pController->SetRepeatState(REPEAT_STATUS_NONE); elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); break; } @@ -1728,7 +1940,7 @@ void CPlaybackView::t_OnClickedPlay(Evas_Object *obj) { elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - switch (m->hMusicController->PlayState()) { + switch (m->pController->PlayState()) { case PLAY_STATUS_PAUSE: m_PlaybackResume(); elm_object_signal_emit(obj, MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); @@ -1740,9 +1952,8 @@ void CPlaybackView::t_OnClickedPlay(Evas_Object *obj) break; default: - if (m->hMusicController) - m->hMusicController->Start(); - m_UpdateCurrentSongInfo(); + if (m->pController) + m->pController->Start(); break; } } @@ -1756,17 +1967,15 @@ void CPlaybackView::t_OnShow(void) m_UpdateCurrentSongInfo(); - state = m->hMusicController->PlayState(); + state = m->pController->PlayState(); if (state == PLAY_STATUS_INITIAL || state == PLAY_STATUS_STOP) { m_RemovePlaylist(); m_AddPlaylist(); - m->hMusicController->Start(); - m_UpdateCurrentSongInfo(); + m->pController->Start(); } if (m->cs_itinfo) { - elm_genlist_item_show(m->cs_itinfo->item, - ELM_GENLIST_ITEM_SCROLLTO_IN); + elm_genlist_item_show(m->cs_itinfo->item, ELM_GENLIST_ITEM_SCROLLTO_IN); elm_object_item_focus_set(m->cs_itinfo->item, EINA_TRUE); } @@ -1870,7 +2079,7 @@ void CPlaybackView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_ return; } - if (m->hMusicController->PlayState() == PLAY_STATUS_PLAY && + if (m->pController->PlayState() == PLAY_STATUS_PLAY && itinfo == m->cs_itinfo) ctxtinfo->status = PLAY_STATUS_PLAY; else @@ -1891,23 +2100,6 @@ void CPlaybackView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_ _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } - case EO_BOX: - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { - _ERR("eoCtxPopup BACK key pressed "); - m_DestroySettingsPopup(); - elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_TRUE); - - } - else if (!strcmp(ev->keyname, KEY_EXIT)) { - _ERR("eoCtxPopup EXIT key pressed "); - m_DestroySettingsPopup(); - m_RemoveTimer(TIMER_SLIDER); - m->hMusicController->Stop(); - elm_exit(); - } - break; - default: break; } @@ -1980,7 +2172,6 @@ void CPlaybackView::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mo case EO_CANCEL: case EO_DESELECT: case EO_DELETE: - case EO_SLIDER: case EO_BTN_FORWARD: case EO_BTN_PLAY: case EO_BTN_REPEAT: @@ -2039,41 +2230,6 @@ void CPlaybackView::OnUnpressed(int id, Evas_Object *obj) } -void CPlaybackView::OnChanged(int id, Evas_Object *obj) -{ - switch (id) { - case EO_SLIDER: - { - char *timestr = NULL; - int value; - - if (m->hMusicController->PlayState() == PLAY_STATUS_PLAY) { - if (m->etSlider) - ecore_timer_freeze(m->etSlider); - } - - value = elm_slider_value_get(obj); - m->hMusicController->SetPosition(value); - timestr = CCommonUI::TimeStrFromMilSeconds(value); - if (timestr) { - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, - timestr); - free(timestr); - } - - if (m->hMusicController->PlayState() == PLAY_STATUS_PLAY) { - if (m->etSlider) - ecore_timer_thaw(m->etSlider); - } - } - break; - - default: - break; - } -} - - void CPlaybackView::OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item) { switch (id) { @@ -2151,3 +2307,15 @@ void CPlaybackView::OnUsbStatusChanged(SUsbStorageStatus status) void CPlaybackView::OnUpdateContent(void) { } + + +void CPlaybackView::OnStartPlayback(void) +{ + m_UpdateCurrentSongInfo(); +} + + +void CPlaybackView::OnStopPlayback(void) +{ + m_UpdateCurrentSongInfo(); +} diff --git a/src/views/playlist-layout.cpp b/src/views/playlist-layout.cpp index 4327d63..7187c34 100644 --- a/src/views/playlist-layout.cpp +++ b/src/views/playlist-layout.cpp @@ -65,16 +65,21 @@ void CPlaylistLayout::m_OnEntryRename(const char *name) t.epopup->Destroy(); - if (CMusicController::GetInstance()->MediaExistPlaylist(str)) { + CMusicController mc; + mc.Create(); + + if (mc.MediaExistPlaylist(str)) { CCommonUI::CreateMsgBox(Layout(), MUSIC_TEXT_INUSE_MSG); elm_object_item_focus_set(t.focused_item, EINA_TRUE); free(str); + mc.Destroy(); return; } - if (!CMusicController::GetInstance()->MediaRenamePlaylist(id, str)) + if (!mc.MediaRenamePlaylist(id, str)) _ERR(" Rename playlist failed "); + mc.Destroy(); t.depth = E_DEPTH_CATEGORY; t_UpdateLayoutWithFocus(); } @@ -110,8 +115,11 @@ void CPlaylistLayout::m_PlaylistCtxtAction(EActionType type) case ACTION_TYPE_DELETE: { id = catinfo->CategoryId(); - if (!CMusicController::GetInstance()->MediaDeletePlaylist(id)) + CMusicController mc; + mc.Create(); + if (!mc.MediaDeletePlaylist(id)) _ERR(" Delete playlist failed "); + mc.Destroy(); t_UpdateLayout(false); elm_object_focus_set(t.grid, EINA_TRUE); @@ -180,7 +188,11 @@ void CPlaylistLayout::t_HandleItemSelect(SCatItemInfo *itinfo) bool CPlaylistLayout::t_GetMediaList(Eina_List **list) { - return CMusicController::GetInstance()->MediaGetList(LIST_TYPE_PLAYLISTS, NULL, list); + CMusicController mc; + mc.Create(); + bool ret = mc.MediaGetList(LIST_TYPE_PLAYLISTS, NULL, list); + mc.Destroy(); + return ret; } diff --git a/src/views/song-layout.cpp b/src/views/song-layout.cpp index 8e4f1dd..e60acea 100644 --- a/src/views/song-layout.cpp +++ b/src/views/song-layout.cpp @@ -56,7 +56,7 @@ struct SSongLayout { Eina_List *slist; Eina_List *it_infolist; Elm_Genlist_Item_Class *item_class; - CMusicController *mhandle; + CMusicController *pController; CLayoutMgr* mgr; CViewMgr* vmgr; SContentInfo *ctxtinfo; @@ -204,7 +204,7 @@ void CSongLayout::m_OnCtxtUpdate(EActionType type, int lid) break; case ACTION_TYPE_ADDTO: - if (m->mhandle->MediaAddsongsPlaylist(lid, list)) + if (m->pController->MediaAddsongsPlaylist(lid, list)) CCommonUI::CreateMsgBox(m->base, MUSIC_TEXT_ADDTO_MSG); else _ERR(" Adding songs to playlist failed "); @@ -216,12 +216,12 @@ void CSongLayout::m_OnCtxtUpdate(EActionType type, int lid) break; } - m->mhandle->UpdatePlaylist(list, mode); + m->pController->UpdatePlaylist(list, mode); eina_list_free(list); if (type == ACTION_TYPE_PLAY) { - m->mhandle->Stop(); - m->mhandle->SetCurrentSong(((CSongInfo *)m->ctxtinfo->context)->Id()); + m->pController->Stop(); + m->pController->SetCurrentSong(((CSongInfo *)m->ctxtinfo->context)->Id()); } CCommonUI::UpdatePlaybackView(mode, Layout(), m->focused_item); @@ -266,9 +266,9 @@ void CSongLayout::m_OnItemSelect(Evas_Object *obj, void *event_info) mediaId = itinfo->sinfo->Id(); - m->mhandle->Stop(); - m->mhandle->UpdatePlaylist(m->slist, ADD_TYPE_FRESH); - m->mhandle->SetCurrentSong(mediaId); + m->pController->Stop(); + m->pController->UpdatePlaylist(m->slist, ADD_TYPE_FRESH); + m->pController->SetCurrentSong(mediaId); m_GotoPlayback(); @@ -381,7 +381,7 @@ void CSongLayout::m_UpdateSongList(bool sort_flag) m_EmptySongList(sort_flag); if (!sort_flag) { - r = m->mhandle->MediaGetList(LIST_TYPE_SONG, NULL, &(m->slist)); + r = m->pController->MediaGetList(LIST_TYPE_SONG, NULL, &(m->slist)); if (r == false || eina_list_count(m->slist) == 0) { _ERR(" Fetching song list from media failed "); @@ -461,7 +461,7 @@ void CSongLayout::m_GotoPlayback(void) void CSongLayout::m_GotoPlaybackUri(void) { Eina_List *list = NULL; - CSongInfo *sinfo = m->mhandle->MediaSongByUri(m->uri); + CSongInfo *sinfo = m->pController->MediaSongByUri(m->uri); if (!sinfo) { _ERR(" Fetching song list from uri failed "); return; @@ -471,7 +471,7 @@ void CSongLayout::m_GotoPlaybackUri(void) if (!list) return; - m->mhandle->UpdatePlaylist(list, ADD_TYPE_FRESH); + m->pController->UpdatePlaylist(list, ADD_TYPE_FRESH); eina_list_free(list); @@ -519,18 +519,15 @@ bool CSongLayout::Create(CLayoutMgr *mgr, const char *uri) ASSERT(mgr); _CREATE_BEGIN{ - Evas_Object *base = NULL; - Evas_Object *win = NULL; Evas_Object *layout = NULL; - CMusicController *mhandle = NULL; - CViewMgr *vmgr = NULL; _CHECK(m = new SSongLayout) - _CHECK(vmgr = CViewMgr::GetInstance()) - _CHECK(base = mgr->Base()) - _CHECK(win = vmgr->Window()) - _CHECK(mhandle = CMusicController::GetInstance()) - _CHECK(layout = CCommonUI::AddBase(base, MUSIC_SONG_LAYOUT)) + _CHECK(m->vmgr = CViewMgr::GetInstance()) + _CHECK(m->base = mgr->Base()) + _CHECK(m->win = m->vmgr->Window()) + _CHECK(m->pController = new CMusicController) + _CHECK(m->pController->Create()) + _CHECK(layout = CCommonUI::AddBase(m->base, MUSIC_SONG_LAYOUT)) _CHECK(CExtBaseLayout::Create(layout)) _WHEN_SUCCESS{ @@ -546,10 +543,6 @@ bool CSongLayout::Create(CLayoutMgr *mgr, const char *uri) else m->uri = NULL; - m->win = win; - m->base = base; - m->vmgr = vmgr; - m->mhandle = mhandle; m->mgr = mgr; m_CreateSongList(); @@ -565,16 +558,18 @@ bool CSongLayout::Create(CLayoutMgr *mgr, const char *uri) _CHECK_FAIL{ CExtBaseLayout::Destroy(); } _CHECK_FAIL{ evas_object_del(layout); } - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} - _CHECK_FAIL{} + _CHECK_FAIL{ m->pController->Destroy(); } + _CHECK_FAIL{ delete m->pController; } + _CHECK_FAIL{ /* Window */ } + _CHECK_FAIL{ /* Base */ } + _CHECK_FAIL{ /* GetInstance() */ } _CHECK_FAIL{ delete m; m = NULL; } } _CREATE_END_AND_CATCH{ return false; } return true; } + void CSongLayout::Destroy(void) { ASSERT(m); @@ -587,6 +582,9 @@ void CSongLayout::Destroy(void) free(m->ctxtinfo); delete[] m->uri; + + m->pController->Destroy(); + delete m->pController; delete m; m = NULL; } -- 2.7.4 From 52bbc3f5f5e2ae96bf188512efa94fbed2d57dd8 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Tue, 14 Apr 2015 12:05:34 +0900 Subject: [PATCH 06/16] Fix runtime error due to the refactoring Change-Id: Ic4e6ad6da18366711da60464d9ea93b9ba435365 Signed-off-by: Kim Tae Soo --- include/playback-view.h | 2 - src/views/album-layout.cpp | 5 +- src/views/base-view.cpp | 119 +++++++++++++++++-------------------------- src/views/playback-view.cpp | 120 +++++++++++++++++++++++++++++++------------- 4 files changed, 133 insertions(+), 113 deletions(-) diff --git a/include/playback-view.h b/include/playback-view.h index 4d52667..914c6d2 100644 --- a/include/playback-view.h +++ b/include/playback-view.h @@ -109,8 +109,6 @@ private: struct SPlaybackView* m; private: - //static Eina_Bool sm_CbUpdateSlider(void *dt); - static Eina_Bool sm_CbLongpressTimer(void *dt); void m_OnLongpressTimer(void); diff --git a/src/views/album-layout.cpp b/src/views/album-layout.cpp index e12f4b5..3641a11 100644 --- a/src/views/album-layout.cpp +++ b/src/views/album-layout.cpp @@ -453,7 +453,6 @@ bool CAlbumLayout::Create(CLayoutMgr *mgr, const char *albumId) _CREATE_BEGIN{ Evas_Object *layout = NULL; - CAlbumSongsLayout *layoutAlbumSongs = NULL; SParcel parcel; _CHECK(m = new SAlbumLayout) @@ -466,7 +465,7 @@ bool CAlbumLayout::Create(CLayoutMgr *mgr, const char *albumId) _CHECK(CExtBaseLayout::Create(layout)) _CHECK(m->layoutAlbumSongs = new CAlbumSongsLayout(MUSIC_ALBUM_SONGS_LAYOUT)) _CHECK(m->layoutAlbumSongs->Create(mgr)) - _CHECK(mgr->AddLayout(layoutAlbumSongs)) + _CHECK(mgr->AddLayout(m->layoutAlbumSongs)) _WHEN_SUCCESS{ if (albumId) { @@ -490,7 +489,7 @@ bool CAlbumLayout::Create(CLayoutMgr *mgr, const char *albumId) m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); } - _CHECK_FAIL{ mgr->RemoveLayout(layoutAlbumSongs); } + _CHECK_FAIL{ mgr->RemoveLayout(m->layoutAlbumSongs); } _CHECK_FAIL{ m->layoutAlbumSongs->Destroy(); } _CHECK_FAIL{ delete m->layoutAlbumSongs; } _CHECK_FAIL{ CExtBaseLayout::Destroy(); } diff --git a/src/views/base-view.cpp b/src/views/base-view.cpp index 9675994..b93bf68 100644 --- a/src/views/base-view.cpp +++ b/src/views/base-view.cpp @@ -733,70 +733,45 @@ bool CMusicBaseView::Create(void *data) ASSERT(!m); _CREATE_BEGIN{ - Evas_Object *win = NULL; - Evas_Object *base = NULL; - CMusicController *pController = NULL; - CLayoutMgr *lmgr = NULL; - CSongLayout *layoutSong = NULL; - CAlbumLayout *layoutAlbum = NULL; - CArtistLayout*layoutArtist = NULL; - CGenreLayout *layoutGenre = NULL; - CPlaylistLayout *layoutPlaylists = NULL; - CFolderLayout *layoutFolder = NULL; - CHandleVolume *handleVolume = NULL; - _CHECK(m = new SMusicBaseView) - _CHECK(win = CViewMgr::GetInstance()->Window()) + _CHECK(m->win = CViewMgr::GetInstance()->Window()) _CHECK(m->pController = new CMusicController) _CHECK(m->pController->Create()) - _CHECK(base = CCommonUI::AddBase(win, MUSIC_BASE_VIEW)) - _CHECK(lmgr = new CLayoutMgr) - _CHECK(lmgr->Create(base, NULL)) + _CHECK(m->base = CCommonUI::AddBase(m->win, MUSIC_BASE_VIEW)) + _CHECK(m->lmgr = new CLayoutMgr) + _CHECK(m->lmgr->Create(m->base, NULL)) _CHECK(CBaseView::Create(data)) - _CHECK(layoutSong = new CSongLayout(MUSIC_SONG_LAYOUT)) - _CHECK(layoutSong->Create(lmgr, m_Argument(data))) - _CHECK(lmgr->AddLayout(layoutSong)) - _CHECK(layoutAlbum = new CAlbumLayout(MUSIC_ALBUM_LAYOUT)) - _CHECK(layoutAlbum->Create(lmgr, m_Argument(data))) - _CHECK(lmgr->AddLayout(layoutAlbum)) - _CHECK(layoutArtist = new CArtistLayout(MUSIC_CATEGORY_ARTIST_LAYOUT)) - _CHECK(layoutArtist->Create(lmgr)) - _CHECK(lmgr->AddLayout(layoutArtist)) - _CHECK(layoutGenre = new CGenreLayout(MUSIC_CATEGORY_GENRE_LAYOUT)) - _CHECK(layoutGenre->Create(lmgr)) - _CHECK(lmgr->AddLayout(layoutGenre)) - _CHECK(layoutPlaylists = new CPlaylistLayout(MUSIC_CATEGORY_PLAYLISTS_LAYOUT)) - _CHECK(layoutPlaylists->Create(lmgr)) - _CHECK(lmgr->AddLayout(layoutPlaylists)) - _CHECK(layoutFolder = new CFolderLayout(MUSIC_FOLDER_LAYOUT)) - _CHECK(layoutFolder->Create(lmgr)) - _CHECK(lmgr->AddLayout(layoutFolder)) - _CHECK(handleVolume = new CHandleVolume) - _CHECK(handleVolume->Create(base)) - _CHECK(pController->AddListener(this)) + _CHECK(m->layoutSong = new CSongLayout(MUSIC_SONG_LAYOUT)) + _CHECK(m->layoutSong->Create(m->lmgr, m_Argument(data))) + _CHECK(m->lmgr->AddLayout(m->layoutSong)) + _CHECK(m->layoutAlbum = new CAlbumLayout(MUSIC_ALBUM_LAYOUT)) + _CHECK(m->layoutAlbum->Create(m->lmgr, m_Argument(data))) + _CHECK(m->lmgr->AddLayout(m->layoutAlbum)) + _CHECK(m->layoutArtist = new CArtistLayout(MUSIC_CATEGORY_ARTIST_LAYOUT)) + _CHECK(m->layoutArtist->Create(m->lmgr)) + _CHECK(m->lmgr->AddLayout(m->layoutArtist)) + _CHECK(m->layoutGenre = new CGenreLayout(MUSIC_CATEGORY_GENRE_LAYOUT)) + _CHECK(m->layoutGenre->Create(m->lmgr)) + _CHECK(m->lmgr->AddLayout(m->layoutGenre)) + _CHECK(m->layoutPlaylists = new CPlaylistLayout(MUSIC_CATEGORY_PLAYLISTS_LAYOUT)) + _CHECK(m->layoutPlaylists->Create(m->lmgr)) + _CHECK(m->lmgr->AddLayout(m->layoutPlaylists)) + _CHECK(m->layoutFolder = new CFolderLayout(MUSIC_FOLDER_LAYOUT)) + _CHECK(m->layoutFolder->Create(m->lmgr)) + _CHECK(m->lmgr->AddLayout(m->layoutFolder)) + _CHECK(m->pHandleVolume = new CHandleVolume) + _CHECK(m->pHandleVolume->Create(m->base)) + _CHECK(m->pController->AddListener(this)) _WHEN_SUCCESS{ - m->base = base; - m->win = win; - m->pController = pController; - m->lmgr = lmgr; m->fresh_view = true; m->arglist = (SArgList *)data; - m->layoutSong = layoutSong; - m->layoutAlbum = layoutAlbum; - m->layoutArtist = layoutArtist; - m->layoutGenre = layoutGenre; - m->layoutPlaylists = layoutPlaylists; - m->layoutFolder = layoutFolder; - m->layoutAlbum->SetEmptyStatusHandleCallback(sm_CbHandleEmptyStatus, this); m->layoutArtist->SetEmptyStatusHandleCallback(sm_CbHandleEmptyStatus, this); m->layoutGenre->SetEmptyStatusHandleCallback(sm_CbHandleEmptyStatus, this); m->layoutPlaylists->SetEmptyStatusHandleCallback(sm_CbHandleEmptyStatus, this); - m->pHandleVolume = handleVolume; - elm_object_part_content_unset(m->base, MUSIC_PART_CONTENT); m_SetSourceType(); evas_object_data_set(m->base, BASE_VIEW_DATA, m); @@ -808,29 +783,29 @@ bool CMusicBaseView::Create(void *data) } _CHECK_FAIL{ m->pController->RemoveListener(this); } - _CHECK_FAIL{ handleVolume->Destroy(); } - _CHECK_FAIL{ delete handleVolume; } - _CHECK_FAIL{ lmgr->RemoveLayout(layoutFolder); } - _CHECK_FAIL{ layoutFolder->Destroy(); } - _CHECK_FAIL{ delete layoutFolder; } - _CHECK_FAIL{ lmgr->RemoveLayout(layoutPlaylists); } - _CHECK_FAIL{ layoutPlaylists->Destroy(); } - _CHECK_FAIL{ delete layoutPlaylists; } - _CHECK_FAIL{ lmgr->RemoveLayout(layoutGenre); } - _CHECK_FAIL{ layoutGenre->Destroy(); } - _CHECK_FAIL{ delete layoutGenre; } - _CHECK_FAIL{ lmgr->RemoveLayout(layoutArtist); } - _CHECK_FAIL{ layoutArtist->Destroy(); } - _CHECK_FAIL{ delete layoutArtist; } - _CHECK_FAIL{ lmgr->RemoveLayout(layoutAlbum); } - _CHECK_FAIL{ layoutAlbum->Destroy(); } - _CHECK_FAIL{ delete layoutAlbum; } - _CHECK_FAIL{ lmgr->RemoveLayout(layoutSong); } - _CHECK_FAIL{ layoutSong->Destroy(); } - _CHECK_FAIL{ delete layoutSong; } + _CHECK_FAIL{ m->pHandleVolume->Destroy(); } + _CHECK_FAIL{ delete m->pHandleVolume; } + _CHECK_FAIL{ m->lmgr->RemoveLayout(m->layoutFolder); } + _CHECK_FAIL{ m->layoutFolder->Destroy(); } + _CHECK_FAIL{ delete m->layoutFolder; } + _CHECK_FAIL{ m->lmgr->RemoveLayout(m->layoutPlaylists); } + _CHECK_FAIL{ m->layoutPlaylists->Destroy(); } + _CHECK_FAIL{ delete m->layoutPlaylists; } + _CHECK_FAIL{ m->lmgr->RemoveLayout(m->layoutGenre); } + _CHECK_FAIL{ m->layoutGenre->Destroy(); } + _CHECK_FAIL{ delete m->layoutGenre; } + _CHECK_FAIL{ m->lmgr->RemoveLayout(m->layoutArtist); } + _CHECK_FAIL{ m->layoutArtist->Destroy(); } + _CHECK_FAIL{ delete m->layoutArtist; } + _CHECK_FAIL{ m->lmgr->RemoveLayout(m->layoutAlbum); } + _CHECK_FAIL{ m->layoutAlbum->Destroy(); } + _CHECK_FAIL{ delete m->layoutAlbum; } + _CHECK_FAIL{ m->lmgr->RemoveLayout(m->layoutSong); } + _CHECK_FAIL{ m->layoutSong->Destroy(); } + _CHECK_FAIL{ delete m->layoutSong; } _CHECK_FAIL{ CBaseView::Destroy(); } - _CHECK_FAIL{ lmgr->Destroy(); } - _CHECK_FAIL{ delete lmgr; } + _CHECK_FAIL{ m->lmgr->Destroy(); } + _CHECK_FAIL{ delete m->lmgr; } _CHECK_FAIL{ evas_object_del(m->base); } _CHECK_FAIL{ m->pController->Destroy(); } _CHECK_FAIL{ delete m->pController; } diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index a989cbf..444ba46 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -174,6 +174,7 @@ bool CSliderWidget::Create(Evas_Object *eoBase) _CREATE_BEGIN{ _CHECK(m = new SSliderWidget) + _COMMAND{ m->eoBase = eoBase; } _CHECK(m->controller.Create()) _CHECK(m->controller.AddListener(this)) _CHECK(m_AddSlider()) @@ -453,7 +454,6 @@ struct SPlaybackView { Evas_Object *eoBtnEdit[TOTAL_EDIT_BTNS]; Evas_Object *eoAlbumCover; - //Evas_Object *eoSlider; CSliderWidget *pSliderWidget; Evas_Object *eoPressedObj; @@ -504,7 +504,6 @@ enum EEditBtns { }; enum ETimers { - //TIMER_SLIDER, TIMER_WAIT, TIMER_LONGPRESS, TIMER_VOLUME @@ -771,41 +770,74 @@ void CPlaybackView::m_UpdateControlBtns(void) int state; state = m->pController->PlayState(); - if (state != PLAY_STATUS_STOP) { - elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_FALSE); - elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_FALSE); - } - else { + switch (state) { + case PLAY_STATUS_INITIAL: + // Initial State, Do nothing + break; + + case PLAY_STATUS_STOP: if (!m->eoErrPopup) - elm_object_focus_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE); + elm_object_focus_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE); elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_TRUE); - elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_TRUE); - } + elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_TRUE); + break; - if (state == PLAY_STATUS_PLAY) { - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); - } - else { - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); + case PLAY_STATUS_PLAY: + elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_FALSE); + elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_FALSE); + elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], + MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); + break; + + case PLAY_STATUS_PAUSE: + elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_FALSE); + elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_FALSE); + elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], + MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); + break; + + default: + ASSERT(!"Invalid State"); + break; } state = m->pController->ShuffleState(); - if (state == SHUFFLE_STATUS_OFF) { - elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); - } - else { - elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); + switch (state) { + case SHUFFLE_STATUS_OFF: + elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], + MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); + break; + + case SHUFFLE_STATUS_ON: + elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], + MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); + break; + + default: + ASSERT(!"Invalid State"); + break; } state = m->pController->RepeatState(); - if (state == REPEAT_STATUS_NONE) { - elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); - } - else if (state == REPEAT_STATUS_ALL) { - elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], MUSIC_SIGNAL_REPEAT_ALL, MUSIC_PLAYBACK_VIEW); - } - else { - elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], MUSIC_SIGNAL_REPEAT_ONE, MUSIC_PLAYBACK_VIEW); + switch (state) { + case REPEAT_STATUS_NONE: + elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], + MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); + break; + + case REPEAT_STATUS_ALL: + elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], + MUSIC_SIGNAL_REPEAT_ALL, MUSIC_PLAYBACK_VIEW); + break; + + case REPEAT_STATUS_ONE: + elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], + MUSIC_SIGNAL_REPEAT_ONE, MUSIC_PLAYBACK_VIEW); + break; + + default: + ASSERT(!"Invalid State"); + break; } } @@ -930,17 +962,32 @@ void CPlaybackView::m_UpdatePlaymodeFocusSequence(void) { elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoPlaylist, ELM_FOCUS_UP); elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoBtnControl[BTN_PLAY], ELM_FOCUS_DOWN); - if (m->pController->PlayState() == PLAY_STATUS_STOP) { + switch (m->pController->PlayState()) { + case PLAY_STATUS_INITIAL: + // Do nothing + break; + + case PLAY_STATUS_STOP: elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnControl[BTN_PLAY], ELM_FOCUS_LEFT); elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], m->eoPlaylist, ELM_FOCUS_RIGHT); - } - else { + elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], m->eoBtnControl[BTN_REPEAT], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnControl[BTN_REPEAT], m->eoBtnControl[BTN_PLAY], ELM_FOCUS_RIGHT); + elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); + break; + + case PLAY_STATUS_PLAY: + case PLAY_STATUS_PAUSE: elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnControl[BTN_FORWARD], ELM_FOCUS_LEFT); elm_object_focus_next_object_set(m->eoBtnControl[BTN_FORWARD], m->eoPlaylist, ELM_FOCUS_RIGHT); elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], m->eoBtnControl[BTN_FORWARD], ELM_FOCUS_RIGHT); + break; + + default: + ASSERT(!"Invalid State"); + break; } } @@ -969,7 +1016,6 @@ void CPlaybackView::m_UpdateCurrentSongInfo(void) m_UpdateCurrentSongItem(index); m_UpdateCurrentSongLabels(); m_UpdateCurrentSongThumbnail(); - //m_UpdateCurrentSongProgressbar(); m_UpdateControlBtns(); m_UpdatePlaymodeFocusSequence(); } @@ -1121,7 +1167,7 @@ void CPlaybackView::m_HandleOnRepeated(void) obj = m->eoPressedObj; - m->pController->GetPosition(&value); //value = elm_slider_value_get(m->eoSlider); + m->pController->GetPosition(&value); duration = m->cs_itinfo->sinfo->Duration(); if (obj == m->eoBtnControl[BTN_REWIND]) { @@ -1167,6 +1213,7 @@ void CPlaybackView::m_DeleteSelectedItems(void) Eina_List *l = NULL, *l_next = NULL; SItemInfo *pItemInfo = NULL; void *obj = NULL; + bool updateFlag = false; int index; m_DisableEditButtons(true); @@ -1174,6 +1221,7 @@ void CPlaybackView::m_DeleteSelectedItems(void) pItemInfo = (SItemInfo *)obj; if (pItemInfo->check_status) { if (m->cs_itinfo == pItemInfo) { + updateFlag = true; m_UnselectItem(m->cs_itinfo); m->cs_itinfo = NULL; m->pController->SetPlayState(PLAY_STATUS_STOP); @@ -1194,6 +1242,9 @@ void CPlaybackView::m_DeleteSelectedItems(void) return; } + if (updateFlag) + m_UpdateCurrentSongInfo(); + elm_genlist_realized_items_update(m->eoPlaylist); elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); } @@ -1203,7 +1254,6 @@ void CPlaybackView::m_KeyBackPress(void) { if (m->eoCtxPopup) { m_DestroySettingsPopup(); - //elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_FALSE); elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_TRUE); return; } @@ -1360,7 +1410,6 @@ void CPlaybackView::m_AddCurrentSonginfo(void) m->pSliderWidget = new CSliderWidget; m->pSliderWidget->Create(m->eoBase); - //m_AddSlider(); } @@ -2317,5 +2366,4 @@ void CPlaybackView::OnStartPlayback(void) void CPlaybackView::OnStopPlayback(void) { - m_UpdateCurrentSongInfo(); } -- 2.7.4 From efe37d84885bf82ace25ed952e49be304a3f7b25 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Tue, 14 Apr 2015 22:38:45 +0900 Subject: [PATCH 07/16] Clean the source code Change-Id: I4972e6b7c9ce8d974dc869f37ea14fac64731d2d Signed-off-by: Kim Tae Soo --- res/edc/views/message-layout.edc | 1 + src/playback/MusicControllerImpl.cpp | 8 +- src/views/PlayListCtxPopup.cpp | 3 - src/views/category-layout.cpp | 16 +--- src/views/playback-view.cpp | 177 ++++++++++++++++------------------- 5 files changed, 88 insertions(+), 117 deletions(-) diff --git a/res/edc/views/message-layout.edc b/res/edc/views/message-layout.edc index b6e4603..1fb91ad 100644 --- a/res/edc/views/message-layout.edc +++ b/res/edc/views/message-layout.edc @@ -13,6 +13,7 @@ group { rel2.relative: 0.0 0.0; min: 960 1080-127; align: 0 0; + fixed: 1 1; visible: 0; } } diff --git a/src/playback/MusicControllerImpl.cpp b/src/playback/MusicControllerImpl.cpp index b09863d..e1f4e51 100644 --- a/src/playback/MusicControllerImpl.cpp +++ b/src/playback/MusicControllerImpl.cpp @@ -242,14 +242,12 @@ bool CMusicControllerImpl::Start(void) _CHECK(pPlayback->SetUri(songpath)) _CHECK(pPlayback->Prepare()) _CHECK(pPlayback->Start()) - _COMMAND{ m->statePlay = PLAY_STATUS_PLAY; } - _CHECK(m->pPlaylist->GetSonginfoFromIndex(index, &sinfo)) - _CHECK(media_id = sinfo->Id()) - _CHECK(m->pMediadata->SetPlayedTime(media_id)) + _CHECK(media_id = sinfo->Id()) + _CHECK(m->pMediadata->SetPlayedTime(media_id)) - _WHEN_SUCCESS{ + _WHEN_SUCCESS{ bus_send_signal(); } diff --git a/src/views/PlayListCtxPopup.cpp b/src/views/PlayListCtxPopup.cpp index 07f9b5a..e292200 100644 --- a/src/views/PlayListCtxPopup.cpp +++ b/src/views/PlayListCtxPopup.cpp @@ -120,9 +120,6 @@ void CPlayListCtxPopup::m_DeleteBtnString(void) bool CPlayListCtxPopup::Create(Evas_Object* base, const SCallback* callback, Eina_List *playList) { - //Eina_List *l = NULL; - //SCtxtPlaylistItem *item = NULL; - _CREATE_BEGIN{ _CHECK(m = new SPlayListCtxPopup) _CHECK(m->listSize = eina_list_count(playList)) diff --git a/src/views/category-layout.cpp b/src/views/category-layout.cpp index b70ee58..1c7f311 100644 --- a/src/views/category-layout.cpp +++ b/src/views/category-layout.cpp @@ -181,34 +181,26 @@ void CCategoryLayout::sm_CbEntrynameSet(void *dt, const char *name) void CCategoryLayout::m_OnEntrynameSet(const char *name) { Eina_List *idlist = NULL; - char *str = NULL; - - if (!name) - return; + ASSERT(name); idlist = m_GetSelectedList(m->layoutCatSongs->CategorySongItemInfoList(), (int)ID_TYPE_MEDIA); - str = strdup(name); t.epopup->Destroy(); - if (!strcmp(str, MUSIC_STR_EMPTY)) { + if (!strcmp(name, MUSIC_STR_EMPTY)) { CCommonUI::CreateMsgBox(Layout(), MUSIC_TEXT_EMPTY_NAME); - free(str); return; } - if (m->pController->MediaExistPlaylist(str)) { + if (m->pController->MediaExistPlaylist(name)) { CCommonUI::CreateMsgBox(Layout(), MUSIC_TEXT_INUSE_MSG); - free(str); return; } - if (!m->pController->MediaInsertPlaylist(str, idlist)) { + if (!m->pController->MediaInsertPlaylist(name, idlist)) { _ERR("Playlist creation failed "); - free(str); return; } - free(str); t.depth = E_DEPTH_CATEGORY; t_UpdateLayoutWithFocus(); diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 444ba46..5946798 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -39,21 +39,17 @@ #include "Info.h" -#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) -#define TITLE_FONT_SIZE 50 -#define ARTIST_FONT_SIZE 30 -#define TOTAL_CONTROL_BTNS 6 -#define TOTAL_EDIT_BTNS 3 -#define S_INTERVAL 1 /* seconds */ -#define LP_INTERVAL 0.5 /* seconds */ -#define WAIT_INTERVAL 0.5 /* seconds */ -#define SLIDER_STEP 5000 /* milli seconds */ -#define LP_CHANGE 10000 /* milli seconds */ -#define S_INCREMENT 1000 /* milli seconds */ - - -//////////////////////////////////////////////////////////////////////////////// -// +#define TOTAL_CONTROL_BTNS 6 +#define TOTAL_EDIT_BTNS 3 +#define S_INTERVAL 1 /* seconds */ +#define LP_INTERVAL 0.5 /* seconds */ +#define WAIT_INTERVAL 0.5 /* seconds */ +#define SLIDER_STEP 5000 /* milli seconds */ +#define LP_CHANGE 10000 /* milli seconds */ +#define S_INCREMENT 1000 /* milli seconds */ + + +// SSliderWidget struct SSliderWidget { Evas_Object *eoSlider; Evas_Object *eoBase; @@ -312,10 +308,9 @@ void CSliderWidget::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mo if (!elm_object_focus_get(obj)) elm_object_focus_set(obj, EINA_TRUE); } -// -//////////////////////////////////////////////////////////////////////////////// +// STimer struct STimer { int count; int s, e; @@ -394,15 +389,10 @@ bool CTimer::SetTimer(int id, int ms) void CTimer::KillTimer(int id) { ASSERT(m); - - } - - - - +// CPlaybackView enum EEvasObject { EO_BASE, @@ -423,14 +413,31 @@ enum EEvasObject { }; -struct SItemInfo { - Elm_Object_Item *item; - CSongInfo *sinfo; - bool edit_mode; - bool check_status; - bool select_status; +enum EControlBtns { + BTN_SETTINGS, + BTN_SHUFFLE, + BTN_REPEAT, + BTN_REWIND, + BTN_PLAY, + BTN_FORWARD }; +enum ESettingBtns { + BTN_EDIT, + BTN_CLEAR +}; + +enum EEditBtns { + BTN_CANCEL, + BTN_DESELECT, + BTN_DELETE +}; + +enum ETimers { + TIMER_WAIT, + TIMER_LONGPRESS, + TIMER_VOLUME +}; enum EPressTypes { PRESS_SHORT, @@ -439,6 +446,13 @@ enum EPressTypes { PRESS_LONG_PAUSE, }; +struct SItemInfo { + Elm_Object_Item *item; + CSongInfo *sinfo; + bool edit_mode; + bool check_status; + bool select_status; +}; struct SPlaybackView { Evas_Object *eoWin; @@ -472,8 +486,6 @@ struct SPlaybackView { SPlaybackView() { memset(this, 0, sizeof(SPlaybackView)); } - ~SPlaybackView() { - } }; struct SBtnInfo { @@ -483,34 +495,6 @@ struct SBtnInfo { }; -enum EControlBtns { - BTN_SETTINGS, - BTN_SHUFFLE, - BTN_REPEAT, - BTN_REWIND, - BTN_PLAY, - BTN_FORWARD -}; - -enum ESettingBtns { - BTN_EDIT, - BTN_CLEAR -}; - -enum EEditBtns { - BTN_CANCEL, - BTN_DESELECT, - BTN_DELETE -}; - -enum ETimers { - TIMER_WAIT, - TIMER_LONGPRESS, - TIMER_VOLUME -}; - - - Eina_Bool CPlaybackView::sm_CbLongpressTimer(void *dt) { CPlaybackView *root = (CPlaybackView *)dt; @@ -2101,52 +2085,51 @@ void CPlaybackView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_ Elm_Object_Item *it = NULL; SContentInfo *ctxtinfo = NULL; SItemInfo *itinfo = NULL; + SParcel parcel; - if (strcmp(ev->keyname, KEY_MENU) && - strcmp(ev->keyname, KEY_MENU_REMOTE)) - return; - - it = elm_object_focused_item_get(obj); - if (!it) { - _ERR(" unable to get focused item "); - return; - } - m->focused_item = it; + if (!strcmp(ev->keyname, KEY_MENU) || + !strcmp(ev->keyname, KEY_MENU_REMOTE)) { + it = elm_object_focused_item_get(obj); + if (!it) { + _ERR(" unable to get focused item "); + return; + } + m->focused_item = it; - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; - itinfo = m_FindItemInfoFromItem(m->elInfo, it); - if (!itinfo) { - free(ctxtinfo); - return; - } + itinfo = m_FindItemInfoFromItem(m->elInfo, it); + if (!itinfo) { + free(ctxtinfo); + return; + } - if (m->pController->PlayState() == PLAY_STATUS_PLAY && - itinfo == m->cs_itinfo) - ctxtinfo->status = PLAY_STATUS_PLAY; - else - ctxtinfo->status = PLAY_STATUS_PAUSE; + if (m->pController->PlayState() == PLAY_STATUS_PLAY && + itinfo == m->cs_itinfo) + ctxtinfo->status = PLAY_STATUS_PLAY; + else + ctxtinfo->status = PLAY_STATUS_PAUSE; - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - ctxtinfo->type = CONTEXT_TYPE_PLAYSONG; - ctxtinfo->context = itinfo->sinfo; + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + ctxtinfo->type = CONTEXT_TYPE_PLAYSONG; + ctxtinfo->context = itinfo->sinfo; - m->ctxtinfo = ctxtinfo; + m->ctxtinfo = ctxtinfo; - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->mgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->mgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + } } default: -- 2.7.4 From 8ca728f1d2b9ac94e3c35510d371f4b1dc1a78e2 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Mon, 20 Apr 2015 11:50:20 +0900 Subject: [PATCH 08/16] Modification due to the refactoring of application-common Change-Id: I6f08e3c6385d1b9ef0d583d732cdcc2986224acc Signed-off-by: Kim Tae Soo --- include/ExtBaseLayout.h | 2 -- include/FolderStorage.h | 1 - include/album_info.h | 1 - include/base-view.h | 7 ++----- include/category_info.h | 3 --- include/common-ui.h | 2 -- include/context-view.h | 20 ++++++++------------ include/folder_info.h | 2 -- include/mediadata.h | 7 ++----- include/music-controller.h | 4 ---- include/playback-mgr.h | 1 - include/playback-view.h | 7 ++----- include/playlist-mgr.h | 4 ---- include/song_info.h | 2 -- include/volume-control.h | 1 - src/data/AlbumStorage.cpp | 2 +- src/data/CategoryStorage.cpp | 2 +- src/data/album_info.cpp | 2 +- src/data/category_info.cpp | 3 +-- src/data/folder_info.cpp | 3 +-- src/data/mediadata.cpp | 9 ++++----- src/data/song_info.cpp | 2 +- src/main.cpp | 10 +--------- src/playback/MusicControllerImpl.cpp | 9 ++++----- src/playback/MusicControllerImpl.h | 2 +- src/playback/playback-mgr.cpp | 2 +- src/playback/playlist-mgr.cpp | 3 +-- src/views/ExtBaseLayout.cpp | 7 +------ src/views/HandleVolume.cpp | 1 - src/views/Info.cpp | 6 ++---- src/views/PlayListCtxPopup.cpp | 19 ++++++------------- src/views/PlayListCtxPopup.h | 3 +-- src/views/PlaySettingCtxPopup.cpp | 14 ++++---------- src/views/PlaySettingCtxPopup.h | 3 +-- src/views/RemovePopupWindow.cpp | 8 ++------ src/views/RemovePopupWindow.h | 4 +--- src/views/SortCtxPopup.cpp | 15 +++++---------- src/views/SortCtxPopup.h | 2 +- src/views/SourceCtxPopup.cpp | 13 ++++--------- src/views/SourceCtxPopup.h | 2 +- src/views/album-layout.cpp | 13 +------------ src/views/album-songs-layout.cpp | 10 +--------- src/views/artist-layout.cpp | 8 +------- src/views/base-view.cpp | 18 ++++-------------- src/views/category-layout.cpp | 10 +--------- src/views/category-songs-layout.cpp | 11 ++--------- src/views/common-ui.cpp | 5 +---- src/views/context-view.cpp | 28 +++++++++++----------------- src/views/entry-popup.cpp | 7 +++---- src/views/folder-layout.cpp | 10 +--------- src/views/genre-layout.cpp | 8 +------- src/views/playback-view.cpp | 17 +++++------------ src/views/playlist-layout.cpp | 9 +-------- src/views/song-layout.cpp | 10 +--------- 54 files changed, 95 insertions(+), 279 deletions(-) diff --git a/include/ExtBaseLayout.h b/include/ExtBaseLayout.h index 224aa56..f9d6f0a 100644 --- a/include/ExtBaseLayout.h +++ b/include/ExtBaseLayout.h @@ -17,8 +17,6 @@ #ifndef __EXT_BASE_LAYOUT_H__ #define __EXT_BASE_LAYOUT_H -#include "BaseLayout.h" - class CExtBaseLayout : public CBaseLayout { private: bool m_bEmptyStatus; diff --git a/include/FolderStorage.h b/include/FolderStorage.h index ece70ce..b6ec191 100644 --- a/include/FolderStorage.h +++ b/include/FolderStorage.h @@ -14,7 +14,6 @@ * limitations under the License. */ - #ifndef __FOLDER_STORAGE_H__ #define __FOLDER_STORAGE_H__ diff --git a/include/album_info.h b/include/album_info.h index 49a9520..e9b4c94 100644 --- a/include/album_info.h +++ b/include/album_info.h @@ -17,7 +17,6 @@ #ifndef __ALBUM_INFO_H__ #define __ALBUM_INFO_H__ -#include class CAlbumInfo : public CExtNameInfo { private: diff --git a/include/base-view.h b/include/base-view.h index 0680e98..3a783ae 100644 --- a/include/base-view.h +++ b/include/base-view.h @@ -18,9 +18,6 @@ #define __MUSIC_BASE_VIEW_H__ -#include - - struct SArgList { char *album_id; char *uri; @@ -40,8 +37,8 @@ private: static void sm_CbHandleEmptyStatus(void *cookie, bool emptyStatus); void m_OnHandleEmptyStatus(bool emptyStatus); - static void sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, const char* text); - void m_CbCtxPopupBtnSelected(CCtxPopup* instance, const char* text); + static void sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text); + void m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text); static Eina_Bool sm_CbShowLayoutIdler(void *cookie); void m_OnShowLayoutIdler(void); diff --git a/include/category_info.h b/include/category_info.h index 493fb16..d3ff868 100644 --- a/include/category_info.h +++ b/include/category_info.h @@ -17,9 +17,6 @@ #ifndef __CATEGORY_INFO_H__ #define __CATEGORY_INFO_H__ - -#include -#include #include "album_info.h" class CCategoryInfo : public CExtNameInfo { diff --git a/include/common-ui.h b/include/common-ui.h index 2e0b2f1..d02ef9a 100644 --- a/include/common-ui.h +++ b/include/common-ui.h @@ -17,8 +17,6 @@ #ifndef __COMMON_UI_H__ #define __COMMON_UI_H__ -#include - enum EAddType; class CCommonUI { diff --git a/include/context-view.h b/include/context-view.h index 8461410..6395a3e 100644 --- a/include/context-view.h +++ b/include/context-view.h @@ -17,10 +17,6 @@ #ifndef __CONTEXT_VIEW_H__ #define __CONTEXT_VIEW_H__ - -#include -#include "PopupWindow.h" - struct SContentInfo; struct SRltvCtnt; @@ -33,19 +29,19 @@ private: private: static void sm_CbRltdCtntSelected(void *data, Evas_Object *obj, const char *emission, const char *source); - static void sm_CbRemove(void* cookie, CPopupWindow *instance); - void m_OnRemove(CPopupWindow *instance); + static void sm_CbRemove(void* cookie, CMessagePopup *instance); + void m_OnRemove(CMessagePopup *instance); - static void sm_CbCancel(void* cookie, CPopupWindow *instance); - void m_OnCancel(CPopupWindow *instance); + static void sm_CbCancel(void* cookie, CMessagePopup *instance); + void m_OnCancel(CMessagePopup *instance); static int sm_CbSortPlaylist(const void *d1, const void *d2); static Eina_Bool sm_CbSelectIdler(void *dt); Eina_Bool m_OnSelectIdler(void); - static void sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, const char* text); - void m_CbCtxPopupBtnSelected(CCtxPopup* instance, const char* text); + static void sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text); + void m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text); @@ -79,8 +75,8 @@ private: bool m_CreateMoreinfoLayout(SRltvCtnt *rctnt, Evas_Object *img); bool m_CreateInfoPart(void); bool m_CreateFullView(void); - CCtxPopup *m_CreatePlaylistPopup(void); - CPopupWindow *m_CreateRemovePopup(Evas_Object *base, const char *msg); + CContextPopup *m_CreatePlaylistPopup(void); + CMessagePopup *m_CreateRemovePopup(Evas_Object *base, const char *msg); void m_DestroyPopup(void); void m_HandleBtnSelected(int btnType); void m_HandleMoreinfoSelected(Evas_Object *obj); diff --git a/include/folder_info.h b/include/folder_info.h index 27f4981..2b10249 100644 --- a/include/folder_info.h +++ b/include/folder_info.h @@ -17,8 +17,6 @@ #ifndef __FOLDER_INFO_H__ #define __FOLDER_INFO_H__ -#include - class CFolderInfo : public CNameInfo { private: struct SFolderInfo *m; diff --git a/include/mediadata.h b/include/mediadata.h index 024107f..f626871 100644 --- a/include/mediadata.h +++ b/include/mediadata.h @@ -22,11 +22,8 @@ struct mediadata; struct album_info; struct category_info; - #include #include "common.h" -#include - class CPlaylistMgr { public: @@ -39,7 +36,7 @@ public: }; -class CMediadata : public CMediaContentDbUpdateListener, public CPlaylistMgr { +class CMediadata : public CMediaContentListener, public CPlaylistMgr { private: struct SMediadata* m; @@ -72,7 +69,7 @@ public: static Eina_List *PlaylistsForCtxt(void); public: - virtual void OnUpdated(const SEntity *entity); + virtual void OnDbUpdated(const SEntity *entity); }; diff --git a/include/music-controller.h b/include/music-controller.h index 018b18f..ff32a36 100644 --- a/include/music-controller.h +++ b/include/music-controller.h @@ -17,12 +17,8 @@ #ifndef __MUSIC_CONTROLLER_H__ #define __MUSIC_CONTROLLER_H__ - -#include -#include #include "playback-mgr.h" - class IMusicControllerListener { public: enum SUsbStorageStatus { diff --git a/include/playback-mgr.h b/include/playback-mgr.h index 0711439..71589aa 100644 --- a/include/playback-mgr.h +++ b/include/playback-mgr.h @@ -20,7 +20,6 @@ #include - class ICompleteListener { public: virtual void t_OnPlayComplete(void) = 0; diff --git a/include/playback-view.h b/include/playback-view.h index 914c6d2..cdb7445 100644 --- a/include/playback-view.h +++ b/include/playback-view.h @@ -19,12 +19,9 @@ #include "common.h" -#include "CtxPopup.h" - struct SItemInfo; - class CSliderWidget : public CListenerMgr, public IMusicControllerListener, @@ -121,8 +118,8 @@ private: static void sm_CbCtxtClose(void *dt); void m_OnCtxtClose(void); - static void sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, const char* text); - void m_CbCtxPopupBtnSelected(CCtxPopup* instance, const char* text); + static void sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text); + void m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text); private: void m_HandleKeyPress(char *keyname); diff --git a/include/playlist-mgr.h b/include/playlist-mgr.h index 12373e0..2ae0005 100644 --- a/include/playlist-mgr.h +++ b/include/playlist-mgr.h @@ -18,12 +18,8 @@ #define __PLAYLIST_MGR_H__ -#include - - struct SSongInfo; - class CPlaylist { private: struct SPlaylist* m; diff --git a/include/song_info.h b/include/song_info.h index 0e3a57e..a63285b 100644 --- a/include/song_info.h +++ b/include/song_info.h @@ -17,8 +17,6 @@ #ifndef __SONG_INFO_H__ #define __SONG_INFO_H__ -#include - class CSongInfo : public CExtNameInfo { private: struct SSongInfo *m; diff --git a/include/volume-control.h b/include/volume-control.h index 28041cb..ce88f2a 100644 --- a/include/volume-control.h +++ b/include/volume-control.h @@ -17,7 +17,6 @@ #ifndef __VOLUME_CONTROL_H__ #define __VOLUME_CONTROL_H__ - class CVolumeController { public: static bool Mute(void); diff --git a/src/data/AlbumStorage.cpp b/src/data/AlbumStorage.cpp index 91c0325..57892a5 100644 --- a/src/data/AlbumStorage.cpp +++ b/src/data/AlbumStorage.cpp @@ -15,11 +15,11 @@ */ -#include #include #include #include #include + #include "dbg.h" #include "i18n.h" #include "define.h" diff --git a/src/data/CategoryStorage.cpp b/src/data/CategoryStorage.cpp index 0e3642e..b740717 100644 --- a/src/data/CategoryStorage.cpp +++ b/src/data/CategoryStorage.cpp @@ -14,11 +14,11 @@ * limitations under the License. */ -#include #include #include #include #include + #include "dbg.h" #include "i18n.h" #include "define.h" diff --git a/src/data/album_info.cpp b/src/data/album_info.cpp index 255f001..722db2a 100644 --- a/src/data/album_info.cpp +++ b/src/data/album_info.cpp @@ -16,9 +16,9 @@ #include #include -#include #include "dbg.h" #include "i18n.h" +#include #include "album_info.h" diff --git a/src/data/category_info.cpp b/src/data/category_info.cpp index 979adeb..69a6639 100644 --- a/src/data/category_info.cpp +++ b/src/data/category_info.cpp @@ -16,10 +16,9 @@ #include #include -#include -#include #include "dbg.h" #include "i18n.h" +#include #include "define.h" #include "category_info.h" diff --git a/src/data/folder_info.cpp b/src/data/folder_info.cpp index b7742cf..5e722f3 100644 --- a/src/data/folder_info.cpp +++ b/src/data/folder_info.cpp @@ -16,10 +16,9 @@ #include #include -#include #include "dbg.h" #include "i18n.h" -#include +#include #include "folder_info.h" diff --git a/src/data/mediadata.cpp b/src/data/mediadata.cpp index 71ca524..532e9c4 100644 --- a/src/data/mediadata.cpp +++ b/src/data/mediadata.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include #include #include @@ -341,12 +340,12 @@ bool CMediadata::Create(void) _CREATE_BEGIN{ _CHECK(m = new SMediadata) _CHECK(media_content_connect() == MEDIA_CONTENT_ERROR_NONE) - _CHECK(CMediaContentDbUpdateListener::Create()) + _CHECK(CMediaContentListener::Create()) _WHEN_SUCCESS{ m->source_type = SOURCE_TYPE_NONE; } - _CHECK_FAIL{ CMediaContentDbUpdateListener::Destroy(); } + _CHECK_FAIL{ CMediaContentListener::Destroy(); } _CHECK_FAIL{ media_content_disconnect(); } _CHECK_FAIL{ delete m; m = NULL; } }_CREATE_END_AND_CATCH{ return false; } @@ -382,7 +381,7 @@ void CMediadata::Destroy(void) delete cbinfo; } - CMediaContentDbUpdateListener::Destroy(); + CMediaContentListener::Destroy(); r = media_content_disconnect(); if (r != MEDIA_CONTENT_ERROR_NONE) @@ -576,7 +575,7 @@ Eina_List *CMediadata::PlaylistsForCtxt(void) } -void CMediadata::OnUpdated(const SEntity *entity) +void CMediadata::OnDbUpdated(const SEntity *entity) { Eina_List *l = NULL; SCbInfo *cbinfo = NULL; diff --git a/src/data/song_info.cpp b/src/data/song_info.cpp index 481b4bb..b90a22f 100644 --- a/src/data/song_info.cpp +++ b/src/data/song_info.cpp @@ -16,9 +16,9 @@ #include #include -#include #include "dbg.h" #include "i18n.h" +#include #include "song_info.h" diff --git a/src/main.cpp b/src/main.cpp index d7bf819..3a1a133 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,22 +14,14 @@ * limitations under the License. */ -#include -#include #include "dbg.h" +#include - -#include -#include #include "song_info.h" #include "album_info.h" #include "define.h" #include "common.h" #include "music-controller.h" -#include "BaseApp.h" -#include "BaseView.h" -#include "BaseLayout.h" -#include "ViewMgr.h" #include "base-view.h" #include "playback-view.h" #include "context-view.h" diff --git a/src/playback/MusicControllerImpl.cpp b/src/playback/MusicControllerImpl.cpp index e1f4e51..0108e9d 100644 --- a/src/playback/MusicControllerImpl.cpp +++ b/src/playback/MusicControllerImpl.cpp @@ -13,12 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include + #include #include #include "dbg.h" #include "i18n.h" - #include #include "song_info.h" @@ -174,7 +173,7 @@ bool CMusicControllerImpl::Create(void) // Even if CUsbConnectionListener creation failed, // application should run properly. - if (!CUsbConnectionListener::Create()) + if (!CUsbListener::Create()) _DBG("CUsbConnectionListener::Create failed"); } @@ -196,8 +195,8 @@ bool CMusicControllerImpl::Create(void) void CMusicControllerImpl::Destroy(void) { - if (CUsbConnectionListener::FlagCreate()) - CUsbConnectionListener::Destroy(); + if (CUsbListener::FlagCreate()) + CUsbListener::Destroy(); if (!m->pPlayback->UnsetCallback()) _ERR(" playback remove completion callback failed"); diff --git a/src/playback/MusicControllerImpl.h b/src/playback/MusicControllerImpl.h index 251ecbb..6db31e8 100644 --- a/src/playback/MusicControllerImpl.h +++ b/src/playback/MusicControllerImpl.h @@ -19,7 +19,7 @@ class CMusicControllerImpl : - public CUsbConnectionListener, + public CUsbListener, public ICompleteListener { private: struct SMusicControllerImpl *m; diff --git a/src/playback/playback-mgr.cpp b/src/playback/playback-mgr.cpp index 2ab23fb..99fac0d 100644 --- a/src/playback/playback-mgr.cpp +++ b/src/playback/playback-mgr.cpp @@ -15,9 +15,9 @@ */ #include -#include #include "i18n.h" #include "dbg.h" +#include #include "playback-mgr.h" diff --git a/src/playback/playlist-mgr.cpp b/src/playback/playlist-mgr.cpp index f13c79e..23b53f1 100644 --- a/src/playback/playlist-mgr.cpp +++ b/src/playback/playlist-mgr.cpp @@ -14,12 +14,11 @@ * limitations under the License. */ -#include #include #include -#include #include "dbg.h" #include "i18n.h" +#include #include "song_info.h" #include "playlist-mgr.h" #include "time.h" diff --git a/src/views/ExtBaseLayout.cpp b/src/views/ExtBaseLayout.cpp index e13bffa..930da87 100644 --- a/src/views/ExtBaseLayout.cpp +++ b/src/views/ExtBaseLayout.cpp @@ -14,13 +14,8 @@ * limitations under the License. */ -#include -#include -#include -#include -#include -#include #include "dbg.h" +#include #include "ExtBaseLayout.h" diff --git a/src/views/HandleVolume.cpp b/src/views/HandleVolume.cpp index 10c4911..f96f9e7 100644 --- a/src/views/HandleVolume.cpp +++ b/src/views/HandleVolume.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include #include "dbg.h" #include "define.h" #include diff --git a/src/views/Info.cpp b/src/views/Info.cpp index 00584d8..01bebbb 100644 --- a/src/views/Info.cpp +++ b/src/views/Info.cpp @@ -14,14 +14,12 @@ * limitations under the License. */ -#include -#include -#include #include "i18n.h" +#include "dbg.h" #include "define.h" #include "common.h" -#include "ExtNameInfo.h" #include "Info.h" +#include struct SInfo { diff --git a/src/views/PlayListCtxPopup.cpp b/src/views/PlayListCtxPopup.cpp index e292200..905ab32 100644 --- a/src/views/PlayListCtxPopup.cpp +++ b/src/views/PlayListCtxPopup.cpp @@ -14,19 +14,12 @@ * limitations under the License. */ -#include -#include -#include -#include #include "i18n.h" #include "define.h" #include "dbg.h" +#include #include "common.h" #include "Info.h" -#include "CtxPopup.h" -#include -#include -#include #include "PlayListCtxPopup.h" @@ -41,7 +34,7 @@ struct SPlayListCtxPopup { void CPlayListCtxPopup::t_OnConfiguration(void) { t_SetList((const char **)m->settingTexts, m->listSize, 0, - CCtxPopup::TOPBTN_BASE, (const char **)m->btnIds, + CContextPopup::TOPBTN_BASE, (const char **)m->btnIds, POSITION_PLAY_LIST_POPUP_X, POSITION_PLAY_LIST_POPUP_Y, MUSIC_STYLE_LIST_POPUP, MUSIC_STYLE_TOPTEXT_BTN, MUSIC_STYLE_MIDDLETEXT_BTN, MUSIC_STYLE_BOTTOMTEXT_BTN); @@ -71,7 +64,7 @@ void CPlayListCtxPopup::t_OnBtnClicked(Evas_Object* obj, void* ev) return; CInfo::SetPlayListDbId(m->dbIds[index]); - CCtxPopup::t_OnBtnClicked(obj, ev); + CContextPopup::t_OnBtnClicked(obj, ev); Destroy(); } @@ -130,9 +123,9 @@ bool CPlayListCtxPopup::Create(Evas_Object* base, const SCallback* callback, Ein _CHECK(m->dbIds = new int[m->listSize]) _COMMAND{ memset(m->dbIds, 0, m->listSize * sizeof(int)); } _CHECK(m_SetBtnString(playList)) - _CHECK(CCtxPopup::Create(base, callback, true)) + _CHECK(CContextPopup::Create(base, callback, true)) - _CHECK_FAIL{ CCtxPopup::Destroy(); } + _CHECK_FAIL{ CContextPopup::Destroy(); } _CHECK_FAIL{ m_DeleteBtnString(); } _CHECK_FAIL{ delete[] m->dbIds; } _CHECK_FAIL{ delete[] m->btnIds; } @@ -147,7 +140,7 @@ bool CPlayListCtxPopup::Create(Evas_Object* base, const SCallback* callback, Ein void CPlayListCtxPopup::Destroy(void) { - CCtxPopup::Destroy(); + CContextPopup::Destroy(); m_DeleteBtnString(); diff --git a/src/views/PlayListCtxPopup.h b/src/views/PlayListCtxPopup.h index 6b6a34f..c530cf4 100644 --- a/src/views/PlayListCtxPopup.h +++ b/src/views/PlayListCtxPopup.h @@ -1,9 +1,8 @@ #ifndef __PLAYLIST_CTX_POPUP_H__ #define __PLAYLIST_CTX_POPUP_H__ -#include -class CPlayListCtxPopup : public CCtxPopup { +class CPlayListCtxPopup : public CContextPopup { private: struct SPlayListCtxPopup *m; diff --git a/src/views/PlaySettingCtxPopup.cpp b/src/views/PlaySettingCtxPopup.cpp index a6e45fe..8049089 100644 --- a/src/views/PlaySettingCtxPopup.cpp +++ b/src/views/PlaySettingCtxPopup.cpp @@ -14,20 +14,14 @@ * limitations under the License. */ -#include -#include -#include #include "i18n.h" #include "define.h" #include "common.h" #include "Info.h" -#include "CtxPopup.h" -#include -#include -#include +#include "dbg.h" +#include #include "PlaySettingCtxPopup.h" - #define TOTAL_SETTING_BTNS 2 const char *settingText[TOTAL_SETTING_BTNS] = { @@ -43,7 +37,7 @@ const char *settingBtnId[TOTAL_SETTING_BTNS] = { void CPlaySettingCtxPopup::t_OnConfiguration(void) { t_SetList(settingText, TOTAL_SETTING_BTNS, 0, - CCtxPopup::TOPBTN_BASE, settingBtnId, + CContextPopup::TOPBTN_BASE, settingBtnId, POSITION_PLAY_SETTING_POPUP_X, POSITION_PLAY_SETTING_POPUP_Y, NULL, MUSIC_STYLE_SETTING_BTN_T, MUSIC_STYLE_SETTING_BTN_T, MUSIC_STYLE_SETTING_BTN_B); @@ -73,7 +67,7 @@ void CPlaySettingCtxPopup::t_OnBtnClicked(Evas_Object* obj, void* ev) return; CInfo::SetPlaybackSettingType(index); - CCtxPopup::t_OnBtnClicked(obj, ev); + CContextPopup::t_OnBtnClicked(obj, ev); Destroy(); } \ No newline at end of file diff --git a/src/views/PlaySettingCtxPopup.h b/src/views/PlaySettingCtxPopup.h index 781d858..6286fbf 100644 --- a/src/views/PlaySettingCtxPopup.h +++ b/src/views/PlaySettingCtxPopup.h @@ -1,9 +1,8 @@ #ifndef __PLAYSETTING_CTX_POPUP_H__ #define __PLAYSETTING_CTX_POPUP_H__ -#include -class CPlaySettingCtxPopup : public CCtxPopup { +class CPlaySettingCtxPopup : public CContextPopup { protected: virtual void t_OnConfiguration(void); virtual void t_OnBtnClicked(Evas_Object* obj, void* ev); diff --git a/src/views/RemovePopupWindow.cpp b/src/views/RemovePopupWindow.cpp index 2c0aa51..0775e45 100644 --- a/src/views/RemovePopupWindow.cpp +++ b/src/views/RemovePopupWindow.cpp @@ -14,14 +14,10 @@ * limitations under the License. */ -#include -#include -#include -#include -#include #include "i18n.h" #include "define.h" #include "dbg.h" +#include #include "common.h" #include "RemovePopupWindow.h" @@ -42,7 +38,7 @@ bool CRemovePopupWindow::Create(Evas_Object* base, const SCallback* callback, co { m_msg = msg; - if (!CPopupWindow::Create(base, callback)) { + if (!CMessagePopup::Create(base, callback)) { _ERR("Creation of remove popup failed"); return false; } diff --git a/src/views/RemovePopupWindow.h b/src/views/RemovePopupWindow.h index 5fdbec7..912ddbb 100644 --- a/src/views/RemovePopupWindow.h +++ b/src/views/RemovePopupWindow.h @@ -18,9 +18,7 @@ #ifndef __REMOVE_POPUP_WINDOW_H__ #define __REMOVE_POPUP_WINDOW_H__ -#include - -class CRemovePopupWindow : public CPopupWindow { +class CRemovePopupWindow : public CMessagePopup { private: const char *m_msg; diff --git a/src/views/SortCtxPopup.cpp b/src/views/SortCtxPopup.cpp index 8706d59..2bb8fb0 100644 --- a/src/views/SortCtxPopup.cpp +++ b/src/views/SortCtxPopup.cpp @@ -14,17 +14,12 @@ * limitations under the License. */ -#include -#include -#include #include "i18n.h" #include "define.h" -#include #include "dbg.h" +#include #include "Info.h" -#include "CtxPopup.h" -#include #include "SortCtxPopup.h" const char *sortTextSong[] = { @@ -103,7 +98,7 @@ static int arraySize = 0; void CSortCtxPopup::t_OnConfiguration(void) { t_SetList(sortText, arraySize, (int)CInfo::SortType(), - CCtxPopup::TOPBTN_SORT, sortBtnIds, + CContextPopup::TOPBTN_SORT, sortBtnIds, POSITION_SORT_POPUP_X, POSITION_SORT_POPUP_Y, NULL, MUSIC_STYLE_HOVER_ENTRY, MUSIC_STYLE_HOVER_ENTRY, MUSIC_STYLE_HOVER_ENTRY); @@ -134,7 +129,7 @@ void CSortCtxPopup::t_OnBtnClicked(Evas_Object* obj, void* ev) if (index != CInfo::SortType()) { CInfo::SetSortType(index); - CCtxPopup::t_OnBtnClicked(obj, ev); + CContextPopup::t_OnBtnClicked(obj, ev); } Destroy(); @@ -186,9 +181,9 @@ bool CSortCtxPopup::Create(Evas_Object* base, const SCallback* callback, ESortBt break; } - bool r = CCtxPopup::Create(base, callback); + bool r = CContextPopup::Create(base, callback); if (r == false) { - _ERR("CCtxPopup::Create failed"); + _ERR("CContextPopup::Create failed"); return false; } diff --git a/src/views/SortCtxPopup.h b/src/views/SortCtxPopup.h index 024ef9e..d1e4d2a 100644 --- a/src/views/SortCtxPopup.h +++ b/src/views/SortCtxPopup.h @@ -2,7 +2,7 @@ #define __SORT_CTX_POPUP_H__ -class CSortCtxPopup : public CCtxPopup { +class CSortCtxPopup : public CContextPopup { public: enum ESortBtnType { diff --git a/src/views/SourceCtxPopup.cpp b/src/views/SourceCtxPopup.cpp index 11eba8d..fbacc77 100644 --- a/src/views/SourceCtxPopup.cpp +++ b/src/views/SourceCtxPopup.cpp @@ -14,17 +14,12 @@ * limitations under the License. */ -#include -#include -#include #include "i18n.h" #include "define.h" #include "common.h" #include "Info.h" -#include "CtxPopup.h" -#include -#include -#include +#include "dbg.h" +#include #include "SourceCtxPopup.h" const char *sourceText[] = { @@ -44,7 +39,7 @@ void CSourceCtxPopup::t_OnConfiguration(void) int size = (sizeof(sourceText) / sizeof(sourceText[0])); t_SetList(sourceText, size, (int)CInfo::SourceType(), - CCtxPopup::TOPBTN_SOURCE, srcBtnIds, + CContextPopup::TOPBTN_SOURCE, srcBtnIds, POSITION_SOURCE_POPUP_X, POSITION_SOURCE_POPUP_Y, NULL, MUSIC_STYLE_HOVER_ENTRY, MUSIC_STYLE_HOVER_ENTRY, MUSIC_STYLE_HOVER_ENTRY); @@ -76,7 +71,7 @@ void CSourceCtxPopup::t_OnBtnClicked(Evas_Object* obj, void* ev) if (index != CInfo::SourceType()) { CInfo::SetSourceType(index); - CCtxPopup::t_OnBtnClicked(obj, ev); + CContextPopup::t_OnBtnClicked(obj, ev); } Destroy(); diff --git a/src/views/SourceCtxPopup.h b/src/views/SourceCtxPopup.h index ce90500..2402921 100644 --- a/src/views/SourceCtxPopup.h +++ b/src/views/SourceCtxPopup.h @@ -2,7 +2,7 @@ #define __SOURCE_CTX_POPUP_H__ -class CSourceCtxPopup : public CCtxPopup { +class CSourceCtxPopup : public CContextPopup { protected: virtual void t_OnConfiguration(void); diff --git a/src/views/album-layout.cpp b/src/views/album-layout.cpp index 3641a11..09ebfea 100644 --- a/src/views/album-layout.cpp +++ b/src/views/album-layout.cpp @@ -14,29 +14,18 @@ * limitations under the License. */ -#include -#include - -#include -#include -#include - #include "dbg.h" +#include #include "i18n.h" #include "define.h" #include "common.h" #include "album_info.h" #include "song_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "common-ui.h" -#include "BaseView.h" -#include "BaseLayout.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "album-layout.h" #include "album-songs-layout.h" -#include "base-view.h" #include "Info.h" #define GENGRID_ITEM_SIZE_W (263+20) diff --git a/src/views/album-songs-layout.cpp b/src/views/album-songs-layout.cpp index a4b4f5a..8740290 100644 --- a/src/views/album-songs-layout.cpp +++ b/src/views/album-songs-layout.cpp @@ -14,24 +14,16 @@ * limitations under the License. */ -#include -#include - -#include "AppCommon.h" -#include "InputHandler.h" - #include "dbg.h" #include "i18n.h" +#include #include "define.h" #include "common.h" #include "song_info.h" #include "album_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "album-songs-layout.h" #include "base-view.h" diff --git a/src/views/artist-layout.cpp b/src/views/artist-layout.cpp index a32d7d5..f6b7a70 100644 --- a/src/views/artist-layout.cpp +++ b/src/views/artist-layout.cpp @@ -14,11 +14,8 @@ * limitations under the License. */ -#include -#include -#include "AppCommon.h" -#include #include "dbg.h" +#include #include "i18n.h" #include "define.h" @@ -27,12 +24,9 @@ #include "album_info.h" #include "song_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "entry-popup.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "category-layout.h" #include "base-view.h" #include "artist-layout.h" diff --git a/src/views/base-view.cpp b/src/views/base-view.cpp index b93bf68..d2d00f9 100644 --- a/src/views/base-view.cpp +++ b/src/views/base-view.cpp @@ -14,15 +14,10 @@ * limitations under the License. */ -#include -#include -#include "AppCommon.h" #include "i18n.h" #include "define.h" #include "dbg.h" - -#include "AppCommon.h" -#include "InputHandler.h" +#include #include "common.h" #include "song_info.h" @@ -30,12 +25,7 @@ #include "folder_info.h" #include "category_info.h" #include "music-controller.h" -#include "LayoutMgr.h" -#include "BaseView.h" -#include "BaseLayout.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" -#include #include "Info.h" #include "SourceCtxPopup.h" #include "SortCtxPopup.h" @@ -332,7 +322,7 @@ void CMusicBaseView::m_GotoPlayback(void) void CMusicBaseView::m_CreateCtxPopup(int btnType) { const char *layout_id = NULL; - CCtxPopup::SCallback cb; + CContextPopup::SCallback cb; cb.onSelected = sm_CbCtxPopupBtnSelected; cb.cookie = this; @@ -398,7 +388,7 @@ void CMusicBaseView::m_DestroyCtxPopup(void) } -void CMusicBaseView::sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, const char* text) +void CMusicBaseView::sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text) { CMusicBaseView *root = (CMusicBaseView*)cookie; if (root) @@ -406,7 +396,7 @@ void CMusicBaseView::sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, } -void CMusicBaseView::m_CbCtxPopupBtnSelected(CCtxPopup* instance, const char* text) +void CMusicBaseView::m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text) { if (m->btntype == BTN_SOURCE) { elm_object_text_set(m->srcbtn, _(text)); diff --git a/src/views/category-layout.cpp b/src/views/category-layout.cpp index 1c7f311..d78a415 100644 --- a/src/views/category-layout.cpp +++ b/src/views/category-layout.cpp @@ -14,13 +14,8 @@ * limitations under the License. */ -#include -#include - -#include "AppCommon.h" -#include -#include #include "dbg.h" +#include #include "i18n.h" #include "define.h" @@ -29,12 +24,9 @@ #include "album_info.h" #include "song_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "entry-popup.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "category-layout.h" #include "base-view.h" #include "Info.h" diff --git a/src/views/category-songs-layout.cpp b/src/views/category-songs-layout.cpp index e4aa7a6..8aff6ac 100644 --- a/src/views/category-songs-layout.cpp +++ b/src/views/category-songs-layout.cpp @@ -14,25 +14,18 @@ * limitations under the License. */ -#include -#include - -#include "AppCommon.h" -#include "InputHandler.h" - #include "dbg.h" #include "i18n.h" +#include + #include "define.h" #include "common.h" #include "song_info.h" #include "album_info.h" #include "category_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "category-songs-layout.h" #include "base-view.h" #include "category-layout.h" diff --git a/src/views/common-ui.cpp b/src/views/common-ui.cpp index c52004b..6d73506 100644 --- a/src/views/common-ui.cpp +++ b/src/views/common-ui.cpp @@ -14,15 +14,12 @@ * limitations under the License. */ -#include -#include #include "i18n.h" #include "define.h" #include "dbg.h" +#include #include "common.h" #include "common-ui.h" -#include "BaseView.h" -#include "ViewMgr.h" #include "song_info.h" diff --git a/src/views/context-view.cpp b/src/views/context-view.cpp index 0f3dec8..bb76472 100644 --- a/src/views/context-view.cpp +++ b/src/views/context-view.cpp @@ -14,12 +14,9 @@ * limitations under the License. */ -#include -#include -#include "AppCommon.h" -#include #include "dbg.h" #include "i18n.h" +#include #include "define.h" #include "song_info.h" #include "album_info.h" @@ -29,11 +26,8 @@ #include "common-ui.h" #include "music-controller.h" #include "mediadata.h" -#include "BaseView.h" -#include "ViewMgr.h" #include "context-view.h" #include "PlayListCtxPopup.h" -#include "PopupWindow.h" #include "RemovePopupWindow.h" #include "Info.h" @@ -172,7 +166,7 @@ void CContextView::sm_CbRltdCtntSelected(void *data, Evas_Object *obj, const cha } -void CContextView::sm_CbRemove(void* cookie, CPopupWindow *instance) +void CContextView::sm_CbRemove(void* cookie, CMessagePopup *instance) { CContextView *root = (CContextView *)cookie; if (root) @@ -180,7 +174,7 @@ void CContextView::sm_CbRemove(void* cookie, CPopupWindow *instance) } -void CContextView::m_OnRemove(CPopupWindow *instance) +void CContextView::m_OnRemove(CMessagePopup *instance) { SContentInfo *cinfo = NULL; @@ -199,7 +193,7 @@ void CContextView::m_OnRemove(CPopupWindow *instance) } -void CContextView::sm_CbCancel(void* cookie, CPopupWindow *instance) +void CContextView::sm_CbCancel(void* cookie, CMessagePopup *instance) { CContextView *root = (CContextView *)cookie; if (root) @@ -207,7 +201,7 @@ void CContextView::sm_CbCancel(void* cookie, CPopupWindow *instance) } -void CContextView::m_OnCancel(CPopupWindow *instance) +void CContextView::m_OnCancel(CMessagePopup *instance) { if (!instance) { _ERR("Invalid argument."); @@ -267,7 +261,7 @@ Eina_Bool CContextView::m_OnSelectIdler(void) } -void CContextView::sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, const char* text) +void CContextView::sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text) { CContextView *root = (CContextView*)cookie; if (root) @@ -275,7 +269,7 @@ void CContextView::sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, c } -void CContextView::m_CbCtxPopupBtnSelected(CCtxPopup* instance, const char* text) +void CContextView::m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text) { m->lid = CInfo::PlayListDbId(); m->idler = ecore_idler_add(sm_CbSelectIdler, this); @@ -1076,7 +1070,7 @@ bool CContextView::m_CreateFullView(void) } -CCtxPopup *CContextView::m_CreatePlaylistPopup(void) +CContextPopup *CContextView::m_CreatePlaylistPopup(void) { CPlayListCtxPopup *ctxpopup = NULL; Eina_List *list = NULL; @@ -1096,7 +1090,7 @@ CCtxPopup *CContextView::m_CreatePlaylistPopup(void) return NULL; } - CCtxPopup::SCallback cb; + CContextPopup::SCallback cb; cb.onSelected = sm_CbCtxPopupBtnSelected; cb.cookie = this; r = ctxpopup->Create(m->base, &cb, list); @@ -1110,7 +1104,7 @@ CCtxPopup *CContextView::m_CreatePlaylistPopup(void) } -CPopupWindow *CContextView::m_CreateRemovePopup(Evas_Object *base, const char *msg) +CMessagePopup *CContextView::m_CreateRemovePopup(Evas_Object *base, const char *msg) { CRemovePopupWindow *popup; @@ -1120,7 +1114,7 @@ CPopupWindow *CContextView::m_CreateRemovePopup(Evas_Object *base, const char *m return NULL; } - CPopupWindow::SCallback cb; + CMessagePopup::SCallback cb; cb.cookie = this; cb.onBtn1Pressed = sm_CbRemove; cb.onBtn2Pressed = sm_CbCancel; diff --git a/src/views/entry-popup.cpp b/src/views/entry-popup.cpp index d92147c..d4ed9a1 100644 --- a/src/views/entry-popup.cpp +++ b/src/views/entry-popup.cpp @@ -14,14 +14,13 @@ * limitations under the License. */ -#include #include "i18n.h" #include "define.h" -#include "common.h" -#include "common-ui.h" #include "dbg.h" #include -#include + +#include "common.h" +#include "common-ui.h" #include "entry-popup.h" diff --git a/src/views/folder-layout.cpp b/src/views/folder-layout.cpp index c956f3a..9dd0c50 100644 --- a/src/views/folder-layout.cpp +++ b/src/views/folder-layout.cpp @@ -14,15 +14,10 @@ * limitations under the License. */ -#include -#include - -#include "AppCommon.h" -#include #include "dbg.h" +#include #include "i18n.h" #include "define.h" -#include #include "common.h" #include "folder_info.h" @@ -30,11 +25,8 @@ #include "album_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "folder-layout.h" #include "base-view.h" #include "Info.h" diff --git a/src/views/genre-layout.cpp b/src/views/genre-layout.cpp index 1a774ab..7b25431 100644 --- a/src/views/genre-layout.cpp +++ b/src/views/genre-layout.cpp @@ -14,11 +14,8 @@ * limitations under the License. */ -#include -#include -#include "AppCommon.h" -#include #include "dbg.h" +#include #include "i18n.h" #include "define.h" @@ -27,12 +24,9 @@ #include "album_info.h" #include "song_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "entry-popup.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "category-layout.h" #include "base-view.h" #include "genre-layout.h" diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 5946798..f052b2a 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -14,27 +14,20 @@ * limitations under the License. */ -#include -#include - -#include "AppCommon.h" -#include - #include "define.h" #include "common.h" #include "dbg.h" +#include + #include "song_info.h" #include "album_info.h" #include "music-controller.h" #include "volume-control.h" #include "i18n.h" #include "common-ui.h" -#include "BaseView.h" -#include "ViewMgr.h" #include "playback-view.h" #include "context-view.h" #include "HandleVolume.h" -#include #include "PlaySettingCtxPopup.h" #include "Info.h" @@ -625,7 +618,7 @@ void CPlaybackView::m_OnCtxtClose(void) } -void CPlaybackView::sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, const char* text) +void CPlaybackView::sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text) { CPlaybackView *root = (CPlaybackView *)cookie; if (root) @@ -633,7 +626,7 @@ void CPlaybackView::sm_CbCtxPopupBtnSelected(void* cookie, CCtxPopup* instance, } -void CPlaybackView::m_CbCtxPopupBtnSelected(CCtxPopup* instance, const char* text) +void CPlaybackView::m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text) { int type = CInfo::PlaybackSettingType(); @@ -1078,7 +1071,7 @@ void CPlaybackView::m_DestroyErrorPopup(void) void CPlaybackView::m_CreateSettingsPopup(void) { - CCtxPopup::SCallback cb; + CContextPopup::SCallback cb; cb.cookie = this; cb.onSelected = sm_CbCtxPopupBtnSelected; diff --git a/src/views/playlist-layout.cpp b/src/views/playlist-layout.cpp index 7187c34..aa12123 100644 --- a/src/views/playlist-layout.cpp +++ b/src/views/playlist-layout.cpp @@ -14,13 +14,9 @@ * limitations under the License. */ -#include -#include #include "dbg.h" #include "i18n.h" - -#include "AppCommon.h" -#include +#include #include "define.h" #include "common.h" @@ -28,12 +24,9 @@ #include "album_info.h" #include "song_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "entry-popup.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "category-layout.h" #include "base-view.h" #include "playlist-layout.h" diff --git a/src/views/song-layout.cpp b/src/views/song-layout.cpp index e60acea..4fd284f 100644 --- a/src/views/song-layout.cpp +++ b/src/views/song-layout.cpp @@ -14,25 +14,17 @@ * limitations under the License. */ -#include -#include #include "dbg.h" #include "i18n.h" - -#include "AppCommon.h" -#include "InputHandler.h" -#include +#include #include "define.h" #include "common.h" #include "song_info.h" #include "album_info.h" #include "music-controller.h" -#include "LayoutMgr.h" #include "common-ui.h" -#include "BaseView.h" #include "ExtBaseLayout.h" -#include "ViewMgr.h" #include "song-layout.h" #include "base-view.h" #include "Info.h" -- 2.7.4 From 3c2624e243a4a1106bd4709513167479f13394cf Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Mon, 20 Apr 2015 21:26:58 +0900 Subject: [PATCH 09/16] Refactoring of Playback View Change-Id: I38df5736e68767641328bef0e72090138b955c12 Signed-off-by: Kim Tae Soo --- CMakeLists.txt | 4 + include/Timer.h | 41 ++ include/common.h | 25 + include/music-controller.h | 12 + include/playback-view.h | 123 +--- src/data/FolderStorage.cpp | 1 - src/data/SongStorage.cpp | 2 - src/playback/MusicControllerImpl.cpp | 58 ++ src/playback/MusicControllerImpl.h | 4 + src/playback/music-controller.cpp | 21 + src/playback/volume-control.cpp | 2 +- src/views/ErrorPopupWindow.cpp | 46 ++ src/views/ErrorPopupWindow.h | 33 + src/views/PlaybackController.cpp | 843 ++++++++++++++++++++++ src/views/PlaybackController.h | 101 +++ src/views/RemovePopupWindow.cpp | 2 +- src/views/SliderWidget.cpp | 293 ++++++++ src/views/SliderWidget.h | 68 ++ src/views/Timer.cpp | 103 +++ src/views/playback-view.cpp | 1295 ++++------------------------------ 20 files changed, 1819 insertions(+), 1258 deletions(-) create mode 100644 include/Timer.h create mode 100644 src/views/ErrorPopupWindow.cpp create mode 100644 src/views/ErrorPopupWindow.h create mode 100644 src/views/PlaybackController.cpp create mode 100644 src/views/PlaybackController.h create mode 100644 src/views/SliderWidget.cpp create mode 100644 src/views/SliderWidget.h create mode 100644 src/views/Timer.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ce4e77..063b29a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,10 @@ SET(SRCS src/main.cpp src/views/PlaySettingCtxPopup.cpp src/views/PlayListCtxPopup.cpp src/views/RemovePopupWindow.cpp + src/views/PlaybackController.cpp + src/views/SliderWidget.cpp + src/views/Timer.cpp + src/views/ErrorPopupWindow.cpp src/playback/playlist-mgr.cpp src/playback/music-controller.cpp src/playback/MusicControllerImpl.cpp diff --git a/include/Timer.h b/include/Timer.h new file mode 100644 index 0000000..262ffd1 --- /dev/null +++ b/include/Timer.h @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef __TIMER_H__ +#define __TIMER_H__ + +class CTimer { +private: + struct STimer *m; + +private: + static Eina_Bool sm_CbTimer(void *data); + +protected: + virtual void t_OnTimer(int id); + +public: + CTimer() : m(0) {} + virtual ~CTimer() {} + + bool Create(void); + virtual void Destroy(void); + + bool SetTimer(int id, int ms); + void KillTimer(int id); +}; + +#endif // __TIMER_H__ \ No newline at end of file diff --git a/include/common.h b/include/common.h index b0f77fa..7a6e5b3 100644 --- a/include/common.h +++ b/include/common.h @@ -69,6 +69,31 @@ enum ERepeatStatus { REPEAT_STATUS_ONE }; +enum EPlayerMode { + MODE_PLAYBACK = 0, + MODE_PLAYLIST_EDIT +}; + +enum EPlayerControlBtns { + CTRL_BTN_SETTINGS, + CTRL_BTN_SHUFFLE, + CTRL_BTN_REPEAT, + CTRL_BTN_REWIND, + CTRL_BTN_PLAY, + CTRL_BTN_FORWARD +}; + +enum EPlayerEditBtns { + EDIT_BTN_CANCEL, + EDIT_BTN_DESELECT, + EDIT_BTN_DELETE +}; + +enum EPlayerBtnsEvent { + EVENT_PRESSED, + EVENT_UNPRESSED +}; + enum update_type { E_KEY_PRESS, E_KEY_RELEASE, diff --git a/include/music-controller.h b/include/music-controller.h index ff32a36..cdf36d0 100644 --- a/include/music-controller.h +++ b/include/music-controller.h @@ -45,6 +45,14 @@ public: virtual void OnResumePlayback(void) {} //! virtual void OnPosition(int milsec) {} + //! + virtual void OnEmptyPlaylist(void) {} + //! + virtual void OnPlayerModeChanged(EPlayerMode mode) {} + //! + virtual void OnEditButtonsPressed(EPlayerEditBtns editBtns) {} + //! + virtual void OnRemoteButtonEvent(Evas_Object *eoBtn, EPlayerBtnsEvent ev) {} }; @@ -106,6 +114,10 @@ public: bool SetRepeatState(ERepeatStatus state); ERepeatStatus RepeatState(void); + + void ChangePlayerMode(EPlayerMode mode); + void HandlePlaylistEditButtons(EPlayerEditBtns btnId); + void HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEvent ev); }; diff --git a/include/playback-view.h b/include/playback-view.h index cdb7445..33985aa 100644 --- a/include/playback-view.h +++ b/include/playback-view.h @@ -17,87 +17,13 @@ #ifndef __PLAYBACK_VIEW_H__ #define __PLAYBACK_VIEW_H__ - +#include "Timer.h" #include "common.h" struct SItemInfo; -class CSliderWidget : - public CListenerMgr, - public IMusicControllerListener, - public IMouseMoveListener, - public IChangedListener { -private: - struct SSliderWidget *m; - -private: - static Eina_Bool sm_CbUpdateSlider(void *dt); - Eina_Bool m_OnUpdateSlider(void); - - bool m_AddSlider(void); - void m_RemoveTimer(void); - - void m_UpdateSongInfo(void); - -public: - CSliderWidget() : - IMouseMoveListener(this), - IChangedListener(this), - m(0) {} - virtual ~CSliderWidget() {} - - bool Create(Evas_Object *eoParent); - virtual void Destroy(void); - - Evas_Object* Base(void); - - void Init(void); - - //! This function is invoked when playback is complete. - virtual void OnComplete(void); - //! This function is invoked when new song is played. - virtual void OnStartPlayback(void); - //! - virtual void OnStopPlayback(void); - //! This function is invoked when playback is paused. - virtual void OnPausePlayback(void); - //! This function is invoked when playback is resumed. - virtual void OnResumePlayback(void); - //! - virtual void OnPosition(int milsec); - - virtual void OnChanged(int id, Evas_Object *obj); - virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); -}; - - -class CTimer { -private: - struct STimer *m; - -private: - static Eina_Bool sm_CbTimer(void *data); - -protected: - virtual void t_OnTimer(int id); - -public: - CTimer() : m(0) {} - virtual ~CTimer() {} - - bool Create(void); - virtual void Destroy(void); - - bool SetTimer(int id, int ms); - void KillTimer(int id); -}; - - class CPlaybackView : public CBaseView, - public IMouseClickedListener, public IMouseMoveListener, - public IPressedListener, - public IUnpressedListener, public IRealizedListener, public IActivatedListener, public IMusicControllerListener, @@ -118,8 +44,8 @@ private: static void sm_CbCtxtClose(void *dt); void m_OnCtxtClose(void); - static void sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text); - void m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text); + static int sm_CbCurrentSongCount(void *cookie); + int m_CbCurrentSongCount(void); private: void m_HandleKeyPress(char *keyname); @@ -135,15 +61,10 @@ private: void m_KeyNextUnpress(void); void m_KeyPreviousUnpress(void); - void m_RemoveTimer(int timer_code); - void m_PlaybackPause(void); - void m_PlaybackResume(void); void m_ChangeEditmodeAll(Eina_List *list, bool flag); void m_DisableCheckAll(Eina_List *list); void m_SelectItem(SItemInfo *it_info); void m_UnselectItem(SItemInfo *it_info); - void m_UpdateControlBtns(void); - void m_UpdateCurrentSongProgressbar(void); void m_UpdateCurrentSongThumbnail(void); void m_UpdateCurrentSongLabels(void); void m_UpdateEmptySongInfo(void); @@ -153,49 +74,33 @@ private: void m_UpdatePlaymodeFocusSequence(void); void m_UpdateCurrentSongInfo(void); void m_DisableEditButtons(bool flag); - void m_CreateErrorPopup(void); - void m_DestroyErrorPopup(void); - void m_CreateSettingsPopup(void); - void m_DestroySettingsPopup(void); void m_FromEditToPlaybackMode(void); void m_FromPlaybackToEditMode(void); - void m_HandleOnRepeated(void); void m_DeleteSelectedItems(void); void m_AddAlbumCover(void); void m_AddCurrentSonginfo(void); - void m_AddEditPlaylistButtons(void); - void m_AddControlButtons(void); - struct SItemInfo *m_FindItemInfoFromSong(Eina_List *list, CSongInfo *sinfo); - struct SItemInfo *m_FindItemInfoFromItem(Eina_List *list, Elm_Object_Item *item); + SItemInfo *m_FindItemInfoFromSong(Eina_List *list, CSongInfo *sinfo); + SItemInfo *m_FindItemInfoFromItem(Eina_List *list, Elm_Object_Item *item); void m_UpdateItemCheck(SItemInfo *itinfo); Elm_Genlist_Item_Class *m_GetItemClass(); void m_AddGenlist(void); void m_AddPlaylist(void); void m_RemovePlaylist(void); - void m_HandleRewindBtnClicked(Evas_Object *obj); - void m_HandleForwardBtnClicked(Evas_Object *obj); - void m_HandleOnPressed(Evas_Object *obj); - void m_HandleOnUnpressed(Evas_Object *obj); void m_HandleGenlistItemActivated(Evas_Object *obj, Elm_Object_Item *genListItem); protected: - // When button is clicked. - void t_OnClickedSettings(Evas_Object *obj); - void t_OnClickedShuffle(Evas_Object *obj); - void t_OnClickedRepeat(Evas_Object *obj); - void t_OnClickedPlay(Evas_Object *obj); - -protected: virtual void t_OnShow(void); virtual void t_OnHide(void); virtual void t_OnUpdate(void* data); + virtual void t_OnTimer(int id); public: - CPlaybackView(const char *pViewId) : CBaseView(pViewId), - IMouseClickedListener(this), IMouseMoveListener(this), - IPressedListener(this), IUnpressedListener(this), - IRealizedListener(this), IActivatedListener(this), + CPlaybackView(const char *pViewId) : + CBaseView(pViewId), + IMouseMoveListener(this), + IRealizedListener(this), + IActivatedListener(this), m(0) {} virtual ~CPlaybackView() {} @@ -207,10 +112,7 @@ public: // Listener virtual function virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); virtual void OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev); - virtual void OnMouseClicked(int id, Evas_Object *obj); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); - virtual void OnPressed(int id, Evas_Object *obj); - virtual void OnUnpressed(int id, Evas_Object *obj); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); virtual void OnActivated(int id, Evas_Object *obj, Elm_Object_Item *item); @@ -220,6 +122,9 @@ public: virtual void OnUpdateContent(void); virtual void OnStartPlayback(void); virtual void OnStopPlayback(void); + virtual void OnEmptyPlaylist(void); + virtual void OnPlayerModeChanged(EPlayerMode mode); + virtual void OnEditButtonsPressed(EPlayerEditBtns editBtns); }; diff --git a/src/data/FolderStorage.cpp b/src/data/FolderStorage.cpp index dc47a70..e64264c 100644 --- a/src/data/FolderStorage.cpp +++ b/src/data/FolderStorage.cpp @@ -15,7 +15,6 @@ */ -#include #include #include #include diff --git a/src/data/SongStorage.cpp b/src/data/SongStorage.cpp index aeeec0c..1565eb7 100644 --- a/src/data/SongStorage.cpp +++ b/src/data/SongStorage.cpp @@ -14,8 +14,6 @@ * limitations under the License. */ - -#include #include #include #include diff --git a/src/playback/MusicControllerImpl.cpp b/src/playback/MusicControllerImpl.cpp index 0108e9d..d8fd311 100644 --- a/src/playback/MusicControllerImpl.cpp +++ b/src/playback/MusicControllerImpl.cpp @@ -532,6 +532,16 @@ bool CMusicControllerImpl::EmptyPlaylist(void) m->pPlaylist->Destroy(); + Eina_List *l; + IMusicControllerListener *mcListener; + void * obj; + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnEmptyPlaylist(); + } + return true; } @@ -767,6 +777,54 @@ ERepeatStatus CMusicControllerImpl::RepeatState(void) } +void CMusicControllerImpl::ChangePlayerMode(EPlayerMode mode) +{ + ASSERT(m); + + Eina_List *l; + IMusicControllerListener *mcListener; + void * obj; + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnPlayerModeChanged(mode); + } +} + + +void CMusicControllerImpl::HandlePlaylistEditButtons(EPlayerEditBtns btnId) +{ + ASSERT(m); + + Eina_List *l; + IMusicControllerListener *mcListener; + void * obj; + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnEditButtonsPressed(btnId); + } +} + + +void CMusicControllerImpl::HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEvent ev) +{ + ASSERT(m); + + Eina_List *l; + IMusicControllerListener *mcListener; + void * obj; + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnRemoteButtonEvent(eoBtn, ev); + } +} + + void CMusicControllerImpl::OnStatusChanged(SUsbHostDeviceInfo *changedDevice, SUsbHostDeviceStatus status) { diff --git a/src/playback/MusicControllerImpl.h b/src/playback/MusicControllerImpl.h index 6db31e8..e9ba9f2 100644 --- a/src/playback/MusicControllerImpl.h +++ b/src/playback/MusicControllerImpl.h @@ -98,6 +98,10 @@ public: bool SetRepeatState(ERepeatStatus state); ERepeatStatus RepeatState(void); + void ChangePlayerMode(EPlayerMode mode); + void HandlePlaylistEditButtons(EPlayerEditBtns btnId); + void HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEvent ev); + public: virtual void OnStatusChanged(SUsbHostDeviceInfo *changedDevice, SUsbHostDeviceStatus status); diff --git a/src/playback/music-controller.cpp b/src/playback/music-controller.cpp index e11ed1c..fc05009 100644 --- a/src/playback/music-controller.cpp +++ b/src/playback/music-controller.cpp @@ -324,4 +324,25 @@ ERepeatStatus CMusicController::RepeatState(void) } +void CMusicController::ChangePlayerMode(EPlayerMode mode) +{ + ASSERT(m); + + m->ref.ChangePlayerMode(mode); +} + + +void CMusicController::HandlePlaylistEditButtons(EPlayerEditBtns editBtn) +{ + ASSERT(m); + + m->ref.HandlePlaylistEditButtons(editBtn); +} + + +void CMusicController::HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEvent ev) +{ + ASSERT(m); + m->ref.HandleRemoteButtons(eoBtn, ev); +} \ No newline at end of file diff --git a/src/playback/volume-control.cpp b/src/playback/volume-control.cpp index 339f4b8..2d4da2f 100644 --- a/src/playback/volume-control.cpp +++ b/src/playback/volume-control.cpp @@ -15,10 +15,10 @@ */ #include -#include #include #include #include "dbg.h" +#include #define VOLUME_MUTE 1 diff --git a/src/views/ErrorPopupWindow.cpp b/src/views/ErrorPopupWindow.cpp new file mode 100644 index 0000000..27283ca --- /dev/null +++ b/src/views/ErrorPopupWindow.cpp @@ -0,0 +1,46 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "i18n.h" +#include "define.h" +#include "dbg.h" +#include +#include "common.h" +#include "ErrorPopupWindow.h" + + +#define NUM_BTNS 1 + +static const char *btnText[NUM_BTNS] = { + _(MUSIC_TEXT_OK), +}; + +void CErrorPopupWindow::t_OnConfiguration(void) +{ + t_SetParams(_("Error"), NULL, _(m_msg), NUM_BTNS, (const char **)btnText); +} + +bool CErrorPopupWindow::Create(Evas_Object* base, const SCallback* callback, const char *msg) +{ + m_msg = msg; + + if (!CMessagePopup::Create(base, callback)) { + _ERR("Creation of remove popup failed"); + return false; + } + + return true; +} \ No newline at end of file diff --git a/src/views/ErrorPopupWindow.h b/src/views/ErrorPopupWindow.h new file mode 100644 index 0000000..9cbb9fb --- /dev/null +++ b/src/views/ErrorPopupWindow.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __ERROR_POPUP_WINDOW_H__ +#define __ERROR_POPUP_WINDOW_H__ + +class CErrorPopupWindow : public CMessagePopup { +private: + const char *m_msg; + +protected: + virtual void t_OnConfiguration(void); + +public: + bool Create(Evas_Object* base, const SCallback* callback, const char *msg); +}; + + +#endif // __REMOVE_POPUP_WINDOW_H__ \ No newline at end of file diff --git a/src/views/PlaybackController.cpp b/src/views/PlaybackController.cpp new file mode 100644 index 0000000..7221ef4 --- /dev/null +++ b/src/views/PlaybackController.cpp @@ -0,0 +1,843 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "define.h" +#include "common.h" +#include "dbg.h" +#include + +#include "song_info.h" +#include "music-controller.h" +#include "i18n.h" +#include "common-ui.h" +#include "PlaySettingCtxPopup.h" +#include "ErrorPopupWindow.h" +#include "Info.h" +#include "PlaybackController.h" + + +#define TOTAL_CONTROL_BTNS 6 +#define TOTAL_EDIT_BTNS 3 +#define LP_INTERVAL 0.5 /* seconds */ +#define WAIT_INTERVAL 0.5 /* seconds */ +#define LP_CHANGE 10000 /* milli seconds */ + +enum EEvasObject { + EO_CANCEL, + EO_DESELECT, + EO_DELETE, // TOTAL_EDIT_BTNS + + EO_BTN_SETTINGS, + EO_BTN_SHUFFLE, + EO_BTN_REPEAT, + EO_BTN_REWIND, + EO_BTN_PLAY, + EO_BTN_FORWARD, // TOTAL_CONTROL_BTNS +}; + +struct SBtnInfo { + const char *txt; + const char *part; + EEvasObject type; +}; + +enum ESettingBtns { + BTN_EDIT, + BTN_CLEAR +}; + +enum ETimers { + TIMER_WAIT, + TIMER_LONGPRESS, + TIMER_VOLUME +}; + +enum EPressTypes { + PRESS_SHORT, + PRESS_SHORT_PAUSE, + PRESS_LONG, + PRESS_LONG_PAUSE, +}; + +struct SPlaybackController { + Evas_Object *eoBase; + CPlaySettingCtxPopup *eoCtxPopup; + CErrorPopupWindow *eoErrPopup; + Evas_Object *eoPressedObj; + + Evas_Object *eoBtnControl[TOTAL_CONTROL_BTNS]; + Evas_Object *eoBtnEdit[TOTAL_EDIT_BTNS]; + + Ecore_Timer *etWait; + Ecore_Timer *etLongPress; + + CMusicController controller; + EPressTypes press_status; + + CPlaybackController::SCallback cb; + + CSongInfo *pSongInfo; + int duration; + + SPlaybackController() { + memset(this, 0, sizeof(SPlaybackController)); + } +}; + + +void CPlaybackController::sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text) +{ + CPlaybackController *root = (CPlaybackController *)cookie; + if (root) + root->m_OnCtxPopupBtnSelected(instance, text); +} + + +void CPlaybackController::m_OnCtxPopupBtnSelected(CContextPopup* instance, const char* text) +{ + int type = CInfo::PlaybackSettingType(); + + switch (type) { + case BTN_EDIT: + m->controller.ChangePlayerMode(MODE_PLAYLIST_EDIT); + break; + + case BTN_CLEAR: + m->controller.Stop(); + m->controller.EmptyPlaylist(); + break; + + default: + break; + } +} + + +void CPlaybackController::sm_CbErrorPopupBtnSelected(void* cookie, CMessagePopup *instance) +{ + CPlaybackController *root = (CPlaybackController *)cookie; + if (root) + root->m_OnErrorPopupBtnSelected(instance); +} + + +void CPlaybackController::m_OnErrorPopupBtnSelected(CMessagePopup *instance) +{ + m_DestroyErrorPopup(); + elm_object_focus_set(m->eoBtnControl[CTRL_BTN_PLAY], EINA_TRUE); +} + + +Eina_Bool CPlaybackController::sm_CbWaitTimer(void *dt) +{ + CPlaybackController *root = (CPlaybackController *)dt; + if (root) + root->m_OnWaitTimer(); + + return ECORE_CALLBACK_CANCEL; +} + + +void CPlaybackController::m_OnWaitTimer(void) +{ + m->press_status = PRESS_LONG; + if (m->controller.PlayState() == PLAY_STATUS_PLAY) { + /* Handle long press */ + m->controller.Pause(); + m->etLongPress = ecore_timer_add(LP_INTERVAL, sm_CbLongpressTimer, this); + } + else { + m->press_status = PRESS_LONG_PAUSE; + } + + m->etWait = NULL; +} + + +Eina_Bool CPlaybackController::sm_CbLongpressTimer(void *dt) +{ + CPlaybackController *root = (CPlaybackController *)dt; + if (root) + root->m_OnLongpressTimer(); + + return ECORE_CALLBACK_RENEW; +} + + +void CPlaybackController::m_OnLongpressTimer(void) +{ + m_HandleOnRepeated(); +} + + +void CPlaybackController::m_AddControlButtons(void) +{ + Evas_Object *box = NULL; + int i; + SBtnInfo btninfo[TOTAL_CONTROL_BTNS]; + + btninfo[CTRL_BTN_SETTINGS].txt = MUSIC_STYLE_BTN_SETTINGS; + btninfo[CTRL_BTN_SETTINGS].type = EO_BTN_SETTINGS; + + btninfo[CTRL_BTN_SHUFFLE].txt = MUSIC_STYLE_BTN_SHUFFLE; + btninfo[CTRL_BTN_SHUFFLE].type = EO_BTN_SHUFFLE; + + btninfo[CTRL_BTN_REPEAT].txt = MUSIC_STYLE_BTN_REPEAT; + btninfo[CTRL_BTN_REPEAT].type = EO_BTN_REPEAT; + + btninfo[CTRL_BTN_REWIND].txt = MUSIC_STYLE_BTN_REWIND; + btninfo[CTRL_BTN_REWIND].type = EO_BTN_REWIND; + + btninfo[CTRL_BTN_PLAY].txt = MUSIC_STYLE_BTN_PLAY; + btninfo[CTRL_BTN_PLAY].type = EO_BTN_PLAY; + + btninfo[CTRL_BTN_FORWARD].txt = MUSIC_STYLE_BTN_FORWARD; + btninfo[CTRL_BTN_FORWARD].type = EO_BTN_FORWARD; + + box = elm_box_add(m->eoBase); + if (!box) + return; + + evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0); + evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0); + elm_box_horizontal_set(box, EINA_TRUE); + elm_box_padding_set(box, + MUSIC_CONTROL_BTNS_PADDING * elm_config_scale_get(), 0); + + for (i = 0; i < TOTAL_CONTROL_BTNS; i++) { + m->eoBtnControl[i] = elm_button_add(m->eoBase); + if (!m->eoBtnControl[i]) + continue; + + elm_object_style_set(m->eoBtnControl[i], btninfo[i].txt); + evas_object_size_hint_weight_set(m->eoBtnControl[i], + EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_box_pack_end(box, m->eoBtnControl[i]); + + if (i == CTRL_BTN_REWIND || i == CTRL_BTN_FORWARD) { + Connect(m->eoBtnControl[i], btninfo[i].type, TYPE_PRESSED | TYPE_UNPRESSED | TYPE_MOUSE_MOVE); + } + else { + Connect(m->eoBtnControl[i], btninfo[i].type, TYPE_CLICKED | TYPE_MOUSE_MOVE); + } + evas_object_show(m->eoBtnControl[i]); + } + + elm_object_part_content_set(m->eoBase, MUSIC_PART_CONTROLBTNS, box); +} + + +void CPlaybackController::m_AddEditPlaylistButtons(void) +{ + Evas_Object *box = NULL; + int i; + SBtnInfo btninfo[TOTAL_EDIT_BTNS]; + + btninfo[EDIT_BTN_CANCEL].txt = MUSIC_TEXT_CANCEL; + btninfo[EDIT_BTN_CANCEL].type = EO_CANCEL; + + btninfo[EDIT_BTN_DESELECT].txt = MUSIC_TEXT_DESELECT; + btninfo[EDIT_BTN_DESELECT].type = EO_DESELECT; + + btninfo[EDIT_BTN_DELETE].txt = MUSIC_TEXT_DELETE; + btninfo[EDIT_BTN_DELETE].type = EO_DELETE; + + box = CCommonUI::AddBox(m->eoBase); + if (!box) + return; + + elm_box_horizontal_set(box, EINA_TRUE); + elm_box_padding_set(box, MUSIC_EDIT_BTNS_PADDING * elm_config_scale_get(), 0); + + for (i = 0; i < TOTAL_EDIT_BTNS; i++) { + m->eoBtnEdit[i] = elm_button_add(m->eoBase); + if (!m->eoBtnEdit[i]) + continue; + + elm_object_style_set(m->eoBtnEdit[i], MUSIC_STYLE_EDIT_BTN); + evas_object_size_hint_weight_set(m->eoBtnEdit[i], EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_box_pack_end(box, m->eoBtnEdit[i]); + elm_object_text_set(m->eoBtnEdit[i], _(btninfo[i].txt)); + + Connect(m->eoBtnEdit[i], btninfo[i].type, TYPE_CLICKED | TYPE_MOUSE_MOVE); + + evas_object_show(m->eoBtnEdit[i]); + } + elm_object_part_content_set(m->eoBase, MUSIC_PART_EDITBTNS, box); + elm_object_signal_emit(m->eoBase, MUSIC_SIGNAL_PLAYBACK_MODE, MUSIC_PLAYBACK_VIEW); +} + + +void CPlaybackController::m_UpdateForEmptySong(void) +{ + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], + MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); + elm_object_focus_set(m->eoBtnControl[CTRL_BTN_SETTINGS], EINA_TRUE); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_REPEAT], + m->eoBtnControl[CTRL_BTN_REPEAT], ELM_FOCUS_RIGHT); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_FORWARD], EINA_TRUE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_REWIND], EINA_TRUE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_PLAY], EINA_TRUE); +} + + +void CPlaybackController::m_CreateErrorPopup(void) +{ + CMessagePopup::SCallback cb; + cb.cookie = this; + cb.onBtn1Pressed = sm_CbErrorPopupBtnSelected; + + m->eoErrPopup = new CErrorPopupWindow; + m->eoErrPopup->Create(m->eoBase, &cb, MUSIC_TEXT_PLAYBACK_ERROR); + + + return; +} + + +void CPlaybackController::m_DestroyErrorPopup(void) +{ + if (!m->eoErrPopup) + return; + + if (m->eoErrPopup->FlagCreate()) + m->eoErrPopup->Destroy(); + + delete m->eoErrPopup; + m->eoErrPopup = NULL; +} + + +void CPlaybackController::m_CreateSettingsPopup(void) +{ + CContextPopup::SCallback cb; + cb.cookie = this; + cb.onSelected = sm_CbCtxPopupBtnSelected; + + m->eoCtxPopup = new CPlaySettingCtxPopup; + m->eoCtxPopup->Create(m->eoBase, &cb); +} + + +void CPlaybackController::m_DestroySettingsPopup(void) +{ + if (!m->eoCtxPopup) + return; + + if (m->eoCtxPopup->FlagCreate()) + m->eoCtxPopup->Destroy(); + + delete m->eoCtxPopup; + m->eoCtxPopup = NULL; +} + + +void CPlaybackController::m_HandleForwardBtnClicked(Evas_Object *obj) +{ + elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, + MUSIC_PLAYBACK_VIEW); + + if (m->controller.PlayState() == PLAY_STATUS_STOP) + return; + + if (!m->controller.PlayNextSong()) { + _ERR(" music play next song failed "); + return; + } +} + + +void CPlaybackController::m_HandleRewindBtnClicked(Evas_Object *obj) +{ + elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, + MUSIC_PLAYBACK_VIEW); + + if (m->controller.PlayState() == PLAY_STATUS_STOP) + return; + + if (!m->controller.PlayPreviousSong()) { + _ERR(" music play previous song failed "); + return; + } +} + + +void CPlaybackController::m_HandleOnRepeated(void) +{ + Evas_Object *obj = NULL; + int value; + char *timestr = NULL; + + if (!m->eoPressedObj) + return; + + obj = m->eoPressedObj; + + + m->controller.GetPosition(&value); + + if (obj == m->eoBtnControl[CTRL_BTN_REWIND]) { + if (value == 0) { + m_RemoveTimer(TIMER_LONGPRESS); + return; + } + value = value - LP_CHANGE; + if (value <= 0) + value = 0; + } + else { + if (value == m->duration) { + m->controller.PlayNextSong(); + + m->press_status = PRESS_LONG_PAUSE; + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], MUSIC_SIGNAL_PAUSE, + MUSIC_PLAYBACK_VIEW); + m->controller.Pause(); + m_RemoveTimer(TIMER_LONGPRESS); + + return; + } + value = value + LP_CHANGE; + if (value >= m->duration) + value = m->duration; + } + + m->controller.SetPosition(value); + timestr = CCommonUI::TimeStrFromMilSeconds(value); + if (timestr) { + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, + timestr); + free(timestr); + } + + return; +} + + +void CPlaybackController::m_RemoveTimer(int timer_code) +{ + ETimers timerCode = (ETimers)timer_code; + + switch (timerCode) { + case TIMER_WAIT: + if (m->etWait) { + ecore_timer_del(m->etWait); + m->etWait = NULL; + } + break; + + case TIMER_LONGPRESS: + if (m->etLongPress) { + ecore_timer_del(m->etLongPress); + m->etLongPress = NULL; + } + break; + + default: + _ERR(" invalid value "); + break; + } +} + + +void CPlaybackController::m_UpdateSongInfo(void) +{ + CSongInfo *sinfo = NULL; + int index; + + if (!m->controller.GetCurrentSongIndex(&index)) { + _ERR(" music get current song index failed "); + return; + } + + if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { + _ERR(" music get songinfo failed "); + return; + } + m->pSongInfo = sinfo; +} + + +void CPlaybackController::m_HandleOnPressed(Evas_Object *obj) +{ + m->press_status = PRESS_SHORT; + m->eoPressedObj = obj; + + m->etWait = ecore_timer_add(WAIT_INTERVAL, sm_CbWaitTimer, this); +} + + +void CPlaybackController::m_HandleOnUnpressed(Evas_Object *obj) +{ + m_RemoveTimer(TIMER_WAIT); + m_RemoveTimer(TIMER_LONGPRESS); + + if (m->press_status == PRESS_SHORT) { + /* Handle song change */ + if (m->controller.PlayState() == PLAY_STATUS_PLAY) + m->controller.Pause(); + + if (obj == m->eoBtnControl[CTRL_BTN_FORWARD]) + m_HandleForwardBtnClicked(obj); + else + m_HandleRewindBtnClicked(obj); + + if (m->controller.PlayState() != PLAY_STATUS_PLAY) + m->controller.Resume(); + } + else if (m->press_status == PRESS_LONG) { + if (m->controller.PlayState() != PLAY_STATUS_PLAY) + m->controller.Resume(); + } + + m->press_status = PRESS_SHORT; +} + + +bool CPlaybackController::Create(Evas_Object *eoBase, SCallback *cb) +{ + ASSERT(!m); + + _CREATE_BEGIN{ + _CHECK(m = new SPlaybackController) + _COMMAND{ m->eoBase = eoBase; } + _CHECK(m->controller.Create()) + _CHECK(m->controller.AddListener(this)) + + _WHEN_SUCCESS{ + m_AddControlButtons(); + m_AddEditPlaylistButtons(); + m->cb = *cb; + m->press_status = PRESS_SHORT; + } + + _CHECK_FAIL{ m->controller.RemoveListener(this); } + _CHECK_FAIL{ m->controller.Destroy(); } + + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return false; } + + return true; +} + + +void CPlaybackController::Destroy(void) +{ + ASSERT(m); + + m_DestroyErrorPopup(); + m_DestroySettingsPopup(); + m->controller.RemoveListener(this); + + delete m; + m = NULL; +} + + +void CPlaybackController::Update(void) +{ + int state; + + state = m->controller.PlayState(); + switch (state) { + case PLAY_STATUS_INITIAL: + // Initial State, Do nothing + break; + + case PLAY_STATUS_STOP: + if (!m->eoErrPopup) + elm_object_focus_set(m->eoBtnControl[CTRL_BTN_PLAY], EINA_TRUE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_FORWARD], EINA_TRUE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_REWIND], EINA_TRUE); + break; + + case PLAY_STATUS_PLAY: + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_FORWARD], EINA_FALSE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_REWIND], EINA_FALSE); + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], + MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); + break; + + case PLAY_STATUS_PAUSE: + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_FORWARD], EINA_FALSE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_REWIND], EINA_FALSE); + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], + MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); + break; + + default: + ASSERT(!"Invalid State"); + break; + } + + state = m->controller.ShuffleState(); + switch (state) { + case SHUFFLE_STATUS_OFF: + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_SHUFFLE], + MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); + break; + + case SHUFFLE_STATUS_ON: + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_SHUFFLE], + MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); + break; + + default: + ASSERT(!"Invalid State"); + break; + } + + state = m->controller.RepeatState(); + switch (state) { + case REPEAT_STATUS_NONE: + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_REPEAT], + MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); + break; + + case REPEAT_STATUS_ALL: + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_REPEAT], + MUSIC_SIGNAL_REPEAT_ALL, MUSIC_PLAYBACK_VIEW); + break; + + case REPEAT_STATUS_ONE: + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_REPEAT], + MUSIC_SIGNAL_REPEAT_ONE, MUSIC_PLAYBACK_VIEW); + break; + + default: + ASSERT(!"Invalid State"); + break; + } +} + + +Evas_Object *CPlaybackController::ControlBtnsObject(EPlayerControlBtns id) +{ + ASSERT(m); + return m->eoBtnControl[id]; +} + + +Evas_Object *CPlaybackController::EditBtnsObject(EPlayerEditBtns id) +{ + ASSERT(m); + return m->eoBtnEdit[id]; +} + + +void CPlaybackController::OnComplete(void) +{ +} + + +void CPlaybackController::OnStartPlayback(void) +{ + m_UpdateSongInfo(); + m->duration = m->pSongInfo->Duration(); +} + + +void CPlaybackController::OnStopPlayback(void) +{ +} + + +void CPlaybackController::OnPausePlayback(void) +{ +} + + +void CPlaybackController::OnResumePlayback(void) +{ +} + + +void CPlaybackController::OnPosition(int milsec) +{ +} + + +void CPlaybackController::OnError(void) +{ + m_CreateErrorPopup(); +} + + +void CPlaybackController::OnEmptyPlaylist(void) +{ + m_UpdateForEmptySong(); +} + + +void CPlaybackController::OnRemoteButtonEvent(Evas_Object *eoBtn, EPlayerBtnsEvent ev) +{ + switch (ev) { + case EVENT_PRESSED: + m_HandleOnPressed(eoBtn); + break; + + case EVENT_UNPRESSED: + m_HandleOnUnpressed(eoBtn); + break; + + default: + ASSERT(!"Invalid Event."); + break; + } +} + + +void CPlaybackController::OnPressed(int id, Evas_Object *obj) +{ + switch (id) { + case EO_BTN_FORWARD: + case EO_BTN_REWIND: + m_HandleOnPressed(obj); + break; + + default: + break; + } +} + + +void CPlaybackController::OnUnpressed(int id, Evas_Object *obj) +{ + switch (id) { + case EO_BTN_FORWARD: + case EO_BTN_REWIND: + m_HandleOnUnpressed(obj); + break; + + default: + break; + } +} + + +void CPlaybackController::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev) +{ + switch (id) { + case EO_CANCEL: + case EO_DESELECT: + case EO_DELETE: + case EO_BTN_FORWARD: + case EO_BTN_PLAY: + case EO_BTN_REPEAT: + case EO_BTN_REWIND: + case EO_BTN_SETTINGS: + case EO_BTN_SHUFFLE: + if (!elm_object_focus_get(obj)) + elm_object_focus_set(obj, EINA_TRUE); + break; + + default: + break; + } +} + + +void CPlaybackController::OnMouseClicked(int id, Evas_Object *obj) +{ + switch (id) { + case EO_CANCEL: + m->controller.HandlePlaylistEditButtons(EDIT_BTN_CANCEL); + m->controller.ChangePlayerMode(MODE_PLAYBACK); + + break; + + case EO_DESELECT: + m->controller.HandlePlaylistEditButtons(EDIT_BTN_DESELECT); + elm_object_focus_set(m->eoBtnEdit[EDIT_BTN_CANCEL], EINA_TRUE); + break; + + case EO_DELETE: + m->controller.HandlePlaylistEditButtons(EDIT_BTN_DELETE); + break; + + case EO_BTN_SETTINGS: + elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); + + if (m->cb.OnCurrentSongCount && + m->cb.OnCurrentSongCount(m->cb.cookie) == 0) + return; + + elm_object_signal_emit(obj, MUSIC_SIGNAL_CONTROL_SELECTED, MUSIC_PLAYBACK_VIEW); + m_DestroySettingsPopup(); + m_CreateSettingsPopup(); + break; + + case EO_BTN_SHUFFLE: + elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); + + switch (m->controller.ShuffleState()) { + case SHUFFLE_STATUS_OFF: + m->controller.SetShuffleState(SHUFFLE_STATUS_ON); + elm_object_signal_emit(obj, MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); + break; + + default: + m->controller.SetShuffleState(SHUFFLE_STATUS_OFF); + elm_object_signal_emit(obj, MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); + break; + } + break; + + case EO_BTN_REPEAT: + elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); + + switch (m->controller.RepeatState()) { + case REPEAT_STATUS_NONE: + m->controller.SetRepeatState(REPEAT_STATUS_ALL); + elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_ALL, MUSIC_PLAYBACK_VIEW); + break; + + case REPEAT_STATUS_ALL: + m->controller.SetRepeatState(REPEAT_STATUS_ONE); + elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_ONE, MUSIC_PLAYBACK_VIEW); + break; + + default: + m->controller.SetRepeatState(REPEAT_STATUS_NONE); + elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); + break; + } + break; + + case EO_BTN_PLAY: + elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); + + switch (m->controller.PlayState()) { + case PLAY_STATUS_PAUSE: + m->controller.Resume(); + elm_object_signal_emit(obj, MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); + break; + + case PLAY_STATUS_PLAY: + elm_object_signal_emit(obj, MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); + m->controller.Pause(); + break; + + default: + m->controller.Start(); + break; + } + break; + + default: + break; + } +} \ No newline at end of file diff --git a/src/views/PlaybackController.h b/src/views/PlaybackController.h new file mode 100644 index 0000000..e9dbd9e --- /dev/null +++ b/src/views/PlaybackController.h @@ -0,0 +1,101 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef __PLAYBACK_CONTROLLER_H__ +#define __PLAYBACK_CONTROLLER_H__ + +class CPlaybackController : + public CListenerMgr, + public IMusicControllerListener, + public IPressedListener, + public IUnpressedListener, + public IMouseMoveListener, + public IMouseClickedListener { +public: + struct SCallback { + void *cookie; + int(*OnCurrentSongCount)(void *cookie); + }; + +private: + struct SPlaybackController *m; + +private: + static void sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text); + void m_OnCtxPopupBtnSelected(CContextPopup* instance, const char* text); + + static void sm_CbErrorPopupBtnSelected(void* cookie, CMessagePopup *instance); + void m_OnErrorPopupBtnSelected(CMessagePopup *instance); + + static Eina_Bool sm_CbWaitTimer(void *dt); + void m_OnWaitTimer(void); + + static Eina_Bool sm_CbLongpressTimer(void *dt); + void m_OnLongpressTimer(void); + +private: + void m_AddControlButtons(void); + void m_AddEditPlaylistButtons(void); + void m_CreateErrorPopup(void); + void m_DestroyErrorPopup(void); + void m_CreateSettingsPopup(void); + void m_DestroySettingsPopup(void); + void m_UpdateForEmptySong(void); + + void m_HandleForwardBtnClicked(Evas_Object *obj); + void m_HandleRewindBtnClicked(Evas_Object *obj); + void m_HandleOnRepeated(void); + void m_HandleOnPressed(Evas_Object *obj); + void m_HandleOnUnpressed(Evas_Object *obj); + + void m_RemoveTimer(int timer_code); + void m_UpdateSongInfo(void); + +public: + CPlaybackController() : + IPressedListener(this), + IUnpressedListener(this), + IMouseMoveListener(this), + IMouseClickedListener(this), + m(0) {} + virtual ~CPlaybackController() {} + + bool Create(Evas_Object *eoBase, SCallback *cb); + virtual void Destroy(void); + + void Update(void); + + Evas_Object *ControlBtnsObject(EPlayerControlBtns id); + Evas_Object *EditBtnsObject(EPlayerEditBtns id); + +public: + virtual void OnComplete(void); + virtual void OnStartPlayback(void); + virtual void OnStopPlayback(void); + virtual void OnPausePlayback(void); + virtual void OnResumePlayback(void); + virtual void OnPosition(int milsec); + virtual void OnError(void); + virtual void OnEmptyPlaylist(void); + virtual void OnRemoteButtonEvent(Evas_Object *eoBtn, EPlayerBtnsEvent ev); + + virtual void OnPressed(int id, Evas_Object *obj); + virtual void OnUnpressed(int id, Evas_Object *obj); + virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); + virtual void OnMouseClicked(int id, Evas_Object *obj); +}; + +#endif // __PLAYBACK_CONTROLLER_H__ \ No newline at end of file diff --git a/src/views/RemovePopupWindow.cpp b/src/views/RemovePopupWindow.cpp index 0775e45..8ca93e0 100644 --- a/src/views/RemovePopupWindow.cpp +++ b/src/views/RemovePopupWindow.cpp @@ -24,7 +24,7 @@ #define NUM_BTNS 2 -const char *btnText[NUM_BTNS] = { +static const char *btnText[NUM_BTNS] = { _(MUSIC_TEXT_REMOVE), _(MUSIC_TEXT_CANCEL) }; diff --git a/src/views/SliderWidget.cpp b/src/views/SliderWidget.cpp new file mode 100644 index 0000000..b3362d7 --- /dev/null +++ b/src/views/SliderWidget.cpp @@ -0,0 +1,293 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#include "define.h" +#include "common.h" +#include "dbg.h" +#include + +#include "song_info.h" +#include "music-controller.h" +#include "i18n.h" +#include "common-ui.h" +#include "SliderWidget.h" + + +#define S_INCREMENT 1000 /* milli seconds */ +#define S_INTERVAL 1 /* seconds */ +#define SLIDER_STEP 5000 /* milli seconds */ + + +struct SSliderWidget { + Evas_Object *eoSlider; + Evas_Object *eoBase; + + Ecore_Timer *etSlider; + + CSongInfo *pSongInfo; + + CMusicController controller; + + SSliderWidget() { + eoSlider = NULL; + eoBase = NULL; + etSlider = NULL; + pSongInfo = NULL; + } +}; + + +Eina_Bool CSliderWidget::sm_CbUpdateSlider(void *dt) +{ + CSliderWidget *root = (CSliderWidget*)dt; + Eina_Bool ret = ECORE_CALLBACK_CANCEL; + + if (root) + ret = root->m_OnUpdateSlider(); + + return ret; +} + + +Eina_Bool CSliderWidget::m_OnUpdateSlider(void) +{ + char *timestr = NULL; + int value; + int duration; + + if (!m->controller.GetPosition(&value)) { + m->etSlider = NULL; + return ECORE_CALLBACK_CANCEL; + } + + m_UpdateSongInfo(); + + duration = m->pSongInfo->Duration(); + + value = value + S_INCREMENT; + if (value > duration) { + m->etSlider = NULL; + return ECORE_CALLBACK_CANCEL; + } + + elm_slider_value_set(m->eoSlider, value); + timestr = CCommonUI::TimeStrFromMilSeconds(value); + if (timestr) { + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, + timestr); + free(timestr); + } + + return ECORE_CALLBACK_RENEW; +} + + +bool CSliderWidget::m_AddSlider(void) +{ + Evas_Object *eoSlider = NULL; + + eoSlider = elm_slider_add(m->eoBase); + if (!eoSlider) + return false; + + elm_slider_indicator_show_set(eoSlider, EINA_FALSE); + elm_slider_indicator_show_on_focus_set(eoSlider, EINA_FALSE); + elm_object_style_set(eoSlider, MUSIC_STYLE_SLIDER); + elm_slider_horizontal_set(eoSlider, EINA_TRUE); + elm_object_part_content_set(m->eoBase, MUSIC_PART_PROGRESSBAR, eoSlider); + + Connect(eoSlider, TYPE_CHANGED | TYPE_MOUSE_MOVE); + + evas_object_show(eoSlider); + m->eoSlider = eoSlider; + + return true; +} + + +void CSliderWidget::m_RemoveTimer(void) +{ + if (m->etSlider) { + ecore_timer_del(m->etSlider); + m->etSlider = NULL; + } +} + + +void CSliderWidget::m_UpdateSongInfo(void) +{ + CSongInfo *sinfo = NULL; + int index; + + if (!m->controller.GetCurrentSongIndex(&index)) { + _ERR(" music get current song index failed "); + return; + } + + if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { + _ERR(" music get songinfo failed "); + return; + } + m->pSongInfo = sinfo; +} + + +bool CSliderWidget::Create(Evas_Object *eoBase) +{ + ASSERT(!m); + + _CREATE_BEGIN{ + _CHECK(m = new SSliderWidget) + _COMMAND{ m->eoBase = eoBase; } + _CHECK(m->controller.Create()) + _CHECK(m->controller.AddListener(this)) + _CHECK(m_AddSlider()) + + _CHECK_FAIL{} + _CHECK_FAIL{ m->controller.RemoveListener(this); } + _CHECK_FAIL{ m->controller.Destroy(); } + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return false; } + + return true; +} + + +void CSliderWidget::Destroy(void) +{ + ASSERT(m); + + m->controller.RemoveListener(this); + m_RemoveTimer(); + + delete m; + m = NULL; +} + + +Evas_Object* CSliderWidget::Base(void) +{ + ASSERT(m); + + return m->eoSlider; +} + + +void CSliderWidget::Init(void) +{ + elm_object_disabled_set(m->eoSlider, EINA_TRUE); + elm_slider_value_set(m->eoSlider, 0); + elm_object_part_text_set(m->eoBase, MUSIC_PART_FULLTIME, "00:00"); + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); +} + + +void CSliderWidget::OnComplete(void) +{ +} + + +void CSliderWidget::OnStartPlayback(void) +{ + int duration; + char *timestr = NULL; + double step; + + elm_slider_value_set(m->eoSlider, 0); + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); + + elm_object_disabled_set(m->eoSlider, EINA_FALSE); + + m_UpdateSongInfo(); + duration = m->pSongInfo->Duration(); + + m_RemoveTimer(); + m->etSlider = ecore_timer_add(S_INTERVAL, sm_CbUpdateSlider, this); + + elm_slider_min_max_set(m->eoSlider, 0, duration); + timestr = CCommonUI::TimeStrFromMilSeconds(duration); + if (timestr) { + elm_object_part_text_set(m->eoBase, + MUSIC_PART_FULLTIME, timestr); + free(timestr); + } + + step = (double)SLIDER_STEP / (double)duration; + elm_slider_step_set(m->eoSlider, step); +} + + +void CSliderWidget::OnStopPlayback(void) +{ + elm_slider_value_set(m->eoSlider, 0); + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); + + elm_object_disabled_set(m->eoSlider, EINA_TRUE); + m_RemoveTimer(); +} + + +void CSliderWidget::OnPausePlayback(void) +{ + if (m->etSlider) + ecore_timer_freeze(m->etSlider); +} + + +void CSliderWidget::OnResumePlayback(void) +{ + if (m->etSlider) + ecore_timer_thaw(m->etSlider); +} + + +void CSliderWidget::OnPosition(int milsec) +{ + elm_slider_value_set(m->eoSlider, milsec); +} + + +void CSliderWidget::OnChanged(int id, Evas_Object *obj) +{ + char *timestr = NULL; + int value; + + if (m->controller.PlayState() == PLAY_STATUS_PLAY) { + if (m->etSlider) + ecore_timer_freeze(m->etSlider); + } + + value = elm_slider_value_get(obj); + m->controller.SetPosition(value); + timestr = CCommonUI::TimeStrFromMilSeconds(value); + if (timestr) { + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, + timestr); + free(timestr); + } + + if (m->controller.PlayState() == PLAY_STATUS_PLAY) { + if (m->etSlider) + ecore_timer_thaw(m->etSlider); + } +} + + +void CSliderWidget::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev) +{ + if (!elm_object_focus_get(obj)) + elm_object_focus_set(obj, EINA_TRUE); +} \ No newline at end of file diff --git a/src/views/SliderWidget.h b/src/views/SliderWidget.h new file mode 100644 index 0000000..78637ff --- /dev/null +++ b/src/views/SliderWidget.h @@ -0,0 +1,68 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +#ifndef __SLIDER_WIDGET_H__ +#define __SLIDER_WIDGET_H__ + +class CSliderWidget : + public CListenerMgr, + public IMusicControllerListener, + public IMouseMoveListener, + public IChangedListener { +private: + struct SSliderWidget *m; + +private: + static Eina_Bool sm_CbUpdateSlider(void *dt); + Eina_Bool m_OnUpdateSlider(void); + + bool m_AddSlider(void); + void m_RemoveTimer(void); + + void m_UpdateSongInfo(void); + +public: + CSliderWidget() : + IMouseMoveListener(this), + IChangedListener(this), + m(0) {} + virtual ~CSliderWidget() {} + + bool Create(Evas_Object *eoParent); + virtual void Destroy(void); + + Evas_Object* Base(void); + + void Init(void); + + //! This function is invoked when playback is complete. + virtual void OnComplete(void); + //! This function is invoked when new song is played. + virtual void OnStartPlayback(void); + //! + virtual void OnStopPlayback(void); + //! This function is invoked when playback is paused. + virtual void OnPausePlayback(void); + //! This function is invoked when playback is resumed. + virtual void OnResumePlayback(void); + //! + virtual void OnPosition(int milsec); + + virtual void OnChanged(int id, Evas_Object *obj); + virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); +}; + +#endif // __PLAYBACK_VIEW_H__ \ No newline at end of file diff --git a/src/views/Timer.cpp b/src/views/Timer.cpp new file mode 100644 index 0000000..efde40a --- /dev/null +++ b/src/views/Timer.cpp @@ -0,0 +1,103 @@ +/* +* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved +* +* Licensed under the Apache License, Version 2.0 (the License); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an AS IS BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + + +#include "define.h" +#include "common.h" +#include "dbg.h" +#include +#include "Timer.h" + + +struct STimer { + int count; + int s, e; + struct SCookie { + Ecore_Timer *etTimer; + CTimer *root; + int id; + SCookie(CTimer *timer, int _id) { + root = timer; + id = _id; + } + }; + + Eina_List *elList; +}; + + +Eina_Bool CTimer::sm_CbTimer(void *data) +{ + STimer::SCookie *cookie = (STimer::SCookie*)data; + + if (cookie->root) + cookie->root->t_OnTimer(cookie->id); + + cookie->root->m->elList = eina_list_remove(cookie->root->m->elList, cookie); + + delete cookie; + + return EINA_FALSE; +} + + +void CTimer::t_OnTimer(int id) +{ +} + + +bool CTimer::Create(void) +{ + ASSERT(!m); + + m = new STimer; + if (!m) + return false; + + m->elList = NULL; + + return true; +} + + +void CTimer::Destroy(void) +{ + ASSERT(m); + + delete m; + m = NULL; +} + + +bool CTimer::SetTimer(int id, int ms) +{ + ASSERT(m); + + + STimer::SCookie *cookie = new STimer::SCookie(this, id); + if (!cookie) + return false; + + m->elList = eina_list_append(m->elList, cookie); + cookie->etTimer = ecore_timer_add(ms, sm_CbTimer, cookie); + return true; +} + + +void CTimer::KillTimer(int id) +{ + ASSERT(m); +} diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index f052b2a..e0b7f07 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -19,6 +19,7 @@ #include "dbg.h" #include +#include "Timer.h" #include "song_info.h" #include "album_info.h" #include "music-controller.h" @@ -30,415 +31,19 @@ #include "HandleVolume.h" #include "PlaySettingCtxPopup.h" #include "Info.h" +#include "SliderWidget.h" +#include "PlaybackController.h" #define TOTAL_CONTROL_BTNS 6 #define TOTAL_EDIT_BTNS 3 -#define S_INTERVAL 1 /* seconds */ -#define LP_INTERVAL 0.5 /* seconds */ -#define WAIT_INTERVAL 0.5 /* seconds */ -#define SLIDER_STEP 5000 /* milli seconds */ -#define LP_CHANGE 10000 /* milli seconds */ -#define S_INCREMENT 1000 /* milli seconds */ -// SSliderWidget -struct SSliderWidget { - Evas_Object *eoSlider; - Evas_Object *eoBase; - - Ecore_Timer *etSlider; - - CSongInfo *pSongInfo; - - CMusicController controller; - - SSliderWidget() { - eoSlider = NULL; - eoBase = NULL; - etSlider = NULL; - pSongInfo = NULL; - } -}; - - -Eina_Bool CSliderWidget::sm_CbUpdateSlider(void *dt) -{ - CSliderWidget *root = (CSliderWidget*)dt; - Eina_Bool ret = ECORE_CALLBACK_CANCEL; - - if (root) - ret = root->m_OnUpdateSlider(); - - return ret; -} - - -Eina_Bool CSliderWidget::m_OnUpdateSlider(void) -{ - char *timestr = NULL; - int value; - int duration; - - if (!m->controller.GetPosition(&value)) { - m->etSlider = NULL; - return ECORE_CALLBACK_CANCEL; - } - - m_UpdateSongInfo(); - - duration = m->pSongInfo->Duration(); - - value = value + S_INCREMENT; - if (value > duration) { - m->etSlider = NULL; - return ECORE_CALLBACK_CANCEL; - } - - elm_slider_value_set(m->eoSlider, value); - timestr = CCommonUI::TimeStrFromMilSeconds(value); - if (timestr) { - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, - timestr); - free(timestr); - } - - return ECORE_CALLBACK_RENEW; -} - - -bool CSliderWidget::m_AddSlider(void) -{ - Evas_Object *eoSlider = NULL; - - eoSlider = elm_slider_add(m->eoBase); - if (!eoSlider) - return false; - - elm_slider_indicator_show_set(eoSlider, EINA_FALSE); - elm_slider_indicator_show_on_focus_set(eoSlider, EINA_FALSE); - elm_object_style_set(eoSlider, MUSIC_STYLE_SLIDER); - elm_slider_horizontal_set(eoSlider, EINA_TRUE); - elm_object_part_content_set(m->eoBase, MUSIC_PART_PROGRESSBAR, eoSlider); - - Connect(eoSlider, TYPE_CHANGED | TYPE_MOUSE_MOVE); - - evas_object_show(eoSlider); - m->eoSlider = eoSlider; - - return true; -} - - -void CSliderWidget::m_RemoveTimer(void) -{ - if (m->etSlider) { - ecore_timer_del(m->etSlider); - m->etSlider = NULL; - } -} - - -void CSliderWidget::m_UpdateSongInfo(void) -{ - CSongInfo *sinfo = NULL; - int index; - - if (!m->controller.GetCurrentSongIndex(&index)) { - _ERR(" music get current song index failed "); - return; - } - - if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { - _ERR(" music get songinfo failed "); - return; - } - m->pSongInfo = sinfo; -} - - -bool CSliderWidget::Create(Evas_Object *eoBase) -{ - ASSERT(!m); - - _CREATE_BEGIN{ - _CHECK(m = new SSliderWidget) - _COMMAND{ m->eoBase = eoBase; } - _CHECK(m->controller.Create()) - _CHECK(m->controller.AddListener(this)) - _CHECK(m_AddSlider()) - - _CHECK_FAIL{} - _CHECK_FAIL{ m->controller.RemoveListener(this); } - _CHECK_FAIL{ m->controller.Destroy(); } - _CHECK_FAIL{ delete m; m = NULL; } - } _CREATE_END_AND_CATCH{ return false; } - - return true; -} - - -void CSliderWidget::Destroy(void) -{ - ASSERT(m); - - m->controller.RemoveListener(this); - m_RemoveTimer(); - - delete m; - m = NULL; -} - - -Evas_Object* CSliderWidget::Base(void) -{ - ASSERT(m); - - return m->eoSlider; -} - - -void CSliderWidget::Init(void) -{ - elm_object_disabled_set(m->eoSlider, EINA_TRUE); - elm_slider_value_set(m->eoSlider, 0); -} - - -void CSliderWidget::OnComplete(void) -{ -} - - -void CSliderWidget::OnStartPlayback(void) -{ - int duration; - char *timestr = NULL; - double step; - - elm_slider_value_set(m->eoSlider, 0); - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); - - elm_object_disabled_set(m->eoSlider, EINA_FALSE); - - m_UpdateSongInfo(); - duration = m->pSongInfo->Duration(); - - m_RemoveTimer(); - m->etSlider = ecore_timer_add(S_INTERVAL, sm_CbUpdateSlider, this); - - elm_slider_min_max_set(m->eoSlider, 0, duration); - timestr = CCommonUI::TimeStrFromMilSeconds(duration); - if (timestr) { - elm_object_part_text_set(m->eoBase, - MUSIC_PART_FULLTIME, timestr); - free(timestr); - } - - step = (double)SLIDER_STEP / (double)duration; - elm_slider_step_set(m->eoSlider, step); -} - - -void CSliderWidget::OnStopPlayback(void) -{ - elm_slider_value_set(m->eoSlider, 0); - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); - - elm_object_disabled_set(m->eoSlider, EINA_TRUE); - m_RemoveTimer(); -} - - -void CSliderWidget::OnPausePlayback(void) -{ - if (m->etSlider) - ecore_timer_freeze(m->etSlider); -} - - -void CSliderWidget::OnResumePlayback(void) -{ - if (m->etSlider) - ecore_timer_thaw(m->etSlider); -} - - -void CSliderWidget::OnPosition(int milsec) -{ - elm_slider_value_set(m->eoSlider, milsec); -} - - -void CSliderWidget::OnChanged(int id, Evas_Object *obj) -{ - char *timestr = NULL; - int value; - - if (m->controller.PlayState() == PLAY_STATUS_PLAY) { - if (m->etSlider) - ecore_timer_freeze(m->etSlider); - } - - value = elm_slider_value_get(obj); - m->controller.SetPosition(value); - timestr = CCommonUI::TimeStrFromMilSeconds(value); - if (timestr) { - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, - timestr); - free(timestr); - } - - if (m->controller.PlayState() == PLAY_STATUS_PLAY) { - if (m->etSlider) - ecore_timer_thaw(m->etSlider); - } -} - - -void CSliderWidget::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev) -{ - if (!elm_object_focus_get(obj)) - elm_object_focus_set(obj, EINA_TRUE); -} - - -// STimer -struct STimer { - int count; - int s, e; - struct SCookie { - Ecore_Timer *etTimer; - CTimer *root; - int id; - SCookie(CTimer *timer, int _id) { - root = timer; - id = _id; - } - }; - - Eina_List *elList; -}; - - -Eina_Bool CTimer::sm_CbTimer(void *data) -{ - STimer::SCookie *cookie = (STimer::SCookie*)data; - - if (cookie->root) - cookie->root->t_OnTimer(cookie->id); - - cookie->root->m->elList = eina_list_remove(cookie->root->m->elList, cookie); - - delete cookie; - - return EINA_FALSE; -} - - -void CTimer::t_OnTimer(int id) -{ -} - - -bool CTimer::Create(void) -{ - ASSERT(!m); - - m = new STimer; - if (!m) - return false; - - m->elList = NULL; - - return true; -} - - -void CTimer::Destroy(void) -{ - ASSERT(m); - - delete m; - m = NULL; -} - - -bool CTimer::SetTimer(int id, int ms) -{ - ASSERT(m); - - - STimer::SCookie *cookie = new STimer::SCookie(this, id); - if (!cookie) - return false; - - m->elList = eina_list_append(m->elList, cookie); - cookie->etTimer = ecore_timer_add(ms, sm_CbTimer, cookie); - return true; -} - - -void CTimer::KillTimer(int id) -{ - ASSERT(m); -} - - -// CPlaybackView enum EEvasObject { EO_BASE, - - EO_ERROR_POPUP_BUTTON, - - EO_CANCEL, - EO_DESELECT, - EO_DELETE, // TOTAL_EDIT_BTNS - - EO_BTN_SETTINGS, - EO_BTN_SHUFFLE, - EO_BTN_REPEAT, - EO_BTN_REWIND, - EO_BTN_PLAY, - EO_BTN_FORWARD, // TOTAL_CONTROL_BTNS - EO_PLAYLIST, }; - -enum EControlBtns { - BTN_SETTINGS, - BTN_SHUFFLE, - BTN_REPEAT, - BTN_REWIND, - BTN_PLAY, - BTN_FORWARD -}; - -enum ESettingBtns { - BTN_EDIT, - BTN_CLEAR -}; - -enum EEditBtns { - BTN_CANCEL, - BTN_DESELECT, - BTN_DELETE -}; - -enum ETimers { - TIMER_WAIT, - TIMER_LONGPRESS, - TIMER_VOLUME -}; - -enum EPressTypes { - PRESS_SHORT, - PRESS_SHORT_PAUSE, - PRESS_LONG, - PRESS_LONG_PAUSE, -}; - struct SItemInfo { Elm_Object_Item *item; CSongInfo *sinfo; @@ -451,28 +56,24 @@ struct SPlaybackView { Evas_Object *eoWin; Evas_Object *eoBase; - CPlaySettingCtxPopup *eoCtxPopup; - Evas_Object *eoErrPopup; Evas_Object *eoPlaylist; Elm_Object_Item *focused_item; + CPlaybackController *pPlaybackController; + // These are reference values. Evas_Object *eoBtnControl[TOTAL_CONTROL_BTNS]; Evas_Object *eoBtnEdit[TOTAL_EDIT_BTNS]; Evas_Object *eoAlbumCover; CSliderWidget *pSliderWidget; - Evas_Object *eoPressedObj; - Eina_List *elInfo; - Ecore_Timer *etLongPress; - Ecore_Timer *etWait; + Eina_List *elInfo; CMusicController *pController; //! NOT NULL CSongInfo *csinfo; CViewMgr *mgr; SItemInfo *cs_itinfo; SContentInfo *ctxtinfo; - EPressTypes press_status; CHandleVolume *pHandleVolume; @@ -481,54 +82,6 @@ struct SPlaybackView { } }; -struct SBtnInfo { - const char *txt; - const char *part; - EEvasObject type; -}; - - -Eina_Bool CPlaybackView::sm_CbLongpressTimer(void *dt) -{ - CPlaybackView *root = (CPlaybackView *)dt; - if (root) - root->m_OnLongpressTimer(); - - return ECORE_CALLBACK_RENEW; -} - - -void CPlaybackView::m_OnLongpressTimer(void) -{ - m_HandleOnRepeated(); -} - - -Eina_Bool CPlaybackView::sm_CbWaitTimer(void *dt) -{ - CPlaybackView *root = (CPlaybackView *)dt; - if (root) - root->m_OnWaitTimer(); - - return ECORE_CALLBACK_CANCEL; -} - - -void CPlaybackView::m_OnWaitTimer(void) -{ - m->press_status = PRESS_LONG; - if (m->pController->PlayState() == PLAY_STATUS_PLAY) { - /* Handle long press */ - m_PlaybackPause(); - m->etLongPress = ecore_timer_add(LP_INTERVAL, sm_CbLongpressTimer, this); - } - else { - m->press_status = PRESS_LONG_PAUSE; - } - - m->etWait = NULL; -} - void CPlaybackView::sm_CbCtxtUpdate(void *dt, enum EActionType type, int lid) { @@ -618,77 +171,20 @@ void CPlaybackView::m_OnCtxtClose(void) } -void CPlaybackView::sm_CbCtxPopupBtnSelected(void* cookie, CContextPopup* instance, const char* text) +int CPlaybackView::sm_CbCurrentSongCount(void *cookie) { CPlaybackView *root = (CPlaybackView *)cookie; + int ret = 0; if (root) - root->m_CbCtxPopupBtnSelected(instance, text); -} - - -void CPlaybackView::m_CbCtxPopupBtnSelected(CContextPopup* instance, const char* text) -{ - int type = CInfo::PlaybackSettingType(); - - switch (type) { - case BTN_EDIT: - m_FromPlaybackToEditMode(); - break; - - case BTN_CLEAR: - m->pController->Stop(); - m->pController->EmptyPlaylist(); - eina_list_free(m->elInfo); - m->elInfo = NULL; - elm_genlist_clear(m->eoPlaylist); - m_UpdateEmptySongInfo(); - break; - - default: - break; - } -} + ret = root->m_CbCurrentSongCount(); - -void CPlaybackView::m_RemoveTimer(int timer_code) -{ - ETimers timerCode = (ETimers)timer_code; - - switch (timerCode) { - case TIMER_WAIT: - if (m->etWait) { - ecore_timer_del(m->etWait); - m->etWait = NULL; - } - break; - - case TIMER_LONGPRESS: - if (m->etLongPress) { - ecore_timer_del(m->etLongPress); - m->etLongPress = NULL; - } - break; - - case TIMER_VOLUME: - m->pHandleVolume->RemoveTimer(); - break; - - default: - _ERR(" invalid value "); - break; - } -} - - -void CPlaybackView::m_PlaybackPause(void) -{ - m->pController->Pause(); + return ret; } -void CPlaybackView::m_PlaybackResume(void) +int CPlaybackView::m_CbCurrentSongCount(void) { - m->pController->Resume(); + return eina_list_count(m->elInfo); } @@ -742,83 +238,6 @@ void CPlaybackView::m_UnselectItem(SItemInfo *pItemInfo) } -void CPlaybackView::m_UpdateControlBtns(void) -{ - int state; - - state = m->pController->PlayState(); - switch (state) { - case PLAY_STATUS_INITIAL: - // Initial State, Do nothing - break; - - case PLAY_STATUS_STOP: - if (!m->eoErrPopup) - elm_object_focus_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE); - elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_TRUE); - elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_TRUE); - break; - - case PLAY_STATUS_PLAY: - elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_FALSE); - elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_FALSE); - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], - MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); - break; - - case PLAY_STATUS_PAUSE: - elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_FALSE); - elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_FALSE); - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], - MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); - break; - - default: - ASSERT(!"Invalid State"); - break; - } - - state = m->pController->ShuffleState(); - switch (state) { - case SHUFFLE_STATUS_OFF: - elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], - MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); - break; - - case SHUFFLE_STATUS_ON: - elm_object_signal_emit(m->eoBtnControl[BTN_SHUFFLE], - MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); - break; - - default: - ASSERT(!"Invalid State"); - break; - } - - state = m->pController->RepeatState(); - switch (state) { - case REPEAT_STATUS_NONE: - elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], - MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); - break; - - case REPEAT_STATUS_ALL: - elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], - MUSIC_SIGNAL_REPEAT_ALL, MUSIC_PLAYBACK_VIEW); - break; - - case REPEAT_STATUS_ONE: - elm_object_signal_emit(m->eoBtnControl[BTN_REPEAT], - MUSIC_SIGNAL_REPEAT_ONE, MUSIC_PLAYBACK_VIEW); - break; - - default: - ASSERT(!"Invalid State"); - break; - } -} - - void CPlaybackView::m_UpdateCurrentSongThumbnail(void) { char *path = NULL; @@ -859,17 +278,6 @@ void CPlaybackView::m_UpdateEmptySongInfo(void) { char buf[MAX_LENGTH]; - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], - MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); - elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_TRUE); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_REPEAT], - m->eoBtnControl[BTN_REPEAT], ELM_FOCUS_RIGHT); - elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_TRUE); - elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_TRUE); - elm_object_disabled_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE); - elm_object_part_text_set(m->eoBase, MUSIC_PART_FULLTIME, "00:00"); - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); - m->pSliderWidget->Init(); elm_object_part_text_set(m->eoBase, MUSIC_PART_SONG_TITLE, @@ -929,37 +337,39 @@ void CPlaybackView::m_UpdateCurrentSongItem(int index) void CPlaybackView::m_UpdateEditmodeFocusSequence(void) { - elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnEdit[BTN_CANCEL], ELM_FOCUS_LEFT); - elm_object_focus_next_object_set(m->eoBtnEdit[BTN_CANCEL], m->eoPlaylist, ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoBtnEdit[BTN_CANCEL], ELM_FOCUS_DOWN); + elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnEdit[EDIT_BTN_CANCEL], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnEdit[EDIT_BTN_CANCEL], m->eoPlaylist, ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoBtnEdit[EDIT_BTN_CANCEL], ELM_FOCUS_DOWN); } void CPlaybackView::m_UpdatePlaymodeFocusSequence(void) { - elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoPlaylist, ELM_FOCUS_UP); - elm_object_focus_next_object_set(m->pSliderWidget->Base(), m->eoBtnControl[BTN_PLAY], ELM_FOCUS_DOWN); switch (m->pController->PlayState()) { case PLAY_STATUS_INITIAL: // Do nothing break; case PLAY_STATUS_STOP: - elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnControl[BTN_PLAY], ELM_FOCUS_LEFT); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], m->eoPlaylist, ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], m->eoBtnControl[BTN_REPEAT], ELM_FOCUS_LEFT); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_REPEAT], m->eoBtnControl[BTN_PLAY], ELM_FOCUS_RIGHT); - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); + elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnControl[CTRL_BTN_PLAY], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_PLAY], m->eoPlaylist, ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_PLAY], m->eoBtnControl[CTRL_BTN_REPEAT], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_REPEAT], m->eoBtnControl[CTRL_BTN_PLAY], ELM_FOCUS_RIGHT); + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); break; case PLAY_STATUS_PLAY: case PLAY_STATUS_PAUSE: elm_object_focus_next_object_set(m->eoPlaylist, - m->eoBtnControl[BTN_FORWARD], ELM_FOCUS_LEFT); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_FORWARD], + m->eoBtnControl[CTRL_BTN_FORWARD], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_FORWARD], m->eoPlaylist, ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_PLAY], - m->eoBtnControl[BTN_FORWARD], ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_PLAY], + m->eoBtnControl[CTRL_BTN_FORWARD], ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_PLAY], + m->eoBtnControl[CTRL_BTN_REWIND], ELM_FOCUS_LEFT); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_REPEAT], + m->eoBtnControl[CTRL_BTN_REWIND], ELM_FOCUS_RIGHT); break; default: @@ -992,104 +402,29 @@ void CPlaybackView::m_UpdateCurrentSongInfo(void) m_UpdateCurrentSongItem(index); m_UpdateCurrentSongLabels(); - m_UpdateCurrentSongThumbnail(); - m_UpdateControlBtns(); - m_UpdatePlaymodeFocusSequence(); -} - - -void CPlaybackView::m_DisableEditButtons(bool flag) -{ - /* flag - 1 means disable edit buttons and 0 means enable */ - if (flag) - elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); - - elm_object_disabled_set(m->eoBtnEdit[BTN_DELETE], (Eina_Bool)flag); - elm_object_disabled_set(m->eoBtnEdit[BTN_DESELECT], (Eina_Bool)flag); - if (flag) { - m_UpdateEditmodeFocusSequence(); - elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); - } - else { - elm_object_focus_next_object_set(m->eoBtnEdit[BTN_CANCEL], m->eoBtnEdit[BTN_DESELECT], ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->eoBtnEdit[BTN_DELETE], m->eoPlaylist, ELM_FOCUS_RIGHT); - elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnEdit[BTN_DELETE], ELM_FOCUS_LEFT); - } -} - - -void CPlaybackView::m_CreateErrorPopup(void) -{ - Evas_Object *popup = NULL, *btn = NULL, *label = NULL; - - popup = elm_popup_add(m->eoBase); - if (!popup) - return; - - elm_object_style_set(popup, MUSIC_STYLE_ERROR_POPUP); - evas_object_show(popup); - - label = elm_label_add(popup); - if (!label) { - evas_object_del(popup); - return; - } - - elm_object_style_set(label, MUSIC_STYLE_ERROR_LABEL); - elm_object_text_set(label, MUSIC_TEXT_PLAYBACK_ERROR); - elm_object_content_set(popup, label); - - btn = elm_button_add(popup); - if (!btn) { - evas_object_del(popup); - return; - } - - elm_object_style_set(btn, MUSIC_STYLE_EDIT_BTN); - elm_object_text_set(btn, MUSIC_TEXT_OK); - elm_object_part_content_set(popup, MUSIC_PART_POPUP_BUTTON, btn); - - m->eoErrPopup = popup; - - Connect(btn, EO_ERROR_POPUP_BUTTON, TYPE_CLICKED | TYPE_KEY_DOWN); - - elm_object_focus_set(btn, EINA_TRUE); - - return; -} - - -void CPlaybackView::m_DestroyErrorPopup(void) -{ - if (!m->eoErrPopup) - return; - - evas_object_del(m->eoErrPopup); - m->eoErrPopup = NULL; -} - - -void CPlaybackView::m_CreateSettingsPopup(void) -{ - CContextPopup::SCallback cb; - cb.cookie = this; - cb.onSelected = sm_CbCtxPopupBtnSelected; - - m->eoCtxPopup = new CPlaySettingCtxPopup; - m->eoCtxPopup->Create(m->eoWin, &cb); + m_UpdateCurrentSongThumbnail(); + m->pPlaybackController->Update(); + m_UpdatePlaymodeFocusSequence(); } -void CPlaybackView::m_DestroySettingsPopup(void) +void CPlaybackView::m_DisableEditButtons(bool flag) { - if (!m->eoCtxPopup) - return; - - if (m->eoCtxPopup->FlagCreate()) - m->eoCtxPopup->Destroy(); + /* flag - 1 means disable edit buttons and 0 means enable */ + if (flag) + elm_object_focus_set(m->eoBtnEdit[EDIT_BTN_CANCEL], EINA_TRUE); - delete m->eoCtxPopup; - m->eoCtxPopup = NULL; + elm_object_disabled_set(m->eoBtnEdit[EDIT_BTN_DELETE], (Eina_Bool)flag); + elm_object_disabled_set(m->eoBtnEdit[EDIT_BTN_DESELECT], (Eina_Bool)flag); + if (flag) { + m_UpdateEditmodeFocusSequence(); + elm_object_focus_set(m->eoBtnEdit[EDIT_BTN_CANCEL], EINA_TRUE); + } + else { + elm_object_focus_next_object_set(m->eoBtnEdit[EDIT_BTN_CANCEL], m->eoBtnEdit[EDIT_BTN_DESELECT], ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->eoBtnEdit[EDIT_BTN_DELETE], m->eoPlaylist, ELM_FOCUS_RIGHT); + elm_object_focus_next_object_set(m->eoPlaylist, m->eoBtnEdit[EDIT_BTN_DELETE], ELM_FOCUS_LEFT); + } } @@ -1104,7 +439,7 @@ void CPlaybackView::m_FromEditToPlaybackMode(void) elm_object_signal_emit(m->eoBase, MUSIC_SIGNAL_PLAYBACK_MODE, MUSIC_PLAYBACK_VIEW); - elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_TRUE); + elm_object_focus_set(m->eoBtnControl[CTRL_BTN_SETTINGS], EINA_TRUE); m_ChangeEditmodeAll(m->elInfo, false); @@ -1121,7 +456,7 @@ void CPlaybackView::m_FromPlaybackToEditMode(void) m_DisableEditButtons(true); - elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); + elm_object_focus_set(m->eoBtnEdit[EDIT_BTN_CANCEL], EINA_TRUE); m_ChangeEditmodeAll(m->elInfo, true); @@ -1131,60 +466,6 @@ void CPlaybackView::m_FromPlaybackToEditMode(void) } -void CPlaybackView::m_HandleOnRepeated(void) -{ - Evas_Object *obj = NULL; - int value; - int duration; - char *timestr = NULL; - - if (!m->eoPressedObj) - return; - - obj = m->eoPressedObj; - - - m->pController->GetPosition(&value); - duration = m->cs_itinfo->sinfo->Duration(); - - if (obj == m->eoBtnControl[BTN_REWIND]) { - if (value == 0) { - m_RemoveTimer(TIMER_LONGPRESS); - return; - } - value = value - LP_CHANGE; - if (value <= 0) - value = 0; - } - else { - if (value == duration) { - m->pController->PlayNextSong(); - - m->press_status = PRESS_LONG_PAUSE; - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], MUSIC_SIGNAL_PAUSE, - MUSIC_PLAYBACK_VIEW); - m_PlaybackPause(); - m_RemoveTimer(TIMER_LONGPRESS); - - return; - } - value = value + LP_CHANGE; - if (value >= duration) - value = duration; - } - - m->pController->SetPosition(value); - timestr = CCommonUI::TimeStrFromMilSeconds(value); - if (timestr) { - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, - timestr); - free(timestr); - } - - return; -} - - void CPlaybackView::m_DeleteSelectedItems(void) { Eina_List *l = NULL, *l_next = NULL; @@ -1215,7 +496,7 @@ void CPlaybackView::m_DeleteSelectedItems(void) if (eina_list_count(m->elInfo) == 0) { m_UpdateEmptySongInfo(); elm_genlist_realized_items_update(m->eoPlaylist); - elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); + elm_object_focus_set(m->eoBtnEdit[EDIT_BTN_CANCEL], EINA_TRUE); return; } @@ -1223,18 +504,12 @@ void CPlaybackView::m_DeleteSelectedItems(void) m_UpdateCurrentSongInfo(); elm_genlist_realized_items_update(m->eoPlaylist); - elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); + elm_object_focus_set(m->eoBtnEdit[EDIT_BTN_CANCEL], EINA_TRUE); } void CPlaybackView::m_KeyBackPress(void) { - if (m->eoCtxPopup) { - m_DestroySettingsPopup(); - elm_object_focus_set(m->eoBtnControl[BTN_SETTINGS], EINA_TRUE); - return; - } - t_OnHide(); if (!CViewMgr::GetInstance()->ShowView(MUSIC_BASE_VIEW)) @@ -1261,13 +536,13 @@ void CPlaybackView::m_KeyPlayPress(void) { int state; - if (elm_object_disabled_get(m->eoBtnControl[BTN_PLAY])) + if (elm_object_disabled_get(m->eoBtnControl[CTRL_BTN_PLAY])) return; state = m->pController->PlayState(); if (state == PLAY_STATUS_PAUSE) { - m_PlaybackResume(); - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], + m->pController->Resume(); + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); } else if (state != PLAY_STATUS_PLAY) { @@ -1280,51 +555,51 @@ void CPlaybackView::m_KeyPausePress(void) { int state; - if (elm_object_disabled_get(m->eoBtnControl[BTN_PLAY])) + if (elm_object_disabled_get(m->eoBtnControl[CTRL_BTN_PLAY])) return; state = m->pController->PlayState(); if (state == PLAY_STATUS_PLAY) { - elm_object_signal_emit(m->eoBtnControl[BTN_PLAY], + elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); - m_PlaybackPause(); + m->pController->Pause(); } } void CPlaybackView::m_KeyNextPress(void) { - if (elm_object_disabled_get(m->eoBtnControl[BTN_FORWARD])) + if (elm_object_disabled_get(m->eoBtnControl[CTRL_BTN_FORWARD])) return; - m_HandleOnPressed(m->eoBtnControl[BTN_FORWARD]); + m->pController->HandleRemoteButtons(m->eoBtnControl[CTRL_BTN_FORWARD], EVENT_PRESSED); } void CPlaybackView::m_KeyPreviousPress(void) { - if (elm_object_disabled_get(m->eoBtnControl[BTN_REWIND])) + if (elm_object_disabled_get(m->eoBtnControl[CTRL_BTN_REWIND])) return; - m_HandleOnPressed(m->eoBtnControl[BTN_REWIND]); + m->pController->HandleRemoteButtons(m->eoBtnControl[CTRL_BTN_REWIND], EVENT_PRESSED); } void CPlaybackView::m_KeyNextUnpress(void) { - if (elm_object_disabled_get(m->eoBtnControl[BTN_FORWARD])) + if (elm_object_disabled_get(m->eoBtnControl[CTRL_BTN_FORWARD])) return; - m_HandleOnUnpressed(m->eoBtnControl[BTN_FORWARD]); + m->pController->HandleRemoteButtons(m->eoBtnControl[CTRL_BTN_FORWARD], EVENT_UNPRESSED); } void CPlaybackView::m_KeyPreviousUnpress(void) { - if (elm_object_disabled_get(m->eoBtnControl[BTN_REWIND])) + if (elm_object_disabled_get(m->eoBtnControl[CTRL_BTN_REWIND])) return; - m_HandleOnUnpressed(m->eoBtnControl[BTN_REWIND]); + m->pController->HandleRemoteButtons(m->eoBtnControl[CTRL_BTN_REWIND], EVENT_UNPRESSED); } @@ -1343,11 +618,14 @@ void CPlaybackView::m_HandleKeyPress(char *keyname) m_KeyNextPress(); else if (!strcmp(keyname, (char *)KEY_PREVIOUS)) m_KeyPreviousPress(); - else if (!strcmp(keyname, (char *)KEY_VOLUMEUP)) + else if (!strcmp(keyname, (char *)KEY_VOLUMEUP) || + !strcmp(keyname, (char *)KEY_VOLUMEUP_REMOTE)) m->pHandleVolume->Up(); - else if (!strcmp(keyname, (char *)KEY_VOLUMEDOWN)) + else if (!strcmp(keyname, (char *)KEY_VOLUMEDOWN) || + !strcmp(keyname, (char *)KEY_VOLUMEDOWN_REMOTE)) m->pHandleVolume->Down(); - else if (!strcmp(keyname, (char *)KEY_MUTE)) + else if (!strcmp(keyname, (char *)KEY_MUTE) || + !strcmp(keyname, (char *)KEY_MUTE_REMOTE)) m->pHandleVolume->Mute(); } @@ -1390,104 +668,6 @@ void CPlaybackView::m_AddCurrentSonginfo(void) } -void CPlaybackView::m_AddEditPlaylistButtons(void) -{ - Evas_Object *box = NULL; - int i; - SBtnInfo btninfo[TOTAL_EDIT_BTNS]; - - btninfo[BTN_CANCEL].txt = MUSIC_TEXT_CANCEL; - btninfo[BTN_CANCEL].type = EO_CANCEL; - - btninfo[BTN_DESELECT].txt = MUSIC_TEXT_DESELECT; - btninfo[BTN_DESELECT].type = EO_DESELECT; - - btninfo[BTN_DELETE].txt = MUSIC_TEXT_DELETE; - btninfo[BTN_DELETE].type = EO_DELETE; - - box = CCommonUI::AddBox(m->eoBase); - if (!box) - return; - - elm_box_horizontal_set(box, EINA_TRUE); - elm_box_padding_set(box, MUSIC_EDIT_BTNS_PADDING * elm_config_scale_get(), 0); - - for (i = 0; i < TOTAL_EDIT_BTNS; i++) { - m->eoBtnEdit[i] = elm_button_add(m->eoBase); - if (!m->eoBtnEdit[i]) - continue; - - elm_object_style_set(m->eoBtnEdit[i], MUSIC_STYLE_EDIT_BTN); - evas_object_size_hint_weight_set(m->eoBtnEdit[i], EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_box_pack_end(box, m->eoBtnEdit[i]); - elm_object_text_set(m->eoBtnEdit[i], _(btninfo[i].txt)); - - Connect(m->eoBtnEdit[i], btninfo[i].type, TYPE_CLICKED | TYPE_MOUSE_MOVE); - - evas_object_show(m->eoBtnEdit[i]); - } - elm_object_part_content_set(m->eoBase, MUSIC_PART_EDITBTNS, box); - elm_object_signal_emit(m->eoBase, MUSIC_SIGNAL_PLAYBACK_MODE, MUSIC_PLAYBACK_VIEW); -} - - -void CPlaybackView::m_AddControlButtons(void) -{ - Evas_Object *box = NULL; - int i; - SBtnInfo btninfo[TOTAL_CONTROL_BTNS]; - - btninfo[BTN_SETTINGS].txt = MUSIC_STYLE_BTN_SETTINGS; - btninfo[BTN_SETTINGS].type = EO_BTN_SETTINGS; - - btninfo[BTN_SHUFFLE].txt = MUSIC_STYLE_BTN_SHUFFLE; - btninfo[BTN_SHUFFLE].type = EO_BTN_SHUFFLE; - - btninfo[BTN_REPEAT].txt = MUSIC_STYLE_BTN_REPEAT; - btninfo[BTN_REPEAT].type = EO_BTN_REPEAT; - - btninfo[BTN_REWIND].txt = MUSIC_STYLE_BTN_REWIND; - btninfo[BTN_REWIND].type = EO_BTN_REWIND; - - btninfo[BTN_PLAY].txt = MUSIC_STYLE_BTN_PLAY; - btninfo[BTN_PLAY].type = EO_BTN_PLAY; - - btninfo[BTN_FORWARD].txt = MUSIC_STYLE_BTN_FORWARD; - btninfo[BTN_FORWARD].type = EO_BTN_FORWARD; - - box = elm_box_add(m->eoBase); - if (!box) - return; - - evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, 0); - evas_object_size_hint_align_set(box, EVAS_HINT_FILL, 0); - elm_box_horizontal_set(box, EINA_TRUE); - elm_box_padding_set(box, - MUSIC_CONTROL_BTNS_PADDING * elm_config_scale_get(), 0); - - for (i = 0; i < TOTAL_CONTROL_BTNS; i++) { - m->eoBtnControl[i] = elm_button_add(m->eoBase); - if (!m->eoBtnControl[i]) - continue; - - elm_object_style_set(m->eoBtnControl[i], btninfo[i].txt); - evas_object_size_hint_weight_set(m->eoBtnControl[i], - EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_box_pack_end(box, m->eoBtnControl[i]); - - if (i == BTN_REWIND || i == BTN_FORWARD) { - Connect(m->eoBtnControl[i], btninfo[i].type, TYPE_PRESSED | TYPE_UNPRESSED | TYPE_MOUSE_MOVE); - } - else { - Connect(m->eoBtnControl[i], btninfo[i].type, TYPE_CLICKED | TYPE_MOUSE_MOVE); - } - evas_object_show(m->eoBtnControl[i]); - } - - elm_object_part_content_set(m->eoBase, MUSIC_PART_CONTROLBTNS, box); -} - - SItemInfo *CPlaybackView::m_FindItemInfoFromSong(Eina_List *list, CSongInfo *sinfo) { Eina_List *l = NULL; @@ -1736,72 +916,6 @@ void CPlaybackView::m_RemovePlaylist(void) } -void CPlaybackView::m_HandleRewindBtnClicked(Evas_Object *obj) -{ - elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, - MUSIC_PLAYBACK_VIEW); - - if (m->pController->PlayState() == PLAY_STATUS_STOP) - return; - - if (!m->pController->PlayPreviousSong()){ - _ERR(" music play previous song failed "); - return; - } -} - - -void CPlaybackView::m_HandleForwardBtnClicked(Evas_Object *obj) -{ - elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, - MUSIC_PLAYBACK_VIEW); - - if (m->pController->PlayState() == PLAY_STATUS_STOP) - return; - - if (!m->pController->PlayNextSong()) { - _ERR(" music play next song failed "); - return; - } -} - - -void CPlaybackView::m_HandleOnPressed(Evas_Object *obj) -{ - m->press_status = PRESS_SHORT; - m->eoPressedObj = obj; - - m->etWait = ecore_timer_add(WAIT_INTERVAL, sm_CbWaitTimer, this); -} - - -void CPlaybackView::m_HandleOnUnpressed(Evas_Object *obj) -{ - m_RemoveTimer(TIMER_WAIT); - m_RemoveTimer(TIMER_LONGPRESS); - - if (m->press_status == PRESS_SHORT) { - /* Handle song change */ - if (m->pController->PlayState() == PLAY_STATUS_PLAY) - m_PlaybackPause(); - - if (obj == m->eoBtnControl[BTN_FORWARD]) - m_HandleForwardBtnClicked(obj); - else - m_HandleRewindBtnClicked(obj); - - if (m->pController->PlayState() != PLAY_STATUS_PLAY) - m_PlaybackResume(); - } - else if (m->press_status == PRESS_LONG) { - if (m->pController->PlayState() != PLAY_STATUS_PLAY) - m_PlaybackResume(); - } - - m->press_status = PRESS_SHORT; -} - - void CPlaybackView::m_HandleGenlistItemActivated(Evas_Object *obj, Elm_Object_Item *genListItem) { int index; @@ -1832,6 +946,8 @@ bool CPlaybackView::Create(void *data) { ASSERT(!m); + CPlaybackController::SCallback cb; + _CREATE_BEGIN{ _CHECK(m = new SPlaybackView) _CHECK(m->mgr = CViewMgr::GetInstance()) @@ -1842,16 +958,23 @@ bool CPlaybackView::Create(void *data) _CHECK(CBaseView::Create(data)) _CHECK(CTimer::Create()); _CHECK(m->pController->AddListener(this)) + _CHECK(m->pPlaybackController = new CPlaybackController) + _COMMAND{ cb.cookie = this; cb.OnCurrentSongCount = sm_CbCurrentSongCount; } + _CHECK(m->pPlaybackController->Create(m->eoBase, &cb)) _WHEN_SUCCESS{ - m->press_status = PRESS_SHORT; evas_object_data_set(m->eoBase, PLAYBACK_VIEW_DATA, m); - m_AddControlButtons(); - m_AddEditPlaylistButtons(); m_AddCurrentSonginfo(); m_AddPlaylist(); + int i; + for (i = 0; i < TOTAL_CONTROL_BTNS; i++) + m->eoBtnControl[i] = m->pPlaybackController->ControlBtnsObject((EPlayerControlBtns)i); + + for (i = 0; i < TOTAL_EDIT_BTNS; i++) + m->eoBtnEdit[i] = m->pPlaybackController->EditBtnsObject((EPlayerEditBtns)i); + m->pHandleVolume = new CHandleVolume; m->pHandleVolume->Create(m->eoBase); m_UpdatePlaymodeFocusSequence(); @@ -1859,6 +982,8 @@ bool CPlaybackView::Create(void *data) Connect(m->eoBase, EO_BASE, TYPE_KEY_DOWN | TYPE_KEY_UP); } + _CHECK_FAIL{ m->pPlaybackController->Destroy(); } + _CHECK_FAIL{ delete m->pPlaybackController; } _CHECK_FAIL{ m->pController->RemoveListener(this); } _CHECK_FAIL{ CTimer::Destroy(); } _CHECK_FAIL{ CBaseView::Destroy(); } @@ -1879,15 +1004,14 @@ void CPlaybackView::Destroy(void) ASSERT(m); Disconnect(m->eoBase); - m->pController->RemoveListener(this); - m_DestroyErrorPopup(); + m->pPlaybackController->Destroy(); + delete m->pPlaybackController; - m->pSliderWidget->Destroy(); + m->pController->RemoveListener(this); - m_RemoveTimer(TIMER_WAIT); - m_RemoveTimer(TIMER_LONGPRESS); - m_DestroySettingsPopup(); + m->pSliderWidget->Destroy(); + delete m->pSliderWidget; m->pHandleVolume->Destroy(); delete m->pHandleVolume; @@ -1908,83 +1032,6 @@ Evas_Object* CPlaybackView::Base(void) } -void CPlaybackView::t_OnClickedSettings(Evas_Object *obj) -{ - elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - - if (eina_list_count(m->elInfo) == 0) - return; - - elm_object_signal_emit(obj, MUSIC_SIGNAL_CONTROL_SELECTED, MUSIC_PLAYBACK_VIEW); - m_DestroySettingsPopup(); - m_CreateSettingsPopup(); -} - - -void CPlaybackView::t_OnClickedShuffle(Evas_Object *obj) -{ - elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - - switch (m->pController->ShuffleState()) { - case SHUFFLE_STATUS_OFF: - m->pController->SetShuffleState(SHUFFLE_STATUS_ON); - elm_object_signal_emit(obj, MUSIC_SIGNAL_SHUFFLE_ON, MUSIC_PLAYBACK_VIEW); - break; - - default: - m->pController->SetShuffleState(SHUFFLE_STATUS_OFF); - elm_object_signal_emit(obj, MUSIC_SIGNAL_SHUFFLE_OFF, MUSIC_PLAYBACK_VIEW); - break; - } -} - - -void CPlaybackView::t_OnClickedRepeat(Evas_Object *obj) -{ - elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - - switch (m->pController->RepeatState()) { - case REPEAT_STATUS_NONE: - m->pController->SetRepeatState(REPEAT_STATUS_ALL); - elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_ALL, MUSIC_PLAYBACK_VIEW); - break; - - case REPEAT_STATUS_ALL: - m->pController->SetRepeatState(REPEAT_STATUS_ONE); - elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_ONE, MUSIC_PLAYBACK_VIEW); - break; - - default: - m->pController->SetRepeatState(REPEAT_STATUS_NONE); - elm_object_signal_emit(obj, MUSIC_SIGNAL_REPEAT_OFF, MUSIC_PLAYBACK_VIEW); - break; - } -} - - -void CPlaybackView::t_OnClickedPlay(Evas_Object *obj) -{ - elm_object_signal_emit(obj, MUSIC_SIGNAL_BTN_CLICKED, MUSIC_PLAYBACK_VIEW); - - switch (m->pController->PlayState()) { - case PLAY_STATUS_PAUSE: - m_PlaybackResume(); - elm_object_signal_emit(obj, MUSIC_SIGNAL_PLAY, MUSIC_PLAYBACK_VIEW); - break; - - case PLAY_STATUS_PLAY: - elm_object_signal_emit(obj, MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); - m_PlaybackPause(); - break; - - default: - if (m->pController) - m->pController->Start(); - break; - } -} - - void CPlaybackView::t_OnShow(void) { ASSERT(m); @@ -2028,11 +1075,11 @@ void CPlaybackView::t_OnUpdate(void *data) case E_PLAYLIST_UPDATE: m_RemovePlaylist(); m_AddPlaylist(); - elm_object_disabled_set(m->eoBtnControl[BTN_FORWARD], EINA_FALSE); - elm_object_disabled_set(m->eoBtnControl[BTN_REWIND], EINA_FALSE); - elm_object_disabled_set(m->eoBtnControl[BTN_PLAY], EINA_FALSE); - elm_object_focus_next_object_set(m->eoBtnControl[BTN_REPEAT], - m->eoBtnControl[BTN_REWIND], ELM_FOCUS_RIGHT); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_FORWARD], EINA_FALSE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_REWIND], EINA_FALSE); + elm_object_disabled_set(m->eoBtnControl[CTRL_BTN_PLAY], EINA_FALSE); + elm_object_focus_next_object_set(m->eoBtnControl[CTRL_BTN_REPEAT], + m->eoBtnControl[CTRL_BTN_REWIND], ELM_FOCUS_RIGHT); m_FromEditToPlaybackMode(); break; @@ -2050,6 +1097,11 @@ void CPlaybackView::t_OnUpdate(void *data) } +void CPlaybackView::t_OnTimer(int id) +{ +} + + void CPlaybackView::t_OnHide(void) { ASSERT(m); @@ -2065,14 +1117,6 @@ void CPlaybackView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_ m_HandleKeyPress(ev->keyname); break; - case EO_ERROR_POPUP_BUTTON: - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { - m_DestroyErrorPopup(); - elm_object_focus_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE); - } - break; - case EO_PLAYLIST: { Elm_Object_Item *it = NULL; @@ -2144,69 +1188,9 @@ void CPlaybackView::OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up } -void CPlaybackView::OnMouseClicked(int id, Evas_Object *obj) -{ - switch (id) { - case EO_ERROR_POPUP_BUTTON: - m_DestroyErrorPopup(); - elm_object_focus_set(m->eoBtnControl[BTN_PLAY], EINA_TRUE); - break; - - case EO_CANCEL: - m_DisableCheckAll(m->elInfo); - m_DisableEditButtons(true); - m_FromEditToPlaybackMode(); - break; - - case EO_DESELECT: - m_DisableCheckAll(m->elInfo); - m_DisableEditButtons(true); - elm_genlist_realized_items_update(m->eoPlaylist); - elm_object_focus_set(m->eoBtnEdit[BTN_CANCEL], EINA_TRUE); - break; - - case EO_DELETE: - m_DeleteSelectedItems(); - break; - - case EO_BTN_SETTINGS: - t_OnClickedSettings(obj); - break; - - case EO_BTN_SHUFFLE: - t_OnClickedShuffle(obj); - break; - - case EO_BTN_REPEAT: - t_OnClickedRepeat(obj); - break; - - case EO_BTN_PLAY: - t_OnClickedPlay(obj); - break; - - default: - break; - } -} - - void CPlaybackView::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev) { switch (id) { - case EO_CANCEL: - case EO_DESELECT: - case EO_DELETE: - case EO_BTN_FORWARD: - case EO_BTN_PLAY: - case EO_BTN_REPEAT: - case EO_BTN_REWIND: - case EO_BTN_SETTINGS: - case EO_BTN_SHUFFLE: - if (!elm_object_focus_get(obj)) - elm_object_focus_set(obj, EINA_TRUE); - break; - case EO_PLAYLIST: { Elm_Object_Item *item; @@ -2227,34 +1211,6 @@ void CPlaybackView::OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mo } -void CPlaybackView::OnPressed(int id, Evas_Object *obj) -{ - switch (id) { - case EO_BTN_FORWARD: - case EO_BTN_REWIND: - m_HandleOnPressed(obj); - break; - - default: - break; - } -} - - -void CPlaybackView::OnUnpressed(int id, Evas_Object *obj) -{ - switch (id) { - case EO_BTN_FORWARD: - case EO_BTN_REWIND: - m_HandleOnUnpressed(obj); - break; - - default: - break; - } -} - - void CPlaybackView::OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item) { switch (id) { @@ -2320,7 +1276,6 @@ void CPlaybackView::OnComplete(void) void CPlaybackView::OnError(void) { - m_CreateErrorPopup(); } @@ -2343,3 +1298,55 @@ void CPlaybackView::OnStartPlayback(void) void CPlaybackView::OnStopPlayback(void) { } + + +void CPlaybackView::OnEmptyPlaylist(void) +{ + eina_list_free(m->elInfo); + m->elInfo = NULL; + elm_genlist_clear(m->eoPlaylist); + m_UpdateEmptySongInfo(); +} + + +void CPlaybackView::OnPlayerModeChanged(EPlayerMode mode) +{ + switch (mode) { + case MODE_PLAYLIST_EDIT: + m_FromPlaybackToEditMode(); + break; + + case MODE_PLAYBACK: + m_FromEditToPlaybackMode(); + break; + + default: + ASSERT(!"Invalid Player Mode"); + break; + } +} + + +void CPlaybackView::OnEditButtonsPressed(EPlayerEditBtns editBtns) +{ + switch (editBtns) { + case EDIT_BTN_CANCEL: + m_DisableCheckAll(m->elInfo); + m_DisableEditButtons(true); + break; + + case EDIT_BTN_DESELECT: + m_DisableCheckAll(m->elInfo); + m_DisableEditButtons(true); + elm_genlist_realized_items_update(m->eoPlaylist); + break; + + case EDIT_BTN_DELETE: + m_DeleteSelectedItems(); + break; + + default: + ASSERT(!"Invalid Edit Button"); + break; + } +} \ No newline at end of file -- 2.7.4 From 7d72bdd3654991f8b76a41ca5cf5884fc19db5e9 Mon Sep 17 00:00:00 2001 From: Kim Youngjin Date: Tue, 21 Apr 2015 08:05:23 +0900 Subject: [PATCH 10/16] dbg.h file is removed. Change-Id: Ibbf1b636dfb25343a86089d67e35062732bfe431 Signed-off-by: Kim Youngjin --- include/dbg.h | 45 ------------------------------------ src/data/AlbumStorage.cpp | 1 - src/data/CategoryStorage.cpp | 1 - src/data/FolderStorage.cpp | 1 - src/data/SongStorage.cpp | 1 - src/data/album_info.cpp | 1 - src/data/bus.cpp | 7 +++--- src/data/category_info.cpp | 2 +- src/data/folder_info.cpp | 1 - src/data/mediadata.cpp | 1 - src/data/song_info.cpp | 1 - src/main.cpp | 4 +++- src/playback/MusicControllerImpl.cpp | 1 - src/playback/music-controller.cpp | 1 - src/playback/playback-mgr.cpp | 1 - src/playback/playlist-mgr.cpp | 1 - src/playback/volume-control.cpp | 1 - src/views/ErrorPopupWindow.cpp | 1 - src/views/ExtBaseLayout.cpp | 1 - src/views/HandleVolume.cpp | 1 - src/views/Info.cpp | 1 - src/views/PlayListCtxPopup.cpp | 1 - src/views/PlaySettingCtxPopup.cpp | 1 - src/views/PlaybackController.cpp | 1 - src/views/RemovePopupWindow.cpp | 1 - src/views/SliderWidget.cpp | 1 - src/views/SortCtxPopup.cpp | 1 - src/views/SourceCtxPopup.cpp | 1 - src/views/Timer.cpp | 1 - src/views/album-layout.cpp | 1 - src/views/album-songs-layout.cpp | 1 - src/views/artist-layout.cpp | 1 - src/views/base-view.cpp | 1 - src/views/category-layout.cpp | 1 - src/views/category-songs-layout.cpp | 1 - src/views/common-ui.cpp | 2 +- src/views/context-view.cpp | 1 - src/views/entry-popup.cpp | 1 - src/views/folder-layout.cpp | 1 - src/views/genre-layout.cpp | 1 - src/views/playback-view.cpp | 1 - src/views/playlist-layout.cpp | 1 - src/views/song-layout.cpp | 1 - 43 files changed, 9 insertions(+), 89 deletions(-) delete mode 100644 include/dbg.h diff --git a/include/dbg.h b/include/dbg.h deleted file mode 100644 index 6163a5c..0000000 --- a/include/dbg.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __DBG_H__ -#define __DBG_H__ - -#include - -#ifdef LOG_TAG -#undef LOG_TAG -#endif -#define LOG_TAG "org.tizen.music-player-tv-ref" - -#ifndef _ERR -#define _ERR(fmt, args...) LOGE("[%s:%d] "fmt"\n", __func__, __LINE__, ##args) -#endif - -#ifndef _DBG -#define _DBG(fmt, args...) LOGD("[%s:%d] "fmt"\n", __func__, __LINE__, ##args) -#endif - -#ifndef _INFO -#define _INFO(fmt, args...) LOGI("[%s:%d] "fmt"\n", __func__, __LINE__, ##args) -#endif - -/* enums */ -enum music_error_status { - MUSIC_ERROR = -1, - MUSIC_ERROR_NONE -}; - -#endif /* __DBG_H__ */ diff --git a/src/data/AlbumStorage.cpp b/src/data/AlbumStorage.cpp index 57892a5..045018c 100644 --- a/src/data/AlbumStorage.cpp +++ b/src/data/AlbumStorage.cpp @@ -20,7 +20,6 @@ #include #include -#include "dbg.h" #include "i18n.h" #include "define.h" diff --git a/src/data/CategoryStorage.cpp b/src/data/CategoryStorage.cpp index b740717..11cbed3 100644 --- a/src/data/CategoryStorage.cpp +++ b/src/data/CategoryStorage.cpp @@ -19,7 +19,6 @@ #include #include -#include "dbg.h" #include "i18n.h" #include "define.h" diff --git a/src/data/FolderStorage.cpp b/src/data/FolderStorage.cpp index e64264c..53f6c98 100644 --- a/src/data/FolderStorage.cpp +++ b/src/data/FolderStorage.cpp @@ -19,7 +19,6 @@ #include #include #include -#include "dbg.h" #include "i18n.h" #include "define.h" diff --git a/src/data/SongStorage.cpp b/src/data/SongStorage.cpp index 1565eb7..a80f5ac 100644 --- a/src/data/SongStorage.cpp +++ b/src/data/SongStorage.cpp @@ -18,7 +18,6 @@ #include #include #include -#include "dbg.h" #include "i18n.h" #include "define.h" diff --git a/src/data/album_info.cpp b/src/data/album_info.cpp index 722db2a..27490a2 100644 --- a/src/data/album_info.cpp +++ b/src/data/album_info.cpp @@ -16,7 +16,6 @@ #include #include -#include "dbg.h" #include "i18n.h" #include #include "album_info.h" diff --git a/src/data/bus.cpp b/src/data/bus.cpp index 06dd8ad..bfcbe0a 100644 --- a/src/data/bus.cpp +++ b/src/data/bus.cpp @@ -16,11 +16,12 @@ #include #include -#include -#define BUS_NAME "org.tizen.tv.homescreen.music" +#include + +#define BUS_NAME "org.tizen.tv.homescreen.music" #define BUS_OBJECT_PATH "/org/tizen/tv/music" -#define BUS_INTERFACE "org.tizen.tv.homescreen.dynamicbox" +#define BUS_INTERFACE "org.tizen.tv.homescreen.dynamicbox" #define BUS_SIGNAL_UPDATE "Update" #define BUS_TYPE G_BUS_TYPE_SYSTEM diff --git a/src/data/category_info.cpp b/src/data/category_info.cpp index 69a6639..edf40f8 100644 --- a/src/data/category_info.cpp +++ b/src/data/category_info.cpp @@ -16,8 +16,8 @@ #include #include -#include "dbg.h" #include "i18n.h" + #include #include "define.h" #include "category_info.h" diff --git a/src/data/folder_info.cpp b/src/data/folder_info.cpp index 5e722f3..3b44ee2 100644 --- a/src/data/folder_info.cpp +++ b/src/data/folder_info.cpp @@ -16,7 +16,6 @@ #include #include -#include "dbg.h" #include "i18n.h" #include #include "folder_info.h" diff --git a/src/data/mediadata.cpp b/src/data/mediadata.cpp index 532e9c4..83bbfe4 100644 --- a/src/data/mediadata.cpp +++ b/src/data/mediadata.cpp @@ -18,7 +18,6 @@ #include #include #include -#include "dbg.h" #include "i18n.h" #include "define.h" diff --git a/src/data/song_info.cpp b/src/data/song_info.cpp index b90a22f..d4e5361 100644 --- a/src/data/song_info.cpp +++ b/src/data/song_info.cpp @@ -16,7 +16,6 @@ #include #include -#include "dbg.h" #include "i18n.h" #include #include "song_info.h" diff --git a/src/main.cpp b/src/main.cpp index 3a1a133..1ec108c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include #include "song_info.h" @@ -32,6 +31,9 @@ #define MUSIC_WIN_TITLE "Music Player" +SET_TAG("org.tizen.music-player-tv-ref"); + + class CApp : public CBaseApp { private: diff --git a/src/playback/MusicControllerImpl.cpp b/src/playback/MusicControllerImpl.cpp index d8fd311..b5d98f9 100644 --- a/src/playback/MusicControllerImpl.cpp +++ b/src/playback/MusicControllerImpl.cpp @@ -16,7 +16,6 @@ #include #include -#include "dbg.h" #include "i18n.h" #include diff --git a/src/playback/music-controller.cpp b/src/playback/music-controller.cpp index fc05009..c4b012c 100644 --- a/src/playback/music-controller.cpp +++ b/src/playback/music-controller.cpp @@ -1,6 +1,5 @@ #include #include -#include "dbg.h" #include #include "song_info.h" #include "common.h" diff --git a/src/playback/playback-mgr.cpp b/src/playback/playback-mgr.cpp index 99fac0d..f18fa38 100644 --- a/src/playback/playback-mgr.cpp +++ b/src/playback/playback-mgr.cpp @@ -16,7 +16,6 @@ #include #include "i18n.h" -#include "dbg.h" #include #include "playback-mgr.h" diff --git a/src/playback/playlist-mgr.cpp b/src/playback/playlist-mgr.cpp index 23b53f1..60cf351 100644 --- a/src/playback/playlist-mgr.cpp +++ b/src/playback/playlist-mgr.cpp @@ -16,7 +16,6 @@ #include #include -#include "dbg.h" #include "i18n.h" #include #include "song_info.h" diff --git a/src/playback/volume-control.cpp b/src/playback/volume-control.cpp index 2d4da2f..b9a23cd 100644 --- a/src/playback/volume-control.cpp +++ b/src/playback/volume-control.cpp @@ -17,7 +17,6 @@ #include #include #include -#include "dbg.h" #include diff --git a/src/views/ErrorPopupWindow.cpp b/src/views/ErrorPopupWindow.cpp index 27283ca..352de4f 100644 --- a/src/views/ErrorPopupWindow.cpp +++ b/src/views/ErrorPopupWindow.cpp @@ -16,7 +16,6 @@ #include "i18n.h" #include "define.h" -#include "dbg.h" #include #include "common.h" #include "ErrorPopupWindow.h" diff --git a/src/views/ExtBaseLayout.cpp b/src/views/ExtBaseLayout.cpp index 930da87..4a84a0c 100644 --- a/src/views/ExtBaseLayout.cpp +++ b/src/views/ExtBaseLayout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include #include "ExtBaseLayout.h" diff --git a/src/views/HandleVolume.cpp b/src/views/HandleVolume.cpp index f96f9e7..ec0abdc 100644 --- a/src/views/HandleVolume.cpp +++ b/src/views/HandleVolume.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include "define.h" #include #include "common.h" diff --git a/src/views/Info.cpp b/src/views/Info.cpp index 01bebbb..0c09e22 100644 --- a/src/views/Info.cpp +++ b/src/views/Info.cpp @@ -15,7 +15,6 @@ */ #include "i18n.h" -#include "dbg.h" #include "define.h" #include "common.h" #include "Info.h" diff --git a/src/views/PlayListCtxPopup.cpp b/src/views/PlayListCtxPopup.cpp index 905ab32..124192e 100644 --- a/src/views/PlayListCtxPopup.cpp +++ b/src/views/PlayListCtxPopup.cpp @@ -16,7 +16,6 @@ #include "i18n.h" #include "define.h" -#include "dbg.h" #include #include "common.h" #include "Info.h" diff --git a/src/views/PlaySettingCtxPopup.cpp b/src/views/PlaySettingCtxPopup.cpp index 8049089..097361f 100644 --- a/src/views/PlaySettingCtxPopup.cpp +++ b/src/views/PlaySettingCtxPopup.cpp @@ -18,7 +18,6 @@ #include "define.h" #include "common.h" #include "Info.h" -#include "dbg.h" #include #include "PlaySettingCtxPopup.h" diff --git a/src/views/PlaybackController.cpp b/src/views/PlaybackController.cpp index 7221ef4..7628753 100644 --- a/src/views/PlaybackController.cpp +++ b/src/views/PlaybackController.cpp @@ -16,7 +16,6 @@ #include "define.h" #include "common.h" -#include "dbg.h" #include #include "song_info.h" diff --git a/src/views/RemovePopupWindow.cpp b/src/views/RemovePopupWindow.cpp index 8ca93e0..8b19d0b 100644 --- a/src/views/RemovePopupWindow.cpp +++ b/src/views/RemovePopupWindow.cpp @@ -16,7 +16,6 @@ #include "i18n.h" #include "define.h" -#include "dbg.h" #include #include "common.h" #include "RemovePopupWindow.h" diff --git a/src/views/SliderWidget.cpp b/src/views/SliderWidget.cpp index b3362d7..5eb87d1 100644 --- a/src/views/SliderWidget.cpp +++ b/src/views/SliderWidget.cpp @@ -16,7 +16,6 @@ #include "define.h" #include "common.h" -#include "dbg.h" #include #include "song_info.h" diff --git a/src/views/SortCtxPopup.cpp b/src/views/SortCtxPopup.cpp index 2bb8fb0..62003ad 100644 --- a/src/views/SortCtxPopup.cpp +++ b/src/views/SortCtxPopup.cpp @@ -16,7 +16,6 @@ #include "i18n.h" #include "define.h" -#include "dbg.h" #include #include "Info.h" diff --git a/src/views/SourceCtxPopup.cpp b/src/views/SourceCtxPopup.cpp index fbacc77..1d79e81 100644 --- a/src/views/SourceCtxPopup.cpp +++ b/src/views/SourceCtxPopup.cpp @@ -18,7 +18,6 @@ #include "define.h" #include "common.h" #include "Info.h" -#include "dbg.h" #include #include "SourceCtxPopup.h" diff --git a/src/views/Timer.cpp b/src/views/Timer.cpp index efde40a..0c447c5 100644 --- a/src/views/Timer.cpp +++ b/src/views/Timer.cpp @@ -17,7 +17,6 @@ #include "define.h" #include "common.h" -#include "dbg.h" #include #include "Timer.h" diff --git a/src/views/album-layout.cpp b/src/views/album-layout.cpp index 09ebfea..e89e374 100644 --- a/src/views/album-layout.cpp +++ b/src/views/album-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include #include "i18n.h" #include "define.h" diff --git a/src/views/album-songs-layout.cpp b/src/views/album-songs-layout.cpp index 8740290..4e327f2 100644 --- a/src/views/album-songs-layout.cpp +++ b/src/views/album-songs-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include "i18n.h" #include #include "define.h" diff --git a/src/views/artist-layout.cpp b/src/views/artist-layout.cpp index f6b7a70..32efc3a 100644 --- a/src/views/artist-layout.cpp +++ b/src/views/artist-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include #include "i18n.h" #include "define.h" diff --git a/src/views/base-view.cpp b/src/views/base-view.cpp index d2d00f9..d5c943c 100644 --- a/src/views/base-view.cpp +++ b/src/views/base-view.cpp @@ -16,7 +16,6 @@ #include "i18n.h" #include "define.h" -#include "dbg.h" #include #include "common.h" diff --git a/src/views/category-layout.cpp b/src/views/category-layout.cpp index d78a415..827fc28 100644 --- a/src/views/category-layout.cpp +++ b/src/views/category-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include #include "i18n.h" #include "define.h" diff --git a/src/views/category-songs-layout.cpp b/src/views/category-songs-layout.cpp index 8aff6ac..6294f43 100644 --- a/src/views/category-songs-layout.cpp +++ b/src/views/category-songs-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include "i18n.h" #include diff --git a/src/views/common-ui.cpp b/src/views/common-ui.cpp index 6d73506..af07e9c 100644 --- a/src/views/common-ui.cpp +++ b/src/views/common-ui.cpp @@ -16,7 +16,7 @@ #include "i18n.h" #include "define.h" -#include "dbg.h" + #include #include "common.h" #include "common-ui.h" diff --git a/src/views/context-view.cpp b/src/views/context-view.cpp index bb76472..a99cba3 100644 --- a/src/views/context-view.cpp +++ b/src/views/context-view.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include "i18n.h" #include #include "define.h" diff --git a/src/views/entry-popup.cpp b/src/views/entry-popup.cpp index d4ed9a1..8395295 100644 --- a/src/views/entry-popup.cpp +++ b/src/views/entry-popup.cpp @@ -16,7 +16,6 @@ #include "i18n.h" #include "define.h" -#include "dbg.h" #include #include "common.h" diff --git a/src/views/folder-layout.cpp b/src/views/folder-layout.cpp index 9dd0c50..237905c 100644 --- a/src/views/folder-layout.cpp +++ b/src/views/folder-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include #include "i18n.h" #include "define.h" diff --git a/src/views/genre-layout.cpp b/src/views/genre-layout.cpp index 7b25431..36ebff2 100644 --- a/src/views/genre-layout.cpp +++ b/src/views/genre-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include #include "i18n.h" #include "define.h" diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index e0b7f07..077fd2b 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -16,7 +16,6 @@ #include "define.h" #include "common.h" -#include "dbg.h" #include #include "Timer.h" diff --git a/src/views/playlist-layout.cpp b/src/views/playlist-layout.cpp index aa12123..f55c086 100644 --- a/src/views/playlist-layout.cpp +++ b/src/views/playlist-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include "i18n.h" #include diff --git a/src/views/song-layout.cpp b/src/views/song-layout.cpp index 4fd284f..d212091 100644 --- a/src/views/song-layout.cpp +++ b/src/views/song-layout.cpp @@ -14,7 +14,6 @@ * limitations under the License. */ -#include "dbg.h" #include "i18n.h" #include -- 2.7.4 From 36078ef01f9919a97775493bf99c15fd678865d0 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Tue, 21 Apr 2015 15:01:47 +0900 Subject: [PATCH 11/16] Clean source codes Change-Id: Ib658635d06f4971415c78d48d94dcb4bae062225 Signed-off-by: Kim Tae Soo --- src/data/AlbumStorage.cpp | 4 +-- src/data/CategoryStorage.cpp | 4 +-- src/data/FolderStorage.cpp | 4 +-- src/data/SongStorage.cpp | 3 +-- src/data/album_info.cpp | 2 +- src/data/bus.cpp | 11 ++++---- src/data/category_info.cpp | 3 +-- src/data/folder_info.cpp | 2 +- src/data/mediadata.cpp | 11 ++++---- src/data/song_info.cpp | 2 +- src/main.cpp | 50 +++--------------------------------- src/playback/MusicControllerImpl.cpp | 3 +-- src/playback/music-controller.cpp | 16 ++++++++++++ src/playback/playback-mgr.cpp | 2 +- src/playback/playlist-mgr.cpp | 2 +- src/playback/volume-control.cpp | 3 ++- src/views/ErrorPopupWindow.cpp | 30 +++++++++++----------- src/views/HandleVolume.cpp | 2 +- src/views/Info.cpp | 31 +++++++++++----------- src/views/PlayListCtxPopup.cpp | 30 +++++++++++----------- src/views/PlaySettingCtxPopup.cpp | 32 ++++++++++++----------- src/views/PlaybackController.cpp | 34 ++++++++++++------------ src/views/RemovePopupWindow.cpp | 30 +++++++++++----------- src/views/SliderWidget.cpp | 33 ++++++++++++------------ src/views/SortCtxPopup.cpp | 32 +++++++++++------------ src/views/SourceCtxPopup.cpp | 31 +++++++++++----------- src/views/Timer.cpp | 31 +++++++++++----------- src/views/album-layout.cpp | 2 +- src/views/album-songs-layout.cpp | 2 +- src/views/artist-layout.cpp | 1 - src/views/base-view.cpp | 3 +-- src/views/category-layout.cpp | 1 - src/views/category-songs-layout.cpp | 3 +-- src/views/common-ui.cpp | 3 +-- src/views/context-view.cpp | 2 +- src/views/entry-popup.cpp | 3 +-- src/views/folder-layout.cpp | 1 - src/views/genre-layout.cpp | 2 -- src/views/playback-view.cpp | 5 ++-- src/views/playlist-layout.cpp | 3 +-- src/views/song-layout.cpp | 3 +-- 41 files changed, 212 insertions(+), 260 deletions(-) diff --git a/src/data/AlbumStorage.cpp b/src/data/AlbumStorage.cpp index 045018c..8e454a1 100644 --- a/src/data/AlbumStorage.cpp +++ b/src/data/AlbumStorage.cpp @@ -19,11 +19,9 @@ #include #include #include - +#include #include "i18n.h" #include "define.h" - -#include #include "song_info.h" #include "album_info.h" #include "category_info.h" diff --git a/src/data/CategoryStorage.cpp b/src/data/CategoryStorage.cpp index 11cbed3..e0e9c83 100644 --- a/src/data/CategoryStorage.cpp +++ b/src/data/CategoryStorage.cpp @@ -18,11 +18,9 @@ #include #include #include - +#include #include "i18n.h" #include "define.h" - -#include #include "song_info.h" #include "album_info.h" #include "category_info.h" diff --git a/src/data/FolderStorage.cpp b/src/data/FolderStorage.cpp index 53f6c98..2cabd5e 100644 --- a/src/data/FolderStorage.cpp +++ b/src/data/FolderStorage.cpp @@ -14,15 +14,13 @@ * limitations under the License. */ - #include #include #include #include +#include #include "i18n.h" #include "define.h" - -#include #include "song_info.h" #include "album_info.h" #include "category_info.h" diff --git a/src/data/SongStorage.cpp b/src/data/SongStorage.cpp index a80f5ac..cb0e953 100644 --- a/src/data/SongStorage.cpp +++ b/src/data/SongStorage.cpp @@ -18,10 +18,9 @@ #include #include #include +#include #include "i18n.h" #include "define.h" - -#include #include "song_info.h" #include "album_info.h" #include "category_info.h" diff --git a/src/data/album_info.cpp b/src/data/album_info.cpp index 27490a2..b210da4 100644 --- a/src/data/album_info.cpp +++ b/src/data/album_info.cpp @@ -16,8 +16,8 @@ #include #include -#include "i18n.h" #include +#include "i18n.h" #include "album_info.h" diff --git a/src/data/bus.cpp b/src/data/bus.cpp index bfcbe0a..577577b 100644 --- a/src/data/bus.cpp +++ b/src/data/bus.cpp @@ -16,14 +16,13 @@ #include #include +#include -#include - -#define BUS_NAME "org.tizen.tv.homescreen.music" -#define BUS_OBJECT_PATH "/org/tizen/tv/music" -#define BUS_INTERFACE "org.tizen.tv.homescreen.dynamicbox" +#define BUS_NAME "org.tizen.tv.homescreen.music" +#define BUS_OBJECT_PATH "/org/tizen/tv/music" +#define BUS_INTERFACE "org.tizen.tv.homescreen.dynamicbox" #define BUS_SIGNAL_UPDATE "Update" -#define BUS_TYPE G_BUS_TYPE_SYSTEM +#define BUS_TYPE G_BUS_TYPE_SYSTEM static void _proxy_cb(GObject *obj, GAsyncResult *res, gpointer data) { diff --git a/src/data/category_info.cpp b/src/data/category_info.cpp index edf40f8..507f8a5 100644 --- a/src/data/category_info.cpp +++ b/src/data/category_info.cpp @@ -16,9 +16,8 @@ #include #include -#include "i18n.h" - #include +#include "i18n.h" #include "define.h" #include "category_info.h" diff --git a/src/data/folder_info.cpp b/src/data/folder_info.cpp index 3b44ee2..0319fbe 100644 --- a/src/data/folder_info.cpp +++ b/src/data/folder_info.cpp @@ -16,8 +16,8 @@ #include #include -#include "i18n.h" #include +#include "i18n.h" #include "folder_info.h" diff --git a/src/data/mediadata.cpp b/src/data/mediadata.cpp index 83bbfe4..b45fae2 100644 --- a/src/data/mediadata.cpp +++ b/src/data/mediadata.cpp @@ -18,10 +18,9 @@ #include #include #include +#include #include "i18n.h" #include "define.h" - -#include #include "song_info.h" #include "album_info.h" #include "category_info.h" @@ -33,10 +32,10 @@ #include "mediadata.h" #include "common.h" -#define MEDIA_CONDITION_MUSIC "(MEDIA_TYPE=3)" -#define MEDIA_CONDITION_INTERNAL "(MEDIA_STORAGE_TYPE=0)" -#define MEDIA_CONDITION_EXTERNAL "(MEDIA_STORAGE_TYPE=1)" -#define MUSIC_STR_UNKNOWN N_("Unknown") +#define MEDIA_CONDITION_MUSIC "(MEDIA_TYPE=3)" +#define MEDIA_CONDITION_INTERNAL "(MEDIA_STORAGE_TYPE=0)" +#define MEDIA_CONDITION_EXTERNAL "(MEDIA_STORAGE_TYPE=1)" +#define MUSIC_STR_UNKNOWN N_("Unknown") struct SMediadata { diff --git a/src/data/song_info.cpp b/src/data/song_info.cpp index d4e5361..20f9391 100644 --- a/src/data/song_info.cpp +++ b/src/data/song_info.cpp @@ -16,8 +16,8 @@ #include #include -#include "i18n.h" #include +#include "i18n.h" #include "song_info.h" diff --git a/src/main.cpp b/src/main.cpp index 1ec108c..ec5e952 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -15,7 +15,6 @@ */ #include - #include "song_info.h" #include "album_info.h" #include "define.h" @@ -25,10 +24,10 @@ #include "playback-view.h" #include "context-view.h" -#define PARAM_ALBUM "album_id" -#define PARAM_URI "uri" -#define PARAM_SOURCE "source" -#define MUSIC_WIN_TITLE "Music Player" +#define PARAM_ALBUM "album_id" +#define PARAM_URI "uri" +#define PARAM_SOURCE "source" +#define MUSIC_WIN_TITLE "Music Player" SET_TAG("org.tizen.music-player-tv-ref"); @@ -83,8 +82,6 @@ protected: { Evas_Object *win; - // To fix ghost phenomenon - //win = elm_win_add(NULL, name, ELM_WIN_BASIC); win = elm_win_util_standard_add(name, NULL); if (!win) return NULL; @@ -231,7 +228,6 @@ public: virtual int Run(int argc, char **argv) { memset(&ad, 0x00, sizeof(_appdata)); - //ad.name = PACKAGE; return CBaseApp::Run(argc, argv); } @@ -245,41 +241,3 @@ int main(int argc, char **argv) return 0; } -#if 0 -static int depth = 0; -const char* szDepth[] = { - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - " ", -}; - -void __cyg_profile_func_enter(void *this_fn, void *call_site) __attribute__((no_instrument_function)); -void __cyg_profile_func_enter(void *this_fn, void *call_site) -{ - if (depth <= 10) { - printf("%s", szDepth[depth]); - _DBG("%s>%p/%p", szDepth[depth], call_site, this_fn); - } - printf(">%p/%p\n", call_site, this_fn); - depth++; -} -/* __cyg_profile_func_enter */ -void __cyg_profile_func_exit(void *this_fn, void *call_site) __attribute__((no_instrument_function)); -void __cyg_profile_func_exit(void *this_fn, void *call_site) -{ - depth--; - if (depth <= 10) { - printf("%s", szDepth[depth]); - _DBG("%s<%p/%p", szDepth[depth], call_site, this_fn); - } - printf("<%p/%p\n", call_site, this_fn); -} /* __cyg_profile_func_enter */ -#endif diff --git a/src/playback/MusicControllerImpl.cpp b/src/playback/MusicControllerImpl.cpp index b5d98f9..6d8e083 100644 --- a/src/playback/MusicControllerImpl.cpp +++ b/src/playback/MusicControllerImpl.cpp @@ -16,9 +16,8 @@ #include #include -#include "i18n.h" #include - +#include "i18n.h" #include "song_info.h" #include "album_info.h" #include "folder_info.h" diff --git a/src/playback/music-controller.cpp b/src/playback/music-controller.cpp index c4b012c..66e16fb 100644 --- a/src/playback/music-controller.cpp +++ b/src/playback/music-controller.cpp @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include #include #include diff --git a/src/playback/playback-mgr.cpp b/src/playback/playback-mgr.cpp index f18fa38..4f802f2 100644 --- a/src/playback/playback-mgr.cpp +++ b/src/playback/playback-mgr.cpp @@ -15,8 +15,8 @@ */ #include -#include "i18n.h" #include +#include "i18n.h" #include "playback-mgr.h" diff --git a/src/playback/playlist-mgr.cpp b/src/playback/playlist-mgr.cpp index 60cf351..91ca518 100644 --- a/src/playback/playlist-mgr.cpp +++ b/src/playback/playlist-mgr.cpp @@ -16,8 +16,8 @@ #include #include -#include "i18n.h" #include +#include "i18n.h" #include "song_info.h" #include "playlist-mgr.h" #include "time.h" diff --git a/src/playback/volume-control.cpp b/src/playback/volume-control.cpp index b9a23cd..8c11e3b 100644 --- a/src/playback/volume-control.cpp +++ b/src/playback/volume-control.cpp @@ -16,13 +16,14 @@ #include #include -#include #include +#include "volume-control.h" #define VOLUME_MUTE 1 #define VOLUME_UNMUTE 0 + struct SVolumeController { int currentVolume; bool flagMute; diff --git a/src/views/ErrorPopupWindow.cpp b/src/views/ErrorPopupWindow.cpp index 352de4f..824ba76 100644 --- a/src/views/ErrorPopupWindow.cpp +++ b/src/views/ErrorPopupWindow.cpp @@ -1,22 +1,22 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "i18n.h" #include "define.h" -#include #include "common.h" #include "ErrorPopupWindow.h" diff --git a/src/views/HandleVolume.cpp b/src/views/HandleVolume.cpp index ec0abdc..a16f26f 100644 --- a/src/views/HandleVolume.cpp +++ b/src/views/HandleVolume.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#include "define.h" #include +#include "define.h" #include "common.h" #include "common-ui.h" #include "HandleVolume.h" diff --git a/src/views/Info.cpp b/src/views/Info.cpp index 0c09e22..0ac9801 100644 --- a/src/views/Info.cpp +++ b/src/views/Info.cpp @@ -1,24 +1,24 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "i18n.h" #include "define.h" #include "common.h" #include "Info.h" -#include struct SInfo { @@ -30,6 +30,7 @@ struct SInfo { static SInfo g_info; + void CInfo::SetSourceType(int type) { g_info.sourceType = type; diff --git a/src/views/PlayListCtxPopup.cpp b/src/views/PlayListCtxPopup.cpp index 124192e..09a0d39 100644 --- a/src/views/PlayListCtxPopup.cpp +++ b/src/views/PlayListCtxPopup.cpp @@ -1,22 +1,22 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "i18n.h" #include "define.h" -#include #include "common.h" #include "Info.h" #include "PlayListCtxPopup.h" diff --git a/src/views/PlaySettingCtxPopup.cpp b/src/views/PlaySettingCtxPopup.cpp index 097361f..2bfdd01 100644 --- a/src/views/PlaySettingCtxPopup.cpp +++ b/src/views/PlaySettingCtxPopup.cpp @@ -1,26 +1,27 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "i18n.h" #include "define.h" #include "common.h" #include "Info.h" -#include #include "PlaySettingCtxPopup.h" + #define TOTAL_SETTING_BTNS 2 const char *settingText[TOTAL_SETTING_BTNS] = { @@ -33,6 +34,7 @@ const char *settingBtnId[TOTAL_SETTING_BTNS] = { "clear" }; + void CPlaySettingCtxPopup::t_OnConfiguration(void) { t_SetList(settingText, TOTAL_SETTING_BTNS, 0, diff --git a/src/views/PlaybackController.cpp b/src/views/PlaybackController.cpp index 7628753..a606020 100644 --- a/src/views/PlaybackController.cpp +++ b/src/views/PlaybackController.cpp @@ -1,33 +1,31 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "i18n.h" #include "define.h" #include "common.h" -#include - #include "song_info.h" #include "music-controller.h" -#include "i18n.h" #include "common-ui.h" #include "PlaySettingCtxPopup.h" #include "ErrorPopupWindow.h" #include "Info.h" #include "PlaybackController.h" - #define TOTAL_CONTROL_BTNS 6 #define TOTAL_EDIT_BTNS 3 #define LP_INTERVAL 0.5 /* seconds */ diff --git a/src/views/RemovePopupWindow.cpp b/src/views/RemovePopupWindow.cpp index 8b19d0b..9afc293 100644 --- a/src/views/RemovePopupWindow.cpp +++ b/src/views/RemovePopupWindow.cpp @@ -1,22 +1,22 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "i18n.h" #include "define.h" -#include #include "common.h" #include "RemovePopupWindow.h" diff --git a/src/views/SliderWidget.cpp b/src/views/SliderWidget.cpp index 5eb87d1..51d570c 100644 --- a/src/views/SliderWidget.cpp +++ b/src/views/SliderWidget.cpp @@ -1,26 +1,25 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include "i18n.h" #include "define.h" #include "common.h" -#include - #include "song_info.h" #include "music-controller.h" -#include "i18n.h" #include "common-ui.h" #include "SliderWidget.h" diff --git a/src/views/SortCtxPopup.cpp b/src/views/SortCtxPopup.cpp index 62003ad..566d15a 100644 --- a/src/views/SortCtxPopup.cpp +++ b/src/views/SortCtxPopup.cpp @@ -1,26 +1,26 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "i18n.h" #include "define.h" -#include - #include "Info.h" #include "SortCtxPopup.h" + const char *sortTextSong[] = { N_("Title A-Z"), N_("Title Z-A"), diff --git a/src/views/SourceCtxPopup.cpp b/src/views/SourceCtxPopup.cpp index 1d79e81..d79ec74 100644 --- a/src/views/SourceCtxPopup.cpp +++ b/src/views/SourceCtxPopup.cpp @@ -1,26 +1,27 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "i18n.h" #include "define.h" #include "common.h" #include "Info.h" -#include #include "SourceCtxPopup.h" + const char *sourceText[] = { N_("All Source"), N_("TV"), diff --git a/src/views/Timer.cpp b/src/views/Timer.cpp index 0c447c5..28d4ed2 100644 --- a/src/views/Timer.cpp +++ b/src/views/Timer.cpp @@ -1,23 +1,22 @@ /* -* Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved -* -* Licensed under the Apache License, Version 2.0 (the License); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an AS IS BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include #include "define.h" #include "common.h" -#include #include "Timer.h" diff --git a/src/views/album-layout.cpp b/src/views/album-layout.cpp index e89e374..1d9dc89 100644 --- a/src/views/album-layout.cpp +++ b/src/views/album-layout.cpp @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ #include #include "i18n.h" diff --git a/src/views/album-songs-layout.cpp b/src/views/album-songs-layout.cpp index 4e327f2..2d73eba 100644 --- a/src/views/album-songs-layout.cpp +++ b/src/views/album-songs-layout.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#include "i18n.h" #include +#include "i18n.h" #include "define.h" #include "common.h" #include "song_info.h" diff --git a/src/views/artist-layout.cpp b/src/views/artist-layout.cpp index 32efc3a..4367429 100644 --- a/src/views/artist-layout.cpp +++ b/src/views/artist-layout.cpp @@ -17,7 +17,6 @@ #include #include "i18n.h" #include "define.h" - #include "common.h" #include "category_info.h" #include "album_info.h" diff --git a/src/views/base-view.cpp b/src/views/base-view.cpp index d5c943c..98f9b4e 100644 --- a/src/views/base-view.cpp +++ b/src/views/base-view.cpp @@ -14,10 +14,9 @@ * limitations under the License. */ +#include #include "i18n.h" #include "define.h" -#include - #include "common.h" #include "song_info.h" #include "album_info.h" diff --git a/src/views/category-layout.cpp b/src/views/category-layout.cpp index 827fc28..8cd5831 100644 --- a/src/views/category-layout.cpp +++ b/src/views/category-layout.cpp @@ -17,7 +17,6 @@ #include #include "i18n.h" #include "define.h" - #include "common.h" #include "category_info.h" #include "album_info.h" diff --git a/src/views/category-songs-layout.cpp b/src/views/category-songs-layout.cpp index 6294f43..9d9214c 100644 --- a/src/views/category-songs-layout.cpp +++ b/src/views/category-songs-layout.cpp @@ -14,9 +14,8 @@ * limitations under the License. */ -#include "i18n.h" #include - +#include "i18n.h" #include "define.h" #include "common.h" #include "song_info.h" diff --git a/src/views/common-ui.cpp b/src/views/common-ui.cpp index af07e9c..d1eae37 100644 --- a/src/views/common-ui.cpp +++ b/src/views/common-ui.cpp @@ -14,10 +14,9 @@ * limitations under the License. */ +#include #include "i18n.h" #include "define.h" - -#include #include "common.h" #include "common-ui.h" #include "song_info.h" diff --git a/src/views/context-view.cpp b/src/views/context-view.cpp index a99cba3..933ee5b 100644 --- a/src/views/context-view.cpp +++ b/src/views/context-view.cpp @@ -14,8 +14,8 @@ * limitations under the License. */ -#include "i18n.h" #include +#include "i18n.h" #include "define.h" #include "song_info.h" #include "album_info.h" diff --git a/src/views/entry-popup.cpp b/src/views/entry-popup.cpp index 8395295..1d052b0 100644 --- a/src/views/entry-popup.cpp +++ b/src/views/entry-popup.cpp @@ -14,10 +14,9 @@ * limitations under the License. */ +#include #include "i18n.h" #include "define.h" -#include - #include "common.h" #include "common-ui.h" #include "entry-popup.h" diff --git a/src/views/folder-layout.cpp b/src/views/folder-layout.cpp index 237905c..8b7fc6b 100644 --- a/src/views/folder-layout.cpp +++ b/src/views/folder-layout.cpp @@ -17,7 +17,6 @@ #include #include "i18n.h" #include "define.h" - #include "common.h" #include "folder_info.h" #include "song_info.h" diff --git a/src/views/genre-layout.cpp b/src/views/genre-layout.cpp index 36ebff2..5ea77a2 100644 --- a/src/views/genre-layout.cpp +++ b/src/views/genre-layout.cpp @@ -17,7 +17,6 @@ #include #include "i18n.h" #include "define.h" - #include "common.h" #include "category_info.h" #include "album_info.h" @@ -32,7 +31,6 @@ struct SGenreLayout { - }; diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 077fd2b..97ef925 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -14,16 +14,15 @@ * limitations under the License. */ +#include +#include "i18n.h" #include "define.h" #include "common.h" -#include - #include "Timer.h" #include "song_info.h" #include "album_info.h" #include "music-controller.h" #include "volume-control.h" -#include "i18n.h" #include "common-ui.h" #include "playback-view.h" #include "context-view.h" diff --git a/src/views/playlist-layout.cpp b/src/views/playlist-layout.cpp index f55c086..1404220 100644 --- a/src/views/playlist-layout.cpp +++ b/src/views/playlist-layout.cpp @@ -14,9 +14,8 @@ * limitations under the License. */ -#include "i18n.h" #include - +#include "i18n.h" #include "define.h" #include "common.h" #include "category_info.h" diff --git a/src/views/song-layout.cpp b/src/views/song-layout.cpp index d212091..1cd0321 100644 --- a/src/views/song-layout.cpp +++ b/src/views/song-layout.cpp @@ -14,9 +14,8 @@ * limitations under the License. */ -#include "i18n.h" #include - +#include "i18n.h" #include "define.h" #include "common.h" #include "song_info.h" -- 2.7.4 From 7ffb0a1a0a3bf7e7b3001ae7c756b7c1ec389964 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Tue, 21 Apr 2015 17:13:02 +0900 Subject: [PATCH 12/16] Remove dependency from CPlaybackView to CPlaybackController. CPlaybackController is controllerd only by CMusicController Change-Id: Ife4600b6be9ad8bcbad582e3c30821ae47bdc80c Signed-off-by: Kim Tae Soo --- include/music-controller.h | 3 + src/playback/MusicControllerImpl.cpp | 16 +++++ src/playback/MusicControllerImpl.h | 3 +- src/playback/music-controller.cpp | 10 ++- src/views/PlaybackController.cpp | 129 +++++++++++++++-------------------- src/views/PlaybackController.h | 17 ++--- src/views/SliderWidget.h | 4 +- src/views/playback-view.cpp | 4 +- 8 files changed, 98 insertions(+), 88 deletions(-) diff --git a/include/music-controller.h b/include/music-controller.h index cdf36d0..a4972f3 100644 --- a/include/music-controller.h +++ b/include/music-controller.h @@ -53,6 +53,8 @@ public: virtual void OnEditButtonsPressed(EPlayerEditBtns editBtns) {} //! virtual void OnRemoteButtonEvent(Evas_Object *eoBtn, EPlayerBtnsEvent ev) {} + //! + virtual void OnUpdatePlayerUI(void) {} }; @@ -118,6 +120,7 @@ public: void ChangePlayerMode(EPlayerMode mode); void HandlePlaylistEditButtons(EPlayerEditBtns btnId); void HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEvent ev); + void UpdatePlayerUI(void); }; diff --git a/src/playback/MusicControllerImpl.cpp b/src/playback/MusicControllerImpl.cpp index 6d8e083..7086509 100644 --- a/src/playback/MusicControllerImpl.cpp +++ b/src/playback/MusicControllerImpl.cpp @@ -823,6 +823,22 @@ void CMusicControllerImpl::HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEv } +void CMusicControllerImpl::UpdatePlayerUI(void) +{ + ASSERT(m); + + Eina_List *l; + IMusicControllerListener *mcListener; + void * obj; + + EINA_LIST_FOREACH(m->elListener, l, obj) { + mcListener = (IMusicControllerListener *)obj; + if (mcListener) + mcListener->OnUpdatePlayerUI(); + } +} + + void CMusicControllerImpl::OnStatusChanged(SUsbHostDeviceInfo *changedDevice, SUsbHostDeviceStatus status) { diff --git a/src/playback/MusicControllerImpl.h b/src/playback/MusicControllerImpl.h index e9ba9f2..caac6b7 100644 --- a/src/playback/MusicControllerImpl.h +++ b/src/playback/MusicControllerImpl.h @@ -101,6 +101,7 @@ public: void ChangePlayerMode(EPlayerMode mode); void HandlePlaylistEditButtons(EPlayerEditBtns btnId); void HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEvent ev); + void UpdatePlayerUI(void); public: virtual void OnStatusChanged(SUsbHostDeviceInfo *changedDevice, @@ -110,4 +111,4 @@ public: }; -#endif /* __MUSIC_CONTROLLER_IMPL_H__ */ \ No newline at end of file +#endif /* __MUSIC_CONTROLLER_IMPL_H__ */ diff --git a/src/playback/music-controller.cpp b/src/playback/music-controller.cpp index 66e16fb..bd3c8e5 100644 --- a/src/playback/music-controller.cpp +++ b/src/playback/music-controller.cpp @@ -360,4 +360,12 @@ void CMusicController::HandleRemoteButtons(Evas_Object *eoBtn, EPlayerBtnsEvent ASSERT(m); m->ref.HandleRemoteButtons(eoBtn, ev); -} \ No newline at end of file +} + + +void CMusicController::UpdatePlayerUI(void) +{ + ASSERT(m); + + m->ref.UpdatePlayerUI(); +} diff --git a/src/views/PlaybackController.cpp b/src/views/PlaybackController.cpp index a606020..f7aabbf 100644 --- a/src/views/PlaybackController.cpp +++ b/src/views/PlaybackController.cpp @@ -450,24 +450,6 @@ void CPlaybackController::m_RemoveTimer(int timer_code) } -void CPlaybackController::m_UpdateSongInfo(void) -{ - CSongInfo *sinfo = NULL; - int index; - - if (!m->controller.GetCurrentSongIndex(&index)) { - _ERR(" music get current song index failed "); - return; - } - - if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { - _ERR(" music get songinfo failed "); - return; - } - m->pSongInfo = sinfo; -} - - void CPlaybackController::m_HandleOnPressed(Evas_Object *obj) { m->press_status = PRESS_SHORT; @@ -504,47 +486,25 @@ void CPlaybackController::m_HandleOnUnpressed(Evas_Object *obj) } -bool CPlaybackController::Create(Evas_Object *eoBase, SCallback *cb) -{ - ASSERT(!m); - - _CREATE_BEGIN{ - _CHECK(m = new SPlaybackController) - _COMMAND{ m->eoBase = eoBase; } - _CHECK(m->controller.Create()) - _CHECK(m->controller.AddListener(this)) - - _WHEN_SUCCESS{ - m_AddControlButtons(); - m_AddEditPlaylistButtons(); - m->cb = *cb; - m->press_status = PRESS_SHORT; - } - - _CHECK_FAIL{ m->controller.RemoveListener(this); } - _CHECK_FAIL{ m->controller.Destroy(); } - - _CHECK_FAIL{ delete m; m = NULL; } - } _CREATE_END_AND_CATCH{ return false; } - - return true; -} - - -void CPlaybackController::Destroy(void) +void CPlaybackController::m_UpdateSongInfo(void) { - ASSERT(m); + CSongInfo *sinfo = NULL; + int index; - m_DestroyErrorPopup(); - m_DestroySettingsPopup(); - m->controller.RemoveListener(this); + if (!m->controller.GetCurrentSongIndex(&index)) { + _ERR(" music get current song index failed "); + return; + } - delete m; - m = NULL; + if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { + _ERR(" music get songinfo failed "); + return; + } + m->pSongInfo = sinfo; } -void CPlaybackController::Update(void) +void CPlaybackController::m_Update(void) { int state; @@ -621,49 +581,64 @@ void CPlaybackController::Update(void) } -Evas_Object *CPlaybackController::ControlBtnsObject(EPlayerControlBtns id) +bool CPlaybackController::Create(Evas_Object *eoBase, SCallback *cb) { - ASSERT(m); - return m->eoBtnControl[id]; -} + ASSERT(!m); + _CREATE_BEGIN{ + _CHECK(m = new SPlaybackController) + _COMMAND{ m->eoBase = eoBase; } + _CHECK(m->controller.Create()) + _CHECK(m->controller.AddListener(this)) -Evas_Object *CPlaybackController::EditBtnsObject(EPlayerEditBtns id) -{ - ASSERT(m); - return m->eoBtnEdit[id]; -} + _WHEN_SUCCESS{ + m_AddControlButtons(); + m_AddEditPlaylistButtons(); + m->cb = *cb; + m->press_status = PRESS_SHORT; + } + _CHECK_FAIL{ m->controller.RemoveListener(this); } + _CHECK_FAIL{ m->controller.Destroy(); } -void CPlaybackController::OnComplete(void) -{ + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return false; } + + return true; } -void CPlaybackController::OnStartPlayback(void) +void CPlaybackController::Destroy(void) { - m_UpdateSongInfo(); - m->duration = m->pSongInfo->Duration(); -} + ASSERT(m); + m_DestroyErrorPopup(); + m_DestroySettingsPopup(); + m->controller.RemoveListener(this); -void CPlaybackController::OnStopPlayback(void) -{ + delete m; + m = NULL; } -void CPlaybackController::OnPausePlayback(void) +Evas_Object *CPlaybackController::ControlBtnsObject(EPlayerControlBtns id) { + ASSERT(m); + return m->eoBtnControl[id]; } -void CPlaybackController::OnResumePlayback(void) +Evas_Object *CPlaybackController::EditBtnsObject(EPlayerEditBtns id) { + ASSERT(m); + return m->eoBtnEdit[id]; } -void CPlaybackController::OnPosition(int milsec) +void CPlaybackController::OnStartPlayback(void) { + m_UpdateSongInfo(); + m->duration = m->pSongInfo->Duration(); } @@ -697,6 +672,12 @@ void CPlaybackController::OnRemoteButtonEvent(Evas_Object *eoBtn, EPlayerBtnsEve } +void CPlaybackController::OnUpdatePlayerUI(void) +{ + m_Update(); +} + + void CPlaybackController::OnPressed(int id, Evas_Object *obj) { switch (id) { @@ -837,4 +818,4 @@ void CPlaybackController::OnMouseClicked(int id, Evas_Object *obj) default: break; } -} \ No newline at end of file +} diff --git a/src/views/PlaybackController.h b/src/views/PlaybackController.h index e9dbd9e..2af1356 100644 --- a/src/views/PlaybackController.h +++ b/src/views/PlaybackController.h @@ -64,6 +64,8 @@ private: void m_RemoveTimer(int timer_code); void m_UpdateSongInfo(void); + void m_Update(void); + public: CPlaybackController() : IPressedListener(this), @@ -76,21 +78,20 @@ public: bool Create(Evas_Object *eoBase, SCallback *cb); virtual void Destroy(void); - void Update(void); - Evas_Object *ControlBtnsObject(EPlayerControlBtns id); Evas_Object *EditBtnsObject(EPlayerEditBtns id); public: - virtual void OnComplete(void); + //! This function is invoked when new song is played. virtual void OnStartPlayback(void); - virtual void OnStopPlayback(void); - virtual void OnPausePlayback(void); - virtual void OnResumePlayback(void); - virtual void OnPosition(int milsec); + //! This function is invoked when error is occured. virtual void OnError(void); + //! This function is invoked when playlist is empty. virtual void OnEmptyPlaylist(void); + //! This function is invoked when remote button is pressed. virtual void OnRemoteButtonEvent(Evas_Object *eoBtn, EPlayerBtnsEvent ev); + //! This function is invoked when player UI need to be updated. + virtual void OnUpdatePlayerUI(void); virtual void OnPressed(int id, Evas_Object *obj); virtual void OnUnpressed(int id, Evas_Object *obj); @@ -98,4 +99,4 @@ public: virtual void OnMouseClicked(int id, Evas_Object *obj); }; -#endif // __PLAYBACK_CONTROLLER_H__ \ No newline at end of file +#endif // __PLAYBACK_CONTROLLER_H__ diff --git a/src/views/SliderWidget.h b/src/views/SliderWidget.h index 78637ff..f3dc300 100644 --- a/src/views/SliderWidget.h +++ b/src/views/SliderWidget.h @@ -52,13 +52,13 @@ public: virtual void OnComplete(void); //! This function is invoked when new song is played. virtual void OnStartPlayback(void); - //! + //! This function is invoked when playback is stopped. virtual void OnStopPlayback(void); //! This function is invoked when playback is paused. virtual void OnPausePlayback(void); //! This function is invoked when playback is resumed. virtual void OnResumePlayback(void); - //! + //! This function is invoked when the position of playback is changed. virtual void OnPosition(int milsec); virtual void OnChanged(int id, Evas_Object *obj); diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 97ef925..218651b 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -401,7 +401,7 @@ void CPlaybackView::m_UpdateCurrentSongInfo(void) m_UpdateCurrentSongItem(index); m_UpdateCurrentSongLabels(); m_UpdateCurrentSongThumbnail(); - m->pPlaybackController->Update(); + m->pController->UpdatePlayerUI(); m_UpdatePlaymodeFocusSequence(); } @@ -1347,4 +1347,4 @@ void CPlaybackView::OnEditButtonsPressed(EPlayerEditBtns editBtns) ASSERT(!"Invalid Edit Button"); break; } -} \ No newline at end of file +} -- 2.7.4 From 3828df315740e3133fa0bf81b483bcd8bc514d05 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Wed, 22 Apr 2015 11:29:43 +0900 Subject: [PATCH 13/16] Refactoring of Playback View Change-Id: If85bffc0028b657ed19ca50fcd1fcb0687a79110 Signed-off-by: Kim Tae Soo --- CMakeLists.txt | 2 + include/playback-view.h | 7 +- src/views/AlbumCover.cpp | 153 +++++++++++++++++++++++++++++++++++++++ src/views/AlbumCover.h | 46 ++++++++++++ src/views/PlaybackController.cpp | 4 +- src/views/PlaybackController.h | 2 +- src/views/SliderWidget.cpp | 24 +++--- src/views/SliderWidget.h | 5 +- src/views/SongTitleLabel.cpp | 128 ++++++++++++++++++++++++++++++++ src/views/SongTitleLabel.h | 45 ++++++++++++ src/views/playback-view.cpp | 90 +++++------------------ 11 files changed, 414 insertions(+), 92 deletions(-) create mode 100644 src/views/AlbumCover.cpp create mode 100644 src/views/AlbumCover.h create mode 100644 src/views/SongTitleLabel.cpp create mode 100644 src/views/SongTitleLabel.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 063b29a..4f52888 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,8 @@ SET(SRCS src/main.cpp src/views/PlaybackController.cpp src/views/SliderWidget.cpp src/views/Timer.cpp + src/views/AlbumCover.cpp + src/views/SongTitleLabel.cpp src/views/ErrorPopupWindow.cpp src/playback/playlist-mgr.cpp src/playback/music-controller.cpp diff --git a/include/playback-view.h b/include/playback-view.h index 33985aa..039a13f 100644 --- a/include/playback-view.h +++ b/include/playback-view.h @@ -12,7 +12,7 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. -*/ + */ #ifndef __PLAYBACK_VIEW_H__ #define __PLAYBACK_VIEW_H__ @@ -29,7 +29,7 @@ class CPlaybackView : public CBaseView, public IMusicControllerListener, public CTimer { private: - struct SPlaybackView* m; + struct SPlaybackView *m; private: static Eina_Bool sm_CbLongpressTimer(void *dt); @@ -65,8 +65,6 @@ private: void m_DisableCheckAll(Eina_List *list); void m_SelectItem(SItemInfo *it_info); void m_UnselectItem(SItemInfo *it_info); - void m_UpdateCurrentSongThumbnail(void); - void m_UpdateCurrentSongLabels(void); void m_UpdateEmptySongInfo(void); void m_UpdateCtxtView(int playStatus); void m_UpdateCurrentSongItem(int index); @@ -78,7 +76,6 @@ private: void m_FromPlaybackToEditMode(void); void m_DeleteSelectedItems(void); - void m_AddAlbumCover(void); void m_AddCurrentSonginfo(void); SItemInfo *m_FindItemInfoFromSong(Eina_List *list, CSongInfo *sinfo); SItemInfo *m_FindItemInfoFromItem(Eina_List *list, Elm_Object_Item *item); diff --git a/src/views/AlbumCover.cpp b/src/views/AlbumCover.cpp new file mode 100644 index 0000000..f11dd1f --- /dev/null +++ b/src/views/AlbumCover.cpp @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "i18n.h" +#include "define.h" +#include "common.h" +#include "song_info.h" +#include "music-controller.h" +#include "AlbumCover.h" + + +struct SAlbumCover { + Evas_Object *eoBase; + Evas_Object *eoAlbumCover; + CMusicController controller; + + CSongInfo *pSongInfo; +}; + + +void CAlbumCover::m_AddAlbumCover(void) +{ + Evas_Object *eoAlbumCover = NULL; + + eoAlbumCover = elm_image_add(m->eoBase); + if (!eoAlbumCover) + return; + + evas_object_size_hint_weight_set(eoAlbumCover, EVAS_HINT_EXPAND, + EVAS_HINT_EXPAND); + elm_image_aspect_fixed_set(eoAlbumCover, EINA_FALSE); + + elm_object_part_content_set(m->eoBase, MUSIC_PART_ALBUMCOVER, + eoAlbumCover); + evas_object_show(eoAlbumCover); + m->eoAlbumCover = eoAlbumCover; +} + + +void CAlbumCover::m_Update(void) +{ + char *path = NULL; + char buf[MAX_LENGTH]; + + ASSERT(m->pSongInfo) + + path = m->pSongInfo->ThumbnailPath(); + if (path) + elm_image_file_set(m->eoAlbumCover, path, NULL); + else { + snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, + MUSIC_IMAGE_DEFAULT_THUMB_450); + elm_image_file_set(m->eoAlbumCover, buf, NULL); + } +} + + +void CAlbumCover::m_UpdateSongInfo(void) +{ + CSongInfo *sinfo = NULL; + int index; + + if (!m->controller.GetCurrentSongIndex(&index)) { + _ERR(" music get current song index failed "); + return; + } + + if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { + _ERR(" music get songinfo failed "); + return; + } + m->pSongInfo = sinfo; +} + + +void CAlbumCover::m_UpdateForEmptySongList(void) +{ + char buf[MAX_LENGTH]; + + snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, + MUSIC_IMAGE_DEFAULT_THUMB_450); + elm_image_file_set(m->eoAlbumCover, buf, NULL); +} + + + +bool CAlbumCover::Create(Evas_Object *eoBase) +{ + ASSERT(!m); + + _CREATE_BEGIN{ + _CHECK(m = new SAlbumCover) + _COMMAND{ m->eoBase = eoBase; } + _CHECK(m->controller.Create()) + _CHECK(m->controller.AddListener(this)) + + _WHEN_SUCCESS{ + m_AddAlbumCover(); + } + + _CHECK_FAIL{ m->controller.RemoveListener(this); } + _CHECK_FAIL{ m->controller.Destroy(); } + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return false; } + + return true; +} + + +void CAlbumCover::Destroy(void) +{ + ASSERT(m); + + m->controller.RemoveListener(this); + m->controller.Destroy(); + delete m; + m = NULL; +} + + +void CAlbumCover::OnStartPlayback(void) +{ + m_UpdateSongInfo(); + m_Update(); +} + + +void CAlbumCover::OnEmptyPlaylist(void) +{ + m_UpdateForEmptySongList(); +} + + +void CAlbumCover::OnUpdatePlayerUI(void) +{ + m_UpdateSongInfo(); + m_Update(); +} + diff --git a/src/views/AlbumCover.h b/src/views/AlbumCover.h new file mode 100644 index 0000000..3011aa1 --- /dev/null +++ b/src/views/AlbumCover.h @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __ALBUM_COVER_H__ +#define __ALBUM_COVER_H__ + +class CAlbumCover : public IMusicControllerListener { +private: + struct SAlbumCover *m; + +private: + void m_AddAlbumCover(void); + void m_Update(void); + void m_UpdateSongInfo(void); + void m_UpdateForEmptySongList(void); + +public: + CAlbumCover() : m(0) {} + virtual ~CAlbumCover() {} + + bool Create(Evas_Object *eoBase); + virtual void Destroy(void); + +public: + //! This function is invoked when new song is played. + virtual void OnStartPlayback(void); + //! This function is invoked when playlist is empty. + virtual void OnEmptyPlaylist(void); + //! This function is invoked when player UI need to be updated. + virtual void OnUpdatePlayerUI(void); +}; + +#endif // __ALBUM_COVER_H__ \ No newline at end of file diff --git a/src/views/PlaybackController.cpp b/src/views/PlaybackController.cpp index f7aabbf..5b2f4c2 100644 --- a/src/views/PlaybackController.cpp +++ b/src/views/PlaybackController.cpp @@ -278,7 +278,7 @@ void CPlaybackController::m_AddEditPlaylistButtons(void) } -void CPlaybackController::m_UpdateForEmptySong(void) +void CPlaybackController::m_UpdateForEmptySongList(void) { elm_object_signal_emit(m->eoBtnControl[CTRL_BTN_PLAY], MUSIC_SIGNAL_PAUSE, MUSIC_PLAYBACK_VIEW); @@ -650,7 +650,7 @@ void CPlaybackController::OnError(void) void CPlaybackController::OnEmptyPlaylist(void) { - m_UpdateForEmptySong(); + m_UpdateForEmptySongList(); } diff --git a/src/views/PlaybackController.h b/src/views/PlaybackController.h index 2af1356..7f27d55 100644 --- a/src/views/PlaybackController.h +++ b/src/views/PlaybackController.h @@ -53,7 +53,7 @@ private: void m_DestroyErrorPopup(void); void m_CreateSettingsPopup(void); void m_DestroySettingsPopup(void); - void m_UpdateForEmptySong(void); + void m_UpdateForEmptySongList(void); void m_HandleForwardBtnClicked(Evas_Object *obj); void m_HandleRewindBtnClicked(Evas_Object *obj); diff --git a/src/views/SliderWidget.cpp b/src/views/SliderWidget.cpp index 51d570c..c567bca 100644 --- a/src/views/SliderWidget.cpp +++ b/src/views/SliderWidget.cpp @@ -143,6 +143,15 @@ void CSliderWidget::m_UpdateSongInfo(void) } +void CSliderWidget::m_UpdateForEmptySongList(void) +{ + elm_object_disabled_set(m->eoSlider, EINA_TRUE); + elm_slider_value_set(m->eoSlider, 0); + elm_object_part_text_set(m->eoBase, MUSIC_PART_FULLTIME, "00:00"); + elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); +} + + bool CSliderWidget::Create(Evas_Object *eoBase) { ASSERT(!m); @@ -184,15 +193,6 @@ Evas_Object* CSliderWidget::Base(void) } -void CSliderWidget::Init(void) -{ - elm_object_disabled_set(m->eoSlider, EINA_TRUE); - elm_slider_value_set(m->eoSlider, 0); - elm_object_part_text_set(m->eoBase, MUSIC_PART_FULLTIME, "00:00"); - elm_object_part_text_set(m->eoBase, MUSIC_PART_PROGRESSTIME, "00:00"); -} - - void CSliderWidget::OnComplete(void) { } @@ -258,6 +258,12 @@ void CSliderWidget::OnPosition(int milsec) } +void CSliderWidget::OnEmptyPlaylist(void) +{ + m_UpdateForEmptySongList(); +} + + void CSliderWidget::OnChanged(int id, Evas_Object *obj) { char *timestr = NULL; diff --git a/src/views/SliderWidget.h b/src/views/SliderWidget.h index f3dc300..528cca2 100644 --- a/src/views/SliderWidget.h +++ b/src/views/SliderWidget.h @@ -33,6 +33,7 @@ private: void m_RemoveTimer(void); void m_UpdateSongInfo(void); + void m_UpdateForEmptySongList(void); public: CSliderWidget() : @@ -46,8 +47,6 @@ public: Evas_Object* Base(void); - void Init(void); - //! This function is invoked when playback is complete. virtual void OnComplete(void); //! This function is invoked when new song is played. @@ -60,6 +59,8 @@ public: virtual void OnResumePlayback(void); //! This function is invoked when the position of playback is changed. virtual void OnPosition(int milsec); + //! This function is invoked when playlist is empty. + virtual void OnEmptyPlaylist(void); virtual void OnChanged(int id, Evas_Object *obj); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); diff --git a/src/views/SongTitleLabel.cpp b/src/views/SongTitleLabel.cpp new file mode 100644 index 0000000..fa84fd5 --- /dev/null +++ b/src/views/SongTitleLabel.cpp @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "i18n.h" +#include "define.h" +#include "common.h" +#include "song_info.h" +#include "music-controller.h" +#include "SongTitleLabel.h" + + +struct SSongTitleLabel { + Evas_Object *eoBase; + CMusicController controller; + + CSongInfo *pSongInfo; + +}; + + +void CSongTitleLabel::m_Update(void) +{ + char buf[MAX_LENGTH]; + + ASSERT(m->pSongInfo); + + elm_object_part_text_set(m->eoBase, MUSIC_PART_SONG_TITLE, + m->pSongInfo->Name()); + + snprintf(buf, sizeof(buf), "%s - %s", m->pSongInfo->Artist(), + m->pSongInfo->Album()); + + elm_object_part_text_set(m->eoBase, MUSIC_PART_ARTIST_ALBUM, buf); +} + + +void CSongTitleLabel::m_UpdateSongInfo(void) +{ + CSongInfo *sinfo = NULL; + int index; + + if (!m->controller.GetCurrentSongIndex(&index)) { + _ERR(" music get current song index failed "); + return; + } + + if (!m->controller.GetSonginfoFromIndex(index, &sinfo)) { + _ERR(" music get songinfo failed "); + return; + } + m->pSongInfo = sinfo; + +} + + +void CSongTitleLabel::m_UpdateForEmptySongList(void) +{ + char buf[MAX_LENGTH]; + + elm_object_part_text_set(m->eoBase, MUSIC_PART_SONG_TITLE, + _(NO_PLAYLIST_MESSAGE)); + elm_object_part_text_set(m->eoBase, MUSIC_PART_ARTIST_ALBUM, + _(NO_PLAYLIST_MESSAGE_SUB)); +} + + +bool CSongTitleLabel::Create(Evas_Object *eoBase) +{ + ASSERT(!m); + + _CREATE_BEGIN{ + _CHECK(m = new SSongTitleLabel) + _COMMAND{ m->eoBase = eoBase; } + _CHECK(m->controller.Create()) + _CHECK(m->controller.AddListener(this)) + + _CHECK_FAIL{ m->controller.RemoveListener(this); } + _CHECK_FAIL{ m->controller.Destroy(); } + _CHECK_FAIL{ delete m; m = NULL; } + } _CREATE_END_AND_CATCH{ return false; } + + return true; +} + + +void CSongTitleLabel::Destroy(void) +{ + ASSERT(m); + + m->controller.RemoveListener(this); + m->controller.Destroy(); + delete m; + m = NULL; +} + + +void CSongTitleLabel::OnStartPlayback(void) +{ + m_UpdateSongInfo(); + m_Update(); +} + + +void CSongTitleLabel::OnEmptyPlaylist(void) +{ + m_UpdateForEmptySongList(); +} + + +void CSongTitleLabel::OnUpdatePlayerUI(void) +{ + m_UpdateSongInfo(); + m_Update(); +} diff --git a/src/views/SongTitleLabel.h b/src/views/SongTitleLabel.h new file mode 100644 index 0000000..7520a65 --- /dev/null +++ b/src/views/SongTitleLabel.h @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef __SONG_TITLE_LABEL_H__ +#define __SONG_TITLE_LABEL_H__ + +class CSongTitleLabel : public IMusicControllerListener { +private: + struct SSongTitleLabel *m; + +private: + void m_Update(void); + void m_UpdateSongInfo(void); + void m_UpdateForEmptySongList(void); + +public: + CSongTitleLabel() : m(0) {} + virtual ~CSongTitleLabel() {} + + bool Create(Evas_Object *eoBase); + virtual void Destroy(void); + +public: + //! This function is invoked when new song is played. + virtual void OnStartPlayback(void); + //! This function is invoked when playlist is empty. + virtual void OnEmptyPlaylist(void); + //! This function is invoked when player UI need to be updated. + virtual void OnUpdatePlayerUI(void); +}; + +#endif // __SONG_TITLE_LABEL_H__ \ No newline at end of file diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 218651b..7b3627d 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -31,6 +31,8 @@ #include "Info.h" #include "SliderWidget.h" #include "PlaybackController.h" +#include "AlbumCover.h" +#include "SongTitleLabel.h" #define TOTAL_CONTROL_BTNS 6 @@ -63,8 +65,9 @@ struct SPlaybackView { Evas_Object *eoBtnControl[TOTAL_CONTROL_BTNS]; Evas_Object *eoBtnEdit[TOTAL_EDIT_BTNS]; - Evas_Object *eoAlbumCover; + CAlbumCover *pAlbumCover; CSliderWidget *pSliderWidget; + CSongTitleLabel *pSongTitleLabel; Eina_List *elInfo; CMusicController *pController; //! NOT NULL @@ -236,55 +239,8 @@ void CPlaybackView::m_UnselectItem(SItemInfo *pItemInfo) } -void CPlaybackView::m_UpdateCurrentSongThumbnail(void) -{ - char *path = NULL; - char buf[MAX_LENGTH]; - - if (!m->cs_itinfo || !m->cs_itinfo->sinfo) - return; - - path = m->cs_itinfo->sinfo->ThumbnailPath(); - if (path) - elm_image_file_set(m->eoAlbumCover, path, NULL); - else { - snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, - MUSIC_IMAGE_DEFAULT_THUMB_450); - elm_image_file_set(m->eoAlbumCover, buf, NULL); - } -} - - -void CPlaybackView::m_UpdateCurrentSongLabels(void) -{ - char buf[MAX_LENGTH]; - - if (!m->csinfo) - return; - - elm_object_part_text_set(m->eoBase, MUSIC_PART_SONG_TITLE, - m->csinfo->Name()); - - snprintf(buf, sizeof(buf), "%s - %s", m->csinfo->Artist(), - m->csinfo->Album()); - - elm_object_part_text_set(m->eoBase, MUSIC_PART_ARTIST_ALBUM, buf); -} - - void CPlaybackView::m_UpdateEmptySongInfo(void) { - char buf[MAX_LENGTH]; - - m->pSliderWidget->Init(); - - elm_object_part_text_set(m->eoBase, MUSIC_PART_SONG_TITLE, - _(NO_PLAYLIST_MESSAGE)); - elm_object_part_text_set(m->eoBase, MUSIC_PART_ARTIST_ALBUM, - _(NO_PLAYLIST_MESSAGE_SUB)); - snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, - MUSIC_IMAGE_DEFAULT_THUMB_450); - elm_image_file_set(m->eoAlbumCover, buf, NULL); m->pController->SetPlayState(PLAY_STATUS_INITIAL); } @@ -383,7 +339,7 @@ void CPlaybackView::m_UpdateCurrentSongInfo(void) int index; if (eina_list_count(m->elInfo) == 0) { - m_UpdateEmptySongInfo(); + m->pController->EmptyPlaylist(); return; } @@ -399,8 +355,6 @@ void CPlaybackView::m_UpdateCurrentSongInfo(void) m->csinfo = sinfo; m_UpdateCurrentSongItem(index); - m_UpdateCurrentSongLabels(); - m_UpdateCurrentSongThumbnail(); m->pController->UpdatePlayerUI(); m_UpdatePlaymodeFocusSequence(); } @@ -492,7 +446,7 @@ void CPlaybackView::m_DeleteSelectedItems(void) } if (eina_list_count(m->elInfo) == 0) { - m_UpdateEmptySongInfo(); + m->pController->EmptyPlaylist(); elm_genlist_realized_items_update(m->eoPlaylist); elm_object_focus_set(m->eoBtnEdit[EDIT_BTN_CANCEL], EINA_TRUE); return; @@ -637,29 +591,13 @@ void CPlaybackView::m_HandleKeyUnpress(char *keyname) } -void CPlaybackView::m_AddAlbumCover(void) -{ - Evas_Object *eoAlbumCover = NULL; - - eoAlbumCover = elm_image_add(m->eoBase); - if (!eoAlbumCover) - return; - - evas_object_size_hint_weight_set(eoAlbumCover, EVAS_HINT_EXPAND, - EVAS_HINT_EXPAND); - elm_image_aspect_fixed_set(eoAlbumCover, EINA_FALSE); - - elm_object_part_content_set(m->eoBase, MUSIC_PART_ALBUMCOVER, - eoAlbumCover); - evas_object_show(eoAlbumCover); - m->eoAlbumCover = eoAlbumCover; - -} - - void CPlaybackView::m_AddCurrentSonginfo(void) { - m_AddAlbumCover(); + m->pSongTitleLabel = new CSongTitleLabel; + m->pSongTitleLabel->Create(m->eoBase); + + m->pAlbumCover = new CAlbumCover; + m->pAlbumCover->Create(m->eoBase); m->pSliderWidget = new CSliderWidget; m->pSliderWidget->Create(m->eoBase); @@ -1011,6 +949,12 @@ void CPlaybackView::Destroy(void) m->pSliderWidget->Destroy(); delete m->pSliderWidget; + m->pAlbumCover->Destroy(); + delete m->pAlbumCover; + + m->pSongTitleLabel->Destroy(); + delete m->pSongTitleLabel; + m->pHandleVolume->Destroy(); delete m->pHandleVolume; CBaseView::Destroy(); -- 2.7.4 From bcb9c5e1861d9756a423e2d10db26c4b1a468f8e Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Wed, 22 Apr 2015 14:41:50 +0900 Subject: [PATCH 14/16] Add testcase text file Change-Id: I8cdcac8dcb29ea8a3bce94296076821fc97895ca Signed-off-by: Kim Tae Soo --- testcase/musicplayer.txt | 1 + testcase/musicplayer_all.txt | 14000 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 14001 insertions(+) create mode 100644 testcase/musicplayer.txt create mode 100644 testcase/musicplayer_all.txt diff --git a/testcase/musicplayer.txt b/testcase/musicplayer.txt new file mode 100644 index 0000000..f223a8a --- /dev/null +++ b/testcase/musicplayer.txt @@ -0,0 +1 @@ +musicplayer_all.txt diff --git a/testcase/musicplayer_all.txt b/testcase/musicplayer_all.txt new file mode 100644 index 0000000..0162081 --- /dev/null +++ b/testcase/musicplayer_all.txt @@ -0,0 +1,14000 @@ +Key Pressed +Right 1000 +Key Released +Right 136 +Key Pressed +Up 624 +Key Released +Up 128 +Key Pressed +Return 608 +Key Released +Return 128 +Key Pressed +Down 1704 +Key Released +Down 112 +Key Pressed +Down 264 +Key Released +Down 144 +Key Pressed +Down 80 +Key Released +Down 160 +Key Pressed +Down 288 +Key Released +Down 176 +Key Pressed +Down 56 +Key Released +Down 136 +Key Pressed +Left 56 +Key Released +Left 152 +Key Pressed +Left 56 +Key Released +Left 113 +Key Pressed +Return 312 +Key Released +Return 143 +Key Pressed +Escape 424 +Key Released +Escape 136 +Key Pressed +Right 481 +Key Released +Right 111 +Key Pressed +Return 264 +Key Released +Return 136 +Key Pressed +Down 441 +Key Released +Down 151 +Key Pressed +Return 240 +Key Released +Return 160 +Key Pressed +Return 440 +Key Released +Return 104 +Key Pressed +Down 377 +Key Released +Down 119 +Key Pressed +Return 280 +Key Released +Return 152 +Key Pressed +Return 536 +Key Released +Return 128 +Key Pressed +Down 288 +Key Released +Down 128 +Key Pressed +Return 305 +Key Released +Return 143 +Key Pressed +Return 528 +Key Released +Return 112 +Key Pressed +Down 248 +Key Released +Down 160 +Key Pressed +Return 216 +Key Released +Return 136 +Key Pressed +Return 520 +Key Released +Return 112 +Key Pressed +Down 225 +Key Released +Down 135 +Key Pressed +Return 256 +Key Released +Return 160 +Key Pressed +Return 464 +Key Released +Return 160 +Key Pressed +Down 673 +Key Released +Down 167 +Key Pressed +Return 264 +Key Released +Return 168 +Key Pressed +Right 433 +Key Released +Right 151 +Key Pressed +Return 320 +Key Released +Return 144 +Key Pressed +Down 648 +Key Released +Down 176 +Key Pressed +Return 152 +Key Released +Return 168 +Key Pressed +Return 392 +Key Released +Return 128 +Key Pressed +Down 248 +Key Released +Down 144 +Key Pressed +Return 224 +Key Released +Return 152 +Key Pressed +Down 352 +Key Released +Down 184 +Key Pressed +Return 824 +Key Released +Return 152 +Key Pressed +Left 552 +Key Released +Left 120 +Key Pressed +Left 128 +Key Released +Left 160 +Key Pressed +Return 120 +Key Released +Return 144 +Key Pressed +Escape 168 +Key Released +Escape 152 +Key Pressed +Down 528 +Key Released +Down 160 +Key Pressed +Down 160 +Key Released +Down 120 +Key Pressed +Super_L 440 +Key Released +Super_L 120 +Key Pressed +Escape 960 +Key Released +Escape 168 +Key Pressed +Left 320 +Key Released +Left 168 +Key Pressed +Down 224 +Key Released +Down 160 +Key Pressed +Right 376 +Key Released +Right 56 +Key Pressed +Right 608 +Key Released +Right 120 +Key Pressed +Right 153 +Key Released +Right 127 +Key Pressed +Up 185 +Key Released +Up 175 +Key Pressed +Right 153 +Key Released +Right 119 +Key Pressed +Return 232 +Key Released +Return 96 +Key Pressed +Down 240 +Key Released +Down 152 +Key Pressed +Return 168 +Key Released +Return 128 +Key Pressed +Return 432 +Key Released +Return 144 +Key Pressed +Down 208 +Key Released +Down 168 +Key Pressed +Return 224 +Key Released +Return 176 +Key Pressed +Down 520 +Key Released +Down 104 +Key Pressed +Return 480 +Key Released +Return 160 +Key Pressed +Right 1040 +Key Released +Right 128 +Key Pressed +Right 112 +Key Released +Right 128 +Key Pressed +Return 184 +Key Released +Return 104 +Key Pressed +Left 1064 +Key Released +Left 152 +Key Pressed +Return 480 +Key Released +Return 160 +Key Pressed +Left 1217 +Key Released +Left 159 +Key Pressed +Return 320 +Key Released +Return 128 +Key Pressed +Down 593 +Key Released +Down 151 +Key Pressed +Left 112 +Key Released +Left 104 +Key Pressed +Left 64 +Key Released +Left 128 +Key Pressed +Return 616 +Key Released +Return 136 +Key Pressed +Escape 472 +Key Released +Escape 160 +Key Pressed +Down 304 +Key Released +Down 144 +Key Pressed +Down 136 +Key Released +Down 176 +Key Pressed +Return 1200 +Key Released +Return 152 +Key Pressed +Down 456 +Key Released +Down 144 +Key Pressed +Down 64 +Key Released +Down 160 +Key Pressed +Left 88 +Key Released +Left 112 +Key Pressed +Left 104 +Key Released +Left 128 +Key Pressed +Return 232 +Key Released +Return 144 +Key Pressed +Escape 208 +Key Released +Escape 152 +Key Pressed +Down 312 +Key Released +Down 160 +Key Pressed +Down 72 +Key Released +Down 160 +Key Pressed +Alt_L 584 +Key Released +Alt_L 112 +Key Pressed +Super_L 496 +Key Released +Super_L 184 +Key Pressed +Escape 1089 +Key Released +Escape 151 +Key Pressed +Left 521 +Key Released +Left 135 +Key Pressed +Down 232 +Key Released +Down 168 +Key Pressed +Right 720 +Key Released +Right 144 +Key Pressed +Return 1000 +Key Released +Return 152 +Key Pressed +Right 1040 +Key Released +Right 120 +Key Pressed +Right 81 +Key Released +Right 135 +Key Pressed +Return 128 +Key Released +Return 160 +Key Pressed +Left 584 +Key Released +Left 128 +Key Pressed +Return 480 +Key Released +Return 144 +Key Pressed +Left 832 +Key Released +Left 160 +Key Pressed +Return 696 +Key Released +Return 144 +Key Pressed +Down 544 +Key Released +Down 192 +Key Pressed +Left 112 +Key Released +Left 160 +Key Pressed +Left 64 +Key Released +Left 144 +Key Pressed +Return 472 +Key Released +Return 128 +Key Pressed +Escape 616 +Key Released +Escape 152 +Key Pressed +Down 232 +Key Released +Down 168 +Key Pressed +Down 120 +Key Released +Down 155 +Key Pressed +Return 373 +Key Released +Return 176 +Key Pressed +Left 928 +Key Released +Left 104 +Key Pressed +Left 104 +Key Released +Left 128 +Key Pressed +Return 368 +Key Released +Return 144 +Key Pressed +Escape 256 +Key Released +Escape 152 +Key Pressed +Down 401 +Key Released +Down 135 +Key Pressed +Down 136 +Key Released +Down 144 +Key Pressed +Super_L 840 +Key Released +Super_L 120 +Key Pressed +Escape 992 +Key Released +Escape 160 +Key Pressed +Left 512 +Key Released +Left 184 +Key Pressed +Down 1281 +Key Released +Down 175 +Key Pressed +Right 320 +Key Released +Right 153 +Key Pressed +Return 263 +Key Released +Return 152 +Key Pressed +Right 984 +Key Released +Right 136 +Key Pressed +Right 440 +Key Released +Right 144 +Key Pressed +Return 200 +Key Released +Return 152 +Key Pressed +Left 809 +Key Released +Left 152 +Key Pressed +Return 759 +Key Released +Return 144 +Key Pressed +Left 848 +Key Released +Left 160 +Key Pressed +Return 664 +Key Released +Return 136 +Key Pressed +Left 656 +Key Released +Left 168 +Key Pressed +Left 152 +Key Released +Left 144 +Key Pressed +Return 1136 +Key Released +Return 168 +Key Pressed +Escape 248 +Key Released +Escape 136 +Key Pressed +Down 672 +Key Released +Down 168 +Key Pressed +Down 201 +Key Released +Down 151 +Key Pressed +Return 400 +Key Released +Return 200 +Key Pressed +Right 769 +Key Released +Right 127 +Key Pressed +Right 96 +Key Released +Right 152 +Key Pressed +Return 240 +Key Released +Return 160 +Key Pressed +Left 784 +Key Released +Left 160 +Key Pressed +Return 552 +Key Released +Return 155 +Key Pressed +Left 725 +Key Released +Left 168 +Key Pressed +Return 585 +Key Released +Return 151 +Key Pressed +Down 441 +Key Released +Down 127 +Key Pressed +Left 104 +Key Released +Left 136 +Key Pressed +Left 80 +Key Released +Left 128 +Key Pressed +Return 600 +Key Released +Return 152 +Key Pressed +Escape 736 +Key Released +Escape 160 +Key Pressed +Down 241 +Key Released +Down 119 +Key Pressed +Down 80 +Key Released +Down 152 +Key Pressed +Super_L 584 +Key Released +Super_L 136 +Key Pressed +Escape 808 +Key Released +Escape 144 +Key Pressed +Return 472 +Key Released +Return 168 +Key Pressed +Left 584 +Key Released +Left 128 +Key Pressed +Left 56 +Key Released +Left 144 +Key Pressed +Return 336 +Key Released +Return 144 +Key Pressed +Escape 488 +Key Released +Escape 168 +Key Pressed +Left 408 +Key Released +Left 176 +Key Pressed +Up 393 +Key Released +Up 183 +Key Pressed +Right 320 +Key Released +Right 192 +Key Pressed +Right 72 +Key Released +Right 152 +Key Pressed +Right 120 +Key Released +Right 168 +Key Pressed +Up 160 +Key Released +Up 160 +Key Pressed +Right 120 +Key Released +Right 152 +Key Pressed +Return 208 +Key Released +Return 112 +Key Pressed +Down 321 +Key Released +Down 167 +Key Pressed +Return 256 +Key Released +Return 152 +Key Pressed +Return 568 +Key Released +Return 112 +Key Pressed +Down 176 +Key Released +Down 168 +Key Pressed +Return 184 +Key Released +Return 160 +Key Pressed +Down 416 +Key Released +Down 160 +Key Pressed +Left 200 +Key Released +Left 96 +Key Pressed +Down 281 +Key Released +Down 151 +Key Pressed +Right 208 +Key Released +Right 152 +Key Pressed +Right 112 +Key Released +Right 144 +Key Pressed +Up 184 +Key Released +Up 144 +Key Pressed +Return 394 +Key Released +Return 158 +Key Pressed +Down 729 +Key Released +Down 183 +Key Pressed +Return 264 +Key Released +Return 184 +Key Pressed +Return 354 +Key Released +Return 142 +Key Pressed +Return 392 +Key Released +Return 192 +Key Pressed +Return 336 +Key Released +Return 144 +Key Pressed +Up 249 +Key Released +Up 143 +Key Pressed +Return 216 +Key Released +Return 136 +Key Pressed +Down 688 +Key Released +Down 168 +Key Pressed +Right 744 +Key Released +Right 128 +Key Pressed +Return 216 +Key Released +Return 144 +Key Pressed +Right 897 +Key Released +Right 119 +Key Pressed +Right 80 +Key Released +Right 144 +Key Pressed +Return 184 +Key Released +Return 176 +Key Pressed +Left 792 +Key Released +Left 120 +Key Pressed +Return 680 +Key Released +Return 144 +Key Pressed +Left 873 +Key Released +Left 159 +Key Pressed +Return 456 +Key Released +Return 152 +Key Pressed +Down 648 +Key Released +Down 152 +Key Pressed +Down 64 +Key Released +Down 152 +Key Pressed +Left 129 +Key Released +Left 119 +Key Pressed +Left 104 +Key Released +Left 128 +Key Pressed +Return 264 +Key Released +Return 192 +Key Pressed +Escape 832 +Key Released +Escape 184 +Key Pressed +Down 536 +Key Released +Down 120 +Key Pressed +Down 168 +Key Released +Down 144 +Key Pressed +Return 1161 +Key Released +Return 152 +Key Pressed +Left 575 +Key Released +Left 184 +Key Pressed +Left 96 +Key Released +Left 128 +Key Pressed +Return 712 +Key Released +Return 144 +Key Pressed +Escape 248 +Key Released +Escape 152 +Key Pressed +Down 248 +Key Released +Down 128 +Key Pressed +Down 136 +Key Released +Down 136 +Key Pressed +Super_L 512 +Key Released +Super_L 136 +Key Pressed +Escape 624 +Key Released +Escape 160 +Key Pressed +Down 400 +Key Released +Down 112 +Key Pressed +Left 225 +Key Released +Left 183 +Key Pressed +Down 1001 +Key Released +Down 191 +Key Pressed +Right 304 +Key Released +Right 160 +Key Pressed +Right 792 +Key Released +Right 152 +Key Pressed +Right 120 +Key Released +Right 176 +Key Pressed +Right 96 +Key Released +Right 128 +Key Pressed +Up 232 +Key Released +Up 168 +Key Pressed +Up 248 +Key Released +Up 144 +Key Pressed +Down 193 +Key Released +Down 175 +Key Pressed +Right 32 +Key Released +Right 192 +Key Pressed +Up 48 +Key Released +Up 176 +Key Pressed +Down 352 +Key Released +Down 184 +Key Pressed +Right 56 +Key Released +Right 176 +Key Pressed +Up 64 +Key Released +Up 192 +Key Pressed +Down 113 +Key Released +Down 191 +Key Pressed +Up 88 +Key Released +Up 152 +Key Pressed +Left 80 +Key Released +Left 128 +Key Pressed +Left 80 +Key Released +Left 112 +Key Pressed +Down 113 +Key Released +Down 199 +Key Pressed +Up 120 +Key Released +Up 168 +Key Pressed +Right 64 +Key Released +Right 160 +Key Pressed +Down 72 +Key Released +Down 176 +Key Pressed +Up 88 +Key Released +Up 152 +Key Pressed +Right 33 +Key Released +Right 135 +Key Pressed +Down 81 +Key Released +Down 191 +Key Pressed +Up 80 +Key Released +Up 144 +Key Pressed +Left 65 +Key Released +Left 159 +Key Pressed +Return 146 +Key Released +Return 134 +Key Pressed +Down 264 +Key Released +Down 144 +Key Pressed +Return 155 +Key Released +Return 157 +Key Pressed +Return 250 +Key Released +Return 95 +Key Pressed +Down 200 +Key Released +Down 167 +Key Pressed +Return 162 +Key Released +Return 158 +Key Pressed +Down 408 +Key Released +Down 184 +Key Pressed +Down 152 +Key Released +Down 160 +Key Pressed +Super_L 1592 +Key Released +Super_L 136 +Key Pressed +Escape 816 +Key Released +Escape 136 +Key Pressed +Return 458 +Key Released +Return 190 +Key Pressed +Right 920 +Key Released +Right 144 +Key Pressed +Right 80 +Key Released +Right 152 +Key Pressed +Up 144 +Key Released +Up 185 +Key Pressed +Up 303 +Key Released +Up 192 +Key Pressed +Return 176 +Key Released +Return 128 +Key Pressed +Down 112 +Key Released +Down 168 +Key Pressed +Return 176 +Key Released +Return 144 +Key Pressed +Return 176 +Key Released +Return 152 +Key Pressed +Down 624 +Key Released +Down 144 +Key Pressed +Return 154 +Key Released +Return 174 +Key Pressed +Down 328 +Key Released +Down 160 +Key Pressed +Right 72 +Key Released +Right 136 +Key Pressed +Return 160 +Key Released +Return 128 +Key Pressed +Left 385 +Key Released +Left 143 +Key Pressed +Return 336 +Key Released +Return 152 +Key Pressed +Left 376 +Key Released +Left 144 +Key Pressed +Return 594 +Key Released +Return 142 +Key Pressed +Down 528 +Key Released +Down 168 +Key Pressed +Left 120 +Key Released +Left 128 +Key Pressed +Left 80 +Key Released +Left 128 +Key Pressed +Return 208 +Key Released +Return 152 +Key Pressed +Escape 184 +Key Released +Escape 144 +Key Pressed +Escape 792 +Key Released +Escape 176 +Key Pressed +Right 248 +Key Released +Right 144 +Key Pressed +Right 136 +Key Released +Right 176 +Key Pressed +Super_L 656 +Key Released +Super_L 144 +Key Pressed +Escape 872 +Key Released +Escape 168 +Key Pressed +Return 528 +Key Released +Return 160 +Key Pressed +Down 1032 +Key Released +Down 144 +Key Pressed +Left 104 +Key Released +Left 168 +Key Pressed +Left 136 +Key Released +Left 112 +Key Pressed +Return 200 +Key Released +Return 152 +Key Pressed +Escape 224 +Key Released +Escape 144 +Key Pressed +Down 568 +Key Released +Down 168 +Key Pressed +Down 312 +Key Released +Down 176 +Key Pressed +Left 192 +Key Released +Left 152 +Key Pressed +Left 128 +Key Released +Left 160 +Key Pressed +Down 153 +Key Released +Down 151 +Key Pressed +Right 312 +Key Released +Right 128 +Key Pressed +Return 1202 +Key Released +Return 182 +Key Pressed +Right 1321 +Key Released +Right 207 +Key Pressed +Down 272 +Key Released +Down 176 +Key Pressed +Right 193 +Key Released +Right 119 +Key Pressed +Right 209 +Key Released +Right 151 +Key Pressed +Left 328 +Key Released +Left 160 +Key Pressed +Left 832 +Key Released +Left 168 +Key Pressed +Return 1000 +Key Released +Return 144 +Key Pressed +Return 1066 +Key Released +Return 158 +Key Pressed +Right 1304 +Key Released +Right 96 +Key Pressed +Right 97 +Key Released +Right 167 +Key Pressed +Return 490 +Key Released +Return 158 +Key Pressed +Left 632 +Key Released +Left 184 +Key Pressed +Up 312 +Key Released +Up 128 +Key Pressed +Up 226 +Key Released +Up 150 +Key Pressed +Up 256 +Key Released +Up 152 +Key Pressed +Up 216 +Key Released +Up 152 +Key Pressed +Up 312 +Key Released +Up 152 +Key Pressed +Down 1000 +Key Released +Down 128 +Key Pressed +Down 288 +Key Released +Down 112 +Key Pressed +Down 800 +Key Released +Down 144 +Key Pressed +Down 225 +Key Released +Down 143 +Key Pressed +Right 280 +Key Released +Right 128 +Key Pressed +Super_L 576 +Key Released +Super_L 121 +Key Pressed +Escape 1111 +Key Released +Escape 153 +Key Pressed +Left 903 +Key Released +Left 160 +Key Pressed +Down 240 +Key Released +Down 176 +Key Pressed +Right 256 +Key Released +Right 120 +Key Pressed +Return 465 +Key Released +Return 95 +Key Pressed +Down 745 +Key Released +Down 119 +Key Pressed +Down 200 +Key Released +Down 128 +Key Pressed +Down 249 +Key Released +Down 151 +Key Pressed +Super_L 160 +Key Released +Super_L 112 +Key Pressed +Escape 1192 +Key Released +Escape 168 +Key Pressed +Left 785 +Key Released +Left 199 +Key Pressed +Up 480 +Key Released +Up 176 +Key Pressed +Up 504 +Key Released +Up 160 +Key Pressed +Up 384 +Key Released +Up 160 +Key Pressed +Up 321 +Key Released +Up 191 +Key Pressed +Up 296 +Key Released +Up 169 +Key Pressed +Right 1000 +Key Released +Right 144 +Key Pressed +Up 320 +Key Released +Up 152 +Key Pressed +Return 264 +Key Released +Return 104 +Key Pressed +Left 1984 +Key Released +Left 136 +Key Pressed +Left 208 +Key Released +Left 136 +Key Pressed +Return 264 +Key Released +Return 152 +Key Pressed +Escape 560 +Key Released +Escape 144 +Key Pressed +Down 456 +Key Released +Down 128 +Key Pressed +XF86AudioPlay 2208 +Key Released +XF86AudioPlay 250 +Key Pressed +Pause 882 +Key Released +Pause 248 +Key Pressed +XF86AudioPlay 675 +Key Released +XF86AudioPlay 250 +Key Pressed +XF86AudioPrev 676 +Key Released +XF86AudioPrev 249 +Key Pressed +XF86AudioNext 2280 +Key Released +XF86AudioNext 250 +Key Pressed +Pause 3875 +Key Released +Pause 375 +Key Pressed +Up 142 +Key Released +Up 176 +Key Pressed +Down 296 +Key Released +Down 192 +Key Pressed +Up 320 +Key Released +Up 176 +Key Pressed +Down 240 +Key Released +Down 144 +Key Pressed +Up 304 +Key Released +Up 176 +Key Pressed +Right 56 +Key Released +Right 128 +Key Pressed +Down 80 +Key Released +Down 217 +Key Pressed +Up 167 +Key Released +Up 200 +Key Pressed +Right 208 +Key Released +Right 168 +Key Pressed +Down 104 +Key Released +Down 200 +Key Pressed +Up 152 +Key Released +Up 184 +Key Pressed +Down 168 +Key Released +Down 184 +Key Pressed +Left 144 +Key Released +Left 176 +Key Pressed +Down 208 +Key Released +Down 184 +Key Pressed +Right 144 +Key Released +Right 168 +Key Pressed +Right 216 +Key Released +Right 144 +Key Pressed +Right 128 +Key Released +Right 168 +Key Pressed +Up 96 +Key Released +Up 192 +Key Pressed +Down 312 +Key Released +Down 144 +Key Pressed +Up 520 +Key Released +Up 192 +Key Pressed +Left 120 +Key Released +Left 136 +Key Pressed +Down 80 +Key Released +Down 208 +Key Pressed +Up 120 +Key Released +Up 224 +Key Pressed +Left 144 +Key Released +Left 136 +Key Pressed +Down 80 +Key Released +Down 192 +Key Pressed +Up 136 +Key Released +Up 176 +Key Pressed +Down 152 +Key Released +Down 168 +Key Pressed +Left 96 +Key Released +Left 152 +Key Pressed +Left 104 +Key Released +Left 120 +Key Pressed +Return 242 +Key Released +Return 150 +Key Pressed +Up 1232 +Key Released +Up 168 +Key Pressed +Down 160 +Key Released +Down 192 +Key Pressed +Right 48 +Key Released +Right 152 +Key Pressed +Up 112 +Key Released +Up 176 +Key Pressed +Down 104 +Key Released +Down 192 +Key Pressed +Right 392 +Key Released +Right 144 +Key Pressed +Up 88 +Key Released +Up 176 +Key Pressed +Down 96 +Key Released +Down 184 +Key Pressed +Left 272 +Key Released +Left 128 +Key Pressed +Left 104 +Key Released +Left 136 +Key Pressed +Escape 784 +Key Released +Escape 128 +Key Pressed +Escape 672 +Key Released +Escape 128 +Key Pressed +Down 280 +Key Released +Down 152 +Key Pressed +Right 192 +Key Released +Right 136 +Key Pressed +Right 976 +Key Released +Right 104 +Key Pressed +Up 304 +Key Released +Up 176 +Key Pressed +Down 272 +Key Released +Down 160 +Key Pressed +Up 640 +Key Released +Up 154 +Key Pressed +Left 190 +Key Released +Left 136 +Key Pressed +Down 106 +Key Released +Down 182 +Key Pressed +Up 112 +Key Released +Up 208 +Key Pressed +Down 336 +Key Released +Down 176 +Key Pressed +Right 248 +Key Released +Right 120 +Key Pressed +Up 120 +Key Released +Up 232 +Key Pressed +Left 336 +Key Released +Left 144 +Key Pressed +Down 80 +Key Released +Down 200 +Key Pressed +Up 104 +Key Released +Up 152 +Key Pressed +Down 168 +Key Released +Down 152 +Key Pressed +Return 538 +Key Released +Return 126 +Key Pressed +Up 848 +Key Released +Up 152 +Key Pressed +Down 120 +Key Released +Down 200 +Key Pressed +Right 64 +Key Released +Right 136 +Key Pressed +Up 88 +Key Released +Up 176 +Key Pressed +Down 136 +Key Released +Down 192 +Key Pressed +Right 104 +Key Released +Right 120 +Key Pressed +Up 120 +Key Released +Up 208 +Key Pressed +Down 128 +Key Released +Down 200 +Key Pressed +Left 112 +Key Released +Left 136 +Key Pressed +Left 120 +Key Released +Left 128 +Key Pressed +Escape 240 +Key Released +Escape 120 +Key Pressed +Escape 720 +Key Released +Escape 136 +Key Pressed +Down 288 +Key Released +Down 176 +Key Pressed +Right 248 +Key Released +Right 128 +Key Pressed +Return 512 +Key Released +Return 144 +Key Pressed +Up 866 +Key Released +Up 134 +Key Pressed +Down 120 +Key Released +Down 152 +Key Pressed +Right 88 +Key Released +Right 120 +Key Pressed +Up 120 +Key Released +Up 160 +Key Pressed +Down 128 +Key Released +Down 178 +Key Pressed +Right 94 +Key Released +Right 144 +Key Pressed +Up 104 +Key Released +Up 160 +Key Pressed +Down 104 +Key Released +Down 168 +Key Pressed +Left 96 +Key Released +Left 120 +Key Pressed +Left 144 +Key Released +Left 128 +Key Pressed +Down 360 +Key Released +Down 160 +Key Pressed +Return 288 +Key Released +Return 136 +Key Pressed +Up 824 +Key Released +Up 128 +Key Pressed +Down 160 +Key Released +Down 200 +Key Pressed +Right 64 +Key Released +Right 144 +Key Pressed +Up 112 +Key Released +Up 168 +Key Pressed +Down 136 +Key Released +Down 176 +Key Pressed +Right 96 +Key Released +Right 120 +Key Pressed +Up 104 +Key Released +Up 144 +Key Pressed +Down 112 +Key Released +Down 184 +Key Pressed +Left 112 +Key Released +Left 160 +Key Pressed +Left 72 +Key Released +Left 144 +Key Pressed +Escape 120 +Key Released +Escape 136 +Key Pressed +Escape 592 +Key Released +Escape 128 +Key Pressed +Down 1144 +Key Released +Down 152 +Key Pressed +Right 320 +Key Released +Right 112 +Key Pressed +Right 240 +Key Released +Right 128 +Key Pressed +Right 120 +Key Released +Right 112 +Key Pressed +Up 120 +Key Released +Up 144 +Key Pressed +Up 128 +Key Released +Up 160 +Key Pressed +Down 184 +Key Released +Down 168 +Key Pressed +Right 64 +Key Released +Right 176 +Key Pressed +Up 64 +Key Released +Up 184 +Key Pressed +Down 112 +Key Released +Down 176 +Key Pressed +Right 72 +Key Released +Right 184 +Key Pressed +Up 56 +Key Released +Up 160 +Key Pressed +Down 104 +Key Released +Down 184 +Key Pressed +Left 80 +Key Released +Left 160 +Key Pressed +Up 56 +Key Released +Up 184 +Key Pressed +Right 88 +Key Released +Right 160 +Key Pressed +Left 152 +Key Released +Left 128 +Key Pressed +Down 120 +Key Released +Down 216 +Key Pressed +Up 88 +Key Released +Up 160 +Key Pressed +Left 72 +Key Released +Left 152 +Key Pressed +Down 72 +Key Released +Down 192 +Key Pressed +Down 232 +Key Released +Down 184 +Key Pressed +Return 514 +Key Released +Return 150 +Key Pressed +Right 816 +Key Released +Right 120 +Key Pressed +Right 120 +Key Released +Right 144 +Key Pressed +Up 152 +Key Released +Up 184 +Key Pressed +Up 72 +Key Released +Up 176 +Key Pressed +Right 128 +Key Released +Right 144 +Key Pressed +Down 120 +Key Released +Down 160 +Key Pressed +Left 104 +Key Released +Left 160 +Key Pressed +Right 176 +Key Released +Right 136 +Key Pressed +Right 98 +Key Released +Right 134 +Key Pressed +Up 96 +Key Released +Up 160 +Key Pressed +Left 312 +Key Released +Left 152 +Key Pressed +Right 72 +Key Released +Right 120 +Key Pressed +Down 104 +Key Released +Down 176 +Key Pressed +Up 96 +Key Released +Up 136 +Key Pressed +Left 72 +Key Released +Left 152 +Key Pressed +Down 80 +Key Released +Down 216 +Key Pressed +Left 80 +Key Released +Left 160 +Key Pressed +Up 72 +Key Released +Up 152 +Key Pressed +Down 112 +Key Released +Down 184 +Key Pressed +Down 72 +Key Released +Down 176 +Key Pressed +Left 328 +Key Released +Left 128 +Key Pressed +Left 152 +Key Released +Left 128 +Key Pressed +Right 608 +Key Released +Right 136 +Key Pressed +Escape 448 +Key Released +Escape 160 +Key Pressed +Escape 608 +Key Released +Escape 144 +Key Pressed +Down 320 +Key Released +Down 184 +Key Pressed +Up 248 +Key Released +Up 128 +Key Pressed +Up 144 +Key Released +Up 144 +Key Pressed +Up 128 +Key Released +Up 128 +Key Pressed +Up 160 +Key Released +Up 128 +Key Pressed +Up 216 +Key Released +Up 136 +Key Pressed +Right 1000 +Key Released +Right 128 +Key Pressed +Super_L 968 +Key Released +Super_L 128 +Key Pressed +Left 1296 +Key Released +Left 160 +Key Pressed +Left 656 +Key Released +Left 192 +Key Pressed +Return 368 +Key Released +Return 152 +Key Pressed +Super_L 1120 +Key Released +Super_L 168 +Key Pressed +Left 536 +Key Released +Left 168 +Key Pressed +Left 272 +Key Released +Left 176 +Key Pressed +Left 288 +Key Released +Left 152 +Key Pressed +Return 488 +Key Released +Return 192 +Key Pressed +Super_L 1040 +Key Released +Super_L 152 +Key Pressed +Return 728 +Key Released +Return 144 +Key Pressed +Left 1632 +Key Released +Left 144 +Key Pressed +Left 192 +Key Released +Left 152 +Key Pressed +Return 280 +Key Released +Return 160 +Key Pressed +Escape 440 +Key Released +Escape 152 +Key Pressed +Escape 896 +Key Released +Escape 176 +Key Pressed +Super_L 1304 +Key Released +Super_L 128 +Key Pressed +Down 512 +Key Released +Down 168 +Key Pressed +Return 440 +Key Released +Return 184 +Key Pressed +Escape 968 +Key Released +Escape 176 +Key Pressed +Left 1000 +Key Released +Left 144 +Key Pressed +Down 264 +Key Released +Down 192 +Key Pressed +Right 352 +Key Released +Right 144 +Key Pressed +Super_L 456 +Key Released +Super_L 152 +Key Pressed +Left 696 +Key Released +Left 160 +Key Pressed +Left 384 +Key Released +Left 137 +Key Pressed +Return 695 +Key Released +Return 176 +Key Pressed +Super_L 1144 +Key Released +Super_L 152 +Key Pressed +Left 704 +Key Released +Left 152 +Key Pressed +Left 296 +Key Released +Left 200 +Key Pressed +Left 240 +Key Released +Left 144 +Key Pressed +Return 416 +Key Released +Return 208 +Key Pressed +Super_L 1080 +Key Released +Super_L 160 +Key Pressed +Left 544 +Key Released +Left 144 +Key Pressed +Left 288 +Key Released +Left 184 +Key Pressed +Left 264 +Key Released +Left 208 +Key Pressed +Left 248 +Key Released +Left 120 +Key Pressed +Return 440 +Key Released +Return 208 +Key Pressed +Left 832 +Key Released +Left 128 +Key Pressed +Left 224 +Key Released +Left 152 +Key Pressed +Return 696 +Key Released +Return 168 +Key Pressed +Escape 472 +Key Released +Escape 120 +Key Pressed +Down 488 +Key Released +Down 136 +Key Pressed +Return 528 +Key Released +Return 216 +Key Pressed +Down 432 +Key Released +Down 136 +Key Pressed +Return 512 +Key Released +Return 192 +Key Pressed +Escape 760 +Key Released +Escape 144 +Key Pressed +Return 1240 +Key Released +Return 128 +Key Pressed +Down 720 +Key Released +Down 112 +Key Pressed +Super_L 272 +Key Released +Super_L 120 +Key Pressed +Left 592 +Key Released +Left 152 +Key Pressed +Left 224 +Key Released +Left 144 +Key Pressed +Return 416 +Key Released +Return 176 +Key Pressed +Super_L 1144 +Key Released +Super_L 184 +Key Pressed +Left 416 +Key Released +Left 168 +Key Pressed +Left 224 +Key Released +Left 192 +Key Pressed +Left 240 +Key Released +Left 136 +Key Pressed +Return 432 +Key Released +Return 192 +Key Pressed +Super_L 1448 +Key Released +Super_L 160 +Key Pressed +Left 440 +Key Released +Left 152 +Key Pressed +Left 296 +Key Released +Left 176 +Key Pressed +Left 240 +Key Released +Left 176 +Key Pressed +Left 187 +Key Released +Left 149 +Key Pressed +Return 280 +Key Released +Return 176 +Key Pressed +Left 2048 +Key Released +Left 136 +Key Pressed +Left 56 +Key Released +Left 128 +Key Pressed +Return 280 +Key Released +Return 176 +Key Pressed +Escape 248 +Key Released +Escape 160 +Key Pressed +Down 456 +Key Released +Down 144 +Key Pressed +Return 328 +Key Released +Return 176 +Key Pressed +Escape 800 +Key Released +Escape 176 +Key Pressed +Left 1432 +Key Released +Left 160 +Key Pressed +Down 304 +Key Released +Down 96 +Key Pressed +Right 344 +Key Released +Right 160 +Key Pressed +Super_L 368 +Key Released +Super_L 160 +Key Pressed +Right 528 +Key Released +Right 160 +Key Pressed +Right 336 +Key Released +Right 128 +Key Pressed +Left 2184 +Key Released +Left 184 +Key Pressed +Left 216 +Key Released +Left 160 +Key Pressed +Left 200 +Key Released +Left 176 +Key Pressed +Left 160 +Key Released +Left 176 +Key Pressed +Return 520 +Key Released +Return 176 +Key Pressed +Super_L 1064 +Key Released +Super_L 168 +Key Pressed +Left 464 +Key Released +Left 160 +Key Pressed +Left 192 +Key Released +Left 184 +Key Pressed +Left 168 +Key Released +Left 160 +Key Pressed +Return 776 +Key Released +Return 192 +Key Pressed +Super_L 752 +Key Released +Super_L 168 +Key Pressed +Return 1184 +Key Released +Return 176 +Key Pressed +Down 872 +Key Released +Down 144 +Key Pressed +Left 80 +Key Released +Left 136 +Key Pressed +Left 128 +Key Released +Left 112 +Key Pressed +Return 256 +Key Released +Return 168 +Key Pressed +Escape 280 +Key Released +Escape 176 +Key Pressed +Down 448 +Key Released +Down 136 +Key Pressed +Return 224 +Key Released +Return 184 +Key Pressed +Down 352 +Key Released +Down 144 +Key Pressed +Return 384 +Key Released +Return 200 +Key Pressed +Escape 712 +Key Released +Escape 128 +Key Pressed +Return 1056 +Key Released +Return 184 +Key Pressed +Down 632 +Key Released +Down 144 +Key Pressed +Super_L 168 +Key Released +Super_L 168 +Key Pressed +Left 528 +Key Released +Left 160 +Key Pressed +Left 224 +Key Released +Left 192 +Key Pressed +Return 424 +Key Released +Return 208 +Key Pressed +Super_L 1096 +Key Released +Super_L 192 +Key Pressed +Left 496 +Key Released +Left 176 +Key Pressed +Left 208 +Key Released +Left 192 +Key Pressed +Left 248 +Key Released +Left 168 +Key Pressed +Return 736 +Key Released +Return 200 +Key Pressed +Super_L 1288 +Key Released +Super_L 176 +Key Pressed +Left 464 +Key Released +Left 184 +Key Pressed +Left 240 +Key Released +Left 192 +Key Pressed +Left 168 +Key Released +Left 192 +Key Pressed +Left 184 +Key Released +Left 144 +Key Pressed +Return 568 +Key Released +Return 176 +Key Pressed +Left 888 +Key Released +Left 152 +Key Pressed +Left 64 +Key Released +Left 136 +Key Pressed +Return 728 +Key Released +Return 184 +Key Pressed +Escape 528 +Key Released +Escape 168 +Key Pressed +Down 392 +Key Released +Down 152 +Key Pressed +Return 576 +Key Released +Return 192 +Key Pressed +Escape 776 +Key Released +Escape 184 +Key Pressed +Escape 1672 +Key Released +Escape 168 +Key Pressed +Left 1304 +Key Released +Left 168 +Key Pressed +Down 488 +Key Released +Down 168 +Key Pressed +Right 232 +Key Released +Right 136 +Key Pressed +Super_L 584 +Key Released +Super_L 160 +Key Pressed +Left 736 +Key Released +Left 168 +Key Pressed +Left 200 +Key Released +Left 152 +Key Pressed +Return 352 +Key Released +Return 176 +Key Pressed +Super_L 1368 +Key Released +Super_L 192 +Key Pressed +Left 472 +Key Released +Left 160 +Key Pressed +Left 232 +Key Released +Left 176 +Key Pressed +Left 200 +Key Released +Left 144 +Key Pressed +Return 368 +Key Released +Return 192 +Key Pressed +Super_L 1128 +Key Released +Super_L 168 +Key Pressed +Left 552 +Key Released +Left 168 +Key Pressed +Left 232 +Key Released +Left 176 +Key Pressed +Left 200 +Key Released +Left 176 +Key Pressed +Left 168 +Key Released +Left 128 +Key Pressed +Return 352 +Key Released +Return 184 +Key Pressed +Left 680 +Key Released +Left 168 +Key Pressed +Left 168 +Key Released +Left 136 +Key Pressed +Return 888 +Key Released +Return 184 +Key Pressed +Escape 472 +Key Released +Escape 168 +Key Pressed +Down 1520 +Key Released +Down 144 +Key Pressed +Return 176 +Key Released +Return 193 +Key Pressed +Down 351 +Key Released +Down 168 +Key Pressed +Return 656 +Key Released +Return 216 +Key Pressed +Escape 688 +Key Released +Escape 152 +Key Pressed +Return 648 +Key Released +Return 168 +Key Pressed +Down 736 +Key Released +Down 152 +Key Pressed +Super_L 288 +Key Released +Super_L 152 +Key Pressed +Left 584 +Key Released +Left 168 +Key Pressed +Left 224 +Key Released +Left 128 +Key Pressed +Return 336 +Key Released +Return 208 +Key Pressed +Super_L 1456 +Key Released +Super_L 160 +Key Pressed +Left 560 +Key Released +Left 168 +Key Pressed +Left 184 +Key Released +Left 193 +Key Pressed +Left 175 +Key Released +Left 144 +Key Pressed +Return 656 +Key Released +Return 176 +Key Pressed +Super_L 1672 +Key Released +Super_L 160 +Key Pressed +Return 576 +Key Released +Return 192 +Key Pressed +Left 696 +Key Released +Left 136 +Key Pressed +Left 152 +Key Released +Left 136 +Key Pressed +Return 464 +Key Released +Return 152 +Key Pressed +Escape 464 +Key Released +Escape 144 +Key Pressed +Down 784 +Key Released +Down 152 +Key Pressed +Return 304 +Key Released +Return 192 +Key Pressed +Down 416 +Key Released +Down 120 +Key Pressed +Return 448 +Key Released +Return 208 +Key Pressed +Escape 752 +Key Released +Escape 144 +Key Pressed +Return 888 +Key Released +Return 160 +Key Pressed +Down 688 +Key Released +Down 152 +Key Pressed +Super_L 144 +Key Released +Super_L 168 +Key Pressed +Left 496 +Key Released +Left 160 +Key Pressed +Left 256 +Key Released +Left 120 +Key Pressed +Return 408 +Key Released +Return 192 +Key Pressed +Super_L 1144 +Key Released +Super_L 176 +Key Pressed +Left 552 +Key Released +Left 152 +Key Pressed +Left 256 +Key Released +Left 168 +Key Pressed +Left 208 +Key Released +Left 168 +Key Pressed +Return 440 +Key Released +Return 184 +Key Pressed +Super_L 1032 +Key Released +Super_L 168 +Key Pressed +Return 752 +Key Released +Return 184 +Key Pressed +Left 792 +Key Released +Left 128 +Key Pressed +Left 104 +Key Released +Left 120 +Key Pressed +Return 232 +Key Released +Return 168 +Key Pressed +Escape 256 +Key Released +Escape 144 +Key Pressed +Down 504 +Key Released +Down 128 +Key Pressed +Return 328 +Key Released +Return 184 +Key Pressed +Escape 680 +Key Released +Escape 152 +Key Pressed +Escape 1160 +Key Released +Escape 152 +Key Pressed +Left 1576 +Key Released +Left 160 +Key Pressed +Down 480 +Key Released +Down 136 +Key Pressed +Right 656 +Key Released +Right 136 +Key Pressed +Super_L 265 +Key Released +Super_L 159 +Key Pressed +Left 592 +Key Released +Left 144 +Key Pressed +Left 160 +Key Released +Left 144 +Key Pressed +Return 561 +Key Released +Return 191 +Key Pressed +Super_L 1320 +Key Released +Super_L 184 +Key Pressed +Left 408 +Key Released +Left 176 +Key Pressed +Left 184 +Key Released +Left 192 +Key Pressed +Left 232 +Key Released +Left 144 +Key Pressed +Return 512 +Key Released +Return 176 +Key Pressed +Super_L 1360 +Key Released +Super_L 176 +Key Pressed +Left 368 +Key Released +Left 176 +Key Pressed +Left 192 +Key Released +Left 192 +Key Pressed +Left 232 +Key Released +Left 176 +Key Pressed +Left 208 +Key Released +Left 160 +Key Pressed +Return 464 +Key Released +Return 184 +Key Pressed +Left 824 +Key Released +Left 168 +Key Pressed +Left 176 +Key Released +Left 144 +Key Pressed +Return 504 +Key Released +Return 160 +Key Pressed +Escape 464 +Key Released +Escape 152 +Key Pressed +Escape 1184 +Key Released +Escape 144 +Key Pressed +Return 688 +Key Released +Return 200 +Key Pressed +Super_L 840 +Key Released +Super_L 136 +Key Pressed +Left 600 +Key Released +Left 160 +Key Pressed +Left 168 +Key Released +Left 184 +Key Pressed +Return 408 +Key Released +Return 192 +Key Pressed +Super_L 1040 +Key Released +Super_L 168 +Key Pressed +Left 496 +Key Released +Left 176 +Key Pressed +Left 200 +Key Released +Left 200 +Key Pressed +Left 200 +Key Released +Left 160 +Key Pressed +Return 456 +Key Released +Return 192 +Key Pressed +Super_L 1536 +Key Released +Super_L 152 +Key Pressed +Left 440 +Key Released +Left 184 +Key Pressed +Left 160 +Key Released +Left 184 +Key Pressed +Left 192 +Key Released +Left 192 +Key Pressed +Left 163 +Key Released +Left 133 +Key Pressed +Return 416 +Key Released +Return 200 +Key Pressed +Left 648 +Key Released +Left 160 +Key Pressed +Left 160 +Key Released +Left 128 +Key Pressed +Return 352 +Key Released +Return 136 +Key Pressed +Escape 376 +Key Released +Escape 168 +Key Pressed +Down 552 +Key Released +Down 160 +Key Pressed +Return 512 +Key Released +Return 184 +Key Pressed +Escape 1032 +Key Released +Escape 152 +Key Pressed +Left 744 +Key Released +Left 192 +Key Pressed +Down 504 +Key Released +Down 160 +Key Pressed +Up 680 +Key Released +Up 168 +Key Pressed +Up 368 +Key Released +Up 152 +Key Pressed +Up 392 +Key Released +Up 168 +Key Pressed +Up 304 +Key Released +Up 176 +Key Pressed +Up 384 +Key Released +Up 168 +Key Pressed +Down 1000 +Key Released +Down 144 +Key Pressed +Down 224 +Key Released +Down 144 +Key Pressed +Down 240 +Key Released +Down 168 +Key Pressed +Right 216 +Key Released +Right 152 +Key Pressed +Right 152 +Key Released +Right 144 +Key Pressed +Up 176 +Key Released +Up 152 +Key Pressed +Right 152 +Key Released +Right 128 +Key Pressed +Return 195 +Key Released +Return 109 +Key Pressed +Down 232 +Key Released +Down 88 +Key Pressed +Return 224 +Key Released +Return 128 +Key Pressed +Return 244 +Key Released +Return 116 +Key Pressed +Return 264 +Key Released +Return 112 +Key Pressed +Left 400 +Key Released +Left 112 +Key Pressed +Down 160 +Key Released +Down 152 +Key Pressed +Left 272 +Key Released +Left 152 +Key Pressed +Up 224 +Key Released +Up 152 +Key Pressed +Up 200 +Key Released +Up 144 +Key Pressed +Up 280 +Key Released +Up 128 +Key Pressed +Right 1000 +Key Released +Right 135 +Mouse Move +594 911 524 +Mouse Move +677 869 12 +Mouse Move +706 859 16 +Mouse Move +729 852 13 +Mouse Move +747 846 17 +Mouse Move +766 843 15 +Mouse Move +783 841 17 +Mouse Move +796 840 16 +Mouse Move +808 836 16 +Mouse Move +823 827 16 +Mouse Move +840 813 14 +Mouse Move +867 799 15 +Mouse Move +899 792 17 +Mouse Move +937 791 15 +Mouse Move +960 795 16 +Mouse Move +968 794 16 +Mouse Move +970 791 14 +Mouse Move +969 784 16 +Mouse Move +968 770 18 +Mouse Move +968 748 15 +Mouse Move +973 717 15 +Mouse Move +978 680 18 +Mouse Move +986 639 15 +Mouse Move +990 575 22 +Mouse Move +989 536 18 +Mouse Move +987 502 13 +Mouse Move +986 470 17 +Mouse Move +987 442 16 +Mouse Move +988 420 15 +Mouse Move +988 406 14 +Mouse Move +989 399 17 +Mouse Move +989 397 16 +Mouse Move +992 393 56 +Mouse Move +999 382 13 +Mouse Move +1009 365 16 +Mouse Move +1019 345 16 +Mouse Move +1030 321 17 +Mouse Move +1046 292 15 +Mouse Move +1070 256 17 +Mouse Move +1093 226 15 +Mouse Move +1113 196 14 +Mouse Move +1129 176 17 +Mouse Move +1138 162 16 +Mouse Move +1147 150 15 +Mouse Move +1157 140 16 +Mouse Move +1168 133 17 +Mouse Move +1173 130 13 +Mouse Move +1175 130 17 +Mouse Move +1178 135 15 +Mouse Move +1181 146 16 +Mouse Move +1185 156 16 +Mouse Move +1194 164 16 +Mouse Move +1206 170 16 +Mouse Move +1218 172 14 +Mouse Move +1232 173 16 +Mouse Move +1250 170 16 +Mouse Move +1268 164 16 +Mouse Move +1285 157 16 +Mouse Move +1301 151 16 +Mouse Move +1318 145 16 +Mouse Move +1343 138 15 +Mouse Move +1369 135 16 +Mouse Move +1396 131 15 +Mouse Move +1425 129 17 +Mouse Move +1459 128 16 +Mouse Move +1491 132 15 +Mouse Move +1521 133 14 +Mouse Move +1547 133 17 +Mouse Move +1568 135 15 +Mouse Move +1588 137 16 +Mouse Move +1606 138 16 +Mouse Move +1621 137 16 +Mouse Move +1631 135 16 +Mouse Move +1635 133 14 +Mouse Move +1628 133 110 +Mouse Move +1590 137 24 +Mouse Move +1558 138 16 +Mouse Move +1514 141 16 +Mouse Move +1460 136 16 +Mouse Move +1397 128 15 +Mouse Move +1334 128 15 +Mouse Move +1250 134 24 +Mouse Move +1198 136 16 +Mouse Move +1153 136 16 +Mouse Move +1110 136 16 +Mouse Move +1072 137 14 +Mouse Move +1043 139 17 +Mouse Move +1023 142 15 +Mouse Move +1009 146 16 +Mouse Move +999 153 16 +Mouse Move +976 174 38 +Mouse Move +966 182 16 +Mouse Move +959 190 16 +Mouse Move +951 199 16 +Mouse Move +939 208 16 +Mouse Move +924 219 16 +Mouse Move +911 228 16 +Mouse Move +902 234 14 +Mouse Move +895 239 17 +Mouse Move +888 245 15 +Mouse Move +881 252 16 +Mouse Move +875 258 16 +Mouse Move +869 264 16 +Mouse Move +863 270 14 +Mouse Move +857 275 16 +Mouse Move +852 281 16 +Mouse Move +846 287 17 +Mouse Move +840 292 15 +Mouse Move +838 294 16 +Mouse Move +836 292 188 +Mouse Move +834 291 16 +Mouse Move +831 290 16 +Mouse Move +826 289 14 +Mouse Move +812 290 32 +Mouse Move +809 290 16 +Mouse Move +807 291 32 +Key Pressed +Return 723 +Mouse Move +839 313 54 +Mouse Move +860 329 16 +Mouse Move +871 338 15 +Mouse Move +878 345 16 +Mouse Move +881 349 17 +Key Released +Return 11 +Mouse Move +883 350 1213 +Mouse Move +892 351 437 +Mouse Move +916 351 16 +Mouse Move +953 350 16 +Mouse Move +990 348 16 +Mouse Move +1020 344 16 +Mouse Move +1040 338 16 +Mouse Move +1058 336 18 +Mouse Move +1075 334 12 +Mouse Move +1090 329 16 +Mouse Move +1105 321 16 +Mouse Move +1120 308 17 +Mouse Move +1136 291 16 +Mouse Move +1153 271 15 +Mouse Move +1170 256 16 +Mouse Move +1181 249 15 +Mouse Move +1185 245 16 +Mouse Move +1185 251 56 +Mouse Move +1180 278 15 +Mouse Move +1171 311 15 +Mouse Move +1158 346 15 +Mouse Move +1146 379 17 +Mouse Move +1138 408 15 +Mouse Move +1132 436 16 +Mouse Move +1125 460 17 +Mouse Move +1119 482 13 +Mouse Move +1112 504 16 +Mouse Move +1101 528 16 +Mouse Move +1091 553 17 +Mouse Move +1083 579 15 +Mouse Move +1075 605 17 +Mouse Move +1068 631 13 +Mouse Move +1056 657 17 +Mouse Move +1046 681 16 +Mouse Move +1036 700 16 +Mouse Move +1028 711 16 +Mouse Move +1017 713 15 +Mouse Move +1007 712 17 +Mouse Move +995 714 13 +Mouse Move +982 723 16 +Mouse Move +962 740 16 +Mouse Move +933 759 16 +Mouse Move +901 776 16 +Mouse Move +868 783 16 +Mouse Move +811 770 22 +Mouse Move +770 758 17 +Mouse Move +731 753 15 +Mouse Move +697 756 16 +Mouse Move +668 762 16 +Mouse Move +642 768 17 +Mouse Move +621 770 13 +Mouse Move +600 772 17 +Mouse Move +582 777 15 +Mouse Move +563 784 17 +Mouse Move +546 790 15 +Mouse Move +531 798 16 +Mouse Move +521 808 23 +Mouse Move +518 825 15 +Mouse Move +519 835 17 +Mouse Move +521 844 15 +Mouse Move +522 847 16 +Mouse Move +540 858 70 +Mouse Move +562 868 16 +Mouse Move +581 877 16 +Mouse Move +597 887 16 +Mouse Move +613 899 16 +Mouse Move +629 906 14 +Mouse Move +643 907 17 +Mouse Move +648 906 16 +Mouse Move +649 904 102 +Mouse Move +646 902 15 +Mouse Move +637 903 16 +Mouse Move +623 905 17 +Mouse Move +606 907 15 +Mouse Move +584 908 14 +Mouse Move +561 909 16 +Mouse Move +534 911 17 +Mouse Move +503 915 16 +Mouse Move +467 916 16 +Mouse Move +429 919 16 +Mouse Move +391 917 14 +Mouse Move +351 917 15 +Mouse Move +315 919 17 +Mouse Move +280 918 15 +Mouse Move +256 919 16 +Mouse Move +238 920 17 +Mouse Move +226 921 16 +Mouse Move +214 923 13 +Mouse Move +196 925 17 +Mouse Move +173 925 16 +Mouse Move +153 923 16 +Mouse Move +137 922 16 +Mouse Move +121 924 16 +Mouse Move +109 926 14 +Mouse Move +98 928 16 +Mouse Move +87 930 15 +Mouse Move +74 932 16 +Mouse Move +63 933 16 +Mouse Move +54 933 17 +Mouse Move +49 932 15 +Mouse Move +46 932 22 +Mouse Move +55 930 56 +Mouse Move +73 928 16 +Mouse Move +100 925 17 +Mouse Move +131 923 14 +Mouse Move +161 922 15 +Mouse Move +197 924 16 +Mouse Move +232 923 16 +Mouse Move +265 921 17 +Mouse Move +295 917 15 +Mouse Move +322 915 14 +Mouse Move +346 914 17 +Mouse Move +364 912 15 +Mouse Move +371 910 17 +Mouse Move +370 908 15 +Mouse Move +361 902 16 +Mouse Move +343 895 14 +Mouse Move +317 887 17 +Mouse Move +290 881 15 +Mouse Move +267 876 16 +Mouse Move +247 873 16 +Mouse Move +228 872 16 +Mouse Move +213 870 18 +Mouse Move +203 868 13 +Mouse Move +199 866 15 +Mouse Move +197 864 16 +Mouse Move +195 859 17 +Mouse Move +191 853 15 +Mouse Move +186 850 17 +Mouse Move +183 848 15 +Mouse Move +178 848 14 +Mouse Move +170 848 16 +Mouse Move +157 849 16 +Mouse Move +138 848 16 +Mouse Move +117 841 16 +Mouse Move +100 837 18 +Mouse Move +88 836 12 +Mouse Move +80 838 16 +Mouse Move +72 843 16 +Mouse Move +64 850 16 +Mouse Move +56 857 16 +Mouse Move +50 862 16 +Mouse Move +50 863 38 +Mouse Move +64 863 16 +Mouse Move +89 864 16 +Mouse Move +124 870 17 +Mouse Move +155 872 15 +Mouse Move +198 879 22 +Mouse Move +229 881 16 +Mouse Move +265 882 16 +Mouse Move +309 883 16 +Mouse Move +356 886 16 +Mouse Move +388 887 16 +Mouse Move +416 893 23 +Mouse Move +431 899 15 +Mouse Move +448 905 17 +Mouse Move +464 909 16 +Mouse Move +477 912 15 +Mouse Move +483 914 17 +Mouse Move +486 918 21 +Mouse Move +490 924 16 +Mouse Move +498 927 16 +Mouse Move +509 929 17 +Mouse Move +517 930 15 +Mouse Move +519 930 16 +Mouse Move +525 932 46 +Mouse Move +538 933 16 +Mouse Move +550 933 16 +Mouse Move +555 931 16 +Mouse Move +556 929 30 +Mouse Move +557 927 16 +Mouse Move +559 922 16 +Mouse Move +561 917 16 +Mouse Move +562 915 16 +Mouse Move +563 913 79 +Mouse Move +564 911 23 +Mouse Move +564 909 16 +Mouse Move +564 907 22 +Mouse Move +562 908 24 +Mouse Move +560 910 16 +Mouse Move +558 912 16 +Mouse Move +556 914 16 +Mouse Move +553 915 16 +Mouse Move +551 916 14 +Mouse Pressed +550 916 0 1 143 +Mouse Released +550 916 256 1 171 +Mouse Move +554 916 449 +Mouse Move +562 916 15 +Mouse Move +568 916 16 +Mouse Move +574 917 19 +Mouse Move +579 917 11 +Mouse Move +582 917 16 +Mouse Move +587 917 16 +Mouse Move +592 917 16 +Mouse Move +598 916 16 +Mouse Move +607 916 16 +Mouse Move +618 916 16 +Mouse Move +630 918 15 +Mouse Move +640 919 15 +Mouse Move +647 919 16 +Mouse Move +650 919 16 +Mouse Move +650 920 2048 +Mouse Move +648 921 16 +Mouse Move +646 922 16 +Key Pressed +Escape 288 +Key Released +Escape 144 +Mouse Move +649 921 377 +Mouse Move +654 921 15 +Mouse Move +659 919 17 +Mouse Move +667 917 16 +Mouse Move +680 915 13 +Mouse Move +697 913 16 +Mouse Move +711 913 16 +Mouse Move +719 914 20 +Mouse Move +723 913 20 +Mouse Move +728 911 16 +Mouse Move +734 906 14 +Mouse Move +742 900 16 +Mouse Move +750 894 16 +Mouse Move +756 885 16 +Mouse Move +759 872 24 +Mouse Move +759 864 18 +Mouse Move +758 852 12 +Mouse Move +756 832 16 +Mouse Move +754 806 17 +Mouse Move +748 779 15 +Mouse Move +742 751 16 +Mouse Move +735 728 17 +Mouse Move +725 709 16 +Mouse Move +713 690 13 +Mouse Move +699 667 17 +Mouse Move +686 640 15 +Mouse Move +679 613 16 +Mouse Move +677 595 16 +Mouse Move +676 579 16 +Mouse Move +677 566 14 +Mouse Move +678 557 16 +Mouse Move +678 549 18 +Mouse Move +678 539 15 +Mouse Move +676 527 15 +Mouse Move +672 514 16 +Mouse Move +664 502 16 +Mouse Move +654 490 15 +Mouse Move +641 477 16 +Mouse Move +626 467 16 +Mouse Move +616 461 15 +Mouse Move +608 459 17 +Mouse Move +601 458 16 +Mouse Move +595 458 14 +Mouse Move +586 456 16 +Mouse Move +573 451 16 +Mouse Move +556 445 15 +Mouse Move +540 442 16 +Mouse Move +526 440 16 +Mouse Move +515 438 16 +Mouse Move +504 435 14 +Mouse Move +491 428 16 +Mouse Move +477 421 16 +Mouse Move +460 415 16 +Mouse Move +440 410 16 +Mouse Move +419 406 16 +Mouse Move +396 404 14 +Mouse Move +376 401 17 +Mouse Move +360 400 18 +Mouse Move +347 399 14 +Mouse Move +335 397 15 +Mouse Move +324 395 17 +Mouse Move +317 393 16 +Mouse Move +312 391 13 +Mouse Move +309 389 17 +Mouse Move +304 387 15 +Mouse Move +297 385 18 +Mouse Move +289 383 14 +Mouse Move +281 381 16 +Mouse Move +274 379 14 +Mouse Move +270 377 16 +Mouse Move +270 376 86 +Mouse Move +277 376 16 +Mouse Move +288 376 16 +Mouse Move +309 377 16 +Mouse Move +340 378 16 +Mouse Move +379 380 16 +Mouse Move +418 382 16 +Mouse Move +454 386 15 +Mouse Move +477 388 16 +Mouse Move +496 394 16 +Mouse Move +512 398 17 +Mouse Move +526 401 15 +Mouse Move +541 403 15 +Mouse Move +560 403 14 +Mouse Move +584 400 17 +Mouse Move +616 396 16 +Mouse Move +651 393 15 +Mouse Move +703 396 24 +Mouse Move +737 396 16 +Mouse Move +770 395 15 +Mouse Move +797 395 15 +Mouse Move +819 393 16 +Mouse Move +837 395 16 +Mouse Move +870 397 24 +Mouse Move +897 396 17 +Mouse Move +925 393 14 +Mouse Move +948 391 16 +Mouse Move +973 388 16 +Mouse Move +995 386 15 +Mouse Move +1016 385 25 +Mouse Move +1022 383 16 +Mouse Move +1027 382 13 +Mouse Move +1036 380 16 +Mouse Move +1052 378 17 +Mouse Move +1075 378 15 +Mouse Move +1101 379 17 +Mouse Move +1128 381 16 +Mouse Move +1152 382 13 +Mouse Move +1170 378 17 +Mouse Move +1181 376 16 +Mouse Move +1186 374 15 +Mouse Move +1192 370 18 +Mouse Move +1201 365 14 +Mouse Move +1213 363 16 +Mouse Move +1225 361 14 +Mouse Move +1231 359 16 +Mouse Move +1233 358 16 +Mouse Move +1227 353 57 +Mouse Move +1215 344 13 +Mouse Move +1203 332 16 +Mouse Move +1195 316 16 +Mouse Move +1189 298 16 +Mouse Move +1180 269 25 +Mouse Move +1178 251 16 +Mouse Move +1181 235 13 +Mouse Move +1185 217 16 +Mouse Move +1189 200 16 +Mouse Move +1191 186 16 +Mouse Move +1192 174 24 +Mouse Move +1193 170 16 +Mouse Move +1194 168 14 +Mouse Move +1196 166 16 +Mouse Move +1197 165 24 +Mouse Move +1199 163 16 +Mouse Move +1204 161 16 +Mouse Move +1215 159 16 +Mouse Move +1238 157 14 +Mouse Move +1269 155 16 +Mouse Move +1303 149 16 +Mouse Move +1332 142 16 +Mouse Move +1353 135 16 +Mouse Move +1374 129 16 +Mouse Move +1396 122 14 +Mouse Move +1418 116 16 +Mouse Move +1438 113 16 +Mouse Move +1461 111 16 +Mouse Move +1485 112 16 +Mouse Move +1508 116 17 +Mouse Move +1534 117 16 +Mouse Move +1561 117 13 +Mouse Move +1587 117 16 +Mouse Move +1607 112 16 +Mouse Move +1621 109 16 +Mouse Move +1628 107 17 +Mouse Move +1630 105 16 +Mouse Move +1630 103 22 +Mouse Move +1626 101 16 +Mouse Move +1612 103 16 +Mouse Move +1591 108 15 +Mouse Move +1559 107 16 +Mouse Move +1513 105 17 +Mouse Move +1451 106 14 +Mouse Move +1389 110 15 +Mouse Move +1334 106 16 +Mouse Move +1292 102 16 +Mouse Move +1263 97 16 +Mouse Move +1242 94 16 +Mouse Move +1226 92 16 +Mouse Move +1210 89 14 +Mouse Move +1192 87 16 +Mouse Move +1168 85 16 +Mouse Move +1146 83 16 +Mouse Move +1128 83 17 +Mouse Move +1116 83 16 +Mouse Move +1109 84 13 +Mouse Move +1105 87 16 +Mouse Move +1103 93 16 +Mouse Move +1100 103 16 +Mouse Move +1096 116 16 +Mouse Move +1091 134 16 +Mouse Move +1084 157 16 +Mouse Move +1071 184 14 +Mouse Move +1056 212 16 +Mouse Move +1040 241 16 +Mouse Move +1020 273 16 +Mouse Move +999 304 18 +Mouse Move +974 332 14 +Mouse Move +947 359 15 +Mouse Move +917 379 16 +Mouse Move +886 391 15 +Mouse Move +855 399 16 +Mouse Move +825 403 16 +Mouse Move +796 404 17 +Mouse Move +772 407 16 +Mouse Move +747 407 13 +Mouse Move +723 409 16 +Mouse Move +697 411 16 +Mouse Move +679 412 16 +Mouse Move +664 410 16 +Mouse Move +653 408 16 +Mouse Move +646 406 14 +Mouse Move +640 404 21 +Mouse Move +634 402 12 +Mouse Move +626 401 16 +Mouse Move +616 400 15 +Mouse Move +604 401 17 +Mouse Move +594 402 16 +Mouse Move +585 403 13 +Mouse Move +579 404 16 +Mouse Move +574 404 17 +Mouse Move +571 405 15 +Key Pressed +Return 716 +Key Released +Return 112 +Mouse Move +573 411 192 +Mouse Move +585 434 25 +Mouse Move +597 458 15 +Mouse Move +612 483 17 +Mouse Move +623 502 13 +Mouse Move +636 520 16 +Mouse Move +649 534 16 +Mouse Move +663 551 16 +Mouse Move +679 573 16 +Mouse Move +694 600 25 +Mouse Move +699 614 13 +Mouse Move +703 626 16 +Mouse Move +708 640 16 +Mouse Move +712 652 22 +Mouse Move +722 686 19 +Mouse Move +730 713 15 +Mouse Move +736 737 15 +Mouse Move +741 756 15 +Mouse Move +747 772 16 +Mouse Move +752 784 16 +Mouse Move +756 793 16 +Mouse Move +759 800 16 +Mouse Move +762 802 14 +Mouse Move +768 798 17 +Mouse Move +780 789 15 +Mouse Move +802 771 16 +Mouse Move +826 742 16 +Mouse Move +848 705 16 +Mouse Move +868 668 14 +Mouse Move +881 635 17 +Mouse Move +898 605 16 +Mouse Move +920 581 16 +Mouse Move +948 562 16 +Mouse Move +974 548 16 +Mouse Move +998 539 16 +Mouse Move +1020 533 13 +Mouse Move +1039 527 17 +Mouse Move +1057 522 15 +Mouse Move +1073 516 17 +Mouse Move +1091 509 16 +Mouse Move +1114 503 15 +Mouse Move +1141 503 15 +Mouse Move +1170 505 15 +Mouse Move +1196 504 16 +Mouse Move +1214 502 17 +Mouse Move +1230 499 16 +Mouse Move +1246 497 16 +Mouse Move +1264 496 15 +Mouse Move +1290 497 15 +Mouse Move +1319 494 15 +Mouse Move +1345 491 17 +Mouse Move +1368 487 15 +Mouse Move +1387 479 18 +Mouse Move +1404 471 14 +Mouse Move +1422 461 15 +Mouse Move +1442 452 15 +Mouse Move +1460 444 17 +Mouse Move +1480 438 16 +Mouse Move +1504 433 16 +Mouse Move +1545 432 23 +Mouse Move +1571 434 14 +Mouse Move +1596 435 16 +Mouse Move +1615 432 16 +Mouse Move +1633 431 16 +Mouse Move +1654 433 16 +Mouse Move +1677 435 16 +Mouse Move +1696 437 16 +Mouse Move +1711 439 14 +Mouse Move +1721 440 16 +Mouse Move +1724 441 16 +Mouse Move +1717 442 56 +Mouse Move +1695 443 14 +Mouse Move +1658 442 16 +Mouse Move +1608 435 16 +Mouse Move +1553 428 16 +Mouse Move +1504 420 20 +Mouse Move +1453 418 20 +Mouse Move +1430 416 14 +Mouse Move +1403 412 16 +Mouse Move +1372 406 16 +Mouse Move +1343 403 16 +Mouse Move +1316 403 21 +Mouse Move +1278 401 18 +Mouse Move +1256 401 15 +Mouse Move +1239 404 16 +Mouse Move +1224 410 16 +Mouse Move +1212 420 16 +Mouse Move +1205 434 20 +Mouse Move +1196 462 18 +Mouse Move +1189 483 16 +Mouse Move +1180 501 16 +Mouse Move +1172 518 16 +Mouse Move +1165 536 17 +Mouse Move +1159 549 20 +Mouse Move +1155 563 19 +Mouse Move +1152 570 14 +Mouse Move +1148 576 16 +Mouse Move +1143 582 16 +Mouse Move +1138 586 16 +Mouse Move +1135 588 23 +Mouse Move +1128 591 17 +Mouse Move +1123 593 14 +Mouse Move +1116 595 16 +Mouse Move +1106 598 16 +Mouse Move +1097 600 16 +Mouse Move +1089 601 16 +Mouse Move +1082 601 16 +Mouse Move +1076 600 14 +Mouse Move +1071 598 16 +Mouse Move +1065 596 16 +Mouse Move +1060 594 16 +Mouse Move +1058 592 16 +Mouse Move +1056 589 16 +Mouse Move +1054 581 16 +Mouse Move +1054 570 15 +Mouse Move +1055 560 16 +Mouse Move +1057 554 16 +Mouse Move +1059 550 16 +Mouse Move +1060 548 24 +Mouse Move +1062 544 14 +Mouse Move +1067 538 15 +Mouse Move +1072 532 16 +Mouse Move +1074 528 16 +Mouse Move +1074 528 110 +Key Pressed +Super_L 826 +Key Released +Super_L 144 +Mouse Move +1084 532 136 +Mouse Move +1100 538 16 +Mouse Move +1117 544 16 +Mouse Move +1132 546 21 +Mouse Move +1150 547 20 +Mouse Move +1161 545 14 +Mouse Move +1173 539 16 +Mouse Move +1186 531 16 +Mouse Move +1200 524 16 +Mouse Move +1211 520 20 +Mouse Move +1226 515 20 +Mouse Move +1241 507 14 +Mouse Move +1264 494 16 +Mouse Move +1294 480 16 +Mouse Move +1326 457 16 +Mouse Move +1355 431 15 +Mouse Move +1383 399 17 +Mouse Move +1409 372 14 +Mouse Move +1428 347 16 +Mouse Move +1442 325 16 +Mouse Move +1449 307 16 +Mouse Move +1453 293 16 +Mouse Move +1453 277 24 +Mouse Move +1451 269 14 +Mouse Move +1445 260 15 +Mouse Move +1439 248 16 +Mouse Move +1432 236 17 +Mouse Move +1427 224 16 +Mouse Move +1423 210 24 +Mouse Move +1421 202 13 +Mouse Move +1418 195 16 +Mouse Move +1411 187 17 +Mouse Move +1403 178 16 +Mouse Move +1396 168 16 +Mouse Move +1392 160 16 +Mouse Move +1390 154 16 +Mouse Move +1389 150 13 +Mouse Move +1388 146 19 +Mouse Move +1386 143 14 +Mouse Move +1385 141 16 +Mouse Move +1383 139 16 +Mouse Move +1389 137 61 +Mouse Move +1399 135 17 +Mouse Move +1411 134 15 +Mouse Move +1425 136 17 +Mouse Move +1443 140 16 +Mouse Move +1461 142 13 +Mouse Move +1477 143 19 +Mouse Move +1490 143 14 +Mouse Move +1502 144 16 +Mouse Move +1518 145 15 +Mouse Move +1536 145 16 +Mouse Move +1555 143 15 +Mouse Move +1578 143 15 +Mouse Move +1598 144 16 +Mouse Move +1612 145 16 +Mouse Move +1625 145 16 +Mouse Move +1638 145 16 +Mouse Move +1653 143 16 +Mouse Move +1666 141 14 +Mouse Move +1681 141 16 +Mouse Move +1699 141 16 +Mouse Move +1717 139 16 +Mouse Move +1733 137 16 +Mouse Move +1746 136 16 +Mouse Move +1753 135 15 +Mouse Move +1758 134 16 +Mouse Move +1763 133 16 +Mouse Move +1767 133 16 +Mouse Move +1772 131 16 +Mouse Move +1781 130 16 +Mouse Move +1791 128 16 +Mouse Move +1801 126 15 +Mouse Move +1808 124 15 +Mouse Move +1810 122 16 +Mouse Move +1810 120 16 +Mouse Move +1810 117 16 +Mouse Move +1806 115 16 +Mouse Move +1796 114 14 +Mouse Move +1785 114 15 +Mouse Move +1765 113 24 +Mouse Move +1743 111 16 +Mouse Move +1712 107 16 +Mouse Move +1664 104 24 +Mouse Move +1642 102 14 +Mouse Move +1626 101 17 +Mouse Move +1615 101 15 +Mouse Move +1607 100 17 +Mouse Move +1599 100 16 +Mouse Move +1588 98 16 +Mouse Move +1572 96 13 +Mouse Move +1556 94 16 +Mouse Move +1526 90 45 +Mouse Move +1508 85 20 +Mouse Move +1500 83 13 +Mouse Move +1492 81 17 +Mouse Move +1484 80 16 +Mouse Move +1475 80 16 +Mouse Move +1463 79 15 +Mouse Move +1448 78 17 +Mouse Move +1433 77 15 +Mouse Move +1419 77 14 +Mouse Move +1409 77 16 +Mouse Move +1401 78 16 +Mouse Move +1393 78 16 +Mouse Move +1385 80 16 +Mouse Move +1376 82 18 +Mouse Move +1359 85 20 +Mouse Move +1350 87 17 +Mouse Move +1343 89 15 +Mouse Move +1335 91 17 +Mouse Move +1328 93 15 +Mouse Move +1321 95 19 +Mouse Move +1313 97 19 +Mouse Move +1310 99 16 +Mouse Move +1307 102 16 +Mouse Move +1304 108 17 +Mouse Move +1302 118 15 +Mouse Move +1302 131 18 +Mouse Move +1309 161 20 +Mouse Move +1320 186 16 +Mouse Move +1332 213 16 +Mouse Move +1340 242 16 +Mouse Move +1351 270 16 +Mouse Move +1365 296 23 +Mouse Move +1386 336 16 +Mouse Move +1398 363 16 +Mouse Move +1408 385 16 +Mouse Move +1420 406 24 +Mouse Move +1426 416 15 +Mouse Move +1436 426 22 +Mouse Move +1444 431 17 +Mouse Move +1453 435 18 +Mouse Move +1467 439 14 +Mouse Move +1485 444 16 +Mouse Move +1505 448 16 +Mouse Move +1527 453 22 +Mouse Move +1536 456 15 +Mouse Move +1543 461 16 +Mouse Move +1550 467 17 +Mouse Move +1555 474 15 +Mouse Move +1558 485 16 +Mouse Move +1566 508 22 +Mouse Move +1573 525 17 +Mouse Move +1579 539 15 +Mouse Move +1583 556 16 +Mouse Move +1585 572 16 +Mouse Move +1588 589 16 +Mouse Move +1595 609 16 +Mouse Move +1606 627 14 +Mouse Move +1617 644 17 +Mouse Move +1626 657 16 +Mouse Move +1632 668 15 +Mouse Move +1639 674 17 +Mouse Move +1645 675 15 +Mouse Move +1650 675 15 +Mouse Move +1652 676 16 +Mouse Move +1654 678 16 +Mouse Move +1654 683 16 +Mouse Move +1654 690 16 +Mouse Move +1654 696 16 +Mouse Move +1653 701 15 +Mouse Move +1651 705 15 +Mouse Move +1649 707 16 +Mouse Move +1647 709 16 +Mouse Move +1645 711 15 +Mouse Move +1642 714 16 +Mouse Move +1636 716 17 +Mouse Move +1626 720 13 +Mouse Move +1613 722 17 +Mouse Move +1600 724 15 +Mouse Move +1586 725 16 +Mouse Move +1576 725 17 +Mouse Move +1570 725 15 +Mouse Move +1568 726 16 +Mouse Move +1566 727 14 +Mouse Move +1564 727 24 +Mouse Move +1562 728 17 +Mouse Move +1560 728 31 +Mouse Move +1559 729 16 +Mouse Move +1557 729 22 +Key Pressed +Escape 379 +Key Released +Escape 129 +Mouse Move +1545 730 254 +Mouse Move +1518 733 17 +Mouse Move +1481 740 16 +Mouse Move +1434 742 15 +Mouse Move +1390 738 14 +Mouse Move +1341 729 16 +Mouse Move +1294 719 16 +Mouse Move +1241 707 16 +Mouse Move +1190 699 16 +Mouse Move +1118 688 24 +Mouse Move +1073 674 14 +Mouse Move +1034 659 16 +Mouse Move +992 641 16 +Mouse Move +957 627 16 +Mouse Move +933 616 17 +Mouse Move +912 606 23 +Mouse Move +901 600 14 +Mouse Move +889 590 16 +Mouse Move +872 579 16 +Mouse Move +852 564 16 +Mouse Move +822 548 17 +Mouse Move +779 529 23 +Mouse Move +751 519 14 +Mouse Move +732 513 16 +Mouse Move +718 507 16 +Mouse Move +707 503 16 +Mouse Move +699 497 16 +Mouse Move +687 491 24 +Mouse Move +679 487 14 +Mouse Move +671 484 16 +Mouse Move +663 482 16 +Mouse Move +657 481 16 +Mouse Move +650 480 16 +Mouse Move +643 479 16 +Mouse Move +632 479 14 +Mouse Move +620 480 16 +Mouse Move +605 481 18 +Mouse Move +589 481 14 +Mouse Move +574 481 16 +Mouse Move +559 479 22 +Mouse Move +536 474 16 +Mouse Move +523 470 16 +Mouse Move +508 464 16 +Mouse Move +491 457 16 +Mouse Move +470 451 16 +Mouse Move +448 446 16 +Mouse Move +426 442 14 +Mouse Move +403 435 16 +Mouse Move +377 429 16 +Mouse Move +351 425 17 +Mouse Move +332 423 16 +Mouse Move +317 422 16 +Mouse Move +304 420 16 +Mouse Move +290 418 13 +Mouse Move +275 418 16 +Mouse Move +262 420 18 +Mouse Move +249 422 14 +Mouse Move +233 425 16 +Mouse Move +217 430 16 +Mouse Move +204 434 16 +Mouse Move +194 440 14 +Mouse Move +186 446 16 +Mouse Move +181 452 16 +Mouse Move +179 457 16 +Mouse Move +179 459 16 +Mouse Move +179 461 16 +Mouse Move +183 467 46 +Mouse Move +190 476 16 +Mouse Move +202 484 16 +Mouse Move +222 489 16 +Mouse Move +246 490 14 +Mouse Move +268 491 16 +Mouse Move +290 491 16 +Mouse Move +312 491 16 +Mouse Move +336 490 16 +Mouse Move +362 488 16 +Mouse Move +388 486 18 +Mouse Move +425 481 20 +Mouse Move +444 478 16 +Mouse Move +460 475 16 +Mouse Move +490 470 51 +Mouse Move +537 473 20 +Mouse Move +562 471 23 +Mouse Move +579 470 16 +Mouse Move +594 468 16 +Mouse Move +610 466 17 +Mouse Move +629 462 13 +Mouse Move +651 460 16 +Mouse Move +673 458 17 +Mouse Move +706 456 23 +Mouse Move +728 453 16 +Mouse Move +746 450 16 +Mouse Move +766 449 14 +Mouse Move +789 445 16 +Mouse Move +815 440 16 +Mouse Move +838 435 16 +Mouse Move +859 434 16 +Mouse Move +880 432 16 +Mouse Move +905 433 16 +Mouse Move +928 436 15 +Mouse Move +951 437 15 +Mouse Move +995 435 45 +Mouse Move +1032 436 20 +Mouse Move +1054 437 14 +Mouse Move +1076 438 18 +Mouse Move +1138 442 46 +Mouse Move +1154 445 16 +Mouse Move +1169 447 14 +Mouse Move +1181 450 16 +Mouse Move +1194 452 16 +Mouse Move +1208 454 16 +Mouse Move +1222 456 16 +Mouse Move +1228 458 16 +Mouse Move +1223 460 62 +Mouse Move +1214 462 16 +Mouse Move +1207 462 16 +Mouse Move +1199 464 16 +Mouse Move +1189 465 18 +Mouse Move +1163 467 20 +Mouse Move +1136 466 16 +Mouse Move +1100 464 15 +Mouse Move +1065 464 16 +Mouse Move +1037 467 16 +Mouse Move +1011 468 18 +Mouse Move +985 467 12 +Mouse Move +958 467 16 +Mouse Move +930 466 17 +Mouse Move +898 461 15 +Mouse Move +869 458 17 +Mouse Move +837 456 14 +Mouse Move +787 457 24 +Mouse Move +757 457 16 +Mouse Move +733 458 16 +Mouse Move +716 460 16 +Mouse Move +699 461 44 +Mouse Move +695 462 18 +Mouse Move +693 463 16 +Mouse Move +688 464 16 +Mouse Move +680 465 16 +Mouse Move +669 464 16 +Mouse Move +657 463 20 +Mouse Move +645 462 18 +Mouse Move +643 462 64 +Mouse Move +629 466 29 +Mouse Move +617 468 16 +Mouse Move +608 469 17 +Mouse Move +602 469 15 +Mouse Move +599 469 17 +Key Pressed +Return 558 +Key Released +Return 103 +Mouse Move +602 471 179 +Mouse Move +611 477 13 +Mouse Move +623 482 16 +Mouse Move +642 488 16 +Mouse Move +665 498 16 +Mouse Move +683 512 16 +Mouse Move +696 527 16 +Mouse Move +706 543 18 +Mouse Move +728 572 20 +Mouse Move +747 591 16 +Mouse Move +767 608 16 +Mouse Move +786 621 16 +Mouse Move +809 624 17 +Mouse Move +830 622 17 +Mouse Move +847 625 12 +Mouse Move +859 633 16 +Mouse Move +869 641 16 +Mouse Move +882 650 16 +Mouse Move +899 657 16 +Mouse Move +919 662 16 +Mouse Move +941 668 14 +Mouse Move +966 676 17 +Mouse Move +993 688 15 +Mouse Move +1021 698 16 +Mouse Move +1047 699 16 +Mouse Move +1070 695 16 +Mouse Move +1092 687 18 +Mouse Move +1114 683 12 +Mouse Move +1148 682 24 +Mouse Move +1171 687 16 +Mouse Move +1193 691 16 +Mouse Move +1214 692 16 +Mouse Move +1233 687 18 +Mouse Move +1271 679 20 +Mouse Move +1298 677 16 +Mouse Move +1325 673 16 +Mouse Move +1342 667 16 +Mouse Move +1349 656 19 +Mouse Move +1347 611 29 +Mouse Move +1334 582 14 +Mouse Move +1317 549 16 +Mouse Move +1300 519 16 +Mouse Move +1281 487 17 +Mouse Move +1267 463 13 +Mouse Move +1262 445 24 +Mouse Move +1267 438 17 +Mouse Move +1275 432 15 +Mouse Move +1285 427 16 +Mouse Move +1294 425 16 +Mouse Move +1302 426 14 +Mouse Move +1318 429 24 +Mouse Move +1335 431 16 +Mouse Move +1356 431 16 +Mouse Move +1374 429 16 +Mouse Move +1385 426 17 +Mouse Move +1396 424 14 +Mouse Move +1423 424 23 +Mouse Move +1450 428 17 +Mouse Move +1474 433 15 +Mouse Move +1497 438 16 +Mouse Move +1520 444 16 +Mouse Move +1541 447 14 +Mouse Move +1569 449 24 +Mouse Move +1588 449 16 +Mouse Move +1610 449 16 +Mouse Move +1632 447 17 +Mouse Move +1653 447 15 +Mouse Move +1670 448 14 +Mouse Move +1685 446 24 +Mouse Move +1686 445 24 +Mouse Move +1677 448 86 +Mouse Move +1657 457 16 +Mouse Move +1622 469 16 +Mouse Move +1578 476 16 +Mouse Move +1528 482 16 +Mouse Move +1474 486 14 +Mouse Move +1417 493 16 +Mouse Move +1368 502 16 +Mouse Move +1329 515 16 +Mouse Move +1296 530 16 +Mouse Move +1269 550 16 +Mouse Move +1248 563 14 +Mouse Move +1230 578 16 +Mouse Move +1216 594 16 +Mouse Move +1204 612 16 +Mouse Move +1190 634 16 +Mouse Move +1178 654 16 +Mouse Move +1166 669 14 +Mouse Move +1155 676 17 +Mouse Move +1147 680 16 +Mouse Move +1141 681 15 +Mouse Move +1134 682 16 +Mouse Move +1123 684 17 +Mouse Move +1107 686 15 +Mouse Move +1092 690 16 +Mouse Move +1081 693 14 +Mouse Move +1069 694 16 +Mouse Move +1055 692 16 +Mouse Move +1036 684 16 +Mouse Move +1011 670 17 +Mouse Move +977 657 15 +Mouse Move +942 642 14 +Mouse Move +907 630 17 +Mouse Move +875 615 15 +Mouse Move +848 602 16 +Mouse Move +818 589 16 +Mouse Move +791 573 16 +Mouse Move +767 555 17 +Mouse Move +750 540 13 +Mouse Move +734 529 16 +Mouse Move +717 521 16 +Mouse Move +699 516 16 +Mouse Move +681 509 16 +Mouse Move +662 501 16 +Mouse Move +638 495 14 +Mouse Move +616 494 16 +Mouse Move +594 496 16 +Mouse Move +574 498 16 +Mouse Move +556 498 16 +Mouse Move +541 498 16 +Mouse Move +527 498 14 +Mouse Move +516 498 18 +Mouse Move +508 499 14 +Mouse Move +502 501 16 +Mouse Move +496 503 16 +Mouse Move +490 505 16 +Mouse Move +484 505 16 +Mouse Move +478 506 14 +Mouse Move +471 507 16 +Mouse Move +465 508 16 +Mouse Move +460 509 16 +Mouse Move +453 511 16 +Mouse Move +443 513 16 +Mouse Move +431 515 14 +Mouse Move +420 515 20 +Mouse Move +409 514 12 +Mouse Move +401 514 16 +Mouse Move +395 514 17 +Mouse Move +389 513 16 +Mouse Move +384 513 15 +Mouse Move +376 513 14 +Mouse Move +368 514 16 +Mouse Move +360 516 16 +Mouse Move +352 518 17 +Mouse Move +345 520 15 +Mouse Move +337 522 16 +Mouse Move +329 524 16 +Mouse Move +322 526 18 +Mouse Move +313 529 20 +Mouse Move +307 530 16 +Mouse Move +300 531 16 +Mouse Move +292 532 16 +Mouse Move +285 532 14 +Mouse Move +279 533 22 +Mouse Move +276 534 18 +Mouse Move +274 535 16 +Mouse Move +272 536 16 +Mouse Move +280 534 323 +Mouse Move +289 532 15 +Mouse Move +294 531 20 +Mouse Move +297 530 42 +Mouse Move +303 529 16 +Mouse Move +313 529 16 +Mouse Move +325 527 14 +Mouse Move +341 525 24 +Mouse Move +349 525 16 +Mouse Move +357 525 16 +Mouse Move +365 525 16 +Mouse Move +374 525 16 +Mouse Move +385 525 14 +Mouse Move +411 523 24 +Mouse Move +432 521 16 +Mouse Move +454 520 17 +Mouse Move +468 519 15 +Mouse Move +472 519 16 +Mouse Move +474 518 79 +Mouse Move +476 518 15 +Mouse Move +478 518 17 +Mouse Move +481 518 13 +Mouse Move +484 517 17 +Mouse Move +486 517 15 +Mouse Move +484 517 189 +Mouse Move +476 517 15 +Mouse Move +471 517 16 +Mouse Move +471 517 87 +Mouse Move +474 517 16 +Mouse Move +480 517 16 +Mouse Move +493 517 15 +Mouse Move +511 517 14 +Mouse Move +528 517 18 +Mouse Move +536 518 14 +Mouse Move +535 518 111 +Mouse Move +522 515 16 +Mouse Move +504 508 16 +Mouse Move +482 499 16 +Mouse Move +456 493 16 +Mouse Move +427 488 16 +Mouse Move +401 486 13 +Mouse Move +379 482 17 +Mouse Move +362 478 16 +Mouse Move +347 475 15 +Mouse Move +336 472 16 +Mouse Move +329 467 14 +Mouse Move +324 463 16 +Mouse Move +319 456 16 +Mouse Move +314 448 16 +Mouse Move +308 440 16 +Mouse Move +302 434 16 +Mouse Move +298 429 16 +Mouse Move +296 427 18 +Mouse Move +297 427 85 +Mouse Move +300 429 17 +Mouse Move +302 432 12 +Mouse Move +309 436 16 +Mouse Move +321 441 16 +Mouse Move +337 443 16 +Mouse Move +359 445 16 +Mouse Move +380 447 15 +Mouse Move +405 450 23 +Mouse Move +417 452 16 +Mouse Move +426 454 16 +Mouse Move +433 457 16 +Mouse Move +439 463 16 +Mouse Move +445 469 15 +Mouse Move +454 477 24 +Mouse Move +458 481 16 +Mouse Move +460 485 15 +Mouse Move +463 489 16 +Mouse Move +467 494 17 +Mouse Move +471 499 14 +Mouse Move +474 504 24 +Mouse Move +475 506 15 +Mouse Pressed +476 506 0 1 229 +Mouse Released +476 506 256 1 102 +Key Pressed +Return 607 +Key Released +Return 135 +Mouse Move +477 510 199 +Mouse Move +484 525 16 +Mouse Move +494 548 17 +Mouse Move +509 575 13 +Mouse Move +534 598 16 +Mouse Move +561 615 17 +Mouse Move +585 632 16 +Mouse Move +600 645 15 +Mouse Move +609 655 16 +Mouse Move +612 662 14 +Mouse Move +614 671 16 +Mouse Move +618 682 16 +Mouse Move +623 692 16 +Mouse Move +628 701 16 +Mouse Move +630 706 16 +Mouse Move +632 708 16 +Mouse Move +632 712 14 +Mouse Move +634 720 16 +Mouse Move +637 732 16 +Mouse Move +643 742 16 +Mouse Move +650 745 16 +Mouse Move +658 740 16 +Mouse Move +666 727 14 +Mouse Move +676 709 16 +Mouse Move +686 684 16 +Mouse Move +693 658 16 +Mouse Move +702 626 16 +Mouse Move +715 593 16 +Mouse Move +734 565 16 +Mouse Move +757 545 15 +Mouse Move +785 532 15 +Mouse Move +815 524 16 +Mouse Move +849 518 16 +Mouse Move +881 511 16 +Mouse Move +913 505 16 +Mouse Move +944 498 14 +Mouse Move +976 490 16 +Mouse Move +1012 482 16 +Mouse Move +1042 481 16 +Mouse Move +1067 479 16 +Mouse Move +1085 477 16 +Mouse Move +1100 475 20 +Mouse Move +1120 472 18 +Mouse Move +1137 470 16 +Mouse Move +1161 469 16 +Mouse Move +1187 469 16 +Mouse Move +1212 466 16 +Mouse Move +1238 464 18 +Mouse Move +1275 458 20 +Mouse Move +1301 456 17 +Mouse Move +1328 454 16 +Mouse Move +1353 450 16 +Mouse Move +1375 447 15 +Mouse Move +1398 444 19 +Mouse Move +1437 441 19 +Mouse Move +1463 441 16 +Mouse Move +1485 443 16 +Mouse Move +1518 445 24 +Mouse Move +1544 447 16 +Mouse Move +1569 449 14 +Mouse Move +1590 449 16 +Mouse Move +1608 447 20 +Mouse Move +1633 447 20 +Mouse Move +1644 447 16 +Mouse Move +1652 447 16 +Mouse Move +1657 448 22 +Mouse Move +1623 449 90 +Mouse Move +1564 447 12 +Mouse Move +1490 443 17 +Mouse Move +1404 437 16 +Mouse Move +1325 436 16 +Mouse Move +1254 428 16 +Mouse Move +1197 431 16 +Mouse Move +1129 441 21 +Mouse Move +1096 452 16 +Mouse Move +1070 467 16 +Mouse Move +1050 483 16 +Mouse Move +1033 503 16 +Mouse Move +1015 525 16 +Mouse Move +989 555 23 +Mouse Move +968 582 15 +Mouse Move +943 606 16 +Mouse Move +924 626 16 +Mouse Move +906 639 16 +Mouse Move +889 642 17 +Mouse Move +869 643 14 +Mouse Move +843 644 15 +Mouse Move +813 643 16 +Mouse Move +779 643 16 +Mouse Move +741 637 16 +Mouse Move +699 625 16 +Mouse Move +659 609 14 +Mouse Move +617 587 16 +Mouse Move +578 563 16 +Mouse Move +546 544 16 +Mouse Move +516 528 16 +Mouse Move +491 514 16 +Mouse Move +472 500 16 +Mouse Move +459 492 15 +Mouse Move +449 487 15 +Mouse Move +440 485 16 +Mouse Move +429 483 16 +Mouse Move +415 482 16 +Mouse Move +398 480 16 +Mouse Move +378 478 14 +Mouse Move +362 474 16 +Mouse Move +352 473 17 +Mouse Move +347 474 16 +Mouse Move +343 477 16 +Mouse Move +337 483 16 +Mouse Move +329 491 15 +Mouse Move +320 500 14 +Mouse Move +309 508 17 +Mouse Move +297 516 15 +Mouse Move +283 523 17 +Mouse Move +270 529 15 +Mouse Move +256 535 17 +Mouse Move +244 542 14 +Mouse Move +236 548 15 +Mouse Move +230 551 17 +Mouse Move +228 553 15 +Mouse Move +225 555 17 +Mouse Move +222 558 15 +Mouse Move +220 560 16 +Mouse Move +220 561 133 +Mouse Move +225 558 15 +Mouse Move +232 553 16 +Mouse Move +241 549 16 +Mouse Move +252 546 16 +Mouse Move +269 545 14 +Mouse Move +295 546 16 +Mouse Move +323 551 16 +Mouse Move +350 555 16 +Mouse Move +374 561 16 +Mouse Move +393 567 16 +Mouse Move +409 571 16 +Mouse Move +426 574 18 +Mouse Move +446 577 13 +Mouse Move +467 579 15 +Mouse Move +491 581 16 +Mouse Move +512 583 16 +Mouse Move +529 583 17 +Mouse Move +546 581 13 +Mouse Move +562 580 16 +Mouse Move +579 579 16 +Mouse Move +601 577 16 +Mouse Move +628 573 16 +Mouse Move +656 570 16 +Mouse Move +680 571 16 +Mouse Move +707 574 18 +Mouse Move +754 578 21 +Mouse Move +792 581 16 +Mouse Move +826 579 15 +Mouse Move +848 577 16 +Mouse Move +863 573 16 +Mouse Move +876 566 18 +Mouse Move +893 552 21 +Mouse Move +898 542 16 +Mouse Move +900 534 15 +Mouse Move +900 527 16 +Mouse Move +897 520 17 +Mouse Move +890 513 17 +Mouse Move +861 502 20 +Mouse Move +831 497 16 +Mouse Move +801 492 17 +Mouse Move +771 490 16 +Mouse Move +746 488 16 +Mouse Move +722 487 18 +Mouse Move +691 486 20 +Mouse Move +672 488 16 +Mouse Move +649 489 16 +Mouse Move +626 489 16 +Mouse Move +599 488 16 +Mouse Move +572 491 18 +Mouse Move +535 494 20 +Mouse Move +519 495 16 +Mouse Move +513 496 16 +Key Pressed +Return 261 +Key Released +Return 136 +Mouse Move +521 510 129 +Mouse Move +537 538 16 +Mouse Move +554 568 13 +Mouse Move +567 589 17 +Mouse Move +578 601 16 +Mouse Move +585 606 16 +Mouse Move +588 606 16 +Mouse Move +595 605 16 +Mouse Move +607 600 16 +Mouse Move +625 592 14 +Mouse Move +647 586 16 +Mouse Move +667 581 16 +Mouse Move +692 574 16 +Mouse Move +720 567 16 +Mouse Move +752 562 16 +Mouse Move +786 554 13 +Mouse Move +821 545 17 +Mouse Move +859 535 15 +Mouse Move +892 520 16 +Mouse Move +931 504 17 +Mouse Move +970 486 16 +Mouse Move +1013 467 16 +Mouse Move +1050 444 13 +Mouse Move +1080 422 17 +Mouse Move +1106 404 16 +Mouse Move +1130 388 16 +Mouse Move +1149 372 16 +Mouse Move +1171 355 16 +Mouse Move +1189 342 14 +Mouse Move +1209 331 15 +Mouse Move +1230 322 17 +Mouse Move +1256 319 16 +Mouse Move +1295 314 23 +Mouse Move +1319 309 17 +Mouse Move +1339 304 14 +Mouse Move +1355 300 16 +Mouse Move +1371 300 16 +Mouse Move +1388 302 16 +Mouse Move +1409 311 16 +Mouse Move +1433 319 16 +Mouse Move +1457 329 18 +Mouse Move +1483 337 13 +Mouse Move +1512 338 15 +Mouse Move +1542 338 15 +Mouse Move +1569 337 17 +Mouse Move +1597 334 18 +Mouse Move +1626 334 13 +Mouse Move +1650 336 15 +Mouse Move +1675 339 15 +Mouse Move +1697 341 17 +Mouse Move +1714 342 20 +Mouse Move +1724 342 20 +Mouse Move +1729 339 16 +Mouse Move +1735 337 14 +Mouse Move +1742 335 16 +Mouse Move +1745 333 16 +Mouse Move +1746 331 16 +Mouse Move +1746 329 16 +Mouse Move +1743 326 15 +Mouse Move +1730 321 14 +Mouse Move +1704 314 18 +Mouse Move +1677 306 14 +Mouse Move +1648 298 17 +Mouse Move +1625 291 16 +Mouse Move +1605 285 15 +Mouse Move +1590 282 16 +Mouse Move +1580 281 14 +Mouse Move +1572 282 16 +Mouse Move +1563 284 16 +Mouse Move +1549 287 16 +Mouse Move +1528 291 16 +Mouse Move +1500 293 16 +Mouse Move +1468 293 14 +Mouse Move +1431 292 16 +Mouse Move +1394 291 16 +Mouse Move +1362 291 16 +Mouse Move +1335 292 16 +Mouse Move +1308 295 16 +Mouse Move +1281 297 16 +Mouse Move +1253 300 15 +Mouse Move +1196 306 23 +Mouse Move +1147 310 16 +Mouse Move +1100 310 16 +Mouse Move +1050 320 16 +Mouse Move +1010 334 14 +Mouse Move +977 349 16 +Mouse Move +937 367 25 +Mouse Move +914 381 15 +Mouse Move +889 399 16 +Mouse Move +858 416 16 +Mouse Move +830 431 17 +Mouse Move +803 443 13 +Mouse Move +762 459 24 +Mouse Move +736 471 16 +Mouse Move +708 478 16 +Mouse Move +678 482 16 +Mouse Move +648 485 17 +Mouse Move +622 491 14 +Mouse Move +588 500 23 +Mouse Move +569 506 18 +Mouse Move +553 514 15 +Mouse Move +537 523 15 +Mouse Move +524 529 15 +Mouse Move +517 532 15 +Mouse Move +511 535 25 +Mouse Move +509 536 16 +Mouse Move +507 537 16 +Mouse Move +502 539 16 +Mouse Move +496 541 13 +Mouse Move +490 543 16 +Mouse Move +486 545 24 +Key Pressed +Return 180 +Key Released +Return 127 +Mouse Move +491 544 109 +Mouse Move +497 543 17 +Mouse Move +503 541 16 +Mouse Move +510 539 15 +Mouse Move +520 537 14 +Mouse Move +536 532 16 +Mouse Move +562 524 16 +Mouse Move +587 517 16 +Mouse Move +607 509 16 +Mouse Move +624 498 16 +Mouse Move +638 486 16 +Mouse Move +654 478 14 +Mouse Move +678 473 16 +Mouse Move +709 470 16 +Mouse Move +744 468 16 +Mouse Move +778 466 17 +Mouse Move +815 466 15 +Mouse Move +854 466 14 +Mouse Move +893 463 16 +Mouse Move +926 459 16 +Mouse Move +955 457 16 +Mouse Move +978 457 16 +Mouse Move +992 459 16 +Mouse Move +995 461 16 +Mouse Move +996 462 22 +Mouse Move +994 468 16 +Mouse Move +993 476 16 +Mouse Move +991 490 16 +Mouse Move +990 512 16 +Mouse Move +986 538 16 +Mouse Move +982 565 14 +Mouse Move +982 592 18 +Mouse Move +981 619 14 +Mouse Move +977 645 16 +Mouse Move +974 670 16 +Mouse Move +968 695 16 +Mouse Move +963 715 14 +Mouse Move +959 734 16 +Mouse Move +957 752 17 +Mouse Move +956 771 15 +Mouse Move +954 792 16 +Mouse Move +951 813 16 +Mouse Move +948 830 16 +Mouse Move +946 846 14 +Mouse Move +945 857 16 +Mouse Move +944 863 16 +Mouse Move +945 867 86 +Mouse Move +947 871 16 +Mouse Move +948 872 16 +Mouse Move +954 860 16 +Mouse Move +964 834 16 +Mouse Move +975 797 14 +Mouse Move +987 750 17 +Mouse Move +1000 689 24 +Mouse Move +1011 653 15 +Mouse Move +1028 618 17 +Mouse Move +1048 586 15 +Mouse Move +1064 560 15 +Mouse Move +1080 537 15 +Mouse Move +1106 506 24 +Mouse Move +1126 490 16 +Mouse Move +1141 480 16 +Mouse Move +1151 474 16 +Mouse Move +1159 470 14 +Mouse Move +1167 466 17 +Mouse Move +1179 458 23 +Mouse Move +1187 452 17 +Mouse Move +1197 447 15 +Mouse Move +1211 443 17 +Mouse Move +1226 440 13 +Mouse Move +1241 438 16 +Mouse Move +1262 435 24 +Mouse Move +1276 433 16 +Mouse Move +1293 429 16 +Mouse Move +1317 427 16 +Mouse Move +1345 427 14 +Mouse Move +1372 427 16 +Mouse Move +1412 434 24 +Mouse Move +1439 435 17 +Mouse Move +1470 433 15 +Mouse Move +1502 431 14 +Mouse Move +1532 429 16 +Mouse Move +1560 430 16 +Mouse Move +1607 430 24 +Mouse Move +1635 430 16 +Mouse Move +1663 429 16 +Mouse Move +1685 428 17 +Mouse Move +1703 429 14 +Mouse Move +1719 431 15 +Mouse Move +1737 432 24 +Mouse Move +1737 433 54 +Mouse Move +1717 437 16 +Mouse Move +1679 442 16 +Mouse Move +1625 448 16 +Mouse Move +1564 447 16 +Mouse Move +1490 446 16 +Mouse Move +1411 447 16 +Mouse Move +1341 443 14 +Mouse Move +1284 451 16 +Mouse Move +1233 457 16 +Mouse Move +1187 464 16 +Mouse Move +1143 476 16 +Mouse Move +1099 492 16 +Mouse Move +1063 509 15 +Mouse Move +1033 529 16 +Mouse Move +1009 551 16 +Mouse Move +989 570 15 +Mouse Move +971 589 16 +Mouse Move +949 606 16 +Mouse Move +927 624 16 +Mouse Move +909 636 14 +Mouse Move +896 646 16 +Mouse Move +885 652 16 +Mouse Move +877 654 16 +Mouse Move +864 654 16 +Mouse Move +844 650 16 +Mouse Move +817 648 14 +Mouse Move +783 643 16 +Mouse Move +745 636 16 +Mouse Move +706 624 16 +Mouse Move +666 608 16 +Mouse Move +625 592 16 +Mouse Move +592 583 16 +Mouse Move +567 577 14 +Mouse Move +548 574 17 +Mouse Move +531 572 16 +Mouse Move +515 570 16 +Mouse Move +497 569 15 +Mouse Move +481 570 16 +Mouse Move +466 571 14 +Mouse Move +452 570 16 +Mouse Move +438 568 16 +Mouse Move +424 567 16 +Mouse Move +412 566 16 +Mouse Move +400 566 16 +Mouse Move +387 562 16 +Mouse Move +371 558 14 +Mouse Move +354 555 16 +Mouse Move +340 553 18 +Mouse Move +333 553 14 +Mouse Move +328 558 16 +Mouse Move +322 568 16 +Mouse Move +315 579 14 +Mouse Move +305 587 16 +Mouse Move +294 595 16 +Mouse Move +282 603 17 +Mouse Move +269 611 16 +Mouse Move +256 618 15 +Mouse Move +244 622 15 +Mouse Move +235 624 15 +Mouse Move +231 624 16 +Mouse Move +229 624 87 +Mouse Move +230 624 72 +Mouse Move +243 618 14 +Mouse Move +262 611 15 +Mouse Move +289 603 16 +Mouse Move +317 597 18 +Mouse Move +352 595 14 +Mouse Move +384 593 16 +Mouse Move +417 595 16 +Mouse Move +454 602 14 +Mouse Move +487 614 16 +Mouse Move +516 622 16 +Mouse Move +556 625 24 +Mouse Move +585 626 16 +Mouse Move +619 627 17 +Mouse Move +657 631 13 +Mouse Move +698 633 16 +Mouse Move +736 633 16 +Mouse Move +787 631 25 +Mouse Move +819 630 16 +Mouse Move +846 628 16 +Mouse Move +871 626 14 +Mouse Move +898 626 16 +Mouse Move +929 626 16 +Mouse Move +981 623 24 +Mouse Move +1013 623 16 +Mouse Move +1043 623 16 +Mouse Move +1069 621 14 +Mouse Move +1091 619 15 +Mouse Move +1109 611 16 +Mouse Move +1131 603 16 +Mouse Move +1152 595 17 +Mouse Move +1167 587 16 +Mouse Move +1176 579 13 +Mouse Move +1182 565 16 +Mouse Move +1183 547 16 +Mouse Move +1179 526 23 +Mouse Move +1167 493 18 +Mouse Move +1161 468 15 +Mouse Move +1155 441 14 +Mouse Move +1153 417 16 +Mouse Move +1156 393 16 +Mouse Move +1166 372 21 +Mouse Move +1186 346 20 +Mouse Move +1200 328 15 +Mouse Move +1207 317 14 +Mouse Move +1212 310 17 +Mouse Move +1216 307 19 +Mouse Move +1222 305 17 +Mouse Move +1240 301 20 +Mouse Move +1252 299 16 +Mouse Move +1263 298 13 +Mouse Move +1273 298 17 +Mouse Move +1288 298 16 +Mouse Move +1309 301 16 +Mouse Move +1343 303 24 +Mouse Move +1368 301 16 +Mouse Move +1394 299 14 +Mouse Move +1422 300 15 +Mouse Move +1449 304 16 +Mouse Move +1476 304 17 +Mouse Move +1499 302 15 +Mouse Move +1517 302 17 +Mouse Move +1538 302 16 +Mouse Move +1565 304 13 +Mouse Move +1596 308 16 +Mouse Move +1624 311 17 +Mouse Move +1645 312 17 +Mouse Move +1664 312 14 +Mouse Move +1676 312 16 +Mouse Move +1685 311 15 +Mouse Move +1689 308 15 +Mouse Move +1690 305 17 +Mouse Move +1691 302 15 +Mouse Move +1689 300 16 +Mouse Move +1685 298 16 +Mouse Move +1678 296 16 +Mouse Move +1670 294 14 +Mouse Move +1656 292 16 +Mouse Move +1634 290 16 +Mouse Move +1604 288 16 +Mouse Move +1562 284 16 +Mouse Move +1521 283 16 +Mouse Move +1483 283 14 +Mouse Move +1446 280 17 +Mouse Move +1412 279 15 +Mouse Move +1374 277 16 +Mouse Move +1339 278 16 +Mouse Move +1306 282 16 +Mouse Move +1271 285 17 +Mouse Move +1238 289 14 +Mouse Move +1207 293 15 +Mouse Move +1179 304 16 +Mouse Move +1151 318 16 +Mouse Move +1126 335 16 +Mouse Move +1109 350 16 +Mouse Move +1092 367 14 +Mouse Move +1075 385 16 +Mouse Move +1059 405 16 +Mouse Move +1041 427 16 +Mouse Move +1014 459 25 +Mouse Move +987 486 26 +Mouse Move +966 508 22 +Mouse Move +953 518 22 +Mouse Move +944 522 15 +Mouse Move +931 527 17 +Mouse Move +914 530 15 +Mouse Move +884 533 22 +Mouse Move +865 535 16 +Mouse Move +834 540 25 +Mouse Move +810 543 23 +Mouse Move +799 544 17 +Mouse Move +795 546 16 +Key Pressed +Return 395 +Key Released +Return 120 +Mouse Move +795 546 182 +Mouse Move +802 541 23 +Mouse Move +808 535 16 +Mouse Move +813 529 15 +Mouse Move +819 521 20 +Mouse Move +832 500 20 +Mouse Move +842 482 17 +Mouse Move +853 465 14 +Mouse Move +867 452 16 +Mouse Move +887 441 15 +Mouse Move +911 434 21 +Mouse Move +954 430 19 +Mouse Move +986 431 16 +Mouse Move +1023 430 14 +Mouse Move +1059 429 17 +Mouse Move +1100 431 16 +Mouse Move +1144 434 24 +Mouse Move +1200 441 16 +Mouse Move +1229 443 16 +Mouse Move +1249 441 14 +Mouse Move +1271 439 16 +Mouse Move +1295 439 16 +Mouse Move +1323 441 16 +Mouse Move +1368 442 24 +Mouse Move +1405 442 15 +Mouse Move +1444 445 15 +Mouse Move +1482 457 16 +Mouse Move +1521 462 16 +Mouse Move +1553 459 16 +Mouse Move +1581 453 15 +Mouse Move +1601 448 17 +Mouse Move +1612 445 16 +Mouse Move +1617 444 14 +Mouse Move +1623 443 18 +Mouse Move +1631 438 14 +Mouse Move +1642 427 16 +Mouse Move +1653 412 16 +Mouse Move +1666 395 15 +Mouse Move +1678 377 16 +Mouse Move +1690 359 14 +Mouse Move +1702 341 16 +Mouse Move +1711 322 16 +Mouse Move +1714 306 17 +Mouse Move +1715 293 16 +Mouse Move +1715 277 16 +Mouse Move +1712 253 22 +Mouse Move +1708 238 16 +Mouse Move +1704 226 16 +Mouse Move +1700 219 16 +Mouse Move +1694 215 16 +Mouse Move +1682 212 16 +Mouse Move +1661 212 14 +Mouse Move +1637 214 16 +Mouse Move +1611 219 15 +Mouse Move +1581 225 18 +Mouse Move +1550 230 14 +Mouse Move +1516 236 17 +Mouse Move +1482 245 13 +Mouse Move +1445 250 17 +Mouse Move +1415 255 16 +Mouse Move +1385 258 15 +Mouse Move +1351 260 17 +Mouse Move +1320 261 16 +Mouse Move +1294 265 14 +Mouse Move +1272 266 15 +Mouse Move +1254 265 17 +Mouse Move +1240 264 15 +Mouse Move +1228 263 18 +Mouse Move +1216 264 14 +Mouse Move +1204 266 16 +Mouse Move +1194 268 14 +Mouse Move +1182 270 16 +Mouse Move +1171 273 16 +Mouse Move +1160 276 16 +Mouse Move +1146 282 16 +Mouse Move +1130 289 16 +Mouse Move +1114 299 14 +Mouse Move +1100 310 16 +Mouse Move +1086 321 16 +Mouse Move +1071 334 16 +Mouse Move +1054 346 18 +Mouse Move +1038 362 14 +Mouse Move +1024 376 17 +Mouse Move +1009 390 13 +Mouse Move +997 407 17 +Mouse Move +984 423 16 +Mouse Move +969 435 16 +Mouse Move +945 452 24 +Mouse Move +927 458 16 +Mouse Move +910 465 14 +Mouse Move +892 471 16 +Mouse Move +873 478 16 +Mouse Move +851 484 16 +Mouse Move +828 488 16 +Mouse Move +805 489 15 +Mouse Move +781 491 14 +Mouse Move +755 493 17 +Mouse Move +727 495 16 +Mouse Move +700 500 16 +Mouse Move +673 503 17 +Mouse Move +650 506 14 +Mouse Move +628 507 17 +Mouse Move +605 509 14 +Mouse Move +583 512 15 +Mouse Move +564 516 17 +Mouse Move +544 517 16 +Mouse Move +522 520 16 +Mouse Move +500 522 16 +Mouse Move +478 524 16 +Mouse Move +456 526 14 +Mouse Move +437 526 16 +Mouse Move +417 524 15 +Mouse Move +399 522 17 +Mouse Move +382 520 16 +Mouse Move +368 520 16 +Mouse Move +352 523 14 +Mouse Move +337 527 15 +Mouse Move +327 531 17 +Mouse Move +320 535 15 +Mouse Move +310 544 24 +Mouse Move +302 552 17 +Mouse Move +294 561 14 +Mouse Move +286 572 15 +Mouse Move +278 582 16 +Mouse Move +272 592 17 +Mouse Move +259 619 32 +Mouse Move +253 634 14 +Mouse Move +247 647 15 +Mouse Move +242 660 16 +Mouse Move +237 671 16 +Mouse Move +235 679 21 +Mouse Move +232 689 19 +Mouse Move +230 697 14 +Mouse Move +227 705 16 +Mouse Move +225 712 16 +Mouse Move +223 716 16 +Mouse Move +222 716 134 +Mouse Move +224 703 16 +Mouse Move +226 683 14 +Mouse Move +229 659 16 +Mouse Move +231 633 17 +Mouse Move +233 606 16 +Mouse Move +235 583 16 +Mouse Move +237 562 15 +Mouse Move +239 540 16 +Mouse Move +240 522 15 +Mouse Move +241 505 15 +Mouse Move +241 487 16 +Mouse Move +241 469 16 +Mouse Move +241 456 16 +Mouse Move +241 445 16 +Mouse Move +240 435 14 +Mouse Move +238 425 17 +Mouse Move +236 416 15 +Mouse Move +234 408 16 +Mouse Move +234 398 16 +Mouse Move +233 386 16 +Mouse Move +231 374 17 +Mouse Move +231 366 14 +Mouse Move +231 360 16 +Mouse Move +231 356 15 +Mouse Move +231 349 16 +Mouse Move +231 339 16 +Mouse Move +231 328 16 +Mouse Move +230 318 14 +Mouse Move +229 309 17 +Mouse Move +228 303 16 +Mouse Move +228 301 16 +Mouse Move +227 299 17 +Mouse Move +225 294 15 +Mouse Move +224 288 15 +Mouse Move +223 281 14 +Mouse Move +221 277 16 +Key Pressed +Right 1000 +Key Released +Right 136 +Key Pressed +Return 912 +Key Released +Return 152 +Key Pressed +Down 1976 +Key Released +Down 144 +Key Pressed +Down 48 +Key Released +Down 160 +Key Pressed +Left 80 +Key Released +Left 144 +Key Pressed +Left 96 +Key Released +Left 176 +Key Pressed +Right 232 +Key Released +Right 160 +Key Pressed +Left 624 +Key Released +Left 152 +Key Pressed +Return 744 +Key Released +Return 136 +Key Pressed +Return 1705 +Key Released +Return 151 +Mouse Move +649 1009 1110 +Mouse Move +658 1007 13 +Mouse Move +685 1002 15 +Mouse Move +716 999 16 +Mouse Move +737 997 16 +Mouse Move +747 993 14 +Mouse Move +753 989 16 +Mouse Move +758 983 16 +Mouse Move +764 977 16 +Mouse Move +766 971 17 +Mouse Move +765 962 15 +Mouse Move +759 950 16 +Mouse Move +753 939 15 +Mouse Move +747 928 16 +Mouse Move +743 920 16 +Mouse Move +739 914 15 +Mouse Move +735 911 16 +Mouse Move +729 907 16 +Mouse Move +720 901 14 +Mouse Move +709 896 16 +Mouse Move +699 891 16 +Mouse Move +692 887 16 +Mouse Move +689 883 16 +Mouse Move +687 879 16 +Mouse Move +686 876 16 +Mouse Move +686 874 14 +Mouse Move +685 872 16 +Mouse Move +685 870 24 +Mouse Move +685 868 16 +Mouse Move +685 866 16 +Mouse Move +687 864 22 +Mouse Move +689 863 16 +Mouse Move +691 861 16 +Mouse Move +694 858 16 +Mouse Move +697 854 17 +Mouse Move +701 849 15 +Mouse Move +704 847 17 +Mouse Move +706 845 17 +Mouse Move +707 843 12 +Mouse Move +708 841 24 +Mouse Move +710 840 16 +Mouse Move +711 838 25 +Mouse Move +711 836 13 +Mouse Move +712 835 24 +Mouse Move +714 837 78 +Mouse Move +715 839 24 +Mouse Move +715 841 16 +Mouse Move +715 843 16 +Mouse Move +715 845 16 +Mouse Move +715 847 32 +Mouse Move +715 848 165 +Mouse Move +713 847 61 +Mouse Move +711 846 33 +Mouse Move +710 845 23 +Mouse Move +709 844 17 +Mouse Move +707 843 29 +Mouse Move +705 841 24 +Mouse Move +705 842 212 +Mouse Move +707 844 24 +Mouse Pressed +707 844 0 1 220 +Mouse Released +707 844 256 1 181 +Mouse Move +709 847 267 +Mouse Move +711 851 14 +Mouse Move +713 854 17 +Mouse Move +716 857 16 +Mouse Move +718 860 15 +Mouse Move +720 862 16 +Mouse Move +722 864 16 +Mouse Move +724 866 16 +Mouse Move +725 868 14 +Mouse Move +726 870 16 +Mouse Move +727 872 16 +Mouse Move +728 874 16 +Mouse Move +730 877 16 +Mouse Move +731 880 16 +Mouse Move +733 884 14 +Mouse Move +735 891 16 +Mouse Move +737 898 16 +Mouse Move +739 905 16 +Mouse Move +741 913 16 +Mouse Move +744 922 17 +Mouse Move +746 931 15 +Mouse Move +748 939 14 +Mouse Move +749 946 16 +Mouse Move +750 953 17 +Mouse Move +752 959 15 +Mouse Move +753 964 16 +Mouse Move +754 966 16 +Mouse Move +745 968 1491 +Mouse Move +728 969 15 +Mouse Move +707 967 16 +Mouse Move +685 964 16 +Mouse Move +665 958 16 +Mouse Move +649 955 16 +Mouse Move +636 953 17 +Mouse Move +623 951 13 +Mouse Move +611 949 17 +Mouse Move +601 947 16 +Mouse Move +594 947 16 +Mouse Move +588 947 16 +Mouse Move +584 948 15 +Mouse Move +582 949 15 +Mouse Move +579 951 16 +Mouse Move +575 953 16 +Mouse Move +566 955 15 +Mouse Move +552 957 16 +Mouse Move +536 959 16 +Mouse Move +519 961 17 +Mouse Move +506 963 13 +Mouse Move +499 965 16 +Mouse Move +494 967 17 +Mouse Move +492 969 15 +Mouse Move +490 971 16 +Mouse Move +488 973 16 +Mouse Move +486 975 16 +Mouse Move +484 977 14 +Mouse Move +482 980 16 +Mouse Move +480 982 16 +Mouse Move +478 987 16 +Mouse Move +473 993 16 +Mouse Move +466 1000 16 +Mouse Move +458 1007 14 +Mouse Move +450 1013 16 +Mouse Move +442 1020 16 +Mouse Move +434 1026 16 +Mouse Move +426 1031 16 +Mouse Move +419 1034 16 +Mouse Move +411 1036 16 +Mouse Move +403 1038 14 +Mouse Move +396 1040 16 +Mouse Move +389 1040 16 +Mouse Move +384 1038 16 +Mouse Move +381 1036 16 +Mouse Move +377 1034 16 +Mouse Move +373 1029 14 +Mouse Move +370 1023 16 +Mouse Move +367 1018 16 +Mouse Move +365 1012 16 +Mouse Move +363 1006 16 +Mouse Move +361 1002 16 +Mouse Move +359 1000 16 +Mouse Move +358 998 14 +Mouse Move +358 996 269 +Mouse Move +360 994 15 +Mouse Move +361 993 63 +Mouse Move +362 991 23 +Mouse Move +364 989 4641 +Mouse Move +364 987 32 +Mouse Move +365 986 38 +Mouse Move +365 984 48 +Mouse Move +366 983 16 +Mouse Move +366 981 61 +Mouse Move +366 979 24 +Mouse Move +367 977 63 +Mouse Move +367 975 31 +Mouse Move +367 973 40 +Mouse Move +367 971 14 +Mouse Move +367 969 32 +Mouse Move +367 967 16 +Mouse Move +367 965 17 +Mouse Move +367 963 15 +Mouse Move +366 961 17 +Mouse Move +366 959 13 +Mouse Move +364 957 16 +Mouse Move +362 952 16 +Mouse Move +359 946 16 +Mouse Move +357 941 16 +Mouse Move +355 938 16 +Mouse Move +353 935 14 +Mouse Move +352 933 16 +Mouse Move +350 931 16 +Mouse Move +349 930 24 +Mouse Pressed +349 929 0 1 87 +Mouse Released +349 929 256 1 158 +Mouse Move +350 928 62 +Mouse Move +352 926 16 +Mouse Move +355 924 15 +Mouse Move +357 922 16 +Mouse Move +359 921 14 +Mouse Move +363 919 16 +Mouse Move +371 919 17 +Mouse Move +379 919 16 +Mouse Move +387 919 16 +Mouse Move +396 917 15 +Mouse Move +407 916 17 +Mouse Move +419 914 13 +Mouse Move +431 912 17 +Mouse Move +444 909 16 +Mouse Move +460 907 16 +Mouse Move +477 904 15 +Mouse Move +495 898 18 +Mouse Move +512 894 14 +Mouse Move +525 889 15 +Mouse Move +535 886 16 +Mouse Move +546 880 16 +Mouse Move +556 875 16 +Mouse Move +565 871 15 +Mouse Move +572 867 17 +Mouse Move +577 865 13 +Mouse Move +580 863 16 +Mouse Move +583 860 16 +Mouse Move +586 858 16 +Mouse Move +588 856 17 +Mouse Move +590 854 15 +Mouse Move +592 852 16 +Mouse Move +595 850 14 +Mouse Move +598 848 16 +Mouse Move +600 846 16 +Mouse Move +605 843 17 +Mouse Move +611 841 15 +Mouse Move +618 839 16 +Mouse Move +625 837 14 +Mouse Move +633 835 16 +Mouse Move +641 834 16 +Mouse Move +651 834 16 +Mouse Move +661 833 16 +Mouse Move +670 832 16 +Mouse Move +678 831 16 +Mouse Move +684 830 14 +Mouse Move +688 830 16 +Mouse Move +690 831 32 +Mouse Move +691 832 24 +Mouse Move +692 834 30 +Mouse Move +693 836 24 +Mouse Move +695 838 16 +Mouse Move +697 840 16 +Mouse Move +699 842 16 +Mouse Move +701 844 16 +Mouse Move +703 845 14 +Mouse Move +705 847 16 +Mouse Move +707 849 17 +Mouse Move +709 850 15 +Mouse Move +711 850 16 +Mouse Move +713 850 16 +Mouse Move +715 849 47 +Mouse Move +716 847 31 +Mouse Move +716 845 25 +Mouse Move +716 843 38 +Mouse Move +715 841 40 +Mouse Move +713 840 23 +Mouse Move +711 840 87 +Mouse Move +710 841 61 +Mouse Move +709 842 16 +Mouse Move +708 844 24 +Mouse Move +707 846 94 +Mouse Move +707 848 24 +Mouse Move +707 848 172 +Mouse Move +707 846 24 +Mouse Pressed +707 846 0 1 40 +Mouse Move +708 844 149 +Mouse Released +709 844 256 1 48 +Mouse Move +709 843 30 +Mouse Move +711 843 520 +Mouse Move +713 845 21 +Mouse Move +713 847 16 +Mouse Move +713 849 16 +Mouse Move +713 851 16 +Mouse Move +713 854 16 +Mouse Move +714 856 16 +Mouse Move +714 858 14 +Mouse Move +714 860 17 +Mouse Move +714 862 15 +Mouse Move +714 864 24 +Mouse Move +714 866 16 +Mouse Move +713 868 16 +Mouse Move +713 870 14 +Mouse Move +714 873 16 +Mouse Move +716 876 16 +Mouse Move +717 878 17 +Mouse Move +718 880 15 +Mouse Move +718 882 16 +Mouse Move +718 884 14 +Mouse Move +718 886 24 +Mouse Move +718 889 16 +Mouse Move +718 891 17 +Mouse Move +717 893 15 +Mouse Move +716 896 16 +Mouse Move +714 899 14 +Mouse Move +712 902 16 +Mouse Move +710 906 17 +Mouse Move +707 909 15 +Mouse Move +703 914 17 +Mouse Move +697 919 15 +Mouse Move +691 924 16 +Mouse Move +685 930 14 +Mouse Move +677 934 16 +Mouse Move +669 938 16 +Mouse Move +661 940 16 +Mouse Move +653 943 16 +Mouse Move +643 946 16 +Mouse Move +635 948 16 +Mouse Move +627 950 14 +Mouse Move +617 952 17 +Mouse Move +608 954 15 +Mouse Move +600 956 17 +Mouse Move +592 958 16 +Mouse Move +584 960 15 +Mouse Move +576 962 14 +Mouse Move +566 964 16 +Mouse Move +554 966 16 +Mouse Move +540 966 17 +Mouse Move +525 968 16 +Mouse Move +512 970 16 +Mouse Move +500 972 16 +Mouse Move +490 974 14 +Mouse Move +482 976 16 +Mouse Move +474 978 16 +Mouse Move +468 980 16 +Mouse Move +461 982 16 +Mouse Move +455 983 15 +Mouse Move +449 985 14 +Mouse Move +443 987 16 +Mouse Move +436 989 16 +Mouse Move +429 991 16 +Mouse Move +420 993 16 +Mouse Move +411 995 16 +Mouse Move +401 999 16 +Mouse Move +391 1002 14 +Mouse Move +383 1004 16 +Mouse Move +375 1007 16 +Mouse Move +368 1009 16 +Mouse Move +363 1011 17 +Mouse Move +358 1013 15 +Mouse Move +354 1014 16 +Mouse Move +350 1015 14 +Mouse Move +346 1016 16 +Mouse Move +341 1017 16 +Mouse Move +337 1018 16 +Mouse Move +333 1018 16 +Mouse Move +331 1018 16 +Mouse Move +329 1018 14 +Mouse Move +328 1019 16 +Mouse Move +326 1019 24 +Mouse Move +324 1019 32 +Mouse Move +322 1019 17 +Mouse Move +320 1019 13 +Mouse Move +318 1019 24 +Mouse Move +317 1018 65 +Mouse Move +317 1016 220 +Mouse Move +316 1015 14 +Mouse Move +316 1013 23 +Mouse Move +316 1011 41 +Mouse Move +317 1009 1317 +Mouse Move +317 1007 24 +Mouse Move +318 1005 3559 +Mouse Move +319 1003 24 +Mouse Move +319 1001 21 +Mouse Move +319 999 16 +Mouse Move +319 997 24 +Mouse Move +318 993 16 +Mouse Move +315 986 16 +Mouse Move +313 981 14 +Mouse Move +310 978 16 +Mouse Move +308 976 16 +Mouse Move +305 973 16 +Mouse Move +303 970 16 +Mouse Move +300 966 16 +Mouse Move +298 962 16 +Mouse Move +296 960 14 +Mouse Move +294 958 16 +Mouse Move +292 956 16 +Mouse Move +289 953 16 +Mouse Move +285 950 17 +Mouse Move +281 947 15 +Mouse Move +279 945 16 +Mouse Move +278 944 14 +Mouse Move +276 943 17 +Mouse Move +280 941 78 +Mouse Move +287 939 16 +Mouse Move +297 937 16 +Mouse Move +308 935 16 +Mouse Move +319 933 15 +Mouse Move +326 932 16 +Mouse Move +329 931 17 +Mouse Move +331 930 13 +Mouse Move +331 928 24 +Mouse Move +331 926 25 +Mouse Move +333 926 142 +Mouse Pressed +333 926 0 1 0 +Mouse Released +333 925 256 1 163 +Mouse Move +333 926 41 +Mouse Move +330 928 16 +Mouse Move +327 930 14 +Mouse Move +323 932 16 +Mouse Move +319 934 16 +Mouse Move +313 936 16 +Mouse Move +309 937 16 +Mouse Move +305 939 16 +Mouse Move +301 941 14 +Mouse Move +295 942 16 +Mouse Move +289 944 16 +Mouse Move +284 945 16 +Mouse Move +279 945 16 +Mouse Move +273 945 16 +Mouse Move +268 945 16 +Mouse Move +264 945 14 +Mouse Move +262 945 16 +Mouse Move +260 945 15 +Mouse Move +259 943 79 +Mouse Move +258 942 25 +Mouse Pressed +258 942 0 1 46 +Mouse Released +258 942 256 1 172 +Mouse Move +260 941 71 +Mouse Move +264 937 16 +Mouse Move +270 932 15 +Mouse Move +279 925 17 +Mouse Move +294 918 16 +Mouse Move +310 913 16 +Mouse Move +323 907 13 +Mouse Move +333 902 17 +Mouse Move +341 898 16 +Mouse Move +351 893 15 +Mouse Move +364 885 17 +Mouse Move +381 877 16 +Mouse Move +398 871 16 +Mouse Move +413 869 14 +Mouse Move +426 867 15 +Mouse Move +438 865 16 +Mouse Move +450 863 16 +Mouse Move +462 861 16 +Mouse Move +474 859 16 +Mouse Move +486 857 17 +Mouse Move +497 855 13 +Mouse Move +507 853 17 +Mouse Move +517 851 15 +Mouse Move +525 850 16 +Mouse Move +532 848 16 +Mouse Move +538 846 16 +Mouse Move +545 844 14 +Mouse Move +557 842 16 +Mouse Move +573 841 16 +Mouse Move +589 841 16 +Mouse Move +604 841 17 +Mouse Move +618 841 15 +Mouse Move +630 840 16 +Mouse Move +642 838 14 +Mouse Move +649 837 17 +Mouse Move +655 835 15 +Mouse Move +658 833 16 +Mouse Move +661 832 16 +Mouse Move +663 831 16 +Mouse Move +665 831 16 +Mouse Move +667 831 14 +Mouse Move +669 830 16 +Mouse Move +671 830 16 +Mouse Move +673 830 16 +Mouse Move +677 829 16 +Mouse Move +683 828 16 +Mouse Move +689 827 14 +Mouse Move +693 826 16 +Mouse Move +695 827 17 +Mouse Move +697 828 15 +Mouse Move +698 829 16 +Mouse Move +700 830 16 +Mouse Move +702 831 24 +Mouse Move +704 833 14 +Mouse Move +706 834 16 +Mouse Move +708 836 16 +Mouse Move +710 837 16 +Mouse Move +712 838 16 +Mouse Move +714 839 16 +Mouse Move +716 840 22 +Mouse Move +718 841 24 +Mouse Move +720 842 16 +Mouse Move +722 844 24 +Mouse Move +724 845 24 +Mouse Move +726 845 63 +Mouse Move +726 847 85 +Mouse Move +724 849 24 +Mouse Move +722 850 24 +Mouse Move +721 851 30 +Mouse Move +719 851 24 +Mouse Move +717 851 64 +Mouse Move +715 851 30 +Mouse Move +714 850 32 +Mouse Move +712 849 94 +Mouse Move +710 847 24 +Mouse Move +709 846 24 +Mouse Move +708 845 46 +Mouse Move +708 843 48 +Mouse Move +706 842 94 +Mouse Pressed +706 842 0 1 165 +Mouse Move +707 843 220 +Mouse Released +707 843 256 1 0 +Mouse Move +709 844 24 +Mouse Move +711 845 16 +Mouse Move +713 846 21 +Mouse Move +714 847 24 +Mouse Move +715 848 16 +Mouse Move +716 849 33 +Mouse Move +718 850 93 +Mouse Move +720 851 102 +Mouse Move +722 853 24 +Mouse Move +723 854 16 +Mouse Move +724 855 14 +Mouse Move +725 857 17 +Mouse Move +726 859 15 +Mouse Move +727 861 17 +Mouse Move +729 863 15 +Mouse Move +730 866 16 +Mouse Move +732 868 14 +Mouse Move +735 872 16 +Mouse Move +740 875 16 +Mouse Move +742 878 16 +Mouse Move +744 881 16 +Mouse Move +746 884 16 +Mouse Move +748 888 16 +Mouse Move +750 892 14 +Mouse Move +752 894 16 +Mouse Move +753 896 16 +Mouse Move +753 898 40 +Mouse Move +754 900 30 +Mouse Move +754 902 16 +Mouse Move +755 903 16 +Mouse Move +756 905 40 +Mouse Move +751 906 7552 +Mouse Move +745 906 16 +Mouse Move +739 906 17 +Mouse Move +731 905 16 +Mouse Move +723 903 15 +Mouse Move +715 900 16 +Mouse Move +708 895 16 +Mouse Move +702 891 14 +Mouse Move +697 885 17 +Mouse Move +691 880 15 +Mouse Move +685 877 17 +Mouse Move +679 875 15 +Mouse Move +675 874 16 +Mouse Move +673 874 14 +Mouse Move +671 874 16 +Mouse Move +669 875 16 +Mouse Move +667 877 16 +Mouse Move +664 879 16 +Mouse Move +658 882 16 +Mouse Move +653 885 16 +Mouse Move +648 889 14 +Mouse Move +645 892 16 +Mouse Move +643 894 16 +Mouse Move +641 896 16 +Mouse Move +640 898 16 +Mouse Move +638 900 16 +Mouse Move +637 902 14 +Mouse Move +636 905 16 +Mouse Move +634 908 17 +Mouse Move +632 910 16 +Mouse Move +631 912 16 +Mouse Move +629 914 16 +Mouse Move +628 916 16 +Mouse Move +626 918 13 +Mouse Move +624 920 16 +Mouse Move +620 922 16 +Mouse Move +614 923 17 +Mouse Move +605 924 15 +Mouse Move +595 925 16 +Mouse Move +585 926 16 +Mouse Move +576 927 14 +Mouse Move +566 929 17 +Mouse Move +556 930 15 +Mouse Move +548 930 17 +Mouse Move +540 930 16 +Mouse Move +531 930 16 +Mouse Move +522 930 13 +Mouse Move +514 930 16 +Mouse Move +508 929 17 +Mouse Move +503 929 15 +Mouse Move +501 928 16 +Mouse Move +499 928 16 +Mouse Move +497 927 17 +Mouse Move +494 926 13 +Mouse Move +492 924 16 +Mouse Move +489 923 16 +Mouse Move +487 923 32 +Mouse Move +484 923 39 +Mouse Move +480 925 16 +Mouse Move +475 926 16 +Mouse Move +469 927 16 +Mouse Move +465 928 15 +Mouse Move +463 929 17 +Mouse Move +461 929 21 +Mouse Pressed +461 930 0 1 111 +Mouse Released +461 930 256 1 167 +Mouse Pressed +461 930 0 1 1985 +Mouse Released +461 930 256 1 179 +Mouse Move +461 929 1219 +Mouse Move +462 926 23 +Mouse Move +463 925 14 +Mouse Pressed +464 924 0 1 496 +Mouse Released +464 924 256 1 164 +Mouse Move +465 925 1919 +Mouse Move +467 926 21 +Mouse Move +468 928 16 +Mouse Move +469 930 16 +Mouse Move +470 931 14 +Mouse Move +472 932 24 +Mouse Move +474 934 16 +Mouse Move +478 935 17 +Mouse Move +481 936 15 +Mouse Move +484 937 17 +Mouse Move +486 938 13 +Mouse Move +488 938 16 +Mouse Move +490 940 17 +Mouse Move +492 941 15 +Mouse Move +494 942 16 +Mouse Move +498 944 16 +Mouse Move +501 945 16 +Mouse Move +506 947 14 +Mouse Move +512 948 16 +Mouse Move +518 950 16 +Mouse Move +524 951 17 +Mouse Move +537 953 16 +Mouse Move +553 955 15 +Mouse Move +566 956 14 +Mouse Move +578 956 16 +Mouse Move +586 954 17 +Mouse Move +592 952 15 +Mouse Move +596 950 16 +Mouse Move +598 948 16 +Mouse Move +600 943 16 +Mouse Move +602 937 14 +Mouse Move +603 930 16 +Mouse Move +604 922 16 +Mouse Move +605 913 16 +Mouse Move +606 905 16 +Mouse Move +605 900 16 +Mouse Move +605 894 14 +Mouse Move +605 890 16 +Mouse Move +605 888 16 +Mouse Move +605 886 189 +Mouse Move +610 886 165 +Mouse Move +616 886 16 +Mouse Move +622 886 16 +Mouse Move +626 888 14 +Mouse Move +629 891 17 +Mouse Move +633 896 15 +Mouse Move +639 899 16 +Mouse Move +644 901 16 +Mouse Move +650 903 16 +Mouse Move +656 906 16 +Mouse Move +662 912 14 +Mouse Move +669 918 16 +Mouse Move +675 924 16 +Mouse Move +679 930 16 +Mouse Move +680 938 16 +Mouse Move +679 948 17 +Mouse Move +675 957 13 +Mouse Move +670 963 16 +Mouse Move +666 967 16 +Mouse Move +662 969 16 +Mouse Move +660 971 16 +Mouse Move +659 972 55 +Mouse Move +660 972 32 +Mouse Move +661 970 23 +Mouse Move +661 968 16 +Mouse Move +657 966 14 +Mouse Move +649 964 16 +Mouse Move +640 962 16 +Mouse Move +630 959 16 +Mouse Move +616 956 16 +Mouse Move +599 953 16 +Mouse Move +580 951 16 +Mouse Move +562 949 14 +Mouse Move +540 947 17 +Mouse Move +518 945 15 +Mouse Move +500 943 16 +Mouse Move +483 944 17 +Mouse Move +471 946 16 +Mouse Move +464 948 16 +Mouse Move +458 950 13 +Mouse Move +452 952 17 +Mouse Move +443 953 15 +Mouse Move +430 954 16 +Mouse Move +416 953 16 +Mouse Move +406 952 16 +Mouse Move +402 950 14 +Mouse Move +400 948 41 +Mouse Move +398 946 23 +Mouse Move +395 944 16 +Mouse Move +388 942 16 +Mouse Move +380 940 14 +Mouse Move +372 938 17 +Mouse Move +366 936 16 +Mouse Move +364 934 16 +Mouse Move +363 933 31 +Mouse Move +363 931 47 +Mouse Move +362 929 15 +Mouse Move +360 927 16 +Mouse Move +358 926 16 +Mouse Move +356 926 16 +Mouse Move +353 926 14 +Mouse Move +350 926 16 +Mouse Move +348 926 24 +Mouse Move +346 926 110 +Mouse Move +344 927 16 +Mouse Move +342 927 17 +Mouse Move +340 927 16 +Mouse Move +338 927 13 +Mouse Move +335 928 16 +Mouse Move +330 929 16 +Mouse Move +322 929 16 +Mouse Move +311 930 16 +Mouse Move +298 932 16 +Mouse Move +288 933 14 +Mouse Move +280 934 16 +Mouse Move +273 936 16 +Mouse Move +267 937 17 +Mouse Move +262 938 16 +Mouse Move +259 939 16 +Mouse Move +257 939 15 +Mouse Move +255 940 14 +Mouse Move +253 940 16 +Mouse Move +251 941 16 +Mouse Move +249 941 16 +Mouse Move +250 941 71 +Mouse Pressed +250 941 0 1 23 +Mouse Released +250 941 256 1 119 +Mouse Move +253 939 40 +Mouse Move +256 936 14 +Mouse Move +261 933 16 +Mouse Move +268 929 15 +Mouse Move +281 925 17 +Mouse Move +300 919 16 +Mouse Move +326 916 16 +Mouse Move +348 915 13 +Mouse Move +365 917 16 +Mouse Move +379 917 17 +Mouse Move +389 915 15 +Mouse Move +397 913 16 +Mouse Move +405 911 17 +Mouse Move +413 909 15 +Mouse Move +424 908 14 +Mouse Move +435 907 16 +Mouse Move +443 907 16 +Mouse Move +448 908 17 +Mouse Move +451 910 18 +Mouse Move +454 912 14 +Mouse Move +460 912 15 +Mouse Move +468 913 14 +Mouse Move +478 913 17 +Mouse Move +491 913 16 +Mouse Move +505 914 15 +Mouse Move +518 915 17 +Mouse Move +530 917 15 +Mouse Move +541 919 14 +Mouse Move +549 919 17 +Mouse Move +555 920 15 +Mouse Move +561 920 17 +Mouse Move +567 920 16 +Mouse Move +572 920 16 +Mouse Move +578 920 16 +Mouse Move +585 921 13 +Mouse Move +592 922 16 +Mouse Move +602 923 16 +Mouse Move +615 925 16 +Mouse Move +628 926 17 +Mouse Move +638 928 16 +Mouse Move +643 928 13 +Mouse Move +645 928 19 +Mouse Move +647 928 21 +Mouse Move +649 928 17 +Mouse Move +651 927 15 +Mouse Move +653 926 24 +Mouse Move +655 925 15 +Mouse Move +657 924 15 +Mouse Move +659 923 16 +Mouse Pressed +659 923 0 1 1 +Mouse Move +660 924 150 +Mouse Released +660 924 256 1 15 +Mouse Move +660 926 23 +Mouse Move +660 928 32 +Mouse Move +661 930 706 +Mouse Move +662 931 284 +Mouse Move +663 932 54 +Mouse Move +664 933 16 +Mouse Move +666 934 16 +Mouse Move +667 935 37 +Mouse Move +668 936 16 +Mouse Move +665 938 16 +Mouse Move +661 941 17 +Mouse Move +654 944 15 +Mouse Move +642 947 16 +Mouse Move +625 950 16 +Mouse Move +608 952 14 +Mouse Move +597 953 17 +Mouse Move +594 953 16 +Mouse Move +593 953 93 +Mouse Move +590 954 24 +Mouse Move +588 955 16 +Mouse Move +584 955 16 +Mouse Move +580 954 16 +Mouse Move +577 952 14 +Mouse Move +573 950 16 +Mouse Move +568 947 16 +Mouse Move +561 943 17 +Mouse Move +554 938 16 +Mouse Move +548 934 16 +Mouse Move +542 931 14 +Mouse Move +538 929 16 +Mouse Move +536 927 15 +Mouse Move +534 925 16 +Mouse Move +533 923 16 +Mouse Move +533 921 24 +Mouse Move +532 919 22 +Mouse Move +532 917 32 +Mouse Move +532 915 40 +Mouse Pressed +532 915 0 1 95 +Mouse Released +532 915 256 1 180 +Mouse Move +535 917 378 +Mouse Move +538 919 13 +Mouse Move +541 921 16 +Mouse Move +543 922 17 +Mouse Move +545 922 15 +Mouse Move +546 923 16 +Mouse Move +549 924 16 +Mouse Move +555 925 14 +Mouse Move +565 924 16 +Mouse Move +573 922 16 +Key Pressed +Left 2127 +Key Released +Left 136 +Key Pressed +Left 81 +Key Released +Left 144 +Key Pressed +Left 63 +Key Released +Left 129 +Key Pressed +Left 55 +Key Released +Left 160 +Key Pressed +Return 986 +Key Released +Return 119 +Key Pressed +Return 671 +Key Released +Return 121 +Key Pressed +Right 536 +Key Released +Right 160 +Key Pressed +Up 360 +Key Released +Up 152 +Key Pressed +Return 87 +Key Released +Return 129 +Key Pressed +Up 71 +Key Released +Up 113 +Key Pressed +Return 55 +Key Released +Return 89 +Key Pressed +Up 39 +Key Released +Up 160 +Key Pressed +Return 24 +Key Released +Return 137 +Key Pressed +Left 464 +Key Released +Left 216 +Key Pressed +Left 216 +Key Released +Left 136 +Key Pressed +Return 103 +Key Released +Return 121 +Key Pressed +Right 216 +Key Released +Right 175 +Key Pressed +Right 112 +Key Released +Right 129 +Key Pressed +Return 247 +Key Released +Return 104 +Key Pressed +Down 80 +Key Released +Down 121 +Key Pressed +Return 79 +Key Released +Return 97 +Key Pressed +Down 88 +Key Released +Down 120 +Key Pressed +Return 56 +Key Released +Return 104 +Key Pressed +Left 183 +Key Released +Left 153 +Key Pressed +Return 159 +Key Released +Return 129 +Key Pressed +Return 879 +Key Released +Return 128 +Key Pressed +Right 793 +Key Released +Right 103 +Key Pressed +Right 81 +Key Released +Right 112 +Key Pressed +Right 80 +Key Released +Right 104 +Key Pressed +Right 64 +Key Released +Right 136 +Key Pressed +Return 208 +Key Released +Return 136 +Key Pressed +Right 424 +Key Released +Right 136 +Key Pressed +Right 216 +Key Released +Right 168 +Key Pressed +Return 432 +Key Released +Return 72 +Key Pressed +Down 983 +Key Released +Down 121 +Key Pressed +Down 64 +Key Released +Down 120 +Key Pressed +Return 112 +Key Released +Return 120 +Key Pressed +Super_L 1840 +Key Released +Super_L 137 +Key Pressed +Right 615 +Key Released +Right 144 +Key Pressed +Return 119 +Key Released +Return 129 +Key Pressed +Return 744 +Key Released +Return 136 +Key Pressed +Down 1576 +Key Released +Down 128 +Key Pressed +Down 64 +Key Released +Down 119 +Key Pressed +Left 97 +Key Released +Left 127 +Key Pressed +Left 73 +Key Released +Left 128 +Key Pressed +Return 199 +Key Released +Return 137 +Key Pressed +Left 552 +Key Released +Left 111 +Key Pressed +Left 152 +Key Released +Left 129 +Key Pressed +Left 135 +Key Released +Left 128 +Key Pressed +Left 201 +Key Released +Left 144 +Key Pressed +Return 256 +Key Released +Return 128 +Key Pressed +Down 1000 +Key Released +Down 144 +Key Pressed +Return 223 +Key Released +Return 129 +Key Pressed +Escape 720 +Key Released +Escape 151 +Key Pressed +Escape 689 +Key Released +Escape 152 +Key Pressed +Left 639 +Key Released +Left 185 +Key Pressed +Right 1000 +Key Released +Right 128 +Key Pressed +Up 208 +Key Released +Up 136 +Key Pressed +Return 728 +Key Released +Return 104 +Mouse Move +546 916 3411 +Mouse Move +539 918 14 +Mouse Move +533 920 16 +Mouse Move +527 922 16 +Mouse Move +519 923 16 +Mouse Move +507 922 16 +Mouse Move +491 912 16 +Mouse Move +475 895 16 +Mouse Move +470 872 14 +Mouse Move +471 845 16 +Mouse Move +476 816 16 +Mouse Move +490 786 16 +Mouse Move +500 758 16 +Mouse Move +501 741 16 +Mouse Move +491 736 14 +Mouse Move +476 737 16 +Mouse Move +457 745 16 +Mouse Move +443 758 16 +Mouse Move +430 775 16 +Mouse Move +423 799 16 +Mouse Move +421 827 14 +Mouse Move +420 855 16 +Mouse Move +425 878 16 +Mouse Move +432 898 16 +Mouse Move +439 916 16 +Mouse Move +445 930 16 +Mouse Move +449 940 16 +Mouse Move +452 947 14 +Mouse Move +454 952 16 +Mouse Move +454 955 16 +Mouse Move +455 959 16 +Mouse Move +457 963 16 +Mouse Move +459 965 16 +Mouse Move +461 965 14 +Mouse Move +463 965 16 +Mouse Move +465 964 16 +Mouse Move +470 962 16 +Mouse Move +476 958 16 +Mouse Move +479 954 16 +Mouse Move +480 950 14 +Mouse Move +479 945 16 +Mouse Move +477 938 16 +Mouse Move +473 932 16 +Mouse Move +467 924 16 +Mouse Move +462 919 16 +Mouse Move +461 917 14 +Mouse Move +460 916 56 +Mouse Pressed +460 916 0 1 32 +Mouse Released +460 916 256 1 124 +Mouse Move +471 917 510 +Mouse Move +484 919 16 +Mouse Move +496 921 16 +Mouse Move +505 923 16 +Mouse Move +516 925 16 +Mouse Move +532 927 14 +Mouse Move +550 928 16 +Mouse Move +573 932 16 +Mouse Move +596 936 16 +Mouse Move +616 940 16 +Mouse Move +632 941 16 +Mouse Move +644 942 14 +Mouse Move +652 942 16 +Mouse Move +660 940 16 +Mouse Move +669 939 16 +Mouse Move +677 937 16 +Mouse Move +683 936 16 +Mouse Move +688 935 16 +Mouse Move +690 934 14 +Mouse Move +692 933 16 +Mouse Move +694 931 16 +Mouse Move +696 930 24 +Mouse Move +698 926 86 +Mouse Move +700 923 16 +Mouse Move +701 921 16 +Mouse Move +700 919 30 +Mouse Move +698 918 16 +Mouse Move +695 918 16 +Mouse Move +693 918 16 +Mouse Move +691 918 16 +Mouse Move +689 918 16 +Mouse Move +683 919 14 +Mouse Move +677 921 16 +Mouse Move +671 921 16 +Mouse Move +669 921 16 +Mouse Move +667 922 16 +Mouse Move +665 923 16 +Mouse Move +663 924 14 +Mouse Move +661 925 16 +Mouse Move +659 926 16 +Mouse Move +657 926 16 +Mouse Move +656 927 16 +Mouse Move +654 927 212 +Mouse Move +652 927 22 +Mouse Move +651 928 16 +Mouse Pressed +650 928 0 1 754 +Mouse Released +650 928 256 1 132 +Mouse Move +649 928 1044 +Mouse Move +646 928 24 +Mouse Move +644 928 22 +Mouse Move +642 928 16 +Mouse Move +640 928 16 +Mouse Move +638 928 32 +Mouse Pressed +638 928 0 1 116 +Mouse Released +638 928 256 1 3326 +Mouse Move +627 933 714 +Mouse Move +614 938 16 +Mouse Move +598 941 14 +Mouse Move +580 946 16 +Mouse Move +559 948 16 +Mouse Move +530 950 16 +Mouse Move +507 955 16 +Mouse Move +481 955 16 +Mouse Move +451 951 16 +Mouse Move +423 948 14 +Mouse Move +399 947 16 +Mouse Move +379 947 16 +Mouse Move +362 947 16 +Mouse Move +351 948 16 +Mouse Move +346 948 16 +Mouse Move +345 946 86 +Mouse Move +346 943 16 +Mouse Move +348 938 14 +Mouse Move +350 935 16 +Mouse Move +351 933 16 +Mouse Move +352 931 16 +Mouse Move +352 929 16 +Mouse Move +352 927 24 +Mouse Move +353 926 14 +Mouse Move +354 924 16 +Mouse Move +355 922 16 +Mouse Move +356 920 16 +Mouse Move +358 920 16 +Mouse Pressed +358 920 0 1 38 +Mouse Released +358 919 256 1 118 +Mouse Move +358 923 174 +Mouse Move +359 929 14 +Mouse Move +361 935 16 +Mouse Move +362 938 16 +Mouse Move +363 940 16 +Mouse Move +363 942 62 +Mouse Move +362 944 24 +Mouse Move +360 946 16 +Mouse Move +358 948 16 +Mouse Move +356 950 14 +Mouse Move +354 952 16 +Mouse Move +352 954 16 +Mouse Move +351 956 16 +Mouse Move +350 958 16 +Mouse Move +348 960 24 +Mouse Move +347 958 140 +Mouse Move +346 956 17 +Mouse Move +345 954 15 +Mouse Move +345 952 16 +Mouse Move +345 949 14 +Mouse Move +346 945 16 +Mouse Move +346 941 16 +Mouse Move +347 938 16 +Mouse Move +348 935 16 +Mouse Move +349 933 16 +Mouse Move +350 931 16 +Mouse Move +350 929 14 +Mouse Pressed +351 928 0 1 260 +Mouse Released +351 928 256 1 140 +Mouse Move +351 929 150 +Mouse Move +351 935 18 +Mouse Move +351 942 14 +Mouse Move +351 948 14 +Mouse Move +353 956 16 +Mouse Move +355 964 16 +Mouse Move +356 970 16 +Mouse Move +357 972 16 +Mouse Move +357 974 15 +Mouse Move +357 974 189 +Mouse Move +357 970 14 +Mouse Move +357 964 16 +Mouse Move +356 959 16 +Mouse Move +356 956 16 +Mouse Move +355 952 16 +Mouse Move +355 946 16 +Mouse Move +354 943 14 +Mouse Move +354 939 16 +Mouse Move +354 936 16 +Mouse Move +354 934 16 +Mouse Move +354 932 16 +Mouse Move +354 930 16 +Mouse Move +355 928 14 +Mouse Move +355 926 16 +Mouse Move +355 924 16 +Mouse Move +355 922 32 +Mouse Move +355 920 54 +Mouse Pressed +355 920 0 1 518 +Mouse Released +355 920 256 1 126 +Mouse Move +356 927 234 +Mouse Move +357 935 16 +Mouse Move +359 943 16 +Mouse Move +360 951 16 +Mouse Move +360 957 16 +Mouse Move +359 959 16 +Mouse Move +357 961 14 +Mouse Move +355 963 16 +Mouse Move +353 965 16 +Mouse Move +348 968 16 +Mouse Move +342 970 16 +Mouse Move +336 972 16 +Mouse Move +329 974 14 +Mouse Move +324 974 16 +Mouse Move +322 974 16 +Mouse Move +320 975 16 +Mouse Move +318 975 16 +Mouse Move +316 975 16 +Mouse Move +313 975 16 +Mouse Move +309 974 14 +Mouse Move +303 973 16 +Mouse Move +298 971 16 +Mouse Move +294 969 16 +Mouse Move +285 964 16 +Mouse Move +279 958 16 +Mouse Move +276 952 14 +Mouse Move +274 946 16 +Mouse Move +271 940 16 +Mouse Move +269 935 16 +Mouse Move +267 931 16 +Mouse Move +266 928 16 +Mouse Move +264 926 14 +Mouse Move +263 924 24 +Mouse Move +261 923 56 +Mouse Pressed +261 922 0 1 132 +Mouse Released +261 922 256 1 110 +Key Pressed +Right 1211 +Key Released +Right 128 +Key Pressed +Right 112 +Key Released +Right 136 +Key Pressed +Right 72 +Key Released +Right 136 +Key Pressed +Right 80 +Key Released +Right 144 +Key Pressed +Right 200 +Key Released +Right 144 +Key Pressed +Super_L 648 +Key Released +Super_L 128 +Key Pressed +Right 536 +Key Released +Right 136 +Key Pressed +Return 370 +Key Released +Return 150 +Key Pressed +Left 400 +Key Released +Left 136 +Key Pressed +Return 208 +Key Released +Return 88 +Key Pressed +Down 1056 +Key Released +Down 104 +Key Pressed +Down 176 +Key Released +Down 152 +Key Pressed +Left 136 +Key Released +Left 112 +Key Pressed +Left 176 +Key Released +Left 144 +Key Pressed +Return 1256 +Key Released +Return 112 +Key Pressed +Return 904 +Key Released +Return 136 +Key Pressed +Escape 648 +Key Released +Escape 176 +Key Pressed +Escape 536 +Key Released +Escape 160 +Key Pressed +Down 1000 +Key Released +Down 136 +Key Pressed +Down 472 +Key Released +Down 152 +Key Pressed +Down 424 +Key Released +Down 160 +Key Pressed +Down 512 +Key Released +Down 144 +Key Pressed +Down 648 +Key Released +Down 152 +Key Pressed +Right 400 +Key Released +Right 120 +Key Pressed +Return 792 +Key Released +Return 128 +Mouse Move +1422 676 1003 +Mouse Move +1322 609 16 +Mouse Move +1275 577 16 +Mouse Move +1232 553 16 +Mouse Move +1199 533 16 +Mouse Move +1175 516 16 +Mouse Move +1159 504 14 +Mouse Move +1154 492 16 +Mouse Move +1154 479 16 +Mouse Move +1156 469 16 +Mouse Move +1158 465 16 +Mouse Move +1159 462 78 +Mouse Move +1161 449 16 +Mouse Move +1162 445 16 +Mouse Move +1163 443 78 +Mouse Move +1165 437 16 +Mouse Move +1166 430 16 +Mouse Move +1166 423 16 +Mouse Move +1167 415 14 +Mouse Move +1167 407 16 +Mouse Move +1169 401 16 +Mouse Move +1170 398 16 +Mouse Move +1170 396 62 +Mouse Move +1168 394 16 +Mouse Move +1166 393 16 +Mouse Move +1164 393 16 +Mouse Move +1158 400 16 +Mouse Move +1152 410 16 +Mouse Move +1144 422 14 +Mouse Move +1135 435 16 +Mouse Move +1125 445 16 +Mouse Move +1118 454 16 +Mouse Move +1113 460 16 +Mouse Move +1111 462 16 +Key Pressed +Up 945 +Key Released +Up 112 +Key Pressed +Return 336 +Key Released +Return 112 +Key Pressed +Down 320 +Key Released +Down 128 +Key Pressed +Return 265 +Key Released +Return 135 +Key Pressed +Right 160 +Key Released +Right 152 +Key Pressed +Left 976 +Key Released +Left 184 +Key Pressed +Down 368 +Key Released +Down 144 +Key Pressed +Up 240 +Key Released +Up 160 +Key Pressed +Up 224 +Key Released +Up 112 +Key Pressed +Return 2168 +Key Released +Return 160 +Mouse Move +1110 462 1839 +Mouse Move +1088 447 14 +Mouse Move +1044 425 16 +Mouse Move +982 411 16 +Mouse Move +912 408 16 +Mouse Move +840 418 16 +Mouse Move +787 425 16 +Mouse Move +752 432 14 +Mouse Move +723 444 16 +Mouse Move +700 459 16 +Mouse Move +674 476 16 +Mouse Move +644 493 16 +Mouse Move +617 507 16 +Mouse Move +588 515 16 +Mouse Move +563 518 14 +Mouse Move +541 519 16 +Mouse Move +516 519 16 +Mouse Move +493 524 16 +Mouse Move +474 530 16 +Mouse Move +458 538 16 +Mouse Move +443 550 16 +Mouse Move +429 565 14 +Mouse Move +416 584 16 +Mouse Move +404 599 16 +Mouse Move +395 616 16 +Mouse Move +387 633 16 +Mouse Move +378 657 16 +Mouse Move +371 681 14 +Mouse Move +362 702 16 +Mouse Move +349 719 16 +Mouse Move +337 731 16 +Mouse Move +325 738 16 +Mouse Move +311 745 16 +Mouse Move +295 753 16 +Mouse Move +276 760 14 +Mouse Move +258 762 16 +Mouse Move +242 764 16 +Mouse Move +230 768 16 +Mouse Move +222 774 16 +Mouse Move +215 780 16 +Mouse Move +209 786 14 +Mouse Move +205 793 16 +Mouse Move +203 801 16 +Mouse Move +203 808 16 +Mouse Move +203 811 16 +Mouse Move +202 813 16 +Mouse Move +200 815 16 +Mouse Move +196 821 14 +Mouse Move +191 827 16 +Mouse Move +185 832 16 +Mouse Move +180 834 16 +Mouse Pressed +179 834 0 1 118 +Mouse Released +179 834 256 1 140 +Mouse Move +178 834 88 +Mouse Move +176 834 16 +Mouse Move +171 833 14 +Mouse Move +162 831 16 +Mouse Move +154 829 16 +Mouse Move +153 829 212 +Mouse Move +172 831 16 +Mouse Move +203 835 16 +Mouse Move +242 835 16 +Mouse Move +288 840 14 +Mouse Move +338 842 16 +Mouse Move +398 844 16 +Mouse Move +466 843 16 +Mouse Move +532 850 16 +Mouse Move +596 860 16 +Mouse Move +658 873 14 +Mouse Move +714 877 16 +Mouse Move +757 885 16 +Mouse Move +794 891 16 +Mouse Move +828 892 16 +Mouse Move +858 892 16 +Mouse Move +885 893 16 +Mouse Move +912 899 14 +Mouse Move +939 904 16 +Mouse Move +965 908 16 +Mouse Move +992 914 16 +Mouse Move +1018 918 16 +Mouse Move +1042 921 16 +Mouse Move +1068 922 16 +Mouse Move +1092 921 14 +Mouse Move +1109 921 16 +Mouse Move +1121 921 16 +Mouse Move +1138 917 18 +Mouse Move +1159 907 14 +Mouse Move +1177 899 16 +Mouse Move +1188 894 14 +Mouse Move +1197 892 16 +Mouse Move +1208 890 16 +Mouse Move +1222 887 16 +Mouse Move +1243 882 16 +Mouse Move +1263 877 16 +Mouse Move +1278 874 16 +Mouse Move +1288 874 14 +Mouse Move +1294 878 16 +Mouse Move +1303 887 16 +Mouse Move +1320 896 16 +Mouse Move +1346 903 16 +Mouse Move +1379 907 16 +Mouse Move +1408 906 14 +Mouse Move +1435 907 16 +Mouse Move +1465 914 16 +Mouse Move +1499 919 16 +Mouse Move +1535 925 16 +Mouse Move +1568 930 16 +Mouse Move +1594 936 16 +Mouse Move +1612 942 14 +Mouse Move +1628 949 16 +Mouse Move +1643 955 16 +Mouse Move +1661 958 18 +Mouse Move +1681 960 14 +Mouse Move +1703 961 16 +Mouse Move +1722 962 16 +Mouse Move +1736 965 14 +Mouse Move +1746 970 16 +Mouse Move +1753 978 16 +Mouse Move +1758 986 16 +Mouse Move +1768 996 16 +Mouse Move +1780 1005 16 +Mouse Move +1795 1013 14 +Mouse Move +1806 1020 16 +Mouse Move +1811 1026 16 +Mouse Move +1814 1030 18 +Mouse Move +1816 1034 14 +Mouse Move +1816 1036 16 +Mouse Move +1814 1036 30 +Mouse Move +1811 1037 16 +Mouse Move +1808 1039 16 +Mouse Move +1804 1039 24 +Mouse Move +1802 1039 16 +Mouse Move +1800 1038 16 +Mouse Move +1797 1037 14 +Mouse Move +1795 1035 16 +Mouse Move +1791 1033 16 +Mouse Move +1788 1030 24 +Mouse Move +1786 1029 90 +Mouse Pressed +1786 1029 0 1 860 +Mouse Released +1786 1029 256 1 156 +Mouse Move +1784 1029 142 +Key Pressed +Return 2749 +Key Released +Return 200 +Mouse Move +1782 1029 1165 +Mouse Move +1721 1023 16 +Mouse Move +1638 1017 14 +Mouse Move +1543 1017 16 +Mouse Move +1461 1026 16 +Mouse Move +1406 1021 16 +Mouse Move +1377 1017 16 +Mouse Move +1363 1022 16 +Mouse Move +1360 1026 14 +Mouse Move +1360 1028 32 +Mouse Move +1361 1039 40 +Mouse Move +1363 1052 16 +Mouse Move +1365 1061 14 +Mouse Move +1367 1051 32 +Mouse Move +1366 1024 18 +Mouse Move +1364 984 14 +Mouse Move +1363 940 16 +Mouse Move +1363 895 16 +Mouse Move +1368 849 14 +Mouse Move +1372 804 16 +Mouse Move +1377 763 16 +Mouse Move +1379 733 16 +Mouse Move +1379 709 16 +Mouse Move +1378 688 16 +Mouse Move +1379 672 14 +Mouse Move +1379 663 16 +Mouse Move +1379 657 18 +Mouse Move +1378 654 14 +Mouse Move +1378 652 16 +Mouse Move +1377 650 16 +Mouse Move +1376 648 16 +Mouse Move +1376 646 14 +Mouse Move +1375 644 16 +Key Pressed +Down 783 +Key Released +Down 144 +Key Pressed +Down 72 +Key Released +Down 144 +Key Pressed +Return 448 +Key Released +Return 112 +Key Pressed +Up 104 +Key Released +Up 136 +Key Pressed +Return 80 +Key Released +Return 112 +Key Pressed +Up 136 +Key Released +Up 136 +Key Pressed +Up 104 +Key Released +Up 136 +Key Pressed +Up 88 +Key Released +Up 144 +Key Pressed +Up 104 +Key Released +Up 152 +Key Pressed +Up 584 +Key Released +Up 168 +Key Pressed +Return 712 +Key Released +Return 112 +Mouse Move +1372 643 807 +Mouse Move +1363 646 20 +Mouse Move +1335 655 20 +Mouse Move +1308 658 16 +Mouse Move +1276 659 14 +Mouse Move +1248 661 16 +Mouse Move +1222 667 16 +Mouse Move +1193 671 16 +Mouse Move +1147 666 24 +Mouse Move +1120 652 16 +Mouse Move +1094 640 14 +Mouse Move +1075 631 16 +Mouse Move +1059 621 18 +Mouse Move +1046 609 14 +Mouse Move +1036 598 16 +Mouse Move +1028 590 16 +Mouse Move +1020 583 16 +Mouse Move +1012 577 14 +Mouse Move +1000 567 16 +Mouse Move +988 556 16 +Mouse Move +978 549 16 +Mouse Move +970 547 16 +Mouse Move +958 548 16 +Mouse Move +946 553 14 +Mouse Move +935 561 16 +Mouse Move +924 564 16 +Mouse Move +912 566 16 +Mouse Move +900 568 16 +Mouse Move +887 572 16 +Mouse Move +871 581 16 +Mouse Move +855 595 14 +Mouse Move +837 611 16 +Mouse Move +815 627 16 +Mouse Move +793 645 16 +Mouse Move +769 663 16 +Mouse Move +743 686 16 +Mouse Move +717 715 14 +Mouse Move +694 743 16 +Mouse Move +672 768 16 +Mouse Move +655 794 16 +Mouse Move +644 811 16 +Mouse Move +636 823 16 +Mouse Move +630 832 16 +Mouse Move +624 840 14 +Mouse Move +618 848 16 +Mouse Move +612 856 16 +Mouse Move +606 863 16 +Mouse Move +602 868 16 +Mouse Move +600 871 16 +Mouse Move +600 875 14 +Mouse Move +600 880 16 +Mouse Move +601 885 16 +Mouse Move +605 887 16 +Mouse Move +613 889 16 +Mouse Move +625 891 16 +Mouse Move +636 897 16 +Mouse Move +647 903 14 +Mouse Move +654 906 16 +Mouse Move +662 910 16 +Mouse Move +671 914 16 +Mouse Move +682 918 16 +Mouse Move +696 923 16 +Mouse Move +709 929 16 +Mouse Move +720 937 14 +Mouse Move +732 943 16 +Mouse Move +744 947 16 +Mouse Move +761 948 16 +Mouse Move +778 945 16 +Mouse Move +793 940 16 +Mouse Move +808 936 14 +Mouse Move +823 932 16 +Mouse Move +841 930 16 +Mouse Move +858 931 16 +Mouse Move +868 931 16 +Mouse Move +875 930 16 +Mouse Move +882 930 16 +Mouse Move +889 930 14 +Mouse Move +899 931 16 +Mouse Move +915 932 16 +Mouse Move +937 934 16 +Mouse Move +964 934 16 +Mouse Move +987 934 16 +Mouse Move +1004 935 14 +Mouse Move +1017 933 16 +Mouse Move +1029 933 16 +Mouse Move +1041 934 16 +Mouse Move +1051 936 16 +Mouse Move +1058 937 16 +Mouse Move +1061 939 16 +Mouse Move +1067 941 14 +Mouse Move +1078 943 16 +Mouse Move +1090 945 16 +Mouse Move +1102 947 24 +Mouse Move +1104 948 16 +Mouse Move +1104 946 46 +Mouse Move +1104 944 26 +Mouse Move +1106 942 14 +Mouse Move +1108 943 62 +Mouse Pressed +1108 943 0 1 0 +Mouse Move +1109 944 80 +Mouse Released +1109 944 256 1 78 +Mouse Move +1113 944 548 +Mouse Move +1118 943 16 +Mouse Move +1127 942 16 +Mouse Move +1143 944 16 +Mouse Move +1164 949 16 +Mouse Move +1188 956 16 +Mouse Move +1216 962 16 +Mouse Move +1244 966 14 +Mouse Move +1272 970 16 +Mouse Move +1302 973 16 +Mouse Move +1334 975 16 +Mouse Move +1369 979 16 +Mouse Move +1403 986 16 +Mouse Move +1435 993 16 +Mouse Move +1464 998 14 +Mouse Move +1489 1001 16 +Mouse Move +1511 1005 16 +Mouse Move +1530 1007 16 +Mouse Move +1548 1007 16 +Mouse Move +1566 1009 16 +Mouse Move +1580 1011 14 +Mouse Move +1587 1013 16 +Mouse Move +1589 1015 40 +Mouse Move +1595 1018 17 +Mouse Move +1602 1021 15 +Mouse Move +1611 1023 14 +Mouse Move +1623 1023 16 +Mouse Move +1635 1021 16 +Mouse Move +1647 1020 18 +Mouse Move +1659 1020 14 +Mouse Move +1674 1022 16 +Mouse Move +1690 1023 16 +Mouse Move +1705 1024 14 +Mouse Move +1717 1024 16 +Mouse Move +1731 1023 16 +Mouse Move +1747 1023 16 +Mouse Move +1763 1027 16 +Mouse Move +1777 1029 16 +Mouse Move +1786 1031 14 +Mouse Move +1793 1033 16 +Mouse Move +1796 1035 18 +Mouse Move +1798 1036 14 +Mouse Move +1800 1037 24 +Mouse Pressed +1800 1037 0 1 110 +Mouse Released +1800 1037 256 1 140 +Mouse Move +1788 1039 504 +Mouse Move +1772 1041 14 +Mouse Move +1734 1035 24 +Mouse Move +1693 1023 16 +Mouse Move +1647 1012 16 +Mouse Move +1604 997 16 +Mouse Move +1567 983 16 +Mouse Move +1535 971 14 +Mouse Move +1497 954 24 +Mouse Move +1480 941 16 +Mouse Move +1466 932 16 +Mouse Move +1455 926 16 +Mouse Move +1449 925 16 +Key Pressed +Right 1045 +Key Released +Right 176 +Key Pressed +Right 440 +Key Released +Right 128 +Key Pressed +Up 456 +Key Released +Up 168 +Key Pressed +Right 192 +Key Released +Right 128 +Key Pressed +Return 320 +Key Released +Return 136 +Key Pressed +Down 552 +Key Released +Down 184 +Key Pressed +Return 337 +Key Released +Return 143 +Key Pressed +Return 880 +Key Released +Return 144 +Key Pressed +Up 728 +Key Released +Up 160 +Key Pressed +Return 698 +Key Released +Return 150 +Key Pressed +Down 640 +Key Released +Down 184 +Key Pressed +Right 560 +Key Released +Right 152 +Key Pressed +Return 2096 +Key Released +Return 168 +Key Pressed +Down 968 +Key Released +Down 184 +Key Pressed +Up 864 +Key Released +Up 160 +Key Pressed +Right 208 +Key Released +Right 152 +Key Pressed +Right 264 +Key Released +Right 104 +Key Pressed +Return 664 +Key Released +Return 160 +Key Pressed +Left 1056 +Key Released +Left 176 +Key Pressed +Return 856 +Key Released +Return 200 +Key Pressed +Left 976 +Key Released +Left 176 +Key Pressed +Return 1016 +Key Released +Return 168 +Key Pressed +Left 1704 +Key Released +Left 144 +Key Pressed +Left 192 +Key Released +Left 144 +Key Pressed +Return 641 +Key Released +Return 151 +Key Pressed +Escape 448 +Key Released +Escape 152 +Key Pressed +Escape 1824 +Key Released +Escape 160 +Key Pressed +Up 1305 +Key Released +Up 151 +Key Pressed +Up 584 +Key Released +Up 152 +Key Pressed +Up 448 +Key Released +Up 168 +Key Pressed +Up 552 +Key Released +Up 192 +Key Pressed +Up 568 +Key Released +Up 192 +Key Pressed +Right 424 +Key Released +Right 176 +Key Pressed +Super_L 592 +Key Released +Super_L 144 +Key Pressed +Right 696 +Key Released +Right 144 +Key Pressed +Right 360 +Key Released +Right 184 +Key Pressed +Right 408 +Key Released +Right 160 +Key Pressed +Return 408 +Key Released +Return 152 +Key Pressed +Down 552 +Key Released +Down 136 +Key Pressed +Return 664 +Key Released +Return 184 +Key Pressed +Left 1544 +Key Released +Left 152 +Key Pressed +Down 592 +Key Released +Down 168 +Key Pressed +Down 560 +Key Released +Down 168 +Key Pressed +Down 592 +Key Released +Down 176 +Key Pressed +Down 1240 +Key Released +Down 168 +Key Pressed +Down 648 +Key Released +Down 168 +Key Pressed +Right 624 +Key Released +Right 200 +Key Pressed +Right 576 +Key Released +Right 176 +Key Pressed +Super_L 384 +Key Released +Super_L 152 +Key Pressed +Right 600 +Key Released +Right 120 +Key Pressed +Return 488 +Key Released +Return 152 +Key Pressed +Down 792 +Key Released +Down 120 +Key Pressed +Down 360 +Key Released +Down 200 +Mouse Move +1404 932 637 +Mouse Move +1312 946 16 +Mouse Move +1255 960 16 +Mouse Move +1217 983 14 +Mouse Move +1186 1005 16 +Mouse Move +1160 1032 16 +Mouse Move +1137 1060 16 +Mouse Move +1119 1079 17 +Mouse Move +1105 1079 15 +Mouse Move +1096 1079 16 +Mouse Move +1093 1079 14 +Mouse Move +1090 1079 16 +Mouse Move +1084 1079 16 +Mouse Move +1078 1079 16 +Mouse Move +1071 1079 16 +Mouse Move +1068 1079 16 +Mouse Move +1068 1079 16 +Mouse Move +1072 1072 22 +Mouse Move +1078 1047 16 +Mouse Move +1081 1015 16 +Mouse Move +1078 968 16 +Mouse Move +1076 922 16 +Mouse Move +1080 875 16 +Mouse Move +1086 831 14 +Mouse Move +1096 792 16 +Mouse Move +1107 761 16 +Mouse Move +1118 731 16 +Mouse Move +1125 713 16 +Mouse Move +1131 705 16 +Mouse Move +1132 703 14 +Mouse Move +1131 710 56 +Mouse Move +1128 722 16 +Mouse Move +1122 742 16 +Mouse Move +1113 769 14 +Mouse Move +1100 797 16 +Mouse Move +1085 825 16 +Mouse Move +1074 840 16 +Mouse Move +1068 842 16 +Mouse Move +1062 836 16 +Mouse Move +1056 818 16 +Mouse Move +1052 792 14 +Mouse Move +1051 760 16 +Mouse Move +1055 729 16 +Mouse Move +1060 697 16 +Mouse Move +1061 678 16 +Mouse Move +1062 669 16 +Mouse Move +1061 670 54 +Mouse Move +1058 681 16 +Mouse Move +1054 693 16 +Mouse Move +1051 700 16 +Mouse Move +1050 703 22 +Key Pressed +Down 805 +Key Released +Down 120 +Key Pressed +Down 416 +Key Released +Down 128 +Key Pressed +Return 312 +Key Released +Return 128 +Key Pressed +Up 136 +Key Released +Up 144 +Key Pressed +Return 224 +Key Released +Return 136 +Mouse Move +1060 688 1149 +Mouse Move +1078 663 16 +Mouse Move +1097 635 16 +Mouse Move +1115 612 16 +Mouse Move +1133 585 16 +Mouse Move +1147 564 14 +Mouse Move +1160 543 16 +Mouse Move +1171 517 16 +Mouse Move +1177 490 16 +Mouse Move +1182 464 16 +Mouse Move +1188 442 16 +Mouse Move +1192 426 14 +Mouse Move +1196 413 16 +Mouse Move +1198 401 16 +Mouse Move +1202 389 16 +Mouse Move +1207 375 16 +Mouse Move +1213 362 16 +Mouse Move +1219 351 16 +Mouse Move +1225 339 14 +Mouse Move +1231 331 16 +Mouse Move +1236 326 16 +Mouse Move +1239 324 16 +Mouse Move +1240 322 16 +Mouse Move +1242 322 16 +Mouse Move +1247 322 14 +Mouse Move +1260 320 16 +Mouse Move +1278 318 16 +Mouse Move +1305 316 16 +Mouse Move +1327 310 16 +Mouse Move +1350 307 16 +Mouse Move +1370 307 16 +Mouse Move +1387 309 14 +Mouse Move +1400 312 16 +Mouse Move +1407 313 16 +Mouse Move +1409 314 86 +Mouse Move +1411 317 16 +Mouse Move +1413 318 32 +Mouse Move +1416 317 16 +Mouse Move +1420 314 16 +Mouse Move +1422 312 14 +Mouse Move +1424 310 16 +Mouse Move +1425 308 24 +Mouse Move +1427 304 16 +Mouse Move +1432 299 16 +Mouse Move +1437 294 16 +Mouse Move +1442 289 14 +Mouse Move +1444 287 16 +Mouse Move +1445 286 18 +Mouse Pressed +1445 286 0 1 132 +Mouse Released +1445 286 256 1 102 +Key Pressed +Right 1823 +Key Released +Right 176 +Key Pressed +Super_L 880 +Key Released +Super_L 168 +Key Pressed +Right 704 +Key Released +Right 168 +Key Pressed +Right 288 +Key Released +Right 144 +Key Pressed +Return 440 +Key Released +Return 136 +Mouse Move +1437 285 615 +Mouse Move +1417 286 16 +Mouse Move +1389 291 14 +Mouse Move +1360 299 16 +Mouse Move +1330 311 16 +Mouse Move +1298 319 16 +Mouse Move +1269 326 16 +Mouse Move +1246 335 16 +Mouse Move +1224 344 16 +Mouse Move +1207 351 14 +Mouse Move +1195 359 16 +Mouse Move +1183 371 16 +Mouse Move +1171 383 16 +Mouse Move +1160 397 16 +Mouse Move +1150 411 17 +Mouse Move +1138 424 13 +Mouse Move +1123 440 16 +Mouse Move +1107 459 16 +Mouse Move +1092 477 16 +Mouse Move +1076 497 16 +Mouse Move +1062 510 16 +Mouse Move +1051 519 16 +Mouse Move +1041 526 14 +Mouse Move +1035 534 16 +Mouse Move +1032 546 16 +Mouse Move +1030 557 16 +Mouse Move +1026 569 16 +Mouse Move +1020 576 16 +Mouse Move +1014 580 14 +Mouse Move +1009 582 16 +Mouse Move +1003 581 16 +Mouse Move +994 572 16 +Mouse Move +981 552 16 +Mouse Move +965 525 16 +Mouse Move +952 494 14 +Mouse Move +941 468 16 +Mouse Move +931 451 16 +Mouse Move +919 441 16 +Mouse Move +911 437 16 +Mouse Move +906 438 16 +Mouse Move +899 443 16 +Mouse Move +887 453 14 +Mouse Move +872 470 16 +Mouse Move +856 490 16 +Mouse Move +838 509 16 +Mouse Move +814 523 16 +Mouse Move +794 532 16 +Mouse Move +775 540 16 +Mouse Move +758 546 14 +Mouse Move +741 552 16 +Mouse Move +724 555 16 +Mouse Move +706 556 16 +Mouse Move +687 558 16 +Mouse Move +667 559 14 +Mouse Move +648 559 16 +Mouse Move +633 558 16 +Mouse Move +623 556 16 +Mouse Move +615 553 16 +Mouse Move +607 548 16 +Mouse Move +595 542 16 +Mouse Move +583 535 16 +Mouse Move +573 529 14 +Mouse Move +563 524 16 +Mouse Move +556 518 16 +Mouse Move +550 511 16 +Mouse Move +543 503 16 +Mouse Move +538 496 16 +Mouse Move +534 490 14 +Mouse Move +530 487 16 +Mouse Move +526 486 16 +Mouse Move +522 485 16 +Mouse Move +518 486 16 +Mouse Move +516 487 16 +Mouse Move +514 489 22 +Mouse Move +512 492 16 +Mouse Move +510 494 16 +Mouse Move +509 496 16 +Mouse Move +508 498 16 +Mouse Move +506 500 16 +Mouse Move +503 500 70 +Mouse Move +501 498 16 +Mouse Move +499 497 16 +Mouse Move +496 496 14 +Mouse Move +490 495 16 +Mouse Move +482 493 16 +Mouse Move +476 491 16 +Mouse Move +475 490 24 +Mouse Move +473 489 24 +Mouse Move +470 488 14 +Mouse Move +465 486 16 +Mouse Move +460 484 18 +Mouse Move +458 483 14 +Key Pressed +Return 975 +Key Released +Return 160 +Key Pressed +Down 296 +Key Released +Down 136 +Key Pressed +Return 184 +Key Released +Return 168 +Key Pressed +Up 168 +Key Released +Up 168 +Key Pressed +Up 136 +Key Released +Up 152 +Key Pressed +Up 192 +Key Released +Up 168 +Key Pressed +Return 1136 +Key Released +Return 168 +Key Pressed +Right 1168 +Key Released +Right 176 +Key Pressed +Super_L 312 +Key Released +Super_L 152 +Key Pressed +Right 560 +Key Released +Right 168 +Key Pressed +Right 312 +Key Released +Right 192 +Key Pressed +Right 296 +Key Released +Right 120 +Key Pressed +Return 418 +Key Released +Return 144 +Mouse Move +445 481 1163 +Mouse Move +397 472 16 +Mouse Move +372 476 16 +Mouse Move +360 479 14 +Mouse Move +354 481 16 +Mouse Move +348 483 16 +Mouse Move +341 485 18 +Mouse Move +334 487 14 +Mouse Move +328 489 16 +Mouse Move +319 493 16 +Mouse Move +306 499 14 +Mouse Move +291 507 16 +Mouse Move +275 520 16 +Mouse Move +260 536 16 +Mouse Move +249 549 16 +Mouse Move +246 553 16 +Mouse Move +250 554 14 +Mouse Move +260 553 16 +Mouse Move +269 550 16 +Mouse Move +277 547 16 +Mouse Move +291 546 16 +Mouse Move +314 553 16 +Mouse Move +339 562 16 +Mouse Move +366 568 14 +Mouse Move +393 573 17 +Mouse Move +418 579 15 +Mouse Move +444 585 16 +Mouse Move +470 594 16 +Mouse Move +497 604 16 +Mouse Move +524 616 14 +Mouse Move +545 624 16 +Mouse Move +563 635 16 +Mouse Move +583 647 16 +Mouse Move +606 657 16 +Mouse Move +636 660 16 +Mouse Move +664 654 16 +Mouse Move +696 649 14 +Mouse Move +722 644 16 +Mouse Move +743 642 16 +Mouse Move +761 640 16 +Mouse Move +779 638 16 +Mouse Move +796 634 16 +Mouse Move +811 629 14 +Mouse Move +822 623 16 +Mouse Move +830 619 16 +Mouse Move +840 619 16 +Mouse Move +856 621 16 +Mouse Move +877 625 16 +Mouse Move +897 627 16 +Mouse Move +915 629 14 +Mouse Move +931 633 16 +Mouse Move +948 639 16 +Mouse Move +966 643 16 +Mouse Move +984 644 16 +Mouse Move +1001 642 16 +Mouse Move +1010 640 14 +Mouse Move +1012 638 72 +Mouse Move +1016 636 24 +Mouse Move +1014 635 38 +Mouse Move +1001 637 16 +Mouse Move +984 639 16 +Mouse Move +964 643 16 +Mouse Move +945 646 16 +Mouse Move +931 647 14 +Mouse Move +923 647 16 +Mouse Move +918 647 16 +Mouse Move +915 647 16 +Mouse Move +913 648 16 +Mouse Move +911 649 30 +Mouse Move +909 651 16 +Mouse Move +907 652 48 +Mouse Move +905 652 18 +Key Pressed +Return 809 +Key Released +Return 176 +Key Pressed +Right 536 +Key Released +Right 176 +Key Pressed +Super_L 280 +Key Released +Super_L 152 +Mouse Move +905 653 357 +Mouse Move +918 643 16 +Mouse Move +939 628 16 +Mouse Move +964 609 14 +Mouse Move +983 593 16 +Mouse Move +996 580 16 +Mouse Move +1006 569 16 +Mouse Move +1019 557 16 +Mouse Move +1032 544 16 +Mouse Move +1043 532 16 +Mouse Move +1050 528 14 +Key Pressed +Right 1119 +Key Released +Right 160 +Key Pressed +Right 272 +Key Released +Right 176 +Key Pressed +Right 312 +Key Released +Right 144 +Key Pressed +Return 368 +Key Released +Return 144 +Mouse Move +1043 531 525 +Mouse Move +1027 545 16 +Mouse Move +1019 560 14 +Mouse Move +1019 580 16 +Mouse Move +1025 603 16 +Mouse Move +1030 625 16 +Mouse Move +1032 643 16 +Mouse Move +1032 662 16 +Mouse Move +1030 675 16 +Mouse Move +1024 684 14 +Mouse Move +1018 693 16 +Mouse Move +1011 700 16 +Mouse Move +1005 703 16 +Mouse Move +999 704 16 +Mouse Move +988 706 16 +Mouse Move +976 709 16 +Mouse Move +960 715 14 +Mouse Move +944 721 16 +Mouse Move +930 727 16 +Mouse Move +918 730 16 +Mouse Move +908 731 16 +Mouse Move +899 729 16 +Mouse Move +892 729 14 +Mouse Move +888 729 16 +Mouse Move +885 729 16 +Mouse Move +880 725 16 +Mouse Move +873 719 16 +Mouse Move +865 711 16 +Mouse Move +857 705 16 +Mouse Move +849 699 14 +Mouse Move +845 694 16 +Mouse Move +843 687 18 +Mouse Move +842 681 14 +Mouse Move +842 675 16 +Mouse Move +843 671 16 +Mouse Move +845 667 14 +Mouse Move +848 662 16 +Mouse Move +852 659 16 +Mouse Move +858 656 16 +Mouse Move +864 654 16 +Mouse Move +873 652 16 +Mouse Move +886 651 16 +Mouse Move +906 651 14 +Mouse Move +930 650 16 +Mouse Move +953 649 18 +Mouse Move +978 648 14 +Mouse Move +996 647 16 +Mouse Move +1011 647 16 +Mouse Move +1022 645 16 +Mouse Move +1034 643 14 +Mouse Move +1042 642 16 +Mouse Move +1048 640 16 +Mouse Move +1051 638 16 +Mouse Move +1053 637 18 +Mouse Move +1055 637 22 +Mouse Move +1058 637 14 +Mouse Move +1060 636 16 +Mouse Move +1060 636 78 +Mouse Move +1054 638 16 +Mouse Move +1045 640 18 +Mouse Move +1033 642 14 +Mouse Move +1016 645 16 +Mouse Move +999 648 17 +Mouse Move +981 651 15 +Mouse Move +963 654 14 +Mouse Move +949 657 16 +Mouse Move +939 659 16 +Mouse Move +931 661 16 +Mouse Move +925 663 16 +Mouse Move +921 664 16 +Mouse Move +919 665 22 +Mouse Move +918 666 16 +Mouse Move +916 667 40 +Mouse Move +915 668 16 +Mouse Move +913 670 16 +Mouse Move +908 672 14 +Mouse Move +903 674 16 +Mouse Move +899 676 24 +Key Pressed +Return 991 +Key Released +Return 110 +Key Pressed +Left 792 +Key Released +Left 168 +Key Pressed +Up 520 +Key Released +Up 200 +Key Pressed +Up 432 +Key Released +Up 176 +Key Pressed +Up 400 +Key Released +Up 192 +Key Pressed +Up 480 +Key Released +Up 200 +Key Pressed +Up 456 +Key Released +Up 160 +Key Pressed +Down 1000 +Key Released +Down 112 +Key Pressed +Down 648 +Key Released +Down 128 +Key Pressed +Down 560 +Key Released +Down 136 +Key Pressed +Down 488 +Key Released +Down 152 +Key Pressed +Down 544 +Key Released +Down 144 +Key Pressed +Right 616 +Key Released +Right 112 +Key Pressed +Return 425 +Key Released +Return 103 +Mouse Move +902 680 1019 +Mouse Move +910 691 16 +Mouse Move +918 707 14 +Mouse Move +925 730 18 +Mouse Move +931 761 14 +Mouse Move +937 796 16 +Mouse Move +939 837 16 +Mouse Move +938 872 16 +Mouse Move +936 894 16 +Mouse Move +932 900 14 +Mouse Move +928 901 16 +Mouse Move +924 901 16 +Mouse Move +919 897 16 +Mouse Move +911 882 16 +Mouse Move +905 860 16 +Mouse Move +898 834 14 +Mouse Move +892 807 16 +Mouse Move +884 773 16 +Mouse Move +877 735 16 +Mouse Move +870 704 16 +Mouse Move +862 677 16 +Mouse Move +854 657 16 +Mouse Move +848 645 14 +Mouse Move +847 643 64 +Mouse Move +842 638 16 +Mouse Move +833 629 14 +Mouse Move +825 623 16 +Mouse Move +819 621 16 +Mouse Move +813 619 16 +Mouse Move +810 617 16 +Mouse Move +804 606 16 +Mouse Move +796 588 16 +Mouse Move +788 569 14 +Mouse Move +780 555 16 +Mouse Move +772 542 16 +Mouse Move +763 529 16 +Mouse Move +753 515 16 +Mouse Move +741 500 16 +Mouse Move +728 491 16 +Mouse Move +716 484 14 +Mouse Move +707 482 16 +Mouse Move +702 482 16 +Mouse Move +700 483 110 +Mouse Move +697 489 16 +Mouse Move +694 492 16 +Mouse Move +692 494 16 +Key Pressed +Up 1013 +Key Released +Up 128 +Key Pressed +Return 272 +Key Released +Return 112 +Key Pressed +Down 256 +Key Released +Down 152 +Key Pressed +Return 160 +Key Released +Return 120 +Key Pressed +Up 264 +Key Released +Up 184 +Key Pressed +Up 160 +Key Released +Up 152 +Key Pressed +Return 570 +Key Released +Return 94 +Mouse Move +680 504 1347 +Mouse Move +660 513 16 +Mouse Move +639 520 16 +Mouse Move +622 528 14 +Mouse Move +608 535 16 +Mouse Move +596 541 16 +Mouse Move +589 546 16 +Mouse Move +584 550 16 +Mouse Move +579 556 16 +Mouse Move +571 563 14 +Mouse Move +559 574 16 +Mouse Move +549 583 16 +Mouse Move +539 591 16 +Mouse Move +527 600 16 +Mouse Move +515 609 16 +Mouse Move +505 617 16 +Mouse Move +497 628 14 +Mouse Move +488 639 16 +Mouse Move +478 650 16 +Mouse Move +466 664 16 +Mouse Move +451 677 17 +Mouse Move +438 691 15 +Mouse Move +426 704 14 +Mouse Move +413 717 16 +Mouse Move +397 731 16 +Mouse Move +378 747 16 +Mouse Move +357 764 16 +Mouse Move +335 780 16 +Mouse Move +315 799 16 +Mouse Move +292 815 14 +Mouse Move +272 830 16 +Mouse Move +254 843 16 +Mouse Move +237 852 16 +Mouse Move +224 859 16 +Mouse Move +215 864 16 +Mouse Move +208 867 14 +Mouse Move +204 869 16 +Mouse Move +202 870 16 +Mouse Move +200 872 16 +Mouse Move +198 872 16 +Mouse Move +196 872 46 +Mouse Move +194 870 16 +Mouse Move +191 868 16 +Mouse Move +188 864 16 +Mouse Move +185 858 16 +Mouse Move +184 852 16 +Mouse Move +182 845 14 +Mouse Move +182 839 16 +Mouse Move +183 836 16 +Mouse Move +184 834 16 +Mouse Move +184 832 78 +Mouse Pressed +184 832 0 1 8 +Mouse Released +184 832 256 1 134 +Mouse Move +186 832 290 +Mouse Move +188 833 16 +Mouse Move +190 833 16 +Mouse Move +196 834 16 +Mouse Move +203 836 14 +Mouse Move +210 839 16 +Mouse Move +214 841 16 +Mouse Move +217 842 16 +Mouse Move +221 843 16 +Mouse Move +227 845 16 +Mouse Move +231 846 16 +Mouse Move +234 846 14 +Mouse Move +235 847 110 +Mouse Move +240 847 24 +Mouse Move +251 849 16 +Mouse Move +264 851 17 +Mouse Move +280 851 16 +Mouse Move +299 851 13 +Mouse Move +321 852 16 +Mouse Move +341 852 16 +Mouse Move +365 852 16 +Mouse Move +391 853 16 +Mouse Move +419 851 16 +Mouse Move +445 850 16 +Mouse Move +469 848 14 +Mouse Move +490 849 16 +Mouse Move +507 851 16 +Mouse Move +524 853 16 +Mouse Move +542 855 16 +Mouse Move +563 861 16 +Mouse Move +585 864 16 +Mouse Move +612 867 14 +Mouse Move +644 874 16 +Mouse Move +681 881 16 +Mouse Move +723 882 16 +Mouse Move +765 882 16 +Mouse Move +807 881 16 +Mouse Move +851 883 14 +Mouse Move +889 889 16 +Mouse Move +930 894 16 +Mouse Move +968 898 16 +Mouse Move +1012 900 16 +Mouse Move +1055 904 16 +Mouse Move +1095 913 16 +Mouse Move +1133 915 14 +Mouse Move +1165 919 16 +Mouse Move +1195 923 16 +Mouse Move +1218 927 16 +Mouse Move +1239 929 16 +Mouse Move +1257 929 16 +Mouse Move +1269 929 14 +Mouse Move +1278 927 16 +Mouse Move +1285 925 16 +Mouse Move +1292 920 16 +Mouse Move +1299 916 16 +Mouse Move +1305 913 16 +Mouse Move +1313 908 14 +Mouse Move +1322 906 16 +Mouse Move +1331 902 16 +Mouse Move +1345 895 16 +Mouse Move +1359 887 16 +Mouse Move +1372 883 16 +Mouse Move +1385 883 16 +Mouse Move +1398 884 14 +Mouse Move +1414 886 16 +Mouse Move +1429 890 16 +Mouse Move +1447 894 16 +Mouse Move +1464 896 16 +Mouse Move +1481 900 17 +Mouse Move +1498 905 15 +Mouse Move +1517 914 14 +Mouse Move +1540 926 16 +Mouse Move +1565 937 16 +Mouse Move +1589 946 16 +Mouse Move +1614 954 16 +Mouse Move +1642 966 16 +Mouse Move +1670 976 14 +Mouse Move +1698 984 16 +Mouse Move +1725 992 16 +Mouse Move +1745 999 16 +Mouse Move +1755 1005 16 +Mouse Move +1761 1011 16 +Mouse Move +1763 1015 16 +Mouse Move +1765 1017 14 +Mouse Move +1765 1019 80 +Mouse Move +1767 1023 22 +Mouse Move +1769 1024 24 +Mouse Pressed +1769 1024 0 1 134 +Mouse Released +1769 1024 256 1 180 +Mouse Move +1765 1024 800 +Mouse Move +1758 1023 16 +Mouse Move +1752 1023 16 +Mouse Move +1746 1023 16 +Mouse Move +1739 1023 16 +Mouse Move +1725 1024 16 +Mouse Move +1703 1026 16 +Mouse Move +1671 1028 15 +Mouse Move +1632 1029 15 +Mouse Move +1593 1028 16 +Mouse Move +1562 1029 20 +Mouse Move +1535 1032 20 +Mouse Move +1520 1033 16 +Mouse Move +1498 1036 14 +Mouse Move +1469 1037 16 +Mouse Move +1428 1034 16 +Mouse Move +1374 1039 18 +Mouse Move +1317 1044 14 +Mouse Move +1264 1045 16 +Mouse Move +1217 1040 14 +Mouse Move +1175 1028 16 +Mouse Move +1142 1020 16 +Mouse Move +1115 1013 16 +Mouse Move +1088 1005 16 +Mouse Move +1057 989 16 +Mouse Move +1020 976 16 +Mouse Move +985 962 14 +Mouse Move +955 959 16 +Mouse Move +937 957 16 +Mouse Move +929 956 16 +Mouse Move +927 956 16 +Key Pressed +Right 731 +Key Released +Right 168 +Key Pressed +Super_L 600 +Key Released +Super_L 120 +Key Pressed +Return 2056 +Key Released +Return 144 +Mouse Move +924 954 693 +Mouse Move +910 947 16 +Mouse Move +888 939 16 +Mouse Move +862 929 16 +Mouse Move +839 922 16 +Mouse Move +827 917 16 +Mouse Move +825 915 14 +Mouse Move +815 907 80 +Mouse Move +798 895 14 +Mouse Move +786 886 16 +Mouse Move +771 877 16 +Mouse Move +749 870 16 +Mouse Move +726 866 16 +Mouse Move +704 865 16 +Mouse Move +684 869 16 +Mouse Move +670 875 14 +Mouse Move +665 881 16 +Mouse Move +665 885 16 +Mouse Move +671 890 16 +Mouse Move +685 897 16 +Mouse Move +706 903 16 +Mouse Move +731 910 16 +Mouse Move +755 911 14 +Mouse Move +775 909 16 +Mouse Move +794 907 16 +Mouse Move +815 913 16 +Mouse Move +835 920 16 +Mouse Move +853 927 16 +Mouse Move +869 934 14 +Mouse Move +884 938 16 +Mouse Move +901 942 16 +Mouse Move +922 941 16 +Mouse Move +941 941 16 +Mouse Move +959 942 16 +Mouse Move +973 943 16 +Mouse Move +980 944 14 +Mouse Move +986 945 18 +Mouse Move +992 946 14 +Mouse Move +998 947 16 +Mouse Move +1005 947 16 +Mouse Move +1013 947 16 +Mouse Move +1025 949 14 +Mouse Move +1042 952 16 +Mouse Move +1060 956 16 +Mouse Move +1081 957 16 +Mouse Move +1104 957 16 +Mouse Move +1121 955 16 +Mouse Move +1134 953 17 +Mouse Move +1146 953 13 +Mouse Move +1155 953 16 +Mouse Move +1160 953 16 +Mouse Move +1162 950 110 +Mouse Move +1164 947 16 +Mouse Move +1165 945 16 +Mouse Pressed +1165 945 0 1 38 +Mouse Released +1165 944 256 1 134 +Mouse Move +1166 944 86 +Mouse Move +1172 942 24 +Mouse Move +1181 941 16 +Mouse Move +1192 943 16 +Mouse Move +1199 945 16 +Mouse Move +1200 946 218 +Mouse Move +1204 947 64 +Mouse Move +1213 949 18 +Mouse Move +1225 951 20 +Mouse Move +1230 953 16 +Mouse Move +1234 955 16 +Mouse Move +1241 956 16 +Mouse Move +1251 958 16 +Mouse Move +1265 960 18 +Mouse Move +1291 964 20 +Mouse Move +1307 967 16 +Mouse Move +1321 969 16 +Mouse Move +1331 971 16 +Mouse Move +1339 973 16 +Mouse Move +1346 975 22 +Mouse Move +1358 978 16 +Mouse Move +1370 979 16 +Mouse Move +1387 981 16 +Mouse Move +1411 983 16 +Mouse Move +1437 984 16 +Mouse Move +1463 988 16 +Mouse Move +1489 992 14 +Mouse Move +1512 993 16 +Mouse Move +1535 995 16 +Mouse Move +1558 996 16 +Mouse Move +1580 995 16 +Mouse Move +1602 993 16 +Mouse Move +1622 992 14 +Mouse Move +1638 993 16 +Mouse Move +1653 995 16 +Mouse Move +1669 999 16 +Mouse Move +1685 1001 16 +Mouse Move +1700 1004 16 +Mouse Move +1710 1008 16 +Mouse Move +1717 1013 14 +Mouse Move +1721 1016 16 +Mouse Move +1723 1018 16 +Mouse Move +1725 1020 16 +Mouse Move +1727 1020 16 +Mouse Move +1729 1020 16 +Mouse Move +1730 1021 54 +Mouse Move +1732 1026 16 +Mouse Move +1735 1030 16 +Mouse Move +1737 1032 16 +Mouse Move +1739 1034 14 +Mouse Move +1742 1036 16 +Mouse Move +1747 1038 16 +Mouse Move +1753 1041 16 +Mouse Move +1759 1043 16 +Mouse Move +1761 1044 16 +Mouse Move +1763 1044 16 +Mouse Move +1766 1046 14 +Mouse Move +1768 1047 16 +Mouse Move +1770 1047 16 +Mouse Pressed +1771 1047 0 1 172 +Mouse Released +1771 1047 256 1 182 +Mouse Move +1758 1045 714 +Mouse Move +1725 1036 20 +Mouse Move +1674 1010 18 +Mouse Move +1647 991 16 +Mouse Move +1609 972 16 +Mouse Move +1564 949 16 +Mouse Move +1520 929 16 +Mouse Move +1482 913 18 +Mouse Move +1440 893 20 +Mouse Move +1414 882 16 +Mouse Move +1388 873 16 +Mouse Move +1360 861 16 +Mouse Move +1333 852 16 +Mouse Move +1311 846 16 +Mouse Move +1296 843 14 +Mouse Move +1292 843 24 +Key Pressed +Left 949 +Key Released +Left 216 +Key Pressed +Right 128 +Key Released +Right 168 +Key Pressed +Return 450 +Key Released +Return 166 +Key Pressed +Escape 1344 +Key Released +Escape 192 +Key Pressed +Left 392 +Key Released +Left 193 +Key Pressed +Right 327 +Key Released +Right 168 +Key Pressed +Super_L 848 +Key Released +Super_L 152 +Key Pressed +Right 576 +Key Released +Right 160 +Key Pressed +Right 320 +Key Released +Right 168 +Key Pressed +Right 288 +Key Released +Right 144 +Key Pressed +Return 488 +Key Released +Return 136 +Mouse Move +1290 842 841 +Mouse Move +1270 827 22 +Mouse Move +1232 807 16 +Mouse Move +1190 790 16 +Mouse Move +1157 775 16 +Mouse Move +1137 768 16 +Mouse Move +1134 763 140 +Mouse Move +1131 752 16 +Mouse Move +1127 737 16 +Mouse Move +1120 715 16 +Mouse Move +1107 689 16 +Mouse Move +1091 667 16 +Mouse Move +1076 649 16 +Mouse Move +1063 631 14 +Mouse Move +1047 607 16 +Mouse Move +1025 581 16 +Mouse Move +1006 566 16 +Mouse Move +992 562 16 +Mouse Move +979 563 16 +Mouse Move +967 569 14 +Mouse Move +953 575 16 +Mouse Move +938 583 16 +Mouse Move +921 591 16 +Mouse Move +901 596 16 +Mouse Move +880 601 16 +Mouse Move +862 606 16 +Mouse Move +842 613 14 +Mouse Move +825 617 16 +Mouse Move +808 623 16 +Mouse Move +792 628 16 +Mouse Move +780 632 16 +Mouse Move +771 636 17 +Mouse Move +768 638 13 +Mouse Move +773 637 110 +Mouse Move +782 635 16 +Mouse Move +793 634 18 +Mouse Move +806 633 14 +Mouse Move +821 633 16 +Mouse Move +837 635 16 +Mouse Move +855 635 14 +Mouse Move +875 634 16 +Mouse Move +893 634 16 +Mouse Move +914 634 16 +Mouse Move +936 636 16 +Mouse Move +953 636 16 +Mouse Move +964 635 16 +Mouse Move +967 635 14 +Mouse Move +967 633 48 +Mouse Move +960 638 164 +Mouse Move +948 643 16 +Mouse Move +936 648 16 +Mouse Move +920 652 16 +Mouse Move +907 654 16 +Mouse Move +899 655 16 +Mouse Move +893 656 14 +Mouse Move +889 657 16 +Mouse Move +883 659 16 +Mouse Move +875 660 16 +Mouse Move +864 662 16 +Mouse Move +852 664 16 +Mouse Move +840 667 16 +Mouse Move +829 668 14 +Mouse Move +817 670 16 +Mouse Move +805 672 16 +Mouse Move +795 673 16 +Mouse Move +792 674 16 +Mouse Move +798 670 86 +Mouse Move +813 665 16 +Mouse Move +831 663 16 +Mouse Move +858 661 14 +Mouse Move +886 660 16 +Mouse Move +914 660 16 +Mouse Move +937 658 16 +Mouse Move +955 655 16 +Mouse Move +968 651 16 +Mouse Move +976 650 16 +Mouse Move +982 648 14 +Mouse Move +986 647 16 +Mouse Move +986 645 24 +Mouse Move +977 649 156 +Mouse Move +967 653 16 +Mouse Move +959 655 16 +Mouse Move +951 657 16 +Mouse Move +939 658 16 +Mouse Move +923 659 16 +Mouse Move +907 660 16 +Mouse Move +894 660 14 +Mouse Move +883 660 16 +Mouse Move +876 660 16 +Mouse Move +871 660 16 +Mouse Move +869 660 16 +Key Pressed +Return 713 +Key Released +Return 126 +Key Pressed +Left 576 +Key Released +Left 168 +Key Pressed +Up 520 +Key Released +Up 176 +Key Pressed +Up 352 +Key Released +Up 168 +Key Pressed +Up 360 +Key Released +Up 184 +Key Pressed +Up 344 +Key Released +Up 160 +Key Pressed +Up 408 +Key Released +Up 144 +Key Pressed +Down 1000 +Key Released +Down 95 +Key Pressed +Down 456 +Key Released +Down 153 +Key Pressed +Down 471 +Key Released +Down 160 +Key Pressed +Down 1257 +Key Released +Down 183 +Key Pressed +Right 305 +Key Released +Right 152 +Key Pressed +Right 247 +Key Released +Right 153 +Key Pressed +Right 192 +Key Released +Right 193 +Key Pressed +Right 134 +Key Released +Right 136 +Key Pressed +Up 624 +Key Released +Up 153 +Key Pressed +Up 311 +Key Released +Up 128 +Key Pressed +Right 256 +Key Released +Right 136 +Key Pressed +Return 393 +Key Released +Return 120 +Key Pressed +Down 535 +Key Released +Down 136 +Key Pressed +Return 424 +Key Released +Return 104 +Key Pressed +Return 408 +Key Released +Return 137 +Key Pressed +Return 512 +Key Released +Return 143 +Key Pressed +Return 560 +Key Released +Return 97 +Key Pressed +Down 328 +Key Released +Down 151 +Key Pressed +Return 272 +Key Released +Return 152 +Key Pressed +Return 458 +Key Released +Return 126 +Key Pressed +Return 360 +Key Released +Return 104 +Key Pressed +XF86AudioRaiseVolume 2197 +Key Released +XF86AudioRaiseVolume 250 +Key Pressed +XF86AudioRaiseVolume 300 +Key Released +XF86AudioRaiseVolume 250 +Key Pressed +XF86AudioLowerVolume 775 +Key Released +XF86AudioLowerVolume 250 +Key Pressed +XF86AudioLowerVolume 75 +Key Released +XF86AudioLowerVolume 250 +Key Pressed +XF86AudioMute 1000 +Key Released +XF86AudioMute 475 +Key Pressed +XF86AudioRaiseVolume 1075 +Key Released +XF86AudioRaiseVolume 250 +Key Pressed +XF86AudioRaiseVolume 195 +Key Released +XF86AudioRaiseVolume 245 +Key Pressed +XF86AudioLowerVolume 575 +Key Released +XF86AudioLowerVolume 250 +Key Pressed +XF86AudioLowerVolume 275 +Key Released +XF86AudioLowerVolume 250 +Key Pressed +Down 776 +Key Released +Down 167 +Key Pressed +Down 288 +Key Released +Down 128 +Key Pressed +Left 552 +Key Released +Left 136 +Key Pressed +Down 273 +Key Released +Down 151 +Key Pressed +Right 240 +Key Released +Right 137 +Key Pressed +Return 640 +Key Released +Return 119 +Mouse Move +920 658 1079 +Mouse Move +939 670 22 +Mouse Move +956 677 16 +Mouse Move +981 681 16 +Mouse Move +1006 686 16 +Mouse Move +1023 688 16 +Mouse Move +1035 690 16 +Mouse Move +1048 691 14 +Mouse Move +1065 691 16 +Mouse Move +1089 693 16 +Mouse Move +1117 699 16 +Mouse Move +1143 706 16 +Mouse Move +1162 715 16 +Mouse Move +1171 721 16 +Mouse Move +1177 721 14 +Mouse Move +1183 713 16 +Mouse Move +1189 699 16 +Mouse Move +1192 682 16 +Mouse Move +1193 665 16 +Mouse Move +1191 649 16 +Mouse Move +1189 632 14 +Mouse Move +1183 613 16 +Mouse Move +1174 592 16 +Mouse Move +1163 573 16 +Mouse Move +1155 558 16 +Mouse Move +1147 548 16 +Mouse Move +1139 541 16 +Mouse Move +1130 538 14 +Mouse Move +1118 537 16 +Mouse Move +1105 538 16 +Mouse Move +1087 539 16 +Mouse Move +1070 538 16 +Mouse Move +1055 532 16 +Mouse Move +1046 526 14 +Mouse Move +1039 521 16 +Mouse Move +1033 518 16 +Mouse Move +1027 517 16 +Mouse Move +1025 517 16 +Mouse Move +1023 517 24 +Mouse Move +1021 515 14 +Mouse Move +1014 512 16 +Mouse Move +1004 507 16 +Mouse Move +991 502 16 +Mouse Move +975 496 16 +Mouse Move +958 489 16 +Mouse Move +942 480 16 +Mouse Move +930 474 14 +Mouse Move +923 470 16 +Mouse Move +918 467 16 +Mouse Move +914 464 16 +Mouse Move +911 462 16 +Mouse Move +909 460 17 +Mouse Move +905 455 13 +Mouse Move +900 450 16 +Mouse Move +894 448 16 +Mouse Move +889 446 16 +Mouse Move +885 444 16 +Mouse Move +880 442 16 +Mouse Move +872 439 16 +Mouse Move +864 436 14 +Mouse Move +856 434 16 +Mouse Move +849 433 16 +Mouse Move +847 432 16 +Mouse Move +845 432 16 +Mouse Move +842 432 30 +Mouse Move +836 431 16 +Mouse Move +830 431 16 +Mouse Move +825 431 16 +Mouse Move +820 432 16 +Mouse Move +814 433 16 +Mouse Move +808 434 16 +Mouse Move +806 434 14 +Key Pressed +Return 809 +Key Released +Return 120 +Key Pressed +Down 288 +Key Released +Down 128 +Key Pressed +Return 192 +Key Released +Return 112 +Key Pressed +Down 208 +Key Released +Down 136 +Key Pressed +Return 242 +Key Released +Return 166 +Key Pressed +Up 1016 +Key Released +Up 160 +Key Pressed +Up 481 +Key Released +Up 119 +Mouse Move +818 439 745 +Mouse Move +842 444 14 +Mouse Move +872 450 16 +Mouse Move +908 456 16 +Mouse Move +952 467 16 +Mouse Move +999 477 16 +Mouse Move +1041 480 16 +Mouse Move +1079 485 16 +Mouse Move +1107 490 14 +Mouse Move +1133 494 18 +Mouse Move +1155 497 14 +Mouse Move +1173 495 16 +Mouse Move +1185 489 16 +Mouse Move +1195 482 16 +Mouse Move +1203 475 14 +Mouse Move +1213 469 16 +Mouse Move +1228 466 16 +Mouse Move +1252 461 16 +Mouse Move +1278 456 16 +Mouse Move +1304 449 16 +Mouse Move +1321 439 16 +Mouse Move +1334 427 14 +Mouse Move +1346 414 16 +Mouse Move +1359 407 16 +Mouse Move +1374 399 16 +Mouse Move +1390 391 16 +Mouse Move +1402 386 14 +Mouse Move +1414 382 16 +Mouse Move +1427 377 16 +Mouse Move +1443 369 16 +Mouse Move +1459 361 16 +Mouse Move +1472 355 16 +Mouse Move +1480 352 16 +Mouse Move +1481 351 14 +Mouse Move +1482 349 40 +Mouse Move +1482 345 16 +Mouse Move +1484 338 16 +Mouse Move +1486 331 16 +Mouse Move +1488 325 14 +Mouse Move +1488 319 16 +Mouse Move +1488 315 16 +Mouse Move +1487 311 16 +Mouse Move +1485 307 16 +Mouse Move +1483 302 16 +Mouse Move +1481 298 16 +Mouse Move +1479 295 14 +Mouse Move +1477 293 16 +Mouse Move +1475 291 16 +Mouse Move +1474 289 16 +Key Pressed +Return 1687 +Key Released +Return 128 +Mouse Move +1463 288 948 +Mouse Move +1432 287 15 +Mouse Move +1397 293 16 +Mouse Move +1362 302 16 +Mouse Move +1338 314 16 +Mouse Move +1316 326 15 +Mouse Move +1291 337 15 +Mouse Move +1264 350 16 +Mouse Move +1233 364 16 +Mouse Move +1199 381 16 +Mouse Move +1165 404 16 +Mouse Move +1128 422 14 +Mouse Move +1099 436 16 +Mouse Move +1064 448 17 +Mouse Move +1031 456 16 +Mouse Move +999 465 15 +Mouse Move +968 478 16 +Mouse Move +939 488 14 +Mouse Move +915 496 16 +Mouse Move +893 504 16 +Mouse Move +868 511 16 +Mouse Move +844 519 16 +Mouse Move +824 530 16 +Mouse Move +807 539 16 +Mouse Move +796 545 14 +Mouse Move +791 548 16 +Mouse Move +789 549 16 +Mouse Move +789 539 86 +Mouse Move +791 527 16 +Mouse Move +795 515 16 +Mouse Move +801 504 16 +Mouse Move +802 495 16 +Mouse Move +803 489 14 +Mouse Move +800 483 16 +Mouse Move +794 479 16 +Mouse Move +785 475 16 +Mouse Move +772 470 16 +Mouse Move +757 466 16 +Mouse Move +741 464 16 +Mouse Move +726 465 14 +Mouse Move +708 469 16 +Mouse Move +692 478 16 +Mouse Move +677 487 16 +Mouse Move +666 496 16 +Mouse Move +659 503 16 +Mouse Move +651 508 14 +Mouse Move +645 511 16 +Mouse Move +638 513 16 +Mouse Move +630 515 16 +Mouse Move +621 517 16 +Mouse Move +613 517 16 +Mouse Move +606 516 16 +Mouse Move +603 515 14 +Mouse Pressed +603 514 0 1 236 +Mouse Released +603 514 256 1 150 +Mouse Move +597 517 243 +Mouse Move +584 520 16 +Mouse Move +573 522 16 +Mouse Move +568 522 16 +Mouse Move +566 523 16 +Mouse Move +562 525 13 +Mouse Move +555 527 16 +Mouse Move +543 532 17 +Mouse Move +526 540 16 +Mouse Move +510 545 15 +Mouse Move +490 548 25 +Mouse Move +466 553 7 +Mouse Move +438 561 14 +Mouse Move +406 568 16 +Mouse Move +377 578 16 +Mouse Move +352 589 16 +Mouse Move +330 600 16 +Mouse Move +306 613 16 +Mouse Move +284 624 14 +Mouse Move +264 633 16 +Mouse Move +248 639 16 +Mouse Move +240 644 16 +Mouse Move +235 650 16 +Mouse Move +229 659 16 +Mouse Move +223 669 14 +Mouse Move +216 681 16 +Mouse Move +210 693 16 +Mouse Move +204 708 16 +Mouse Move +198 725 16 +Mouse Move +191 747 16 +Mouse Move +188 765 16 +Mouse Move +187 777 14 +Mouse Move +187 784 16 +Mouse Move +189 790 16 +Mouse Move +189 795 17 +Mouse Move +190 800 16 +Mouse Move +190 806 15 +Mouse Move +192 813 14 +Mouse Move +193 820 16 +Mouse Move +193 826 16 +Mouse Move +194 834 16 +Mouse Move +195 845 16 +Mouse Move +196 855 16 +Mouse Move +197 862 16 +Mouse Move +198 865 14 +Mouse Move +200 864 32 +Mouse Move +201 862 16 +Mouse Move +199 860 16 +Mouse Move +197 858 16 +Mouse Move +196 857 14 +Mouse Move +194 856 32 +Mouse Move +192 854 16 +Mouse Move +190 852 16 +Mouse Move +187 850 16 +Mouse Move +184 844 14 +Mouse Move +180 838 16 +Mouse Move +178 835 16 +Mouse Pressed +178 835 0 1 94 +Mouse Released +178 834 256 1 142 +Mouse Move +182 834 282 +Mouse Move +193 836 16 +Mouse Move +210 838 16 +Mouse Move +228 839 16 +Mouse Move +249 837 14 +Mouse Move +275 834 16 +Mouse Move +301 832 16 +Mouse Move +334 833 16 +Mouse Move +369 835 16 +Mouse Move +403 837 16 +Mouse Move +440 840 16 +Mouse Move +479 840 14 +Mouse Move +512 842 16 +Mouse Move +544 841 16 +Mouse Move +579 836 16 +Mouse Move +616 836 16 +Mouse Move +655 838 16 +Mouse Move +698 841 14 +Mouse Move +739 848 16 +Mouse Move +776 849 16 +Mouse Move +815 847 16 +Mouse Move +853 847 16 +Mouse Move +887 849 16 +Mouse Move +923 850 16 +Mouse Move +960 851 14 +Mouse Move +997 851 16 +Mouse Move +1035 855 16 +Mouse Move +1068 857 16 +Mouse Move +1101 860 16 +Mouse Move +1128 861 16 +Mouse Move +1155 862 14 +Mouse Move +1181 864 16 +Mouse Move +1205 866 16 +Mouse Move +1231 867 16 +Mouse Move +1256 869 16 +Mouse Move +1284 874 16 +Mouse Move +1306 877 16 +Mouse Move +1323 881 14 +Mouse Move +1339 884 16 +Mouse Move +1356 887 16 +Mouse Move +1372 889 16 +Mouse Move +1390 893 16 +Mouse Move +1410 900 16 +Mouse Move +1431 908 14 +Mouse Move +1453 918 16 +Mouse Move +1478 929 16 +Mouse Move +1502 939 16 +Mouse Move +1528 948 16 +Mouse Move +1556 957 17 +Mouse Move +1585 963 15 +Mouse Move +1610 969 14 +Mouse Move +1630 973 16 +Mouse Move +1646 977 16 +Mouse Move +1663 980 16 +Mouse Move +1680 984 16 +Mouse Move +1698 986 16 +Mouse Move +1716 987 14 +Mouse Move +1733 989 16 +Mouse Move +1743 991 16 +Mouse Move +1748 993 16 +Mouse Move +1751 993 16 +Mouse Move +1755 993 16 +Mouse Move +1761 993 14 +Mouse Move +1767 995 16 +Mouse Move +1774 999 16 +Mouse Move +1782 1003 16 +Mouse Move +1789 1008 16 +Mouse Move +1796 1012 16 +Mouse Move +1800 1014 16 +Mouse Move +1802 1016 14 +Mouse Move +1803 1017 24 +Mouse Move +1803 1019 32 +Mouse Move +1802 1021 16 +Mouse Move +1800 1023 274 +Mouse Move +1797 1025 16 +Mouse Move +1794 1027 16 +Mouse Move +1790 1029 16 +Mouse Move +1788 1029 14 +Mouse Move +1787 1030 24 +Mouse Pressed +1787 1030 0 1 158 +Mouse Released +1787 1030 256 1 173 +Key Pressed +Right 1819 +Key Released +Right 111 +Key Pressed +Return 616 +Key Released +Return 104 +Key Pressed +Down 2432 +Key Released +Down 152 +Key Pressed +Down 233 +Key Released +Down 143 +Key Pressed +Down 192 +Key Released +Down 144 +Key Pressed +Up 512 +Key Released +Up 144 +Key Pressed +Return 1464 +Key Released +Return 112 +Key Pressed +Left 2080 +Key Released +Left 104 +Key Pressed +Left 377 +Key Released +Left 136 +Key Pressed +Return 408 +Key Released +Return 119 +Key Pressed +Escape 744 +Key Released +Escape 136 +Key Pressed +Down 1040 +Key Released +Down 154 +Key Pressed +Down 359 +Key Released +Down 200 +Key Pressed +Left 1432 +Key Released +Left 143 +Key Pressed +Up 833 +Key Released +Up 207 +Key Pressed +Down 376 +Key Released +Down 224 +Key Pressed +Right 336 +Key Released +Right 177 +Key Pressed +Right 400 +Key Released +Right 128 +Key Pressed +Super_L 831 +Key Released +Super_L 121 +Key Pressed +Right 1112 +Key Released +Right 160 +Key Pressed +Return 464 +Key Released +Return 127 +Mouse Move +1760 1046 1343 +Mouse Move +1736 1055 16 +Mouse Move +1715 1060 17 +Mouse Move +1696 1066 15 +Mouse Move +1680 1073 17 +Mouse Move +1669 1079 15 +Mouse Move +1661 1079 15 +Mouse Move +1655 1079 16 +Mouse Move +1649 1079 16 +Mouse Move +1642 1079 16 +Mouse Move +1634 1079 15 +Mouse Move +1624 1079 16 +Mouse Move +1616 1077 17 +Mouse Move +1611 1075 13 +Mouse Move +1611 1071 49 +Mouse Move +1611 1062 15 +Mouse Move +1610 1052 16 +Mouse Move +1604 1040 15 +Mouse Move +1598 1030 15 +Mouse Move +1592 1024 17 +Mouse Move +1587 1016 15 +Mouse Move +1583 1005 16 +Mouse Move +1581 992 16 +Mouse Move +1576 979 15 +Mouse Move +1569 964 15 +Mouse Move +1563 950 16 +Mouse Move +1557 937 16 +Mouse Move +1550 924 16 +Mouse Move +1546 911 17 +Mouse Move +1544 893 15 +Mouse Move +1539 867 23 +Mouse Move +1535 852 16 +Mouse Move +1533 841 18 +Mouse Move +1530 829 13 +Mouse Move +1526 815 16 +Mouse Move +1522 798 16 +Mouse Move +1519 778 23 +Mouse Move +1518 770 16 +Mouse Move +1516 765 16 +Mouse Move +1514 764 16 +Mouse Move +1514 762 31 +Mouse Move +1513 756 14 +Mouse Move +1513 748 16 +Mouse Move +1514 742 16 +Mouse Move +1514 736 16 +Mouse Move +1514 733 16 +Mouse Move +1514 730 17 +Mouse Move +1514 727 16 +Mouse Move +1513 724 13 +Mouse Move +1513 718 16 +Mouse Move +1514 710 17 +Mouse Move +1515 702 15 +Mouse Move +1516 697 17 +Mouse Move +1516 693 15 +Mouse Move +1516 691 14 +Mouse Move +1516 689 18 +Mouse Move +1516 687 23 +Mouse Move +1516 685 16 +Mouse Move +1516 682 15 +Mouse Move +1516 680 16 +Key Pressed +Up 1076 +Key Released +Up 128 +Key Pressed +Down 311 +Key Released +Down 128 +Key Pressed +Return 306 +Key Released +Return 134 +Key Pressed +Up 233 +Key Released +Up 152 +Key Pressed +Return 161 +Key Released +Return 166 +Key Pressed +Up 217 +Key Released +Up 159 +Key Pressed +Up 112 +Key Released +Up 145 +Key Pressed +Up 207 +Key Released +Up 121 +Mouse Move +1522 683 1948 +Mouse Move +1541 684 16 +Mouse Move +1570 680 15 +Mouse Move +1604 676 15 +Mouse Move +1642 674 16 +Mouse Move +1679 672 16 +Mouse Move +1711 672 16 +Mouse Move +1736 670 17 +Mouse Move +1756 667 16 +Mouse Move +1773 662 15 +Mouse Move +1788 655 14 +Mouse Move +1799 646 16 +Mouse Move +1804 638 16 +Mouse Move +1807 631 16 +Mouse Move +1807 621 16 +Mouse Move +1806 608 14 +Mouse Move +1804 595 16 +Mouse Move +1803 581 17 +Mouse Move +1802 567 15 +Mouse Move +1803 550 16 +Mouse Move +1809 529 16 +Mouse Move +1818 505 17 +Mouse Move +1830 481 13 +Mouse Move +1842 465 17 +Mouse Move +1852 452 15 +Mouse Move +1859 440 16 +Mouse Move +1860 429 17 +Mouse Move +1856 419 16 +Mouse Move +1849 410 13 +Mouse Move +1839 402 16 +Mouse Move +1828 394 16 +Mouse Move +1813 386 16 +Mouse Move +1795 381 16 +Mouse Move +1775 376 16 +Mouse Move +1752 369 16 +Mouse Move +1728 363 14 +Mouse Move +1700 361 16 +Mouse Move +1674 360 16 +Mouse Move +1655 356 16 +Mouse Move +1637 350 16 +Mouse Move +1622 344 16 +Mouse Move +1610 338 14 +Mouse Move +1603 331 16 +Mouse Move +1596 323 16 +Mouse Move +1589 317 17 +Mouse Move +1582 313 15 +Mouse Move +1576 310 16 +Mouse Move +1573 307 16 +Mouse Move +1573 305 14 +Mouse Move +1571 303 16 +Mouse Move +1569 301 16 +Mouse Move +1565 300 16 +Mouse Move +1561 298 16 +Mouse Move +1556 298 16 +Mouse Move +1553 299 14 +Mouse Move +1549 300 16 +Mouse Move +1541 301 16 +Mouse Move +1533 301 16 +Mouse Move +1525 301 16 +Mouse Move +1518 301 16 +Mouse Move +1512 301 14 +Mouse Move +1510 300 16 +Key Pressed +Return 1081 +Key Released +Return 110 +Key Pressed +Down 1696 +Key Released +Down 200 +Key Pressed +Right 344 +Key Released +Right 160 +Key Pressed +Left 336 +Key Released +Left 200 +Key Pressed +Right 577 +Key Released +Right 175 +Mouse Move +1477 310 857 +Mouse Move +1449 307 17 +Mouse Move +1433 290 16 +Mouse Move +1423 268 17 +Mouse Move +1411 244 15 +Mouse Move +1392 222 15 +Mouse Move +1369 204 14 +Mouse Move +1343 191 16 +Mouse Move +1314 182 16 +Mouse Move +1285 175 16 +Mouse Move +1255 174 16 +Mouse Move +1224 177 16 +Mouse Move +1193 179 14 +Mouse Move +1173 183 16 +Mouse Move +1161 190 16 +Mouse Move +1150 196 16 +Mouse Move +1137 204 16 +Mouse Move +1118 215 16 +Mouse Move +1092 227 16 +Mouse Move +1060 239 14 +Mouse Move +1030 251 16 +Mouse Move +1001 260 16 +Mouse Move +975 266 16 +Mouse Move +952 271 16 +Mouse Move +929 275 16 +Mouse Move +889 279 22 +Mouse Move +864 281 16 +Mouse Move +839 287 16 +Mouse Move +812 291 16 +Mouse Move +787 294 16 +Mouse Move +760 296 16 +Mouse Move +733 301 14 +Mouse Move +708 305 16 +Mouse Move +678 307 16 +Mouse Move +654 311 17 +Mouse Move +635 316 15 +Mouse Move +621 319 17 +Mouse Move +610 324 20 +Mouse Move +593 334 17 +Mouse Move +583 339 16 +Mouse Move +576 342 16 +Mouse Move +572 344 16 +Mouse Move +570 345 16 +Mouse Move +569 348 54 +Mouse Move +568 350 16 +Mouse Move +566 352 16 +Mouse Move +566 354 16 +Mouse Move +565 357 16 +Mouse Move +566 361 14 +Mouse Move +568 365 17 +Mouse Move +574 371 15 +Mouse Move +581 376 16 +Mouse Move +589 384 16 +Mouse Move +598 396 16 +Mouse Move +608 408 14 +Mouse Move +618 416 16 +Mouse Move +625 420 16 +Mouse Move +631 422 16 +Mouse Move +637 424 16 +Mouse Move +643 425 16 +Mouse Move +651 427 16 +Mouse Move +657 429 14 +Mouse Move +663 431 16 +Mouse Move +669 433 16 +Mouse Move +675 433 16 +Mouse Move +681 433 16 +Mouse Move +688 433 16 +Mouse Move +696 435 14 +Mouse Move +706 437 16 +Mouse Move +714 439 16 +Mouse Move +721 440 16 +Mouse Move +729 442 16 +Mouse Move +737 442 16 +Mouse Move +746 443 14 +Mouse Move +757 444 16 +Mouse Move +766 445 17 +Mouse Move +773 446 15 +Mouse Move +779 446 16 +Mouse Move +784 445 16 +Mouse Move +788 443 16 +Mouse Move +789 441 14 +Key Pressed +Super_L 713 +Key Released +Super_L 121 +Key Pressed +Right 631 +Key Released +Right 153 +Key Pressed +Right 255 +Key Released +Right 128 +Key Pressed +Return 384 +Key Released +Return 112 +Mouse Move +781 446 973 +Mouse Move +767 456 15 +Mouse Move +753 466 16 +Mouse Move +741 476 15 +Mouse Move +731 484 16 +Mouse Move +724 490 16 +Mouse Move +719 493 16 +Mouse Move +712 497 16 +Mouse Move +704 503 14 +Mouse Move +696 509 16 +Mouse Move +690 514 16 +Mouse Move +686 517 16 +Mouse Move +684 519 16 +Mouse Move +684 521 16 +Mouse Move +682 522 14 +Mouse Move +680 524 16 +Mouse Move +678 526 17 +Mouse Move +677 528 31 +Mouse Move +675 531 16 +Mouse Move +671 536 16 +Mouse Move +667 541 14 +Mouse Move +664 544 16 +Mouse Move +662 545 16 +Key Pressed +Up 1331 +Key Released +Up 120 +Key Pressed +Up 209 +Key Released +Up 136 +Key Pressed +Return 367 +Key Released +Return 104 +Key Pressed +Down 225 +Key Released +Down 184 +Key Pressed +Return 265 +Key Released +Return 127 +Key Pressed +Up 207 +Key Released +Up 170 +Key Pressed +Up 174 +Key Released +Up 113 +Key Pressed +Return 687 +Key Released +Return 104 +Mouse Move +677 555 967 +Mouse Move +721 570 20 +Mouse Move +733 575 14 +Mouse Move +734 577 80 +Mouse Move +732 577 46 +Mouse Move +716 575 16 +Mouse Move +701 574 16 +Mouse Move +691 571 16 +Mouse Move +687 564 14 +Mouse Move +686 558 16 +Mouse Move +690 552 16 +Mouse Move +698 546 16 +Mouse Move +707 543 16 +Mouse Move +715 540 16 +Mouse Move +718 536 16 +Mouse Move +718 534 14 +Mouse Move +717 532 16 +Mouse Move +712 527 16 +Mouse Move +703 521 16 +Mouse Move +691 515 16 +Mouse Move +679 511 16 +Mouse Move +665 507 16 +Mouse Move +650 504 15 +Mouse Move +638 502 15 +Mouse Move +632 501 16 +Mouse Move +634 501 479 +Mouse Move +640 502 15 +Mouse Move +646 503 16 +Mouse Move +653 504 17 +Mouse Move +662 505 16 +Mouse Move +672 505 16 +Mouse Move +683 505 16 +Mouse Move +689 505 13 +Mouse Move +691 505 17 +Mouse Move +694 506 165 +Key Pressed +Super_L 702 +Key Released +Super_L 120 +Key Pressed +Right 583 +Key Released +Right 136 +Key Pressed +Right 312 +Key Released +Right 168 +Key Pressed +Right 217 +Key Released +Right 135 +Key Pressed +Return 536 +Key Released +Return 104 +Mouse Move +708 523 1569 +Mouse Move +736 546 16 +Mouse Move +769 565 16 +Mouse Move +793 582 16 +Mouse Move +813 596 16 +Mouse Move +826 608 14 +Mouse Move +839 620 16 +Mouse Move +851 629 21 +Mouse Move +864 639 19 +Mouse Move +866 645 16 +Mouse Move +868 650 16 +Mouse Move +871 656 14 +Mouse Move +874 658 17 +Mouse Move +876 658 17 +Mouse Move +877 656 15 +Mouse Move +877 654 15 +Mouse Move +877 651 16 +Mouse Move +876 649 14 +Mouse Move +874 647 16 +Mouse Move +874 645 16 +Mouse Move +875 643 25 +Mouse Move +877 641 15 +Mouse Move +879 639 16 +Mouse Move +881 637 14 +Mouse Move +884 635 16 +Mouse Move +890 633 16 +Mouse Move +907 631 24 +Mouse Move +924 634 16 +Mouse Move +943 640 16 +Mouse Move +961 646 16 +Mouse Move +977 649 14 +Mouse Move +991 651 16 +Mouse Move +1005 653 18 +Mouse Move +1018 655 14 +Mouse Move +1027 657 16 +Mouse Move +1032 658 16 +Mouse Move +1034 658 22 +Key Pressed +Left 1188 +Key Released +Left 152 +Key Pressed +Return 448 +Key Released +Return 96 +Key Pressed +Left 1064 +Key Released +Left 175 +Key Pressed +Up 944 +Key Released +Up 128 +Key Pressed +Up 337 +Key Released +Up 159 +Key Pressed +Up 296 +Key Released +Up 136 +Key Pressed +Up 305 +Key Released +Up 135 +Key Pressed +Up 417 +Key Released +Up 152 +Key Pressed +Escape 1016 +Key Released +Escape 111 -- 2.7.4 From fd10bf80a9dd2782e80dab939d8983f76391db6d Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Wed, 22 Apr 2015 15:24:10 +0900 Subject: [PATCH 15/16] Apply ISKeyDownListener. Change-Id: Ia26a88825707e446f52b8ef9f8d19e0886222676 Signed-off-by: Kim Tae Soo --- include/album-layout.h | 6 +-- include/album-songs-layout.h | 6 +-- include/category-layout.h | 6 +-- include/category-songs-layout.h | 6 +-- include/folder-layout.h | 6 +-- include/song-layout.h | 6 +-- src/views/album-layout.cpp | 8 ++-- src/views/album-songs-layout.cpp | 12 +++--- src/views/category-layout.cpp | 10 ++--- src/views/category-songs-layout.cpp | 10 ++--- src/views/folder-layout.cpp | 83 ++++++++++++++++++------------------- src/views/song-layout.cpp | 77 +++++++++++++++++----------------- 12 files changed, 111 insertions(+), 125 deletions(-) diff --git a/include/album-layout.h b/include/album-layout.h index ad7506f..1850578 100644 --- a/include/album-layout.h +++ b/include/album-layout.h @@ -23,7 +23,7 @@ struct SAlbumItemInfo; class CAlbumLayout : public CExtBaseLayout, public CListenerMgr, - public IKeyDownListener, + public ISKeyDownListener, public IMouseMoveListener, public IRealizedListener, public IUnrealizedListener { @@ -63,7 +63,7 @@ protected: public: CAlbumLayout(const char *pLayoutId) : CExtBaseLayout(pLayoutId), - IKeyDownListener(this), + ISKeyDownListener(this), IMouseMoveListener(this), IRealizedListener(this), IUnrealizedListener(this), @@ -79,7 +79,7 @@ public: void SetEmptyStatusHandleCallback(void(*handleEmptyStatusCb)(void *cookie, bool emptyStatus), void *cookie); public: - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); virtual void OnUnrealized(int id, Evas_Object *obj, Elm_Object_Item *item); diff --git a/include/album-songs-layout.h b/include/album-songs-layout.h index 67f2cdf..4012a09 100644 --- a/include/album-songs-layout.h +++ b/include/album-songs-layout.h @@ -23,7 +23,7 @@ struct SAlbumSongsItemInfo; class CAlbumSongsLayout : public CExtBaseLayout, public CListenerMgr, - public IKeyDownListener, + public ISKeyDownListener, public IMouseMoveListener, public IMouseClickedListener, public IRealizedListener { @@ -63,7 +63,7 @@ protected: public: CAlbumSongsLayout(const char *pLayoutId) : CExtBaseLayout(pLayoutId), - IKeyDownListener(this), + ISKeyDownListener(this), IMouseMoveListener(this), IMouseClickedListener(this), IRealizedListener(this), @@ -79,7 +79,7 @@ public: virtual void SetFocus(const char *btnStr); public: - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnMouseClicked(int id, Evas_Object *obj); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); diff --git a/include/category-layout.h b/include/category-layout.h index 39fa564..48242a7 100644 --- a/include/category-layout.h +++ b/include/category-layout.h @@ -21,7 +21,7 @@ class CCategoryLayout : public CExtBaseLayout, public CListenerMgr, - public IKeyDownListener, + public ISKeyDownListener, public IMouseClickedListener, public IMouseMoveListener, public IRealizedListener, @@ -138,7 +138,7 @@ protected: public: CCategoryLayout(const char *pLayoutId) : CExtBaseLayout(pLayoutId), - IKeyDownListener(this), + ISKeyDownListener(this), IMouseClickedListener(this), IMouseMoveListener(this), IRealizedListener(this), @@ -158,7 +158,7 @@ public: virtual void SetFocus(const char *btnStr); public: - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); virtual void OnMouseClicked(int id, Evas_Object *obj); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); diff --git a/include/category-songs-layout.h b/include/category-songs-layout.h index f27f5d7..4bbbbf1 100644 --- a/include/category-songs-layout.h +++ b/include/category-songs-layout.h @@ -23,7 +23,7 @@ class CCategorySongsLayout : public CExtBaseLayout, public CListenerMgr, - public IKeyDownListener, + public ISKeyDownListener, public IMouseMoveListener, public IMouseClickedListener, public IRealizedListener, @@ -91,7 +91,7 @@ protected: public: CCategorySongsLayout(const char *pLayoutId) : CExtBaseLayout(pLayoutId), - IKeyDownListener(this), + ISKeyDownListener(this), IMouseMoveListener(this), IMouseClickedListener(this), IRealizedListener(this), @@ -111,7 +111,7 @@ public: virtual void SetFocus(const char *btnStr); public: - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnMouseClicked(int id, Evas_Object *obj); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); diff --git a/include/folder-layout.h b/include/folder-layout.h index fe1c881..b3455f2 100644 --- a/include/folder-layout.h +++ b/include/folder-layout.h @@ -27,7 +27,7 @@ class CFolderLayout : public IMouseClickedListener, public IRealizedListener, public IUnrealizedListener, - public IKeyDownListener { + public ISKeyDownListener { private: struct SFolderLayout *m; @@ -72,7 +72,7 @@ public: IMouseClickedListener(this), IRealizedListener(this), IUnrealizedListener(this), - IKeyDownListener(this), + ISKeyDownListener(this), m(0) {} virtual ~CFolderLayout() {} @@ -87,7 +87,7 @@ public: virtual void OnMouseClicked(int id, Evas_Object *obj); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); virtual void OnUnrealized(int id, Evas_Object *obj, Elm_Object_Item *item); - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); }; diff --git a/include/song-layout.h b/include/song-layout.h index fd833bf..04c1c95 100644 --- a/include/song-layout.h +++ b/include/song-layout.h @@ -23,7 +23,7 @@ struct SSongItemInfo; class CSongLayout : public CExtBaseLayout, public CListenerMgr, - public IKeyDownListener, + public ISKeyDownListener, public IMouseMoveListener, public IRealizedListener { private: @@ -67,7 +67,7 @@ protected: public: CSongLayout(const char *pLayoutId) : CExtBaseLayout(pLayoutId), - IKeyDownListener(this), + ISKeyDownListener(this), IMouseMoveListener(this), IRealizedListener(this), m(0) {} @@ -80,7 +80,7 @@ public: virtual void SetFocus(const char *btnStr); public: - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); }; diff --git a/src/views/album-layout.cpp b/src/views/album-layout.cpp index 1d9dc89..0f3ef62 100644 --- a/src/views/album-layout.cpp +++ b/src/views/album-layout.cpp @@ -594,12 +594,11 @@ void CAlbumLayout::SetEmptyStatusHandleCallback(void(*handleEmptyStatusCb)(void } -void CAlbumLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CAlbumLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case ALBUM_LAYOUT: - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + if (ev->skey == SKEY_BACK) { SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_FOCUS_UPDATE; @@ -621,8 +620,7 @@ void CAlbumLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_D m->focusedItem = it; - if (!strcmp(ev->keyname, KEY_MENU) || - !strcmp(ev->keyname, KEY_MENU_REMOTE)) { + if (ev->skey == SKEY_MENU) { if (m->ctxtinfo) { free(m->ctxtinfo); m->ctxtinfo = NULL; diff --git a/src/views/album-songs-layout.cpp b/src/views/album-songs-layout.cpp index 2d73eba..631baff 100644 --- a/src/views/album-songs-layout.cpp +++ b/src/views/album-songs-layout.cpp @@ -638,13 +638,12 @@ void CAlbumSongsLayout::t_OnShow(void) } -void CAlbumSongsLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CAlbumSongsLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case ALBUM_SONGS_LAYOUT: - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + if (ev->skey == SKEY_BACK) { SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_DEPTH_UPDATE; @@ -668,12 +667,11 @@ void CAlbumSongsLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_ return; } - if (!strcmp(ev->keyname, KEY_LEFT)) { + if (ev->skey == SKEY_LEFT) { parcel.updateType = E_FOCUS_UPDATE; m->vmgr->UpdateView(MUSIC_BASE_VIEW, &parcel); } - else if (!strcmp(ev->keyname, KEY_MENU) || - !strcmp(ev->keyname, KEY_MENU_REMOTE)) { + else if (ev->skey == SKEY_MENU) { m->focused_item = it; if (m->ctxtinfo) { @@ -709,7 +707,7 @@ void CAlbumSongsLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_ case ALBUM_SONGS_PLAY_BUTTON: case ALBUM_SONGS_NEXT_BUTTON: case ALBUM_SONGS_LAST_BUTTON: - if (!strcmp(ev->keyname, KEY_UP)) { + if (ev->skey == SKEY_UP) { const char *btnText = NULL; if (id == ALBUM_SONGS_PLAY_BUTTON) diff --git a/src/views/category-layout.cpp b/src/views/category-layout.cpp index 8cd5831..e439290 100644 --- a/src/views/category-layout.cpp +++ b/src/views/category-layout.cpp @@ -1276,7 +1276,7 @@ void CCategoryLayout::SetFocus(const char *btnStr) } -void CCategoryLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CCategoryLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case CATEGORY_LAYOUT: @@ -1284,8 +1284,7 @@ void CCategoryLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Ke int count; Eina_List *alist = NULL; - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + if (ev->skey == SKEY_BACK) { if (t.depth == E_DEPTH_CATEGORY) { SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); @@ -1335,8 +1334,7 @@ void CCategoryLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Ke t.focused_item = it; - if ((!strcmp(ev->keyname, KEY_MENU) || - !strcmp(ev->keyname, KEY_MENU_REMOTE)) && + if ((ev->skey == SKEY_MENU) && t.depth != E_DEPTH_SELECT_LIST && t.depth != E_DEPTH_SHOW_LIST) { if (t.ctxtinfo) { @@ -1380,7 +1378,7 @@ void CCategoryLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Ke case CATEGORY_LAYOUT_PLAY_BUTTON: case CATEGORY_LAYOUT_NEXT_BUTTON: case CATEGORY_LAYOUT_LAST_BUTTON: - if (!strcmp(ev->keyname, KEY_UP)) { + if (ev->skey == SKEY_UP) { const char *btnText = NULL; if (id == CATEGORY_LAYOUT_PLAY_BUTTON) diff --git a/src/views/category-songs-layout.cpp b/src/views/category-songs-layout.cpp index 9d9214c..3869250 100644 --- a/src/views/category-songs-layout.cpp +++ b/src/views/category-songs-layout.cpp @@ -987,13 +987,12 @@ void CCategorySongsLayout::t_OnShow(void) } -void CCategorySongsLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CCategorySongsLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case CATEGORY_SONGS_LAYOUT: - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + if (ev->skey == SKEY_BACK) { SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_DEPTH_UPDATE; @@ -1008,14 +1007,13 @@ void CCategorySongsLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Eve SContentInfo *ctxtinfo = NULL; SCategorySongsItemsInfo *itinfo = NULL; - if (!strcmp(ev->keyname, KEY_LEFT)) { + if (ev->skey == SKEY_LEFT) { SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_FOCUS_UPDATE; m->vmgr->UpdateView(MUSIC_BASE_VIEW, &parcel); } - else if (!strcmp(ev->keyname, KEY_MENU) || - !strcmp(ev->keyname, KEY_MENU_REMOTE)) { + else if (ev->skey == SKEY_MENU) { it = elm_object_focused_item_get(obj); if (!it) { _ERR(" unable to get focused item "); diff --git a/src/views/folder-layout.cpp b/src/views/folder-layout.cpp index 8b7fc6b..21e2728 100644 --- a/src/views/folder-layout.cpp +++ b/src/views/folder-layout.cpp @@ -933,13 +933,12 @@ void CFolderLayout::OnUnrealized(int id, Evas_Object *obj, Elm_Object_Item *item } -void CFolderLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CFolderLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case FOLDER_LAYOUT: { - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + if (ev->skey == SKEY_BACK) { if (m->depth == E_DEPTH_SONG) { m->depth = E_DEPTH_FOLDER; m_UpdateFolderGrid(false); @@ -966,58 +965,56 @@ void CFolderLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_ if (!obj) return; - if (strcmp(ev->keyname, KEY_MENU) && - strcmp(ev->keyname, KEY_MENU_REMOTE)) - return; - - it = elm_object_focused_item_get(obj); - if (!it) { - _ERR(" unable to get focused item "); - return; - } - m->focused_item = it; + if (ev->skey == SKEY_MENU) { + it = elm_object_focused_item_get(obj); + if (!it) { + _ERR(" unable to get focused item "); + return; + } + m->focused_item = it; - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; - itinfo = m_FindItemInfo(m->it_infolist, it); - if (!itinfo) { - free(ctxtinfo); - return; - } + itinfo = m_FindItemInfo(m->it_infolist, it); + if (!itinfo) { + free(ctxtinfo); + return; + } - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - if (m->depth == E_DEPTH_SONG) { - ctxtinfo->type = CONTEXT_TYPE_SONG; - ctxtinfo->context = itinfo->sinfo; - } - else { - ctxtinfo->type = CONTEXT_TYPE_FOLDER; - ctxtinfo->context = itinfo->finfo; - } + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + if (m->depth == E_DEPTH_SONG) { + ctxtinfo->type = CONTEXT_TYPE_SONG; + ctxtinfo->context = itinfo->sinfo; + } + else { + ctxtinfo->type = CONTEXT_TYPE_FOLDER; + ctxtinfo->context = itinfo->finfo; + } - m->ctxtinfo = ctxtinfo; + m->ctxtinfo = ctxtinfo; - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + } } break; case FOLDER_LAYOUT_PLAY_BUTTON: case FOLDER_LAYOUT_NEXT_BUTTON: case FOLDER_LAYOUT_LAST_BUTTON: - if (!strcmp(ev->keyname, KEY_UP)) { + if (ev->skey == SKEY_UP) { const char *btnText = NULL; if (id == FOLDER_LAYOUT_PLAY_BUTTON) diff --git a/src/views/song-layout.cpp b/src/views/song-layout.cpp index 1cd0321..ca9eff1 100644 --- a/src/views/song-layout.cpp +++ b/src/views/song-layout.cpp @@ -616,13 +616,12 @@ void CSongLayout::SetFocus(const char *btnStr) } -void CSongLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CSongLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case SONG_LAYOUT: { - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + if (ev->skey == SKEY_BACK) { SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_FOCUS_UPDATE; @@ -637,45 +636,43 @@ void CSongLayout::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Do SContentInfo *ctxtinfo = NULL; SSongItemInfo *itinfo = NULL; - if (strcmp(ev->keyname, KEY_MENU) && - strcmp(ev->keyname, KEY_MENU_REMOTE)) - return; + if (ev->skey == SKEY_MENU) { + it = elm_object_focused_item_get(obj); + if (!it) { + _ERR(" unable to get focused item "); + return; + } + m->focused_item = it; + + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfoFromItem(m->it_infolist, it); + if (!itinfo) { + free(ctxtinfo); + return; + } + + ctxtinfo->type = CONTEXT_TYPE_SONG; + ctxtinfo->context = itinfo->sinfo; + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + + m->ctxtinfo = ctxtinfo; - it = elm_object_focused_item_get(obj); - if (!it) { - _ERR(" unable to get focused item "); - return; - } - m->focused_item = it; - - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } - - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; - - itinfo = m_FindItemInfoFromItem(m->it_infolist, it); - if (!itinfo) { - free(ctxtinfo); - return; + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } - - ctxtinfo->type = CONTEXT_TYPE_SONG; - ctxtinfo->context = itinfo->sinfo; - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - - m->ctxtinfo = ctxtinfo; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } break; -- 2.7.4 From 27e8053f295afed68b92b9289af969f2c97ffb63 Mon Sep 17 00:00:00 2001 From: Kim Tae Soo Date: Thu, 23 Apr 2015 09:38:42 +0900 Subject: [PATCH 16/16] Apply ISKeyDownListener & ISKeyUpListener to Views Change-Id: I4ae4eebd0282a3ce2e04686120611e31504ed2c0 Signed-off-by: Kim Tae Soo --- include/base-view.h | 4 +- include/common.h | 2 +- include/context-view.h | 4 +- include/playback-view.h | 8 +- src/views/album-layout.cpp | 78 +++++++++-------- src/views/album-songs-layout.cpp | 127 +++++++++++++++------------ src/views/base-view.cpp | 110 +++++++++++++++--------- src/views/category-layout.cpp | 133 +++++++++++++++------------- src/views/category-songs-layout.cpp | 138 ++++++++++++++++------------- src/views/context-view.cpp | 57 ++++++------ src/views/folder-layout.cpp | 135 ++++++++++++++++------------- src/views/playback-view.cpp | 167 +++++++++++++++++++++--------------- src/views/song-layout.cpp | 88 +++++++++++-------- 13 files changed, 603 insertions(+), 448 deletions(-) diff --git a/include/base-view.h b/include/base-view.h index 3a783ae..f6705d3 100644 --- a/include/base-view.h +++ b/include/base-view.h @@ -86,8 +86,8 @@ public: virtual Evas_Object* Base(void); public: - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); - virtual void OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); + virtual void OnSKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Up *ev); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnMouseClicked(int id, Evas_Object *obj); diff --git a/include/common.h b/include/common.h index 7a6e5b3..19ba104 100644 --- a/include/common.h +++ b/include/common.h @@ -168,7 +168,7 @@ struct SParcel { SContentInfo *ctxtInfo; int updateType; const char *layoutId; - const char *keyEvent; + ESKey keyEvent; const char *focusedBtn; }; diff --git a/include/context-view.h b/include/context-view.h index 6395a3e..299cb62 100644 --- a/include/context-view.h +++ b/include/context-view.h @@ -102,8 +102,8 @@ public: virtual Evas_Object* Base(void); public: - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); - virtual void OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); + virtual void OnSKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Up *ev); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnMouseUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Up *ev); virtual void OnFocused(int id, Evas_Object *obj, Elm_Object_Item *item); diff --git a/include/playback-view.h b/include/playback-view.h index 039a13f..13584e9 100644 --- a/include/playback-view.h +++ b/include/playback-view.h @@ -48,8 +48,8 @@ private: int m_CbCurrentSongCount(void); private: - void m_HandleKeyPress(char *keyname); - void m_HandleKeyUnpress(char *keyname); + void m_HandleKeyPress(ESKey skey); + void m_HandleKeyUnpress(ESKey skey); void m_KeyBackPress(void); void m_KeyExitPress(void); @@ -107,8 +107,8 @@ public: virtual Evas_Object* Base(void); // Listener virtual function - virtual void OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); - virtual void OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev); + virtual void OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev); + virtual void OnSKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Up *ev); virtual void OnMouseMove(int id, Evas *e, Evas_Object *obj, Evas_Event_Mouse_Move *ev); virtual void OnRealized(int id, Evas_Object *obj, Elm_Object_Item *item); virtual void OnActivated(int id, Evas_Object *obj, Elm_Object_Item *item); diff --git a/src/views/album-layout.cpp b/src/views/album-layout.cpp index 0f3ef62..994e13f 100644 --- a/src/views/album-layout.cpp +++ b/src/views/album-layout.cpp @@ -470,10 +470,9 @@ bool CAlbumLayout::Create(CLayoutMgr *mgr, const char *albumId) m_CreateAlbumGrid(); Connect(layout, ALBUM_LAYOUT, TYPE_KEY_DOWN); - parcel.ctxtInfo = NULL; + memset(&parcel, NULL, sizeof(SParcel)); parcel.updateType = E_LAYOUT_UPDATE; parcel.layoutId = MUSIC_ALBUM_LAYOUT; - parcel.keyEvent = NULL; m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); } @@ -598,20 +597,21 @@ void CAlbumLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey { switch (id) { case ALBUM_LAYOUT: - if (ev->skey == SKEY_BACK) { + switch (ev->skey) { + case SKEY_BACK: SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_FOCUS_UPDATE; m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + break; + + default: + break; } - break; case ALBUM_GENGRID: { Elm_Object_Item *it = NULL; - SContentInfo *ctxtinfo = NULL; - SAlbumItemInfo *itinfo = NULL; - it = elm_object_focused_item_get(obj); if (!it) { _ERR(" unable to get focused item "); @@ -620,35 +620,45 @@ void CAlbumLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey m->focusedItem = it; - if (ev->skey == SKEY_MENU) { - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } - - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; - - itinfo = m_FindItemInfo(m->it_infolist, it); - if (!itinfo) { - free(ctxtinfo); - return; + switch (ev->skey) { + case SKEY_MENU: + { + SContentInfo *ctxtinfo = NULL; + SAlbumItemInfo *itinfo = NULL; + + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfo(m->it_infolist, it); + if (!itinfo) { + free(ctxtinfo); + return; + } + + ctxtinfo->type = CONTEXT_TYPE_ALBUM; + ctxtinfo->context = itinfo->alinfo; + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + + m->ctxtinfo = ctxtinfo; + + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } + break; - ctxtinfo->type = CONTEXT_TYPE_ALBUM; - ctxtinfo->context = itinfo->alinfo; - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - - m->ctxtinfo = ctxtinfo; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + default: + break; } } break; diff --git a/src/views/album-songs-layout.cpp b/src/views/album-songs-layout.cpp index 631baff..16d2b70 100644 --- a/src/views/album-songs-layout.cpp +++ b/src/views/album-songs-layout.cpp @@ -640,66 +640,78 @@ void CAlbumSongsLayout::t_OnShow(void) void CAlbumSongsLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + switch (id) { case ALBUM_SONGS_LAYOUT: - if (ev->skey == SKEY_BACK) { - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); + switch (ev->skey) { + case SKEY_BACK: parcel.updateType = E_DEPTH_UPDATE; parcel.layoutId = MUSIC_ALBUM_SONGS_LAYOUT; m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + break; + + default: + break; } break; case ALBUM_SONGS_GENLIST: { Elm_Object_Item *it = NULL; - SContentInfo *ctxtinfo = NULL; - SAlbumSongsItemInfo *itinfo = NULL; - SParcel parcel; - - memset(&parcel, 0, sizeof(SParcel)); - it = elm_object_focused_item_get(obj); if (!it) { _ERR(" unable to get focused item "); return; } - if (ev->skey == SKEY_LEFT) { + m->focused_item = it; + + switch (ev->skey) { + case SKEY_LEFT: parcel.updateType = E_FOCUS_UPDATE; + parcel.keyEvent = SKEY_MAX; m->vmgr->UpdateView(MUSIC_BASE_VIEW, &parcel); - } - else if (ev->skey == SKEY_MENU) { - m->focused_item = it; - - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; + break; + + case SKEY_MENU: + { + SContentInfo *ctxtinfo = NULL; + SAlbumSongsItemInfo *itinfo = NULL; + + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfoFromItem(m->it_infolist, it); + if (!itinfo) { + free(ctxtinfo); + return; + } + + ctxtinfo->type = CONTEXT_TYPE_SONG; + ctxtinfo->context = itinfo->sinfo; + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + + m->ctxtinfo = ctxtinfo; + + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } + break; - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; - - itinfo = m_FindItemInfoFromItem(m->it_infolist, it); - if (!itinfo) { - free(ctxtinfo); - return; - } - - ctxtinfo->type = CONTEXT_TYPE_SONG; - ctxtinfo->context = itinfo->sinfo; - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - - m->ctxtinfo = ctxtinfo; - - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + default: + break; } } break; @@ -707,22 +719,29 @@ void CAlbumSongsLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event case ALBUM_SONGS_PLAY_BUTTON: case ALBUM_SONGS_NEXT_BUTTON: case ALBUM_SONGS_LAST_BUTTON: - if (ev->skey == SKEY_UP) { - const char *btnText = NULL; - - if (id == ALBUM_SONGS_PLAY_BUTTON) - btnText = MUSIC_FIRST_BTN; - else if (id == ALBUM_SONGS_NEXT_BUTTON) - btnText = MUSIC_SECOND_BTN; - else //ALBUM_SONGS_LAST_BUTTON - btnText = MUSIC_THIRD_BTN; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.updateType = E_FOCUS_UPDATE; - parcel.keyEvent = KEY_UP; - parcel.focusedBtn = btnText; - m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + switch (ev->skey) { + case SKEY_UP: + { + const char *btnText = NULL; + + if (id == ALBUM_SONGS_PLAY_BUTTON) + btnText = MUSIC_FIRST_BTN; + else if (id == ALBUM_SONGS_NEXT_BUTTON) + btnText = MUSIC_SECOND_BTN; + else //ALBUM_SONGS_LAST_BUTTON + btnText = MUSIC_THIRD_BTN; + + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.updateType = E_FOCUS_UPDATE; + parcel.keyEvent = SKEY_UP; + parcel.focusedBtn = btnText; + m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + } + break; + + default: + break; } break; diff --git a/src/views/base-view.cpp b/src/views/base-view.cpp index 98f9b4e..50ed0a4 100644 --- a/src/views/base-view.cpp +++ b/src/views/base-view.cpp @@ -897,7 +897,7 @@ void CMusicBaseView::t_OnUpdate(void *data) SParcel *parcel = (SParcel *)data; if (parcel->updateType == E_FOCUS_UPDATE) { - if (parcel->keyEvent && !strcmp(parcel->keyEvent, KEY_UP)) { + if (parcel->keyEvent == SKEY_UP) { Evas_Object *focus = NULL; if (!strcmp(parcel->focusedBtn, MUSIC_FIRST_BTN)) { @@ -967,65 +967,84 @@ void CMusicBaseView::t_OnHide(void) } -void CMusicBaseView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CMusicBaseView::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case BASE_VIEW: - if (!strcmp(ev->keyname, KEY_EXIT)) { + switch (ev->skey) { + case SKEY_EXIT: m->pController->Stop(); elm_exit(); - } - else if (!strcmp(ev->keyname, KEY_ENTER) || - !strcmp(ev->keyname, KEY_ENTER_REMOTE)) { + break; + + case SKEY_ENTER: if (elm_object_focus_get(m->c_grpbtn)) { m_UpdateCurrentLayout(true); } - } - else if (!strcmp(ev->keyname, KEY_VOLUMEUP) || - !strcmp(ev->keyname, KEY_VOLUMEUP_REMOTE)) + break; + + case SKEY_VOLUME_UP: m->pHandleVolume->Up(); - else if (!strcmp(ev->keyname, KEY_VOLUMEDOWN) || - !strcmp(ev->keyname, KEY_VOLUMEDOWN_REMOTE)) + break; + + case SKEY_VOLUME_DOWN: m->pHandleVolume->Down(); - else if (!strcmp(ev->keyname, KEY_MUTE)) + break; + + case SKEY_MUTE: m->pHandleVolume->Mute(); - else if (!strcmp(ev->keyname, KEY_NEXT) || - !strcmp(ev->keyname, KEY_PREVIOUS) || - !strcmp(ev->keyname, KEY_PLAY) || - !strcmp(ev->keyname, KEY_PAUSE)) { + break; + + case SKEY_PLAY: + case SKEY_PAUSE: + case SKEY_PREVIOUS: + case SKEY_NEXT: SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_KEY_PRESS; - parcel.keyEvent = ev->keyname; + parcel.keyEvent = ev->skey; CViewMgr::GetInstance()->UpdateView((const char *)MUSIC_PLAYBACK_VIEW, &parcel); - } - else if (!strcmp(ev->keyname, KEY_LEFT)) + break; + + case SKEY_LEFT: m->eiShowLayout = ecore_idler_add(sm_CbShowLayoutIdler, this); + break; + + default: + break; + } break; case BASE_VIEW_PLAY_BUTTON: case BASE_VIEW_SORT_BUTTON: case BASE_VIEW_SOURCE_BUTTON: - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) + switch (ev->skey) { + case SKEY_BACK: elm_object_focus_set(m->c_grpbtn, EINA_TRUE); - else if (!strcmp(ev->keyname, KEY_DOWN) && - !((CExtBaseLayout *)m->lmgr->Layout())->EmptyStatus()) { - const char *btnText = NULL; - - if (id == BASE_VIEW_PLAY_BUTTON) - btnText = MUSIC_FIRST_BTN; - else if (id == BASE_VIEW_SORT_BUTTON) - btnText = MUSIC_SECOND_BTN; - else { //BASE_VIEW_SOURCE_BUTTON - if (m->srcBtnFocusedBySecondBtn) + break; + + case SKEY_DOWN: + if (!((CExtBaseLayout *)m->lmgr->Layout())->EmptyStatus()) { + const char *btnText = NULL; + + if (id == BASE_VIEW_PLAY_BUTTON) + btnText = MUSIC_FIRST_BTN; + else if (id == BASE_VIEW_SORT_BUTTON) btnText = MUSIC_SECOND_BTN; - else - btnText = MUSIC_THIRD_BTN; + else { //BASE_VIEW_SOURCE_BUTTON + if (m->srcBtnFocusedBySecondBtn) + btnText = MUSIC_SECOND_BTN; + else + btnText = MUSIC_THIRD_BTN; + } + + CExtBaseLayout *layout = (CExtBaseLayout *)m->lmgr->Layout(); + layout->SetFocus(btnText); } + break; - CExtBaseLayout *layout = (CExtBaseLayout *)m->lmgr->Layout(); - layout->SetFocus(btnText); + default: + break; } break; @@ -1035,10 +1054,14 @@ void CMusicBaseView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key case BASE_VIEW_GROUP_GENRE: case BASE_VIEW_GROUP_FOLDER: case BASE_VIEW_GROUP_PLAYLIST: - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + switch (ev->skey) { + case SKEY_BACK: m->pController->Stop(); elm_exit(); + break; + + default: + break; } break; @@ -1048,18 +1071,23 @@ void CMusicBaseView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key } -void CMusicBaseView::OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev) +void CMusicBaseView::OnSKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Up *ev) { switch (id) { case BASE_VIEW: - if (!strcmp(ev->keyname, KEY_NEXT) || - !strcmp(ev->keyname, KEY_PREVIOUS)) { + switch (ev->skey) { + case SKEY_NEXT: + case SKEY_PREVIOUS: SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_KEY_RELEASE; - parcel.keyEvent = ev->keyname; + parcel.keyEvent = ev->skey; CViewMgr::GetInstance()->UpdateView((const char *)MUSIC_PLAYBACK_VIEW, &parcel); m_UpdatePlaysongLabel(); + break; + + default: + break; } break; diff --git a/src/views/category-layout.cpp b/src/views/category-layout.cpp index e439290..d5140db 100644 --- a/src/views/category-layout.cpp +++ b/src/views/category-layout.cpp @@ -1284,7 +1284,8 @@ void CCategoryLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_S int count; Eina_List *alist = NULL; - if (ev->skey == SKEY_BACK) { + switch (ev->skey) { + case SKEY_BACK: if (t.depth == E_DEPTH_CATEGORY) { SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); @@ -1313,6 +1314,10 @@ void CCategoryLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_S } t_UpdateLayoutWithFocus(); + break; + + default: + break; } } break; @@ -1320,12 +1325,6 @@ void CCategoryLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_S case CATEGORY_LAYOUT_GENGRID: { Elm_Object_Item *it = NULL; - SContentInfo *ctxtinfo = NULL; - SCatItemInfo *itinfo = NULL; - - if (!obj) - return; - it = elm_object_focused_item_get(obj); if (!it) { _ERR(" unable to get focused item "); @@ -1334,43 +1333,54 @@ void CCategoryLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_S t.focused_item = it; - if ((ev->skey == SKEY_MENU) && - t.depth != E_DEPTH_SELECT_LIST && - t.depth != E_DEPTH_SHOW_LIST) { - if (t.ctxtinfo) { - free(t.ctxtinfo); - t.ctxtinfo = NULL; + switch (ev->skey) { + case SKEY_MENU: + { + SContentInfo *ctxtinfo = NULL; + SCatItemInfo *itinfo = NULL; + + if (t.depth != E_DEPTH_SELECT_LIST && + t.depth != E_DEPTH_SHOW_LIST) { + if (t.ctxtinfo) { + free(t.ctxtinfo); + t.ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfo(m->it_infolist, it); + if (!itinfo || itinfo->type == CAT_TYPE_PLAYLIST_NEW) { + free(ctxtinfo); + return; + } + + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + if (t.depth == E_DEPTH_ALBUM) { + ctxtinfo->type = CONTEXT_TYPE_ALBUM; + ctxtinfo->context = itinfo->alinfo; + } + else { + ctxtinfo->type = t_ContextType(); + ctxtinfo->context = itinfo->catinfo; + } + + t.ctxtinfo = ctxtinfo; + + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + } } + break; - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; - - itinfo = m_FindItemInfo(m->it_infolist, it); - if (!itinfo || itinfo->type == CAT_TYPE_PLAYLIST_NEW) { - free(ctxtinfo); - return; - } - - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - if (t.depth == E_DEPTH_ALBUM) { - ctxtinfo->type = CONTEXT_TYPE_ALBUM; - ctxtinfo->context = itinfo->alinfo; - } - else { - ctxtinfo->type = t_ContextType(); - ctxtinfo->context = itinfo->catinfo; - } - - t.ctxtinfo = ctxtinfo; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + default: + break; } } break; @@ -1378,22 +1388,29 @@ void CCategoryLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_S case CATEGORY_LAYOUT_PLAY_BUTTON: case CATEGORY_LAYOUT_NEXT_BUTTON: case CATEGORY_LAYOUT_LAST_BUTTON: - if (ev->skey == SKEY_UP) { - const char *btnText = NULL; - - if (id == CATEGORY_LAYOUT_PLAY_BUTTON) - btnText = MUSIC_FIRST_BTN; - else if (id == CATEGORY_LAYOUT_NEXT_BUTTON) - btnText = MUSIC_SECOND_BTN; - else //CATEGORY_LAYOUT_LAST_BUTTON - btnText = MUSIC_THIRD_BTN; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.updateType = E_FOCUS_UPDATE; - parcel.keyEvent = KEY_UP; - parcel.focusedBtn = btnText; - m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + switch (ev->skey) { + case SKEY_UP: + { + const char *btnText = NULL; + + if (id == CATEGORY_LAYOUT_PLAY_BUTTON) + btnText = MUSIC_FIRST_BTN; + else if (id == CATEGORY_LAYOUT_NEXT_BUTTON) + btnText = MUSIC_SECOND_BTN; + else //CATEGORY_LAYOUT_LAST_BUTTON + btnText = MUSIC_THIRD_BTN; + + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.updateType = E_FOCUS_UPDATE; + parcel.keyEvent = SKEY_UP; + parcel.focusedBtn = btnText; + m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + } + break; + + default: + break; } break; diff --git a/src/views/category-songs-layout.cpp b/src/views/category-songs-layout.cpp index 3869250..0462b60 100644 --- a/src/views/category-songs-layout.cpp +++ b/src/views/category-songs-layout.cpp @@ -989,66 +989,77 @@ void CCategorySongsLayout::t_OnShow(void) void CCategorySongsLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + switch (id) { case CATEGORY_SONGS_LAYOUT: - if (ev->skey == SKEY_BACK) { - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); + switch (ev->skey) { + case SKEY_BACK: parcel.updateType = E_DEPTH_UPDATE; parcel.layoutId = LayoutId(); m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + break; + + default: + break; } break; case CATEGORY_SONGS_GENLIST: { Elm_Object_Item *it = NULL; - SContentInfo *ctxtinfo = NULL; - SCategorySongsItemsInfo *itinfo = NULL; + it = elm_object_focused_item_get(obj); + if (!it) { + _ERR(" unable to get focused item "); + return; + } + m->focused_item = it; - if (ev->skey == SKEY_LEFT) { - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); + switch (ev->skey) { + case SKEY_LEFT: parcel.updateType = E_FOCUS_UPDATE; + parcel.keyEvent = SKEY_MAX; m->vmgr->UpdateView(MUSIC_BASE_VIEW, &parcel); - } - else if (ev->skey == SKEY_MENU) { - it = elm_object_focused_item_get(obj); - if (!it) { - _ERR(" unable to get focused item "); - return; + break; + + case SKEY_MENU: + { + SContentInfo *ctxtinfo = NULL; + SCategorySongsItemsInfo *itinfo = NULL; + + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfoFromItem(m->it_infolist, it); + if (!itinfo) { + free(ctxtinfo); + return; + } + + ctxtinfo->type = CONTEXT_TYPE_SONG; + ctxtinfo->context = itinfo->sinfo; + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + + m->ctxtinfo = ctxtinfo; + + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } - m->focused_item = it; - - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } - - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; + break; - itinfo = m_FindItemInfoFromItem(m->it_infolist, it); - if (!itinfo) { - free(ctxtinfo); - return; - } - - ctxtinfo->type = CONTEXT_TYPE_SONG; - ctxtinfo->context = itinfo->sinfo; - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - - m->ctxtinfo = ctxtinfo; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + default: + break; } } break; @@ -1059,24 +1070,31 @@ void CCategorySongsLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Ev case CATEGORY_SONGS_SELECT_ALL_BUTTON: case CATEGORY_SONGS_DONE_BUTTON: case CATEGORY_SONGS_CANCEL_BUTTON: - if (!strcmp(ev->keyname, KEY_UP)) { - const char *btnText = NULL; - - if (id == CATEGORY_SONGS_PLAY_BUTTON - || id == CATEGORY_SONGS_SELECT_ALL_BUTTON) - btnText = MUSIC_FIRST_BTN; - else if (id == CATEGORY_SONGS_NEXT_BUTTON - || id == CATEGORY_SONGS_DONE_BUTTON) - btnText = MUSIC_SECOND_BTN; - else //CATEGORY_SONGS_LAST_BUTTON or CATEGORY_SONGS_CANCEL_BUTTON - btnText = MUSIC_THIRD_BTN; + switch (ev->skey) { + case SKEY_UP: + { + const char *btnText = NULL; + + if (id == CATEGORY_SONGS_PLAY_BUTTON + || id == CATEGORY_SONGS_SELECT_ALL_BUTTON) + btnText = MUSIC_FIRST_BTN; + else if (id == CATEGORY_SONGS_NEXT_BUTTON + || id == CATEGORY_SONGS_DONE_BUTTON) + btnText = MUSIC_SECOND_BTN; + else //CATEGORY_SONGS_LAST_BUTTON or CATEGORY_SONGS_CANCEL_BUTTON + btnText = MUSIC_THIRD_BTN; - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.updateType = E_FOCUS_UPDATE; - parcel.keyEvent = KEY_UP; - parcel.focusedBtn = btnText; - m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.updateType = E_FOCUS_UPDATE; + parcel.keyEvent = SKEY_UP; + parcel.focusedBtn = btnText; + m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + } + break; + + default: + break; } break; diff --git a/src/views/context-view.cpp b/src/views/context-view.cpp index 933ee5b..91258f0 100644 --- a/src/views/context-view.cpp +++ b/src/views/context-view.cpp @@ -1356,18 +1356,24 @@ void CContextView::t_OnHide(void) } -void CContextView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CContextView::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case CONTEXT_VIEW: { - if (!strcmp(ev->keyname, KEY_BACK) || - !strcmp(ev->keyname, KEY_BACK_REMOTE)) { + switch (ev->skey) { + case SKEY_BACK: if (m->ctxtinfo && m->ctxtinfo->close) m->ctxtinfo->close(m->ctxtinfo->cbdata); - } - else if (!strcmp(ev->keyname, KEY_EXIT)) + break; + + case SKEY_EXIT: elm_exit(); + break; + + default: + break; + } } break; @@ -1377,7 +1383,7 @@ void CContextView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_D } -void CContextView::OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev) +void CContextView::OnSKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Up *ev) { switch (id) { case CONTEXT_VIEW: @@ -1393,39 +1399,36 @@ void CContextView::OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up case CONTEXT_VIEW_BUTTON_ADDSONG: case CONTEXT_VIEW_BUTTON_REMOVESONG: case CONTEXT_VIEW_BUTTON_DELETE: - { - if (strcmp(ev->keyname, KEY_ENTER) && - strcmp(ev->keyname, KEY_ENTER_REMOTE)) - return; - + switch (ev->skey) { + case SKEY_ENTER: m_HandleBtnSelected(id); + break; + + default: + break; } break; case CONTEXT_VIEW_MORE_INFO: - { - if (!obj || !ev) - return; - - if (strcmp(ev->keyname, KEY_ENTER) && - strcmp(ev->keyname, KEY_ENTER_REMOTE)) - return; - + switch (ev->skey) { + case SKEY_ENTER: m_HandleMoreinfoSelected(obj); + break; + + default: + break; } break; default: // CONTEXT_VIEW_RELATIVE_CONTENT - { - if (!obj || !ev) - return; - - if (strcmp(ev->keyname, KEY_ENTER) && - strcmp(ev->keyname, KEY_ENTER_REMOTE)) - return; - + switch (ev->skey) { + case SKEY_ENTER: elm_object_signal_emit(obj, MUSIC_SIGNAL_CONTENT_CLICKED, MUSIC_CONTEXT_VIEW); + break; + + default: + break; } break; } diff --git a/src/views/folder-layout.cpp b/src/views/folder-layout.cpp index 21e2728..33c152d 100644 --- a/src/views/folder-layout.cpp +++ b/src/views/folder-layout.cpp @@ -938,7 +938,8 @@ void CFolderLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKe switch (id) { case FOLDER_LAYOUT: { - if (ev->skey == SKEY_BACK) { + switch (ev->skey) { + case SKEY_BACK: if (m->depth == E_DEPTH_SONG) { m->depth = E_DEPTH_FOLDER; m_UpdateFolderGrid(false); @@ -952,6 +953,10 @@ void CFolderLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKe parcel.updateType = E_FOCUS_UPDATE; m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); } + break; + + default: + break; } } break; @@ -959,54 +964,58 @@ void CFolderLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKe case FOLDER_LAYOUT_GENGRID: { Elm_Object_Item *it = NULL; - SContentInfo *ctxtinfo = NULL; - SFolderItemInfo *itinfo = NULL; - - if (!obj) + it = elm_object_focused_item_get(obj); + if (!it) { + _ERR(" unable to get focused item "); return; + } + m->focused_item = it; + + switch (ev->skey) { + case SKEY_MENU: + { + SContentInfo *ctxtinfo = NULL; + SFolderItemInfo *itinfo = NULL; + + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfo(m->it_infolist, it); + if (!itinfo) { + free(ctxtinfo); + return; + } + + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + if (m->depth == E_DEPTH_SONG) { + ctxtinfo->type = CONTEXT_TYPE_SONG; + ctxtinfo->context = itinfo->sinfo; + } + else { + ctxtinfo->type = CONTEXT_TYPE_FOLDER; + ctxtinfo->context = itinfo->finfo; + } + + m->ctxtinfo = ctxtinfo; - if (ev->skey == SKEY_MENU) { - it = elm_object_focused_item_get(obj); - if (!it) { - _ERR(" unable to get focused item "); - return; - } - m->focused_item = it; - - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } - - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; - - itinfo = m_FindItemInfo(m->it_infolist, it); - if (!itinfo) { - free(ctxtinfo); - return; - } - - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - if (m->depth == E_DEPTH_SONG) { - ctxtinfo->type = CONTEXT_TYPE_SONG; - ctxtinfo->context = itinfo->sinfo; - } - else { - ctxtinfo->type = CONTEXT_TYPE_FOLDER; - ctxtinfo->context = itinfo->finfo; + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } + break; - m->ctxtinfo = ctxtinfo; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + default: + break; } } break; @@ -1014,24 +1023,30 @@ void CFolderLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKe case FOLDER_LAYOUT_PLAY_BUTTON: case FOLDER_LAYOUT_NEXT_BUTTON: case FOLDER_LAYOUT_LAST_BUTTON: - if (ev->skey == SKEY_UP) { - const char *btnText = NULL; + switch (ev->skey) { + case SKEY_UP: + { + const char *btnText = NULL; + + if (id == FOLDER_LAYOUT_PLAY_BUTTON) + btnText = MUSIC_FIRST_BTN; + else if (id == FOLDER_LAYOUT_NEXT_BUTTON) + btnText = MUSIC_SECOND_BTN; + else //FOLDER_LAYOUT_LAST_BUTTON + btnText = MUSIC_THIRD_BTN; - if (id == FOLDER_LAYOUT_PLAY_BUTTON) - btnText = MUSIC_FIRST_BTN; - else if (id == FOLDER_LAYOUT_NEXT_BUTTON) - btnText = MUSIC_SECOND_BTN; - else //FOLDER_LAYOUT_LAST_BUTTON - btnText = MUSIC_THIRD_BTN; + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.updateType = E_FOCUS_UPDATE; + parcel.keyEvent = SKEY_UP; + parcel.focusedBtn = btnText; + m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + } + break; - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.updateType = E_FOCUS_UPDATE; - parcel.keyEvent = KEY_UP; - parcel.focusedBtn = btnText; - m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + default: + break; } - break; default: break; diff --git a/src/views/playback-view.cpp b/src/views/playback-view.cpp index 7b3627d..f18bb27 100644 --- a/src/views/playback-view.cpp +++ b/src/views/playback-view.cpp @@ -555,39 +555,65 @@ void CPlaybackView::m_KeyPreviousUnpress(void) } -void CPlaybackView::m_HandleKeyPress(char *keyname) +void CPlaybackView::m_HandleKeyPress(ESKey skey) { - if (!strcmp(keyname, (char *)KEY_EXIT)) + switch (skey) { + case SKEY_EXIT: m_KeyExitPress(); - else if (!strcmp(keyname, (char *)KEY_BACK) || - !strcmp(keyname, (char *)KEY_BACK_REMOTE)) + break; + + case SKEY_BACK: m_KeyBackPress(); - else if (!strcmp(keyname, (char *)KEY_PLAY)) + break; + + case SKEY_PLAY: m_KeyPlayPress(); - else if (!strcmp(keyname, (char *)KEY_PAUSE)) + break; + + case SKEY_PAUSE: m_KeyPausePress(); - else if (!strcmp(keyname, (char *)KEY_NEXT)) + break; + + case SKEY_NEXT: m_KeyNextPress(); - else if (!strcmp(keyname, (char *)KEY_PREVIOUS)) + break; + + case SKEY_PREVIOUS: m_KeyPreviousPress(); - else if (!strcmp(keyname, (char *)KEY_VOLUMEUP) || - !strcmp(keyname, (char *)KEY_VOLUMEUP_REMOTE)) + break; + + case SKEY_VOLUME_UP: m->pHandleVolume->Up(); - else if (!strcmp(keyname, (char *)KEY_VOLUMEDOWN) || - !strcmp(keyname, (char *)KEY_VOLUMEDOWN_REMOTE)) + break; + + case SKEY_VOLUME_DOWN: m->pHandleVolume->Down(); - else if (!strcmp(keyname, (char *)KEY_MUTE) || - !strcmp(keyname, (char *)KEY_MUTE_REMOTE)) + break; + + case SKEY_MUTE: m->pHandleVolume->Mute(); + break; + + default: + break; + } } -void CPlaybackView::m_HandleKeyUnpress(char *keyname) +void CPlaybackView::m_HandleKeyUnpress(ESKey skey) { - if (!strcmp(keyname, KEY_PREVIOUS)) + switch (skey) { + case SKEY_PREVIOUS: m_KeyPreviousUnpress(); - else if (!strcmp(keyname, KEY_NEXT)) + break; + + case SKEY_NEXT: m_KeyNextUnpress(); + break; + + default: + break; + } } @@ -1004,13 +1030,13 @@ void CPlaybackView::t_OnUpdate(void *data) SParcel *parcel = (SParcel *)data; int updateType; - char *keyEvent = NULL; + ESKey keyEvent = SKEY_MAX; if (!parcel) updateType = E_PLAYLIST_UPDATE; else { updateType = parcel->updateType; - keyEvent = (char *)parcel->keyEvent; + keyEvent = parcel->keyEvent; } switch (updateType) { @@ -1052,64 +1078,71 @@ void CPlaybackView::t_OnHide(void) } -void CPlaybackView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev) +void CPlaybackView::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Down *ev) { switch (id) { case EO_BASE: - m_HandleKeyPress(ev->keyname); + m_HandleKeyPress(ev->skey); break; case EO_PLAYLIST: { Elm_Object_Item *it = NULL; - SContentInfo *ctxtinfo = NULL; - SItemInfo *itinfo = NULL; - SParcel parcel; - - if (!strcmp(ev->keyname, KEY_MENU) || - !strcmp(ev->keyname, KEY_MENU_REMOTE)) { - it = elm_object_focused_item_get(obj); - if (!it) { - _ERR(" unable to get focused item "); - return; - } - m->focused_item = it; - - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } - - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; - - itinfo = m_FindItemInfoFromItem(m->elInfo, it); - if (!itinfo) { - free(ctxtinfo); - return; + it = elm_object_focused_item_get(obj); + if (!it) { + _ERR(" unable to get focused item "); + return; + } + m->focused_item = it; + + switch (ev->skey) { + case SKEY_MENU: + { + SContentInfo *ctxtinfo = NULL; + SItemInfo *itinfo = NULL; + SParcel parcel; + + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfoFromItem(m->elInfo, it); + if (!itinfo) { + free(ctxtinfo); + return; + } + + if (m->pController->PlayState() == PLAY_STATUS_PLAY && + itinfo == m->cs_itinfo) + ctxtinfo->status = PLAY_STATUS_PLAY; + else + ctxtinfo->status = PLAY_STATUS_PAUSE; + + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + ctxtinfo->type = CONTEXT_TYPE_PLAYSONG; + ctxtinfo->context = itinfo->sinfo; + + m->ctxtinfo = ctxtinfo; + + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->mgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } + break; - if (m->pController->PlayState() == PLAY_STATUS_PLAY && - itinfo == m->cs_itinfo) - ctxtinfo->status = PLAY_STATUS_PLAY; - else - ctxtinfo->status = PLAY_STATUS_PAUSE; - - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - ctxtinfo->type = CONTEXT_TYPE_PLAYSONG; - ctxtinfo->context = itinfo->sinfo; - - m->ctxtinfo = ctxtinfo; - - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->mgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + default: + break; } } + break; default: break; @@ -1117,11 +1150,11 @@ void CPlaybackView::OnKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_ } -void CPlaybackView::OnKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_Key_Up *ev) +void CPlaybackView::OnSKeyUp(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_Up *ev) { switch (id) { case EO_BASE: - m_HandleKeyUnpress(ev->keyname); + m_HandleKeyUnpress(ev->skey); break; default: diff --git a/src/views/song-layout.cpp b/src/views/song-layout.cpp index ca9eff1..89222e2 100644 --- a/src/views/song-layout.cpp +++ b/src/views/song-layout.cpp @@ -621,11 +621,16 @@ void CSongLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_ switch (id) { case SONG_LAYOUT: { - if (ev->skey == SKEY_BACK) { + switch (ev->skey) { + case SKEY_BACK: SParcel parcel; memset(&parcel, 0, sizeof(SParcel)); parcel.updateType = E_FOCUS_UPDATE; m->vmgr->UpdateView((const char *)MUSIC_BASE_VIEW, &parcel); + break; + + default: + break; } } break; @@ -633,45 +638,52 @@ void CSongLayout::OnSKeyDown(int id, Evas *e, Evas_Object *obj, Evas_Event_SKey_ case SONG_LAYOUT_GENLIST: { Elm_Object_Item *it = NULL; - SContentInfo *ctxtinfo = NULL; - SSongItemInfo *itinfo = NULL; - - if (ev->skey == SKEY_MENU) { - it = elm_object_focused_item_get(obj); - if (!it) { - _ERR(" unable to get focused item "); - return; - } - m->focused_item = it; - - if (m->ctxtinfo) { - free(m->ctxtinfo); - m->ctxtinfo = NULL; - } - - ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); - if (!ctxtinfo) - return; - - itinfo = m_FindItemInfoFromItem(m->it_infolist, it); - if (!itinfo) { - free(ctxtinfo); - return; + it = elm_object_focused_item_get(obj); + if (!it) { + _ERR(" unable to get focused item "); + return; + } + m->focused_item = it; + + switch (ev->skey) { + case SKEY_MENU: + { + SContentInfo *ctxtinfo = NULL; + SSongItemInfo *itinfo = NULL; + + if (m->ctxtinfo) { + free(m->ctxtinfo); + m->ctxtinfo = NULL; + } + + ctxtinfo = (SContentInfo *)calloc(1, sizeof(*ctxtinfo)); + if (!ctxtinfo) + return; + + itinfo = m_FindItemInfoFromItem(m->it_infolist, it); + if (!itinfo) { + free(ctxtinfo); + return; + } + + ctxtinfo->type = CONTEXT_TYPE_SONG; + ctxtinfo->context = itinfo->sinfo; + ctxtinfo->cbdata = this; + ctxtinfo->update = sm_CbCtxtUpdate; + ctxtinfo->close = sm_CbCtxtClose; + + m->ctxtinfo = ctxtinfo; + + SParcel parcel; + memset(&parcel, 0, sizeof(SParcel)); + parcel.ctxtInfo = ctxtinfo; + if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) + _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); } + break; - ctxtinfo->type = CONTEXT_TYPE_SONG; - ctxtinfo->context = itinfo->sinfo; - ctxtinfo->cbdata = this; - ctxtinfo->update = sm_CbCtxtUpdate; - ctxtinfo->close = sm_CbCtxtClose; - - m->ctxtinfo = ctxtinfo; - - SParcel parcel; - memset(&parcel, 0, sizeof(SParcel)); - parcel.ctxtInfo = ctxtinfo; - if (!m->vmgr->PushView(MUSIC_CONTEXT_VIEW, &parcel)) - _ERR("viewmgr push view MUSIC_CONTEXT_VIEW failed"); + default: + break; } } break; -- 2.7.4