File indexing completed on 2024-11-10 04:57:06
0001 /* 0002 SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "main.h" 0008 #include "screencastmanager.h" 0009 0010 #include <KPluginFactory> 0011 0012 using namespace KWin; 0013 0014 class KWIN_EXPORT ScreencastManagerFactory : public PluginFactory 0015 { 0016 Q_OBJECT 0017 Q_PLUGIN_METADATA(IID PluginFactory_iid FILE "metadata.json") 0018 Q_INTERFACES(KWin::PluginFactory) 0019 0020 public: 0021 explicit ScreencastManagerFactory() = default; 0022 0023 std::unique_ptr<Plugin> create() const override; 0024 }; 0025 0026 std::unique_ptr<Plugin> ScreencastManagerFactory::create() const 0027 { 0028 switch (kwinApp()->operationMode()) { 0029 case Application::OperationModeX11: 0030 return nullptr; 0031 case Application::OperationModeXwayland: 0032 case Application::OperationModeWaylandOnly: 0033 return std::make_unique<ScreencastManager>(); 0034 default: 0035 return nullptr; 0036 } 0037 } 0038 0039 #include "main.moc"