2017-06-13 21:13:58 +02:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-31 00:50:07 +01:00
|
|
|
#include "singletons/ircmanager.hpp"
|
2017-12-31 02:21:33 +01:00
|
|
|
#include "singletons/resourcemanager.hpp"
|
2017-06-13 21:13:58 +02:00
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
|
2018-04-28 15:20:18 +02:00
|
|
|
namespace providers {
|
|
|
|
namespace twitch {
|
|
|
|
|
|
|
|
class TwitchServer;
|
|
|
|
|
|
|
|
} // namespace twitch
|
|
|
|
} // namespace providers
|
|
|
|
|
2018-04-27 22:11:19 +02:00
|
|
|
namespace singletons {
|
|
|
|
|
|
|
|
class ThemeManager;
|
|
|
|
class WindowManager;
|
|
|
|
class LoggingManager;
|
|
|
|
class PathManager;
|
|
|
|
class CommandManager;
|
|
|
|
class AccountManager;
|
|
|
|
class EmoteManager;
|
|
|
|
class PubSubManager;
|
|
|
|
class NativeMessagingManager;
|
|
|
|
class SettingManager;
|
2018-04-28 15:20:18 +02:00
|
|
|
class FontManager;
|
|
|
|
class ResourceManager;
|
2018-04-27 22:11:19 +02:00
|
|
|
|
|
|
|
} // namespace singletons
|
|
|
|
|
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-04-27 22:11:19 +02:00
|
|
|
singletons::PathManager *paths = nullptr;
|
|
|
|
singletons::ThemeManager *themes = nullptr;
|
|
|
|
singletons::WindowManager *windows = nullptr;
|
|
|
|
singletons::LoggingManager *logging = nullptr;
|
|
|
|
singletons::CommandManager *commands = nullptr;
|
|
|
|
singletons::AccountManager *accounts = nullptr;
|
|
|
|
singletons::EmoteManager *emotes = nullptr;
|
|
|
|
singletons::PubSubManager *pubsub = nullptr;
|
|
|
|
singletons::NativeMessagingManager *nativeMessaging = nullptr;
|
|
|
|
singletons::SettingManager *settings = nullptr;
|
2018-04-28 15:20:18 +02:00
|
|
|
singletons::FontManager *fonts = nullptr;
|
|
|
|
singletons::ResourceManager *resources = nullptr;
|
|
|
|
|
|
|
|
/// Provider-specific
|
|
|
|
struct {
|
|
|
|
providers::twitch::TwitchServer *server;
|
|
|
|
} 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
|