2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @author Jaroslaw Osmanski (j.osmanski@samsung.com)
20 * @brief Window data header file.
23 #ifndef WINDOW_INITIALIZE_H_
24 #define WINDOW_INITIALIZE_H_
26 #include <dpl/framework_efl.h>
27 #include <dpl/fast_delegate.h>
32 #include <dpl/noncopyable.h>
44 class WindowData : private DPL::Noncopyable
47 typedef DPL::FastDelegate0<void> CtxpopupCallbackType;
48 struct CtxpopupItemData {
51 CtxpopupCallbackType function;
52 CtxpopupItemData(std::string t,
54 CtxpopupCallbackType f) :
60 typedef std::list<CtxpopupItemData> CtxpopupItemDataList;
62 explicit WindowData(unsigned long pid, bool manualInit = false);
63 virtual ~WindowData();
67 bool initScreenReaderSupport(bool isSupportAccessibility);
69 Evas_Object* getEvasObject(Layer layer);
70 void setWebview(Evas_Object* evas_object);
73 void smartCallbackAdd(
76 Evas_Smart_Cb callback,
78 void smartCallbackDel(
81 Evas_Smart_Cb callback);
82 void signalEmit(Layer layer, const char* emission, const char* source);
84 void setViewMode(bool fullscreen, bool backbutton);
85 void setOrientation(int angle);
86 void toggleFullscreen(bool fullscreen);
87 void showCtxpopup(void);
88 void setCtxpopupItemData(CtxpopupItemDataList data);
89 void updateProgress(double value);
93 Evas_Object* m_conformant;
94 Evas_Object* m_topLayout;
95 Evas_Object* m_naviframe;
96 Evas_Object* m_mainLayout;
98 Evas_Object* m_progressbar;
99 Evas_Object* m_ctxpopup;
101 bool m_currentViewModeFullScreen;
102 CtxpopupItemDataList m_ctxpopupItemDataList;
104 typedef std::map<Layer, Evas_Object*> EvasObjectData;
105 typedef std::map<Layer, Evas_Object*>::iterator EvasObjectDataIt;
106 EvasObjectData m_evasObjectData;
107 void setEvasObjectData(Layer layer, Evas_Object* obj);
109 Evas_Object* createWindow(unsigned long pid);
110 Evas_Object* createConformant(Evas_Object* parent);
111 Evas_Object* createTopLayout(Evas_Object* parent);
112 Evas_Object* createNaviframe(Evas_Object* parent);
113 Evas_Object* createMainLayout(Evas_Object* parent);
114 Evas_Object* createFocus(Evas_Object* parent);
115 Evas_Object* createProgressBar(Evas_Object* window, Evas_Object* parent);
116 Evas_Object* createCtxPopup(Evas_Object* parent);
118 void toggleIndicator(bool fullscreen);
119 static void ctxpopupItemCallback(void* data,
122 static void ctxpopupDismissedCallback(void* data,
125 static void winDeleteRequestCallback(void* data,
128 static void winProfileChangedCallback(void* data,
134 #endif /* WINDOW_INITIALIZE_H_ */