2017-06-13 21:13:58 +02:00
|
|
|
#pragma once
|
|
|
|
|
2018-06-26 14:09:39 +02:00
|
|
|
#include "singletons/IrcManager.hpp"
|
2018-06-28 19:46:45 +02:00
|
|
|
#include "singletons/Resources.hpp"
|
2017-06-13 21:13:58 +02:00
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
2018-04-28 15:20:18 +02:00
|
|
|
class TwitchServer;
|
2018-04-28 15:48:40 +02:00
|
|
|
class PubSub;
|
2018-04-28 15:20:18 +02:00
|
|
|
|
2018-04-30 23:30:05 +02:00
|
|
|
class CommandController;
|
2018-05-06 00:32:45 +02:00
|
|
|
class HighlightController;
|
2018-05-13 19:24:32 +02:00
|
|
|
class IgnoreController;
|
2018-05-26 20:25:00 +02:00
|
|
|
class TaggedUsersController;
|
|
|
|
class AccountController;
|
2018-06-28 19:38:57 +02:00
|
|
|
class ModerationActions;
|
2018-04-27 22:11:19 +02:00
|
|
|
|
|
|
|
class ThemeManager;
|
|
|
|
class WindowManager;
|
|
|
|
class LoggingManager;
|
|
|
|
class PathManager;
|
|
|
|
class AccountManager;
|
|
|
|
class EmoteManager;
|
|
|
|
class NativeMessagingManager;
|
|
|
|
class SettingManager;
|
2018-04-28 15:20:18 +02:00
|
|
|
class FontManager;
|
|
|
|
class ResourceManager;
|
2018-04-27 22:11:19 +02:00
|
|
|
|
2017-06-13 21:13:58 +02:00
|
|
|
class Application
|
|
|
|
{
|
2018-04-27 22:11:19 +02:00
|
|
|
Application(int _argc, char **_argv);
|
|
|
|
|
2017-06-13 21:13:58 +02:00
|
|
|
public:
|
2018-04-27 22:11:19 +02:00
|
|
|
static void instantiate(int argc, char **argv);
|
|
|
|
|
|
|
|
~Application() = delete;
|
|
|
|
|
|
|
|
void construct();
|
|
|
|
void initialize();
|
|
|
|
void load();
|
2017-06-13 21:13:58 +02:00
|
|
|
|
|
|
|
int run(QApplication &qtApp);
|
|
|
|
|
2018-04-28 15:20:18 +02:00
|
|
|
friend void test();
|
|
|
|
|
2018-06-28 19:38:57 +02:00
|
|
|
PathManager *paths = nullptr;
|
|
|
|
ThemeManager *themes = nullptr;
|
|
|
|
WindowManager *windows = nullptr;
|
|
|
|
LoggingManager *logging = nullptr;
|
2018-06-26 17:06:17 +02:00
|
|
|
CommandController *commands = nullptr;
|
|
|
|
HighlightController *highlights = nullptr;
|
|
|
|
IgnoreController *ignores = nullptr;
|
|
|
|
TaggedUsersController *taggedUsers = nullptr;
|
|
|
|
AccountController *accounts = nullptr;
|
2018-06-28 19:38:57 +02:00
|
|
|
EmoteManager *emotes = nullptr;
|
|
|
|
NativeMessagingManager *nativeMessaging = nullptr;
|
|
|
|
SettingManager *settings = nullptr;
|
|
|
|
FontManager *fonts = nullptr;
|
|
|
|
ResourceManager *resources = nullptr;
|
|
|
|
ModerationActions *moderationActions = nullptr;
|
2018-04-28 15:20:18 +02:00
|
|
|
|
|
|
|
/// Provider-specific
|
|
|
|
struct {
|
2018-06-26 17:06:17 +02:00
|
|
|
TwitchServer *server = nullptr;
|
|
|
|
PubSub *pubsub = nullptr;
|
2018-04-28 15:20:18 +02:00
|
|
|
} twitch;
|
2018-04-27 22:11:19 +02:00
|
|
|
|
2017-12-22 14:44:31 +01:00
|
|
|
void save();
|
2018-04-27 22:11:19 +02:00
|
|
|
|
|
|
|
// Special application mode that only initializes the native messaging host
|
|
|
|
static void runNativeMessagingHost();
|
|
|
|
|
|
|
|
private:
|
|
|
|
int argc;
|
|
|
|
char **argv;
|
2017-06-13 21:13:58 +02:00
|
|
|
};
|
|
|
|
|
2018-04-27 22:11:19 +02:00
|
|
|
Application *getApp();
|
|
|
|
|
|
|
|
bool appInitialized();
|
|
|
|
|
2017-06-13 21:13:58 +02:00
|
|
|
} // namespace chatterino
|