JoystickInfo.js 965 B

12345678910111213141516171819202122232425262728
  1. function JoystickInfo() {
  2. Object.defineProperties(this, {
  3. 'deviceID': { enumerable: true, configurable: true, get: JoystickInfo.prototype.__get_deviceID, set: JoystickInfo.prototype.__set_deviceID},
  4. 'deviceIndex': { enumerable: true, configurable: true, get: JoystickInfo.prototype.__get_deviceIndex, set: JoystickInfo.prototype.__set_deviceIndex}
  5. })
  6. }
  7. JoystickInfo.prototype.__get_deviceID = function() {
  8. return Polycode.JoystickInfo__get_deviceID(this.__ptr)
  9. }
  10. JoystickInfo.prototype.__set_deviceID = function(val) {
  11. Polycode.JoystickInfo__set_deviceID(this.__ptr, val)
  12. }
  13. JoystickInfo.prototype.__get_deviceIndex = function() {
  14. return Polycode.JoystickInfo__get_deviceIndex(this.__ptr)
  15. }
  16. JoystickInfo.prototype.__set_deviceIndex = function(val) {
  17. Polycode.JoystickInfo__set_deviceIndex(this.__ptr, val)
  18. }
  19. Duktape.fin(JoystickInfo.prototype, function (x) {
  20. if (x === JoystickInfo.prototype) {
  21. return;
  22. }
  23. Polycode.JoystickInfo__delete(x.__ptr)
  24. })