added phantom functions to be filled later
[lqt.git] / new / src / lqt_common.hpp
blob39eb77d283482dfd0cd0c07ab4ff9abf5b91a0ef
1 /*
2 * Copyright (c) 2007-2008 Mauro Iazzi
3 *
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use,
8 * copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following
11 * conditions:
13 * The above copyright notice and this permission notice shall be
14 * included in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
18 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
23 * OTHER DEALINGS IN THE SOFTWARE.
27 #ifndef __LQT_COMMON_HPP
28 #define __LQT_COMMON_HPP
30 extern "C" {
31 #include <lua.h>
32 #include <lualib.h>
33 #include <lauxlib.h>
36 #include <QVariant>
37 #include <QIcon>
38 #include <QLocale>
39 //#include <iostream>
41 #define lqtL_register(L, p, n) ( (void)L, (void)p, (void)n )
42 #define lqtL_unregister(L, p) ( (void)L, (void)p )
44 #define LQT_POINTERS "Registry Pointers"
45 #define LQT_ENUMS "Registry Enumerations"
47 template<typename T> class LuaBinder;
49 extern int& lqtL_tointref (lua_State *, int);
51 extern void lqtL_pusharguments (lua_State *, char**);
52 extern char** lqtL_toarguments (lua_State *, int);
53 extern bool lqtL_testarguments (lua_State *, int);
55 extern void lqtL_manageudata (lua_State *, int);
56 extern void lqtL_unmanageudata (lua_State *, int);
57 extern void lqtL_pushudata (lua_State *, const void *, const char *);
58 extern void lqtL_passudata (lua_State *, const void *, const char *);
59 extern void * lqtL_toudata (lua_State *, int, const char *);
60 extern bool lqtL_testudata (lua_State *, int, const char *);
61 //#define lqtL_checkudata(a...) luaL_checkudata(a)
62 extern void * lqtL_checkudata (lua_State *, int, const char *);
63 #define lqtL_isudata lqtL_testudata
65 extern void lqtL_pushenum (lua_State *, int, const char *);
66 extern bool lqtL_isenum (lua_State *, int, const char *);
67 extern int lqtL_toenum (lua_State *, int, const char *);
70 extern int lqtL_baseindex (lua_State *, int, int);
72 extern int lqtL_gc (lua_State *);
73 extern int lqtL_index (lua_State *);
74 extern int lqtL_newindex (lua_State *);
77 #endif // __LQT_COMMON_HPP