| 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_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ | 5 #ifndef UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ |
| 6 #define UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ | 6 #define UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ |
| 7 | 7 |
| 8 // TODO(kpschoedel): consider moving this out of Ozone. | 8 // TODO(kpschoedel): consider moving this out of Ozone. |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // Returns the Windows-based VKEY value corresponding to a DOM Level 3 |code|. | 24 // Returns the Windows-based VKEY value corresponding to a DOM Level 3 |code|. |
| 25 // The returned VKEY is located (e.g. VKEY_LSHIFT). | 25 // The returned VKEY is located (e.g. VKEY_LSHIFT). |
| 26 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode DomCodeToKeyboardCode(DomCode dom_code); | 26 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode DomCodeToKeyboardCode(DomCode dom_code); |
| 27 | 27 |
| 28 // Returns the Windows-based VKEY value corresponding to a DOM Level 3 |code|. | 28 // Returns the Windows-based VKEY value corresponding to a DOM Level 3 |code|. |
| 29 // The returned VKEY is non-located (e.g. VKEY_SHIFT). | 29 // The returned VKEY is non-located (e.g. VKEY_SHIFT). |
| 30 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode | 30 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode |
| 31 DomCodeToNonLocatedKeyboardCode(DomCode dom_code); | 31 DomCodeToNonLocatedKeyboardCode(DomCode dom_code); |
| 32 | 32 |
| 33 // Determine the non-located VKEY corresponding to a located VKEY. | |
| 34 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode | |
| 35 NonLocatedKeyboardCode(KeyboardCode key_code); | |
| 36 | |
| 37 // Determine the located VKEY corresponding to a non-located VKEY. | |
| 38 EVENTS_OZONE_LAYOUT_EXPORT KeyboardCode | |
| 39 LocatedKeyboardCode(KeyboardCode key_code, DomCode dom_code); | |
| 40 | |
| 41 // Returns true control character corresponding to a physical key. | 33 // Returns true control character corresponding to a physical key. |
| 42 // In some contexts this is used instead of the key layout. | 34 // In some contexts this is used instead of the key layout. |
| 43 EVENTS_OZONE_LAYOUT_EXPORT bool LookupControlCharacter(DomCode dom_code, | 35 EVENTS_OZONE_LAYOUT_EXPORT bool LookupControlCharacter(DomCode dom_code, |
| 44 int flags, | 36 int flags, |
| 45 DomKey* dom_key, | 37 DomKey* dom_key, |
| 46 base::char16* character, | 38 base::char16* character, |
| 47 KeyboardCode* key_code); | 39 KeyboardCode* key_code); |
| 48 | 40 |
| 49 // Returns the ui::EventFlags value associated with a modifier key, | 41 // Returns the ui::EventFlags value associated with a modifier key, |
| 50 // or 0 (EF_NONE) if the key is not a modifier. | 42 // or 0 (EF_NONE) if the key is not a modifier. |
| 51 EVENTS_OZONE_LAYOUT_EXPORT int ModifierDomKeyToEventFlag(DomKey key); | 43 EVENTS_OZONE_LAYOUT_EXPORT int ModifierDomKeyToEventFlag(DomKey key); |
| 52 | 44 |
| 53 } // namespace ui | 45 } // namespace ui |
| 54 | 46 |
| 55 #endif // UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ | 47 #endif // UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ |
| OLD | NEW |