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

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

Issue 11364062: ui: Remove TouchStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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/aura/shared/input_method_event_filter.cc ('k') | ui/base/events/event_constants.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_BASE_EVENTS_EVENT_CONSTANTS_H_ 5 #ifndef UI_BASE_EVENTS_EVENT_CONSTANTS_H_
6 #define UI_BASE_EVENTS_EVENT_CONSTANTS_H_ 6 #define UI_BASE_EVENTS_EVENT_CONSTANTS_H_
7 7
8 #include "base/event_types.h" 8 #include "base/event_types.h"
9 #include "ui/base/keycodes/keyboard_codes.h" 9 #include "ui/base/keycodes/keyboard_codes.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 // Phase of the event dispatch. 110 // Phase of the event dispatch.
111 enum EventPhase { 111 enum EventPhase {
112 EP_PREDISPATCH, 112 EP_PREDISPATCH,
113 EP_PRETARGET, 113 EP_PRETARGET,
114 EP_TARGET, 114 EP_TARGET,
115 EP_POSTTARGET, 115 EP_POSTTARGET,
116 EP_POSTDISPATCH 116 EP_POSTDISPATCH
117 }; 117 };
118 118
119 enum TouchStatus {
120 TOUCH_STATUS_UNKNOWN = 0, // Unknown touch status. This is used to indicate
121 // that the touch event was not handled.
122 TOUCH_STATUS_START, // The touch event initiated a touch sequence.
123 TOUCH_STATUS_CONTINUE, // The touch event is part of a previously
124 // started touch sequence.
125 TOUCH_STATUS_END, // The touch event ended the touch sequence.
126 TOUCH_STATUS_QUEUED, // The touch event has not been processed yet, but
127 // may be processed asynchronously later. This also
128 // places a lock on touch-events (i.e. all
129 // subsequent touch-events should be sent to the
130 // current handler).
131 TOUCH_STATUS_QUEUED_END, // Similar to TOUCH_STATUS_QUEUED, except that
132 // subsequent touch-events can be sent to any
133 // handler.
134 };
135
136 // Returns an equivalent EventResult from a TouchStatus.
137 UI_EXPORT EventResult EventResultFromTouchStatus(TouchStatus status);
138
139 // Updates the list of devices for cached properties. 119 // Updates the list of devices for cached properties.
140 UI_EXPORT void UpdateDeviceList(); 120 UI_EXPORT void UpdateDeviceList();
141 121
142 // Get the EventType from a native event. 122 // Get the EventType from a native event.
143 UI_EXPORT EventType EventTypeFromNative(const base::NativeEvent& native_event); 123 UI_EXPORT EventType EventTypeFromNative(const base::NativeEvent& native_event);
144 124
145 // Get the EventFlags from a native event. 125 // Get the EventFlags from a native event.
146 UI_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event); 126 UI_EXPORT int EventFlagsFromNative(const base::NativeEvent& native_event);
147 127
148 UI_EXPORT base::TimeDelta EventTimeFromNative( 128 UI_EXPORT base::TimeDelta EventTimeFromNative(
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 UI_EXPORT int GetModifiersFromKeyState(); 213 UI_EXPORT int GetModifiersFromKeyState();
234 214
235 // Returns true if |message| identifies a mouse event that was generated as the 215 // Returns true if |message| identifies a mouse event that was generated as the
236 // result of a touch event. 216 // result of a touch event.
237 UI_EXPORT bool IsMouseEventFromTouch(UINT message); 217 UI_EXPORT bool IsMouseEventFromTouch(UINT message);
238 #endif 218 #endif
239 219
240 } // namespace ui 220 } // namespace ui
241 221
242 #endif // UI_BASE_EVENTS_EVENT_CONSTANTS_H_ 222 #endif // UI_BASE_EVENTS_EVENT_CONSTANTS_H_
OLDNEW
« no previous file with comments | « ui/aura/shared/input_method_event_filter.cc ('k') | ui/base/events/event_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698