2023-07-26 12:24:18 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "./screen.hpp"
|
|
|
|
|
2023-07-26 12:55:50 +02:00
|
|
|
#include <solanaceae/util/simple_config_model.hpp>
|
|
|
|
#include <solanaceae/contact/contact_model3.hpp>
|
|
|
|
#include <solanaceae/message3/registry_message_model.hpp>
|
|
|
|
#include <solanaceae/plugin/plugin_manager.hpp>
|
|
|
|
#include <solanaceae/toxcore/tox_event_logger.hpp>
|
|
|
|
|
2023-07-26 20:09:57 +02:00
|
|
|
#include <solanaceae/tox_contacts/tox_contact_model2.hpp>
|
|
|
|
#include <solanaceae/tox_messages/tox_message_manager.hpp>
|
|
|
|
#include <solanaceae/tox_messages/tox_transfer_manager.hpp>
|
|
|
|
|
2023-07-26 12:55:50 +02:00
|
|
|
#include "./tox_client.hpp"
|
|
|
|
|
2023-07-26 20:09:57 +02:00
|
|
|
#include "./sdlrenderer_texture_uploader.hpp"
|
|
|
|
|
2023-07-26 12:24:18 +02:00
|
|
|
#include <string>
|
2023-07-26 12:55:50 +02:00
|
|
|
#include <iostream>
|
|
|
|
#include <chrono>
|
2023-07-26 12:24:18 +02:00
|
|
|
|
2023-07-26 20:09:57 +02:00
|
|
|
// fwd
|
|
|
|
extern "C" {
|
|
|
|
struct SDL_Renderer;
|
|
|
|
} // C
|
|
|
|
|
2023-07-26 12:24:18 +02:00
|
|
|
struct MainScreen final : public Screen {
|
2023-07-26 20:09:57 +02:00
|
|
|
SDL_Renderer* renderer;
|
|
|
|
|
2023-07-26 12:55:50 +02:00
|
|
|
std::chrono::high_resolution_clock::time_point last_time = std::chrono::high_resolution_clock::now();
|
|
|
|
|
|
|
|
SimpleConfigModel conf;
|
|
|
|
Contact3Registry cr;
|
|
|
|
RegistryMessageModel rmm;
|
|
|
|
|
|
|
|
PluginManager pm;
|
|
|
|
|
|
|
|
ToxEventLogger tel{std::cout};
|
|
|
|
ToxClient tc;
|
2023-07-26 20:09:57 +02:00
|
|
|
ToxContactModel2 tcm;
|
|
|
|
ToxMessageManager tmm;
|
|
|
|
ToxTransferManager ttm;
|
2023-07-26 12:55:50 +02:00
|
|
|
|
2023-07-26 20:09:57 +02:00
|
|
|
SDLRendererTextureUploader sdlrtu;
|
2023-07-26 12:55:50 +02:00
|
|
|
//OpenGLTextureUploader ogltu;
|
|
|
|
|
|
|
|
|
2023-07-26 20:09:57 +02:00
|
|
|
MainScreen(SDL_Renderer* renderer_, std::string save_path);
|
|
|
|
~MainScreen(void);
|
2023-07-26 12:24:18 +02:00
|
|
|
|
|
|
|
// return nullptr if not next
|
|
|
|
// sets bool quit to true if exit
|
|
|
|
Screen* poll(bool&) override;
|
|
|
|
};
|
|
|
|
|