[dia] Setup gtk-doc



commit ac488f1b2fb5c7f2ed1aad20360703cff832d887
Author: Zander Brown <zbrown gnome org>
Date:   Wed May 8 12:55:54 2019 +0100

    Setup gtk-doc
    
    Not overly useful yet and throws an awful lot of warnings but should get better as we clean up the 
codebase

 docs/dia-docs.xml              | 194 +++++++++++++++++++++++++++++++++++++++++
 docs/meson.build               |  41 +++++++++
 docs/xml/gtkdocentities.ent.in |   9 ++
 docs/xml/meson.build           |  11 +++
 lib/path-math.c                |   2 +-
 lib/pattern.c                  |   8 +-
 meson.build                    |   1 +
 meson_options.txt              |   3 +
 8 files changed, 264 insertions(+), 5 deletions(-)
---
diff --git a/docs/dia-docs.xml b/docs/dia-docs.xml
new file mode 100644
index 00000000..31463ad8
--- /dev/null
+++ b/docs/dia-docs.xml
@@ -0,0 +1,194 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd";
+[
+  <!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
+  <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
+  %gtkdocentities;
+]>
+<book id="index">
+  <bookinfo>
+    <title>&package_name; Reference Manual</title>
+    <releaseinfo>
+      <para>This document is the API reference for &package_name; &package_version;</para>
+      <para>
+        If you find any issues in this API reference, please report it
+        using <ulink type="http" url="&package_bugreport;">at the
+        bugtracker</ulink>
+      </para>
+    </releaseinfo>
+
+    <copyright>
+      <year>2019</year>
+      <holder>Zander Brown</holder>
+    </copyright>
+  </bookinfo>
+
+  <part id="core-api">
+    <title>Objects</title>
+    <xi:include href="xml/diagramdata.xml"/>
+    <xi:include href="xml/group.xml"/>
+    <xi:include href="xml/prop_dict.xml"/>
+    <xi:include href="xml/diagram_tree_model.xml"/>
+    <xi:include href="xml/properties-dialog.xml"/>
+    <xi:include href="xml/app_procs.xml"/>
+    <xi:include href="xml/diagram_tree.xml"/>
+    <xi:include href="xml/gtkhwrapbox.xml"/>
+    <xi:include href="xml/properties.xml"/>
+    <xi:include href="xml/arrows.xml"/>
+    <xi:include href="xml/diagram.xml"/>
+    <xi:include href="xml/gtkvwrapbox.xml"/>
+    <xi:include href="xml/prop_geomtypes.xml"/>
+    <xi:include href="xml/attributes.xml"/>
+    <xi:include href="xml/diagrid.xml"/>
+    <xi:include href="xml/gtkwrapbox.xml"/>
+    <xi:include href="xml/propinternals.xml"/>
+    <xi:include href="xml/autoroute.xml"/>
+    <xi:include href="xml/dia_image.xml"/>
+    <xi:include href="xml/handle_ops.xml"/>
+    <xi:include href="xml/prop_inttypes.xml"/>
+    <xi:include href="xml/autosave.xml"/>
+    <xi:include href="xml/diaimportrenderer.xml"/>
+    <xi:include href="xml/handle.xml"/>
+    <xi:include href="xml/prop_matrix.xml"/>
+    <xi:include href="xml/bezier-common.xml"/>
+    <xi:include href="xml/dialib.xml"/>
+    <xi:include href="xml/highlight.xml"/>
+    <xi:include href="xml/prop_pattern.xml"/>
+    <xi:include href="xml/bezier_conn.xml"/>
+    <xi:include href="xml/dialinechooser.xml"/>
+    <xi:include href="xml/interface.xml"/>
+    <xi:include href="xml/prop_pixbuf.xml"/>
+    <xi:include href="xml/beziershape.xml"/>
+    <xi:include href="xml/dialogs.xml"/>
+    <xi:include href="xml/intl.xml"/>
+    <xi:include href="xml/prop_sdarray.xml"/>
+    <xi:include href="xml/boundingbox.xml"/>
+    <xi:include href="xml/diamenu.xml"/>
+    <xi:include href="xml/layer_dialog.xml"/>
+    <xi:include href="xml/prop_text.xml"/>
+    <xi:include href="xml/color_area.xml"/>
+    <xi:include href="xml/diaoptionmenu.xml"/>
+    <xi:include href="xml/linewidth_area.xml"/>
+    <xi:include href="xml/prop_widgets.xml"/>
+    <xi:include href="xml/color.xml"/>
+    <xi:include href="xml/diapagelayout.xml"/>
+    <xi:include href="xml/load_save.xml"/>
+    <xi:include href="xml/recent_files.xml"/>
+    <xi:include href="xml/commands.xml"/>
+    <xi:include href="xml/diapathrenderer.xml"/>
+    <xi:include href="xml/magnify.xml"/>
+    <xi:include href="xml/render_gdk.xml"/>
+    <xi:include href="xml/confirm.xml"/>
+    <xi:include href="xml/diapatternselector.xml"/>
+    <xi:include href="xml/menus.xml"/>
+    <xi:include href="xml/render_pixmap.xml"/>
+    <xi:include href="xml/connectionpoint_ops.xml"/>
+    <xi:include href="xml/dia-props.xml"/>
+    <xi:include href="xml/message.xml"/>
+    <xi:include href="xml/ruler.xml"/>
+    <xi:include href="xml/connectionpoint.xml"/>
+    <xi:include href="xml/diarenderer.xml"/>
+    <xi:include href="xml/modify_tool.xml"/>
+    <xi:include href="xml/scroll_tool.xml"/>
+    <xi:include href="xml/connection.xml"/>
+    <xi:include href="xml/diasvgrenderer.xml"/>
+    <xi:include href="xml/navigation.xml"/>
+    <xi:include href="xml/select.xml"/>
+    <xi:include href="xml/connpoint_line.xml"/>
+    <xi:include href="xml/dia_svg.xml"/>
+    <xi:include href="xml/objchange.xml"/>
+    <xi:include href="xml/sheets_dialog_callbacks.xml"/>
+    <xi:include href="xml/create_object.xml"/>
+    <xi:include href="xml/diatransformrenderer.xml"/>
+    <xi:include href="xml/object-alias.xml"/>
+    <xi:include href="xml/sheets_dialog.xml"/>
+    <xi:include href="xml/create.xml"/>
+    <xi:include href="xml/diatransform.xml"/>
+    <xi:include href="xml/object_index.sgml"/>
+    <xi:include href="xml/sheets.xml"/>
+    <xi:include href="xml/cursor.xml"/>
+    <xi:include href="xml/diatypes.xml"/>
+    <xi:include href="xml/object_ops.xml"/>
+    <xi:include href="xml/sheet.xml"/>
+    <xi:include href="xml/cut_n_paste.xml"/>
+    <xi:include href="xml/diavar.xml"/>
+    <xi:include href="xml/object.xml"/>
+    <xi:include href="xml/standard-path.xml"/>
+    <xi:include href="xml/debug.xml"/>
+    <xi:include href="xml/dia_xml_libxml.xml"/>
+    <xi:include href="xml/orth_conn.xml"/>
+    <xi:include href="xml/textattr.xml"/>
+    <xi:include href="xml/defaults.xml"/>
+    <xi:include href="xml/dia_xml.xml"/>
+    <xi:include href="xml/pagesetup.xml"/>
+    <xi:include href="xml/textedit_tool.xml"/>
+    <xi:include href="xml/dia-application.xml"/>
+    <xi:include href="xml/disp_callbacks.xml"/>
+    <xi:include href="xml/paper.xml"/>
+    <xi:include href="xml/textedit.xml"/>
+    <xi:include href="xml/diaarrowchooser.xml"/>
+    <xi:include href="xml/display.xml"/>
+    <xi:include href="xml/parent.xml"/>
+    <xi:include href="xml/textline.xml"/>
+    <xi:include href="xml/diacellrendererenum.xml"/>
+    <xi:include href="xml/dynamic_obj.xml"/>
+    <xi:include href="xml/path-math.xml"/>
+    <xi:include href="xml/text.xml"/>
+    <xi:include href="xml/diacellrendererproperty.xml"/>
+    <xi:include href="xml/dynamic_refresh.xml"/>
+    <xi:include href="xml/pattern.xml"/>
+    <xi:include href="xml/toolbox.xml"/>
+    <xi:include href="xml/diacontext.xml"/>
+    <xi:include href="xml/element.xml"/>
+    <xi:include href="xml/persistence.xml"/>
+    <xi:include href="xml/tool.xml"/>
+    <xi:include href="xml/dia_dirs.xml"/>
+    <xi:include href="xml/exit_dialog.xml"/>
+    <xi:include href="xml/plugin-manager.xml"/>  
+    <xi:include href="xml/filedlg.xml"/>
+    <xi:include href="xml/plug-ins.xml"/>
+    <xi:include href="xml/undo.xml"/>
+    <xi:include href="xml/filter.xml"/>
+    <xi:include href="xml/poly_conn.xml"/>
+    <xi:include href="xml/units.xml"/>
+    <xi:include href="xml/diadynamicmenu.xml"/>
+    <xi:include href="xml/find-and-replace.xml"/>
+    <xi:include href="xml/polyshape.xml"/>
+    <xi:include href="xml/utils.xml"/>
+    <xi:include href="xml/dia-enums.xml"/>
+    <xi:include href="xml/focus.xml"/>
+    <xi:include href="xml/preferences.xml"/>
+    <xi:include href="xml/widgets.xml"/>
+    <xi:include href="xml/diaerror.xml"/>
+    <xi:include href="xml/font.xml"/>
+    <xi:include href="xml/prefs.xml"/>
+    <xi:include href="xml/diafontselector.xml"/>
+    <xi:include href="xml/geometry.xml"/>
+    <xi:include href="xml/prop_attr.xml"/>
+    <xi:include href="xml/diagdkrenderer.xml"/>
+    <xi:include href="xml/grid.xml"/>
+    <xi:include href="xml/prop_basic.xml"/>
+  </part>
+
+  <chapter id="object-tree">
+    <title>Object Hierarchy</title>
+    <xi:include href="xml/tree_index.sgml"/>
+  </chapter>
+
+  <index id="api-index-full">
+    <title>API Index</title>
+    <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+  </index>
+
+  <index id="deprecated-api-index" role="deprecated">
+    <title>Index of deprecated API</title>
+    <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
+  </index>
+
+  <index id="annotations-glossary">
+  <title>Annotations glossary</title>
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+  </index>
+
+</book>
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 00000000..a3446c0f
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,41 @@
+if get_option('gtk_doc')
+
+subdir('xml')
+
+private_headers = [
+]
+
+images = [
+]
+
+content_files = [
+]
+
+glib_prefix = dependency('glib-2.0').get_pkgconfig_variable('prefix')
+glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+docpath = join_paths(get_option('datadir'), 'gtk-doc', 'html')
+
+gnome.gtkdoc('dia',
+           main_xml: 'dia-docs.xml',
+            src_dir: [
+                       join_paths(meson.source_root(), 'lib'),
+                       join_paths(meson.build_root(), 'lib'),
+                     ],
+       dependencies: [libdia_dep, libgtk_dep, libxml_dep, libm_dep],
+  gobject_typesfile: 'dia.types',
+          scan_args: [
+                       '--rebuild-types',
+                       '--ignore-headers=' + ' '.join(private_headers),
+                     ],
+       fixxref_args: [
+                       '--html-dir=@0@'.format(docpath),
+                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'glib')),
+                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gobject')),
+                       '--extra-dir=@0@'.format(join_paths(glib_docpath, 'gio')),
+                     ],
+        install_dir: 'dia',
+      content_files: content_files,
+        html_assets: images,
+            install: true)
+
+endif
diff --git a/docs/xml/gtkdocentities.ent.in b/docs/xml/gtkdocentities.ent.in
new file mode 100644
index 00000000..db8f29d2
--- /dev/null
+++ b/docs/xml/gtkdocentities.ent.in
@@ -0,0 +1,9 @@
+<!ENTITY package "@PACKAGE@">
+<!ENTITY package_bugreport "@PACKAGE_BUGREPORT@">
+<!ENTITY package_name "@PACKAGE_NAME@">
+<!ENTITY package_string "@PACKAGE_STRING@">
+<!ENTITY package_tarname "@PACKAGE_TARNAME@">
+<!ENTITY package_url "@PACKAGE_URL@">
+<!ENTITY package_version "@PACKAGE_VERSION@">
+<!ENTITY package_api_version "@PACKAGE_API_VERSION@">
+<!ENTITY package_ver_str "@PACKAGE_STRING@-@PACKAGE_API_VERSION@">
diff --git a/docs/xml/meson.build b/docs/xml/meson.build
new file mode 100644
index 00000000..e3c5e137
--- /dev/null
+++ b/docs/xml/meson.build
@@ -0,0 +1,11 @@
+ent_conf = configuration_data()
+ent_conf.set('PACKAGE', 'Dia')
+ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/dia/issues')
+ent_conf.set('PACKAGE_NAME', 'Dia')
+ent_conf.set('PACKAGE_STRING', 'dia')
+ent_conf.set('PACKAGE_TARNAME', 'dia-' + meson.project_version())
+ent_conf.set('PACKAGE_URL', 'https://gitlab.gnome.org/GNOME/dia')
+ent_conf.set('PACKAGE_VERSION', meson.project_version())
+ent_conf.set('PACKAGE_API_VERSION', '0.0')
+configure_file(input: 'gtkdocentities.ent.in', output: 'gtkdocentities.ent', configuration: ent_conf)
+
diff --git a/lib/path-math.c b/lib/path-math.c
index bc1bf42e..b16736a9 100644
--- a/lib/path-math.c
+++ b/lib/path-math.c
@@ -502,7 +502,7 @@ _find_intersections (GArray *one, GArray *two)
         * Any segment might be split more than once so seg_one and seg_two
         * are not unique yet. Also the calculated split always refers to
         * the whole segment. We could avoid the _split_segments() below by
-        * modifying `one� and `two� in place. But instead of later
+        * modifying `one� and `two� in place. But instead of later
         * segmentation that would complicate the seq_* reference _and_ give
         * worse runtime behavior because we would need to start over with
         * every intersection found.
diff --git a/lib/pattern.c b/lib/pattern.c
index 06f1b298..b87eaabd 100644
--- a/lib/pattern.c
+++ b/lib/pattern.c
@@ -120,10 +120,10 @@ dia_pattern_set_point (DiaPattern *self, real x, real y)
   if (self->type == DIA_RADIAL_GRADIENT) {
     real dist = distance_ellipse_point (&self->start, self->radius*2, self->radius*2, 0.0, &self->other);
     if (dist > 0) {
-      /* If the point defined by �fx� and �fy� lies outside the circle defined
-       * by �cx�, �cy� and �r�, then the user agent shall set the focal point to
-       * the intersection of the line from (�cx�, �cy�) to (�fx�, �fy�) with the
-       * circle defined by �cx�, �cy� and �r�
+      /* If the point defined by �fx� and �fy� lies outside the circle defined
+       * by �cx�, �cy� and �r�, then the user agent shall set the focal point to
+       * the intersection of the line from (�cx�, �cy�) to (�fx�, �fy�) with the
+       * circle defined by �cx�, �cy� and �r�
        */
       Point p1 = self->start;
       Point p2 = self->other;
diff --git a/meson.build b/meson.build
index d26a5edf..52fd794b 100644
--- a/meson.build
+++ b/meson.build
@@ -85,6 +85,7 @@ subdir('plug-ins')
 subdir('sheets')
 subdir('shapes')
 subdir('tests')
+subdir('docs')
 
 # TODO: idealy this should use run_env from tests/
 # Unfortunately, neither run_target or custom_target support env
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 00000000..b838b99c
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,3 @@
+option('gtk_doc',
+       type: 'boolean', value: false,
+       description: 'Whether to generate the API reference')
\ No newline at end of file


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