Revert "[Tizen] Use broken image when animated image loading is failed."
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / web-engine-settings.h
1 #ifndef DALI_WEB_ENGINE_SETTINGS_H
2 #define DALI_WEB_ENGINE_SETTINGS_H
3
4 /*
5  * Copyright (c) 2021 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
23 namespace Dali
24 {
25 /**
26  * @brief A class WebEngineSettings for settings of web engine.
27  */
28 class WebEngineSettings
29 {
30 public:
31   /**
32    * @brief Constructor.
33    */
34   WebEngineSettings() = default;
35
36   /**
37    * @brief Destructor.
38    */
39   virtual ~WebEngineSettings() = default;
40
41   /**
42    *@brief Allow running mixed contents or not.
43    *
44    * @param[in] allowed if true, allow to run mixed contents,
45    *      otherwise not allow
46    */
47   virtual void AllowMixedContents(bool allowed) = 0;
48
49   /**
50    * @brief Enable the spatial navigation or not.
51    *
52    * @param[in] enabled if true, use spatial navigation,
53    *       otherwise to disable
54    */
55   virtual void EnableSpatialNavigation(bool enabled) = 0;
56
57   /**
58    * @brief Get the default font size.
59    *
60    * @return defaut font size.
61    */
62   virtual uint32_t GetDefaultFontSize() const = 0;
63
64   /**
65    * @brief Set the default font size.
66    *
67    * @param[in] size a new default font size to set
68    */
69   virtual void SetDefaultFontSize(uint32_t size) = 0;
70
71   /**
72    * @brief Enables/disables web security.
73    *
74    * @param[in] enabled if true, to enable the web security
75    *       otherwise to disable
76    */
77   virtual void EnableWebSecurity(bool enabled) = 0;
78
79   /**
80    * @brief Enable/Disable cache builder
81    *
82    * @param[in] enabled if true, to enable cache builder
83    *        otherwise to disable
84    */
85   virtual void EnableCacheBuilder( bool enabled ) = 0;
86
87   /**
88    * @brief Used/Unused scrollbar thumb focus notifications
89    *
90    * @param[in] used if true, to use scrollbar thumb focus notifications
91    *          otherwise to unused
92    */
93   virtual void UseScrollbarThumbFocusNotifications( bool used ) = 0;
94
95   /**
96    * @brief Enable/Disable do not track
97    *
98    * @param[in] enabled if true, to enable do not track
99    *        otherwise to disable
100    */
101   virtual void EnableDoNotTrack( bool enabled ) = 0;
102
103   /**
104    * @brief Allow/Disallow file access from external url
105    *
106    * @param[in] allowed if true, to allow file access from external url
107    *       otherwise to disallow
108    */
109   virtual void AllowFileAccessFromExternalUrl(bool allowed) = 0;
110
111   /**
112    * @brief Check if javascript is enabled or not.
113    *
114    * @return true if enabled, false if disabled.
115    */
116   virtual bool IsJavaScriptEnabled() const = 0;
117
118   /**
119    * @brief Enable/Disable javascript
120    *
121    * @param[in] enabled if true, to enable javascript
122    *       otherwise to disable
123    */
124   virtual void EnableJavaScript(bool enabled) = 0;
125
126   /**
127    * @brief Check if auto fitting is enabled or not.
128    *
129    * @return true if enabled, false if disabled.
130    */
131   virtual bool IsAutoFittingEnabled() const = 0;
132
133   /**
134    * @brief Enable/Disable auto fitting
135    *
136    * @param[in] enabled if true, to enable auto fitting
137    *       otherwise to disable
138    */
139   virtual void EnableAutoFitting( bool enabled ) = 0;
140
141   /**
142    * @brief Check if plugins are enabled or not.
143    *
144    * @return true if enabled, false if disabled.
145    */
146   virtual bool ArePluginsEnabled() const = 0;
147
148   /**
149    * @brief Enable/Disable plugins
150    *
151    * @param[in] enabled if true, to enable plugins
152    *       otherwise to disable
153    */
154   virtual void EnablePlugins( bool enabled ) = 0;
155
156   /**
157    * @brief Check if private browsing is enabled or not.
158    *
159    * @return true if enabled, false if disabled.
160    */
161   virtual bool IsPrivateBrowsingEnabled() const = 0;
162
163   /**
164    * @brief Enable/Disable private browsing
165    *
166    * @param[in] enabled if true, to enable private browsing
167    *       otherwise to disable
168    */
169   virtual void EnablePrivateBrowsing( bool enabled ) = 0;
170
171   /**
172    * @brief Check if link magnifier is enabled or not.
173    *
174    * @return true if enabled, false if disabled.
175    */
176   virtual bool IsLinkMagnifierEnabled() const = 0;
177
178   /**
179    * @brief Enable/Disable link magnifier
180    *
181    * @param[in] enabled if true, to enable link magnifier
182    *        otherwise to disable
183    */
184   virtual void EnableLinkMagnifier( bool enabled ) = 0;
185
186   /**
187    * @brief Check if uses keypad without user action is used or not.
188    *
189    * @return true if used, false if unused.
190    */
191   virtual bool IsKeypadWithoutUserActionUsed() const = 0;
192
193   /**
194    * @brief Uses/Unused keypad without user action
195    *
196    * @param[in] used if true, to use keypad without user action
197    *       otherwise to unused
198    */
199   virtual void UseKeypadWithoutUserAction( bool used ) = 0;
200
201   /**
202    * @brief Check if autofill password form is enabled or not.
203    *
204    * @return true if enabled, false if disabled.
205    */
206   virtual bool IsAutofillPasswordFormEnabled() const = 0;
207
208   /**
209    * @brief Enable/Disable autofill password form
210    *
211    * @param[in] enabled if true, to enable autofill_password_form
212    *       otherwise to disable
213    */
214   virtual void EnableAutofillPasswordForm( bool enabled ) = 0;
215
216   /**
217    * @brief check if form candidate data is enabled or not.
218    *
219    * @return true if enabled, false is disabled.
220    */
221   virtual bool IsFormCandidateDataEnabled() const = 0;
222
223   /**
224    * @brief Enable/Disable form candidate data
225    *
226    * @param[in] enabled if true, to enable form candidate data
227    *        otherwise to disable
228    */
229   virtual void EnableFormCandidateData( bool enabled ) = 0;
230
231   /**
232    * @brief check if text selection is enabled or not.
233    *
234    * @return true if enabled, false is disabled.
235    */
236   virtual bool IsTextSelectionEnabled() const = 0;
237
238   /**
239    * @brief Enable/Disable text selection
240    *
241    * @param[in] enabled if true, to enable text selection
242    *        otherwise to disable
243    */
244   virtual void EnableTextSelection( bool enabled ) = 0;
245
246   /**
247    * @brief check if text autosizing is enabled or not.
248    *
249    * @return true if enabled, false is disabled.
250    */
251   virtual bool IsTextAutosizingEnabled() const = 0;
252
253   /**
254    * @brief Enable/Disable text autosizing
255    *
256    * @param[in] enabled if true, to enable text autosizing
257    *        otherwise to disable
258    */
259   virtual void EnableTextAutosizing( bool enabled ) = 0;
260
261   /**
262    * @brief check if arrow scroll is enabled or not.
263    *
264    * @return true if enabled, false is disabled.
265    */
266    virtual bool IsArrowScrollEnabled() const = 0;
267
268   /**
269    * @brief Enable/Disable arrow scroll
270    *
271    * @param[in] enable if true, to enable arrow scroll
272    *        otherwise to disable
273    */
274   virtual void EnableArrowScroll( bool enable ) = 0;
275
276   /**
277    * @brief check if clipboard is enabled or not.
278    *
279    * @return true if enabled, false is disabled.
280    */
281   virtual bool IsClipboardEnabled() const = 0;
282
283   /**
284    * @brief Enable/Disable clipboard
285    *
286    * @param[in] enabled if true, to enable clipboard
287    *          otherwise to disable
288    */
289   virtual void EnableClipboard( bool enabled ) = 0;
290
291   /**
292    * @brief check if ime panel is enabled or not.
293    *
294    * @return true if enabled, false is disabled.
295    */
296   virtual bool IsImePanelEnabled() const = 0;
297
298   /**
299    * @brief Enable/Disable ime panel
300    *
301    * @param[in] enabled if true, to enable ime panel
302    *          otherwise to disable
303    */
304   virtual void EnableImePanel( bool enabled ) = 0;
305
306   /**
307    * @brief Allow if the scripts can open new windows.
308    *
309    * @param[in] allowed if true, the scripts can open new windows,
310    *       otherwise not
311    */
312   virtual void AllowScriptsOpenWindows(bool allowed) = 0;
313
314   /**
315    * @brief Check if images are loaded automatically or not.
316    *
317    * @return true if enabled, false if disabled.
318    */
319   virtual bool AreImagesLoadedAutomatically() const = 0;
320
321   /**
322    * @brief Allow to load images automatically
323    *
324    * @param[in] automatic if true, to load images automatically,
325    *       otherwise not
326    */
327   virtual void AllowImagesLoadAutomatically(bool automatic) = 0;
328
329   /**
330    * @brief Get the default encoding name.
331    *
332    * @return defaut encoding name.
333    */
334   virtual std::string GetDefaultTextEncodingName() const = 0;
335
336   /**
337    * @brief Set the default encoding name.
338    *
339    * @param[in] defaultTextEncodingName a default encoding name to set
340    */
341   virtual void SetDefaultTextEncodingName(const std::string& defaultTextEncodingName) = 0;
342 };
343
344 } // namespace Dali
345
346 #endif // DALI_WEB_ENGINE_SETTINGS_H