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

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

Issue 405683002: ui: Remove some unnecessary functions from the API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/events/cocoa/events_mac.mm ('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/event_types.h" 8 #include "base/event_types.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/events/event_constants.h" 10 #include "ui/events/event_constants.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event, 141 EVENTS_EXPORT bool GetGestureTimes(const base::NativeEvent& native_event,
142 double* start_time, 142 double* start_time,
143 double* end_time); 143 double* end_time);
144 144
145 // Returns whether natural scrolling should be used for touchpad. 145 // Returns whether natural scrolling should be used for touchpad.
146 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll(); 146 EVENTS_EXPORT bool ShouldDefaultToNaturalScroll();
147 147
148 // Returns whether or not the internal display produces touch events. 148 // Returns whether or not the internal display produces touch events.
149 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport(); 149 EVENTS_EXPORT gfx::Display::TouchSupport GetInternalDisplayTouchSupport();
150 150
151 // Was this event generated by a touchpad device?
152 // The caller is responsible for ensuring that this is a mouse/touchpad event
153 // before calling this function.
154 EVENTS_EXPORT bool IsTouchpadEvent(const base::NativeEvent& event);
155
156 #if defined(OS_WIN) 151 #if defined(OS_WIN)
157 EVENTS_EXPORT int GetModifiersFromACCEL(const ACCEL& accel); 152 EVENTS_EXPORT int GetModifiersFromACCEL(const ACCEL& accel);
158 EVENTS_EXPORT int GetModifiersFromKeyState(); 153 EVENTS_EXPORT int GetModifiersFromKeyState();
159 154
160 // Returns true if |message| identifies a mouse event that was generated as the 155 // Returns true if |message| identifies a mouse event that was generated as the
161 // result of a touch event. 156 // result of a touch event.
162 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message); 157 EVENTS_EXPORT bool IsMouseEventFromTouch(UINT message);
163 158
164 // Converts scan code and lParam each other. The scan code 159 // Converts scan code and lParam each other. The scan code
165 // representing an extended key contains 0xE000 bits. 160 // representing an extended key contains 0xE000 bits.
166 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam); 161 EVENTS_EXPORT uint16 GetScanCodeFromLParam(LPARAM lParam);
167 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code); 162 EVENTS_EXPORT LPARAM GetLParamFromScanCode(uint16 scan_code);
168 163
169 #endif 164 #endif
170 165
171 // Registers a custom event type. 166 // Registers a custom event type.
172 EVENTS_EXPORT int RegisterCustomEventType(); 167 EVENTS_EXPORT int RegisterCustomEventType();
173 168
174 } // namespace ui 169 } // namespace ui
175 170
176 #endif // UI_EVENTS_EVENT_UTILS_H_ 171 #endif // UI_EVENTS_EVENT_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/cocoa/events_mac.mm ('k') | ui/events/events_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698