naev 0.12.6
nlua_evt.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
7#include <lua.h>
9
10#include "event.h"
11
12/* Run Lua for an event. */
13Event_t *event_getFromLua( lua_State *L );
14void event_runStart( unsigned int eventid, const char *func );
15int event_runFunc( unsigned int eventid, const char *func, int nargs );
16int event_run( unsigned int eventid, const char *func );
17
18/* individual library stuff */
19int nlua_loadEvt( nlua_env env );
void event_runStart(unsigned int eventid, const char *func)
Starts running a function, allows programmer to set up arguments.
Definition nlua_evt.c:67
int event_runFunc(unsigned int eventid, const char *func, int nargs)
Runs a function previously set up with event_runStart.
Definition nlua_evt.c:120
int event_run(unsigned int eventid, const char *func)
Runs the event function.
Definition nlua_evt.c:90
Event_t * event_getFromLua(lua_State *L)
Gets the current running event from user data.
Definition nlua_evt.c:103
int nlua_loadEvt(nlua_env env)
Loads the event Lua library.
Definition nlua_evt.c:58
Activated event structure.
Definition event.h:12