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 23 matching lines...) Expand all Loading... |
34 bool UsesISOLevel5Shift() const override; | 34 bool UsesISOLevel5Shift() const override; |
35 bool UsesAltGr() const override; | 35 bool UsesAltGr() const override; |
36 | 36 |
37 bool Lookup(DomCode dom_code, | 37 bool Lookup(DomCode dom_code, |
38 int flags, | 38 int flags, |
39 DomKey* dom_key, | 39 DomKey* dom_key, |
40 base::char16* character, | 40 base::char16* character, |
41 KeyboardCode* key_code, | 41 KeyboardCode* key_code, |
42 uint32* platform_keycode) const override; | 42 uint32* platform_keycode) const override; |
43 | 43 |
| 44 static void ParseLayoutName(const std::string& layout_name, |
| 45 std::string* layout_id, |
| 46 std::string* layout_variant); |
| 47 |
44 protected: | 48 protected: |
45 // Table for EventFlagsToXkbFlags(). | 49 // Table for EventFlagsToXkbFlags(). |
46 struct XkbFlagMapEntry { | 50 struct XkbFlagMapEntry { |
47 int ui_flag; | 51 int ui_flag; |
48 xkb_mod_mask_t xkb_flag; | 52 xkb_mod_mask_t xkb_flag; |
49 }; | 53 }; |
50 std::vector<XkbFlagMapEntry> xkb_flag_map_; | 54 std::vector<XkbFlagMapEntry> xkb_flag_map_; |
51 | 55 |
52 // Flag mask for num lock, which is always considered enabled. | 56 // Flag mask for num lock, which is always considered enabled. |
53 xkb_mod_mask_t num_lock_mod_mask_; | 57 xkb_mod_mask_t num_lock_mod_mask_; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 108 |
105 std::string current_layout_name_; | 109 std::string current_layout_name_; |
106 | 110 |
107 // Support weak pointers for attach & detach callbacks. | 111 // Support weak pointers for attach & detach callbacks. |
108 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_; | 112 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_; |
109 }; | 113 }; |
110 | 114 |
111 } // namespace ui | 115 } // namespace ui |
112 | 116 |
113 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ | 117 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ |
OLD | NEW |