/* * 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 __SETTING_VIEW_MGR_H__ #define __SETTING_VIEW_MGR_H__ #include #include "data_wrapper.h" //#include "viewmgr.h" #define SELECTED_ITEM_ID "bottomslider_selected_item" #define VCLASS_TITLE_MAIN_VIEW "Main View" #define VCLASS_TITLE_BOTTOM_SLIDER "Bottom Slider" #define VCLASS_TITLE_BOTTOM_SUBLIST "Bottom Sublist" #define VCLASS_TITLE_DEVICE_MANAGER "Device Manager" #define VCLASS_TITLE_CHANGE_PASSCODE "Change Passcode" #define VCLASS_TITLE_RESET_POPUP "Reset Popup" #define VCLASS_TITLE_SUBLIST "Sublist" #define VCLASS_TITLE_SYSTEM_CLOCK "System Clock" #define VCLASS_TITLE_UG "UI Gadget" #define VCLASS_TITLE_UPGRADE "Upgrade Software" #define VCLASS_TITLE_NEED_PASSCODE "Need Passcode" struct evas_obj_data { Evas_Object *subitem_box; Evas_Object *cur_btn; const char *display_name; }; struct obj_geometry_data { int width; int height; int x; int y; }; 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, struct settingview_data *view, void *prev); 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; };*/ class CSettingMgr { private: static CSettingMgr *instance; struct SSettingMgr *m; protected: CSettingMgr() : m(0) {} virtual ~CSettingMgr() {} public: static bool Initialize(Evas_Object *win); static void Finalize(void); static CSettingMgr *GetInstance(void); bool ViewPush(const char *name, void *data); void ViewPop(void); Evas_Object *Window(void); settingview_data *GetView(const char *name); settingmgr_data *GetData(void); Eina_List *GetViewList(void); bool LaunchItem(const char *name); Eina_Array *GetItemPath(void); void ViewRefresh(void); void SetRefreshFlag(unsigned int val); unsigned int GetRefreshFlag(void); void SetRelaunchFlag(unsigned int val); unsigned int GetRelaunchFlag(void); void FreezeTimeout(void); void ThawTimeout(void); Eina_Bool GetTimeoutFreezeState(void); void LangChanged(void); }; #endif /* __SETTING_VIEW_MGR_H__ */