Revert "[Tizen] Do not substarct outline width in text-controller"
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / web-view-lite / web-view-lite-impl.h
1 #ifndef DALI_TOOLKIT_INTERNAL_WEB_VIEW_LITE_H
2 #define DALI_TOOLKIT_INTERNAL_WEB_VIEW_LITE_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/devel-api/adaptor-framework/web-engine-lite.h>
23
24 // INTERNAL INCLUDES
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>
28
29 namespace Dali
30 {
31
32 namespace Toolkit
33 {
34
35 class WebViewLite;
36
37 namespace Internal
38 {
39
40 class WebViewLite: public Control
41 {
42 protected:
43
44   WebViewLite();
45
46   virtual ~WebViewLite();
47
48 public:
49
50   /**
51    * @copydoc Toolkit::WebViewLite::New()
52    */
53   static Toolkit::WebViewLite New();
54
55   /**
56    * @copydoc Dali::Toolkit::WebViewLite::CreateInstance()
57    */
58   void CreateInstance(int width, int height, int windowX, int windowY, const std::string& locale, const std::string& timezoneID);
59
60   /**
61    * @copydoc Dali::Toolkit::WebViewLite::DestroyInstance()
62    */
63   void DestroyInstance();
64
65   /**
66    * @copydoc Dali::Toolkit::WebViewLite::LoadHtml()
67    */
68   void LoadHtml(const std::string& path);
69
70  /**
71    * @copydoc Dali::Toolkit::WebViewLite::FinishedSignal()
72    */
73   Dali::Toolkit::WebViewLite::WebViewLiteSignalType& FinishedSignal();
74
75   /**
76    * @brief Emit the finished signal
77    */
78   void EmitFinishedSignal();
79
80   static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor );
81
82 private: // From Control
83
84   /**
85    * @copydoc Toolkit::Control::OnInitialize()
86    */
87   virtual void OnInitialize();
88
89 private:
90
91   // Undefined
92   WebViewLite( const WebViewLite& webViewLite );
93
94   WebViewLite& operator=( const WebViewLite& webViewLite );
95
96 private:
97
98   Dali::WebEngineLite mWebViewLite;
99   Dali::Toolkit::WebViewLite::WebViewLiteSignalType mFinishedSignal;
100 };
101
102 } // namespace Internal
103
104 inline Toolkit::Internal::WebViewLite& GetImpl( Toolkit::WebViewLite& handle )
105 {
106   DALI_ASSERT_ALWAYS( handle );
107   Dali::RefObject& impl = handle.GetImplementation();
108   return static_cast< Toolkit::Internal::WebViewLite& >( impl );
109 }
110
111 inline const Toolkit::Internal::WebViewLite& GetImpl( const Toolkit::WebViewLite& handle )
112 {
113   DALI_ASSERT_ALWAYS( handle );
114   const Dali::RefObject& impl = handle.GetImplementation();
115   return static_cast< const Toolkit::Internal::WebViewLite& >( impl );
116 }
117
118 } // namespace Toolkit
119
120 } // namespace Dali
121
122 #endif // DALI_TOOLKIT_WEB_VIEW_LITE_H