| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cr
os.h" | 5 #include "ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cr
os.h" |
| 6 | 6 |
| 7 #include <gestures/gestures.h> | 7 #include <gestures/gestures.h> |
| 8 #include <libevdev/libevdev.h> | 8 #include <libevdev/libevdev.h> |
| 9 #include <linux/input.h> | 9 #include <linux/input.h> |
| 10 | 10 |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 NOTIMPLEMENTED(); | 391 NOTIMPLEMENTED(); |
| 392 } | 392 } |
| 393 | 393 |
| 394 void GestureInterpreterLibevdevCros::OnGestureMetrics( | 394 void GestureInterpreterLibevdevCros::OnGestureMetrics( |
| 395 const Gesture* gesture, | 395 const Gesture* gesture, |
| 396 const GestureMetrics* metrics) { | 396 const GestureMetrics* metrics) { |
| 397 DVLOG(3) << base::StringPrintf("Gesture Metrics: [%f, %f] type=%d", | 397 DVLOG(3) << base::StringPrintf("Gesture Metrics: [%f, %f] type=%d", |
| 398 metrics->data[0], | 398 metrics->data[0], |
| 399 metrics->data[1], | 399 metrics->data[1], |
| 400 metrics->type); | 400 metrics->type); |
| 401 NOTIMPLEMENTED(); | 401 |
| 402 // TODO(spang): Hook up metrics. |
| 402 } | 403 } |
| 403 | 404 |
| 404 void GestureInterpreterLibevdevCros::DispatchChangedMouseButtons( | 405 void GestureInterpreterLibevdevCros::DispatchChangedMouseButtons( |
| 405 unsigned int changed_buttons, bool down, stime_t time) { | 406 unsigned int changed_buttons, bool down, stime_t time) { |
| 406 if (changed_buttons & GESTURES_BUTTON_LEFT) | 407 if (changed_buttons & GESTURES_BUTTON_LEFT) |
| 407 DispatchMouseButton(BTN_LEFT, down, time); | 408 DispatchMouseButton(BTN_LEFT, down, time); |
| 408 if (changed_buttons & GESTURES_BUTTON_MIDDLE) | 409 if (changed_buttons & GESTURES_BUTTON_MIDDLE) |
| 409 DispatchMouseButton(BTN_MIDDLE, down, time); | 410 DispatchMouseButton(BTN_MIDDLE, down, time); |
| 410 if (changed_buttons & GESTURES_BUTTON_RIGHT) | 411 if (changed_buttons & GESTURES_BUTTON_RIGHT) |
| 411 DispatchMouseButton(BTN_RIGHT, down, time); | 412 DispatchMouseButton(BTN_RIGHT, down, time); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 | 484 |
| 484 void GestureInterpreterLibevdevCros::ReleaseMouseButtons(stime_t timestamp) { | 485 void GestureInterpreterLibevdevCros::ReleaseMouseButtons(stime_t timestamp) { |
| 485 DispatchMouseButton(BTN_LEFT, false /* down */, timestamp); | 486 DispatchMouseButton(BTN_LEFT, false /* down */, timestamp); |
| 486 DispatchMouseButton(BTN_MIDDLE, false /* down */, timestamp); | 487 DispatchMouseButton(BTN_MIDDLE, false /* down */, timestamp); |
| 487 DispatchMouseButton(BTN_RIGHT, false /* down */, timestamp); | 488 DispatchMouseButton(BTN_RIGHT, false /* down */, timestamp); |
| 488 DispatchMouseButton(BTN_BACK, false /* down */, timestamp); | 489 DispatchMouseButton(BTN_BACK, false /* down */, timestamp); |
| 489 DispatchMouseButton(BTN_FORWARD, false /* down */, timestamp); | 490 DispatchMouseButton(BTN_FORWARD, false /* down */, timestamp); |
| 490 } | 491 } |
| 491 | 492 |
| 492 } // namespace ui | 493 } // namespace ui |
| OLD | NEW |