2011-09-13 17:50:18 +03:00
|
|
|
#ifndef _lua__hpp__included__
|
|
|
|
#define _lua__hpp__included__
|
|
|
|
|
2014-03-28 12:36:21 +02:00
|
|
|
#include <string>
|
|
|
|
#include <map>
|
2012-01-17 21:35:49 +02:00
|
|
|
#include "core/controllerframe.hpp"
|
2014-02-02 18:35:36 +02:00
|
|
|
#include "library/movie.hpp"
|
2012-06-20 17:40:27 +03:00
|
|
|
#include "library/framebuffer.hpp"
|
2012-10-20 09:11:07 +03:00
|
|
|
#include "library/lua-framebuffer.hpp"
|
2011-09-13 17:50:18 +03:00
|
|
|
|
2014-05-14 16:21:03 +03:00
|
|
|
namespace keyboard
|
|
|
|
{
|
|
|
|
class key;
|
|
|
|
}
|
|
|
|
|
2013-08-07 17:31:09 +03:00
|
|
|
void init_lua() throw();
|
2011-11-29 11:46:58 +02:00
|
|
|
void quit_lua() throw();
|
2014-05-14 11:50:59 +03:00
|
|
|
void lua_callback_do_paint(struct lua::render_context* ctx, bool non_synthethic) throw();
|
|
|
|
void lua_callback_do_video(struct lua::render_context* ctx, bool& kill_frame, uint32_t& hscl, uint32_t& vscl) throw();
|
2012-01-09 21:55:55 +02:00
|
|
|
void lua_callback_do_input(controller_frame& data, bool subframe) throw();
|
2011-09-17 00:06:20 +03:00
|
|
|
void lua_callback_do_reset() throw();
|
2011-11-10 21:20:34 +02:00
|
|
|
void lua_callback_do_frame() throw();
|
2012-03-06 05:10:54 +02:00
|
|
|
void lua_callback_do_frame_emulated() throw();
|
|
|
|
void lua_callback_do_rewind() throw();
|
2011-09-17 00:06:20 +03:00
|
|
|
void lua_callback_do_readwrite() throw();
|
2012-03-06 13:48:39 +02:00
|
|
|
void lua_callback_do_idle() throw();
|
|
|
|
void lua_callback_do_timer() throw();
|
2011-09-17 00:06:20 +03:00
|
|
|
void lua_callback_pre_load(const std::string& name) throw();
|
|
|
|
void lua_callback_err_load(const std::string& name) throw();
|
|
|
|
void lua_callback_post_load(const std::string& name, bool was_state) throw();
|
|
|
|
void lua_callback_pre_save(const std::string& name, bool is_state) throw();
|
|
|
|
void lua_callback_err_save(const std::string& name) throw();
|
|
|
|
void lua_callback_post_save(const std::string& name, bool is_state) throw();
|
|
|
|
void lua_callback_snoop_input(uint32_t port, uint32_t controller, uint32_t index, short value) throw();
|
|
|
|
void lua_callback_quit() throw();
|
2013-12-19 00:46:12 +02:00
|
|
|
void lua_callback_keyhook(const std::string& key, keyboard::key& p) throw();
|
2012-05-19 14:37:49 +03:00
|
|
|
void lua_callback_do_unsafe_rewind(const std::vector<char>& save, uint64_t secs, uint64_t ssecs, movie& mov, void* u);
|
2013-03-03 09:09:41 +02:00
|
|
|
bool lua_callback_do_button(uint32_t port, uint32_t controller, uint32_t index, const char* type);
|
2013-07-24 19:03:48 +03:00
|
|
|
void lua_callback_movie_lost(const char* what);
|
2013-10-27 14:41:28 +02:00
|
|
|
void lua_callback_do_latch(std::list<std::string>& args);
|
2014-02-15 13:51:25 +02:00
|
|
|
void lua_run_startup_scripts();
|
|
|
|
void lua_add_startup_script(const std::string& file);
|
2011-09-13 17:50:18 +03:00
|
|
|
|
2014-03-28 12:36:21 +02:00
|
|
|
|
2012-03-06 13:48:39 +02:00
|
|
|
#define LUA_TIMED_HOOK_IDLE 0
|
|
|
|
#define LUA_TIMED_HOOK_TIMER 1
|
|
|
|
|
|
|
|
uint64_t lua_timed_hook(int timer) throw();
|
2014-03-28 12:36:21 +02:00
|
|
|
const std::map<std::string, std::u32string>& get_lua_watch_vars();
|
2012-03-06 13:48:39 +02:00
|
|
|
|
2011-09-13 17:50:18 +03:00
|
|
|
extern bool lua_requests_repaint;
|
|
|
|
extern bool lua_requests_subframe_paint;
|
|
|
|
|
|
|
|
#endif
|