mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
sys: Added clang-format file, formatted entire project
This commit is contained in:
@@ -14,7 +14,7 @@ namespace hex {
|
||||
class Plugin {
|
||||
public:
|
||||
explicit Plugin(const fs::path &path);
|
||||
Plugin(const Plugin&) = delete;
|
||||
Plugin(const Plugin &) = delete;
|
||||
Plugin(Plugin &&other) noexcept;
|
||||
~Plugin();
|
||||
|
||||
@@ -25,28 +25,29 @@ namespace hex {
|
||||
[[nodiscard]] std::string getCompatibleVersion() const;
|
||||
void setImGuiContext(ImGuiContext *ctx) const;
|
||||
|
||||
[[nodiscard]] const fs::path& getPath() const;
|
||||
[[nodiscard]] const fs::path &getPath() const;
|
||||
|
||||
[[nodiscard]] bool isLoaded() const;
|
||||
|
||||
private:
|
||||
using InitializePluginFunc = void(*)();
|
||||
using GetPluginNameFunc = const char*(*)();
|
||||
using GetPluginAuthorFunc = const char*(*)();
|
||||
using GetPluginDescriptionFunc = const char*(*)();
|
||||
using GetCompatibleVersionFunc = const char*(*)();
|
||||
using SetImGuiContextFunc = void(*)(ImGuiContext*);
|
||||
using InitializePluginFunc = void (*)();
|
||||
using GetPluginNameFunc = const char *(*)();
|
||||
using GetPluginAuthorFunc = const char *(*)();
|
||||
using GetPluginDescriptionFunc = const char *(*)();
|
||||
using GetCompatibleVersionFunc = const char *(*)();
|
||||
using SetImGuiContextFunc = void (*)(ImGuiContext *);
|
||||
|
||||
void *m_handle = nullptr;
|
||||
fs::path m_path;
|
||||
|
||||
mutable bool m_initialized = false;
|
||||
|
||||
InitializePluginFunc m_initializePluginFunction = nullptr;
|
||||
GetPluginNameFunc m_getPluginNameFunction = nullptr;
|
||||
GetPluginAuthorFunc m_getPluginAuthorFunction = nullptr;
|
||||
GetPluginDescriptionFunc m_getPluginDescriptionFunction = nullptr;
|
||||
GetCompatibleVersionFunc m_getCompatibleVersionFunction = nullptr;
|
||||
SetImGuiContextFunc m_setImGuiContextFunction = nullptr;
|
||||
InitializePluginFunc m_initializePluginFunction = nullptr;
|
||||
GetPluginNameFunc m_getPluginNameFunction = nullptr;
|
||||
GetPluginAuthorFunc m_getPluginAuthorFunction = nullptr;
|
||||
GetPluginDescriptionFunc m_getPluginDescriptionFunction = nullptr;
|
||||
GetCompatibleVersionFunc m_getCompatibleVersionFunction = nullptr;
|
||||
SetImGuiContextFunc m_setImGuiContextFunction = nullptr;
|
||||
|
||||
template<typename T>
|
||||
[[nodiscard]] auto getPluginFunction(const std::string &symbol) {
|
||||
@@ -54,7 +55,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
private:
|
||||
[[nodiscard]] void* getPluginFunction(const std::string &symbol);
|
||||
[[nodiscard]] void *getPluginFunction(const std::string &symbol);
|
||||
};
|
||||
|
||||
class PluginManager {
|
||||
@@ -65,7 +66,7 @@ namespace hex {
|
||||
static void unload();
|
||||
static void reload();
|
||||
|
||||
static const auto& getPlugins() {
|
||||
static const auto &getPlugins() {
|
||||
return PluginManager::s_plugins;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,5 +18,5 @@ namespace hex::init {
|
||||
std::vector<Task> getInitTasks();
|
||||
std::vector<Task> getExitTasks();
|
||||
|
||||
std::vector<Argument>& getInitArguments();
|
||||
std::vector<Argument> &getInitArguments();
|
||||
}
|
||||
@@ -42,10 +42,10 @@ namespace hex {
|
||||
void exitImGui();
|
||||
|
||||
friend void *ImHexSettingsHandler_ReadOpenFn(ImGuiContext *ctx, ImGuiSettingsHandler *, const char *);
|
||||
friend void ImHexSettingsHandler_ReadLine(ImGuiContext*, ImGuiSettingsHandler *handler, void *, const char* line);
|
||||
friend void ImHexSettingsHandler_WriteAll(ImGuiContext* ctx, ImGuiSettingsHandler *handler, ImGuiTextBuffer *buf);
|
||||
friend void ImHexSettingsHandler_ReadLine(ImGuiContext *, ImGuiSettingsHandler *handler, void *, const char *line);
|
||||
friend void ImHexSettingsHandler_WriteAll(ImGuiContext *ctx, ImGuiSettingsHandler *handler, ImGuiTextBuffer *buf);
|
||||
|
||||
GLFWwindow* m_window = nullptr;
|
||||
GLFWwindow *m_window = nullptr;
|
||||
|
||||
double m_targetFps = 60.0;
|
||||
bool m_layoutConfigured = false;
|
||||
|
||||
Reference in New Issue
Block a user