diff options
author | Kim Youngjin <yj21c.kim@samsung.com> | 2015-03-30 17:27:33 +0900 |
---|---|---|
committer | Kim Youngjin <yj21c.kim@samsung.com> | 2015-03-30 17:27:33 +0900 |
commit | 473a826c4fa089d1d775f0611c0d342e33d8795a (patch) | |
tree | bf9bddeba6de70c35b167a47e65f7c46cf11c767 /include | |
parent | 454badf837e5d8c9b0035b55a1ef2b67035e54fe (diff) | |
download | settings-473a826c4fa089d1d775f0611c0d342e33d8795a.tar.gz settings-473a826c4fa089d1d775f0611c0d342e33d8795a.tar.bz2 settings-473a826c4fa089d1d775f0611c0d342e33d8795a.zip |
Refactoring
Change-Id: Ib44549f0a0d266c0315e8de76cba9beb97cd2984
Signed-off-by: Kim Youngjin <yj21c.kim@samsung.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/settingviewmgr.h (renamed from include/viewmgr.h) | 56 | ||||
-rw-r--r-- | include/view_maincatalog.h | 28 | ||||
-rw-r--r-- | include/view_need_pwd.h | 31 | ||||
-rw-r--r-- | include/view_pwd_popup.h | 27 | ||||
-rw-r--r-- | include/view_sublist.h | 43 | ||||
-rw-r--r-- | include/view_system_clock.h | 38 | ||||
-rw-r--r-- | include/view_uigadget.h | 31 |
7 files changed, 234 insertions, 20 deletions
diff --git a/include/viewmgr.h b/include/settingviewmgr.h index d0120e0..3acf9d2 100644 --- a/include/viewmgr.h +++ b/include/settingviewmgr.h @@ -14,13 +14,13 @@ * limitations under the License. */ -#ifndef __VIEWMGR_H__ -#define __VIEWMGR_H__ +#ifndef __SETTING_VIEW_MGR_H__ +#define __SETTING_VIEW_MGR_H__ #include <Elementary.h> #include "data_wrapper.h" -#include "viewmgr.h" +//#include "viewmgr.h" #define SELECTED_ITEM_ID "bottomslider_selected_item" @@ -38,8 +38,6 @@ #define VCLASS_TITLE_NEED_PASSCODE "Need Passcode" -struct setting_mgr; - struct evas_obj_data { Evas_Object *subitem_box; Evas_Object *cur_btn; @@ -56,6 +54,48 @@ struct obj_geometry_data { class CSettingMgr; + +class CSettingBaseView { +private: + char *m_title; + +public: + CSettingBaseView(const char *pViewId); + virtual ~CSettingBaseView(); + const char *ViewId(void) { return m_title; } + + virtual bool Create(struct settingview_data *view, void *prev) { return false; } + virtual void Show(void) {} + virtual void Pause(void) {} + virtual void Resume(void) {} + virtual void Refresh(void) {} + virtual void Update(void) {} + virtual void Hide(void) {} + virtual void Destroy(void) {} + virtual void LangChanged(void) {} + virtual void Frozen(void) {} + virtual void Active(void) {} + + const char *Title(void) { return m_title; } + virtual Evas_Object *Base(void); + + int hide_view; + + + /*void(*show)(Evas_Object *base); + void(*pause)(Evas_Object *base); + void(*resume)(Evas_Object *base); + void(*refresh)(Evas_Object *base); + void(*update)(Evas_Object *base); + void(*hide)(Evas_Object *base); + void(*destroy)(Evas_Object *base); + void(*lang_changed)(Evas_Object *base); + void(*frozen)(Evas_Object *base); + void(*active)(Evas_Object *base); + int hide_view;*/ +}; + +/* struct setting_class { const char *title; Evas_Object * (*create)(CSettingMgr *mgr, @@ -71,13 +111,13 @@ struct setting_class { void (*frozen)(Evas_Object *base); void (*active)(Evas_Object *base); int hide_view; -}; +};*/ class CSettingMgr { private: static CSettingMgr *instance; - struct setting_mgr *m; + struct SSettingMgr *m; protected: CSettingMgr() : m(0) {} @@ -111,4 +151,4 @@ public: }; -#endif /* __VIEWMGR_H__ */ +#endif /* __SETTING_VIEW_MGR_H__ */ diff --git a/include/view_maincatalog.h b/include/view_maincatalog.h index 675379a..22ae52b 100644 --- a/include/view_maincatalog.h +++ b/include/view_maincatalog.h @@ -17,8 +17,32 @@ #ifndef __VIEW_MAINMENU_H__ #define __VIEW_MAINMENU_H__ -#include "viewmgr.h" -struct setting_class *view_maincatalog_get_vclass(void); +#include "settingviewmgr.h" + + +class CMainCatalogView : + public CSettingBaseView { +private: + struct SMainCatalog *m; + +public: + CMainCatalogView(const char *pViewId) : CSettingBaseView(pViewId), m(0) {} + virtual ~CMainCatalogView() {} + + Evas_Object *Base(void); + + virtual bool Create(struct settingview_data *view, void *prev); + virtual void Show(void); + virtual void Refresh(void); + virtual void Hide(void); + virtual void Destroy(void); + virtual void LangChanged(void); + virtual void Frozen(void); + virtual void Active(void); + +}; + +//struct setting_class *view_maincatalog_get_vclass(void); #endif /* __VIEW_MAINMENU_H__ */ diff --git a/include/view_need_pwd.h b/include/view_need_pwd.h index 7dafdf2..0ae50bc 100644 --- a/include/view_need_pwd.h +++ b/include/view_need_pwd.h @@ -17,8 +17,35 @@ #ifndef __VIEW_NEED_PASSCODE_H__ #define __VIEW_NEED_PASSCODE_H__ -#include "viewmgr.h" -struct setting_class *view_need_passcode_get_vclass(void); +#include "settingviewmgr.h" + + +class CNeedPasscodeView : + public CSettingBaseView { +private: + struct SNeedPasscodeView *m; + +private: + static void sm_CbCtxpopupDismissed(void *priv, Evas_Object *obj, void *ev); + void m_OnCtxpopupDismissed(Evas_Object *obj, void *ev); + + static void sm_CbKeyDown(void *priv, Evas *e, Evas_Object *obj, void *ei); + void m_OnKeyDown(Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + + int m_AddViewEntries(void); + +public: + CNeedPasscodeView(const char *pViewId) : CSettingBaseView(pViewId), m(0) {} + virtual ~CNeedPasscodeView() {} + + Evas_Object *Base(void); + + virtual bool Create(struct settingview_data *view, void *prev); + virtual void Show(void); + virtual void Refresh(void); + virtual void Hide(void); + virtual void Destroy(void); +}; #endif /* __VIEW_NEED_PASSCODE_H__ */ diff --git a/include/view_pwd_popup.h b/include/view_pwd_popup.h index 58cb88f..9a40adf 100644 --- a/include/view_pwd_popup.h +++ b/include/view_pwd_popup.h @@ -17,8 +17,31 @@ #ifndef __VIEW_PASSCODE_POPUP_H__ #define __VIEW_PASSCODE_POPUP_H__ -#include "viewmgr.h" -struct setting_class *view_passcode_popup_get_vclass(void); +#include "settingviewmgr.h" + + +//struct setting_class *view_passcode_popup_get_vclass(void); +class CPasscodePopupView : + public CSettingBaseView { +private: + struct SPasscodePopupView *m; + +private: + static void sm_CbCtxpopupDismissed(void *priv, Evas_Object *obj, void *ev); + void m_OnCtxpopupDismissed(Evas_Object *obj, void *ev); + +public: + CPasscodePopupView(const char *pViewId) : CSettingBaseView(pViewId), m(0) {} + virtual ~CPasscodePopupView() {} + + Evas_Object *Base(void); + + virtual bool Create(struct settingview_data *view, void *prev); + virtual void Show(void); + virtual void Hide(void); + virtual void Destroy(void); +}; + #endif /* __VIEW_PASSCODE_POPUP_H__ */ diff --git a/include/view_sublist.h b/include/view_sublist.h index 930faaa..9733191 100644 --- a/include/view_sublist.h +++ b/include/view_sublist.h @@ -17,8 +17,47 @@ #ifndef __VIEW_SUBLIST_H__ #define __VIEW_SUBLIST_H__ -#include "viewmgr.h" -struct setting_class *view_sublist_get_vclass(void); +#include "settingviewmgr.h" + + +class CSublistView : + public CSettingBaseView { +private: + struct SSublistView *m; + +private: + static void sm_CbSubitemBtnClicked(void *data, Evas_Object *obj, void *ev); + void m_OnSubitemBtnClicked(Evas_Object *obj, void *ev); + + static void sm_CbSubitemKeyPressed(void *data, Evas *e, Evas_Object *obj, void *ei); + void m_OnSubitemKeyPressed(Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ev); + + static void sm_CbSubitemFocusOut(void *data, Evas_Object *obj, void *ev); + void m_OnSubitemFocusOut(Evas_Object *obj, void *ev); + + static void sm_CbSubitemFocusIn(void *data, Evas_Object *obj, void *ev); + void m_OnSubitemFocusIn(Evas_Object *obj, void *ev); + + static void sm_CbCtxpopupDismissed(void *data, Evas_Object *obj, void *ev); + void m_OnCtxpopupDismissed(Evas_Object *obj, void *ev); + + int m_DrawSublist(void); + void m_ExitView(void); + void m_SetSelectedValue(Evas_Object *obj); + int m_DrawListItems(Eina_List *list); + +public: + CSublistView(const char *pViewId) : CSettingBaseView(pViewId), m(0) {} + virtual ~CSublistView() {} + + Evas_Object *Base(void); + + virtual bool Create(struct settingview_data *view, void *prev); + virtual void Show(void); + virtual void Hide(void); + virtual void Destroy(void); +}; + #endif /* __VIEW_SUBLIST_H__ */ diff --git a/include/view_system_clock.h b/include/view_system_clock.h index 2e9eb3f..2881ff5 100644 --- a/include/view_system_clock.h +++ b/include/view_system_clock.h @@ -17,8 +17,42 @@ #ifndef _VIEW_SYSTEM_CLOCK_H__ #define _VIEW_SYSTEM_CLOCK_H__ -#include "viewmgr.h" -struct setting_class *view_system_clock_get_vclass(void); +#include "settingviewmgr.h" + + +class CSystemClockView : + public CSettingBaseView { +private: + struct SSystemClockView *m; + +private: + static void sm_CbSubitemClicked(void *priv, Evas_Object *obj, void *ev); + void m_OnSubitemClicked(Evas_Object *obj, void *ev); + + static void sm_CbSubitemKeypress(void *priv, Evas *e, Evas_Object *obj, void *ei); + void m_OnSubitemKeypress(Evas *e, Evas_Object *obj, Evas_Event_Key_Down *ei); + + static void sm_CbCtxpopupDismissed(void *priv, Evas_Object *obj, void *ev); + void m_OnCtxpopupDismissed(Evas_Object *obj, void *ev); + + void m_ExitView(void); + + int m_DrawSysclkSublist(void); + int m_AddSysclkSublistItem(Eina_List *list, const char *selval); + +public: + CSystemClockView(const char *pViewId) : CSettingBaseView(pViewId), m(0) {} + virtual ~CSystemClockView() {} + + Evas_Object *Base(void); + + virtual bool Create(struct settingview_data *view, void *prev); + virtual void Show(void); + virtual void Refresh(void); + virtual void Hide(void); + virtual void Destroy(void); +}; + #endif /* _VIEW_SYSTEM_CLOCK_H__ */ diff --git a/include/view_uigadget.h b/include/view_uigadget.h index d35ee8b..88359e0 100644 --- a/include/view_uigadget.h +++ b/include/view_uigadget.h @@ -17,8 +17,35 @@ #ifndef __VIEW_UIGADGET_H__ #define __VIEW_UIGADGET_H__ -#include "viewmgr.h" -struct setting_class *view_uigadget_get_vclass(void); +#include <ui-gadget.h> +#include "settingviewmgr.h" + + +class CUiGadgetView : + public CSettingBaseView { +private: + struct SUiGadgetView *m; + +private: + static void sm_CbUgLayout(ui_gadget_h ug, enum ug_mode mode, void *priv); + static void sm_CbUgResult(ui_gadget_h ug, service_h result, void *priv); + static void sm_CbUgDestroy(ui_gadget_h ug, void *priv); + void m_OnUgDestroy(ui_gadget_h ug); + + bool m_Load(void); + void m_BackToMainview(void); + +public: + CUiGadgetView(const char *pViewId) : CSettingBaseView(pViewId), m(0) {} + virtual ~CUiGadgetView() {} + + Evas_Object *Base(void); + + virtual bool Create(struct settingview_data *view, void *prev); + virtual void Show(void); + virtual void Hide(void); + virtual void Destroy(void); +}; #endif /* __VIEW_UIGADGET_H__ */ |