1 #ifndef DALI_TOOLKIT_INTERNAL_WEB_VIEW_LITE_H
2 #define DALI_TOOLKIT_INTERNAL_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/devel-api/adaptor-framework/web-engine-lite.h>
25 #include <dali-toolkit/internal/visuals/image/image-visual.h>
26 #include <dali-toolkit/public-api/controls/control-impl.h>
27 #include <dali-toolkit/devel-api/controls/web-view-lite/web-view-lite.h>
40 class WebViewLite: public Control
46 virtual ~WebViewLite();
51 * @copydoc Toolkit::WebViewLite::New()
53 static Toolkit::WebViewLite New();
56 * @copydoc Dali::Toolkit::WebViewLite::CreateInstance()
58 void CreateInstance(int width, int height, int windowX, int windowY, const std::string& locale, const std::string& timezoneID);
61 * @copydoc Dali::Toolkit::WebViewLite::DestroyInstance()
63 void DestroyInstance();
66 * @copydoc Dali::Toolkit::WebViewLite::LoadHtml()
68 void LoadHtml(const std::string& path);
71 * @copydoc Dali::Toolkit::WebViewLite::FinishedSignal()
73 Dali::Toolkit::WebViewLite::WebViewLiteSignalType& FinishedSignal();
76 * @brief Emit the finished signal
78 void EmitFinishedSignal();
80 static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
82 private: // From Control
85 * @copydoc Toolkit::Control::OnInitialize()
87 virtual void OnInitialize();
92 WebViewLite( const WebViewLite& webViewLite );
94 WebViewLite& operator=( const WebViewLite& webViewLite );
98 Dali::WebEngineLite mWebViewLite;
99 Dali::Toolkit::WebViewLite::WebViewLiteSignalType mFinishedSignal;
102 } // namespace Internal
104 inline Toolkit::Internal::WebViewLite& GetImpl( Toolkit::WebViewLite& handle )
106 DALI_ASSERT_ALWAYS( handle );
107 Dali::RefObject& impl = handle.GetImplementation();
108 return static_cast< Toolkit::Internal::WebViewLite& >( impl );
111 inline const Toolkit::Internal::WebViewLite& GetImpl( const Toolkit::WebViewLite& handle )
113 DALI_ASSERT_ALWAYS( handle );
114 const Dali::RefObject& impl = handle.GetImplementation();
115 return static_cast< const Toolkit::Internal::WebViewLite& >( impl );
118 } // namespace Toolkit
122 #endif // DALI_TOOLKIT_WEB_VIEW_LITE_H