Occasional assertion failure under recommendedScrollbarStyleDidChange()
[WebKit-https.git] / Source / WebKit2 / UIProcess / API / mac / WKViewInternal.h
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 #import "WKViewPrivate.h"
27
28 #import "PluginComplexTextInputState.h"
29 #import "SameDocumentNavigationType.h"
30 #import "WebFindOptions.h"
31 #import <wtf/Forward.h>
32 #import <wtf/RetainPtr.h>
33 #import <wtf/Vector.h>
34
35 @class WKWebViewConfiguration;
36
37 namespace IPC {
38 class DataReference;
39 }
40
41 namespace WebCore {
42 class Image;
43 class SharedBuffer;
44 struct KeypressCommand;
45 }
46
47 namespace WebKit {
48 class DrawingAreaProxy;
49 class LayerTreeContext;
50 class TextIndicator;
51 class ViewSnapshot;
52 class WebContext;
53 struct ActionMenuHitTestResult;
54 struct ColorSpaceData;
55 struct EditorState;
56 struct WebPageConfiguration;
57 }
58
59 @class WKFullScreenWindowController;
60 @class WKWebView;
61 #if WK_API_ENABLED
62 @class _WKThumbnailView;
63 #endif
64
65 @interface WKView ()
66 #if WK_API_ENABLED
67 - (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView;
68 #endif
69
70 - (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy;
71 - (BOOL)_isFocused;
72 - (void)_processDidExit;
73 - (void)_pageClosed;
74 - (void)_didRelaunchProcess;
75 - (void)_preferencesDidChange;
76 - (void)_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip;
77 - (void)_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState;
78 - (void)_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled;
79 - (bool)_executeSavedCommandBySelector:(SEL)selector;
80 - (void)_setIntrinsicContentSize:(NSSize)intrinsicContentSize;
81 - (NSRect)_convertToDeviceSpace:(NSRect)rect;
82 - (NSRect)_convertToUserSpace:(NSRect)rect;
83 - (void)_setTextIndicator:(PassRefPtr<WebKit::TextIndicator>)textIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
84
85 - (void)_setAcceleratedCompositingModeRootLayer:(CALayer *)rootLayer;
86 - (CALayer *)_acceleratedCompositingModeRootLayer;
87
88 - (PassRefPtr<WebKit::ViewSnapshot>)_takeViewSnapshot;
89 - (void)_wheelEventWasNotHandledByWebCore:(NSEvent *)event;
90
91 - (void)_setAccessibilityWebProcessToken:(NSData *)data;
92
93 - (void)_pluginFocusOrWindowFocusChanged:(BOOL)pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
94 - (void)_setPluginComplexTextInputState:(WebKit::PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
95
96 - (void)_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag;
97 - (void)_setPromisedData:(WebCore::Image *)image withFileName:(NSString *)filename withExtension:(NSString *)extension withTitle:(NSString *)title withURL:(NSString *)url withVisibleURL:(NSString *)visibleUrl withArchive:(WebCore::SharedBuffer*) archiveBuffer forPasteboard:(NSString *)pasteboardName;
98 - (void)_updateSecureInputState;
99 - (void)_resetSecureInputState;
100 - (void)_notifyInputContextAboutDiscardedComposition;
101
102 - (WebKit::ColorSpaceData)_colorSpace;
103
104 - (void)_cacheWindowBottomCornerRect;
105
106 - (NSInteger)spellCheckerDocumentTag;
107 - (void)handleAcceptedAlternativeText:(NSString*)text;
108
109 - (void)_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates;
110 - (BOOL)_suppressVisibilityUpdates;
111
112 - (BOOL)_shouldIgnoreMouseEvents;
113
114 - (void)_didFirstVisuallyNonEmptyLayoutForMainFrame;
115 - (void)_didFinishLoadForMainFrame;
116 - (void)_didSameDocumentNavigationForMainFrame:(WebKit::SameDocumentNavigationType)type;
117 - (void)_removeNavigationGestureSnapshot;
118
119 #if WK_API_ENABLED
120 @property (nonatomic, setter=_setThumbnailView:) _WKThumbnailView *_thumbnailView;
121 - (void)_reparentLayerTreeInThumbnailView;
122 #endif
123
124 // FullScreen
125
126 @property (readonly) BOOL _hasFullScreenWindowController;
127 @property (readonly) WKFullScreenWindowController *_fullScreenWindowController;
128 - (void)_closeFullScreenWindowController;
129
130 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101000
131 - (void)_didPerformActionMenuHitTest:(const WebKit::ActionMenuHitTestResult&)hitTestResult userData:(API::Object*)userData;
132 #endif
133
134 - (void)_dismissActionMenuPopovers;
135
136 @property (nonatomic, retain, setter=_setPrimaryTrackingArea:) NSTrackingArea *_primaryTrackingArea;
137
138 @end