Rocket.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. /*
  3. This declares rocket in the global Lua namespace
  4. It is not exactly type, but it is a table, and does have some methods and attributes
  5. methods:
  6. rocket.CreateContext(string name, Vector2i dimensions)
  7. rocket.LoadFontFace(string font_path)
  8. getters:
  9. rocket.contexts returns a table of contexts, which are indexed by number or string
  10. */
  11. #include "LuaType.h"
  12. #include "lua.hpp"
  13. namespace Rocket {
  14. namespace Core {
  15. namespace Lua {
  16. //just need a class to take up a type name
  17. class rocket { int to_remove_warning; };
  18. template<> void LuaType<rocket>::extra_init(lua_State* L, int metatable_index);
  19. int rocketCreateContext(lua_State* L);
  20. int rocketLoadFontFace(lua_State* L);
  21. int rocketRegisterTag(lua_State* L);
  22. int rocketGetAttrcontexts(lua_State* L);
  23. RegType<rocket> rocketMethods[];
  24. luaL_reg rocketGetters[];
  25. luaL_reg rocketSetters[];
  26. template<> const char* GetTClassName<rocket>();
  27. template<> RegType<rocket>* GetMethodTable<rocket>();
  28. template<> luaL_reg* GetAttrTable<rocket>();
  29. template<> luaL_reg* SetAttrTable<rocket>();
  30. }
  31. }
  32. }