mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
build: More repo cleanup, move libimhex and external libs to /lib folder
This commit is contained in:
20
lib/libimhex/include/hex/plugin.hpp
Normal file
20
lib/libimhex/include/hex/plugin.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <imgui.h>
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#include <imgui_internal.h>
|
||||
|
||||
#include <hex.hpp>
|
||||
|
||||
#define IMHEX_PLUGIN_SETUP(name, author, description) IMHEX_PLUGIN_SETUP_IMPL(IMHEX_PLUGIN_NAME, name, author, description)
|
||||
|
||||
#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; } \
|
||||
[[gnu::visibility("default")]] void setImGuiContext(ImGuiContext *ctx) { ImGui::SetCurrentContext(ctx); GImGui = ctx; } \
|
||||
} \
|
||||
void hex::plugin::namespaceName::internal::initializePlugin()
|
||||
Reference in New Issue
Block a user