build: Restructured entire custom plugin system (#1469)

This commit is contained in:
Nik
2023-12-22 23:39:38 +01:00
committed by GitHub
parent 538e79183c
commit 84bfd10416
27 changed files with 258 additions and 153 deletions

View File

@@ -4,19 +4,16 @@
#include <hex/api/localization_manager.hpp>
#include <hex/helpers/concepts.hpp>
#include <pl/pattern_language.hpp>
#include <functional>
#include <map>
#include <span>
#include <string>
#include <thread>
#include <utility>
#include <vector>
#include <jthread.hpp>
#include <pl/pattern_language.hpp>
#include <nlohmann/json.hpp>
#include <wolv/io/fs.hpp>
using ImGuiDataType = int;
using ImGuiInputTextFlags = int;
@@ -972,12 +969,6 @@ namespace hex {
namespace impl {
using Callback = std::function<void()>;
struct Service {
std::string name;
std::jthread thread;
};
std::vector<Service> &getServices();
void stopServices();
}

View File

@@ -4,15 +4,12 @@
#include <hex/api/localization_manager.hpp>
#include <cstdio>
#include <thread>
#include <functional>
#include <mutex>
#include <memory>
#include <list>
#include <condition_variable>
#include <jthread.hpp>
namespace hex {
class TaskHolder;
@@ -166,8 +163,6 @@ namespace hex {
static void runDeferredCalls();
private:
static void runner(const std::stop_token &stopToken);
static TaskHolder createTask(std::string name, u64 maxValue, bool background, std::function<void(Task &)> function);
};