ui/api: Added loaded plugin information to welcome screen

This commit is contained in:
WerWolv
2021-02-19 13:22:12 +01:00
parent 89643d1538
commit 0da508594b
8 changed files with 125 additions and 22 deletions

View File

@@ -11,9 +11,14 @@
#include <hex/helpers/shared_data.hpp>
#include <hex/data_processor/node.hpp>
#define IMHEX_PLUGIN_SETUP IMHEX_PLUGIN_SETUP_IMPL(IMHEX_PLUGIN_NAME)
#define IMHEX_PLUGIN_SETUP(name, author, description) IMHEX_PLUGIN_SETUP_IMPL(IMHEX_PLUGIN_NAME, name, author, description)
#define IMHEX_PLUGIN_SETUP_IMPL(name) namespace hex::plugin::name::internal { \
[[gnu::visibility("default")]] void initializePlugin(); \
} \
void hex::plugin::name::internal::initializePlugin()
#define IMHEX_PLUGIN_SETUP_IMPL(namespaceName, name, author, description) \
namespace hex::plugin::namespaceName::internal { \
[[gnu::visibility("default")]] void initializePlugin(); \
\
[[gnu::visibility("default")]] const char* getPluginName() { return name; } \
[[gnu::visibility("default")]] const char* getPluginAuthor() { return author; } \
[[gnu::visibility("default")]] const char* getPluginDescription() { return description; } \
} \
void hex::plugin::namespaceName::internal::initializePlugin()