diff options
Diffstat (limited to 'core/extension/extension_api_dump.cpp')
-rw-r--r-- | core/extension/extension_api_dump.cpp | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/core/extension/extension_api_dump.cpp b/core/extension/extension_api_dump.cpp index 3687e4f7e5..31af28b783 100644 --- a/core/extension/extension_api_dump.cpp +++ b/core/extension/extension_api_dump.cpp @@ -841,27 +841,16 @@ Dictionary NativeExtensionAPIDump::generate_extension_api() { { Array native_structures; - // AudioStream structures - { - Dictionary d; - d["name"] = "AudioFrame"; - d["format"] = "float left,float right"; + List<StringName> native_structs; + ClassDB::get_native_struct_list(&native_structs); + native_structs.sort_custom<StringName::AlphCompare>(); - native_structures.push_back(d); - } + for (const StringName &E : native_structs) { + String code = ClassDB::get_native_struct_code(E); - // TextServer structures - { - Dictionary d; - d["name"] = "Glyph"; - d["format"] = "int start,int end,uint8_t count,uint8_t repeat,uint16_t flags,float x_off,float y_off,float advance,RID font_rid,int font_size,int32_t index"; - - native_structures.push_back(d); - } - { Dictionary d; - d["name"] = "CaretInfo"; - d["format"] = "Rect2 leading_caret,Rect2 trailing_caret,TextServer::Direction leading_direction,TextServer::Direction trailing_direction"; + d["name"] = String(E); + d["format"] = code; native_structures.push_back(d); } |