mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
impr: Run data processor in a worker task
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <imnodes_internal.h>
|
||||
|
||||
#include <string>
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
@@ -17,6 +18,8 @@ namespace hex::plugin::builtin {
|
||||
struct Workspace {
|
||||
Workspace() = default;
|
||||
|
||||
|
||||
|
||||
std::unique_ptr<ImNodesContext, void(*)(ImNodesContext*)> context = { []{
|
||||
ImNodesContext *ctx = ImNodes::CreateContext();
|
||||
ctx->Style = ImNodes::GetStyle();
|
||||
@@ -47,7 +50,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
static void eraseLink(Workspace &workspace, int id);
|
||||
static void eraseNodes(Workspace &workspace, const std::vector<int> &ids);
|
||||
static void processNodes(Workspace &workspace);
|
||||
void processNodes(Workspace &workspace);
|
||||
|
||||
void reloadCustomNodes();
|
||||
void updateNodePositions();
|
||||
@@ -74,6 +77,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
PerProvider<Workspace> m_mainWorkspace;
|
||||
PerProvider<std::vector<Workspace*>> m_workspaceStack;
|
||||
TaskHolder m_evaluationTask;
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user