1 #ifndef DALI_WEB_ENGINE_SETTINGS_H
2 #define DALI_WEB_ENGINE_SETTINGS_H
5 * Copyright (c) 2021 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.
27 * @brief A class WebEngineSettings for settings of web engine.
29 class WebEngineSettings
37 WebEngineSettings() = default;
42 virtual ~WebEngineSettings() = default;
45 *@brief Allow running mixed contents or not.
47 * @param[in] allowed if true, allow to run mixed contents,
50 virtual void AllowMixedContents( bool allowed ) = 0;
53 * @brief Enable the spatial navigation or not.
55 * @param[in] enabled if true, use spatial navigation,
56 * otherwise to disable
58 virtual void EnableSpatialNavigation( bool enabled ) = 0;
61 * @brief Get the default font size.
63 * @return defaut font size.
65 virtual uint32_t GetDefaultFontSize() const = 0;
68 * @brief Set the default font size.
70 * @param[in] size a new default font size to set
72 virtual void SetDefaultFontSize( uint32_t size ) = 0;
75 * @brief Enables/disables web security.
77 * @param[in] enabled if true, to enable the web security
78 * otherwise to disable
80 virtual void EnableWebSecurity( bool enabled ) = 0;
83 * @brief Allow/Disallow file access from external url
85 * @param[in] allowed if true, to allow file access from external url
86 * otherwise to disallow
88 virtual void AllowFileAccessFromExternalUrl( bool allowed ) = 0;
91 * @brief Check if javascript is enabled or not.
93 * @return true if enabled, false if disabled.
95 virtual bool IsJavaScriptEnabled() const = 0;
98 * @brief Enable/Disable javascript
100 * @param[in] enabled if true, to enable javascript
101 * otherwise to disable
103 virtual void EnableJavaScript( bool enabled ) = 0;
106 * @brief Allow if the scripts can open new windows.
108 * @param[in] allowed if true, the scripts can open new windows,
111 virtual void AllowScriptsOpenWindows( bool allowed ) = 0;
114 * @brief Check if images are loaded automatically or not.
116 * @return true if enabled, false if disabled.
118 virtual bool AreImagesLoadedAutomatically() const = 0;
121 * @brief Allow to load images automatically
123 * @param[in] automatic if true, to load images automatically,
126 virtual void AllowImagesLoadAutomatically( bool automatic ) = 0;
129 * @brief Get the default encoding name.
131 * @return defaut encoding name.
133 virtual std::string GetDefaultTextEncodingName() const = 0;
136 * @brief Set the default encoding name.
138 * @param[in] defaultTextEncodingName a default encoding name to set
140 virtual void SetDefaultTextEncodingName( const std::string& defaultTextEncodingName ) = 0;
146 #endif // DALI_WEB_ENGINE_SETTINGS_H