| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ | |
| 6 #define VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <windows.h> | |
| 10 | |
| 11 #include "views/views_export.h" | |
| 12 | |
| 13 namespace ui { | |
| 14 class ViewProp; | |
| 15 } | |
| 16 | |
| 17 namespace views { | |
| 18 | |
| 19 // Marks the passed |hwnd| as supporting mouse-wheel message rerouting. | |
| 20 // We reroute the mouse wheel messages to such HWND when they are under the | |
| 21 // mouse pointer (but are not the active window). Callers own the returned | |
| 22 // object. | |
| 23 VIEWS_EXPORT ui::ViewProp* SetWindowSupportsRerouteMouseWheel(HWND hwnd); | |
| 24 | |
| 25 // Forwards mouse wheel messages to the window under it. | |
| 26 // Windows sends mouse wheel messages to the currently active window. | |
| 27 // This causes a window to scroll even if it is not currently under the mouse | |
| 28 // wheel. The following code gives mouse wheel messages to the window under the | |
| 29 // mouse wheel in order to scroll that window. This is arguably a better user | |
| 30 // experience. The returns value says whether the mouse wheel message was | |
| 31 // successfully redirected. | |
| 32 VIEWS_EXPORT bool RerouteMouseWheel(HWND window, WPARAM w_param, | |
| 33 LPARAM l_param); | |
| 34 | |
| 35 } // namespace views | |
| 36 | |
| 37 #endif // VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ | |
| OLD | NEW |