mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 21:05:56 -05:00
Improve bookmark API
This commit is contained in:
@@ -22,8 +22,7 @@ namespace hex {
|
||||
It allows you to add/register new content that will be picked up and used by the ImHex core or by other
|
||||
plugins when needed.
|
||||
*/
|
||||
class ContentRegistry {
|
||||
public:
|
||||
struct ContentRegistry {
|
||||
ContentRegistry() = delete;
|
||||
|
||||
/* Settings Registry. Allows adding of new entries into the ImHex preferences window. */
|
||||
|
||||
31
plugins/libimhex/include/hex/api/imhex_api.hpp
Normal file
31
plugins/libimhex/include/hex/api/imhex_api.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <hex/helpers/utils.hpp>
|
||||
|
||||
#include <list>
|
||||
|
||||
namespace hex {
|
||||
|
||||
struct ImHexApi {
|
||||
ImHexApi() = delete;
|
||||
|
||||
struct Bookmarks {
|
||||
Bookmarks() = delete;
|
||||
|
||||
struct Entry {
|
||||
Region region;
|
||||
|
||||
std::vector<char> name;
|
||||
std::vector<char> comment;
|
||||
u32 color;
|
||||
};
|
||||
|
||||
static void add(Region region, std::string_view name, std::string_view comment, u32 color = 0x00000000);
|
||||
static void add(u64 addr, size_t size, std::string_view name, std::string_view comment, u32 color = 0x00000000);
|
||||
|
||||
static std::list<Entry>& getEntries();
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user