Text input is largely broken when there are subframes loading
[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 "PluginComplexTextInputState.h"
27 #import "WKView.h"
28 #import "WebFindOptions.h"
29 #import <wtf/Forward.h>
30 #import <wtf/Vector.h>
31
32 namespace CoreIPC {
33     class DataReference;
34 }
35
36 namespace WebCore {
37     struct KeypressCommand;
38     class Image;
39     class SharedBuffer;
40 }
41
42 namespace WebKit {
43     class DrawingAreaProxy;
44     class FindIndicator;
45     class LayerTreeContext;
46     struct ColorSpaceData;
47     struct EditorState;
48 }
49
50 @class WKFullScreenWindowController;
51
52 @interface WKView (Internal)
53 - (PassOwnPtr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy;
54 - (BOOL)_isFocused;
55 - (void)_processDidCrash;
56 - (void)_pageClosed;
57 - (void)_didRelaunchProcess;
58 - (void)_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip;
59 - (void)_setCursor:(NSCursor *)cursor;
60 - (void)_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState;
61 - (BOOL)_interpretKeyEvent:(NSEvent *)theEvent savingCommandsTo:(Vector<WebCore::KeypressCommand>&)commands;
62 - (void)_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled;
63 - (bool)_executeSavedCommandBySelector:(SEL)selector;
64 - (void)_setIntrinsicContentSize:(NSSize)intrinsicContentSize;
65 - (NSRect)_convertToDeviceSpace:(NSRect)rect;
66 - (NSRect)_convertToUserSpace:(NSRect)rect;
67 - (void)_setFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate;
68
69 - (void)_setAcceleratedCompositingModeRootLayer:(CALayer *)rootLayer;
70
71 - (void)_setAccessibilityWebProcessToken:(NSData *)data;
72
73 - (void)_pluginFocusOrWindowFocusChanged:(BOOL)pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
74 - (void)_setPluginComplexTextInputState:(WebKit::PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier;
75
76 - (void)_setPageHasCustomRepresentation:(BOOL)pageHasCustomRepresentation;
77 - (void)_didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:(const String&)suggestedFilename dataReference:(const CoreIPC::DataReference&)dataReference;
78 - (double)_customRepresentationZoomFactor;
79 - (void)_setCustomRepresentationZoomFactor:(double)zoomFactor;
80 - (void)_findStringInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count;
81 - (void)_countStringMatchesInCustomRepresentation:(NSString *)string withFindOptions:(WebKit::FindOptions)options maxMatchCount:(NSUInteger)count;
82 - (void)_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag;
83 - (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;
84 - (void)_updateSecureInputState;
85 - (void)_resetSecureInputState;
86 - (void)_notifyInputContextAboutDiscardedComposition;
87
88 - (WebKit::ColorSpaceData)_colorSpace;
89
90 #if ENABLE(FULLSCREEN_API)
91 - (BOOL)hasFullScreenWindowController;
92 - (WKFullScreenWindowController*)fullScreenWindowController;
93 - (void)closeFullScreenWindowController;
94 #endif
95
96 - (void)_cacheWindowBottomCornerRect;
97
98 - (NSInteger)spellCheckerDocumentTag;
99 - (void)handleAcceptedAlternativeText:(NSString*)text;
100
101 - (void)_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates;
102 - (BOOL)_suppressVisibilityUpdates;
103
104 - (BOOL)_isWindowOccluded;
105
106 @end