Introduce c2.later() function to Lua API. (#5154)

This commit is contained in:
Mm2PL
2024-02-25 12:45:59 +01:00
committed by GitHub
parent 101dc82ea0
commit a737d4b755
10 changed files with 128 additions and 2 deletions
+6
View File
@@ -14,6 +14,7 @@
# include <vector>
struct lua_State;
class QTimer;
namespace chatterino {
@@ -126,6 +127,9 @@ public:
return this->error_;
}
int addTimeout(QTimer *timer);
void removeTimeout(QTimer *timer);
private:
QDir loadDirectory_;
lua_State *state_;
@@ -134,6 +138,8 @@ private:
// maps command name -> function name
std::unordered_map<QString, QString> ownedCommands;
std::vector<QTimer *> activeTimeouts;
int lastTimerId = 0;
friend class PluginController;
};