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/gfx/point.h"
10 #include "ui/gfx/vector2d.h"
14 // Stub implementations of platform-specific methods in events_util.h, built
15 // on platform sthat currently do not have a complete implementation of events.
17 void UpdateDeviceList() {
21 EventType EventTypeFromNative(const base::NativeEvent& native_event) {
26 int EventFlagsFromNative(const base::NativeEvent& native_event) {
31 base::TimeDelta EventTimeFromNative(const base::NativeEvent& native_event) {
33 return base::TimeDelta();
36 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
41 gfx::Point EventSystemLocationFromNative(
42 const base::NativeEvent& native_event) {
47 int EventButtonFromNative(const base::NativeEvent& native_event) {
52 int GetChangedMouseButtonFlagsFromNative(
53 const base::NativeEvent& native_event) {
58 gfx::Vector2d GetMouseWheelOffset(const base::NativeEvent& native_event) {
60 return gfx::Vector2d();
63 base::NativeEvent CopyNativeEvent(const base::NativeEvent& event) {
65 "Don't know how to copy base::NativeEvent for this platform";
69 void ReleaseCopiedNativeEvent(const base::NativeEvent& event) {
72 void ClearTouchIdIfReleased(const base::NativeEvent& native_event) {
76 int GetTouchId(const base::NativeEvent& native_event) {
81 float GetTouchRadiusX(const base::NativeEvent& native_event) {
86 float GetTouchRadiusY(const base::NativeEvent& native_event) {
91 float GetTouchAngle(const base::NativeEvent& native_event) {
96 float GetTouchForce(const base::NativeEvent& native_event) {
101 bool GetScrollOffsets(const base::NativeEvent& native_event,
104 float* x_offset_ordinal,
105 float* y_offset_ordinal,
111 bool GetFlingData(const base::NativeEvent& native_event,
121 bool GetGestureTimes(const base::NativeEvent& native_event,
128 void SetNaturalScroll(bool enabled) {
132 bool IsNaturalScrollEnabled() {
137 bool IsTouchpadEvent(const base::NativeEvent& native_event) {
142 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
144 return static_cast<KeyboardCode>(0);
147 const char* CodeFromNative(const base::NativeEvent& native_event) {