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_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ | 5 #ifndef UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ |
6 #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ | 6 #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ |
7 | 7 |
8 #include <xkbcommon/xkbcommon.h> | 8 #include <xkbcommon/xkbcommon.h> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 int ui_flag; | 51 int ui_flag; |
52 xkb_mod_mask_t xkb_flag; | 52 xkb_mod_mask_t xkb_flag; |
53 }; | 53 }; |
54 std::vector<XkbFlagMapEntry> xkb_flag_map_; | 54 std::vector<XkbFlagMapEntry> xkb_flag_map_; |
55 | 55 |
56 // Flag mask for num lock, which is always considered enabled. | 56 // Flag mask for num lock, which is always considered enabled. |
57 xkb_mod_mask_t num_lock_mod_mask_; | 57 xkb_mod_mask_t num_lock_mod_mask_; |
58 | 58 |
59 // Determines the Windows-based KeyboardCode (VKEY) for a character key, | 59 // Determines the Windows-based KeyboardCode (VKEY) for a character key, |
60 // accounting for non-US layouts. May return VKEY_UNKNOWN, in which case the | 60 // accounting for non-US layouts. May return VKEY_UNKNOWN, in which case the |
61 // caller should use |DomCodeToNonLocatedKeyboardCode()| as a last resort. | 61 // caller should use |LocatedToNonLocatedKeyboardCode()| as a last resort. |
62 KeyboardCode DifficultKeyboardCode(DomCode dom_code, | 62 KeyboardCode DifficultKeyboardCode(DomCode dom_code, |
63 int ui_flags, | 63 int ui_flags, |
64 xkb_keycode_t xkb_keycode, | 64 xkb_keycode_t xkb_keycode, |
65 xkb_mod_mask_t xkb_flags, | 65 xkb_mod_mask_t xkb_flags, |
66 xkb_keysym_t xkb_keysym, | 66 xkb_keysym_t xkb_keysym, |
67 DomKey dom_key, | 67 DomKey dom_key, |
68 base::char16 character) const; | 68 base::char16 character) const; |
69 | 69 |
70 // Maps DomCode to xkb_keycode_t. | 70 // Maps DomCode to xkb_keycode_t. |
71 const XkbKeyCodeConverter& key_code_converter_; | 71 const XkbKeyCodeConverter& key_code_converter_; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 std::string current_layout_name_; | 110 std::string current_layout_name_; |
111 | 111 |
112 // Support weak pointers for attach & detach callbacks. | 112 // Support weak pointers for attach & detach callbacks. |
113 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_; | 113 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_; |
114 }; | 114 }; |
115 | 115 |
116 } // namespace ui | 116 } // namespace ui |
117 | 117 |
118 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ | 118 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ |
OLD | NEW |