[Tizen] Implement WebEngineLite interface and plugin for Minimized Web Engine
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine-lite.h
1 #ifndef __DALI_WEBENGINELITE_H__
2 #define __DALI_WEBENGINELITE_H__
3
4 /*
5  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/object/base-handle.h>
23
24 //INTERNAL INCLUDES
25 #include <dali/public-api/dali-adaptor-common.h>
26 #include "web-engine-lite-plugin.h"
27
28 namespace Dali
29 {
30
31 namespace Internal
32 {
33
34 namespace Adaptor
35 {
36   class WebEngineLite;
37 } // namespace Adaptor
38
39 } // namespace Internal
40
41 /**
42  * @brief WebEngineLite class is used for Web.
43  */
44 class DALI_ADAPTOR_API WebEngineLite: public BaseHandle
45 {
46 public:
47
48   /**
49    * @brief Constructor.
50    */
51   WebEngineLite();
52
53   /**
54    * @brief Destructor.
55    */
56   ~WebEngineLite();
57
58   /**
59    * @brief Creates a new instance of a WebEngineLite.
60    */
61   static WebEngineLite New();
62
63  /**
64    * @brief Copy constructor.
65    *
66    * @param[in] webEngineLite WebEngineLite to copy. The copied webEngineLite will point at the same implementation
67    */
68   WebEngineLite( const WebEngineLite& webEngineLite );
69
70  /**
71    * @brief Assignment operator.
72    *
73    * @param[in] webEngineLite The WebEngineLite to assign from.
74    * @return The updated WebEngineLite.
75    */
76   WebEngineLite& operator=( const WebEngineLite& webEngineLite );
77
78   /**
79    * @brief Downcast a handle to WebEngineLite handle.
80    *
81    * If handle points to a WebEngineLite the downcast produces valid
82    * handle. If not the returned handle is left uninitialized.
83    *
84    * @param[in] handle Handle to an object
85    * @return Handle to a WebEngineLite or an uninitialized handle
86    */
87   static WebEngineLite DownCast( BaseHandle handle );
88
89   /**
90    * @brief Creates WebEngineLite instance.
91    *
92    * @param [in] width The width of Web
93    * @param [in] height The height of Web
94    * @param [in] windowX The x position of window
95    * @param [in] windowY The y position of window
96    * @param [in] locale The locale of Web
97    * @param [in] timezoneID The timezoneID of Web
98    */
99   void CreateInstance(int width, int height, int windowX, int windowY, const std::string& locale, const std::string& timezoneID);
100
101   /**
102    * @brief Destroys WebEngineLite instance.
103    */
104   void DestroyInstance();
105
106   /**
107    * @brief Loads a html.
108    *
109    * @param [in] path The path of Web
110    */
111   void LoadHtml(const std::string& path);
112
113   /**
114    * @brief Connect to this signal to be notified when a web view has finished.
115    *
116    * @return A signal object to connect with.
117    */
118   Dali::WebEngineLitePlugin::WebEngineLiteSignalType& FinishedSignal();
119
120 private: // Not intended for application developers
121
122   /**
123    * @brief Internal constructor
124    */
125   explicit DALI_INTERNAL WebEngineLite( Internal::Adaptor::WebEngineLite* internal );
126 };
127
128 } // namespace Dali;
129
130 #endif
131