Browse Source

Remove warnings and errors for clang and g++

Shuffled some things around, and removed explicit namespaces where I could.

Created seperate macros for LUATYPEDEFINE and LUATYPEDECLARE in LuaType.h for core and controls to get around some namespaces.
Nate Starkey 13 years ago
parent
commit
026ddead22
63 changed files with 292 additions and 192 deletions
  1. 32 13
      Include/Rocket/Core/Lua/LuaType.h
  2. 14 6
      Source/Controls/Lua/DataFormatter.cpp
  3. 4 2
      Source/Controls/Lua/DataFormatter.h
  4. 12 5
      Source/Controls/Lua/DataSource.cpp
  5. 4 3
      Source/Controls/Lua/DataSource.h
  6. 14 7
      Source/Controls/Lua/ElementDataGrid.cpp
  7. 5 3
      Source/Controls/Lua/ElementDataGrid.h
  8. 12 6
      Source/Controls/Lua/ElementDataGridRow.cpp
  9. 5 4
      Source/Controls/Lua/ElementDataGridRow.h
  10. 14 10
      Source/Controls/Lua/ElementForm.cpp
  11. 6 3
      Source/Controls/Lua/ElementForm.h
  12. 13 7
      Source/Controls/Lua/ElementFormControl.cpp
  13. 4 2
      Source/Controls/Lua/ElementFormControl.h
  14. 16 10
      Source/Controls/Lua/ElementFormControlDataSelect.cpp
  15. 5 3
      Source/Controls/Lua/ElementFormControlDataSelect.h
  16. 13 7
      Source/Controls/Lua/ElementFormControlInput.cpp
  17. 5 3
      Source/Controls/Lua/ElementFormControlInput.h
  18. 15 10
      Source/Controls/Lua/ElementFormControlSelect.cpp
  19. 5 3
      Source/Controls/Lua/ElementFormControlSelect.h
  20. 13 7
      Source/Controls/Lua/ElementFormControlTextArea.cpp
  21. 5 3
      Source/Controls/Lua/ElementFormControlTextArea.h
  22. 15 8
      Source/Controls/Lua/ElementTabSet.cpp
  23. 5 3
      Source/Controls/Lua/ElementTabSet.h
  24. 16 10
      Source/Controls/Lua/SelectOptionsProxy.cpp
  25. 4 2
      Source/Controls/Lua/SelectOptionsProxy.h
  26. 0 8
      Source/Controls/Lua/precompiled.h
  27. 1 1
      Source/Core/Lua/Colourb.cpp
  28. 1 1
      Source/Core/Lua/Colourb.h
  29. 1 1
      Source/Core/Lua/Colourf.cpp
  30. 1 1
      Source/Core/Lua/Colourf.h
  31. 1 1
      Source/Core/Lua/Context.cpp
  32. 1 1
      Source/Core/Lua/Context.h
  33. 1 1
      Source/Core/Lua/ContextDocumentsProxy.cpp
  34. 1 1
      Source/Core/Lua/ContextDocumentsProxy.h
  35. 1 1
      Source/Core/Lua/Document.cpp
  36. 1 1
      Source/Core/Lua/Document.h
  37. 1 1
      Source/Core/Lua/Element.cpp
  38. 1 1
      Source/Core/Lua/Element.h
  39. 1 1
      Source/Core/Lua/ElementAttributesProxy.cpp
  40. 1 1
      Source/Core/Lua/ElementAttributesProxy.h
  41. 1 1
      Source/Core/Lua/ElementChildNodesProxy.cpp
  42. 1 1
      Source/Core/Lua/ElementChildNodesProxy.h
  43. 1 1
      Source/Core/Lua/ElementInstancer.cpp
  44. 1 1
      Source/Core/Lua/ElementInstancer.h
  45. 1 1
      Source/Core/Lua/ElementStyle.cpp
  46. 1 1
      Source/Core/Lua/ElementStyle.h
  47. 1 1
      Source/Core/Lua/ElementText.cpp
  48. 1 1
      Source/Core/Lua/ElementText.h
  49. 1 1
      Source/Core/Lua/Event.cpp
  50. 1 1
      Source/Core/Lua/Event.h
  51. 1 1
      Source/Core/Lua/EventParametersProxy.cpp
  52. 1 1
      Source/Core/Lua/EventParametersProxy.h
  53. 1 1
      Source/Core/Lua/Log.cpp
  54. 1 1
      Source/Core/Lua/Log.h
  55. 1 1
      Source/Core/Lua/Rocket.cpp
  56. 1 1
      Source/Core/Lua/Rocket.h
  57. 1 1
      Source/Core/Lua/RocketContextsProxy.cpp
  58. 1 1
      Source/Core/Lua/RocketContextsProxy.h
  59. 1 1
      Source/Core/Lua/Vector2f.cpp
  60. 1 1
      Source/Core/Lua/Vector2f.h
  61. 1 1
      Source/Core/Lua/Vector2i.cpp
  62. 1 1
      Source/Core/Lua/Vector2i.h
  63. 0 8
      Source/Core/Lua/precompiled.h

+ 32 - 13
Include/Rocket/Core/Lua/LuaType.h

@@ -57,23 +57,42 @@
  have to have functions named @c ElementMethods, @c ElementGetters, @c ElementSetters that return the appropriate
  types.
  @param is_reference_counted true if the type inherits from Rocket::Core::ReferenceCountable, false otherwise*/
-#define LUATYPEDEFINE(type,is_ref_counted) \
-    template<> const char* Rocket::Core::Lua::GetTClassName<type>() { return #type; } \
-    template<> Rocket::Core::Lua::RegType<type>* Rocket::Core::Lua::GetMethodTable<type>() { return type##Methods; } \
-    template<> luaL_reg* Rocket::Core::Lua::GetAttrTable<type>() { return type##Getters; } \
-    template<> luaL_reg* Rocket::Core::Lua::SetAttrTable<type>() { return type##Setters; } \
-    template<> bool Rocket::Core::Lua::IsReferenceCounted<type>() { return (is_ref_counted); } \
+#define LUACORETYPEDEFINE(type,is_ref_counted) \
+    template<> const char* GetTClassName<type>() { return #type; } \
+    template<> RegType<type>* GetMethodTable<type>() { return type##Methods; } \
+    template<> luaL_reg* GetAttrTable<type>() { return type##Getters; } \
+    template<> luaL_reg* SetAttrTable<type>() { return type##Setters; } \
+    template<> bool IsReferenceCounted<type>() { return (is_ref_counted); } \
+
+//We can't use LUACORETYPEDEFINE due to namespace issues
+#define LUACONTROLSTYPEDEFINE(type,is_ref_counted) \
+    template<> const char* GetTClassName<type>() { return #type; } \
+    template<> RegType<type>* GetMethodTable<type>() { return Rocket::Controls::Lua::type##Methods; } \
+    template<> luaL_reg* GetAttrTable<type>() { return Rocket::Controls::Lua::type##Getters; } \
+    template<> luaL_reg* SetAttrTable<type>() { return Rocket::Controls::Lua::type##Setters; } \
+    template<> bool IsReferenceCounted<type>() { return (is_ref_counted); } \
 
 /** Used to remove repetitive typing at the cost of flexibility. It creates function prototypes for
 getting the name of the type, method tables, and if it is reference counted.
 When you use this, you either must also use
-the LUATYPEDEFINE macro, or make sure that the function signatures are @em exact.*/
-#define LUATYPEDECLARE(type) \
-    template<> ROCKETLUA_API const char* Rocket::Core::Lua::GetTClassName<type>(); \
-    template<> ROCKETLUA_API Rocket::Core::Lua::RegType<type>* Rocket::Core::Lua::GetMethodTable<type>(); \
-    template<> ROCKETLUA_API luaL_reg* Rocket::Core::Lua::GetAttrTable<type>(); \
-    template<> ROCKETLUA_API luaL_reg* Rocket::Core::Lua::SetAttrTable<type>(); \
-    template<> ROCKETLUA_API bool Rocket::Core::Lua::IsReferenceCounted<type>(); \
+the LUACORETYPEDEFINE macro, or make sure that the function signatures are @em exact.*/
+#define LUACORETYPEDECLARE(type) \
+    template<> ROCKETLUA_API const char* GetTClassName<type>(); \
+    template<> ROCKETLUA_API RegType<type>* GetMethodTable<type>(); \
+    template<> ROCKETLUA_API luaL_reg* GetAttrTable<type>(); \
+    template<> ROCKETLUA_API luaL_reg* SetAttrTable<type>(); \
+    template<> ROCKETLUA_API bool IsReferenceCounted<type>(); \
+
+/** Used to remove repetitive typing at the cost of flexibility. It creates function prototypes for
+getting the name of the type, method tables, and if it is reference counted.
+When you use this, you either must also use
+the LUACORETYPEDEFINE macro, or make sure that the function signatures are @em exact.*/
+#define LUACONTROLSTYPEDECLARE(type) \
+    template<> ROCKETLUA_API const char* GetTClassName<type>(); \
+    template<> ROCKETLUA_API RegType<type>* GetMethodTable<type>(); \
+    template<> ROCKETLUA_API luaL_reg* GetAttrTable<type>(); \
+    template<> ROCKETLUA_API luaL_reg* SetAttrTable<type>(); \
+    template<> ROCKETLUA_API bool IsReferenceCounted<type>(); \
 
 namespace Rocket {
 namespace Core {

+ 14 - 6
Source/Controls/Lua/DataFormatter.cpp

@@ -28,12 +28,7 @@
 #include "precompiled.h"
 #include "DataFormatter.h"
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::Lua::DataFormatter>(lua_State* L, int metatable_index)
-{
-    lua_pushcfunction(L,Rocket::Controls::Lua::DataFormatternew);
-    lua_setfield(L,metatable_index-1,"new");
-    return;
-}
+
 using Rocket::Core::Log;
 namespace Rocket {
 namespace Controls {
@@ -109,5 +104,18 @@ luaL_reg DataFormatterSetters[] =
 }
 }
 }
+
+namespace Rocket {
+namespace Core {
+namespace Lua {
 using Rocket::Controls::Lua::DataFormatter;
+template<> void ExtraInit<DataFormatter>(lua_State* L, int metatable_index)
+{
+    lua_pushcfunction(L,Rocket::Controls::Lua::DataFormatternew);
+    lua_setfield(L,metatable_index-1,"new");
+    return;
+}
 LUACONTROLSTYPEDEFINE(DataFormatter,false)
+}
+}
+}

+ 4 - 2
Source/Controls/Lua/DataFormatter.h

@@ -51,6 +51,8 @@ extern luaL_reg DataFormatterSetters[];
 }
 }
 //for DataFormatter.new
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::Lua::DataFormatter>(lua_State* L, int metatable_index);
-LUATYPEDECLARE(Rocket::Controls::Lua::DataFormatter)
+namespace Rocket { namespace Core { namespace Lua {
+template<> void ExtraInit<Rocket::Controls::Lua::DataFormatter>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::Lua::DataFormatter)
+}}}
 #endif

+ 12 - 5
Source/Controls/Lua/DataSource.cpp

@@ -30,10 +30,7 @@
 #include <Rocket/Core/Log.h>
 
 using Rocket::Core::Log;
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::Lua::LuaDataSource>(lua_State* L, int metatable_index) 
-{ 
-    return; 
-}
+
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -138,5 +135,15 @@ luaL_reg DataSourceSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::Lua::LuaDataSource>(lua_State* L, int metatable_index) 
+{ 
+    return; 
+}
 using Rocket::Controls::Lua::DataSource;
-LUACONTROLSTYPEDEFINE(DataSource,false)
+LUACONTROLSTYPEDEFINE(DataSource,false)
+}
+}
+}

+ 4 - 3
Source/Controls/Lua/DataSource.h

@@ -33,7 +33,6 @@
 #include "LuaDataSource.h"
 
 using Rocket::Core::Lua::LuaType;
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::Lua::LuaDataSource>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -57,6 +56,8 @@ extern luaL_reg DataSourceSetters[];
 }
 }
 }
-
-LUATYPEDECLARE(Rocket::Controls::Lua::DataSource)
+namespace Rocket { namespace Core { namespace Lua {
+template<> void ExtraInit<Rocket::Controls::Lua::LuaDataSource>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::Lua::DataSource)
+}}}
 #endif

+ 14 - 7
Source/Controls/Lua/ElementDataGrid.cpp

@@ -31,12 +31,7 @@
 #include <Rocket/Controls/ElementDataGridRow.h>
 #include <Rocket/Core/Lua/Utilities.h>
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementDataGrid>(lua_State* L, int metatable_index)
-{
-    Rocket::Core::Lua::ExtraInit<Rocket::Core::Element>(L,metatable_index);
-    LuaType<Rocket::Core::Element>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementDataGrid>(L);
-}
+
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -108,5 +103,17 @@ luaL_reg ElementDataGridSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::ElementDataGrid>(lua_State* L, int metatable_index)
+{
+    ExtraInit<Element>(L,metatable_index);
+    LuaType<Element>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementDataGrid>(L);
+}
 using Rocket::Controls::ElementDataGrid;
-LUACONTROLSTYPEDEFINE(ElementDataGrid,true)
+LUACONTROLSTYPEDEFINE(ElementDataGrid,true)
+}
+}
+}

+ 5 - 3
Source/Controls/Lua/ElementDataGrid.h

@@ -34,8 +34,6 @@
 #include <Rocket/Controls/ElementDataGrid.h>
 
 using Rocket::Core::Lua::LuaType;
-//this will be used to "inherit" from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementDataGrid>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -56,5 +54,9 @@ extern luaL_reg ElementDataGridSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementDataGrid)
+namespace Rocket { namespace Core { namespace Lua {
+//this will be used to "inherit" from Element
+template<> void ExtraInit<Rocket::Controls::ElementDataGrid>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementDataGrid)
+}}}
 #endif

+ 12 - 6
Source/Controls/Lua/ElementDataGridRow.cpp

@@ -30,12 +30,6 @@
 #include <Rocket/Controls/ElementDataGrid.h>
 #include <Rocket/Core/Lua/Utilities.h>
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementDataGridRow>(lua_State* L, int metatable_index)
-{
-    Rocket::Core::Lua::ExtraInit<Rocket::Core::Element>(L,metatable_index);
-    LuaType<Rocket::Core::Element>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementDataGridRow>(L);
-}
 
 namespace Rocket {
 namespace Controls {
@@ -123,5 +117,17 @@ luaL_reg ElementDataGridRowSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::ElementDataGridRow>(lua_State* L, int metatable_index)
+{
+    ExtraInit<Element>(L,metatable_index);
+    LuaType<Element>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementDataGridRow>(L);
+}
 using Rocket::Controls::ElementDataGridRow;
 LUACONTROLSTYPEDEFINE(ElementDataGridRow,true)
+}
+}
+}

+ 5 - 4
Source/Controls/Lua/ElementDataGridRow.h

@@ -34,9 +34,6 @@
 #include <Rocket/Controls/ElementDataGridRow.h>
 
 using Rocket::Core::Lua::LuaType;
-//this will be used to "inherit" from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementDataGridRow>(lua_State* L, int metatable_index);
-
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -61,5 +58,9 @@ extern luaL_reg ElementDataGridRowSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementDataGridRow)
+namespace Rocket { namespace Core { namespace Lua {
+//this will be used to "inherit" from Element
+template<> void ExtraInit<Rocket::Controls::ElementDataGridRow>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementDataGridRow)
+}}}
 #endif

+ 14 - 10
Source/Controls/Lua/ElementForm.cpp

@@ -31,15 +31,6 @@
 #include <Rocket/Controls/ElementForm.h>
 #include <Rocket/Core/Lua/Utilities.h>
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementForm>(lua_State* L, int metatable_index)
-{
-    //inherit from Element
-    Rocket::Core::Lua::ExtraInit<Rocket::Core::Element>(L,metatable_index);
-    LuaType<Rocket::Core::Element>::_regfunctions(L,metatable_index,metatable_index-1);
-
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementForm>(L);
-}
-
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -80,5 +71,18 @@ luaL_reg ElementFormSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::ElementForm>(lua_State* L, int metatable_index)
+{
+    //inherit from Element
+    ExtraInit<Element>(L,metatable_index);
+    LuaType<Element>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementForm>(L);
+}
 using Rocket::Controls::ElementForm;
-LUACONTROLSTYPEDEFINE(ElementForm,true)
+LUACONTROLSTYPEDEFINE(ElementForm,true)
+}
+}
+}

+ 6 - 3
Source/Controls/Lua/ElementForm.h

@@ -33,8 +33,7 @@
 #include <Rocket/Controls/ElementForm.h>
 
 using Rocket::Core::Lua::LuaType;
-//this will be used to "inherit" from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementForm>(lua_State* L, int metatable_index);
+
 
 namespace Rocket {
 namespace Controls {
@@ -49,5 +48,9 @@ extern luaL_reg ElementFormSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementForm)
+namespace Rocket { namespace Core { namespace Lua {
+//this will be used to "inherit" from Element
+template<> void ExtraInit<Rocket::Controls::ElementForm>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementForm)
+}}}
 #endif

+ 13 - 7
Source/Controls/Lua/ElementFormControl.cpp

@@ -32,12 +32,6 @@
 #include <Rocket/../../Source/Core/Lua/Element.h>
 #include <Rocket/Core/Lua/Utilities.h>
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControl>(lua_State* L, int metatable_index)
-{
-    Rocket::Core::Lua::ExtraInit<Rocket::Core::Element>(L,metatable_index);
-    LuaType<Rocket::Core::Element>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementFormControl>(L);
-}
 
 namespace Rocket {
 namespace Controls {
@@ -121,5 +115,17 @@ luaL_reg ElementFormControlSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::ElementFormControl>(lua_State* L, int metatable_index)
+{
+    ExtraInit<Element>(L,metatable_index);
+    LuaType<Element>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementFormControl>(L);
+}
 using Rocket::Controls::ElementFormControl;
-LUACONTROLSTYPEDEFINE(ElementFormControl,true)
+LUACONTROLSTYPEDEFINE(ElementFormControl,true)
+}
+}
+}

+ 4 - 2
Source/Controls/Lua/ElementFormControl.h

@@ -33,7 +33,6 @@
 #include <Rocket/Controls/ElementFormControl.h>
 
 using Rocket::Core::Lua::LuaType;
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControl>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -55,6 +54,9 @@ extern luaL_reg ElementFormControlSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementFormControl)
+namespace Rocket { namespace Core { namespace Lua {
+template<> void ExtraInit<Rocket::Controls::ElementFormControl>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementFormControl)
+}}}
 #endif
 

+ 16 - 10
Source/Controls/Lua/ElementFormControlDataSelect.cpp

@@ -31,16 +31,6 @@
 #include "ElementFormControlSelect.h"
 #include <Rocket/Core/Lua/Utilities.h>
 
-//inherits from ElementFormControl which inherits from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlDataSelect>(lua_State* L, int metatable_index)
-{
-    //do whatever ElementFormControlSelect did as far as inheritance
-    Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlSelect>(L,metatable_index);
-    //then inherit from ElementFromControlSelect
-    LuaType<Rocket::Controls::ElementFormControlSelect>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementFormControlDataSelect>(L);
-}
-
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -72,5 +62,21 @@ luaL_reg ElementFormControlDataSelectSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+//inherits from ElementFormControl which inherits from Element
+template<> void ExtraInit<Rocket::Controls::ElementFormControlDataSelect>(lua_State* L, int metatable_index)
+{
+    //do whatever ElementFormControlSelect did as far as inheritance
+    ExtraInit<Rocket::Controls::ElementFormControlSelect>(L,metatable_index);
+    //then inherit from ElementFromControlSelect
+    LuaType<Rocket::Controls::ElementFormControlSelect>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementFormControlDataSelect>(L);
+}
+
 using Rocket::Controls::ElementFormControlDataSelect;
 LUACONTROLSTYPEDEFINE(ElementFormControlDataSelect,true)
+}
+}
+}

+ 5 - 3
Source/Controls/Lua/ElementFormControlDataSelect.h

@@ -33,8 +33,6 @@
 #include <Rocket/Controls/ElementFormControlDataSelect.h>
 
 using Rocket::Core::Lua::LuaType;
-//inherits from ElementFormControl which inherits from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlDataSelect>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -49,5 +47,9 @@ extern luaL_reg ElementFormControlDataSelectSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementFormControlDataSelect)
+namespace Rocket { namespace Core { namespace Lua {
+//inherits from ElementFormControl which inherits from Element
+template<> void ExtraInit<Rocket::Controls::ElementFormControlDataSelect>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementFormControlDataSelect)
+}}}
 #endif

+ 13 - 7
Source/Controls/Lua/ElementFormControlInput.cpp

@@ -31,12 +31,6 @@
 #include "ElementFormControl.h"
 #include <Rocket/Core/Lua/Utilities.h>
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlInput>(lua_State* L, int metatable_index)
-{
-    Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControl>(L,metatable_index);
-    LuaType<Rocket::Controls::ElementFormControl>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementFormControlInput>(L);
-}
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -181,5 +175,17 @@ luaL_reg ElementFormControlInputSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::ElementFormControlInput>(lua_State* L, int metatable_index)
+{
+    ExtraInit<Rocket::Controls::ElementFormControl>(L,metatable_index);
+    LuaType<Rocket::Controls::ElementFormControl>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementFormControlInput>(L);
+}
 using Rocket::Controls::ElementFormControlInput;
-LUACONTROLSTYPEDEFINE(ElementFormControlInput,true)
+LUACONTROLSTYPEDEFINE(ElementFormControlInput,true)
+}
+}
+}

+ 5 - 3
Source/Controls/Lua/ElementFormControlInput.h

@@ -33,8 +33,6 @@
 #include <Rocket/Controls/ElementFormControlInput.h>
 
 using Rocket::Core::Lua::LuaType;
-//inherits from ElementFormControl which inherits from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlInput>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -62,5 +60,9 @@ extern luaL_reg ElementFormControlInputSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementFormControlInput)
+namespace Rocket { namespace Core { namespace Lua {
+//inherits from ElementFormControl which inherits from Element
+template<> void ExtraInit<Rocket::Controls::ElementFormControlInput>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementFormControlInput)
+}}}
 #endif

+ 15 - 10
Source/Controls/Lua/ElementFormControlSelect.cpp

@@ -35,16 +35,6 @@
 #include <Rocket/Core/Lua/Utilities.h>
 
 
-//inherits from ElementFormControl which inherits from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlSelect>(lua_State* L, int metatable_index)
-{
-    //init whatever elementformcontrol did extra, like inheritance
-    Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControl>(L,metatable_index);
-    //then inherit from elementformcontrol
-    LuaType<Rocket::Controls::ElementFormControl>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementFormControlSelect>(L);
-}
-
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -125,5 +115,20 @@ luaL_reg ElementFormControlSelectSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+//inherits from ElementFormControl which inherits from Element
+template<> void ExtraInit<Rocket::Controls::ElementFormControlSelect>(lua_State* L, int metatable_index)
+{
+    //init whatever elementformcontrol did extra, like inheritance
+    ExtraInit<Rocket::Controls::ElementFormControl>(L,metatable_index);
+    //then inherit from elementformcontrol
+    LuaType<Rocket::Controls::ElementFormControl>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementFormControlSelect>(L);
+}
 using Rocket::Controls::ElementFormControlSelect;
 LUACONTROLSTYPEDEFINE(ElementFormControlSelect,true)
+}
+}
+}

+ 5 - 3
Source/Controls/Lua/ElementFormControlSelect.h

@@ -33,8 +33,6 @@
 #include <Rocket/Controls/ElementFormControlSelect.h>
 
 using Rocket::Core::Lua::LuaType;
-//inherits from ElementFormControl which inherits from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlSelect>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -57,5 +55,9 @@ extern luaL_reg ElementFormControlSelectSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementFormControlSelect)
+namespace Rocket { namespace Core { namespace Lua {
+//inherits from ElementFormControl which inherits from Element
+template<> void ExtraInit<Rocket::Controls::ElementFormControlSelect>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementFormControlSelect)
+}}}
 #endif

+ 13 - 7
Source/Controls/Lua/ElementFormControlTextArea.cpp

@@ -31,13 +31,6 @@
 #include "ElementFormControl.h"
 #include <Rocket/Core/Lua/Utilities.h>
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlTextArea>(lua_State* L, int metatable_index)
-{
-    Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControl>(L,metatable_index);
-    LuaType<Rocket::Controls::ElementFormControl>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementFormControlTextArea>(L);
-}
-
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -140,5 +133,18 @@ luaL_reg ElementFormControlTextAreaSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::ElementFormControlTextArea>(lua_State* L, int metatable_index)
+{
+    ExtraInit<Rocket::Controls::ElementFormControl>(L,metatable_index);
+    LuaType<Rocket::Controls::ElementFormControl>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementFormControlTextArea>(L);
+}
+
 using Rocket::Controls::ElementFormControlTextArea;
 LUACONTROLSTYPEDEFINE(ElementFormControlTextArea,true)
+}
+}
+}

+ 5 - 3
Source/Controls/Lua/ElementFormControlTextArea.h

@@ -33,8 +33,6 @@
 #include <Rocket/Controls/ElementFormControlTextArea.h>
 
 using Rocket::Core::Lua::LuaType;
-//inherits from ElementFormControl which inherits from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementFormControlTextArea>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -58,5 +56,9 @@ extern luaL_reg ElementFormControlTextAreaSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementFormControlTextArea)
+namespace Rocket { namespace Core { namespace Lua {
+//inherits from ElementFormControl which inherits from Element
+template<> void ExtraInit<Rocket::Controls::ElementFormControlTextArea>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementFormControlTextArea)
+}}}
 #endif

+ 15 - 8
Source/Controls/Lua/ElementTabSet.cpp

@@ -30,13 +30,6 @@
 #include <Rocket/Core/Element.h>
 #include <Rocket/Core/Lua/Utilities.h>
 
-//this will be used to "inherit" from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementTabSet>(lua_State* L, int metatable_index)
-{
-    Rocket::Core::Lua::ExtraInit<Rocket::Core::Element>(L,metatable_index);
-    LuaType<Rocket::Core::Element>::_regfunctions(L,metatable_index,metatable_index-1);
-    Rocket::Core::Lua::AddTypeToElementAsTable<Rocket::Controls::ElementTabSet>(L);
-}
 
 namespace Rocket {
 namespace Controls {
@@ -120,5 +113,19 @@ luaL_reg ElementTabSetSetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+//this will be used to "inherit" from Element
+template<> void ExtraInit<Rocket::Controls::ElementTabSet>(lua_State* L, int metatable_index)
+{
+    ExtraInit<Element>(L,metatable_index);
+    LuaType<Element>::_regfunctions(L,metatable_index,metatable_index-1);
+    AddTypeToElementAsTable<Rocket::Controls::ElementTabSet>(L);
+}
+
 using Rocket::Controls::ElementTabSet;
-LUACONTROLSTYPEDEFINE(ElementTabSet,true)
+LUACONTROLSTYPEDEFINE(ElementTabSet,true)
+}
+}
+}

+ 5 - 3
Source/Controls/Lua/ElementTabSet.h

@@ -33,8 +33,6 @@
 #include <Rocket/Controls/ElementTabSet.h>
 
 using Rocket::Core::Lua::LuaType;
-//this will be used to "inherit" from Element
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::ElementTabSet>(lua_State* L, int metatable_index);
 namespace Rocket {
 namespace Controls {
 namespace Lua {
@@ -58,5 +56,9 @@ extern luaL_reg ElementTabSetSetters[];
 }
 }
 }
-LUATYPEDECLARE(Rocket::Controls::ElementTabSet)
+namespace Rocket { namespace Core { namespace Lua {
+//this will be used to "inherit" from Element
+template<> void ExtraInit<Rocket::Controls::ElementTabSet>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::ElementTabSet)
+}}}
 #endif

+ 16 - 10
Source/Controls/Lua/SelectOptionsProxy.cpp

@@ -29,16 +29,6 @@
 #include "SelectOptionsProxy.h"
 #include <Rocket/Core/Element.h>
 
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::Lua::SelectOptionsProxy>(lua_State* L, int metatable_index)
-{
-    lua_pushcfunction(L,Rocket::Controls::Lua::SelectOptionsProxy__index);
-    lua_setfield(L,metatable_index,"__index");
-    lua_pushcfunction(L,Rocket::Controls::Lua::SelectOptionsProxy__pairs);
-    lua_setfield(L,metatable_index,"__pairs");
-    lua_pushcfunction(L,Rocket::Controls::Lua::SelectOptionsProxy__ipairs);
-    lua_setfield(L,metatable_index,"__ipairs");
-}
-
 
 namespace Rocket {
 namespace Controls {
@@ -126,5 +116,21 @@ luaL_reg SelectOptionsProxySetters[] =
 }
 }
 }
+namespace Rocket {
+namespace Core {
+namespace Lua {
+template<> void ExtraInit<Rocket::Controls::Lua::SelectOptionsProxy>(lua_State* L, int metatable_index)
+{
+    lua_pushcfunction(L,Rocket::Controls::Lua::SelectOptionsProxy__index);
+    lua_setfield(L,metatable_index,"__index");
+    lua_pushcfunction(L,Rocket::Controls::Lua::SelectOptionsProxy__pairs);
+    lua_setfield(L,metatable_index,"__pairs");
+    lua_pushcfunction(L,Rocket::Controls::Lua::SelectOptionsProxy__ipairs);
+    lua_setfield(L,metatable_index,"__ipairs");
+}
+
 using Rocket::Controls::Lua::SelectOptionsProxy;
 LUACONTROLSTYPEDEFINE(SelectOptionsProxy,false);
+}
+}
+}

+ 4 - 2
Source/Controls/Lua/SelectOptionsProxy.h

@@ -50,6 +50,8 @@ extern luaL_reg SelectOptionsProxySetters[];
 }
 }
 }
-template<> void Rocket::Core::Lua::ExtraInit<Rocket::Controls::Lua::SelectOptionsProxy>(lua_State* L, int metatable_index);
-LUATYPEDECLARE(Rocket::Controls::Lua::SelectOptionsProxy)
+namespace Rocket { namespace Core { namespace Lua {
+template<> void ExtraInit<Rocket::Controls::Lua::SelectOptionsProxy>(lua_State* L, int metatable_index);
+LUACONTROLSTYPEDECLARE(Rocket::Controls::Lua::SelectOptionsProxy)
+}}}
 #endif

+ 0 - 8
Source/Controls/Lua/precompiled.h

@@ -32,12 +32,4 @@
 #include <Rocket/Core/Debug.h>
 #include <Rocket/Controls/Controls.h>
 #include <Rocket/Core/Lua/LuaType.h>
-//We can't use LUATYPEDEFINE from LuaType.h due to namespace issues
-#define LUACONTROLSTYPEDEFINE(type,is_ref_counted) \
-    template<> const char* Rocket::Core::Lua::GetTClassName<type>() { return #type; } \
-    template<> Rocket::Core::Lua::RegType<type>* Rocket::Core::Lua::GetMethodTable<type>() { return Rocket::Controls::Lua::type##Methods; } \
-    template<> luaL_reg* Rocket::Core::Lua::GetAttrTable<type>() { return Rocket::Controls::Lua::type##Getters; } \
-    template<> luaL_reg* Rocket::Core::Lua::SetAttrTable<type>() { return Rocket::Controls::Lua::type##Setters; } \
-    template<> bool Rocket::Core::Lua::IsReferenceCounted<type>() { return (is_ref_counted); } \
-
 #endif

+ 1 - 1
Source/Core/Lua/Colourb.cpp

@@ -232,7 +232,7 @@ luaL_reg ColourbSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Colourb,false)
+LUACORETYPEDEFINE(Colourb,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Colourb.h

@@ -61,7 +61,7 @@ extern RegType<Colourb> ColourbMethods[];
 extern luaL_reg ColourbGetters[];
 extern luaL_reg ColourbSetters[];
 
-LUATYPEDECLARE(Colourb)
+LUACORETYPEDECLARE(Colourb)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Colourf.cpp

@@ -202,7 +202,7 @@ luaL_reg ColourfSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Colourf,false)
+LUACORETYPEDEFINE(Colourf,false)
 
 
 }

+ 1 - 1
Source/Core/Lua/Colourf.h

@@ -59,7 +59,7 @@ extern RegType<Colourf> ColourfMethods[];
 extern luaL_reg ColourfGetters[];
 extern luaL_reg ColourfSetters[];
 
-LUATYPEDECLARE(Colourf)
+LUACORETYPEDECLARE(Colourf)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Context.cpp

@@ -260,7 +260,7 @@ luaL_reg ContextSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Context,true)
+LUACORETYPEDEFINE(Context,true)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Context.h

@@ -68,7 +68,7 @@ extern RegType<Context> ContextMethods[];
 extern luaL_reg ContextGetters[];
 extern luaL_reg ContextSetters[];
 
-LUATYPEDECLARE(Context)
+LUACORETYPEDECLARE(Context)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ContextDocumentsProxy.cpp

@@ -147,7 +147,7 @@ luaL_reg ContextDocumentsProxySetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(ContextDocumentsProxy,false)
+LUACORETYPEDEFINE(ContextDocumentsProxy,false)
 
 }
 }

+ 1 - 1
Source/Core/Lua/ContextDocumentsProxy.h

@@ -47,7 +47,7 @@ extern RegType<ContextDocumentsProxy> ContextDocumentsProxyMethods[];
 extern luaL_reg ContextDocumentsProxyGetters[];
 extern luaL_reg ContextDocumentsProxySetters[];
 
-LUATYPEDECLARE(ContextDocumentsProxy)
+LUACORETYPEDECLARE(ContextDocumentsProxy)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Document.cpp

@@ -170,7 +170,7 @@ luaL_reg DocumentSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Document,true)
+LUACORETYPEDEFINE(Document,true)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Document.h

@@ -60,7 +60,7 @@ extern RegType<Document> DocumentMethods[];
 extern luaL_reg DocumentGetters[];
 extern luaL_reg DocumentSetters[];
 
-LUATYPEDECLARE(Document)
+LUACORETYPEDECLARE(Document)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Element.cpp

@@ -598,7 +598,7 @@ luaL_reg ElementSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Element,true)
+LUACORETYPEDEFINE(Element,true)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Element.h

@@ -100,7 +100,7 @@ extern RegType<Element> ElementMethods[];
 extern luaL_reg ElementGetters[];
 extern luaL_reg ElementSetters[];
 
-LUATYPEDECLARE(Element)
+LUACORETYPEDECLARE(Element)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementAttributesProxy.cpp

@@ -105,7 +105,7 @@ luaL_reg ElementAttributesProxySetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(ElementAttributesProxy,false)
+LUACORETYPEDEFINE(ElementAttributesProxy,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementAttributesProxy.h

@@ -47,7 +47,7 @@ extern RegType<ElementAttributesProxy> ElementAttributesProxyMethods[];
 extern luaL_reg ElementAttributesProxyGetters[];
 extern luaL_reg ElementAttributesProxySetters[];
 
-LUATYPEDECLARE(ElementAttributesProxy)
+LUACORETYPEDECLARE(ElementAttributesProxy)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementChildNodesProxy.cpp

@@ -103,7 +103,7 @@ luaL_reg ElementChildNodesProxySetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(ElementChildNodesProxy,false)
+LUACORETYPEDEFINE(ElementChildNodesProxy,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementChildNodesProxy.h

@@ -48,7 +48,7 @@ extern RegType<ElementChildNodesProxy> ElementChildNodesProxyMethods[];
 extern luaL_reg ElementChildNodesProxyGetters[];
 extern luaL_reg ElementChildNodesProxySetters[];
 
-LUATYPEDECLARE(ElementChildNodesProxy)
+LUACORETYPEDECLARE(ElementChildNodesProxy)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementInstancer.cpp

@@ -82,7 +82,7 @@ luaL_reg ElementInstancerSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(ElementInstancer,true)
+LUACORETYPEDEFINE(ElementInstancer,true)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementInstancer.h

@@ -45,7 +45,7 @@ extern RegType<ElementInstancer> ElementInstancerMethods[];
 extern luaL_reg ElementInstancerGetters[];
 extern luaL_reg ElementInstancerSetters[];
 
-LUATYPEDECLARE(ElementInstancer)
+LUACORETYPEDECLARE(ElementInstancer)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementStyle.cpp

@@ -163,7 +163,7 @@ luaL_reg ElementStyleSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(ElementStyle,false)
+LUACORETYPEDEFINE(ElementStyle,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementStyle.h

@@ -45,7 +45,7 @@ extern RegType<ElementStyle> ElementStyleMethods[];
 extern luaL_reg ElementStyleGetters[];
 extern luaL_reg ElementStyleSetters[];
 
-LUATYPEDECLARE(ElementStyle)
+LUACORETYPEDECLARE(ElementStyle)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementText.cpp

@@ -76,7 +76,7 @@ luaL_reg ElementTextSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(ElementText,true)
+LUACORETYPEDEFINE(ElementText,true)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/ElementText.h

@@ -45,7 +45,7 @@ extern RegType<ElementText> ElementTextMethods[];
 extern luaL_reg ElementTextGetters[];
 extern luaL_reg ElementTextSetters[];
 
-LUATYPEDECLARE(ElementText)
+LUACORETYPEDECLARE(ElementText)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Event.cpp

@@ -104,7 +104,7 @@ luaL_reg EventSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Event,true)
+LUACORETYPEDEFINE(Event,true)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Event.h

@@ -48,7 +48,7 @@ extern RegType<Event> EventMethods[];
 extern luaL_reg EventGetters[];
 extern luaL_reg EventSetters[];
 
-LUATYPEDECLARE(Event)
+LUACORETYPEDECLARE(Event)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/EventParametersProxy.cpp

@@ -108,7 +108,7 @@ luaL_reg EventParametersProxySetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(EventParametersProxy,false)
+LUACORETYPEDEFINE(EventParametersProxy,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/EventParametersProxy.h

@@ -47,7 +47,7 @@ extern RegType<EventParametersProxy> EventParametersProxyMethods[];
 extern luaL_reg EventParametersProxyGetters[];
 extern luaL_reg EventParametersProxySetters[];
 
-LUATYPEDECLARE(EventParametersProxy)
+LUACORETYPEDECLARE(EventParametersProxy)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Log.cpp

@@ -94,7 +94,7 @@ luaL_reg LogSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Log,false)
+LUACORETYPEDEFINE(Log,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Log.h

@@ -39,7 +39,7 @@ extern RegType<Log> LogMethods[];
 extern luaL_reg LogGetters[];
 extern luaL_reg LogSetters[];
 
-LUATYPEDECLARE(Log)
+LUACORETYPEDECLARE(Log)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Rocket.cpp

@@ -307,7 +307,7 @@ luaL_reg LuaRocketSetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(LuaRocket,false)
+LUACORETYPEDEFINE(LuaRocket,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Rocket.h

@@ -54,7 +54,7 @@ extern RegType<LuaRocket> LuaRocketMethods[];
 extern luaL_reg LuaRocketGetters[];
 extern luaL_reg LuaRocketSetters[];
 
-LUATYPEDECLARE(LuaRocket)
+LUACORETYPEDECLARE(LuaRocket)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/RocketContextsProxy.cpp

@@ -135,7 +135,7 @@ luaL_reg RocketContextsProxySetters[] =
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(RocketContextsProxy,false)
+LUACORETYPEDEFINE(RocketContextsProxy,false)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/RocketContextsProxy.h

@@ -47,7 +47,7 @@ extern RegType<RocketContextsProxy> RocketContextsProxyMethods[];
 extern luaL_reg RocketContextsProxyGetters[];
 extern luaL_reg RocketContextsProxySetters[];
 
-LUATYPEDECLARE(RocketContextsProxy)
+LUACORETYPEDECLARE(RocketContextsProxy)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Vector2f.cpp

@@ -237,7 +237,7 @@ luaL_reg Vector2fSetters[]=
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Vector2f,false)
+LUACORETYPEDEFINE(Vector2f,false)
 
 }
 }

+ 1 - 1
Source/Core/Lua/Vector2f.h

@@ -61,7 +61,7 @@ extern RegType<Vector2f> Vector2fMethods[];
 extern luaL_reg Vector2fGetters[];
 extern luaL_reg Vector2fSetters[];
 
-LUATYPEDECLARE(Vector2f)
+LUACORETYPEDECLARE(Vector2f)
 }
 }
 }

+ 1 - 1
Source/Core/Lua/Vector2i.cpp

@@ -201,7 +201,7 @@ luaL_reg Vector2iSetters[]=
     { NULL, NULL },
 };
 
-LUATYPEDEFINE(Vector2i,false)
+LUACORETYPEDEFINE(Vector2i,false)
 
 }
 }

+ 1 - 1
Source/Core/Lua/Vector2i.h

@@ -58,7 +58,7 @@ extern RegType<Vector2i> Vector2iMethods[];
 extern luaL_reg Vector2iGetters[];
 extern luaL_reg Vector2iSetters[];
 
-LUATYPEDECLARE(Vector2i)
+LUACORETYPEDECLARE(Vector2i)
 }
 }
 }

+ 0 - 8
Source/Core/Lua/precompiled.h

@@ -32,12 +32,4 @@
 #include <Rocket/Core/Debug.h>
 #include <Rocket/Controls/Controls.h>
 #include <Rocket/Core/Lua/LuaType.h>
-//We can't use LUATYPEDEFINE from LuaType.h due to namespace issues
-#define LUACONTROLSTYPEDEFINE(type,is_ref_counted) \
-    template<> const char* Rocket::Core::Lua::GetTClassName<type>() { return #type; } \
-    template<> Rocket::Core::Lua::RegType<type>* Rocket::Core::Lua::GetMethodTable<type>() { return Rocket::Controls::Lua::type##Methods; } \
-    template<> luaL_reg* Rocket::Core::Lua::GetAttrTable<type>() { return Rocket::Controls::Lua::type##Getters; } \
-    template<> luaL_reg* Rocket::Core::Lua::SetAttrTable<type>() { return Rocket::Controls::Lua::type##Setters; } \
-    template<> bool Rocket::Core::Lua::IsReferenceCounted<type>() { return (is_ref_counted); } \
-
 #endif