1 #ifndef __DALI_TOOLKIT_WEB_VIEW_LITE_H__
2 #define __DALI_TOOLKIT_WEB_VIEW_LITE_H__
5 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 #include <dali-toolkit/public-api/controls/control.h>
30 namespace Internal DALI_INTERNAL
33 } // namespace Internal
35 class DALI_TOOLKIT_API WebViewLite: public Control
39 typedef Signal< void (WebViewLite&) > WebViewLiteSignalType;
44 * @brief Creates an initialized WebViewLite.
46 * @return A handle to a newly allocated Dali WebViewLite
48 * @note WebViewLite will not display anything
50 static WebViewLite New();
53 * @brief Creates an uninitialized WebViewLite.
60 * This is non-virtual since derived Handel types must not contain data or virtual methods.
65 * @brief Copy constructor.
67 * @param[in] webViewLite WebViewLite to copy. The copied WebViewLite will point at the same implementation
69 WebViewLite( const WebViewLite& webViewLite );
72 * @brief Assignment operator.
74 * @param[in] webViewLite The WebViewLite to assign from
75 * @return The updated WebViewLite
77 WebViewLite& operator=( const WebViewLite& webViewLite );
80 * @brief Downcasts a handle to WebViewLite handle.
82 * If handle points to a WebViewLite, the downcast produces valid handle.
83 * If not, the returned handle is left uninitialized.
85 * @param[in] handle Handle to an object
86 * @return Handle to a WebViewLite or an uninitialized handle
88 static WebViewLite DownCast( BaseHandle handle );
91 * @brief Creates an internal web view instance (e.g. minimized web engine instance)
93 * @param [in] width The width of Web
94 * @param [in] height The height of Web
95 * @param [in] windowX The x position of window
96 * @param [in] windowY The y position of window
97 * @param [in] locale The locale of Web
98 * @param [in] timezoneID The timezoneID of Web
100 void CreateInstance(int width, int height, int windowX, int windowY, const std::string& locale, const std::string& timezoneID);
103 * @brief Destroys an internal web view instance (e.g. minimized web engine instance)
105 void DestroyInstance();
108 * @brief Loads a html file
110 * @param [in] path The path of Web
112 void LoadHtml(const std::string& path);
115 * @brief Connects to this signal to be notified when a web view is finished.
117 * @return A signal object to connect with
119 WebViewLiteSignalType& FinishedSignal();
121 public: // Not intended for application developers
125 * @brief Creates a handle using the Toolkit::Internal implementation.
127 * @param[in] implementation The WebViewLite implementation
129 DALI_INTERNAL WebViewLite( Internal::WebViewLite& implementation );
132 * @brief Allows the creation of this WebViewLite from an Internal::CustomActor pointer.
134 * @param[in] internal A pointer to the internal CustomActor
136 DALI_INTERNAL WebViewLite( Dali::Internal::CustomActor* internal );
145 } // namespace Toolkit
149 #endif // __DALI_TOOLKIT_WEB_VIEW_LITE_H__