[GTK][WPE] Add enable-media websetting
[WebKit-https.git] / Source / WebKit / UIProcess / API / wpe / 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(__WEBKIT_H_INSIDE__) && !defined(WEBKIT2_COMPILATION)
32 #error "Only <wpe/webkit.h> can be included directly."
33 #endif
34
35 #ifndef WebKitSettings_h
36 #define WebKitSettings_h
37
38 #include <glib-object.h>
39 #include <wpe/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 typedef struct _WebKitSettings WebKitSettings;
51 typedef struct _WebKitSettingsClass WebKitSettingsClass;
52 typedef struct _WebKitSettingsPrivate WebKitSettingsPrivate;
53
54 struct _WebKitSettings {
55     GObject parent_instance;
56
57     WebKitSettingsPrivate *priv;
58 };
59
60 struct _WebKitSettingsClass {
61     GObjectClass parent_class;
62
63     void (*_webkit_reserved0) (void);
64     void (*_webkit_reserved1) (void);
65     void (*_webkit_reserved2) (void);
66     void (*_webkit_reserved3) (void);
67 };
68
69 WEBKIT_API GType
70 webkit_settings_get_type(void);
71
72 WEBKIT_API WebKitSettings *
73 webkit_settings_new                                            (void);
74
75 WEBKIT_API WebKitSettings *
76 webkit_settings_new_with_settings                              (const gchar    *first_setting_name,
77                                                                 ...);
78
79 WEBKIT_API gboolean
80 webkit_settings_get_enable_javascript                          (WebKitSettings *settings);
81
82 WEBKIT_API void
83 webkit_settings_set_enable_javascript                          (WebKitSettings *settings,
84                                                                 gboolean        enabled);
85
86 WEBKIT_API gboolean
87 webkit_settings_get_auto_load_images                           (WebKitSettings *settings);
88
89 WEBKIT_API void
90 webkit_settings_set_auto_load_images                           (WebKitSettings *settings,
91                                                                 gboolean        enabled);
92
93 WEBKIT_API gboolean
94 webkit_settings_get_load_icons_ignoring_image_load_setting     (WebKitSettings *settings);
95
96 WEBKIT_API void
97 webkit_settings_set_load_icons_ignoring_image_load_setting     (WebKitSettings *settings,
98                                                                 gboolean        enabled);
99
100 WEBKIT_API gboolean
101 webkit_settings_get_enable_offline_web_application_cache       (WebKitSettings *settings);
102
103 WEBKIT_API void
104 webkit_settings_set_enable_offline_web_application_cache       (WebKitSettings *settings,
105                                                                 gboolean        enabled);
106
107 WEBKIT_API gboolean
108 webkit_settings_get_enable_html5_local_storage                 (WebKitSettings *settings);
109
110 WEBKIT_API void
111 webkit_settings_set_enable_html5_local_storage                 (WebKitSettings *settings,
112                                                                 gboolean        enabled);
113
114 WEBKIT_API gboolean
115 webkit_settings_get_enable_html5_database                      (WebKitSettings *settings);
116
117 WEBKIT_API void
118 webkit_settings_set_enable_html5_database                      (WebKitSettings *settings,
119                                                                 gboolean        enabled);
120 WEBKIT_API gboolean
121 webkit_settings_get_enable_xss_auditor                         (WebKitSettings *settings);
122
123 WEBKIT_API void
124 webkit_settings_set_enable_xss_auditor                         (WebKitSettings *settings,
125                                                                 gboolean        enabled);
126
127 WEBKIT_API gboolean
128 webkit_settings_get_enable_frame_flattening                    (WebKitSettings *settings);
129
130 WEBKIT_API void
131 webkit_settings_set_enable_frame_flattening                    (WebKitSettings *settings,
132                                                                 gboolean        enabled);
133
134 WEBKIT_API gboolean
135 webkit_settings_get_enable_plugins                             (WebKitSettings *settings);
136
137 WEBKIT_API void
138 webkit_settings_set_enable_plugins                             (WebKitSettings *settings,
139                                                                 gboolean        enabled);
140
141 WEBKIT_API gboolean
142 webkit_settings_get_enable_java                                (WebKitSettings *settings);
143
144 WEBKIT_API void
145 webkit_settings_set_enable_java                                (WebKitSettings *settings,
146                                                                 gboolean        enabled);
147
148 WEBKIT_API gboolean
149 webkit_settings_get_javascript_can_open_windows_automatically  (WebKitSettings *settings);
150
151 WEBKIT_API void
152 webkit_settings_set_javascript_can_open_windows_automatically  (WebKitSettings *settings,
153                                                                 gboolean        enabled);
154
155 WEBKIT_API gboolean
156 webkit_settings_get_enable_hyperlink_auditing                  (WebKitSettings *settings);
157
158 WEBKIT_API void
159 webkit_settings_set_enable_hyperlink_auditing                  (WebKitSettings *settings,
160                                                                 gboolean        enabled);
161
162 WEBKIT_API const gchar *
163 webkit_settings_get_default_font_family                        (WebKitSettings *settings);
164
165 WEBKIT_API void
166 webkit_settings_set_default_font_family                        (WebKitSettings *settings,
167                                                                 const gchar    *default_font_family);
168
169 WEBKIT_API const gchar *
170 webkit_settings_get_monospace_font_family                      (WebKitSettings *settings);
171
172 WEBKIT_API void
173 webkit_settings_set_monospace_font_family                      (WebKitSettings *settings,
174                                                                 const gchar    *monospace_font_family);
175
176 WEBKIT_API const gchar *
177 webkit_settings_get_serif_font_family                          (WebKitSettings *settings);
178
179 WEBKIT_API void
180 webkit_settings_set_serif_font_family                          (WebKitSettings *settings,
181                                                                 const gchar    *serif_font_family);
182
183 WEBKIT_API const gchar *
184 webkit_settings_get_sans_serif_font_family                     (WebKitSettings *settings);
185
186 WEBKIT_API void
187 webkit_settings_set_sans_serif_font_family                     (WebKitSettings *settings,
188                                                                 const gchar    *sans_serif_font_family);
189
190 WEBKIT_API const gchar *
191 webkit_settings_get_cursive_font_family                        (WebKitSettings *settings);
192
193 WEBKIT_API void
194 webkit_settings_set_cursive_font_family                        (WebKitSettings *settings,
195                                                                 const gchar    *cursive_font_family);
196
197 WEBKIT_API const gchar *
198 webkit_settings_get_fantasy_font_family                        (WebKitSettings *settings);
199
200 WEBKIT_API void
201 webkit_settings_set_fantasy_font_family                        (WebKitSettings *settings,
202                                                                 const gchar    *fantasy_font_family);
203
204 WEBKIT_API const gchar *
205 webkit_settings_get_pictograph_font_family                     (WebKitSettings *settings);
206
207 WEBKIT_API void
208 webkit_settings_set_pictograph_font_family                     (WebKitSettings *settings,
209                                                                 const gchar    *pictograph_font_family);
210
211 WEBKIT_API guint32
212 webkit_settings_get_default_font_size                          (WebKitSettings *settings);
213
214 WEBKIT_API void
215 webkit_settings_set_default_font_size                          (WebKitSettings *settings,
216                                                                 guint32         font_size);
217
218 WEBKIT_API guint32
219 webkit_settings_get_default_monospace_font_size                (WebKitSettings *settings);
220
221 WEBKIT_API void
222 webkit_settings_set_default_monospace_font_size                (WebKitSettings *settings,
223                                                                 guint32         font_size);
224
225 WEBKIT_API guint32
226 webkit_settings_get_minimum_font_size                          (WebKitSettings *settings);
227
228 WEBKIT_API void
229 webkit_settings_set_minimum_font_size                          (WebKitSettings *settings,
230                                                                 guint32         font_size);
231
232 WEBKIT_API const gchar *
233 webkit_settings_get_default_charset                            (WebKitSettings *settings);
234
235 WEBKIT_API void
236 webkit_settings_set_default_charset                            (WebKitSettings *settings,
237                                                                 const gchar    *default_charset);
238
239 WEBKIT_API gboolean
240 webkit_settings_get_enable_developer_extras                    (WebKitSettings *settings);
241
242 WEBKIT_API void
243 webkit_settings_set_enable_developer_extras                    (WebKitSettings *settings,
244                                                                 gboolean        enabled);
245
246 WEBKIT_API gboolean
247 webkit_settings_get_enable_resizable_text_areas                (WebKitSettings *settings);
248
249 WEBKIT_API void
250 webkit_settings_set_enable_resizable_text_areas                (WebKitSettings *settings,
251                                                                 gboolean        enabled);
252
253 WEBKIT_API gboolean
254 webkit_settings_get_enable_tabs_to_links                       (WebKitSettings *settings);
255
256 WEBKIT_API void
257 webkit_settings_set_enable_tabs_to_links                       (WebKitSettings *settings,
258                                                                 gboolean        enabled);
259
260 WEBKIT_API gboolean
261 webkit_settings_get_enable_dns_prefetching                     (WebKitSettings *settings);
262
263 WEBKIT_API void
264 webkit_settings_set_enable_dns_prefetching                     (WebKitSettings *settings,
265                                                                 gboolean        enabled);
266
267 WEBKIT_API gboolean
268 webkit_settings_get_enable_caret_browsing                      (WebKitSettings *settings);
269
270 WEBKIT_API void
271 webkit_settings_set_enable_caret_browsing                      (WebKitSettings *settings,
272                                                                 gboolean        enabled);
273
274 WEBKIT_API gboolean
275 webkit_settings_get_enable_fullscreen                          (WebKitSettings *settings);
276
277 WEBKIT_API void
278 webkit_settings_set_enable_fullscreen                          (WebKitSettings *settings,
279                                                                 gboolean        enabled);
280
281 WEBKIT_API gboolean
282 webkit_settings_get_print_backgrounds                          (WebKitSettings *settings);
283
284 WEBKIT_API void
285 webkit_settings_set_print_backgrounds                          (WebKitSettings *settings,
286                                                                 gboolean        print_backgrounds);
287
288 WEBKIT_API gboolean
289 webkit_settings_get_enable_webaudio                            (WebKitSettings *settings);
290
291 WEBKIT_API void
292 webkit_settings_set_enable_webaudio                            (WebKitSettings *settings,
293                                                                 gboolean        enabled);
294
295 WEBKIT_API gboolean
296 webkit_settings_get_enable_webgl                               (WebKitSettings *settings);
297
298 WEBKIT_API void
299 webkit_settings_set_enable_webgl                               (WebKitSettings *settings,
300                                                                 gboolean        enabled);
301
302 WEBKIT_API void
303 webkit_settings_set_allow_modal_dialogs                        (WebKitSettings *settings,
304                                                                 gboolean        allowed);
305
306 WEBKIT_API gboolean
307 webkit_settings_get_allow_modal_dialogs                        (WebKitSettings *settings);
308
309 WEBKIT_API void
310 webkit_settings_set_zoom_text_only                             (WebKitSettings *settings,
311                                                                 gboolean        zoom_text_only);
312
313 WEBKIT_API gboolean
314 webkit_settings_get_zoom_text_only                             (WebKitSettings *settings);
315
316 WEBKIT_API gboolean
317 webkit_settings_get_javascript_can_access_clipboard            (WebKitSettings *settings);
318
319 WEBKIT_API void
320 webkit_settings_set_javascript_can_access_clipboard            (WebKitSettings *settings,
321                                                                 gboolean        enabled);
322
323 WEBKIT_API gboolean
324 webkit_settings_get_media_playback_requires_user_gesture       (WebKitSettings *settings);
325
326 WEBKIT_API void
327 webkit_settings_set_media_playback_requires_user_gesture       (WebKitSettings *settings,
328                                                                 gboolean        enabled);
329
330 WEBKIT_API gboolean
331 webkit_settings_get_media_playback_allows_inline               (WebKitSettings *settings);
332
333 WEBKIT_API void
334 webkit_settings_set_media_playback_allows_inline               (WebKitSettings *settings,
335                                                                 gboolean        enabled);
336 WEBKIT_API gboolean
337 webkit_settings_get_draw_compositing_indicators                (WebKitSettings *settings);
338
339 WEBKIT_API void
340 webkit_settings_set_draw_compositing_indicators                (WebKitSettings *settings,
341                                                                 gboolean        enabled);
342
343 WEBKIT_API gboolean
344 webkit_settings_get_enable_site_specific_quirks                (WebKitSettings *settings);
345
346 WEBKIT_API void
347 webkit_settings_set_enable_site_specific_quirks                (WebKitSettings *settings,
348                                                                 gboolean        enabled);
349
350 WEBKIT_API gboolean
351 webkit_settings_get_enable_page_cache                          (WebKitSettings *settings);
352
353 WEBKIT_API void
354 webkit_settings_set_enable_page_cache                          (WebKitSettings *settings,
355                                                                 gboolean        enabled);
356
357 WEBKIT_API const gchar *
358 webkit_settings_get_user_agent                                 (WebKitSettings *settings);
359
360 WEBKIT_API void
361 webkit_settings_set_user_agent                                 (WebKitSettings *settings,
362                                                                 const gchar    *user_agent);
363 WEBKIT_API void
364 webkit_settings_set_user_agent_with_application_details        (WebKitSettings *settings,
365                                                                 const gchar    *application_name,
366                                                                 const gchar    *application_version);
367
368 WEBKIT_API gboolean
369 webkit_settings_get_enable_smooth_scrolling                    (WebKitSettings *settings);
370
371 WEBKIT_API void
372 webkit_settings_set_enable_smooth_scrolling                    (WebKitSettings *settings,
373                                                                 gboolean        enabled);
374
375 WEBKIT_API gboolean
376 webkit_settings_get_enable_accelerated_2d_canvas               (WebKitSettings *settings);
377
378 WEBKIT_API void
379 webkit_settings_set_enable_accelerated_2d_canvas               (WebKitSettings *settings,
380                                                                 gboolean        enabled);
381
382 WEBKIT_API gboolean
383 webkit_settings_get_enable_write_console_messages_to_stdout    (WebKitSettings *settings);
384
385 WEBKIT_API void
386 webkit_settings_set_enable_write_console_messages_to_stdout    (WebKitSettings *settings,
387                                                                 gboolean        enabled);
388
389 WEBKIT_API gboolean
390 webkit_settings_get_enable_media_stream                        (WebKitSettings *settings);
391
392 WEBKIT_API void
393 webkit_settings_set_enable_media_stream                        (WebKitSettings *settings,
394                                                                 gboolean        enabled);
395
396 WEBKIT_API gboolean
397 webkit_settings_get_enable_mock_capture_devices                (WebKitSettings *settings);
398
399 WEBKIT_API void
400 webkit_settings_set_enable_mock_capture_devices                (WebKitSettings *settings,
401                                                                 gboolean        enabled);
402
403 WEBKIT_API gboolean
404 webkit_settings_get_enable_spatial_navigation                  (WebKitSettings *settings);
405
406 WEBKIT_API void
407 webkit_settings_set_enable_spatial_navigation                  (WebKitSettings *settings,
408                                                                 gboolean        enabled);
409
410 WEBKIT_API gboolean
411 webkit_settings_get_enable_mediasource                         (WebKitSettings *settings);
412
413 WEBKIT_API void
414 webkit_settings_set_enable_mediasource                         (WebKitSettings *settings,
415                                                                 gboolean        enabled);
416
417 WEBKIT_API gboolean
418 webkit_settings_get_enable_encrypted_media                     (WebKitSettings *settings);
419
420 WEBKIT_API void
421 webkit_settings_set_enable_encrypted_media                     (WebKitSettings *settings,
422                                                                 gboolean        enabled);
423
424 WEBKIT_API gboolean
425 webkit_settings_get_enable_media_capabilities                  (WebKitSettings *settings);
426
427 WEBKIT_API void
428 webkit_settings_set_enable_media_capabilities                  (WebKitSettings *settings,
429                                                                 gboolean        enabled);
430
431 WEBKIT_API gboolean
432 webkit_settings_get_allow_file_access_from_file_urls           (WebKitSettings *settings);
433
434 WEBKIT_API void
435 webkit_settings_set_allow_file_access_from_file_urls           (WebKitSettings *settings,
436                                                                 gboolean        allowed);
437
438 WEBKIT_API gboolean
439 webkit_settings_get_allow_universal_access_from_file_urls      (WebKitSettings *settings);
440
441 WEBKIT_API void
442 webkit_settings_set_allow_universal_access_from_file_urls      (WebKitSettings *settings,
443                                                                 gboolean        allowed);
444
445 WEBKIT_API gboolean
446 webkit_settings_get_enable_javascript_markup                   (WebKitSettings *settings);
447
448 WEBKIT_API void
449 webkit_settings_set_enable_javascript_markup                   (WebKitSettings *settings,
450                                                                 gboolean        enabled);
451
452 WEBKIT_API gboolean
453 webkit_settings_get_enable_media                               (WebKitSettings *settings);
454
455 WEBKIT_API void
456 webkit_settings_set_enable_media                               (WebKitSettings *settings,
457                                                                 gboolean        enabled);
458
459 G_END_DECLS
460
461 #endif /* WebKitSettings_h */