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

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

Issue 750593003: Ozone X11 platform Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup leftover stuff Created 6 years 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_constants.h ('k') | ui/events/keycodes/keyboard_codes_posix.h » ('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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // this "root window" and how it maps to platform-specific drawing surfaces is 61 // this "root window" and how it maps to platform-specific drawing surfaces is
62 // defined in ui/aura/root_window.* and ui/aura/window_tree_host*. 62 // defined in ui/aura/root_window.* and ui/aura/window_tree_host*.
63 // TODO(tdresser): Return gfx::PointF here. See crbug.com/337827. 63 // TODO(tdresser): Return gfx::PointF here. See crbug.com/337827.
64 EVENTS_EXPORT gfx::Point EventLocationFromNative( 64 EVENTS_EXPORT gfx::Point EventLocationFromNative(
65 const base::NativeEvent& native_event); 65 const base::NativeEvent& native_event);
66 66
67 // Gets the location in native system coordinate space. 67 // Gets the location in native system coordinate space.
68 EVENTS_EXPORT gfx::Point EventSystemLocationFromNative( 68 EVENTS_EXPORT gfx::Point EventSystemLocationFromNative(
69 const base::NativeEvent& native_event); 69 const base::NativeEvent& native_event);
70 70
71 #if defined(USE_X11) 71 #if defined(USE_X11) || defined(USE_OZONE)
72 // Returns the 'real' button for an event. The button reported in slave events 72 // Returns the 'real' button for an event. The button reported in slave events
73 // does not take into account any remapping (e.g. using xmodmap), while the 73 // does not take into account any remapping (e.g. using xmodmap), while the
74 // button reported in master events do. This is a utility function to always 74 // button reported in master events do. This is a utility function to always
75 // return the mapped button. 75 // return the mapped button.
76 EVENTS_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event); 76 EVENTS_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event);
77 #endif 77 #endif
78 78
79 // Returns the KeyboardCode from a native event. 79 // Returns the KeyboardCode from a native event.
80 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative( 80 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative(
81 const base::NativeEvent& native_event); 81 const base::NativeEvent& native_event);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 // Update the native X11 event to correspond to the new button flags. 180 // Update the native X11 event to correspond to the new button flags.
181 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); 181 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event);
182 #endif 182 #endif
183 183
184 // Registers a custom event type. 184 // Registers a custom event type.
185 EVENTS_EXPORT int RegisterCustomEventType(); 185 EVENTS_EXPORT int RegisterCustomEventType();
186 186
187 } // namespace ui 187 } // namespace ui
188 188
189 #endif // UI_EVENTS_EVENT_UTILS_H_ 189 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/event_constants.h ('k') | ui/events/keycodes/keyboard_codes_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698