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.
17 * @file i_view_module.h
18 * @author Pawel Sikorski (p.sikorski@samsung.com)
20 * @brief Interface for ViewModule
23 #ifndef WRT_SRC_VIEW_I_VIEW_MODULE_H_
24 #define WRT_SRC_VIEW_I_VIEW_MODULE_H_
28 #include <common/evas_object.h>
30 #include <i_runnable_widget_object.h>
32 class WidgetModel; //FORWARD DECLARATION
33 namespace ViewModule {
34 /** \brief Interface to ViewModule. Object of IViewModule type is returned from
35 * ViewModuleMgr factory.
40 virtual bool createWebView(Ewk_Context* context,
41 Evas_Object* window) = 0;
42 virtual void destroyWebView() = 0;
43 virtual void initialize() = 0;
44 virtual void terminate() = 0;
45 virtual void prepareView(WidgetModel *, const std::string &) = 0;
46 virtual void showWidget() = 0;
47 virtual void hideWidget() = 0;
48 virtual void suspendWidget() = 0;
49 virtual void resumeWidget() = 0;
50 virtual void resetWidget() = 0;
51 virtual void backward() = 0;
52 virtual void reloadStartPage() = 0;
53 virtual Evas_Object* getCurrentWebview() = 0;
54 virtual void fireJavascriptEvent(int event, void* data) = 0;
55 virtual void setUserCallbacks(const WRT::UserDelegatesPtr& cbs) = 0;
58 typedef std::shared_ptr<IViewModule> IViewModulePtr;
61 * \brief This is a function for retrieving View object. It returns a pointer
62 * to IViewModule object.
64 IViewModulePtr createView();
67 #endif /* WRT_SRC_VIEW_I_VIEW_MODULE_H_ */