1 /** \file
2  * \brief IM Lua 5 Binding
3  *
4  * See Copyright Notice in im_lib.h
5  */
6 
7 module im.lua;
8 
9 extern (C) @safe nothrow:
10 
11 struct lua_State;
12 
13 /** \defgroup imlua ImLua 5 Binding Reference
14  * \par
15  * Binding for the Lua 5 scripting language.           \n
16  * Lua 5.1 Copyright (C) 1994-2005 Lua.org, PUC-Rio    \n
17  * R. Ierusalimschy, L. H. de Figueiredo & W. Celes    \n
18  * http://www.lua.org
19  * \par
20  * See \ref imlua.h
21  * \ingroup util */
22 
23 void imlua_open();
24 
25 /** Initializes the Lua binding of the main IM library.  \n
26  * Returns 1 (leaves the im table on the top of the stack).
27  * You must link the application with the "imlua51" library.
28  * \ingroup imlua */
29 int imlua_open(lua_State *L);
30 
31 /** Calls \ref imFormatRemoveAll to release internal memory.
32  * Also available in Lua as "im.Close()".
33 * \ingroup imlua */
34 int imlua_close(lua_State *L);
35 
36 import im.image: imImage;
37 /** Pushes an image as a metatable on the stack.
38  * \ingroup imlua */
39 void imlua_pushimage(lua_State *L, imImage* image);
40 
41 /** Gets an image as a metatable from the stack, checks for correct type.
42  * \ingroup imlua */
43 imImage* imlua_checkimage(lua_State *L, int param);
44 
45 /** Initializes the Lua binding of the capture library.  \n
46  * Returns 1 (leaves the im table on the top of the stack).
47  * You must link the application with the "imlua_capture51" library.
48  * \ingroup imlua */
49 int imlua_open_capture(lua_State *L);
50 
51 /** Initializes the Lua binding of the process library.  \n
52  * Returns 1 (leaves the im table on the top of the stack).
53  * You must link the application with the "imlua_process51" library.
54  * \ingroup imlua */
55 int imlua_open_process(lua_State *L);
56 
57 /** Initializes the Lua binding of the fourier transform library.  \n
58  * Returns 1 (leaves the im table on the top of the stack).
59  * You must link the application with the "imlua_fftw51" library.
60  * \ingroup imlua */
61 int imlua_open_fftw(lua_State *L);