Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: ui/events/ozone/evdev/libgestures_glue/gesture_interpreter_libevdev_cros.cc

Issue 1037323002: ozone: evdev: Pass mouse wheel presence to gestures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 hwprops.screen_x_dpi = 133; 56 hwprops.screen_x_dpi = 133;
57 hwprops.screen_y_dpi = 133; 57 hwprops.screen_y_dpi = 133;
58 hwprops.orientation_minimum = props->orientation_minimum; 58 hwprops.orientation_minimum = props->orientation_minimum;
59 hwprops.orientation_maximum = props->orientation_maximum; 59 hwprops.orientation_maximum = props->orientation_maximum;
60 hwprops.max_finger_cnt = Event_Get_Slot_Count(evdev); 60 hwprops.max_finger_cnt = Event_Get_Slot_Count(evdev);
61 hwprops.max_touch_cnt = Event_Get_Touch_Count_Max(evdev); 61 hwprops.max_touch_cnt = Event_Get_Touch_Count_Max(evdev);
62 hwprops.supports_t5r2 = Event_Get_T5R2(evdev); 62 hwprops.supports_t5r2 = Event_Get_T5R2(evdev);
63 hwprops.support_semi_mt = Event_Get_Semi_MT(evdev); 63 hwprops.support_semi_mt = Event_Get_Semi_MT(evdev);
64 /* buttonpad means a physical button under the touch surface */ 64 /* buttonpad means a physical button under the touch surface */
65 hwprops.is_button_pad = Event_Get_Button_Pad(evdev); 65 hwprops.is_button_pad = Event_Get_Button_Pad(evdev);
66 hwprops.has_wheel = EvdevBitIsSet(evdev->info.rel_bitmask, REL_WHEEL) ||
67 EvdevBitIsSet(evdev->info.rel_bitmask, REL_HWHEEL);
68
66 return hwprops; 69 return hwprops;
67 } 70 }
68 71
69 // Callback from libgestures when a gesture is ready. 72 // Callback from libgestures when a gesture is ready.
70 void OnGestureReadyHelper(void* client_data, const Gesture* gesture) { 73 void OnGestureReadyHelper(void* client_data, const Gesture* gesture) {
71 GestureInterpreterLibevdevCros* interpreter = 74 GestureInterpreterLibevdevCros* interpreter =
72 static_cast<GestureInterpreterLibevdevCros*>(client_data); 75 static_cast<GestureInterpreterLibevdevCros*>(client_data);
73 interpreter->OnGestureReady(gesture); 76 interpreter->OnGestureReady(gesture);
74 } 77 }
75 78
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 483
481 void GestureInterpreterLibevdevCros::ReleaseMouseButtons(stime_t timestamp) { 484 void GestureInterpreterLibevdevCros::ReleaseMouseButtons(stime_t timestamp) {
482 DispatchMouseButton(BTN_LEFT, false /* down */, timestamp); 485 DispatchMouseButton(BTN_LEFT, false /* down */, timestamp);
483 DispatchMouseButton(BTN_MIDDLE, false /* down */, timestamp); 486 DispatchMouseButton(BTN_MIDDLE, false /* down */, timestamp);
484 DispatchMouseButton(BTN_RIGHT, false /* down */, timestamp); 487 DispatchMouseButton(BTN_RIGHT, false /* down */, timestamp);
485 DispatchMouseButton(BTN_BACK, false /* down */, timestamp); 488 DispatchMouseButton(BTN_BACK, false /* down */, timestamp);
486 DispatchMouseButton(BTN_FORWARD, false /* down */, timestamp); 489 DispatchMouseButton(BTN_FORWARD, false /* down */, timestamp);
487 } 490 }
488 491
489 } // namespace ui 492 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698