From fa22101530483866edec0f51d59e9291e0de5554 Mon Sep 17 00:00:00 2001 From: "Tom A. Wagner" Date: Fri, 25 Aug 2023 11:35:36 +0200 Subject: [PATCH] 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. --- docs/gen-api-gtkdoc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/gen-api-gtkdoc.py b/docs/gen-api-gtkdoc.py index 6fd259b2..92e63c0d 100644 --- a/docs/gen-api-gtkdoc.py +++ b/docs/gen-api-gtkdoc.py @@ -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