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