mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
api: Move copy-as data formatting code to builtin-plugin, add api for it
This commit is contained in:
@@ -253,6 +253,24 @@ namespace hex {
|
||||
const std::vector<std::string>& getEntries();
|
||||
|
||||
}
|
||||
|
||||
namespace DataFormatter {
|
||||
|
||||
namespace impl {
|
||||
|
||||
using Callback = std::function<std::string(prv::Provider *provider, u64 address, size_t size)>;
|
||||
struct Entry {
|
||||
std::string unlocalizedName;
|
||||
Callback callback;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
void add(const std::string &unlocalizedName, const impl::Callback &callback);
|
||||
|
||||
std::vector<impl::Entry>& getEntries();
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -91,6 +91,8 @@ namespace hex {
|
||||
static u32 dataProcessorLinkIdCounter;
|
||||
static u32 dataProcessorAttrIdCounter;
|
||||
|
||||
static std::vector<ContentRegistry::DataFormatter::impl::Entry> dataFormatters;
|
||||
|
||||
static std::list<std::string> recentFilePaths;
|
||||
|
||||
static int mainArgc;
|
||||
|
||||
Reference in New Issue
Block a user