1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/logging.h"
6 #include "base/time/time.h"
7 #include "build/build_config.h"
8 #include "ui/events/event_utils.h"
9 #include "ui/events/keycodes/dom/dom_code.h"
10 #include "ui/gfx/geometry/point.h"
11 #include "ui/gfx/geometry/vector2d.h"
15 // Stub implementations of platform-specific methods in events_util.h, built
16 // on platforms that currently do not have a complete implementation of events.
18 void UpdateDeviceList() {
22 EventType
EventTypeFromNative(const base::NativeEvent
& native_event
) {
27 int EventFlagsFromNative(const base::NativeEvent
& native_event
) {
32 base::TimeDelta
EventTimeFromNative(const base::NativeEvent
& native_event
) {
34 return base::TimeDelta();
37 gfx::Point
EventLocationFromNative(const base::NativeEvent
& native_event
) {
42 gfx::Point
EventSystemLocationFromNative(
43 const base::NativeEvent
& native_event
) {
48 int EventButtonFromNative(const base::NativeEvent
& native_event
) {
53 int GetChangedMouseButtonFlagsFromNative(
54 const base::NativeEvent
& native_event
) {
59 gfx::Vector2d
GetMouseWheelOffset(const base::NativeEvent
& native_event
) {
61 return gfx::Vector2d();
64 base::NativeEvent
CopyNativeEvent(const base::NativeEvent
& event
) {
66 "Don't know how to copy base::NativeEvent for this platform";
70 void ReleaseCopiedNativeEvent(const base::NativeEvent
& event
) {
73 void ClearTouchIdIfReleased(const base::NativeEvent
& native_event
) {
77 int GetTouchId(const base::NativeEvent
& native_event
) {
82 float GetTouchRadiusX(const base::NativeEvent
& native_event
) {
87 float GetTouchRadiusY(const base::NativeEvent
& native_event
) {
92 float GetTouchAngle(const base::NativeEvent
& native_event
) {
97 float GetTouchForce(const base::NativeEvent
& native_event
) {
102 bool GetScrollOffsets(const base::NativeEvent
& native_event
,
105 float* x_offset_ordinal
,
106 float* y_offset_ordinal
,
112 bool GetFlingData(const base::NativeEvent
& native_event
,
122 KeyboardCode
KeyboardCodeFromNative(const base::NativeEvent
& native_event
) {
124 return static_cast<KeyboardCode
>(0);
127 DomCode
CodeFromNative(const base::NativeEvent
& native_event
) {
129 return DomCode::NONE
;
132 uint32
PlatformKeycodeFromNative(const base::NativeEvent
& native_event
) {
137 bool IsCharFromNative(const base::NativeEvent
& native_event
) {
142 uint32
WindowsKeycodeFromNative(const base::NativeEvent
& native_event
) {
147 uint16
TextFromNative(const base::NativeEvent
& native_event
) {
152 uint16
UnmodifiedTextFromNative(const base::NativeEvent
& native_event
) {