totem r5949 - in trunk: . docs docs/reference



Author: pwithnall
Date: Sat Feb  7 15:32:07 2009
New Revision: 5949
URL: http://svn.gnome.org/viewvc/totem?rev=5949&view=rev

Log:
2009-02-07  Philip Withnall  <philip tecnocode co uk>

	* Makefile.am:
	* configure.in:
	* docs/Makefile.am:
	* docs/reference/Makefile.am:
	* docs/reference/totem-docs.sgml:
	* docs/reference/totem-sections.txt:
	* docs/reference/totem.types:
	* docs/reference/version.xml.in:
	* gtk-doc.make: Add gtk-doc support to Totem, to document the 
new
	libtotem_main.la noinst library. The documentation's aimed at 
plugin
	authors. (Closes: #570861)



Added:
   trunk/docs/
   trunk/docs/Makefile.am
   trunk/docs/reference/
   trunk/docs/reference/Makefile.am
   trunk/docs/reference/totem-docs.sgml
   trunk/docs/reference/totem-sections.txt
   trunk/docs/reference/totem.types
   trunk/docs/reference/version.xml.in   (contents, props changed)
   trunk/gtk-doc.make
Modified:
   trunk/ChangeLog
   trunk/Makefile.am
   trunk/configure.in

Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am	(original)
+++ trunk/Makefile.am	Sat Feb  7 15:32:07 2009
@@ -1,4 +1,4 @@
-SUBDIRS = lib bindings po data src help
+SUBDIRS = lib bindings po data src docs help
 
 if ENABLE_BROWSER_PLUGINS
 SUBDIRS += browser-plugin

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Sat Feb  7 15:32:07 2009
@@ -786,6 +786,7 @@
 GNOME_COMPILE_WARNINGS([maximum])
 GNOME_CXX_WARNINGS
 GNOME_MAINTAINER_MODE_DEFINES
+GTK_DOC_CHECK(1.0)
 
 # This macro expands DIR and assigns it to RET.
 # If DIR is NONE, then it's replaced by DEFAULT.
@@ -892,6 +893,9 @@
 bindings/Makefile
 bindings/python/Makefile
 bindings/vala/Makefile
+docs/Makefile
+docs/reference/Makefile
+docs/reference/version.xml
 ])
 
 AC_MSG_NOTICE([Totem was configured with the following options:])

Added: trunk/docs/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/docs/Makefile.am	Sat Feb  7 15:32:07 2009
@@ -0,0 +1 @@
+SUBDIRS = reference

Added: trunk/docs/reference/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/docs/reference/Makefile.am	Sat Feb  7 15:32:07 2009
@@ -0,0 +1,89 @@
+## Process this file with automake to produce Makefile.in
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# This is a blank Makefile.am for using gtk-doc.
+# Copy this to your project's API docs directory and modify the variables to
+# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
+# of using the various options.
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=totem
+
+# The top-level SGML file. You can change this if you want to.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting the functions and macros.
+# e.g. DOC_SOURCE_DIR=../../../gtk
+DOC_SOURCE_DIR=../../src
+
+# Extra options to pass to gtkdoc-scangobj. Not normally 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=--sgml-mode --output-format=xml
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-mktmpl
+# e.g. MKTMPL_OPTIONS=--only-section-tmpl
+MKTMPL_OPTIONS=
+
+# Extra options to supply to gtkdoc-fixref. Not normally 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
+
+# Header files to ignore when scanning.
+# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
+IGNORE_HFILES = \
+	ev-sidebar.h		\
+	eggdesktopfile.h	\
+	eggfileformatchooser.h	\
+	eggsmclient.h		\
+	eggsmclient-private.h
+
+# Images to copy into HTML directory.
+# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
+HTML_IMAGES=
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
+content_files = version.xml
+
+# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
+# These files must be listed here *and* in content_files
+# e.g. expand_content_files=running.sgml
+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. INCLUDES=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
+# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
+GTKDOC_CFLAGS = \
+	-I$(top_srcdir)/		\
+	-I$(top_srcdir)/src		\
+	-I$(top_srcdir)/src/plugins	\
+	$(DEPENDENCY_CFLAGS)
+GTKDOC_LIBS = \
+	$(top_builddir)/src/libtotem_main.la	\
+	$(DEPENDENCY_LIBS)
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+# Other files to distribute
+# e.g. EXTRA_DIST += version.xml.in
+EXTRA_DIST += version.xml.in

Added: trunk/docs/reference/totem-docs.sgml
==============================================================================
--- (empty file)
+++ trunk/docs/reference/totem-docs.sgml	Sat Feb  7 15:32:07 2009
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"; [
+	<!ENTITY version SYSTEM "version.xml">
+	<!ENTITY slash "/">
+]>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude";>
+	<bookinfo>
+		<title>Totem Reference Manual</title>
+		<releaseinfo>for Totem &version;</releaseinfo>
+	</bookinfo>
+	<chapter>
+		<title>API Reference</title>
+		<xi:include href="xml/totem-object.xml"/>
+		<xi:include href="xml/totem-plugin.xml"/>
+		<xi:include href="xml/totem-video-list.xml"/>
+		<xi:include href="xml/totem-cell-renderer-video.xml"/>
+	</chapter>
+</book>

Added: trunk/docs/reference/totem-sections.txt
==============================================================================
--- (empty file)
+++ trunk/docs/reference/totem-sections.txt	Sat Feb  7 15:32:07 2009
@@ -0,0 +1,58 @@
+<SECTION>
+<FILE>totem-object</FILE>
+TotemObject
+TotemObjectClass
+<SUBSECTION Standard>
+TOTEM_OBJECT
+TOTEM_IS_OBJECT
+TOTEM_TYPE_OBJECT
+totem_object_get_type
+TOTEM_OBJECT_CLASS
+TOTEM_IS_OBJECT_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>totem-plugin</FILE>
+TotemPlugin
+TotemPluginClass
+<SUBSECTION Standard>
+TOTEM_PLUGIN
+TOTEM_IS_PLUGIN
+TOTEM_TYPE_PLUGIN
+totem_plugin_get_type
+TOTEM_PLUGIN_CLASS
+TOTEM_IS_PLUGIN_CLASS
+<SUBSECTION Private>
+TotemPluginPrivate
+</SECTION>
+
+<SECTION>
+<FILE>totem-video-list</FILE>
+TotemVideoList
+TotemVideoListClass
+<SUBSECTION Standard>
+TOTEM_VIDEO_LIST
+TOTEM_IS_VIDEO_LIST
+TOTEM_TYPE_VIDEO_LIST
+totem_video_list_get_type
+TOTEM_VIDEO_LIST_CLASS
+TOTEM_IS_VIDEO_LIST_CLASS
+<SUBSECTION Private>
+TotemVideoListPrivate
+</SECTION>
+
+<SECTION>
+<FILE>totem-cell-renderer-video</FILE>
+TotemCellRendererVideo
+TotemCellRendererVideoClass
+<SUBSECTION Standard>
+TOTEM_CELL_RENDERER_VIDEO
+TOTEM_IS_CELL_RENDERER_VIDEO
+TOTEM_TYPE_CELL_RENDERER_VIDEO
+totem_cell_renderer_video_get_type
+TOTEM_CELL_RENDERER_VIDEO_CLASS
+TOTEM_IS_CELL_RENDERER_VIDEO_CLASS
+<SUBSECTION Private>
+TotemCellRendererVideoPrivate
+</SECTION>
+

Added: trunk/docs/reference/totem.types
==============================================================================
--- (empty file)
+++ trunk/docs/reference/totem.types	Sat Feb  7 15:32:07 2009
@@ -0,0 +1,9 @@
+#include "totem-plugin.h"
+#include "totem.h"
+#include "totem-cell-renderer-video.h"
+#include "totem-video-list.h"
+
+totem_plugin_get_type
+totem_object_get_type
+totem_cell_renderer_video_get_type
+totem_video_list_get_type

Added: trunk/docs/reference/version.xml.in
==============================================================================
--- (empty file)
+++ trunk/docs/reference/version.xml.in	Sat Feb  7 15:32:07 2009
@@ -0,0 +1 @@
+ TOTEM_VERSION_MAJOR@  TOTEM_VERSION_MINOR@  TOTEM_VERSION_MICRO@

Added: trunk/gtk-doc.make
==============================================================================
--- (empty file)
+++ trunk/gtk-doc.make	Sat Feb  7 15:32:07 2009
@@ -0,0 +1,193 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
+GTKDOC_RUN = $(LIBTOOL) --mode=execute
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(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)
+
+EXTRA_DIST = 				\
+	$(content_files)		\
+	$(HTML_IMAGES)			\
+	$(DOC_MAIN_SGML_FILE)		\
+	$(DOC_MODULE)-sections.txt	\
+	$(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+	   $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.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
+
+CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+else
+all-local:
+endif
+
+docs: html-build.stamp
+
+$(REPORT_FILES): sgml-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+	@echo 'gtk-doc: Scanning header files'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && \
+	  gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+	if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
+	    CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+	else \
+	    cd $(srcdir) ; \
+	    for i in $(SCANOBJ_FILES) ; do \
+               test -f $$i || touch $$i ; \
+	    done \
+	fi
+	touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
+	@true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+	@echo 'gtk-doc: Rebuilding template files'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
+	touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+	@true
+
+$(srcdir)/tmpl/*.sgml:
+	@true
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
+	@echo 'gtk-doc: Building XML'
+	@-chmod -R u+w $(srcdir)
+	cd $(srcdir) && \
+	gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
+	touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+	@true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+	@echo 'gtk-doc: Building HTML'
+	@-chmod -R u+w $(srcdir)
+	rm -rf $(srcdir)/html
+	mkdir $(srcdir)/html
+	mkhtml_options=""; \
+	gtkdoc-mkhtml 2>&1 --help | grep  >/dev/null "\-\-path"; \
+	if test "$(?)" = "0"; then \
+	  mkhtml_options=--path="$(srcdir)"; \
+	fi
+	cd $(srcdir)/html && gtkdoc-mkhtml $(mkhtml_options) $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+	test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+	@echo 'gtk-doc: Fixing cross-references'
+	cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+	touch html-build.stamp
+
+##############
+
+clean-local:
+	rm -f *~ *.bak
+	rm -rf .libs
+
+distclean-local:
+	cd $(srcdir) && \
+	  rm -rf xml $(REPORT_FILES) \
+	         $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+maintainer-clean-local: clean
+	cd $(srcdir) && rm -rf xml html
+
+install-data-local:
+	installfiles=`echo $(srcdir)/html/*`; \
+	if test "$$installfiles" = '$(srcdir)/html/*'; \
+	then echo '-- 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 '-- Installing '$$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; \
+	    mv -f $${installdir}/$(DOC_MODULE).devhelp \
+	      $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
+	  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 ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+	@echo "*** gtk-doc must be installed and enabled in order to make dist"
+	@false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+	mkdir $(distdir)/tmpl
+	mkdir $(distdir)/xml
+	mkdir $(distdir)/html
+	-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+	-cp $(srcdir)/xml/*.xml $(distdir)/xml
+	cp $(srcdir)/html/* $(distdir)/html
+	-cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
+	-cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
+	cd $(distdir) && rm -f $(DISTCLEANFILES)
+	$(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
+
+.PHONY : dist-hook-local docs



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