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. 4 5 #include "base/logging.h" 6 #include "base/time/time.h" 7 #include "ui/events/event_utils.h" 8 #include "ui/gfx/point.h" 9 #include "ui/gfx/vector2d.h" 10 11 namespace ui { 12 13 // Stub implementations of platform-specific methods in events_util.h, built 14 // on platform sthat currently do not have a complete implementation of events. 15 16 void UpdateDeviceList() { 17 NOTIMPLEMENTED(); 18 } 19 20 EventType EventTypeFromNative(const base::NativeEvent& native_event) { 21 NOTIMPLEMENTED(); 22 return ET_UNKNOWN; 23 } 24 25 int EventFlagsFromNative(const base::NativeEvent& native_event) { 26 NOTIMPLEMENTED(); 27 return 0; 28 } 29 30 base::TimeDelta EventTimeFromNative(const base::NativeEvent& native_event) { 31 NOTIMPLEMENTED(); 32 return base::TimeDelta(); 33 } 34 35 gfx::Point EventLocationFromNative(const base::NativeEvent& native_event) { 36 NOTIMPLEMENTED(); 37 return gfx::Point(); 38 } 39 40 gfx::Point EventSystemLocationFromNative( 41 const base::NativeEvent& native_event) { 42 NOTIMPLEMENTED(); 43 return gfx::Point(); 44 } 45 46 int EventButtonFromNative(const base::NativeEvent& native_event) { 47 NOTIMPLEMENTED(); 48 return 0; 49 } 50 51 bool IsMouseEvent(const base::NativeEvent& native_event) { 52 NOTIMPLEMENTED(); 53 return false; 54 } 55 56 int GetChangedMouseButtonFlagsFromNative( 57 const base::NativeEvent& native_event) { 58 NOTIMPLEMENTED(); 59 return 0; 60 } 61 62 gfx::Vector2d GetMouseWheelOffset(const base::NativeEvent& native_event) { 63 NOTIMPLEMENTED(); 64 return gfx::Vector2d(); 65 } 66 67 void ClearTouchIdIfReleased(const base::NativeEvent& native_event) { 68 NOTIMPLEMENTED(); 69 } 70 71 int GetTouchId(const base::NativeEvent& native_event) { 72 NOTIMPLEMENTED(); 73 return 0; 74 } 75 76 float GetTouchRadiusX(const base::NativeEvent& native_event) { 77 NOTIMPLEMENTED(); 78 return 0.f; 79 } 80 81 float GetTouchRadiusY(const base::NativeEvent& native_event) { 82 NOTIMPLEMENTED(); 83 return 0.f; 84 } 85 86 float GetTouchAngle(const base::NativeEvent& native_event) { 87 NOTIMPLEMENTED(); 88 return 0.f; 89 } 90 91 float GetTouchForce(const base::NativeEvent& native_event) { 92 NOTIMPLEMENTED(); 93 return 0.f; 94 } 95 96 bool GetScrollOffsets(const base::NativeEvent& native_event, 97 float* x_offset, 98 float* y_offset, 99 float* x_offset_ordinal, 100 float* y_offset_ordinal, 101 int* finger_count) { 102 NOTIMPLEMENTED(); 103 return false; 104 } 105 106 bool GetFlingData(const base::NativeEvent& native_event, 107 float* vx, 108 float* vy, 109 float* vx_ordinal, 110 float* vy_ordinal, 111 bool* is_cancel) { 112 NOTIMPLEMENTED(); 113 return false; 114 } 115 116 bool GetGestureTimes(const base::NativeEvent& native_event, 117 double* start_time, 118 double* end_time) { 119 NOTIMPLEMENTED(); 120 return false; 121 } 122 123 void SetNaturalScroll(bool enabled) { 124 NOTIMPLEMENTED(); 125 } 126 127 bool IsNaturalScrollEnabled() { 128 NOTIMPLEMENTED(); 129 return false; 130 } 131 132 bool IsTouchpadEvent(const base::NativeEvent& native_event) { 133 NOTIMPLEMENTED(); 134 return false; 135 } 136 137 bool IsNoopEvent(const base::NativeEvent& native_event) { 138 NOTIMPLEMENTED(); 139 return false; 140 } 141 142 base::NativeEvent CreateNoopEvent() { 143 return base::NativeEvent(); 144 } 145 146 KeyboardCode KeyboardCodeFromNative(const base::NativeEvent& native_event) { 147 NOTIMPLEMENTED(); 148 return static_cast<KeyboardCode>(0); 149 } 150 151 const char* CodeFromNative(const base::NativeEvent& native_event) { 152 NOTIMPLEMENTED(); 153 return ""; 154 } 155 156 } // namespace ui 157