ui: Added API to add custom layouts, imhex application and api cleanup

This commit is contained in:
WerWolv
2022-01-18 00:10:10 +01:00
parent c4cbcc7232
commit ee8b665472
28 changed files with 310 additions and 143 deletions

View File

@@ -1,9 +1,9 @@
#include "helpers/plugin_manager.hpp"
#include <hex/helpers/logger.hpp>
#include <hex/helpers/paths.hpp>
#include <filesystem>
#include <dlfcn.h>
namespace hex {
@@ -89,10 +89,15 @@ namespace hex {
this->m_setImGuiContextFunction(ctx);
}
const fs::path &Plugin::getPath() const {
const fs::path& Plugin::getPath() const {
return this->m_path;
}
void* Plugin::getPluginFunction(const std::string &pluginName, const std::string &symbol) {
auto symbolName = hex::format(symbol.data(), pluginName.length(), pluginName.data());
return dlsym(this->m_handle, symbolName.c_str());
}
bool PluginManager::load(const fs::path &pluginFolder) {