2021-04-19 16:06:08 +02:00
|
|
|
/*
|
|
|
|
* SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
* MuseScore-CLA-applies
|
|
|
|
*
|
|
|
|
* MuseScore
|
|
|
|
* Music Composition & Notation
|
|
|
|
*
|
|
|
|
* Copyright (C) 2021 MuseScore BVBA and others
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 3 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2020-12-21 13:02:16 +01:00
|
|
|
#ifndef MU_FRAMEWORK_IAPPLICATION_H
|
|
|
|
#define MU_FRAMEWORK_IAPPLICATION_H
|
2019-12-21 07:01:34 +01:00
|
|
|
|
2023-05-19 14:26:07 +02:00
|
|
|
#include "modularity/imoduleinterface.h"
|
2019-12-06 11:20:02 +01:00
|
|
|
|
2021-10-18 16:23:02 +02:00
|
|
|
class QObject;
|
|
|
|
class QEvent;
|
2022-04-18 16:36:37 +02:00
|
|
|
class QWindow;
|
2021-10-18 16:23:02 +02:00
|
|
|
|
2020-12-21 13:02:16 +01:00
|
|
|
namespace mu::framework {
|
|
|
|
class IApplication : MODULE_EXPORT_INTERFACE
|
2019-12-21 07:01:34 +01:00
|
|
|
{
|
2020-12-21 13:02:16 +01:00
|
|
|
INTERFACE_ID(IApplication)
|
2019-12-21 07:01:34 +01:00
|
|
|
public:
|
2020-12-21 13:02:16 +01:00
|
|
|
virtual ~IApplication() = default;
|
2019-12-06 11:20:02 +01:00
|
|
|
|
2020-12-21 13:02:16 +01:00
|
|
|
enum class RunMode {
|
2023-03-08 12:46:15 +01:00
|
|
|
GuiApp,
|
|
|
|
ConsoleApp,
|
2023-03-17 18:27:24 +01:00
|
|
|
AudioPluginRegistration,
|
2020-12-21 13:02:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
virtual void setRunMode(const RunMode& mode) = 0;
|
|
|
|
virtual RunMode runMode() const = 0;
|
|
|
|
virtual bool noGui() const = 0;
|
2021-10-18 16:23:02 +02:00
|
|
|
|
2022-04-18 16:36:37 +02:00
|
|
|
virtual QWindow* focusWindow() const = 0;
|
|
|
|
|
2021-10-18 16:23:02 +02:00
|
|
|
virtual bool notify(QObject* object, QEvent* event) = 0;
|
2022-06-28 11:35:29 +02:00
|
|
|
|
|
|
|
virtual void restart() = 0;
|
2019-12-21 07:01:34 +01:00
|
|
|
};
|
2020-12-19 13:21:12 +01:00
|
|
|
}
|
2019-12-06 11:20:02 +01:00
|
|
|
|
2020-12-21 13:02:16 +01:00
|
|
|
#endif // MU_FRAMEWORK_IAPPLICATION_H
|