diff --git a/Makefile.am b/Makefile.am
index 355be38..4d6f5ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = libxapp po schemas files
+SUBDIRS = libxapp po schemas files docs
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/configure.ac b/configure.ac
index 705ea51..618dad0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,8 @@
AC_PROG_CC
PKG_PROG_PKG_CONFIG
+
+GTK_DOC_CHECK([1.0],[--flavour=no-tmpl])
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
@@ -66,6 +68,11 @@
AC_SUBST(XLIB_CFLAGS)
AC_SUBST(XLIB_LIBS)
+AC_ARG_ENABLE([gtk-doc],
+ AC_HELP_STRING([--enable-gtk-doc],
+ [use gtk-doc to build documentation [[default=yes]]]),,
+ enable_gtk_doc=yes)
+
dnl pkg-config dependency checks
PKG_CHECK_MODULES(XAPP, gdk-pixbuf-2.0 >= $GDK_PIXBUF_REQUIRED
@@ -90,6 +97,8 @@
AC_CONFIG_FILES([
Makefile
+docs/Makefile
+docs/reference/Makefile
libxapp/Makefile
libxapp/xapp.pc
libxapp/xapp-uninstalled.pc
diff --git a/debian/control b/debian/control
index 7bcb4a5..dd6fc03 100644
--- a/debian/control
+++ b/debian/control
@@ -69,3 +69,10 @@
Depends: libxapp1 (= ${binary:Version}), ${misc:Depends}
Description: XApp library - debug symbols
This package contains the symbols files needed to debug the XApp library.
+
+Package: xapps-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, devhelp
+Description: Libxapp documentation
+ This package contains documentation for xapp library
diff --git a/debian/rules b/debian/rules
index f94e55f..72b5c91 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,6 +11,12 @@
override_dh_gnome_clean:
dh_gnome_clean --no-control
+override_dh_autoreconf:
+ dh_autoreconf --as-needed ./autogen.sh
+
+override_dh_auto_configure:
+ dh_auto_configure -- --enable-gtk-doc
+
override_dh_strip:
dh_strip --dbg-package=libxapp-dbg
diff --git a/debian/xapps-doc.install b/debian/xapps-doc.install
new file mode 100644
index 0000000..0c99cd5
--- /dev/null
+++ b/debian/xapps-doc.install
@@ -0,0 +1 @@
+/usr/share/gtk-doc
\ No newline at end of file
diff --git a/docs/Makefile.am b/docs/Makefile.am
new file mode 100644
index 0000000..41600ec
--- /dev/null
+++ b/docs/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = reference
+
+-include $(top_srcdir)/git.mk
\ No newline at end of file
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
new file mode 100644
index 0000000..59106ad
--- /dev/null
+++ b/docs/reference/Makefile.am
@@ -0,0 +1,51 @@
+## Process this file with automake to produce Makefile.in
+
+# see /gtk-doc/examples/Makefile.am
+
+# We require automake 1.6 at least.
+AUTOMAKE_OPTIONS = 1.6
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE = xapp
+
+# The top-level XML file (SGML in the past).
+DOC_MAIN_SGML_FILE = xapp-docs.xml
+
+# The directory containing the source code. Relative to $(srcdir).
+DOC_SOURCE_DIR = $(top_srcdir)/libxapp
+
+# Extra options to supply to gtkdoc-scan.
+# e.g. SCAN_OPTIONS = --deprecated-guards="GTK_DISABLE_DEPRECATED"
+SCAN_OPTIONS = --rebuild-types
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS = --xml-mode --output-format=xml
+
+# Used for dependencies. The docs will be rebuilt if any of these change.
+HFILE_GLOB = $(top_srcdir)/libxapp/*.h
+CFILE_GLOB = $(top_srcdir)/libxapp/*.c
+
+# Header files to ignore when scanning (These are internal to xed).
+IGNORE_HFILES =
+
+# Images to copy into HTML directory.
+HTML_IMAGES =
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+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.
+GTKDOC_CFLAGS =
+
+GTKDOC_LIBS = \
+ $(top_builddir)/libxapp/libxapp.la \
+ $(XAPP_LIBS)
+
+MAINTAINERCLEANFILES = xapp.types
+
+# This includes the standard gtk-doc make rules, copied by gtkdocize.
+include $(top_srcdir)/gtk-doc.make
+
+-include $(top_srcdir)/git.mk
\ No newline at end of file
diff --git a/docs/reference/xapp-docs.xml b/docs/reference/xapp-docs.xml
new file mode 100644
index 0000000..32b0171
--- /dev/null
+++ b/docs/reference/xapp-docs.xml
@@ -0,0 +1,36 @@
+
+
+
+ %gtkdocentities;
+]>
+
+
+ Xapp Reference Manual
+
+ for &package_string;.
+
+
+
+
+ API reference
+
+
+
+
+
+ Object Hierarchy
+
+
+
+ API Index
+
+
+
+ Index of deprecated API
+
+
+
+
diff --git a/libxapp/xapp-monitor-blanker.c b/libxapp/xapp-monitor-blanker.c
index 407f3a9..78c60a9 100644
--- a/libxapp/xapp-monitor-blanker.c
+++ b/libxapp/xapp-monitor-blanker.c
@@ -11,6 +11,16 @@
#include
#include "xapp-monitor-blanker.h"
+
+/**
+ * SECTION:xapp-monitor-blanker
+ * @Short_description: Blank and unblank unused monitors
+ * @Title: XAppMonitorBlanker
+ *
+ * The XAppMonitorBlanker widget that creates one or more
+ * POPUP type GtkWindows that are used to blank unused
+ * monitors in multiple monitor setups.
+ */
struct _XAppMonitorBlankerPrivate
{
@@ -57,6 +67,14 @@
g_type_class_add_private (gobject_class, sizeof (XAppMonitorBlankerPrivate));
}
+/**
+ * xapp_monitor_blanker_new:
+ *
+ * Creates a new #XAppMonitorBlanker.
+ *
+ * Returns: a newly created #XAppMonitorBlanker
+ */
+
XAppMonitorBlanker *
xapp_monitor_blanker_new (void)
{
@@ -92,6 +110,14 @@
return window;
}
+/**
+ * xapp_monitor_blanker_blank_other_monitors:
+ * @self: a #XAppMonitorBlanker
+ * @window: a #GtkWindow
+ *
+ * Blanks monitors besides the one where the @window is.
+ */
+
void
xapp_monitor_blanker_blank_other_monitors (XAppMonitorBlanker *self,
GtkWindow *window)
@@ -126,6 +152,14 @@
self->priv->blanked = TRUE;
}
+/**
+ * xapp_monitor_blanker_unblank_monitors:
+ * @self: a #XAppMonitorBlanker
+ *
+ * Unblanks monitors that were blanked by
+ * xapp_monitor_blanker_blank_other_monitors();
+ */
+
void
xapp_monitor_blanker_unblank_monitors (XAppMonitorBlanker *self)
{
@@ -148,6 +182,16 @@
self->priv->blanked = FALSE;
}
+/**
+ * xapp_monitor_blanker_are_monitors_blanked:
+ * @self: a #XAppMonitorBlanker
+ *
+ * Returns whether monitors are currently blanked.
+ * See xapp_monitor_blanker_blank_other_monitors().
+ *
+ * Returns: %TRUE if monitors are blanked.
+ */
+
gboolean
xapp_monitor_blanker_are_monitors_blanked (XAppMonitorBlanker *self)
{