kodi
KeyboardLayoutManager.h
1 /*
2  * Copyright (C) 2015-2024 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "KeyboardLayout.h"
12 
13 #include <map>
14 #include <string>
15 #include <utility>
16 #include <vector>
17 
18 class CSetting;
19 struct StringSettingOption;
20 
21 namespace KODI
22 {
23 namespace KEYBOARD
24 {
28 using KeyboardLayouts = std::map<std::string, CKeyboardLayout>;
29 
34 {
35 public:
36  CKeyboardLayoutManager() = default;
37  virtual ~CKeyboardLayoutManager();
38 
39  bool Load(const std::string& path = "");
40  void Unload();
41 
42  const KeyboardLayouts& GetLayouts() const { return m_layouts; }
43  bool GetLayout(const std::string& name, CKeyboardLayout& layout) const;
44 
45  static void SettingOptionsKeyboardLayoutsFiller(const std::shared_ptr<const CSetting>& setting,
46  std::vector<StringSettingOption>& list,
47  std::string& current,
48  void* data);
49 
50 private:
52  CKeyboardLayoutManager const& operator=(CKeyboardLayoutManager const&) = delete;
53 
54  KeyboardLayouts m_layouts;
55 };
56 } // namespace KEYBOARD
57 } // namespace KODI
Definition: KeyboardLayoutManager.h:33
Setting base class containing all the properties which are common to all settings independent of the ...
Definition: Setting.h:46
Definition: SettingDefinitions.h:85
Definition: AudioDecoder.h:18
Definition: KeyboardLayout.h:29