1 #ifndef __DALI_WEBENGINELITE_IMPL_H__
2 #define __DALI_WEBENGINELITE_IMPL_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/public-api/object/base-object.h>
25 #include <dali/devel-api/adaptor-framework/web-engine-lite.h>
26 #include <dali/devel-api/adaptor-framework/web-engine-lite-plugin.h>
40 typedef IntrusivePtr< WebEngineLite > WebEngineLitePtr;
43 * @brief WebEngineLite class is used for Web.
45 class WebEngineLite: public Dali::BaseObject
50 * @brief Creates a new WebEngineLite handle
52 * @return WebEngineLite pointer
54 static WebEngineLitePtr New();
57 * @copydoc Dali::WebEngineLite::CreateInstance()
59 void CreateInstance(int width, int height, int windowX, int windowY, const std::string& locale, const std::string& timezoneID);
62 * @copydoc Dali::WebEngineLite::DestroyInstance()
64 void DestroyInstance();
67 * @copydoc Dali::WebEngineLite::LoadHtml()
69 void LoadHtml(const std::string& path);
72 * @copydoc Dali::WebEngineLite::FinishedSignal()
74 Dali::WebEngineLitePlugin::WebEngineLiteSignalType& FinishedSignal();
77 * @brief Initializes member data.
91 virtual ~WebEngineLite();
93 // Undefined copy constructor
94 WebEngineLite( const WebEngineLite& webEngineLite );
96 // Undefined assignment operator
97 WebEngineLite& operator=( const WebEngineLite& webEngineLite );
101 Dali::WebEngineLitePlugin* mPlugin; ///< WebEngineLite plugin handle
102 void* mHandle; ///< Handle for the loaded library
104 typedef Dali::WebEngineLitePlugin* (*CreateWebEngineLiteFunction)();
105 typedef void (*DestroyWebEngineLiteFunction)( Dali::WebEngineLitePlugin* plugin );
107 CreateWebEngineLiteFunction mCreateWebEngineLitePtr;
108 DestroyWebEngineLiteFunction mDestroyWebEngineLitePtr;
110 Dali::WebEngineLitePlugin::WebEngineLiteSignalType mFinishedSignal;
113 } // namespace Adaptor
114 } // namespace Internal
116 inline static Internal::Adaptor::WebEngineLite& GetImplementation( Dali::WebEngineLite& webEngineLite )
118 DALI_ASSERT_ALWAYS( webEngineLite && "WebEngineLite handle is empty." );
120 BaseObject& handle = webEngineLite.GetBaseObject();
122 return static_cast< Internal::Adaptor::WebEngineLite& >( handle );
125 inline static const Internal::Adaptor::WebEngineLite& GetImplementation( const Dali::WebEngineLite& webEngineLite )
127 DALI_ASSERT_ALWAYS( webEngineLite && "WebEngineLite handle is empty." );
129 const BaseObject& handle = webEngineLite.GetBaseObject();
131 return static_cast< const Internal::Adaptor::WebEngineLite& >( handle );