EventHandler.lua 556 B

1234567891011121314151617181920212223242526272829
  1. class "EventHandler"
  2. function EventHandler:EventHandler(...)
  3. for k,v in pairs(arg) do
  4. if type(v) == "table" then
  5. if v.__ptr ~= nil then
  6. arg[k] = v.__ptr
  7. end
  8. end
  9. end
  10. if self.__ptr == nil and arg[1] ~= "__skip_ptr__" then
  11. self.__ptr = Polycore.EventHandler(unpack(arg))
  12. end
  13. end
  14. function EventHandler:secondaryHandler(event)
  15. local retVal = Polycore.EventHandler_secondaryHandler(self.__ptr, event.__ptr)
  16. end
  17. function EventHandler:handleEvent(event)
  18. local retVal = Polycore.EventHandler_handleEvent(self.__ptr, event.__ptr)
  19. end