Debian Codegraph @

core/object/script_language_extension.cpp

raw symbols SCIP
1 /**************************************************************************/
2 /* script_language_extension.cpp */
3 /**************************************************************************/
4 /* This file is part of: */
5 /* GODOT ENGINE */
6 /* https://godotengine.org */
7 /**************************************************************************/
8 /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
9 /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
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
31 #include "script_language_extension.h"
32
33 void ScriptExtension::_bind_methods() {
34 GDVIRTUAL_BIND(_editor_can_reload_from_file);
35 GDVIRTUAL_BIND(_placeholder_erased, "placeholder");
36
37 GDVIRTUAL_BIND(_can_instantiate);
38 GDVIRTUAL_BIND(_get_base_script);
39 GDVIRTUAL_BIND(_get_global_name);
40 GDVIRTUAL_BIND(_inherits_script, "script");
41
42 GDVIRTUAL_BIND(_get_instance_base_type);
43 GDVIRTUAL_BIND(_instance_create, "for_object");
44 GDVIRTUAL_BIND(_placeholder_instance_create, "for_object");
45
46 GDVIRTUAL_BIND(_instance_has, "object");
47
48 GDVIRTUAL_BIND(_has_source_code);
49 GDVIRTUAL_BIND(_get_source_code);
50
51 GDVIRTUAL_BIND(_set_source_code, "code");
52 GDVIRTUAL_BIND(_reload, "keep_state");
53
54 GDVIRTUAL_BIND(_get_doc_class_name);
55 GDVIRTUAL_BIND(_get_documentation);
56 GDVIRTUAL_BIND(_get_class_icon_path);
57
58 GDVIRTUAL_BIND(_has_method, "method");
59 GDVIRTUAL_BIND(_has_static_method, "method");
60
61 GDVIRTUAL_BIND(_get_script_method_argument_count, "method");
62
63 GDVIRTUAL_BIND(_get_method_info, "method");
64
65 GDVIRTUAL_BIND(_is_tool);
66 GDVIRTUAL_BIND(_is_valid);
67 GDVIRTUAL_BIND(_is_abstract);
68 GDVIRTUAL_BIND(_get_language);
69
70 GDVIRTUAL_BIND(_has_script_signal, "signal");
71 GDVIRTUAL_BIND(_get_script_signal_list);
72
73 GDVIRTUAL_BIND(_has_property_default_value, "property");
74 GDVIRTUAL_BIND(_get_property_default_value, "property");
75
76 GDVIRTUAL_BIND(_update_exports);
77 GDVIRTUAL_BIND(_get_script_method_list);
78 GDVIRTUAL_BIND(_get_script_property_list);
79
80 GDVIRTUAL_BIND(_get_member_line, "member");
81
82 GDVIRTUAL_BIND(_get_constants);
83 GDVIRTUAL_BIND(_get_members);
84 GDVIRTUAL_BIND(_is_placeholder_fallback_enabled);
85
86 GDVIRTUAL_BIND(_get_rpc_config);
87 }
88
89 void ScriptLanguageExtension::_bind_methods() {
90 GDVIRTUAL_BIND(_get_name);
91 GDVIRTUAL_BIND(_init);
92 GDVIRTUAL_BIND(_get_type);
93 GDVIRTUAL_BIND(_get_extension);
94 GDVIRTUAL_BIND(_finish);
95
96 GDVIRTUAL_BIND(_get_reserved_words);
97 GDVIRTUAL_BIND(_is_control_flow_keyword, "keyword");
98 GDVIRTUAL_BIND(_get_comment_delimiters);
99 GDVIRTUAL_BIND(_get_doc_comment_delimiters);
100 GDVIRTUAL_BIND(_get_string_delimiters);
101 GDVIRTUAL_BIND(_make_template, "template", "class_name", "base_class_name");
102 GDVIRTUAL_BIND(_get_built_in_templates, "object");
103 GDVIRTUAL_BIND(_is_using_templates);
104 GDVIRTUAL_BIND(_validate, "script", "path", "validate_functions", "validate_errors", "validate_warnings", "validate_safe_lines");
105
106 GDVIRTUAL_BIND(_validate_path, "path");
107 GDVIRTUAL_BIND(_create_script);
108 #ifndef DISABLE_DEPRECATED
109 GDVIRTUAL_BIND(_has_named_classes);
110 #endif
111 GDVIRTUAL_BIND(_supports_builtin_mode);
112 GDVIRTUAL_BIND(_supports_documentation);
113 GDVIRTUAL_BIND(_can_inherit_from_file);
114 GDVIRTUAL_BIND(_find_function, "function", "code");
115 GDVIRTUAL_BIND(_make_function, "class_name", "function_name", "function_args");
116 GDVIRTUAL_BIND(_can_make_function);
117 GDVIRTUAL_BIND(_open_in_external_editor, "script", "line", "column");
118 GDVIRTUAL_BIND(_overrides_external_editor);
119 GDVIRTUAL_BIND(_preferred_file_name_casing);
120
121 GDVIRTUAL_BIND(_complete_code, "code", "path", "owner");
122 GDVIRTUAL_BIND(_lookup_code, "code", "symbol", "path", "owner");
123 GDVIRTUAL_BIND(_auto_indent_code, "code", "from_line", "to_line");
124
125 GDVIRTUAL_BIND(_add_global_constant, "name", "value");
126 GDVIRTUAL_BIND(_add_named_global_constant, "name", "value");
127 GDVIRTUAL_BIND(_remove_named_global_constant, "name");
128
129 GDVIRTUAL_BIND(_thread_enter);
130 GDVIRTUAL_BIND(_thread_exit);
131 GDVIRTUAL_BIND(_debug_get_error);
132 GDVIRTUAL_BIND(_debug_get_stack_level_count);
133
134 GDVIRTUAL_BIND(_debug_get_stack_level_line, "level");
135 GDVIRTUAL_BIND(_debug_get_stack_level_function, "level");
136 GDVIRTUAL_BIND(_debug_get_stack_level_source, "level");
137 GDVIRTUAL_BIND(_debug_get_stack_level_locals, "level", "max_subitems", "max_depth");
138 GDVIRTUAL_BIND(_debug_get_stack_level_members, "level", "max_subitems", "max_depth");
139 GDVIRTUAL_BIND(_debug_get_stack_level_instance, "level");
140 GDVIRTUAL_BIND(_debug_get_globals, "max_subitems", "max_depth");
141 GDVIRTUAL_BIND(_debug_parse_stack_level_expression, "level", "expression", "max_subitems", "max_depth");
142
143 GDVIRTUAL_BIND(_debug_get_current_stack_info);
144
145 GDVIRTUAL_BIND(_reload_all_scripts);
146 GDVIRTUAL_BIND(_reload_scripts, "scripts", "soft_reload");
147 GDVIRTUAL_BIND(_reload_tool_script, "script", "soft_reload");
148
149 GDVIRTUAL_BIND(_get_recognized_extensions);
150 GDVIRTUAL_BIND(_get_public_functions);
151 GDVIRTUAL_BIND(_get_public_constants);
152 GDVIRTUAL_BIND(_get_public_annotations);
153
154 GDVIRTUAL_BIND(_profiling_start);
155 GDVIRTUAL_BIND(_profiling_stop);
156 GDVIRTUAL_BIND(_profiling_set_save_native_calls, "enable");
157
158 GDVIRTUAL_BIND(_profiling_get_accumulated_data, "info_array", "info_max");
159 GDVIRTUAL_BIND(_profiling_get_frame_data, "info_array", "info_max");
160
161 GDVIRTUAL_BIND(_frame);
162
163 GDVIRTUAL_BIND(_handles_global_class_type, "type");
164 GDVIRTUAL_BIND(_get_global_class_name, "path");
165
166 BIND_ENUM_CONSTANT(LOOKUP_RESULT_SCRIPT_LOCATION);
167 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS);
168 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_CONSTANT);
169 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_PROPERTY);
170 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_METHOD);
171 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_SIGNAL);
172 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_ENUM);
173 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE); // Deprecated.
174 BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_ANNOTATION);
175 BIND_ENUM_CONSTANT(LOOKUP_RESULT_LOCAL_CONSTANT);
176 BIND_ENUM_CONSTANT(LOOKUP_RESULT_LOCAL_VARIABLE);
177 BIND_ENUM_CONSTANT(LOOKUP_RESULT_MAX);
178
179 BIND_ENUM_CONSTANT(LOCATION_LOCAL);
180 BIND_ENUM_CONSTANT(LOCATION_PARENT_MASK);
181 BIND_ENUM_CONSTANT(LOCATION_OTHER_USER_CODE);
182 BIND_ENUM_CONSTANT(LOCATION_OTHER);
183
184 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_CLASS);
185 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_FUNCTION);
186 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_SIGNAL);
187 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_VARIABLE);
188 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_MEMBER);
189 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_ENUM);
190 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_CONSTANT);
191 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_NODE_PATH);
192 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_FILE_PATH);
193 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_PLAIN_TEXT);
194 BIND_ENUM_CONSTANT(CODE_COMPLETION_KIND_MAX);
195 }