summaryrefslogtreecommitdiff
path: root/include/cdlua.h
blob: 465d09cbcd5aa6e25b426cef05a393d3fa8b2c47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/** \file
 * \brief Lua Binding Control
 *
 * See Copyright Notice in cd.h
 */

#ifndef __CD_LUA_H
#define __CD_LUA_H

#ifdef __cplusplus
extern "C" {
#endif

#ifdef LUA_NOOBJECT  /* Lua 3 */
void cdlua_open(void);
void cdlua_close(void);

/* utilities */
cdCanvas* cdlua_getcanvas(void);        /* pos=1, deprecated use cdlua_checkcanvas */
cdCanvas* cdlua_checkcanvas(int pos);
void cdlua_pushcanvas(cdCanvas* canvas);
#endif

#ifdef LUA_TNONE  /* Lua 5 */
int cdlua_open(lua_State *L);
int cdlua_close(lua_State *L);

/* utilities */
cdCanvas* cdlua_getcanvas(lua_State * L); /* pos=1, deprecated use cdlua_checkcanvas */
cdCanvas* cdlua_checkcanvas(lua_State * L, int pos);
void cdlua_pushcanvas(lua_State * L, cdCanvas* canvas);

#if LUA_VERSION_NUM < 502
#define luaL_typeerror luaL_typerror
#endif

#endif

#ifdef __cplusplus
}
#endif

#endif