mirror-chatterino2/src/Application.hpp

84 lines
1.7 KiB
C++
Raw Normal View History

#pragma once
2018-06-28 19:46:45 +02:00
#include "singletons/Resources.hpp"
#include <QApplication>
namespace chatterino {
class TwitchServer;
class PubSub;
class CommandController;
class HighlightController;
2018-05-13 19:24:32 +02:00
class IgnoreController;
class TaggedUsersController;
class AccountController;
class ModerationActions;
2018-06-28 19:51:07 +02:00
class Themes;
class WindowManager;
2018-06-28 19:51:07 +02:00
class Logging;
class Paths;
class AccountManager;
2018-06-28 19:51:07 +02:00
class Emotes;
class NativeMessaging;
class Settings;
class Fonts;
class Resources;
class Application
{
Application(int _argc, char **_argv);
public:
static void instantiate(int argc, char **argv);
~Application() = delete;
void construct();
void initialize();
void load();
int run(QApplication &qtApp);
friend void test();
2018-06-28 19:51:07 +02:00
Paths *paths = nullptr;
Themes *themes = nullptr;
WindowManager *windows = nullptr;
2018-06-28 19:51:07 +02:00
Logging *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:51:07 +02:00
Emotes *emotes = nullptr;
NativeMessaging *nativeMessaging = nullptr;
Settings *settings = nullptr;
Fonts *fonts = nullptr;
Resources *resources = nullptr;
ModerationActions *moderationActions = nullptr;
/// Provider-specific
struct {
2018-06-26 17:06:17 +02:00
TwitchServer *server = nullptr;
PubSub *pubsub = nullptr;
} twitch;
void save();
// Special application mode that only initializes the native messaging host
static void runNativeMessagingHost();
private:
int argc;
char **argv;
};
Application *getApp();
bool appInitialized();
} // namespace chatterino