1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00
lovr/src/luax.h

26 lines
1.1 KiB
C
Raw Normal View History

2017-01-22 02:00:32 +00:00
#include <lua.h>
#include <lauxlib.h>
#include <lualib.h>
2017-03-11 10:19:33 +00:00
#include "lib/map/map.h"
2017-10-21 20:10:07 +00:00
#include "util.h"
2017-01-22 02:00:32 +00:00
2017-01-26 10:20:30 +00:00
#pragma once
2017-01-22 02:00:32 +00:00
#define luax_totype(L, i, T) ((T*) _luax_totype(L, i, #T))
#define luax_checktype(L, i, T) ((T*) _luax_checktype(L, i, #T))
typedef void (*luax_destructor)(void);
2017-01-22 02:00:32 +00:00
2018-09-27 03:14:16 +00:00
void luax_loadlib(lua_State* L, const char* library, const char* module);
void luax_atexit(lua_State* L, luax_destructor destructor);
void luax_registerloader(lua_State* L, lua_CFunction loader, int index);
2017-01-22 02:00:32 +00:00
void luax_registertype(lua_State* L, const char* name, const luaL_Reg* functions);
2017-05-16 21:37:05 +00:00
void luax_extendtype(lua_State* L, const char* base, const char* name, const luaL_Reg* baseFunctions, const luaL_Reg* functions);
void* _luax_totype(lua_State* L, int index, const char* type);
void* _luax_checktype(lua_State* L, int index, const char* type);
2018-07-25 03:10:30 +00:00
void luax_pushobject(lua_State* L, void* object);
2018-09-26 17:39:17 +00:00
void luax_vthrow(lua_State* L, const char* format, va_list args);
2018-02-17 17:18:08 +00:00
int luax_getstack(lua_State* L);
void luax_pushconf(lua_State* L);
2018-02-17 17:18:08 +00:00
int luax_setconf(lua_State* L);
2017-10-21 20:10:07 +00:00
Color luax_checkcolor(lua_State* L, int index);