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);
51 struct EventWithFunction
53 CallbackType function;
54 std::string eventName;
55 EventWithFunction(CallbackType a_function,
56 const char * a_eventName) :
58 eventName(a_eventName)
61 typedef std::vector<EventWithFunction> EventWithFunctionVector;
65 Evas_Object* m_user_layout;
67 explicit WindowData(unsigned long pid, bool manualInit = false);
68 virtual ~WindowData();
71 void setEvasObjectForLayout(Evas_Object* evas_object);
72 void unsetEvasObjectForLayout();
73 void addNaviBackButtonCallback(
75 CallbackType callback,
77 void* delNaviBackButtonCallback(
79 CallbackType callBack);
80 void addFloatBackButtonCallback(
82 CallbackType callback,
84 void* delFloatBackButtonCallback(
86 CallbackType callBack);
87 void userlayoutCallbackAdd(
88 const Evas_Callback_Type event,
89 EvasCallbackType callback,
91 void* userlayoutCallbackDel(
92 const Evas_Callback_Type event,
93 EvasCallbackType callback);
94 void emitSignalForUserLayout(
102 void toggleFullscreen(bool fullscreen);
103 static void winProfileChangedCallback(void *data,
108 Evas_Object* m_conformant;
109 Evas_Object* m_platform_layout;
110 Evas_Object* m_navigation;
111 Evas_Object* m_naviBackButton;
112 Evas_Object* m_floatBackButton;
116 Evas_Object* createWindow(unsigned long pid);
117 Evas_Object* createPlatformLayout(Evas_Object* parent);
118 Evas_Object* createNavigationBar(Evas_Object* parent);
119 Evas_Object* createUserLayout(Evas_Object* parent);
120 Evas_Object* createConformant(Evas_Object* parent);
122 void alignProgressPosition();
123 void toggleIndicator(bool fullscreen);
124 void createFloatBackButton();
125 void setDesktopIcon();
128 #endif /* WINDOW_INITIALIZE_H_ */