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>
30 #include <dpl/noncopyable.h>
33 * Current layout structure
36 * m_platform_layout (elm_layout)
37 * m_navigation (elm_navigation)
38 * m_user_layout (elm_layout)
39 * widget_area (elm_webview)
43 class WindowData : private DPL::Noncopyable
46 typedef void (*CallbackType)(
47 void* data, Evas_Object* obj, void* event_info);
48 typedef void (*EvasCallbackType)(
49 void* data, Evas* evas, Evas_Object* obj, void* event_info);
50 typedef void (*NaviframePopCallbackType)(
51 void* data, Elm_Object_Item* it);
53 struct EventWithFunction
55 CallbackType function;
56 std::string eventName;
57 EventWithFunction(CallbackType a_function,
58 const char * a_eventName) :
60 eventName(a_eventName)
63 typedef std::vector<EventWithFunction> EventWithFunctionVector;
67 Evas_Object* m_user_layout;
69 explicit WindowData(unsigned long pid, bool manualInit = false);
70 virtual ~WindowData();
73 void setEvasObjectForLayout(Evas_Object* evas_object);
74 void unsetEvasObjectForLayout();
75 void addNaviframeItemPopCallback(
76 NaviframePopCallbackType callback,
78 void addFloatBackButtonCallback(
80 CallbackType callback,
82 void* delFloatBackButtonCallback(
84 CallbackType callBack);
85 void userlayoutCallbackAdd(
86 const Evas_Callback_Type event,
87 EvasCallbackType callback,
89 void* userlayoutCallbackDel(
90 const Evas_Callback_Type event,
91 EvasCallbackType callback);
92 void emitSignalForUserLayout(
100 void toggleFullscreen(bool fullscreen);
101 void toggleToolbar(bool enable);
103 static void winProfileChangedCallback(void *data,
106 void updateProgress(double value);
109 Evas_Object* m_conformant;
110 Evas_Object* m_platform_layout;
111 Evas_Object* m_navigation;
112 Evas_Object* m_naviframeBackButton;
113 Evas_Object* m_floatBackButton;
114 Evas_Object* m_progressbar;
118 Evas_Object* createWindow(unsigned long pid);
119 Evas_Object* createConformant(Evas_Object* parent);
120 Evas_Object* createPlatformLayout(Evas_Object* parent);
121 Evas_Object* createNavigationBar(Evas_Object* parent);
122 Evas_Object* createNaviframeBackbutton(Evas_Object* parent);
123 Evas_Object* createUserLayout(Evas_Object* parent);
124 Evas_Object* createProgressBar(Evas_Object* window, Evas_Object* parent);
126 void alignProgressPosition();
127 void toggleIndicator(bool fullscreen);
128 void createFloatBackButton();
129 void setDesktopIcon();
132 #endif /* WINDOW_INITIALIZE_H_ */