ui: Remove some unnecessary functions from the API.
[chromium-blink-merge.git] / ui / events / events_stub.cc
blobdbd359660e9649ece932a999602336048e6e2f30
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"
12 namespace ui {
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() {
18 NOTIMPLEMENTED();
21 EventType EventTypeFromNative(const base::NativeEvent& native_event) {
22 NOTIMPLEMENTED();
23 return ET_UNKNOWN;
26 int EventFlagsFromNative(const base::NativeEvent& native_event) {
27 NOTIMPLEMENTED();
28 return 0;
31 base::TimeDelta EventTimeFromNative(const base::NativeEvent& native_event) {
32 NOTIMPLEMENTED();
33 return base::TimeDelta();
36 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) {
37 NOTIMPLEMENTED();
38 return gfx::Point();
41 gfx::Point EventSystemLocationFromNative(
42 const base::NativeEvent& native_event) {
43 NOTIMPLEMENTED();
44 return gfx::Point();
47 int EventButtonFromNative(const base::NativeEvent& native_event) {
48 NOTIMPLEMENTED();
49 return 0;
52 int GetChangedMouseButtonFlagsFromNative(
53 const base::NativeEvent& native_event) {
54 NOTIMPLEMENTED();
55 return 0;
58 gfx::Vector2d GetMouseWheelOffset(const base::NativeEvent& native_event) {
59 NOTIMPLEMENTED();
60 return gfx::Vector2d();
63 base::NativeEvent CopyNativeEvent(const base::NativeEvent& event) {
64 NOTIMPLEMENTED() <<
65 "Don't know how to copy base::NativeEvent for this platform";
66 return NULL;
69 void ReleaseCopiedNativeEvent(const base::NativeEvent& event) {
72 void ClearTouchIdIfReleased(const base::NativeEvent& native_event) {
73 NOTIMPLEMENTED();
76 int GetTouchId(const base::NativeEvent& native_event) {
77 NOTIMPLEMENTED();
78 return 0;
81 float GetTouchRadiusX(const base::NativeEvent& native_event) {
82 NOTIMPLEMENTED();
83 return 0.f;
86 float GetTouchRadiusY(const base::NativeEvent& native_event) {
87 NOTIMPLEMENTED();
88 return 0.f;
91 float GetTouchAngle(const base::NativeEvent& native_event) {
92 NOTIMPLEMENTED();
93 return 0.f;
96 float GetTouchForce(const base::NativeEvent& native_event) {
97 NOTIMPLEMENTED();
98 return 0.f;
101 bool GetScrollOffsets(const base::NativeEvent& native_event,
102 float* x_offset,
103 float* y_offset,
104 float* x_offset_ordinal,
105 float* y_offset_ordinal,
106 int* finger_count) {
107 NOTIMPLEMENTED();
108 return false;
111 bool GetFlingData(const base::NativeEvent& native_event,
112 float* vx,
113 float* vy,
114 float* vx_ordinal,
115 float* vy_ordinal,
116 bool* is_cancel) {
117 NOTIMPLEMENTED();
118 return false;
121 bool GetGestureTimes(const base::NativeEvent& native_event,
122 double* start_time,
123 double* end_time) {
124 NOTIMPLEMENTED();
125 return false;
128 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) {
129 NOTIMPLEMENTED();
130 return static_cast<KeyboardCode>(0);
133 const char* CodeFromNative(const base::NativeEvent& native_event) {
134 NOTIMPLEMENTED();
135 return "";
138 uint32 PlatformKeycodeFromNative(const base::NativeEvent& native_event) {
139 NOTIMPLEMENTED();
140 return 0;
143 } // namespace ui