UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
scripts_lua.h
Go to the documentation of this file.
1 
6 /*
7 Copyright (C) 2002-2020 UFO: Alien Invasion.
8 
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 
18 See the GNU General Public License for more details.
19 
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23 
24 */
25 
26 #pragma once
27 
28 extern "C" {
29  #include "../libs/lua/lua.h"
30  #include "../libs/lua/lualib.h"
31  #include "../libs/lua/lauxlib.h"
32 }
33 
34 #include "list.h"
35 
39 //typedef void (*LUA_MODULE_CALLBACK)(void);
40 //typedef void (*LUA_NODE_CALLBACK)(void);
41 
45 typedef int LUA_FUNCTION;
49 typedef int LUA_EVENT;
53 typedef int LUA_METHOD;
54 
59 typedef int LUA_INSTANCE;
60 
66 extern void* UI_SWIG_TypeQuery (const char* name);
67 
71 extern const char* UI_SWIG_NodeTypeName (void* node);
72 
77  STATIC_CONTROL = 0x0000,
78  DYNAMIC_CONTROL = 0x0001
79 };
80 
81 int Com_LuaIsNilOrTable (lua_State* L, int index);
82 linkedList_t* Com_LuaTableToStringList (lua_State* L, int index);
linkedList_t * Com_LuaTableToStringList(lua_State *L, int index)
Convert a lua table to a linkedList of character strings.
Definition: scripts_lua.cpp:36
const char * UI_SWIG_NodeTypeName(void *node)
returns the lua typename of the node.
void * UI_SWIG_TypeQuery(const char *name)
queries the SWIG type table for a type information structure that can be used to create objects of a ...
int LUA_EVENT
holds a reference to a lua event handler
Definition: scripts_lua.h:49
LINKED LIST interface.
int LUA_METHOD
holds a reference to a lua event handler
Definition: scripts_lua.h:53
int LUA_INSTANCE
holds a reference to a lua table instance, so we can perform calls to table methods in our callback m...
Definition: scripts_lua.h:59
QGL_EXTERN GLuint index
Definition: r_gl.h:110
nodeCreateFlags_t
enumeration to define flags for the creation of node.
Definition: scripts_lua.h:76
int Com_LuaIsNilOrTable(lua_State *L, int index)
Definition: scripts_lua.cpp:29
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
Definition: r_gl.h:110
int LUA_FUNCTION
callback signatures for functions defined in Lua
Definition: scripts_lua.h:45