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

Side by Side Diff: ui/events/x/device_data_manager_x11.cc

Issue 412553005: Scale touch event radius (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ui/events/x/device_data_manager_x11.h ('k') | ui/events/x/events_x.cc » ('j') | 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/x/device_data_manager_x11.h" 5 #include "ui/events/x/device_data_manager_x11.h"
6 6
7 #include <X11/extensions/XInput.h> 7 #include <X11/extensions/XInput.h>
8 #include <X11/extensions/XInput2.h> 8 #include <X11/extensions/XInput2.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 // Cros metrics gesture from touchpad 56 // Cros metrics gesture from touchpad
57 #define AXIS_LABEL_PROP_ABS_METRICS_TYPE "Abs Metrics Type" 57 #define AXIS_LABEL_PROP_ABS_METRICS_TYPE "Abs Metrics Type"
58 #define AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA1 "Abs Dbl Metrics Data 1" 58 #define AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA1 "Abs Dbl Metrics Data 1"
59 #define AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA2 "Abs Dbl Metrics Data 2" 59 #define AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA2 "Abs Dbl Metrics Data 2"
60 60
61 // Touchscreen multi-touch 61 // Touchscreen multi-touch
62 #define AXIS_LABEL_ABS_MT_TOUCH_MAJOR "Abs MT Touch Major" 62 #define AXIS_LABEL_ABS_MT_TOUCH_MAJOR "Abs MT Touch Major"
63 #define AXIS_LABEL_ABS_MT_TOUCH_MINOR "Abs MT Touch Minor" 63 #define AXIS_LABEL_ABS_MT_TOUCH_MINOR "Abs MT Touch Minor"
64 #define AXIS_LABEL_ABS_MT_ORIENTATION "Abs MT Orientation" 64 #define AXIS_LABEL_ABS_MT_ORIENTATION "Abs MT Orientation"
65 #define AXIS_LABEL_ABS_MT_PRESSURE "Abs MT Pressure" 65 #define AXIS_LABEL_ABS_MT_PRESSURE "Abs MT Pressure"
66 #define AXIS_LABEL_ABS_MT_POSITION_X "Abs MT Position X"
67 #define AXIS_LABEL_ABS_MT_POSITION_Y "Abs MT Position Y"
66 #define AXIS_LABEL_ABS_MT_TRACKING_ID "Abs MT Tracking ID" 68 #define AXIS_LABEL_ABS_MT_TRACKING_ID "Abs MT Tracking ID"
67 #define AXIS_LABEL_TOUCH_TIMESTAMP "Touch Timestamp" 69 #define AXIS_LABEL_TOUCH_TIMESTAMP "Touch Timestamp"
68 70
69 // When you add new data types, please make sure the order here is aligned 71 // When you add new data types, please make sure the order here is aligned
70 // with the order in the DataType enum in the header file because we assume 72 // with the order in the DataType enum in the header file because we assume
71 // they are in sync when updating the device list (see UpdateDeviceList). 73 // they are in sync when updating the device list (see UpdateDeviceList).
72 const char* kCachedAtoms[] = { 74 const char* kCachedAtoms[] = {
73 AXIS_LABEL_PROP_REL_HWHEEL, 75 AXIS_LABEL_PROP_REL_HWHEEL,
74 AXIS_LABEL_PROP_REL_WHEEL, 76 AXIS_LABEL_PROP_REL_WHEEL,
75 AXIS_LABEL_PROP_ABS_DBL_ORDINAL_X, 77 AXIS_LABEL_PROP_ABS_DBL_ORDINAL_X,
76 AXIS_LABEL_PROP_ABS_DBL_ORDINAL_Y, 78 AXIS_LABEL_PROP_ABS_DBL_ORDINAL_Y,
77 AXIS_LABEL_PROP_ABS_DBL_START_TIME, 79 AXIS_LABEL_PROP_ABS_DBL_START_TIME,
78 AXIS_LABEL_PROP_ABS_DBL_END_TIME, 80 AXIS_LABEL_PROP_ABS_DBL_END_TIME,
79 AXIS_LABEL_PROP_ABS_DBL_FLING_VX, 81 AXIS_LABEL_PROP_ABS_DBL_FLING_VX,
80 AXIS_LABEL_PROP_ABS_DBL_FLING_VY, 82 AXIS_LABEL_PROP_ABS_DBL_FLING_VY,
81 AXIS_LABEL_PROP_ABS_FLING_STATE, 83 AXIS_LABEL_PROP_ABS_FLING_STATE,
82 AXIS_LABEL_PROP_ABS_METRICS_TYPE, 84 AXIS_LABEL_PROP_ABS_METRICS_TYPE,
83 AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA1, 85 AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA1,
84 AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA2, 86 AXIS_LABEL_PROP_ABS_DBL_METRICS_DATA2,
85 AXIS_LABEL_PROP_ABS_FINGER_COUNT, 87 AXIS_LABEL_PROP_ABS_FINGER_COUNT,
86 AXIS_LABEL_ABS_MT_TOUCH_MAJOR, 88 AXIS_LABEL_ABS_MT_TOUCH_MAJOR,
87 AXIS_LABEL_ABS_MT_TOUCH_MINOR, 89 AXIS_LABEL_ABS_MT_TOUCH_MINOR,
88 AXIS_LABEL_ABS_MT_ORIENTATION, 90 AXIS_LABEL_ABS_MT_ORIENTATION,
89 AXIS_LABEL_ABS_MT_PRESSURE, 91 AXIS_LABEL_ABS_MT_PRESSURE,
92 AXIS_LABEL_ABS_MT_POSITION_X,
93 AXIS_LABEL_ABS_MT_POSITION_Y,
90 AXIS_LABEL_ABS_MT_TRACKING_ID, 94 AXIS_LABEL_ABS_MT_TRACKING_ID,
91 AXIS_LABEL_TOUCH_TIMESTAMP, 95 AXIS_LABEL_TOUCH_TIMESTAMP,
92 96
93 NULL 97 NULL
94 }; 98 };
95 99
96 // Constants for checking if a data type lies in the range of CMT/Touch data 100 // Constants for checking if a data type lies in the range of CMT/Touch data
97 // types. 101 // types.
98 const int kCMTDataTypeStart = ui::DeviceDataManagerX11::DT_CMT_SCROLL_X; 102 const int kCMTDataTypeStart = ui::DeviceDataManagerX11::DT_CMT_SCROLL_X;
99 const int kCMTDataTypeEnd = ui::DeviceDataManagerX11::DT_CMT_FINGER_COUNT; 103 const int kCMTDataTypeEnd = ui::DeviceDataManagerX11::DT_CMT_FINGER_COUNT;
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 case GenericEvent: 707 case GenericEvent:
704 return blocked_devices_.test( 708 return blocked_devices_.test(
705 static_cast<XIDeviceEvent*>(native_event->xcookie.data)->sourceid); 709 static_cast<XIDeviceEvent*>(native_event->xcookie.data)->sourceid);
706 default: 710 default:
707 break; 711 break;
708 } 712 }
709 return false; 713 return false;
710 } 714 }
711 715
712 } // namespace ui 716 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/x/device_data_manager_x11.h ('k') | ui/events/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698