refactor: Move the builtin plugin specific init tasks to the plugin

This commit is contained in:
WerWolv
2023-11-28 00:19:42 +01:00
parent 8e7716ebcc
commit 284f8534ab
10 changed files with 411 additions and 376 deletions

View File

@@ -256,6 +256,8 @@ namespace hex {
EVENT_DEF_NO_LOG(EventFrameEnd);
EVENT_DEF_NO_LOG(EventSetTaskBarIconState, u32, u32, u32);
EVENT_DEF(RequestAddInitTask, std::string, bool, std::function<bool()>);
EVENT_DEF(RequestAddExitTask, std::string, std::function<bool()>);
EVENT_DEF(RequestOpenWindow, std::string);
EVENT_DEF(RequestSelectionChange, Region);
EVENT_DEF(RequestAddBookmark, Region, std::string, std::string, color_t, u64*);

View File

@@ -571,7 +571,14 @@ namespace hex {
Nightly
};
/**
* @brief Triggers the update process
* @param updateType The update channel
* @return If the update process was successfully started
*/
bool updateImHex(UpdateType updateType);
void addStartupTask(const std::string &name, bool async, const std::function<bool()> &function);
}
/**