| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/base/x/device_data_manager.h" | 5 #include "ui/base/x/device_data_manager.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 |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
| 13 #include "base/message_pump_aurax11.h" | 13 #include "base/message_loop/message_pump_aurax11.h" |
| 14 #include "ui/base/events/event_constants.h" | 14 #include "ui/base/events/event_constants.h" |
| 15 #include "ui/base/events/event_utils.h" | 15 #include "ui/base/events/event_utils.h" |
| 16 #include "ui/base/x/device_list_cache_x.h" | 16 #include "ui/base/x/device_list_cache_x.h" |
| 17 #include "ui/base/x/x11_util.h" | 17 #include "ui/base/x/x11_util.h" |
| 18 | 18 |
| 19 // XIScrollClass was introduced in XI 2.1 so we need to define it here | 19 // XIScrollClass was introduced in XI 2.1 so we need to define it here |
| 20 // for backward-compatibility with older versions of XInput. | 20 // for backward-compatibility with older versions of XInput. |
| 21 #if !defined(XIScrollClass) | 21 #if !defined(XIScrollClass) |
| 22 #define XIScrollClass 3 | 22 #define XIScrollClass 3 |
| 23 #endif | 23 #endif |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 return false; | 420 return false; |
| 421 if (valuator_lookup_[deviceid][type] >= 0) { | 421 if (valuator_lookup_[deviceid][type] >= 0) { |
| 422 *min = valuator_min_[deviceid][type]; | 422 *min = valuator_min_[deviceid][type]; |
| 423 *max = valuator_max_[deviceid][type]; | 423 *max = valuator_max_[deviceid][type]; |
| 424 return true; | 424 return true; |
| 425 } | 425 } |
| 426 return false; | 426 return false; |
| 427 } | 427 } |
| 428 | 428 |
| 429 } // namespace ui | 429 } // namespace ui |
| OLD | NEW |