editor_internal_calls.cpp 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. /*************************************************************************/
  2. /* editor_internal_calls.cpp */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
  9. /* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /*************************************************************************/
  30. #include "editor_internal_calls.h"
  31. #ifdef UNIX_ENABLED
  32. #include <unistd.h> // access
  33. #endif
  34. #include "core/os/os.h"
  35. #include "core/version.h"
  36. #include "editor/debugger/editor_debugger_node.h"
  37. #include "editor/editor_node.h"
  38. #include "editor/editor_scale.h"
  39. #include "editor/plugins/script_editor_plugin.h"
  40. #include "main/main.h"
  41. #include "../csharp_script.h"
  42. #include "../glue/cs_glue_version.gen.h"
  43. #include "../godotsharp_dirs.h"
  44. #include "../mono_gd/gd_mono_marshal.h"
  45. #include "../utils/osx_utils.h"
  46. #include "code_completion.h"
  47. #include "godotsharp_export.h"
  48. #include "script_class_parser.h"
  49. MonoString *godot_icall_GodotSharpDirs_ResDataDir() {
  50. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_data_dir());
  51. }
  52. MonoString *godot_icall_GodotSharpDirs_ResMetadataDir() {
  53. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_metadata_dir());
  54. }
  55. MonoString *godot_icall_GodotSharpDirs_ResAssembliesBaseDir() {
  56. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_assemblies_base_dir());
  57. }
  58. MonoString *godot_icall_GodotSharpDirs_ResAssembliesDir() {
  59. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_assemblies_dir());
  60. }
  61. MonoString *godot_icall_GodotSharpDirs_ResConfigDir() {
  62. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_config_dir());
  63. }
  64. MonoString *godot_icall_GodotSharpDirs_ResTempDir() {
  65. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_temp_dir());
  66. }
  67. MonoString *godot_icall_GodotSharpDirs_ResTempAssembliesBaseDir() {
  68. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_temp_assemblies_base_dir());
  69. }
  70. MonoString *godot_icall_GodotSharpDirs_ResTempAssembliesDir() {
  71. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_res_temp_assemblies_dir());
  72. }
  73. MonoString *godot_icall_GodotSharpDirs_MonoUserDir() {
  74. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_mono_user_dir());
  75. }
  76. MonoString *godot_icall_GodotSharpDirs_MonoLogsDir() {
  77. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_mono_logs_dir());
  78. }
  79. MonoString *godot_icall_GodotSharpDirs_MonoSolutionsDir() {
  80. #ifdef TOOLS_ENABLED
  81. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_mono_solutions_dir());
  82. #else
  83. return nullptr;
  84. #endif
  85. }
  86. MonoString *godot_icall_GodotSharpDirs_BuildLogsDirs() {
  87. #ifdef TOOLS_ENABLED
  88. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_build_logs_dir());
  89. #else
  90. return nullptr;
  91. #endif
  92. }
  93. MonoString *godot_icall_GodotSharpDirs_ProjectSlnPath() {
  94. #ifdef TOOLS_ENABLED
  95. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_project_sln_path());
  96. #else
  97. return nullptr;
  98. #endif
  99. }
  100. MonoString *godot_icall_GodotSharpDirs_ProjectCsProjPath() {
  101. #ifdef TOOLS_ENABLED
  102. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_project_csproj_path());
  103. #else
  104. return nullptr;
  105. #endif
  106. }
  107. MonoString *godot_icall_GodotSharpDirs_DataEditorToolsDir() {
  108. #ifdef TOOLS_ENABLED
  109. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_data_editor_tools_dir());
  110. #else
  111. return nullptr;
  112. #endif
  113. }
  114. MonoString *godot_icall_GodotSharpDirs_DataEditorPrebuiltApiDir() {
  115. #ifdef TOOLS_ENABLED
  116. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_data_editor_prebuilt_api_dir());
  117. #else
  118. return nullptr;
  119. #endif
  120. }
  121. MonoString *godot_icall_GodotSharpDirs_DataMonoEtcDir() {
  122. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_data_mono_etc_dir());
  123. }
  124. MonoString *godot_icall_GodotSharpDirs_DataMonoLibDir() {
  125. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_data_mono_lib_dir());
  126. }
  127. MonoString *godot_icall_GodotSharpDirs_DataMonoBinDir() {
  128. #ifdef WINDOWS_ENABLED
  129. return GDMonoMarshal::mono_string_from_godot(GodotSharpDirs::get_data_mono_bin_dir());
  130. #else
  131. return nullptr;
  132. #endif
  133. }
  134. void godot_icall_EditorProgress_Create(MonoString *p_task, MonoString *p_label, int32_t p_amount, MonoBoolean p_can_cancel) {
  135. String task = GDMonoMarshal::mono_string_to_godot(p_task);
  136. String label = GDMonoMarshal::mono_string_to_godot(p_label);
  137. EditorNode::progress_add_task(task, label, p_amount, (bool)p_can_cancel);
  138. }
  139. void godot_icall_EditorProgress_Dispose(MonoString *p_task) {
  140. String task = GDMonoMarshal::mono_string_to_godot(p_task);
  141. EditorNode::progress_end_task(task);
  142. }
  143. MonoBoolean godot_icall_EditorProgress_Step(MonoString *p_task, MonoString *p_state, int32_t p_step, MonoBoolean p_force_refresh) {
  144. String task = GDMonoMarshal::mono_string_to_godot(p_task);
  145. String state = GDMonoMarshal::mono_string_to_godot(p_state);
  146. return EditorNode::progress_task_step(task, state, p_step, (bool)p_force_refresh);
  147. }
  148. int32_t godot_icall_ScriptClassParser_ParseFile(MonoString *p_filepath, MonoObject *p_classes, MonoString **r_error_str) {
  149. *r_error_str = nullptr;
  150. String filepath = GDMonoMarshal::mono_string_to_godot(p_filepath);
  151. ScriptClassParser scp;
  152. Error err = scp.parse_file(filepath);
  153. if (err == OK) {
  154. Array classes = GDMonoMarshal::mono_object_to_variant(p_classes);
  155. const Vector<ScriptClassParser::ClassDecl> &class_decls = scp.get_classes();
  156. for (int i = 0; i < class_decls.size(); i++) {
  157. const ScriptClassParser::ClassDecl &classDecl = class_decls[i];
  158. Dictionary classDeclDict;
  159. classDeclDict["name"] = classDecl.name;
  160. classDeclDict["namespace"] = classDecl.namespace_;
  161. classDeclDict["nested"] = classDecl.nested;
  162. classDeclDict["base_count"] = classDecl.base.size();
  163. classes.push_back(classDeclDict);
  164. }
  165. } else {
  166. String error_str = scp.get_error();
  167. if (!error_str.is_empty()) {
  168. *r_error_str = GDMonoMarshal::mono_string_from_godot(error_str);
  169. }
  170. }
  171. return err;
  172. }
  173. uint32_t godot_icall_ExportPlugin_GetExportedAssemblyDependencies(MonoObject *p_initial_assemblies,
  174. MonoString *p_build_config, MonoString *p_custom_bcl_dir, MonoObject *r_assembly_dependencies) {
  175. Dictionary initial_dependencies = GDMonoMarshal::mono_object_to_variant(p_initial_assemblies);
  176. String build_config = GDMonoMarshal::mono_string_to_godot(p_build_config);
  177. String custom_bcl_dir = GDMonoMarshal::mono_string_to_godot(p_custom_bcl_dir);
  178. Dictionary assembly_dependencies = GDMonoMarshal::mono_object_to_variant(r_assembly_dependencies);
  179. return GodotSharpExport::get_exported_assembly_dependencies(initial_dependencies, build_config, custom_bcl_dir, assembly_dependencies);
  180. }
  181. MonoString *godot_icall_Internal_UpdateApiAssembliesFromPrebuilt(MonoString *p_config) {
  182. String config = GDMonoMarshal::mono_string_to_godot(p_config);
  183. String error_str = GDMono::get_singleton()->update_api_assemblies_from_prebuilt(config);
  184. return GDMonoMarshal::mono_string_from_godot(error_str);
  185. }
  186. MonoString *godot_icall_Internal_FullTemplatesDir() {
  187. String full_templates_dir = EditorSettings::get_singleton()->get_templates_dir().plus_file(VERSION_FULL_CONFIG);
  188. return GDMonoMarshal::mono_string_from_godot(full_templates_dir);
  189. }
  190. MonoString *godot_icall_Internal_SimplifyGodotPath(MonoString *p_path) {
  191. String path = GDMonoMarshal::mono_string_to_godot(p_path);
  192. return GDMonoMarshal::mono_string_from_godot(path.simplify_path());
  193. }
  194. MonoBoolean godot_icall_Internal_IsOsxAppBundleInstalled(MonoString *p_bundle_id) {
  195. #ifdef OSX_ENABLED
  196. String bundle_id = GDMonoMarshal::mono_string_to_godot(p_bundle_id);
  197. return (MonoBoolean)osx_is_app_bundle_installed(bundle_id);
  198. #else
  199. (void)p_bundle_id; // UNUSED
  200. return (MonoBoolean) false;
  201. #endif
  202. }
  203. MonoBoolean godot_icall_Internal_GodotIs32Bits() {
  204. return sizeof(void *) == 4;
  205. }
  206. MonoBoolean godot_icall_Internal_GodotIsRealTDouble() {
  207. #ifdef REAL_T_IS_DOUBLE
  208. return (MonoBoolean) true;
  209. #else
  210. return (MonoBoolean) false;
  211. #endif
  212. }
  213. void godot_icall_Internal_GodotMainIteration() {
  214. Main::iteration();
  215. }
  216. uint64_t godot_icall_Internal_GetCoreApiHash() {
  217. return ClassDB::get_api_hash(ClassDB::API_CORE);
  218. }
  219. uint64_t godot_icall_Internal_GetEditorApiHash() {
  220. return ClassDB::get_api_hash(ClassDB::API_EDITOR);
  221. }
  222. MonoBoolean godot_icall_Internal_IsAssembliesReloadingNeeded() {
  223. #ifdef GD_MONO_HOT_RELOAD
  224. return (MonoBoolean)CSharpLanguage::get_singleton()->is_assembly_reloading_needed();
  225. #else
  226. return (MonoBoolean) false;
  227. #endif
  228. }
  229. void godot_icall_Internal_ReloadAssemblies(MonoBoolean p_soft_reload) {
  230. #ifdef GD_MONO_HOT_RELOAD
  231. _GodotSharp::get_singleton()->call_deferred("_reload_assemblies", (bool)p_soft_reload);
  232. #endif
  233. }
  234. void godot_icall_Internal_EditorDebuggerNodeReloadScripts() {
  235. EditorDebuggerNode::get_singleton()->reload_scripts();
  236. }
  237. MonoBoolean godot_icall_Internal_ScriptEditorEdit(MonoObject *p_resource, int32_t p_line, int32_t p_col, MonoBoolean p_grab_focus) {
  238. Ref<Resource> resource = GDMonoMarshal::mono_object_to_variant(p_resource);
  239. return (MonoBoolean)ScriptEditor::get_singleton()->edit(resource, p_line, p_col, (bool)p_grab_focus);
  240. }
  241. void godot_icall_Internal_EditorNodeShowScriptScreen() {
  242. EditorNode::get_singleton()->call("_editor_select", EditorNode::EDITOR_SCRIPT);
  243. }
  244. MonoObject *godot_icall_Internal_GetScriptsMetadataOrNothing(MonoReflectionType *p_dict_reftype) {
  245. Dictionary maybe_metadata = CSharpLanguage::get_singleton()->get_scripts_metadata_or_nothing();
  246. MonoType *dict_type = mono_reflection_type_get_type(p_dict_reftype);
  247. int type_encoding = mono_type_get_type(dict_type);
  248. MonoClass *type_class_raw = mono_class_from_mono_type(dict_type);
  249. GDMonoClass *type_class = GDMono::get_singleton()->get_class(type_class_raw);
  250. return GDMonoMarshal::variant_to_mono_object(maybe_metadata, ManagedType(type_encoding, type_class));
  251. }
  252. MonoString *godot_icall_Internal_MonoWindowsInstallRoot() {
  253. #ifdef WINDOWS_ENABLED
  254. String install_root_dir = GDMono::get_singleton()->get_mono_reg_info().install_root_dir;
  255. return GDMonoMarshal::mono_string_from_godot(install_root_dir);
  256. #else
  257. return nullptr;
  258. #endif
  259. }
  260. void godot_icall_Internal_EditorRunPlay() {
  261. EditorNode::get_singleton()->run_play();
  262. }
  263. void godot_icall_Internal_EditorRunStop() {
  264. EditorNode::get_singleton()->run_stop();
  265. }
  266. void godot_icall_Internal_ScriptEditorDebugger_ReloadScripts() {
  267. EditorDebuggerNode *ed = EditorDebuggerNode::get_singleton();
  268. if (ed) {
  269. ed->reload_scripts();
  270. }
  271. }
  272. MonoArray *godot_icall_Internal_CodeCompletionRequest(int32_t p_kind, MonoString *p_script_file) {
  273. String script_file = GDMonoMarshal::mono_string_to_godot(p_script_file);
  274. PackedStringArray suggestions = gdmono::get_code_completion((gdmono::CompletionKind)p_kind, script_file);
  275. return GDMonoMarshal::PackedStringArray_to_mono_array(suggestions);
  276. }
  277. float godot_icall_Globals_EditorScale() {
  278. return EDSCALE;
  279. }
  280. MonoObject *godot_icall_Globals_GlobalDef(MonoString *p_setting, MonoObject *p_default_value, MonoBoolean p_restart_if_changed) {
  281. String setting = GDMonoMarshal::mono_string_to_godot(p_setting);
  282. Variant default_value = GDMonoMarshal::mono_object_to_variant(p_default_value);
  283. Variant result = _GLOBAL_DEF(setting, default_value, (bool)p_restart_if_changed);
  284. return GDMonoMarshal::variant_to_mono_object(result);
  285. }
  286. MonoObject *godot_icall_Globals_EditorDef(MonoString *p_setting, MonoObject *p_default_value, MonoBoolean p_restart_if_changed) {
  287. String setting = GDMonoMarshal::mono_string_to_godot(p_setting);
  288. Variant default_value = GDMonoMarshal::mono_object_to_variant(p_default_value);
  289. Variant result = _EDITOR_DEF(setting, default_value, (bool)p_restart_if_changed);
  290. return GDMonoMarshal::variant_to_mono_object(result);
  291. }
  292. MonoString *godot_icall_Globals_TTR(MonoString *p_text) {
  293. String text = GDMonoMarshal::mono_string_to_godot(p_text);
  294. return GDMonoMarshal::mono_string_from_godot(TTR(text));
  295. }
  296. MonoString *godot_icall_Utils_OS_GetPlatformName() {
  297. String os_name = OS::get_singleton()->get_name();
  298. return GDMonoMarshal::mono_string_from_godot(os_name);
  299. }
  300. MonoBoolean godot_icall_Utils_OS_UnixFileHasExecutableAccess(MonoString *p_file_path) {
  301. #ifdef UNIX_ENABLED
  302. String file_path = GDMonoMarshal::mono_string_to_godot(p_file_path);
  303. return access(file_path.utf8().get_data(), X_OK) == 0;
  304. #else
  305. ERR_FAIL_V(false);
  306. #endif
  307. }
  308. void register_editor_internal_calls() {
  309. // GodotSharpDirs
  310. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResDataDir", godot_icall_GodotSharpDirs_ResDataDir);
  311. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResMetadataDir", godot_icall_GodotSharpDirs_ResMetadataDir);
  312. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResAssembliesBaseDir", godot_icall_GodotSharpDirs_ResAssembliesBaseDir);
  313. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResAssembliesDir", godot_icall_GodotSharpDirs_ResAssembliesDir);
  314. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResConfigDir", godot_icall_GodotSharpDirs_ResConfigDir);
  315. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResTempDir", godot_icall_GodotSharpDirs_ResTempDir);
  316. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResTempAssembliesBaseDir", godot_icall_GodotSharpDirs_ResTempAssembliesBaseDir);
  317. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ResTempAssembliesDir", godot_icall_GodotSharpDirs_ResTempAssembliesDir);
  318. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_MonoUserDir", godot_icall_GodotSharpDirs_MonoUserDir);
  319. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_MonoLogsDir", godot_icall_GodotSharpDirs_MonoLogsDir);
  320. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_MonoSolutionsDir", godot_icall_GodotSharpDirs_MonoSolutionsDir);
  321. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_BuildLogsDirs", godot_icall_GodotSharpDirs_BuildLogsDirs);
  322. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ProjectSlnPath", godot_icall_GodotSharpDirs_ProjectSlnPath);
  323. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_ProjectCsProjPath", godot_icall_GodotSharpDirs_ProjectCsProjPath);
  324. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_DataEditorToolsDir", godot_icall_GodotSharpDirs_DataEditorToolsDir);
  325. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_DataEditorPrebuiltApiDir", godot_icall_GodotSharpDirs_DataEditorPrebuiltApiDir);
  326. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_DataMonoEtcDir", godot_icall_GodotSharpDirs_DataMonoEtcDir);
  327. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_DataMonoLibDir", godot_icall_GodotSharpDirs_DataMonoLibDir);
  328. GDMonoUtils::add_internal_call("GodotTools.Internals.GodotSharpDirs::internal_DataMonoBinDir", godot_icall_GodotSharpDirs_DataMonoBinDir);
  329. // EditorProgress
  330. GDMonoUtils::add_internal_call("GodotTools.Internals.EditorProgress::internal_Create", godot_icall_EditorProgress_Create);
  331. GDMonoUtils::add_internal_call("GodotTools.Internals.EditorProgress::internal_Dispose", godot_icall_EditorProgress_Dispose);
  332. GDMonoUtils::add_internal_call("GodotTools.Internals.EditorProgress::internal_Step", godot_icall_EditorProgress_Step);
  333. // ScriptClassParser
  334. GDMonoUtils::add_internal_call("GodotTools.Internals.ScriptClassParser::internal_ParseFile", godot_icall_ScriptClassParser_ParseFile);
  335. // ExportPlugin
  336. GDMonoUtils::add_internal_call("GodotTools.Export.ExportPlugin::internal_GetExportedAssemblyDependencies", godot_icall_ExportPlugin_GetExportedAssemblyDependencies);
  337. // Internals
  338. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_UpdateApiAssembliesFromPrebuilt", godot_icall_Internal_UpdateApiAssembliesFromPrebuilt);
  339. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_FullTemplatesDir", godot_icall_Internal_FullTemplatesDir);
  340. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_SimplifyGodotPath", godot_icall_Internal_SimplifyGodotPath);
  341. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_IsOsxAppBundleInstalled", godot_icall_Internal_IsOsxAppBundleInstalled);
  342. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GodotIs32Bits", godot_icall_Internal_GodotIs32Bits);
  343. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GodotIsRealTDouble", godot_icall_Internal_GodotIsRealTDouble);
  344. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GodotMainIteration", godot_icall_Internal_GodotMainIteration);
  345. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GetCoreApiHash", godot_icall_Internal_GetCoreApiHash);
  346. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GetEditorApiHash", godot_icall_Internal_GetEditorApiHash);
  347. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_IsAssembliesReloadingNeeded", godot_icall_Internal_IsAssembliesReloadingNeeded);
  348. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_ReloadAssemblies", godot_icall_Internal_ReloadAssemblies);
  349. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_EditorDebuggerNodeReloadScripts", godot_icall_Internal_EditorDebuggerNodeReloadScripts);
  350. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_ScriptEditorEdit", godot_icall_Internal_ScriptEditorEdit);
  351. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_EditorNodeShowScriptScreen", godot_icall_Internal_EditorNodeShowScriptScreen);
  352. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GetScriptsMetadataOrNothing", godot_icall_Internal_GetScriptsMetadataOrNothing);
  353. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_MonoWindowsInstallRoot", godot_icall_Internal_MonoWindowsInstallRoot);
  354. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_EditorRunPlay", godot_icall_Internal_EditorRunPlay);
  355. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_EditorRunStop", godot_icall_Internal_EditorRunStop);
  356. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_ScriptEditorDebugger_ReloadScripts", godot_icall_Internal_ScriptEditorDebugger_ReloadScripts);
  357. GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_CodeCompletionRequest", godot_icall_Internal_CodeCompletionRequest);
  358. // Globals
  359. GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_EditorScale", godot_icall_Globals_EditorScale);
  360. GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_GlobalDef", godot_icall_Globals_GlobalDef);
  361. GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_EditorDef", godot_icall_Globals_EditorDef);
  362. GDMonoUtils::add_internal_call("GodotTools.Internals.Globals::internal_TTR", godot_icall_Globals_TTR);
  363. // Utils.OS
  364. GDMonoUtils::add_internal_call("GodotTools.Utils.OS::GetPlatformName", godot_icall_Utils_OS_GetPlatformName);
  365. GDMonoUtils::add_internal_call("GodotTools.Utils.OS::UnixFileHasExecutableAccess", godot_icall_Utils_OS_UnixFileHasExecutableAccess);
  366. }