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

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

Issue 8953037: Aura needs event translation for Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Nico's comments #2. Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 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 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_BASE_EVENTS_H_ 5 #ifndef UI_BASE_EVENTS_H_
6 #define UI_BASE_EVENTS_H_ 6 #define UI_BASE_EVENTS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/event_types.h" 9 #include "base/event_types.h"
10 #include "ui/base/keycodes/keyboard_codes.h" 10 #include "ui/base/keycodes/keyboard_codes.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Updates the list of devices for cached properties. 74 // Updates the list of devices for cached properties.
75 UI_EXPORT void UpdateDeviceList(); 75 UI_EXPORT void UpdateDeviceList();
76 76
77 // Get the EventType from a native event. 77 // Get the EventType from a native event.
78 UI_EXPORT EventType EventTypeFromNative(const base::NativeEvent& native_event); 78 UI_EXPORT EventType EventTypeFromNative(const base::NativeEvent& native_event);
79 79
80 // Get the EventFlags from a native event. 80 // Get the EventFlags from a native event.
81 UI_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event); 81 UI_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
82 82
83 // Get the location from a native event. 83 // Get the location from a native event. The coordinate system of the resultant
84 // |Point| has the origin at top-left.
Nico 2011/12/19 23:30:28 top-left of what?
dhollowa 2011/12/20 00:05:34 Done. The "what" is platform-specific so I've pro
84 UI_EXPORT gfx::Point EventLocationFromNative( 85 UI_EXPORT gfx::Point EventLocationFromNative(
85 const base::NativeEvent& native_event); 86 const base::NativeEvent& native_event);
86 87
87 #if defined(USE_X11) 88 #if defined(USE_X11)
88 // Returns the 'real' button for an event. The button reported in slave events 89 // Returns the 'real' button for an event. The button reported in slave events
89 // does not take into account any remapping (e.g. using xmodmap), while the 90 // does not take into account any remapping (e.g. using xmodmap), while the
90 // button reported in master events do. This is a utility function to always 91 // button reported in master events do. This is a utility function to always
91 // return the mapped button. 92 // return the mapped button.
92 UI_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event); 93 UI_EXPORT int EventButtonFromNative(const base::NativeEvent& native_event);
93 #endif 94 #endif
(...skipping 26 matching lines...) Expand all
120 UI_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event, 121 UI_EXPORT bool GetScrollOffsets(const base::NativeEvent& native_event,
121 float* x_offset, 122 float* x_offset,
122 float* y_offset); 123 float* y_offset);
123 124
124 // Creates and returns no-op event. 125 // Creates and returns no-op event.
125 UI_EXPORT base::NativeEvent CreateNoopEvent(); 126 UI_EXPORT base::NativeEvent CreateNoopEvent();
126 127
127 } // namespace ui 128 } // namespace ui
128 129
129 #endif // UI_BASE_EVENTS_H_ 130 #endif // UI_BASE_EVENTS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698