From: JuWan Kim Date: Tue, 10 Feb 2015 01:48:03 +0000 (+0900) Subject: Change FbBaseLayout -> FbAllLayout / Add layout dummy code files for X-Git-Tag: submit/tizen_tv/20150210.071227^0 X-Git-Url: http://review.tizen.org/git/?p=profile%2Ftv%2Fapps%2Fnative%2Ffilebrowser.git;a=commitdiff_plain;h=f2f58937698093993cd952d876a611ba0446c426 Change FbBaseLayout -> FbAllLayout / Add layout dummy code files for changing to multi-layout Change-Id: I0ab227397d2daaed58d99c88b82d490c7cae6411 Signed-off-by: JuWan Kim --- diff --git a/CMakeLists.txt b/CMakeLists.txt index c9d6082..df3f287 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ SET(SRCS src/main.cpp src/views/BaseView/FileGrid.cpp src/views/BaseView/Info.cpp src/views/BaseView/FbBaseView.cpp - src/views/BaseView/FbBaseLayout.cpp + src/layouts/FbAllLayout.cpp src/views/BaseView/GengridItemClass.cpp src/views/BaseView/SortCtxPopup.cpp src/views/BaseView/SourceCtxPopup.cpp diff --git a/include/FbBaseLayout.h b/include/FbAllLayout.h similarity index 66% rename from include/FbBaseLayout.h rename to include/FbAllLayout.h index c5d446e..a910335 100644 --- a/include/FbBaseLayout.h +++ b/include/FbAllLayout.h @@ -1,10 +1,10 @@ -#ifndef __FBBASE_LAYOUT_H__ -#define __FBBASE_LAYOUT_H__ +#ifndef __FBALL_LAYOUT_H__ +#define __FBALL_LAYOUT_H__ -class CFbBaseLayout : public CBaseLayout { +class CFbAllLayout : public CBaseLayout { private: - struct SFbBaseLayout *m; + struct SFbAllLayout *m; private: static void sm_CbUpdateEmptyFocusSequence(void* cookie); @@ -16,8 +16,8 @@ private: void t_DestroyFileGrid(void); public: - CFbBaseLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {} - virtual ~CFbBaseLayout() {} + CFbAllLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {} + virtual ~CFbAllLayout() {} bool Create(CLayoutMgr *mgr, void *data); virtual void Destroy(void); @@ -30,4 +30,4 @@ public: }; -#endif /* __FBBASE_LAYOUT_H__ */ \ No newline at end of file +#endif /* __FBALL_LAYOUT_H__ */ diff --git a/include/FbMusicLayout.h b/include/FbMusicLayout.h new file mode 100644 index 0000000..82f4cee --- /dev/null +++ b/include/FbMusicLayout.h @@ -0,0 +1,28 @@ +#ifndef __FBMUSIC_LAYOUT_H__ +#define __FBMUSIC_LAYOUT_H__ + + +class CFbMusicLayout : public CBaseLayout { +private: + struct SFbMusicLayout *m; + +private: + bool t_CreateFileGrid(Evas_Object *layout); + void t_DestroyFileGrid(void); + +public: + CFbMusicLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {} + virtual ~CFbMusicLayout() {} + + bool Create(CLayoutMgr *mgr, void *data); + virtual void Destroy(void); + + void Update(bool flag); + + void SetFocus(Eina_Bool flag); + Evas_Object* Grid(void); + void Action(void); +}; + + +#endif /* __FBMUSIC_LAYOUT_H__ */ diff --git a/include/FbPhotoLayout.h b/include/FbPhotoLayout.h new file mode 100644 index 0000000..baa6b7b --- /dev/null +++ b/include/FbPhotoLayout.h @@ -0,0 +1,28 @@ +#ifndef __FBPHOTO_LAYOUT_H__ +#define __FBPHOTO_LAYOUT_H__ + + +class CFbPhotoLayout : public CBaseLayout { +private: + struct SFbPhotoLayout *m; + +private: + bool t_CreateFileGrid(Evas_Object *layout); + void t_DestroyFileGrid(void); + +public: + CFbPhotoLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {} + virtual ~CFbPhotoLayout() {} + + bool Create(CLayoutMgr *mgr, void *data); + virtual void Destroy(void); + + void Update(bool flag); + + void SetFocus(Eina_Bool flag); + Evas_Object* Grid(void); + void Action(void); +}; + + +#endif /* __FBPHOTO_LAYOUT_H__ */ diff --git a/include/FbVideoLayout.h b/include/FbVideoLayout.h new file mode 100644 index 0000000..f79d982 --- /dev/null +++ b/include/FbVideoLayout.h @@ -0,0 +1,28 @@ +#ifndef __FBVIDEO_LAYOUT_H__ +#define __FBVIDEO_LAYOUT_H__ + + +class CFbVideoLayout : public CBaseLayout { +private: + struct SFbVideoLayout *m; + +private: + bool t_CreateFileGrid(Evas_Object *layout); + void t_DestroyFileGrid(void); + +public: + CFbVideoLayout(const char *szLayoutId) : CBaseLayout(szLayoutId), m(0) {} + virtual ~CFbVideoLayout() {} + + bool Create(CLayoutMgr *mgr, void *data); + virtual void Destroy(void); + + void Update(bool flag); + + void SetFocus(Eina_Bool flag); + Evas_Object* Grid(void); + void Action(void); +}; + + +#endif /* __FBVIDEO_LAYOUT_H__ */ diff --git a/src/views/BaseView/FileGrid.h b/include/FileGrid.h similarity index 100% rename from src/views/BaseView/FileGrid.h rename to include/FileGrid.h diff --git a/packaging/org.tizen.file-browser-tv-ref.spec b/packaging/org.tizen.file-browser-tv-ref.spec index 8fe091b..8678d16 100644 --- a/packaging/org.tizen.file-browser-tv-ref.spec +++ b/packaging/org.tizen.file-browser-tv-ref.spec @@ -52,7 +52,6 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -%manifest %{name}.manifest %{_bindir}/* %{_resdir}/* %{_manifestdir}/%{name}.xml diff --git a/src/views/BaseView/FbBaseLayout.cpp b/src/layouts/FbAllLayout.cpp similarity index 82% rename from src/views/BaseView/FbBaseLayout.cpp rename to src/layouts/FbAllLayout.cpp index 1da2001..79942f0 100644 --- a/src/views/BaseView/FbBaseLayout.cpp +++ b/src/layouts/FbAllLayout.cpp @@ -1,4 +1,3 @@ - #include #include #include @@ -12,10 +11,10 @@ #include #include "FbBaseView.h" -#include "FbBaseLayout.h" +#include "FbAllLayout.h" -struct SFbBaseLayout { +struct SFbAllLayout { Evas_Object *eoWin; Evas_Object *eoBase; CFileGrid *pFileGrid; @@ -25,7 +24,7 @@ struct SFbBaseLayout { }; -void CFbBaseLayout::sm_CbUpdateEmptyFocusSequence(void* cookie) +void CFbAllLayout::sm_CbUpdateEmptyFocusSequence(void* cookie) { _DBG(); CFbBaseView *pfbBaseView = NULL; @@ -40,7 +39,7 @@ void CFbBaseLayout::sm_CbUpdateEmptyFocusSequence(void* cookie) } -void CFbBaseLayout::sm_CbUpdatedGrid(void* cookie) +void CFbAllLayout::sm_CbUpdatedGrid(void* cookie) { _DBG(); CFbBaseView *pfbBaseView = NULL; @@ -54,7 +53,7 @@ void CFbBaseLayout::sm_CbUpdatedGrid(void* cookie) } -void CFbBaseLayout::sm_CbUnsetFocus(void* cookie) +void CFbAllLayout::sm_CbUnsetFocus(void* cookie) { _DBG(); CFbBaseView *pfbBaseView = NULL; @@ -67,7 +66,7 @@ void CFbBaseLayout::sm_CbUnsetFocus(void* cookie) } -void CFbBaseLayout::sm_CbLinkApp(void* cookie, int type, int source_type, char *path) +void CFbAllLayout::sm_CbLinkApp(void* cookie, int type, int source_type, char *path) { _DBG(); CFbBaseView *pfbBaseView = NULL; @@ -81,7 +80,7 @@ void CFbBaseLayout::sm_CbLinkApp(void* cookie, int type, int source_type, char * } -bool CFbBaseLayout::t_CreateFileGrid(Evas_Object *layout) +bool CFbAllLayout::t_CreateFileGrid(Evas_Object *layout) { m->pFileGrid = new CFileGrid; if (!m->pFileGrid) @@ -102,7 +101,7 @@ bool CFbBaseLayout::t_CreateFileGrid(Evas_Object *layout) } -void CFbBaseLayout::t_DestroyFileGrid(void) +void CFbAllLayout::t_DestroyFileGrid(void) { if (!m->pFileGrid) return; @@ -113,7 +112,7 @@ void CFbBaseLayout::t_DestroyFileGrid(void) } -bool CFbBaseLayout::Create(CLayoutMgr *mgr, void *data) +bool CFbAllLayout::Create(CLayoutMgr *mgr, void *data) { ASSERT(!m); ASSERT(mgr); @@ -121,7 +120,7 @@ bool CFbBaseLayout::Create(CLayoutMgr *mgr, void *data) Evas_Object *layout = NULL; _CREATE_BEGIN{ - _CHECK(m = new SFbBaseLayout) + _CHECK(m = new SFbAllLayout) _CHECK(m->pLayoutMgr = mgr) _CHECK(m->pViewMgr = CViewMgr::GetInstance()) _CHECK(m->eoBase = m->pLayoutMgr->Base()) @@ -149,7 +148,7 @@ bool CFbBaseLayout::Create(CLayoutMgr *mgr, void *data) } -void CFbBaseLayout::Destroy(void) +void CFbAllLayout::Destroy(void) { ASSERT(m); @@ -160,7 +159,7 @@ void CFbBaseLayout::Destroy(void) } -void CFbBaseLayout::Update(bool flag) +void CFbAllLayout::Update(bool flag) { ASSERT(m); _DBG(); @@ -169,7 +168,7 @@ void CFbBaseLayout::Update(bool flag) } -void CFbBaseLayout::SetFocus(Eina_Bool flag) +void CFbAllLayout::SetFocus(Eina_Bool flag) { ASSERT(m); _DBG(); @@ -178,7 +177,7 @@ void CFbBaseLayout::SetFocus(Eina_Bool flag) } -Evas_Object* CFbBaseLayout::Grid(void) +Evas_Object* CFbAllLayout::Grid(void) { ASSERT(m); @@ -186,7 +185,7 @@ Evas_Object* CFbBaseLayout::Grid(void) } -void CFbBaseLayout::Action(void) +void CFbAllLayout::Action(void) { ASSERT(m); diff --git a/src/layouts/FbMusicLayout.cpp b/src/layouts/FbMusicLayout.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/layouts/FbPhotoLayout.cpp b/src/layouts/FbPhotoLayout.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/layouts/FbVideoLayout.cpp b/src/layouts/FbVideoLayout.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/views/BaseView/FbBaseView.cpp b/src/views/BaseView/FbBaseView.cpp index c3bff6a..bfd7c2c 100644 --- a/src/views/BaseView/FbBaseView.cpp +++ b/src/views/BaseView/FbBaseView.cpp @@ -43,7 +43,7 @@ #include #include #include -#include "FbBaseLayout.h" +#include "FbAllLayout.h" #define TOTAL_GROUP_BTNS 4 #define TOTAL_TOP_BTNS 2 @@ -90,7 +90,7 @@ struct SFbBaseView { CPopup *pPopup; CLayoutMgr *pLayoutMgr; - CFbBaseLayout *pFbBaseLayout; + CFbAllLayout *pFbAllLayout; SFbBaseView() { int a; @@ -124,7 +124,7 @@ struct SFbBaseView { elm_exit(); else if (!strcmp(ev->keyname, KEY_ENTER)) { if (elm_object_focus_get(m->eoSelectedBtnGroup)) { - m->pFbBaseLayout->SetFocus(EINA_TRUE); + m->pFbAllLayout->SetFocus(EINA_TRUE); } } } @@ -144,12 +144,12 @@ struct SFbBaseView { switch (instance->Type()) { case CCtxPopup::TOPBTN_SORT: elm_object_text_set(m->eoBtnSort, text); - m->pFbBaseLayout->Update(true); + m->pFbAllLayout->Update(true); break; case CCtxPopup::TOPBTN_SOURCE: elm_object_text_set(m->eoBtnSource, text); - m->pFbBaseLayout->Update(false); + m->pFbAllLayout->Update(false); break; default: @@ -211,7 +211,7 @@ struct SFbBaseView { m->eoSelectedBtnGroup = obj; elm_object_signal_emit(m->eoSelectedBtnGroup, FBR_SIGNAL_GROUP_SELECTED, ""); - m->pFbBaseLayout->Update(false); + m->pFbAllLayout->Update(false); } } *pHandlerGroup[TOTAL_GROUP_BTNS]; }; @@ -302,16 +302,16 @@ void CFbBaseView::UpdatedGrid(void) for (i = 0; i < TOTAL_GROUP_BTNS; i++) elm_object_focus_next_object_set(m->eoBtnGroup[i], - m->pFbBaseLayout->Grid(), ELM_FOCUS_RIGHT); + m->pFbAllLayout->Grid(), ELM_FOCUS_RIGHT); elm_object_focus_next_object_set(m->eoBtnGroup[E_GRP_ALL], m->eoBtnSort, ELM_FOCUS_UP); elm_object_focus_next_object_set(m->eoBtnSort, m->eoBtnGroup[E_GRP_ALL], ELM_FOCUS_LEFT); elm_object_focus_next_object_set(m->eoBtnSort, - m->pFbBaseLayout->Grid(), ELM_FOCUS_DOWN); + m->pFbAllLayout->Grid(), ELM_FOCUS_DOWN); elm_object_focus_next_object_set(m->eoBtnSource, - m->pFbBaseLayout->Grid(), ELM_FOCUS_DOWN); + m->pFbAllLayout->Grid(), ELM_FOCUS_DOWN); elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT, ""); elm_object_part_text_set(m->eoBase, FBR_PART_NO_CONTENT_SUB, ""); @@ -416,7 +416,7 @@ void CFbBaseView::t_CreateFullView(void) t_CreateTopSession(); t_CreateLeftSession(); _DBG("UpdateLayout"); - m->pFbBaseLayout->Update(false); + m->pFbAllLayout->Update(false); } void CFbBaseView::t_SetSelectedGroupButton(Evas_Object* obj) @@ -449,7 +449,7 @@ void CFbBaseView::t_OnShow(void) void CFbBaseView::t_OnUpdate(void *data) { _DBG(); - m->pFbBaseLayout->Action(); + m->pFbAllLayout->Action(); } void CFbBaseView::t_OnHide(void) @@ -496,17 +496,17 @@ bool CFbBaseView::Create(void *data) } _CHECK(m->pLayoutMgr = new CLayoutMgr) _CHECK(m->pLayoutMgr->Create(eoBase, NULL)) - _CHECK(m->pFbBaseLayout = new CFbBaseLayout(FB_BASE_LAYOUT)) - _CHECK(m->pFbBaseLayout->Create(m->pLayoutMgr, NULL)) - _CHECK(m->pLayoutMgr->AddLayout(m->pFbBaseLayout)) + _CHECK(m->pFbAllLayout = new CFbAllLayout(FB_BASE_LAYOUT)) + _CHECK(m->pFbAllLayout->Create(m->pLayoutMgr, NULL)) + _CHECK(m->pLayoutMgr->AddLayout(m->pFbAllLayout)) _CHECK(CUsbConnectionListener::Create()) _WHEN_SUCCESS{} _CHECK_FAIL{ CUsbConnectionListener::Destroy(); } - _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbBaseLayout); } - _CHECK_FAIL{ m->pFbBaseLayout->Destroy(); } - _CHECK_FAIL{ delete m->pFbBaseLayout; m->pFbBaseLayout = NULL; } + _CHECK_FAIL{ m->pLayoutMgr->RemoveLayout(m->pFbAllLayout); } + _CHECK_FAIL{ m->pFbAllLayout->Destroy(); } + _CHECK_FAIL{ delete m->pFbAllLayout; m->pFbAllLayout = NULL; } _CHECK_FAIL{ m->pLayoutMgr->Destroy(); } _CHECK_FAIL{ delete m->pLayoutMgr; m->pLayoutMgr = NULL; } _CHECK_FAIL{ /* elm_layout_file_set*/ } @@ -533,9 +533,9 @@ void CFbBaseView::Destroy(void) CBaseView::Destroy(); CUsbConnectionListener::Destroy(); - m->pLayoutMgr->RemoveLayout(m->pFbBaseLayout); - m->pFbBaseLayout->Destroy(); - delete m->pFbBaseLayout; + m->pLayoutMgr->RemoveLayout(m->pFbAllLayout); + m->pFbAllLayout->Destroy(); + delete m->pFbAllLayout; m->pLayoutMgr->Destroy(); delete m->pLayoutMgr; @@ -588,7 +588,7 @@ void CFbBaseView::OnUpdated(const SEntity *entity) m->pCtxPopup = NULL; } if (CInfo::SourceType() != E_TV) { - m->pFbBaseLayout->Update(false); + m->pFbAllLayout->Update(false); elm_object_focus_set(t_SelectedGroupButton(), EINA_TRUE); } }