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 platforms that 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 IncrementTouchIdRefCount(const base::NativeEvent
& native_event
) {
76 void ClearTouchIdIfReleased(const base::NativeEvent
& native_event
) {
80 int GetTouchId(const base::NativeEvent
& native_event
) {
85 float GetTouchRadiusX(const base::NativeEvent
& native_event
) {
90 float GetTouchRadiusY(const base::NativeEvent
& native_event
) {
95 float GetTouchAngle(const base::NativeEvent
& native_event
) {
100 float GetTouchForce(const base::NativeEvent
& native_event
) {
105 bool GetScrollOffsets(const base::NativeEvent
& native_event
,
108 float* x_offset_ordinal
,
109 float* y_offset_ordinal
,
115 bool GetFlingData(const base::NativeEvent
& native_event
,
125 KeyboardCode
KeyboardCodeFromNative(const base::NativeEvent
& native_event
) {
127 return static_cast<KeyboardCode
>(0);
130 const char* CodeFromNative(const base::NativeEvent
& native_event
) {
135 uint32
PlatformKeycodeFromNative(const base::NativeEvent
& native_event
) {
140 bool IsCharFromNative(const base::NativeEvent
& native_event
) {
145 uint32
WindowsKeycodeFromNative(const base::NativeEvent
& native_event
) {
150 uint16
TextFromNative(const base::NativeEvent
& native_event
) {
155 uint16
UnmodifiedTextFromNative(const base::NativeEvent
& native_event
) {