Faster movie loading and saving
[lsnes.git] / lua.hpp
blob44306d2b53b48e0aa000f09c2d9b64ec4c995f14
1 #ifndef _lua__hpp__included__
2 #define _lua__hpp__included__
4 #include "render.hpp"
5 #include "window.hpp"
6 #include "controllerdata.hpp"
8 struct lua_render_context
10 uint32_t left_gap;
11 uint32_t right_gap;
12 uint32_t top_gap;
13 uint32_t bottom_gap;
14 struct render_queue* queue;
15 uint32_t width;
16 uint32_t height;
17 uint32_t rshift;
18 uint32_t gshift;
19 uint32_t bshift;
22 void init_lua(window* win) throw();
23 void lua_callback_do_paint(struct lua_render_context* ctx, window* win) throw();
24 void lua_callback_do_video(struct lua_render_context* ctx, window* win) throw();
25 void lua_callback_do_input(controls_t& data, bool subframe, window* win) throw();
26 void lua_callback_do_reset(window* win) throw();
27 void lua_callback_do_readwrite(window* win) throw();
28 void lua_callback_startup(window* win) throw();
29 void lua_callback_pre_load(const std::string& name, window* win) throw();
30 void lua_callback_err_load(const std::string& name, window* win) throw();
31 void lua_callback_post_load(const std::string& name, bool was_state, window* win) throw();
32 void lua_callback_pre_save(const std::string& name, bool is_state, window* win) throw();
33 void lua_callback_err_save(const std::string& name, window* win) throw();
34 void lua_callback_post_save(const std::string& name, bool is_state, window* win) throw();
35 void lua_callback_quit(window* win) throw();
36 bool lua_command(const std::string& cmd, window* win) throw(std::bad_alloc);
37 void lua_set_commandhandler(commandhandler& cmdh) throw();
39 extern bool lua_requests_repaint;
40 extern bool lua_requests_subframe_paint;
42 #endif