[GTK] Fix typo in the newly added API
[WebKit-https.git] / Source / WebKit / UIProcess / API / gtk / WebKitSettings.h
1 /*
2  * Copyright (c) 2011 Motorola Mobility, Inc.  All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification,
5  * are permitted provided that the following conditions are met:
6  *
7  * Redistributions of source code must retain the above copyright notice,
8  * this list of conditions and the following disclaimer.
9  *
10  * Redistributions in binary form must reproduce the above copyright notice,
11  * this list of conditions and the following disclaimer in the documentation and/or
12  * other materials provided with the distribution.
13  *
14  * Neither the name of Motorola Mobility, Inc. nor the names of its contributors may
15  * be used to endorse or promote products derived from this software without
16  * specific prior written permission.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29  */
30
31 #if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
32 #error "Only <webkit2/webkit2.h> can be included directly."
33 #endif
34
35 #ifndef WebKitSettings_h
36 #define WebKitSettings_h
37
38 #include <glib-object.h>
39 #include <webkit2/WebKitDefines.h>
40
41 G_BEGIN_DECLS
42
43 #define WEBKIT_TYPE_SETTINGS            (webkit_settings_get_type())
44 #define WEBKIT_SETTINGS(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_SETTINGS, WebKitSettings))
45 #define WEBKIT_SETTINGS_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass),  WEBKIT_TYPE_SETTINGS, WebKitSettingsClass))
46 #define WEBKIT_IS_SETTINGS(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_SETTINGS))
47 #define WEBKIT_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),  WEBKIT_TYPE_SETTINGS))
48 #define WEBKIT_SETTINGS_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj),  WEBKIT_TYPE_SETTINGS, WebKitSettingsClass))
49
50 /**
51  * WebKitHardwareAccelerationPolicy:
52  * @WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND: Hardware acceleration is enabled/disabled as request by web contents.
53  * @WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS: Hardware acceleration is always enabled, even for websites not requesting it.
54  * @WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER: Hardware acceleration is always disabled, even for websites requesting it.
55  *
56  * Enum values used for determining the hardware acceleration policy.
57  *
58  * Since: 2.16
59  */
60 typedef enum {
61     WEBKIT_HARDWARE_ACCELERATION_POLICY_ON_DEMAND,
62     WEBKIT_HARDWARE_ACCELERATION_POLICY_ALWAYS,
63     WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER
64 } WebKitHardwareAccelerationPolicy;
65
66 typedef struct _WebKitSettings WebKitSettings;
67 typedef struct _WebKitSettingsClass WebKitSettingsClass;
68 typedef struct _WebKitSettingsPrivate WebKitSettingsPrivate;
69
70 struct _WebKitSettings {
71     GObject parent_instance;
72
73     WebKitSettingsPrivate *priv;
74 };
75
76 struct _WebKitSettingsClass {
77     GObjectClass parent_class;
78
79     void (*_webkit_reserved0) (void);
80     void (*_webkit_reserved1) (void);
81     void (*_webkit_reserved2) (void);
82     void (*_webkit_reserved3) (void);
83 };
84
85 WEBKIT_API GType
86 webkit_settings_get_type(void);
87
88 WEBKIT_API WebKitSettings *
89 webkit_settings_new                                            (void);
90
91 WEBKIT_API WebKitSettings *
92 webkit_settings_new_with_settings                              (const gchar    *first_setting_name,
93                                                                 ...);
94
95 WEBKIT_API gboolean
96 webkit_settings_get_enable_javascript                          (WebKitSettings *settings);
97
98 WEBKIT_API void
99 webkit_settings_set_enable_javascript                          (WebKitSettings *settings,
100                                                                 gboolean        enabled);
101
102 WEBKIT_API gboolean
103 webkit_settings_get_auto_load_images                           (WebKitSettings *settings);
104
105 WEBKIT_API void
106 webkit_settings_set_auto_load_images                           (WebKitSettings *settings,
107                                                                 gboolean        enabled);
108
109 WEBKIT_API gboolean
110 webkit_settings_get_load_icons_ignoring_image_load_setting     (WebKitSettings *settings);
111
112 WEBKIT_API void
113 webkit_settings_set_load_icons_ignoring_image_load_setting     (WebKitSettings *settings,
114                                                                 gboolean        enabled);
115
116 WEBKIT_API gboolean
117 webkit_settings_get_enable_offline_web_application_cache       (WebKitSettings *settings);
118
119 WEBKIT_API void
120 webkit_settings_set_enable_offline_web_application_cache       (WebKitSettings *settings,
121                                                                 gboolean        enabled);
122
123 WEBKIT_API gboolean
124 webkit_settings_get_enable_html5_local_storage                 (WebKitSettings *settings);
125
126 WEBKIT_API void
127 webkit_settings_set_enable_html5_local_storage                 (WebKitSettings *settings,
128                                                                 gboolean        enabled);
129
130 WEBKIT_API gboolean
131 webkit_settings_get_enable_html5_database                      (WebKitSettings *settings);
132
133 WEBKIT_API void
134 webkit_settings_set_enable_html5_database                      (WebKitSettings *settings,
135                                                                 gboolean        enabled);
136 WEBKIT_API gboolean
137 webkit_settings_get_enable_xss_auditor                         (WebKitSettings *settings);
138
139 WEBKIT_API void
140 webkit_settings_set_enable_xss_auditor                         (WebKitSettings *settings,
141                                                                 gboolean        enabled);
142
143 WEBKIT_API gboolean
144 webkit_settings_get_enable_frame_flattening                    (WebKitSettings *settings);
145
146 WEBKIT_API void
147 webkit_settings_set_enable_frame_flattening                    (WebKitSettings *settings,
148                                                                 gboolean        enabled);
149
150 WEBKIT_API gboolean
151 webkit_settings_get_enable_plugins                             (WebKitSettings *settings);
152
153 WEBKIT_API void
154 webkit_settings_set_enable_plugins                             (WebKitSettings *settings,
155                                                                 gboolean        enabled);
156
157 WEBKIT_API gboolean
158 webkit_settings_get_enable_java                                (WebKitSettings *settings);
159
160 WEBKIT_API void
161 webkit_settings_set_enable_java                                (WebKitSettings *settings,
162                                                                 gboolean        enabled);
163
164 WEBKIT_API gboolean
165 webkit_settings_get_javascript_can_open_windows_automatically  (WebKitSettings *settings);
166
167 WEBKIT_API void
168 webkit_settings_set_javascript_can_open_windows_automatically  (WebKitSettings *settings,
169                                                                 gboolean        enabled);
170
171 WEBKIT_API gboolean
172 webkit_settings_get_enable_hyperlink_auditing                  (WebKitSettings *settings);
173
174 WEBKIT_API void
175 webkit_settings_set_enable_hyperlink_auditing                  (WebKitSettings *settings,
176                                                                 gboolean        enabled);
177
178 WEBKIT_API const gchar *
179 webkit_settings_get_default_font_family                        (WebKitSettings *settings);
180
181 WEBKIT_API void
182 webkit_settings_set_default_font_family                        (WebKitSettings *settings,
183                                                                 const gchar    *default_font_family);
184
185 WEBKIT_API const gchar *
186 webkit_settings_get_monospace_font_family                      (WebKitSettings *settings);
187
188 WEBKIT_API void
189 webkit_settings_set_monospace_font_family                      (WebKitSettings *settings,
190                                                                 const gchar    *monospace_font_family);
191
192 WEBKIT_API const gchar *
193 webkit_settings_get_serif_font_family                          (WebKitSettings *settings);
194
195 WEBKIT_API void
196 webkit_settings_set_serif_font_family                          (WebKitSettings *settings,
197                                                                 const gchar    *serif_font_family);
198
199 WEBKIT_API const gchar *
200 webkit_settings_get_sans_serif_font_family                     (WebKitSettings *settings);
201
202 WEBKIT_API void
203 webkit_settings_set_sans_serif_font_family                     (WebKitSettings *settings,
204                                                                 const gchar    *sans_serif_font_family);
205
206 WEBKIT_API const gchar *
207 webkit_settings_get_cursive_font_family                        (WebKitSettings *settings);
208
209 WEBKIT_API void
210 webkit_settings_set_cursive_font_family                        (WebKitSettings *settings,
211                                                                 const gchar    *cursive_font_family);
212
213 WEBKIT_API const gchar *
214 webkit_settings_get_fantasy_font_family                        (WebKitSettings *settings);
215
216 WEBKIT_API void
217 webkit_settings_set_fantasy_font_family                        (WebKitSettings *settings,
218                                                                 const gchar    *fantasy_font_family);
219
220 WEBKIT_API const gchar *
221 webkit_settings_get_pictograph_font_family                     (WebKitSettings *settings);
222
223 WEBKIT_API void
224 webkit_settings_set_pictograph_font_family                     (WebKitSettings *settings,
225                                                                 const gchar    *pictograph_font_family);
226
227 WEBKIT_API guint32
228 webkit_settings_get_default_font_size                          (WebKitSettings *settings);
229
230 WEBKIT_API void
231 webkit_settings_set_default_font_size                          (WebKitSettings *settings,
232                                                                 guint32         font_size);
233
234 WEBKIT_API guint32
235 webkit_settings_get_default_monospace_font_size                (WebKitSettings *settings);
236
237 WEBKIT_API void
238 webkit_settings_set_default_monospace_font_size                (WebKitSettings *settings,
239                                                                 guint32         font_size);
240
241 WEBKIT_API guint32
242 webkit_settings_get_minimum_font_size                          (WebKitSettings *settings);
243
244 WEBKIT_API void
245 webkit_settings_set_minimum_font_size                          (WebKitSettings *settings,
246                                                                 guint32         font_size);
247
248 WEBKIT_API const gchar *
249 webkit_settings_get_default_charset                            (WebKitSettings *settings);
250
251 WEBKIT_API void
252 webkit_settings_set_default_charset                            (WebKitSettings *settings,
253                                                                 const gchar    *default_charset);
254
255 WEBKIT_DEPRECATED gboolean
256 webkit_settings_get_enable_private_browsing                    (WebKitSettings *settings);
257
258 WEBKIT_DEPRECATED void
259 webkit_settings_set_enable_private_browsing                    (WebKitSettings *settings,
260                                                                 gboolean        enabled);
261
262 WEBKIT_API gboolean
263 webkit_settings_get_enable_developer_extras                    (WebKitSettings *settings);
264
265 WEBKIT_API void
266 webkit_settings_set_enable_developer_extras                    (WebKitSettings *settings,
267                                                                 gboolean        enabled);
268
269 WEBKIT_API gboolean
270 webkit_settings_get_enable_resizable_text_areas                (WebKitSettings *settings);
271
272 WEBKIT_API void
273 webkit_settings_set_enable_resizable_text_areas                (WebKitSettings *settings,
274                                                                 gboolean        enabled);
275
276 WEBKIT_API gboolean
277 webkit_settings_get_enable_tabs_to_links                       (WebKitSettings *settings);
278
279 WEBKIT_API void
280 webkit_settings_set_enable_tabs_to_links                       (WebKitSettings *settings,
281                                                                 gboolean        enabled);
282
283 WEBKIT_API gboolean
284 webkit_settings_get_enable_dns_prefetching                     (WebKitSettings *settings);
285
286 WEBKIT_API void
287 webkit_settings_set_enable_dns_prefetching                     (WebKitSettings *settings,
288                                                                 gboolean        enabled);
289
290 WEBKIT_API gboolean
291 webkit_settings_get_enable_caret_browsing                      (WebKitSettings *settings);
292
293 WEBKIT_API void
294 webkit_settings_set_enable_caret_browsing                      (WebKitSettings *settings,
295                                                                 gboolean        enabled);
296
297 WEBKIT_API gboolean
298 webkit_settings_get_enable_fullscreen                          (WebKitSettings *settings);
299
300 WEBKIT_API void
301 webkit_settings_set_enable_fullscreen                          (WebKitSettings *settings,
302                                                                 gboolean        enabled);
303
304 WEBKIT_API gboolean
305 webkit_settings_get_print_backgrounds                          (WebKitSettings *settings);
306
307 WEBKIT_API void
308 webkit_settings_set_print_backgrounds                          (WebKitSettings *settings,
309                                                                 gboolean        print_backgrounds);
310
311 WEBKIT_API gboolean
312 webkit_settings_get_enable_webaudio                            (WebKitSettings *settings);
313
314 WEBKIT_API void
315 webkit_settings_set_enable_webaudio                            (WebKitSettings *settings,
316                                                                 gboolean        enabled);
317
318 WEBKIT_API gboolean
319 webkit_settings_get_enable_webgl                               (WebKitSettings *settings);
320
321 WEBKIT_API void
322 webkit_settings_set_enable_webgl                               (WebKitSettings *settings,
323                                                                 gboolean        enabled);
324
325 WEBKIT_API void
326 webkit_settings_set_allow_modal_dialogs                        (WebKitSettings *settings,
327                                                                 gboolean        allowed);
328
329 WEBKIT_API gboolean
330 webkit_settings_get_allow_modal_dialogs                        (WebKitSettings *settings);
331
332 WEBKIT_API void
333 webkit_settings_set_zoom_text_only                             (WebKitSettings *settings,
334                                                                 gboolean        zoom_text_only);
335
336 WEBKIT_API gboolean
337 webkit_settings_get_zoom_text_only                             (WebKitSettings *settings);
338
339 WEBKIT_API gboolean
340 webkit_settings_get_javascript_can_access_clipboard            (WebKitSettings *settings);
341
342 WEBKIT_API void
343 webkit_settings_set_javascript_can_access_clipboard            (WebKitSettings *settings,
344                                                                 gboolean        enabled);
345
346 WEBKIT_API gboolean
347 webkit_settings_get_media_playback_requires_user_gesture       (WebKitSettings *settings);
348
349 WEBKIT_API void
350 webkit_settings_set_media_playback_requires_user_gesture       (WebKitSettings *settings,
351                                                                 gboolean        enabled);
352
353 WEBKIT_API gboolean
354 webkit_settings_get_media_playback_allows_inline               (WebKitSettings *settings);
355
356 WEBKIT_API void
357 webkit_settings_set_media_playback_allows_inline               (WebKitSettings *settings,
358                                                                 gboolean        enabled);
359 WEBKIT_API gboolean
360 webkit_settings_get_draw_compositing_indicators                (WebKitSettings *settings);
361
362 WEBKIT_API void
363 webkit_settings_set_draw_compositing_indicators                (WebKitSettings *settings,
364                                                                 gboolean        enabled);
365
366 WEBKIT_API gboolean
367 webkit_settings_get_enable_site_specific_quirks                (WebKitSettings *settings);
368
369 WEBKIT_API void
370 webkit_settings_set_enable_site_specific_quirks                (WebKitSettings *settings,
371                                                                 gboolean        enabled);
372
373 WEBKIT_API gboolean
374 webkit_settings_get_enable_page_cache                          (WebKitSettings *settings);
375
376 WEBKIT_API void
377 webkit_settings_set_enable_page_cache                          (WebKitSettings *settings,
378                                                                 gboolean        enabled);
379
380 WEBKIT_API const gchar *
381 webkit_settings_get_user_agent                                 (WebKitSettings *settings);
382
383 WEBKIT_API void
384 webkit_settings_set_user_agent                                 (WebKitSettings *settings,
385                                                                 const gchar    *user_agent);
386 WEBKIT_API void
387 webkit_settings_set_user_agent_with_application_details        (WebKitSettings *settings,
388                                                                 const gchar    *application_name,
389                                                                 const gchar    *application_version);
390
391 WEBKIT_API gboolean
392 webkit_settings_get_enable_smooth_scrolling                    (WebKitSettings *settings);
393
394 WEBKIT_API void
395 webkit_settings_set_enable_smooth_scrolling                    (WebKitSettings *settings,
396                                                                 gboolean        enabled);
397
398 WEBKIT_API gboolean
399 webkit_settings_get_enable_accelerated_2d_canvas               (WebKitSettings *settings);
400
401 WEBKIT_API void
402 webkit_settings_set_enable_accelerated_2d_canvas               (WebKitSettings *settings,
403                                                                 gboolean        enabled);
404
405 WEBKIT_API gboolean
406 webkit_settings_get_enable_write_console_messages_to_stdout    (WebKitSettings *settings);
407
408 WEBKIT_API void
409 webkit_settings_set_enable_write_console_messages_to_stdout    (WebKitSettings *settings,
410                                                                 gboolean        enabled);
411
412 WEBKIT_API gboolean
413 webkit_settings_get_enable_media_stream                        (WebKitSettings *settings);
414
415 WEBKIT_API void
416 webkit_settings_set_enable_media_stream                        (WebKitSettings *settings,
417                                                                 gboolean        enabled);
418
419 WEBKIT_API gboolean
420 webkit_settings_get_enable_mock_capture_devices                (WebKitSettings *settings);
421
422 WEBKIT_API void
423 webkit_settings_set_enable_mock_capture_devices                (WebKitSettings *settings,
424                                                                 gboolean        enabled);
425
426 WEBKIT_API gboolean
427 webkit_settings_get_enable_spatial_navigation                  (WebKitSettings *settings);
428
429 WEBKIT_API void
430 webkit_settings_set_enable_spatial_navigation                  (WebKitSettings *settings,
431                                                                 gboolean        enabled);
432
433 WEBKIT_API gboolean
434 webkit_settings_get_enable_mediasource                         (WebKitSettings *settings);
435
436 WEBKIT_API void
437 webkit_settings_set_enable_mediasource                         (WebKitSettings *settings,
438                                                                 gboolean        enabled);
439
440 WEBKIT_API gboolean
441 webkit_settings_get_enable_encrypted_media                     (WebKitSettings *settings);
442
443 WEBKIT_API void
444 webkit_settings_set_enable_encrypted_media                     (WebKitSettings *settings,
445                                                                 gboolean        enabled);
446
447 WEBKIT_API gboolean
448 webkit_settings_get_enable_media_capabilities                  (WebKitSettings *settings);
449
450 WEBKIT_API void
451 webkit_settings_set_enable_media_capabilities                  (WebKitSettings *settings,
452                                                                 gboolean        enabled);
453
454 WEBKIT_API gboolean
455 webkit_settings_get_allow_file_access_from_file_urls           (WebKitSettings *settings);
456
457 WEBKIT_API void
458 webkit_settings_set_allow_file_access_from_file_urls           (WebKitSettings *settings,
459                                                                 gboolean        allowed);
460
461 WEBKIT_API gboolean
462 webkit_settings_get_allow_universal_access_from_file_urls      (WebKitSettings *settings);
463
464 WEBKIT_API void
465 webkit_settings_set_allow_universal_access_from_file_urls      (WebKitSettings *settings,
466                                                                 gboolean        allowed);
467
468 WEBKIT_API WebKitHardwareAccelerationPolicy
469 webkit_settings_get_hardware_acceleration_policy               (WebKitSettings *settings);
470
471 WEBKIT_API void
472 webkit_settings_set_hardware_acceleration_policy               (WebKitSettings *settings,
473                                                                 WebKitHardwareAccelerationPolicy policy);
474
475 WEBKIT_API gboolean
476 webkit_settings_get_enable_back_forward_navigation_gestures    (WebKitSettings *settings);
477
478 WEBKIT_API void
479 webkit_settings_set_enable_back_forward_navigation_gestures    (WebKitSettings *settings,
480                                                                 gboolean        enabled);
481
482 WEBKIT_API guint32
483 webkit_settings_font_size_to_points                            (guint32 pixels);
484
485 WEBKIT_API guint32
486 webkit_settings_font_size_to_pixels                            (guint32 points);
487
488 G_END_DECLS
489
490 #endif /* WebKitSettings_h */