input_device_settings.h revision 7dbb3d5cf0c15f500944d211057644d6a2f37371
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
52}  // namespace system
53}  // namespace chromeos
54
55#endif  // CHROME_BROWSER_CHROMEOS_SYSTEM_INPUT_DEVICE_SETTINGS_H_
56