Initial revision
authorOwen Taylor <otaylor@src.gnome.org>
Mon, 16 Aug 1999 17:58:30 +0000 (17:58 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Mon, 16 Aug 1999 17:58:30 +0000 (17:58 +0000)
58 files changed:
docs/reference/AUTHORS [new file with mode: 0644]
docs/reference/COPYING [new file with mode: 0644]
docs/reference/ChangeLog [new file with mode: 0644]
docs/reference/NEWS [new file with mode: 0644]
docs/reference/README [new file with mode: 0644]
docs/reference/README.cvs-commits [new file with mode: 0644]
docs/reference/glib/Makefile.am [new file with mode: 0644]
docs/reference/glib/autogen.sh [new file with mode: 0755]
docs/reference/glib/configure.in [new file with mode: 0644]
docs/reference/glib/glib-decl.txt [new file with mode: 0644]
docs/reference/glib/glib-docs.sgml [new file with mode: 0644]
docs/reference/glib/glib-sections.txt [new file with mode: 0644]
docs/reference/glib/glib/AUTHORS [new file with mode: 0644]
docs/reference/glib/glib/COPYING [new file with mode: 0644]
docs/reference/glib/glib/ChangeLog [new file with mode: 0644]
docs/reference/glib/glib/Makefile.am [new file with mode: 0644]
docs/reference/glib/glib/NEWS [new file with mode: 0644]
docs/reference/glib/glib/README [new file with mode: 0644]
docs/reference/glib/glib/README.cvs-commits [new file with mode: 0644]
docs/reference/glib/tmpl/allocators.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/arrays.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/arrays_byte.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/arrays_pointer.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/byte_order.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/caches.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/completion.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/datalist.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/datasets.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/date.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/glib-unused.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/hash_tables.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/hooks.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/iochannels.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/limits.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/linked_lists_double.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/linked_lists_single.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/macros.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/macros_misc.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/main.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/memory.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/memory_chunks.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/messages.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/misc_utils.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/modules.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/quarks.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/relations.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/scanner.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/string_chunks.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/string_utils.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/strings.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/threads.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/timers.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/trees-binary.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/trees-nary.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/type_conversion.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/types.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/warnings.sgml [new file with mode: 0644]
docs/reference/glib/tmpl/windows.sgml [new file with mode: 0644]

diff --git a/docs/reference/AUTHORS b/docs/reference/AUTHORS
new file mode 100644 (file)
index 0000000..64f46b7
--- /dev/null
@@ -0,0 +1,7 @@
+Damon Chaplin <damon@karuna.freeserve.co.uk> and others.
+
+See:
+
+ http://www.gtk.org/rdp/status.html
+
+for a complete list.
diff --git a/docs/reference/COPYING b/docs/reference/COPYING
new file mode 100644 (file)
index 0000000..df952d3
--- /dev/null
@@ -0,0 +1,30 @@
+This work may be reproduced and distributed in whole or in part, in
+any medium, physical or electronic, so as long as this copyright
+notice remains intact and unchanged on all copies.  Commercial
+redistribution is permitted and encouraged, but you may not
+redistribute, in whole or in part, under terms more restrictive than
+those under which you received it. If you redistribute a modified or
+translated version of this work, you must also make the source code to
+the modified or translated version available in electronic form
+without charge.  However, mere aggregation as part of a larger work
+shall not count as a modification for this purpose.
+
+All code examples in this work are placed into the public domain,
+and may be used, modified and redistributed without restriction.
+
+BECAUSE THIS WORK IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE WORK, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE WORK "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  SHOULD THE WORK PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY REPAIR OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE WORK AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+WORK, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 
+POSSIBILITY OF SUCH DAMAGES.
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
new file mode 100644 (file)
index 0000000..081e1b2
--- /dev/null
@@ -0,0 +1,6 @@
+Wed Aug 18 23:11:28 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * Import into CVS of glib-reference-1.1.3
+         Filled in some basic contents for AUTHORS
+         README, and README.cvs  
+
diff --git a/docs/reference/NEWS b/docs/reference/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/README b/docs/reference/README
new file mode 100644 (file)
index 0000000..d0aa598
--- /dev/null
@@ -0,0 +1,14 @@
+This package contains the reference documentation
+for GLib. For more information about Glib,
+see:
+
+ http://www.gtk.org
+
+For information about contributing to the
+GLib/GTK+ reference documentation project, see:
+
+ http://www.gtk.org/rdp/
+
+The GLib reference documentation is freely redistributable,
+see the file COPYING for details.
+
diff --git a/docs/reference/README.cvs-commits b/docs/reference/README.cvs-commits
new file mode 100644 (file)
index 0000000..38e8735
--- /dev/null
@@ -0,0 +1,22 @@
+Before making any changes to this module, please
+contact:
+
+  Damon Chaplin <damon@karuna.freeserve.co.uk>
+
+This will ensure that duplicate work does not occur,
+and also make sure we know who has written what
+parts of the documentation. See 
+
+ http://www.gtk.org/rdp/
+
+for more information.
+
+By contributing work to the Reference Documentation
+Project, you agree that it will be covered under the
+license terms described in the file COPYING
+included in this directory.
+
+
+
+
+
diff --git a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am
new file mode 100644 (file)
index 0000000..9ba90e0
--- /dev/null
@@ -0,0 +1,46 @@
+## Process this file with automake to produce Makefile.in
+
+# The name of the module.
+DOC_MODULE=glib
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE=glib-docs.sgml
+
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+scan:
+       gtkdoc-scan --module=$(DOC_MODULE) `glib-config --prefix`/include/glib.h `glib-config --prefix`/include/gmodule.h `glib-config --prefix`/lib/glib/include/glibconfig.h 
+
+templates: scan
+       gtkdoc-mktmpl --module=$(DOC_MODULE)
+
+sgml:
+       gtkdoc-mkdb --module=$(DOC_MODULE)
+
+html:
+       if ! test -d html ; then mkdir html ; fi
+       -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+
+clean-local:
+       rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt
+
+maintainer-clean-local: clean
+       rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt 
+
+install-data-local:
+       install -d -m 0755 $(TARGET_DIR)
+       install -m 0644 html/*.html $(TARGET_DIR)
+       install -m 0644 html/index.sgml $(TARGET_DIR)
+       gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)
+
+EXTRA_DIST = \
+       $(DOC_MAIN_SGML_FILE) \
+       $(DOC_MODULE)-sections.txt \
+       glib-decl.txt
+
+dist-hook:
+       mkdir $(distdir)/tmpl
+       cp -p tmpl/*.sgml $(distdir)/tmpl
+
+.PHONY : html sgml templates scan
diff --git a/docs/reference/glib/autogen.sh b/docs/reference/glib/autogen.sh
new file mode 100755 (executable)
index 0000000..02d6860
--- /dev/null
@@ -0,0 +1,52 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+PROJECT=GLib-Reference
+TEST_TYPE=-f
+FILE=glib-sections.txt
+
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have autoconf installed to compile $PROJECT."
+       echo "Download the appropriate package for your distribution,"
+       echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+       DIE=1
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+       echo
+       echo "You must have automake installed to compile $PROJECT."
+       echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
+       echo "(or a newer version if it is available)"
+       DIE=1
+}
+
+if test "$DIE" -eq 1; then
+       exit 1
+fi
+
+test $TEST_TYPE $FILE || {
+       echo "You must run this script in the top-level $PROJECT directory"
+       exit 1
+}
+
+if test -z "$*"; then
+       echo "I am going to run ./configure with no arguments - if you wish "
+        echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+automake -a $am_opt
+autoconf
+cd $ORIGDIR
+
+$srcdir/configure --enable-maintainer-mode "$@"
+
+echo 
+echo "Now type 'make' to compile $PROJECT."
diff --git a/docs/reference/glib/configure.in b/docs/reference/glib/configure.in
new file mode 100644 (file)
index 0000000..009e186
--- /dev/null
@@ -0,0 +1,21 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(glib-sections.txt)
+
+AM_INIT_AUTOMAKE(glib-reference, 1.1.3)
+
+AC_ARG_WITH(html-dir, [  --with-html-dir=PATH path to installed docs ])
+
+AC_ISC_POSIX
+AC_PROG_CC
+
+if test "x$with_html_dir" = "x" ; then
+  HTML_DIR='${datadir}/gtk-doc/html'
+else
+  HTML_DIR=$with_html_dir
+fi
+
+AC_SUBST(HTML_DIR)
+
+AC_OUTPUT([Makefile])
+
diff --git a/docs/reference/glib/glib-decl.txt b/docs/reference/glib/glib-decl.txt
new file mode 100644 (file)
index 0000000..4a57bf9
--- /dev/null
@@ -0,0 +1,4544 @@
+<MACRO>
+<NAME>G_DIR_SEPARATOR</NAME>
+#define G_DIR_SEPARATOR '\\'
+</MACRO>
+<MACRO>
+<NAME>G_DIR_SEPARATOR_S</NAME>
+#define G_DIR_SEPARATOR_S "\\"
+</MACRO>
+<MACRO>
+<NAME>G_SEARCHPATH_SEPARATOR</NAME>
+#define G_SEARCHPATH_SEPARATOR ';'
+</MACRO>
+<MACRO>
+<NAME>G_SEARCHPATH_SEPARATOR_S</NAME>
+#define G_SEARCHPATH_SEPARATOR_S ";"
+</MACRO>
+<MACRO>
+<NAME>G_DIR_SEPARATOR</NAME>
+#define G_DIR_SEPARATOR '/'
+</MACRO>
+<MACRO>
+<NAME>G_DIR_SEPARATOR_S</NAME>
+#define G_DIR_SEPARATOR_S "/"
+</MACRO>
+<MACRO>
+<NAME>G_SEARCHPATH_SEPARATOR</NAME>
+#define G_SEARCHPATH_SEPARATOR ':'
+</MACRO>
+<MACRO>
+<NAME>G_SEARCHPATH_SEPARATOR_S</NAME>
+#define G_SEARCHPATH_SEPARATOR_S ":"
+</MACRO>
+<MACRO>
+<NAME>NULL</NAME>
+#define        NULL    ((void*) 0)
+</MACRO>
+<MACRO>
+<NAME>FALSE</NAME>
+#define        FALSE   (0)
+</MACRO>
+<MACRO>
+<NAME>TRUE</NAME>
+#define        TRUE    (!FALSE)
+</MACRO>
+<MACRO>
+<NAME>MAX</NAME>
+#define MAX(a, b)  (((a) > (b)) ? (a) : (b))
+</MACRO>
+<MACRO>
+<NAME>MIN</NAME>
+#define MIN(a, b)  (((a) < (b)) ? (a) : (b))
+</MACRO>
+<MACRO>
+<NAME>ABS</NAME>
+#define ABS(a)    (((a) < 0) ? -(a) : (a))
+</MACRO>
+<MACRO>
+<NAME>CLAMP</NAME>
+#define CLAMP(x, low, high)  (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
+</MACRO>
+<MACRO>
+<NAME>G_VA_COPY</NAME>
+#  define G_VA_COPY(ap1, ap2)    (*(ap1) = *(ap2))
+</MACRO>
+<MACRO>
+<NAME>G_VA_COPY</NAME>
+#  define G_VA_COPY(ap1, ap2)    g_memmove ((ap1), (ap2), sizeof (va_list))
+</MACRO>
+<MACRO>
+<NAME>G_VA_COPY</NAME>
+#  define G_VA_COPY(ap1, ap2)    ((ap1) = (ap2))
+</MACRO>
+<MACRO>
+<NAME>G_STRUCT_OFFSET</NAME>
+#define G_STRUCT_OFFSET(struct_type, member)   \
+    ((gulong) ((gchar*) &((struct_type*) 0)->member))
+</MACRO>
+<MACRO>
+<NAME>G_STRUCT_MEMBER_P</NAME>
+#define G_STRUCT_MEMBER_P(struct_p, struct_offset)   \
+    ((gpointer) ((gchar*) (struct_p) + (gulong) (struct_offset)))
+</MACRO>
+<MACRO>
+<NAME>G_STRUCT_MEMBER</NAME>
+#define G_STRUCT_MEMBER(member_type, struct_p, struct_offset)   \
+    (*(member_type*) G_STRUCT_MEMBER_P ((struct_p), (struct_offset)))
+</MACRO>
+<MACRO>
+<NAME>G_CAN_INLINE</NAME>
+#  define G_CAN_INLINE 1
+</MACRO>
+<MACRO>
+<NAME>inline</NAME>
+#    define inline __inline__
+</MACRO>
+<MACRO>
+<NAME>inline</NAME>
+#    define inline __inline__
+</MACRO>
+<MACRO>
+<NAME>inline</NAME>
+#      define inline __inline
+</MACRO>
+<MACRO>
+<NAME>inline</NAME>
+#      define inline /* don't inline, then */
+</MACRO>
+<MACRO>
+<NAME>G_INLINE_FUNC</NAME>
+#      define G_INLINE_FUNC extern inline
+</MACRO>
+<MACRO>
+<NAME>G_INLINE_FUNC</NAME>
+#      define G_INLINE_FUNC extern
+</MACRO>
+<MACRO>
+<NAME>G_INLINE_FUNC</NAME>
+#      define G_INLINE_FUNC static inline
+</MACRO>
+<MACRO>
+<NAME>G_INLINE_FUNC</NAME>
+#      define G_INLINE_FUNC extern
+</MACRO>
+<MACRO>
+<NAME>G_STMT_START</NAME>
+#    define G_STMT_START       (void)(
+</MACRO>
+<MACRO>
+<NAME>G_STMT_END</NAME>
+#    define G_STMT_END         )
+</MACRO>
+<MACRO>
+<NAME>G_STMT_START</NAME>
+#      define G_STMT_START     if (1)
+</MACRO>
+<MACRO>
+<NAME>G_STMT_END</NAME>
+#      define G_STMT_END       else (void)0
+</MACRO>
+<MACRO>
+<NAME>G_STMT_START</NAME>
+#      define G_STMT_START     do
+</MACRO>
+<MACRO>
+<NAME>G_STMT_END</NAME>
+#      define G_STMT_END       while (0)
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_PRINTF</NAME>
+#define G_GNUC_PRINTF( format_idx, arg_idx )   \
+  __attribute__((format (printf, format_idx, arg_idx)))
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_SCANF</NAME>
+#define G_GNUC_SCANF( format_idx, arg_idx )    \
+  __attribute__((format (scanf, format_idx, arg_idx)))
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_FORMAT</NAME>
+#define G_GNUC_FORMAT( arg_idx )               \
+  __attribute__((format_arg (arg_idx)))
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_NORETURN</NAME>
+#define G_GNUC_NORETURN                                \
+  __attribute__((noreturn))
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_CONST</NAME>
+#define G_GNUC_CONST                           \
+  __attribute__((const))
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_UNUSED</NAME>
+#define G_GNUC_UNUSED                          \
+  __attribute__((unused))
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_PRINTF</NAME>
+#define G_GNUC_PRINTF( format_idx, arg_idx )
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_SCANF</NAME>
+#define G_GNUC_SCANF( format_idx, arg_idx )
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_FORMAT</NAME>
+#define G_GNUC_FORMAT( arg_idx )
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_NORETURN</NAME>
+#define G_GNUC_NORETURN
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_CONST</NAME>
+#define G_GNUC_CONST
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_UNUSED</NAME>
+#define        G_GNUC_UNUSED
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_FUNCTION</NAME>
+#define        G_GNUC_FUNCTION         __FUNCTION__
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_PRETTY_FUNCTION</NAME>
+#define        G_GNUC_PRETTY_FUNCTION  __PRETTY_FUNCTION__
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_FUNCTION</NAME>
+#define        G_GNUC_FUNCTION         ""
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_PRETTY_FUNCTION</NAME>
+#define        G_GNUC_PRETTY_FUNCTION  ""
+</MACRO>
+<MACRO>
+<NAME>ATEXIT</NAME>
+# define ATEXIT(proc)  g_ATEXIT(proc)
+</MACRO>
+<MACRO>
+<NAME>G_NATIVE_ATEXIT</NAME>
+# define G_NATIVE_ATEXIT
+</MACRO>
+<MACRO>
+<NAME>G_BREAKPOINT</NAME>
+#define        G_BREAKPOINT()          G_STMT_START{ __asm__ __volatile__ ("int $03"); }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>G_BREAKPOINT</NAME>
+#define        G_BREAKPOINT()          G_STMT_START{ __asm__ __volatile__ ("bpt"); }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>G_BREAKPOINT</NAME>
+#define        G_BREAKPOINT()
+</MACRO>
+<MACRO>
+<NAME>g_new</NAME>
+#  define g_new(type, count)           (ALLOC (type, count))
+</MACRO>
+<MACRO>
+<NAME>g_new0</NAME>
+#  define g_new0(type, count)          (CALLOC (type, count))
+</MACRO>
+<MACRO>
+<NAME>g_renew</NAME>
+#  define g_renew(type, mem, count)    (REALLOC (mem, type, count))
+</MACRO>
+<MACRO>
+<NAME>g_new</NAME>
+#  define g_new(type, count)     \
+      ((type *) g_malloc ((unsigned) sizeof (type) * (count)))
+</MACRO>
+<MACRO>
+<NAME>g_new0</NAME>
+#  define g_new0(type, count)    \
+      ((type *) g_malloc0 ((unsigned) sizeof (type) * (count)))
+</MACRO>
+<MACRO>
+<NAME>g_renew</NAME>
+#  define g_renew(type, mem, count)      \
+      ((type *) g_realloc (mem, (unsigned) sizeof (type) * (count)))
+</MACRO>
+<MACRO>
+<NAME>g_mem_chunk_create</NAME>
+#define g_mem_chunk_create(type, pre_alloc, alloc_type)        ( \
+  g_mem_chunk_new (#type " mem chunks (" #pre_alloc ")", \
+                  sizeof (type), \
+                  sizeof (type) * (pre_alloc), \
+                  (alloc_type)) \
+)
+</MACRO>
+<MACRO>
+<NAME>g_chunk_new</NAME>
+#define g_chunk_new(type, chunk)       ( \
+  (type *) g_mem_chunk_alloc (chunk) \
+)
+</MACRO>
+<MACRO>
+<NAME>g_chunk_new0</NAME>
+#define g_chunk_new0(type, chunk)      ( \
+  (type *) g_mem_chunk_alloc0 (chunk) \
+)
+</MACRO>
+<MACRO>
+<NAME>g_chunk_free</NAME>
+#define g_chunk_free(mem, mem_chunk)   G_STMT_START { \
+  g_mem_chunk_free ((mem_chunk), (mem)); \
+} G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_string</NAME>
+#define g_string(x) #x
+</MACRO>
+<MACRO>
+<NAME>g_assert</NAME>
+#define g_assert(expr)
+</MACRO>
+<MACRO>
+<NAME>g_assert_not_reached</NAME>
+#define g_assert_not_reached()
+</MACRO>
+<MACRO>
+<NAME>g_assert</NAME>
+#define g_assert(expr)                 G_STMT_START{           \
+     if (!(expr))                                              \
+       g_log (G_LOG_DOMAIN,                                    \
+             G_LOG_LEVEL_ERROR,                                \
+             "file %s: line %d (%s): assertion failed: (%s)",  \
+             __FILE__,                                         \
+             __LINE__,                                         \
+             __PRETTY_FUNCTION__,                              \
+             #expr);                   }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_assert_not_reached</NAME>
+#define g_assert_not_reached()         G_STMT_START{           \
+     g_log (G_LOG_DOMAIN,                                      \
+           G_LOG_LEVEL_ERROR,                                  \
+           "file %s: line %d (%s): should not be reached",     \
+           __FILE__,                                           \
+           __LINE__,                                           \
+           __PRETTY_FUNCTION__);       }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_assert</NAME>
+#define g_assert(expr)                 G_STMT_START{           \
+     if (!(expr))                                              \
+       g_log (G_LOG_DOMAIN,                                    \
+             G_LOG_LEVEL_ERROR,                                \
+             "file %s: line %d: assertion failed: (%s)",       \
+             __FILE__,                                         \
+             __LINE__,                                         \
+             #expr);                   }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_assert_not_reached</NAME>
+#define g_assert_not_reached()         G_STMT_START{   \
+     g_log (G_LOG_DOMAIN,                              \
+           G_LOG_LEVEL_ERROR,                          \
+           "file %s: line %d: should not be reached",  \
+           __FILE__,                                   \
+           __LINE__);          }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_return_if_fail</NAME>
+#define g_return_if_fail(expr)
+</MACRO>
+<MACRO>
+<NAME>g_return_val_if_fail</NAME>
+#define g_return_val_if_fail(expr,val)
+</MACRO>
+<MACRO>
+<NAME>g_return_if_fail</NAME>
+#define g_return_if_fail(expr)         G_STMT_START{                   \
+     if (!(expr))                                                      \
+       {                                                               \
+        g_log (G_LOG_DOMAIN,                                           \
+               G_LOG_LEVEL_CRITICAL,                                   \
+               "file %s: line %d (%s): assertion `%s' failed.",        \
+               __FILE__,                                               \
+               __LINE__,                                               \
+               __PRETTY_FUNCTION__,                                    \
+               #expr);                                                 \
+        return;                                                        \
+       };                              }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_return_val_if_fail</NAME>
+#define g_return_val_if_fail(expr,val) G_STMT_START{                   \
+     if (!(expr))                                                      \
+       {                                                               \
+        g_log (G_LOG_DOMAIN,                                           \
+               G_LOG_LEVEL_CRITICAL,                                   \
+               "file %s: line %d (%s): assertion `%s' failed.",        \
+               __FILE__,                                               \
+               __LINE__,                                               \
+               __PRETTY_FUNCTION__,                                    \
+               #expr);                                                 \
+        return val;                                                    \
+       };                              }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_return_if_fail</NAME>
+#define g_return_if_fail(expr)         G_STMT_START{           \
+     if (!(expr))                                              \
+       {                                                       \
+        g_log (G_LOG_DOMAIN,                                   \
+               G_LOG_LEVEL_CRITICAL,                           \
+               "file %s: line %d: assertion `%s' failed.",     \
+               __FILE__,                                       \
+               __LINE__,                                       \
+               #expr);                                         \
+        return;                                                \
+       };                              }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_return_val_if_fail</NAME>
+#define g_return_val_if_fail(expr, val)        G_STMT_START{           \
+     if (!(expr))                                              \
+       {                                                       \
+        g_log (G_LOG_DOMAIN,                                   \
+               G_LOG_LEVEL_CRITICAL,                           \
+               "file %s: line %d: assertion `%s' failed.",     \
+               __FILE__,                                       \
+               __LINE__,                                       \
+               #expr);                                         \
+        return val;                                            \
+       };                              }G_STMT_END
+</MACRO>
+<TYPEDEF>
+<NAME>gchar</NAME>
+typedef char   gchar;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gshort</NAME>
+typedef short  gshort;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>glong</NAME>
+typedef long   glong;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gint</NAME>
+typedef int    gint;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gboolean</NAME>
+typedef gint   gboolean;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>guchar</NAME>
+typedef unsigned char  guchar;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gushort</NAME>
+typedef unsigned short gushort;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gulong</NAME>
+typedef unsigned long  gulong;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>guint</NAME>
+typedef unsigned int   guint;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gfloat</NAME>
+typedef float  gfloat;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gdouble</NAME>
+typedef double gdouble;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gldouble</NAME>
+typedef long double gldouble;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gldouble</NAME>
+typedef double gldouble;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gpointer</NAME>
+typedef void* gpointer;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gconstpointer</NAME>
+typedef const void *gconstpointer;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gssize</NAME>
+typedef gint32 gssize;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gsize</NAME>
+typedef guint32 gsize;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GQuark</NAME>
+typedef guint32 GQuark;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GTime</NAME>
+typedef gint32 GTime;
+</TYPEDEF>
+<MACRO>
+<NAME>G_LITTLE_ENDIAN</NAME>
+#define G_LITTLE_ENDIAN 1234
+</MACRO>
+<MACRO>
+<NAME>G_BIG_ENDIAN</NAME>
+#define G_BIG_ENDIAN    4321
+</MACRO>
+<MACRO>
+<NAME>G_PDP_ENDIAN</NAME>
+#define G_PDP_ENDIAN    3412           /* unused, need specific PDP check */   
+</MACRO>
+<MACRO>
+<NAME>GUINT16_SWAP_LE_BE_CONSTANT</NAME>
+#define GUINT16_SWAP_LE_BE_CONSTANT(val)       ((guint16) ( \
+    (((guint16) (val) & (guint16) 0x00ffU) << 8) | \
+    (((guint16) (val) & (guint16) 0xff00U) >> 8)))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_SWAP_LE_BE_CONSTANT</NAME>
+#define GUINT32_SWAP_LE_BE_CONSTANT(val)       ((guint32) ( \
+    (((guint32) (val) & (guint32) 0x000000ffU) << 24) | \
+    (((guint32) (val) & (guint32) 0x0000ff00U) <<  8) | \
+    (((guint32) (val) & (guint32) 0x00ff0000U) >>  8) | \
+    (((guint32) (val) & (guint32) 0xff000000U) >> 24)))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_SWAP_LE_BE_X86</NAME>
+#  define GUINT16_SWAP_LE_BE_X86(val) \
+     (__extension__                                    \
+      ({ register guint16 __v;                         \
+        if (__builtin_constant_p (val))                \
+          __v = GUINT16_SWAP_LE_BE_CONSTANT (val);     \
+        else                                           \
+          __asm__ __const__ ("rorw $8, %w0"            \
+                             : "=r" (__v)              \
+                             : "0" ((guint16) (val))); \
+       __v; }))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_SWAP_LE_BE</NAME>
+#  define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_X86 (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_SWAP_LE_BE_X86</NAME>
+#     define GUINT32_SWAP_LE_BE_X86(val) \
+        (__extension__                                         \
+         ({ register guint32 __v;                              \
+           if (__builtin_constant_p (val))                     \
+             __v = GUINT32_SWAP_LE_BE_CONSTANT (val);          \
+         else                                                  \
+           __asm__ __const__ ("rorw $8, %w0\n\t"               \
+                              "rorl $16, %0\n\t"               \
+                              "rorw $8, %w0"                   \
+                              : "=r" (__v)                     \
+                              : "0" ((guint32) (val)));        \
+       __v; }))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_SWAP_LE_BE_X86</NAME>
+#     define GUINT32_SWAP_LE_BE_X86(val) \
+        (__extension__                                         \
+         ({ register guint32 __v;                              \
+           if (__builtin_constant_p (val))                     \
+             __v = GUINT32_SWAP_LE_BE_CONSTANT (val);          \
+         else                                                  \
+           __asm__ __const__ ("bswap %0"                       \
+                              : "=r" (__v)                     \
+                              : "0" ((guint32) (val)));        \
+       __v; }))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_SWAP_LE_BE</NAME>
+#  define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_X86 (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_SWAP_LE_BE</NAME>
+#  define GUINT16_SWAP_LE_BE(val) (GUINT16_SWAP_LE_BE_CONSTANT (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_SWAP_LE_BE</NAME>
+#  define GUINT32_SWAP_LE_BE(val) (GUINT32_SWAP_LE_BE_CONSTANT (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_SWAP_LE_BE_CONSTANT</NAME>
+#  define GUINT64_SWAP_LE_BE_CONSTANT(val)     ((guint64) ( \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0x00000000000000ffU)) << 56) |      \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0x000000000000ff00U)) << 40) |      \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0x0000000000ff0000U)) << 24) |      \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0x00000000ff000000U)) <<  8) |      \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0x000000ff00000000U)) >>  8) |      \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0x0000ff0000000000U)) >> 24) |      \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0x00ff000000000000U)) >> 40) |      \
+      (((guint64) (val) &                                              \
+       (guint64) G_GINT64_CONSTANT(0xff00000000000000U)) >> 56)))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_SWAP_LE_BE_X86</NAME>
+#    define GUINT64_SWAP_LE_BE_X86(val) \
+       (__extension__                                          \
+        ({ union { guint64 __ll;                               \
+                   guint32 __l[2]; } __r;                      \
+           if (__builtin_constant_p (val))                     \
+             __r.__ll = GUINT64_SWAP_LE_BE_CONSTANT (val);     \
+           else                                                \
+             {                                                 \
+               union { guint64 __ll;                           \
+                       guint32 __l[2]; } __w;                  \
+               __w.__ll = ((guint64) val);                     \
+               __r.__l[0] = GUINT32_SWAP_LE_BE (__w.__l[1]);   \
+               __r.__l[1] = GUINT32_SWAP_LE_BE (__w.__l[0]);   \
+             }                                                 \
+         __r.__ll; }))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_SWAP_LE_BE</NAME>
+#    define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_X86 (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_SWAP_LE_BE</NAME>
+#    define GUINT64_SWAP_LE_BE(val) (GUINT64_SWAP_LE_BE_CONSTANT(val))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_SWAP_LE_PDP</NAME>
+#define GUINT16_SWAP_LE_PDP(val)       ((guint16) (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_SWAP_BE_PDP</NAME>
+#define GUINT16_SWAP_BE_PDP(val)       (GUINT16_SWAP_LE_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_SWAP_LE_PDP</NAME>
+#define GUINT32_SWAP_LE_PDP(val)       ((guint32) ( \
+    (((guint32) (val) & (guint32) 0x0000ffffU) << 16) | \
+    (((guint32) (val) & (guint32) 0xffff0000U) >> 16)))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_SWAP_BE_PDP</NAME>
+#define GUINT32_SWAP_BE_PDP(val)       ((guint32) ( \
+    (((guint32) (val) & (guint32) 0x00ff00ffU) << 8) | \
+    (((guint32) (val) & (guint32) 0xff00ff00U) >> 8)))
+</MACRO>
+<MACRO>
+<NAME>GINT16_FROM_LE</NAME>
+#define GINT16_FROM_LE(val)    (GINT16_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_FROM_LE</NAME>
+#define GUINT16_FROM_LE(val)   (GUINT16_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT16_FROM_BE</NAME>
+#define GINT16_FROM_BE(val)    (GINT16_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_FROM_BE</NAME>
+#define GUINT16_FROM_BE(val)   (GUINT16_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT32_FROM_LE</NAME>
+#define GINT32_FROM_LE(val)    (GINT32_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_FROM_LE</NAME>
+#define GUINT32_FROM_LE(val)   (GUINT32_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT32_FROM_BE</NAME>
+#define GINT32_FROM_BE(val)    (GINT32_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_FROM_BE</NAME>
+#define GUINT32_FROM_BE(val)   (GUINT32_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT64_FROM_LE</NAME>
+#define GINT64_FROM_LE(val)    (GINT64_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_FROM_LE</NAME>
+#define GUINT64_FROM_LE(val)   (GUINT64_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT64_FROM_BE</NAME>
+#define GINT64_FROM_BE(val)    (GINT64_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_FROM_BE</NAME>
+#define GUINT64_FROM_BE(val)   (GUINT64_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GLONG_FROM_LE</NAME>
+#define GLONG_FROM_LE(val)     (GLONG_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GULONG_FROM_LE</NAME>
+#define GULONG_FROM_LE(val)    (GULONG_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GLONG_FROM_BE</NAME>
+#define GLONG_FROM_BE(val)     (GLONG_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GULONG_FROM_BE</NAME>
+#define GULONG_FROM_BE(val)    (GULONG_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT_FROM_LE</NAME>
+#define GINT_FROM_LE(val)      (GINT_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT_FROM_LE</NAME>
+#define GUINT_FROM_LE(val)     (GUINT_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT_FROM_BE</NAME>
+#define GINT_FROM_BE(val)      (GINT_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT_FROM_BE</NAME>
+#define GUINT_FROM_BE(val)     (GUINT_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>g_ntohl</NAME>
+#define g_ntohl(val) (GUINT32_FROM_BE (val))
+</MACRO>
+<MACRO>
+<NAME>g_ntohs</NAME>
+#define g_ntohs(val) (GUINT16_FROM_BE (val))
+</MACRO>
+<MACRO>
+<NAME>g_htonl</NAME>
+#define g_htonl(val) (GUINT32_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>g_htons</NAME>
+#define g_htons(val) (GUINT16_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUTILS_C_VAR</NAME>
+#    define GUTILS_C_VAR __declspec(dllexport)
+</MACRO>
+<MACRO>
+<NAME>GUTILS_C_VAR</NAME>
+#    define GUTILS_C_VAR extern __declspec(dllimport)
+</MACRO>
+<MACRO>
+<NAME>GUTILS_C_VAR</NAME>
+#  define GUTILS_C_VAR extern
+</MACRO>
+<MACRO>
+<NAME>GLIB_CHECK_VERSION</NAME>
+#define GLIB_CHECK_VERSION(major,minor,micro)    \
+    (GLIB_MAJOR_VERSION > (major) || \
+     (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION > (minor)) || \
+     (GLIB_MAJOR_VERSION == (major) && GLIB_MINOR_VERSION == (minor) && \
+      GLIB_MICRO_VERSION >= (micro)))
+</MACRO>
+<STRUCT>
+<NAME>GAllocator</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GArray</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GByteArray</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GCache</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GCompletion</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GData</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GDebugKey</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GHashTable</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GHook</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GHookList</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GList</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GMemChunk</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GNode</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GPtrArray</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GRelation</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GScanner</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GScannerConfig</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GSList</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GString</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GStringChunk</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GTimer</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GTree</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GTuples</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GIOChannel</NAME>
+</STRUCT>
+<ENUM>
+<NAME>GTraverseFlags</NAME>
+typedef enum
+{
+  G_TRAVERSE_LEAFS     = 1 << 0,
+  G_TRAVERSE_NON_LEAFS = 1 << 1,
+  G_TRAVERSE_ALL       = G_TRAVERSE_LEAFS | G_TRAVERSE_NON_LEAFS,
+  G_TRAVERSE_MASK      = 0x03
+} GTraverseFlags;
+</ENUM>
+<ENUM>
+<NAME>GTraverseType</NAME>
+typedef enum
+{
+  G_IN_ORDER,
+  G_PRE_ORDER,
+  G_POST_ORDER,
+  G_LEVEL_ORDER
+} GTraverseType;
+</ENUM>
+<MACRO>
+<NAME>G_LOG_LEVEL_USER_SHIFT</NAME>
+#define        G_LOG_LEVEL_USER_SHIFT  (8)
+</MACRO>
+<ENUM>
+<NAME>GLogLevelFlags</NAME>
+typedef enum
+{
+  /* log flags */
+  G_LOG_FLAG_RECURSION         = 1 << 0,
+  G_LOG_FLAG_FATAL             = 1 << 1,
+  
+  /* GLib log levels */
+  G_LOG_LEVEL_ERROR            = 1 << 2,       /* always fatal */
+  G_LOG_LEVEL_CRITICAL         = 1 << 3,
+  G_LOG_LEVEL_WARNING          = 1 << 4,
+  G_LOG_LEVEL_MESSAGE          = 1 << 5,
+  G_LOG_LEVEL_INFO             = 1 << 6,
+  G_LOG_LEVEL_DEBUG            = 1 << 7,
+  
+  G_LOG_LEVEL_MASK             = ~(G_LOG_FLAG_RECURSION | G_LOG_FLAG_FATAL)
+} GLogLevelFlags;
+</ENUM>
+<MACRO>
+<NAME>G_LOG_FATAL_MASK</NAME>
+#define        G_LOG_FATAL_MASK        (G_LOG_FLAG_RECURSION | G_LOG_LEVEL_ERROR)
+</MACRO>
+<USER_FUNCTION>
+<NAME>GCacheNewFunc</NAME>
+<RETURNS>gpointer </RETURNS>
+gpointer       key
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GCacheDupFunc</NAME>
+<RETURNS>gpointer </RETURNS>
+gpointer       value
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GCacheDestroyFunc</NAME>
+<RETURNS>void </RETURNS>
+gpointer       value
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GCompareFunc</NAME>
+<RETURNS>gint </RETURNS>
+gconstpointer  a,
+                                                gconstpointer  b
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GCompletionFunc</NAME>
+<RETURNS>gchar *</RETURNS>
+gpointer
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GDestroyNotify</NAME>
+<RETURNS>void </RETURNS>
+gpointer       data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GDataForeachFunc</NAME>
+<RETURNS>void </RETURNS>
+GQuark         key_id,
+                                                gpointer       data,
+                                                gpointer       user_data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GFunc</NAME>
+<RETURNS>void </RETURNS>
+gpointer       data,
+                                                gpointer       user_data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHashFunc</NAME>
+<RETURNS>guint </RETURNS>
+gconstpointer  key
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GFreeFunc</NAME>
+<RETURNS>void </RETURNS>
+gpointer       data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHFunc</NAME>
+<RETURNS>void </RETURNS>
+gpointer       key,
+                                                gpointer       value,
+                                                gpointer       user_data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHRFunc</NAME>
+<RETURNS>gboolean </RETURNS>
+gpointer       key,
+                                                gpointer       value,
+                                                gpointer       user_data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHookCompareFunc</NAME>
+<RETURNS>gint </RETURNS>
+GHook          *new_hook,
+                                                GHook          *sibling
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHookFindFunc</NAME>
+<RETURNS>gboolean </RETURNS>
+GHook          *hook,
+                                                gpointer        data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHookMarshaller</NAME>
+<RETURNS>void </RETURNS>
+GHook          *hook,
+                                                gpointer        data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHookCheckMarshaller</NAME>
+<RETURNS>gboolean </RETURNS>
+GHook          *hook,
+                                                gpointer        data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHookFunc</NAME>
+<RETURNS>void </RETURNS>
+gpointer        data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHookCheckFunc</NAME>
+<RETURNS>gboolean </RETURNS>
+gpointer        data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GHookFreeFunc</NAME>
+<RETURNS>void </RETURNS>
+GHookList      *hook_list,
+                                                GHook          *hook
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GLogFunc</NAME>
+<RETURNS>void </RETURNS>
+const gchar   *log_domain,
+                                                GLogLevelFlags log_level,
+                                                const gchar   *message,
+                                                gpointer       user_data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GNodeTraverseFunc</NAME>
+<RETURNS>gboolean </RETURNS>
+GNode         *node,
+                                                gpointer       data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GNodeForeachFunc</NAME>
+<RETURNS>void </RETURNS>
+GNode         *node,
+                                                gpointer       data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GSearchFunc</NAME>
+<RETURNS>gint </RETURNS>
+gpointer       key,
+                                                gpointer       data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GScannerMsgFunc</NAME>
+<RETURNS>void </RETURNS>
+GScanner      *scanner,
+                                                gchar         *message,
+                                                gint           error
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GTraverseFunc</NAME>
+<RETURNS>gint </RETURNS>
+gpointer       key,
+                                                gpointer       value,
+                                                gpointer       data
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GVoidFunc</NAME>
+<RETURNS>void </RETURNS>
+void
+</USER_FUNCTION>
+<STRUCT>
+<NAME>GList</NAME>
+struct GList
+{
+  gpointer data;
+  GList *next;
+  GList *prev;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GSList</NAME>
+struct GSList
+{
+  gpointer data;
+  GSList *next;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GString</NAME>
+struct GString
+{
+  gchar *str;
+  gint len;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GArray</NAME>
+struct GArray
+{
+  gchar *data;
+  guint len;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GByteArray</NAME>
+struct GByteArray
+{
+  guint8 *data;
+  guint          len;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GPtrArray</NAME>
+struct GPtrArray
+{
+  gpointer *pdata;
+  guint            len;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GTuples</NAME>
+struct GTuples
+{
+  guint len;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GDebugKey</NAME>
+struct GDebugKey
+{
+  gchar *key;
+  guint         value;
+};
+</STRUCT>
+<FUNCTION>
+<NAME>g_list_push_allocator</NAME>
+<RETURNS>void  </RETURNS>
+GAllocator     *allocator
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_pop_allocator</NAME>
+<RETURNS>void  </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_alloc</NAME>
+<RETURNS>GList *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_free</NAME>
+<RETURNS>void  </RETURNS>
+GList          *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_free_1</NAME>
+<RETURNS>void  </RETURNS>
+GList          *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_append</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_prepend</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_insert</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,gpointer   data,gint               position
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_insert_sorted</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,gpointer   data,GCompareFunc       func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_concat</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list1,GList            *list2
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_remove</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_remove_link</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,GList             *llink
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_reverse</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_copy</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_nth</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,guint              n
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_find</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_find_custom</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,gpointer   data,GCompareFunc       func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_position</NAME>
+<RETURNS>gint  </RETURNS>
+GList          *list,GList             *llink
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_index</NAME>
+<RETURNS>gint  </RETURNS>
+GList          *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_last</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_first</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_length</NAME>
+<RETURNS>guint  </RETURNS>
+GList          *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_foreach</NAME>
+<RETURNS>void  </RETURNS>
+GList          *list,GFunc              func,gpointer   user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_sort</NAME>
+<RETURNS>GList *</RETURNS>
+GList          *list,GCompareFunc    compare_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_list_nth_data</NAME>
+<RETURNS>gpointer  </RETURNS>
+GList          *list,guint              n
+</FUNCTION>
+<MACRO>
+<NAME>g_list_previous</NAME>
+#define g_list_previous(list)  ((list) ? (((GList *)(list))->prev) : NULL)
+</MACRO>
+<MACRO>
+<NAME>g_list_next</NAME>
+#define g_list_next(list)      ((list) ? (((GList *)(list))->next) : NULL)
+</MACRO>
+<FUNCTION>
+<NAME>g_slist_push_allocator</NAME>
+<RETURNS>void  </RETURNS>
+GAllocator     *allocator
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_pop_allocator</NAME>
+<RETURNS>void  </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_alloc</NAME>
+<RETURNS>GSList *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_free</NAME>
+<RETURNS>void  </RETURNS>
+GSList         *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_free_1</NAME>
+<RETURNS>void  </RETURNS>
+GSList         *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_append</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_prepend</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_insert</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,gpointer   data,gint               position
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_insert_sorted</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,gpointer   data,GCompareFunc       func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_concat</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list1,GSList           *list2
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_remove</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_remove_link</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,GSList            *llink
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_reverse</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_copy</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_nth</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,guint              n
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_find</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_find_custom</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list,gpointer   data,GCompareFunc       func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_position</NAME>
+<RETURNS>gint  </RETURNS>
+GSList         *list,GSList            *llink
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_index</NAME>
+<RETURNS>gint  </RETURNS>
+GSList         *list,gpointer   data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_last</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList         *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_length</NAME>
+<RETURNS>guint         </RETURNS>
+GSList         *list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_foreach</NAME>
+<RETURNS>void  </RETURNS>
+GSList         *list,GFunc              func,gpointer   user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_sort</NAME>
+<RETURNS>GSList *</RETURNS>
+GSList          *list,GCompareFunc    compare_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_slist_nth_data</NAME>
+<RETURNS>gpointer  </RETURNS>
+GSList         *list,guint              n
+</FUNCTION>
+<MACRO>
+<NAME>g_slist_next</NAME>
+#define g_slist_next(slist)    ((slist) ? (((GSList *)(slist))->next) : NULL)
+</MACRO>
+<FUNCTION>
+<NAME>g_hash_table_new</NAME>
+<RETURNS>GHashTable *</RETURNS>
+GHashFunc       hash_func,GCompareFunc  key_compare_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GHashTable     *hash_table
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_insert</NAME>
+<RETURNS>void  </RETURNS>
+GHashTable     *hash_table,gpointer     key,gpointer    value
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_remove</NAME>
+<RETURNS>void  </RETURNS>
+GHashTable     *hash_table,gconstpointer        key
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_lookup</NAME>
+<RETURNS>gpointer  </RETURNS>
+GHashTable     *hash_table,gconstpointer        key
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_lookup_extended</NAME>
+<RETURNS>gboolean  </RETURNS>
+GHashTable     *hash_table,gconstpointer        lookup_key,gpointer    *orig_key,gpointer      *value
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_freeze</NAME>
+<RETURNS>void  </RETURNS>
+GHashTable     *hash_table
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_thaw</NAME>
+<RETURNS>void  </RETURNS>
+GHashTable     *hash_table
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_foreach</NAME>
+<RETURNS>void  </RETURNS>
+GHashTable     *hash_table,GHFunc               func,gpointer   user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_foreach_remove</NAME>
+<RETURNS>guint         </RETURNS>
+GHashTable     *hash_table,GHRFunc      func,gpointer   user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hash_table_size</NAME>
+<RETURNS>guint         </RETURNS>
+GHashTable     *hash_table
+</FUNCTION>
+<FUNCTION>
+<NAME>g_cache_new</NAME>
+<RETURNS>GCache *</RETURNS>
+GCacheNewFunc     value_new_func,GCacheDestroyFunc  value_destroy_func,GCacheDupFunc      key_dup_func,GCacheDestroyFunc  key_destroy_func,GHashFunc      hash_key_func,GHashFunc         hash_value_func,GCompareFunc    key_compare_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_cache_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GCache           *cache
+</FUNCTION>
+<FUNCTION>
+<NAME>g_cache_insert</NAME>
+<RETURNS>gpointer  </RETURNS>
+GCache           *cache,gpointer          key
+</FUNCTION>
+<FUNCTION>
+<NAME>g_cache_remove</NAME>
+<RETURNS>void  </RETURNS>
+GCache           *cache,gpointer          value
+</FUNCTION>
+<FUNCTION>
+<NAME>g_cache_key_foreach</NAME>
+<RETURNS>void  </RETURNS>
+GCache           *cache,GHFunc            func,gpointer           user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_cache_value_foreach</NAME>
+<RETURNS>void  </RETURNS>
+GCache           *cache,GHFunc            func,gpointer           user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_new</NAME>
+<RETURNS>GTree *</RETURNS>
+GCompareFunc    key_compare_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GTree          *tree
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_insert</NAME>
+<RETURNS>void  </RETURNS>
+GTree          *tree,gpointer   key,gpointer    value
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_remove</NAME>
+<RETURNS>void  </RETURNS>
+GTree          *tree,gpointer   key
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_lookup</NAME>
+<RETURNS>gpointer  </RETURNS>
+GTree          *tree,gpointer   key
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_traverse</NAME>
+<RETURNS>void  </RETURNS>
+GTree          *tree,GTraverseFunc      traverse_func,GTraverseType     traverse_type,gpointer  data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_search</NAME>
+<RETURNS>gpointer  </RETURNS>
+GTree          *tree,GSearchFunc        search_func,gpointer    data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_height</NAME>
+<RETURNS>gint  </RETURNS>
+GTree          *tree
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tree_nnodes</NAME>
+<RETURNS>gint  </RETURNS>
+GTree          *tree
+</FUNCTION>
+<STRUCT>
+<NAME>GNode</NAME>
+struct GNode
+{
+  gpointer data;
+  GNode          *next;
+  GNode          *prev;
+  GNode          *parent;
+  GNode          *children;
+};
+</STRUCT>
+<MACRO>
+<NAME>G_NODE_IS_ROOT</NAME>
+#define         G_NODE_IS_ROOT(node)   (((GNode*) (node))->parent == NULL && \
+                                ((GNode*) (node))->prev == NULL && \
+                                ((GNode*) (node))->next == NULL)
+</MACRO>
+<MACRO>
+<NAME>G_NODE_IS_LEAF</NAME>
+#define         G_NODE_IS_LEAF(node)   (((GNode*) (node))->children == NULL)
+</MACRO>
+<FUNCTION>
+<NAME>g_node_push_allocator</NAME>
+<RETURNS>void  </RETURNS>
+GAllocator       *allocator
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_pop_allocator</NAME>
+<RETURNS>void  </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_new</NAME>
+<RETURNS>GNode *</RETURNS>
+gpointer          data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GNode            *root
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_unlink</NAME>
+<RETURNS>void  </RETURNS>
+GNode            *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_insert</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *parent,gint             position,GNode                 *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_insert_before</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *parent,GNode           *sibling,GNode                  *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_prepend</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *parent,GNode           *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_n_nodes</NAME>
+<RETURNS>guint         </RETURNS>
+GNode            *root,GTraverseFlags     flags
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_get_root</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_is_ancestor</NAME>
+<RETURNS>gboolean  </RETURNS>
+GNode            *node,GNode             *descendant
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_depth</NAME>
+<RETURNS>guint         </RETURNS>
+GNode            *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_find</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *root,GTraverseType      order,GTraverseFlags    flags,gpointer          data
+</FUNCTION>
+<MACRO>
+<NAME>g_node_append</NAME>
+#define g_node_append(parent, node)                            \
+     g_node_insert_before ((parent), NULL, (node))
+</MACRO>
+<MACRO>
+<NAME>g_node_insert_data</NAME>
+#define        g_node_insert_data(parent, position, data)              \
+     g_node_insert ((parent), (position), g_node_new (data))
+</MACRO>
+<MACRO>
+<NAME>g_node_insert_data_before</NAME>
+#define        g_node_insert_data_before(parent, sibling, data)        \
+     g_node_insert_before ((parent), (sibling), g_node_new (data))
+</MACRO>
+<MACRO>
+<NAME>g_node_prepend_data</NAME>
+#define        g_node_prepend_data(parent, data)                       \
+     g_node_prepend ((parent), g_node_new (data))
+</MACRO>
+<MACRO>
+<NAME>g_node_append_data</NAME>
+#define        g_node_append_data(parent, data)                        \
+     g_node_insert_before ((parent), NULL, g_node_new (data))
+</MACRO>
+<FUNCTION>
+<NAME>g_node_traverse</NAME>
+<RETURNS>void  </RETURNS>
+GNode            *root,GTraverseType      order,GTraverseFlags    flags,gint              max_depth,GNodeTraverseFunc func,gpointer       data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_max_height</NAME>
+<RETURNS>guint         </RETURNS>
+GNode *root
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_children_foreach</NAME>
+<RETURNS>void  </RETURNS>
+GNode            *node,GTraverseFlags   flags,GNodeForeachFunc func,gpointer      data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_reverse_children</NAME>
+<RETURNS>void  </RETURNS>
+GNode            *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_n_children</NAME>
+<RETURNS>guint         </RETURNS>
+GNode            *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_nth_child</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *node,guint              n
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_last_child</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_find_child</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *node,GTraverseFlags   flags,gpointer    data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_child_position</NAME>
+<RETURNS>gint  </RETURNS>
+GNode            *node,GNode             *child
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_child_index</NAME>
+<RETURNS>gint  </RETURNS>
+GNode            *node,gpointer           data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_first_sibling</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *node
+</FUNCTION>
+<FUNCTION>
+<NAME>g_node_last_sibling</NAME>
+<RETURNS>GNode *</RETURNS>
+GNode            *node
+</FUNCTION>
+<MACRO>
+<NAME>g_node_prev_sibling</NAME>
+#define         g_node_prev_sibling(node)      ((node) ? \
+                                        ((GNode*) (node))->prev : NULL)
+</MACRO>
+<MACRO>
+<NAME>g_node_next_sibling</NAME>
+#define         g_node_next_sibling(node)      ((node) ? \
+                                        ((GNode*) (node))->next : NULL)
+</MACRO>
+<MACRO>
+<NAME>g_node_first_child</NAME>
+#define         g_node_first_child(node)       ((node) ? \
+                                        ((GNode*) (node))->children : NULL)
+</MACRO>
+<MACRO>
+<NAME>G_HOOK_FLAG_USER_SHIFT</NAME>
+#define G_HOOK_FLAG_USER_SHIFT (4)
+</MACRO>
+<ENUM>
+<NAME>GHookFlagMask</NAME>
+typedef enum
+{
+  G_HOOK_FLAG_ACTIVE   = 1 << 0,
+  G_HOOK_FLAG_IN_CALL  = 1 << 1,
+  G_HOOK_FLAG_MASK     = 0x0f
+} GHookFlagMask;
+</ENUM>
+<MACRO>
+<NAME>G_HOOK_DEFERRED_DESTROY</NAME>
+#define        G_HOOK_DEFERRED_DESTROY ((GHookFreeFunc) 0x01)
+</MACRO>
+<STRUCT>
+<NAME>GHookList</NAME>
+struct GHookList
+{
+  guint                 seq_id;
+  guint                 hook_size;
+  guint                 is_setup : 1;
+  GHook                *hooks;
+  GMemChunk    *hook_memchunk;
+  GHookFreeFunc         hook_free; /* virtual function */
+  GHookFreeFunc         hook_destroy; /* virtual function */
+};
+</STRUCT>
+<STRUCT>
+<NAME>GHook</NAME>
+struct GHook
+{
+  gpointer      data;
+  GHook                *next;
+  GHook                *prev;
+  guint                 ref_count;
+  guint                 hook_id;
+  guint                 flags;
+  gpointer      func;
+  GDestroyNotify destroy;
+};
+</STRUCT>
+<MACRO>
+<NAME>G_HOOK_ACTIVE</NAME>
+#define        G_HOOK_ACTIVE(hook)             ((((GHook*) hook)->flags & \
+                                         G_HOOK_FLAG_ACTIVE) != 0)
+</MACRO>
+<MACRO>
+<NAME>G_HOOK_IN_CALL</NAME>
+#define        G_HOOK_IN_CALL(hook)            ((((GHook*) hook)->flags & \
+                                         G_HOOK_FLAG_IN_CALL) != 0)
+</MACRO>
+<MACRO>
+<NAME>G_HOOK_IS_VALID</NAME>
+#define G_HOOK_IS_VALID(hook)          (((GHook*) hook)->hook_id != 0 && \
+                                        G_HOOK_ACTIVE (hook))
+</MACRO>
+<MACRO>
+<NAME>G_HOOK_IS_UNLINKED</NAME>
+#define G_HOOK_IS_UNLINKED(hook)       (((GHook*) hook)->next == NULL && \
+                                        ((GHook*) hook)->prev == NULL && \
+                                        ((GHook*) hook)->hook_id == 0 && \
+                                        ((GHook*) hook)->ref_count == 0)
+</MACRO>
+<FUNCTION>
+<NAME>g_hook_list_init</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,guint                         hook_size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_list_clear</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_alloc</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_free</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,GHook                        *hook
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_ref</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,GHook                        *hook
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_unref</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,GHook                        *hook
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_destroy</NAME>
+<RETURNS>gboolean  </RETURNS>
+GHookList              *hook_list,guint                         hook_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_destroy_link</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,GHook                        *hook
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_prepend</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,GHook                        *hook
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_insert_before</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,GHook                        *sibling,GHook                  *hook
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_insert_sorted</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,GHook                        *hook,GHookCompareFunc   func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_get</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list,guint                         hook_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_find</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list,gboolean              need_valids,GHookFindFunc               func,gpointer           data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_find_data</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list,gboolean              need_valids,gpointer            data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_find_func</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list,gboolean              need_valids,gpointer            func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_find_func_data</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list,gboolean              need_valids,gpointer            func,gpointer           data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_first_valid</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list,gboolean              may_be_in_call
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_next_valid</NAME>
+<RETURNS>GHook *</RETURNS>
+GHookList              *hook_list,GHook                        *hook,gboolean           may_be_in_call
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_compare_ids</NAME>
+<RETURNS>gint  </RETURNS>
+GHook                  *new_hook,GHook                 *sibling
+</FUNCTION>
+<MACRO>
+<NAME>g_hook_append</NAME>
+#define         g_hook_append( hook_list, hook )  \
+     g_hook_insert_before ((hook_list), NULL, (hook))
+</MACRO>
+<FUNCTION>
+<NAME>g_hook_list_invoke</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,gboolean              may_recurse
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_list_invoke_check</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,gboolean              may_recurse
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_list_marshal</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,gboolean              may_recurse,GHookMarshaller     marshaller,gpointer             data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_hook_list_marshal_check</NAME>
+<RETURNS>void  </RETURNS>
+GHookList              *hook_list,gboolean              may_recurse,GHookCheckMarshaller        marshaller,gpointer             data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_on_error_query</NAME>
+<RETURNS>void  </RETURNS>
+const gchar *prg_name
+</FUNCTION>
+<FUNCTION>
+<NAME>g_on_error_stack_trace</NAME>
+<RETURNS>void  </RETURNS>
+const gchar *prg_name
+</FUNCTION>
+<VARIABLE>
+<NAME>g_log_domain_glib</NAME>
+extern         const gchar             *g_log_domain_glib;
+</VARIABLE>
+<FUNCTION>
+<NAME>g_log_set_handler</NAME>
+<RETURNS>guint         </RETURNS>
+const gchar    *log_domain,GLogLevelFlags       log_levels,GLogFunc     log_func,gpointer       user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_log_remove_handler</NAME>
+<RETURNS>void  </RETURNS>
+const gchar    *log_domain,guint                handler_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_log_default_handler</NAME>
+<RETURNS>void  </RETURNS>
+const gchar    *log_domain,GLogLevelFlags       log_level,const gchar  *message,gpointer        unused_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_log</NAME>
+<RETURNS>void  </RETURNS>
+const gchar    *log_domain,GLogLevelFlags       log_level,const gchar  *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_logv</NAME>
+<RETURNS>void  </RETURNS>
+const gchar    *log_domain,GLogLevelFlags       log_level,const gchar  *format,va_list  args
+</FUNCTION>
+<FUNCTION>
+<NAME>g_log_set_fatal_mask</NAME>
+<RETURNS>GLogLevelFlags        </RETURNS>
+const gchar    *log_domain,GLogLevelFlags       fatal_mask
+</FUNCTION>
+<FUNCTION>
+<NAME>g_log_set_always_fatal</NAME>
+<RETURNS>GLogLevelFlags        </RETURNS>
+GLogLevelFlags  fatal_mask
+</FUNCTION>
+<MACRO>
+<NAME>G_LOG_DOMAIN</NAME>
+#define        G_LOG_DOMAIN    ((gchar*) 0)
+</MACRO>
+<MACRO>
+<NAME>g_error</NAME>
+#define        g_error(format, args...)        g_log (G_LOG_DOMAIN, \
+                                              G_LOG_LEVEL_ERROR, \
+                                              format, ##args)
+</MACRO>
+<MACRO>
+<NAME>g_message</NAME>
+#define        g_message(format, args...)      g_log (G_LOG_DOMAIN, \
+                                              G_LOG_LEVEL_MESSAGE, \
+                                              format, ##args)
+</MACRO>
+<MACRO>
+<NAME>g_warning</NAME>
+#define        g_warning(format, args...)      g_log (G_LOG_DOMAIN, \
+                                              G_LOG_LEVEL_WARNING, \
+                                              format, ##args)
+</MACRO>
+<USER_FUNCTION>
+<NAME>GPrintFunc</NAME>
+<RETURNS>void </RETURNS>
+const gchar    *string
+</USER_FUNCTION>
+<FUNCTION>
+<NAME>g_print</NAME>
+<RETURNS>void  </RETURNS>
+const gchar    *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_set_print_handler</NAME>
+<RETURNS>GPrintFunc    </RETURNS>
+GPrintFunc      func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_printerr</NAME>
+<RETURNS>void  </RETURNS>
+const gchar    *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_set_printerr_handler</NAME>
+<RETURNS>GPrintFunc    </RETURNS>
+GPrintFunc      func
+</FUNCTION>
+<USER_FUNCTION>
+<NAME>GErrorFunc</NAME>
+<RETURNS>void </RETURNS>
+const gchar *str
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GWarningFunc</NAME>
+<RETURNS>void </RETURNS>
+const gchar *str
+</USER_FUNCTION>
+<FUNCTION>
+<NAME>g_set_error_handler</NAME>
+<RETURNS>GErrorFunc  </RETURNS>
+GErrorFunc      func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_set_warning_handler</NAME>
+<RETURNS>GWarningFunc  </RETURNS>
+GWarningFunc func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_set_message_handler</NAME>
+<RETURNS>GPrintFunc  </RETURNS>
+GPrintFunc func
+</FUNCTION>
+<MACRO>
+<NAME>g_malloc</NAME>
+#define g_malloc(size)      ((gpointer) MALLOC (size))
+</MACRO>
+<MACRO>
+<NAME>g_malloc0</NAME>
+#define g_malloc0(size)             ((gpointer) CALLOC (char, size))
+</MACRO>
+<MACRO>
+<NAME>g_realloc</NAME>
+#define g_realloc(mem,size)  ((gpointer) REALLOC (mem, char, size))
+</MACRO>
+<MACRO>
+<NAME>g_free</NAME>
+#define g_free(mem)         FREE (mem)
+</MACRO>
+<FUNCTION>
+<NAME>g_malloc</NAME>
+<RETURNS>gpointer  </RETURNS>
+gulong   size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_malloc0</NAME>
+<RETURNS>gpointer  </RETURNS>
+gulong   size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_realloc</NAME>
+<RETURNS>gpointer  </RETURNS>
+gpointer  mem,gulong     size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_free</NAME>
+<RETURNS>void  </RETURNS>
+gpointer  mem
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_profile</NAME>
+<RETURNS>void  </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_check</NAME>
+<RETURNS>void  </RETURNS>
+gpointer  mem
+</FUNCTION>
+<FUNCTION>
+<NAME>g_allocator_new</NAME>
+<RETURNS>GAllocator *</RETURNS>
+const gchar  *name,guint         n_preallocs
+</FUNCTION>
+<FUNCTION>
+<NAME>g_allocator_free</NAME>
+<RETURNS>void  </RETURNS>
+GAllocator   *allocator
+</FUNCTION>
+<MACRO>
+<NAME>G_ALLOCATOR_LIST</NAME>
+#define        G_ALLOCATOR_LIST        (1)
+</MACRO>
+<MACRO>
+<NAME>G_ALLOCATOR_SLIST</NAME>
+#define        G_ALLOCATOR_SLIST       (2)
+</MACRO>
+<MACRO>
+<NAME>G_ALLOCATOR_NODE</NAME>
+#define        G_ALLOCATOR_NODE        (3)
+</MACRO>
+<MACRO>
+<NAME>G_ALLOC_ONLY</NAME>
+#define G_ALLOC_ONLY     1
+</MACRO>
+<MACRO>
+<NAME>G_ALLOC_AND_FREE</NAME>
+#define G_ALLOC_AND_FREE  2
+</MACRO>
+<FUNCTION>
+<NAME>g_mem_chunk_new</NAME>
+<RETURNS>GMemChunk *</RETURNS>
+gchar    *name,gint       atom_size,gulong        area_size,gint          type
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GMemChunk *mem_chunk
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_alloc</NAME>
+<RETURNS>gpointer  </RETURNS>
+GMemChunk *mem_chunk
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_alloc0</NAME>
+<RETURNS>gpointer  </RETURNS>
+GMemChunk *mem_chunk
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_free</NAME>
+<RETURNS>void  </RETURNS>
+GMemChunk *mem_chunk,gpointer   mem
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_clean</NAME>
+<RETURNS>void  </RETURNS>
+GMemChunk *mem_chunk
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_reset</NAME>
+<RETURNS>void  </RETURNS>
+GMemChunk *mem_chunk
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_print</NAME>
+<RETURNS>void  </RETURNS>
+GMemChunk *mem_chunk
+</FUNCTION>
+<FUNCTION>
+<NAME>g_mem_chunk_info</NAME>
+<RETURNS>void  </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_blow_chunks</NAME>
+<RETURNS>void  </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timer_new</NAME>
+<RETURNS>GTimer *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timer_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GTimer  *timer
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timer_start</NAME>
+<RETURNS>void  </RETURNS>
+GTimer  *timer
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timer_stop</NAME>
+<RETURNS>void  </RETURNS>
+GTimer  *timer
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timer_reset</NAME>
+<RETURNS>void  </RETURNS>
+GTimer  *timer
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timer_elapsed</NAME>
+<RETURNS>gdouble  </RETURNS>
+GTimer  *timer,gulong   *microseconds
+</FUNCTION>
+<MACRO>
+<NAME>G_STR_DELIMITERS</NAME>
+#define         G_STR_DELIMITERS       "_-|> <."
+</MACRO>
+<FUNCTION>
+<NAME>g_strdelimit</NAME>
+<RETURNS>gchar *</RETURNS>
+gchar       *string,const gchar *delimiters,gchar            new_delimiter
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strtod</NAME>
+<RETURNS>gdouble       </RETURNS>
+const gchar *nptr,gchar            **endptr
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strerror</NAME>
+<RETURNS>gchar *</RETURNS>
+gint         errnum
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strsignal</NAME>
+<RETURNS>gchar *</RETURNS>
+gint         signum
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strcasecmp</NAME>
+<RETURNS>gint  </RETURNS>
+const gchar *s1,const gchar *s2
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strncasecmp</NAME>
+<RETURNS>gint  </RETURNS>
+const gchar *s1,const gchar *s2,guint        n
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strdown</NAME>
+<RETURNS>void  </RETURNS>
+gchar       *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strup</NAME>
+<RETURNS>void  </RETURNS>
+gchar       *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strreverse</NAME>
+<RETURNS>void  </RETURNS>
+gchar       *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strchug</NAME>
+<RETURNS>gchar *</RETURNS>
+gchar        *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strchomp</NAME>
+<RETURNS>gchar *</RETURNS>
+gchar        *string
+</FUNCTION>
+<MACRO>
+<NAME>g_strstrip</NAME>
+#define g_strstrip( string )   g_strchomp (g_strchug (string))
+</MACRO>
+<FUNCTION>
+<NAME>g_strdup</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *str
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strdup_printf</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strdup_vprintf</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *format,va_list      args
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strndup</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *str,guint       n
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strnfill</NAME>
+<RETURNS>gchar *</RETURNS>
+guint        length,gchar            fill_char
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strconcat</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *string1,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strjoin</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar  *separator,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strescape</NAME>
+<RETURNS>gchar *</RETURNS>
+gchar        *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_memdup</NAME>
+<RETURNS>gpointer  </RETURNS>
+gconstpointer mem,guint               byte_size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strsplit</NAME>
+<RETURNS>gchar **</RETURNS>
+const gchar  *string,const gchar  *delimiter,gint          max_tokens
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strjoinv</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar  *separator,gchar       **str_array
+</FUNCTION>
+<FUNCTION>
+<NAME>g_strfreev</NAME>
+<RETURNS>void  </RETURNS>
+gchar       **str_array
+</FUNCTION>
+<FUNCTION>
+<NAME>g_printf_string_upper_bound</NAME>
+<RETURNS>guint         </RETURNS>
+const gchar* format,va_list      args
+</FUNCTION>
+<FUNCTION>
+<NAME>g_get_user_name</NAME>
+<RETURNS>gchar *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_get_real_name</NAME>
+<RETURNS>gchar *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_get_home_dir</NAME>
+<RETURNS>gchar *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_get_tmp_dir</NAME>
+<RETURNS>gchar *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_get_prgname</NAME>
+<RETURNS>gchar *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_set_prgname</NAME>
+<RETURNS>void  </RETURNS>
+const gchar *prgname
+</FUNCTION>
+<FUNCTION>
+<NAME>g_parse_debug_string</NAME>
+<RETURNS>guint         </RETURNS>
+const gchar *string,GDebugKey   *keys,guint          nkeys
+</FUNCTION>
+<FUNCTION>
+<NAME>g_snprintf</NAME>
+<RETURNS>gint  </RETURNS>
+gchar       *string,gulong           n,gchar const *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_vsnprintf</NAME>
+<RETURNS>gint  </RETURNS>
+gchar       *string,gulong           n,gchar const *format,va_list      args
+</FUNCTION>
+<FUNCTION>
+<NAME>g_basename</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *file_name
+</FUNCTION>
+<FUNCTION>
+<NAME>g_path_is_absolute</NAME>
+<RETURNS>gboolean  </RETURNS>
+const gchar *file_name
+</FUNCTION>
+<FUNCTION>
+<NAME>g_path_skip_root</NAME>
+<RETURNS>gchar *</RETURNS>
+gchar       *file_name
+</FUNCTION>
+<FUNCTION>
+<NAME>g_dirname</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *file_name
+</FUNCTION>
+<FUNCTION>
+<NAME>g_get_current_dir</NAME>
+<RETURNS>gchar *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_getenv</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar *variable
+</FUNCTION>
+<FUNCTION>
+<NAME>g_atexit</NAME>
+<RETURNS>void  </RETURNS>
+GVoidFunc    func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_bit_nth_lsf</NAME>
+<RETURNS>gint  </RETURNS>
+guint32 mask,gint    nth_bit
+</FUNCTION>
+<FUNCTION>
+<NAME>g_bit_nth_msf</NAME>
+<RETURNS>gint  </RETURNS>
+guint32 mask,gint    nth_bit
+</FUNCTION>
+<FUNCTION>
+<NAME>g_bit_storage</NAME>
+<RETURNS>guint         </RETURNS>
+guint number
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_chunk_new</NAME>
+<RETURNS>GStringChunk *</RETURNS>
+gint size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_chunk_free</NAME>
+<RETURNS>void  </RETURNS>
+GStringChunk *chunk
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_chunk_insert</NAME>
+<RETURNS>gchar *</RETURNS>
+GStringChunk *chunk,const gchar         *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_chunk_insert_const</NAME>
+<RETURNS>gchar *</RETURNS>
+GStringChunk *chunk,const gchar         *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_new</NAME>
+<RETURNS>GString *</RETURNS>
+const gchar *init
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_sized_new</NAME>
+<RETURNS>GString *</RETURNS>
+guint    dfl_size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_free</NAME>
+<RETURNS>void  </RETURNS>
+GString         *string,gint     free_segment
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_assign</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *lval,const gchar *rval
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_truncate</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,gint     len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_append</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,const gchar *val
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_append_c</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,gchar    c
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_prepend</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,const gchar *val
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_prepend_c</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,gchar    c
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_insert</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,gint     pos,const gchar *val
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_insert_c</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,gint     pos,gchar       c
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_erase</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string,gint     pos,gint        len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_down</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_up</NAME>
+<RETURNS>GString *</RETURNS>
+GString         *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_sprintf</NAME>
+<RETURNS>void  </RETURNS>
+GString         *string,const gchar *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_string_sprintfa</NAME>
+<RETURNS>void  </RETURNS>
+GString         *string,const gchar *format,...
+</FUNCTION>
+<MACRO>
+<NAME>g_array_append_val</NAME>
+#define g_array_append_val(a,v)          g_array_append_vals (a, &v, 1)
+</MACRO>
+<MACRO>
+<NAME>g_array_prepend_val</NAME>
+#define g_array_prepend_val(a,v)  g_array_prepend_vals (a, &v, 1)
+</MACRO>
+<MACRO>
+<NAME>g_array_insert_val</NAME>
+#define g_array_insert_val(a,i,v) g_array_insert_vals (a, i, &v, 1)
+</MACRO>
+<MACRO>
+<NAME>g_array_index</NAME>
+#define g_array_index(a,t,i)      (((t*) (a)->data) [(i)])
+</MACRO>
+<FUNCTION>
+<NAME>g_array_new</NAME>
+<RETURNS>GArray *</RETURNS>
+gboolean           zero_terminated,gboolean        clear,guint     element_size
+</FUNCTION>
+<FUNCTION>
+<NAME>g_array_free</NAME>
+<RETURNS>void  </RETURNS>
+GArray    *array,gboolean          free_segment
+</FUNCTION>
+<FUNCTION>
+<NAME>g_array_append_vals</NAME>
+<RETURNS>GArray *</RETURNS>
+GArray    *array,gconstpointer    data,guint       len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_array_prepend_vals</NAME>
+<RETURNS>GArray *</RETURNS>
+GArray    *array,gconstpointer    data,guint       len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_array_insert_vals</NAME>
+<RETURNS>GArray *</RETURNS>
+GArray          *array,guint            index,gconstpointer    data,guint            len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_array_set_size</NAME>
+<RETURNS>GArray *</RETURNS>
+GArray    *array,guint     length
+</FUNCTION>
+<FUNCTION>
+<NAME>g_array_remove_index</NAME>
+<RETURNS>GArray *</RETURNS>
+GArray    *array,guint     index
+</FUNCTION>
+<FUNCTION>
+<NAME>g_array_remove_index_fast</NAME>
+<RETURNS>GArray *</RETURNS>
+GArray    *array,guint     index
+</FUNCTION>
+<MACRO>
+<NAME>g_ptr_array_index</NAME>
+#define            g_ptr_array_index(array,index) (array->pdata)[index]
+</MACRO>
+<FUNCTION>
+<NAME>g_ptr_array_new</NAME>
+<RETURNS>GPtrArray *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_ptr_array_free</NAME>
+<RETURNS>void  </RETURNS>
+GPtrArray      *array,gboolean  free_seg
+</FUNCTION>
+<FUNCTION>
+<NAME>g_ptr_array_set_size</NAME>
+<RETURNS>void  </RETURNS>
+GPtrArray      *array,gint      length
+</FUNCTION>
+<FUNCTION>
+<NAME>g_ptr_array_remove_index</NAME>
+<RETURNS>gpointer  </RETURNS>
+GPtrArray      *array,guint     index
+</FUNCTION>
+<FUNCTION>
+<NAME>g_ptr_array_remove_index_fast</NAME>
+<RETURNS>gpointer  </RETURNS>
+GPtrArray      *array,guint     index
+</FUNCTION>
+<FUNCTION>
+<NAME>g_ptr_array_remove</NAME>
+<RETURNS>gboolean  </RETURNS>
+GPtrArray      *array,gpointer  data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_ptr_array_remove_fast</NAME>
+<RETURNS>gboolean  </RETURNS>
+GPtrArray      *array,gpointer  data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_ptr_array_add</NAME>
+<RETURNS>void  </RETURNS>
+GPtrArray      *array,gpointer  data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_byte_array_new</NAME>
+<RETURNS>GByteArray *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_byte_array_free</NAME>
+<RETURNS>void  </RETURNS>
+GByteArray      *array,gboolean          free_segment
+</FUNCTION>
+<FUNCTION>
+<NAME>g_byte_array_append</NAME>
+<RETURNS>GByteArray *</RETURNS>
+GByteArray      *array,const guint8 *data,guint          len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_byte_array_prepend</NAME>
+<RETURNS>GByteArray *</RETURNS>
+GByteArray      *array,const guint8 *data,guint          len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_byte_array_set_size</NAME>
+<RETURNS>GByteArray *</RETURNS>
+GByteArray      *array,guint     length
+</FUNCTION>
+<FUNCTION>
+<NAME>g_byte_array_remove_index</NAME>
+<RETURNS>GByteArray *</RETURNS>
+GByteArray      *array,guint     index
+</FUNCTION>
+<FUNCTION>
+<NAME>g_byte_array_remove_index_fast</NAME>
+<RETURNS>GByteArray *</RETURNS>
+GByteArray      *array,guint     index
+</FUNCTION>
+<FUNCTION>
+<NAME>g_str_equal</NAME>
+<RETURNS>gint  </RETURNS>
+gconstpointer   v,gconstpointer   v2
+</FUNCTION>
+<FUNCTION>
+<NAME>g_str_hash</NAME>
+<RETURNS>guint  </RETURNS>
+gconstpointer   v
+</FUNCTION>
+<FUNCTION>
+<NAME>g_int_equal</NAME>
+<RETURNS>gint  </RETURNS>
+gconstpointer   v,gconstpointer   v2
+</FUNCTION>
+<FUNCTION>
+<NAME>g_int_hash</NAME>
+<RETURNS>guint  </RETURNS>
+gconstpointer   v
+</FUNCTION>
+<FUNCTION>
+<NAME>g_direct_hash</NAME>
+<RETURNS>guint  </RETURNS>
+gconstpointer v
+</FUNCTION>
+<FUNCTION>
+<NAME>g_direct_equal</NAME>
+<RETURNS>gint  </RETURNS>
+gconstpointer v,gconstpointer v2
+</FUNCTION>
+<FUNCTION>
+<NAME>g_quark_try_string</NAME>
+<RETURNS>GQuark        </RETURNS>
+const gchar    *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_quark_from_static_string</NAME>
+<RETURNS>GQuark        </RETURNS>
+const gchar    *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_quark_from_string</NAME>
+<RETURNS>GQuark        </RETURNS>
+const gchar    *string
+</FUNCTION>
+<FUNCTION>
+<NAME>g_quark_to_string</NAME>
+<RETURNS>gchar *</RETURNS>
+GQuark          quark
+</FUNCTION>
+<FUNCTION>
+<NAME>g_datalist_init</NAME>
+<RETURNS>void  </RETURNS>
+GData           **datalist
+</FUNCTION>
+<FUNCTION>
+<NAME>g_datalist_clear</NAME>
+<RETURNS>void  </RETURNS>
+GData           **datalist
+</FUNCTION>
+<FUNCTION>
+<NAME>g_datalist_id_get_data</NAME>
+<RETURNS>gpointer  </RETURNS>
+GData           **datalist,GQuark         key_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_datalist_id_set_data_full</NAME>
+<RETURNS>void  </RETURNS>
+GData           **datalist,GQuark         key_id,gpointer         data,GDestroyNotify   destroy_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_datalist_id_remove_no_notify</NAME>
+<RETURNS>void  </RETURNS>
+GData           **datalist,GQuark         key_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_datalist_foreach</NAME>
+<RETURNS>void  </RETURNS>
+GData           **datalist,GDataForeachFunc func,gpointer         user_data
+</FUNCTION>
+<MACRO>
+<NAME>g_datalist_id_set_data</NAME>
+#define          g_datalist_id_set_data(dl, q, d)      \
+     g_datalist_id_set_data_full ((dl), (q), (d), NULL)
+</MACRO>
+<MACRO>
+<NAME>g_datalist_id_remove_data</NAME>
+#define          g_datalist_id_remove_data(dl, q)      \
+     g_datalist_id_set_data ((dl), (q), NULL)
+</MACRO>
+<MACRO>
+<NAME>g_datalist_get_data</NAME>
+#define          g_datalist_get_data(dl, k)            \
+     (g_datalist_id_get_data ((dl), g_quark_try_string (k)))
+</MACRO>
+<MACRO>
+<NAME>g_datalist_set_data_full</NAME>
+#define          g_datalist_set_data_full(dl, k, d, f) \
+     g_datalist_id_set_data_full ((dl), g_quark_from_string (k), (d), (f))
+</MACRO>
+<MACRO>
+<NAME>g_datalist_remove_no_notify</NAME>
+#define          g_datalist_remove_no_notify(dl, k)    \
+     g_datalist_id_remove_no_notify ((dl), g_quark_try_string (k))
+</MACRO>
+<MACRO>
+<NAME>g_datalist_set_data</NAME>
+#define          g_datalist_set_data(dl, k, d)         \
+     g_datalist_set_data_full ((dl), (k), (d), NULL)
+</MACRO>
+<MACRO>
+<NAME>g_datalist_remove_data</NAME>
+#define          g_datalist_remove_data(dl, k)         \
+     g_datalist_id_set_data ((dl), g_quark_try_string (k), NULL)
+</MACRO>
+<FUNCTION>
+<NAME>g_dataset_destroy</NAME>
+<RETURNS>void  </RETURNS>
+gconstpointer    dataset_location
+</FUNCTION>
+<FUNCTION>
+<NAME>g_dataset_id_get_data</NAME>
+<RETURNS>gpointer  </RETURNS>
+gconstpointer    dataset_location,GQuark                 key_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_dataset_id_set_data_full</NAME>
+<RETURNS>void  </RETURNS>
+gconstpointer    dataset_location,GQuark                 key_id,gpointer         data,GDestroyNotify     destroy_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_dataset_id_remove_no_notify</NAME>
+<RETURNS>void  </RETURNS>
+gconstpointer    dataset_location,GQuark                 key_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_dataset_foreach</NAME>
+<RETURNS>void  </RETURNS>
+gconstpointer    dataset_location,GDataForeachFunc func,gpointer         user_data
+</FUNCTION>
+<MACRO>
+<NAME>g_dataset_id_set_data</NAME>
+#define          g_dataset_id_set_data(l, k, d)        \
+     g_dataset_id_set_data_full ((l), (k), (d), NULL)
+</MACRO>
+<MACRO>
+<NAME>g_dataset_id_remove_data</NAME>
+#define          g_dataset_id_remove_data(l, k)        \
+     g_dataset_id_set_data ((l), (k), NULL)
+</MACRO>
+<MACRO>
+<NAME>g_dataset_get_data</NAME>
+#define          g_dataset_get_data(l, k)              \
+     (g_dataset_id_get_data ((l), g_quark_try_string (k)))
+</MACRO>
+<MACRO>
+<NAME>g_dataset_set_data_full</NAME>
+#define          g_dataset_set_data_full(l, k, d, f)   \
+     g_dataset_id_set_data_full ((l), g_quark_from_string (k), (d), (f))
+</MACRO>
+<MACRO>
+<NAME>g_dataset_remove_no_notify</NAME>
+#define          g_dataset_remove_no_notify(l, k)      \
+     g_dataset_id_remove_no_notify ((l), g_quark_try_string (k))
+</MACRO>
+<MACRO>
+<NAME>g_dataset_set_data</NAME>
+#define          g_dataset_set_data(l, k, d)           \
+     g_dataset_set_data_full ((l), (k), (d), NULL)
+</MACRO>
+<MACRO>
+<NAME>g_dataset_remove_data</NAME>
+#define          g_dataset_remove_data(l, k)           \
+     g_dataset_id_set_data ((l), g_quark_try_string (k), NULL)
+</MACRO>
+<MACRO>
+<NAME>G_CSET_A_2_Z</NAME>
+#define G_CSET_A_2_Z   "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+</MACRO>
+<MACRO>
+<NAME>G_CSET_a_2_z</NAME>
+#define G_CSET_a_2_z   "abcdefghijklmnopqrstuvwxyz"
+</MACRO>
+<MACRO>
+<NAME>G_CSET_LATINC</NAME>
+#define G_CSET_LATINC  "\300\301\302\303\304\305\306"\
+                       "\307\310\311\312\313\314\315\316\317\320"\
+                       "\321\322\323\324\325\326"\
+                       "\330\331\332\333\334\335\336"
+</MACRO>
+<MACRO>
+<NAME>G_CSET_LATINS</NAME>
+#define G_CSET_LATINS  "\337\340\341\342\343\344\345\346"\
+                       "\347\350\351\352\353\354\355\356\357\360"\
+                       "\361\362\363\364\365\366"\
+                       "\370\371\372\373\374\375\376\377"
+</MACRO>
+<ENUM>
+<NAME>GErrorType</NAME>
+typedef enum
+{
+  G_ERR_UNKNOWN,
+  G_ERR_UNEXP_EOF,
+  G_ERR_UNEXP_EOF_IN_STRING,
+  G_ERR_UNEXP_EOF_IN_COMMENT,
+  G_ERR_NON_DIGIT_IN_CONST,
+  G_ERR_DIGIT_RADIX,
+  G_ERR_FLOAT_RADIX,
+  G_ERR_FLOAT_MALFORMED
+} GErrorType;
+</ENUM>
+<ENUM>
+<NAME>GTokenType</NAME>
+typedef enum
+{
+  G_TOKEN_EOF                  =   0,
+  
+  G_TOKEN_LEFT_PAREN           = '(',
+  G_TOKEN_RIGHT_PAREN          = ')',
+  G_TOKEN_LEFT_CURLY           = '{',
+  G_TOKEN_RIGHT_CURLY          = '}',
+  G_TOKEN_LEFT_BRACE           = '[',
+  G_TOKEN_RIGHT_BRACE          = ']',
+  G_TOKEN_EQUAL_SIGN           = '=',
+  G_TOKEN_COMMA                        = ',',
+  
+  G_TOKEN_NONE                 = 256,
+  
+  G_TOKEN_ERROR,
+  
+  G_TOKEN_CHAR,
+  G_TOKEN_BINARY,
+  G_TOKEN_OCTAL,
+  G_TOKEN_INT,
+  G_TOKEN_HEX,
+  G_TOKEN_FLOAT,
+  G_TOKEN_STRING,
+  
+  G_TOKEN_SYMBOL,
+  G_TOKEN_IDENTIFIER,
+  G_TOKEN_IDENTIFIER_NULL,
+  
+  G_TOKEN_COMMENT_SINGLE,
+  G_TOKEN_COMMENT_MULTI,
+  G_TOKEN_LAST
+} GTokenType;
+</ENUM>
+<UNION>
+<NAME>GTokenValue</NAME>
+union GTokenValue
+{
+  gpointer     v_symbol;
+  gchar                *v_identifier;
+  gulong       v_binary;
+  gulong       v_octal;
+  gulong       v_int;
+  gdouble      v_float;
+  gulong       v_hex;
+  gchar                *v_string;
+  gchar                *v_comment;
+  guchar       v_char;
+  guint                v_error;
+};
+</UNION>
+<STRUCT>
+<NAME>GScannerConfig</NAME>
+struct GScannerConfig
+{
+  /* Character sets
+   */
+  gchar                *cset_skip_characters;          /* default: " \t\n" */
+  gchar                *cset_identifier_first;
+  gchar                *cset_identifier_nth;
+  gchar                *cpair_comment_single;          /* default: "#\n" */
+  
+  /* Should symbol lookup work case sensitive?
+   */
+  guint                case_sensitive : 1;
+  
+  /* Boolean values to be adjusted "on the fly"
+   * to configure scanning behaviour.
+   */
+  guint                skip_comment_multi : 1;         /* C like comment */
+  guint                skip_comment_single : 1;        /* single line comment */
+  guint                scan_comment_multi : 1;         /* scan multi line comments? */
+  guint                scan_identifier : 1;
+  guint                scan_identifier_1char : 1;
+  guint                scan_identifier_NULL : 1;
+  guint                scan_symbols : 1;
+  guint                scan_binary : 1;
+  guint                scan_octal : 1;
+  guint                scan_float : 1;
+  guint                scan_hex : 1;                   /* `0x0ff0' */
+  guint                scan_hex_dollar : 1;            /* `$0ff0' */
+  guint                scan_string_sq : 1;             /* string: 'anything' */
+  guint                scan_string_dq : 1;             /* string: "\\-escapes!\n" */
+  guint                numbers_2_int : 1;              /* bin, octal, hex => int */
+  guint                int_2_float : 1;                /* int => G_TOKEN_FLOAT? */
+  guint                identifier_2_string : 1;
+  guint                char_2_token : 1;               /* return G_TOKEN_CHAR? */
+  guint                symbol_2_token : 1;
+  guint                scope_0_fallback : 1;           /* try scope 0 on lookups? */
+};
+</STRUCT>
+<STRUCT>
+<NAME>GScanner</NAME>
+struct GScanner
+{
+  /* unused fields */
+  gpointer             user_data;
+  guint                        max_parse_errors;
+  
+  /* g_scanner_error() increments this field */
+  guint                        parse_errors;
+  
+  /* name of input stream, featured by the default message handler */
+  const gchar          *input_name;
+  
+  /* data pointer for derived structures */
+  gpointer             derived_data;
+  
+  /* link into the scanner configuration */
+  GScannerConfig       *config;
+  
+  /* fields filled in after g_scanner_get_next_token() */
+  GTokenType           token;
+  GTokenValue          value;
+  guint                        line;
+  guint                        position;
+  
+  /* fields filled in after g_scanner_peek_next_token() */
+  GTokenType           next_token;
+  GTokenValue          next_value;
+  guint                        next_line;
+  guint                        next_position;
+  
+  /* to be considered private */
+  GHashTable           *symbol_table;
+  gint                 input_fd;
+  const gchar          *text;
+  const gchar          *text_end;
+  gchar                        *buffer;
+  guint                        scope_id;
+  
+  /* handler function for _warn and _error */
+  GScannerMsgFunc      msg_handler;
+};
+</STRUCT>
+<FUNCTION>
+<NAME>g_scanner_new</NAME>
+<RETURNS>GScanner *</RETURNS>
+GScannerConfig *config_templ
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_input_file</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,gint           input_fd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_sync_file_offset</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_input_text</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,const  gchar   *text,guint             text_len
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_get_next_token</NAME>
+<RETURNS>GTokenType    </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_peek_next_token</NAME>
+<RETURNS>GTokenType    </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_cur_token</NAME>
+<RETURNS>GTokenType    </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_cur_value</NAME>
+<RETURNS>GTokenValue   </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_cur_line</NAME>
+<RETURNS>guint         </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_cur_position</NAME>
+<RETURNS>guint         </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_eof</NAME>
+<RETURNS>gboolean      </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_set_scope</NAME>
+<RETURNS>guint         </RETURNS>
+GScanner       *scanner,guint           scope_id
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_scope_add_symbol</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,guint           scope_id,const gchar   *symbol,gpointer        value
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_scope_remove_symbol</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,guint           scope_id,const gchar   *symbol
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_scope_lookup_symbol</NAME>
+<RETURNS>gpointer      </RETURNS>
+GScanner       *scanner,guint           scope_id,const gchar   *symbol
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_scope_foreach_symbol</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,guint           scope_id,GHFunc                 func,gpointer   user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_lookup_symbol</NAME>
+<RETURNS>gpointer      </RETURNS>
+GScanner       *scanner,const gchar    *symbol
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_freeze_symbol_table</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_thaw_symbol_table</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_unexp_token</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,GTokenType     expected_token,const gchar      *identifier_spec,const gchar    *symbol_spec,const gchar        *symbol_name,const gchar        *message,gint            is_error
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_error</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,const gchar    *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_warn</NAME>
+<RETURNS>void  </RETURNS>
+GScanner       *scanner,const gchar    *format,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_scanner_stat_mode</NAME>
+<RETURNS>gint  </RETURNS>
+const gchar    *filename
+</FUNCTION>
+<MACRO>
+<NAME>g_scanner_add_symbol</NAME>
+#define                g_scanner_add_symbol( scanner, symbol, value )  G_STMT_START { \
+  g_scanner_scope_add_symbol ((scanner), 0, (symbol), (value)); \
+} G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_scanner_remove_symbol</NAME>
+#define                g_scanner_remove_symbol( scanner, symbol )      G_STMT_START { \
+  g_scanner_scope_remove_symbol ((scanner), 0, (symbol)); \
+} G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>g_scanner_foreach_symbol</NAME>
+#define                g_scanner_foreach_symbol( scanner, func, data ) G_STMT_START { \
+  g_scanner_scope_foreach_symbol ((scanner), 0, (func), (data)); \
+} G_STMT_END
+</MACRO>
+<STRUCT>
+<NAME>GCompletion</NAME>
+struct GCompletion
+{
+  GList* items;
+  GCompletionFunc func;
+  
+  gchar* prefix;
+  GList* cache;
+};
+</STRUCT>
+<FUNCTION>
+<NAME>g_completion_new</NAME>
+<RETURNS>GCompletion *</RETURNS>
+GCompletionFunc func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_completion_add_items</NAME>
+<RETURNS>void  </RETURNS>
+GCompletion*   cmp,GList*              items
+</FUNCTION>
+<FUNCTION>
+<NAME>g_completion_remove_items</NAME>
+<RETURNS>void  </RETURNS>
+GCompletion*   cmp,GList*              items
+</FUNCTION>
+<FUNCTION>
+<NAME>g_completion_clear_items</NAME>
+<RETURNS>void  </RETURNS>
+GCompletion*   cmp
+</FUNCTION>
+<FUNCTION>
+<NAME>g_completion_complete</NAME>
+<RETURNS>GList *</RETURNS>
+GCompletion*   cmp,gchar*              prefix,gchar**          new_prefix
+</FUNCTION>
+<FUNCTION>
+<NAME>g_completion_free</NAME>
+<RETURNS>void  </RETURNS>
+GCompletion*   cmp
+</FUNCTION>
+<TYPEDEF>
+<NAME>GDateYear</NAME>
+typedef guint16 GDateYear;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>GDateDay</NAME>
+typedef guint8  GDateDay;   /* day of the month */
+</TYPEDEF>
+<STRUCT>
+<NAME>GDate</NAME>
+</STRUCT>
+<ENUM>
+<NAME>GDateDMY</NAME>
+typedef enum
+{
+  G_DATE_DAY   = 0,
+  G_DATE_MONTH = 1,
+  G_DATE_YEAR  = 2
+} GDateDMY;
+</ENUM>
+<ENUM>
+<NAME>GDateWeekday</NAME>
+typedef enum
+{
+  G_DATE_BAD_WEEKDAY  = 0,
+  G_DATE_MONDAY       = 1,
+  G_DATE_TUESDAY      = 2,
+  G_DATE_WEDNESDAY    = 3,
+  G_DATE_THURSDAY     = 4,
+  G_DATE_FRIDAY       = 5,
+  G_DATE_SATURDAY     = 6,
+  G_DATE_SUNDAY       = 7
+} GDateWeekday;
+</ENUM>
+<ENUM>
+<NAME>GDateMonth</NAME>
+typedef enum
+{
+  G_DATE_BAD_MONTH = 0,
+  G_DATE_JANUARY   = 1,
+  G_DATE_FEBRUARY  = 2,
+  G_DATE_MARCH     = 3,
+  G_DATE_APRIL     = 4,
+  G_DATE_MAY       = 5,
+  G_DATE_JUNE      = 6,
+  G_DATE_JULY      = 7,
+  G_DATE_AUGUST    = 8,
+  G_DATE_SEPTEMBER = 9,
+  G_DATE_OCTOBER   = 10,
+  G_DATE_NOVEMBER  = 11,
+  G_DATE_DECEMBER  = 12
+} GDateMonth;
+</ENUM>
+<MACRO>
+<NAME>G_DATE_BAD_JULIAN</NAME>
+#define G_DATE_BAD_JULIAN 0U
+</MACRO>
+<MACRO>
+<NAME>G_DATE_BAD_DAY</NAME>
+#define G_DATE_BAD_DAY    0U
+</MACRO>
+<MACRO>
+<NAME>G_DATE_BAD_YEAR</NAME>
+#define G_DATE_BAD_YEAR   0U
+</MACRO>
+<STRUCT>
+<NAME>GDate</NAME>
+struct GDate
+{ 
+  guint julian_days : 32; /* julian days representation - we use a
+                           *  bitfield hoping that 64 bit platforms
+                           *  will pack this whole struct in one big
+                           *  int 
+                           */
+
+  guint julian : 1;    /* julian is valid */
+  guint dmy    : 1;    /* dmy is valid */
+
+  /* DMY representation */
+  guint day    : 6;  
+  guint month  : 4; 
+  guint year   : 16; 
+};
+</STRUCT>
+<FUNCTION>
+<NAME>g_date_new</NAME>
+<RETURNS>GDate *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_new_dmy</NAME>
+<RETURNS>GDate *</RETURNS>
+GDateDay     day,GDateMonth   month,GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_new_julian</NAME>
+<RETURNS>GDate *</RETURNS>
+guint32      julian_day
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_free</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_valid</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_valid_day</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDateDay     day
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_valid_month</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDateMonth   month
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_valid_year</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_valid_weekday</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDateWeekday weekday
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_valid_julian</NAME>
+<RETURNS>gboolean  </RETURNS>
+guint32      julian_date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_valid_dmy</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDateDay     day,GDateMonth   month,GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_weekday</NAME>
+<RETURNS>GDateWeekday  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_month</NAME>
+<RETURNS>GDateMonth  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_year</NAME>
+<RETURNS>GDateYear  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_day</NAME>
+<RETURNS>GDateDay  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_julian</NAME>
+<RETURNS>guint32  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_day_of_year</NAME>
+<RETURNS>guint  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_monday_week_of_year</NAME>
+<RETURNS>guint  </RETURNS>
+GDate      *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_sunday_week_of_year</NAME>
+<RETURNS>guint  </RETURNS>
+GDate      *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_clear</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint        n_dates
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_set_parse</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,const gchar *str
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_set_time</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,GTime        time
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_set_month</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,GDateMonth   month
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_set_day</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,GDateDay     day
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_set_year</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_set_dmy</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,GDateDay     day,GDateMonth   month,GDateYear    y
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_set_julian</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint32      julian_date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_is_first_of_month</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_is_last_of_month</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_add_days</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint        n_days
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_subtract_days</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint        n_days
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_add_months</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint        n_months
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_subtract_months</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint        n_months
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_add_years</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint        n_years
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_subtract_years</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,guint        n_years
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_is_leap_year</NAME>
+<RETURNS>gboolean  </RETURNS>
+GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_days_in_month</NAME>
+<RETURNS>guint8  </RETURNS>
+GDateMonth   month,GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_monday_weeks_in_year</NAME>
+<RETURNS>guint8  </RETURNS>
+GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_sunday_weeks_in_year</NAME>
+<RETURNS>guint8  </RETURNS>
+GDateYear    year
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_compare</NAME>
+<RETURNS>gint  </RETURNS>
+GDate       *lhs,GDate       *rhs
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_to_struct_tm</NAME>
+<RETURNS>void  </RETURNS>
+GDate       *date,struct tm   *tm
+</FUNCTION>
+<FUNCTION>
+<NAME>g_date_strftime</NAME>
+<RETURNS>gsize  </RETURNS>
+gchar       *s,gsize        slen,const gchar *format,GDate       *date
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_new</NAME>
+<RETURNS>GRelation *</RETURNS>
+gint       fields
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GRelation   *relation
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_index</NAME>
+<RETURNS>void  </RETURNS>
+GRelation   *relation,gint         field,GHashFunc    hash_func,GCompareFunc key_compare_func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_insert</NAME>
+<RETURNS>void  </RETURNS>
+GRelation   *relation,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_delete</NAME>
+<RETURNS>gint  </RETURNS>
+GRelation   *relation,gconstpointer  key,gint      field
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_select</NAME>
+<RETURNS>GTuples *</RETURNS>
+GRelation   *relation,gconstpointer  key,gint      field
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_count</NAME>
+<RETURNS>gint  </RETURNS>
+GRelation   *relation,gconstpointer  key,gint      field
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_exists</NAME>
+<RETURNS>gboolean  </RETURNS>
+GRelation   *relation,...
+</FUNCTION>
+<FUNCTION>
+<NAME>g_relation_print</NAME>
+<RETURNS>void  </RETURNS>
+GRelation   *relation
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tuples_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GTuples           *tuples
+</FUNCTION>
+<FUNCTION>
+<NAME>g_tuples_index</NAME>
+<RETURNS>gpointer  </RETURNS>
+GTuples           *tuples,gint     index,gint      field
+</FUNCTION>
+<FUNCTION>
+<NAME>g_spaced_primes_closest</NAME>
+<RETURNS>guint         </RETURNS>
+guint num
+</FUNCTION>
+<STRUCT>
+<NAME>GIOFuncs</NAME>
+</STRUCT>
+<ENUM>
+<NAME>GIOError</NAME>
+typedef enum
+{
+  G_IO_ERROR_NONE,
+  G_IO_ERROR_AGAIN,
+  G_IO_ERROR_INVAL,
+  G_IO_ERROR_UNKNOWN
+} GIOError;
+</ENUM>
+<ENUM>
+<NAME>GSeekType</NAME>
+typedef enum
+{
+  G_SEEK_CUR,
+  G_SEEK_SET,
+  G_SEEK_END
+} GSeekType;
+</ENUM>
+<ENUM>
+<NAME>GIOCondition</NAME>
+typedef enum
+{
+  G_IO_IN      GLIB_SYSDEF_POLLIN,
+  G_IO_OUT     GLIB_SYSDEF_POLLOUT,
+  G_IO_PRI     GLIB_SYSDEF_POLLPRI,
+  G_IO_ERR     GLIB_SYSDEF_POLLERR,
+  G_IO_HUP     GLIB_SYSDEF_POLLHUP,
+  G_IO_NVAL    GLIB_SYSDEF_POLLNVAL
+} GIOCondition;
+</ENUM>
+<STRUCT>
+<NAME>GIOChannel</NAME>
+struct GIOChannel
+{
+  guint channel_flags;
+  guint ref_count;
+  GIOFuncs *funcs;
+};
+</STRUCT>
+<USER_FUNCTION>
+<NAME>GIOFunc</NAME>
+<RETURNS>gboolean </RETURNS>
+GIOChannel   *source,
+                            GIOCondition  condition,
+                            gpointer      data
+</USER_FUNCTION>
+<STRUCT>
+<NAME>GIOFuncs</NAME>
+struct GIOFuncs
+{
+  GIOError (*io_read)   (GIOChannel    *channel, 
+                        gchar          *buf, 
+                        guint           count,
+                        guint          *bytes_read);
+  GIOError (*io_write)  (GIOChannel    *channel, 
+                        gchar          *buf, 
+                        guint           count,
+                        guint          *bytes_written);
+  GIOError (*io_seek)   (GIOChannel    *channel, 
+                        gint            offset, 
+                        GSeekType       type);
+  void (*io_close)      (GIOChannel    *channel);
+  guint (*io_add_watch) (GIOChannel     *channel,
+                        gint            priority,
+                        GIOCondition    condition,
+                        GIOFunc         func,
+                        gpointer        user_data,
+                        GDestroyNotify  notify);
+  void (*io_free)       (GIOChannel    *channel);
+};
+</STRUCT>
+<FUNCTION>
+<NAME>g_io_channel_init</NAME>
+<RETURNS>void  </RETURNS>
+GIOChannel    *channel
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_ref</NAME>
+<RETURNS>void  </RETURNS>
+GIOChannel    *channel
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_unref</NAME>
+<RETURNS>void  </RETURNS>
+GIOChannel    *channel
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_read</NAME>
+<RETURNS>GIOError  </RETURNS>
+GIOChannel    *channel,gchar         *buf,guint          count,guint         *bytes_read
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_write</NAME>
+<RETURNS>GIOError  </RETURNS>
+GIOChannel    *channel,gchar         *buf,guint          count,guint         *bytes_written
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_seek</NAME>
+<RETURNS>GIOError  </RETURNS>
+GIOChannel    *channel,gint           offset,GSeekType      type
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_close</NAME>
+<RETURNS>void  </RETURNS>
+GIOChannel    *channel
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_add_watch_full</NAME>
+<RETURNS>guint  </RETURNS>
+GIOChannel    *channel,gint           priority,GIOCondition   condition,GIOFunc        func,gpointer       user_data,GDestroyNotify notify
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_add_watch</NAME>
+<RETURNS>guint  </RETURNS>
+GIOChannel    *channel,GIOCondition   condition,GIOFunc        func,gpointer       user_data
+</FUNCTION>
+<STRUCT>
+<NAME>GTimeVal</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GSourceFuncs</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GMainLoop</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GTimeVal</NAME>
+struct GTimeVal
+{
+  glong tv_sec;
+  glong tv_usec;
+};
+</STRUCT>
+<STRUCT>
+<NAME>GSourceFuncs</NAME>
+struct GSourceFuncs
+{
+  gboolean (*prepare)  (gpointer  source_data, 
+                       GTimeVal *current_time,
+                       gint     *timeout,
+                       gpointer  user_data);
+  gboolean (*check)    (gpointer  source_data,
+                       GTimeVal *current_time,
+                       gpointer  user_data);
+  gboolean (*dispatch) (gpointer  source_data, 
+                       GTimeVal *current_time,
+                       gpointer  user_data);
+  GDestroyNotify destroy;
+};
+</STRUCT>
+<MACRO>
+<NAME>G_PRIORITY_HIGH</NAME>
+#define G_PRIORITY_HIGH            -100
+</MACRO>
+<MACRO>
+<NAME>G_PRIORITY_DEFAULT</NAME>
+#define G_PRIORITY_DEFAULT          0
+</MACRO>
+<MACRO>
+<NAME>G_PRIORITY_HIGH_IDLE</NAME>
+#define G_PRIORITY_HIGH_IDLE        100
+</MACRO>
+<MACRO>
+<NAME>G_PRIORITY_DEFAULT_IDLE</NAME>
+#define G_PRIORITY_DEFAULT_IDLE     200
+</MACRO>
+<MACRO>
+<NAME>G_PRIORITY_LOW</NAME>
+#define G_PRIORITY_LOW             300
+</MACRO>
+<USER_FUNCTION>
+<NAME>GSourceFunc</NAME>
+<RETURNS>gboolean </RETURNS>
+gpointer data
+</USER_FUNCTION>
+<FUNCTION>
+<NAME>g_source_add</NAME>
+<RETURNS>guint  </RETURNS>
+gint           priority,gboolean       can_recurse,GSourceFuncs  *funcs,gpointer       source_data,gpointer       user_data,GDestroyNotify notify
+</FUNCTION>
+<FUNCTION>
+<NAME>g_source_remove</NAME>
+<RETURNS>gboolean  </RETURNS>
+guint          tag
+</FUNCTION>
+<FUNCTION>
+<NAME>g_source_remove_by_user_data</NAME>
+<RETURNS>gboolean  </RETURNS>
+gpointer       user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_source_remove_by_source_data</NAME>
+<RETURNS>gboolean  </RETURNS>
+gpointer       source_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_source_remove_by_funcs_user_data</NAME>
+<RETURNS>gboolean  </RETURNS>
+GSourceFuncs  *funcs,gpointer       user_data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_get_current_time</NAME>
+<RETURNS>void  </RETURNS>
+GTimeVal          *result
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_new</NAME>
+<RETURNS>GMainLoop *</RETURNS>
+gboolean        is_running
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_run</NAME>
+<RETURNS>void  </RETURNS>
+GMainLoop      *loop
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_quit</NAME>
+<RETURNS>void  </RETURNS>
+GMainLoop      *loop
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_destroy</NAME>
+<RETURNS>void  </RETURNS>
+GMainLoop      *loop
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_is_running</NAME>
+<RETURNS>gboolean      </RETURNS>
+GMainLoop      *loop
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_iteration</NAME>
+<RETURNS>gboolean      </RETURNS>
+gboolean       may_block
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_pending</NAME>
+<RETURNS>gboolean      </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timeout_add_full</NAME>
+<RETURNS>guint         </RETURNS>
+gint           priority,guint          interval,GSourceFunc    function,gpointer       data,GDestroyNotify notify
+</FUNCTION>
+<FUNCTION>
+<NAME>g_timeout_add</NAME>
+<RETURNS>guint         </RETURNS>
+guint          interval,GSourceFunc    function,gpointer       data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_idle_add</NAME>
+<RETURNS>guint         </RETURNS>
+GSourceFunc    function,gpointer       data
+</FUNCTION>
+<FUNCTION>
+<NAME>g_idle_add_full</NAME>
+<RETURNS>guint         </RETURNS>
+gint           priority,GSourceFunc    function,gpointer       data,GDestroyNotify destroy
+</FUNCTION>
+<FUNCTION>
+<NAME>g_idle_remove_by_data</NAME>
+<RETURNS>gboolean      </RETURNS>
+gpointer       data
+</FUNCTION>
+<STRUCT>
+<NAME>GPollFD</NAME>
+</STRUCT>
+<USER_FUNCTION>
+<NAME>GPollFunc</NAME>
+<RETURNS>gint </RETURNS>
+GPollFD *ufds,
+                                guint    nfsd,
+                                gint     timeout
+</USER_FUNCTION>
+<STRUCT>
+<NAME>GPollFD</NAME>
+struct GPollFD
+{
+  gint         fd;
+  gushort      events;
+  gushort      revents;
+};
+</STRUCT>
+<FUNCTION>
+<NAME>g_main_add_poll</NAME>
+<RETURNS>void  </RETURNS>
+GPollFD    *fd,gint        priority
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_remove_poll</NAME>
+<RETURNS>void  </RETURNS>
+GPollFD    *fd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_main_set_poll_func</NAME>
+<RETURNS>void  </RETURNS>
+GPollFunc   func
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_unix_new</NAME>
+<RETURNS>GIOChannel *</RETURNS>
+int         fd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_unix_get_fd</NAME>
+<RETURNS>gint  </RETURNS>
+GIOChannel *channel
+</FUNCTION>
+<MACRO>
+<NAME>G_WIN32_MSG_HANDLE</NAME>
+#define G_WIN32_MSG_HANDLE 19981206
+</MACRO>
+<FUNCTION>
+<NAME>g_main_poll_win32_msg_add</NAME>
+<RETURNS>void  </RETURNS>
+gint        priority,GPollFD    *fd,guint       hwnd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_win32_new_messages</NAME>
+<RETURNS>GIOChannel  *</RETURNS>
+guint hwnd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_win32_new_pipe</NAME>
+<RETURNS>GIOChannel  *</RETURNS>
+int fd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_win32_new_pipe_with_wakeups</NAME>
+<RETURNS>GIOChannel  *</RETURNS>
+int   fd,guint peer,int   peer_fd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_win32_pipe_request_wakeups</NAME>
+<RETURNS>void  </RETURNS>
+GIOChannel *channel,guint       peer,int         peer_fd
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_win32_pipe_readable</NAME>
+<RETURNS>void  </RETURNS>
+int   fd,guint offset
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_win32_get_fd</NAME>
+<RETURNS>gint  </RETURNS>
+GIOChannel *channel
+</FUNCTION>
+<FUNCTION>
+<NAME>g_io_channel_win32_new_stream_socket</NAME>
+<RETURNS>GIOChannel  *</RETURNS>
+int socket
+</FUNCTION>
+<MACRO>
+<NAME>MAXPATHLEN</NAME>
+#  define MAXPATHLEN 1024
+</MACRO>
+<TYPEDEF>
+<NAME>pid_t</NAME>
+typedef int pid_t;
+</TYPEDEF>
+<MACRO>
+<NAME>getcwd</NAME>
+#    define getcwd             _getcwd
+</MACRO>
+<MACRO>
+<NAME>getpid</NAME>
+#    define getpid             _getpid
+</MACRO>
+<MACRO>
+<NAME>access</NAME>
+#    define access             _access
+</MACRO>
+<MACRO>
+<NAME>open</NAME>
+#    define open               _open
+</MACRO>
+<MACRO>
+<NAME>read</NAME>
+#    define read               _read
+</MACRO>
+<MACRO>
+<NAME>write</NAME>
+#    define write              _write
+</MACRO>
+<MACRO>
+<NAME>lseek</NAME>
+#    define lseek              _lseek
+</MACRO>
+<MACRO>
+<NAME>close</NAME>
+#    define close              _close
+</MACRO>
+<MACRO>
+<NAME>pipe</NAME>
+#    define pipe(phandles)     _pipe (phandles, 4096, _O_BINARY)
+</MACRO>
+<MACRO>
+<NAME>popen</NAME>
+#    define popen              _popen
+</MACRO>
+<MACRO>
+<NAME>pclose</NAME>
+#    define pclose             _pclose
+</MACRO>
+<MACRO>
+<NAME>fdopen</NAME>
+#    define fdopen             _fdopen
+</MACRO>
+<MACRO>
+<NAME>ftruncate</NAME>
+#    define ftruncate(fd, size)        gwin_ftruncate (fd, size)
+</MACRO>
+<MACRO>
+<NAME>opendir</NAME>
+#    define opendir            gwin_opendir
+</MACRO>
+<MACRO>
+<NAME>readdir</NAME>
+#    define readdir            gwin_readdir
+</MACRO>
+<MACRO>
+<NAME>rewinddir</NAME>
+#    define rewinddir          gwin_rewinddir
+</MACRO>
+<MACRO>
+<NAME>closedir</NAME>
+#    define closedir           gwin_closedir
+</MACRO>
+<MACRO>
+<NAME>NAME_MAX</NAME>
+#    define NAME_MAX 255
+</MACRO>
+<FUNCTION>
+<NAME>gwin_ftruncate</NAME>
+<RETURNS>int   </RETURNS>
+gint            f,guint                 size
+</FUNCTION>
+<FUNCTION>
+<NAME>gwin_opendir</NAME>
+<RETURNS>DIR *</RETURNS>
+const gchar    *dirname
+</FUNCTION>
+<FUNCTION>
+<NAME>gwin_rewinddir</NAME>
+<RETURNS>void  </RETURNS>
+DIR            *dir
+</FUNCTION>
+<FUNCTION>
+<NAME>gwin_closedir</NAME>
+<RETURNS>gint  </RETURNS>
+DIR            *dir
+</FUNCTION>
+<STRUCT>
+<NAME>GMutex</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GCond</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GPrivate</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GStaticPrivate</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GThreadFunctions</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GThreadFunctions</NAME>
+struct GThreadFunctions
+{
+  GMutex*  (*mutex_new)       (void);
+  void     (*mutex_lock)      (GMutex          *mutex);
+  gboolean (*mutex_trylock)   (GMutex          *mutex);
+  void     (*mutex_unlock)    (GMutex          *mutex);
+  void     (*mutex_free)      (GMutex          *mutex);
+  GCond*   (*cond_new)        (void);
+  void     (*cond_signal)     (GCond           *cond);
+  void     (*cond_broadcast)  (GCond           *cond);
+  void     (*cond_wait)       (GCond           *cond,
+                              GMutex           *mutex);
+  gboolean (*cond_timed_wait) (GCond           *cond,
+                              GMutex           *mutex, 
+                              GTimeVal         *end_time);
+  void      (*cond_free)      (GCond           *cond);
+  GPrivate* (*private_new)    (GDestroyNotify   destructor);
+  gpointer  (*private_get)    (GPrivate                *private_key);
+  void      (*private_set)    (GPrivate                *private_key,
+                              gpointer          data);
+};
+</STRUCT>
+<FUNCTION>
+<NAME>g_thread_init</NAME>
+<RETURNS>void  </RETURNS>
+GThreadFunctions       *vtable
+</FUNCTION>
+<FUNCTION>
+<NAME>g_static_mutex_get_mutex_impl</NAME>
+<RETURNS>GMutex *</RETURNS>
+GMutex **mutex
+</FUNCTION>
+<MACRO>
+<NAME>G_THREAD_UF</NAME>
+#define G_THREAD_UF(name, arglist) \
+    (*g_thread_functions_for_glib_use . name) arglist
+</MACRO>
+<MACRO>
+<NAME>G_THREAD_CF</NAME>
+#define G_THREAD_CF(name, fail, arg) \
+    (g_thread_supported () ? G_THREAD_UF (name, arg) : (fail))
+</MACRO>
+<MACRO>
+<NAME>g_thread_supported</NAME>
+#define        g_thread_supported()    (g_threads_got_initialized)
+</MACRO>
+<MACRO>
+<NAME>g_mutex_new</NAME>
+#define g_mutex_new()            G_THREAD_UF (mutex_new,      ())
+</MACRO>
+<MACRO>
+<NAME>g_mutex_lock</NAME>
+#define g_mutex_lock(mutex)      G_THREAD_CF (mutex_lock,     (void)0, (mutex))
+</MACRO>
+<MACRO>
+<NAME>g_mutex_trylock</NAME>
+#define g_mutex_trylock(mutex)   G_THREAD_CF (mutex_trylock,  TRUE,    (mutex))
+</MACRO>
+<MACRO>
+<NAME>g_mutex_unlock</NAME>
+#define g_mutex_unlock(mutex)    G_THREAD_CF (mutex_unlock,   (void)0, (mutex))
+</MACRO>
+<MACRO>
+<NAME>g_mutex_free</NAME>
+#define g_mutex_free(mutex)      G_THREAD_CF (mutex_free,     (void)0, (mutex))
+</MACRO>
+<MACRO>
+<NAME>g_cond_new</NAME>
+#define g_cond_new()             G_THREAD_UF (cond_new,       ())
+</MACRO>
+<MACRO>
+<NAME>g_cond_signal</NAME>
+#define g_cond_signal(cond)      G_THREAD_CF (cond_signal,    (void)0, (cond))
+</MACRO>
+<MACRO>
+<NAME>g_cond_broadcast</NAME>
+#define g_cond_broadcast(cond)   G_THREAD_CF (cond_broadcast, (void)0, (cond))
+</MACRO>
+<MACRO>
+<NAME>g_cond_wait</NAME>
+#define g_cond_wait(cond, mutex) G_THREAD_CF (cond_wait,      (void)0, (cond, \
+                                                                        mutex))
+</MACRO>
+<MACRO>
+<NAME>g_cond_free</NAME>
+#define g_cond_free(cond)        G_THREAD_CF (cond_free,      (void)0, (cond))
+</MACRO>
+<MACRO>
+<NAME>g_cond_timed_wait</NAME>
+#define g_cond_timed_wait(cond, mutex, abs_time) G_THREAD_CF (cond_timed_wait, \
+                                                              TRUE, \
+                                                              (cond, mutex, \
+                                                              abs_time))
+</MACRO>
+<MACRO>
+<NAME>g_private_new</NAME>
+#define g_private_new(destructor)        G_THREAD_UF (private_new, (destructor))
+</MACRO>
+<MACRO>
+<NAME>g_private_get</NAME>
+#define g_private_get(private_key)       G_THREAD_CF (private_get, \
+                                                       ((gpointer)private_key), \
+                                                       (private_key))
+</MACRO>
+<MACRO>
+<NAME>g_private_set</NAME>
+#define g_private_set(private_key, value) G_THREAD_CF (private_set, \
+                                                       (void) (private_key = \
+                                                        (GPrivate*) (value)), \
+                                                       (private_key, value))
+</MACRO>
+<MACRO>
+<NAME>g_static_mutex_lock</NAME>
+#define g_static_mutex_lock(mutex) \
+    g_mutex_lock (g_static_mutex_get_mutex (mutex))
+</MACRO>
+<MACRO>
+<NAME>g_static_mutex_trylock</NAME>
+#define g_static_mutex_trylock(mutex) \
+    g_mutex_trylock (g_static_mutex_get_mutex (mutex))
+</MACRO>
+<MACRO>
+<NAME>g_static_mutex_unlock</NAME>
+#define g_static_mutex_unlock(mutex) \
+    g_mutex_unlock (g_static_mutex_get_mutex (mutex)) 
+</MACRO>
+<STRUCT>
+<NAME>GStaticPrivate</NAME>
+struct GStaticPrivate
+{
+  guint index;
+};
+</STRUCT>
+<MACRO>
+<NAME>G_STATIC_PRIVATE_INIT</NAME>
+#define G_STATIC_PRIVATE_INIT { 0 }
+</MACRO>
+<FUNCTION>
+<NAME>g_static_private_get</NAME>
+<RETURNS>gpointer  </RETURNS>
+GStaticPrivate *private_key
+</FUNCTION>
+<FUNCTION>
+<NAME>g_static_private_set</NAME>
+<RETURNS>void  </RETURNS>
+GStaticPrivate *private_key,gpointer            data,GDestroyNotify    notify
+</FUNCTION>
+<FUNCTION>
+<NAME>glib_dummy_decl</NAME>
+<RETURNS>void  </RETURNS>
+void
+</FUNCTION>
+<MACRO>
+<NAME>G_LOCK_NAME</NAME>
+#define G_LOCK_NAME(name)              (g__ ## name ## _lock)
+</MACRO>
+<MACRO>
+<NAME>G_LOCK_DEFINE_STATIC</NAME>
+#  define G_LOCK_DEFINE_STATIC(name)   static G_LOCK_DEFINE (name)
+</MACRO>
+<MACRO>
+<NAME>G_LOCK_DEFINE</NAME>
+#  define G_LOCK_DEFINE(name)          \
+    GStaticMutex G_LOCK_NAME (name) = G_STATIC_MUTEX_INIT 
+</MACRO>
+<MACRO>
+<NAME>G_LOCK_EXTERN</NAME>
+#  define G_LOCK_EXTERN(name)          extern GStaticMutex G_LOCK_NAME (name)
+</MACRO>
+<MACRO>
+<NAME>G_LOCK</NAME>
+#    define G_LOCK(name)               G_STMT_START{             \
+        g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,                          \
+              "file %s: line %d (%s): locking: %s ",             \
+              __FILE__,        __LINE__, G_GNUC_PRETTY_FUNCTION, \
+               #name);                                            \
+        g_static_mutex_lock (&G_LOCK_NAME (name));                \
+     }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>G_UNLOCK</NAME>
+#    define G_UNLOCK(name)             G_STMT_START{             \
+        g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,                          \
+              "file %s: line %d (%s): unlocking: %s ",           \
+              __FILE__,        __LINE__, G_GNUC_PRETTY_FUNCTION, \
+               #name);                                            \
+       g_static_mutex_unlock (&G_LOCK_NAME (name));               \
+     }G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>G_TRYLOCK</NAME>
+#    define G_TRYLOCK(name)            G_STMT_START{             \
+        g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG,                          \
+              "file %s: line %d (%s): try locking: %s ",         \
+              __FILE__,        __LINE__, G_GNUC_PRETTY_FUNCTION, \
+               #name);                                            \
+     }G_STMT_END,      g_static_mutex_trylock (&G_LOCK_NAME (name))
+</MACRO>
+<MACRO>
+<NAME>G_LOCK</NAME>
+#    define G_LOCK(name) g_static_mutex_lock      (&G_LOCK_NAME (name)) 
+</MACRO>
+<MACRO>
+<NAME>G_UNLOCK</NAME>
+#    define G_UNLOCK(name) g_static_mutex_unlock   (&G_LOCK_NAME (name))
+</MACRO>
+<MACRO>
+<NAME>G_TRYLOCK</NAME>
+#    define G_TRYLOCK(name) g_static_mutex_trylock (&G_LOCK_NAME (name))
+</MACRO>
+<MACRO>
+<NAME>G_LOCK_DEFINE_STATIC</NAME>
+#  define G_LOCK_DEFINE_STATIC(name)   extern void glib_dummy_decl (void)
+</MACRO>
+<MACRO>
+<NAME>G_LOCK_DEFINE</NAME>
+#  define G_LOCK_DEFINE(name)          extern void glib_dummy_decl (void)
+</MACRO>
+<MACRO>
+<NAME>G_LOCK_EXTERN</NAME>
+#  define G_LOCK_EXTERN(name)          extern void glib_dummy_decl (void)
+</MACRO>
+<MACRO>
+<NAME>G_LOCK</NAME>
+#  define G_LOCK(name)
+</MACRO>
+<MACRO>
+<NAME>G_UNLOCK</NAME>
+#  define G_UNLOCK(name)
+</MACRO>
+<MACRO>
+<NAME>G_TRYLOCK</NAME>
+#  define G_TRYLOCK(name)              (FALSE)
+</MACRO>
+<VARIABLE>
+<NAME>g_log_domain_gmodule</NAME>
+extern const char      *g_log_domain_gmodule;
+</VARIABLE>
+<MACRO>
+<NAME>G_MODULE_IMPORT</NAME>
+#define        G_MODULE_IMPORT         extern
+</MACRO>
+<MACRO>
+<NAME>G_MODULE_EXPORT</NAME>
+#  define      G_MODULE_EXPORT         __declspec(dllexport)
+</MACRO>
+<MACRO>
+<NAME>G_MODULE_EXPORT</NAME>
+#  define      G_MODULE_EXPORT
+</MACRO>
+<ENUM>
+<NAME>GModuleFlags</NAME>
+typedef enum
+{
+  G_MODULE_BIND_LAZY   = 1 << 0,
+  G_MODULE_BIND_MASK   = 0x01
+} GModuleFlags;
+</ENUM>
+<STRUCT>
+<NAME>GModule</NAME>
+</STRUCT>
+<USER_FUNCTION>
+<NAME>GModuleCheckInit</NAME>
+<RETURNS>const gchar *</RETURNS>
+GModule        *module
+</USER_FUNCTION>
+<USER_FUNCTION>
+<NAME>GModuleUnload</NAME>
+<RETURNS>void </RETURNS>
+GModule        *module
+</USER_FUNCTION>
+<FUNCTION>
+<NAME>g_module_supported</NAME>
+<RETURNS>gboolean      </RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_module_open</NAME>
+<RETURNS>GModule *</RETURNS>
+const gchar            *file_name,GModuleFlags  flags
+</FUNCTION>
+<FUNCTION>
+<NAME>g_module_close</NAME>
+<RETURNS>gboolean      </RETURNS>
+GModule                *module
+</FUNCTION>
+<FUNCTION>
+<NAME>g_module_make_resident</NAME>
+<RETURNS>void  </RETURNS>
+GModule                *module
+</FUNCTION>
+<FUNCTION>
+<NAME>g_module_error</NAME>
+<RETURNS>gchar *</RETURNS>
+void
+</FUNCTION>
+<FUNCTION>
+<NAME>g_module_symbol</NAME>
+<RETURNS>gboolean      </RETURNS>
+GModule                *module,const gchar             *symbol_name,gpointer           *symbol
+</FUNCTION>
+<FUNCTION>
+<NAME>g_module_name</NAME>
+<RETURNS>gchar *</RETURNS>
+GModule                *module
+</FUNCTION>
+<FUNCTION>
+<NAME>g_module_build_path</NAME>
+<RETURNS>gchar *</RETURNS>
+const gchar            *directory,const gchar          *module_name
+</FUNCTION>
+<MACRO>
+<NAME>GLIB_HAVE_SYS_POLL_H</NAME>
+#define GLIB_HAVE_SYS_POLL_H
+</MACRO>
+<MACRO>
+<NAME>G_MINFLOAT</NAME>
+#define G_MINFLOAT     FLT_MIN
+</MACRO>
+<MACRO>
+<NAME>G_MAXFLOAT</NAME>
+#define G_MAXFLOAT     FLT_MAX
+</MACRO>
+<MACRO>
+<NAME>G_MINDOUBLE</NAME>
+#define G_MINDOUBLE    DBL_MIN
+</MACRO>
+<MACRO>
+<NAME>G_MAXDOUBLE</NAME>
+#define G_MAXDOUBLE    DBL_MAX
+</MACRO>
+<MACRO>
+<NAME>G_MINSHORT</NAME>
+#define G_MINSHORT     SHRT_MIN
+</MACRO>
+<MACRO>
+<NAME>G_MAXSHORT</NAME>
+#define G_MAXSHORT     SHRT_MAX
+</MACRO>
+<MACRO>
+<NAME>G_MININT</NAME>
+#define G_MININT       INT_MIN
+</MACRO>
+<MACRO>
+<NAME>G_MAXINT</NAME>
+#define G_MAXINT       INT_MAX
+</MACRO>
+<MACRO>
+<NAME>G_MINLONG</NAME>
+#define G_MINLONG      LONG_MIN
+</MACRO>
+<MACRO>
+<NAME>G_MAXLONG</NAME>
+#define G_MAXLONG      LONG_MAX
+</MACRO>
+<TYPEDEF>
+<NAME>gint8</NAME>
+typedef signed char gint8;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>guint8</NAME>
+typedef unsigned char guint8;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gint16</NAME>
+typedef signed short gint16;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>guint16</NAME>
+typedef unsigned short guint16;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>gint32</NAME>
+typedef signed int gint32;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>guint32</NAME>
+typedef unsigned int guint32;
+</TYPEDEF>
+<MACRO>
+<NAME>G_GNUC_EXTENSION</NAME>
+#  define G_GNUC_EXTENSION __extension__
+</MACRO>
+<MACRO>
+<NAME>G_GNUC_EXTENSION</NAME>
+#  define G_GNUC_EXTENSION
+</MACRO>
+<MACRO>
+<NAME>G_HAVE_GINT64</NAME>
+#define G_HAVE_GINT64 1
+</MACRO>
+<TYPEDEF>
+<NAME>gint64</NAME>
+G_GNUC_EXTENSION typedef signed long long gint64;
+</TYPEDEF>
+<TYPEDEF>
+<NAME>guint64</NAME>
+G_GNUC_EXTENSION typedef unsigned long long guint64;
+</TYPEDEF>
+<MACRO>
+<NAME>G_GINT64_CONSTANT</NAME>
+#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))
+</MACRO>
+<MACRO>
+<NAME>GPOINTER_TO_INT</NAME>
+#define GPOINTER_TO_INT(p)     ((gint)   (p))
+</MACRO>
+<MACRO>
+<NAME>GPOINTER_TO_UINT</NAME>
+#define GPOINTER_TO_UINT(p)    ((guint)  (p))
+</MACRO>
+<MACRO>
+<NAME>GINT_TO_POINTER</NAME>
+#define GINT_TO_POINTER(i)     ((gpointer)  (i))
+</MACRO>
+<MACRO>
+<NAME>GUINT_TO_POINTER</NAME>
+#define GUINT_TO_POINTER(u)    ((gpointer)  (u))
+</MACRO>
+<MACRO>
+<NAME>g_ATEXIT</NAME>
+# define g_ATEXIT(proc)        (!atexit (proc))
+</MACRO>
+<MACRO>
+<NAME>g_ATEXIT</NAME>
+# define g_ATEXIT(proc)        (atexit (proc))
+</MACRO>
+<MACRO>
+<NAME>g_memmove</NAME>
+#define g_memmove(d,s,n) G_STMT_START { memmove ((d), (s), (n)); } G_STMT_END
+</MACRO>
+<MACRO>
+<NAME>GLIB_MAJOR_VERSION</NAME>
+#define GLIB_MAJOR_VERSION 1
+</MACRO>
+<MACRO>
+<NAME>GLIB_MINOR_VERSION</NAME>
+#define GLIB_MINOR_VERSION 2
+</MACRO>
+<MACRO>
+<NAME>GLIB_MICRO_VERSION</NAME>
+#define GLIB_MICRO_VERSION 3
+</MACRO>
+<MACRO>
+<NAME>G_HAVE_INLINE</NAME>
+#define        G_HAVE_INLINE   1
+</MACRO>
+<MACRO>
+<NAME>G_HAVE_INLINE</NAME>
+#define G_HAVE_INLINE 1
+</MACRO>
+<MACRO>
+<NAME>G_HAVE___INLINE</NAME>
+#define G_HAVE___INLINE 1
+</MACRO>
+<MACRO>
+<NAME>G_HAVE___INLINE__</NAME>
+#define G_HAVE___INLINE__ 1
+</MACRO>
+<MACRO>
+<NAME>G_THREADS_ENABLED</NAME>
+#define G_THREADS_ENABLED
+</MACRO>
+<MACRO>
+<NAME>G_THREADS_IMPL_POSIX</NAME>
+#define G_THREADS_IMPL_POSIX
+</MACRO>
+<STRUCT>
+<NAME>GStaticMutex</NAME>
+</STRUCT>
+<STRUCT>
+<NAME>GStaticMutex</NAME>
+struct GStaticMutex
+{
+  struct _GMutex *runtime_mutex;
+  union {
+    char   pad[24];
+    double dummy_double;
+    void  *dummy_pointer;
+    long   dummy_long;
+  } aligned_pad_u;
+};
+</STRUCT>
+<MACRO>
+<NAME>G_STATIC_MUTEX_INIT</NAME>
+#define        G_STATIC_MUTEX_INIT     { NULL, { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} } }
+</MACRO>
+<MACRO>
+<NAME>g_static_mutex_get_mutex</NAME>
+#define        g_static_mutex_get_mutex(mutex)   (g_thread_use_default_impl ? ((GMutex*) &((mutex)->aligned_pad_u)) :    g_static_mutex_get_mutex_impl (&((mutex)->runtime_mutex)))
+</MACRO>
+<MACRO>
+<NAME>GINT16_TO_LE</NAME>
+#define GINT16_TO_LE(val)      ((gint16) (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_TO_LE</NAME>
+#define GUINT16_TO_LE(val)     ((guint16) (val))
+</MACRO>
+<MACRO>
+<NAME>GINT16_TO_BE</NAME>
+#define GINT16_TO_BE(val)      ((gint16) GUINT16_SWAP_LE_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT16_TO_BE</NAME>
+#define GUINT16_TO_BE(val)     (GUINT16_SWAP_LE_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT32_TO_LE</NAME>
+#define GINT32_TO_LE(val)      ((gint32) (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_TO_LE</NAME>
+#define GUINT32_TO_LE(val)     ((guint32) (val))
+</MACRO>
+<MACRO>
+<NAME>GINT32_TO_BE</NAME>
+#define GINT32_TO_BE(val)      ((gint32) GUINT32_SWAP_LE_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT32_TO_BE</NAME>
+#define GUINT32_TO_BE(val)     (GUINT32_SWAP_LE_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT64_TO_LE</NAME>
+#define GINT64_TO_LE(val)      ((gint64) (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_TO_LE</NAME>
+#define GUINT64_TO_LE(val)     ((guint64) (val))
+</MACRO>
+<MACRO>
+<NAME>GINT64_TO_BE</NAME>
+#define GINT64_TO_BE(val)      ((gint64) GUINT64_SWAP_LE_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT64_TO_BE</NAME>
+#define GUINT64_TO_BE(val)     (GUINT64_SWAP_LE_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GLONG_TO_LE</NAME>
+#define GLONG_TO_LE(val)       ((glong) GINT32_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GULONG_TO_LE</NAME>
+#define GULONG_TO_LE(val)      ((gulong) GUINT32_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GLONG_TO_BE</NAME>
+#define GLONG_TO_BE(val)       ((glong) GINT32_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GULONG_TO_BE</NAME>
+#define GULONG_TO_BE(val)      ((gulong) GUINT32_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT_TO_LE</NAME>
+#define GINT_TO_LE(val)                ((gint) GINT32_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT_TO_LE</NAME>
+#define GUINT_TO_LE(val)       ((guint) GUINT32_TO_LE (val))
+</MACRO>
+<MACRO>
+<NAME>GINT_TO_BE</NAME>
+#define GINT_TO_BE(val)                ((gint) GINT32_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>GUINT_TO_BE</NAME>
+#define GUINT_TO_BE(val)       ((guint) GUINT32_TO_BE (val))
+</MACRO>
+<MACRO>
+<NAME>G_BYTE_ORDER</NAME>
+#define G_BYTE_ORDER G_LITTLE_ENDIAN
+</MACRO>
+<MACRO>
+<NAME>GLIB_SYSDEF_POLLIN</NAME>
+#define GLIB_SYSDEF_POLLIN =1
+</MACRO>
+<MACRO>
+<NAME>GLIB_SYSDEF_POLLOUT</NAME>
+#define GLIB_SYSDEF_POLLOUT =4
+</MACRO>
+<MACRO>
+<NAME>GLIB_SYSDEF_POLLPRI</NAME>
+#define GLIB_SYSDEF_POLLPRI =2
+</MACRO>
+<MACRO>
+<NAME>GLIB_SYSDEF_POLLERR</NAME>
+#define GLIB_SYSDEF_POLLERR =8
+</MACRO>
+<MACRO>
+<NAME>GLIB_SYSDEF_POLLHUP</NAME>
+#define GLIB_SYSDEF_POLLHUP =16
+</MACRO>
+<MACRO>
+<NAME>GLIB_SYSDEF_POLLNVAL</NAME>
+#define GLIB_SYSDEF_POLLNVAL =32
+</MACRO>
+<MACRO>
+<NAME>G_HAVE_WCHAR_H</NAME>
+#define G_HAVE_WCHAR_H 1
+</MACRO>
+<MACRO>
+<NAME>G_HAVE_WCTYPE_H</NAME>
+#define G_HAVE_WCTYPE_H 1
+</MACRO>
diff --git a/docs/reference/glib/glib-docs.sgml b/docs/reference/glib/glib-docs.sgml
new file mode 100644 (file)
index 0000000..cb0fc36
--- /dev/null
@@ -0,0 +1,99 @@
+<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!entity glib-Basic-Types SYSTEM "sgml/types.sgml">
+<!entity glib-Limits-of-Basic-Types SYSTEM "sgml/limits.sgml">
+<!entity glib-Standard-Macros SYSTEM "sgml/macros.sgml">
+<!entity glib-Type-Conversion-Macros SYSTEM "sgml/type_conversion.sgml">
+<!entity glib-Byte-Order-Macros SYSTEM "sgml/byte_order.sgml">
+<!entity glib-Miscellaneous-Macros SYSTEM "sgml/macros_misc.sgml">
+<!entity glib-Memory-Allocation SYSTEM "sgml/memory.sgml">
+<!entity glib-Warnings-and-Assertions SYSTEM "sgml/warnings.sgml">
+<!entity glib-Message-Logging SYSTEM "sgml/messages.sgml">
+<!entity glib-Timers SYSTEM "sgml/timers.sgml">
+<!entity glib-String-Utility-Functions SYSTEM "sgml/string_utils.sgml">
+<!entity glib-Miscellaneous-Utility-Functions SYSTEM "sgml/misc_utils.sgml">
+<!entity glib-Date-and-Time-Functions SYSTEM "sgml/date.sgml">
+<!entity glib-The-Main-Event-Loop SYSTEM "sgml/main.sgml">
+<!entity glib-Threads SYSTEM "sgml/threads.sgml">
+<!entity glib-IO-Channels SYSTEM "sgml/iochannels.sgml">
+<!entity glib-Hook-Functions SYSTEM "sgml/hooks.sgml">
+<!entity glib-Lexical-Scanner SYSTEM "sgml/scanner.sgml">
+<!entity glib-Dynamic-Loading-of-Modules SYSTEM "sgml/modules.sgml">
+<!entity glib-Automatic-String-Completion SYSTEM "sgml/completion.sgml">
+<!entity glib-Windows-Compatability-Functions SYSTEM "sgml/windows.sgml">
+<!entity glib-Memory-Chunks SYSTEM "sgml/memory_chunks.sgml">
+<!entity glib-Doubly-Linked-Lists SYSTEM "sgml/linked_lists_double.sgml">
+<!entity glib-Singly-Linked-Lists SYSTEM "sgml/linked_lists_single.sgml">
+<!entity glib-Hash-Tables SYSTEM "sgml/hash_tables.sgml">
+<!entity glib-Strings SYSTEM "sgml/strings.sgml">
+<!entity glib-String-Chunks SYSTEM "sgml/string_chunks.sgml">
+<!entity glib-Arrays SYSTEM "sgml/arrays.sgml">
+<!entity glib-Pointer-Arrays SYSTEM "sgml/arrays_pointer.sgml">
+<!entity glib-Byte-Arrays SYSTEM "sgml/arrays_byte.sgml">
+<!entity glib-Balanced-Binary-Trees SYSTEM "sgml/trees-binary.sgml">
+<!entity glib-N-ary-Trees SYSTEM "sgml/trees-nary.sgml">
+<!entity glib-Quarks SYSTEM "sgml/quarks.sgml">
+<!entity glib-Keyed-Data-Lists SYSTEM "sgml/datalist.sgml">
+<!entity glib-Datasets SYSTEM "sgml/datasets.sgml">
+<!entity glib-Relations-and-Tuples SYSTEM "sgml/relations.sgml">
+<!entity glib-Caches SYSTEM "sgml/caches.sgml">
+<!entity glib-Memory-Allocators SYSTEM "sgml/allocators.sgml">
+]>
+<book id="index">
+  <bookinfo>
+    <title>GLib Reference Manual</title>
+  </bookinfo>
+
+  <chapter id="glib-fundamentals">
+    <title>GLib Fundamentals</title>
+    &glib-Basic-Types;
+    &glib-Limits-of-Basic-Types;
+    &glib-Standard-Macros;
+    &glib-Type-Conversion-Macros;
+    &glib-Byte-Order-Macros;
+    &glib-Miscellaneous-Macros;
+  </chapter>
+
+  <chapter id="glib-core">
+    <title>GLib Core Application Support</title>
+    &glib-The-Main-Event-Loop;
+    &glib-Threads;
+    &glib-Dynamic-Loading-of-Modules;
+    &glib-Memory-Allocation;
+    &glib-IO-Channels;
+    &glib-Warnings-and-Assertions;
+    &glib-Message-Logging;
+  </chapter>
+
+  <chapter id="glib-utilities">
+    <title>GLib Utilities</title>
+    &glib-String-Utility-Functions;
+    &glib-Date-and-Time-Functions;
+    &glib-Hook-Functions;
+    &glib-Miscellaneous-Utility-Functions;
+    &glib-Lexical-Scanner;
+    &glib-Automatic-String-Completion;
+    &glib-Timers;
+    &glib-Windows-Compatability-Functions;
+  </chapter>
+
+  <chapter id="glib-data-types">
+    <title>GLib Data Types</title>
+    &glib-Memory-Chunks;
+    &glib-Doubly-Linked-Lists;
+    &glib-Singly-Linked-Lists;
+    &glib-Hash-Tables;
+    &glib-Strings;
+    &glib-String-Chunks;
+    &glib-Arrays;
+    &glib-Pointer-Arrays;
+    &glib-Byte-Arrays;
+    &glib-Balanced-Binary-Trees;
+    &glib-N-ary-Trees;
+    &glib-Quarks;
+    &glib-Keyed-Data-Lists;
+    &glib-Datasets;
+    &glib-Relations-and-Tuples;
+    &glib-Caches;
+    &glib-Memory-Allocators;
+  </chapter>
+</book>
\ No newline at end of file
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
new file mode 100644 (file)
index 0000000..f0ceaa8
--- /dev/null
@@ -0,0 +1,1277 @@
+
+<INCLUDE>glib.h</INCLUDE>
+
+<SECTION>
+<TITLE>Basic Types</TITLE>
+<FILE>types</FILE>
+gboolean
+gpointer
+gconstpointer
+gchar
+guchar
+
+<SUBSECTION>
+gint
+guint
+gshort
+gushort
+glong
+gulong
+
+<SUBSECTION>
+gint8
+guint8
+gint16
+guint16
+gint32
+guint32
+
+<SUBSECTION>
+G_HAVE_GINT64
+gint64
+guint64
+G_GINT64_CONSTANT
+
+<SUBSECTION>
+gfloat
+gdouble
+
+<SUBSECTION>
+gsize
+gssize
+
+<SUBSECTION Private>
+gldouble
+
+# I don't really know where to put these.
+G_HAVE_WCHAR_H
+G_HAVE_WCTYPE_H
+GUTILS_C_VAR
+</SECTION>
+
+<SECTION>
+<TITLE>Limits of Basic Types</TITLE>
+<FILE>limits</FILE>
+G_MININT
+G_MAXINT
+
+<SUBSECTION>
+G_MINSHORT
+G_MAXSHORT
+
+<SUBSECTION>
+G_MINLONG
+G_MAXLONG
+
+<SUBSECTION>
+G_MINFLOAT
+G_MAXFLOAT
+
+<SUBSECTION>
+G_MINDOUBLE
+G_MAXDOUBLE
+</SECTION>
+
+<SECTION>
+<TITLE>Standard Macros</TITLE>
+<FILE>macros</FILE>
+GLIB_MAJOR_VERSION
+GLIB_MINOR_VERSION
+GLIB_MICRO_VERSION
+
+<SUBSECTION>
+GLIB_CHECK_VERSION
+
+<SUBSECTION>
+G_DIR_SEPARATOR
+G_DIR_SEPARATOR_S
+G_SEARCHPATH_SEPARATOR
+G_SEARCHPATH_SEPARATOR_S
+
+<SUBSECTION>
+TRUE
+FALSE
+
+<SUBSECTION>
+NULL
+
+<SUBSECTION>
+MIN
+MAX
+
+<SUBSECTION>
+ABS
+CLAMP
+
+<SUBSECTION>
+G_STRUCT_MEMBER
+G_STRUCT_MEMBER_P
+G_STRUCT_OFFSET
+</SECTION>
+
+<SECTION>
+<TITLE>Type Conversion Macros</TITLE>
+<FILE>type_conversion</FILE>
+GINT_TO_POINTER
+GPOINTER_TO_INT
+
+<SUBSECTION>
+GUINT_TO_POINTER
+GPOINTER_TO_UINT
+</SECTION>
+
+<SECTION>
+<TITLE>Byte Order Macros</TITLE>
+<FILE>byte_order</FILE>
+G_BYTE_ORDER
+G_LITTLE_ENDIAN
+G_BIG_ENDIAN
+G_PDP_ENDIAN
+
+<SUBSECTION>
+g_htonl
+g_htons
+g_ntohl
+g_ntohs
+
+<SUBSECTION>
+GINT_FROM_BE
+GINT_FROM_LE
+GINT_TO_BE
+GINT_TO_LE
+
+<SUBSECTION>
+GUINT_FROM_BE
+GUINT_FROM_LE
+GUINT_TO_BE
+GUINT_TO_LE
+
+<SUBSECTION>
+GLONG_FROM_BE
+GLONG_FROM_LE
+GLONG_TO_BE
+GLONG_TO_LE
+
+<SUBSECTION>
+GULONG_FROM_BE
+GULONG_FROM_LE
+GULONG_TO_BE
+GULONG_TO_LE
+
+<SUBSECTION>
+GINT16_FROM_BE
+GINT16_FROM_LE
+GINT16_TO_BE
+GINT16_TO_LE
+
+<SUBSECTION>
+GUINT16_FROM_BE
+GUINT16_FROM_LE
+GUINT16_TO_BE
+GUINT16_TO_LE
+
+<SUBSECTION>
+GINT32_FROM_BE
+GINT32_FROM_LE
+GINT32_TO_BE
+GINT32_TO_LE
+
+<SUBSECTION>
+GUINT32_FROM_BE
+GUINT32_FROM_LE
+GUINT32_TO_BE
+GUINT32_TO_LE
+
+<SUBSECTION>
+GINT64_FROM_BE
+GINT64_FROM_LE
+GINT64_TO_BE
+GINT64_TO_LE
+
+<SUBSECTION>
+GUINT64_FROM_BE
+GUINT64_FROM_LE
+GUINT64_TO_BE
+GUINT64_TO_LE
+
+<SUBSECTION>
+GUINT16_SWAP_BE_PDP
+GUINT16_SWAP_LE_BE
+GUINT16_SWAP_LE_PDP
+
+<SUBSECTION>
+GUINT32_SWAP_BE_PDP
+GUINT32_SWAP_LE_BE
+GUINT32_SWAP_LE_PDP
+
+<SUBSECTION>
+GUINT64_SWAP_LE_BE
+
+<SUBSECTION Private>
+GUINT16_SWAP_LE_BE_CONSTANT
+GUINT16_SWAP_LE_BE_X86
+GUINT32_SWAP_LE_BE_CONSTANT
+GUINT32_SWAP_LE_BE_X86
+GUINT64_SWAP_LE_BE_CONSTANT
+GUINT64_SWAP_LE_BE_X86
+</SECTION>
+
+<SECTION>
+<TITLE>Miscellaneous Macros</TITLE>
+<FILE>macros_misc</FILE>
+G_INLINE_FUNC
+
+<SUBSECTION>
+G_STMT_START
+G_STMT_END
+
+<SUBSECTION>
+G_VA_COPY
+
+<SUBSECTION>
+G_GNUC_EXTENSION
+G_GNUC_CONST
+G_GNUC_NORETURN
+G_GNUC_UNUSED
+G_GNUC_PRINTF
+G_GNUC_SCANF
+G_GNUC_FORMAT
+G_GNUC_FUNCTION
+G_GNUC_PRETTY_FUNCTION
+
+<SUBSECTION>
+g_string
+
+<SUBSECTION Private>
+G_HAVE_INLINE
+G_CAN_INLINE
+inline
+G_HAVE___INLINE
+G_HAVE___INLINE__
+</SECTION>
+
+<SECTION>
+<TITLE>The Main Event Loop</TITLE>
+<FILE>main</FILE>
+GMainLoop
+g_main_new
+g_main_destroy
+g_main_run
+g_main_is_running
+g_main_pending
+g_main_iteration
+g_main_quit
+
+<SUBSECTION>
+G_PRIORITY_HIGH
+G_PRIORITY_DEFAULT
+G_PRIORITY_HIGH_IDLE
+G_PRIORITY_DEFAULT_IDLE
+G_PRIORITY_LOW
+
+<SUBSECTION>
+g_timeout_add
+g_timeout_add_full
+GSourceFunc
+
+<SUBSECTION>
+g_idle_add
+g_idle_add_full
+g_idle_remove_by_data
+
+<SUBSECTION>
+g_main_add_poll
+GPollFD
+g_main_remove_poll
+
+<SUBSECTION>
+g_main_set_poll_func
+GPollFunc
+
+<SUBSECTION>
+g_source_add
+GSourceFuncs
+g_source_remove
+g_source_remove_by_funcs_user_data
+g_source_remove_by_source_data
+g_source_remove_by_user_data
+
+<SUBSECTION Private>
+GLIB_HAVE_SYS_POLL_H
+GLIB_SYSDEF_POLLERR
+GLIB_SYSDEF_POLLHUP
+GLIB_SYSDEF_POLLIN
+GLIB_SYSDEF_POLLNVAL
+GLIB_SYSDEF_POLLOUT
+GLIB_SYSDEF_POLLPRI
+g_main_poll_win32_msg_add
+G_WIN32_MSG_HANDLE
+</SECTION>
+
+<SECTION>
+<TITLE>Threads</TITLE>
+<FILE>threads</FILE>
+<SUBSECTION>
+G_THREADS_ENABLED
+G_THREADS_IMPL_POSIX
+G_THREADS_IMPL_SOLARIS
+G_THREADS_IMPL_NSPR
+G_THREADS_IMPL_NONE
+
+<SUBSECTION>
+GThreadFunctions
+g_thread_init
+g_thread_supported
+
+<SUBSECTION>
+GMutex
+g_mutex_new
+g_mutex_lock
+g_mutex_trylock
+g_mutex_unlock
+g_mutex_free
+
+<SUBSECTION>
+GStaticMutex
+G_STATIC_MUTEX_INIT
+g_static_mutex_lock
+g_static_mutex_trylock
+g_static_mutex_unlock
+g_static_mutex_get_mutex
+
+<SUBSECTION>
+G_LOCK_DEFINE
+G_LOCK_DEFINE_STATIC
+G_LOCK_EXTERN
+G_LOCK
+G_TRYLOCK
+G_UNLOCK
+
+<SUBSECTION>
+GCond
+g_cond_new
+g_cond_signal
+g_cond_broadcast
+g_cond_wait
+g_cond_timed_wait
+g_cond_free
+
+<SUBSECTION>
+GPrivate
+g_private_new
+g_private_get
+g_private_set
+
+<SUBSECTION>
+GStaticPrivate
+G_STATIC_PRIVATE_INIT
+g_static_private_get
+g_static_private_set
+
+<SUBSECTION Private>
+G_THREAD_CF
+G_THREAD_UF
+g_static_mutex_get_mutex_impl
+G_LOCK_NAME
+glib_dummy_decl
+</SECTION>
+
+<SECTION>
+<TITLE>IO Channels</TITLE>
+<FILE>iochannels</FILE>
+GIOChannel
+
+<SUBSECTION>
+g_io_channel_unix_new
+g_io_channel_unix_get_fd
+
+<SUBSECTION>
+g_io_channel_init
+
+<SUBSECTION>
+g_io_channel_read
+GIOError
+g_io_channel_write
+g_io_channel_seek
+GSeekType
+g_io_channel_close
+
+<SUBSECTION>
+g_io_channel_ref
+g_io_channel_unref
+
+<SUBSECTION>
+g_io_add_watch
+g_io_add_watch_full
+GIOCondition
+GIOFunc
+
+<SUBSECTION>
+GIOFuncs
+
+<SUBSECTION Private>
+g_io_channel_win32_new_messages
+g_io_channel_win32_new_pipe
+g_io_channel_win32_new_pipe_with_wakeups
+g_io_channel_win32_new_stream_socket
+
+g_io_channel_win32_get_fd
+g_io_channel_win32_pipe_readable
+g_io_channel_win32_pipe_request_wakeups
+</SECTION>
+
+<SECTION>
+<TITLE>Memory Allocation</TITLE>
+<FILE>memory</FILE>
+g_new
+g_new0
+g_renew
+
+<SUBSECTION>
+g_malloc
+g_malloc0
+g_realloc
+
+<SUBSECTION>
+g_free
+
+<SUBSECTION>
+g_memmove
+g_memdup
+
+<SUBSECTION>
+g_mem_profile
+g_mem_check
+
+</SECTION>
+
+<SECTION>
+<TITLE>Warnings and Assertions</TITLE>
+<FILE>warnings</FILE>
+g_print
+g_set_print_handler
+GPrintFunc
+
+<SUBSECTION>
+g_printerr
+g_set_printerr_handler
+
+<SUBSECTION>
+g_return_if_fail
+g_return_val_if_fail
+
+<SUBSECTION>
+g_assert
+g_assert_not_reached
+
+<SUBSECTION>
+g_on_error_query
+g_on_error_stack_trace
+
+<SUBSECTION>
+G_BREAKPOINT
+</SECTION>
+
+<SECTION>
+<TITLE>Message Logging</TITLE>
+<FILE>messages</FILE>
+G_LOG_DOMAIN
+g_log_domain_glib
+g_log_domain_gmodule
+G_LOG_FATAL_MASK
+G_LOG_LEVEL_USER_SHIFT
+GLogFunc
+GLogLevelFlags
+
+<SUBSECTION>
+g_log
+g_logv
+g_message
+g_warning
+g_error
+
+<SUBSECTION>
+g_log_set_handler
+g_log_remove_handler
+g_log_set_always_fatal
+g_log_set_fatal_mask
+g_log_default_handler
+
+<SUBSECTION>
+g_set_error_handler
+GErrorFunc
+g_set_warning_handler
+GWarningFunc
+g_set_message_handler
+</SECTION>
+
+<SECTION>
+<TITLE>Timers</TITLE>
+<FILE>timers</FILE>
+GTimer
+g_timer_new
+g_timer_start
+g_timer_stop
+g_timer_elapsed
+g_timer_reset
+g_timer_destroy
+</SECTION>
+
+<SECTION>
+<TITLE>String Utility Functions</TITLE>
+<FILE>string_utils</FILE>
+g_strdup
+g_strndup
+g_strnfill
+
+<SUBSECTION>
+g_strdup_printf
+g_strdup_vprintf
+g_snprintf
+g_vsnprintf
+g_printf_string_upper_bound
+
+<SUBSECTION>
+g_strup
+g_strdown
+
+<SUBSECTION>
+g_strcasecmp
+g_strncasecmp
+
+<SUBSECTION>
+g_strreverse
+g_strtod
+
+<SUBSECTION>
+g_strchug
+g_strchomp
+g_strstrip
+
+<SUBSECTION>
+g_strdelimit
+G_STR_DELIMITERS
+g_strescape
+g_strsplit
+g_strfreev
+g_strconcat
+g_strjoin
+g_strjoinv
+
+<SUBSECTION>
+g_strerror
+g_strsignal
+</SECTION>
+
+<SECTION>
+<TITLE>Date and Time Functions</TITLE>
+<FILE>date</FILE>
+GTimeVal
+g_get_current_time
+
+<SUBSECTION>
+GTime
+GDate
+GDateDMY
+GDateDay
+GDateMonth
+GDateWeekday
+GDateYear
+G_DATE_BAD_DAY
+G_DATE_BAD_JULIAN
+G_DATE_BAD_YEAR
+g_date_add_days
+g_date_add_months
+g_date_add_years
+g_date_clear
+g_date_compare
+g_date_day
+g_date_day_of_year
+g_date_days_in_month
+g_date_free
+g_date_is_first_of_month
+g_date_is_last_of_month
+g_date_is_leap_year
+g_date_julian
+g_date_monday_week_of_year
+g_date_monday_weeks_in_year
+g_date_month
+g_date_new
+g_date_new_dmy
+g_date_new_julian
+g_date_set_day
+g_date_set_dmy
+g_date_set_julian
+g_date_set_month
+g_date_set_parse
+g_date_set_time
+g_date_set_year
+g_date_strftime
+g_date_subtract_days
+g_date_subtract_months
+g_date_subtract_years
+g_date_sunday_week_of_year
+g_date_sunday_weeks_in_year
+g_date_to_struct_tm
+g_date_valid
+g_date_valid_day
+g_date_valid_dmy
+g_date_valid_julian
+g_date_valid_month
+g_date_valid_weekday
+g_date_valid_year
+g_date_weekday
+g_date_year
+</SECTION>
+
+<SECTION>
+<TITLE>Hook Functions</TITLE>
+<FILE>hooks</FILE>
+GHookList
+GHook
+GHookFunc
+GHookCheckFunc
+GHookMarshaller
+GHookCheckMarshaller
+GHookFreeFunc
+G_HOOK_DEFERRED_DESTROY
+
+<SUBSECTION>
+g_hook_list_init
+g_hook_list_invoke
+g_hook_list_invoke_check
+g_hook_list_marshal
+g_hook_list_marshal_check
+g_hook_list_clear
+
+<SUBSECTION>
+g_hook_alloc
+g_hook_append
+g_hook_prepend
+g_hook_insert_before
+g_hook_insert_sorted
+GHookCompareFunc
+g_hook_compare_ids
+
+<SUBSECTION>
+g_hook_get
+g_hook_find
+g_hook_find_data
+g_hook_find_func
+GHookFindFunc
+g_hook_find_func_data
+
+<SUBSECTION>
+g_hook_first_valid
+g_hook_next_valid
+
+GHookFlagMask
+G_HOOK_FLAG_USER_SHIFT
+
+<SUBSECTION>
+G_HOOK_IS_VALID
+G_HOOK_ACTIVE
+G_HOOK_IN_CALL
+G_HOOK_IS_UNLINKED
+
+<SUBSECTION>
+g_hook_ref
+g_hook_unref
+
+g_hook_free
+g_hook_destroy
+g_hook_destroy_link
+</SECTION>
+
+<SECTION>
+<TITLE>Miscellaneous Utility Functions</TITLE>
+<FILE>misc_utils</FILE>
+g_get_prgname
+g_set_prgname
+g_getenv
+g_get_user_name
+g_get_real_name
+
+<SUBSECTION>
+g_get_home_dir
+g_get_tmp_dir
+g_get_current_dir
+g_basename
+g_dirname
+g_path_is_absolute
+g_path_skip_root
+
+<SUBSECTION>
+g_bit_nth_lsf
+g_bit_nth_msf
+g_bit_storage
+
+<SUBSECTION>
+g_spaced_primes_closest
+
+<SUBSECTION>
+g_atexit
+
+<SUBSECTION>
+g_parse_debug_string
+GDebugKey
+
+<SUBSECTION>
+GVoidFunc
+GFreeFunc
+
+<SUBSECTION Private>
+G_NATIVE_ATEXIT
+g_ATEXIT
+ATEXIT
+
+</SECTION>
+
+<SECTION>
+<TITLE>Lexical Scanner</TITLE>
+<FILE>scanner</FILE>
+GScanner
+g_scanner_new
+GScannerConfig
+
+<SUBSECTION>
+g_scanner_input_file
+g_scanner_sync_file_offset
+g_scanner_stat_mode
+g_scanner_input_text
+g_scanner_peek_next_token
+g_scanner_get_next_token
+
+<SUBSECTION>
+g_scanner_cur_line
+g_scanner_cur_position
+g_scanner_cur_token
+g_scanner_cur_value
+g_scanner_eof
+
+<SUBSECTION>
+g_scanner_set_scope
+g_scanner_scope_add_symbol
+g_scanner_scope_foreach_symbol
+g_scanner_scope_lookup_symbol
+g_scanner_scope_remove_symbol
+
+<SUBSECTION>
+g_scanner_freeze_symbol_table
+g_scanner_thaw_symbol_table
+g_scanner_lookup_symbol
+
+<SUBSECTION>
+g_scanner_warn
+g_scanner_error
+g_scanner_unexp_token
+GScannerMsgFunc
+
+<SUBSECTION>
+g_scanner_destroy
+
+<SUBSECTION>
+GTokenType
+GTokenValue
+GErrorType
+G_CSET_a_2_z
+G_CSET_A_2_Z
+G_CSET_LATINC
+G_CSET_LATINS
+
+<SUBSECTION>
+g_scanner_add_symbol
+g_scanner_remove_symbol
+g_scanner_foreach_symbol
+</SECTION>
+
+<SECTION>
+<TITLE>Dynamic Loading of Modules</TITLE>
+<FILE>modules</FILE>
+GModule
+g_module_supported
+g_module_build_path
+g_module_open
+GModuleFlags
+g_module_symbol
+g_module_name
+g_module_make_resident
+g_module_close
+g_module_error
+<SUBSECTION>
+GModuleCheckInit
+GModuleUnload
+G_MODULE_EXPORT
+G_MODULE_IMPORT
+</SECTION>
+
+<SECTION>
+<TITLE>Automatic String Completion</TITLE>
+<FILE>completion</FILE>
+GCompletion
+g_completion_new
+GCompletionFunc
+g_completion_add_items
+g_completion_remove_items
+g_completion_clear_items
+g_completion_complete
+g_completion_free
+</SECTION>
+
+<SECTION>
+<TITLE>Windows Compatability Functions</TITLE>
+<FILE>windows</FILE>
+MAXPATHLEN
+NAME_MAX
+getcwd
+getpid
+pid_t
+access
+open
+read
+write
+lseek
+close
+pipe
+popen
+pclose
+fdopen
+ftruncate
+opendir
+readdir
+rewinddir
+closedir
+
+<SUBSECTION Private>
+gwin_ftruncate
+gwin_closedir
+gwin_opendir
+gwin_rewinddir
+
+</SECTION>
+
+# Data Structures
+
+<SECTION>
+<TITLE>Memory Chunks</TITLE>
+<FILE>memory_chunks</FILE>
+GMemChunk
+G_ALLOC_AND_FREE
+G_ALLOC_ONLY
+
+<SUBSECTION>
+g_mem_chunk_new
+g_mem_chunk_alloc
+g_mem_chunk_alloc0
+g_mem_chunk_free
+g_mem_chunk_destroy
+
+<SUBSECTION>
+g_mem_chunk_create
+g_chunk_new
+g_chunk_new0
+g_chunk_free
+
+<SUBSECTION>
+g_mem_chunk_reset
+g_mem_chunk_clean
+g_blow_chunks
+
+<SUBSECTION>
+g_mem_chunk_info
+g_mem_chunk_print
+
+</SECTION>
+
+<SECTION>
+<TITLE>Doubly-Linked Lists</TITLE>
+<FILE>linked_lists_double</FILE>
+GList
+
+<SUBSECTION>
+g_list_append
+g_list_prepend
+g_list_insert
+g_list_insert_sorted
+g_list_remove
+g_list_remove_link
+g_list_free
+
+<SUBSECTION>
+g_list_alloc
+g_list_free_1
+
+<SUBSECTION>
+g_list_length
+g_list_copy
+g_list_reverse
+g_list_sort
+g_list_concat
+g_list_foreach
+GFunc
+
+<SUBSECTION>
+g_list_first
+g_list_last
+g_list_previous
+g_list_next
+g_list_nth
+g_list_nth_data
+
+<SUBSECTION>
+g_list_find
+g_list_find_custom
+g_list_position
+g_list_index
+
+<SUBSECTION>
+g_list_pop_allocator
+g_list_push_allocator
+</SECTION>
+
+<SECTION>
+<TITLE>Singly-Linked Lists</TITLE>
+<FILE>linked_lists_single</FILE>
+GSList
+
+<SUBSECTION>
+g_slist_alloc
+g_slist_append
+g_slist_prepend
+g_slist_insert
+g_slist_insert_sorted
+g_slist_remove
+g_slist_remove_link
+g_slist_free
+g_slist_free_1
+
+<SUBSECTION>
+g_slist_length
+g_slist_copy
+g_slist_reverse
+g_slist_sort
+g_slist_concat
+g_slist_foreach
+
+<SUBSECTION>
+g_slist_last
+g_slist_next
+g_slist_nth
+g_slist_nth_data
+
+<SUBSECTION>
+g_slist_find
+g_slist_find_custom
+g_slist_position
+g_slist_index
+
+<SUBSECTION>
+g_slist_pop_allocator
+g_slist_push_allocator
+</SECTION>
+
+<SECTION>
+<TITLE>Hash Tables</TITLE>
+<FILE>hash_tables</FILE>
+GHashTable
+g_hash_table_new
+GHashFunc
+GCompareFunc
+g_hash_table_insert
+g_hash_table_size
+g_hash_table_lookup
+g_hash_table_lookup_extended
+g_hash_table_foreach
+GHFunc
+g_hash_table_remove
+g_hash_table_foreach_remove
+GHRFunc
+g_hash_table_freeze
+g_hash_table_thaw
+g_hash_table_destroy
+
+<SUBSECTION>
+g_direct_equal
+g_direct_hash
+g_int_equal
+g_int_hash
+g_str_equal
+g_str_hash
+
+</SECTION>
+
+<SECTION>
+<TITLE>Strings</TITLE>
+<FILE>strings</FILE>
+GString
+g_string_new
+g_string_sized_new
+g_string_assign
+g_string_sprintf
+g_string_sprintfa
+g_string_append
+g_string_append_c
+g_string_prepend
+g_string_prepend_c
+g_string_insert
+g_string_insert_c
+g_string_erase
+g_string_truncate
+g_string_free
+
+<SUBSECTION>
+g_string_up
+g_string_down
+
+</SECTION>
+
+<SECTION>
+<TITLE>String Chunks</TITLE>
+<FILE>string_chunks</FILE>
+GStringChunk
+g_string_chunk_new
+g_string_chunk_insert
+g_string_chunk_insert_const
+g_string_chunk_free
+
+</SECTION>
+
+<SECTION>
+<TITLE>Arrays</TITLE>
+<FILE>arrays</FILE>
+GArray
+g_array_new
+g_array_append_val
+g_array_append_vals
+g_array_prepend_val
+g_array_prepend_vals
+g_array_insert_val
+g_array_insert_vals
+g_array_remove_index
+g_array_remove_index_fast
+g_array_index
+g_array_set_size
+g_array_free
+</SECTION>
+
+<SECTION>
+<TITLE>Pointer Arrays</TITLE>
+<FILE>arrays_pointer</FILE>
+GPtrArray
+g_ptr_array_new
+g_ptr_array_add
+g_ptr_array_remove
+g_ptr_array_remove_index
+g_ptr_array_remove_fast
+g_ptr_array_remove_index_fast
+g_ptr_array_set_size
+g_ptr_array_index
+g_ptr_array_free
+
+</SECTION>
+
+<SECTION>
+<TITLE>Byte Arrays</TITLE>
+<FILE>arrays_byte</FILE>
+GByteArray
+g_byte_array_new
+g_byte_array_append
+g_byte_array_prepend
+g_byte_array_remove_index
+g_byte_array_remove_index_fast
+g_byte_array_set_size
+g_byte_array_free
+
+</SECTION>
+
+<SECTION>
+<TITLE>Balanced Binary Trees</TITLE>
+<FILE>trees-binary</FILE>
+GTree
+g_tree_new
+g_tree_insert
+g_tree_nnodes
+g_tree_height
+g_tree_lookup
+g_tree_search
+GSearchFunc
+g_tree_traverse
+GTraverseFunc
+GTraverseType
+g_tree_remove
+g_tree_destroy
+</SECTION>
+
+<SECTION>
+<TITLE>N-ary Trees</TITLE>
+<FILE>trees-nary</FILE>
+GNode
+g_node_new
+
+<SUBSECTION>
+g_node_insert
+g_node_insert_before
+g_node_append
+g_node_prepend
+
+<SUBSECTION>
+g_node_insert_data
+g_node_insert_data_before
+g_node_append_data
+g_node_prepend_data
+
+<SUBSECTION>
+g_node_reverse_children
+g_node_traverse
+GTraverseFlags
+GNodeTraverseFunc
+g_node_children_foreach
+GNodeForeachFunc
+
+<SUBSECTION>
+g_node_get_root
+g_node_find
+g_node_find_child
+g_node_child_index
+g_node_child_position
+g_node_first_child
+g_node_last_child
+g_node_nth_child
+g_node_first_sibling
+g_node_next_sibling
+g_node_prev_sibling
+g_node_last_sibling
+
+<SUBSECTION>
+G_NODE_IS_LEAF
+G_NODE_IS_ROOT
+g_node_depth
+g_node_n_nodes
+g_node_n_children
+g_node_is_ancestor
+g_node_max_height
+
+<SUBSECTION>
+g_node_unlink
+g_node_destroy
+
+<SUBSECTION>
+g_node_pop_allocator
+g_node_push_allocator
+</SECTION>
+
+
+<SECTION>
+<TITLE>Quarks</TITLE>
+<FILE>quarks</FILE>
+GQuark
+g_quark_from_string
+g_quark_from_static_string
+g_quark_to_string
+g_quark_try_string
+
+</SECTION>
+
+<SECTION>
+<TITLE>Keyed Data Lists</TITLE>
+<FILE>datalist</FILE>
+GData
+g_datalist_init
+
+<SUBSECTION>
+g_datalist_id_set_data
+g_datalist_id_set_data_full
+g_datalist_id_get_data
+g_datalist_id_remove_data
+g_datalist_id_remove_no_notify
+
+<SUBSECTION>
+g_datalist_set_data
+g_datalist_set_data_full
+g_datalist_get_data
+g_datalist_remove_data
+g_datalist_remove_no_notify
+
+<SUBSECTION>
+g_datalist_foreach
+g_datalist_clear
+</SECTION>
+
+
+<SECTION>
+<TITLE>Datasets</TITLE>
+<FILE>datasets</FILE>
+g_dataset_id_set_data
+g_dataset_id_set_data_full
+GDestroyNotify
+g_dataset_id_get_data
+g_dataset_id_remove_data
+g_dataset_id_remove_no_notify
+
+<SUBSECTION>
+g_dataset_set_data
+g_dataset_set_data_full
+g_dataset_get_data
+g_dataset_remove_data
+g_dataset_remove_no_notify
+
+<SUBSECTION>
+g_dataset_foreach
+GDataForeachFunc
+g_dataset_destroy
+
+</SECTION>
+
+<SECTION>
+<TITLE>Relations and Tuples</TITLE>
+<FILE>relations</FILE>
+GRelation
+g_relation_new
+g_relation_index
+g_relation_insert
+g_relation_exists
+g_relation_count
+g_relation_select
+g_relation_delete
+g_relation_destroy
+
+<SUBSECTION>
+g_relation_print
+
+<SUBSECTION>
+GTuples
+g_tuples_destroy
+g_tuples_index
+</SECTION>
+
+<SECTION>
+<TITLE>Caches</TITLE>
+<FILE>caches</FILE>
+GCache
+g_cache_new
+g_cache_insert
+g_cache_remove
+g_cache_destroy
+
+<SUBSECTION>
+g_cache_key_foreach
+g_cache_value_foreach
+
+<SUBSECTION>
+GCacheDestroyFunc
+GCacheDupFunc
+GCacheNewFunc
+</SECTION>
+
+<SECTION>
+<TITLE>Memory Allocators</TITLE>
+<FILE>allocators</FILE>
+GAllocator
+g_allocator_new
+g_allocator_free
+
+<SUBSECTION Private>
+G_ALLOCATOR_LIST
+G_ALLOCATOR_NODE
+G_ALLOCATOR_SLIST
+</SECTION>
diff --git a/docs/reference/glib/glib/AUTHORS b/docs/reference/glib/glib/AUTHORS
new file mode 100644 (file)
index 0000000..64f46b7
--- /dev/null
@@ -0,0 +1,7 @@
+Damon Chaplin <damon@karuna.freeserve.co.uk> and others.
+
+See:
+
+ http://www.gtk.org/rdp/status.html
+
+for a complete list.
diff --git a/docs/reference/glib/glib/COPYING b/docs/reference/glib/glib/COPYING
new file mode 100644 (file)
index 0000000..df952d3
--- /dev/null
@@ -0,0 +1,30 @@
+This work may be reproduced and distributed in whole or in part, in
+any medium, physical or electronic, so as long as this copyright
+notice remains intact and unchanged on all copies.  Commercial
+redistribution is permitted and encouraged, but you may not
+redistribute, in whole or in part, under terms more restrictive than
+those under which you received it. If you redistribute a modified or
+translated version of this work, you must also make the source code to
+the modified or translated version available in electronic form
+without charge.  However, mere aggregation as part of a larger work
+shall not count as a modification for this purpose.
+
+All code examples in this work are placed into the public domain,
+and may be used, modified and redistributed without restriction.
+
+BECAUSE THIS WORK IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE WORK, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE WORK "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  SHOULD THE WORK PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY REPAIR OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE WORK AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+WORK, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 
+POSSIBILITY OF SUCH DAMAGES.
diff --git a/docs/reference/glib/glib/ChangeLog b/docs/reference/glib/glib/ChangeLog
new file mode 100644 (file)
index 0000000..081e1b2
--- /dev/null
@@ -0,0 +1,6 @@
+Wed Aug 18 23:11:28 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * Import into CVS of glib-reference-1.1.3
+         Filled in some basic contents for AUTHORS
+         README, and README.cvs  
+
diff --git a/docs/reference/glib/glib/Makefile.am b/docs/reference/glib/glib/Makefile.am
new file mode 100644 (file)
index 0000000..9ba90e0
--- /dev/null
@@ -0,0 +1,46 @@
+## Process this file with automake to produce Makefile.in
+
+# The name of the module.
+DOC_MODULE=glib
+
+# The top-level SGML file.
+DOC_MAIN_SGML_FILE=glib-docs.sgml
+
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+scan:
+       gtkdoc-scan --module=$(DOC_MODULE) `glib-config --prefix`/include/glib.h `glib-config --prefix`/include/gmodule.h `glib-config --prefix`/lib/glib/include/glibconfig.h 
+
+templates: scan
+       gtkdoc-mktmpl --module=$(DOC_MODULE)
+
+sgml:
+       gtkdoc-mkdb --module=$(DOC_MODULE)
+
+html:
+       if ! test -d html ; then mkdir html ; fi
+       -cd html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+
+clean-local:
+       rm -f *~ *.bak *.hierarchy *.signals *.args *-unused.txt
+
+maintainer-clean-local: clean
+       rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt 
+
+install-data-local:
+       install -d -m 0755 $(TARGET_DIR)
+       install -m 0644 html/*.html $(TARGET_DIR)
+       install -m 0644 html/index.sgml $(TARGET_DIR)
+       gtkdoc-fixxref --module=$(DOC_MODULE) --html-dir=$(HTML_DIR)
+
+EXTRA_DIST = \
+       $(DOC_MAIN_SGML_FILE) \
+       $(DOC_MODULE)-sections.txt \
+       glib-decl.txt
+
+dist-hook:
+       mkdir $(distdir)/tmpl
+       cp -p tmpl/*.sgml $(distdir)/tmpl
+
+.PHONY : html sgml templates scan
diff --git a/docs/reference/glib/glib/NEWS b/docs/reference/glib/glib/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/glib/glib/README b/docs/reference/glib/glib/README
new file mode 100644 (file)
index 0000000..d0aa598
--- /dev/null
@@ -0,0 +1,14 @@
+This package contains the reference documentation
+for GLib. For more information about Glib,
+see:
+
+ http://www.gtk.org
+
+For information about contributing to the
+GLib/GTK+ reference documentation project, see:
+
+ http://www.gtk.org/rdp/
+
+The GLib reference documentation is freely redistributable,
+see the file COPYING for details.
+
diff --git a/docs/reference/glib/glib/README.cvs-commits b/docs/reference/glib/glib/README.cvs-commits
new file mode 100644 (file)
index 0000000..38e8735
--- /dev/null
@@ -0,0 +1,22 @@
+Before making any changes to this module, please
+contact:
+
+  Damon Chaplin <damon@karuna.freeserve.co.uk>
+
+This will ensure that duplicate work does not occur,
+and also make sure we know who has written what
+parts of the documentation. See 
+
+ http://www.gtk.org/rdp/
+
+for more information.
+
+By contributing work to the Reference Documentation
+Project, you agree that it will be covered under the
+license terms described in the file COPYING
+included in this directory.
+
+
+
+
+
diff --git a/docs/reference/glib/tmpl/allocators.sgml b/docs/reference/glib/tmpl/allocators.sgml
new file mode 100644 (file)
index 0000000..6b12fd2
--- /dev/null
@@ -0,0 +1,65 @@
+<!-- ##### SECTION Title ##### -->
+Memory Allocators
+
+<!-- ##### SECTION Short_Description ##### -->
+allocates chunks of memory for #GList, #GSList and #GNode.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GAllocator is used as an efficient way to allocate small pieces of
+memory for use with the #GList, #GSList and #GNode data structures.
+It uses a #GMemChunk so elements are allocated in groups, rather than
+individually.
+</para>
+<para>
+The #GList, #GSList and #GNode implementations create default #GAllocator
+objects, which are probably sufficient for most purposes. These default
+allocators use blocks of 128 elements.
+</para>
+<para>
+To use your own #GAllocator, create it with g_allocator_new(). Then
+use g_list_push_allocator(), g_slist_push_allocator() or
+g_node_push_allocator() before any code which allocates new #GList, #GSList
+or #GNode elements respectively. After allocating the new elements, you must
+use g_list_pop_allocator(), g_slist_pop_allocator() or g_node_pop_allocator()
+to restore the previous allocators.
+</para>
+<para>
+Note that you cannot use the same allocator for #GList, #GSList and #GNode
+elements. Each must use separate allocators.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GAllocator ##### -->
+<para>
+The #GAllocator struct contains private data. and should only be accessed
+using the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_allocator_new ##### -->
+<para>
+Creates a new #GAllocator.
+</para>
+
+@name: the name of the #GAllocator. This name is used to set the name of the
+#GMemChunk used by the #GAllocator, and is only used for debugging.
+@n_preallocs: the number of elements in each block of memory allocated.
+Larger blocks mean less calls to g_malloc(), but some memory may be wasted.
+(GLib uses 128 elements per block by default.) The value must be between 1
+and 65535.
+@Returns: a new #GAllocator.
+
+
+<!-- ##### FUNCTION g_allocator_free ##### -->
+<para>
+Frees all of the memory allocated by the #GAllocator.
+</para>
+
+@allocator: a #GAllocator.
+
+
diff --git a/docs/reference/glib/tmpl/arrays.sgml b/docs/reference/glib/tmpl/arrays.sgml
new file mode 100644 (file)
index 0000000..d05a1de
--- /dev/null
@@ -0,0 +1,224 @@
+<!-- ##### SECTION Title ##### -->
+Arrays
+
+<!-- ##### SECTION Short_Description ##### -->
+arrays of arbitrary elements which grow automatically as elements are added.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Arrays are similar to standard C arrays, except that they grow automatically
+as elements are added.
+</para>
+<para>
+Array elements can be of any size (though all elements of one array are the
+same size), and the array can be automatically cleared to '0's and
+zero-terminated.
+</para>
+<para>
+To create a new array use g_array_new().
+</para>
+<para>
+To add elements to an array, use g_array_append_val(), g_array_append_vals(),
+g_array_prepend_val(), and g_array_prepend_vals().
+</para>
+<para>
+To access an element of an array, use g_array_index().
+</para>
+<para>
+To set the size of an array, use g_array_set_size().
+</para>
+<para>
+To free an array, use g_array_free().
+</para>
+<example>
+<title>Using a GArray to store gint values.</title>
+<programlisting>
+  GArray *garray;
+  gint i;
+
+  /* We create a new array to store gint values.
+     We don't want it zero-terminated or cleared to 0's. */
+  garray = g_array_new (FALSE, FALSE, sizeof (gint));
+  for (i = 0; i < 10000; i++)
+    g_array_append_val (garray, i);
+
+  for (i = 0; i < 10000; i++)
+    if (g_array_index (garray, gint, i) != i)
+      g_print ("ERROR: got %d instead of %d\n",
+               g_array_index (garray, gint, i), i);
+
+  g_array_free (garray, TRUE);
+</programlisting></example>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GArray ##### -->
+<para>
+Contains the public fields of an <link linkend="glib-arrays">Array</link>.
+The <structfield>data</structfield> field points to the element data.
+It may change as elements are added to the array.
+The <structfield>len</structfield> field contains the number of elements
+in the array.
+</para>
+
+@data: 
+@len: 
+
+<!-- ##### FUNCTION g_array_new ##### -->
+<para>
+Creates a new #GArray.
+</para>
+
+@zero_terminated: TRUE if the array should have an extra element at the end
+which is set to '0'.
+@clear: TRUE if #GArray elements should be automatically cleared to '0'
+when they are allocated.
+@element_size: the size of each element in bytes.
+@Returns: the new #GArray.
+
+
+<!-- ##### MACRO g_array_append_val ##### -->
+<para>
+Adds the value on to the end of the array.
+The array will grow in size automatically if necessary.
+</para>
+<note>
+<para>
+g_array_append_val() is a macro which uses a reference to the value
+parameter @v. This means that you cannot use it with literal values
+such as "27". You must use variables.
+</para>
+</note>
+
+@a: a #GArray.
+@v: the value to append to the #GArray.
+@Returns: the #GArray.
+
+
+<!-- ##### FUNCTION g_array_append_vals ##### -->
+<para>
+Adds @len elements onto the end of the array.
+</para>
+
+@array: a #GArray.
+@data: a pointer to the elements to append to the end of the array.
+@len: the number of elements to append.
+@Returns: the #GArray.
+
+
+<!-- ##### MACRO g_array_prepend_val ##### -->
+<para>
+Adds the value on to the start of the array.
+The array will grow in size automatically if necessary.
+</para>
+<para>
+This operation is slower than g_array_append_val() since the existing elements
+in the array have to be moved to make space for the new element.
+</para>
+<note>
+<para>
+g_array_prepend_val() is a macro which uses a reference to the value
+parameter @v. This means that you cannot use it with literal values
+such as "27". You must use variables.
+</para>
+</note>
+
+@a: a #GArray.
+@v: the value to prepend to the #GArray.
+@Returns: the #GArray.
+
+
+<!-- ##### FUNCTION g_array_prepend_vals ##### -->
+<para>
+Adds @len elements onto the start of the array.
+</para>
+<para>
+This operation is slower than g_array_append_vals() since the existing elements
+in the array have to be moved to make space for the new elements.
+</para>
+
+@array: a #GArray.
+@data: a pointer to the elements to prepend to the start of the array.
+@len: the number of elements to prepend.
+@Returns: the #GArray.
+
+
+<!-- ##### MACRO g_array_insert_val ##### -->
+<para>
+
+</para>
+
+@a: 
+@i: 
+@v: 
+
+
+<!-- ##### FUNCTION g_array_insert_vals ##### -->
+<para>
+
+</para>
+
+@array: 
+@index: 
+@data: 
+@len: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_array_remove_index ##### -->
+<para>
+
+</para>
+
+@array: 
+@index: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_array_remove_index_fast ##### -->
+<para>
+
+</para>
+
+@array: 
+@index: 
+@Returns: 
+
+
+<!-- ##### MACRO g_array_index ##### -->
+<para>
+Returns the element of a #GArray at the given index.
+The return value is cast to the given type.
+FIXME: need more info on how it works with structures.
+</para>
+
+@a: a #GArray.
+@t: the type of the elements.
+@i: the index of the element to return.
+@Returns: the element of the #GArray at the index given by @i.
+
+
+<!-- ##### FUNCTION g_array_set_size ##### -->
+<para>
+Sets the size of the array, expanding it if necessary.
+If the array was created with clear set to TRUE, the new elements are set to 0.
+</para>
+
+@array: a #GArray.
+@length: the new size of the #GArray.
+@Returns: the #GArray.
+
+
+<!-- ##### FUNCTION g_array_free ##### -->
+<para>
+Frees the memory allocated for the #GArray.
+If free_segment is TRUE it frees the actual element data as well.
+</para>
+
+@array: a #GArray.
+@free_segment: if TRUE the actual element data is freed as well.
+
+
diff --git a/docs/reference/glib/tmpl/arrays_byte.sgml b/docs/reference/glib/tmpl/arrays_byte.sgml
new file mode 100644 (file)
index 0000000..cba774b
--- /dev/null
@@ -0,0 +1,135 @@
+<!-- ##### SECTION Title ##### -->
+Byte Arrays
+
+<!-- ##### SECTION Short_Description ##### -->
+arrays of bytes, which grow automatically as elements are added.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+GByteArray is based on #GArray, to provide arrays of bytes which grow
+automatically as elements are added.
+</para>
+<para>
+To create a new #GByteArray use g_byte_array_new().
+</para>
+<para>
+To add elements to a #GByteArray, use g_byte_array_append(), and
+g_byte_array_prepend().
+</para>
+<para>
+To set the size of a GByteArray, use g_byte_array_set_size().
+</para>
+<para>
+To free a GByteArray, use g_byte_array_free().
+</para>
+
+<example>
+<title>Using a GByteArray.</title>
+<programlisting>
+  GByteArray *gbarray;
+  gint i;
+
+  gbarray = g_byte_array_new ();
+  for (i = 0; i < 10000; i++)
+    g_byte_array_append (gbarray, (guint8*) "abcd", 4);
+
+  for (i = 0; i < 10000; i++)
+    {
+      g_assert (gbarray->data[4*i] == 'a');
+      g_assert (gbarray->data[4*i+1] == 'b');
+      g_assert (gbarray->data[4*i+2] == 'c');
+      g_assert (gbarray->data[4*i+3] == 'd');
+    }
+
+  g_byte_array_free (gbarray, TRUE);
+</programlisting></example>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GByteArray ##### -->
+<para>
+The GByteArray struct allows access to the public fields of a GByteArray.
+The <structfield>data</structfield> field points to the element data.
+It may change as elements are added to the array.
+The <structfield>len</structfield> field contains the number of elements
+in the array.
+</para>
+
+@data: 
+@len: 
+
+<!-- ##### FUNCTION g_byte_array_new ##### -->
+<para>
+Creates a new #GByteArray.
+</para>
+
+@Returns: the new #GByteArray.
+
+
+<!-- ##### FUNCTION g_byte_array_append ##### -->
+<para>
+Adds the given bytes to the end of the #GByteArray.
+The array will grow in size automatically if necessary.
+</para>
+
+@array: a #GByteArray.
+@data: the byte data to be added.
+@len: the number of bytes to add.
+@Returns: the #GByteArray.
+
+
+<!-- ##### FUNCTION g_byte_array_prepend ##### -->
+<para>
+Adds the given data to the start of the #GByteArray.
+The array will grow in size automatically if necessary.
+</para>
+
+@array: a #GByteArray.
+@data: the byte data to be added.
+@len: the number of bytes to add.
+@Returns: the #GByteArray.
+
+
+<!-- ##### FUNCTION g_byte_array_remove_index ##### -->
+<para>
+
+</para>
+
+@array: 
+@index: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_byte_array_remove_index_fast ##### -->
+<para>
+
+</para>
+
+@array: 
+@index: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_byte_array_set_size ##### -->
+<para>
+Sets the size of the #GByteArray, expanding it if necessary.
+</para>
+
+@array: a #GByteArray.
+@length: the new size of the #GByteArray.
+@Returns: the #GByteArray.
+
+
+<!-- ##### FUNCTION g_byte_array_free ##### -->
+<para>
+Frees the memory allocated by the #GByteArray.
+If free_segment is TRUE it frees the actual byte data.
+</para>
+
+@array: a #GByteArray.
+@free_segment: if TRUE the actual byte data is freed as well.
+
+
diff --git a/docs/reference/glib/tmpl/arrays_pointer.sgml b/docs/reference/glib/tmpl/arrays_pointer.sgml
new file mode 100644 (file)
index 0000000..59e1b44
--- /dev/null
@@ -0,0 +1,182 @@
+<!-- ##### SECTION Title ##### -->
+Pointer Arrays
+
+<!-- ##### SECTION Short_Description ##### -->
+arrays of pointers to any type of data, which grow automatically as new
+elements are added.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Pointer Arrays are similar to Arrays but are used only for storing pointers.
+</para>
+<note>
+<para>
+If you remove elements from the array, elements at the end of the array
+are moved into the space previously occupied by the removed element.
+This means that you should not rely on the index of particular elements
+remaining the same. You should also be careful when deleting elements while
+iterating over the array.
+</para>
+</note>
+<para>
+To create a pointer array, use g_ptr_array_new().
+</para>
+<para>
+To add elements to a pointer array, use g_ptr_array_add().
+</para>
+<para>
+To remove elements from a pointer array, use g_ptr_array_remove(), and
+g_ptr_array_remove_index().
+</para>
+<para>
+To access an element of a pointer array, use g_ptr_array_index().
+</para>
+<para>
+To set the size of a pointer array, use g_ptr_array_set_size().
+</para>
+<para>
+To free a pointer array, use g_ptr_array_free().
+</para>
+<example>
+<title>Using a GPtrArray.</title>
+<programlisting>
+  GPtrArray *gparray;
+  gchar *string1 = "one", *string2 = "two", *string3 = "three";
+
+  gparray = g_ptr_array_new ();
+  g_ptr_array_add (gparray, (gpointer) string1);
+  g_ptr_array_add (gparray, (gpointer) string2);
+  g_ptr_array_add (gparray, (gpointer) string3);
+
+  if (g_ptr_array_index (gparray, 0) != (gpointer) string1)
+    g_print ("ERROR: got %p instead of %p\n",
+             g_ptr_array_index (gparray, 0), string1);
+
+  g_ptr_array_free (gparray, TRUE);
+</programlisting></example>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GPtrArray ##### -->
+<para>
+Contains the public fields of a pointer array.
+The <structfield>pdata</structfield> field points to the array of pointers,
+which may as when the array grows.
+The <structfield>len</structfield> field is the number of pointers in the
+array.
+</para>
+
+@pdata: 
+@len: 
+
+<!-- ##### FUNCTION g_ptr_array_new ##### -->
+<para>
+Creates a new #GPtrArray.
+</para>
+
+@Returns: the new #GPtrArray.
+
+
+<!-- ##### FUNCTION g_ptr_array_add ##### -->
+<para>
+Adds a pointer to the end of the pointer array.
+The array will grow in size automatically if necessary.
+</para>
+
+@array: a #GPtrArray.
+@data: the pointer to add.
+
+
+<!-- ##### FUNCTION g_ptr_array_remove ##### -->
+<para>
+Removes the first occurrence of given pointer from the pointer array.
+It returns TRUE if the pointer was removed, or FALSE if the pointer
+was not found.
+</para>
+<note>
+<para>
+If you remove elements from the array, elements at the end of the array
+are moved into the space previously occupied by the removed element.
+This means that you should not rely on the index of particular elements
+remaining the same. You should also be careful when deleting elements while
+iterating over the array.
+</para>
+</note>
+
+@array: a #GPtrArray.
+@data: the pointer to remove.
+@Returns: TRUE if the pointer is removed. FALSE if the pointer is not found
+in the array.
+
+
+<!-- ##### FUNCTION g_ptr_array_remove_index ##### -->
+<para>
+Removes the pointer at the given index from the pointer array.
+</para>
+<note>
+<para>
+If you remove elements from the array, elements at the end of the array
+are moved into the space previously occupied by the removed element.
+This means that you should not rely on the index of particular elements
+remaining the same. You should also be careful when deleting elements while
+iterating over the array.
+</para>
+</note>
+
+@array: a #GPtrArray.
+@index: the index of the pointer to remove.
+@Returns: the pointer which was removed.
+
+
+<!-- ##### FUNCTION g_ptr_array_remove_fast ##### -->
+<para>
+
+</para>
+
+@array: 
+@data: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_ptr_array_remove_index_fast ##### -->
+<para>
+
+</para>
+
+@array: 
+@index: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_ptr_array_set_size ##### -->
+<para>
+Sets the size of the array, expanding it if necessary.
+New elements are set to NULL.
+</para>
+
+@array: a #GPtrArray.
+@length: the new length of the pointer array.
+
+
+<!-- ##### MACRO g_ptr_array_index ##### -->
+<para>
+Returns the pointer at the given index of the pointer array.
+</para>
+
+@array: a #GPtrArray.
+@index: the index of the pointer to return.
+@Returns: the pointer at the given index.
+
+
+<!-- ##### FUNCTION g_ptr_array_free ##### -->
+<para>
+Frees all of the memory allocated for the pointer array.
+</para>
+
+@array: a #GPtrArray.
+@free_seg: if TRUE the actual element data is freed as well.
+
+
diff --git a/docs/reference/glib/tmpl/byte_order.sgml b/docs/reference/glib/tmpl/byte_order.sgml
new file mode 100644 (file)
index 0000000..01e931c
--- /dev/null
@@ -0,0 +1,545 @@
+<!-- ##### SECTION Title ##### -->
+Byte Order Macros
+
+<!-- ##### SECTION Short_Description ##### -->
+a portable way to convert between different byte orders.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These macros provide a portable way to determine the host byte order
+and to convert values between different byte orders.
+</para>
+<para>
+The byte order is the order in which bytes are stored to create larger
+data types such as the #gint and #glong values.
+The host byte order is the byte order used on the current machine.
+</para>
+<para>
+Some processors store the most significant bytes (i.e. the bytes that
+hold the largest part of the value) first. These are known as big-endian
+processors. 
+</para>
+<para>
+Other processors (notably the x86 family) store the most significant byte
+last. These are known as little-endian processors.
+</para>
+<para>
+Finally, to complicate matters, some other processors store the bytes in
+a rather curious order known as PDP-endian. For a 4-byte word, the 3rd
+most significant byte is stored first, then the 4th, then the 1st and finally
+the 2nd.
+</para>
+<para>
+Obviously there is a problem when these different processors communicate
+with each other, for example over networks or by using binary file formats.
+This is where these macros come in.
+They are typically used to convert values into a byte order
+which has been agreed on for use when communicating between different
+processors. The Internet uses what is known as 'network byte order'
+as the standard byte order (which is in fact the big-endian byte order).
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO G_BYTE_ORDER ##### -->
+<para>
+The host byte order.
+This can be either #G_LITTLE_ENDIAN or #G_BIG_ENDIAN (support for
+#G_PDP_ENDIAN may be added in future.)
+</para>
+
+
+
+<!-- ##### MACRO G_LITTLE_ENDIAN ##### -->
+<para>
+Specifies one of the possible types of byte order.
+See #G_BYTE_ORDER.
+</para>
+
+
+
+<!-- ##### MACRO G_BIG_ENDIAN ##### -->
+<para>
+Specifies one of the possible types of byte order.
+See #G_BYTE_ORDER.
+</para>
+
+
+
+<!-- ##### MACRO G_PDP_ENDIAN ##### -->
+<para>
+Specifies one of the possible types of byte order (currently unused).
+See #G_BYTE_ORDER.
+</para>
+
+
+
+<!-- ##### MACRO g_htonl ##### -->
+<para>
+Converts a 32-bit integer value from host to network byte order.
+</para>
+
+@val: a 32-bit integer value in host byte order.
+@Returns: @val converted to network byte order.
+
+
+<!-- ##### MACRO g_htons ##### -->
+<para>
+Converts a 16-bit integer value from host to network byte order.
+</para>
+
+@val: a 16-bit integer value in host byte order.
+@Returns: @val converted to network byte order.
+
+
+<!-- ##### MACRO g_ntohl ##### -->
+<para>
+Converts a 32-bit integer value from network to host byte order.
+</para>
+
+@val: a 32-bit integer value in network byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO g_ntohs ##### -->
+<para>
+Converts a 16-bit integer value from network to host byte order.
+</para>
+
+@val: a 16-bit integer value in network byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT_FROM_BE ##### -->
+<para>
+Converts a #gint value from big-endian to host byte order.
+</para>
+
+@val: a #gint value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT_FROM_LE ##### -->
+<para>
+Converts a #gint value from little-endian to host byte order.
+</para>
+
+@val: a #gint value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT_TO_BE ##### -->
+<para>
+Converts a #gint value from host byte order to big-endian.
+</para>
+
+@val: a #gint value in host byte order.
+@Returns: @val converted to big-endian byte order.
+
+
+<!-- ##### MACRO GINT_TO_LE ##### -->
+<para>
+Converts a #gint value from host byte order to little-endian.
+</para>
+
+@val: a #gint value in host byte order.
+@Returns: @val converted to little-endian byte order.
+
+
+<!-- ##### MACRO GUINT_FROM_BE ##### -->
+<para>
+Converts a #guint value from big-endian to host byte order.
+</para>
+
+@val: a #guint value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT_FROM_LE ##### -->
+<para>
+Converts a #guint value from little-endian to host byte order.
+</para>
+
+@val: a #guint value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT_TO_BE ##### -->
+<para>
+Converts a #guint value from host byte order to big-endian.
+</para>
+
+@val: a #guint value in host byte order.
+@Returns: @val converted to big-endian byte order.
+
+
+<!-- ##### MACRO GUINT_TO_LE ##### -->
+<para>
+Converts a #guint value from host byte order to little-endian.
+</para>
+
+@val: a #guint value in host byte order.
+@Returns: @val converted to little-endian byte order.
+
+
+<!-- ##### MACRO GLONG_FROM_BE ##### -->
+<para>
+Converts a #glong value from big-endian to the host byte order.
+</para>
+
+@val: a #glong value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GLONG_FROM_LE ##### -->
+<para>
+Converts a #glong value from little-endian to host byte order.
+</para>
+
+@val: a #glong value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GLONG_TO_BE ##### -->
+<para>
+Converts a #glong value from host byte order to big-endian.
+</para>
+
+@val: a #glong value in host byte order.
+@Returns: @val converted to big-endian byte order.
+
+
+<!-- ##### MACRO GLONG_TO_LE ##### -->
+<para>
+Converts a #glong value from host byte order to little-endian.
+</para>
+
+@val: a #glong value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GULONG_FROM_BE ##### -->
+<para>
+Converts a #gulong value from big-endian to host byte order.
+</para>
+
+@val: a #gulong value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GULONG_FROM_LE ##### -->
+<para>
+Converts a #gulong value from little-endian to host byte order.
+</para>
+
+@val: a #gulong value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GULONG_TO_BE ##### -->
+<para>
+Converts a #gulong value from host byte order to big-endian.
+</para>
+
+@val: a #gulong value in host byte order.
+@Returns: @val converted to big-endian.
+
+
+<!-- ##### MACRO GULONG_TO_LE ##### -->
+<para>
+Converts a #gulong value from host byte order to little-endian.
+</para>
+
+@val: a #gulong value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GINT16_FROM_BE ##### -->
+<para>
+Converts a #gint16 value from big-endian to host byte order.
+</para>
+
+@val: a #gint16 value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT16_FROM_LE ##### -->
+<para>
+Converts a #gint16 value from little-endian to host byte order.
+</para>
+
+@val: a #gint16 value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT16_TO_BE ##### -->
+<para>
+Converts a #gint16 value from host byte order to big-endian.
+</para>
+
+@val: a #gint16 value in host byte order.
+@Returns: @val converted to big-endian.
+
+
+<!-- ##### MACRO GINT16_TO_LE ##### -->
+<para>
+Converts a #gint16 value from host byte order to little-endian.
+</para>
+
+@val: a #gint16 value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GUINT16_FROM_BE ##### -->
+<para>
+Converts a #guint16 value from big-endian to host byte order.
+</para>
+
+@val: a #guint16 value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT16_FROM_LE ##### -->
+<para>
+Converts a #guint16 value from little-endian to host byte order.
+</para>
+
+@val: a #guint16 value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT16_TO_BE ##### -->
+<para>
+Converts a #guint16 value from host byte order to big-endian.
+</para>
+
+@val: a #guint16 value in host byte order.
+@Returns: @val converted to big-endian.
+
+
+<!-- ##### MACRO GUINT16_TO_LE ##### -->
+<para>
+Converts a #guint16 value from host byte order to little-endian.
+</para>
+
+@val: a #guint16 value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GINT32_FROM_BE ##### -->
+<para>
+Converts a #gint32 value from big-endian to host byte order.
+</para>
+
+@val: a #gint32 value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT32_FROM_LE ##### -->
+<para>
+Converts a #gint32 value from little-endian to host byte order.
+</para>
+
+@val: a #gint32 value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT32_TO_BE ##### -->
+<para>
+Converts a #gint32 value from host byte order to big-endian.
+</para>
+
+@val: a #gint32 value in host byte order.
+@Returns: @val converted to big-endian.
+
+
+<!-- ##### MACRO GINT32_TO_LE ##### -->
+<para>
+Converts a #gint32 value from host byte order to little-endian.
+</para>
+
+@val: a #gint32 value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GUINT32_FROM_BE ##### -->
+<para>
+Converts a #guint32 value from big-endian to host byte order.
+</para>
+
+@val: a #guint32 value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT32_FROM_LE ##### -->
+<para>
+Converts a #guint32 value from little-endian to host byte order.
+</para>
+
+@val: a #guint32 value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT32_TO_BE ##### -->
+<para>
+Converts a #guint32 value from host byte order to big-endian.
+</para>
+
+@val: a #guint32 value in host byte order.
+@Returns: @val converted to big-endian.
+
+
+<!-- ##### MACRO GUINT32_TO_LE ##### -->
+<para>
+Converts a #guint32 value from host byte order to little-endian.
+</para>
+
+@val: a #guint32 value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GINT64_FROM_BE ##### -->
+<para>
+Converts a #gint64 value from big-endian to host byte order.
+</para>
+
+@val: a #gint64 value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT64_FROM_LE ##### -->
+<para>
+Converts a #gint64 value from little-endian to host byte order.
+</para>
+
+@val: a #gint64 value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GINT64_TO_BE ##### -->
+<para>
+Converts a #gint64 value from host byte order to big-endian.
+</para>
+
+@val: a #gint64 value in host byte order.
+@Returns: @val converted to big-endian.
+
+
+<!-- ##### MACRO GINT64_TO_LE ##### -->
+<para>
+Converts a #gint64 value from host byte order to little-endian.
+</para>
+
+@val: a #gint64 value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GUINT64_FROM_BE ##### -->
+<para>
+Converts a #guint64 value from big-endian to host byte order.
+</para>
+
+@val: a #guint64 value in big-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT64_FROM_LE ##### -->
+<para>
+Converts a #guint64 value from little-endian to host byte order.
+</para>
+
+@val: a #guint64 value in little-endian byte order.
+@Returns: @val converted to host byte order.
+
+
+<!-- ##### MACRO GUINT64_TO_BE ##### -->
+<para>
+Converts a #guint64 value from host byte order to big-endian.
+</para>
+
+@val: a #guint64 value in host byte order.
+@Returns: @val converted to big-endian.
+
+
+<!-- ##### MACRO GUINT64_TO_LE ##### -->
+<para>
+Converts a #guint64 value from host byte order to little-endian.
+</para>
+
+@val: a #guint64 value in host byte order.
+@Returns: @val converted to little-endian.
+
+
+<!-- ##### MACRO GUINT16_SWAP_BE_PDP ##### -->
+<para>
+Converts a #guint16 value between big-endian and pdp-endian byte order.
+The conversion is symmetric so it can be used both ways.
+</para>
+
+@val: a #guint16 value in big-endian or pdp-endian byte order.
+@Returns: @val converted to the opposite byte order.
+
+
+<!-- ##### MACRO GUINT16_SWAP_LE_BE ##### -->
+<para>
+Converts a #guint16 value between little-endian and big-endian byte order.
+The conversion is symmetric so it can be used both ways.
+</para>
+
+@val: a #guint16 value in little-endian or big-endian byte order.
+@Returns: @val converted to the opposite byte order.
+
+
+<!-- ##### MACRO GUINT16_SWAP_LE_PDP ##### -->
+<para>
+Converts a #guint16 value between little-endian and pdp-endian byte order.
+The conversion is symmetric so it can be used both ways.
+</para>
+
+@val: a #guint16 value in little-endian or pdp-endian byte order.
+@Returns: @val converted to the opposite byte order.
+
+
+<!-- ##### MACRO GUINT32_SWAP_BE_PDP ##### -->
+<para>
+Converts a #guint32 value between big-endian and pdp-endian byte order.
+The conversion is symmetric so it can be used both ways.
+</para>
+
+@val: a #guint32 value in big-endian or pdp-endian byte order.
+@Returns: @val converted to the opposite byte order.
+
+
+<!-- ##### MACRO GUINT32_SWAP_LE_BE ##### -->
+<para>
+Converts a #guint32 value between little-endian and big-endian byte order.
+The conversion is symmetric so it can be used both ways.
+</para>
+
+@val: a #guint32 value in little-endian or big-endian byte order.
+@Returns: @val converted to the opposite byte order.
+
+
+<!-- ##### MACRO GUINT32_SWAP_LE_PDP ##### -->
+<para>
+Converts a #guint32 value between little-endian and pdp-endian byte order.
+The conversion is symmetric so it can be used both ways.
+</para>
+
+@val: a #guint32 value in little-endian or pdp-endian byte order.
+@Returns: @val converted to the opposite byte order.
+
+
+<!-- ##### MACRO GUINT64_SWAP_LE_BE ##### -->
+<para>
+Converts a #guint64 value between little-endian and big-endian byte order.
+The conversion is symmetric so it can be used both ways.
+</para>
+
+@val: a #guint64 value in little-endian or big-endian byte order.
+@Returns: @val converted to the opposite byte order.
+
+
diff --git a/docs/reference/glib/tmpl/caches.sgml b/docs/reference/glib/tmpl/caches.sgml
new file mode 100644 (file)
index 0000000..aad81b5
--- /dev/null
@@ -0,0 +1,152 @@
+<!-- ##### SECTION Title ##### -->
+Caches
+
+<!-- ##### SECTION Short_Description ##### -->
+allows sharing of complex data structures to save resources.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+A #GCache allows sharing of complex data structures, in order to save
+system resources.
+</para>
+<para>
+GTK uses a #GCache for both GtkStyles and GdkGCs. These consume a lot of
+resouces, so a #GCache is used to see if a GtkStyle or GdkGC with the
+required properties already exists. If it does, then the existing
+GtkStyle or GdkGC is used instead of creating a new one.
+</para>
+<para>
+#GCache uses keys and values.
+A #GCache key describes the properties of a particular resource.
+A #GCache value is the actual resource.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GCache ##### -->
+<para>
+The #GCache struct is an opaque data structure containing information about
+a #GCache. It should only be accesssed via the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_cache_new ##### -->
+<para>
+Creates a new GCache.
+</para>
+
+@value_new_func: a function to create a new object given a key.
+This is called by g_cache_insert() if an object with the given key
+does not already exist.
+@value_destroy_func: a function to destroy an object. It is
+called by g_cache_remove() when the object is no longer needed (i.e. its
+reference count drops to 0).
+@key_dup_func: a function to copy a key. It is called by
+g_cache_insert() if the key does not already exist in the GCache.
+@key_destroy_func: a function to destroy a key. It is
+called by g_cache_remove() when the object is no longer needed (i.e. its
+reference count drops to 0).
+@hash_key_func: a function to create a hash value from a key.
+@hash_value_func: a function to create a hash value from a value.
+@key_compare_func: a function to compare two keys. It should return TRUE if
+the two keys are equivalent.
+@Returns: a new #GCache.
+
+
+<!-- ##### FUNCTION g_cache_insert ##### -->
+<para>
+Gets the value corresponding to the given key, creating it if necessary.
+It first checks if the value already exists in the #GCache, by using
+the @key_compare_func function passed to g_cache_new().
+If it does already exist it is returned, and its reference count is increased
+by one.
+If the value does not currently exist, if is created by calling the
+@value_new_func. The key is duplicated by calling
+@key_dup_func and the duplicated key and value are inserted
+into the #GCache.
+</para>
+
+@cache: a #GCache.
+@key: a key describing a #GCache object.
+@Returns: a pointer to a #GCache value.
+
+
+<!-- ##### FUNCTION g_cache_remove ##### -->
+<para>
+Decreases the reference count of the given value.
+If it drops to 0 then the value and its corresponding key are destroyed,
+using the @value_destroy_func and @key_destroy_func passed to g_cache_new().
+</para>
+
+@cache: a #GCache.
+@value: the value to remove.
+
+
+<!-- ##### FUNCTION g_cache_destroy ##### -->
+<para>
+Frees the memory allocated for the GCache.
+</para>
+<para>
+Note that it does not destroy the keys and values which were contained in the
+GCache.
+</para>
+
+@cache: 
+
+
+<!-- ##### FUNCTION g_cache_key_foreach ##### -->
+<para>
+Calls the given function for each of the keys in the #GCache.
+</para>
+
+@cache: a #GCache.
+@func: the function to call with each #GCache key.
+@user_data: user data to pass to the function.
+
+
+<!-- ##### FUNCTION g_cache_value_foreach ##### -->
+<para>
+Calls the given function for each of the values in the #GCache.
+</para>
+
+@cache: a #GCache.
+@func: the function to call with each #GCache value.
+@user_data: user data to pass to the function.
+
+
+<!-- ##### USER_FUNCTION GCacheDestroyFunc ##### -->
+<para>
+Specifies the type of the @value_destroy_func and @key_destroy_func functions
+passed to g_cache_new().
+The functions are passed a pointer to the #GCache key or #GCache value and
+should free any memory and other resources associated with it.
+</para>
+
+@value: the #GCache value to destroy.
+
+
+<!-- ##### USER_FUNCTION GCacheDupFunc ##### -->
+<para>
+Specifies the type of the @key_dup_func function passed to g_cache_new().
+The function is passed a key (NOT a value as the prototype implies) and
+should return a duplicate of the key.
+</para>
+
+@value: the #GCache key to destroy (NOT a #GCache value as it seems).
+@Returns: a copy of the #GCache key.
+
+
+<!-- ##### USER_FUNCTION GCacheNewFunc ##### -->
+<para>
+Specifies the type of the @value_new_func function passed to g_cache_new().
+It is passed a #GCache key and should create the value corresponding to the
+key.
+</para>
+
+@key: a #GCache key.
+@Returns: a new #GCache value corresponding to the key.
+
+
diff --git a/docs/reference/glib/tmpl/completion.sgml b/docs/reference/glib/tmpl/completion.sgml
new file mode 100644 (file)
index 0000000..6bb7681
--- /dev/null
@@ -0,0 +1,121 @@
+<!-- ##### SECTION Title ##### -->
+Automatic String Completion
+
+<!-- ##### SECTION Short_Description ##### -->
+support for automatic completion using a group of target strings.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+#GCompletion provides support for automatic completion of a string using
+any group of target strings. It is typically used for file name completion
+as is common in many Unix shells.
+</para>
+<para>
+A #GCompletion is created using g_completion_new().
+Target items are added and removed with
+g_completion_add_items(), g_completion_remove_items() and
+g_completion_clear_items().
+A completion attempt is requested with g_completion_complete().
+When no longer needed, the #GCompletion is freed with g_completion_free().
+</para>
+<para>
+Items in the completion can be simple strings (e.g. file names),
+or pointers to arbitrary data structures. If data structures are used
+you must provide a #GCompletionFunc in g_completion_new(),
+which retrieves the item's string from the data structure.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GCompletion ##### -->
+<para>
+The data structure used for automatic completion.
+<structfield>items</structfield> is the list of target items (strings
+or data structures).
+<structfield>func</structfield> is the function called to get the string
+associated with a target item. It is NULL if the target items are strings.
+<structfield>prefix</structfield> is the last prefix passed to
+g_completion_complete().
+<structfield>cache</structfield> is the list of items which begin with
+<structfield>prefix</structfield>.
+</para>
+
+@items: 
+@func: 
+@prefix: 
+@cache: 
+
+<!-- ##### FUNCTION g_completion_new ##### -->
+<para>
+Creates a new #GCompletion.
+</para>
+
+@func: the function to be called to return the string representing an item
+in the #GCompletion, or NULL if strings are going to be used as the
+#GCompletion items.
+@Returns: the new #GCompletion.
+
+
+<!-- ##### USER_FUNCTION GCompletionFunc ##### -->
+<para>
+Specifies the type of the function passed to g_completion_new().
+It should return the string corresponding to the given target item.
+This is used when you use data structures as #GCompletion items.
+</para>
+
+@Param1: the completion item.
+@Returns: the string corresponding to the item.
+
+
+<!-- ##### FUNCTION g_completion_add_items ##### -->
+<para>
+Adds items to the #GCompletion.
+</para>
+
+@cmp: the #GCompletion.
+@items: the list of items to add.
+
+
+<!-- ##### FUNCTION g_completion_remove_items ##### -->
+<para>
+Removes items from a #GCompletion.
+</para>
+
+@cmp: the #GCompletion.
+@items: the items to remove.
+
+
+<!-- ##### FUNCTION g_completion_clear_items ##### -->
+<para>
+Removes all items from the #GCompletion.
+</para>
+
+@cmp: the #GCompletion.
+
+
+<!-- ##### FUNCTION g_completion_complete ##### -->
+<para>
+Attempts to complete the string @prefix using the #GCompletion target items.
+</para>
+
+@cmp: the #GCompletion.
+@prefix: the prefix string, typically typed by the user, which is compared
+with each of the items.
+@new_prefix: if non-NULL, returns the longest prefix which is common to all
+items that matched @prefix, or NULL if no items matched @prefix.
+This string should be freed when no longer needed.
+@Returns: the list of items whose strings begin with @prefix. This should
+not be changed.
+
+
+<!-- ##### FUNCTION g_completion_free ##### -->
+<para>
+Frees all memory used by the #GCompletion.
+</para>
+
+@cmp: the #GCompletion.
+
+
diff --git a/docs/reference/glib/tmpl/datalist.sgml b/docs/reference/glib/tmpl/datalist.sgml
new file mode 100644 (file)
index 0000000..99ac4ac
--- /dev/null
@@ -0,0 +1,197 @@
+<!-- ##### SECTION Title ##### -->
+Keyed Data Lists
+
+<!-- ##### SECTION Short_Description ##### -->
+lists of data elements which are accessible by a string or #GQuark identifier.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Keyed data lists provide lists of arbitrary data elements which can be accessed
+either with a string or with a #GQuark corresponding to the string.
+</para>
+<para>
+The GQuark methods are quicker, since the strings have to be converted to
+GQuarks anyway.
+</para>
+<para>
+Data lists are used in GTK for associating arbitrary data with
+GtkObjects, using gtk_object_set_data() and related functions.
+</para>
+
+<para>
+To create a datalist, use g_datalist_init().
+</para>
+<para>
+To add data elements to a datalist use g_datalist_id_set_data(),
+g_datalist_id_set_data_full(), g_datalist_set_data()
+and g_datalist_set_data_full().
+</para>
+<para>
+To get data elements from a datalist use g_datalist_id_get_data() and
+g_datalist_get_data().
+</para>
+<para>
+To iterate over all data elements in a datalist use g_datalist_foreach().
+</para>
+<para>
+To remove data elements from a datalist use g_datalist_id_remove_data() and
+g_datalist_remove_data().
+</para>
+<para>
+To remove all data elements from a datalist, use g_datalist_clear().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GData ##### -->
+<para>
+The #GData struct is an opaque data structure to represent a
+<link linkend="glib-Keyed-Data-Lists">Keyed Data List</link>.
+It should only be accessed via the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_datalist_init ##### -->
+<para>
+Resets the datalist to NULL.
+It does not free any memory or call any destroy functions.
+</para>
+
+@datalist: a pointer to a pointer to a datalist.
+
+
+<!-- ##### MACRO g_datalist_id_set_data ##### -->
+<para>
+Sets the data corresponding to the given #GQuark id.
+Any previous data with the same key is removed, and its
+destroy function is called.
+</para>
+
+@dl: a datalist.
+@q: the #GQuark to identify the data element.
+@d: the data element.
+
+
+<!-- ##### FUNCTION g_datalist_id_set_data_full ##### -->
+<para>
+Sets the data corresponding to the given #GQuark id, and the function to
+be called when the element is removed from the datalist.
+Any previous data with the same key is removed, and its
+destroy function is called.
+</para>
+
+@datalist: a datalist.
+@key_id: the #GQuark to identify the data element.
+@data: the data element.
+@destroy_func: the function to call when the data element is removed. This
+function will be called with the data element and can be used to free any
+memory allocated for it.
+
+
+<!-- ##### FUNCTION g_datalist_id_get_data ##### -->
+<para>
+Gets a data element.
+</para>
+
+@datalist: a datalist.
+@key_id: the #GQuark identifying a data element.
+@Returns: the data element, or NULL if it is not found.
+
+
+<!-- ##### MACRO g_datalist_id_remove_data ##### -->
+<para>
+Removes an element, using its #GQuark identifier.
+</para>
+
+@dl: a datalist.
+@q: the #GQuark identifying the data element.
+
+
+<!-- ##### FUNCTION g_datalist_id_remove_no_notify ##### -->
+<para>
+
+</para>
+
+@datalist: 
+@key_id: 
+
+
+<!-- ##### MACRO g_datalist_set_data ##### -->
+<para>
+Sets the data element corresponding to the given string identifier.
+</para>
+
+@dl: a datalist.
+@k: the string to identify the data element.
+@d: the data element.
+
+
+<!-- ##### MACRO g_datalist_set_data_full ##### -->
+<para>
+Sets the data element corresponding to the given string identifier, and the
+function to be called when the data element is removed.
+</para>
+
+@dl: a datalist.
+@k: the string to identify the data element.
+@d: the data element.
+@f: the function to call when the data element is removed. This
+function will be called with the data element and can be used to free any
+memory allocated for it.
+
+
+<!-- ##### MACRO g_datalist_get_data ##### -->
+<para>
+Gets a data element, using its string identifer.
+This is slower than g_datalist_id_get_data() because the string is first
+converted to a #GQuark.
+</para>
+
+@dl: a datalist.
+@k: the string identifying a data element.
+@Returns: the data element, or NULL if it is not found.
+
+
+<!-- ##### MACRO g_datalist_remove_data ##### -->
+<para>
+Removes an element using its string identifier.
+The data element's destroy function is called if it has been set.
+</para>
+
+@dl: a datalist.
+@k: the string identifying the data element.
+
+
+<!-- ##### MACRO g_datalist_remove_no_notify ##### -->
+<para>
+
+</para>
+
+@dl: 
+@k: 
+
+
+<!-- ##### FUNCTION g_datalist_foreach ##### -->
+<para>
+Calls the given function for each data element of the datalist.
+The function is called with each data element's #GQuark id and data,
+together with the given @user_data parameter.
+</para>
+
+@datalist: a datalist.
+@func: the function to call for each data element.
+@user_data: user data to pass to the function.
+
+
+<!-- ##### FUNCTION g_datalist_clear ##### -->
+<para>
+Frees all the data elements of the datalist.
+The data elements' destroy functions are called if they have been set.
+</para>
+
+@datalist: a datalist.
+
+
diff --git a/docs/reference/glib/tmpl/datasets.sgml b/docs/reference/glib/tmpl/datasets.sgml
new file mode 100644 (file)
index 0000000..afd64be
--- /dev/null
@@ -0,0 +1,204 @@
+<!-- ##### SECTION Title ##### -->
+Datasets
+
+<!-- ##### SECTION Short_Description ##### -->
+associate groups of data elements with particular memory locations.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Datasets associate groups of data elements with particular memory locations.
+These are useful if you need to associate data with a structure returned
+from an external library. Since you cannot modify the structure, you use
+its location in memory as the key into a dataset, where you can associate
+any number of data elements with it.
+</para>
+<para>
+There are two forms of most of the dataset functions.
+The first form uses strings to identify the data elements associated with
+a location. The second form uses #GQuark identifiers, which are created
+with a call to g_quark_from_string() or g_quark_from_static_string().
+The second form is quicker, since it does not require looking up the string
+in the hash table of #GQuark identifiers.
+</para>
+<para>
+There is no function to create a dataset. It is automatically created as
+soon as you add elements to it.
+<para>
+To add data elements to a dataset use g_dataset_id_set_data(),
+g_dataset_id_set_data_full(), g_dataset_set_data()
+and g_dataset_set_data_full().
+</para>
+<para>
+To get data elements from a dataset use g_dataset_id_get_data() and
+g_dataset_get_data().
+</para>
+<para>
+To iterate over all data elements in a dataset use g_dataset_foreach().
+</para>
+<para>
+To remove data elements from a dataset use g_dataset_id_remove_data() and
+g_dataset_remove_data().
+</para>
+<para>
+To destroy a dataset, use g_dataset_destroy().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO g_dataset_id_set_data ##### -->
+<para>
+Sets the data element associated with the given #GQuark id.
+Any previous data with the same key is removed, and its destroy function
+is called.
+</para>
+
+@l: the location identifying the dataset.
+@k: the #GQuark id to identify the data element.
+@d: the data element.
+
+
+<!-- ##### FUNCTION g_dataset_id_set_data_full ##### -->
+<para>
+Sets the data element associated with the given #GQuark id, and also the
+function to call when the data element is destroyed.
+Any previous data with the same key is removed, and its
+destroy function is called.
+</para>
+
+@dataset_location: the location identifying the dataset.
+@key_id: the #GQuark id to identify the data element.
+@data: the data element.
+@destroy_func: the function to call when the data element is removed. This
+function will be called with the data element and can be used to free any
+memory allocated for it.
+
+
+<!-- ##### USER_FUNCTION GDestroyNotify ##### -->
+<para>
+Specifies the type of function which is called when a data element is
+destroyed. It is passed the pointer to the data element and should free
+any memory and resources allocated for it.
+</para>
+
+@data: the data element.
+
+
+<!-- ##### FUNCTION g_dataset_id_get_data ##### -->
+<para>
+Gets the data element corresponding to a #GQuark.
+</para>
+
+@dataset_location: the location identifying the dataset.
+@key_id: the #GQuark id to identify the data element.
+@Returns: the data element corresponding to the #GQuark, or NULL if it is
+not found.
+
+
+<!-- ##### MACRO g_dataset_id_remove_data ##### -->
+<para>
+Removes a data element from a dataset.
+The data element's destroy function is called if it has been set.
+</para>
+
+@l: the location identifying the dataset.
+@k: the #GQuark id identifying the data element.
+
+
+<!-- ##### FUNCTION g_dataset_id_remove_no_notify ##### -->
+<para>
+
+</para>
+
+@dataset_location: 
+@key_id: 
+
+
+<!-- ##### MACRO g_dataset_set_data ##### -->
+<para>
+Sets the data corresponding to the given string identifier.
+</para>
+
+@l: the location identifying the dataset.
+@k: the string to identify the data element.
+@d: the data element.
+
+
+<!-- ##### MACRO g_dataset_set_data_full ##### -->
+<para>
+Sets the data corresponding to the given string identifier, and the function
+to call when the data element is destroyed.
+</para>
+
+@l: the location identifying the dataset.
+@k: the string to identify the data element.
+@d: the data element.
+@f: the function to call when the data element is removed. This
+function will be called with the data element and can be used to free any
+memory allocated for it.
+
+
+<!-- ##### MACRO g_dataset_get_data ##### -->
+<para>
+Gets the data element corresponding to a string.
+</para>
+
+@l: the location identifying the dataset.
+@k: the string identifying the data element.
+@Returns: the data element corresponding to the string, or NULL if it is not
+found.
+
+
+<!-- ##### MACRO g_dataset_remove_data ##### -->
+<para>
+Removes a data element corresponding to a string.
+Its destroy function is called if it has been set.
+</para>
+
+@l: the location identifying the dataset.
+@k: the string identifying the data element.
+
+
+<!-- ##### MACRO g_dataset_remove_no_notify ##### -->
+<para>
+
+</para>
+
+@l: 
+@k: 
+
+
+<!-- ##### FUNCTION g_dataset_foreach ##### -->
+<para>
+Calls the given function for each data element which is associated with the
+given location.
+</para>
+
+@dataset_location: the location identifying the dataset.
+@func: the function to call for each data element.
+@user_data: user data to pass to the function.
+
+
+<!-- ##### USER_FUNCTION GDataForeachFunc ##### -->
+<para>
+Specifies the type of function passed to g_dataset_foreach().
+It is called with each #GQuark id and associated data element,
+together with the @user_data parameter supplied to g_dataset_foreach().
+</para>
+
+@key_id: the #GQuark id to identifying the data element.
+@data: the data element.
+@user_data: user data passed to g_dataset_foreach().
+
+
+<!-- ##### FUNCTION g_dataset_destroy ##### -->
+<para>
+Destroys the dataset, freeing all memory allocated, and calling any
+destroy functions set for data elements.
+</para>
+
+@dataset_location: the location identifying the dataset.
+
+
diff --git a/docs/reference/glib/tmpl/date.sgml b/docs/reference/glib/tmpl/date.sgml
new file mode 100644 (file)
index 0000000..7350193
--- /dev/null
@@ -0,0 +1,655 @@
+<!-- ##### SECTION Title ##### -->\r
+Date and Time Functions\r
+\r
+<!-- ##### SECTION Short_Description ##### -->\r
+\r
+Calendrical Calculations and Miscellaneous Time Stuff\r
+\r
+<!-- ##### SECTION Long_Description ##### -->\r
+<para>\r
+The #GDate data structure represents a day between January 1, Year 1,\r
+and sometime a few thousand years in the future (right now it will go\r
+to the year 65535 or so, but g_date_set_parse() only parses up to the\r
+year 8000 or so - just count on "a few thousand"). #GDate is meant to\r
+represent everyday dates, not astronomical dates or historical dates\r
+or ISO timestamps or the like. It extrapolates the current Gregorian\r
+calendar forward and backward in time; there is no attempt to change\r
+the calendar to match time periods or locations. #GDate does not store\r
+time information; it represents a <emphasis>day</emphasis>.\r
+</para>\r
+\r
+<para>\r
+The #GDate implementation has several nice features; it is only a\r
+64-bit struct, so storing large numbers of dates is very efficient. It\r
+can keep both a Julian and Day-Month-Year representation of the date,\r
+since some calculations are much easier with one representation or the\r
+other. A Julian representation is simply a count of days since some\r
+fixed day in the past; for #GDate the fixed day is January 1, 1 AD.\r
+("Julian" dates in the #GDate API aren't really Julian dates in the\r
+technical sense; technically, Julian dates count from the start of the\r
+Julian period, Jan 1, 4713 BC).\r
+</para>\r
+\r
+<para>\r
+#GDate is simple to use. First you need a "blank" date; you can get a\r
+dynamically allocated date from g_date_new(), or you can declare an\r
+automatic variable or array and initialize it to a sane state by\r
+calling g_date_clear(). A cleared date is sane; it's safe to call\r
+g_date_set_dmy() and the other mutator functions to initialize the\r
+value of a cleared date. However, a cleared date is initially\r
+<emphasis>invalid</emphasis>, meaning that it doesn't represent a day\r
+that exists. It is undefined to call any of the date calculation\r
+routines on an invalid date. If you obtain a date from a user or other\r
+unpredictable source, you should check its validity with the\r
+g_date_valid() predicate. g_date_valid() is also used to check for\r
+errors with g_date_set_parse() and other functions that can\r
+fail. Dates can be invalidated by calling g_date_clear() again.\r
+</para>\r
+\r
+<para>\r
+<emphasis>It is very important to use the API to access the #GDate\r
+struct.</emphasis> Often only the DMY or only the Julian\r
+representation is valid. Sometimes neither is valid. Use the API.\r
+</para>\r
+\r
+<para>\r
+glib doesn't contain any time-manipulation functions; however, there\r
+is a #GTime typedef which is equivalent to time_t, and a #GTimeVal\r
+struct which represents a more precise time (with microseconds). You\r
+can request the current time as a #GTimeVal with g_get_current_time().\r
+</para>\r
+\r
+<!-- ##### SECTION See_Also ##### -->\r
+<para>\r
+\r
+</para>\r
+\r
+<!-- ##### STRUCT GTimeVal ##### -->\r
+<para>\r
+Represents a precise time, with seconds and microseconds. Same as the\r
+<structname>struct timeval</structname> returned by the\r
+<function>gettimeofday()</function> UNIX call.\r
+</para>\r
+\r
+@tv_sec: \r
+@tv_usec: \r
+\r
+<!-- ##### FUNCTION g_get_current_time ##### -->\r
+<para>\r
+Equivalent to <function>gettimeofday()</function>, but also works on\r
+Win32. Returns the current time.\r
+</para>\r
+\r
+@result: \r
+\r
+\r
+<!-- ##### TYPEDEF GTime ##### -->\r
+<para>\r
+Simply a replacement for time_t. Unrelated to GTimer.\r
+</para>\r
+\r
+\r
+<!-- ##### STRUCT GDate ##### -->\r
+<para>\r
+Represents a day between January 1, Year 1 and a few thousand years in\r
+the future. None of its members should be accessed directly. If the\r
+<structname>GDate</structname> is obtained from g_date_new(), it will\r
+be safe to mutate but invalid and thus not safe for calendrical computations.\r
+If it's declared on the stack, it will contain garbage so must be\r
+initialized with g_date_clear(). g_date_clear() makes the date invalid\r
+but sane. An invalid date doesn't represent a day, it's "empty." A\r
+date becomes valid after you set it to a Julian day or you set a day,\r
+month, and year.\r
+</para>\r
+\r
+@julian_days: \r
+@julian: \r
+@dmy: \r
+@day: \r
+@month: \r
+@year: \r
+\r
+<!-- ##### ENUM GDateDMY ##### -->\r
+<para>\r
+This enumeration isn't used in the API, but may be useful if you need\r
+to mark a number as a day, month, or year.\r
+</para>\r
+\r
+@G_DATE_DAY: \r
+@G_DATE_MONTH: \r
+@G_DATE_YEAR: \r
+\r
+<!-- ##### TYPEDEF GDateDay ##### -->\r
+<para>\r
+Integer representing a day of the month; between 1 and\r
+31. #G_DATE_BAD_DAY represents an invalid day of the month.\r
+</para>\r
+\r
+\r
+<!-- ##### ENUM GDateMonth ##### -->\r
+<para>\r
+Enumeration representing a month; values are #G_DATE_JANUARY,\r
+#G_DATE_FEBRUARY, etc. #G_DATE_BAD_MONTH is the "invalid" value.\r
+</para>\r
+\r
+@G_DATE_BAD_MONTH: \r
+@G_DATE_JANUARY: \r
+@G_DATE_FEBRUARY: \r
+@G_DATE_MARCH: \r
+@G_DATE_APRIL: \r
+@G_DATE_MAY: \r
+@G_DATE_JUNE: \r
+@G_DATE_JULY: \r
+@G_DATE_AUGUST: \r
+@G_DATE_SEPTEMBER: \r
+@G_DATE_OCTOBER: \r
+@G_DATE_NOVEMBER: \r
+@G_DATE_DECEMBER: \r
+\r
+<!-- ##### ENUM GDateWeekday ##### -->\r
+<para>\r
+Enumeration representing a day of the week; #G_DATE_MONDAY,\r
+#G_DATE_TUESDAY, etc. #G_DATE_BAD_WEEKDAY is an invalid weekday.\r
+</para>\r
+\r
+@G_DATE_BAD_WEEKDAY: \r
+@G_DATE_MONDAY: \r
+@G_DATE_TUESDAY: \r
+@G_DATE_WEDNESDAY: \r
+@G_DATE_THURSDAY: \r
+@G_DATE_FRIDAY: \r
+@G_DATE_SATURDAY: \r
+@G_DATE_SUNDAY: \r
+\r
+<!-- ##### TYPEDEF GDateYear ##### -->\r
+<para>\r
+Integer representing a year; #G_DATE_BAD_YEAR is the invalid\r
+value. The year must be 1 or higher; negative (BC) years are not\r
+allowed. The year is represented with four digits.\r
+</para>\r
+\r
+\r
+<!-- ##### MACRO G_DATE_BAD_DAY ##### -->\r
+<para>\r
+Represents an invalid #GDateDay.\r
+</para>\r
+\r
+\r
+\r
+<!-- ##### MACRO G_DATE_BAD_JULIAN ##### -->\r
+<para>\r
+Represents an invalid Julian day number.\r
+</para>\r
+\r
+\r
+\r
+<!-- ##### MACRO G_DATE_BAD_YEAR ##### -->\r
+<para>\r
+Represents an invalid year.\r
+</para>\r
+\r
+\r
+\r
+<!-- ##### FUNCTION g_date_add_days ##### -->\r
+<para>\r
+Increment a date some number of days. To move forward by weeks, add\r
+weeks*7 days. The date must be valid.\r
+</para>\r
+\r
+@date: The date to increment\r
+@n_days: Number of days to move the date forward\r
+\r
+\r
+<!-- ##### FUNCTION g_date_add_months ##### -->\r
+<para>\r
+Increment a date by some number of months. If the day of the month is\r
+greater than 28, this routine may change the day of the month (because\r
+the destination month may not have the current day in it). The date\r
+must be valid.\r
+</para>\r
+\r
+@date: Date to increment\r
+@n_months: Number of months to move forward\r
+\r
+\r
+<!-- ##### FUNCTION g_date_add_years ##### -->\r
+<para>\r
+Increment a date by some number of years. If the date is February 29,\r
+and the destination year is not a leap year, the date will be changed\r
+to February 28. The date must be valid.\r
+</para>\r
+\r
+@date: Date to increment\r
+@n_years: Number of years to move forward\r
+\r
+\r
+<!-- ##### FUNCTION g_date_clear ##### -->\r
+<para>\r
+Initialize one or more #GDate structs to a sane but invalid\r
+state. The cleared dates will not represent an existing date, but will\r
+not contain garbage. Useful to init a date declared on the stack.\r
+Validity can be tested with g_date_valid().\r
+</para>\r
+\r
+@date: Pointer to one or more dates to clear\r
+@n_dates: Number of dates to clear\r
+\r
+\r
+<!-- ##### FUNCTION g_date_compare ##### -->\r
+<para>\r
+<function>qsort()</function>-style comparsion function for dates. Both\r
+dates must be valid.\r
+</para>\r
+\r
+@lhs: First date to compare\r
+@rhs: Second date to compare\r
+@Returns: 0 for equal, less than zero if @lhs is less than @rhs,\r
+greater than zero if @lhs is greater than @rhs\r
+\r
+\r
+<!-- ##### FUNCTION g_date_day ##### -->\r
+<para>\r
+Return the day of the month; the #GDate must be valid.\r
+</para>\r
+\r
+@date: Date to extract the day of the month from\r
+@Returns: Day of the month\r
+\r
+\r
+<!-- ##### FUNCTION g_date_day_of_year ##### -->\r
+<para>\r
+Return the day of the year, where Jan 1 is the first day of the\r
+year. Date must be valid.\r
+</para>\r
+\r
+@date: Date to extract day of year from\r
+@Returns: Day of the year\r
+\r
+\r
+<!-- ##### FUNCTION g_date_days_in_month ##### -->\r
+<para>\r
+Return the number of days in a month, taking leap years into account.\r
+</para>\r
+\r
+@month: Month\r
+@year: Year\r
+@Returns: Number of days in @month during the year @year.\r
+\r
+\r
+<!-- ##### FUNCTION g_date_free ##### -->\r
+<para>\r
+Free a #GDate returned from g_date_new()\r
+</para>\r
+\r
+@date: Date to free\r
+\r
+\r
+<!-- ##### FUNCTION g_date_is_first_of_month ##### -->\r
+<para>\r
+Returns TRUE if the date is on the first of a month. Date must be valid.\r
+</para>\r
+\r
+@date: Date to check\r
+@Returns: Boolean, if the date is the first of the month\r
+\r
+\r
+<!-- ##### FUNCTION g_date_is_last_of_month ##### -->\r
+<para>\r
+Returns TRUE if the date is the last day of the month. Date must be valid.\r
+</para>\r
+\r
+@date: Date to check\r
+@Returns: Boolean, if the date is the last day of the month\r
+\r
+\r
+<!-- ##### FUNCTION g_date_is_leap_year ##### -->\r
+<para>\r
+Returns TRUE if the year is a leap year\r
+</para>\r
+\r
+@year: Year to check\r
+@Returns: Boolean, if the year is a leap year\r
+\r
+\r
+<!-- ##### FUNCTION g_date_julian ##### -->\r
+<para>\r
+Accessor, returns the Julian day or "serial number" of the #GDate. The\r
+Julian day is simply the number of days since January 1, Year 1; i.e.,\r
+January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2,\r
+etc. Date must be valid.\r
+</para>\r
+\r
+@date: Date to extract the Julian day from\r
+@Returns: Julian day\r
+\r
+\r
+<!-- ##### FUNCTION g_date_monday_week_of_year ##### -->\r
+<para>\r
+Return the week of the year, where weeks are understood to start on\r
+Monday. If the date is before the first Monday of the year, return\r
+0. Date must be valid.\r
+</para>\r
+\r
+@date: Date to use\r
+@Returns: Week of the year\r
+\r
+\r
+<!-- ##### FUNCTION g_date_monday_weeks_in_year ##### -->\r
+<para>\r
+Return the number of weeks in the year, where weeks are taken to start\r
+on Monday. Will be 52 or 53. Date must be valid. (Years always have 52\r
+7-day periods, plus 1 or 2 extra days depending on whether it's a leap\r
+year. This function is basically telling you how many Mondays are in\r
+the year, i.e. there are 53 Mondays if one of the extra days happens\r
+to be a Monday.)\r
+</para>\r
+\r
+@year: Year\r
+@Returns: Number of Mondays in the year\r
+\r
+\r
+<!-- ##### FUNCTION g_date_month ##### -->\r
+<para>\r
+Accessor for the month of the year. Date must be valid.\r
+</para>\r
+\r
+@date: Date to get the month from\r
+@Returns: A #GDateMonth\r
+\r
+\r
+<!-- ##### FUNCTION g_date_new ##### -->\r
+<para>\r
+Allocate a #GDate and initialize it to a sane state. The new date will\r
+be cleared (as if you'd called g_date_clear()) but invalid (it won't\r
+represent an existing day). Free the return value with g_date_free().\r
+</para>\r
+\r
+@Returns: The newly-allocated #GDate\r
+\r
+\r
+<!-- ##### FUNCTION g_date_new_dmy ##### -->\r
+<para>\r
+Like g_date_new(), but also sets the value of the date. Assuming the\r
+day/month/year triplet you pass in represents an existing day, the\r
+returned date will be valid.\r
+</para>\r
+\r
+@day: Day of the month\r
+@month: Month of the year\r
+@year: Year\r
+@Returns: Allocated date initialized with @day, @month, and @year\r
+\r
+\r
+<!-- ##### FUNCTION g_date_new_julian ##### -->\r
+<para>\r
+Like g_date_new(), but also sets the value of the date. Assuming the\r
+Julian day number you pass in is valid (greater than 0, less than an\r
+unreasonably large number), the returned date will be valid.\r
+</para>\r
+\r
+@julian_day: Days since January 1, Year 1\r
+@Returns: Allocated date initialized with @julian_day\r
+\r
+\r
+<!-- ##### FUNCTION g_date_set_day ##### -->\r
+<para>\r
+Set the day of the month for a #GDate. If the resulting day-month-year\r
+triplet is invalid, the date will be invalid.\r
+</para>\r
+\r
+@date: Date to set the day for\r
+@day: Day to set\r
+\r
+\r
+<!-- ##### FUNCTION g_date_set_dmy ##### -->\r
+<para>\r
+Set the value of a #GDate from a day, month, and year. The DMY triplet\r
+must be valid; if you aren't sure it is, call g_date_valid_dmy() to\r
+check before you set it.\r
+</para>\r
+\r
+@date: Date to set the value of\r
+@day: Day\r
+@month: Month\r
+@y: Year\r
+\r
+\r
+<!-- ##### FUNCTION g_date_set_julian ##### -->\r
+<para>\r
+Set the value of a #GDate from a Julian day number. \r
+</para>\r
+\r
+@date: Date to set\r
+@julian_date: Julian day number (days since January 1, Year 1)\r
+\r
+\r
+<!-- ##### FUNCTION g_date_set_month ##### -->\r
+<para>\r
+Set the month of the year for a #GDate.  If the resulting\r
+ day-month-year triplet is invalid, the date will be invalid.\r
+</para>\r
+\r
+@date: Date\r
+@month: Month to set\r
+\r
+\r
+<!-- ##### FUNCTION g_date_set_parse ##### -->\r
+<para>\r
+Parse a user-inputted string @str, and try to figure out what date it\r
+represents, taking the current locale into account. If the string is\r
+successfully parsed, the date will be valid after the call. Otherwise,\r
+it will be invalid. You should check using g_date_valid() to see\r
+whether the parsing succeeded.\r
+</para>\r
+\r
+<para>\r
+This function is not appropriate for file formats and the like; it\r
+isn't very precise, and its exact behavior varies with the\r
+locale. It's intended to be a heuristic routine that guesses what the\r
+user means by a given string (and it does work pretty well in that\r
+capacity).\r
+</para>\r
+\r
+@date: Date to fill in\r
+@str: String to parse\r
+\r
+\r
+<!-- ##### FUNCTION g_date_set_time ##### -->\r
+<para>\r
+Set the value of a date from a #GTime (time_t) value. To set the value\r
+of a date to the current day, you could write:\r
+<informalexample><programlisting>\r
+  g_date_set_time(date, time(NULL));\r
+</programlisting></informalexample>\r
+</para>\r
+\r
+@date: Date to update\r
+@time: #GTime value to set\r
+\r
+\r
+<!-- ##### FUNCTION g_date_set_year ##### -->\r
+<para>\r
+Set the year for a #GDate.  If the resulting day-month-year triplet is\r
+  invalid, the date will be invalid.\r
+</para>\r
+\r
+@date: Date\r
+@year: Year to set\r
+\r
+\r
+<!-- ##### FUNCTION g_date_strftime ##### -->\r
+<para>\r
+Generate a printed representation of the date, in a locale-specific\r
+way. Works just like the standard C <function>strftime()</function>\r
+function, but only accepts date-related formats; time-related formats\r
+give undefined results. Date must be valid.\r
+</para>\r
+\r
+@s: Destination buffer\r
+@slen: Max buffer size\r
+@format: Format string\r
+@date: valid #GDate\r
+@Returns: number of characters written to the buffer, or 0 the buffer was too small\r
+\r
+\r
+<!-- ##### FUNCTION g_date_subtract_days ##### -->\r
+<para>\r
+Move a date some number of days into the past. To move by weeks, just\r
+move by weeks*7 days. Date must be valid.\r
+</para>\r
+\r
+@date: Date to decrement\r
+@n_days: Number of days to move\r
+\r
+\r
+<!-- ##### FUNCTION g_date_subtract_months ##### -->\r
+<para>\r
+Move a date some number of months into the past. If the current day of\r
+the month doesn't exist in the destination month, the day of the month\r
+may change. Date must be valid.\r
+</para>\r
+\r
+@date: Date to decrement\r
+@n_months: Number of months to move\r
+\r
+\r
+<!-- ##### FUNCTION g_date_subtract_years ##### -->\r
+<para>\r
+Move a date some number of years into the past. If the current day\r
+doesn't exist in the destination year (i.e. it's February 29 and you\r
+move to a non-leap-year) then the day is changed to February 29. Date\r
+must be valid.\r
+</para>\r
+\r
+@date: Date to decrement\r
+@n_years: Number of years to move\r
+\r
+\r
+<!-- ##### FUNCTION g_date_sunday_week_of_year ##### -->\r
+<para>\r
+Week of the year during which this date falls, if weeks are understood\r
+to being on Sunday. Date must be valid. Can return 0 if the day is\r
+before the first Sunday of the year.\r
+</para>\r
+\r
+@date: Date\r
+@Returns: Week number\r
+\r
+\r
+<!-- ##### FUNCTION g_date_sunday_weeks_in_year ##### -->\r
+<para>\r
+Return the number of weeks in the year, where weeks are taken to start\r
+on Sunday. Will be 52 or 53. Date must be valid. (Years always have 52\r
+7-day periods, plus 1 or 2 extra days depending on whether it's a leap\r
+year. This function is basically telling you how many Sundays are in\r
+the year, i.e. there are 53 Sundays if one of the extra days happens\r
+to be a Sunday.)\r
+</para>\r
+\r
+@year: Year to count weeks in\r
+@Returns: Number of weeks\r
+\r
+\r
+<!-- ##### FUNCTION g_date_to_struct_tm ##### -->\r
+<para>\r
+Fills in the date-related bits of a <structname>struct tm</structname>\r
+using the @date value. Initializes the non-date parts with something\r
+sane but meaningless.\r
+</para>\r
+\r
+@date: Date to set the <structname>struct tm</structname> from\r
+@tm: <structname>struct tm</structname> to fill\r
+\r
+\r
+<!-- ##### FUNCTION g_date_valid ##### -->\r
+<para>\r
+Returns TRUE if the #GDate represents an existing day. #GDate must not\r
+contain garbage; it should have been initialized with g_date_clear()\r
+if it wasn't allocated by one of the g_date_new() variants.\r
+</para>\r
+\r
+@date: Date to check\r
+@Returns: Whether the date is valid.\r
+\r
+\r
+<!-- ##### FUNCTION g_date_valid_day ##### -->\r
+<para>\r
+Returns TRUE if the day of the month is valid (a day is valid if it's\r
+between 1 and 31 inclusive).\r
+</para>\r
+\r
+@day: Day to check.\r
+@Returns: Boolean, whether the day is valid.\r
+\r
+\r
+<!-- ##### FUNCTION g_date_valid_dmy ##### -->\r
+<para>\r
+Returns TRUE if the day/month/year triplet forms a valid, existing day\r
+in the range of days GDate understands (Year 1 or later, no more than\r
+a few thousand years in the future).\r
+</para>\r
+\r
+@day: Day\r
+@month: Month\r
+@year: Year\r
+@Returns: Boolean, whether the date is a valid one\r
+\r
+\r
+<!-- ##### FUNCTION g_date_valid_julian ##### -->\r
+<para>\r
+Returns TRUE if the Julian day is valid. Anything greater than zero is basically a\r
+valid Julian, though there is a 32-bit limit.\r
+</para>\r
+\r
+@julian_date: Julian day to check\r
+@Returns: Boolean, whether the Julian day is valid.\r
+\r
+\r
+<!-- ##### FUNCTION g_date_valid_month ##### -->\r
+<para>\r
+Returns TRUE if the month value is valid. The 12 #GDateMonth\r
+enumeration values are the only valid months.\r
+</para>\r
+\r
+@month: Month\r
+@Returns: Boolean, whether the month is valid\r
+\r
+\r
+<!-- ##### FUNCTION g_date_valid_weekday ##### -->\r
+<para>\r
+Returns TRUE if the weekday is valid. The 7 #GDateWeekday enumeration\r
+values are the only valid weekdays.\r
+</para>\r
+\r
+@weekday: Weekday\r
+@Returns: Boolean, whether the weekday is valid.\r
+\r
+\r
+<!-- ##### FUNCTION g_date_valid_year ##### -->\r
+<para>\r
+Returns TRUE if the year is valid. Any year greater than 0 is valid,\r
+though there is a 16-bit limit to what GDate will understand.\r
+</para>\r
+\r
+@year: Year\r
+@Returns: Boolean, whether the year is valid.\r
+\r
+\r
+<!-- ##### FUNCTION g_date_weekday ##### -->\r
+<para>\r
+Returns the day of the week for a #GDate. The date must be valid.\r
+</para>\r
+\r
+@date: Date\r
+@Returns: Day of the week as a #GDateWeekday\r
+\r
+\r
+<!-- ##### FUNCTION g_date_year ##### -->\r
+<para>\r
+Accessor; returns the year of a #GDate. The date must be valid.\r
+</para>\r
+\r
+@date: Date\r
+@Returns: Year in which the date falls\r
+\r
+\r
diff --git a/docs/reference/glib/tmpl/glib-unused.sgml b/docs/reference/glib/tmpl/glib-unused.sgml
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/docs/reference/glib/tmpl/hash_tables.sgml b/docs/reference/glib/tmpl/hash_tables.sgml
new file mode 100644 (file)
index 0000000..75ffd06
--- /dev/null
@@ -0,0 +1,358 @@
+<!-- ##### SECTION Title ##### -->
+Hash Tables
+
+<!-- ##### SECTION Short_Description ##### -->
+associations between keys and values so that given a key the value
+can be found quickly.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+A #GHashTable provides associations between keys and values which
+is optimized so that given a key, the associated value can be found
+very quickly.
+</para>
+<para>
+Note that neither keys nor values are copied when inserted into the
+#GHashTable, so they must exist for the lifetime of the #GHashTable.
+This means that the use of static strings is OK, but temporary
+strings (i.e. those created in buffers and those returned by GTK widgets)
+should be copied with g_strdup() before being inserted.
+</para>
+<para>
+If keys or values are dynamically allocated, you must be careful to ensure
+that they are freed when they are removed from the #GHashTable, and also
+when they are overwritten by new insertions into the #GHashTable.
+It is also not advisable to mix static strings and dynamically-allocated
+strings in a #GHashTable, because it then becomes difficult to determine
+whether the string should be freed.
+</para>
+<para>
+To create a #GHashTable, use g_hash_table_new().
+</para>
+<para>
+To insert a key and value into a #GHashTable, use g_hash_table_insert().
+</para>
+<para>
+To lookup a value corresponding to a given key, use g_hash_table_lookup()
+and g_hash_table_lookup_extended().
+</para>
+<para>
+To remove a key and value, use g_hash_table_remove().
+</para>
+<para>
+To call a function for each key and value pair use g_hash_table_foreach().
+</para>
+<para>
+To destroy a #GHashTable use g_hash_table_destroy().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GHashTable ##### -->
+<para>
+The #GHashTable struct is an opaque data structure to represent a
+<link linkend="glib-Hash-Tables">Hash Table</link>.
+It should only be accessed via the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_hash_table_new ##### -->
+<para>
+Creates a new #GHashTable.
+</para>
+
+@hash_func: a function to create a hash value from a key.
+Hash values are used to determine where keys are stored within the
+#GHashTable data structure.
+The g_direct_hash(), g_int_hash() and g_str_hash() functions are provided for
+some common types of keys. If hash_func is NULL, g_direct_hash() is used.
+@key_compare_func: a function to compare two keys to see if they are equal.
+This is used when looking up keys in the #GHashTable.
+The g_direct_equal(), g_int_equal() and g_str_equal() functions are provided
+for the most common types of keys. If compare_func is NULL, keys are compared
+directly in a similar fashion to g_direct_equal(), but without the overhead
+of a function call.
+@Returns: a new #GHashTable.
+
+
+<!-- ##### USER_FUNCTION GHashFunc ##### -->
+<para>
+Specifies the type of the hash function which is passed to
+g_hash_table_new() when a #GHashTable is created.
+</para>
+<para>
+The function is passed a key and should return a guint hash value.
+The functions g_direct_hash(), g_int_hash() and g_str_hash() provide
+hash functions which can be used when the key is a #gpointer, #gint, and 
+#gchar* respectively.
+</para>
+<para>
+FIXME: Need more here.
+The hash values should be evenly distributed over a fairly large range?
+The modulus is taken with the hash table size (a prime number)
+to find the 'bucket' to place each key into.
+The function should also be very fast, since it is called for each key
+lookup.
+</para>
+
+@key: a key.
+@Returns: the hash value corresponding to the key.
+
+
+<!-- ##### USER_FUNCTION GCompareFunc ##### -->
+<para>
+Specifies the type of a comparison function used to compare two values.
+The value which should be returned depends on the context in which the
+#GCompareFunc is used.
+</para>
+<para>
+In g_hash_table_new(), g_cache_new(), and g_relation_index() the function
+should return TRUE if the two parameters are equal, or FALSE if they are not.
+</para>
+<para>
+In g_list_find_custom() and g_slist_find_custom() the function should return
+0 if the two parameters are equal.
+</para>
+<para>
+In g_list_insert_sorted(), g_list_sort(), g_slist_insert_sorted(),
+g_slist_sort() and g_tree_new()  the function should return a negative integer
+if the first value comes before the second, 0 if they are equal, or a positive
+integer if the first value comes after the second.
+</para>
+
+@a: a value.
+@b: a value to compare with.
+@Returns: TRUE if the two values are equivalent.
+
+
+<!-- ##### FUNCTION g_hash_table_insert ##### -->
+<para>
+Inserts a new key and value into a #GHashTable.
+If the key already exists in the #GHashTable its current value is replaced
+with the new value.
+</para>
+<note>
+<para>
+If the keys or values use dynamically allocated memory, then you should
+first check if the key already exists in the GHashTable. If it does,
+you should free the existing key and/or value before inserting the
+new key and value.
+</para>
+</note>
+
+@hash_table: a #GHashTable.
+@key: a key to insert.
+@value: the value to associate with the key.
+
+
+<!-- ##### FUNCTION g_hash_table_size ##### -->
+<para>
+Returns the number of key/value pairs in a #GHashTable.
+</para>
+
+@hash_table: a #GHashTable.
+@Returns: the number of key/value pairs in the #GHashTable.
+
+
+<!-- ##### FUNCTION g_hash_table_lookup ##### -->
+<para>
+Looks up a key in the #GHashTable, returning the associated value or NULL
+if the key is not found.
+</para>
+
+@hash_table: a #GHashTable.
+@key: the key to look up.
+@Returns: the associated value, or NULL if the key is not found.
+
+
+<!-- ##### FUNCTION g_hash_table_lookup_extended ##### -->
+<para>
+Looks up a key in the #GHashTable, returning the original key and the
+associated value and a gboolean which is TRUE if the key was found.
+This is useful if you need to free the memory allocated for the
+original key, for example before calling g_hash_table_remove().
+</para>
+
+@hash_table: a #GHashTable.
+@lookup_key: the key to look up.
+@orig_key: returns the original key.
+@value: returns the value associated with the key.
+@Returns: TRUE if the key was found in the #GHashTable.
+
+
+<!-- ##### FUNCTION g_hash_table_foreach ##### -->
+<para>
+Calls the given function for each of the key/value pairs in the #GHashTable.
+The function is passed the key and value of each pair, and the given
+@user_data parameter.
+</para>
+
+@hash_table: a #GHashTable.
+@func: the function to call for each key/value pair.
+@user_data: use data to pass to the function.
+
+
+<!-- ##### USER_FUNCTION GHFunc ##### -->
+<para>
+Specifies the type of the function passed to g_hash_table_foreach().
+It is called with each key/value pair, together with the @user_data parameter
+which is passed to g_hash_table_foreach().
+</para>
+
+@key: a key.
+@value: the value corresponding to the key.
+@user_data: user data passed to g_hash_table_foreach().
+
+
+<!-- ##### FUNCTION g_hash_table_remove ##### -->
+<para>
+Removes a key and its associated value from a #GHashTable.
+</para>
+<note>
+<para>
+As with g_hash_table_insert(), you should make sure that any dynamically
+allocated values are freed yourself.
+</para>
+</note>
+
+@hash_table: a #GHashTable.
+@key: the key to remove.
+
+
+<!-- ##### FUNCTION g_hash_table_foreach_remove ##### -->
+<para>
+Calls the given function for each key/value pair in the #GHashTable.
+If the function returns TRUE, then the key/value pair is removed from the
+#GHashTable.
+</para>
+
+@hash_table: a #GHashTable.
+@func: the function to call for each key/value pair.
+@user_data: user data to pass to the function.
+@Returns: the number of key/value paris removed.
+
+
+<!-- ##### USER_FUNCTION GHRFunc ##### -->
+<para>
+Specifies the type of the function passed to g_hash_table_foreach_remove().
+It is called with each key/value pair, together with the @user_data parameter
+passed to g_hash_table_foreach_remove().
+It should return TRUE if the key/value pair should be removed from the
+#GHashTable.
+</para>
+
+@key: a key.
+@value: the value associated with the key.
+@user_data: user data passed to g_hash_table_remove().
+@Returns: TRUE if the key/value pair should be removed from the #GHashTable.
+
+
+<!-- ##### FUNCTION g_hash_table_freeze ##### -->
+<para>
+Disable resizing of a #GHashTable.
+</para>
+<para>
+This should be used if you need to make a lot of changes to a #GHashTable
+at once, as it reduces the number of times that the #GHashTable is rebuilt.
+You should call g_hash_table_thaw() after updating the #GHashTable to
+enable resizing again.
+</para>
+
+@hash_table: a #GHashTable.
+
+
+<!-- ##### FUNCTION g_hash_table_thaw ##### -->
+<para>
+Enables resizing of a #GHashTable.
+</para>
+
+@hash_table: a #GHashTable.
+
+
+<!-- ##### FUNCTION g_hash_table_destroy ##### -->
+<para>
+Destroys the #GHashTable.
+</para>
+<note>
+<para>
+If keys and/or values are dynamically allocated, you should free them
+first.
+</para>
+</note>
+
+@hash_table: a #GHashTable.
+
+
+<!-- ##### FUNCTION g_direct_equal ##### -->
+<para>
+Compares two #gpointer arguments and returns TRUE if they are equal.
+It can be passed to g_hash_table_new() as the @key_compare_func
+parameter, when using pointers as keys in a #GHashTable.
+</para>
+
+@v: a key.
+@v2: a key to compare with @v.
+@Returns: TRUE if the two keys match.
+
+
+<!-- ##### FUNCTION g_direct_hash ##### -->
+<para>
+Converts a gpointer to a hash value.
+It can be passed to g_hash_table_new() as the @hash_func parameter, when
+using gpointer values as keys in a #GHashTable.
+</para>
+
+@v: a gpointer key.
+@Returns: a hash value corresponding to the key.
+
+
+<!-- ##### FUNCTION g_int_equal ##### -->
+<para>
+Compares the two #gint values being pointed to and returns TRUE if they are
+equal.
+It can be passed to g_hash_table_new() as the @key_compare_func
+parameter, when using pointers to integers as keys in a #GHashTable.
+</para>
+
+@v: a pointer to a #gint key.
+@v2: a pointer to a #gint key to compare with @v.
+@Returns: TRUE if the two keys match.
+
+
+<!-- ##### FUNCTION g_int_hash ##### -->
+<para>
+Converts a pointer to a #gint to a hash value.
+It can be passed to g_hash_table_new() as the @hash_func parameter, when
+using pointers to gint values as keys in a #GHashTable.
+</para>
+
+@v: a pointer to a #gint key.
+@Returns: a hash value corresponding to the key.
+
+
+<!-- ##### FUNCTION g_str_equal ##### -->
+<para>
+Compares two strings and returns TRUE if they are equal.
+It can be passed to g_hash_table_new() as the @key_compare_func
+parameter, when using strings as keys in a #GHashTable.
+</para>
+
+@v: a key.
+@v2: a key to compare with @v.
+@Returns: TRUE if the two keys match.
+
+
+<!-- ##### FUNCTION g_str_hash ##### -->
+<para>
+Converts a string to a hash value.
+It can be passed to g_hash_table_new() as the @hash_func parameter, when
+using strings as keys in a #GHashTable.
+</para>
+
+@v: a string key.
+@Returns: a hash value corresponding to the key.
+
+
diff --git a/docs/reference/glib/tmpl/hooks.sgml b/docs/reference/glib/tmpl/hooks.sgml
new file mode 100644 (file)
index 0000000..47cf06e
--- /dev/null
@@ -0,0 +1,524 @@
+<!-- ##### SECTION Title ##### -->
+Hook Functions
+
+<!-- ##### SECTION Short_Description ##### -->
+support for manipulating lists of hook functions.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GHookList, #GHook and their related functions provide support for
+lists of hook functions. Functions can be added and removed from the lists,
+and the list of hook functions can be invoked.
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GHookList ##### -->
+<para>
+
+<informaltable pgwide=1 frame="none" role="struct">
+<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<tbody>
+
+<row>
+<entry>#guint seq_id;</entry>
+<entry>the next free #GHook id.</entry>
+</row>
+
+<row>
+<entry>#guint hook_size;</entry>
+<entry>the size of the #GHookList elements, in bytes.</entry>
+</row>
+
+<row>
+<entry>#guint is_setup : 1;</entry>
+<entry>1 if the #GHookList has been initialized.</entry>
+</row>
+
+<row>
+<entry>#GHook *hooks;</entry>
+<entry>the first #GHook element in the list.</entry>
+</row>
+
+<row>
+<entry>#GMemChunk *hook_memchunk;</entry>
+<entry>the #GMemChunk used for allocating the #GHook elements.</entry>
+</row>
+
+<row>
+<entry>#GHookFreeFunc hook_free;</entry>
+<entry>the function to call to free a #GHook element.</entry>
+</row>
+
+<row>
+<entry>#GHookFreeFunc hook_destroy;</entry>
+<entry>the function to call to destory a #GHook element.</entry>
+</row>
+
+</tbody></tgroup></informaltable>
+
+</para>
+
+@seq_id: 
+@hook_size: 
+@is_setup: 
+@hooks: 
+@hook_memchunk: 
+@hook_free: 
+@hook_destroy: 
+
+<!-- ##### STRUCT GHook ##### -->
+<para>
+
+<informaltable pgwide=1 frame="none" role="struct">
+<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<tbody>
+
+<row>
+<entry>#gpointer data;</entry>
+<entry>.</entry>
+</row>
+
+<row>
+<entry>#GHook *next;</entry>
+<entry>.</entry>
+</row>
+
+<row>
+<entry>#GHook *prev;</entry>
+<entry>.</entry>
+</row>
+
+<row>
+<entry>#guint ref_count;</entry>
+<entry>.</entry>
+</row>
+
+<row>
+<entry>#guint hook_id;</entry>
+<entry>.</entry>
+</row>
+
+<row>
+<entry>#guint flags;</entry>
+<entry>.</entry>
+</row>
+
+<row>
+<entry>#gpointer data;</entry>
+<entry>.</entry>
+</row>
+
+<row>
+<entry>#GDestroyNotify destroy;</entry>
+<entry>.</entry>
+</row>
+
+</tbody></tgroup></informaltable>
+</para>
+
+@data: 
+@next: 
+@prev: 
+@ref_count: 
+@hook_id: 
+@flags: 
+@func: 
+@destroy: 
+
+<!-- ##### USER_FUNCTION GHookFunc ##### -->
+<para>
+
+</para>
+
+@data: 
+
+
+<!-- ##### USER_FUNCTION GHookCheckFunc ##### -->
+<para>
+
+</para>
+
+@data: 
+@Returns: 
+
+
+<!-- ##### USER_FUNCTION GHookMarshaller ##### -->
+<para>
+
+</para>
+
+@hook: 
+@data: 
+
+
+<!-- ##### USER_FUNCTION GHookCheckMarshaller ##### -->
+<para>
+
+</para>
+
+@hook: 
+@data: 
+@Returns: 
+
+
+<!-- ##### USER_FUNCTION GHookFreeFunc ##### -->
+<para>
+
+</para>
+
+@hook_list: 
+@hook: 
+
+
+<!-- ##### MACRO G_HOOK_DEFERRED_DESTROY ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION g_hook_list_init ##### -->
+<para>
+Initializes a #GHookList.
+This must be called before the #GHookList is used.
+</para>
+
+@hook_list: a #GHookList.
+@hook_size: the size of each element in the #GHookList, typically
+sizeof (GHook).
+
+
+<!-- ##### FUNCTION g_hook_list_invoke ##### -->
+<para>
+Calls all of the #GHook functions in a #GHookList.
+</para>
+
+@hook_list: a #GHookList.
+@may_recurse: TRUE if functions which are already running (e.g. in another
+thread) can be called. If set to FALSE, these are skipped.
+
+
+<!-- ##### FUNCTION g_hook_list_invoke_check ##### -->
+<para>
+Calls all of the #GHook functions in a #GHookList.
+Any function which returns TRUE is removed from the #GHookList.
+</para>
+
+@hook_list: a #GHookList.
+@may_recurse: TRUE if functions which are already running (e.g. in another
+thread) can be called. If set to FALSE, these are skipped.
+
+
+<!-- ##### FUNCTION g_hook_list_marshal ##### -->
+<para>
+
+</para>
+
+@hook_list: a #GHookList.
+@may_recurse: 
+@marshaller: 
+@data: 
+
+
+<!-- ##### FUNCTION g_hook_list_marshal_check ##### -->
+<para>
+
+</para>
+
+@hook_list: a #GHookList.
+@may_recurse: 
+@marshaller: 
+@data: 
+
+
+<!-- ##### FUNCTION g_hook_list_clear ##### -->
+<para>
+Removes all the #GHook elements from a #GHookList.
+</para>
+
+@hook_list: a #GHookList.
+
+
+<!-- ##### FUNCTION g_hook_alloc ##### -->
+<para>
+Allocates space for a #GHook and initializes it.
+</para>
+
+@hook_list: a #GHookList.
+@Returns: a new #GHook.
+
+
+<!-- ##### MACRO g_hook_append ##### -->
+<para>
+Appends a #GHook onto the end of a #GHookList.
+</para>
+
+@hook_list: a #GHookList.
+@hook: the #GHook to add to the end of @hook_list.
+
+
+<!-- ##### FUNCTION g_hook_prepend ##### -->
+<para>
+Prepends a #GHook on the start of a #GHookList.
+</para>
+
+@hook_list: a #GHookList.
+@hook: the #GHook to add to the start of @hook_list.
+
+
+<!-- ##### FUNCTION g_hook_insert_before ##### -->
+<para>
+Inserts a #GHook into a #GHookList, before a given #GHook.
+</para>
+
+@hook_list: a #GHookList.
+@sibling: the #GHook to insert the new #GHook before.
+@hook: the #GHook to insert.
+
+
+<!-- ##### FUNCTION g_hook_insert_sorted ##### -->
+<para>
+Inserts a #GHook into a #GHookList, sorted by the given function.
+</para>
+
+@hook_list: a #GHookList.
+@hook: the #GHook to insert.
+@func: the comparison function used to sort the #GHook elements.
+
+
+<!-- ##### USER_FUNCTION GHookCompareFunc ##### -->
+<para>
+Defines the type of function used to compare #GHook elements in
+g_hook_insert_sorted().
+</para>
+
+@new_hook: the #GHook being inserted.
+@sibling: the #GHook to compare with @new_hook.
+@Returns: a value <= 0 if @new_hook should be before @sibling.
+
+
+<!-- ##### FUNCTION g_hook_compare_ids ##### -->
+<para>
+Compares the ids of two #GHook elements, returning a negative value
+if the second id is greater than the first.
+</para>
+
+@new_hook: a #GHook.
+@sibling: a #GHook to compare with @new_hook.
+@Returns: a value <= 0 if the id of @sibling is >= the id of @new_hook.
+
+
+<!-- ##### FUNCTION g_hook_get ##### -->
+<para>
+Returns the #GHook with the given id, or NULL if it is not found.
+</para>
+
+@hook_list: a #GHookList.
+@hook_id: a hook id.
+@Returns: the #GHook with the given id, or NULL if it is not found.
+
+
+<!-- ##### FUNCTION g_hook_find ##### -->
+<para>
+Finds a #GHook in a #GHookList using the given function to test for a match.
+</para>
+
+@hook_list: a #GHookList.
+@need_valids: TRUE if #GHook elements which have been destroyed should be
+skipped.
+@func: the function to call for each #GHook, which should return TRUE when
+the #GHook has been found.
+@data: the data passed to @func.
+@Returns: the found #GHook or NULL if no matching #GHook is found.
+
+
+<!-- ##### FUNCTION g_hook_find_data ##### -->
+<para>
+Finds a #GHook in a #GHookList with the given data.
+</para>
+
+@hook_list: a #GHookList.
+@need_valids: TRUE if #GHook elements which have been destroyed should be
+skipped.
+@data: the data to find.
+@Returns: the #GHook with the given @data or NULL if no matching
+#GHook is found.
+
+
+<!-- ##### FUNCTION g_hook_find_func ##### -->
+<para>
+Finds a #GHook in a #GHookList with the given function.
+</para>
+
+@hook_list: a #GHookList.
+@need_valids: TRUE if #GHook elements which have been destroyed should be
+skipped.
+@func: the function to find.
+@Returns: the #GHook with the given @func or NULL if no matching
+#GHook is found.
+
+
+<!-- ##### USER_FUNCTION GHookFindFunc ##### -->
+<para>
+Defines the type of the function passed to g_hooK_find_func().
+</para>
+
+@hook: a #GHook.
+@data: user data passed to g_hook_find_func().
+@Returns: TRUE if the required #GHook has been found.
+
+
+<!-- ##### FUNCTION g_hook_find_func_data ##### -->
+<para>
+Finds a #GHook in a #GHookList with the given function and data.
+</para>
+
+@hook_list: a #GHookList.
+@need_valids: TRUE if #GHook elements which have been destroyed should be
+skipped.
+@func: the function to find.
+@data: the data to find.
+@Returns: the #GHook with the given @func and @data or NULL if no matching
+#GHook is found.
+
+
+<!-- ##### FUNCTION g_hook_first_valid ##### -->
+<para>
+Returns the first #GHook in a #GHookList which has not been destroyed.
+The reference count for the #GHook is incremented, so you must call
+g_hook_unref() to restore it when no longer needed. (Or call
+g_hook_next_valid() if you are stepping through the #GHookList.)
+</para>
+
+@hook_list: a #GHookList.
+@may_be_in_call: TRUE if hooks which are currently running (e.g. in another
+thread) are considered valid. If set to FALSE, these are skipped.
+@Returns: the first valid #GHook, or NULL if none are valid.
+
+
+<!-- ##### FUNCTION g_hook_next_valid ##### -->
+<para>
+Returns the next #GHook in a #GHookList which has not been destroyed.
+The reference count for the #GHook is incremented, so you must call
+g_hook_unref() to restore it when no longer needed. (Or continue to call
+g_hook_next_valid() until NULL is returned.)
+
+</para>
+
+@hook_list: a #GHookList.
+@hook: the current #GHook.
+@may_be_in_call: TRUE if hooks which are currently running (e.g. in another
+thread) are considered valid. If set to FALSE, these are skipped.
+@Returns: the next valid #GHook, or NULL if none are valid.
+
+
+<!-- ##### ENUM GHookFlagMask ##### -->
+<para>
+
+</para>
+
+@G_HOOK_FLAG_ACTIVE: 
+@G_HOOK_FLAG_IN_CALL: 
+@G_HOOK_FLAG_MASK: 
+
+<!-- ##### MACRO G_HOOK_FLAG_USER_SHIFT ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO G_HOOK_IS_VALID ##### -->
+<para>
+Returns TRUE if the #GHook is valid, i.e. it is in a #GHookList, it is active
+and it has not been destroyed.
+</para>
+
+@hook: a #GHook.
+@Returns: TRUE if the #GHook is valid.
+
+
+<!-- ##### MACRO G_HOOK_ACTIVE ##### -->
+<para>
+Returns TRUE if the #GHook is active, which is normally TRUE until the #GHook
+is destroyed.
+</para>
+
+@hook: a #GHook.
+@Returns: TRUE if the #GHook is active.
+
+
+<!-- ##### MACRO G_HOOK_IN_CALL ##### -->
+<para>
+Returns TRUE if the #GHook function is currently executing.
+</para>
+
+@hook: a #GHook.
+@Returns: TRUE if the #GHook function is currently executing.
+
+
+<!-- ##### MACRO G_HOOK_IS_UNLINKED ##### -->
+<para>
+Returns TRUE if the #GHook is not in a #GHookList.
+
+</para>
+
+@hook: a #GHook.
+@Returns: TRUE if the #GHook is not in a #GHookList.
+
+
+<!-- ##### FUNCTION g_hook_ref ##### -->
+<para>
+Increments the reference count for a #GHook.
+</para>
+
+@hook_list: a #GHookList.
+@hook: the #GHook to increment the reference count of.
+
+
+<!-- ##### FUNCTION g_hook_unref ##### -->
+<para>
+Decrements the reference count of a #GHook.
+If the reference count falls to 0, the #GHook is removed from the #GHookList
+and g_hook_free() is called to free it.
+</para>
+
+@hook_list: a #GHookList.
+@hook: 
+
+
+<!-- ##### FUNCTION g_hook_free ##### -->
+<para>
+Calls the #GHookList @hook_free function if it exists, and frees the memory
+allocated for the #GHook.
+</para>
+
+@hook_list: a #GHookList.
+@hook: the #GHook to free.
+
+
+<!-- ##### FUNCTION g_hook_destroy ##### -->
+<para>
+Destroys a #GHook, given its ID.
+</para>
+
+@hook_list: a #GHookList.
+@hook_id: a hook ID.
+@Returns: TRUE if the #GHook was found in the #GHookList and destroyed.
+
+
+<!-- ##### FUNCTION g_hook_destroy_link ##### -->
+<para>
+Removes one #GHook from a #GHookList, calling the @hook_destroy function in
+the #GHookList, and the @destroy function of the #GHook, if they exist.
+</para>
+
+@hook_list: a #GHookList.
+@hook: the #GHook to remove.
+
+
diff --git a/docs/reference/glib/tmpl/iochannels.sgml b/docs/reference/glib/tmpl/iochannels.sgml
new file mode 100644 (file)
index 0000000..1c44eb2
--- /dev/null
@@ -0,0 +1,319 @@
+<!-- ##### SECTION Title ##### -->
+IO Channels
+
+<!-- ##### SECTION Short_Description ##### -->
+portable support for using files, pipes and sockets.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GIOChannel data type aims to provide a portable method for using file
+descriptors, pipes, and sockets, and integrating them into the
+<link linkend="glib-The-Main-Event-Loop">main event loop</link>.
+Currently full support is available on Unix platforms, though support for
+Windows is only partially complete.
+</para>
+<para>
+To create a new #GIOChannel on Unix systems use g_io_channel_unix_new().
+This works for plain file descriptors, pipes and sockets.
+</para>
+<para>
+Once a #GIOChannel has been created, it can be used in a generic manner
+with the functions g_io_channel_read(), g_io_channel_write(),
+g_io_channel_seek(), and g_io_channel_close().
+</para>
+<para>
+To add a #GIOChannel to the 
+<link linkend="glib-The-Main-Event-Loop">main event loop</link>
+use g_io_add_watch() or g_io_add_watch_full(). Here you specify which events
+you are interested in on the #GIOChannel, and provide a function to be
+called whenever these events occur.
+</para>
+<para>
+#GIOChannel instances are created with an initial reference count of 1.
+g_io_channel_ref() and g_io_channel_unref() can be used to increment or
+decrement the reference count respectively. When the reference count falls
+to 0, the #GIOChannel is freed. (Though it isn't closed automatically.)
+Using g_io_add_watch() or g_io_add_watch_full() increments a channel's
+reference count.
+</para>
+<para>
+GTK+ contains the convenience function gtk_input_add_full()
+which creates a #GIOChannel from a file descriptor and adds it to the
+<link linkend="glib-The-Main-Event-Loop">main event loop</link>.
+The event source can later be removed with gtk_input_remove().
+Similar functions can also be found in GDK.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+<variablelist>
+
+<varlistentry>
+<term>gtk_input_add_full(), gtk_input_remove(), gdk_input_add(),
+gdk_input_add_full(), gdk_input_remove()</term>
+<listitem><para>
+Convenience functions for creating #GIOChannel instances and adding them to the
+<link linkend="glib-The-Main-Event-Loop">main event loop</link>.
+</para></listitem>
+</varlistentry>
+
+</variablelist>
+</para>
+
+<!-- ##### STRUCT GIOChannel ##### -->
+<para>
+A data structure representing an IO Channel. The fields should be considered
+private and should only be accessed with the following functions.
+</para>
+
+@channel_flags: 
+@ref_count: 
+@funcs: 
+
+<!-- ##### FUNCTION g_io_channel_unix_new ##### -->
+<para>
+Creates a new #GIOChannel given a file descriptor.
+On Unix systems this works for plain files, pipes, and sockets.
+</para>
+<para>
+The returned #GIOChannel has a reference count of 1.
+</para>
+
+@fd: a file descriptor.
+@Returns: a new #GIOChannel.
+
+
+<!-- ##### FUNCTION g_io_channel_unix_get_fd ##### -->
+<para>
+Returns the file descriptor of the Unix #GIOChannel.
+</para>
+
+@channel: a #GIOChannel, created with g_io_channel_unix_new().
+@Returns: the file descriptor of the #GIOChannel.
+
+
+<!-- ##### FUNCTION g_io_channel_init ##### -->
+<para>
+Initializes a #GIOChannel struct. This is called by each of the above functions
+when creating a #GIOChannel, and so is not often needed by the application
+programmer (unless you are creating a new type of #GIOChannel).
+</para>
+
+@channel: a #GIOChannel.
+
+
+<!-- ##### FUNCTION g_io_channel_read ##### -->
+<para>
+Reads data from a #GIOChannel.
+</para>
+
+@channel: a #GIOChannel.
+@buf: a buffer to read the data into (which should be at least count bytes
+long).
+@count: the number of bytes to read from the #GIOChannel.
+@bytes_read: returns the number of bytes actually read.
+@Returns: %G_IO_ERROR_NONE if the operation was successful.
+
+
+<!-- ##### ENUM GIOError ##### -->
+<para>
+
+</para>
+
+@G_IO_ERROR_NONE: 
+@G_IO_ERROR_AGAIN: 
+@G_IO_ERROR_INVAL: 
+@G_IO_ERROR_UNKNOWN: 
+
+<!-- ##### FUNCTION g_io_channel_write ##### -->
+<para>
+Writes data to a #GIOChannel.
+</para>
+
+@channel: a #GIOChannel.
+@buf: the buffer containing the data to write.
+@count: the number of bytes to write.
+@bytes_written: the number of bytes actually written.
+@Returns: %G_IO_ERROR_NONE if the operation was successful.
+
+
+<!-- ##### FUNCTION g_io_channel_seek ##### -->
+<para>
+Sets the current position in the #GIOChannel, similar to the standard system
+call <function>fseek()</function>.
+</para>
+
+@channel: a #GIOChannel.
+@offset: an offset, in bytes, which is added to the position specified by
+@type.
+@type: the position in the file, which can be %G_SEEK_CUR (the current
+position), %G_SEEK_SET (the start of the file), or %G_SEEK_END (the end of the
+file).
+@Returns: %G_IO_ERROR_NONE if the operation was successful.
+
+
+<!-- ##### ENUM GSeekType ##### -->
+<para>
+An enumeration specifying the base position for a g_io_channel_seek()
+operation.
+
+<informaltable pgwide=1 frame="none" role="enum">
+<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<tbody>
+
+<row>
+<entry>G_SEEK_CUR</entry>
+<entry>the current position in the file.</entry>
+</row>
+
+<row>
+<entry>G_SEEK_SET</entry>
+<entry>the start of the file.</entry>
+</row>
+
+<row>
+<entry>G_SEEK_END</entry>
+<entry>the end of the file.</entry>
+</row>
+
+</tbody></tgroup></informaltable>
+
+</para>
+
+@G_SEEK_CUR: 
+@G_SEEK_SET: 
+@G_SEEK_END: 
+
+<!-- ##### FUNCTION g_io_channel_close ##### -->
+<para>
+Closes a #GIOChannel.
+The #GIOChannel will be freed when its reference count drops to 0.
+</para>
+
+@channel: a #GIOChannel.
+
+
+<!-- ##### FUNCTION g_io_channel_ref ##### -->
+<para>
+Increments the reference count of a #GIOChannel.
+</para>
+
+@channel: a #GIOChannel.
+
+
+<!-- ##### FUNCTION g_io_channel_unref ##### -->
+<para>
+Decrements the reference count of a #GIOChannel.
+</para>
+
+@channel: a #GIOChannel.
+
+
+<!-- ##### FUNCTION g_io_add_watch ##### -->
+<para>
+Adds the #GIOChannel into the
+<link linkend="glib-The-Main-Event-Loop">main event loop</link>
+with the default priority.
+</para>
+
+@channel: a #GIOChannel.
+@condition: the condition to watch for.
+@func: the function to call when the condition is satisfied.
+@user_data: user data to pass to @func.
+@Returns: the event source id.
+
+
+<!-- ##### FUNCTION g_io_add_watch_full ##### -->
+<para>
+Adds the #GIOChannel into the
+<link linkend="glib-The-Main-Event-Loop">main event loop</link>
+with the given priority.
+</para>
+
+@channel: a #GIOChannel.
+@priority: the priority of the #GIOChannel source.
+@condition: the condition to watch for.
+@func: the function to call when the condition is satisfied.
+@user_data: user data to pass to @func.
+@notify: the function to call when the source is removed.
+@Returns: the event source id.
+
+
+<!-- ##### ENUM GIOCondition ##### -->
+<para>
+A bitwise combination representing a condition to watch for on an event
+source.
+
+<informaltable pgwide=1 frame="none" role="enum">
+<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<tbody>
+
+<row>
+<entry>G_IO_IN</entry>
+<entry>There is data to read.</entry>
+</row>
+
+<row>
+<entry>G_IO_OUT</entry>
+<entry>Data can be written (without blocking).</entry>
+</row>
+
+<row>
+<entry>G_IO_PRI</entry>
+<entry>There is urgent data to read.</entry>
+</row>
+
+<row>
+<entry>G_IO_ERR</entry>
+<entry>Error condition.</entry>
+</row>
+
+<row>
+<entry>G_IO_HUP</entry>
+<entry>Hung up (the connection has been broken, usually for pipes and
+sockets).</entry>
+</row>
+
+<row>
+<entry>G_IO_NVAL</entry>
+<entry>Invalid request. The file descriptor is not open.</entry>
+</row>
+
+</tbody></tgroup></informaltable>
+
+</para>
+
+@G_IO_IN: 
+@G_IO_OUT: 
+@G_IO_PRI: 
+@G_IO_ERR: 
+@G_IO_HUP: 
+@G_IO_NVAL: 
+
+<!-- ##### USER_FUNCTION GIOFunc ##### -->
+<para>
+Specifies the type of function passed to g_io_add_watch() or
+g_io_add_watch_full(), which is called when the requested condition on a
+#GIOChannel is satisfied.
+</para>
+
+@source: the #GIOChannel event source.
+@condition: the condition which has been satisfied.
+@data: user data set in g_io_add_watch() or g_io_add_watch_full().
+@Returns: the function should return FALSE if the event source should be
+removed.
+
+
+<!-- ##### STRUCT GIOFuncs ##### -->
+<para>
+A table of functions used to handle different types of #GIOChannel in a
+generic way.
+</para>
+
+@io_read: 
+@io_write: 
+@io_seek: 
+@io_close: 
+@io_add_watch: 
+@io_free: 
+
diff --git a/docs/reference/glib/tmpl/limits.sgml b/docs/reference/glib/tmpl/limits.sgml
new file mode 100644 (file)
index 0000000..ec68926
--- /dev/null
@@ -0,0 +1,87 @@
+<!-- ##### SECTION Title ##### -->
+Limits of Basic Types
+
+<!-- ##### SECTION Short_Description ##### -->
+portable method of determining the limits of the standard types.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These macros provide a portable method to determine the limits of some of
+the standard integer and floating point types.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO G_MININT ##### -->
+<para>
+The minimum value which can be held in a #gint.
+</para>
+
+
+
+<!-- ##### MACRO G_MAXINT ##### -->
+<para>
+The maximum value which can be held in a #gint.
+</para>
+
+
+
+<!-- ##### MACRO G_MINSHORT ##### -->
+<para>
+The minimum value which can be held in a #gshort.
+</para>
+
+
+
+<!-- ##### MACRO G_MAXSHORT ##### -->
+<para>
+The maximum value which can be held in a #gshort.
+</para>
+
+
+
+<!-- ##### MACRO G_MINLONG ##### -->
+<para>
+The minimum value which can be held in a #glong.
+</para>
+
+
+
+<!-- ##### MACRO G_MAXLONG ##### -->
+<para>
+The maximum value which can be held in a #glong.
+</para>
+
+
+
+<!-- ##### MACRO G_MINFLOAT ##### -->
+<para>
+The minimum value which can be held in a #gfloat.
+</para>
+
+
+
+<!-- ##### MACRO G_MAXFLOAT ##### -->
+<para>
+The maximum value which can be held in a #gfloat.
+</para>
+
+
+
+<!-- ##### MACRO G_MINDOUBLE ##### -->
+<para>
+The minimum value which can be held in a #gdouble.
+</para>
+
+
+
+<!-- ##### MACRO G_MAXDOUBLE ##### -->
+<para>
+The maximum value which can be held in a #gdouble.
+</para>
+
+
+
diff --git a/docs/reference/glib/tmpl/linked_lists_double.sgml b/docs/reference/glib/tmpl/linked_lists_double.sgml
new file mode 100644 (file)
index 0000000..63ae2cf
--- /dev/null
@@ -0,0 +1,406 @@
+<!-- ##### SECTION Title ##### -->
+Doubly-Linked Lists
+
+<!-- ##### SECTION Short_Description ##### -->
+linked lists containing integer values or pointers to data, with the ability
+to iterate over the list in both directions.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GList structure and its associated functions provide a standard
+doubly-linked list data structure.
+</para>
+<para>
+Each element in the list contains a piece of data, together with pointers
+which link to the previous and next elements in the list.
+Using these pointers it is possible to move through the list in both
+directions (unlike the
+<link linkend="glib-Singly-Linked-lists">Singly-Linked Lists</link>
+which only allows movement through the list in the forward direction).
+</para>
+<para>
+The data contained in each element can be either integer values, by using one
+of the
+<link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>,
+or simply pointers to any type of data.
+</para>
+<para>
+List elements are allocated in blocks using a #GListAllocator, which is
+more efficient than allocating elements individually.
+</para>
+<para>
+Note that most of the #GList functions expect to be passed a pointer to
+the first element in the list. The functions which insert elements return
+the new start of the list, which may have changed.
+</para>
+<para>
+There is no function to create a #GList. NULL is considered to be the empty
+list so you simply set a #GList* to NULL.
+<para>
+To add elements, use g_list_append(), g_list_prepend(), g_list_insert()
+and g_list_insert_sorted().
+</para>
+<para>
+To remove elements, use g_list_remove().
+</para>
+<para>
+To find elements in the list use g_list_first(), g_list_last(), g_list_next(),
+g_list_previous(), g_list_nth(), g_list_nth_data(), g_list_find() and
+g_list_find_custom().
+</para>
+<para>
+To find the index of an element use g_list_position() and g_list_index().
+</para>
+<para>
+To call a function for each element in the list use g_list_foreach().
+</para>
+<para>
+To free the entire list, use g_list_free().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GList ##### -->
+<para>
+The #GList struct is used for each element in a doubly-linked list.
+The <structfield>data</structfield> field holds the element's data, which can
+be a pointer to any kind of data, or any integer value using the
+<link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>.
+The <structfield>next</structfield> and <structfield>prev</structfield>
+pointers are the links to the next and previous elements in the list.
+</para>
+
+@data: 
+@next: 
+@prev: 
+
+<!-- ##### FUNCTION g_list_append ##### -->
+<para>
+Adds a new element on to the end of the list.
+</para>
+<note>
+<para>
+The return value is the new start of the list, which may have changed, so
+make sure you store the new value.
+</para>
+</note>
+<informalexample><programlisting>
+  /* Notice that these are initialized to the empty list. */
+  GList *list = NULL, *number_list = NULL;
+
+  /* This is a list of strings. */
+  list = g_list_append (list, "first");
+  list = g_list_append (list, "second");
+
+  /* This is a list of integers. */
+  number_list = g_list_append (number_list, GINT_TO_POINTER (27));
+  number_list = g_list_append (number_list, GINT_TO_POINTER (14));
+</programlisting></informalexample>
+
+@list: a pointer to a #GList.
+@data: the data for the new element.
+@Returns: the new start of the #GList.
+
+
+<!-- ##### FUNCTION g_list_prepend ##### -->
+<para>
+Adds a new element on to the start of the list.
+</para>
+<note>
+<para>
+The return value is the new start of the list, which may have changed, so
+make sure you store the new value.
+</para>
+</note>
+<informalexample><programlisting>
+  /* Notice that it is initialized to the empty list. */
+  GList *list = NULL;
+  list = g_list_prepend (list, "last");
+  list = g_list_prepend (list, "first");
+</programlisting></informalexample>
+
+@list: a pointer to a #GList.
+@data: the data for the new element.
+@Returns: the new start of the #GList.
+
+
+<!-- ##### FUNCTION g_list_insert ##### -->
+<para>
+Inserts a new element into the list at the given position.
+</para>
+
+@list: a pointer to a #GList.
+@data: the data for the new element.
+@position: the position to insert the element. If this is negative, or is
+larger than the number of elements in the list, the new element is added on
+to the end of the list.
+@Returns: the new start of the #GList.
+
+
+<!-- ##### FUNCTION g_list_insert_sorted ##### -->
+<para>
+Inserts a new element into the list, using the given comparison function
+to determine its position.
+</para>
+
+@list: a pointer to a #GList.
+@data: the data for the new element.
+@func: the function to compare elements in the list. It should return a
+number > 0 if the first parameter comes after the second parameter in
+the sort order.
+@Returns: the new start of the #GList.
+
+
+<!-- ##### FUNCTION g_list_remove ##### -->
+<para>
+Removes an element from a #GList.
+If two elements contain the same data, only the first is removed.
+If none of the elements contain the data, the #GList is unchanged.
+</para>
+
+@list: a #GList.
+@data: the data of the element to remove.
+@Returns: the new start of the #GList.
+
+
+<!-- ##### FUNCTION g_list_remove_link ##### -->
+<para>
+Removes an element from a #GList, without freeing the element.
+The removed element's prev and next links are set to NULL, so that it becomes a
+self-contained list with one element.
+</para>
+
+@list: a #GList.
+@llink: an element in the #GList.
+@Returns: the new start of the #GList, without the element.
+
+
+<!-- ##### FUNCTION g_list_free ##### -->
+<para>
+Frees all of the memory used by a #GList.
+The freed elements are added to the #GListAllocator free list.
+</para>
+<note>
+<para>
+If list elements contain dynamically-allocated memory, they should be freed
+first.
+</para>
+</note>
+
+@list: 
+
+
+<!-- ##### FUNCTION g_list_alloc ##### -->
+<para>
+Allocates space for one #GList element.
+It is called by g_list_append(), g_list_prepend(), g_list_insert() and
+g_list_insert_sorted() and so is rarely used on its own.
+</para>
+
+@Returns: a pointer to the newly-allocated #GList element.
+
+
+<!-- ##### FUNCTION g_list_free_1 ##### -->
+<para>
+Frees one #GList element.
+It is usually used after g_list_remove_link().
+</para>
+
+@list: a #GList element.
+
+
+<!-- ##### FUNCTION g_list_length ##### -->
+<para>
+Gets the number of elements in a #GList.
+</para>
+
+@list: a #GList.
+@Returns: the number of elements in the #GList.
+
+
+<!-- ##### FUNCTION g_list_copy ##### -->
+<para>
+
+</para>
+
+@list: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_list_reverse ##### -->
+<para>
+Reverses a #GList.
+It simply switches the next and prev pointers of each element.
+</para>
+
+@list: a #GList.
+@Returns: the start of the reversed #GList.
+
+
+<!-- ##### FUNCTION g_list_sort ##### -->
+<para>
+
+</para>
+
+@list: 
+@compare_func: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_list_concat ##### -->
+<para>
+Adds the second #GList onto the end of the first #GList.
+Note that the elements of the second #GList are not copied.
+They are used directly.
+</para>
+
+@list1: a #GList.
+@list2: the #GList to add to the end of the first #GList.
+@Returns: the start of the new #GList.
+
+
+<!-- ##### FUNCTION g_list_foreach ##### -->
+<para>
+Calls a function for each element of a #GList.
+</para>
+
+@list: a #GList.
+@func: the function to call with each element's data.
+@user_data: user data to pass to the function.
+
+
+<!-- ##### USER_FUNCTION GFunc ##### -->
+<para>
+Specifies the type of functions passed to g_list_foreach() and
+g_slist_foreach().
+</para>
+
+@data: the element's data.
+@user_data: user data passed to g_list_foreach() or g_slist_foreach().
+
+
+<!-- ##### FUNCTION g_list_first ##### -->
+<para>
+Gets the first element in a #GList.
+</para>
+
+@list: a #GList.
+@Returns: the first element in a #GList, or NULL if the #GList has no elements.
+
+
+<!-- ##### FUNCTION g_list_last ##### -->
+<para>
+Gets the last element in a #GList.
+</para>
+
+@list: a #GList.
+@Returns: the last element in the #GList, or NULL if the #GList has no
+elements.
+
+
+<!-- ##### MACRO g_list_previous ##### -->
+<para>
+A convenience macro to gets the previous element in a #GList.
+</para>
+
+@list: an element in a #GList.
+@Returns: the previous element, or NULL if there are no previous elements.
+
+
+<!-- ##### MACRO g_list_next ##### -->
+<para>
+A convenience macro to gets the next element in a #GList.
+</para>
+
+@list: an element in a #GList.
+@Returns: the next element, or NULL if there are no more elements.
+
+
+<!-- ##### FUNCTION g_list_nth ##### -->
+<para>
+Gets the element at the given position in a #GList.
+</para>
+
+@list: a #GList.
+@n: the position of the element, counting from 0.
+@Returns: the element, or NULL if the position is off the end of the #GList.
+
+
+<!-- ##### FUNCTION g_list_nth_data ##### -->
+<para>
+Gets the data of the element at the given position.
+</para>
+
+@list: a #GList.
+@n: the position of the element.
+@Returns: the element's data, or NULL if the position is off the end of the
+#GList.
+
+
+<!-- ##### FUNCTION g_list_find ##### -->
+<para>
+Finds the element in a #GList which contains the given data.
+</para>
+
+@list: a #GList.
+@data: the element data to find.
+@Returns: the found #GList element, or NULL if it is not found.
+
+
+<!-- ##### FUNCTION g_list_find_custom ##### -->
+<para>
+Finds an element in a #GList, using a supplied function to find the desired
+element.
+It iterates over the list, calling the given function which should return 0
+when the desired element is found.
+The function takes two #gconstpointer arguments, the #GList element's data
+and the given user data.
+</para>
+
+@list: a #GList.
+@data: user data passed to the function.
+@func: the function to call for each element. It should return 0 when the
+desired element is found.
+@Returns: the found #GList element, or NULL if it is not found.
+
+
+<!-- ##### FUNCTION g_list_position ##### -->
+<para>
+Gets the position of the given element in the #GList (starting from 0).
+</para>
+
+@list: a #GList.
+@llink: an element in the #GList.
+@Returns: the position of the element in the #GList, or -1 if the element is
+not found.
+
+
+<!-- ##### FUNCTION g_list_index ##### -->
+<para>
+Gets the position of the element containing the given data (starting from 0).
+</para>
+
+@list: a #GList.
+@data: the data to find.
+@Returns: the index of the element containing the data, or -1 if the data
+is not found.
+
+
+<!-- ##### FUNCTION g_list_pop_allocator ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION g_list_push_allocator ##### -->
+<para>
+
+</para>
+
+@allocator: 
+
+
diff --git a/docs/reference/glib/tmpl/linked_lists_single.sgml b/docs/reference/glib/tmpl/linked_lists_single.sgml
new file mode 100644 (file)
index 0000000..68f7f01
--- /dev/null
@@ -0,0 +1,370 @@
+<!-- ##### SECTION Title ##### -->
+Singly-Linked Lists
+
+<!-- ##### SECTION Short_Description ##### -->
+linked lists containing integer values or pointers to data, limited to
+iterating over the list in one direction.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GSList structure and its associated functions provide a standard
+singly-linked list data structure.
+</para>
+<para>
+Each element in the list contains a piece of data, together with a pointer
+which links to the next element in the list.
+Using this pointer it is possible to move through the list in one
+direction only (unlike the
+<link linkend="glib-Doubly-Linked-lists">Doubly-Linked Lists</link>
+which allow movement in both directions).
+</para>
+<para>
+The data contained in each element can be either integer values, by using one
+of the
+<link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>,
+or simply pointers to any type of data.
+</para>
+<para>
+List elements are allocated in blocks using a #GListAllocator, which is
+more efficient than allocating elements individually.
+</para>
+<para>
+Note that most of the #GSList functions expect to be passed a pointer to
+the first element in the list. The functions which insert elements return
+the new start of the list, which may have changed.
+</para>
+<para>
+There is no function to create a #GSList. NULL is considered to be the empty
+list so you simply set a #GSList* to NULL.
+<para>
+To add elements, use g_slist_append(), g_slist_prepend(), g_slist_insert()
+and g_slist_insert_sorted().
+</para>
+<para>
+To remove elements, use g_slist_remove().
+</para>
+<para>
+To find elements in the list use g_slist_last(), g_slist_next(),
+g_slist_nth(), g_slist_nth_data(), g_slist_find() and
+g_slist_find_custom().
+</para>
+<para>
+To find the index of an element use g_slist_position() and g_slist_index().
+</para>
+<para>
+To call a function for each element in the list use g_slist_foreach().
+</para>
+<para>
+To free the entire list, use g_slist_free().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GSList ##### -->
+<para>
+The #GSList struct is used for each element in the singly-linked list.
+The <structfield>data</structfield> field holds the element's data, which can
+be a pointer to any kind of data, or any integer value using the
+<link linkend="glib-Type-Conversion-Macros">Type Conversion Macros</link>.
+The <structfield>next</structfield> field contains the link to the next
+element in the list.
+</para>
+
+@data: 
+@next: 
+
+<!-- ##### FUNCTION g_slist_alloc ##### -->
+<para>
+Allocates space for one #GSList element.
+It is called by the g_slist_append(), g_slist_prepend(), g_slist_insert() and
+g_slist_insert_sorted() functions and so is rarely used on its own.
+</para>
+
+@Returns: a pointer to the newly-allocated #GSList element.
+
+
+<!-- ##### FUNCTION g_slist_append ##### -->
+<para>
+Adds a new element on to the end of the list.
+</para>
+<note>
+<para>
+The return value is the new start of the list, which may have changed, so
+make sure you store the new value.
+</para>
+</note>
+<informalexample><programlisting>
+  /* Notice that these are initialized to the empty list. */
+  GSList *list = NULL, *number_list = NULL;
+
+  /* This is a list of strings. */
+  list = g_slist_append (list, "first");
+  list = g_slist_append (list, "second");
+
+  /* This is a list of integers. */
+  number_list = g_slist_append (number_list, GINT_TO_POINTER (27));
+  number_list = g_slist_append (number_list, GINT_TO_POINTER (14));
+</programlisting></informalexample>
+
+@list: a #GSList.
+@data: the data for the new element.
+@Returns: the new start of the #GSList.
+
+
+<!-- ##### FUNCTION g_slist_prepend ##### -->
+<para>
+Adds a new element on to the start of the list.
+</para>
+<note>
+<para>
+The return value is the new start of the list, which may have changed, so
+make sure you store the new value.
+</para>
+</note>
+<informalexample><programlisting>
+  /* Notice that it is initialized to the empty list. */
+  GSList *list = NULL;
+  list = g_slist_prepend (list, "last");
+  list = g_slist_prepend (list, "first");
+</programlisting></informalexample>
+
+@list: a #GSList.
+@data: the data for the new element.
+@Returns: the new start of the #GSList.
+
+
+<!-- ##### FUNCTION g_slist_insert ##### -->
+<para>
+Inserts a new element into the list at the given position.
+</para>
+
+@list: a #GSList.
+@data: the data for the new element.
+@position: the position to insert the element. If this is negative, or is
+larger than the number of elements in the list, the new element is added on
+to the end of the list.
+@Returns: the new start of the #GSList.
+
+
+<!-- ##### FUNCTION g_slist_insert_sorted ##### -->
+<para>
+Inserts a new element into the list, using the given comparison function
+to determine its position.
+</para>
+
+@list: a #GSList.
+@data: the data for the new element.
+@func: the function to compare elements in the list. It should return a
+number > 0 if the first parameter comes after the second parameter in
+the sort order.
+@Returns: the new start of the #GSList.
+
+
+<!-- ##### FUNCTION g_slist_remove ##### -->
+<para>
+Removes an element from a #GSList.
+If two elements contain the same data, only the first is removed.
+If none of the elements contain the data, the #GSList is unchanged.
+</para>
+
+@list: a #GSList.
+@data: the data of the element to remove.
+@Returns: the new start of the #GSList.
+
+
+<!-- ##### FUNCTION g_slist_remove_link ##### -->
+<para>
+Removes an element from a #GSList, without freeing the element.
+The removed element's next link is set to NULL, so that it becomes a
+self-contained list with one element.
+</para>
+
+@list: a #GSList.
+@llink: an element in the #GSList.
+@Returns: the new start of the #GSList, without the element.
+
+
+<!-- ##### FUNCTION g_slist_free ##### -->
+<para>
+Frees all of the memory used by a #GSList.
+The freed elements are added to the #GListAllocator free list.
+</para>
+
+@list: a #GSList.
+
+
+<!-- ##### FUNCTION g_slist_free_1 ##### -->
+<para>
+Frees one #GSList element.
+It is usually used after g_slist_remove_link().
+</para>
+
+@list: a #GSList element.
+
+
+<!-- ##### FUNCTION g_slist_length ##### -->
+<para>
+Gets the number of elements in a #GSList.
+</para>
+
+@list: a #GSList.
+@Returns: the number of elements in the #GSList.
+
+
+<!-- ##### FUNCTION g_slist_copy ##### -->
+<para>
+
+</para>
+
+@list: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_slist_reverse ##### -->
+<para>
+Reverses a #GSList.
+</para>
+
+@list: a #GSList.
+@Returns: the start of the reversed #GSList.
+
+
+<!-- ##### FUNCTION g_slist_sort ##### -->
+<para>
+
+</para>
+
+@list: 
+@compare_func: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_slist_concat ##### -->
+<para>
+Adds the second #GSList onto the end of the first #GSList.
+Note that the elements of the second #GSList are not copied.
+They are used directly.
+</para>
+
+@list1: a #GSList.
+@list2: the #GSList to add to the end of the first #GSList.
+@Returns: the start of the new #GSList.
+
+
+<!-- ##### FUNCTION g_slist_foreach ##### -->
+<para>
+Calls a function for each element of a #GSList.
+</para>
+
+@list: a #GSList.
+@func: the function to call with each element's data.
+@user_data: user data to pass to the function.
+
+
+<!-- ##### FUNCTION g_slist_last ##### -->
+<para>
+Gets the last element in a #GSList.
+</para>
+
+@list: a #GSList.
+@Returns: the last element in the #GSList, or NULL if the #GSList has no
+elements.
+
+
+<!-- ##### MACRO g_slist_next ##### -->
+<para>
+A convenience macro to gets the next element in a #GSList.
+</para>
+
+@slist: an element in a #GSList.
+@Returns: the next element, or NULL if there are no more elements.
+
+
+<!-- ##### FUNCTION g_slist_nth ##### -->
+<para>
+Gets the element at the given position in a #GSList.
+</para>
+
+@list: a #GSList.
+@n: the position of the element, counting from 0.
+@Returns: the element, or NULL if the position is off the end of the #GSList.
+
+
+<!-- ##### FUNCTION g_slist_nth_data ##### -->
+<para>
+Gets the data of the element at the given position.
+</para>
+
+@list: a #GSList.
+@n: the position of the element.
+@Returns: the element's data, or NULL if the position is off the end of the
+#GSList.
+
+
+<!-- ##### FUNCTION g_slist_find ##### -->
+<para>
+Finds the element in a #GSList which contains the given data.
+</para>
+
+@list: a #GSList.
+@data: the element data to find.
+@Returns: the found #GSList element, or NULL if it is not found.
+
+
+<!-- ##### FUNCTION g_slist_find_custom ##### -->
+<para>
+Finds an element in a #GSList, using a supplied function to find the desired
+element.
+It iterates over the list, calling the given function which should return 0
+when the desired element is found.
+The function takes two #gconstpointer arguments, the #GSList element's data
+and the given user data.
+</para>
+
+@list: a #GSList.
+@data: user data passed to the function.
+@func: the function to call for each element. It should return 0 when the
+desired element is found.
+@Returns: the found #GSList element, or NULL if it is not found.
+
+
+<!-- ##### FUNCTION g_slist_position ##### -->
+<para>
+Gets the position of the given element in the #GSList (starting from 0).
+</para>
+
+@list: a #GSList.
+@llink: an element in the #GSList.
+@Returns: the position of the element in the #GSList, or -1 if the element
+is not found.
+
+
+<!-- ##### FUNCTION g_slist_index ##### -->
+<para>
+Gets the position of the element containing the given data (starting from 0).
+</para>
+
+@list: a #GSList.
+@data: the data to find.
+@Returns: the index of the element containing the data, or -1 if the data
+is not found.
+
+
+<!-- ##### FUNCTION g_slist_pop_allocator ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION g_slist_push_allocator ##### -->
+<para>
+
+</para>
+
+@allocator: 
+
+
diff --git a/docs/reference/glib/tmpl/macros.sgml b/docs/reference/glib/tmpl/macros.sgml
new file mode 100644 (file)
index 0000000..e597270
--- /dev/null
@@ -0,0 +1,207 @@
+<!-- ##### SECTION Title ##### -->
+Standard Macros
+
+<!-- ##### SECTION Short_Description ##### -->
+commonly-used macros.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These macros provide a few commonly-used features.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO GLIB_MAJOR_VERSION ##### -->
+<para>
+The major version number of the GLib library.
+</para>
+
+
+
+<!-- ##### MACRO GLIB_MINOR_VERSION ##### -->
+<para>
+The minor version number of the GLib library.
+</para>
+
+
+
+<!-- ##### MACRO GLIB_MICRO_VERSION ##### -->
+<para>
+The micro version number of the GLib library.
+</para>
+
+
+
+<!-- ##### MACRO GLIB_CHECK_VERSION ##### -->
+<para>
+Checks the version of the GLib library.
+It returns TRUE if the GLib library is the same or newer than the given
+version.
+
+<example>
+<title>Checking the version of the GLib library.</title>
+<programlisting>
+  if (!GLIB_CHECK_VERSION (1, 2, 0))
+    g_error ("GLib version 1.2.0 or above is needed");
+</programlisting>
+</example>
+</para>
+
+@major: the major version number.
+@minor: the minor version number.
+@micro: the micro version number.
+
+
+<!-- ##### MACRO G_DIR_SEPARATOR ##### -->
+<para>
+The directory separator character.
+This is '/' on Unix machines and '\' under Windows.
+</para>
+
+
+
+<!-- ##### MACRO G_DIR_SEPARATOR_S ##### -->
+<para>
+The directory separator as a string.
+This is "/" on Unix machines and "\" under Windows.
+</para>
+
+
+
+<!-- ##### MACRO G_SEARCHPATH_SEPARATOR ##### -->
+<para>
+The search path separator character.
+This is ':' on Unix machines and ';' under Windows.
+</para>
+
+
+
+<!-- ##### MACRO G_SEARCHPATH_SEPARATOR_S ##### -->
+<para>
+The search path separator as a string.
+This is ":" on Unix machines and ";" under Windows.
+</para>
+
+
+
+<!-- ##### MACRO TRUE ##### -->
+<para>
+Defines the TRUE value for the #gboolean type.
+</para>
+
+
+
+<!-- ##### MACRO FALSE ##### -->
+<para>
+Defines the FALSE value for the #gboolean type.
+</para>
+
+
+
+<!-- ##### MACRO NULL ##### -->
+<para>
+Defines the standard NULL pointer.
+</para>
+
+
+
+<!-- ##### MACRO MIN ##### -->
+<para>
+Calculates the minimum of @a and @b.
+</para>
+
+@a: a numeric value.
+@b: a numeric value.
+@Returns: the minimum of @a and @b.
+
+
+<!-- ##### MACRO MAX ##### -->
+<para>
+Calculates the maximum of @a and @b.
+</para>
+
+@a: a numeric value.
+@b: a numeric value.
+@Returns: the maximum of @a and @b.
+
+
+<!-- ##### MACRO ABS ##### -->
+<para>
+Calculates the absolute value of @a.
+The absolute value is simply the number with any negative sign taken away.
+</para>
+<para>
+For example,
+<itemizedlist>
+<listitem><para>
+ABS(-10) is 10.
+</para></listitem>
+<listitem><para>
+ABS(10) is also 10.
+</para></listitem>
+</itemizedlist>
+</para>
+
+@a: a numeric value.
+@Returns: the absolute value of @a.
+
+
+<!-- ##### MACRO CLAMP ##### -->
+<para>
+Ensures that @x is between the limits set by @low and @high.
+</para>
+<para>
+For example,
+<itemizedlist>
+<listitem><para>
+CLAMP(5, 10, 15) is 10.
+</para></listitem>
+<listitem><para>
+CLAMP(15, 5, 10) is 10.
+</para></listitem>
+<listitem><para>
+CLAMP(20, 15, 25) is 20.
+</para></listitem>
+</itemizedlist>
+</para>
+
+@x: the value to clamp.
+@low: the minimum value allowed.
+@high: the maximum value allowed.
+@Returns: the value of @x clamped to the range between @low and @high.
+
+
+<!-- ##### MACRO G_STRUCT_MEMBER ##### -->
+<para>
+Returns a member of a structure at a given offset, using the given type.
+</para>
+
+@member_type: the type of the struct field.
+@struct_p: a pointer to a struct.
+@struct_offset: the offset of the field from the start of the struct, in bytes.
+@Returns: the struct member.
+
+
+<!-- ##### MACRO G_STRUCT_MEMBER_P ##### -->
+<para>
+Returns an untyped pointer to a given offset of a struct.
+</para>
+
+@struct_p: a pointer to a struct.
+@struct_offset: the offset from the start of the struct, in bytes.
+@Returns: an untyped pointer to @struct_p plus @struct_offset bytes.
+
+
+<!-- ##### MACRO G_STRUCT_OFFSET ##### -->
+<para>
+Returns the offset, in bytes, of a member of a struct.
+</para>
+
+@struct_type: a structure type, e.g. <structname>GtkWidget</structname>.
+@member: a field in the structure, e.g. <structfield>window</structfield>.
+@Returns: the offset of @member from the start of @struct_type.
+
+
diff --git a/docs/reference/glib/tmpl/macros_misc.sgml b/docs/reference/glib/tmpl/macros_misc.sgml
new file mode 100644 (file)
index 0000000..cfae430
--- /dev/null
@@ -0,0 +1,158 @@
+<!-- ##### SECTION Title ##### -->
+Miscellaneous Macros
+
+<!-- ##### SECTION Short_Description ##### -->
+specialised macros which are not used often.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These macros provide more specialized features which are not needed so often
+by application programmers.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO G_INLINE_FUNC ##### -->
+<para>
+Used to declare inline functions. If inline functions are not supported on
+the particular platform, the macro evaluates to the empty string.
+</para>
+
+
+
+<!-- ##### MACRO G_STMT_START ##### -->
+<para>
+Used within multi-statement macros so that they can be used in places where
+only one statement is expected by the compiler.
+</para>
+
+
+
+<!-- ##### MACRO G_STMT_END ##### -->
+<para>
+Used within multi-statement macros so that they can be used in places where
+only one statement is expected by the compiler.
+</para>
+
+
+
+<!-- ##### MACRO G_VA_COPY ##### -->
+<para>
+Portable way to copy <type>va_list</type> variables.
+</para>
+
+@ap1: the <type>va_list</type> variable to place a copy of @ap2 in.
+@ap2: a <type>va_list</type>.
+
+
+<!-- ##### MACRO G_GNUC_EXTENSION ##### -->
+<para>
+Expands to "__extension__" when GNU C is used as the compiler.
+This simply tells GNU C not to warn about the following non-standard code
+when compiling with the -pedantic option.
+</para>
+
+
+
+<!-- ##### MACRO G_GNUC_CONST ##### -->
+<para>
+Expands to the GNU C const function attribute if the compiler is GNU C.
+This enables optimization of the function.
+See the GNU C documentation for details. 
+</para>
+
+
+
+<!-- ##### MACRO G_GNUC_NORETURN ##### -->
+<para>
+Expands to the GNU C noreturn function attribute if the compiler is GNU C.
+It is used for declaring functions which never return.
+It enables optimization of the function, and avoids possible compiler
+warnings. See the GNU C documentation for details. 
+</para>
+
+
+
+<!-- ##### MACRO G_GNUC_UNUSED ##### -->
+<para>
+Expands to the GNU C unused function attribute if the compiler is GNU C.
+It is used for declaring functions which may never be used.
+It avoids possible compiler warnings. See the GNU C documentation for details. 
+</para>
+
+
+
+<!-- ##### MACRO G_GNUC_PRINTF ##### -->
+<para>
+Expands to the GNU C format function attribute if the compiler is GNU C.
+This is used for declaring functions which take a variable number of
+arguments, with the same syntax as <function>printf()</function>.
+It allows the compiler to type-check the arguments passed to the function.
+See the GNU C documentation for details. 
+</para>
+
+@format_idx: the index of the argument corresponding to the format string.
+(The arguments are numbered from 1).
+@arg_idx: the index of the first of the format arguments.
+
+
+<!-- ##### MACRO G_GNUC_SCANF ##### -->
+<para>
+Expands to the GNU C format function attribute if the compiler is GNU C.
+This is used for declaring functions which take a variable number of
+arguments, with the same syntax as <function>scanf()</function>.
+It allows the compiler to type-check the arguments passed to the function.
+See the GNU C documentation for details. 
+</para>
+
+@format_idx: the index of the argument corresponding to the format string.
+(The arguments are numbered from 1).
+@arg_idx: the index of the first of the format arguments.
+
+
+<!-- ##### MACRO G_GNUC_FORMAT ##### -->
+<para>
+Expands to the GNU C format_arg function attribute if the compiler is GNU C.
+This is used for declaring functions which take a variable number of
+parameters, like <function>printf()</function> and
+<function>scanf()</function>. See the GNU C documentation for details. 
+
+FIXME: I can't find this in my GNU C documentation. Take out?
+</para>
+
+@arg_idx: the index of the argument.
+
+
+<!-- ##### MACRO G_GNUC_FUNCTION ##### -->
+<para>
+Expands to the GNU C __FUNCTION__ variable if the compiler is GNU C,
+or "" if it isn't.
+The GNU C __FUNCTION__ variable contains the name of the current function.
+See the GNU C documentation for details. 
+</para>
+
+
+
+<!-- ##### MACRO G_GNUC_PRETTY_FUNCTION ##### -->
+<para>
+Expands to the GNU C __PRETTY_FUNCTION__ variable if the compiler is GNU C,
+or "" if it isn't.
+The GNU C __PRETTY_FUNCTION__ variable contains the name of the current
+function. For a C program this is the same as the __FUNCTION__ variable
+but for C++ it also includes extra information such as the class
+and function prototype. See the GNU C documentation for details. 
+</para>
+
+
+
+<!-- ##### MACRO g_string ##### -->
+<para>
+Turns the argument into a string literal by using the '#' stringizing operator.
+</para>
+
+@x: text to convert to a literal string.
+
+
diff --git a/docs/reference/glib/tmpl/main.sgml b/docs/reference/glib/tmpl/main.sgml
new file mode 100644 (file)
index 0000000..d377395
--- /dev/null
@@ -0,0 +1,496 @@
+<!-- ##### SECTION Title ##### -->
+The Main Event Loop
+
+<!-- ##### SECTION Short_Description ##### -->
+manages all available sources of events.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The main event loop manages all the available sources of events for GLib
+and GTK+ applications. These events can come from any number of different
+types of sources such as file descriptors (plain files, pipes or sockets)
+and timeouts.
+New types of event sources can also be added using g_source_add().
+</para>
+<para>
+Each event source is assigned a priority.
+The default priority, #G_PRIORITY_DEFAULT, is 0.
+Values less than 0 denote higher priorities.
+Values greater than 0 denote lower priorities.
+Events from high priority sources
+are always processed before events from lower priority sources.
+</para>
+<para>
+Idle functions can also be added, and assigned a priority. These will be
+run whenever no events with a higher priority are ready to be processed.
+</para>
+<para>
+The #GMainLoop data type represents a main event loop.
+A #GMainLoop is created with g_main_new(). After adding the initial event
+sources, g_main_run() is called. This continuously checks for new events
+from each of the event sources and dispatches them.
+Finally, the processing of an event from one of the sources leads to a call
+to g_main_quit() to exit the main loop, and g_main_run() returns.
+</para>
+<para>
+It is possible to create new instances of #GMainLoop recursively.
+This is often used in GTK+ applications when showing modal dialog boxes.
+However, all event sources are global; they are not tied to a particular
+#GMainLoop.
+</para>
+<para>
+GTK+ contains wrappers of many of these functions,
+e.g. gtk_main(), gtk_main_quit(), gtk_events_pending(), gtk_idle_add(),
+gtk_timeout_add() and gtk_input_add_full().
+In a GTK+ application, these wrapper functions should be used instead.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GMainLoop ##### -->
+<para>
+The #GMainLoop struct is an opaque data type representing the main event loop
+of a GLib or GTK+ application.
+</para>
+
+
+<!-- ##### FUNCTION g_main_new ##### -->
+<para>
+Creates a new #GMainLoop.
+</para>
+
+@is_running: set to TRUE to indicate that the loop is running. This is not
+very important since calling g_main_run() will set this to TRUE anyway.
+@Returns: a new #GMainLoop.
+
+
+<!-- ##### FUNCTION g_main_destroy ##### -->
+<para>
+Frees the memory allocated for the #GMainLoop.
+</para>
+
+@loop: a #GMainLoop.
+
+
+<!-- ##### FUNCTION g_main_run ##### -->
+<para>
+Runs a main loop until it stops running, which occurs when g_main_quit()
+is called.
+</para>
+
+@loop: a #GMainLoop.
+
+
+<!-- ##### FUNCTION g_main_is_running ##### -->
+<para>
+Returns TRUE if the main loop is running.
+</para>
+
+@loop: a #GMainLoop.
+@Returns: TRUE if the main loop is running.
+
+
+<!-- ##### FUNCTION g_main_pending ##### -->
+<para>
+Returns TRUE if any events are pending (i.e. ready to be processed).
+</para>
+
+@Returns: TRUE if any events are pending.
+
+
+<!-- ##### FUNCTION g_main_iteration ##### -->
+<para>
+Runs a single iteration of the main loop.
+This will check which event sources are ready to be processed, and will
+process the highest priority event sources which are ready.
+</para>
+
+@may_block: set to TRUE if it should block (i.e. wait) until an event source
+becomes ready. It will return after an event source has been processed.
+If set to FALSE it will return immediately if no event source is ready to be
+processed.
+@Returns: TRUE if more events are pending.
+
+
+<!-- ##### FUNCTION g_main_quit ##### -->
+<para>
+Stops the #GMainLoop. If g_main_run() was called to run the #GMainLoop,
+it will now return.
+</para>
+
+@loop: a #GMainLoop.
+
+
+<!-- ##### MACRO G_PRIORITY_HIGH ##### -->
+<para>
+Use this for high priority event sources.
+It is not used within GLib or GTK+.
+</para>
+
+
+
+<!-- ##### MACRO G_PRIORITY_DEFAULT ##### -->
+<para>
+Use this for default priority event sources.
+In GLib this priority is used when adding timeout functions with
+g_timeout_add().
+In GDK this priority is used for events from the X Windows server.
+</para>
+
+
+
+<!-- ##### MACRO G_PRIORITY_HIGH_IDLE ##### -->
+<para>
+Use this for high priority idle functions.
+GTK+ uses #G_PRIORITY_HIGH_IDLE + 10 for resizing operations, and
+#G_PRIORITY_HIGH_IDLE + 20 for redrawing operations. (This is done to
+ensure that any pending resizes are processed before any pending redraws,
+so that widgets are not redrawn twice unnecessarily.)
+</para>
+
+
+
+<!-- ##### MACRO G_PRIORITY_DEFAULT_IDLE ##### -->
+<para>
+Use this for default priority idle functions.
+In GLib this priority is used when adding idle functions with g_idle_add().
+</para>
+
+
+
+<!-- ##### MACRO G_PRIORITY_LOW ##### -->
+<para>
+Use this for very low priority background tasks.
+It is not used within GLib or GTK+.
+</para>
+
+
+
+<!-- ##### FUNCTION g_timeout_add ##### -->
+<para>
+Sets a function to be called at regular intervals, with the default priority,
+#G_PRIORITY_DEFAULT.
+The function is called repeatedly until it returns FALSE, at which point
+the timeout is automatically destroyed and the function will not be called
+again.
+The first call to the function will be at the end of the first @interval.
+</para>
+<para>
+Note that timeout functions may be delayed, due to the processing of other
+event sources. Thus they should not be relied on for precise timing.
+After each call to the timeout function, the time of the next
+timeout is recalculated based on the current time and the given interval
+(it does not try to 'catch up' time lost in delays).
+</para>
+
+@interval: the time between calls to @function, in milliseconds (1/1000ths
+of a second.)
+@function: the function to call at each interval.
+@data: data to pass to @function.
+@Returns: the id of the event source.
+
+
+<!-- ##### FUNCTION g_timeout_add_full ##### -->
+<para>
+Sets a function to be called at regular intervals, with the given priority.
+The function is called repeatedly until it returns FALSE, at which point
+the timeout is automatically destroyed and the function will not be called
+again.
+The @notify function is called when the timeout is destroyed.
+The first call to the function will be at the end of the first @interval.
+</para>
+<para>
+Note that timeout functions may be delayed, due to the processing of other
+event sources. Thus they should not be relied on for precise timing.
+After each call to the timeout function, the time of the next
+timeout is recalculated based on the current time and the given interval
+(it does not try to 'catch up' time lost in delays).
+</para>
+
+@priority: the priority of the function. See #G_PRIORITY_DEFAULT,
+#G_PRIORITY_DEFAULT_IDLE, #G_PRIORITY_HIGH, #G_PRIORITY_HIGH_IDLE, and
+#G_PRIORITY_LOW.
+@interval: the time between calls to the function, in milliseconds (1/1000ths
+of a second.)
+@function: the function to call at each interval.
+@data: data to pass to @function (and @notify).
+@notify: the function to call when the timeout is destroyed, or NULL.
+@Returns: the id of event source.
+
+
+<!-- ##### USER_FUNCTION GSourceFunc ##### -->
+<para>
+Specifies the type of function passed to g_timeout_add(), g_timeout_add_full(),
+g_idle_add(), and g_idle_add_full().
+</para>
+
+@data: data passed to the function, set when the source was created with one
+of the above functions.
+@Returns: it should return FALSE if the source should be removed.
+
+
+<!-- ##### FUNCTION g_idle_add ##### -->
+<para>
+Adds a function to be called whenever there are no higher priority events
+pending. The function is given the default idle priority,
+#G_PRIORITY_DEFAULT_IDLE.
+If the function returns FALSE it is automatically removed from the list of
+event sources and will not be called again.
+</para>
+
+@function: the function to call.
+@data: data to pass to the function.
+@Returns: the id of the event source.
+
+
+<!-- ##### FUNCTION g_idle_add_full ##### -->
+<para>
+Adds a function to be called whenever there are no higher priority events
+pending.
+If the function returns FALSE it is automatically removed from the list of
+event sources and will not be called again.
+</para>
+
+@priority: the priority of the idle function, which should be somewhere around
+#G_PRIORITY_DEFAULT_IDLE and #G_PRIORITY_HIGH_IDLE.
+@function: the function to call.
+@data: data to pass to the function.
+@destroy: the function to call when the timeout is destroyed, or NULL.
+@Returns: the id of the event source.
+
+
+<!-- ##### FUNCTION g_idle_remove_by_data ##### -->
+<para>
+Removes the idle function with the given data.
+</para>
+
+@data: the data which is passed to the idle function.
+@Returns: TRUE if the idle function was found.
+
+
+<!-- ##### FUNCTION g_main_add_poll ##### -->
+<para>
+Adds a file descriptor to be polled.
+This is usually combined with g_source_add() to add an event source.
+The event source's check function will typically test the revents
+field in the #GPollFD struct and return TRUE if events need to be processed.
+</para>
+
+@fd: a #GPollFD, which is a file descriptor together with a bitwise
+combination of #GIOCondition flags determining which events to poll for.
+@priority: the priority of the poll, which should be the same as the priority
+used for g_source_add() to ensure that the file descriptor is polled whenever
+the results may be needed.
+See #G_PRIORITY_DEFAULT, #G_PRIORITY_DEFAULT_IDLE, #G_PRIORITY_HIGH,
+#G_PRIORITY_HIGH_IDLE, and #G_PRIORITY_LOW.
+
+
+<!-- ##### STRUCT GPollFD ##### -->
+<para>
+
+<informaltable pgwide=1 frame="none" role="struct">
+<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<tbody>
+
+<row>
+<entry>#gint fd;</entry>
+<entry>the file descriptor to poll (or a HANDLE on Win32 platforms).</entry>
+</row>
+
+<row>
+<entry>#gushort events;</entry>
+<entry>a bitwise combination of flags from #GIOCondition, specifying which
+events should be polled for. Typically for reading from a file descriptor
+you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and for writing you would use
+%G_IO_OUT | %G_IO_ERR.
+</entry>
+</row>
+
+<row>
+<entry>#gushort revents;</entry>
+<entry>a bitwise combination of flags from #GIOCondition, returned from the
+poll() function to indicate which events occurred.
+</entry>
+</row>
+</tbody></tgroup></informaltable>
+
+</para>
+
+@fd: 
+@events: 
+@revents: 
+
+<!-- ##### FUNCTION g_main_remove_poll ##### -->
+<para>
+Removes a file descriptor from the list being polled.
+</para>
+
+@fd: the #GPollFD to remove.
+
+
+<!-- ##### FUNCTION g_main_set_poll_func ##### -->
+<para>
+Sets the function to use to handle polling of file descriptors.
+It will be used instead of the <function>poll()</function> system call
+(or GLib's replacement function, which is used where
+<function>poll()</function> isn't available).
+</para>
+<para>
+This function could possibly be used to integrate the GLib event loop
+with an external event loop.
+</para>
+
+@func: the function to call to poll all file descriptors.
+
+
+<!-- ##### USER_FUNCTION GPollFunc ##### -->
+<para>
+Specifies the type of function passed to g_main_set_poll_func().
+The semantics of the function should match those of the
+<function>poll()</function> system call.
+</para>
+
+@ufds: an array of #GPollFD elements.
+@nfsd: the number of elements in @ufds.
+@timeout: the maximum time to wait for an event of the file descriptors.
+@Returns: the number of #GPollFD elements which have events or errors reported,
+or -1 if an error occurred.
+
+
+<!-- ##### FUNCTION g_source_add ##### -->
+<para>
+Adds a source to the main loop.
+</para>
+
+@priority: the priority of the function. See #G_PRIORITY_DEFAULT,
+#G_PRIORITY_DEFAULT_IDLE, #G_PRIORITY_HIGH, #G_PRIORITY_HIGH_IDLE, and
+#G_PRIORITY_LOW.
+@can_recurse: if it is safe to call the source functions recursively.
+@funcs: the functions to handle the source.
+@source_data: data specific to the type of event source.
+@user_data: user data which will be passed to the user function handling the
+source.
+@notify: the function to call when the source is destroyed.
+@Returns: the id of the event source.
+
+
+<!-- ##### STRUCT GSourceFuncs ##### -->
+<para>
+The #GSourceFuncs struct contains a table of functions used to handle
+event sources in a generic manner.
+
+<informaltable pgwide=1 frame="none" role="struct">
+<tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*">
+<tbody>
+
+<row>
+<entry>prepare</entry>
+<entry>
+Called before all the file descriptors are polled.
+If the source can determine that it is ready here (without waiting for the
+results of the poll() call) it should return TRUE.
+It can also return a @timeout value which should be the maximum timeout
+(in milliseconds) which should be passed to the poll() call.
+The actual timeout used will be -1 if all sources returned -1, or it will
+be the minimum of all the @timeout values returned which were >= 0.
+</entry>
+</row>
+
+<row>
+<entry>check</entry>
+<entry>
+Called after all the file descriptors are polled.
+The source should return TRUE if it is ready to be processed.
+Note that some time may have passed since the previous prepare function was
+called, so the source should be checked again here.
+</entry>
+</row>
+
+<row>
+<entry>dispatch</entry>
+<entry>
+Called to process the event source, after it has returned TRUE in either
+its @prepare or its @check function.
+</entry>
+</row>
+
+<row>
+<entry>destroy</entry>
+<entry>
+Called when the source is destroyed. It will be called with the user data
+parameter passed to the g_source_add() and related functions.
+</entry>
+</row>
+</tbody></tgroup></informaltable>
+
+<para>
+For idle sources, the prepare and check functions always return TRUE to
+indicate that the source is always ready to be processed.
+The prepare function also returns a timeout value of 0 to ensure that the
+poll() call doesn't block (since that would be time wasted which could have
+been spent running the idle function).
+</para>
+<para>
+For timeout sources, the prepare and check functions both return TRUE if the
+timeout interval has expired.
+The prepare function also returns a timeout value to ensure that the poll()
+call doesn't block too long and miss the next timeout.
+</para>
+<para>
+For file descriptor sources, the prepare function typically returns FALSE,
+since it must wait until poll() has been called before it knows whether any
+events need to be processed. It sets the returned timeout to -1 to indicate
+that it doesn't mind how long the poll() call blocks.
+In the check function, it tests the results of the poll() call to see if
+the required condition has been met, and returns TRUE if so.
+</para>
+
+@prepare: 
+@check: 
+@dispatch: 
+@destroy: 
+
+<!-- ##### FUNCTION g_source_remove ##### -->
+<para>
+Removes the event source with the given id.
+The id is returned when the source is created, either directly with
+g_source_add(), or indirectly with g_idle_add(), g_idle_add_full(),
+g_timeout_add() and g_timeout_add_full().
+</para>
+
+@tag: the id of the event source to remove.
+@Returns: TRUE if the source was found.
+
+
+<!-- ##### FUNCTION g_source_remove_by_funcs_user_data ##### -->
+<para>
+Removes the event source with the given #GSourceFuncs and user data.
+</para>
+
+@funcs: the #GSourceFuncs of the source to remove.
+@user_data: the user data of the source to remove.
+@Returns: TRUE if the source was found.
+
+
+<!-- ##### FUNCTION g_source_remove_by_source_data ##### -->
+<para>
+Removes the event source with the given source data.
+</para>
+
+@source_data: the source data, which contains information specific to the
+type of source.
+@Returns: TRUE if the source was found.
+
+
+<!-- ##### FUNCTION g_source_remove_by_user_data ##### -->
+<para>
+Removes the event source with the given user data.
+</para>
+
+@user_data: the user data of the source to remove.
+@Returns: TRUE if the source was found.
+
+
diff --git a/docs/reference/glib/tmpl/memory.sgml b/docs/reference/glib/tmpl/memory.sgml
new file mode 100644 (file)
index 0000000..4a6e1b4
--- /dev/null
@@ -0,0 +1,156 @@
+<!-- ##### SECTION Title ##### -->
+Memory Allocation
+
+<!-- ##### SECTION Short_Description ##### -->
+general memory-handling.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions provide support for allocating and freeing memory.
+</para>
+<note>
+<para>
+If any call to allocate memory fails, the application is terminated.
+This also means that there is no need to check if the call succeeded.
+</para>
+</note>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO g_new ##### -->
+<para>
+Allocates @count elements of type @type.
+The returned pointer is cast to a pointer to the given type.
+If @count is 0 it returns NULL.
+</para>
+
+@type: the type of the elements to allocate.
+@count: the number of elements to allocate.
+@Returns: a pointer to the allocated memory, cast to a pointer to @type.
+
+
+<!-- ##### MACRO g_new0 ##### -->
+<para>
+Allocates @count elements of type @type, initialized to 0's.
+The returned pointer is cast to a pointer to the given type.
+If @count is 0 it returns NULL.
+</para>
+
+@type: the type of the elements to allocate.
+@count: the number of elements to allocate.
+@Returns: a pointer to the allocated memory, cast to a pointer to @type.
+
+
+<!-- ##### MACRO g_renew ##### -->
+<para>
+Reallocates the memory pointed to by @mem, so that it now has space for
+@count elements of type @type. It returns the new address of the memory,
+which may have been moved.
+</para>
+
+@type: the type of the elements to allocate.
+@mem: the currently allocated memory.
+@count: the number of elements to allocate.
+@Returns: a pointer to the new allocated memory, cast to a pointer to @type.
+
+
+<!-- ##### FUNCTION g_malloc ##### -->
+<para>
+Allocates @size bytes of memory.
+If @size is 0 it returns NULL.
+</para>
+
+@size: the number of bytes to allocate.
+@Returns: a pointer to the allocated memory.
+
+
+<!-- ##### FUNCTION g_malloc0 ##### -->
+<para>
+Allocates @size bytes of memory, initialized to 0's.
+If @size is 0 it returns NULL.
+</para>
+
+@size: the number of bytes to allocate.
+@Returns: a pointer to the allocated memory.
+
+
+<!-- ##### FUNCTION g_realloc ##### -->
+<para>
+Reallocates the memory pointed to by @mem, so that it now has space for
+@size bytes of memory. It returns the new address of the memory, which may
+have been moved.
+</para>
+
+@mem: the memory to reallocate.
+@size: the new size of the allocated memory, in bytes.
+@Returns: the new address of the allocated memory.
+
+
+<!-- ##### FUNCTION g_free ##### -->
+<para>
+Frees the memory pointed to by @mem.
+If @mem is NULL it simply returns.
+</para>
+
+@mem: the memory to free.
+
+
+<!-- ##### MACRO g_memmove ##### -->
+<para>
+Copies a block of memory @n bytes long, from @s to @d.
+The source and destination areas may overlap.
+</para>
+<note>
+<para>
+On architectures where memmove() is not available, this function is implemented
+using bcopy(), which may not be able to handle overlapping areas.
+</para>
+</note>
+
+@d: the destination address to copy the bytes to.
+@s: the source address to copy the bytes from.
+@n: the number of bytes to copy.
+
+
+<!-- ##### FUNCTION g_memdup ##### -->
+<para>
+Allocates @byte_size bytes of memory, and copies @byte_size bytes into it
+from @mem. If @mem is NULL it returns NULL.
+</para>
+
+@mem: the memory to copy.
+@byte_size: the number of bytes to copy.
+@Returns: a pointer to the newly allocated copy of the memory, or NULL if @mem
+is NULL.
+
+
+<!-- ##### FUNCTION g_mem_profile ##### -->
+<para>
+Outputs a summary of memory usage.
+To use this function you must configure glib with the flag
+'--enable-mem-profile=yes' before compiling.
+</para>
+<para>
+It outputs the frequency of allocations of different sizes,
+the total number of bytes which have been allocated,
+the total number of bytes which have been freed,
+and the difference between the previous two values, i.e. the number of bytes
+still in use.
+</para>
+
+
+
+<!-- ##### FUNCTION g_mem_check ##### -->
+<para>
+Checks if the given memory has already been freed. If it has it outputs
+a warning message.
+To use this function you must configure glib with the flag
+'--enable-mem-check=yes' before compiling.
+</para>
+
+@mem: the memory to check.
+
+
diff --git a/docs/reference/glib/tmpl/memory_chunks.sgml b/docs/reference/glib/tmpl/memory_chunks.sgml
new file mode 100644 (file)
index 0000000..2f33963
--- /dev/null
@@ -0,0 +1,303 @@
+<!-- ##### SECTION Title ##### -->
+Memory Chunks
+
+<!-- ##### SECTION Short_Description ##### -->
+efficient way to allocate groups of equal-sized chunks of memory.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Memory chunks provide an efficient way to allocate equal-sized pieces of
+memory, called atoms. They are used extensively within GLib itself.
+For example, the
+<link linkend="glib-Doubly-Linked-lists">Doubly Linked Lists</link>
+use memory chunks to allocate space for elements of the lists.
+</para>
+<para>
+There are two types of memory chunks, #G_ALLOC_ONLY, and #G_ALLOC_AND_FREE.
+<itemizedlist>
+<listitem><para>
+#G_ALLOC_ONLY chunks only allow allocation of atoms. The atoms can never
+be freed individually. The memory chunk can only be free in its entirety.
+</para></listitem>
+<listitem><para>
+#G_ALLOC_AND_FREE chunks do allow atoms to be freed individually.
+The disadvantage of this is that the memory chunk has to keep track of which
+atoms have been freed. This results in more memory being used and a slight
+degradation in performance.
+</para></listitem>
+
+</itemizedlist>
+</para>
+<para>
+To create a memory chunk use g_mem_chunk_new() or the convenience macro
+g_mem_chunk_create().
+</para>
+<para>
+To allocate a new atom use g_mem_chunk_alloc(), g_mem_chunk_alloc0(),
+or the convenience macros g_chunk_new() or g_chunk_new0(). 
+</para>
+<para>
+To free an atom use g_mem_chunk_free(), or the convenience macro
+g_chunk_free(). (Atoms can only be freed if the memory chunk is created
+with the type set to #G_ALLOC_AND_FREE.)
+</para>
+<para>
+To free any blocks of memory which are no longer being used, use
+g_mem_chunk_clean(). To clean all memory chunks, use g_blow_chunks().
+</para>
+<para>
+To reset the memory chunk, freeing all of the atoms, use g_mem_chunk_reset().
+</para>
+<para>
+To destroy a memory chunk, use g_mem_chunk_destroy().
+</para>
+<para>
+To help debug memory chunks, use g_mem_chunk_info() and g_mem_chunk_print().
+</para>
+
+<example>
+<title>Using a GMemChunk.</title>
+<programlisting>
+  GMemChunk *mem_chunk;
+  gchar *mem[10000];
+  gint i;
+
+  /* Create a GMemChunk with atoms 50 bytes long, and memory blocks holding
+     100 bytes. Note that this means that only 2 atoms fit into each memory
+     block and so isn't very efficient. */
+  mem_chunk = g_mem_chunk_new ("test mem chunk", 50, 100, G_ALLOC_AND_FREE);
+
+  /* Now allocate 10000 atoms. */
+  for (i = 0; i < 10000; i++)
+    {
+      mem[i] = g_chunk_new (gchar, mem_chunk);
+
+      /* Fill in the atom memory with some junk. */
+      for (j = 0; j < 50; j++)
+       mem[i][j] = i * j;
+    }
+
+  /* Now free all of the atoms. Note that since we are going to destroy the
+     GMemChunk, this wouldn't normally be used. */
+  for (i = 0; i < 10000; i++)
+    {
+      g_mem_chunk_free (mem_chunk, mem[i]);
+    }
+
+  /* We are finished with the GMemChunk, so we destroy it. */
+  g_mem_chunk_destroy (mem_chunk);
+</programlisting></example>
+
+<example>
+<title>Using a GMemChunk with data structures.</title>
+<programlisting>
+  GMemChunk *array_mem_chunk;
+  GRealArray *array;
+
+  /* Create a GMemChunk to hold GRealArray structures, using the
+     g_mem_chunk_create() convenience macro. We want 1024 atoms in each
+     memory block, and we want to be able to free individual atoms. */
+  array_mem_chunk = g_mem_chunk_create (GRealArray, 1024, G_ALLOC_AND_FREE);
+
+  /* Allocate one atom, using the g_chunk_new() convenience macro. */
+  array = g_chunk_new (GRealArray, array_mem_chunk);
+
+  /* We can now use array just like a normal pointer to a structure. */
+  array->data            = NULL;
+  array->len             = 0;
+  array->alloc           = 0;
+  array->zero_terminated = (zero_terminated ? 1 : 0);
+  array->clear           = (clear ? 1 : 0);
+  array->elt_size        = elt_size;
+
+  /* We can free the element, so it can be reused. */
+  g_chunk_free (array, array_mem_chunk);
+
+  /* We destroy the GMemChunk when we are finished with it. */
+  g_mem_chunk_destroy (array_mem_chunk);
+</programlisting></example>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GMemChunk ##### -->
+<para>
+The #GMemChunk struct is an opaque data structure representing a memory
+chunk. It should be accessed only through the use of the following functions.
+</para>
+
+
+<!-- ##### MACRO G_ALLOC_AND_FREE ##### -->
+<para>
+Specifies the type of a #GMemChunk.
+Used in g_mem_chunk_new() and g_mem_chunk_create() to specify that atoms
+will be freed individually.
+</para>
+
+
+
+<!-- ##### MACRO G_ALLOC_ONLY ##### -->
+<para>
+Specifies the type of a #GMemChunk.
+Used in g_mem_chunk_new() and g_mem_chunk_create() to specify that atoms
+will never be freed individually.
+</para>
+
+
+
+<!-- ##### FUNCTION g_mem_chunk_new ##### -->
+<para>
+Creates a new #GMemChunk.
+</para>
+
+@name: a string to identify the #GMemChunk. It is not copied so it
+should be valid for the lifetime of the #GMemChunk. It is only used in
+g_mem_chunk_print(), which is used for debugging.
+@atom_size: the size, in bytes, of each element in the #GMemChunk.
+@area_size: the size, in bytes, of each block of memory allocated to contain
+the atoms.
+@type: the type of the #GMemChunk.
+#G_ALLOC_AND_FREE is used if the atoms will be freed individually.
+#G_ALLOC_ONLY should be used if atoms will never be freed individually.
+#G_ALLOC_ONLY is quicker, since it does not need to track free atoms,
+but it obviously wastes memory if you no longer need many of the atoms.
+@Returns: the new #GMemChunk.
+
+
+<!-- ##### FUNCTION g_mem_chunk_alloc ##### -->
+<para>
+Allocates an atom of memory from a #GMemChunk.
+</para>
+
+@mem_chunk: a #GMemChunk.
+@Returns: a pointer to the allocated atom.
+
+
+<!-- ##### FUNCTION g_mem_chunk_alloc0 ##### -->
+<para>
+Allocates an atom of memory from a #GMemChunk, setting the memory to 0.
+</para>
+
+@mem_chunk: a #GMemChunk.
+@Returns: a pointer to the allocated atom.
+
+
+<!-- ##### FUNCTION g_mem_chunk_free ##### -->
+<para>
+Frees an atom in a #GMemChunk.
+This should only be called if the #GMemChunk was created with
+#G_ALLOC_AND_FREE. Otherwise it will simply return.
+</para>
+
+@mem_chunk: a #GMemChunk.
+@mem: a pointer to the atom to free.
+
+
+<!-- ##### FUNCTION g_mem_chunk_destroy ##### -->
+<para>
+Frees all of the memory allocated for a #GMemChunk.
+</para>
+
+@mem_chunk: a #GMemChunk.
+
+
+<!-- ##### MACRO g_mem_chunk_create ##### -->
+<para>
+A convenience macro for creating a new #GMemChunk.
+It calls g_mem_chunk_new(), using the given type to create the #GMemChunk
+name. The atom size is determined using <function>sizeof()</function>, and the
+area size is calculated by multiplying the @pre_alloc parameter with
+the atom size.
+</para>
+
+@type: the type of the atoms, typically a structure name.
+@pre_alloc: the number of atoms to store in each block of memory.
+@alloc_type: the type of the #GMemChunk.
+#G_ALLOC_AND_FREE is used if the atoms will be freed individually.
+#G_ALLOC_ONLY should be used if atoms will never be freed individually.
+#G_ALLOC_ONLY is quicker, since it does not need to track free atoms,
+but it obviously wastes memory if you no longer need many of the atoms.
+@Returns: the new #GMemChunk.
+
+
+<!-- ##### MACRO g_chunk_new ##### -->
+<para>
+A convenience macro to allocate an atom of memory from a #GMemChunk.
+It calls g_mem_chunk_alloc() and casts the returned atom to a pointer to
+the given type, avoiding a type cast in the source code.
+</para>
+
+@type: the type of the #GMemChunk atoms, typically a structure name.
+@chunk: a #GMemChunk.
+@Returns: a pointer to the allocated atom, cast to a pointer to @type.
+
+
+<!-- ##### MACRO g_chunk_new0 ##### -->
+<para>
+A convenience macro to allocate an atom of memory from a #GMemChunk.
+It calls g_mem_chunk_alloc0() and casts the returned atom to a pointer to
+the given type, avoiding a type cast in the source code.
+</para>
+
+@type: the type of the #GMemChunk atoms, typically a structure name.
+@chunk: a #GMemChunk.
+@Returns: a pointer to the allocated atom, cast to a pointer to @type.
+
+
+<!-- ##### MACRO g_chunk_free ##### -->
+<para>
+A convenience macro to free an atom of memory from a #GMemChunk.
+It simply switches the arguments and calls g_mem_chunk_free()
+It is included simply to complement the other convenience macros, g_chunk_new()
+and g_chunk_new0().
+</para>
+
+@mem: a pointer to the atom to be freed.
+@mem_chunk: a #GMemChunk.
+
+
+<!-- ##### FUNCTION g_mem_chunk_reset ##### -->
+<para>
+Resets a GMemChunk to its initial state.
+It frees all of the currently allocated blocks of memory.
+</para>
+
+@mem_chunk: a #GMemChunk.
+
+
+<!-- ##### FUNCTION g_mem_chunk_clean ##### -->
+<para>
+Frees any blocks in a #GMemChunk which are no longer being used.
+</para>
+
+@mem_chunk: a #GMemChunk.
+
+
+<!-- ##### FUNCTION g_blow_chunks ##### -->
+<para>
+Calls g_mem_chunk_clean() on all #GMemChunk objects.
+</para>
+
+
+
+<!-- ##### FUNCTION g_mem_chunk_info ##### -->
+<para>
+Outputs debugging information for all #GMemChunk objects currently in use.
+It outputs the number of #GMemChunk objects currently allocated,
+and calls g_mem_chunk_print() to output information on each one.
+</para>
+
+
+
+<!-- ##### FUNCTION g_mem_chunk_print ##### -->
+<para>
+Outputs debugging information for a #GMemChunk.
+It outputs the name of the #GMemChunk (set with g_mem_chunk_new()),
+the number of bytes used, and the number of blocks of memory allocated.
+</para>
+
+@mem_chunk: a #GMemChunk.
+
+
diff --git a/docs/reference/glib/tmpl/messages.sgml b/docs/reference/glib/tmpl/messages.sgml
new file mode 100644 (file)
index 0000000..536b8e3
--- /dev/null
@@ -0,0 +1,262 @@
+<!-- ##### SECTION Title ##### -->
+Message Logging
+
+<!-- ##### SECTION Short_Description ##### -->
+versatile support for logging messages with different levels of importance.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions provide support for logging error messages or messages
+used for debugging.
+</para>
+
+<para>
+There are several built-in levels of messages, defined in #GLogLevelFlags.
+These can be extended with user-defined levels.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO G_LOG_DOMAIN ##### -->
+<para>
+Defines the log domain.
+For applications, this is typically left as the default NULL (or "") domain.
+Libraries should define this so that any messages which they log can
+be differentiated from messages from other libraries and application code.
+But be careful not to define it in any public header files.
+</para>
+<para>
+For example, GTK uses this in its Makefile.am:
+<informalexample><programlisting>
+INCLUDES = \
+       -DG_LOG_DOMAIN=\"Gtk\"
+</programlisting></informalexample>
+</para>
+
+
+
+<!-- ##### VARIABLE g_log_domain_glib ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### VARIABLE g_log_domain_gmodule ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO G_LOG_FATAL_MASK ##### -->
+<para>
+GLib log levels that are considered fatal by default.
+</para>
+
+
+
+<!-- ##### MACRO G_LOG_LEVEL_USER_SHIFT ##### -->
+<para>
+Log level shift offset for user defined log levels (0-7 are used by GLib).
+</para>
+
+
+
+<!-- ##### USER_FUNCTION GLogFunc ##### -->
+<para>
+Specifies the prototype of log handler functions.
+</para>
+
+@log_domain: the log domain of the message.
+@log_level: the log level of the message.
+@message: the message to process.
+@user_data: user data, set in g_log_set_handler().
+
+
+<!-- ##### ENUM GLogLevelFlags ##### -->
+<para>
+Flags specifying the level of log messages.
+</para>
+
+@G_LOG_FLAG_RECURSION: 
+@G_LOG_FLAG_FATAL: 
+@G_LOG_LEVEL_ERROR: 
+@G_LOG_LEVEL_CRITICAL: 
+@G_LOG_LEVEL_WARNING: 
+@G_LOG_LEVEL_MESSAGE: 
+@G_LOG_LEVEL_INFO: 
+@G_LOG_LEVEL_DEBUG: 
+@G_LOG_LEVEL_MASK: 
+
+<!-- ##### FUNCTION g_log ##### -->
+<para>
+Logs an error or debugging message.
+If the log level has been set as fatal, the <function>abort()</function>
+function is called to terminate the program.
+</para>
+
+@log_domain: the log domain, usually #G_LOG_DOMAIN.
+@log_level: the log level, either from #GLogLevelFlags or a user-defined level.
+@format: the message format. See the <function>printf()</function>
+documentation.
+@Varargs: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_logv ##### -->
+<para>
+Logs an error or debugging message.
+If the log level has been set as fatal, the <function>abort()</function>
+function is called to terminate the program.
+</para>
+
+@log_domain: the log domain.
+@log_level: the log level.
+@format: the message format. See the <function>printf()</function>
+documentation.
+@args: the parameters to insert into the format string.
+
+
+<!-- ##### MACRO g_message ##### -->
+<para>
+A convenience function/macro to log a normal message.
+</para>
+
+@format: the message format. See the <function>printf()</function>
+documentation.
+@args...: the parameters to insert into the format string.
+
+
+<!-- ##### MACRO g_warning ##### -->
+<para>
+A convenience function/macro to log a warning message.
+</para>
+
+@format: the message format. See the <function>printf()</function>
+documentation.
+@args...: the parameters to insert into the format string.
+
+
+<!-- ##### MACRO g_error ##### -->
+<para>
+A convenience function/macro to log an error message.
+Error messages are always fatal, resulting in a call to
+<function>abort()</function> to terminate the application.
+</para>
+
+@format: the message format. See the <function>printf()</function>
+documentation.
+@args...: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_log_set_handler ##### -->
+<para>
+Sets the log handler for a domain and set of log levels.
+</para>
+
+@log_domain: the log domain, or NULL for the default "" application domain.
+@log_levels: the levels to apply the log handler.
+@log_func: the log handler function.
+@user_data: data passed to the log handler.
+@Returns: the id of the new handler.
+
+
+<!-- ##### FUNCTION g_log_remove_handler ##### -->
+<para>
+Removes the log handler.
+</para>
+
+@log_domain: the log domain.
+@handler_id: the id of the handler, which was returned in g_log_set_handler().
+
+
+<!-- ##### FUNCTION g_log_set_always_fatal ##### -->
+<para>
+Sets the message levels which are always fatal, in any log domain.
+When a message with any of these levels is logged the program terminates.
+You can only set the levels defined by GLib to be fatal.
+%G_LOG_LEVEL_ERROR is always fatal.
+</para>
+
+@fatal_mask: the mask containing bits set for each level of error which is
+to be fatal.
+@Returns: the old fatal mask.
+
+
+<!-- ##### FUNCTION g_log_set_fatal_mask ##### -->
+<para>
+Sets the log levels which are fatal in the given domain.
+%G_LOG_LEVEL_ERROR is always fatal.
+</para>
+
+@log_domain: the log domain.
+@fatal_mask: the new fatal mask.
+@Returns: the old fatal mask for the log domain.
+
+
+<!-- ##### FUNCTION g_log_default_handler ##### -->
+<para>
+The default log handler.
+This is used if no log handler has been set for the particular log domain
+and log level combination. It outputs the message to stderr or stdout
+and if the log level is fatal it calls <function>abort()</function>.
+</para>
+<para>
+stderr is used for levels %G_LOG_LEVEL_ERROR, %G_LOG_LEVEL_CRITICAL, and
+%G_LOG_LEVEL_WARNING. stdout is used for the rest.
+(On the Windows platform, stdout is always used.)
+</para>
+
+@log_domain: the log domain of the message.
+@log_level: the level of the message.
+@message: the message.
+@unused_data: data passed from g_log which is unused.
+
+
+<!-- ##### FUNCTION g_set_error_handler ##### -->
+<para>
+Sets the function to be called to handle error messages.
+This function is deprecated in favour of the new logging facilities.
+</para>
+
+@func: the function to be called to handle error messages.
+@Returns: the old error handler.
+
+
+<!-- ##### USER_FUNCTION GErrorFunc ##### -->
+<para>
+Specifies the type of function passed to g_set_error_handler().
+</para>
+
+@str: the error message.
+
+
+<!-- ##### FUNCTION g_set_warning_handler ##### -->
+<para>
+Sets the function to be called to handle warning messages.
+This function is deprecated in favour of the new logging facilities.
+</para>
+
+@func: the function to be called to handle warning messages.
+@Returns: the old warning handler.
+
+
+<!-- ##### USER_FUNCTION GWarningFunc ##### -->
+<para>
+Specifies the type of function passed to g_set_warning_handler().
+</para>
+
+@str: the warning message.
+
+
+<!-- ##### FUNCTION g_set_message_handler ##### -->
+<para>
+Sets the function to be called to handle messages.
+This function is deprecated in favour of the new logging facilities.
+</para>
+
+@func: the function to be called to handle normal messages.
+@Returns: the old message handler.
+
+
diff --git a/docs/reference/glib/tmpl/misc_utils.sgml b/docs/reference/glib/tmpl/misc_utils.sgml
new file mode 100644 (file)
index 0000000..bc03951
--- /dev/null
@@ -0,0 +1,226 @@
+<!-- ##### SECTION Title ##### -->
+Miscellaneous Utility Functions
+
+<!-- ##### SECTION Short_Description ##### -->
+a selection of portable utility functions.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These are portable utility functions.
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION g_get_prgname ##### -->
+<para>
+Gets the name of the program.
+(If you are using GDK or GTK the program name is set in gdk_init(), which
+is called by gtk_init(). The program name is found by taking the last
+component of argv[0].)
+</para>
+
+@Returns: the name of the program.
+
+
+<!-- ##### FUNCTION g_set_prgname ##### -->
+<para>
+Sets the name of the program.
+</para>
+
+@prgname: the name of the program.
+
+
+<!-- ##### FUNCTION g_getenv ##### -->
+<para>
+Returns an environment variable.
+On windows systems the returned value is only valid until the next call to
+g_getenv().
+</para>
+
+@variable: the environment variable to get.
+@Returns: the value of the environment variable, or NULL if the environment
+variable is not found.
+
+
+<!-- ##### FUNCTION g_get_user_name ##### -->
+<para>
+Gets the user name of the current user.
+</para>
+
+@Returns: the user name of the current user.
+
+
+<!-- ##### FUNCTION g_get_real_name ##### -->
+<para>
+Gets the real name of the user. This comes from the user's entry in the
+passwd file.
+</para>
+
+@Returns: the user's real name.
+
+
+<!-- ##### FUNCTION g_get_home_dir ##### -->
+<para>
+Gets the current user's home directory.
+</para>
+
+@Returns: the current user's home directory.
+
+
+<!-- ##### FUNCTION g_get_tmp_dir ##### -->
+<para>
+Gets the directory to use for temporary files.
+This is found from inspecting the environment variables TMPDIR, TMP, and TEMP
+in that order. If none of those are defined "/tmp" is returned.
+</para>
+
+@Returns: the directory to use for temporary files.
+
+
+<!-- ##### FUNCTION g_get_current_dir ##### -->
+<para>
+Gets the current directory.
+The returned string should be freed when no longer needed.
+</para>
+
+@Returns: the current directory.
+
+
+<!-- ##### FUNCTION g_basename ##### -->
+<para>
+Gets the name of the file without any leading directory components.
+It returns a pointer into the given file name string.
+</para>
+
+@file_name: the name of the file.
+@Returns: the name of the file without any leading directory components.
+
+
+<!-- ##### FUNCTION g_dirname ##### -->
+<para>
+Gets the directory components of a file name.
+If the file name has no directory components "." is returned.
+The returned string should be freed when no longer needed.
+</para>
+
+@file_name: the name of the file.
+@Returns: the directory components of the file.
+
+
+<!-- ##### FUNCTION g_path_is_absolute ##### -->
+<para>
+Returns TRUE if the given @file_name is an absolute file name,
+i.e. it contains a full path from the root directory such as '/usr/local'
+or 'C:/windows' on windows systems.
+</para>
+
+@file_name: a file name.
+@Returns: TRUE if @file_name is an absolute path.
+
+
+<!-- ##### FUNCTION g_path_skip_root ##### -->
+<para>
+Returns a pointer into @file_name after the root component, i.e. after
+the '/' in Unix or 'C:/' under Windows. If @file_name is not an absolute
+path it returns NULL.
+</para>
+
+@file_name: a file name.
+@Returns: a pointer into @file_name after the root component.
+
+
+<!-- ##### FUNCTION g_bit_nth_lsf ##### -->
+<para>
+FIXME: I don't know what this does!
+</para>
+
+@mask: 
+@nth_bit: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_bit_nth_msf ##### -->
+<para>
+FIXME: I don't know what this does!
+</para>
+
+@mask: 
+@nth_bit: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_bit_storage ##### -->
+<para>
+Gets the number of bits used to hold @number,
+e.g. if @number is 4, 3 bits are needed.
+</para>
+
+@number: a guint.
+@Returns: the number of bits used to hold @number.
+
+
+<!-- ##### FUNCTION g_spaced_primes_closest ##### -->
+<para>
+Gets the smallest prime number from a built-in array of primes which
+is larger than @num. This is used within GLib to calculate the optimum
+size of a #GHashTable.
+</para>
+<para>
+The built-in array of primes ranges from 11 to 13845163 such that
+each prime is approximately 1.5-2 times the previous prime.
+</para>
+
+@num: a guint.
+@Returns: the smallest prime number from a built-in array of primes which is
+larger than @num.
+
+
+<!-- ##### FUNCTION g_atexit ##### -->
+<para>
+Specifies a function to be called at normal program termination.
+</para>
+
+@func: the function to call on normal program termination.
+
+
+<!-- ##### FUNCTION g_parse_debug_string ##### -->
+<para>
+Parses a string containing debugging options separated by ':' into a guint
+containing bit flags.
+This is used within GDK and GTK to parse the debug options passed on the
+command line or through environment variables.
+</para>
+
+@string: a list of debug options separated by ':' or "all" to set all flags.
+@keys: pointer to an array of #GDebugKey which associate strings with
+bit flags.
+@nkeys: the number of #GDebugKey in the array.
+@Returns: the combined set of bit flags.
+
+
+<!-- ##### STRUCT GDebugKey ##### -->
+<para>
+Associates a string with a bit flag.
+Used in g_parse_debug_string().
+</para>
+
+@key: 
+@value: 
+
+<!-- ##### USER_FUNCTION GVoidFunc ##### -->
+<para>
+Specifies the type of function passed to g_atexit().
+</para>
+
+
+
+<!-- ##### USER_FUNCTION GFreeFunc ##### -->
+<para>
+
+</para>
+
+@data: 
+
+
diff --git a/docs/reference/glib/tmpl/modules.sgml b/docs/reference/glib/tmpl/modules.sgml
new file mode 100644 (file)
index 0000000..24c1a4b
--- /dev/null
@@ -0,0 +1,176 @@
+<!-- ##### SECTION Title ##### -->
+Dynamic Loading of Modules
+
+<!-- ##### SECTION Short_Description ##### -->
+portable method for dynamically loading 'plug-ins'.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions provide a portable way to dynamically load object files
+(commonly known as 'plug-ins').
+The current implementation supports all systems that provide
+an implementation of dlopen() (e.g. Linux/Sun), as well as HP-UX via its
+shl_load() mechanism, and Windows platforms via DLLs.
+</para>
+<para>
+To use them you must first determine whether dynamic loading
+is supported on the platform by calling g_module_supported().
+If it is, you can open a module with g_module_open(),
+find the module's symbols (e.g. function names) with g_module_symbol(),
+and later close the module with g_module_close().
+g_module_name() will return the file name of a currently opened module.
+</para>
+<para>
+If any of the above functions fail, the error status can be found with
+g_module_error().
+</para>
+<para>
+The gmodule implementation features reference counting for opened modules,
+and supports hook functions within a module which are called when the
+module is loaded and unloaded (see #GModuleCheckInit and #GModuleUnload).
+</para>
+<para>
+If your module introduces static data to common subsystems in the running
+program, e.g. through calling g_quark_from_static_string ("my-module-stuff"),
+it must ensure that it is never unloaded, by calling g_module_make_resident().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GModule ##### -->
+<para>
+The #GModule struct is an opaque data structure to represent a
+<link linkend="glib-Dynamic-Loading-of-Modules">Dynamically-Loaded Module</link>.
+It should only be accessed via the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_module_supported ##### -->
+<para>
+Checks if modules are supported on the current platform.
+</para>
+
+@Returns: TRUE if modules are supported.
+
+
+<!-- ##### FUNCTION g_module_build_path ##### -->
+<para>
+
+</para>
+
+@directory: 
+@module_name: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_module_open ##### -->
+<para>
+Opens a module.
+If the module has already been opened, its reference count is incremented.
+</para>
+
+@file_name: the name of the file containing the module.
+@flags: the flags used for opening the module. Currently this can be 0 or
+G_MODULE_BIND_LAZY for lazy binding, where symbols are only bound when needed.
+@Returns: a #GModule on success, or NULL on failure.
+
+
+<!-- ##### ENUM GModuleFlags ##### -->
+<para>
+Flags passed to g_module_open().
+G_MODULE_BIND_LAZY specifies that symbols are only resolved when needed.
+The default action is to bind all symbols when the module is loaded.
+(G_MODULE_BIND_LAZY is not supported on all platforms.)
+</para>
+
+@G_MODULE_BIND_LAZY: 
+@G_MODULE_BIND_MASK: 
+
+<!-- ##### FUNCTION g_module_symbol ##### -->
+<para>
+Gets a symbol pointer from a module.
+</para>
+
+@module: the module.
+@symbol_name: the name of the symbol to find.
+@symbol: returns the pointer to the symbol value.
+@Returns: TRUE on success.
+
+
+<!-- ##### FUNCTION g_module_name ##### -->
+<para>
+Gets the file name from a #GModule.
+</para>
+
+@module: the module.
+@Returns: the file name of the module, or "main" if the module is the main
+program itself.
+
+
+<!-- ##### FUNCTION g_module_make_resident ##### -->
+<para>
+Ensures that a module will never be unloaded.
+Any future g_module_close() calls on the module will be ignored.
+</para>
+
+@module: a module to make permanently resident.
+
+
+<!-- ##### FUNCTION g_module_close ##### -->
+<para>
+Closes a module.
+</para>
+
+@module: the module to close.
+@Returns: TRUE on success.
+
+
+<!-- ##### FUNCTION g_module_error ##### -->
+<para>
+Gets a string describing the last module error.
+</para>
+
+@Returns: a string describing the last module error.
+
+
+<!-- ##### USER_FUNCTION GModuleCheckInit ##### -->
+<para>
+Specifies the type of the module initialization function.
+If a module contains a function named g_module_check_init() it is called
+automatically when the module is loaded. It is passed the #GModule structure
+and should return NULL on success or a string describing the initialization
+error.
+</para>
+
+@module: the #GModule corresponding to the module which has just been loaded.
+@Returns: NULL on success, or a string describing the initialization error.
+
+
+<!-- ##### USER_FUNCTION GModuleUnload ##### -->
+<para>
+Specifies the type of the module function called when it is unloaded.
+If a module contains a function named g_module_unload() it is called
+automatically when the module is unloaded.
+It is passed the #GModule structure.
+</para>
+
+@module: the module about to be unloaded.
+
+
+<!-- ##### MACRO G_MODULE_EXPORT ##### -->
+<para>
+Used to declare functions exported by modules.
+</para>
+
+
+
+<!-- ##### MACRO G_MODULE_IMPORT ##### -->
+<para>
+Used to declare functions imported from modules.
+</para>
+
+
+
diff --git a/docs/reference/glib/tmpl/quarks.sgml b/docs/reference/glib/tmpl/quarks.sgml
new file mode 100644 (file)
index 0000000..b62e032
--- /dev/null
@@ -0,0 +1,91 @@
+<!-- ##### SECTION Title ##### -->
+Quarks
+
+<!-- ##### SECTION Short_Description ##### -->
+a 2-way association between a string and a unique integer identifier.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Quarks are associations between strings and integer identifiers.
+Given either the string or the #GQuark identifier it is possible to
+retrieve the other.
+</para>
+<para>
+Quarks are used for both
+<link linkend="glib-datasets">Datasets</link> and
+<link linkend="glib-keyed-data-lists">Keyed Data Lists</link>.
+</para>
+<para>
+To create a new quark from a string, use g_quark_from_string() or
+g_quark_from_static_string().
+</para>
+<para>
+To find the string corresponding to a given #GQuark, use g_quark_to_string().
+</para>
+<para>
+To find the #GQuark corresponding to a given string, use g_quark_try_string().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### TYPEDEF GQuark ##### -->
+<para>
+A GQuark is an integer which uniquely identifies a particular string.
+</para>
+
+
+<!-- ##### FUNCTION g_quark_from_string ##### -->
+<para>
+Gets the #GQuark identifying the given string.
+If the string does not currently have an associated #GQuark, a new
+#GQuark is created, using a copy of the string.
+</para>
+
+@string: a string.
+@Returns: the #GQuark identifying the string.
+
+
+<!-- ##### FUNCTION g_quark_from_static_string ##### -->
+<para>
+Gets the #GQuark identifying the given (static) string.
+If the string does not currently have an associated #GQuark, a new
+#GQuark is created, linked to the given string.
+</para>
+<para>
+Note that this function is identical to g_quark_from_string() except
+that if a new #GQuark is created the string itself is used rather than
+a copy. This saves memory, but can only be used if the string will
+always exist (if, for example, it is a statically-allocated string).
+</para>
+
+@string: a string.
+@Returns: the #GQuark identifying the string.
+
+
+<!-- ##### FUNCTION g_quark_to_string ##### -->
+<para>
+Gets the string associated with the given #GQuark.
+</para>
+
+@quark: a #GQuark.
+@Returns: the string associated with the #GQuark.
+
+
+<!-- ##### FUNCTION g_quark_try_string ##### -->
+<para>
+Gets the #GQuark associated with the given string, or 0 if the string has
+no associated #GQuark.
+</para>
+<para>
+If you want the GQuark to be created if it doesn't already exist, use
+g_quark_from_string() or g_quark_from_static_string().
+</para>
+
+@string: a string.
+@Returns: the #GQuark associated with the string, or 0 if there is no
+#GQuark associated with the string.
+
+
diff --git a/docs/reference/glib/tmpl/relations.sgml b/docs/reference/glib/tmpl/relations.sgml
new file mode 100644 (file)
index 0000000..4c1dd61
--- /dev/null
@@ -0,0 +1,201 @@
+<!-- ##### SECTION Title ##### -->
+Relations and Tuples
+
+<!-- ##### SECTION Short_Description ##### -->
+tables of data which can be indexed on any number of fields.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+A #GRelation is a table of data which can be indexed on any number of fields,
+rather like simple database tables. A #GRelation contains a number of
+records, called tuples. Each record contains a number of fields.
+Records are not ordered, so it is not possible to find the record at a
+particular index.
+</para>
+<para>
+Note that #GRelation tables are currently limited to 2 fields.
+</para>
+<para>
+To create a GRelation, use g_relation_new().
+</para>
+<para>
+To specify which fields should be indexed, use g_relation_index().
+Note that this must be called before any tuples are added to the #GRelation.
+</para>
+<para>
+To add records to a #GRelation use g_relation_insert().
+</para>
+<para>
+To determine if a given record appears in a #GRelation, use
+g_relation_exists(). Note that fields are compared directly, so pointers
+must point to the exact same position (i.e. different copies of the same
+string will not match.)
+</para>
+<para>
+To count the number of records which have a particular value in a given
+field, use g_relation_count().
+</para>
+<para>
+To get all the records which have a particular value in a given field,
+use g_relation_select(). To access fields of the resulting records,
+use g_tuples_index(). To free the resulting records use g_tuples_destroy().
+</para>
+<para>
+To delete all records which have a particular value in a given field,
+use g_relation_delete().
+</para>
+<para>
+To destroy the #GRelation, use g_relation_destroy().
+</para>
+<para>
+To help debug #GRelation objects, use g_relation_print().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GRelation ##### -->
+<para>
+The #GRelation struct is an opaque data structure to represent a
+<link linkend="glib-Relations-and-Tuples">Relation</link>.
+It should only be accessed via the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_relation_new ##### -->
+<para>
+Creates a new #GRelation with the given number of fields.
+Note that currently the number of fields must be 2.
+</para>
+
+@fields: the number of fields.
+@Returns: a new #GRelation.
+
+
+<!-- ##### FUNCTION g_relation_index ##### -->
+<para>
+Creates an index on the given field.
+Note that this must be called before any records are added to the #GRelation.
+</para>
+
+@relation: a #GRelation.
+@field: the field to index, counting from 0.
+@hash_func: a function to produce a hash value from the field data.
+@key_compare_func: a function to compare two values of the given field.
+
+
+<!-- ##### FUNCTION g_relation_insert ##### -->
+<para>
+Inserts a record into a #GRelation.
+</para>
+
+@relation: a #GRelation.
+@Varargs: the fields of the record to add. This must match the number of
+fields in the #GRelation.
+
+
+<!-- ##### FUNCTION g_relation_exists ##### -->
+<para>
+Returns TRUE if a record with the given values exists in a #GRelation.
+Note that the values are compared directly, so that, for example, two
+copies of the same string will not match.
+</para>
+
+@relation: a #GRelation.
+@Varargs: the fields of the record to compare. The number must match the
+number of fields in the #GRelation.
+@Returns: TRUE if a record matches.
+
+
+<!-- ##### FUNCTION g_relation_count ##### -->
+<para>
+Returns the number of tuples in a #GRelation that have the given value
+in the given field.
+</para>
+
+@relation: a #GRelation.
+@key: the value to compare with.
+@field: the field of each record to match.
+@Returns: the number of matches.
+
+
+<!-- ##### FUNCTION g_relation_select ##### -->
+<para>
+Returns all of the tuples which have the given key in the given field.
+Use g_tuples_index() to access the returned records.
+The returned records should be freed with g_tuples_destroy().
+</para>
+
+@relation: a #GRelation.
+@key: the value to compare with.
+@field: the field of each record to match.
+@Returns: the records (tuples) that matched.
+
+
+<!-- ##### FUNCTION g_relation_delete ##### -->
+<para>
+Deletes any records from a GRelation that have the given key value in
+the given field.
+</para>
+
+@relation: a #GRelation.
+@key: the value to compare with.
+@field: the field of each record to match.
+@Returns: the number of records deleted.
+
+
+<!-- ##### FUNCTION g_relation_destroy ##### -->
+<para>
+Destroys the #GRelation, freeing all memory allocated.
+However, it does not free memory allocated for the
+tuple data, so you should free that first if appropriate.
+</para>
+
+@relation: a #GRelation.
+
+
+<!-- ##### FUNCTION g_relation_print ##### -->
+<para>
+Outputs information about all records in a #GRelation, as well as the indexes.
+It is for debugging.
+</para>
+
+@relation: a #GRelation.
+
+
+<!-- ##### STRUCT GTuples ##### -->
+<para>
+The #GTuples struct is used to return records (or tuples) from the
+#GRelation by g_relation_select().
+It only contains one public member - the number of records that matched.
+To access the matched records, you must use g_tuples_index().
+</para>
+
+@len: 
+
+<!-- ##### FUNCTION g_tuples_destroy ##### -->
+<para>
+Frees the records which were returned by g_relation_select().
+This should always be called after g_relation_select() when you are
+finished with the records.
+The records are not removed from the #GRelation.
+</para>
+
+@tuples: the tuple data to free.
+
+
+<!-- ##### FUNCTION g_tuples_index ##### -->
+<para>
+Gets a field from the records returned by g_relation_select().
+It returns the given field of the record at the given index.
+The returned value should not be changed.
+</para>
+
+@tuples: the tuple data, returned by g_relation_select().
+@index: the index of the record.
+@field: the field to return.
+@Returns: the field of the record.
+
+
diff --git a/docs/reference/glib/tmpl/scanner.sgml b/docs/reference/glib/tmpl/scanner.sgml
new file mode 100644 (file)
index 0000000..9940cc0
--- /dev/null
@@ -0,0 +1,490 @@
+<!-- ##### SECTION Title ##### -->
+Lexical Scanner
+
+<!-- ##### SECTION Short_Description ##### -->
+a general purpose lexical scanner.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GScanner and its associated functions provide a general purpose
+lexical scanner.
+</para>
+<para>
+FIXME: really needs an example and more detail, but I don't completely
+understand it myself. Look at gtkrc.c for some code using the scanner.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GScanner ##### -->
+<para>
+The data structure representing a lexical scanner.
+</para>
+<para>
+You should set input_name after creating the scanner, since it is used
+by the default message handler when displaying warnings and errors.
+If you are scanning a file, the file name would be a good choice.
+</para>
+<para>
+The <structfield>user_data</structfield> and
+<structfield>derived_data</structfield> fields are not used.
+If you need to associate extra data with the scanner you can place them here.
+</para>
+<para>
+If you want to use your own message handler you can set the
+<structfield>msg_handler</structfield> field. The type of the message
+handler function is declared by #GScannerMsgFunc.
+</para>
+
+@user_data: 
+@max_parse_errors: 
+@parse_errors: 
+@input_name: 
+@derived_data: 
+@config: 
+@token: 
+@value: 
+@line: 
+@position: 
+@next_token: 
+@next_value: 
+@next_line: 
+@next_position: 
+@symbol_table: 
+@input_fd: 
+@text: 
+@text_end: 
+@buffer: 
+@scope_id: 
+@msg_handler: 
+
+<!-- ##### FUNCTION g_scanner_new ##### -->
+<para>
+Creates a new #GScanner.
+The @config_templ structure specifies the initial settings of the scanner,
+which are copied into the #GScanner <structfield>config</structfield> field.
+If you pass NULL then the default settings are used.
+(See g_scanner_config_template in gscanner.c for the defaults.)
+</para>
+
+@config_templ: the initial scanner settings.
+@Returns: the new #GScanner.
+
+
+<!-- ##### STRUCT GScannerConfig ##### -->
+<para>
+Specifies the #GScanner settings.
+</para>
+<para>
+<structfield>cset_skip_characters</structfield> specifies which characters
+should be skipped by the scanner (the default is the whitespace characters:
+space, tab, carriage-return and line-feed).
+</para>
+<para>
+<structfield>cset_identifier_first</structfield> specifies the characters
+which can start identifiers.
+(the default is #G_CSET_a_2_z, "_", and #G_CSET_A_2_Z).
+</para>
+<para>
+<structfield>cset_identifier_nth</structfield> specifies the characters
+which can be used in identifiers, after the first character.
+The default is #G_CSET_a_2_z, "_0123456789", #G_CSET_A_2_Z, #G_CSET_LATINS,
+#G_CSET_LATINC.
+</para>
+<para>
+<structfield>cpair_comment_single</structfield> specifies the characters
+at the start and end of single-line comments. The default is "#\n" which
+means that single-line comments start with a '#' and continue until a '\n'
+(end of line).
+</para>
+<para>
+<structfield>case_sensitive</structfield> specifies if symbols are
+case sensitive.
+</para>
+<para>
+The rest of the fields are flags which turn features on or off.
+FIXME: should describe these.
+</para>
+
+@cset_skip_characters: 
+@cset_identifier_first: 
+@cset_identifier_nth: 
+@cpair_comment_single: 
+@case_sensitive: 
+@skip_comment_multi: 
+@skip_comment_single: 
+@scan_comment_multi: 
+@scan_identifier: 
+@scan_identifier_1char: 
+@scan_identifier_NULL: 
+@scan_symbols: 
+@scan_binary: 
+@scan_octal: 
+@scan_float: 
+@scan_hex: 
+@scan_hex_dollar: 
+@scan_string_sq: 
+@scan_string_dq: 
+@numbers_2_int: 
+@int_2_float: 
+@identifier_2_string: 
+@char_2_token: 
+@symbol_2_token: 
+@scope_0_fallback: 
+
+<!-- ##### FUNCTION g_scanner_input_file ##### -->
+<para>
+Prepares to scan a file.
+</para>
+
+@scanner: a #GScanner.
+@input_fd: a file descriptor.
+
+
+<!-- ##### FUNCTION g_scanner_sync_file_offset ##### -->
+<para>
+
+</para>
+
+@scanner: 
+
+
+<!-- ##### FUNCTION g_scanner_stat_mode ##### -->
+<para>
+Gets the file attributes.
+This is the <structfield>st_mode</structfield> field from the
+<structname>stat</structname> structure. See the <function>stat()</function>
+documentation.
+</para>
+
+@filename: the file name.
+@Returns: the file attributes.
+
+
+<!-- ##### FUNCTION g_scanner_input_text ##### -->
+<para>
+Prepares to scan a text buffer.
+</para>
+
+@scanner: a #GScanner.
+@text: the text buffer to scan.
+@text_len: the length of the text buffer.
+
+
+<!-- ##### FUNCTION g_scanner_peek_next_token ##### -->
+<para>
+Gets the next token, without removing it from the input stream.
+The token data is placed in the
+<structfield>next_token</structfield>,
+<structfield>next_value</structfield>,
+<structfield>next_line</structfield>, and
+<structfield>next_position</structfield> fields of the #GScanner structure.
+</para>
+
+@scanner: a #GScanner.
+@Returns: the type of the token.
+
+
+<!-- ##### FUNCTION g_scanner_get_next_token ##### -->
+<para>
+Gets the next token, removing it from the input stream.
+The token data is placed in the
+<structfield>token</structfield>,
+<structfield>value</structfield>,
+<structfield>line</structfield>, and
+<structfield>position</structfield> fields of the #GScanner structure.
+</para>
+
+@scanner: a #GScanner.
+@Returns: the type of the token.
+
+
+<!-- ##### FUNCTION g_scanner_cur_line ##### -->
+<para>
+Gets the current line in the input stream (counting from 1).
+</para>
+
+@scanner: a #GScanner.
+@Returns: the current line.
+
+
+<!-- ##### FUNCTION g_scanner_cur_position ##### -->
+<para>
+Gets the current position in the current line (counting from 0).
+</para>
+
+@scanner: a #GScanner.
+@Returns: the current position on the line.
+
+
+<!-- ##### FUNCTION g_scanner_cur_token ##### -->
+<para>
+Gets the current token type.
+This is simply the <structfield>token</structfield> field in the #GScanner
+structure.
+</para>
+
+@scanner: a #GScanner.
+@Returns: the current token type.
+
+
+<!-- ##### FUNCTION g_scanner_cur_value ##### -->
+<para>
+Gets the current token value.
+This is simply the <structfield>value</structfield> field in the #GScanner
+structure.
+</para>
+
+@scanner: a #GScanner.
+@Returns: the current token value.
+
+
+<!-- ##### FUNCTION g_scanner_eof ##### -->
+<para>
+Returns TRUE if the scanner has reached the end of the file or text buffer.
+</para>
+
+@scanner: a #GScanner.
+@Returns: TRUE if the scanner has reached the end of the file or text buffer.
+
+
+<!-- ##### FUNCTION g_scanner_set_scope ##### -->
+<para>
+Sets the current scope.
+</para>
+
+@scanner: a #GScanner.
+@scope_id: the new scope id.
+@Returns: the old scope id.
+
+
+<!-- ##### FUNCTION g_scanner_scope_add_symbol ##### -->
+<para>
+Adds a symbol to the given scope.
+</para>
+
+@scanner: a #GScanner.
+@scope_id: the scope id.
+@symbol: the symbol to add.
+@value: the value of the symbol.
+
+
+<!-- ##### FUNCTION g_scanner_scope_foreach_symbol ##### -->
+<para>
+
+</para>
+
+@scanner: 
+@scope_id: 
+@func: 
+@user_data: 
+<!-- # Unused Parameters # -->
+@func_data: 
+
+
+<!-- ##### FUNCTION g_scanner_scope_lookup_symbol ##### -->
+<para>
+
+</para>
+
+@scanner: 
+@scope_id: 
+@symbol: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_scanner_scope_remove_symbol ##### -->
+<para>
+
+</para>
+
+@scanner: 
+@scope_id: 
+@symbol: 
+
+
+<!-- ##### FUNCTION g_scanner_freeze_symbol_table ##### -->
+<para>
+
+</para>
+
+@scanner: 
+
+
+<!-- ##### FUNCTION g_scanner_thaw_symbol_table ##### -->
+<para>
+
+</para>
+
+@scanner: 
+
+
+<!-- ##### FUNCTION g_scanner_lookup_symbol ##### -->
+<para>
+
+</para>
+
+@scanner: 
+@symbol: 
+@Returns: 
+
+
+<!-- ##### FUNCTION g_scanner_warn ##### -->
+<para>
+Outputs a warning message, via the #GScanner message handler.
+</para>
+
+@scanner: a #GScanner.
+@format: the message format. See the <function>printf()</function>
+documentation.
+@Varargs: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_scanner_error ##### -->
+<para>
+Outputs an error message, via the #GScanner message handler.
+</para>
+
+@scanner: a #GScanner.
+@format: the message format. See the <function>printf()</function>
+documentation.
+@Varargs: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_scanner_unexp_token ##### -->
+<para>
+Outputs a message resulting from an unexpected token in the input stream.
+FIXME: I don't understand the arguments here.
+</para>
+
+@scanner: a #GScanner.
+@expected_token: the expected token.
+@identifier_spec: a string describing the expected type of identifier,
+or NULL to use the default "identifier" string.
+@symbol_spec: a string describing the expected type of identifier,
+or NULL to use the default "symbol" string.
+@symbol_name: 
+@message: a message string to output at the end of the warning/error, or NULL.
+@is_error: if TRUE it is output as an error. If False it is output as a
+warning.
+
+
+<!-- ##### USER_FUNCTION GScannerMsgFunc ##### -->
+<para>
+
+</para>
+
+@scanner: 
+@message: 
+@error: 
+
+
+<!-- ##### FUNCTION g_scanner_destroy ##### -->
+<para>
+Frees all memory used by the #GScanner.
+</para>
+
+@scanner: a #GScanner.
+
+
+<!-- ##### ENUM GTokenType ##### -->
+<para>
+The possible types of token returned from each g_scanner_get_next_token() call.
+</para>
+
+@G_TOKEN_EOF: 
+@G_TOKEN_LEFT_PAREN: 
+@G_TOKEN_RIGHT_PAREN: 
+@G_TOKEN_LEFT_CURLY: 
+@G_TOKEN_RIGHT_CURLY: 
+
+<!-- ##### UNION GTokenValue ##### -->
+<para>
+A union holding the value of the token.
+</para>
+
+
+<!-- ##### ENUM GErrorType ##### -->
+<para>
+The possible errors, used in the <structfield>v_error</structfield> field
+of #GTokenValue, when the token is a G_TOKEN_ERROR.
+</para>
+
+@G_ERR_UNKNOWN: 
+@G_ERR_UNEXP_EOF: 
+@G_ERR_UNEXP_EOF_IN_STRING: 
+@G_ERR_UNEXP_EOF_IN_COMMENT: 
+@G_ERR_NON_DIGIT_IN_CONST: 
+@G_ERR_DIGIT_RADIX: 
+@G_ERR_FLOAT_RADIX: 
+@G_ERR_FLOAT_MALFORMED: 
+
+<!-- ##### MACRO G_CSET_a_2_z ##### -->
+<para>
+The set of lower-case ASCII alphabet characters.
+Used for specifying valid identifier characters in #GScannerConfig.
+</para>
+
+
+
+<!-- ##### MACRO G_CSET_A_2_Z ##### -->
+<para>
+The set of upper-case ASCII alphabet characters.
+Used for specifying valid identifier characters in #GScannerConfig.
+</para>
+
+
+
+<!-- ##### MACRO G_CSET_LATINC ##### -->
+<para>
+Part of the set of extended characters in the Latin character sets.
+FIXME: lower case?
+Used for specifying valid identifier characters in #GScannerConfig.
+</para>
+
+
+
+<!-- ##### MACRO G_CSET_LATINS ##### -->
+<para>
+Part of the set of extended characters in the Latin character sets.
+FIXME: upper case?
+Used for specifying valid identifier characters in #GScannerConfig.
+</para>
+
+
+
+<!-- ##### MACRO g_scanner_add_symbol ##### -->
+<para>
+Adds a symbol to the default scope.
+Deprecated in favour of g_scanner_scope_add_symbol().
+</para>
+
+@scanner: a #GScanner.
+@symbol: the symbol to add.
+@value: the value of the symbol.
+
+
+<!-- ##### MACRO g_scanner_remove_symbol ##### -->
+<para>
+Removes a symbol from the default scope.
+Deprecated in favour of g_scanner_scope_remove_symbol().
+</para>
+
+@scanner: a #GScanner.
+@symbol: the symbol to remove.
+
+
+<!-- ##### MACRO g_scanner_foreach_symbol ##### -->
+<para>
+Calls a function for each symbol in the default scope.
+Deprecated in favour of g_scanner_scope_foreach_symbol().
+</para>
+
+@scanner: a #GScanner.
+@func: the function to call with each symbol.
+@data: data to pass to the function.
+
+
diff --git a/docs/reference/glib/tmpl/string_chunks.sgml b/docs/reference/glib/tmpl/string_chunks.sgml
new file mode 100644 (file)
index 0000000..85961ae
--- /dev/null
@@ -0,0 +1,110 @@
+<!-- ##### SECTION Title ##### -->
+String Chunks
+
+<!-- ##### SECTION Short_Description ##### -->
+efficient storage of groups of strings.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+String chunks are used to store groups of strings.
+Memory is allocated in blocks, and as strings are added to the #GStringChunk
+they are copied into the next free position in a block. When a block is
+full a new block is allocated.
+</para>
+<para>
+When storing a large number of strings, string chunks are more efficient
+than using g_strdup() since fewer calls to <function>malloc()</function>
+are needed, and less memory is wasted in memory allocation overheads.
+</para>
+<para>
+By adding strings with g_string_chunk_insert_const() it is also possible
+to remove duplicates.
+</para>
+<para>
+To create a new #GStringChunk use g_string_chunk_new().
+</para>
+<para>
+To add strings to a #GStringChunk use g_string_chunk_insert().
+</para>
+<para>
+To add strings to a #GStringChunk, but without duplicating strings which are
+already in the #GStringChunk, use g_string_chunk_insert_const().
+</para>
+<para>
+To free the entire #GStringChunk use g_string_chunk_free().
+It is not possible to free individual strings.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GStringChunk ##### -->
+<para>
+An opaque data structure representing String Chunks.
+It should only be accessed by using the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_string_chunk_new ##### -->
+<para>
+Creates a new #GStringChunk.
+</para>
+
+@size: the default size of the blocks of memory which are allocated to store
+the strings. If a particular string is larger than this default size, a larger
+block of memory will be allocated for it.
+@Returns: a new #GStringChunk.
+
+
+<!-- ##### FUNCTION g_string_chunk_insert ##### -->
+<para>
+Adds a copy of @string to the #GStringChunk.
+It returns a pointer to the new copy of the string in the #GStringChunk.
+The characters in the string can be changed, if necessary, though you
+should not change anything after the end of the string.
+</para>
+<para>
+Unlike g_string_chunk_insert_const(), this function does not check for
+duplicates. Also strings added with g_string_chunk_insert() will not be
+searched by g_string_chunk_insert_const() when looking for duplicates.
+</para>
+
+@chunk: a #GStringChunk.
+@string: the string to add.
+@Returns: a pointer to the copy of @string within the #GStringChunk.
+
+
+<!-- ##### FUNCTION g_string_chunk_insert_const ##### -->
+<para>
+Adds a copy of @string to the #GStringChunk, unless the same string has
+already been added to the #GStringChunk with g_string_chunk_insert_const().
+</para>
+<para>
+This function is useful if you need to copy a large number of strings
+but do not want to waste space storing duplicates. But you must remember
+that there may be several pointers to the same string, and so any changes
+made to the strings should be done very carefully.
+</para>
+<para>
+Note that g_string_chunk_insert_const() will not return a pointer to a string
+added with g_string_chunk_insert(), even if they do match.
+</para>
+
+@chunk: a #GStringChunk.
+@string: the string to add.
+@Returns: a pointer to the new or existing copy of @string within the
+#GStringChunk.
+
+
+<!-- ##### FUNCTION g_string_chunk_free ##### -->
+<para>
+Frees all memory allocated by the #GStringChunk.
+After calling g_string_chunk_free() it is not safe to
+access any of the strings which were contained within it.
+</para>
+
+@chunk: a #GStringChunk.
+
+
diff --git a/docs/reference/glib/tmpl/string_utils.sgml b/docs/reference/glib/tmpl/string_utils.sgml
new file mode 100644 (file)
index 0000000..2362f77
--- /dev/null
@@ -0,0 +1,354 @@
+<!-- ##### SECTION Title ##### -->
+String Utility Functions
+
+<!-- ##### SECTION Short_Description ##### -->
+various string-related functions.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+This section describes a number of utility functions for creating,
+duplicating, and manipulating strings.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION g_strdup ##### -->
+<para>
+Duplicates a string.
+The returned string should be freed when no longer needed.
+</para>
+
+@str: the string to duplicate.
+@Returns: a newly-allocated copy of @str.
+
+
+<!-- ##### FUNCTION g_strndup ##### -->
+<para>
+Duplicates the first @n characters of a string, and null-terminates it.
+If @str is NULL, NULL is returned.
+The returned string should be freed when no longer needed.
+</para>
+
+@str: the string to duplicate part of.
+@n: the number of characters to copy, which must be less than or equal to the
+length of @str.
+@Returns: a newly-allocated copy of the first @n characters of @str,
+null-terminated.
+
+
+<!-- ##### FUNCTION g_strnfill ##### -->
+<para>
+Creates a new string @length characters long filled with @fill_char.
+The returned string should be freed when no longer needed.
+</para>
+
+@length: the length of the new string.
+@fill_char: the character to fill the string with.
+@Returns: a newly-allocated string filled the @fill_char.
+
+
+<!-- ##### FUNCTION g_strdup_printf ##### -->
+<para>
+Similar to the standard C <function>sprintf()</function> function
+but safer, since it calculates the maximum space required and allocates
+memory to hold the result.
+The returned string should be freed when no longer needed.
+</para>
+
+@format: the standard <function>sprintf()</function> format string.
+@Varargs: the parameters to insert into the format string.
+@Returns: a newly-allocated string holding the result.
+
+
+<!-- ##### FUNCTION g_strdup_vprintf ##### -->
+<para>
+Similar to the standard C <function>vsprintf()</function> function
+but safer, since it calculates the maximum space required and allocates
+memory to hold the result.
+The returned string should be freed when no longer needed.
+</para>
+
+@format: the standard <function>sprintf()</function> format string.
+@args: the list of parameters to insert into the format string.
+@Returns: a newly-allocated string holding the result.
+
+
+<!-- ##### FUNCTION g_snprintf ##### -->
+<para>
+A safer form of the standard <function>sprintf()</function> function.
+The output is guaranteed to not exceed @n characters (including the
+terminating NULL character), so it is easy to ensure that a buffer overflow
+cannot occur.
+</para>
+<para>
+See also g_strdup_printf().
+</para>
+<note>
+<para>
+In versions of GLib prior to 1.2.3, this function may return -1 if the output
+was truncated, and the truncated string may not be NULL-terminated.
+</para>
+</note>
+
+@string: the buffer to hold the output.
+@n: the maximum number of characters to produce (including the terminating null
+character).
+@format: the format string. See the <function>sprintf()</function>
+documentation.
+@Varargs: the arguments to insert in the output.
+@Returns: the length of the output string.
+
+
+<!-- ##### FUNCTION g_vsnprintf ##### -->
+<para>
+A safer form of the standard <function>vsprintf()</function> function.
+The output is guaranteed to not exceed @n characters (including the
+terminating NULL character), so it is easy to ensure that a buffer overflow
+cannot occur.
+</para>
+<para>
+See also g_strdup_vprintf().
+</para>
+<note>
+<para>
+In versions of GLib prior to 1.2.3, this function may return -1 if the output
+was truncated, and the truncated string may not be NULL-terminated.
+</para>
+</note>
+
+@string: the buffer to hold the output.
+@n: the maximum number of characters to produce (including the terminating null
+character).
+@format: the format string. See the <function>sprintf()</function>
+documentation.
+@args: the list of arguments to insert in the output.
+@Returns: the length of the output string.
+
+
+<!-- ##### FUNCTION g_printf_string_upper_bound ##### -->
+<para>
+Calculates the maximum space needed to store the output of the
+<function>sprintf()</function> function.
+</para>
+
+@format: the format string. See the <function>printf()</function>
+documentation.
+@args: the parameters to be inserted into the format string.
+@Returns: the maximum space needed to store the formatted string.
+
+
+<!-- ##### FUNCTION g_strup ##### -->
+<para>
+Converts a string to upper case.
+</para>
+
+@string: the string to convert.
+
+
+<!-- ##### FUNCTION g_strdown ##### -->
+<para>
+Converts a string to lower case.
+</para>
+
+@string: the string to convert.
+
+
+<!-- ##### FUNCTION g_strcasecmp ##### -->
+<para>
+A case-insensitive string comparison, corresponding to the standard
+<function>strcasecmp()</function> function on platforms which support it.
+</para>
+
+@s1: a string.
+@s2: a string to compare with @s1.
+@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive
+value if @s1 > @s2.
+
+
+<!-- ##### FUNCTION g_strncasecmp ##### -->
+<para>
+A case-insensitive string comparison, corresponding to the standard
+<function>strncasecmp()</function> function on platforms which support it.
+It is similar to g_strcasecmp() except it only compares the first @n characters
+of the strings.
+</para>
+
+@s1: a string.
+@s2: a string to compare with @s1.
+@n: the maximum number of characters to compare.
+@Returns: 0 if the strings match, a negative value if @s1 < @s2, or a positive
+value if @s1 > @s2.
+
+
+<!-- ##### FUNCTION g_strreverse ##### -->
+<para>
+Reverses all of the characters in a string.
+For example, g_strreverse ("abcdef") would be "fedcba".
+</para>
+
+@string: the string to reverse.
+
+
+<!-- ##### FUNCTION g_strtod ##### -->
+<para>
+Converts a string to a gdouble value.
+It calls the standard <function>strtod()</function> function
+to handle the conversion, but if the string is not completely converted
+it attempts the conversion again in the "C" locale, and returns the best
+match.
+</para>
+
+@nptr: the string to convert to a numeric value.
+@endptr: if non-NULL, it returns the character after the last character used
+in the conversion.
+@Returns: the gdouble value.
+
+
+<!-- ##### FUNCTION g_strchug ##### -->
+<para>
+Removes leading whitespace from a string, by moving the rest of the
+characters forward.
+</para>
+
+@string: a string to remove the leading whitespace from.
+@Returns: @string.
+
+
+<!-- ##### FUNCTION g_strchomp ##### -->
+<para>
+Removes trailing whitespace from a string.
+</para>
+
+@string: a string to remove the trailing whitespace from.
+@Returns: @string.
+
+
+<!-- ##### MACRO g_strstrip ##### -->
+<para>
+Removes leading and trailing whitespace from a string.
+</para>
+
+@string: a string to remove the leading and trailing whitespace from.
+
+
+<!-- ##### FUNCTION g_strdelimit ##### -->
+<para>
+Converts any delimiter characters in @string to @new_delimiter.
+Any characters in @string which are found in @delimiters are changed
+to the @new_delimiter character.
+</para>
+
+@string: the string to convert.
+@delimiters: a string containing the current delimiters, or NULL to use the
+standard delimiters defined in #G_STR_DELIMITERS.
+@new_delimiter: the new delimiter character.
+@Returns: 
+
+
+<!-- ##### MACRO G_STR_DELIMITERS ##### -->
+<para>
+The standard delimiters, used in #g_strdelimit.
+</para>
+
+
+
+<!-- ##### FUNCTION g_strescape ##### -->
+<para>
+Escapes all backslash characters, '\' in a string, by inserting a second '\'.
+</para>
+
+@string: a string to escape the backslashes in.
+@Returns: a newly allocated copy of @string, with all backslash characters
+escaped using a second backslash.
+
+
+<!-- ##### FUNCTION g_strsplit ##### -->
+<para>
+Splits a string into a maximum of @max_tokens pieces, using the given
+@delimiter. If @max_tokens is reached, the final string in the returned
+string array contains the remainder of @string.
+</para>
+
+@string: a string to split.
+@delimiter: a string which specifies the places at which to split the string.
+The delimiter is not included in any of the resulting strings, unless
+max_tokens is reached.
+@max_tokens: the maximum number of strings to split @string into. If this is
+less than 1, the string is split completely.
+@Returns: a newly-allocated array of strings. Use g_strfreev() to free it.
+
+
+<!-- ##### FUNCTION g_strfreev ##### -->
+<para>
+Frees a NULL-terminated array of strings, and the array itself.
+</para>
+
+@str_array: a NULL-terminated array of strings to free.
+
+
+<!-- ##### FUNCTION g_strconcat ##### -->
+<para>
+Concatenates all of the given strings into one long string.
+The returned string should be freed when no longer needed.
+</para>
+
+@string1: The first string to add, which must not be NULL.
+@Varargs: a NULL-terminated list of strings to append to the string.
+@Returns: a newly-allocated string containing all the string arguments.
+
+
+<!-- ##### FUNCTION g_strjoin ##### -->
+<para>
+Joins a number of strings together to form one long string, with the optional
+@separator inserted between each of them.
+</para>
+
+@separator: a string to insert between each of the strings, or NULL.
+@Varargs: a NULL-terminated list of strings to join.
+@Returns: a newly-allocated string containing all of the strings joined
+together, with @separator between them.
+
+
+<!-- ##### FUNCTION g_strjoinv ##### -->
+<para>
+Joins a number of strings together to form one long string, with the optional
+@separator inserted between each of them.
+</para>
+
+@separator: a string to insert between each of the strings, or NULL.
+@str_array: a NULL-terminated array of strings to join.
+@Returns: a newly-allocated string containing all of the strings joined
+together, with @separator between them.
+
+
+<!-- ##### FUNCTION g_strerror ##### -->
+<para>
+Returns a string corresponding to the given error code, e.g. "no such process".
+This function is included since not all platforms support the 
+<function>strerror()</function> function.
+</para>
+
+@errnum: the system error number. See the standard C %errno
+documentation.
+@Returns: a string describing the error code.
+If the error code is unknown, it returns "unknown error (&lt;code&gt;)".
+The string can only be used until the next call to g_strerror.
+
+
+<!-- ##### FUNCTION g_strsignal ##### -->
+<para>
+Returns a string describing the given signal, e.g. "Segmentation fault".
+This function is included since not all platforms support the
+<function>strsignal()</function> function.
+</para>
+
+@signum: the signal number. See the <literal>signal</literal>
+documentation.
+@Returns: a string describing the signal.
+If the signal is unknown, it returns "unknown signal (&lt;signum&gt;)".
+The string can only be used until the next call to g_strsignal.
+
+
diff --git a/docs/reference/glib/tmpl/strings.sgml b/docs/reference/glib/tmpl/strings.sgml
new file mode 100644 (file)
index 0000000..f621d18
--- /dev/null
@@ -0,0 +1,209 @@
+<!-- ##### SECTION Title ##### -->
+Strings
+
+<!-- ##### SECTION Short_Description ##### -->
+text buffers which grow automatically as text is added.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+A #GString is similar to a standard C string, except that it grows
+automatically as text is appended or inserted.
+</para>
+<para>
+The space allocated for the string is always a power of two, so as the
+string grows it will occupy 2, 4, 8, 16, 32, 64, 128 etc. characters.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GString ##### -->
+<para>
+The #GString struct contains the public fields of a #GString.
+The <structfield>str</structfield> field points to the character data.
+It may move as text is added.
+The <structfield>len</structfield> field contains the length of the string,
+not including the terminating null character.
+</para>
+<para>
+The str field is zero-terminated and so can be used as an ordinary C
+string. But it may be moved when text is appended or inserted into the
+string.
+</para>
+
+@str: 
+@len: 
+
+<!-- ##### FUNCTION g_string_new ##### -->
+<para>
+Creates a new #GString, initialized with the given string.
+</para>
+
+@init: the initial text to copy into the string.
+@Returns: the new #GString.
+
+
+<!-- ##### FUNCTION g_string_sized_new ##### -->
+<para>
+Creates a new GString, with enough space for @dfl_size characters.
+This is useful if you are going to add a lot of text to the string and
+don't want it to be reallocated too often.
+</para>
+
+@dfl_size: the default size of the space allocated to hold the string.
+@Returns: the new #GString.
+
+
+<!-- ##### FUNCTION g_string_assign ##### -->
+<para>
+Copies the characters from one #GString into another, destroying any previous
+contents. It is rather like the standard strcpy() function, except that
+you do not have to worry about having enough space to copy the string.
+</para>
+
+@lval: the destination #GString. Its current contents are destroyed.
+@rval: the source #GString.
+@Returns: the destination #GString.
+
+
+<!-- ##### FUNCTION g_string_sprintf ##### -->
+<para>
+Writes a formatted string into a #GString.
+This is similar to the standard <function>sprintf()</function> function,
+except that the GString buffer automatically expands to contain the results.
+The previous contents of the GString are destroyed.
+</para>
+
+@string: a #GString.
+@format: the string format. See the <function>sprintf()</function>
+documentation.
+@Varargs: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_string_sprintfa ##### -->
+<para>
+Appends a formatted string onto the end of a #GString.
+This function is is similar to g_string_sprintf() except that
+the text is appended to the GString.
+</para>
+
+@string: a #GString.
+@format: the string format. See the <function>sprintf()</function>
+documentation.
+@Varargs: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_string_append ##### -->
+<para>
+Adds a string onto the end of a #GString, expanding it if necessary.
+</para>
+
+@string: a #GString.
+@val: the string to append onto the end of the #GString.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_append_c ##### -->
+<para>
+Adds a character onto the end of a #GString, expanding it if necessary.
+</para>
+
+@string: a #GString.
+@c: the character to append onto the end of the #GString.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_prepend ##### -->
+<para>
+Adds a string on to the start of a #GString, expanding it if necessary.
+</para>
+
+@string: a #GString.
+@val: the string to prepend on the start of the #GString.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_prepend_c ##### -->
+<para>
+Adds a character onto the start of a #GString, expanding it if necessary.
+</para>
+
+@string: a #GString.
+@c: the character to prepend on the start of the #GString.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_insert ##### -->
+<para>
+Inserts a copy of a string into a #GString, expanding it if necessary.
+</para>
+
+@string: a #GString.
+@pos: the position to insert the copy of the string.
+@val: the string to insert.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_insert_c ##### -->
+<para>
+Inserts a character into a #GString, expanding it if necessary.
+</para>
+
+@string: a #GString.
+@pos: the position to insert the character.
+@c: the character to insert.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_erase ##### -->
+<para>
+Removes @len characters from a #GString, starting at position @pos.
+The rest of the #GString is shifted down to fill the gap.
+</para>
+
+@string: a #GString.
+@pos: the position of the characters to remove.
+@len: the number of characters to remove.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_truncate ##### -->
+<para>
+Cuts off the end of the GString, leaving the first @len characters.
+</para>
+
+@string: a #GString.
+@len: the new size of the #GString.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_free ##### -->
+<para>
+Frees the memory allocated for the #GString.
+If free_segment is TRUE it also frees the character data.
+</para>
+
+@string: a #GString.
+@free_segment: if TRUE the actual character data is freed as well.
+
+
+<!-- ##### FUNCTION g_string_up ##### -->
+<para>
+Converts a #GString to upper case.
+</para>
+
+@string: a #GString.
+@Returns: the #GString.
+
+
+<!-- ##### FUNCTION g_string_down ##### -->
+<para>
+Converts a #GString to lower case.
+</para>
+
+@string: a #GString.
+@Returns: the #GString.
+
+
diff --git a/docs/reference/glib/tmpl/threads.sgml b/docs/reference/glib/tmpl/threads.sgml
new file mode 100644 (file)
index 0000000..8b2a372
--- /dev/null
@@ -0,0 +1,939 @@
+<!-- ##### SECTION Title ##### -->
+
+Threads
+
+<!-- ##### SECTION Short_Description ##### -->
+
+thread abstraction; including mutexes, conditions and thread private data.
+
+<!-- ##### SECTION Long_Description ##### -->
+
+<para>
+Threads act almost like processes, but unlike processes all threads of
+one process share the same memory. This is good, as it provides easy
+communication between the involved threads via this shared memory, and
+it is bad, because strange things (so called Heisenbugs) might happen,
+when the program is not carefully designed. Especially bad is, that due
+to the concurrent nature of threads no assumptions on the order of
+execution of different threads can be done unless explictly forced by
+the programmer through synchronization primitives.
+</para>
+
+<para>
+The aim of the thread related functions in GLib is to provide a
+portable means for writing multithread safe software. There are
+primitives for mutexes to protect the access to portions of memory
+(#GMutex, #GStaticMutex, #G_LOCK_DEFINE and friends), there are
+primitives for condition variables to allow synchronization of threads
+(#GCond) and finally there are primitives for thread-private data,
+that every thread has a private instance of (#GPrivate,
+#GStaticPrivate).
+</para>
+
+<para>
+Currently there is only as much thread support included in GLib as is
+necessary to make GLib itself multithread safe. Future versions of
+GLib might contain functions to actually create threads and the
+like. For now the most portable way to create threads is to require
+the macro #G_THREADS_IMPL_POSIX to be defined and use POSIX threads
+then. This will work on almost all platforms (except most notably
+Solaris).
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO G_THREADS_ENABLED ##### -->
+
+<para>
+This macro is defined, if GLib was compiled with thread support. This
+does not necessarily mean, that there is a thread implementation
+available, but the infrastructure is in place and once you provide a
+thread implementation to g_thread_init(), GLib will be multithread
+safe. It isn't and can't be, if #G_THREADS_ENABLED is not defined.
+</para>
+
+
+
+<!-- ##### MACRO G_THREADS_IMPL_POSIX ##### -->
+
+<para>
+This macro is defined, if POSIX style threads are used.
+</para>
+
+
+
+<!-- ##### MACRO G_THREADS_IMPL_SOLARIS ##### -->
+
+<para>
+This macro is defined, if the SOLARIS thread system is used.
+</para>
+
+
+
+<!-- ##### MACRO G_THREADS_IMPL_NSPR ##### -->
+
+<para>
+This macro is defined, if the NSPR thread implementation is used.
+NSPR is the cross platform library of mozilla.
+</para>
+
+
+
+<!-- ##### MACRO G_THREADS_IMPL_NONE ##### -->
+
+<para>
+This macro is defined, if no thread implementation is used. You can
+however provide one to g_thread_init() to make GLib multithread safe.
+</para>
+
+
+
+<!-- ##### STRUCT GThreadFunctions ##### -->
+
+<para>
+This function table is used by g_thread_init() to initialize the
+thread system. The functions in that table are directly used by their
+g_* prepended counterparts, that are described here, e.g. if you call
+g_mutex_new() then mutex_new() from the table provided to
+g_thread_init() will be called.
+</para>
+
+<note>
+<para>
+This struct should only be used, if you know, what you are doing.
+</para>
+</note>
+
+@mutex_new: 
+@mutex_lock: 
+@mutex_trylock: 
+@mutex_unlock: 
+@mutex_free: 
+@cond_new: 
+@cond_signal: 
+@cond_broadcast: 
+@cond_wait: 
+@cond_timed_wait: 
+@cond_free: 
+@private_new: 
+@private_get: 
+@private_set: 
+
+<!-- ##### FUNCTION g_thread_init ##### -->
+
+<para>
+Before you use a thread related function in GLib, you should
+initialize the thread system. This is done by calling
+g_thread_init(). Most of the time you will only have to call
+g_thread_init(NULL). 
+</para>
+
+<note>
+<para>
+You should only call g_thread_init() with a non-NULL parameter, if you
+really know, what you are doing.
+</para>
+</note>
+
+<note>
+<para>
+g_thread_init() must not be called directly or indirectly as a
+callback from GLib.
+</para>
+</note>
+
+<para>
+g_thread_init() might only be called once. On the second call
+it will abort with an error. If you want to make sure, that the thread
+system is initialized, you can do that too:
+</para>
+
+<para>
+<informalexample>
+<programlisting>
+if (!g_thread_supported ()) g_thread_init (NULL);
+</programlisting>
+</informalexample>
+</para>
+
+<para>
+After that line either the thread system is initialized or the program
+will abort, if no thread system is available in GLib, i.e. either
+#G_THREADS_ENABLED is not defined or #G_THREADS_IMPL_NONE is defined.
+</para>
+
+<para>
+If no thread system is available and @vtable is NULL or if not all
+elements of @vtable are non-NULL, then g_thread_init() will abort.
+</para>
+
+<note>
+<para>
+To use g_thread_init() in your program, you have to link with the
+libraries, that the command "glib-config --libs gthread" outputs. This
+is not the case for all the other thread related functions of
+GLib. Those can be used without having to link with the thread
+libraries.
+</para>
+</note>
+
+@vtable: a function table of type #GThreadFunctions, that provides the
+entry points to the thread system to be used.
+
+
+<!-- ##### MACRO g_thread_supported ##### -->
+<para>
+This function returns, whether the thread system is initialized or
+not.
+</para>
+
+<note>
+<para>
+This function is actually a macro. Apart from taking the address of it
+you can however use it as if it was a function.
+</para>
+</note>
+
+@Returns: TRUE, if the thread system is initialized.
+
+
+<!-- ##### STRUCT GMutex ##### -->
+
+<para>
+The #GMutex struct is an opaque data structure to represent a mutex
+(mutual exclusion). It can be used to protect data against shared
+access. Take for example the following function:
+
+<para>
+<example>
+<title>A function which will not work in a threaded environment</title>
+<programlisting>
+  int give_me_next_number ()
+  {
+    static int current_number = 0;
+
+    /* now do a very complicated calculation to calculate the new number,
+       this might for example be a random number generator */
+    current_number = calc_next_number (current_number); 
+    return current_number;
+  }
+</programlisting>
+</example>
+</para>
+
+<para>
+It is easy to see, that this won't work in a multithreaded
+application. There current_number must be protected against shared
+access. A first naive implementation would be:
+</para>
+
+<para>
+<example>
+<title>The wrong way to write a thread-safe function</title>
+<programlisting>
+  int give_me_next_number ()
+  {
+    static int current_number = 0;
+    int ret_val;
+    static GMutex * mutex = NULL;
+
+    if (!mutex)
+      mutex = g_mutex_new ();
+    g_mutex_lock (mutex);
+    ret_val = current_number = calc_next_number (current_number); 
+    g_mutex_unlock (mutex);
+    return ret_val;
+  }
+</programlisting>
+</example>
+</para>
+
+<para>
+This looks like it would work, but there is a race condition while
+constructing the mutex and this code can't work reliable. So please do
+not use such constructs in your own programs. One working solution is:
+</para>
+
+<para>
+<example>
+<title>A correct thread-safe function</title>
+<programlisting>
+  static GMutex *give_me_next_number_mutex = NULL;
+
+  /* this function must be called before any call to give_me_next_number ()
+     it must be called exactly once. */
+  void init_give_me_next_number () 
+  {
+    g_assert (give_me_next_number_mutex == NULL);
+    give_me_next_number_mutex = g_mutex_new ();
+  }
+
+  int give_me_next_number ()
+  {
+    static int current_number = 0;
+    int ret_val;
+
+    g_mutex_lock (give_me_next_number_mutex);
+    ret_val = current_number = calc_next_number (current_number); 
+    g_mutex_unlock (give_me_next_number_mutex);
+    return ret_val;
+  }
+</programlisting>
+</example>
+</para>
+
+<para>
+#GStaticMutex provides a simpler and safer way of doing this.
+</para>
+
+<para>
+A #GMutex should only be accessed via the following functions.
+</para>
+
+<note>
+<para>
+All of the g_mutex_* functions are actually macros. Apart from taking
+the addresses of them, you can however use them as if they were functions.
+</para>
+</note>
+
+
+<!-- ##### MACRO g_mutex_new ##### -->
+
+<para>
+Creates a new #GMutex. 
+</para>
+
+<note>
+<para>
+This function will abort, if g_thread_init() has not been called yet.
+</para>
+</note>
+
+@Returns: a new #GMutex.
+
+
+<!-- ##### MACRO g_mutex_lock ##### -->
+
+<para>
+Locks the #GMutex. If the #GMutex is already locked by another thread,
+the current thread will block until the #GMutex is unlocked by the
+other thread.
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has not yet been
+called and will do nothing then.
+</para>
+
+<note>
+<para>
+#GMutex is not guaranteed to be recursive, i.e. a thread might block,
+if it already has locked the #GMutex. It will deadlock then, of
+course.
+</para>
+</note>
+
+@mutex: a #GMutex.
+
+
+<!-- ##### MACRO g_mutex_trylock ##### -->
+
+<para>
+Tries to lock the #GMutex. If the #GMutex is already locked by another
+thread, it immediately returns FALSE. Otherwise it locks the #GMutex
+and returns TRUE.
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has not yet been
+called and will immediately return TRUE then.
+</para>
+
+@mutex: a #GMutex.
+@Returns: TRUE, if the #GMutex could be locked.
+
+
+<!-- ##### MACRO g_mutex_unlock ##### -->
+
+<para>
+Unlocks the #GMutex. If another thread is blocked in a g_mutex_lock()
+call, it will be woken and can lock the #GMutex itself. This function
+can also be used, if g_thread_init() has not yet been called and will
+do nothing then.
+</para>
+
+@mutex: a #GMutex.
+
+
+<!-- ##### MACRO g_mutex_free ##### -->
+
+<para>
+Destroys the #GMutex.
+</para>
+
+@mutex: a #GMutex.
+
+
+<!-- ##### STRUCT GStaticMutex ##### -->
+
+<para>
+A #GStaticMutex works like a #GMutex, but it has one significant
+advantage. It doesn't need to be created at run-time like a #GMutex,
+but can be defined at compile-time. Here is a shorter, easier and
+safer version of our give_me_next_number() example:
+</para>
+
+<para>
+<example>
+<title>Using GStaticMutex to simplify thread-safe programming</title>
+<programlisting>
+  int give_me_next_number ()
+  {
+    static int current_number = 0;
+    int ret_val;
+    static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+
+    g_static_mutex_lock (&amp;mutex);
+    ret_val = current_number = calc_next_number (current_number); 
+    g_static_mutex_unlock (&amp;mutex);
+    return ret_val;
+  }
+</programlisting>
+</example>
+</para>
+
+<para>
+Even though #GStaticMutex is not opaque, it should only be used with
+the following functions, as it is defined differently on different
+platforms.
+</para>
+
+<para>All of the g_static_mutex_* functions can also be used, if
+g_thread_init() has not yet.
+</para>
+
+<note>
+<para>
+All of the g_static_mutex_* functions are actually macros. Apart from
+taking the addresses of them, you can however use them as if they were
+functions.
+</para>
+</note>
+
+@runtime_mutex: 
+
+<!-- ##### MACRO G_STATIC_MUTEX_INIT ##### -->
+
+<para>
+Every #GStaticMutex must be initialized with this macro, before it can
+be used.
+</para>
+
+<para>
+<example>
+<title>Initializing a GStaticMutext</title>
+<programlisting>
+GStaticMutex my_mutex = G_STATIC_MUTEX_INIT;
+</programlisting>
+</example>
+</para>
+
+
+
+<!-- ##### MACRO g_static_mutex_lock ##### -->
+<para>
+works like g_mutex_lock(), but for a #GStaticMutex.
+</para>
+
+@mutex: a #GStaticMutex.
+
+
+<!-- ##### MACRO g_static_mutex_trylock ##### -->
+
+<para>
+works like g_mutex_trylock(), but for a #GStaticMutex.
+</para>
+
+@mutex: a #GStaticMutex.
+@Returns: TRUE, if the #GStaticMutex could be locked.
+
+
+<!-- ##### MACRO g_static_mutex_unlock ##### -->
+
+<para>
+works like g_mutex_unlock(), but for a #GStaticMutex.
+</para>
+
+@mutex: a #GStaticMutex.
+
+
+<!-- ##### MACRO g_static_mutex_get_mutex ##### -->
+
+<para>
+For some operations (like g_cond_wait()) you must have a #GMutex
+instead of a #GStaticMutex. This function will return the
+corresponding #GMutex for every #GStaticMutex.
+</para>
+
+@mutex: a #GStaticMutex.
+@Returns: the corresponding #GMutex.
+
+
+<!-- ##### MACRO G_LOCK_DEFINE ##### -->
+
+<para>
+The G_LOCK_* macros provide a convenient interface to #GStaticMutex
+with the advantage that they will expand to nothing in programs
+compiled against a thread-disabled GLib, saving code and memory
+there. #G_LOCK_DEFINE defines a lock. It can occur, where variable
+definitions may occur in programs, i.e. in the first block of a
+function or outside of functions. The @name parameter will be mangled
+to get the name of the #GStaticMutex. This means, that you can use
+names of existing variables as the parameter, e.g. the name of the
+variable you intent to protect with the lock. Look at our
+give_me_next_number() example using the G_LOCK_* macros:
+</para>
+
+<para>
+<example>
+<title>Using the G_LOCK_* convenience macros</title>
+<programlisting>
+int give_me_next_number ()
+  {
+    static int current_number = 0;
+    int ret_val;
+    G_LOCK_DEFINE_STATIC (current_number);
+
+    G_LOCK (current_number);
+    ret_val = current_number = calc_next_number (current_number); 
+    G_UNLOCK (current_number);
+    return ret_val;
+  }
+</programlisting>
+</example>
+</para>
+
+@name: the name of the lock.
+
+
+<!-- ##### MACRO G_LOCK_DEFINE_STATIC ##### -->
+
+<para>
+This works like #G_LOCK_DEFINE, but it creates a static object.
+</para>
+
+@name: the name of the lock.
+
+
+<!-- ##### MACRO G_LOCK_EXTERN ##### -->
+
+<para>
+This declares a lock, that is defined with #G_LOCK_DEFINE in another module.
+</para>
+
+@name: the name of the lock.
+
+
+<!-- ##### MACRO G_LOCK ##### -->
+
+<para>
+works like g_mutex_lock(), but for a lock defined with #G_LOCK_DEFINE.
+</para>
+
+@name: the name of the lock.
+
+
+<!-- ##### MACRO G_TRYLOCK ##### -->
+
+<para>
+works like g_mutex_trylock(), but for a lock defined with #G_LOCK_DEFINE.
+</para>
+
+@name: the name of the lock.
+@Returns: TRUE, if the lock could be locked.
+
+
+<!-- ##### MACRO G_UNLOCK ##### -->
+
+<para>
+works like g_mutex_unlock(), but for a lock defined with #G_LOCK_DEFINE.
+</para>
+
+@name: the name of the lock.
+
+
+<!-- ##### STRUCT GCond ##### -->
+
+<para>
+The #GCond struct is an opaque data structure to represent a
+condition. A #GCond is an object, that threads can block on, if they
+find a certain condition to be false. If other threads change the
+state of this condition they can signal the #GCond, such that the
+waiting thread is woken up. 
+</para>
+
+<para>
+<example>
+<title>Using GCond to block a thread until a condition is satisfied</title>
+<programlisting>
+GCond* data_cond = NULL;   /* Must be initialized somewhere */
+GMutex* data_mutex = NULL; /* Must be initialized somewhere */
+gpointer current_data = NULL;
+
+void push_data (gpointer data)
+{
+  g_mutex_lock (data_mutex);
+  current_data = data;
+  g_cond_signal (data_cond);
+  g_mutex_unlock (data_mutex);
+}
+
+gpointer pop_data ()
+{
+  gpointer data;
+
+  g_mutex_lock (data_mutex);
+  while (!current_data)
+      g_cond_wait (data_cond, data_mutex);
+  data = current_data;
+  current_data = NULL;
+  g_mutex_unlock (data_mutex);
+  return data;
+}
+</programlisting>
+</example>
+</para>
+
+<para>
+Whenever a thread calls pop_data() now, it will wait until
+current_data is non-NULL, i.e. until some other thread has called
+push_data().
+</para>
+
+<note>
+<para>
+It is important to use the g_cond_wait() and g_cond_timed_wait()
+functions only inside a loop, which checks for the condition to be
+true as it is not guaranteed that the waiting thread will find it
+fulfilled, even if the signaling thread left the condition
+in that state. This is because another thread can have altered the
+condition, before the waiting thread got the chance to be woken up,
+even if the condition itself is protected by a #GMutex, like above.
+</para>
+</note>
+
+<para>
+A #GCond should only be accessed via the following functions.
+</para>
+
+<note>
+<para>
+All of the g_cond_* functions are actually macros. Apart from taking
+the addresses of them, you can however use them as if they were functions.
+</para>
+</note>
+
+
+<!-- ##### MACRO g_cond_new ##### -->
+
+<para>
+Creates a new #GCond. This function will abort, if g_thread_init()
+has not been called yet.
+</para>
+
+@Returns: a new #GCond.
+
+
+<!-- ##### MACRO g_cond_signal ##### -->
+<para>
+If threads are waiting for @cond, exactly one of them is woken up. It
+is good practice to hold the same lock as the waiting thread, while
+calling this function, though not required.
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has
+not yet been called and will do nothing then.
+</para>
+
+@cond: a #GCond.
+
+
+<!-- ##### MACRO g_cond_broadcast ##### -->
+
+<para>
+If threads are waiting for @cond, all of them are woken up. It is good
+practice to lock the same mutex as the waiting threads, while calling
+this function, though not required.
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has
+not yet been called and will do nothing then.
+</para>
+
+@cond: a #GCond.
+
+
+<!-- ##### MACRO g_cond_wait ##### -->
+
+<para>
+Waits until this thread is woken up on the #GCond. The #GMutex is
+unlocked before falling asleep and locked again before resuming.
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has not yet been
+called and will immediately return then.
+</para>
+
+@cond: a #GCond.
+@mutex: the #GMutex, that is currently locked.
+
+
+<!-- ##### MACRO g_cond_timed_wait ##### -->
+
+<para>
+Waits until this thread is woken up on the #GCond, but not longer than
+until the time, that is specified by @abs_time. The #GMutex is
+unlocked before falling asleep and locked again before resuming.
+</para>
+
+<para>
+If @abs_time is NULL, g_cond_timed_wait() acts like g_cond_wait().
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has not yet been
+called and will immediately return TRUE then.
+</para>
+
+@cond: a #GCond.
+@mutex: the #GMutex, that is currently locked.
+@abs_time: a #GTimeVal, determining the final time.
+@Returns: TRUE, if the thread is woken up in time.
+
+
+<!-- ##### MACRO g_cond_free ##### -->
+
+<para>
+Destroys the #GCond.
+</para>
+
+@cond: a #GCond.
+
+
+<!-- ##### STRUCT GPrivate ##### -->
+<para>
+The #GPrivate struct is an opaque data structure to represent a thread
+private data key. Threads can thereby obtain and set a pointer, which
+is private to the current thread. Take our give_me_next_number()
+example from above.  Now we don't want current_number to be shared
+between the threads, but to be private to each thread. This can be
+done as follows:
+
+<para>
+<example>
+<title>Using GPrivate for per-thread data</title>
+<programlisting>
+  GPrivate* current_number_key = NULL; /* Must be initialized somewhere */
+                                       /* with g_private_new (g_free); */
+
+  int give_me_next_number ()
+  {
+    int *current_number = g_private_get (current_number_key);
+
+    if (!current_number)
+    {
+      current_number = g_new (int,1);
+      *current_number = 0;
+      g_private_set (current_number_key, current_number);
+    }
+    *current_number = calc_next_number (*current_number); 
+    return *current_number;
+  }
+</programlisting>
+</example>
+</para>
+
+<para>
+Here the pointer belonging to the key current_number_key is read. If
+it is NULL, it has not been set yet. Then get memory for an integer
+value, assign this memory to the pointer and write the pointer
+back. Now we have an integer value, that is private to the current
+thread.
+</para>
+
+<para>
+The #GPrivate struct should only be accessed via the following functions.
+</para>
+
+<note>
+<para>
+All of the g_private_* functions are actually macros. Apart from taking
+the addresses of them, you can however use them as if they were functions.
+</para>
+</note>
+
+
+<!-- ##### MACRO g_private_new ##### -->
+
+<para>
+Creates a new #GPrivate. If @destructor is non-NULL, it is a pointer
+to a destructor function. Whenever a thread ends and the corresponding
+pointer keyed to this instance of #GPrivate is non-NULL, the
+destructor is called with this pointer as the argument.
+</para>
+
+<note>
+<para>
+The @destructor is working quite differently from @notify in
+g_static_private_set().
+</para>
+</note>
+
+<note>
+<para>
+A #GPrivate can not be destroyed. Reuse it instead, if you can to
+avoid shortage.
+</para>
+</note>
+
+<note>
+<para>
+This function will abort, if g_thread_init() has not been called yet.
+</para>
+</note>
+
+@destructor: a function to handle the data keyed to #GPrivate, when a
+thread ends.
+
+
+<!-- ##### MACRO g_private_get ##### -->
+
+<para>
+Returns the pointer keyed to @private_key for the current thread. This
+pointer is NULL, when g_private_set() hasn't been called for the
+current @private_key and thread yet.
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has not yet been
+called and will return the value of @private_key casted to #gpointer then.
+</para>
+
+@private_key: a #GPrivate.
+@Returns: the corresponding pointer.
+
+
+<!-- ##### MACRO g_private_set ##### -->
+
+<para>
+Sets the pointer keyed to @private_key for the current thread.
+</para>
+
+<para>
+This function can also be used, if g_thread_init() has not yet been
+called and will set @private_key to @data casted to #GPrivate* then.
+</para>
+
+@private_key: a #GPrivate.
+@value: 
+<!-- # Unused Parameters # -->
+@data: the new pointer.
+
+
+<!-- ##### STRUCT GStaticPrivate ##### -->
+
+<para>
+A #GStaticPrivate works almost like a #GPrivate, but it has one
+significant advantage. It doesn't need to be created at run-time like
+a #GPrivate, but can be defined at compile-time. This is similar to
+the difference between #GMutex and #GStaticMutex. Now look at our
+give_me_next_number() example with #GStaticPrivate:
+</para>
+
+<para>
+<example>
+<title>Using GStaticPrivate for per-thread data</title>
+<programlisting>
+  int give_me_next_number ()
+  {
+    static GStaticPrivate current_number_key = G_STATIC_PRIVATE_INIT;
+    int *current_number = g_static_private_get (&amp;current_number_key);
+
+    if (!current_number)
+    {
+      current_number = g_new (int,1);
+      *current_number = 0;
+      g_static_private_set (&amp;current_number_key, current_number, g_free);
+    }
+    *current_number = calc_next_number (*current_number); 
+    return *current_number;
+  }
+</programlisting>
+</example>
+</para>
+
+@index: 
+
+<!-- ##### MACRO G_STATIC_PRIVATE_INIT ##### -->
+<para>
+Every #GStaticPrivate must be initialized with this macro, before it can
+be used.
+</para>
+
+<para>
+<informalexample>
+<programlisting>
+GStaticPrivate my_private = G_STATIC_PRIVATE_INIT;
+</programlisting>
+</informalexample>
+</para>
+
+
+
+<!-- ##### FUNCTION g_static_private_get ##### -->
+<para>
+Works like g_private_get() only for a #GStaticPrivate.
+</para>
+
+<para>
+This function also works, if g_thread_init() has not yet been called.
+</para>
+
+@private_key: a #GStaticPrivate.
+@Returns: the corresponding pointer.
+
+
+<!-- ##### FUNCTION g_static_private_set ##### -->
+<para>
+Sets the pointer keyed to @private_key for the current thread and the
+function @notify to be called with that pointer (NULL or non-NULL),
+whenever the pointer is set again or whenever the current thread ends.
+</para>
+
+<para>
+This function also works, if g_thread_init() has not yet been
+called. If g_thread_init() is called later, the @data keyed to
+@private_key will be inherited only by the main thread, i.e. the one that
+called g_thread_init().
+</para>
+
+<note>
+<para>
+The @notify is working quite differently from @destructor in
+g_private_new().
+</para>
+</note>
+
+@private_key: a #GStaticPrivate.
+@data: the new pointer.
+@notify: a function to be called with the pointer, whenever the
+current thread ends or sets this pointer again.
+
+
diff --git a/docs/reference/glib/tmpl/timers.sgml b/docs/reference/glib/tmpl/timers.sgml
new file mode 100644 (file)
index 0000000..840a0bc
--- /dev/null
@@ -0,0 +1,75 @@
+<!-- ##### SECTION Title ##### -->
+Timers
+
+<!-- ##### SECTION Short_Description ##### -->
+functions to time operations.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+Timers can be used to time operations, in a similar way to a stopwatch.
+Call g_timer_new () to create the timer, g_timer_start () to start it,
+g_timer_elapsed () to determine the time which has elapsed since the timer
+was started, and g_timer_stop () to stop the timer.
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GTimer ##### -->
+<para>
+An opaque data structure which holds the timer information.
+</para>
+
+
+<!-- ##### FUNCTION g_timer_new ##### -->
+<para>
+Creates a new timer.
+</para>
+
+@Returns: the new timer.
+
+
+<!-- ##### FUNCTION g_timer_start ##### -->
+<para>
+Starts the timer.
+</para>
+
+@timer: the timer.
+
+
+<!-- ##### FUNCTION g_timer_stop ##### -->
+<para>
+Stops the timer.
+</para>
+
+@timer: the timer.
+
+
+<!-- ##### FUNCTION g_timer_elapsed ##### -->
+<para>
+
+</para>
+
+@timer: the timer.
+@microseconds: if non-NULL, this will be set to the microseconds component
+of the elapsed time (it does not include the number of seconds elapsed).
+@Returns: the elapsed time in seconds, as a double.
+
+
+<!-- ##### FUNCTION g_timer_reset ##### -->
+<para>
+Resets the elapsed time to 0, leaving the timer running.
+</para>
+
+@timer: the timer.
+
+
+<!-- ##### FUNCTION g_timer_destroy ##### -->
+<para>
+Destroys the timer, freeing the memory allocated for it.
+</para>
+
+@timer: the timer.
+
+
diff --git a/docs/reference/glib/tmpl/trees-binary.sgml b/docs/reference/glib/tmpl/trees-binary.sgml
new file mode 100644 (file)
index 0000000..ef2f9e1
--- /dev/null
@@ -0,0 +1,228 @@
+<!-- ##### SECTION Title ##### -->
+Balanced Binary Trees
+
+<!-- ##### SECTION Short_Description ##### -->
+a sorted collection of key/value pairs optimised for searching
+and traversing in order.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GTree structure and its associated functions provide a sorted collection
+of key/value pairs optimised for searching and traversing in order.
+</para>
+<para>
+To create a new #GTree use g_tree_new().
+</para>
+<para>
+To insert a key/value pair into a #GTree use g_tree_insert().
+</para>
+<para>
+To lookup the value corresponding to a given key, use g_tree_lookup().
+</para>
+<para>
+To find out the number of nodes in a #GTree, use g_tree_nnodes().
+To get the height of a #GTree, use g_tree_height().
+</para>
+<para>
+To traverse a #GTree, calling a function for each node visited in the
+traversal, use g_tree_traverse().
+</para>
+<para>
+To remove a key/value pair use g_tree_remove().
+</para>
+<para>
+To destroy a #GTree, use g_tree_destroy().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GTree ##### -->
+<para>
+The #GTree struct is an opaque data structure representing a
+<link linkend="glib-Balanced-Binary-Trees">Balanced Binary Tree</link>.
+It should be accessed only by using the following functions.
+</para>
+
+
+<!-- ##### FUNCTION g_tree_new ##### -->
+<para>
+Creates a new GTree.
+</para>
+
+@key_compare_func: the function used to order the nodes in the #GTree.
+It should return values similar to the standard <function>strcmp()</function>
+function -
+0 if the two arguments are equal, a negative value if the first argument comes
+before the second, or a positive value if the first argument comes after the
+second.
+@Returns: a new #GTree.
+
+
+<!-- ##### FUNCTION g_tree_insert ##### -->
+<para>
+Inserts a key/value pair into a #GTree.
+If the given key already exists in the #GTree it is set to the new value.
+(If you are using dynamically allocated keys and values you should be careful
+to ensure that the old values are freed.)
+</para>
+<para>
+The tree is automatically 'balanced' as new key/value pairs are added,
+so that the distance from the root to every leaf is as small as possible.
+</para>
+
+@tree: a #GTree.
+@key: the key to insert.
+@value: the value corresponding to the key.
+
+
+<!-- ##### FUNCTION g_tree_nnodes ##### -->
+<para>
+Gets the number of nodes in a #GTree.
+</para>
+
+@tree: a #GTree.
+@Returns: the number of nodes in the #GTree.
+
+
+<!-- ##### FUNCTION g_tree_height ##### -->
+<para>
+Gets the height of a #GTree.
+</para>
+<para>
+If the #GTree contains no nodes, the height is 0.
+If the #GTree contains only one root node the height is 1.
+If the root node has children the height is 2, etc.
+</para>
+
+@tree: a #GTree.
+@Returns: the height of the #GTree.
+
+
+<!-- ##### FUNCTION g_tree_lookup ##### -->
+<para>
+Gets the value corresponding to the given key.
+Since a #GTree is automatically balanced as key/value pairs are
+added, key lookup is very fast.
+</para>
+
+@tree: a #GTree.
+@key: the key to look up.
+@Returns: the value corresponding to the key.
+
+
+<!-- ##### FUNCTION g_tree_search ##### -->
+<para>
+Searches a #GTree using an alternative form of the comparison function.
+</para>
+<para>
+This function is not as useful as it sounds.
+It allows you to use a different function for performing the lookup of
+a key. However, since the tree is ordered according to the @key_compare_func
+function passed to g_tree_new(), the function you pass to g_tree_search() must
+return exactly the same value as would be returned by the comparison function,
+for each pair of tree nodes, or the search will not work.
+</para>
+<para>
+To search for a specific value, you can use g_tree_traverse().
+</para>
+
+@tree: a #GTree.
+@search_func: the comparison function used to search the #GTree.
+@data: the data passed as the second argument to the @search_func function.
+@Returns: the value corresponding to the found key, or NULL if the key is
+not found.
+
+
+<!-- ##### USER_FUNCTION GSearchFunc ##### -->
+<para>
+Specifies the type of function passed to g_tree_search().
+</para>
+
+@key: a key from a #GTree.
+@data: the data to compare with the key.
+@Returns: 0 if the desired key has been found, a negative number if the
+desired key comes before @key in the sort order of the #GTree, or a positive
+value if the desired key comes after @key.
+
+
+<!-- ##### FUNCTION g_tree_traverse ##### -->
+<para>
+Calls the given function for each node in the GTree.
+</para>
+
+@tree: a #GTree.
+@traverse_func: the function to call for each node visited. If this function
+returns TRUE, the traversal is stopped.
+@traverse_type: the order in which nodes are visited, one of %G_IN_ORDER,
+%G_PRE_ORDER and %G_POST_ORDER.
+@data: user data to pass to the traverse function.
+
+
+<!-- ##### USER_FUNCTION GTraverseFunc ##### -->
+<para>
+Specifies the type of function passed to g_tree_traverse().
+It is passed the key and value of each node, together with
+the @user_data parameter passed to g_tree_traverse().
+If the function returns TRUE, the traversal is stopped.
+</para>
+
+@key: a key of a #GTree node.
+@value: the value corresponding to the key.
+@data: user data passed to g_tree_traverse().
+@Returns: TRUE to stop the traversal.
+
+
+<!-- ##### ENUM GTraverseType ##### -->
+<para>
+Specifies the type of traveral performed by g_tree_traverse(),
+g_node_traverse() and g_node_find().
+<itemizedlist>
+<listitem><para>
+%G_PRE_ORDER visits a node, then its children.
+</para></listitem>
+<listitem><para>
+%G_IN_ORDER vists a node's left child first, then the node itself, then its
+right child. This is the one to use if you want the output sorted according
+to the compare function.
+</para></listitem>
+<listitem><para>
+%G_POST_ORDER visits the node's children, then the node itself.
+</para></listitem>
+<listitem><para>
+%G_LEVEL_ORDER is not implemented for
+<link linkend="glib-Balanced-Binary-Trees">Balanced Binary Trees</link>.
+For <link linkend="glib-N-ary-Trees">N-ary Trees</link>
+it calls the function for each child of the node, then it recursively visits
+each child.
+</para></listitem>
+</itemizedlist>
+</para>
+
+@G_IN_ORDER: 
+@G_PRE_ORDER: 
+@G_POST_ORDER: 
+@G_LEVEL_ORDER: 
+
+<!-- ##### FUNCTION g_tree_remove ##### -->
+<para>
+Removes a key/value pair from a #GTree.
+If the key or value is dynamically allocated you must remember to free them
+yourself.
+</para>
+
+@tree: a #GTree.
+@key: the key to remove.
+
+
+<!-- ##### FUNCTION g_tree_destroy ##### -->
+<para>
+Destroys the #GTree, freeing all of the memory allocated.
+But it doesn't free keys or values.
+</para>
+
+@tree: a #GTree.
+
+
diff --git a/docs/reference/glib/tmpl/trees-nary.sgml b/docs/reference/glib/tmpl/trees-nary.sgml
new file mode 100644 (file)
index 0000000..d456831
--- /dev/null
@@ -0,0 +1,493 @@
+<!-- ##### SECTION Title ##### -->
+N-ary Trees
+
+<!-- ##### SECTION Short_Description ##### -->
+trees of data with any number of branches.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+The #GNode struct and its associated functions provide a N-ary tree data
+structure, where nodes in the tree can contain arbitrary data.
+</para>
+<para>
+To create a new tree use g_node_new().
+</para>
+<para>
+To insert a node into a tree use g_node_insert(), g_node_insert_before(),
+g_node_append() and g_node_prepend().
+</para>
+<para>
+To create a new node and insert it into a tree use g_node_insert_data(), 
+g_node_insert_data_before(), g_node_append_data() and g_node_prepend_data().
+</para>
+<para>
+To reverse the children of a node use g_node_reverse_children().
+</para>
+<para>
+To find a node use g_node_get_root(), g_node_find(), g_node_find_child(),
+g_node_child_index(), g_node_child_position(), 
+g_node_first_child(), g_node_last_child(),
+g_node_nth_child(), g_node_first_sibling(), g_node_prev_sibling(),
+g_node_next_sibling() or g_node_last_sibling().
+</para>
+<para>
+To get information about a node or tree use G_NODE_IS_LEAF(),
+G_NODE_IS_ROOT(), g_node_depth(), g_node_n_nodes(), g_node_n_children(),
+g_node_is_ancestor() or g_node_max_height().
+</para>
+<para>
+To traverse a tree, calling a function for each node visited in the
+traversal, use g_node_traverse() or g_node_children_foreach().
+</para>
+<para>
+To remove a node or subtree from a tree use g_node_unlink() or
+g_node_destroy().
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT GNode ##### -->
+<para>
+The #GNode struct represents one node in a
+<link linkend="glib-N-ary-Trees">N-ary Tree</link>.
+The <structfield>data</structfield> field contains the actual data of the node.
+The <structfield>next</structfield> and <structfield>prev</structfield>
+fields point to the node's siblings (a sibling is another #GNode with the
+same parent).
+The <structfield>parent</structfield> field points to the parent of the #GNode,
+or is NULL if the #GNode is the root of the tree.
+The <structfield>children</structfield> field points to the first child of the
+#GNode. The other children are accessed by using the
+<structfield>next</structfield> pointer of each child.
+</para>
+
+@data: 
+@next: 
+@prev: 
+@parent: 
+@children: 
+
+<!-- ##### FUNCTION g_node_new ##### -->
+<para>
+Creates a new #GNode containing the given data.
+Used to create the first node in a tree.
+</para>
+
+@data: the data of the new node.
+@Returns: a new #GNode.
+
+
+<!-- ##### FUNCTION g_node_insert ##### -->
+<para>
+Inserts a #GNode beneath the parent at the given position.
+</para>
+
+@parent: the #GNode to place @node under.
+@position: the position to place @node at, with respect to its siblings.
+If position is -1, @node is inserted as the last child of @parent.
+@node: the #GNode to insert.
+@Returns: the inserted #GNode.
+
+
+<!-- ##### FUNCTION g_node_insert_before ##### -->
+<para>
+Inserts a #GNode beneath the parent before the given sibling.
+</para>
+
+@parent: the #GNode to place @node under.
+@sibling: the sibling #GNode to place @node before. If sibling is NULL,
+the node is inserted as the last child of @parent.
+@node: the #GNode to insert.
+@Returns: the inserted #GNode.
+
+
+<!-- ##### MACRO g_node_append ##### -->
+<para>
+Inserts a #GNode as the last child of the given parent.
+</para>
+
+@parent: the #GNode to place the new #GNode under.
+@node: the #GNode to insert.
+@Returns: the inserted #GNode.
+
+
+<!-- ##### FUNCTION g_node_prepend ##### -->
+<para>
+Inserts a #GNode as the first child of the given parent.
+</para>
+
+@parent: the #GNode to place the new #GNode under.
+@node: the #GNode to insert.
+@Returns: the inserted #GNode.
+
+
+<!-- ##### MACRO g_node_insert_data ##### -->
+<para>
+Inserts a new #GNode at the given position.
+</para>
+
+@parent: the #GNode to place the new #GNode under.
+@position: the position to place the new #GNode at.
+If position is -1, the new #GNode is inserted as the last child of @parent.
+@data: the data for the new #GNode.
+@Returns: the new #GNode.
+
+
+<!-- ##### MACRO g_node_insert_data_before ##### -->
+<para>
+Inserts a new #GNode before the given sibling.
+</para>
+
+@parent: the #GNode to place the new #GNode under.
+@sibling: the sibling #GNode to place the new #GNode before.
+@data: the data for the new #GNode.
+@Returns: the new #GNode.
+
+
+<!-- ##### MACRO g_node_append_data ##### -->
+<para>
+Inserts a new #GNode as the last child of the given parent.
+</para>
+
+@parent: the #GNode to place the new #GNode under.
+@data: the data for the new #GNode.
+@Returns: the new #GNode.
+
+
+<!-- ##### MACRO g_node_prepend_data ##### -->
+<para>
+Inserts a new #GNode as the first child of the given parent.
+</para>
+
+@parent: the #GNode to place the new #GNode under.
+@data: the data for the new #GNode.
+@Returns: the new #GNode.
+
+
+<!-- ##### FUNCTION g_node_reverse_children ##### -->
+<para>
+Reverses the order of the children of a #GNode.
+(It doesn't change the order of the grandchildren.)
+</para>
+
+@node: a #GNode.
+
+
+<!-- ##### FUNCTION g_node_traverse ##### -->
+<para>
+Traverses a tree starting at the given root #GNode.
+It calls the given function for each node visited.
+The traversal can be halted at any point by returning TRUE from @func.
+</para>
+
+@root: the root #GNode of the tree to traverse.
+@order: the order in which nodes are visited - %G_IN_ORDER, %G_PRE_ORDER,
+%G_POST_ORDER, or %G_LEVEL_ORDER.
+@flags: which types of children are to be visited, one of %G_TRAVERSE_ALL,
+%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS.
+@max_depth: the maximum depth of the traversal. Nodes below this
+depth will not be visited. If max_depth is -1 all nodes in the tree are
+visited. If depth is 1, only the root is visited. If depth is 2, the root
+and its children are visited. And so on.
+@func: the function to call for each visited #GNode.
+@data: user data to pass to the function.
+
+
+<!-- ##### ENUM GTraverseFlags ##### -->
+<para>
+Specifies which nodes are visited during several of the tree functions,
+including g_node_traverse() and g_node_find().
+<itemizedlist>
+<listitem><para>
+%G_TRAVERSE_LEAFS specifies that only leaf nodes should be visited.
+</para></listitem>
+<listitem><para>
+%G_TRAVERSE_NON_LEAFS specifies that only non-leaf nodes should be visited.
+</para></listitem>
+<listitem><para>
+%G_TRAVERSE_ALL specifies that all nodes should be visited.
+</para></listitem>
+</itemizedlist>
+</para>
+
+@G_TRAVERSE_LEAFS: 
+@G_TRAVERSE_NON_LEAFS: 
+@G_TRAVERSE_ALL: 
+@G_TRAVERSE_MASK: 
+
+<!-- ##### USER_FUNCTION GNodeTraverseFunc ##### -->
+<para>
+Specifies the type of function passed to g_node_traverse().
+The function is called with each of the nodes visited, together with the
+user data passed to g_node_traverse().
+If the function returns TRUE, then the traversal is stopped.
+</para>
+
+@node: a #GNode.
+@data: user data passed to g_node_traverse().
+@Returns: TRUE to stop the traversal.
+
+
+<!-- ##### FUNCTION g_node_children_foreach ##### -->
+<para>
+Calls a function for each of the children of a #GNode.
+Note that it doesn't descend beneath the child nodes.
+</para>
+
+@node: a #GNode.
+@flags: which types of children are to be visited, one of %G_TRAVERSE_ALL,
+%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS.
+@func: the function to call for each visited node.
+@data: user data to pass to the function.
+
+
+<!-- ##### USER_FUNCTION GNodeForeachFunc ##### -->
+<para>
+Specifies the type of function passed to g_node_children_foreach().
+The function is called with each child node, together with the user data
+passed to g_node_children_foreach().
+</para>
+
+@node: a #GNode.
+@data: user data passed to g_node_children_foreach().
+
+
+<!-- ##### FUNCTION g_node_get_root ##### -->
+<para>
+Gets the root of a tree.
+</para>
+
+@node: a #GNode.
+@Returns: the root of the tree.
+
+
+<!-- ##### FUNCTION g_node_find ##### -->
+<para>
+Finds a #GNode in a tree.
+</para>
+
+@root: the root #GNode of the tree to search.
+@order: the order in which nodes are visited - %G_IN_ORDER, %G_PRE_ORDER,
+%G_POST_ORDER, or %G_LEVEL_ORDER.
+@flags: which types of children are to be searched, one of %G_TRAVERSE_ALL,
+%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS.
+@data: the data to find.
+@Returns: the found #GNode, or NULL if the data is not found.
+
+
+<!-- ##### FUNCTION g_node_find_child ##### -->
+<para>
+Finds the first child of a #GNode with the given data.
+</para>
+
+@node: a #GNode.
+@flags: which types of children are to be searched, one of %G_TRAVERSE_ALL,
+%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS.
+@data: the data to find.
+@Returns: the found child #GNode, or NULL if the data is not found.
+
+
+<!-- ##### FUNCTION g_node_child_index ##### -->
+<para>
+Gets the position of the first child of a #GNode which contains the given data.
+</para>
+
+@node: a #GNode.
+@data: the data to find.
+@Returns: the index of the child of @node which contains @data, or -1
+if the data is not found.
+
+
+<!-- ##### FUNCTION g_node_child_position ##### -->
+<para>
+Gets the position of a #GNode with respect to its siblings.
+@child must be a child of @node.
+The first child is numbered 0, the second 1, and so on.
+</para>
+
+@node: a #GNode.
+@child: a child of @node.
+@Returns: the position of @child with respect to its siblings.
+
+
+<!-- ##### MACRO g_node_first_child ##### -->
+<para>
+Gets the first child of a #GNode.
+</para>
+
+@node: a #GNode.
+@Returns: the last child of @node, or NULL if @node is NULL or has no children.
+
+
+<!-- ##### FUNCTION g_node_last_child ##### -->
+<para>
+Gets the last child of a #GNode.
+</para>
+
+@node: a #GNode (must not be NULL).
+@Returns: the last child of @node, or NULL if @node has no children.
+
+
+<!-- ##### FUNCTION g_node_nth_child ##### -->
+<para>
+Gets a child of a #GNode, using the given index.
+The first child is at index 0. If the index is too big, NULL is returned.
+</para>
+
+@node: a #GNode.
+@n: the index of the desired child.
+@Returns: the child of @node at index @n.
+
+
+<!-- ##### FUNCTION g_node_first_sibling ##### -->
+<para>
+Gets the first sibling of a #GNode.
+This could possibly be the node itself.
+</para>
+
+@node: a #GNode.
+@Returns: the first sibling of @node.
+
+
+<!-- ##### MACRO g_node_next_sibling ##### -->
+<para>
+Gets the next sibling of a #GNode.
+</para>
+
+@node: a #GNode.
+@Returns: the next sibling of @node, or NULL if @node is NULL.
+
+
+<!-- ##### MACRO g_node_prev_sibling ##### -->
+<para>
+Gets the previous sibling of a #GNode.
+</para>
+
+@node: a #GNode.
+@Returns: the previous sibling of @node, or NULL if @node is NULL.
+
+
+<!-- ##### FUNCTION g_node_last_sibling ##### -->
+<para>
+Gets the last sibling of a #GNode.
+This could possibly be the node itself.
+</para>
+
+@node: a #GNode.
+@Returns: the last sibling of @node.
+
+
+<!-- ##### MACRO G_NODE_IS_LEAF ##### -->
+<para>
+Returns TRUE if a #GNode is a leaf node.
+</para>
+
+@node: a #GNode.
+@Returns: TRUE if the #GNode is a leaf node (i.e. it has no children).
+
+
+<!-- ##### MACRO G_NODE_IS_ROOT ##### -->
+<para>
+Returns TRUE if a #GNode is the root of a tree.
+</para>
+
+@node: a #GNode.
+@Returns: TRUE if the #GNode is the root of a tree (i.e. it has no parent
+or siblings).
+
+
+<!-- ##### FUNCTION g_node_depth ##### -->
+<para>
+Gets the depth of a #GNode.
+</para>
+<para>
+If @node is NULL the depth is 0.
+The root node has a depth of 1.
+For the children of the root node the depth is 2. And so on.
+</para>
+
+@node: a #GNode.
+@Returns: the depth of the #GNode.
+
+
+<!-- ##### FUNCTION g_node_n_nodes ##### -->
+<para>
+Gets the number of nodes in a tree.
+</para>
+
+@root: a #GNode.
+@flags: which types of children are to be counted, one of %G_TRAVERSE_ALL,
+%G_TRAVERSE_LEAFS and %G_TRAVERSE_NON_LEAFS.
+@Returns: the number of nodes in the tree.
+
+
+<!-- ##### FUNCTION g_node_n_children ##### -->
+<para>
+Gets the number of children of a #GNode.
+</para>
+
+@node: a #GNode.
+@Returns: the number of children of @node.
+
+
+<!-- ##### FUNCTION g_node_is_ancestor ##### -->
+<para>
+Returns TRUE if @node is an ancestor of @descendant.
+This is true if node is the parent of descendant, or if node is the
+grandparent of descendant etc.
+</para>
+
+@node: a #GNode.
+@descendant: a #GNode.
+@Returns: TRUE if @node is an ancestor of @descendant.
+
+
+<!-- ##### FUNCTION g_node_max_height ##### -->
+<para>
+Gets the maximum height of all branches beneath a #GNode.
+This is the maximum distance from the #GNode to all leaf nodes.
+</para>
+<para>
+If @root is NULL, 0 is returned. If @root has no children, 1 is returned.
+If @root has children, 2 is returned. And so on.
+</para>
+
+@root: a #GNode.
+@Returns: the maximum height of the tree beneath @root.
+
+
+<!-- ##### FUNCTION g_node_unlink ##### -->
+<para>
+Unlinks a #GNode from a tree, resulting in two separate trees.
+</para>
+
+@node: the #GNode to unlink, which becomes the root of a new tree.
+
+
+<!-- ##### FUNCTION g_node_destroy ##### -->
+<para>
+Removes the #GNode and its children from the tree, freeing any memory
+allocated.
+</para>
+
+@root: the root of the tree/subtree to destroy.
+
+
+<!-- ##### FUNCTION g_node_pop_allocator ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### FUNCTION g_node_push_allocator ##### -->
+<para>
+
+</para>
+
+@allocator: 
+
+
diff --git a/docs/reference/glib/tmpl/type_conversion.sgml b/docs/reference/glib/tmpl/type_conversion.sgml
new file mode 100644 (file)
index 0000000..45138be
--- /dev/null
@@ -0,0 +1,78 @@
+<!-- ##### SECTION Title ##### -->
+Type Conversion Macros
+
+<!-- ##### SECTION Short_Description ##### -->
+a portable method for storing #gint &amp; #guint values in #gpointer variables.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These macros provide a portable method of storing #gint and #guint values in
+#gpointer variables.
+</para>
+<para>
+Many of the GLib data types are based on storing #gpointer values,
+e.g. #GHashTable, #GList, #GSList, #GTree, and #GNode.
+By using the type conversion macros described below you can store #gint and
+#guint values inside a #gpointer. So you can, for example, create
+a hash table of #gint values, or a linked list of #guint values.
+</para>
+<para>
+The type conversion macros are necessary because the size of a #gpointer can
+vary across different platforms. So the type conversion has to be done
+carefully.
+</para>
+<para>
+Note that the reverse operation, storing #gpointer values in
+integer variables, is not supported, since an integer is not guaranteed to
+be large enough to store #gpointer values across all platforms.
+</para>
+<para>
+To convert an integer value, a #gint, to a #gpointer, use #GINT_TO_POINTER.
+To convert it back to a #gint, use #GPOINTER_TO_INT.
+</para>
+<para>
+To convert an unsigned integer, a #guint, to a #gpointer, use
+#GUINT_TO_POINTER. To convert it back to a #guint, use #GPOINTER_TO_UINT.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO GINT_TO_POINTER ##### -->
+<para>
+Converts a #gint to a #gpointer.
+</para>
+
+@i: a #gint value.
+@Returns: the value converted to a #gpointer.
+
+
+<!-- ##### MACRO GPOINTER_TO_INT ##### -->
+<para>
+Converts a #gpointer to a #gint.
+</para>
+
+@p: a #gpointer value.
+@Returns: the value converted to a #gint.
+
+
+<!-- ##### MACRO GUINT_TO_POINTER ##### -->
+<para>
+Converts a #guint to a #gpointer.
+</para>
+
+@u: a #guint value.
+@Returns: the value converted to a #gpointer.
+
+
+<!-- ##### MACRO GPOINTER_TO_UINT ##### -->
+<para>
+Converts a #gpointer to a #guint.
+</para>
+
+@p: a #gpointer value.
+@Returns: the value converted to a #guint.
+
+
diff --git a/docs/reference/glib/tmpl/types.sgml b/docs/reference/glib/tmpl/types.sgml
new file mode 100644 (file)
index 0000000..b3d63a4
--- /dev/null
@@ -0,0 +1,216 @@
+<!-- ##### SECTION Title ##### -->
+Basic Types
+
+<!-- ##### SECTION Short_Description ##### -->
+standard GLib types, defined for ease-of-use and portability.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+GLib defines a number of commonly used types, which can be divided into
+4 groups:
+
+<itemizedlist>
+<listitem><para>
+New types which are not part of standard C - #gboolean, #gsize, #gssize.
+</para></listitem>
+
+<listitem><para>
+Integer types which are guaranteed to be the same size across all platforms -
+#gint8, #guint8, #gint16, #guint16, #gint32, #guint32, #gint64, #guint64.
+</para></listitem>
+
+<listitem><para>
+Types which are easier to use than their standard C counterparts -
+#gpointer, #gconstpointer, #guchar, #guint, #gushort, #gulong.
+</para></listitem>
+
+<listitem><para>
+Types which correspond exactly to standard C types, but are included
+for completeness - #gchar, #gint, #gshort, #glong, #gfloat, #gdouble.
+</para></listitem>
+</itemizedlist>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### TYPEDEF gboolean ##### -->
+<para>
+A standard <type>boolean</type> type.
+Variables of this type should only contain the value #TRUE or #FALSE.
+</para>
+
+
+<!-- ##### TYPEDEF gpointer ##### -->
+<para>
+An untyped pointer.
+#gpointer looks better and is easier to use than <type>void*</type>.
+</para>
+
+
+<!-- ##### TYPEDEF gconstpointer ##### -->
+<para>
+An untyped pointer to constant data.
+The data pointed to should not be changed.
+</para>
+<para>
+This is typically used in function prototypes to indicate that the
+data pointed to will not be altered by the function.
+</para>
+
+
+<!-- ##### TYPEDEF gchar ##### -->
+<para>
+Corresponds to the standard C <type>char</type> type.
+</para>
+
+
+<!-- ##### TYPEDEF guchar ##### -->
+<para>
+Corresponds to the standard C <type>unsigned char</type> type.
+</para>
+
+
+<!-- ##### TYPEDEF gint ##### -->
+<para>
+Corresponds to the standard C <type>int</type> type.
+Values of this type can range from #G_MININT to #G_MAXINT.
+</para>
+
+
+<!-- ##### TYPEDEF guint ##### -->
+<para>
+Corresponds to the standard C <type>unsigned int</type> type.
+</para>
+
+
+<!-- ##### TYPEDEF gshort ##### -->
+<para>
+Corresponds to the standard C <type>short</type> type.
+Values of this type can range from #G_MINSHORT to #G_MAXSHORT.
+</para>
+
+
+<!-- ##### TYPEDEF gushort ##### -->
+<para>
+Corresponds to the standard C <type>unsigned short</type> type.
+</para>
+
+
+<!-- ##### TYPEDEF glong ##### -->
+<para>
+Corresponds to the standard C <type>long</type> type.
+Values of this type can range from #G_MINLONG to #G_MAXLONG.
+</para>
+
+
+<!-- ##### TYPEDEF gulong ##### -->
+<para>
+Corresponds to the standard C <type>unsigned long</type> type.
+</para>
+
+
+<!-- ##### TYPEDEF gint8 ##### -->
+<para>
+A signed integer guaranteed to be 8 bits on all platforms.
+Values of this type can range from -128 to 127.
+</para>
+
+
+<!-- ##### TYPEDEF guint8 ##### -->
+<para>
+An unsigned integer guaranteed to be 8 bits on all platforms.
+Values of this type can range from 0 to 255.
+</para>
+
+
+<!-- ##### TYPEDEF gint16 ##### -->
+<para>
+A signed integer guaranteed to be 16 bits on all platforms.
+Values of this type can range from -32,768 to 32,767.
+</para>
+
+
+<!-- ##### TYPEDEF guint16 ##### -->
+<para>
+An unsigned integer guaranteed to be 16 bits on all platforms.
+Values of this type can range from 0 to 65,535.
+</para>
+
+
+<!-- ##### TYPEDEF gint32 ##### -->
+<para>
+A signed integer guaranteed to be 32 bits on all platforms.
+Values of this type can range from -2,147,483,648 to 2,147,483,647.
+</para>
+
+
+<!-- ##### TYPEDEF guint32 ##### -->
+<para>
+An unsigned integer guaranteed to be 32 bits on all platforms.
+Values of this type can range from 0 to 4,294,967,295.
+</para>
+
+
+<!-- ##### MACRO G_HAVE_GINT64 ##### -->
+<para>
+This macro is defined if 64-bit signed and unsigned integers are available
+on the platform.
+</para>
+
+
+
+<!-- ##### TYPEDEF gint64 ##### -->
+<para>
+A signed integer guaranteed to be 64 bits on all platforms on which it is
+available (see #G_HAVE_GINT64).
+Values of this type can range from -9,223,372,036,854,775,808 to
+9,223,372,036,854,775,807.
+</para>
+
+
+<!-- ##### TYPEDEF guint64 ##### -->
+<para>
+An unsigned integer guaranteed to be 64 bits on all platforms on which it is
+available (see #G_HAVE_GINT64).
+Values of this type can range from 0 to 18,446,744,073,709,551,615.
+</para>
+
+
+<!-- ##### MACRO G_GINT64_CONSTANT ##### -->
+<para>
+This macro is used to insert 64-bit integer literals into the source code.
+</para>
+
+@val: a literal integer value, e.g. 0x1d636b02300a7aa7U.
+
+
+<!-- ##### TYPEDEF gfloat ##### -->
+<para>
+Corresponds to the standard C <type>float</type> type.
+Values of this type can range from #G_MINFLOAT to #G_MAXFLOAT.
+</para>
+
+
+<!-- ##### TYPEDEF gdouble ##### -->
+<para>
+Corresponds to the standard C <type>double</type> type.
+Values of this type can range from #G_MINDOUBLE to #G_MAXDOUBLE.
+</para>
+
+
+<!-- ##### TYPEDEF gsize ##### -->
+<para>
+An unsigned 32-bit integer intended to represent sizes of data structures.
+</para>
+
+
+<!-- ##### TYPEDEF gssize ##### -->
+<para>
+A signed 32-bit integer intended to represent sizes of data structures.
+</para>
+
+
diff --git a/docs/reference/glib/tmpl/warnings.sgml b/docs/reference/glib/tmpl/warnings.sgml
new file mode 100644 (file)
index 0000000..2cca152
--- /dev/null
@@ -0,0 +1,187 @@
+<!-- ##### SECTION Title ##### -->
+Message Output and Debugging Functions
+
+<!-- ##### SECTION Short_Description ##### -->
+functions to output messages and help debug applications.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions provide support for outputting messages.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### FUNCTION g_print ##### -->
+<para>
+Outputs a formatted message via the print handler.
+The default print handler simply outputs the message to stdout.
+</para>
+<para>
+g_print() should not be used from within libraries for debugging messages,
+since it may be redirected by applications to special purpose message
+windows or even files.
+Instead, libraries should use g_log(), or the convenience functions
+g_message(), g_warning() and g_error().
+</para>
+
+@format: the message format. See the <function>printf()</function>
+documentation.
+@Varargs: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_set_print_handler ##### -->
+<para>
+Sets the print handler.
+Any messages passed to g_print() will be output via the new handler.
+The default handler simply outputs the message to stdout.
+By providing your own handler you can redirect the output, to a GTK
+widget or a log file for example.
+</para>
+
+@func: the new print handler.
+@Returns: the old print handler.
+
+
+<!-- ##### USER_FUNCTION GPrintFunc ##### -->
+<para>
+Specifies the type of the print handler functions.
+These are called with the complete formatted string to output.
+</para>
+
+@string: the message to be output.
+
+
+<!-- ##### FUNCTION g_printerr ##### -->
+<para>
+Outputs a formatted message via the error message handler.
+The default handler simply outputs the message to stderr.
+</para>
+<para>
+g_printerr() should not be used from within libraries. Instead g_log() should
+be used, or the convenience functions g_message(), g_warning() and g_error().
+</para>
+
+@format: the message format. See the <function>printf()</function>
+documentation.
+@Varargs: the parameters to insert into the format string.
+
+
+<!-- ##### FUNCTION g_set_printerr_handler ##### -->
+<para>
+Sets the handler for printing error messages.
+Any messages passed to g_printerr() will be output via the new handler.
+The default handler simply outputs the message to stderr.
+By providing your own handler you can redirect the output, to a GTK
+widget or a log file for example.
+</para>
+
+@func: the new error message handler.
+@Returns: the old error message handler.
+
+
+<!-- ##### MACRO g_return_if_fail ##### -->
+<para>
+Returns from the current function if the expression is not true.
+If the expression evaluates to FALSE, a critical message is logged and
+the function returns. This can only be used in functions which do not return
+a value.
+</para>
+
+@expr: the expression to check.
+
+
+<!-- ##### MACRO g_return_val_if_fail ##### -->
+<para>
+Returns from the current function, returning the value @val, if the expression
+is not true.
+If the expression evaluates to FALSE, a critical message is logged and
+@val is returned.
+</para>
+
+@expr: the expression to check.
+@val: the value to return from the current function if the expression is not
+true.
+
+
+<!-- ##### MACRO g_assert ##### -->
+<para>
+Debugging macro to terminate the application if the assertion fails.
+If the assertion fails (i.e. the expression is not true), an error message
+is logged and the application is terminated.
+</para>
+<para>
+The macro can be turned off in final releases of code by defining
+G_DISABLE_ASSERT when compiling the application.
+</para>
+
+@expr: the expression to check.
+
+
+<!-- ##### MACRO g_assert_not_reached ##### -->
+<para>
+Debugging macro to terminate the application if it is ever reached.
+If it is reached, an error message is logged and the application is terminated.
+</para>
+<para>
+The macro can be turned off in final releases of code by defining
+G_DISABLE_ASSERT when compiling the application.
+</para>
+
+
+
+<!-- ##### FUNCTION g_on_error_query ##### -->
+<para>
+Prompts the user with "[E]xit, [H]alt, show [S]tack trace or [P]roceed".
+This function is intended to be used for debugging use only.
+FIXME: How do you set it up?
+</para>
+<para>
+If Exit is selected, the application terminates with a call to
+<function>_exit(0)</function>.
+</para>
+<para>
+If Halt is selected, the application enters an infinite loop.
+The infinite loop can only be stopped by killing the application,
+or by setting glib_on_error_halt to FALSE (possibly via a debugger).
+</para>
+<para>
+If Stack trace is selected, g_on_error_stack_trace() is called. This
+invokes gdb, which attaches to the current process and shows a stack trace.
+The prompt is then shown again.
+</para>
+<para>
+If Proceed is selected, the function returns.
+</para>
+<para>
+This function may cause different actions on non-unix platforms.
+</para>
+
+@prg_name: the program name, needed by gdb for the [S]tack trace option.
+If @prg_name is NULL, g_get_prgname() is called to get the program name
+(which will work correctly if gdk_init() or gtk_init() has been called).
+
+
+<!-- ##### FUNCTION g_on_error_stack_trace ##### -->
+<para>
+Invokes gdb, which attaches to the current process and shows a stack trace.
+Called by g_on_error_query() when the [S]tack trace option is selected.
+</para>
+<para>
+This function may cause different actions on non-unix platforms.
+</para>
+
+@prg_name: the program name, needed by gdb for the [S]tack trace option.
+If @prg_name is NULL, g_get_prgname() is called to get the program name
+(which will work correctly if gdk_init() or gtk_init() has been called).
+
+
+<!-- ##### MACRO G_BREAKPOINT ##### -->
+<para>
+Inserts a breakpoint instruction into the code (on x86 machines only).
+</para>
+
+
+
diff --git a/docs/reference/glib/tmpl/windows.sgml b/docs/reference/glib/tmpl/windows.sgml
new file mode 100644 (file)
index 0000000..475782f
--- /dev/null
@@ -0,0 +1,170 @@
+<!-- ##### SECTION Title ##### -->
+Windows Compatability Functions
+
+<!-- ##### SECTION Short_Description ##### -->
+functions to support portability to the Windows environment.
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+These functions and macros are provided in the GLib library when compiled
+on the Windows platform.
+</para>
+<para>
+Many of the macros simply rename available windows functions
+so that they use the same name as the standard Unix functions.
+This means that code written for the Unix platform will work without change
+under Windows.
+</para>
+<para>
+A few additional constants, types, and functions are also provided,
+to provide a common base set of functions across both the Unix and Windows
+environments.
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO MAXPATHLEN ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO NAME_MAX ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO getcwd ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO getpid ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### TYPEDEF pid_t ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### MACRO access ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO open ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO read ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO write ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO lseek ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO close ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO pipe ##### -->
+<para>
+
+</para>
+
+@phandles: 
+
+
+<!-- ##### MACRO popen ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO pclose ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO fdopen ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO ftruncate ##### -->
+<para>
+
+</para>
+
+@fd: 
+@size: 
+
+
+<!-- ##### MACRO opendir ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO readdir ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO rewinddir ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO closedir ##### -->
+<para>
+
+</para>
+
+
+