46ba46ce9d
* build: Added initial support for Rust plugins * github: Install correct rust version * github: Fixed rustup command * github: Fix swapped win/linux commands * github: Install linux rust toolchain on Linux * github: Add rustup parameters to correct command * build: libimhex-rust -> hex * rust-plugins: Disable optimization to export functions correctly * build: Use cdylib instead of dylib * build: Fixed rust building and artifact copying * build: Fixed installing plugins * build: Fix copying and installing on Windows * github: Added windows debugging * github: Use curl instead of wget * github: Added debug on failure * github: Update path variable with rust toolchain path * build/github: Set rust location so cmake can find it * build: Remove leftovers * api: Added rust wrappers for the ImHexAPI * rust: Fixed compile flags with older gcc/clang * build: Enable concepts for cxx.rs * build: Explicitly set compiler for cxx.rs * rust: Added imgui-rs to libimhex-rust * rust: Export functions with double underscore prefix on mac * rust: Export functions adjusted for ABI * Add Rust target folder to gitignore * Add vendored imgui-rs copy * Add Context::current() to vendored imgui-rs * Fix libimhex not exporting cimgui symbols * Simplify plugin export mangling * build: Fixed cimgui linking * build: Only specify --export-all-symbols on Windows * Add context setting to Rust plugins * rust: Cleanup * deps: Update curl Co-authored-by: jam1garner <8260240+jam1garner@users.noreply.github.com>
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <hex.hpp>
|
|
|
|
#include <list>
|
|
#include <vector>
|
|
#include <string>
|
|
|
|
#include <hex/helpers/concepts.hpp>
|
|
|
|
namespace hex {
|
|
|
|
namespace prv { class Provider; }
|
|
|
|
namespace ImHexApi {
|
|
namespace Common {
|
|
|
|
void sayHello();
|
|
void closeImHex(bool noQuestions = false);
|
|
void restartImHex();
|
|
|
|
};
|
|
|
|
namespace Bookmarks {
|
|
struct Entry {
|
|
Region region;
|
|
|
|
std::vector<char> name;
|
|
std::vector<char> comment;
|
|
u32 color;
|
|
bool locked;
|
|
};
|
|
|
|
void add(Region region, const std::string &name, const std::string &comment, u32 color = 0x00000000);
|
|
void add(u64 addr, size_t size, const std::string &name, const std::string &comment, u32 color = 0x00000000);
|
|
|
|
std::list<Entry>& getEntries();
|
|
};
|
|
|
|
namespace Provider {
|
|
|
|
prv::Provider* get();
|
|
const std::vector<prv::Provider*>& getProviders();
|
|
|
|
bool isValid();
|
|
|
|
void add(prv::Provider *provider);
|
|
|
|
template<hex::derived_from<prv::Provider> T>
|
|
void add(auto&& ... args) {
|
|
add(new T(std::forward<decltype(args)>(args)...));
|
|
}
|
|
|
|
void remove(prv::Provider *provider);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|