Mercurial > mm7
comparison lib/swig/swigwin-2.0.11/UIControlModule_wrap.cxx @ 2037:7a9477135943
Renamed Math.h -> OurMath.h (file resolution was sometimes ambiguous)
Added custom pre-compile build step (.swig -> .cxx)
author | Nomad |
---|---|
date | Fri, 22 Nov 2013 10:34:22 +0200 |
parents | e78fa9082174 |
children |
comparison
equal
deleted
inserted
replaced
2036:a453996ed5ac | 2037:7a9477135943 |
---|---|
723 * | 723 * |
724 * This file contains the runtime support for Lua modules | 724 * This file contains the runtime support for Lua modules |
725 * and includes code for managing global variables and pointer | 725 * and includes code for managing global variables and pointer |
726 * type checking. | 726 * type checking. |
727 * ----------------------------------------------------------------------------- */ | 727 * ----------------------------------------------------------------------------- */ |
728 | 728 |
729 #include "lib/lua/lua.h" | |
729 #ifdef __cplusplus | 730 #ifdef __cplusplus |
730 extern "C" { | 731 extern "C" { |
731 #endif | 732 #endif |
732 | 733 |
733 #include "..\..\lua\lua.h" | 734 //#include "lua.h" |
734 //#include "lauxlib.h" | 735 //#include "lauxlib.h" |
735 #include <stdlib.h> /* for malloc */ | 736 #include <stdlib.h> /* for malloc */ |
736 #include <assert.h> /* for a few sanity tests */ | 737 #include <assert.h> /* for a few sanity tests */ |
737 | 738 |
738 /* ----------------------------------------------------------------------------- | 739 /* ----------------------------------------------------------------------------- |
1218 | 1219 |
1219 SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration | 1220 SWIGINTERN void SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]); // forward declaration |
1220 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration | 1221 SWIGINTERN void SWIG_Lua_add_class_variable(lua_State* L,const char* name,lua_CFunction getFn,lua_CFunction setFn); // forward declaration |
1221 | 1222 |
1222 /* helper function - register namespace methods and attributes into namespace */ | 1223 /* helper function - register namespace methods and attributes into namespace */ |
1223 SWIGINTERN int SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns) | 1224 SWIGINTERN void SWIG_Lua_add_namespace_details(lua_State* L, swig_lua_namespace* ns) |
1224 { | 1225 { |
1225 int i = 0; | 1226 int i = 0; |
1226 assert(lua_istable(L,-1)); | 1227 assert(lua_istable(L,-1)); |
1227 /* There must be table at the top of the stack */ | 1228 /* There must be table at the top of the stack */ |
1228 SWIG_Lua_InstallConstants(L, ns->ns_constants); | 1229 SWIG_Lua_InstallConstants(L, ns->ns_constants); |
1242 } | 1243 } |
1243 lua_pop(L,1); | 1244 lua_pop(L,1); |
1244 | 1245 |
1245 /* clear stack - remove metatble */ | 1246 /* clear stack - remove metatble */ |
1246 lua_pop(L,1); | 1247 lua_pop(L,1); |
1247 return 0; | 1248 |
1248 } | 1249 } |
1249 | 1250 |
1250 /* helper function. creates namespace table and add it to module table */ | 1251 /* helper function. creates namespace table and add it to module table */ |
1251 SWIGINTERN int SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns) | 1252 SWIGINTERN void SWIG_Lua_namespace_register(lua_State* L, swig_lua_namespace* ns) |
1252 { | 1253 { |
1253 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */ | 1254 assert(lua_istable(L,-1)); /* just in case. This is supposed to be module table */ |
1254 lua_checkstack(L,5); | 1255 lua_checkstack(L,5); |
1255 lua_pushstring(L, ns->name); | 1256 lua_pushstring(L, ns->name); |
1256 lua_newtable(L); /* namespace itself */ | 1257 lua_newtable(L); /* namespace itself */ |
1273 SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get); | 1274 SWIG_Lua_add_function(L,"__index",SWIG_Lua_namespace_get); |
1274 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set); | 1275 SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_namespace_set); |
1275 | 1276 |
1276 lua_setmetatable(L,-2); /* set metatable */ | 1277 lua_setmetatable(L,-2); /* set metatable */ |
1277 lua_rawset(L,-3); /* add namespace to module table */ | 1278 lua_rawset(L,-3); /* add namespace to module table */ |
1278 return 0; | |
1279 } | 1279 } |
1280 /* ----------------------------------------------------------------------------- | 1280 /* ----------------------------------------------------------------------------- |
1281 * global variable support code: classes | 1281 * global variable support code: classes |
1282 * ----------------------------------------------------------------------------- */ | 1282 * ----------------------------------------------------------------------------- */ |
1283 | 1283 |
1880 namespace swig { | 1880 namespace swig { |
1881 typedef struct{} LANGUAGE_OBJ; | 1881 typedef struct{} LANGUAGE_OBJ; |
1882 } | 1882 } |
1883 | 1883 |
1884 | 1884 |
1885 #include "..\..\..\NewUI\Core\UIControl.h" | 1885 #include "UIControl.h" |
1886 | 1886 |
1887 #ifdef __cplusplus | 1887 #ifdef __cplusplus |
1888 extern "C" { | 1888 extern "C" { |
1889 #endif | 1889 #endif |
1890 static int _wrap_UIControl_Show(lua_State* L) { | 1890 static int _wrap_UIControl_Show(lua_State* L) { |