2020-12-27 14:39:06 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <imgui.h>
|
2021-08-28 16:15:20 +00:00
|
|
|
#define IMGUI_DEFINE_MATH_OPERATORS
|
2021-08-20 22:52:11 +00:00
|
|
|
#include <imgui_internal.h>
|
2020-12-27 14:39:06 +00:00
|
|
|
|
|
|
|
#include <hex.hpp>
|
|
|
|
|
2021-02-19 12:22:12 +00:00
|
|
|
#define IMHEX_PLUGIN_SETUP(name, author, description) IMHEX_PLUGIN_SETUP_IMPL(IMHEX_PLUGIN_NAME, name, author, description)
|
2021-02-07 12:40:47 +00:00
|
|
|
|
2021-02-19 12:22:12 +00:00
|
|
|
#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; } \
|
2021-08-20 22:52:11 +00:00
|
|
|
[[gnu::visibility("default")]] void setImGuiContext(ImGuiContext *ctx) { ImGui::SetCurrentContext(ctx); GImGui = ctx; } \
|
2021-02-19 12:22:12 +00:00
|
|
|
} \
|
|
|
|
void hex::plugin::namespaceName::internal::initializePlugin()
|