OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ | 5 #ifndef CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ |
6 #define CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ | 6 #define CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ |
7 | 7 |
| 8 #include <windows.h> |
| 9 |
8 namespace views { | 10 namespace views { |
9 | 11 |
10 // Marks the passed |hwnd| as supporting mouse-wheel message rerouting. | 12 // Marks the passed |hwnd| as supporting mouse-wheel message rerouting. |
11 // We reroute the mouse wheel messages to such HWND when they are under the | 13 // We reroute the mouse wheel messages to such HWND when they are under the |
12 // mouse pointer (but are not the active window) | 14 // mouse pointer (but are not the active window) |
13 void SetWindowSupportsRerouteMouseWheel(HWND hwnd); | 15 void SetWindowSupportsRerouteMouseWheel(HWND hwnd); |
14 | 16 |
15 // Forwards mouse wheel messages to the window under it. | 17 // Forwards mouse wheel messages to the window under it. |
16 // Windows sends mouse wheel messages to the currently active window. | 18 // Windows sends mouse wheel messages to the currently active window. |
17 // This causes a window to scroll even if it is not currently under the mouse | 19 // This causes a window to scroll even if it is not currently under the mouse |
18 // wheel. The following code gives mouse wheel messages to the window under the | 20 // wheel. The following code gives mouse wheel messages to the window under the |
19 // mouse wheel in order to scroll that window. This is arguably a better user | 21 // mouse wheel in order to scroll that window. This is arguably a better user |
20 // experience. The returns value says whether the mouse wheel message was | 22 // experience. The returns value says whether the mouse wheel message was |
21 // successfully redirected. | 23 // successfully redirected. |
22 bool RerouteMouseWheel(HWND window, WPARAM w_param, LPARAM l_param); | 24 bool RerouteMouseWheel(HWND window, WPARAM w_param, LPARAM l_param); |
23 | 25 |
24 } // namespace views | 26 } // namespace views |
25 | 27 |
26 #endif // CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ | 28 #endif // CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_ |
OLD | NEW |