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)
62 typedef std::vector<EventWithFunction> EventWithFunctionVector;
66 Evas_Object* m_user_layout;
68 explicit WindowData(unsigned long pid, bool manualInit=false);
69 virtual ~WindowData();
72 void setEvasObjectForLayout(Evas_Object* evas_object);
73 void unsetEvasObjectForLayout();
74 void addNaviBackButtonCallback(
76 CallbackType callback,
78 void* delNaviBackButtonCallback(
80 CallbackType callBack);
81 void addFloatBackButtonCallback(
83 CallbackType callback,
85 void* delFloatBackButtonCallback(
87 CallbackType callBack);
88 void userlayoutCallbackAdd(
89 const Evas_Callback_Type event,
90 EvasCallbackType callback,
92 void* userlayoutCallbackDel(
93 const Evas_Callback_Type event,
94 EvasCallbackType callback);
95 void emitSignalForUserLayout(
103 void toggleFullscreen(bool fullscreen);
106 Evas_Object* m_conformant;
107 Evas_Object* m_platform_layout;
108 Evas_Object* m_navigation;
109 Evas_Object* m_naviBackButton;
110 Evas_Object* m_floatBackButton;
113 Evas_Object* createWindow(unsigned long pid);
114 Evas_Object* createPlatformLayout(Evas_Object* parent);
115 Evas_Object* createNavigationBar(Evas_Object* parent);
116 Evas_Object* createUserLayout(Evas_Object* parent);
117 Evas_Object* createConformant(Evas_Object* parent);
119 void alignProgressPosition();
120 void toggleIndicator(bool fullscreen);
121 void createFloatBackButton();
124 #endif /* WINDOW_INITIALIZE_H_ */