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