summaryrefslogtreecommitdiffstats
path: root/chrome/views/focus/focus_util_win.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/views/focus/focus_util_win.h')
-rw-r--r--chrome/views/focus/focus_util_win.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/views/focus/focus_util_win.h b/chrome/views/focus/focus_util_win.h
new file mode 100644
index 0000000..b7a8625
--- /dev/null
+++ b/chrome/views/focus/focus_util_win.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_
+#define CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_
+
+namespace views {
+
+// Marks the passed |hwnd| as supporting mouse-wheel message rerouting.
+// We reroute the mouse wheel messages to such HWND when they are under the
+// mouse pointer (but are not the active window)
+void SetWindowSupportsRerouteMouseWheel(HWND hwnd);
+
+// Forwards mouse wheel messages to the window under it.
+// Windows sends mouse wheel messages to the currently active window.
+// This causes a window to scroll even if it is not currently under the mouse
+// wheel. The following code gives mouse wheel messages to the window under the
+// mouse wheel in order to scroll that window. This is arguably a better user
+// experience. The returns value says whether the mouse wheel message was
+// successfully redirected.
+bool RerouteMouseWheel(HWND window, WPARAM w_param, LPARAM l_param);
+
+} // namespace views
+
+#endif // CHROME_VIEWS_FOCUS_FOCUS_UTIL_WIN_H_