gir: Add object documentation and Since tag to the generated gir file

Fix gen-api-gtkdoc.py to also parse a structs detailed description, which may contain a `since` attribute,
and to generate a gtkdoc definition for those structs in the output wp-gtkdoc.h.

This makes the structs documentation and `Since` attribute end up in the final .gir file.
This commit is contained in:
Tom A. Wagner 2023-08-25 11:35:36 +02:00
parent 227dd97036
commit fa22101530

View file

@ -195,9 +195,9 @@ class DoxyElement(object):
self.retval = kwargs.get('retval', None)
def is_documented(self):
if (normalize_text(self.brief)) != "":
return True
return False
return (normalize_text(self.brief) != "" or
normalize_text(self.detail) != "" or
normalize_text(self.since) != "")
def add_brief(self, xml):
proc = DoxygenProcess()
@ -302,6 +302,7 @@ class DoxyStruct(DoxyElement):
d += "};\n"
e = DoxyStruct(name, d)
e.add_brief(xml.find("briefdescription"))
e.add_detail(xml.find("detaileddescription"))
for p in memberdefs:
e.add_member(p)
return e