1 | /* |
2 | * Copyright (C) 2010-2016 Apple Inc. All rights reserved. |
3 | * |
4 | * Redistribution and use in source and binary forms, with or without |
5 | * modification, are permitted provided that the following conditions |
6 | * are met: |
7 | * 1. Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. |
9 | * 2. Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. |
12 | * |
13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
23 | * THE POSSIBILITY OF SUCH DAMAGE. |
24 | */ |
25 | |
26 | #ifndef WKPreferencesPrivate_h |
27 | #define WKPreferencesPrivate_h |
28 | |
29 | #include <WebKit/WKBase.h> |
30 | |
31 | #ifdef __cplusplus |
32 | extern "C" { |
33 | #endif |
34 | |
35 | enum WKEditableLinkBehavior { |
36 | kWKEditableLinkBehaviorDefault, |
37 | kWKEditableLinkBehaviorAlwaysLive, |
38 | kWKEditableLinkBehaviorOnlyLiveWithShiftKey, |
39 | kWKEditableLinkBehaviorLiveWhenNotFocused, |
40 | kWKEditableLinkBehaviorNeverLive |
41 | }; |
42 | typedef enum WKEditableLinkBehavior WKEditableLinkBehavior; |
43 | |
44 | enum WKJavaScriptRuntimeFlags { |
45 | kWKJavaScriptRuntimeFlagsAllEnabled = 0 |
46 | }; |
47 | typedef unsigned WKJavaScriptRuntimeFlagSet; |
48 | |
49 | // Creates a copy with no identifier. |
50 | WK_EXPORT WKPreferencesRef WKPreferencesCreateCopy(WKPreferencesRef); |
51 | |
52 | WK_EXPORT void WKPreferencesEnableAllExperimentalFeatures(WKPreferencesRef); |
53 | WK_EXPORT void WKPreferencesSetExperimentalFeatureForKey(WKPreferencesRef, bool, WKStringRef); |
54 | WK_EXPORT void WKPreferencesResetAllInternalDebugFeatures(WKPreferencesRef); |
55 | WK_EXPORT void WKPreferencesSetInternalDebugFeatureForKey(WKPreferencesRef, bool, WKStringRef); |
56 | |
57 | // Defaults to false. |
58 | WK_EXPORT void WKPreferencesSetSubpixelAntialiasedLayerTextEnabled(WKPreferencesRef, bool); |
59 | WK_EXPORT bool WKPreferencesGetSubpixelAntialiasedLayerTextEnabled(WKPreferencesRef); |
60 | |
61 | // Defaults to EditableLinkNeverLive. |
62 | WK_EXPORT void WKPreferencesSetEditableLinkBehavior(WKPreferencesRef preferencesRef, WKEditableLinkBehavior); |
63 | WK_EXPORT WKEditableLinkBehavior WKPreferencesGetEditableLinkBehavior(WKPreferencesRef preferencesRef); |
64 | |
65 | // Defaults to false. |
66 | WK_EXPORT void WKPreferencesSetAcceleratedDrawingEnabled(WKPreferencesRef, bool); |
67 | WK_EXPORT bool WKPreferencesGetAcceleratedDrawingEnabled(WKPreferencesRef); |
68 | |
69 | // Defaults to true. |
70 | WK_EXPORT void WKPreferencesSetCanvasUsesAcceleratedDrawing(WKPreferencesRef, bool); |
71 | WK_EXPORT bool WKPreferencesGetCanvasUsesAcceleratedDrawing(WKPreferencesRef); |
72 | |
73 | // Defaults to true. |
74 | WK_EXPORT void WKPreferencesSetAcceleratedCompositingEnabled(WKPreferencesRef, bool); |
75 | WK_EXPORT bool WKPreferencesGetAcceleratedCompositingEnabled(WKPreferencesRef); |
76 | |
77 | // Defaults to false. |
78 | WK_EXPORT void WKPreferencesSetCompositingBordersVisible(WKPreferencesRef, bool); |
79 | WK_EXPORT bool WKPreferencesGetCompositingBordersVisible(WKPreferencesRef); |
80 | |
81 | // Defaults to false. |
82 | WK_EXPORT void WKPreferencesSetCompositingRepaintCountersVisible(WKPreferencesRef, bool); |
83 | WK_EXPORT bool WKPreferencesGetCompositingRepaintCountersVisible(WKPreferencesRef); |
84 | |
85 | // Defaults to false. |
86 | WK_EXPORT void WKPreferencesSetTiledScrollingIndicatorVisible(WKPreferencesRef, bool); |
87 | WK_EXPORT bool WKPreferencesGetTiledScrollingIndicatorVisible(WKPreferencesRef); |
88 | |
89 | // Defaults to true. |
90 | WK_EXPORT void WKPreferencesSetWebGLEnabled(WKPreferencesRef, bool); |
91 | WK_EXPORT bool WKPreferencesGetWebGLEnabled(WKPreferencesRef); |
92 | |
93 | // Defaults to false. |
94 | WK_EXPORT void WKPreferencesSetForceSoftwareWebGLRendering(WKPreferencesRef, bool); |
95 | WK_EXPORT bool WKPreferencesGetForceSoftwareWebGLRendering(WKPreferencesRef); |
96 | |
97 | // Defaults to false. |
98 | WK_EXPORT void WKPreferencesSetAccelerated2DCanvasEnabled(WKPreferencesRef, bool); |
99 | WK_EXPORT bool WKPreferencesGetAccelerated2DCanvasEnabled(WKPreferencesRef); |
100 | |
101 | // Defaults to false |
102 | WK_EXPORT void WKPreferencesSetWebAnimationsEnabled(WKPreferencesRef, bool flag); |
103 | WK_EXPORT bool WKPreferencesGetWebAnimationsEnabled(WKPreferencesRef); |
104 | |
105 | // Defaults to false |
106 | WK_EXPORT void WKPreferencesSetWebAnimationsCSSIntegrationEnabled(WKPreferencesRef, bool flag); |
107 | WK_EXPORT bool WKPreferencesGetWebAnimationsCSSIntegrationEnabled(WKPreferencesRef); |
108 | |
109 | // Defaults to false. |
110 | WK_EXPORT void WKPreferencesSetNeedsSiteSpecificQuirks(WKPreferencesRef, bool); |
111 | WK_EXPORT bool WKPreferencesGetNeedsSiteSpecificQuirks(WKPreferencesRef); |
112 | |
113 | // Defaults to false. |
114 | WK_EXPORT void WKPreferencesSetForceFTPDirectoryListings(WKPreferencesRef preferences, bool force); |
115 | WK_EXPORT bool WKPreferencesGetForceFTPDirectoryListings(WKPreferencesRef preferences); |
116 | |
117 | // Defaults to the empty string. |
118 | WK_EXPORT void WKPreferencesSetFTPDirectoryTemplatePath(WKPreferencesRef preferences, WKStringRef path); |
119 | WK_EXPORT WKStringRef WKPreferencesCopyFTPDirectoryTemplatePath(WKPreferencesRef preferences); |
120 | |
121 | // Defaults to true. |
122 | WK_EXPORT void WKPreferencesSetDOMTimersThrottlingEnabled(WKPreferencesRef preferences, bool enabled); |
123 | WK_EXPORT bool WKPreferencesGetDOMTimersThrottlingEnabled(WKPreferencesRef preferences); |
124 | |
125 | // Defaults to false. |
126 | WK_EXPORT void WKPreferencesSetWebArchiveDebugModeEnabled(WKPreferencesRef preferences, bool enabled); |
127 | WK_EXPORT bool WKPreferencesGetWebArchiveDebugModeEnabled(WKPreferencesRef preferences); |
128 | |
129 | // Defaults to false. |
130 | WK_EXPORT void WKPreferencesSetLocalFileContentSniffingEnabled(WKPreferencesRef preferences, bool enabled); |
131 | WK_EXPORT bool WKPreferencesGetLocalFileContentSniffingEnabled(WKPreferencesRef preferences); |
132 | |
133 | // Defaults to true. |
134 | WK_EXPORT void WKPreferencesSetPageCacheEnabled(WKPreferencesRef preferences, bool enabled); |
135 | WK_EXPORT bool WKPreferencesGetPageCacheEnabled(WKPreferencesRef preferences); |
136 | |
137 | // Defaults to true. |
138 | WK_EXPORT void WKPreferencesSetPageCacheSupportsPlugins(WKPreferencesRef preferences, bool pageCacheSupportsPlugins); |
139 | WK_EXPORT bool WKPreferencesGetPageCacheSupportsPlugins(WKPreferencesRef preferences); |
140 | |
141 | // Defaults to false. |
142 | WK_EXPORT void WKPreferencesSetPaginateDuringLayoutEnabled(WKPreferencesRef preferences, bool enabled); |
143 | WK_EXPORT bool WKPreferencesGetPaginateDuringLayoutEnabled(WKPreferencesRef preferences); |
144 | |
145 | // Defaults to false. |
146 | WK_EXPORT void WKPreferencesSetDOMPasteAllowed(WKPreferencesRef preferences, bool enabled); |
147 | WK_EXPORT bool WKPreferencesGetDOMPasteAllowed(WKPreferencesRef preferences); |
148 | |
149 | // Defaults to true. |
150 | WK_EXPORT void WKPreferencesSetWebSecurityEnabled(WKPreferencesRef preferences, bool enabled); |
151 | WK_EXPORT bool WKPreferencesGetWebSecurityEnabled(WKPreferencesRef preferences); |
152 | |
153 | // Defaults to false. |
154 | WK_EXPORT void WKPreferencesSetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferences, bool allowed); |
155 | WK_EXPORT bool WKPreferencesGetUniversalAccessFromFileURLsAllowed(WKPreferencesRef preferences); |
156 | |
157 | // Defaults to false. |
158 | WK_EXPORT void WKPreferencesSetFileAccessFromFileURLsAllowed(WKPreferencesRef preferences, bool allowed); |
159 | WK_EXPORT bool WKPreferencesGetFileAccessFromFileURLsAllowed(WKPreferencesRef preferences); |
160 | |
161 | // Defaults to true |
162 | WK_EXPORT void WKPreferencesSetNeedsStorageAccessFromFileURLsQuirk(WKPreferencesRef preferences, bool needsQuirk); |
163 | WK_EXPORT bool WKPreferencesGetNeedsStorageAccessFromFileURLsQuirk(WKPreferencesRef preferences); |
164 | |
165 | // Defaults to true. |
166 | WK_EXPORT void WKPreferencesSetHixie76WebSocketProtocolEnabled(WKPreferencesRef preferencesRef, bool enabled); |
167 | WK_EXPORT bool WKPreferencesGetHixie76WebSocketProtocolEnabled(WKPreferencesRef preferencesRef); |
168 | |
169 | // Defaults to false. |
170 | WK_EXPORT void WKPreferencesSetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag); |
171 | WK_EXPORT bool WKPreferencesGetMediaPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef); |
172 | |
173 | // Defaults to false. |
174 | WK_EXPORT void WKPreferencesSetVideoPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag); |
175 | WK_EXPORT bool WKPreferencesGetVideoPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef); |
176 | |
177 | // Defaults to false. |
178 | WK_EXPORT void WKPreferencesSetAudioPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef, bool flag); |
179 | WK_EXPORT bool WKPreferencesGetAudioPlaybackRequiresUserGesture(WKPreferencesRef preferencesRef); |
180 | |
181 | // Defaults to false. |
182 | WK_EXPORT void WKPreferencesSetMainContentUserGestureOverrideEnabled(WKPreferencesRef preferencesRef, bool flag); |
183 | WK_EXPORT bool WKPreferencesGetMainContentUserGestureOverrideEnabled(WKPreferencesRef preferencesRef); |
184 | |
185 | // Defaults to true. |
186 | WK_EXPORT void WKPreferencesSetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef, bool flag); |
187 | WK_EXPORT bool WKPreferencesGetMediaPlaybackAllowsInline(WKPreferencesRef preferencesRef); |
188 | |
189 | // Defaults to false. |
190 | WK_EXPORT void WKPreferencesSetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef, bool flag); |
191 | WK_EXPORT bool WKPreferencesGetInlineMediaPlaybackRequiresPlaysInlineAttribute(WKPreferencesRef preferencesRef); |
192 | |
193 | // Defaults to false. |
194 | WK_EXPORT void WKPreferencesSetBeaconAPIEnabled(WKPreferencesRef, bool flag); |
195 | WK_EXPORT bool WKPreferencesGetBeaconAPIEnabled(WKPreferencesRef); |
196 | |
197 | // Defaults to false. |
198 | WK_EXPORT void WKPreferencesSetDirectoryUploadEnabled(WKPreferencesRef, bool flag); |
199 | WK_EXPORT bool WKPreferencesGetDirectoryUploadEnabled(WKPreferencesRef); |
200 | |
201 | // Defaults to false on iOS, true elsewhere. |
202 | WK_EXPORT void WKPreferencesSetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef, bool flag); |
203 | WK_EXPORT bool WKPreferencesGetMediaControlsScaleWithPageZoom(WKPreferencesRef preferencesRef); |
204 | |
205 | // Defaults to false. |
206 | WK_EXPORT void WKPreferencesSetModernMediaControlsEnabled(WKPreferencesRef preferencesRef, bool flag); |
207 | WK_EXPORT bool WKPreferencesGetModernMediaControlsEnabled(WKPreferencesRef preferencesRef); |
208 | |
209 | // Defaults to false. |
210 | WK_EXPORT void WKPreferencesSetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef, bool flag); |
211 | WK_EXPORT bool WKPreferencesGetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef); |
212 | |
213 | // Defaults to false. |
214 | WK_EXPORT void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag); |
215 | WK_EXPORT bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef); |
216 | |
217 | // Deprecated. Always returns false. |
218 | WK_EXPORT void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef, bool enabled); |
219 | WK_EXPORT bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef); |
220 | |
221 | // Deprecated. Always returns false. |
222 | WK_EXPORT void WKPreferencesSetInspectorUsesWebKitUserInterface(WKPreferencesRef preferencesRef, bool enabled); |
223 | WK_EXPORT bool WKPreferencesGetInspectorUsesWebKitUserInterface(WKPreferencesRef preferencesRef); |
224 | |
225 | // Defaults to true. |
226 | WK_EXPORT void WKPreferencesSetJavaEnabledForLocalFiles(WKPreferencesRef preferences, bool javaEnabled); |
227 | WK_EXPORT bool WKPreferencesGetJavaEnabledForLocalFiles(WKPreferencesRef preferences); |
228 | |
229 | // Defaults to true. |
230 | WK_EXPORT void WKPreferencesSetRequestAnimationFrameEnabled(WKPreferencesRef, bool); |
231 | WK_EXPORT bool WKPreferencesGetRequestAnimationFrameEnabled(WKPreferencesRef); |
232 | |
233 | // Defaults to false |
234 | WK_EXPORT void WKPreferencesSetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled); |
235 | WK_EXPORT bool WKPreferencesGetDiagnosticLoggingEnabled(WKPreferencesRef preferencesRef); |
236 | |
237 | // Defaults to false |
238 | WK_EXPORT void WKPreferencesSetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef, bool enabled); |
239 | WK_EXPORT bool WKPreferencesGetAsynchronousPluginInitializationEnabled(WKPreferencesRef preferencesRef); |
240 | |
241 | // Defaults to false |
242 | WK_EXPORT void WKPreferencesSetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled); |
243 | WK_EXPORT bool WKPreferencesGetAsynchronousPluginInitializationEnabledForAllPlugins(WKPreferencesRef preferencesRef); |
244 | |
245 | // Defaults to false |
246 | WK_EXPORT void WKPreferencesSetPluginSandboxProfilesEnabledForAllPlugins(WKPreferencesRef preferencesRef, bool enabled); |
247 | WK_EXPORT bool WKPreferencesGetPluginSandboxProfilesEnabledForAllPlugins(WKPreferencesRef preferencesRef); |
248 | |
249 | // Defaults to false |
250 | WK_EXPORT void WKPreferencesSetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef, bool enabled); |
251 | WK_EXPORT bool WKPreferencesGetArtificialPluginInitializationDelayEnabled(WKPreferencesRef preferencesRef); |
252 | |
253 | // Defaults to false |
254 | WK_EXPORT void WKPreferencesSetTabToLinksEnabled(WKPreferencesRef preferencesRef, bool enabled); |
255 | WK_EXPORT bool WKPreferencesGetTabToLinksEnabled(WKPreferencesRef preferencesRef); |
256 | |
257 | // Defaults to true |
258 | WK_EXPORT void WKPreferencesSetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef, bool enabled); |
259 | WK_EXPORT bool WKPreferencesGetInteractiveFormValidationEnabled(WKPreferencesRef preferencesRef); |
260 | |
261 | // Defaults to false |
262 | WK_EXPORT void WKPreferencesSetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef, bool enabled); |
263 | WK_EXPORT bool WKPreferencesGetScrollingPerformanceLoggingEnabled(WKPreferencesRef preferencesRef); |
264 | |
265 | // Defaults to true |
266 | WK_EXPORT void WKPreferencesSetCookieEnabled(WKPreferencesRef preferences, bool enabled); |
267 | WK_EXPORT bool WKPreferencesGetCookieEnabled(WKPreferencesRef preferences); |
268 | |
269 | // Defaults to true on Mac, false elsewhere |
270 | WK_EXPORT void WKPreferencesSetPDFPluginEnabled(WKPreferencesRef preferences, bool enabled); |
271 | WK_EXPORT bool WKPreferencesGetPDFPluginEnabled(WKPreferencesRef preferences); |
272 | |
273 | // Defaults to false |
274 | WK_EXPORT void WKPreferencesSetAggressiveTileRetentionEnabled(WKPreferencesRef preferences, bool enabled); |
275 | WK_EXPORT bool WKPreferencesGetAggressiveTileRetentionEnabled(WKPreferencesRef preferences); |
276 | |
277 | // Defaults to false |
278 | WK_EXPORT void WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferences, bool enabled); |
279 | WK_EXPORT bool WKPreferencesGetLogsPageMessagesToSystemConsoleEnabled(WKPreferencesRef preferences); |
280 | |
281 | // Defaults to true |
282 | WK_EXPORT void WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef preferences, bool enabled); |
283 | WK_EXPORT bool WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled(WKPreferencesRef); |
284 | |
285 | // Defaults to true |
286 | WK_EXPORT void WKPreferencesSetSmartInsertDeleteEnabled(WKPreferencesRef preferences, bool enabled); |
287 | WK_EXPORT bool WKPreferencesGetSmartInsertDeleteEnabled(WKPreferencesRef preferences); |
288 | |
289 | // Defaults to false |
290 | WK_EXPORT void WKPreferencesSetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferences, bool enabled); |
291 | WK_EXPORT bool WKPreferencesGetSelectTrailingWhitespaceEnabled(WKPreferencesRef preferences); |
292 | |
293 | // Defaults to false |
294 | WK_EXPORT void WKPreferencesSetShowsURLsInToolTipsEnabled(WKPreferencesRef preferences, bool enabled); |
295 | WK_EXPORT bool WKPreferencesGetShowsURLsInToolTipsEnabled(WKPreferencesRef preferences); |
296 | |
297 | // Defaults to true on Mac, false on other platforms. |
298 | WK_EXPORT void WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferences, bool enabled); |
299 | WK_EXPORT bool WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled(WKPreferencesRef preferences); |
300 | |
301 | // Defaults to false |
302 | WK_EXPORT void WKPreferencesSetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferences, bool enabled); |
303 | WK_EXPORT bool WKPreferencesGetHiddenPageDOMTimerThrottlingAutoIncreases(WKPreferencesRef preferences); |
304 | |
305 | // Defaults to true on Mac, false on other platforms. |
306 | WK_EXPORT void WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferences, bool enabled); |
307 | WK_EXPORT bool WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled(WKPreferencesRef preferences); |
308 | |
309 | // Defaults to false |
310 | WK_EXPORT void WKPreferencesSetSnapshotAllPlugIns(WKPreferencesRef preferencesRef, bool enabled); |
311 | WK_EXPORT bool WKPreferencesGetSnapshotAllPlugIns(WKPreferencesRef preferencesRef); |
312 | |
313 | // Defaults to true |
314 | WK_EXPORT void WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef, bool enabled); |
315 | WK_EXPORT bool WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled(WKPreferencesRef preferencesRef); |
316 | |
317 | // Defaults to true |
318 | WK_EXPORT void WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef, bool enabled); |
319 | WK_EXPORT bool WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled(WKPreferencesRef preferencesRef); |
320 | |
321 | // Defaults to true |
322 | WK_EXPORT void WKPreferencesSetThreadedScrollingEnabled(WKPreferencesRef preferencesRef, bool enabled); |
323 | WK_EXPORT bool WKPreferencesGetThreadedScrollingEnabled(WKPreferencesRef preferencesRef); |
324 | |
325 | // Defaults to 5 seconds. |
326 | WK_EXPORT void WKPreferencesSetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef, double timeout); |
327 | WK_EXPORT double WKPreferencesGetIncrementalRenderingSuppressionTimeout(WKPreferencesRef preferencesRef); |
328 | |
329 | // Defaults to true. |
330 | WK_EXPORT void WKPreferencesSetSimpleLineLayoutEnabled(WKPreferencesRef, bool); |
331 | WK_EXPORT bool WKPreferencesGetSimpleLineLayoutEnabled(WKPreferencesRef); |
332 | |
333 | // Defaults to false. |
334 | WK_EXPORT void WKPreferencesSetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef, bool); |
335 | WK_EXPORT bool WKPreferencesGetSimpleLineLayoutDebugBordersEnabled(WKPreferencesRef); |
336 | |
337 | WK_EXPORT void WKPreferencesSetContentChangeObserverEnabled(WKPreferencesRef, bool); |
338 | WK_EXPORT bool WKPreferencesGetContentChangeObserverEnabled(WKPreferencesRef); |
339 | |
340 | // Defaults to false. |
341 | WK_EXPORT void WKPreferencesSetNewBlockInsideInlineModelEnabled(WKPreferencesRef, bool); |
342 | WK_EXPORT bool WKPreferencesGetNewBlockInsideInlineModelEnabled(WKPreferencesRef); |
343 | |
344 | // Defaults to false. |
345 | WK_EXPORT void WKPreferencesSetDeferredCSSParserEnabled(WKPreferencesRef, bool); |
346 | WK_EXPORT bool WKPreferencesGetDeferredCSSParserEnabled(WKPreferencesRef); |
347 | |
348 | // Defaults to false. |
349 | WK_EXPORT void WKPreferencesSetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef, bool); |
350 | WK_EXPORT bool WKPreferencesGetSubpixelCSSOMElementMetricsEnabled(WKPreferencesRef); |
351 | |
352 | // Defaults to false. |
353 | WK_EXPORT void WKPreferencesSetUseGiantTiles(WKPreferencesRef, bool); |
354 | WK_EXPORT bool WKPreferencesGetUseGiantTiles(WKPreferencesRef); |
355 | |
356 | WK_EXPORT void WKPreferencesResetTestRunnerOverrides(WKPreferencesRef preferencesRef); |
357 | |
358 | // Defaults to false. |
359 | WK_EXPORT void WKPreferencesSetUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef, bool enabled); |
360 | WK_EXPORT bool WKPreferencesUseLegacyTextAlignPositionedElementBehavior(WKPreferencesRef preferencesRef); |
361 | |
362 | // Defaults to true. |
363 | WK_EXPORT void WKPreferencesSetMediaSourceEnabled(WKPreferencesRef preferencesRef, bool enabled); |
364 | WK_EXPORT bool WKPreferencesGetMediaSourceEnabled(WKPreferencesRef preferencesRef); |
365 | |
366 | // Defaults to true; |
367 | WK_EXPORT void WKPreferencesSetSourceBufferChangeTypeEnabled(WKPreferencesRef preferencesRef, bool enabled); |
368 | WK_EXPORT bool WKPreferencesGetSourceBufferChangeTypeEnabled(WKPreferencesRef preferencesRef); |
369 | |
370 | // Default to false. |
371 | WK_EXPORT void WKPreferencesSetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef, bool enabled); |
372 | WK_EXPORT bool WKPreferencesGetViewGestureDebuggingEnabled(WKPreferencesRef preferencesRef); |
373 | |
374 | // Default to false. |
375 | WK_EXPORT void WKPreferencesSetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef, bool convert); |
376 | WK_EXPORT bool WKPreferencesGetShouldConvertPositionStyleOnCopy(WKPreferencesRef preferencesRef); |
377 | |
378 | // Default to false. |
379 | WK_EXPORT void WKPreferencesSetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef, bool enabled); |
380 | WK_EXPORT bool WKPreferencesGetTelephoneNumberParsingEnabled(WKPreferencesRef preferencesRef); |
381 | |
382 | // Default to false. |
383 | WK_EXPORT void WKPreferencesSetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef, bool enabled); |
384 | WK_EXPORT bool WKPreferencesGetEnableInheritURIQueryComponent(WKPreferencesRef preferencesRef); |
385 | |
386 | // Default to false. |
387 | WK_EXPORT void WKPreferencesSetServiceControlsEnabled(WKPreferencesRef preferencesRef, bool enabled); |
388 | WK_EXPORT bool WKPreferencesGetServiceControlsEnabled(WKPreferencesRef preferencesRef); |
389 | |
390 | // Default to false. |
391 | WK_EXPORT void WKPreferencesSetImageControlsEnabled(WKPreferencesRef preferencesRef, bool enabled); |
392 | WK_EXPORT bool WKPreferencesGetImageControlsEnabled(WKPreferencesRef preferencesRef); |
393 | |
394 | // Default to false. |
395 | WK_EXPORT void WKPreferencesSetGamepadsEnabled(WKPreferencesRef preferencesRef, bool enabled); |
396 | WK_EXPORT bool WKPreferencesGetGamepadsEnabled(WKPreferencesRef preferencesRef); |
397 | |
398 | // Not implemented, should be deleted once there are no callers. |
399 | WK_EXPORT void WKPreferencesSetLongMousePressEnabled(WKPreferencesRef preferencesRef, bool enabled); |
400 | WK_EXPORT bool WKPreferencesGetLongMousePressEnabled(WKPreferencesRef preferencesRef); |
401 | |
402 | // Defaults to 0. Setting this to 0 disables font autosizing on iOS. |
403 | WK_EXPORT void WKPreferencesSetMinimumZoomFontSize(WKPreferencesRef preferencesRef, double); |
404 | WK_EXPORT double WKPreferencesGetMinimumZoomFontSize(WKPreferencesRef preferencesRef); |
405 | |
406 | // Not implemented, should be deleted once Safari no longer uses this function. |
407 | WK_EXPORT void WKPreferencesSetAntialiasedFontDilationEnabled(WKPreferencesRef preferences, bool enabled); |
408 | WK_EXPORT bool WKPreferencesGetAntialiasedFontDilationEnabled(WKPreferencesRef preferences); |
409 | |
410 | // Defaults to 0. |
411 | WK_EXPORT void WKPreferencesSetJavaScriptRuntimeFlags(WKPreferencesRef preferences, WKJavaScriptRuntimeFlagSet javascriptRuntimeFlagSet); |
412 | WK_EXPORT WKJavaScriptRuntimeFlagSet WKPreferencesGetJavaScriptRuntimeFlags(WKPreferencesRef preferences); |
413 | |
414 | // Defaults to true. |
415 | WK_EXPORT void WKPreferencesSetMetaRefreshEnabled(WKPreferencesRef preferences, bool enabled); |
416 | WK_EXPORT bool WKPreferencesGetMetaRefreshEnabled(WKPreferencesRef preferences); |
417 | |
418 | // Defaults to true. |
419 | WK_EXPORT void WKPreferencesSetHTTPEquivEnabled(WKPreferencesRef preferences, bool enabled); |
420 | WK_EXPORT bool WKPreferencesGetHTTPEquivEnabled(WKPreferencesRef preferences); |
421 | |
422 | // Defaults to false. |
423 | WK_EXPORT void WKPreferencesSetResourceUsageOverlayVisible(WKPreferencesRef, bool); |
424 | WK_EXPORT bool WKPreferencesGetResourceUsageOverlayVisible(WKPreferencesRef); |
425 | |
426 | // Defaults to false. |
427 | WK_EXPORT void WKPreferencesSetMockCaptureDevicesEnabled(WKPreferencesRef, bool); |
428 | WK_EXPORT bool WKPreferencesGetMockCaptureDevicesEnabled(WKPreferencesRef); |
429 | |
430 | // Defaults to true. |
431 | WK_EXPORT void WKPreferencesSetICECandidateFilteringEnabled(WKPreferencesRef, bool); |
432 | WK_EXPORT bool WKPreferencesGetICECandidateFilteringEnabled(WKPreferencesRef); |
433 | |
434 | // Defaults to false. |
435 | WK_EXPORT void WKPreferencesSetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef, bool); |
436 | WK_EXPORT bool WKPreferencesGetEnumeratingAllNetworkInterfacesEnabled(WKPreferencesRef); |
437 | |
438 | // Defaults to true. |
439 | WK_EXPORT void WKPreferencesSetMediaCaptureRequiresSecureConnection(WKPreferencesRef, bool); |
440 | WK_EXPORT bool WKPreferencesGetMediaCaptureRequiresSecureConnection(WKPreferencesRef); |
441 | |
442 | // Defaults to 1 minute on iOS, 10 minutes elsewhere |
443 | WK_EXPORT void WKPreferencesSetInactiveMediaCaptureSteamRepromptIntervalInMinutes(WKPreferencesRef, double); |
444 | WK_EXPORT double WKPreferencesGetInactiveMediaCaptureSteamRepromptIntervalInMinutes(WKPreferencesRef); |
445 | |
446 | // Defaults to false |
447 | WK_EXPORT void WKPreferencesSetFetchAPIEnabled(WKPreferencesRef, bool flag); |
448 | WK_EXPORT bool WKPreferencesGetFetchAPIEnabled(WKPreferencesRef); |
449 | |
450 | // Defaults to false |
451 | WK_EXPORT void WKPreferencesSetDownloadAttributeEnabled(WKPreferencesRef, bool flag); |
452 | WK_EXPORT bool WKPreferencesGetDownloadAttributeEnabled(WKPreferencesRef); |
453 | |
454 | // Defaults to false |
455 | WK_EXPORT void WKPreferencesSetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef, bool flag); |
456 | WK_EXPORT bool WKPreferencesGetSelectionPaintingWithoutSelectionGapsEnabled(WKPreferencesRef); |
457 | |
458 | // Defaults to false. |
459 | WK_EXPORT void WKPreferencesSetAllowsPictureInPictureMediaPlayback(WKPreferencesRef, bool flag); |
460 | WK_EXPORT bool WKPreferencesGetAllowsPictureInPictureMediaPlayback(WKPreferencesRef); |
461 | |
462 | // Defaults to false. |
463 | WK_EXPORT void WKPreferencesSetAttachmentElementEnabled(WKPreferencesRef preferencesRef, bool flag); |
464 | WK_EXPORT bool WKPreferencesGetAttachmentElementEnabled(WKPreferencesRef preferencesRef); |
465 | |
466 | // Defaults to false |
467 | WK_EXPORT void WKPreferencesSetIntersectionObserverEnabled(WKPreferencesRef, bool flag); |
468 | WK_EXPORT bool WKPreferencesGetIntersectionObserverEnabled(WKPreferencesRef); |
469 | |
470 | // Defaults to false |
471 | WK_EXPORT void (WKPreferencesRef, bool flag); |
472 | WK_EXPORT bool (WKPreferencesRef); |
473 | |
474 | // Defaults to false |
475 | WK_EXPORT void WKPreferencesSetDisplayContentsEnabled(WKPreferencesRef, bool flag); |
476 | WK_EXPORT bool WKPreferencesGetDisplayContentsEnabled(WKPreferencesRef); |
477 | |
478 | // Defaults to false |
479 | WK_EXPORT void WKPreferencesSetDataTransferItemsEnabled(WKPreferencesRef, bool flag); |
480 | WK_EXPORT bool WKPreferencesGetDataTransferItemsEnabled(WKPreferencesRef); |
481 | |
482 | // Defaults to false |
483 | WK_EXPORT void WKPreferencesSetCustomPasteboardDataEnabled(WKPreferencesRef, bool flag); |
484 | WK_EXPORT bool WKPreferencesGetCustomPasteboardDataEnabled(WKPreferencesRef); |
485 | |
486 | // Defaults to false, true for iOS |
487 | WK_EXPORT void WKPreferencesSetWebShareEnabled(WKPreferencesRef, bool flag); |
488 | WK_EXPORT bool WKPreferencesGetWebShareEnabled(WKPreferencesRef); |
489 | |
490 | // Defaults to false |
491 | WK_EXPORT void WKPreferencesSetUserTimingEnabled(WKPreferencesRef, bool flag); |
492 | WK_EXPORT bool WKPreferencesGetUserTimingEnabled(WKPreferencesRef); |
493 | |
494 | // Defaults to false |
495 | WK_EXPORT void WKPreferencesSetResourceTimingEnabled(WKPreferencesRef, bool flag); |
496 | WK_EXPORT bool WKPreferencesGetResourceTimingEnabled(WKPreferencesRef); |
497 | |
498 | // Defaults to false |
499 | WK_EXPORT void WKPreferencesSetFetchAPIKeepAliveEnabled(WKPreferencesRef, bool flag); |
500 | WK_EXPORT bool WKPreferencesGetFetchAPIKeepAliveEnabled(WKPreferencesRef); |
501 | |
502 | // Defaults to true. |
503 | WK_EXPORT void WKPreferencesSetLargeImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef, bool flag); |
504 | WK_EXPORT bool WKPreferencesGetLargeImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef); |
505 | |
506 | // Defaults to true. |
507 | WK_EXPORT void WKPreferencesSetAnimatedImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef, bool flag); |
508 | WK_EXPORT bool WKPreferencesGetAnimatedImageAsyncDecodingEnabled(WKPreferencesRef preferencesRef); |
509 | |
510 | // Defaults to false |
511 | WK_EXPORT void WKPreferencesSetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef, bool flag); |
512 | WK_EXPORT bool WKPreferencesGetShouldSuppressKeyboardInputDuringProvisionalNavigation(WKPreferencesRef); |
513 | |
514 | // Defaults to false. |
515 | WK_EXPORT void WKPreferencesSetLinkPreloadEnabled(WKPreferencesRef, bool flag); |
516 | WK_EXPORT bool WKPreferencesGetLinkPreloadEnabled(WKPreferencesRef); |
517 | |
518 | // Defaults to false |
519 | WK_EXPORT void WKPreferencesSetMediaPreloadingEnabled(WKPreferencesRef, bool flag); |
520 | WK_EXPORT bool WKPreferencesGetMediaPreloadingEnabled(WKPreferencesRef); |
521 | |
522 | // Defaults to false |
523 | WK_EXPORT void WKPreferencesSetWebAuthenticationEnabled(WKPreferencesRef, bool flag); |
524 | WK_EXPORT bool WKPreferencesGetWebAuthenticationEnabled(WKPreferencesRef); |
525 | |
526 | // Defaults to false |
527 | WK_EXPORT void WKPreferencesSetWebAuthenticationLocalAuthenticatorEnabled(WKPreferencesRef, bool flag); |
528 | WK_EXPORT bool WKPreferencesGetWebAuthenticationLocalAuthenticatorEnabled(WKPreferencesRef); |
529 | |
530 | // Defaults to true. |
531 | WK_EXPORT void WKPreferencesSetInvisibleMediaAutoplayPermitted(WKPreferencesRef, bool flag); |
532 | WK_EXPORT bool WKPreferencesGetInvisibleMediaAutoplayPermitted(WKPreferencesRef); |
533 | |
534 | // Defaults to false. |
535 | WK_EXPORT void WKPreferencesSetMediaUserGestureInheritsFromDocument(WKPreferencesRef, bool flag); |
536 | WK_EXPORT bool WKPreferencesGetMediaUserGestureInheritsFromDocument(WKPreferencesRef); |
537 | |
538 | // Defaults to an empty string |
539 | WK_EXPORT void WKPreferencesSetMediaContentTypesRequiringHardwareSupport(WKPreferencesRef, WKStringRef); |
540 | WK_EXPORT WKStringRef WKPreferencesCopyMediaContentTypesRequiringHardwareSupport(WKPreferencesRef); |
541 | |
542 | // Defaults to false. |
543 | WK_EXPORT void WKPreferencesSetIsSecureContextAttributeEnabled(WKPreferencesRef, bool flag); |
544 | WK_EXPORT bool WKPreferencesGetIsSecureContextAttributeEnabled(WKPreferencesRef); |
545 | |
546 | // Defaults to false. |
547 | WK_EXPORT void WKPreferencesSetInspectorAdditionsEnabled(WKPreferencesRef, bool flag); |
548 | WK_EXPORT bool WKPreferencesGetInspectorAdditionsEnabled(WKPreferencesRef); |
549 | |
550 | // Defaults to false. |
551 | WK_EXPORT void WKPreferencesSetStorageAccessAPIEnabled(WKPreferencesRef, bool flag); |
552 | WK_EXPORT bool WKPreferencesGetStorageAccessAPIEnabled(WKPreferencesRef); |
553 | |
554 | // Defaults to false |
555 | WK_EXPORT void WKPreferencesSetAccessibilityObjectModelEnabled(WKPreferencesRef, bool flag); |
556 | WK_EXPORT bool WKPreferencesGetAccessibilityObjectModelEnabled(WKPreferencesRef); |
557 | |
558 | // Defaults to true |
559 | WK_EXPORT void WKPreferencesSetAriaReflectionEnabled(WKPreferencesRef, bool flag); |
560 | WK_EXPORT bool WKPreferencesGetAriaReflectionEnabled(WKPreferencesRef); |
561 | |
562 | // Defaults to true. |
563 | WK_EXPORT void WKPreferencesSetSyntheticEditingCommandsEnabled(WKPreferencesRef, bool); |
564 | WK_EXPORT bool WKPreferencesGetSyntheticEditingCommandsEnabled(WKPreferencesRef); |
565 | |
566 | // Defaults to false. |
567 | WK_EXPORT void WKPreferencesSetCSSOMViewScrollingAPIEnabled(WKPreferencesRef, bool); |
568 | WK_EXPORT bool WKPreferencesGetCSSOMViewScrollingAPIEnabled(WKPreferencesRef); |
569 | |
570 | // Defaults to false. |
571 | WK_EXPORT void WKPreferencesSetShouldAllowUserInstalledFonts(WKPreferencesRef, bool flag); |
572 | WK_EXPORT bool WKPreferencesGetShouldAllowUserInstalledFonts(WKPreferencesRef); |
573 | |
574 | // Defaults to false. |
575 | WK_EXPORT void WKPreferencesSetAllowCrossOriginSubresourcesToAskForCredentials(WKPreferencesRef, bool flag); |
576 | WK_EXPORT bool WKPreferencesGetAllowCrossOriginSubresourcesToAskForCredentials(WKPreferencesRef); |
577 | |
578 | // Defaults to false. |
579 | WK_EXPORT void WKPreferencesSetServerTimingEnabled(WKPreferencesRef, bool flag); |
580 | WK_EXPORT bool WKPreferencesGetServerTimingEnabled(WKPreferencesRef); |
581 | |
582 | // Defaults to false. |
583 | WK_EXPORT void WKPreferencesSetColorFilterEnabled(WKPreferencesRef, bool flag); |
584 | WK_EXPORT bool WKPreferencesGetColorFilterEnabled(WKPreferencesRef); |
585 | |
586 | // Defaults to false. |
587 | WK_EXPORT void WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode(WKPreferencesRef, bool flag); |
588 | WK_EXPORT bool WKPreferencesGetPunchOutWhiteBackgroundsInDarkMode(WKPreferencesRef); |
589 | |
590 | // Defaults to false |
591 | WK_EXPORT void WKPreferencesSetReferrerPolicyAttributeEnabled(WKPreferencesRef, bool flag); |
592 | WK_EXPORT bool WKPreferencesGetReferrerPolicyAttributeEnabled(WKPreferencesRef); |
593 | |
594 | #ifdef __cplusplus |
595 | } |
596 | #endif |
597 | |
598 | #endif /* WKPreferencesPrivate_h */ |
599 | |