]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
timer: 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/reference/meson.build
doc/reference/timer/alsatimer-docs.xml [deleted file]
doc/reference/timer/alsatimer.types [deleted file]
doc/reference/timer/meson.build [deleted file]
doc/timer/alsatimer.toml.in [new file with mode: 0644]
doc/timer/meson.build [new file with mode: 0644]
doc/timer/overview.md [new file with mode: 0644]
doc/timer/urlmap.js [new file with mode: 0644]
src/rawmidi/meson.build
src/timer/meson.build

index 2bdc78a098cc71be81e8e4e3999397fad71bc0e5..177b259a5a55a63e45f755d0519e3a913f4946c7 100644 (file)
@@ -12,4 +12,5 @@ gidocgen = find_program('gi-docgen')
 subdir('ctl')
 subdir('hwdep')
 subdir('rawmidi')
+subdir('timer')
 subdir('reference')
index d1c4adc37c2e4ddaed0dd34499a3921fd1498874..cdfb5689130f1dd6d6399351b041c4f22d7de926 100644 (file)
@@ -4,5 +4,4 @@ configure_file(
   configuration : conf,
 )
 
-subdir('timer')
 subdir('seq')
diff --git a/doc/reference/timer/alsatimer-docs.xml b/doc/reference/timer/alsatimer-docs.xml
deleted file mode 100644 (file)
index bbb7fa6..0000000
+++ /dev/null
@@ -1,56 +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>ALSATimer Reference Manual</title>
-    <releaseinfo>This document is for the ALSATimer library, version &version;.
-    </releaseinfo>
-    </bookinfo>
-
-    <chapter id="introduction">
-        <title>Introduction</title>
-        <para>This library is designed for applications to manipulate ALSA
-        timer character device and operate timer functionality abstracted
-        as timer device and user instance. ALSATimerUserInstance represents
-        the user instance. It holds file descriptor and creates GSource for
-        event dispatching by GLib's GMainContext/GMainLoop.</para>
-    </chapter>
-
-    <chapter id="alsatimer-enumerations">
-        <title>ALSATimer enumerations</title>
-        <xi:include href="xml/alsatimer-enum-types.xml"/>
-    </chapter>
-
-    <chapter id="alsatimer-global-methods">
-        <title>ALSATimer global methods</title>
-        <xi:include href="xml/query.xml"/>
-    </chapter>
-
-    <chapter id="alsatimer-objects">
-        <title>ALSATimer objects</title>
-        <xi:include href="xml/user-instance.xml"/>
-        <xi:include href="xml/device-id.xml"/>
-        <xi:include href="xml/device-info.xml"/>
-        <xi:include href="xml/device-status.xml"/>
-        <xi:include href="xml/device-params.xml"/>
-        <xi:include href="xml/instance-info.xml"/>
-        <xi:include href="xml/instance-status.xml"/>
-        <xi:include href="xml/instance-params.xml"/>
-        <xi:include href="xml/event.xml"/>
-        <xi:include href="xml/event-data-tick.xml"/>
-        <xi:include href="xml/event-data-tstamp.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/timer/alsatimer.types b/doc/reference/timer/alsatimer.types
deleted file mode 100644 (file)
index a1118ec..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-alsatimer_class_get_type
-alsatimer_slave_class_get_type
-alsatimer_specific_global_device_get_type
-alsatimer_device_info_flag_get_type
-alsatimer_instance_param_flag_get_type
-alsatimer_event_type_get_type
-alsatimer_event_data_type_get_type
-alsatimer_device_id_get_type
-alsatimer_device_info_get_type
-alsatimer_device_status_get_type
-alsatimer_device_params_get_type
-alsatimer_user_instance_get_type
-alsatimer_instance_info_get_type
-alsatimer_instance_params_get_type
-alsatimer_instance_status_get_type
-alsatimer_event_get_type
-alsatimer_event_data_tick_get_type
-alsatimer_event_data_tstamp_get_type
diff --git a/doc/reference/timer/meson.build b/doc/reference/timer/meson.build
deleted file mode 100644 (file)
index 37df220..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-gnome.gtkdoc('alsatimer',
-  src_dir : alsatimer_dir,
-  main_xml : 'alsatimer-docs.xml',
-  scan_args: [
-    '--ignore-headers=privates.h',
-  ],
-  gobject_typesfile: 'alsatimer.types',
-  dependencies: alsatimer_dependency,
-  install : true,
-)
diff --git a/doc/timer/alsatimer.toml.in b/doc/timer/alsatimer.toml.in
new file mode 100644 (file)
index 0000000..5ac6b3a
--- /dev/null
@@ -0,0 +1,34 @@
+[library]
+version = "@VERSION@"
+description = "alsatimer"
+authors = "Takashi Sakamoto"
+license = "LGPL-3.0-or-later"
+website_url = "https://alsa-project.github.io/alsa-gobject-docs/alsatimer/"
+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/timer/meson.build b/doc/timer/meson.build
new file mode 100644 (file)
index 0000000..da4ab0e
--- /dev/null
@@ -0,0 +1,27 @@
+ext_contents = [
+  'overview.md',
+]
+
+doc_toml = configure_file(
+  input: 'alsatimer.toml.in',
+  output: 'alsatimer.toml',
+  configuration: conf,
+)
+
+custom_target('alsatimer-doc',
+  input: [ doc_toml, alsatimer_gir[0] ],
+  output: 'alsatimer',
+  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/timer/overview.md b/doc/timer/overview.md
new file mode 100644 (file)
index 0000000..fb0ad90
--- /dev/null
@@ -0,0 +1,6 @@
+Title: Overview
+
+This library is designed for applications to manipulate ALSA timer character device and operate
+timer functionality abstracted as timer device and user instance. ALSATimerUserInstance represents
+the user instance. It holds file descriptor and creates GSource for event dispatching by GLib's
+GMainContext/GMainLoop.
diff --git a/doc/timer/urlmap.js b/doc/timer/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 ae9b9f4f1b389704f114dc7616786c2bd6c25701..8d0682ad01b1bd5965ec10501ec1a429e4ac51da 100644 (file)
@@ -106,7 +106,7 @@ pkg.generate(library,
 )
 
 # Generate metadata for gobject introspection.
-gnome.generate_gir(library,
+alsarawmidi_gir = gnome.generate_gir(library,
   sources: enums + headers + sources,
   nsversion: '0.0',
   namespace: namespace,
@@ -121,10 +121,3 @@ gnome.generate_gir(library,
   header: 'alsarawmidi.h',
   install: true,
 )
-
-# For documentation of gtk-doc.
-alsarawmidi_dir = include_directories('.')
-alsarawmidi_dependency = declare_dependency(
-  link_with: library,
-  dependencies: dependencies,
-)
index a476e5f76eca2caf5cfaae342ebad96a6ce79f5a..462de7dc351d41d099e971fd2f817401f3df4901 100644 (file)
@@ -137,8 +137,6 @@ alsatimer_gir = gnome.generate_gir(library,
   install: true,
 )
 
-# For documentation of gtk-doc.
-alsatimer_dir = include_directories('.')
 alsatimer_dependency = declare_dependency(
   link_with: library,
   dependencies: dependencies,