1 #ifndef _lua__hpp__included__
2 #define _lua__hpp__included__
6 #include "controllerdata.hpp"
11 * Function implemented in C++ exported to Lua.
19 lua_function(const std::string
& name
) throw(std::bad_alloc
);
21 * Unregister function.
23 virtual ~lua_function() throw();
28 virtual int invoke(lua_State
* L
, window
* win
) = 0;
33 struct lua_render_context
39 struct render_queue
* queue
;
47 void init_lua(window
* win
) throw();
48 void lua_callback_do_paint(struct lua_render_context
* ctx
, window
* win
) throw();
49 void lua_callback_do_video(struct lua_render_context
* ctx
, window
* win
) throw();
50 void lua_callback_do_input(controls_t
& data
, bool subframe
, window
* win
) throw();
51 void lua_callback_do_reset(window
* win
) throw();
52 void lua_callback_do_readwrite(window
* win
) throw();
53 void lua_callback_startup(window
* win
) throw();
54 void lua_callback_pre_load(const std::string
& name
, window
* win
) throw();
55 void lua_callback_err_load(const std::string
& name
, window
* win
) throw();
56 void lua_callback_post_load(const std::string
& name
, bool was_state
, window
* win
) throw();
57 void lua_callback_pre_save(const std::string
& name
, bool is_state
, window
* win
) throw();
58 void lua_callback_err_save(const std::string
& name
, window
* win
) throw();
59 void lua_callback_post_save(const std::string
& name
, bool is_state
, window
* win
) throw();
60 void lua_callback_snoop_input(uint32_t port
, uint32_t controller
, uint32_t index
, short value
, window
* win
) throw();
61 void lua_callback_quit(window
* win
) throw();
63 extern bool lua_requests_repaint
;
64 extern bool lua_requests_subframe_paint
;