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 {
35 /** \brief Interface to ViewModule. Object of IViewModule type is returned from
36 * ViewModuleMgr factory.
41 virtual bool createWebView(Ewk_Context* context,
42 Evas_Object* window) = 0;
43 virtual void destroyWebView() = 0;
44 virtual void initialize() = 0;
45 virtual void terminate() = 0;
46 virtual void prepareView(WidgetModel *, const std::string &) = 0;
47 virtual void showWidget() = 0;
48 virtual void hideWidget() = 0;
49 virtual void suspendWidget()= 0;
50 virtual void resumeWidget() = 0;
51 virtual void resetWidget() = 0;
52 virtual void backward() = 0;
53 virtual void reloadStartPage() = 0;
54 virtual Evas_Object* getCurrentWebview() = 0;
55 virtual void fireJavascriptEvent(int event, void* data) = 0;
56 virtual void setUserCallbacks(const WRT::UserDelegatesPtr& cbs) = 0;
59 typedef std::shared_ptr<IViewModule> IViewModulePtr;
62 * \brief This is a function for retrieving View object. It returns a pointer
63 * to IViewModule object.
65 IViewModulePtr createView();
69 #endif /* WRT_SRC_VIEW_I_VIEW_MODULE_H_ */