-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split AddonFactory into a separate file (#126)
- Loading branch information
1 parent
fd8bf83
commit 8f80c36
Showing
5 changed files
with
41 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024-2024 CSSlayer <[email protected]> | ||
* | ||
* SPDX-License-Identifier: LGPL-2.1-or-later | ||
*/ | ||
|
||
#include "rimefactory.h" | ||
#include "rimeengine.h" | ||
#include <fcitx-utils/i18n.h> | ||
|
||
namespace fcitx { | ||
|
||
AddonInstance *RimeEngineFactory::create(AddonManager *manager) { | ||
registerDomain("fcitx5-rime", FCITX_INSTALL_LOCALEDIR); | ||
return new RimeEngine(manager->instance()); | ||
} | ||
|
||
} // namespace fcitx | ||
|
||
FCITX_ADDON_FACTORY(fcitx::RimeEngineFactory) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024-2024 CSSlayer <[email protected]> | ||
* | ||
* SPDX-License-Identifier: LGPL-2.1-or-later | ||
*/ | ||
#ifndef _FCITX_RIMEFACTORY_H_ | ||
#define _FCITX_RIMEFACTORY_H_ | ||
|
||
#include <fcitx/addonfactory.h> | ||
|
||
namespace fcitx { | ||
|
||
class RimeEngineFactory : public AddonFactory { | ||
public: | ||
AddonInstance *create(AddonManager *manager) override; | ||
}; | ||
|
||
} // namespace fcitx | ||
|
||
#endif |