Move EventType to its own file

For #include reasons
This commit is contained in:
Mm2PL 2024-10-06 16:01:19 +02:00
parent 586f6327d3
commit 1008904fb1
No known key found for this signature in database
GPG key ID: 94AC9B80EFA15ED9
5 changed files with 21 additions and 5 deletions

View file

@ -9,10 +9,14 @@ c2 = {}
---@type { Debug: c2.LogLevel, Info: c2.LogLevel, Warning: c2.LogLevel, Critical: c2.LogLevel }
c2.LogLevel = {}
-- Begin src/controllers/plugins/api/EventType.hpp
---@alias c2.EventType integer
---@type { CompletionRequested: c2.EventType }
c2.EventType = {}
-- End src/controllers/plugins/api/EventType.hpp
---@class CommandContext
---@field words string[] The words typed when executing the command. For example `/foo bar baz` will result in `{"/foo", "bar", "baz"}`.
---@field channel c2.Channel The channel the command was executed in.

View file

@ -233,6 +233,7 @@ set(SOURCE_FILES
controllers/plugins/api/HTTPRequest.hpp
controllers/plugins/api/HTTPResponse.cpp
controllers/plugins/api/HTTPResponse.hpp
controllers/plugins/api/EventType.hpp
controllers/plugins/LuaAPI.cpp
controllers/plugins/LuaAPI.hpp
controllers/plugins/LuaUtilities.cpp

View file

@ -26,11 +26,8 @@ namespace chatterino::lua::api {
enum class LogLevel { Debug, Info, Warning, Critical };
/**
* @exposeenum c2.EventType
* @includefile controllers/plugins/api/EventType.hpp
*/
enum class EventType {
CompletionRequested,
};
/**
* @lua@class CommandContext

View file

@ -4,7 +4,7 @@
# include "Application.hpp"
# include "common/Common.hpp"
# include "common/network/NetworkCommon.hpp"
# include "controllers/plugins/LuaAPI.hpp"
# include "controllers/plugins/api/EventType.hpp"
# include "controllers/plugins/LuaUtilities.hpp"
# include "controllers/plugins/PluginPermission.hpp"

View file

@ -0,0 +1,14 @@
#pragma once
#ifdef CHATTERINO_HAVE_PLUGINS
namespace chatterino::lua::api {
/**
* @exposeenum c2.EventType
*/
enum class EventType {
CompletionRequested,
};
} // namespace chatterino::lua::api
#endif