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