aboutsummaryrefslogtreecommitdiff
path: root/src/FbCommands.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbCommands.hh')
-rw-r--r--src/FbCommands.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/FbCommands.hh b/src/FbCommands.hh
index b6b1f7f..ef9812b 100644
--- a/src/FbCommands.hh
+++ b/src/FbCommands.hh
@@ -32,6 +32,10 @@
32#include "ClientPattern.hh" 32#include "ClientPattern.hh"
33#include "FocusableList.hh" 33#include "FocusableList.hh"
34 34
35namespace lua {
36class state;
37}
38
35namespace FbCommands { 39namespace FbCommands {
36 40
37/// executes a system command 41/// executes a system command
@@ -218,6 +222,24 @@ private:
218 Destination m_dest; 222 Destination m_dest;
219}; 223};
220 224
225/// Command that runs a lua function
226class LuaCmd: public FbTk::Command<void> {
227public:
228 /// parses the string as a lua chunk
229 LuaCmd(const std::string &chunk);
230
231 /// expect the function to be on the lua stack (as a function or a string)
232 LuaCmd(lua::state &l);
233
234 ~LuaCmd();
235
236 void execute();
237private:
238 int m_ref;
239
240 void init(lua::state &l);
241};
242
221} // end namespace FbCommands 243} // end namespace FbCommands
222 244
223#endif // FBCOMMANDS_HH 245#endif // FBCOMMANDS_HH