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/dom3/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 IncrementTouchIdRefCount(const base::NativeEvent
& native_event
) {
77 void ClearTouchIdIfReleased(const base::NativeEvent
& native_event
) {
81 int GetTouchId(const base::NativeEvent
& native_event
) {
86 float GetTouchRadiusX(const base::NativeEvent
& native_event
) {
91 float GetTouchRadiusY(const base::NativeEvent
& native_event
) {
96 float GetTouchAngle(const base::NativeEvent
& native_event
) {
101 float GetTouchForce(const base::NativeEvent
& native_event
) {
106 bool GetScrollOffsets(const base::NativeEvent
& native_event
,
109 float* x_offset_ordinal
,
110 float* y_offset_ordinal
,
116 bool GetFlingData(const base::NativeEvent
& native_event
,
126 KeyboardCode
KeyboardCodeFromNative(const base::NativeEvent
& native_event
) {
128 return static_cast<KeyboardCode
>(0);
131 DomCode
CodeFromNative(const base::NativeEvent
& native_event
) {
133 return DomCode::NONE
;
136 uint32
PlatformKeycodeFromNative(const base::NativeEvent
& native_event
) {
141 bool IsCharFromNative(const base::NativeEvent
& native_event
) {
146 uint32
WindowsKeycodeFromNative(const base::NativeEvent
& native_event
) {
151 uint16
TextFromNative(const base::NativeEvent
& native_event
) {
156 uint16
UnmodifiedTextFromNative(const base::NativeEvent
& native_event
) {