Debian Codegraph @

xbmc/windowing/WindowSystemFactory.h

raw
1 /*
2 * Copyright (C) 2005-2020 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 "WinSystem.h"
12
13 #include <functional>
14 #include <list>
15 #include <map>
16 #include <memory>
17
18 namespace KODI
19 {
20 namespace WINDOWING
21 {
22
23 class CWindowSystemFactory
24 {
25 public:
26 static std::unique_ptr<CWinSystemBase> CreateWindowSystem(const std::string& name);
27 static std::list<std::string> GetWindowSystems();
28 static void RegisterWindowSystem(
29 const std::function<std::unique_ptr<CWinSystemBase>()>& createFunction,
30 const std::string& name = "default");
31
32 private:
33 static std::list<std::pair<std::string, std::function<std::unique_ptr<CWinSystemBase>()>>>
34 m_windowSystems;
35 };
36
37 } // namespace WINDOWING
38 } // namespace KODI