Home | History | Annotate | Download | only in c
      1 /*
      2  * Copyright (C) 2010 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 WKBundlePage_h
     27 #define WKBundlePage_h
     28 
     29 #include <WebKit2/WKBase.h>
     30 #include <WebKit2/WKEvent.h>
     31 #include <WebKit2/WKFindOptions.h>
     32 #include <WebKit2/WKImage.h>
     33 #include <WebKit2/WKPageLoadTypes.h>
     34 
     35 #ifndef __cplusplus
     36 #include <stdbool.h>
     37 #endif
     38 
     39 #include <stdint.h>
     40 
     41 #ifdef __cplusplus
     42 extern "C" {
     43 #endif
     44 
     45 enum {
     46     kWKInsertActionTyped = 0,
     47     kWKInsertActionPasted = 1,
     48     kWKInsertActionDropped = 2
     49 };
     50 typedef uint32_t WKInsertActionType;
     51 
     52 enum {
     53     kWKAffinityUpstream,
     54     kWKAffinityDownstream
     55 };
     56 typedef uint32_t WKAffinityType;
     57 
     58 enum {
     59     WKInputFieldActionTypeMoveUp,
     60     WKInputFieldActionTypeMoveDown,
     61     WKInputFieldActionTypeCancel,
     62     WKInputFieldActionTypeInsertTab,
     63     WKInputFieldActionTypeInsertBacktab,
     64     WKInputFieldActionTypeInsertNewline,
     65     WKInputFieldActionTypeInsertDelete
     66 };
     67 typedef uint32_t WKInputFieldActionType;
     68 
     69 enum {
     70     WKFullScreenNoKeyboard,
     71     WKFullScreenKeyboard,
     72 };
     73 typedef uint32_t WKFullScreenKeyboardRequestType;
     74 
     75 // Loader Client
     76 typedef void (*WKBundlePageDidStartProvisionalLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     77 typedef void (*WKBundlePageDidReceiveServerRedirectForProvisionalLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     78 typedef void (*WKBundlePageDidFailProvisionalLoadWithErrorForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef error, WKTypeRef* userData, const void *clientInfo);
     79 typedef void (*WKBundlePageDidCommitLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     80 typedef void (*WKBundlePageDidDocumentFinishLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     81 typedef void (*WKBundlePageDidFinishLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     82 typedef void (*WKBundlePageDidFinishDocumentLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     83 typedef void (*WKBundlePageDidFailLoadWithErrorForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef error, WKTypeRef* userData, const void *clientInfo);
     84 typedef void (*WKBundlePageDidSameDocumentNavigationForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKSameDocumentNavigationType type, WKTypeRef* userData, const void *clientInfo);
     85 typedef void (*WKBundlePageDidReceiveTitleForFrameCallback)(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     86 typedef void (*WKBundlePageDidFirstLayoutForFrame)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     87 typedef void (*WKBundlePageDidFirstVisuallyNonEmptyLayoutForFrame)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     88 typedef void (*WKBundlePageDidRemoveFrameFromHierarchyCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     89 typedef void (*WKBundlePageDidDisplayInsecureContentForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     90 typedef void (*WKBundlePageDidRunInsecureContentForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKTypeRef* userData, const void *clientInfo);
     91 // FIXME: There are no WKPage equivilent of these functions yet.
     92 typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleScriptWorldRef world, const void *clientInfo);
     93 typedef void (*WKBundlePageDidCancelClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
     94 typedef void (*WKBundlePageWillPerformClientRedirectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKURLRef url, double delay, double date, const void *clientInfo);
     95 typedef void (*WKBundlePageDidHandleOnloadEventsForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
     96 
     97 struct WKBundlePageLoaderClient {
     98     int                                                                 version;
     99     const void *                                                        clientInfo;
    100     WKBundlePageDidStartProvisionalLoadForFrameCallback                 didStartProvisionalLoadForFrame;
    101     WKBundlePageDidReceiveServerRedirectForProvisionalLoadForFrameCallback    didReceiveServerRedirectForProvisionalLoadForFrame;
    102     WKBundlePageDidFailProvisionalLoadWithErrorForFrameCallback         didFailProvisionalLoadWithErrorForFrame;
    103     WKBundlePageDidCommitLoadForFrameCallback                           didCommitLoadForFrame;
    104     WKBundlePageDidFinishDocumentLoadForFrameCallback                   didFinishDocumentLoadForFrame;
    105     WKBundlePageDidFinishLoadForFrameCallback                           didFinishLoadForFrame;
    106     WKBundlePageDidFailLoadWithErrorForFrameCallback                    didFailLoadWithErrorForFrame;
    107     WKBundlePageDidSameDocumentNavigationForFrameCallback               didSameDocumentNavigationForFrame;
    108     WKBundlePageDidReceiveTitleForFrameCallback                         didReceiveTitleForFrame;
    109     WKBundlePageDidFirstLayoutForFrame                                  didFirstLayoutForFrame;
    110     WKBundlePageDidFirstVisuallyNonEmptyLayoutForFrame                  didFirstVisuallyNonEmptyLayoutForFrame;
    111     WKBundlePageDidRemoveFrameFromHierarchyCallback                     didRemoveFrameFromHierarchy;
    112     WKBundlePageDidDisplayInsecureContentForFrameCallback               didDisplayInsecureContentForFrame;
    113     WKBundlePageDidRunInsecureContentForFrameCallback                   didRunInsecureContentForFrame;
    114 
    115     // FIXME: There are no WKPage equivilent of these functions yet.
    116     WKBundlePageDidClearWindowObjectForFrameCallback                    didClearWindowObjectForFrame;
    117     WKBundlePageDidCancelClientRedirectForFrameCallback                 didCancelClientRedirectForFrame;
    118     WKBundlePageWillPerformClientRedirectForFrameCallback               willPerformClientRedirectForFrame;
    119     WKBundlePageDidHandleOnloadEventsForFrameCallback                   didHandleOnloadEventsForFrame;
    120 };
    121 typedef struct WKBundlePageLoaderClient WKBundlePageLoaderClient;
    122 
    123 enum {
    124     WKBundlePagePolicyActionPassThrough,
    125     WKBundlePagePolicyActionUse
    126 };
    127 typedef uint32_t WKBundlePagePolicyAction;
    128 
    129 // Policy Client
    130 typedef WKBundlePagePolicyAction (*WKBundlePageDecidePolicyForNavigationActionCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleNavigationActionRef navigationAction, WKURLRequestRef request, WKTypeRef* userData, const void* clientInfo);
    131 typedef WKBundlePagePolicyAction (*WKBundlePageDecidePolicyForNewWindowActionCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKBundleNavigationActionRef navigationAction, WKURLRequestRef request, WKStringRef frameName, WKTypeRef* userData, const void* clientInfo);
    132 typedef WKBundlePagePolicyAction (*WKBundlePageDecidePolicyForResponseCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKURLResponseRef response, WKURLRequestRef request, WKTypeRef* userData, const void* clientInfo);
    133 typedef void (*WKBundlePageUnableToImplementPolicyCallback)(WKBundlePageRef page, WKBundleFrameRef frame, WKErrorRef error, WKTypeRef* userData, const void* clientInfo);
    134 
    135 struct WKBundlePagePolicyClient {
    136     int                                                                 version;
    137     const void *                                                        clientInfo;
    138     WKBundlePageDecidePolicyForNavigationActionCallback                 decidePolicyForNavigationAction;
    139     WKBundlePageDecidePolicyForNewWindowActionCallback                  decidePolicyForNewWindowAction;
    140     WKBundlePageDecidePolicyForResponseCallback                         decidePolicyForResponse;
    141     WKBundlePageUnableToImplementPolicyCallback                         unableToImplementPolicy;
    142 };
    143 typedef struct WKBundlePagePolicyClient WKBundlePagePolicyClient;
    144 
    145 // Resource Load Client
    146 typedef void (*WKBundlePageDidInitiateLoadForResourceCallback)(WKBundlePageRef, WKBundleFrameRef, uint64_t resourceIdentifier, WKURLRequestRef, bool pageIsProvisionallyLoading, const void* clientInfo);
    147 typedef WKURLRequestRef (*WKBundlePageWillSendRequestForFrameCallback)(WKBundlePageRef, WKBundleFrameRef, uint64_t resourceIdentifier, WKURLRequestRef, WKURLResponseRef redirectResponse, const void *clientInfo);
    148 typedef void (*WKBundlePageDidReceiveResponseForResourceCallback)(WKBundlePageRef, WKBundleFrameRef, uint64_t resourceIdentifier, WKURLResponseRef, const void* clientInfo);
    149 typedef void (*WKBundlePageDidReceiveContentLengthForResourceCallback)(WKBundlePageRef, WKBundleFrameRef, uint64_t resourceIdentifier, uint64_t contentLength, const void* clientInfo);
    150 typedef void (*WKBundlePageDidFinishLoadForResourceCallback)(WKBundlePageRef, WKBundleFrameRef, uint64_t resourceIdentifier, const void* clientInfo);
    151 typedef void (*WKBundlePageDidFailLoadForResourceCallback)(WKBundlePageRef, WKBundleFrameRef, uint64_t resourceIdentifier, WKErrorRef, const void* clientInfo);
    152 
    153 struct WKBundlePageResourceLoadClient {
    154     int                                                                 version;
    155     const void *                                                        clientInfo;
    156     WKBundlePageDidInitiateLoadForResourceCallback                      didInitiateLoadForResource;
    157 
    158     // willSendRequestForFrame is supposed to return a retained reference to the URL request.
    159     WKBundlePageWillSendRequestForFrameCallback                         willSendRequestForFrame;
    160 
    161     WKBundlePageDidReceiveResponseForResourceCallback                   didReceiveResponseForResource;
    162     WKBundlePageDidReceiveContentLengthForResourceCallback              didReceiveContentLengthForResource;
    163     WKBundlePageDidFinishLoadForResourceCallback                        didFinishLoadForResource;
    164     WKBundlePageDidFailLoadForResourceCallback                          didFailLoadForResource;
    165 };
    166 typedef struct WKBundlePageResourceLoadClient WKBundlePageResourceLoadClient;
    167 
    168 // UI Client
    169 typedef void (*WKBundlePageWillAddMessageToConsoleCallback)(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void *clientInfo);
    170 typedef void (*WKBundlePageWillSetStatusbarTextCallback)(WKBundlePageRef page, WKStringRef statusbarText, const void *clientInfo);
    171 typedef void (*WKBundlePageWillRunJavaScriptAlertCallback)(WKBundlePageRef page, WKStringRef alertText, WKBundleFrameRef frame, const void *clientInfo);
    172 typedef void (*WKBundlePageWillRunJavaScriptConfirmCallback)(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void *clientInfo);
    173 typedef void (*WKBundlePageWillRunJavaScriptPromptCallback)(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void *clientInfo);
    174 typedef void (*WKBundlePageMouseDidMoveOverElementCallback)(WKBundlePageRef page, WKBundleHitTestResultRef hitTestResult, WKEventModifiers modifiers, WKTypeRef* userData, const void *clientInfo);
    175 typedef void (*WKBundlePageDidScrollCallback)(WKBundlePageRef page, const void *clientInfo);
    176 typedef void (*WKBundlePagePaintCustomOverhangAreaCallback)(WKBundlePageRef page, WKGraphicsContextRef graphicsContext, WKRect horizontalOverhang, WKRect verticalOverhang, WKRect dirtyRect, const void* clientInfo);
    177 typedef WKStringRef (*WKBundlePageGenerateFileForUploadCallback)(WKBundlePageRef page, WKStringRef originalFilePath, const void* clientInfo);
    178 
    179 struct WKBundlePageUIClient {
    180     int                                                                 version;
    181     const void *                                                        clientInfo;
    182     WKBundlePageWillAddMessageToConsoleCallback                         willAddMessageToConsole;
    183     WKBundlePageWillSetStatusbarTextCallback                            willSetStatusbarText;
    184     WKBundlePageWillRunJavaScriptAlertCallback                          willRunJavaScriptAlert;
    185     WKBundlePageWillRunJavaScriptConfirmCallback                        willRunJavaScriptConfirm;
    186     WKBundlePageWillRunJavaScriptPromptCallback                         willRunJavaScriptPrompt;
    187     WKBundlePageMouseDidMoveOverElementCallback                         mouseDidMoveOverElement;
    188     WKBundlePageDidScrollCallback                                       pageDidScroll;
    189     WKBundlePagePaintCustomOverhangAreaCallback                         paintCustomOverhangArea;
    190     WKBundlePageGenerateFileForUploadCallback                           shouldGenerateFileForUpload;
    191     WKBundlePageGenerateFileForUploadCallback                           generateFileForUpload;
    192 };
    193 typedef struct WKBundlePageUIClient WKBundlePageUIClient;
    194 
    195 // Editor client
    196 typedef bool (*WKBundlePageShouldBeginEditingCallback)(WKBundlePageRef page, WKBundleRangeHandleRef range, const void* clientInfo);
    197 typedef bool (*WKBundlePageShouldEndEditingCallback)(WKBundlePageRef page, WKBundleRangeHandleRef range, const void* clientInfo);
    198 typedef bool (*WKBundlePageShouldInsertNodeCallback)(WKBundlePageRef page, WKBundleNodeHandleRef node, WKBundleRangeHandleRef rangeToReplace, WKInsertActionType action, const void* clientInfo);
    199 typedef bool (*WKBundlePageShouldInsertTextCallback)(WKBundlePageRef page, WKStringRef string, WKBundleRangeHandleRef rangeToReplace, WKInsertActionType action, const void* clientInfo);
    200 typedef bool (*WKBundlePageShouldDeleteRangeCallback)(WKBundlePageRef page, WKBundleRangeHandleRef range, const void* clientInfo);
    201 typedef bool (*WKBundlePageShouldChangeSelectedRange)(WKBundlePageRef page, WKBundleRangeHandleRef fromRange, WKBundleRangeHandleRef toRange, WKAffinityType affinity, bool stillSelecting, const void* clientInfo);
    202 typedef bool (*WKBundlePageShouldApplyStyle)(WKBundlePageRef page, WKBundleCSSStyleDeclarationRef style, WKBundleRangeHandleRef range, const void* clientInfo);
    203 typedef void (*WKBundlePageEditingNotification)(WKBundlePageRef page, WKStringRef notificationName, const void* clientInfo);
    204 
    205 struct WKBundlePageEditorClient {
    206     int                                                                 version;
    207     const void *                                                        clientInfo;
    208     WKBundlePageShouldBeginEditingCallback                              shouldBeginEditing;
    209     WKBundlePageShouldEndEditingCallback                                shouldEndEditing;
    210     WKBundlePageShouldInsertNodeCallback                                shouldInsertNode;
    211     WKBundlePageShouldInsertTextCallback                                shouldInsertText;
    212     WKBundlePageShouldDeleteRangeCallback                               shouldDeleteRange;
    213     WKBundlePageShouldChangeSelectedRange                               shouldChangeSelectedRange;
    214     WKBundlePageShouldApplyStyle                                        shouldApplyStyle;
    215     WKBundlePageEditingNotification                                     didBeginEditing;
    216     WKBundlePageEditingNotification                                     didEndEditing;
    217     WKBundlePageEditingNotification                                     didChange;
    218     WKBundlePageEditingNotification                                     didChangeSelection;
    219 };
    220 typedef struct WKBundlePageEditorClient WKBundlePageEditorClient;
    221 
    222 // Form client
    223 typedef void (*WKBundlePageTextFieldDidBeginEditingCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlInputElementHandle, WKBundleFrameRef frame, const void* clientInfo);
    224 typedef void (*WKBundlePageTextFieldDidEndEditingCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlInputElementHandle, WKBundleFrameRef frame, const void* clientInfo);
    225 typedef void (*WKBundlePageTextDidChangeInTextFieldCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlInputElementHandle, WKBundleFrameRef frame, const void* clientInfo);
    226 typedef void (*WKBundlePageTextDidChangeInTextAreaCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlTextAreaElementHandle, WKBundleFrameRef frame, const void* clientInfo);
    227 typedef bool (*WKBundlePageShouldPerformActionInTextFieldCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlInputElementHandle, WKInputFieldActionType actionType, WKBundleFrameRef frame, const void* clientInfo);
    228 typedef void (*WKBundlePageWillSubmitFormCallback)(WKBundlePageRef page, WKBundleNodeHandleRef htmlFormElementHandle, WKBundleFrameRef frame, WKBundleFrameRef sourceFrame, WKDictionaryRef values, WKTypeRef* userData, const void* clientInfo);
    229 
    230 struct WKBundlePageFormClient {
    231     int                                                                 version;
    232     const void *                                                        clientInfo;
    233     WKBundlePageTextFieldDidBeginEditingCallback                        textFieldDidBeginEditing;
    234     WKBundlePageTextFieldDidEndEditingCallback                          textFieldDidEndEditing;
    235     WKBundlePageTextDidChangeInTextFieldCallback                        textDidChangeInTextField;
    236     WKBundlePageTextDidChangeInTextAreaCallback                         textDidChangeInTextArea;
    237     WKBundlePageShouldPerformActionInTextFieldCallback                  shouldPerformActionInTextField;
    238     WKBundlePageWillSubmitFormCallback                                  willSubmitForm;
    239 };
    240 typedef struct WKBundlePageFormClient WKBundlePageFormClient;
    241 
    242 // ContextMenu client
    243 typedef void (*WKBundlePageGetContextMenuFromDefaultContextMenuCallback)(WKBundlePageRef page, WKBundleHitTestResultRef hitTestResult, WKArrayRef defaultMenu, WKArrayRef* newMenu, WKTypeRef* userData, const void* clientInfo);
    244 
    245 struct WKBundlePageContextMenuClient {
    246     int                                                                 version;
    247     const void *                                                        clientInfo;
    248     WKBundlePageGetContextMenuFromDefaultContextMenuCallback            getContextMenuFromDefaultMenu;
    249 };
    250 typedef struct WKBundlePageContextMenuClient WKBundlePageContextMenuClient;
    251 
    252 // Full Screen client
    253 typedef bool (*WKBundlePageSupportsFullScreen)(WKBundlePageRef page, WKFullScreenKeyboardRequestType requestType);
    254 typedef void (*WKBundlePageEnterFullScreenForElement)(WKBundlePageRef page, WKBundleNodeHandleRef element);
    255 typedef void (*WKBundlePageExitFullScreenForElement)(WKBundlePageRef page, WKBundleNodeHandleRef element);
    256 
    257 struct WKBundlePageFullScreenClient {
    258     int                                                                 version;
    259     const void *                                                        clientInfo;
    260     WKBundlePageSupportsFullScreen                                      supportsFullScreen;
    261     WKBundlePageEnterFullScreenForElement                               enterFullScreenForElement;
    262     WKBundlePageExitFullScreenForElement                                exitFullScreenForElement;
    263 };
    264 typedef struct WKBundlePageFullScreenClient WKBundlePageFullScreenClient;
    265 
    266 WK_EXPORT void WKBundlePageWillEnterFullScreen(WKBundlePageRef page);
    267 WK_EXPORT void WKBundlePageDidEnterFullScreen(WKBundlePageRef page);
    268 WK_EXPORT void WKBundlePageWillExitFullScreen(WKBundlePageRef page);
    269 WK_EXPORT void WKBundlePageDidExitFullScreen(WKBundlePageRef page);
    270 
    271 WK_EXPORT WKTypeID WKBundlePageGetTypeID();
    272 
    273 WK_EXPORT void WKBundlePageSetContextMenuClient(WKBundlePageRef page, WKBundlePageContextMenuClient* client);
    274 WK_EXPORT void WKBundlePageSetEditorClient(WKBundlePageRef page, WKBundlePageEditorClient* client);
    275 WK_EXPORT void WKBundlePageSetFormClient(WKBundlePageRef page, WKBundlePageFormClient* client);
    276 WK_EXPORT void WKBundlePageSetPageLoaderClient(WKBundlePageRef page, WKBundlePageLoaderClient* client);
    277 WK_EXPORT void WKBundlePageSetResourceLoadClient(WKBundlePageRef page, WKBundlePageResourceLoadClient* client);
    278 WK_EXPORT void WKBundlePageSetPolicyClient(WKBundlePageRef page, WKBundlePagePolicyClient* client);
    279 WK_EXPORT void WKBundlePageSetUIClient(WKBundlePageRef page, WKBundlePageUIClient* client);
    280 
    281 WK_EXPORT void WKBundlePageSetFullScreenClient(WKBundlePageRef page, WKBundlePageFullScreenClient* client);
    282 
    283 WK_EXPORT WKBundlePageGroupRef WKBundlePageGetPageGroup(WKBundlePageRef page);
    284 WK_EXPORT WKBundleFrameRef WKBundlePageGetMainFrame(WKBundlePageRef page);
    285 
    286 WK_EXPORT WKBundleBackForwardListRef WKBundlePageGetBackForwardList(WKBundlePageRef page);
    287 
    288 WK_EXPORT void WKBundlePageInstallPageOverlay(WKBundlePageRef page, WKBundlePageOverlayRef pageOverlay);
    289 WK_EXPORT void WKBundlePageUninstallPageOverlay(WKBundlePageRef page, WKBundlePageOverlayRef pageOverlay);
    290 
    291 WK_EXPORT bool WKBundlePageHasLocalDataForURL(WKBundlePageRef page, WKURLRef url);
    292 WK_EXPORT bool WKBundlePageCanHandleRequest(WKURLRequestRef request);
    293 
    294 WK_EXPORT bool WKBundlePageFindString(WKBundlePageRef page, WKStringRef target, WKFindOptions findOptions);
    295 
    296 WK_EXPORT WKImageRef WKBundlePageCreateSnapshotInViewCoordinates(WKBundlePageRef page, WKRect rect, WKImageOptions options);
    297 WK_EXPORT WKImageRef WKBundlePageCreateSnapshotInDocumentCoordinates(WKBundlePageRef page, WKRect rect, WKImageOptions options);
    298 WK_EXPORT WKImageRef WKBundlePageCreateScaledSnapshotInDocumentCoordinates(WKBundlePageRef page, WKRect rect, double scaleFactor, WKImageOptions options);
    299 
    300 #if defined(ENABLE_INSPECTOR) && ENABLE_INSPECTOR
    301 WK_EXPORT WKBundleInspectorRef WKBundlePageGetInspector(WKBundlePageRef page);
    302 #endif
    303 
    304 #ifdef __cplusplus
    305 }
    306 #endif
    307 
    308 #endif /* WKBundlePage_h */
    309