1 #ifndef _lua__hpp__included__
2 #define _lua__hpp__included__
4 #include "core/controllerframe.hpp"
5 #include "core/keymapper.hpp"
6 #include "core/movie.hpp"
7 #include "library/framebuffer.hpp"
10 struct lua_render_context
16 struct render_queue
* queue
;
21 void init_lua(bool soft
= false) throw();
22 void quit_lua() throw();
23 void lua_callback_do_paint(struct lua_render_context
* ctx
, bool non_synthethic
) throw();
24 void lua_callback_do_video(struct lua_render_context
* ctx
) throw();
25 void lua_callback_do_input(controller_frame
& data
, bool subframe
) throw();
26 void lua_callback_do_reset() throw();
27 void lua_callback_do_frame() throw();
28 void lua_callback_do_frame_emulated() throw();
29 void lua_callback_do_rewind() throw();
30 void lua_callback_do_readwrite() throw();
31 void lua_callback_startup() throw();
32 void lua_callback_do_idle() throw();
33 void lua_callback_do_timer() throw();
34 void lua_callback_pre_load(const std::string
& name
) throw();
35 void lua_callback_err_load(const std::string
& name
) throw();
36 void lua_callback_post_load(const std::string
& name
, bool was_state
) throw();
37 void lua_callback_pre_save(const std::string
& name
, bool is_state
) throw();
38 void lua_callback_err_save(const std::string
& name
) throw();
39 void lua_callback_post_save(const std::string
& name
, bool is_state
) throw();
40 void lua_callback_snoop_input(uint32_t port
, uint32_t controller
, uint32_t index
, short value
) throw();
41 void lua_callback_quit() throw();
42 void lua_callback_keyhook(const std::string
& key
, const struct keygroup::parameters
& p
) throw();
43 void lua_callback_do_unsafe_rewind(const std::vector
<char>& save
, uint64_t secs
, uint64_t ssecs
, movie
& mov
, void* u
);
45 #define LUA_TIMED_HOOK_IDLE 0
46 #define LUA_TIMED_HOOK_TIMER 1
48 uint64_t lua_timed_hook(int timer
) throw();
50 extern bool lua_requests_repaint
;
51 extern bool lua_requests_subframe_paint
;