Merge pull request #62713 from YuriSizov/docs-scripting-annotations
This commit is contained in:
commit
635d447a69
19 changed files with 462 additions and 17 deletions
|
|
@ -350,6 +350,7 @@ public:
|
|||
LOOKUP_RESULT_CLASS_SIGNAL,
|
||||
LOOKUP_RESULT_CLASS_ENUM,
|
||||
LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE,
|
||||
LOOKUP_RESULT_CLASS_ANNOTATION,
|
||||
LOOKUP_RESULT_MAX
|
||||
};
|
||||
|
||||
|
|
@ -402,6 +403,7 @@ public:
|
|||
virtual void get_recognized_extensions(List<String> *p_extensions) const = 0;
|
||||
virtual void get_public_functions(List<MethodInfo> *p_functions) const = 0;
|
||||
virtual void get_public_constants(List<Pair<String, Variant>> *p_constants) const = 0;
|
||||
virtual void get_public_annotations(List<MethodInfo> *p_annotations) const = 0;
|
||||
|
||||
struct ProfilingInfo {
|
||||
StringName signature;
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ void ScriptLanguageExtension::_bind_methods() {
|
|||
GDVIRTUAL_BIND(_get_recognized_extensions);
|
||||
GDVIRTUAL_BIND(_get_public_functions);
|
||||
GDVIRTUAL_BIND(_get_public_constants);
|
||||
GDVIRTUAL_BIND(_get_public_annotations);
|
||||
|
||||
GDVIRTUAL_BIND(_profiling_start);
|
||||
GDVIRTUAL_BIND(_profiling_stop);
|
||||
|
|
@ -160,6 +161,7 @@ void ScriptLanguageExtension::_bind_methods() {
|
|||
BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_SIGNAL);
|
||||
BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_ENUM);
|
||||
BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_TBD_GLOBALSCOPE);
|
||||
BIND_ENUM_CONSTANT(LOOKUP_RESULT_CLASS_ANNOTATION);
|
||||
BIND_ENUM_CONSTANT(LOOKUP_RESULT_MAX);
|
||||
|
||||
BIND_ENUM_CONSTANT(LOCATION_LOCAL);
|
||||
|
|
|
|||
|
|
@ -580,6 +580,15 @@ public:
|
|||
p_constants->push_back(Pair<String, Variant>(d["name"], d["value"]));
|
||||
}
|
||||
}
|
||||
GDVIRTUAL0RC(TypedArray<Dictionary>, _get_public_annotations)
|
||||
virtual void get_public_annotations(List<MethodInfo> *p_annotations) const override {
|
||||
TypedArray<Dictionary> ret;
|
||||
GDVIRTUAL_REQUIRED_CALL(_get_public_annotations, ret);
|
||||
for (int i = 0; i < ret.size(); i++) {
|
||||
MethodInfo mi = MethodInfo::from_dict(ret[i]);
|
||||
p_annotations->push_back(mi);
|
||||
}
|
||||
}
|
||||
|
||||
EXBIND0(profiling_start)
|
||||
EXBIND0(profiling_stop)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue