[devhelp/wip/tintou/gtk-doc] Enable GTK-Doc on the project.



commit 00d39f91435e9dd6ba4e4ba1c002727dffeb8b82
Author: Corentin Noël <corentin elementary io>
Date:   Mon Oct 24 00:27:41 2016 +0200

    Enable GTK-Doc on the project.

 Makefile.am                                  |    2 +-
 autogen.sh                                   |    2 +
 configure.ac                                 |   12 +-
 docs/Makefile.am                             |    1 +
 docs/reference/Makefile.am                   |    1 +
 docs/reference/devhelp/Makefile.am           |   91 ++++++++
 docs/reference/devhelp/devhelp-docs.xml      |   55 +++++
 docs/reference/devhelp/devhelp-sections.txt  |  308 ++++++++++++++++++++++++++
 docs/reference/devhelp/devhelp.types         |   16 ++
 gtk-doc.make                                 |  304 +++++++++++++++++++++++++
 src/dh-error.h                               |   14 ++
 src/dh-link.h                                |   20 ++
 src/dh-window.h                              |    5 +
 13 files changed, 829 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 000c27e..414b36d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
-SUBDIRS = po src data misc contrib
+SUBDIRS = po src data misc contrib docs
 
 EXTRA_DIST = autogen.sh
 
diff --git a/autogen.sh b/autogen.sh
index 9b42897..22431ac 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -17,4 +17,6 @@ which gnome-autogen.sh || {
 
 git submodule update --init --recursive
 
+gtkdocize || exit 1
+
 . gnome-autogen.sh
diff --git a/configure.ac b/configure.ac
index 5768770..25551e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ AC_CONFIG_SRCDIR(src/dh-main.c)
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([build-aux])
 
-AM_INIT_AUTOMAKE([1.11 -Wall foreign no-define tar-ustar no-dist-gzip dist-xz])
+AM_INIT_AUTOMAKE([1.11 -Wall foreign no-define tar-ustar no-dist-gzip dist-xz -Wno-portability])
 
 # Support silent build rules, requires at least automake-1.11. Disable
 # by either passing --disable-silent-rules to configure or passing V=1
@@ -89,6 +89,13 @@ AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
 
 AM_PATH_PYTHON([2.3],[],[no])
 
+# check for gtk-doc
+m4_ifdef([GTK_DOC_CHECK], [
+GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
+],[
+AM_CONDITIONAL([ENABLE_GTK_DOC], false)
+])
+
 AC_CONFIG_FILES([
 Makefile
 po/Makefile.in
@@ -101,6 +108,9 @@ data/dtd/Makefile
 misc/Makefile
 misc/gedit-plugin/Makefile
 contrib/Makefile
+docs/Makefile
+docs/reference/Makefile
+docs/reference/devhelp/Makefile
 ])
 
 AC_OUTPUT
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..f3ddc22
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = reference
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
new file mode 100644
index 0000000..e136e1b
--- /dev/null
+++ b/docs/reference/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = devhelp
diff --git a/docs/reference/devhelp/Makefile.am b/docs/reference/devhelp/Makefile.am
new file mode 100644
index 0000000..b14ffa3
--- /dev/null
+++ b/docs/reference/devhelp/Makefile.am
@@ -0,0 +1,91 @@
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=devhelp
+
+# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
+DOC_MODULE_VERSION=3
+
+# The top-level XML file.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
+
+# Directories containing the source code.
+# gtk-doc will search all .c and .h files beneath these paths
+# for inline comments documenting functions and macros.
+# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
+DOC_SOURCE_DIR=$(top_srcdir)/src
+
+# Extra options to pass to gtkdoc-scangobj. Normally not needed.
+SCANGOBJ_OPTIONS=
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb
+# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
+MKDB_OPTIONS=--xml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mkhtml
+MKHTML_OPTIONS=
+
+# Extra options to supply to gtkdoc-fixref. Normally not needed.
+# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
+FIXXREF_OPTIONS=
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
+# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
+HFILE_GLOB=$(top_srcdir)/src/*.h
+CFILE_GLOB=$(top_srcdir)/src/*.c
+
+# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
+# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
+EXTRA_HFILES=
+
+# Header files or dirs to ignore when scanning. Use base file/dir names
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
+IGNORE_HFILES=
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES=
+
+# Extra files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.xml building.xml changes-2.0.xml
+content_files=
+
+# Files where gtk-doc abbrevations (#GtkWidget) are expanded
+# e.g. expand_content_files=running.xml
+expand_content_files=
+
+# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
+# Only needed if you are using gtkdoc-scangobj to dynamically query widget
+# signals and properties.
+# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+GTKDOC_CFLAGS= \
+       -I$(top_srcdir) \
+       -I$(top_builddir) \
+       -I$(top_builddir)/src \
+       $(LIBDEVHELP_CFLAGS) \
+       $(NULL)
+
+GTKDOC_LIBS= \
+       $(top_builddir)/src/libdevhelp-3.la \
+       $(LIBDEVHELP_LIBS) \
+       $(NULL)
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Comment this out if you want 'make check' to test you doc status
+# and run some sanity checks
+if ENABLE_GTK_DOC
+TESTS_ENVIRONMENT = \
+  DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
+  SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
+TESTS = $(GTKDOC_CHECK)
+endif
+
+-include $(top_srcdir)/git.mk
+
diff --git a/docs/reference/devhelp/devhelp-docs.xml b/docs/reference/devhelp/devhelp-docs.xml
new file mode 100644
index 0000000..fbd5cd8
--- /dev/null
+++ b/docs/reference/devhelp/devhelp-docs.xml
@@ -0,0 +1,55 @@
+<?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>
+      This document is for the Devhelp library, version &version;.
+      The latest version of this documentation can be found online at
+      <ulink role="online-location" 
url="http://developer.gnome.org/devhelp/";>http://developer.gnome.org/devhelp/</ulink>.
+    </releaseinfo>
+  </bookinfo>
+
+  <chapter>
+    <title>Devhelp</title>
+    <xi:include href="xml/devhelp.xml"/>
+    <xi:include href="xml/dh-app.xml"/>
+    <xi:include href="xml/dh-assistant.xml"/>
+    <xi:include href="xml/dh-assistant-view.xml"/>
+    <xi:include href="xml/dh-book.xml"/>
+    <xi:include href="xml/dh-book-manager.xml"/>
+    <xi:include href="xml/dh-book-tree.xml"/>
+    <xi:include href="xml/dh-enum-types.xml"/>
+    <xi:include href="xml/dh-error.xml"/>
+    <xi:include href="xml/dh-keyword-model.xml"/>
+    <xi:include href="xml/dh-language.xml"/>
+    <xi:include href="xml/dh-link.xml"/>
+    <xi:include href="xml/dh-parser.xml"/>
+    <xi:include href="xml/dh-preferences.xml"/>
+    <xi:include href="xml/dh-resources.xml"/>
+    <xi:include href="xml/dh-settings.xml"/>
+    <xi:include href="xml/dh-sidebar.xml"/>
+    <xi:include href="xml/dh-util.xml"/>
+    <xi:include href="xml/dh-window.xml"/>
+
+  </chapter>
+  <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>
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
diff --git a/docs/reference/devhelp/devhelp-overrides.txt b/docs/reference/devhelp/devhelp-overrides.txt
new file mode 100644
index 0000000..e69de29
diff --git a/docs/reference/devhelp/devhelp-sections.txt b/docs/reference/devhelp/devhelp-sections.txt
new file mode 100644
index 0000000..40acdaa
--- /dev/null
+++ b/docs/reference/devhelp/devhelp-sections.txt
@@ -0,0 +1,308 @@
+<SECTION>
+<FILE>devhelp</FILE>
+dh_init
+</SECTION>
+
+<SECTION>
+<FILE>dh-app</FILE>
+<TITLE>DhApp</TITLE>
+dh_app_new
+dh_app_peek_book_manager
+dh_app_peek_first_window
+dh_app_peek_assistant
+dh_app_new_window
+dh_app_quit
+dh_app_search
+dh_app_search_assistant
+dh_app_raise
+<SUBSECTION Standard>
+DH_APP
+DH_APP_CLASS
+DH_APP_GET_CLASS
+DH_IS_APP
+DH_IS_APP_CLASS
+DH_TYPE_APP
+DhApp
+DhAppClass
+dh_app_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-assistant</FILE>
+<TITLE>DhAssistant</TITLE>
+dh_assistant_new
+dh_assistant_search
+<SUBSECTION Standard>
+DH_ASSISTANT
+DH_ASSISTANT_CLASS
+DH_ASSISTANT_GET_CLASS
+DH_IS_ASSISTANT
+DH_IS_ASSISTANT_CLASS
+DH_TYPE_ASSISTANT
+DhAssistant
+DhAssistantClass
+dh_assistant_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-assistant-view</FILE>
+<TITLE>DhAssistantView</TITLE>
+dh_assistant_view_new
+dh_assistant_view_search
+dh_assistant_view_set_book_manager
+dh_assistant_view_set_link
+<SUBSECTION Standard>
+DH_ASSISTANT_VIEW
+DH_ASSISTANT_VIEW_CLASS
+DH_ASSISTANT_VIEW_GET_CLASS
+DH_IS_ASSISTANT_VIEW
+DH_IS_ASSISTANT_VIEW_CLASS
+DH_TYPE_ASSISTANT_VIEW
+DhAssistantView
+DhAssistantViewClass
+dh_assistant_view_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-book</FILE>
+<TITLE>DhBook</TITLE>
+dh_book_new
+dh_book_get_keywords
+dh_book_get_completions
+dh_book_get_tree
+dh_book_get_name
+dh_book_get_title
+dh_book_get_language
+dh_book_get_path
+dh_book_get_enabled
+dh_book_set_enabled
+dh_book_cmp_by_path
+dh_book_cmp_by_path_str
+dh_book_cmp_by_name
+dh_book_cmp_by_name_str
+dh_book_cmp_by_title
+<SUBSECTION Standard>
+DH_BOOK
+DH_BOOK_CLASS
+DH_BOOK_GET_CLASS
+DH_IS_BOOK
+DH_IS_BOOK_CLASS
+DH_TYPE_BOOK
+DhBook
+DhBookClass
+dh_book_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-book-manager</FILE>
+<TITLE>DhBookManager</TITLE>
+dh_book_manager_new
+dh_book_manager_populate
+dh_book_manager_get_books
+dh_book_manager_get_languages
+dh_book_manager_get_group_by_language
+dh_book_manager_set_group_by_language
+<SUBSECTION Standard>
+DH_BOOK_MANAGER
+DH_BOOK_MANAGER_CLASS
+DH_BOOK_MANAGER_GET_CLASS
+DH_IS_BOOK_MANAGER
+DH_IS_BOOK_MANAGER_CLASS
+DH_TYPE_BOOK_MANAGER
+DhBookManager
+DhBookManagerClass
+dh_book_manager_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-book-tree</FILE>
+<TITLE>DhBookTree</TITLE>
+dh_book_tree_new
+dh_book_tree_select_uri
+dh_book_tree_get_selected_book
+<SUBSECTION Standard>
+DH_BOOK_TREE
+DH_BOOK_TREE_CLASS
+DH_IS_BOOK_TREE
+DH_IS_BOOK_TREE_CLASS
+DH_TYPE_BOOK_TREE
+DhBookTree
+DhBookTreeClass
+dh_book_tree_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-enum-types</FILE>
+<SUBSECTION Standard>
+DH_TYPE_ERROR
+DH_TYPE_LINK_FLAGS
+DH_TYPE_LINK_TYPE
+DH_TYPE_OPEN_LINK_FLAGS
+dh_error_get_type
+dh_link_flags_get_type
+dh_link_type_get_type
+dh_open_link_flags_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-error</FILE>
+DH_ERROR
+DhError
+dh_error_quark
+</SECTION>
+
+<SECTION>
+<FILE>dh-keyword-model</FILE>
+<TITLE>DhKeywordModel</TITLE>
+dh_keyword_model_new
+dh_keyword_model_set_words
+dh_keyword_model_filter
+<SUBSECTION Standard>
+DH_IS_KEYWORD_MODEL
+DH_IS_KEYWORD_MODEL_CLASS
+DH_KEYWORD_MODEL
+DH_KEYWORD_MODEL_CLASS
+DH_KEYWORD_MODEL_GET_CLASS
+DH_TYPE_KEYWORD_MODEL
+DhKeywordModel
+DhKeywordModelClass
+dh_keyword_model_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-language</FILE>
+dh_language_new
+dh_language_free
+dh_language_get_name
+dh_language_compare
+dh_language_compare_by_name
+dh_language_get_n_books_enabled
+dh_language_inc_n_books_enabled
+dh_language_dec_n_books_enabled
+DhLanguage
+</SECTION>
+
+<SECTION>
+<FILE>dh-link</FILE>
+DhLinkType
+DhLinkFlags
+dh_link_new
+dh_link_free
+dh_link_compare
+dh_link_ref
+dh_link_unref
+dh_link_get_name
+dh_link_get_book_name
+dh_link_get_page_name
+dh_link_get_file_name
+dh_link_get_book_id
+dh_link_get_uri
+dh_link_get_flags
+dh_link_set_flags
+dh_link_get_link_type
+dh_link_get_type_as_string
+<SUBSECTION Standard>
+DH_TYPE_LINK
+DhLink
+dh_link_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-parser</FILE>
+dh_parser_read_file
+</SECTION>
+
+<SECTION>
+<FILE>dh-preferences</FILE>
+<TITLE>DhPreferences</TITLE>
+DH_PREFERENCES_CONST
+dh_preferences_show_dialog
+<SUBSECTION Standard>
+DH_IS_PREFERENCES
+DH_IS_PREFERENCES_CLASS
+DH_PREFERENCES
+DH_PREFERENCES_CLASS
+DH_PREFERENCES_GET_CLASS
+DH_TYPE_PREFERENCES
+DhPreferences
+DhPreferencesClass
+dh_preferences_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-resources</FILE>
+dh_get_resource
+</SECTION>
+
+<SECTION>
+<FILE>dh-settings</FILE>
+<TITLE>DhSettings</TITLE>
+dh_settings_get
+dh_settings_get_selected_fonts
+dh_settings_peek_fonts_settings
+dh_settings_peek_window_settings
+dh_settings_peek_contents_settings
+dh_settings_peek_paned_settings
+dh_settings_peek_search_notebook_settings
+dh_settings_peek_assistant_settings
+<SUBSECTION Standard>
+DH_IS_SETTINGS
+DH_IS_SETTINGS_CLASS
+DH_SETTINGS
+DH_SETTINGS_CLASS
+DH_SETTINGS_GET_CLASS
+DH_TYPE_SETTINGS
+DhSettings
+DhSettingsClass
+DhSettingsPrivate
+dh_settings_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-sidebar</FILE>
+<TITLE>DhSidebar</TITLE>
+dh_sidebar_new
+dh_sidebar_get_selected_book
+dh_sidebar_select_uri
+dh_sidebar_set_search_string
+dh_sidebar_set_search_focus
+<SUBSECTION Standard>
+DH_IS_SIDEBAR
+DH_IS_SIDEBAR_CLASS
+DH_SIDEBAR
+DH_SIDEBAR_CLASS
+DH_TYPE_SIDEBAR
+DhSidebar
+DhSidebarClass
+dh_sidebar_get_type
+</SECTION>
+
+<SECTION>
+<FILE>dh-util</FILE>
+dh_util_build_data_filename
+dh_util_ascii_strtitle
+dh_util_create_data_uri_for_filename
+dh_util_view_set_font
+dh_util_window_settings_save
+dh_util_window_settings_restore
+dh_util_queue_concat
+</SECTION>
+
+<SECTION>
+<FILE>dh-window</FILE>
+<TITLE>DhWindow</TITLE>
+DhOpenLinkFlags
+dh_window_new
+dh_window_search
+<SUBSECTION Standard>
+DH_IS_WINDOW
+DH_IS_WINDOW_CLASS
+DH_TYPE_WINDOW
+DH_WINDOW
+DH_WINDOW_CLASS
+DH_WINDOW_GET_CLASS
+DhWindow
+DhWindowClass
+dh_window_get_type
+</SECTION>
+
diff --git a/docs/reference/devhelp/devhelp.types b/docs/reference/devhelp/devhelp.types
new file mode 100644
index 0000000..339ffe3
--- /dev/null
+++ b/docs/reference/devhelp/devhelp.types
@@ -0,0 +1,16 @@
+dh_app_get_type
+dh_assistant_get_type
+dh_assistant_view_get_type
+dh_book_get_type
+dh_book_manager_get_type
+dh_book_tree_get_type
+dh_error_get_type
+dh_keyword_model_get_type
+dh_link_flags_get_type
+dh_link_get_type
+dh_link_type_get_type
+dh_open_link_flags_get_type
+dh_preferences_get_type
+dh_settings_get_type
+dh_sidebar_get_type
+dh_window_get_type
diff --git a/gtk-doc.make b/gtk-doc.make
new file mode 100644
index 0000000..e4a12a5
--- /dev/null
+++ b/gtk-doc.make
@@ -0,0 +1,304 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) 
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) 
$(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN =
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+SETUP_FILES = \
+       $(content_files)                \
+       $(expand_content_files)         \
+       $(DOC_MAIN_SGML_FILE)           \
+       $(DOC_MODULE)-sections.txt      \
+       $(DOC_MODULE)-overrides.txt
+
+EXTRA_DIST =                           \
+       $(HTML_IMAGES)                  \
+       $(SETUP_FILES)
+
+DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
+       html-build.stamp pdf-build.stamp \
+       sgml.stamp html.stamp pdf.stamp
+
+SCANOBJ_FILES =                 \
+       $(DOC_MODULE).args       \
+       $(DOC_MODULE).hierarchy  \
+       $(DOC_MODULE).interfaces \
+       $(DOC_MODULE).prerequisites \
+       $(DOC_MODULE).signals
+
+REPORT_FILES = \
+       $(DOC_MODULE)-undocumented.txt \
+       $(DOC_MODULE)-undeclared.txt \
+       $(DOC_MODULE)-unused.txt
+
+gtkdoc-check.test: Makefile
+       $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \
+               echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \
+               chmod +x $@
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test
+
+if GTK_DOC_BUILD_HTML
+HTML_BUILD_STAMP=html-build.stamp
+else
+HTML_BUILD_STAMP=
+endif
+if GTK_DOC_BUILD_PDF
+PDF_BUILD_STAMP=pdf-build.stamp
+else
+PDF_BUILD_STAMP=
+endif
+
+all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+.PHONY: all-gtk-doc
+
+if ENABLE_GTK_DOC
+all-local: all-gtk-doc
+endif
+
+docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### setup ####
+
+GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V))
+GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_SETUP_0=@echo "  DOC   Preparing build";
+
+setup-build.stamp:
+       -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           files=`echo $(SETUP_FILES) $(DOC_MODULE).types`; \
+           if test "x$$files" != "x" ; then \
+               for file in $$files ; do \
+                   destdir=`dirname $(abs_builddir)/$$file`; \
+                   test -d "$$destdir" || mkdir -p "$$destdir"; \
+                   test -f $(abs_srcdir)/$$file && \
+                       cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \
+               done; \
+           fi; \
+       fi
+       $(AM_V_at)touch setup-build.stamp
+
+
+#### scan ####
+
+GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V))
+GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_SCAN_0=@echo "  DOC   Scanning header files";
+
+GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V))
+GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_INTROSPECT_0=@echo "  DOC   Introspecting gobjects";
+
+scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
+       $(GTK_DOC_V_SCAN)_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
+           _source_dir="$${_source_dir} --source-dir=$$i" ; \
+       done ; \
+       gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} 
$(SCAN_OPTIONS) $(EXTRA_HFILES)
+       $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
+           scanobj_options=""; \
+           gtkdoc-scangobj 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+           if test "$$?" = "0"; then \
+               if test "x$(V)" = "x1"; then \
+                   scanobj_options="--verbose"; \
+               fi; \
+           fi; \
+           CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" 
LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
+           gtkdoc-scangobj $(SCANGOBJ_OPTIONS) $$scanobj_options --module=$(DOC_MODULE); \
+       else \
+           for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+           done \
+       fi
+       $(AM_V_at)touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: 
scan-build.stamp
+       @true
+
+#### xml ####
+
+GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V))
+GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_XML_0=@echo "  DOC   Building XML";
+
+sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(HFILE_GLOB) $(CFILE_GLOB) 
$(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) xml/gtkdocentities.ent
+       $(GTK_DOC_V_XML)_source_dir='' ; \
+       for i in $(DOC_SOURCE_DIR) ; do \
+           _source_dir="$${_source_dir} --source-dir=$$i" ; \
+       done ; \
+       gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml 
--expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} 
$(MKDB_OPTIONS)
+       $(AM_V_at)touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+       @true
+
+xml/gtkdocentities.ent: Makefile
+       $(GTK_DOC_V_XML)$(MKDIR_P) $(@D) && ( \
+               echo "<!ENTITY package \"$(PACKAGE)\">"; \
+               echo "<!ENTITY package_bugreport \"$(PACKAGE_BUGREPORT)\">"; \
+               echo "<!ENTITY package_name \"$(PACKAGE_NAME)\">"; \
+               echo "<!ENTITY package_string \"$(PACKAGE_STRING)\">"; \
+               echo "<!ENTITY package_tarname \"$(PACKAGE_TARNAME)\">"; \
+               echo "<!ENTITY package_url \"$(PACKAGE_URL)\">"; \
+               echo "<!ENTITY package_version \"$(PACKAGE_VERSION)\">"; \
+       ) > $@
+
+#### html ####
+
+GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V))
+GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_HTML_0=@echo "  DOC   Building HTML";
+
+GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V))
+GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_XREF_0=@echo "  DOC   Fixing cross-references";
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
+       $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \
+       mkhtml_options=""; \
+       gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$$?" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkhtml_options="$$mkhtml_options --verbose"; \
+         fi; \
+       fi; \
+       gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
+       if test "$$?" = "0"; then \
+         mkhtml_options="$$mkhtml_options --path=\"$(abs_srcdir)\""; \
+       fi; \
+       cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+       -@test "x$(HTML_IMAGES)" = "x" || \
+       for file in $(HTML_IMAGES) ; do \
+         if test -f $(abs_srcdir)/$$file ; then \
+           cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
+         fi; \
+         if test -f $(abs_builddir)/$$file ; then \
+           cp $(abs_builddir)/$$file $(abs_builddir)/html; \
+         fi; \
+       done;
+       $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) 
$(FIXXREF_OPTIONS)
+       $(AM_V_at)touch html-build.stamp
+
+#### pdf ####
+
+GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V))
+GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY))
+GTK_DOC_V_PDF_0=@echo "  DOC   Building PDF";
+
+pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) $(expand_content_files)
+       $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \
+       mkpdf_options=""; \
+       gtkdoc-mkpdf 2>&1 --help | grep  >/dev/null "\-\-verbose"; \
+       if test "$$?" = "0"; then \
+         if test "x$(V)" = "x1"; then \
+           mkpdf_options="$$mkpdf_options --verbose"; \
+         fi; \
+       fi; \
+       if test "x$(HTML_IMAGES)" != "x"; then \
+         for img in $(HTML_IMAGES); do \
+           part=`dirname $$img`; \
+           echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
+           if test $$? != 0; then \
+             mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
+           fi; \
+         done; \
+       fi; \
+       gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) 
$(MKPDF_OPTIONS)
+       $(AM_V_at)touch pdf-build.stamp
+
+##############
+
+clean-local:
+       @rm -f *~ *.bak
+       @rm -rf .libs
+       @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
+         rm -f $(DOC_MODULE).types; \
+       fi
+       @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-sections" ; then \
+         rm -f $(DOC_MODULE)-sections.txt; \
+       fi
+
+distclean-local:
+       @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
+           $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+       @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
+           rm -f $(SETUP_FILES) $(DOC_MODULE).types; \
+       fi
+
+maintainer-clean-local:
+       @rm -rf xml html
+
+install-data-local:
+       @installfiles=`echo $(builddir)/html/*`; \
+       if test "$$installfiles" = '$(builddir)/html/*'; \
+       then echo 1>&2 'Nothing to install' ; \
+       else \
+         if test -n "$(DOC_MODULE_VERSION)"; then \
+           installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+         else \
+           installdir="$(DESTDIR)$(TARGET_DIR)"; \
+         fi; \
+         $(mkinstalldirs) $${installdir} ; \
+         for i in $$installfiles; do \
+           echo ' $(INSTALL_DATA) '$$i ; \
+           $(INSTALL_DATA) $$i $${installdir}; \
+         done; \
+         if test -n "$(DOC_MODULE_VERSION)"; then \
+           mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
+             $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
+         fi; \
+         $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
+       fi
+
+uninstall-local:
+       @if test -n "$(DOC_MODULE_VERSION)"; then \
+         installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
+       else \
+         installdir="$(DESTDIR)$(TARGET_DIR)"; \
+       fi; \
+       rm -rf $${installdir}
+
+#
+# Require gtk-doc when making dist
+#
+if HAVE_GTK_DOC
+dist-check-gtkdoc: docs
+else
+dist-check-gtkdoc:
+       @echo "*** gtk-doc is needed to run 'make dist'.         ***"
+       @echo "*** gtk-doc was not found when 'configure' ran.   ***"
+       @echo "*** please install gtk-doc and rerun 'configure'. ***"
+       @false
+endif
+
+dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local
+       @mkdir $(distdir)/html
+       @cp ./html/* $(distdir)/html
+       @-cp ./$(DOC_MODULE).pdf $(distdir)/
+       @-cp ./$(DOC_MODULE).types $(distdir)/
+       @-cp ./$(DOC_MODULE)-sections.txt $(distdir)/
+       @cd $(distdir) && rm -f $(DISTCLEANFILES)
+       @$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs
diff --git a/src/dh-error.h b/src/dh-error.h
index add07e8..d080008 100644
--- a/src/dh-error.h
+++ b/src/dh-error.h
@@ -24,8 +24,22 @@
 
 G_BEGIN_DECLS
 
+/**
+ * DH_ERROR:
+ *
+ * Error domain for DhParser errors
+ **/
 #define DH_ERROR dh_error_quark ()
 
+/**
+ * DhError:
+ * @DH_ERROR_FILE_NOT_FOUND:  Requested file did not exist
+ * @DH_ERROR_MALFORMED_BOOK: Referred book is invalid
+ * @DH_ERROR_INVALID_BOOK_TYPE: Referred book has an invalid type
+ * @DH_ERROR_INTERNAL_ERROR: An internal error occured
+ *
+ * Error codes returned the parser.
+ */
 typedef enum {
         DH_ERROR_FILE_NOT_FOUND,
         DH_ERROR_MALFORMED_BOOK,
diff --git a/src/dh-link.h b/src/dh-link.h
index 21c1625..b2806d8 100644
--- a/src/dh-link.h
+++ b/src/dh-link.h
@@ -22,6 +22,21 @@
 
 #include <glib-object.h>
 
+/**
+ * DhLinkType:
+ * @DH_LINK_TYPE_BOOK: a book
+ * @DH_LINK_TYPE_PAGE: a page
+ * @DH_LINK_TYPE_KEYWORD: a keyword
+ * @DH_LINK_TYPE_FUNCTION: a function
+ * @DH_LINK_TYPE_STRUCT: a struct
+ * @DH_LINK_TYPE_MACRO: a macro
+ * @DH_LINK_TYPE_ENUM: an enum
+ * @DH_LINK_TYPE_TYPEDEF: a typedef
+ * @DH_LINK_TYPE_PROPERTY: a property
+ * @DH_LINK_TYPE_SIGNAL: a signal
+ *
+ * The type of the content the link points to.
+ */
 typedef enum {
         DH_LINK_TYPE_BOOK,
         DH_LINK_TYPE_PAGE,
@@ -35,6 +50,11 @@ typedef enum {
         DH_LINK_TYPE_SIGNAL
 } DhLinkType;
 
+/**
+ * DhLinkFlags:
+ * @DH_LINK_FLAGS_NONE: no flag set
+ * @DH_LINK_FLAGS_DEPRECATED: deprecated link
+ */
 typedef enum {
         DH_LINK_FLAGS_NONE       = 0,
         DH_LINK_FLAGS_DEPRECATED = 1 << 0
diff --git a/src/dh-window.h b/src/dh-window.h
index 9a4e9fc..918ef5f 100644
--- a/src/dh-window.h
+++ b/src/dh-window.h
@@ -36,6 +36,11 @@ G_BEGIN_DECLS
 typedef struct _DhWindow       DhWindow;
 typedef struct _DhWindowClass  DhWindowClass;
 
+/**
+ * DhOpenLinkFlags:
+ * @DH_OPEN_LINK_NEW_WINDOW: Open the link in a new window
+ * @DH_OPEN_LINK_NEW_TAB: Open the link in a new tab
+ */
 typedef enum
 {
         DH_OPEN_LINK_NEW_WINDOW = 1 << 0,


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