Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: ui/base/win/event_util.h

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Windows event code consolidation. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/aura/event_win.cc ('k') | ui/base/win/event_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « ui/aura/event_win.cc ('k') | ui/base/win/event_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698