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

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

Issue 8521001: Touch to Mouse conversion validation of views::GestureManager (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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 | « no previous file | ui/base/x/events_x.cc » ('j') | ui/base/x/events_x.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // Gets the radius along the X/Y axis from a native event. Default is 1.0. 96 // Gets the radius along the X/Y axis from a native event. Default is 1.0.
97 UI_EXPORT float GetTouchRadiusX(const base::NativeEvent& native_event); 97 UI_EXPORT float GetTouchRadiusX(const base::NativeEvent& native_event);
98 UI_EXPORT float GetTouchRadiusY(const base::NativeEvent& native_event); 98 UI_EXPORT float GetTouchRadiusY(const base::NativeEvent& native_event);
99 99
100 // Gets the angle of the major axis away from the X axis. Default is 0.0. 100 // Gets the angle of the major axis away from the X axis. Default is 0.0.
101 UI_EXPORT float GetTouchAngle(const base::NativeEvent& native_event); 101 UI_EXPORT float GetTouchAngle(const base::NativeEvent& native_event);
102 102
103 // Gets the force from a native_event. Normalized to be [0, 1]. Default is 0.0. 103 // Gets the force from a native_event. Normalized to be [0, 1]. Default is 0.0.
104 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event); 104 UI_EXPORT float GetTouchForce(const base::NativeEvent& native_event);
105 105
106 #if defined(USE_X11)
rjkroege 2011/11/10 16:34:40 can you move this code to your test? They do not s
Gajen 2011/11/11 13:39:07 Done.
107 // All Below methods are intended for testing touch to mouse event conversion in
108 // views_unittests.
109 // Get test XEvent with all bits set to 'x0'.
110 UI_EXPORT base::NativeEvent GetNativeEventForTesting();
111
112 // Set location of native event.
113 UI_EXPORT void SetNativeEventLocationForTesting(
114 const base::NativeEvent& native_event,
115 int x, int y);
116 #endif
117
106 } // namespace ui 118 } // namespace ui
107 119
108 #endif // UI_BASE_EVENTS_H_ 120 #endif // UI_BASE_EVENTS_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/x/events_x.cc » ('j') | ui/base/x/events_x.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698