[glib/gdbus-codegen] gdbus-codegen: Generate gtk-doc section docs



commit bd5da131a2f38a281729729fc4849f309be31b2a
Author: David Zeuthen <davidz redhat com>
Date:   Tue Apr 19 14:39:47 2011 -0400

    gdbus-codegen: Generate gtk-doc section docs
    
    This is nice to have if using gtk-doc on the generated code. We could
    also generate -sections.txt and .types files but we don't do that
    right now...
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 gio/gdbus-codegen/codegen.py |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)
---
diff --git a/gio/gdbus-codegen/codegen.py b/gio/gdbus-codegen/codegen.py
index f64538b..a64b6d3 100644
--- a/gio/gdbus-codegen/codegen.py
+++ b/gio/gdbus-codegen/codegen.py
@@ -2220,6 +2220,17 @@ class CodeGenerator:
 
         self.c.write(self.docbook_gen.expand(
                 '/**\n'
+                ' * SECTION:%sObjectManagerClient\n'
+                ' * @title: %sObjectManagerClient\n'
+                ' * @short_description: Generated #GDBusObjectManagerClient subclass\n'
+                ' *\n'
+                ' * This section contains a #GDBusObjectManagerClient that uses %sobject_manager_client_get_proxy_type() as the #GDBusProxyTypeFunc.\n'
+                ' */\n'
+                %(self.namespace, self.namespace, self.ns_lower)))
+        self.c.write('\n')
+
+        self.c.write(self.docbook_gen.expand(
+                '/**\n'
                 ' * %sObjectManagerClient:\n'
                 ' *\n'
                 ' * The #%sObjectManagerClient structure contains only private data and should only be accessed using the provided API.\n'
@@ -2514,15 +2525,29 @@ class CodeGenerator:
 
     # ---------------------------------------------------------------------------------------------------
 
+    def generate_interface_intro(self, i):
+        self.c.write('/* ------------------------------------------------------------------------\n'
+                     ' * Code for interface %s\n'
+                     ' * ------------------------------------------------------------------------\n'
+                     ' */\n'
+                     '\n'%(i.name))
+
+        self.c.write(self.docbook_gen.expand(
+                '/**\n'
+                ' * SECTION:%s\n'
+                ' * @title: %s\n'
+                ' * @short_description: Generated C code for the %s D-Bus interface\n'
+                ' *\n'
+                ' * This section contains code for working with the #%s D-Bus interface in C.\n'
+                ' */\n'
+                %(i.camel_name, i.camel_name, i.name, i.name)))
+        self.c.write('\n')
+
     def generate(self):
         self.generate_intro()
         self.declare_types()
         for i in self.ifaces:
-            self.c.write('/* ------------------------------------------------------------------------\n'
-                         ' * Code for interface %s\n'
-                         ' * ------------------------------------------------------------------------\n'
-                         ' */\n'
-                         '\n'%(i.name))
+            self.generate_interface_intro(i)
             self.generate_introspection_for_interface(i)
             self.generate_interface(i)
             self.generate_property_accessors(i)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]