]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
rawmidi: migrate to gi-docgen from gtk-doc
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 16 Mar 2022 00:03:48 +0000 (09:03 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 16 Mar 2022 00:03:48 +0000 (09:03 +0900)
This commit uses gi-docgen and obsolete gtk-doc.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
doc/meson.build
doc/rawmidi/alsarawmidi.toml.in [new file with mode: 0644]
doc/rawmidi/meson.build [new file with mode: 0644]
doc/rawmidi/overview.md [new file with mode: 0644]
doc/rawmidi/urlmap.js [new file with mode: 0644]
doc/reference/meson.build
doc/reference/rawmidi/alsarawmidi-docs.xml [deleted file]
doc/reference/rawmidi/alsarawmidi.types [deleted file]
doc/reference/rawmidi/meson.build [deleted file]

index 8575a661dad8564a50acf446be87ec81650d9ca1..2bdc78a098cc71be81e8e4e3999397fad71bc0e5 100644 (file)
@@ -11,4 +11,5 @@ gidocgen = find_program('gi-docgen')
 
 subdir('ctl')
 subdir('hwdep')
+subdir('rawmidi')
 subdir('reference')
diff --git a/doc/rawmidi/alsarawmidi.toml.in b/doc/rawmidi/alsarawmidi.toml.in
new file mode 100644 (file)
index 0000000..7ca263c
--- /dev/null
@@ -0,0 +1,34 @@
+[library]
+version = "@VERSION@"
+description = "alsarawmidi"
+authors = "Takashi Sakamoto"
+license = "LGPL-3.0-or-later"
+website_url = "https://alsa-project.github.io/alsa-gobject-docs/alsarawmidi/"
+browse_url = "https://github.com/alsa-project/alsa-gobject"
+repository_url = "https://github.com/alsa-project/alsa-gobject.git"
+
+dependencies = [
+  "GLib-2.0",
+  "GObject-2.0",
+]
+
+[dependencies."GLib-2.0"]
+name = "GLib"
+description = "The base utility library"
+docs_url = "https://docs.gtk.org/glib/"
+
+[dependencies."GObject-2.0"]
+name = "GObject"
+description = "The base type system and object class"
+docs_url = "https://docs.gtk.org/gobject/"
+
+[source-location]
+base_url = "https://github.com/alsa-project/alsa-gobject/blob/master/"
+file_format = "{filename}#L{line}"
+
+[extra]
+content_files = [
+  "overview.md",
+]
+
+urlmap_file = "urlmap.js"
diff --git a/doc/rawmidi/meson.build b/doc/rawmidi/meson.build
new file mode 100644 (file)
index 0000000..4a547ce
--- /dev/null
@@ -0,0 +1,27 @@
+ext_contents = [
+  'overview.md',
+]
+
+doc_toml = configure_file(
+  input: 'alsarawmidi.toml.in',
+  output: 'alsarawmidi.toml',
+  configuration: conf,
+)
+
+custom_target('alsarawmidi-doc',
+  input: [ doc_toml, alsarawmidi_gir[0] ],
+  output: 'alsarawmidi',
+  command: [
+    gidocgen,
+    'generate',
+    '--no-namespace-dir',
+    '--config=@INPUT0@',
+    '--output-dir=@OUTPUT@',
+    '--content-dir=@0@'.format(meson.current_source_dir()),
+    '@INPUT1@',
+  ],
+  depend_files: [ ext_contents ],
+  build_by_default: true,
+  install: true,
+  install_dir: doc_dir,
+)
diff --git a/doc/rawmidi/overview.md b/doc/rawmidi/overview.md
new file mode 100644 (file)
index 0000000..f2e2b2e
--- /dev/null
@@ -0,0 +1,6 @@
+Title: Overview
+
+This library is designed for applications to manipulate ALSA Rawmidi character device and operate
+rawmidi functionality abstracted as a pair of streams and substream. ALSARawmidiStreamPair
+represents the pair of streams. It holds file descriptor and creates GSource for event dispathing
+by GLib's GMainContext/GMainLoop.
diff --git a/doc/rawmidi/urlmap.js b/doc/rawmidi/urlmap.js
new file mode 100644 (file)
index 0000000..915cb9d
--- /dev/null
@@ -0,0 +1,4 @@
+baseURLs = [
+    [ 'GLib', 'https://docs.gtk.org/glib/' ],
+    [ 'GObject', 'https://docs.gtk.org/gobject/' ],
+]
index aad0fadcfcc6145a897fbf72a095a1663baa201c..d1c4adc37c2e4ddaed0dd34499a3921fd1498874 100644 (file)
@@ -6,4 +6,3 @@ configure_file(
 
 subdir('timer')
 subdir('seq')
-subdir('rawmidi')
diff --git a/doc/reference/rawmidi/alsarawmidi-docs.xml b/doc/reference/rawmidi/alsarawmidi-docs.xml
deleted file mode 100644 (file)
index 392bbeb..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
-                      "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
-<!ENTITY version SYSTEM "../version.xml">
-]>
-
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
-    <bookinfo>
-        <title>ALSARawmidi Reference Manual</title>
-    <releaseinfo>This document is for the ALSARawmidi library, version &version;.
-    </releaseinfo>
-    </bookinfo>
-
-    <chapter id="introduction">
-        <title>Introduction</title>
-        <para>This library is designed for applications to manipulate ALSA
-        Rawmidi character device and operate rawmidi functionality abstracted
-        as a pair of streams and substream. ALSARawmidiStreamPair represents
-        the pair of streams. It holds file descriptor and creates GSource for
-        event dispathing by GLib's GMainContext/GMainLoop.</para>
-    </chapter>
-
-    <chapter id="alsarawmidi-enumerations">
-        <title>ALSARawmidi enumerations</title>
-        <xi:include href="xml/alsarawmidi-enum-types.xml"/>
-    </chapter>
-
-    <chapter id="alsarawmidi-global-methods">
-        <title>ALSARawmidi global methods</title>
-        <xi:include href="xml/query.xml"/>
-    </chapter>
-
-    <chapter id="alsarawmidi-objects">
-        <title>ALSARawmidi objects</title>
-        <xi:include href="xml/stream-pair.xml"/>
-        <xi:include href="xml/substream-info.xml"/>
-        <xi:include href="xml/substream-params.xml"/>
-        <xi:include href="xml/substream-status.xml"/>
-    </chapter>
-
-    <index id="index-all">
-        <title>Index of all symbols</title>
-        <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
-    </index>
-
-    <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
-
-</book>
diff --git a/doc/reference/rawmidi/alsarawmidi.types b/doc/reference/rawmidi/alsarawmidi.types
deleted file mode 100644 (file)
index 21fe64f..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-alsarawmidi_stream_direction_get_type
-alsarawmidi_stream_pair_info_flag_get_type
-alsarawmidi_substream_info_get_type
-alsarawmidi_stream_pair_get_type
-alsarawmidi_substream_params_get_type
-alsarawmidi_substream_status_get_type
diff --git a/doc/reference/rawmidi/meson.build b/doc/reference/rawmidi/meson.build
deleted file mode 100644 (file)
index a0bbdb3..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-gnome.gtkdoc('alsarawmidi',
-  src_dir : alsarawmidi_dir,
-  main_xml : 'alsarawmidi-docs.xml',
-  scan_args: [
-    '--ignore-headers=privates.h',
-  ],
-  gobject_typesfile: 'alsarawmidi.types',
-  dependencies: alsarawmidi_dependency,
-  install : true,
-)