src/lua_console.h
author Tero Marttila <terom@fixme.fi>
Fri, 08 May 2009 00:12:15 +0300
changeset 188 6fd4706a4180
parent 105 b6b183fbf373
child 203 ffdf53fd0337
permissions -rw-r--r--
add a run_test to test.c to improve the log_info output
#ifndef LUA_CONSOLE_H
#define LUA_CONSOLE_H

/**
 * @file
 *
 * An interactive lua console
 */
#include "nexus_lua.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 */
    struct nexus_lua *lua;
};

/**
 * 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_lua *lua, struct error_info *err);

/**
 * Destroy the lua console state
 */
void lua_console_destroy (struct lua_console *lc);

#endif