summaryrefslogtreecommitdiff
path: root/src/plugins/PluginAPI.hpp
diff options
context:
space:
mode:
authorKamikadze <40305144+Kam1k4dze@users.noreply.github.com>2025-05-31 18:02:02 +0500
committerGitHub <noreply@github.com>2025-05-31 14:02:02 +0100
commit4078e1d17c0fb1439ee5a0ba1e539f06a8f47aab (patch)
tree33a5bed332c5ce217b9e885f56e07c9e732b35fa /src/plugins/PluginAPI.hpp
parentaf2fdb5d58f5d3017aafd78a8ddafb40f710e34b (diff)
refactor: replace all `typedef` with `using` (#10594)
Diffstat (limited to 'src/plugins/PluginAPI.hpp')
-rw-r--r--src/plugins/PluginAPI.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/PluginAPI.hpp b/src/plugins/PluginAPI.hpp
index 0f333294..00a1e8b2 100644
--- a/src/plugins/PluginAPI.hpp
+++ b/src/plugins/PluginAPI.hpp
@@ -31,12 +31,12 @@ Feel like the API is missing something you'd like to use in your plugin? Open an
#include <string>
#include <hyprlang.hpp>
-typedef struct {
+using PLUGIN_DESCRIPTION_INFO = struct {
std::string name;
std::string description;
std::string author;
std::string version;
-} PLUGIN_DESCRIPTION_INFO;
+};
struct SFunctionMatch {
void* address = nullptr;
@@ -83,7 +83,7 @@ class CWindow;
This function should not be modified, see the example plugin.
*/
-typedef REQUIRED std::string (*PPLUGIN_API_VERSION_FUNC)();
+using PPLUGIN_API_VERSION_FUNC = REQUIRED std::string (*)();
#define PLUGIN_API_VERSION pluginAPIVersion
#define PLUGIN_API_VERSION_FUNC_STR "pluginAPIVersion"
@@ -93,7 +93,7 @@ typedef REQUIRED std::string (*PPLUGIN_API_VERSION_FUNC)();
Keep in mind this is executed synchronously, and as such any blocking calls to hyprland might hang. (e.g. system("hyprctl ..."))
*/
-typedef REQUIRED PLUGIN_DESCRIPTION_INFO (*PPLUGIN_INIT_FUNC)(HANDLE);
+using PPLUGIN_INIT_FUNC = REQUIRED PLUGIN_DESCRIPTION_INFO (*)(HANDLE);
#define PLUGIN_INIT pluginInit
#define PLUGIN_INIT_FUNC_STR "pluginInit"
@@ -103,7 +103,7 @@ typedef REQUIRED PLUGIN_DESCRIPTION_INFO (*PPLUGIN_INIT_FUNC)(HANDLE);
Hooks are unloaded after exit.
*/
-typedef OPTIONAL void (*PPLUGIN_EXIT_FUNC)();
+using PPLUGIN_EXIT_FUNC = OPTIONAL void (*)();
#define PLUGIN_EXIT pluginExit
#define PLUGIN_EXIT_FUNC_STR "pluginExit"