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

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: 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
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // this "root window" and how it maps to platform-specific drawing surfaces is 60 // this "root window" and how it maps to platform-specific drawing surfaces is
61 // defined in ui/aura/root_window.* and ui/aura/window_tree_host*. 61 // defined in ui/aura/root_window.* and ui/aura/window_tree_host*.
62 // TODO(tdresser): Return gfx::PointF here. See crbug.com/337827. 62 // TODO(tdresser): Return gfx::PointF here. See crbug.com/337827.
63 EVENTS_EXPORT gfx::Point EventLocationFromNative( 63 EVENTS_EXPORT gfx::Point EventLocationFromNative(
64 const base::NativeEvent& native_event); 64 const base::NativeEvent& native_event);
65 65
66 // Gets the location in native system coordinate space. 66 // Gets the location in native system coordinate space.
67 EVENTS_EXPORT gfx::Point EventSystemLocationFromNative( 67 EVENTS_EXPORT gfx::Point EventSystemLocationFromNative(
68 const base::NativeEvent& native_event); 68 const base::NativeEvent& native_event);
69 69
70 #if defined(USE_X11) 70 #if defined(USE_X11) || defined(USE_OZONE)
71 // Returns the 'real' button for an event. The button reported in slave events 71 // Returns the 'real' button for an event. The button reported in slave events
72 // does not take into account any remapping (e.g. using xmodmap), while the 72 // does not take into account any remapping (e.g. using xmodmap), while the
73 // button reported in master events do. This is a utility function to always 73 // button reported in master events do. This is a utility function to always
74 // return the mapped button. 74 // return the mapped button.
75 EVENTS_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event); 75 EVENTS_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event);
76 #endif 76 #endif
77 77
78 // Returns the KeyboardCode from a native event. 78 // Returns the KeyboardCode from a native event.
79 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative( 79 EVENTS_EXPORT KeyboardCode KeyboardCodeFromNative(
80 const base::NativeEvent& native_event); 80 const base::NativeEvent& native_event);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Update the native X11 event to correspond to the new button flags. 181 // Update the native X11 event to correspond to the new button flags.
182 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event); 182 EVENTS_EXPORT void UpdateX11EventForChangedButtonFlags(MouseEvent* event);
183 #endif 183 #endif
184 184
185 // Registers a custom event type. 185 // Registers a custom event type.
186 EVENTS_EXPORT int RegisterCustomEventType(); 186 EVENTS_EXPORT int RegisterCustomEventType();
187 187
188 } // namespace ui 188 } // namespace ui
189 189
190 #endif // UI_EVENTS_EVENT_UTILS_H_ 190 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698