Allow UI clients to handle vertical wheel 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 LegacyReceiver {
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, WebCore::IntSize area)
46 #endif
47
48 #if ENABLE(INPUT_TYPE_COLOR)
49     DidEndColorChooser()
50     DidChooseColor(WebCore::Color color)
51 #endif
52
53 #if ENABLE(CONTEXT_MENUS)
54     ContextMenuHidden()
55 #endif
56
57     ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity)
58     CenterSelectionInVisibleArea()
59
60     GoBack(uint64_t backForwardItemID)
61     GoForward(uint64_t backForwardItemID)
62     GoToBackForwardItem(uint64_t backForwardItemID)
63     TryRestoreScrollPosition()
64     LoadHTMLString(WTF::String htmlString, WTF::String baseURL)
65     LoadAlternateHTMLString(WTF::String htmlString, WTF::String baseURL, WTF::String unreachableURL)
66     LoadPlainTextString(WTF::String string)
67     LoadWebArchiveData(CoreIPC::DataReference webArchiveData)
68     LoadURL(WTF::String url, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
69     LoadURLRequest(WebCore::ResourceRequest request, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
70     LinkClicked(WTF::String url, WebKit::WebMouseEvent event)
71     Reload(bool reloadFromOrigin, WebKit::SandboxExtension::Handle sandboxExtensionHandle)
72     StopLoading()
73
74 #if PLATFORM(QT)
75     ApplicationSchemeReply(WebKit::QtNetworkReplyData reply)
76     RegisterApplicationScheme(WTF::String scheme)
77 #endif
78
79     StopLoadingFrame(uint64_t frameID)
80     
81     RestoreSession(WebKit::SessionState state)
82     RestoreSessionAndNavigateToCurrentItem(WebKit::SessionState state)
83
84     DidRemoveBackForwardItem(uint64_t backForwardItemID)
85     SetWillGoToBackForwardItemCallbackEnabled(bool willGoToBackForwardItemEnabled)
86
87     DidReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID)
88
89     ClearSelection()
90
91     # Callbacks.
92     GetContentsAsString(uint64_t callbackID)
93 #if ENABLE(MHTML)
94     GetContentsAsMHTMLData(uint64_t callbackID, bool useBinaryEncoding)
95 #endif
96     GetMainResourceDataOfFrame(uint64_t frameID, uint64_t callbackID)
97     GetResourceDataFromFrame(uint64_t frameID, WTF::String resourceURL, uint64_t callbackID)
98     GetRenderTreeExternalRepresentation(uint64_t callbackID)
99     GetSelectionOrContentsAsString(uint64_t callbackID)
100     GetSelectionAsWebArchiveData(uint64_t callbackID)
101     GetSourceForFrame(uint64_t frameID, uint64_t callbackID)
102     GetWebArchiveOfFrame(uint64_t frameID, uint64_t callbackID)
103     RunJavaScriptInMainFrame(WTF::String script, uint64_t callbackID)
104     ForceRepaint(uint64_t callbackID)
105
106 #if PLATFORM(MAC)
107     # Dictionary support.
108     PerformDictionaryLookupAtLocation(WebCore::FloatPoint point)
109 #endif
110
111     PreferencesDidChange(WebKit::WebPreferencesStore store)
112
113     SetUserAgent(WTF::String userAgent)
114     SetCustomTextEncodingName(WTF::String encodingName)
115
116     SuspendActiveDOMObjectsAndAnimations()
117     ResumeActiveDOMObjectsAndAnimations()
118
119 #if USE(TILED_BACKING_STORE)
120     SetViewportSize(WebCore::IntSize size)
121 #endif
122
123     Close()
124     TryClose()
125
126     ValidateCommand(WTF::String name, uint64_t callbackID)
127     ExecuteEditCommand(WTF::String name)
128
129     DidRemoveEditCommand(uint64_t commandID)
130     ReapplyEditCommand(uint64_t commandID)
131     UnapplyEditCommand(uint64_t commandID)
132
133     SetPageAndTextZoomFactors(double pageZoomFactor, double textZoomFactor)
134     SetPageZoomFactor(double zoomFactor)
135     SetTextZoomFactor(double zoomFactor)
136     WindowScreenDidChange(uint64_t displayID)
137
138     ScalePage(double scale, WebCore::IntPoint origin)
139
140     SetUseFixedLayout(bool fixed)
141     SetFixedLayoutSize(WebCore::IntSize size)
142     ListenForLayoutMilestones(uint32_t milestones)
143     SetSuppressScrollbarAnimations(bool suppressAnimations)
144
145     SetRubberBandsAtBottom(bool rubberBandsAtBottom)
146     SetRubberBandsAtTop(bool rubberBandsAtTop)
147
148     SetPaginationMode(uint32_t mode)
149     SetPaginationBehavesLikeColumns(bool behavesLikeColumns)
150     SetPageLength(double pageLength)
151     SetGapBetweenPages(double gap)
152
153     PostInjectedBundleMessage(WTF::String messageName, WebKit::WebContextUserMessageEncoder messageBody) Variadic
154
155     # Find.
156     FindString(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
157     FindStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
158     GetImageForFindMatch(uint32_t matchIndex)
159     SelectFindMatch(uint32_t matchIndex)
160     HideFindUI()
161     CountStringMatches(WTF::String string, uint32_t findOptions, unsigned maxMatchCount)
162
163     # Drag and drop.
164 #if (PLATFORM(QT) || PLATFORM(GTK)) && ENABLE(DRAG_SUPPORT)
165     PerformDragControllerAction(uint64_t action, WebCore::DragData dragData)
166 #endif
167 #if !PLATFORM(QT) && !PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
168     PerformDragControllerAction(uint64_t action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t draggingSourceOperationMask, WTF::String dragStorageName, uint32_t flags, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::SandboxExtension::HandleArray sandboxExtensionsForUpload)
169 #endif
170 #if ENABLE(DRAG_SUPPORT)
171     DragEnded(WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, uint64_t operation)
172 #endif
173
174     # Popup menu.
175     DidChangeSelectedIndexForActivePopupMenu(int32_t newIndex)
176     SetTextForActivePopupMenu(int32_t index)
177 #if PLATFORM(GTK)
178     FailedToShowPopupMenu()
179 #endif
180 #if PLATFORM(QT)
181     HidePopupMenu()
182     SelectedIndex(int32_t newIndex)
183 #endif
184     
185 #if ENABLE(CONTEXT_MENUS)
186     # Context menu.
187     DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem)
188 #endif
189
190     # Open panel.
191     DidChooseFilesForOpenPanel(Vector<WTF::String> fileURLs)
192     DidCancelForOpenPanel()
193 #if ENABLE(WEB_PROCESS_SANDBOX)
194     ExtendSandboxForFileFromOpenPanel(WebKit::SandboxExtension::Handle sandboxExtensionHandle)
195 #endif
196
197     # Spelling and grammar.
198     AdvanceToNextMisspelling(bool startBeforeSelection)
199     ChangeSpellingToWord(WTF::String word)
200 #if USE(APPKIT)
201     UppercaseWord()
202     LowercaseWord()
203     CapitalizeWord()
204
205     SetSmartInsertDeleteEnabled(bool isSmartInsertDeleteEnabled)
206 #endif
207
208 #if ENABLE(GEOLOCATION)
209     # Geolocation
210     DidReceiveGeolocationPermissionDecision(uint64_t geolocationID, bool allowed)
211 #endif
212
213     # Notification
214     DidReceiveNotificationPermissionDecision(uint64_t notificationID, bool allowed)
215
216     SetWindowResizerSize(WebCore::IntSize intersectsView)
217
218     # Printing.
219     BeginPrinting(uint64_t frameID, WebKit::PrintInfo printInfo)
220     EndPrinting()
221     ComputePagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
222 #if PLATFORM(MAC)
223     DrawRectToImage(uint64_t frameID, WebKit::PrintInfo printInfo, WebCore::IntRect rect, WebCore::IntSize imageSize, uint64_t callbackID)
224     DrawPagesToPDF(uint64_t frameID, WebKit::PrintInfo printInfo, uint32_t first, uint32_t count, uint64_t callbackID)
225 #endif
226 #if PLATFORM(GTK)
227     DrawPagesForPrinting(uint64_t frameID, WebKit::PrintInfo printInfo, uint64_t callbackID)
228 #endif
229
230     # Media
231     SetMediaVolume(float volume)
232     SetMayStartMediaWhenInWindow(bool mayStartMedia)
233
234     SetMemoryCacheMessagesEnabled(bool memoryCacheMessagesEnabled)
235
236     // FIXME: This a dummy message, to avoid breaking the build for platforms that don't require
237     // any synchronous messages, and should be removed when <rdar://problem/8775115> is fixed.
238     Dummy() -> (bool dummyReturn)
239
240     SetCanRunBeforeUnloadConfirmPanel(bool canRunBeforeUnloadConfirmPanel)
241     SetCanRunModal(bool canRunModal)
242
243 #if PLATFORM(EFL)
244     SetThemePath(WTF::String themePath)
245 #endif
246
247 #if USE(TILED_BACKING_STORE)
248     CommitPageTransitionViewport()
249 #endif
250
251 #if PLATFORM(QT) || PLATFORM(GTK)
252     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd)
253     ConfirmComposition(WTF::String text, int64_t selectionStart, int64_t selectionLength)
254     CancelComposition()
255 #endif
256
257 #if PLATFORM(MAC)
258     # Complex text input support for plug-ins.
259     SendComplexTextInputToPlugin(uint64_t pluginComplexTextInputIdentifier, String textInput)
260
261     SetWindowIsVisible(bool windowIsVisible)
262     WindowAndViewFramesChanged(WebCore::IntRect windowFrameInScreenCoordinates, WebCore::IntRect viewFrameInWindowCoordinates, WebCore::IntPoint accessibilityViewCoordinates)
263     ViewExposedRectChanged(WebCore::IntRect exposedRect)
264     SetMainFrameIsScrollable(bool isScrollable)
265     RegisterUIProcessAccessibilityTokens(CoreIPC::DataReference elemenToken, CoreIPC::DataReference windowToken)
266     GetStringSelectionForPasteboard() -> (WTF::String stringValue)
267     GetDataSelectionForPasteboard(WTF::String pasteboardType) -> (WebKit::SharedMemory::Handle handle, uint64_t size)
268     ReadSelectionFromPasteboard(WTF::String pasteboardName) -> (bool result)
269
270     # Text input.
271     SetComposition(WTF::String text, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (WebKit::EditorState newState)
272     ConfirmComposition() -> (WebKit::EditorState newState)
273     CancelComposition() -> (WebKit::EditorState newState)
274     InsertText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd) -> (bool handled, WebKit::EditorState newState)
275     GetMarkedRange() -> (uint64_t location, uint64_t length)
276     GetSelectedRange() -> (uint64_t location, uint64_t length)
277     GetAttributedSubstringFromRange(uint64_t location, uint64_t length) -> (WebKit::AttributedString result)
278     CharacterIndexForPoint(WebCore::IntPoint point) -> (uint64_t result)
279     FirstRectForCharacterRange(uint64_t location, uint64_t length) -> (WebCore::IntRect resultRect)
280     ExecuteKeypressCommands(Vector<WebCore::KeypressCommand> savedCommands) -> (bool handled, WebKit::EditorState newState)
281     ShouldDelayWindowOrderingEvent(WebKit::WebMouseEvent event) -> (bool result)
282     AcceptsFirstMouse(int eventNumber, WebKit::WebMouseEvent event) -> (bool result)
283     InsertDictatedText(WTF::String text, uint64_t replacementRangeStart, uint64_t replacementRangeEnd, WTF::Vector<WebCore::DictationAlternative> dictationAlternatives) -> (bool handled, WebKit::EditorState newState)
284 #endif
285
286     SetMinimumLayoutWidth(double minimumLayoutWidth)
287
288 #if PLATFORM(EFL)
289     ConfirmComposition(WTF::String compositionString)
290     SetComposition(WTF::String compositionString, WTF::Vector<WebCore::CompositionUnderline> underlines, uint64_t cursorPosition)
291     CancelComposition()
292 #endif
293 #if PLATFORM(QT)
294     FindZoomableAreaForPoint(WebCore::IntPoint point, WebCore::IntSize area)
295 #endif
296
297 #if PLATFORM(MAC)
298     HandleAlternativeTextUIResult(String result)
299 #endif
300
301 #if ENABLE(PAGE_VISIBILITY_API) || ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING)
302     SetVisibilityState(uint32_t visibilityState, bool isInitialState)
303 #endif
304
305 #if PLATFORM(GTK) && USE(TEXTURE_MAPPER_GL)
306     SetAcceleratedCompositingWindowId(int64_t id)
307 #endif
308
309     SetMainFrameInViewSourceMode(bool inViewSourceMode)
310 }