1
0
mirror of synced 2024-11-29 09:54:30 +01:00
ImHex/lib/libimhex/include/hex/api/imhex_api.hpp

68 lines
1.5 KiB
C++

#pragma once
#include <hex.hpp>
#include <list>
#include <vector>
#include <string>
#include <hex/helpers/concepts.hpp>
#include <hex/api/task.hpp>
#include <hex/api/keybinding.hpp>
namespace hex {
namespace prv { class Provider; }
namespace ImHexApi {
namespace Common {
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);
};
namespace Tasks {
Task createTask(const std::string &unlocalizedName, u64 maxValue);
}
};
}