src/lua_console.h
changeset 93 42ade8285570
child 105 b6b183fbf373
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/lua_console.h	Tue Mar 31 19:35:51 2009 +0300
@@ -0,0 +1,37 @@
+#ifndef LUA_CONSOLE_H
+#define LUA_CONSOLE_H
+
+/**
+ * @file
+ *
+ * An interactive lua console
+ */
+#include "nexus.h"
+#include "console.h"
+
+#include <lua5.1/lua.h>
+
+/**
+ * The lua console state
+ */
+struct lua_console {
+    /** The lowlevel line-based console */
+    struct console *console;
+
+    /** Our lua-state */
+    lua_State *st;
+};
+
+/**
+ * Create a new lua console based on the given low-level console, operating on the given nexus
+ *
+ * This overrides the console callbacks.
+ */
+err_t lua_console_create (struct lua_console **lc_ptr, struct console *console, struct nexus *nexus, struct error_info *err);
+
+/**
+ * Destroy the lua console state
+ */
+void lua_console_destroy (struct lua_console *lc);
+
+#endif