input_device_settings.h revision 558790d6acca3451cf3a6b497803a5f07d0bec58
1// Copyright (c) 2012 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#ifndef CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ 6#define CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ 7 8#include "base/callback.h" 9 10namespace chromeos { 11namespace system { 12 13// Min/max possible pointer sensitivity values. Defined in CrOS inputcontrol 14// scripts (see kTpControl/kMouseControl in the source file). 15const int kMinPointerSensitivity = 1; 16const int kMaxPointerSensitivity = 5; 17 18typedef base::Callback<void(bool)> DeviceExistsCallback; 19 20namespace touchpad_settings { 21 22// Calls |callback| asynchronously after determining if a touchpad is connected. 23void TouchpadExists(const DeviceExistsCallback& callback); 24 25// Sets the touchpad sensitivity in the range [1, 5]. 26void SetSensitivity(int value); 27 28// Turns tap to click on/off. 29void SetTapToClick(bool enabled); 30 31// Switch for three-finger click. 32void SetThreeFingerClick(bool enabled); 33 34// Turns tap-dragging on/off. 35void SetTapDragging(bool enabled); 36 37} // namespace touchpad_settings 38 39namespace mouse_settings { 40 41// Calls |callback| asynchronously after determining if a mouse is connected. 42void MouseExists(const DeviceExistsCallback& callback); 43 44// Sets the mouse sensitivity in the range [1, 5]. 45void SetSensitivity(int value); 46 47// Sets the primary mouse button to the right button if |right| is true. 48void SetPrimaryButtonRight(bool right); 49 50} // namespace mouse_settings 51 52namespace keyboard_settings { 53 54// Returns true if UI should implement enhanced keyboard support for cases where 55// other input devices like mouse are absent. 56bool ForceKeyboardDrivenUINavigation(); 57 58} // namespace keyboard_settings 59 60} // namespace system 61} // namespace chromeos 62 63#endif // CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_ 64