Fcitx
addonloader.h
1 /*
2  * SPDX-FileCopyrightText: 2016-2016 CSSlayer <wengxt@gmail.com>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  *
6  */
7 #ifndef _FCITX_ADDONLOADER_H_
8 #define _FCITX_ADDONLOADER_H_
9 
10 #include <string>
11 #include <unordered_map>
12 #include <fcitx/addoninfo.h>
13 #include <fcitx/addoninstance.h>
14 #include <fcitx/fcitxcore_export.h>
15 
16 namespace fcitx {
17 
18 class AddonFactory;
19 class AddonManager;
20 
21 using StaticAddonRegistry = std::unordered_map<std::string, AddonFactory *>;
22 
23 class FCITXCORE_EXPORT AddonLoader {
24 public:
25  virtual ~AddonLoader();
26  virtual std::string type() const = 0;
27  virtual AddonInstance *load(const AddonInfo &info,
28  AddonManager *manager) = 0;
29 };
30 } // namespace fcitx
31 
32 #endif // _FCITX_ADDONLOADER_H_
Definition: action.cpp:17
Base class for any addon in fcitx.
Definition: addoninstance.h:74
Addon For fcitx.