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

Side by Side Diff: ui/events/event_utils.h

Issue 1312833006: Remove ui::KeyEvent::platform_keycode_ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 UI_EVENTS_EVENT_UTILS_H_ 5 #ifndef UI_EVENTS_EVENT_UTILS_H_
6 #define UI_EVENTS_EVENT_UTILS_H_ 6 #define UI_EVENTS_EVENT_UTILS_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/event_types.h" 9 #include "base/event_types.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 #endif 78 #endif
79 79
80 // Returns the KeyboardCode from a native event. 80 // Returns the KeyboardCode from a native event.
81 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative( 81 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative(
82 const base::NativeEvent& native_event); 82 const base::NativeEvent& native_event);
83 83
84 // Returns the DOM KeyboardEvent code (physical location in the 84 // Returns the DOM KeyboardEvent code (physical location in the
85 // keyboard) from a native event. 85 // keyboard) from a native event.
86 EVENTS_EXPORT DomCode CodeFromNative(const base::NativeEvent& native_event); 86 EVENTS_EXPORT DomCode CodeFromNative(const base::NativeEvent& native_event);
87 87
88 // Returns the platform related key code (interpretation, not scan code).
89 // For X11 and xkbcommon, this is the KeySym value.
90 EVENTS_EXPORT uint32 PlatformKeycodeFromNative(
91 const base::NativeEvent& native_event);
92
93 // Returns true if the keyboard event is a character event rather than 88 // Returns true if the keyboard event is a character event rather than
94 // a keystroke event. 89 // a keystroke event.
95 EVENTS_EXPORT bool IsCharFromNative(const base::NativeEvent& native_event); 90 EVENTS_EXPORT bool IsCharFromNative(const base::NativeEvent& native_event);
96 91
97 // Returns the flags of the button that changed during a press/release. 92 // Returns the flags of the button that changed during a press/release.
98 EVENTS_EXPORT int GetChangedMouseButtonFlagsFromNative( 93 EVENTS_EXPORT int GetChangedMouseButtonFlagsFromNative(
99 const base::NativeEvent& native_event); 94 const base::NativeEvent& native_event);
100 95
101 // Gets the mouse wheel offsets from a native event. 96 // Gets the mouse wheel offsets from a native event.
102 EVENTS_EXPORT gfx::Vector2d GetMouseWheelOffset( 97 EVENTS_EXPORT gfx::Vector2d GetMouseWheelOffset(
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Update the native X11 event to correspond to the new button flags. 168 // Update the native X11 event to correspond to the new button flags.
174 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); 169 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event);
175 #endif 170 #endif
176 171
177 // Registers a custom event type. 172 // Registers a custom event type.
178 EVENTS_EXPORT int RegisterCustomEventType(); 173 EVENTS_EXPORT int RegisterCustomEventType();
179 174
180 } // namespace ui 175 } // namespace ui
181 176
182 #endif // UI_EVENTS_EVENT_UTILS_H_ 177 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698