// generated by Fast Light User Interface Designer (fluid) version 1.0300

#ifndef luacpp_h
#define luacpp_h
#include <FL/Fl.H>

namespace lua
{

extern "C"
{
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>

}

/**
   Lua interpreter
*/

typedef void (*lua_show_error_func)(const char *error_message);

class Lua {
protected:
  lua_State *L;
  lua_show_error_func show_error_func;
  void show_error();
public:
  Lua();
  ~Lua();
  char * gsub(const char* src, const char *re, const char *sub);
  int call_va(const char *table, const char *func, const char *sig, ...);
  int dostring(const char *script);
  int loadstring(const char *script);
  int dofile(const char *file_name);
  int loadfile(const char *file_name);
  int lua_preprocess_file(const char *file_name);
  void set_lua_error(lua_show_error_func ef);
  void gvar(const char* key, const char *value);
  void gvar(const char* key, int value);
  void gvar(const char* key, double value);
  char *gvar_string(const char* key);
  double gvar_float(const char* key);
};

}
#endif
