EventDispatcher.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. function EventDispatcher() {
  2. }
  3. EventDispatcher.prototype.removeAllHandlers = function() {
  4. Polycode.EventDispatcher_removeAllHandlers(this.__ptr)
  5. }
  6. EventDispatcher.prototype.removeAllHandlersForListener = function(handler) {
  7. Polycode.EventDispatcher_removeAllHandlersForListener(this.__ptr, handler)
  8. }
  9. EventDispatcher.prototype.addEventListener = function(handler,eventCode) {
  10. Polycode.EventDispatcher_addEventListener(this.__ptr, handler,eventCode)
  11. }
  12. EventDispatcher.prototype.addEventListenerUnique = function(handler,eventCode) {
  13. Polycode.EventDispatcher_addEventListenerUnique(this.__ptr, handler,eventCode)
  14. }
  15. EventDispatcher.prototype.hasEventListener = function(handler,eventCode) {
  16. Polycode.EventDispatcher_hasEventListener(this.__ptr, handler,eventCode)
  17. }
  18. EventDispatcher.prototype.removeEventListener = function(handler,eventCode) {
  19. Polycode.EventDispatcher_removeEventListener(this.__ptr, handler,eventCode)
  20. }
  21. EventDispatcher.prototype.__dispatchEvent = function(event,eventCode) {
  22. Polycode.EventDispatcher___dispatchEvent(this.__ptr, event,eventCode)
  23. }
  24. EventDispatcher.prototype.dispatchEvent = function(event,eventCode) {
  25. Polycode.EventDispatcher_dispatchEvent(this.__ptr, event,eventCode)
  26. }
  27. EventDispatcher.prototype.dispatchEventNoDelete = function(event,eventCode) {
  28. Polycode.EventDispatcher_dispatchEventNoDelete(this.__ptr, event,eventCode)
  29. }