OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 virtual std::string GetCurrentKeyboardLayoutName() const = 0; | 25 virtual std::string GetCurrentKeyboardLayoutName() const = 0; |
26 | 26 |
27 // Sets the current keyboard layout to |layout_name|. Returns true on | 27 // Sets the current keyboard layout to |layout_name|. Returns true on |
28 // success. | 28 // success. |
29 virtual bool SetCurrentKeyboardLayoutByName( | 29 virtual bool SetCurrentKeyboardLayoutByName( |
30 const std::string& layout_name) = 0; | 30 const std::string& layout_name) = 0; |
31 | 31 |
32 // Remaps modifier keys. Returns true on success. | 32 // Remaps modifier keys. Returns true on success. |
33 virtual bool RemapModifierKeys(const ModifierMap& modifier_map) = 0; | 33 virtual bool RemapModifierKeys(const ModifierMap& modifier_map) = 0; |
34 | 34 |
35 // Gets whehter we have separate keyboard layout per window, or not. The | |
36 // result is stored in |is_per_window|. Returns true on success. | |
37 virtual bool GetKeyboardLayoutPerWindow(bool* is_per_window) const = 0; | |
38 | |
39 // Sets whether we have separate keyboard layout per window, or not. If false | |
40 // is given, the same keyboard layout will be shared for all applications. | |
41 // Returns true on success. | |
42 virtual bool SetKeyboardLayoutPerWindow(bool is_per_window) = 0; | |
43 | |
44 // Gets the current auto-repeat mode of the keyboard. The result is stored in | 35 // Gets the current auto-repeat mode of the keyboard. The result is stored in |
45 // |enabled|. Returns true on success. | 36 // |enabled|. Returns true on success. |
46 virtual bool GetAutoRepeatEnabled(bool* enabled) const = 0; | 37 virtual bool GetAutoRepeatEnabled(bool* enabled) const = 0; |
47 | 38 |
48 // Turns on and off the auto-repeat of the keyboard. Returns true on success. | 39 // Turns on and off the auto-repeat of the keyboard. Returns true on success. |
49 virtual bool SetAutoRepeatEnabled(bool enabled) = 0; | 40 virtual bool SetAutoRepeatEnabled(bool enabled) = 0; |
50 | 41 |
51 // Gets the current auto-repeat rate of the keyboard. The result is stored in | 42 // Gets the current auto-repeat rate of the keyboard. The result is stored in |
52 // |out_rate|. Returns true on success. | 43 // |out_rate|. Returns true on success. |
53 virtual bool GetAutoRepeatRate(AutoRepeatRate* out_rate) const = 0; | 44 virtual bool GetAutoRepeatRate(AutoRepeatRate* out_rate) const = 0; |
54 | 45 |
55 // Sets the auto-repeat rate of the keyboard, initial delay in ms, and repeat | 46 // Sets the auto-repeat rate of the keyboard, initial delay in ms, and repeat |
56 // interval in ms. Returns true on success. | 47 // interval in ms. Returns true on success. |
57 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) = 0; | 48 virtual bool SetAutoRepeatRate(const AutoRepeatRate& rate) = 0; |
58 | 49 |
59 // Factory function, creates a new instance and returns ownership. | 50 // Factory function, creates a new instance and returns ownership. |
60 // For normal usage, access the singleton via CrosLibrary::Get(). | 51 // For normal usage, access the singleton via CrosLibrary::Get(). |
61 static KeyboardLibrary* GetImpl(bool stub); | 52 static KeyboardLibrary* GetImpl(bool stub); |
62 }; | 53 }; |
63 | 54 |
64 } // namespace chromeos | 55 } // namespace chromeos |
65 | 56 |
66 #endif // CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ | 57 #endif // CHROME_BROWSER_CHROMEOS_CROS_KEYBOARD_LIBRARY_H_ |
OLD | NEW |