| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ | 5 #ifndef UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ |
| 6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ | 6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 virtual ~KeyboardLayoutEngine() {} | 30 virtual ~KeyboardLayoutEngine() {} |
| 31 | 31 |
| 32 // Returns true if it is possible to change the current layout. | 32 // Returns true if it is possible to change the current layout. |
| 33 virtual bool CanSetCurrentLayout() const = 0; | 33 virtual bool CanSetCurrentLayout() const = 0; |
| 34 | 34 |
| 35 // Sets the current layout; returns true on success. | 35 // Sets the current layout; returns true on success. |
| 36 // Drop-in replacement for ImeKeyboard::SetCurrentKeyboardLayoutByName(); | 36 // Drop-in replacement for ImeKeyboard::SetCurrentKeyboardLayoutByName(); |
| 37 // the argument string is defined by that interface (crbug.com/362698). | 37 // the argument string is defined by that interface (crbug.com/362698). |
| 38 virtual bool SetCurrentLayoutByName(const std::string& layout_name) = 0; | 38 virtual bool SetCurrentLayoutByName(const std::string& layout_name) = 0; |
| 39 | 39 |
| 40 // Sets the current layout given a memory location and the buffer size in |
| 41 // bytes, that represent keyboard mapping description; returns true on |
| 42 // success. |
| 43 virtual bool SetCurrentLayoutFromBuffer(const char* keymap_string, |
| 44 size_t size) = 0; |
| 45 |
| 40 // Returns true if the current layout makes use of the ISO Level 5 Shift key. | 46 // Returns true if the current layout makes use of the ISO Level 5 Shift key. |
| 41 // Drop-in replacement for ImeKeyboard::IsISOLevel5ShiftAvailable(). | 47 // Drop-in replacement for ImeKeyboard::IsISOLevel5ShiftAvailable(). |
| 42 virtual bool UsesISOLevel5Shift() const = 0; | 48 virtual bool UsesISOLevel5Shift() const = 0; |
| 43 | 49 |
| 44 // Returns true if the current layout makes use of the AltGr | 50 // Returns true if the current layout makes use of the AltGr |
| 45 // (ISO Level 3 Shift) key. | 51 // (ISO Level 3 Shift) key. |
| 46 // Drop-in replacement for ImeKeyboard::IsAltGrAvailable(). | 52 // Drop-in replacement for ImeKeyboard::IsAltGrAvailable(). |
| 47 virtual bool UsesAltGr() const = 0; | 53 virtual bool UsesAltGr() const = 0; |
| 48 | 54 |
| 49 // Provides the meaning of a physical key. | 55 // Provides the meaning of a physical key. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 63 // parameters. | 69 // parameters. |
| 64 virtual bool Lookup(DomCode dom_code, | 70 virtual bool Lookup(DomCode dom_code, |
| 65 int event_flags, | 71 int event_flags, |
| 66 DomKey* dom_key, | 72 DomKey* dom_key, |
| 67 KeyboardCode* key_code) const = 0; | 73 KeyboardCode* key_code) const = 0; |
| 68 }; | 74 }; |
| 69 | 75 |
| 70 } // namespace ui | 76 } // namespace ui |
| 71 | 77 |
| 72 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ | 78 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ |
| OLD | NEW |