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