Core.js 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. function Core() {
  2. }
  3. Core.prototype.Update = function() {
  4. Polycode.Core_Update(this.__ptr)
  5. }
  6. Core.prototype.Render = function() {
  7. Polycode.Core_Render(this.__ptr)
  8. }
  9. Core.prototype.fixedUpdate = function() {
  10. Polycode.Core_fixedUpdate(this.__ptr)
  11. }
  12. Core.prototype.systemUpdate = function() {
  13. Polycode.Core_systemUpdate(this.__ptr)
  14. }
  15. Core.prototype.updateAndRender = function() {
  16. Polycode.Core_updateAndRender(this.__ptr)
  17. }
  18. Core.prototype.enableMouse = function(newval) {
  19. Polycode.Core_enableMouse(this.__ptr, newval)
  20. }
  21. Core.prototype.captureMouse = function(newval) {
  22. Polycode.Core_captureMouse(this.__ptr, newval)
  23. }
  24. Core.prototype.setCursor = function(cursorType) {
  25. Polycode.Core_setCursor(this.__ptr, cursorType)
  26. }
  27. Core.prototype.warpCursor = function(x,y) {
  28. Polycode.Core_warpCursor(this.__ptr, x,y)
  29. }
  30. Core.prototype.createThread = function(target) {
  31. Polycode.Core_createThread(this.__ptr, target)
  32. }
  33. Core.prototype.lockMutex = function(mutex) {
  34. Polycode.Core_lockMutex(this.__ptr, mutex)
  35. }
  36. Core.prototype.unlockMutex = function(mutex) {
  37. Polycode.Core_unlockMutex(this.__ptr, mutex)
  38. }
  39. Core.prototype.createMutex = function() {
  40. Polycode.Core_createMutex(this.__ptr)
  41. }
  42. Core.prototype.copyStringToClipboard = function(str) {
  43. Polycode.Core_copyStringToClipboard(this.__ptr, str)
  44. }
  45. Core.prototype.getClipboardString = function() {
  46. Polycode.Core_getClipboardString(this.__ptr)
  47. }
  48. Core.prototype.getServices = function() {
  49. Polycode.Core_getServices(this.__ptr)
  50. }
  51. Core.prototype.getFPS = function() {
  52. Polycode.Core_getFPS(this.__ptr)
  53. }
  54. Core.prototype.Shutdown = function() {
  55. Polycode.Core_Shutdown(this.__ptr)
  56. }
  57. Core.prototype.isFullscreen = function() {
  58. Polycode.Core_isFullscreen(this.__ptr)
  59. }
  60. Core.prototype.getAALevel = function() {
  61. Polycode.Core_getAALevel(this.__ptr)
  62. }
  63. Core.prototype.getInput = function() {
  64. Polycode.Core_getInput(this.__ptr)
  65. }
  66. Core.prototype.getXRes = function() {
  67. Polycode.Core_getXRes(this.__ptr)
  68. }
  69. Core.prototype.getYRes = function() {
  70. Polycode.Core_getYRes(this.__ptr)
  71. }
  72. Core.prototype.getBackingXRes = function() {
  73. Polycode.Core_getBackingXRes(this.__ptr)
  74. }
  75. Core.prototype.getBackingYRes = function() {
  76. Polycode.Core_getBackingYRes(this.__ptr)
  77. }
  78. Core.prototype.getScreenWidth = function() {
  79. Polycode.Core_getScreenWidth(this.__ptr)
  80. }
  81. Core.prototype.getScreenHeight = function() {
  82. Polycode.Core_getScreenHeight(this.__ptr)
  83. }
  84. Core.prototype.createFolder = function(folderPath) {
  85. Polycode.Core_createFolder(this.__ptr, folderPath)
  86. }
  87. Core.prototype.copyDiskItem = function(itemPath,destItemPath) {
  88. Polycode.Core_copyDiskItem(this.__ptr, itemPath,destItemPath)
  89. }
  90. Core.prototype.moveDiskItem = function(itemPath,destItemPath) {
  91. Polycode.Core_moveDiskItem(this.__ptr, itemPath,destItemPath)
  92. }
  93. Core.prototype.removeDiskItem = function(itemPath) {
  94. Polycode.Core_removeDiskItem(this.__ptr, itemPath)
  95. }
  96. Core.prototype.openFolderPicker = function() {
  97. Polycode.Core_openFolderPicker(this.__ptr)
  98. }
  99. Core.prototype.setFramerate = function(frameRate,maxFixedCycles) {
  100. Polycode.Core_setFramerate(this.__ptr, frameRate,maxFixedCycles)
  101. }
  102. Core.prototype.openFilePicker = function(extensions,allowMultiple) {
  103. Polycode.Core_openFilePicker(this.__ptr, extensions,allowMultiple)
  104. }
  105. Core.prototype.saveFilePicker = function(extensions) {
  106. Polycode.Core_saveFilePicker(this.__ptr, extensions)
  107. }
  108. Core.prototype.handleVideoModeChange = function(modeInfo) {
  109. Polycode.Core_handleVideoModeChange(this.__ptr, modeInfo)
  110. }
  111. Core.prototype.flushRenderContext = function() {
  112. Polycode.Core_flushRenderContext(this.__ptr)
  113. }
  114. Core.prototype.prepareRenderContext = function() {
  115. Polycode.Core_prepareRenderContext(this.__ptr)
  116. }
  117. Core.prototype.openFile = function(fileName,opts) {
  118. Polycode.Core_openFile(this.__ptr, fileName,opts)
  119. }
  120. Core.prototype.closeFile = function(file) {
  121. Polycode.Core_closeFile(this.__ptr, file)
  122. }
  123. Core.prototype.addFileSource = function(type,source) {
  124. Polycode.Core_addFileSource(this.__ptr, type,source)
  125. }
  126. Core.prototype.removeFileSource = function(type,source) {
  127. Polycode.Core_removeFileSource(this.__ptr, type,source)
  128. }
  129. Core.prototype.parseFolder = function(pathString,showHidden) {
  130. Polycode.Core_parseFolder(this.__ptr, pathString,showHidden)
  131. }
  132. Core.prototype.systemParseFolder = function(pathString,showHidden,targetVector) {
  133. Polycode.Core_systemParseFolder(this.__ptr, pathString,showHidden,targetVector)
  134. }
  135. Core.prototype.getResourcePathForFile = function(fileName) {
  136. Polycode.Core_getResourcePathForFile(this.__ptr, fileName)
  137. }
  138. Core.prototype.setVideoMode = function(xRes,yRes,fullScreen,vSync,aaLevel,anisotropyLevel,retinaSupport) {
  139. Polycode.Core_setVideoMode(this.__ptr, xRes,yRes,fullScreen,vSync,aaLevel,anisotropyLevel,retinaSupport)
  140. }
  141. Core.prototype.resizeTo = function(xRes,yRes) {
  142. Polycode.Core_resizeTo(this.__ptr, xRes,yRes)
  143. }
  144. Core.prototype.doSleep = function() {
  145. Polycode.Core_doSleep(this.__ptr)
  146. }
  147. Core.prototype.openURL = function(url) {
  148. Polycode.Core_openURL(this.__ptr, url)
  149. }
  150. Core.prototype.getElapsed = function() {
  151. Polycode.Core_getElapsed(this.__ptr)
  152. }
  153. Core.prototype.getTicks = function() {
  154. Polycode.Core_getTicks(this.__ptr)
  155. }
  156. Core.prototype.getRefreshIntervalMs = function() {
  157. Polycode.Core_getRefreshIntervalMs(this.__ptr)
  158. }
  159. Core.prototype.getTimeSleptMs = function() {
  160. Polycode.Core_getTimeSleptMs(this.__ptr)
  161. }
  162. Core.prototype.getFixedTimestep = function() {
  163. Polycode.Core_getFixedTimestep(this.__ptr)
  164. }
  165. Core.prototype.getTicksFloat = function() {
  166. Polycode.Core_getTicksFloat(this.__ptr)
  167. }
  168. Core.prototype.setUserPointer = function(ptr) {
  169. Polycode.Core_setUserPointer(this.__ptr, ptr)
  170. }
  171. Core.prototype.getUserPointer = function() {
  172. Polycode.Core_getUserPointer(this.__ptr)
  173. }
  174. Core.prototype.executeExternalCommand = function(command,args,inDirectory) {
  175. Polycode.Core_executeExternalCommand(this.__ptr, command,args,inDirectory)
  176. }
  177. Core.prototype.getDefaultWorkingDirectory = function() {
  178. Polycode.Core_getDefaultWorkingDirectory(this.__ptr)
  179. }
  180. Core.prototype.getUserHomeDirectory = function() {
  181. Polycode.Core_getUserHomeDirectory(this.__ptr)
  182. }
  183. Core.prototype.makeApplicationMain = function() {
  184. Polycode.Core_makeApplicationMain(this.__ptr)
  185. }
  186. Core.prototype.getEventMutex = function() {
  187. Polycode.Core_getEventMutex(this.__ptr)
  188. }
  189. Core.prototype.removeThread = function(thread) {
  190. Polycode.Core_removeThread(this.__ptr, thread)
  191. }