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 <user_delegates.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 prepareView(WidgetModel *, const std::string &) = 0;
43 virtual void showWidget() = 0;
44 virtual void hideWidget() = 0;
45 virtual void suspendWidget() = 0;
46 virtual void resumeWidget() = 0;
47 virtual void resetWidget() = 0;
48 virtual void backward() = 0;
49 virtual void reloadStartPage() = 0;
50 virtual Evas_Object* getCurrentWebview() = 0;
51 virtual void fireJavascriptEvent(int event, void* data) = 0;
52 virtual void setUserCallbacks(const WRT::UserDelegatesPtr& cbs) = 0;
53 virtual void checkSyncMessageFromBundle(
56 char** returnData) = 0;
57 virtual void checkAsyncMessageFromBundle(
59 const char* body) = 0;
60 virtual void downloadData(const char* url) = 0;
61 virtual void activateVibration(bool on, uint64_t time) = 0;
64 typedef std::shared_ptr<IViewModule> IViewModulePtr;
67 * \brief This is a function for retrieving View object. It returns a pointer
68 * to IViewModule object.
70 IViewModulePtr createView();
73 #endif /* WRT_SRC_VIEW_I_VIEW_MODULE_H_ */