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 UI_BASE_WIN_EVENT_UTIL_H_ | |
Ben Goodger (Google)
2011/09/19 23:49:20
This looks very similar to the Gtk/X stuff.
How a
| |
6 #define UI_BASE_WIN_EVENT_UTIL_H_ | |
7 #pragma once | |
8 | |
9 #include <windows.h> | |
10 | |
11 #include "ui/base/events.h" | |
12 #include "ui/base/ui_export.h" | |
13 | |
14 // Windows-specific Event utilities. | |
15 // Add functionality here rather than adding #ifdefs to event.h | |
16 | |
17 namespace gfx { | |
18 class Point; | |
19 } | |
20 | |
21 namespace ui { | |
22 | |
23 // Get the ui::EventType from a native Windows message. | |
24 UI_EXPORT EventType EventTypeFromNative(const MSG& native_event); | |
25 | |
26 // Get the ui::EventFlags from a native Windows message. | |
27 UI_EXPORT int EventFlagsFromNative(const MSG& native_event); | |
28 | |
29 // Get the native event's location; localizes non-client mouse event locations. | |
30 UI_EXPORT gfx::Point EventLocationFromNative(const MSG& native_event); | |
31 | |
32 // Returns true if the affected key is a Windows extended key. See documentation | |
33 // for WM_KEYDOWN for explanation. | |
34 UI_EXPORT bool IsExtendedKey(const MSG& native_event); | |
35 | |
36 // Returns true if the message is a mouse event. | |
37 UI_EXPORT bool IsMouseEvent(const MSG& native_event); | |
38 | |
39 // Get the mouse wheel offset. | |
40 UI_EXPORT int GetMouseWheelOffset(const MSG& native_event); | |
41 | |
42 } // namespace ui | |
43 | |
44 #endif // UI_BASE_WIN_EVENT_UTIL_H_ | |
OLD | NEW |