docs: Migrate from gtk-doc to gi-docgen

gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
This commit is contained in:
Niels De Graef
2021-11-28 19:36:07 +01:00
parent 3fe01513e7
commit 92e80d12e8
134 changed files with 546 additions and 25972 deletions

View File

@ -0,0 +1,26 @@
## Process this file with automake to produce Makefile.in
GIMP_DOC_LOGO = $(abs_top_srcdir)/data/images/gimp-logo.ong
gimp-ui-3.0.toml: gimp-ui-3.0.toml.in
$(AM_V_GEN) sed \
-e 's/@GIMP_VERSION[@]/$(GIMP_VERSION)/' \
-e 's/@GIMP_LOGO[@]/$(GIMP_DOC_LOGO)/' \
$< $@
# Markdown content files
content_files = \
widget-gallery.md \
$(NULL)
GimpUi-reference: $(top_builddir)/libgimp/GimpUi-@GIMP_API_VERSION@.gir $(top_builddir)/libgimp/Gimp-@GIMP_API_VERSION@.gir $(content_files) gimp-ui-3.0.toml
$(GI_DOCGEN) \
generate \
--quiet \
--fatal-warnings \
--config=gimp-ui-3.0.toml \
--output-dir=$(abs_builddir)/Gimp-3.0 \
--no-namespace-dir \
--content-dir=$(abs_srcdir) \
--add-include-path=$(top_abs_builddir)/gimp \
$<

View File

@ -0,0 +1,108 @@
[library]
namespace = "GimpUi"
version = "@GIMP_VERSION@"
browse_url = "https://gitlab.gnome.org/GNOME/gimp/"
repository_url = "https://gitlab.gnome.org/GNOME/gimp.git"
website_url = "https://www.gimp.org"
authors = "GIMP contributors"
logo_url = "@GIMP_LOGO@"
license = "GPL-3.0-or-later"
description = "GIMP UI library"
dependencies = [
'Babl-0.1',
'GLib-2.0',
'GObject-2.0',
'GdkPixbuf-2.0',
'Gegl-0.4',
'Gio-2.0',
'Gtk-3.0',
'cairo-1.0',
]
devhelp = true
search_index = true
[dependencies."Babl-0.1"]
name = "Babl"
description = "Pixel encoding and color space conversion engine"
docs_url = "https://gegl.org/babl"
[dependencies."GLib-2.0"]
name = "GLib"
description = "C Utility Library"
docs_url = "https://developer.gnome.org/glib/stable"
[dependencies."GObject-2.0"]
name = "GObject"
description = "The base type system library"
docs_url = "https://developer.gnome.org/gobject/stable"
[dependencies."GdkPixbuf-2.0"]
name = "GdkPixbuf"
description = "Image loading and scaling"
docs_url = "https://docs.gtk.org/gdk-pixbuf/"
[dependencies."Gegl-0.4"]
name = "Gegl"
description = "Generic Graphics Library"
docs_url = "https://gegl.org/"
[dependencies."Gio-2.0"]
name = "Gio"
description = "GObject interfaces and objects"
docs_url = "https://developer.gnome.org/gio/stable"
[dependencies."Gtk-3.0"]
name = "GTK"
description = "The GTK toolkit"
docs_url = "https://developer.gnome.org/gtk3/stable"
[dependencies."cairo-1.0"]
name = "Cairo"
description = "A 2D graphics library with support for multiple output devices"
docs_url = "https://www.cairographics.org/manual/"
[theme]
name = "basic"
show_index_summary = true
show_class_hierarchy = true
[source-location]
base_url = "https://gitlab.gnome.org/GNOME/gimp/-/blob/master/"
[extra]
content_files = [
'widget-gallery.md',
]
content_images = [
'images/browser.png',
'images/busy-box.png',
'images/button.png',
'images/chain-button.png',
'images/color-area.png',
'images/color-button.png',
'images/color-hex-entry.png',
'images/color-notebook.png',
'images/color-profile-combo-box.png',
'images/color-profile-view.png',
'images/color-scale.png',
'images/color-scales.png',
'images/color-select.png',
'images/color-selection.png',
'images/dialog.png',
'images/enum-combo-box.png',
'images/enum-label.png',
'images/file-entry.png',
'images/frame.png',
'images/hint-box.png',
'images/int-combo-box.png',
'images/memsize-entry.png',
'images/number-pair-entry.png',
'images/offset-area.png',
'images/page-selector.png',
'images/path-editor.png',
'images/pick-button.png',
'images/preview-area.png',
'images/ruler.png',
'images/string-combo-box.png',
'images/unit-combo-box.png',
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,38 @@
# Extra markdown files
gimp_ui_doc_content_files = [
'widget-gallery.md',
]
gimp_ui_doc_toml = configure_file(
input: 'gimp-ui-3.0.toml.in',
output: '@BASENAME@',
configuration: {
'GIMP_VERSION': gimp_version,
'GIMP_LOGO': gimp_logo_dir / 'gimp-logo.png',
},
)
gimp_ui_docs = custom_target('gimp-ui-docs',
input: libgimpui_gir[0],
output: 'GimpUi-@0@'.format(gimp_api_version),
command: [
gi_docgen,
'generate',
'--quiet',
'--fatal-warnings',
'--config', gimp_ui_doc_toml,
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'--add-include-path=@0@'.format(meson.build_root() / 'libgimp'),
'@INPUT@',
],
depends: libgimp_gir[0],
depend_files: [
gimp_ui_doc_toml,
gimp_ui_doc_content_files,
],
build_by_default: true,
install: true,
install_dir: get_option('datadir') / 'doc',
)

View File

@ -0,0 +1,36 @@
Title: Widget gallery
Widget gallery
==============
[![Browser](browser.png)](class.Browser.html)
[![Button](button.png)](class.Button.html)
[![BusyBox](busy-box.png)](class.BusyBox.html)
[![ChainButton](chain-button.png)](class.ChainButton.html)
[![ColorArea](color-area.png)](class.ColorArea.html)
[![ColorButton](color-button.png)](class.ColorButton.html)
[![ColorHexEntry](color-hex-entry.png)](class.ColorHexEntry.html)
[![ColorNotebook](color-notebook.png)](class.ColorNotebook.html)
[![ColorScale](color-scale.png)](class.ColorScale.html)
[![ColorScales](color-scales.png)](class.ColorScales.html)
[![ColorSelect](color-select.png)](class.ColorSelect.html)
[![ColorSelection](color-selection.png)](class.ColorSelection.html)
[![ColorProfileComboBox](color-profile-combo-box.png)](class.ColorProfileComboBox.html)
[![ColorProfileView](color-profile-view.png)](class.ColorProfileView.html)
[![Dialog](dialog.png)](class.Dialog.html)
[![EnumComboBox](enum-combo-box.png)](class.EnumComboBox.html)
[![EnumLabel](enum-label.png)](class.EnumLabel.html)
[![FileEntry](file-entry.png)](class.FileEntry.html)
[![Frame](frame.png)](class.Frame.html)
[![HintBox](hint-box.png)](class.HintBox.html)
[![IntComboBox](int-combo-box.png)](class.IntComboBox.html)
[![MemsizeEntry](memsize-entry.png)](class.MemsizeEntry.html)
[![NumberPairEntry](number-pair-entry.png)](class.NumberPairEntry.html)
[![OffsetArea](offset-area.png)](class.OffsetArea.html)
[![PageSelector](page-selector.png)](class.PageSelector.html)
[![PathEditor](path-editor.png)](class.PathEditor.html)
[![PickButton](pick-button.png)](class.PickButton.html)
[![PreviewArea](preview-area.png)](class.PreviewArea.html)
[![Ruler](ruler.png)](class.Ruler.html)
[![StringComboBox](string-combo-box.png)](class.StringComboBox.html)
[![UnitComboBox](unit-combo-box.png)](class.UnitComboBox.html)