[Qt][WK2] Build failure when using --no-touch-events
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebPage / WebPage.messages.in
1 # Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
2 #
3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions
5 # are met:
6 # 1.  Redistributions of source code must retain the above copyright
7 #     notice, this list of conditions and the following disclaimer.
8 # 2.  Redistributions in binary form must reproduce the above copyright
9 #     notice, this list of conditions and the following disclaimer in the
10 #     documentation and/or other materials provided with the distribution.
11 #
12 # THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND
13 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
14 # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
15 # DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR
16 # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
18 # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
19 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
20 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
21 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
23 messages -> WebPage {
24     SetActive(bool active)
25     SetFocused(bool focused)
26     SetInitialFocus(bool forward, bool isKeyboardEventValid, WebKit::WebKeyboardEvent event)
27     SetIsInWindow(bool isInWindow)
28
29     SetDrawsBackground(bool drawsBackground)
30     SetDrawsTransparentBackground(bool drawsTransparentBackground)
31
32     ViewWillStartLiveResize()
33     ViewWillEndLiveResize()
34
35     KeyEvent(WebKit::WebKeyboardEvent event)
36     KeyEventSyncForTesting(WebKit::WebKeyboardEvent event) -> (bool handled)
37     MouseEvent(WebKit::WebMouseEvent event)
38     MouseEventSyncForTesting(WebKit::WebMouseEvent event) -> (bool handled)
39     WheelEventSyncForTesting(WebKit::WebWheelEvent event) -> (bool handled)
40 #if ENABLE(TOUCH_EVENTS)
41     TouchEvent(WebKit::WebTouchEvent event)
42     TouchEventSyncForTesting(WebKit::WebTouchEvent event) -> (bool handled)
43 #endif
44 #if ENABLE(TOUCH_EVENTS) && PLATFORM(QT)
45     HighlightPotentialActivation(WebCore::IntPoint point)
46 #endif
47
48     ContextMenuHidden()
49
50     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
51     CenterSelectionInVisibleArea()
52
53     GoBack(uint64_t backForwardItemID)
54     GoForward(uint64_t backForwardItemID)
55     GoToBackForwardItem(uint64_t backForwardItemID)
56     TryRestoreScrollPosition()
57     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
58     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL); 
59     LoadPlainTextString(WTF::String string)
60     LoadWebArchiveData(CoreIPC::DataReference webArchiveData)
61     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
62     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
63     LinkClicked(WTF::String url, WebKit::WebMouseEvent event)
64     Reload(bool reloadFromOrigin, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
65     StopLoading()
66
67 #if PLATFORM(QT)
68     ApplicationSchemeReply(WebKit::QtNetworkReplyData reply)
69     RegisterApplicationScheme(WTF::String scheme)
70 #endif
71
72     StopLoadingFrame(uint64_t frameID)
73     
74     RestoreSession(WebKit::SessionState state)
75     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
76
77     DidRemoveBackForwardItem(uint64_t backForwardItemID)
78     SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
79
80     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
81
82     ClearSelection()
83
84     # Callbacks.
85     GetContentsAsString(uint64_t callbackID)
86     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
87     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
88     GetRenderTreeExternalRepresentation(uint64_t callbackID)
89     GetSelectionOrContentsAsString(uint64_t callbackID)
90     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
91     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
92     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
93     ForceRepaint(uint64_t callbackID)
94
95 #if PLATFORM(MAC)
96     # Dictionary support.
97     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
98 #endif
99
100     PreferencesDidChange(WebKit::WebPreferencesStore store)
101
102     SetUserAgent(WTF::String userAgent)
103     SetCustomTextEncodingName(WTF::String encodingName)
104
105     SuspendActiveDOMObjectsAndAnimations()
106     ResumeActiveDOMObjectsAndAnimations()
107
108 #if USE(TILED_BACKING_STORE)
109     SetFixedVisibleContentRect(WebCore::IntRect rect)
110     SetViewportSize(WebCore::IntSize size)
111 #endif
112
113     Close()
114     TryClose()
115
116     ValidateCommand(WTF::String name, uint64_t callbackID)
117     ExecuteEditCommand(WTF::String name)
118
119     DidRemoveEditCommand(uint64_t commandID)
120     ReapplyEditCommand(uint64_t commandID)
121     UnapplyEditCommand(uint64_t commandID)
122
123     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
124     SetPageZoomFactor(double zoomFactor)
125     SetTextZoomFactor(double zoomFactor)
126     WindowScreenDidChange(uint64_t displayID)
127
128     ScalePage(double scale, WebCore::IntPoint origin)
129
130     SetUseFixedLayout(bool fixed)
131     SetFixedLayoutSize(WebCore::IntSize size)
132
133     SetPaginationMode(uint32_t mode);
134     SetPaginationBehavesLikeColumns(bool behavesLikeColumns);
135     SetPageLength(double pageLength);
136     SetGapBetweenPages(double gap);
137
138     # Find.
139     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
140     HideFindUI()
141     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
142
143     # Drag and drop.
144 #if PLATFORM(WIN)
145     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, HashMap<UINT,Vector<String>> dataMap, uint32_t flags)
146 #endif
147 #if PLATFORM(QT) || PLATFORM(GTK)
148     PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
149 #endif
150 #if !PLATFORM(WIN) && !PLATFORM(QT) && !PLATFORM(GTK)
151     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
152 #endif
153     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
154
155     # Popup menu.
156     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex);
157     SetTextForActivePopupMenu(int32_t index);
158 #if PLATFORM(GTK)    
159     FailedToShowPopupMenu();
160 #endif    
161     
162     # Context menu.
163     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem);
164
165     # Open panel.
166     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
167     DidCancelForOpenPanel()
168 #if ENABLE(WEB_PROCESS_SANDBOX)
169     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
170 #endif
171
172     # Spelling and grammar.
173     AdvanceToNextMisspelling(bool startBeforeSelection)
174     ChangeSpellingToWord(WTF::String word)
175 #if PLATFORM(MAC)
176     UppercaseWord();
177     LowercaseWord();
178     CapitalizeWord();
179
180     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled);
181 #endif
182
183 #if ENABLE(GEOLOCATION)
184     # Geolocation
185     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
186 #endif
187
188     # Notification
189     DidReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed)
190
191     SetWindowResizerSize(WebCore::IntSize intersectsView)
192
193     # Printing.
194     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo)
195     EndPrinting();
196     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
197 #if PLATFORM(MAC) || PLATFORM(WIN)
198     DrawRectToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, WebCore::IntRect rect, uint64_t callbackID)
199     DrawPagesToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, uint64_t callbackID)
200 #endif
201 #if PLATFORM(GTK)
202     DrawPagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
203 #endif
204
205     # Media
206     SetMediaVolume(float volume)
207
208     SetMemoryCacheMessagesEnabled(bool memoryCacheMessagesEnabled)
209
210     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
211     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
212     Dummy() -> (bool dummyReturn)
213
214     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
215     SetCanRunModal(bool canRunModal)
216
217 #if PLATFORM(QT)
218     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
219     ConfirmComposition(WTF::String text, int64_t selectionStart, int64_t selectionLength)
220     CancelComposition()
221 #endif
222
223 #if PLATFORM(MAC)
224     # Complex text input support for plug-ins.
225     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
226
227     SetWindowIsVisible(bool windowIsVisible)
228     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
229     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
230     WriteSelectionToPasteboard(WTF::String pasteboardName, WTF::Vector<WTF::String> pasteboardTypes) -> (bool result)
231     ReadSelectionFromPasteboard(WTF::String pasteboardName) -> (bool result)
232
233     # Text input.
234     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::EditorState newState)
235     ConfirmComposition() -> (WebKit::EditorState newState)
236     CancelComposition() -> (WebKit::EditorState newState)
237     InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::EditorState newState)
238     GetMarkedRange() -> (uint64_t location, uint64_t length)
239     GetSelectedRange() -> (uint64_t location, uint64_t length)
240     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
241     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
242     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
243     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::EditorState newState)
244     ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result)
245     AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result)
246 #endif
247 #if PLATFORM(WIN)
248     // FIXME: Unify with Mac counterparts.
249     ConfirmComposition(WTF::String compositionString)
250     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
251     FirstRectForCharacterInSelectedRange(uint64_t characterPosition) -> (WebCore::IntRect resultRect)
252     GetSelectedText() -> (WTF::String text)
253
254     GestureWillBegin(WebCore::IntPoint point) -> (bool canBeginPanning)
255     GestureDidScroll(WebCore::IntSize size)
256     GestureDidEnd()
257 #endif
258 #if PLATFORM(QT)
259     FindZoomableAreaForPoint(WebCore::IntPoint point)
260 #endif
261
262 #if PLATFORM(MAC) && !defined(BUILDING_ON_SNOW_LEOPARD)
263     HandleCorrectionPanelResult(String result)
264 #endif
265 }