OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_XKB_KEYBOARD_LAYOUT_ENGINE_H_ |
| 6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_XKB_KEYBOARD_LAYOUT_ENGINE_H_ |
| 7 |
| 8 #include "ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h" |
| 9 |
| 10 #include "ui/events/ozone/layout/xkb/xkb_key_code_converter.h" |
| 11 |
| 12 namespace ui { |
| 13 |
| 14 class WaylandXkbKeyboardLayoutEngine : public XkbKeyboardLayoutEngine { |
| 15 public: |
| 16 WaylandXkbKeyboardLayoutEngine(const XkbKeyCodeConverter& converter); |
| 17 |
| 18 // Used to sync up client side 'xkb_state' instance with modifiers status |
| 19 // update from the compositor. |
| 20 int UpdateModifiers(uint32_t depressed_mods, |
| 21 uint32_t latched_mods, |
| 22 uint32_t locked_mods, |
| 23 uint32_t group); |
| 24 |
| 25 private: |
| 26 void SetKeymap(xkb_keymap* keymap) override; |
| 27 |
| 28 // Cache to access modifiers xkb_mode_index_t value. |
| 29 struct { |
| 30 xkb_mod_index_t control = 0; |
| 31 xkb_mod_index_t alt = 0; |
| 32 xkb_mod_index_t shift = 0; |
| 33 } xkb_mod_indexes_; |
| 34 }; |
| 35 |
| 36 } // namespace ui |
| 37 |
| 38 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ |
OLD | NEW |