1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_BASE_WIN_MOUSE_WHEEL_UTIL_H_
6 #define UI_BASE_WIN_MOUSE_WHEEL_UTIL_H_
10 #include "ui/base/ui_base_export.h"
16 // Marks the passed |hwnd| as supporting mouse-wheel message rerouting.
17 // We reroute the mouse wheel messages to such HWND when they are under the
18 // mouse pointer (but are not the active window). Callers own the returned
20 UI_BASE_EXPORT ViewProp
* SetWindowSupportsRerouteMouseWheel(HWND hwnd
);
22 // Forwards mouse wheel messages to the window under it.
23 // Windows sends mouse wheel messages to the currently active window.
24 // This causes a window to scroll even if it is not currently under the mouse
25 // wheel. The following code gives mouse wheel messages to the window under the
26 // mouse wheel in order to scroll that window. This is arguably a better user
27 // experience. The returns value says whether the mouse wheel message was
28 // successfully redirected.
29 UI_BASE_EXPORT
bool RerouteMouseWheel(HWND window
,
35 #endif // UI_BASE_WIN_MOUSE_WHEEL_UTIL_H_