private string gir_version;
private string gir_shared_library;
+ protected string doc_format = "unknown";
+
protected virtual string? get_interface_comment (Interface iface) {
return null;
}
stream.printf ("<repository version=\"1.2\"");
stream.printf (" xmlns=\"http://www.gtk.org/introspection/core/1.0\"");
stream.printf (" xmlns:c=\"http://www.gtk.org/introspection/c/1.0\"");
+ stream.printf (" xmlns:doc=\"http://www.gtk.org/introspection/doc/1.0\"");
stream.printf (" xmlns:glib=\"http://www.gtk.org/introspection/glib/1.0\"");
stream.printf (">\n");
indent++;
buffer.append_printf ("<c:include name=\"%s\"/>\n", name);
}
+ private void write_doc_format (string name) {
+ write_indent ();
+ buffer.append_printf ("<doc:format name=\"%s\"/>\n", name);
+ }
+
public override void visit_source_file (SourceFile source_file) {
if (source_file.file_type != SourceFileType.PACKAGE) {
return;
ns.set_attribute_string ("CCode", "gir_version", gir_version);
write_c_includes (ns);
+ write_doc_format (doc_format);
write_indent ();
buffer.append_printf ("<namespace name=\"%s\" version=\"%s\"", gir_namespace, gir_version);
-<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:doc="http://www.gtk.org/introspection/doc/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GObject" version="2.0"/>
<include name="GLib" version="2.0"/>
<include name="Gio" version="2.0"/>
<package name="girtest"/>
<c:include name="girtest.h"/>
+<doc:format name="unknown"/>
<namespace name="GirTest" version="1.0" shared-library="girtest" c:prefix="GirTest" c:identifier-prefixes="GirTest" c:symbol-prefixes="gir_test">
<function name="nested_function" c:identifier="gir_test_nested_function">
<return-value transfer-ownership="full">
<include name="GObject" version="2.0"/>
<package name="test"/>
<c:include name="test.h"/>
+<doc:format name="unknown"/>
<namespace name="Test" version="1.2" c:prefix="Test" c:identifier-prefixes="Test" c:symbol-prefixes="test">
<class name="TestFoo" c:type="TestTestFoo" c:symbol-prefix="foo" glib:type-name="TestTestFoo" glib:get-type="test_test_foo_get_type" glib:type-struct="TestFooClass" glib:fundamental="1" glib:ref-func="test_test_foo_ref" glib:unref-func="test_test_foo_unref" glib:set-value-func="test_test_value_set_foo" glib:get-value-func="test_test_value_get_foo">
<field name="parent_instance" readable="0" private="1">
<include name="Manam" version="1.0"/>
<package name="test"/>
<c:include name="test.h"/>
+<doc:format name="unknown"/>
<namespace name="Test" version="1.2" c:prefix="Test" c:identifier-prefixes="Test" c:symbol-prefixes="test">
<function name="use_combined_foo" c:identifier="test_use_combined_foo">
<return-value transfer-ownership="full">
public GirWriter (SymbolResolver resolver) {
this.renderer = new GtkdocRenderer ();
this.resolver = resolver;
+ this.doc_format = "gtk-doc-markdown";
}
private string? translate (Content.Comment? documentation) {
-<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
+<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:doc="http://www.gtk.org/introspection/doc/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
<include name="GObject" version="2.0"/>
<package name="girtest"/>
<c:include name="girtest.h"/>
+<doc:format name="gtk-doc-markdown"/>
<namespace name="GirTest" version="1.0" c:prefix="GirTest" c:identifier-prefixes="GirTest" c:symbol-prefixes="gir_test">
<enumeration name="EnumTest" c:type="GirTestEnumTest" glib:type-name="GirTestEnumTest" glib:get-type="gir_test_enum_test_get_type">
<doc xml:space="preserve" filename="girtest.vala" line="40" column="2"><para>An example comment for an example enum.</para></doc>