TouchInfo.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. function TouchInfo() {
  2. if(arguments[0] != "__skip_ptr__") {
  3. this.__ptr = Polycode.TouchInfo()
  4. }
  5. Object.defineProperties(this, {
  6. 'id': { enumerable: true, configurable: true, get: TouchInfo.prototype.__get_id, set: TouchInfo.prototype.__set_id},
  7. 'position': { enumerable: true, configurable: true, get: TouchInfo.prototype.__get_position, set: TouchInfo.prototype.__set_position},
  8. 'type': { enumerable: true, configurable: true, get: TouchInfo.prototype.__get_type, set: TouchInfo.prototype.__set_type}
  9. })
  10. }
  11. TouchInfo.prototype.__get_id = function() {
  12. return Polycode.TouchInfo__get_id(this.__ptr)
  13. }
  14. TouchInfo.prototype.__set_id = function(val) {
  15. Polycode.TouchInfo__set_id(this.__ptr, val)
  16. }
  17. TouchInfo.prototype.__get_position = function() {
  18. var retVal = new Vector2()
  19. retVal.__ptr = Polycode.TouchInfo__get_position(this.__ptr)
  20. return retVal
  21. }
  22. TouchInfo.prototype.__set_position = function(val) {
  23. Polycode.TouchInfo__set_position(this.__ptr, val.__ptr)
  24. }
  25. TouchInfo.prototype.__get_type = function() {
  26. return Polycode.TouchInfo__get_type(this.__ptr)
  27. }
  28. TouchInfo.prototype.__set_type = function(val) {
  29. Polycode.TouchInfo__set_type(this.__ptr, val)
  30. }
  31. Duktape.fin(TouchInfo.prototype, function (x) {
  32. if (x === TouchInfo.prototype) {
  33. return;
  34. }
  35. Polycode.TouchInfo__delete(x.__ptr)
  36. })