Chromium Code Reviews| Index: ui/events/ozone/layout/layout_util.h |
| diff --git a/ui/events/ozone/layout/layout_util.h b/ui/events/ozone/layout/layout_util.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2b35805825ff41f64dadcdfc342c50794122a6f8 |
| --- /dev/null |
| +++ b/ui/events/ozone/layout/layout_util.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ |
| +#define UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ |
| + |
| +// TODO(kpschoedel): consider moving this out of Ozone. |
| + |
| +#include "base/strings/string16.h" |
| +#include "ui/events/keycodes/keyboard_codes.h" |
| + |
| +namespace ui { |
| + |
| +enum class DomCode; |
| +enum class DomKey; |
| + |
| +// Returns the Windows-based VKEY value corresponding to a DOM Level 3 |code|. |
| +// The returned VKEY is positional (e.g. VKEY_LSHIFT). |
| +KeyboardCode DomCodeToKeyboardCode(DomCode dom_code); |
| + |
| +// Returns a Windows-based VKEY for a non-printable DOM Level 3 |key|. |
| +// The returned VKEY is non-positional (e.g. VKEY_SHIFT). |
| +KeyboardCode NonPrintableDomKeyToKeyboardCode(DomKey dom_key); |
| + |
| +// Determine the non-located VKEY corresponding to a located VKEY. |
|
spang
2014/12/05 20:10:47
Above says "positional" but here says "located". C
kpschoedel
2014/12/08 19:54:38
Done.
|
| +KeyboardCode DeLocateKeyboardCode(KeyboardCode key_code); |
| + |
| +// Returns true control character corresponding to a physical key. |
| +// In some contexts this is used instead of the key layout. |
| +bool LookupControlCharacter(DomCode dom_code, |
| + int flags, |
| + DomKey* dom_key, |
| + base::char16* character, |
| + KeyboardCode* key_code); |
| + |
| +} // namespace ui |
| + |
| +#endif // UI_EVENTS_OZONE_LAYOUT_LAYOUT_UTIL_H_ |