Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.WebView / Tizen.WebView / Settings.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace Tizen.WebView
20 {
21     public class Settings
22     {
23         private IntPtr _handle;
24
25         internal Settings(IntPtr handle)
26         {
27             _handle = handle;
28         }
29
30         /// <summary>
31         /// Whether JavaScript can be executable.
32         /// </summary>
33         public bool JavaScriptEnabled
34         {
35             get
36             {
37                 return Interop.ChromiumEwk.ewk_settings_javascript_enabled_get(_handle);
38             }
39
40             set
41             {
42                 Interop.ChromiumEwk.ewk_settings_javascript_enabled_set(_handle, value);
43             }
44         }
45
46         /// <summary>
47         /// Whether images can be loaded automatically.
48         /// </summary>
49         public bool LoadImageAutomatically
50         {
51             get
52             {
53                 return Interop.ChromiumEwk.ewk_settings_loads_images_automatically_get(_handle);
54             }
55
56             set
57             {
58                 Interop.ChromiumEwk.ewk_settings_loads_images_automatically_set(_handle, value);
59             }
60         }
61
62         /// <summary>
63         /// The default text encoding name.
64         /// </summary>
65         public string DefaultTextEncodingName
66         {
67             get
68             {
69                 return Interop.ChromiumEwk.ewk_settings_default_text_encoding_name_get(_handle);
70             }
71
72             set
73             {
74                 Interop.ChromiumEwk.ewk_settings_default_text_encoding_name_set(_handle, value);
75             }
76         }
77
78         /// <summary>
79         /// The default font size of a pixel.
80         /// </summary>
81         public int DefaultFontSize
82         {
83             get
84             {
85                 return Interop.ChromiumEwk.ewk_settings_default_font_size_get(_handle);
86             }
87
88             set
89             {
90                 Interop.ChromiumEwk.ewk_settings_default_font_size_set(_handle, value);
91             }
92         }
93     }
94 }