~ubuntu-branches/debian/squeeze/freeciv/squeeze

« back to all changes in this revision

Viewing changes to dependencies/tolua/tolua.h

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams, Karl Goetz, Clint Adams
  • Date: 2010-02-23 22:09:02 UTC
  • mfrom: (1.2.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20100223220902-kiyrmr9i4152cka5
Tags: 2.2.0-1
[ Karl Goetz ]
* Remove civserver files in /etc/ggzd/ (Closes: 523772, 517787)
* Adding ${misc:Depends} to all binary packages (lintian warnings)

[ Clint Adams ]
* New upstream version.
  - Drop data_dsc_use_bindir.diff (binary pathnames have changed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* tolua
2
 
** Support code for Lua bindings.
3
 
** Written by Waldemar Celes
4
 
** TeCGraf/PUC-Rio
5
 
** Apr 2003
6
 
** $Id: tolua.h 10334 2005-04-26 22:08:24Z vas $
7
 
*/
8
 
 
9
 
/* This code is free software; you can redistribute it and/or modify it. 
10
 
** The software provided hereunder is on an "as is" basis, and 
11
 
** the author has no obligation to provide maintenance, support, updates,
12
 
** enhancements, or modifications. 
13
 
*/
14
 
 
15
 
 
16
 
#ifndef TOLUA_H
17
 
#define TOLUA_H
18
 
 
19
 
#ifndef TOLUA_API
20
 
#define TOLUA_API extern
21
 
#endif
22
 
 
23
 
#define TOLUA_VERSION "tolua 5.0a"
24
 
 
25
 
#ifdef __cplusplus
26
 
extern "C" {
27
 
#endif
28
 
 
29
 
#include "lua.h"
30
 
#include "lauxlib.h"
31
 
 
32
 
struct tolua_Error
33
 
{
34
 
        int index;
35
 
        int array;
36
 
        const char* type;
37
 
};
38
 
typedef struct tolua_Error tolua_Error;
39
 
 
40
 
 
41
 
TOLUA_API const char* tolua_typename (lua_State* L, int lo);
42
 
TOLUA_API void tolua_error (lua_State* L, char* msg, tolua_Error* err);
43
 
TOLUA_API int tolua_isnoobj (lua_State* L, int lo, tolua_Error* err);
44
 
TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err);
45
 
TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err);
46
 
TOLUA_API int tolua_isnumber (lua_State* L, int lo, int def, tolua_Error* err);
47
 
TOLUA_API int tolua_isstring (lua_State* L, int lo, int def, tolua_Error* err);
48
 
TOLUA_API int tolua_istable (lua_State* L, int lo, int def, tolua_Error* err);
49
 
TOLUA_API int tolua_isusertable (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
50
 
TOLUA_API int tolua_isfunction (lua_State* L, int lo, int def, tolua_Error* err); 
51
 
TOLUA_API int tolua_isuserdata (lua_State* L, int lo, int def, tolua_Error* err);
52
 
TOLUA_API int tolua_isusertype (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
53
 
TOLUA_API int tolua_isvaluearray 
54
 
 (lua_State* L, int lo, int dim, int def, tolua_Error* err);
55
 
TOLUA_API int tolua_isbooleanarray 
56
 
 (lua_State* L, int lo, int dim, int def, tolua_Error* err);
57
 
TOLUA_API int tolua_isnumberarray 
58
 
 (lua_State* L, int lo, int dim, int def, tolua_Error* err);
59
 
TOLUA_API int tolua_isstringarray 
60
 
 (lua_State* L, int lo, int dim, int def, tolua_Error* err);
61
 
TOLUA_API int tolua_istablearray 
62
 
 (lua_State* L, int lo, int dim, int def, tolua_Error* err);
63
 
TOLUA_API int tolua_isuserdataarray 
64
 
 (lua_State* L, int lo, int dim, int def, tolua_Error* err);
65
 
TOLUA_API int tolua_isusertypearray 
66
 
 (lua_State* L, int lo, const char* type, int dim, int def, tolua_Error* err);
67
 
 
68
 
TOLUA_API void tolua_open (lua_State* L);
69
 
 
70
 
TOLUA_API void* tolua_copy (lua_State* L, void* value, unsigned int size);
71
 
TOLUA_API void* tolua_clone (lua_State* L, void* value, lua_CFunction func);
72
 
 
73
 
TOLUA_API void tolua_usertype (lua_State* L, char* type);
74
 
TOLUA_API void tolua_beginmodule (lua_State* L, char* name);
75
 
TOLUA_API void tolua_endmodule (lua_State* L);
76
 
TOLUA_API void tolua_module (lua_State* L, char* name, int hasvar);
77
 
TOLUA_API void tolua_class (lua_State* L, char* name, char* base);
78
 
TOLUA_API void tolua_cclass (lua_State* L, char* lname, char* name, char* base, lua_CFunction col);
79
 
TOLUA_API void tolua_function (lua_State* L, char* name, lua_CFunction func);
80
 
TOLUA_API void tolua_constant (lua_State* L, char* name, double value);
81
 
TOLUA_API void tolua_variable (lua_State* L, char* name, lua_CFunction get, lua_CFunction set);
82
 
TOLUA_API void tolua_array (lua_State* L,char* name, lua_CFunction get, lua_CFunction set);
83
 
 
84
 
 
85
 
TOLUA_API void tolua_pushvalue (lua_State* L, int lo);
86
 
TOLUA_API void tolua_pushboolean (lua_State* L, int value);
87
 
TOLUA_API void tolua_pushnumber (lua_State* L, double value);
88
 
TOLUA_API void tolua_pushstring (lua_State* L, const char* value);
89
 
TOLUA_API void tolua_pushuserdata (lua_State* L, void* value);
90
 
TOLUA_API void tolua_pushusertype (lua_State* L, void* value, const char* type);
91
 
TOLUA_API void tolua_pushfieldvalue (lua_State* L, int lo, int index, int v);
92
 
TOLUA_API void tolua_pushfieldboolean (lua_State* L, int lo, int index, int v);
93
 
TOLUA_API void tolua_pushfieldnumber (lua_State* L, int lo, int index, double v);
94
 
TOLUA_API void tolua_pushfieldstring (lua_State* L, int lo, int index, const char* v);
95
 
TOLUA_API void tolua_pushfielduserdata (lua_State* L, int lo, int index, void* v);
96
 
TOLUA_API void tolua_pushfieldusertype (lua_State* L, int lo, int index, void* v, const char* type);
97
 
 
98
 
TOLUA_API double tolua_tonumber (lua_State* L, int narg, double def);
99
 
TOLUA_API const char* tolua_tostring (lua_State* L, int narg, const char* def);
100
 
TOLUA_API void* tolua_touserdata (lua_State* L, int narg, void* def);
101
 
TOLUA_API void* tolua_tousertype (lua_State* L, int narg, void* def);
102
 
TOLUA_API int tolua_tovalue (lua_State* L, int narg, int def);
103
 
TOLUA_API int tolua_toboolean (lua_State* L, int narg, int def);
104
 
TOLUA_API double tolua_tofieldnumber (lua_State* L, int lo, int index, double def);
105
 
TOLUA_API const char* tolua_tofieldstring (lua_State* L, int lo, int index, const char* def);
106
 
TOLUA_API void* tolua_tofielduserdata (lua_State* L, int lo, int index, void* def);
107
 
TOLUA_API void* tolua_tofieldusertype (lua_State* L, int lo, int index, void* def);
108
 
TOLUA_API int tolua_tofieldvalue (lua_State* L, int lo, int index, int def);
109
 
TOLUA_API int tolua_getfieldboolean (lua_State* L, int lo, int index, int def);
110
 
 
111
 
#ifdef __cplusplus
112
 
}
113
 
#endif
114
 
 
115
 
#endif