DummyCore.js 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. require('Polycode/Core')
  2. function DummyCore() {
  3. if(arguments[0] != "__skip_ptr__") {
  4. this.__ptr = Polycode.DummyCore()
  5. }
  6. }
  7. DummyCore.prototype = Object.create(Core.prototype)
  8. Duktape.fin(DummyCore.prototype, function (x) {
  9. if (x === DummyCore.prototype) {
  10. return;
  11. }
  12. Polycode.DummyCore__delete(x.__ptr)
  13. })
  14. DummyCore.prototype.systemUpdate = function() {
  15. return Polycode.DummyCore_systemUpdate(this.__ptr)
  16. }
  17. DummyCore.prototype.setCursor = function(cursorType) {
  18. Polycode.DummyCore_setCursor(this.__ptr, cursorType)
  19. }
  20. DummyCore.prototype.copyStringToClipboard = function(str) {
  21. Polycode.DummyCore_copyStringToClipboard(this.__ptr, str)
  22. }
  23. DummyCore.prototype.getClipboardString = function() {
  24. return Polycode.DummyCore_getClipboardString(this.__ptr)
  25. }
  26. DummyCore.prototype.createFolder = function(folderPath) {
  27. Polycode.DummyCore_createFolder(this.__ptr, folderPath)
  28. }
  29. DummyCore.prototype.copyDiskItem = function(itemPath,destItemPath) {
  30. Polycode.DummyCore_copyDiskItem(this.__ptr, itemPath, destItemPath)
  31. }
  32. DummyCore.prototype.moveDiskItem = function(itemPath,destItemPath) {
  33. Polycode.DummyCore_moveDiskItem(this.__ptr, itemPath, destItemPath)
  34. }
  35. DummyCore.prototype.removeDiskItem = function(itemPath) {
  36. Polycode.DummyCore_removeDiskItem(this.__ptr, itemPath)
  37. }
  38. DummyCore.prototype.openFolderPicker = function() {
  39. return Polycode.DummyCore_openFolderPicker(this.__ptr)
  40. }
  41. DummyCore.prototype.openFilePicker = function(extensions,allowMultiple) {
  42. Polycode.DummyCore_openFilePicker(this.__ptr, extensions, allowMultiple)
  43. }
  44. DummyCore.prototype.saveFilePicker = function(extensions) {
  45. return Polycode.DummyCore_saveFilePicker(this.__ptr, extensions)
  46. }
  47. DummyCore.prototype.flushRenderContext = function() {
  48. Polycode.DummyCore_flushRenderContext(this.__ptr)
  49. }
  50. DummyCore.prototype.openURL = function(url) {
  51. Polycode.DummyCore_openURL(this.__ptr, url)
  52. }
  53. DummyCore.prototype.getTicks = function() {
  54. return Polycode.DummyCore_getTicks(this.__ptr)
  55. }
  56. DummyCore.prototype.executeExternalCommand = function(command,args,inDirectory) {
  57. return Polycode.DummyCore_executeExternalCommand(this.__ptr, command, args, inDirectory)
  58. }
  59. DummyCore.prototype.systemParseFolder = function(pathString,showHidden,targetVector) {
  60. return Polycode.DummyCore_systemParseFolder(this.__ptr, pathString, showHidden, targetVector)
  61. }