Move the event loop to evtloop.c, and wake up sleeping jobs every 10 seconds.
[apps/madmutt.git] / lib-lua / lib-lua.h
index 0a4d859..2a96a7d 100644 (file)
 #define MUTT_LIB_LUA_LIB_LUA_H
 
 #ifdef HAVE_CONFIG_H
-# include "../config.h"
+# include <config.h>
 #endif
 
+#include <lua.h>
+#include <lualib.h>
+#include <lauxlib.h>
+
+#include <lib-mime/mime-types.h>
+#include "lua-token.h"
+
+/* possible arguments to set_quadoption() */
+typedef enum quadopt_t {
+    M_NO,
+    M_YES,
+    M_ASKNO,
+    M_ASKYES
+} quadopt_t;
+
+void luaM_initialize(void);
+void luaM_shutdown(void);
+
+lua_State *luaM_getruntime(void);
+
+int luaM_dofile(const char *filename);
+int luaM_wrap(void (*errfun)(const char *fmt, ...)
+              __attribute__((format(printf, 1, 2))),
+              int status);
+
+quadopt_t luaM_checkquadopt(lua_State *L, int narg);
+void luaM_pushquadopt(lua_State *Ls, int val);
+
+const char *luaM_checkrx(lua_State *Ls, int narg);
+rx_t *luaM_rxnew(const char* val);
+char *luaM_pathnew(const char *val);
+void luaM_pushaddr(lua_State *Ls, address_t *addr);
+
+#include "madmutt.li"
 
 #endif