summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCEST 2005 Dodji Seketeli <dodji@seketeli.org>2005-05-10 19:48:58 +0000
committerDodji Seketeli <dodji@src.gnome.org>2005-05-10 19:48:58 +0000
commit87e540b6a27f7fcca8b450bb44a8b197eeffb464 (patch)
tree99d68d410ff91b556e58c73b6c5cd262fc7959a6
parent3e0fb4e6acd9b29303384da9242b08c70e4d9add (diff)
downloadlibcroco-87e540b6a27f7fcca8b450bb44a8b197eeffb464.tar.gz
applied the following patches:
Tue May 10 21:49:05 CEST 2005 Dodji Seketeli <dodji@seketeli.org> applied the following patches: dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-29 2004-06-09 00:09:41 GMT updated NEWS file for 0.6.0 [Dodji Seketeli] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-30 2004-09-20 16:13:02 GMT fixed a nasty memory management bug [Dodji Seketeli] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-31 2005-02-10 21:41:04 GMT rm test output upon 'make clean' [Peter Moulder] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-32 2005-02-13 13:14:16 GMT make 'all' target a prerequisite of the 'test' target [Peter Moulder] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-33 2005-02-13 19:24:25 GMT allow building/testing in a directory different from srcdir [Peter Moulder/Dodji Seketeli] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-34 2005-02-13 19:42:48 GMT added better api documentation [Peter Moulder] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-35 2005-05-05 16:38:07 GMT initial port to gtk-doc, switch to automake 1.7 [Sven Herzberg, Dodji Seketeli] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-36 2005-05-05 16:51:38 GMT more gtk-doc stuffs [Dodji Seketeli] dodji@gnome.org--xml-style-2004/libcroco--mainline--0.6--patch-37 2005-05-06 14:20:20 GMT typos and c++ compilation fixes [Peter Moulder]
-rw-r--r--ChangeLog63
-rw-r--r--Makefile.am7
-rwxr-xr-xautogen.sh3
-rw-r--r--configure.in7
-rw-r--r--csslint/Makefile.am1
-rw-r--r--docs/Makefile.am2
-rw-r--r--docs/reference/Makefile.am51
-rw-r--r--docs/reference/libcroco-docs.sgml39
-rw-r--r--docs/reference/tmpl/cr-additional-sel.sgml133
-rw-r--r--docs/reference/tmpl/cr-attr-sel.sgml81
-rw-r--r--docs/reference/tmpl/cr-cascade.sgml85
-rw-r--r--docs/reference/tmpl/cr-declaration.sgml225
-rw-r--r--docs/reference/tmpl/cr-doc-handler.sgml142
-rw-r--r--docs/reference/tmpl/cr-enc-handler.sgml54
-rw-r--r--docs/reference/tmpl/cr-fonts.sgml287
-rw-r--r--docs/reference/tmpl/cr-input.sgml371
-rw-r--r--docs/reference/tmpl/cr-num.sgml98
-rw-r--r--docs/reference/tmpl/cr-om-parser.sgml121
-rw-r--r--docs/reference/tmpl/cr-parser.sgml307
-rw-r--r--docs/reference/tmpl/cr-parsing-location.sgml80
-rw-r--r--docs/reference/tmpl/cr-prop-list.sgml158
-rw-r--r--docs/reference/tmpl/cr-pseudo.sgml59
-rw-r--r--docs/reference/tmpl/cr-rgb.sgml196
-rw-r--r--docs/reference/tmpl/cr-sel-eng.sgml151
-rw-r--r--docs/reference/tmpl/cr-selector.sgml119
-rw-r--r--docs/reference/tmpl/cr-simple-sel.sgml111
-rw-r--r--docs/reference/tmpl/cr-statement.sgml613
-rw-r--r--docs/reference/tmpl/cr-string.sgml94
-rw-r--r--docs/reference/tmpl/cr-style.sgml266
-rw-r--r--docs/reference/tmpl/cr-stylesheet.sgml98
-rw-r--r--docs/reference/tmpl/cr-term.sgml207
-rw-r--r--docs/reference/tmpl/cr-tknzr.sgml261
-rw-r--r--docs/reference/tmpl/cr-token.sgml388
-rw-r--r--docs/reference/tmpl/cr-utils.sgml283
-rw-r--r--docs/reference/tmpl/libcroco-config.sgml37
-rw-r--r--docs/reference/tmpl/libcroco.sgml16
-rw-r--r--gtk-doc.make151
-rw-r--r--src/Makefile.am2
-rw-r--r--src/cr-additional-sel.c122
-rw-r--r--src/cr-additional-sel.h14
-rw-r--r--src/cr-attr-sel.c64
-rw-r--r--src/cr-attr-sel.h2
-rw-r--r--src/cr-cascade.c49
-rw-r--r--src/cr-declaration.c168
-rw-r--r--src/cr-doc-handler.c76
-rw-r--r--src/cr-enc-handler.c35
-rw-r--r--src/cr-enc-handler.h4
-rw-r--r--src/cr-fonts.c191
-rw-r--r--src/cr-input.c376
-rw-r--r--src/cr-num.c74
-rw-r--r--src/cr-om-parser.c108
-rw-r--r--src/cr-parser.c355
-rw-r--r--src/cr-parsing-location.c45
-rw-r--r--src/cr-prop-list.c113
-rw-r--r--src/cr-pseudo.c23
-rw-r--r--src/cr-rgb.c133
-rw-r--r--src/cr-sel-eng.c72
-rw-r--r--src/cr-selector.c65
-rw-r--r--src/cr-simple-sel.c44
-rw-r--r--src/cr-simple-sel.h6
-rw-r--r--src/cr-statement.c537
-rw-r--r--src/cr-statement.h4
-rw-r--r--src/cr-string.h4
-rw-r--r--tests/Makefile.am2
-rwxr-xr-xtests/test-functional-notation.sh3
-rwxr-xr-xtests/test-lots-of-comments.sh3
-rwxr-xr-xtests/test-parsing-location.sh3
-rwxr-xr-xtests/test-prop-ident.sh7
-rwxr-xr-xtests/test-sel-child-class.sh3
-rwxr-xr-xtests/test-several-media.sh7
-rwxr-xr-xtests/test-unknown-at-rule.sh7
-rwxr-xr-xtests/test-unknown-at-rule2.sh7
-rwxr-xr-xtests/testctl138
-rwxr-xr-xtests/valgrind-version.sh2
74 files changed, 7254 insertions, 979 deletions
diff --git a/ChangeLog b/ChangeLog
index cb278d4..7ed6f9c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,66 @@
+Thu May 5 19:15:27 CEST 2005 Dodji Seketeli <dodji@gnome.org>
+
+ * src/cr-string.h, cr-parser.c: applied a patch from Peter Moulder
+ to fix a typo in cr-parser.c and add G_BEGIN_DECLS/G_END_DECLS to
+ cr-string.h
+
+Thu May 5 18:47:10 CEST 2005 Dodji Seketeli <dodji@gnome.org>
+
+ * docs/reference/tmpl/*.sgml: added these to the archive.
+ * docs/reference/libcroco-docs.sgml: added this to the archive.
+
+Thu may 5 18:35:04 CEST 2005 Dodji Seketeli <dodji@gnome.org>
+
+ * src/*.[ch]: made wak loads of comments change to comply with
+ gtk-doc. Big thanks to Sven Herzberg for the initial work on this
+ topic.
+
+2005-04-01 Sven Herzberg <herzi@gnome-de.org>
+
+ * autogen.sh: require automake 1.7
+ * configure.in: added a check for gtk-doc, build
+ docs/reference/Makefile
+ * docs/Makefile.am: added the reference subdir
+ * src/cr-additional-sel.c: migrated the comments to gtk-doc style (sed
+ rocks)
+ * src/cr-additional-sel.h: moved the class description into the .c
+ file
+
+Sun feb 13 14:10:35 CET 2005 Dodji Seketeli <dodji@gnome.org>
+
+ * src/cr-simple-sel.h, src/cr-statement.h: added better documentation.
+ [Peter Moulder]
+
+ * tests/Makefile.am: add the $top_builddir/src to the include search patch.
+ This is is necessary to support building in a directory different from
+ the source directory
+ * tests/test-*.sh: adapt these files so that 'make test' works even
+ when building in a directory different from the source dir
+ * tests/testctl: adapt this script to progapate the changes necessary
+ to make the 'test' target work in a directory different from the
+ source directory
+ This entry has been added thanks to the initial
+ work of Peter Moulder. I have
+ modified it a bit so that building and testing
+ from a directory different from the source dir actually works.
+
+ * Makefile.am: make sure the 'all' target is a prerequisite of the
+ 'test' target. This is a patch from [Peter Moulder]
+
+Thu feb 10 22:34:57 CET 2005 Dodji Seketeli <dodji@gnome.org>
+
+ * Makefile.am,test/testctl: applied a patchlet from Peter Moulder
+ to clean the test outputs when issuing 'make clean'.
+ * autogen.sh: force the thingy to use automake 1.7.2. better
+ late than never.
+
+Mon Sep 20 18:10:50 CEST 2004 Dodji Seketeli <dodji@gnome.org>
+
+ * src/cr-om-parser.c:
+ (cr_om_parser_parse_paths_into_cascade) :
+ Fixed a nasty memory management bug reported by ArjanV and Daniel
+ Veillard.
+
2004-06-09 Dodji Seketeli <dodji@gnome.org>
===================== 0.6.0 release ==================================
diff --git a/Makefile.am b/Makefile.am
index b93330d..de357e2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,6 +35,11 @@ $(CROCO_CONFIG_FILE_UNINSTALLED) $(CROCO_CONFIG_FILE)
%-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-config-uninstalled: %-config
cp $< $@
+clean-local: cleantest
+
+cleantest:
+ if test -x $(top_srcdir)/tests/testctl ; then $(top_srcdir)/tests/testctl cleanup ; fi
+
cleantar:
@(rm -f libcroco*.tar.gz)
@(rm -rf $(top_srcdir)/rpmbuildroot)
@@ -42,7 +47,7 @@ cleantar:
rpm: cleantar
@(mkdir -p $(top_srcdir)/rpmbuildroot ; $(MAKE) dist && rpmbuild -ta --buildroot $(top_srcdir)/rpmbuildroot $(distdir).tar.gz)
-test:
+test: all
if test -x $(top_srcdir)/tests/testctl ; then $(top_srcdir)/tests/testctl cleanup ; $(top_srcdir)/tests/testctl run ; fi
apidoc:
diff --git a/autogen.sh b/autogen.sh
index f7d81f1..d1b7b0b 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -6,6 +6,8 @@ test -z "$srcdir" && srcdir=.
PKG_NAME="libcroco"
+REQUIRED_AUTOMAKE_VERSION=1.7
+
(test -f $srcdir/configure.in \
&& test -f $srcdir/README \
&& test -f $srcdir/src/cr-parser.h) || {
@@ -23,4 +25,5 @@ if test $# -eq 0 ; then
default_args="--enable-tests=yes --enable-seleng=auto --enable-layeng=auto"
fi
+REQUIRED_AUTOMAKE_VERSION=1.7.2
USE_GNOME2_MACROS=1 . gnome-autogen.sh $default_args
diff --git a/configure.in b/configure.in
index 0fbc02f..a9727f3 100644
--- a/configure.in
+++ b/configure.in
@@ -55,6 +55,8 @@ AC_ISC_POSIX
AM_PROG_LIBTOOL
+GTK_DOC_CHECK([1.0])
+
dnl **************************************************************
dnl check for the different --enable-option=val
dnl messages issued by the user
@@ -150,17 +152,18 @@ libcroco.spec
croco-config
docs/Makefile
docs/examples/Makefile
+docs/reference/Makefile
tests/Makefile
tests/test-inputs/Makefile
tests/test-output-refs/Makefile
-tests/global-vars.sh
+global-test-vars.sh
src/Makefile
src/libcroco-config.h
csslint/Makefile
])
-dnl =============================================================================================
+dnl =======================================================================
echo "
=====================================================================
LIBCROCO, GNOME CSS2 PARSING AND MANIPULATION TOOLKIT $VERSION
diff --git a/csslint/Makefile.am b/csslint/Makefile.am
index 978da9b..a458bcc 100644
--- a/csslint/Makefile.am
+++ b/csslint/Makefile.am
@@ -8,6 +8,7 @@ LDADD=$(croco_lib)
INCLUDES=-I$(top_srcdir)/intl \
-I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
@GLIB2_CFLAGS@ \
@LIBXML2_CFLAGS@
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 7b14bb4..ece8c4b 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -1,3 +1,3 @@
-SUBDIRS=examples
+SUBDIRS=examples reference
EXTRA_DIST=usage.txt
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
new file mode 100644
index 0000000..411627f
--- /dev/null
+++ b/docs/reference/Makefile.am
@@ -0,0 +1,51 @@
+## Process this file with automake to produce Makefile.in
+NULL=
+
+# The name of the module, e.g. 'glib'.
+DOC_MODULE=libcroco
+
+# The top-level SGML file. Change it if you want.
+DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
+
+# The directory containing the source code. Relative to $(srcdir).
+# gtk-doc will search all .c & .h files beneath here for inline comments
+# documenting functions and macros.
+DOC_SOURCE_DIR=../../src
+
+# Extra options to pass to gtkdoc-scanobj or gtkdoc-scangobj.
+SCANGOBJ_OPTIONS=--type-init-func="g_type_init()"
+
+# Extra options to supply to gtkdoc-scan.
+SCAN_OPTIONS=
+
+# Extra options to supply to gtkdoc-mkdb.
+MKDB_OPTIONS=--sgml-mode --output-format=xml
+
+# Extra options to supply to gtkdoc-fixref.
+FIXXREF_OPTIONS=
+
+# Used for dependencies.
+HFILE_GLOB=$(top_srcdir)/src/*.h
+CFILE_GLOB=$(top_srcdir)/src/*.c
+
+# Header files to ignore when scanning.
+IGNORE_HFILES=\
+ $(NULL)
+
+# Images to copy into HTML directory.
+HTML_IMAGES=\
+ $(NULL)
+
+# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
+content_files=\
+ $(NULL)
+
+# CFLAGS and LDFLAGS for compiling scan program. Only needed if your app/lib
+# contains GtkObjects/GObjects and you want to document signals and properties.
+GTKDOC_CFLAGS=\
+ $(NULL)
+GTKDOC_LIBS=\
+ $(NULL)
+
+include $(top_srcdir)/gtk-doc.make
+
diff --git a/docs/reference/libcroco-docs.sgml b/docs/reference/libcroco-docs.sgml
new file mode 100644
index 0000000..f67e318
--- /dev/null
+++ b/docs/reference/libcroco-docs.sgml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <bookinfo>
+ <title>Libcroco Reference Manual</title>
+ </bookinfo>
+
+ <chapter>
+ <title>Extensive APIs description</title>
+ <xi:include href="xml/cr-additional-sel.xml"/>
+ <xi:include href="xml/cr-attr-sel.xml"/>
+ <xi:include href="xml/cr-cascade.xml"/>
+ <xi:include href="xml/cr-declaration.xml"/>
+ <xi:include href="xml/cr-doc-handler.xml"/>
+ <xi:include href="xml/cr-enc-handler.xml"/>
+ <xi:include href="xml/cr-fonts.xml"/>
+ <xi:include href="xml/cr-input.xml"/>
+ <xi:include href="xml/cr-num.xml"/>
+ <xi:include href="xml/cr-om-parser.xml"/>
+ <xi:include href="xml/cr-parser.xml"/>
+ <xi:include href="xml/cr-parsing-location.xml"/>
+ <xi:include href="xml/cr-prop-list.xml"/>
+ <xi:include href="xml/cr-pseudo.xml"/>
+ <xi:include href="xml/cr-rgb.xml"/>
+ <xi:include href="xml/cr-sel-eng.xml"/>
+ <xi:include href="xml/cr-selector.xml"/>
+ <xi:include href="xml/cr-simple-sel.xml"/>
+ <xi:include href="xml/cr-statement.xml"/>
+ <xi:include href="xml/cr-string.xml"/>
+ <xi:include href="xml/cr-style.xml"/>
+ <xi:include href="xml/cr-stylesheet.xml"/>
+ <xi:include href="xml/cr-term.xml"/>
+ <xi:include href="xml/cr-tknzr.xml"/>
+ <xi:include href="xml/cr-token.xml"/>
+ <xi:include href="xml/cr-utils.xml"/>
+ <xi:include href="xml/libcroco-config.xml"/>
+ </chapter>
+</book>
diff --git a/docs/reference/tmpl/cr-additional-sel.sgml b/docs/reference/tmpl/cr-additional-sel.sgml
new file mode 100644
index 0000000..11d514c
--- /dev/null
+++ b/docs/reference/tmpl/cr-additional-sel.sgml
@@ -0,0 +1,133 @@
+<!-- ##### SECTION Title ##### -->
+cr-additional-sel
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRAdditionalSel ##### -->
+<para>
+
+</para>
+
+@next:
+@prev:
+@location:
+
+<!-- ##### FUNCTION cr_additional_sel_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_additional_sel_new_with_type ##### -->
+<para>
+
+</para>
+
+@a_sel_type:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_additional_sel_append ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_additional_sel_set_class_name ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_class_name:
+
+
+<!-- ##### FUNCTION cr_additional_sel_set_id_name ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_id:
+
+
+<!-- ##### FUNCTION cr_additional_sel_set_pseudo ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pseudo:
+
+
+<!-- ##### FUNCTION cr_additional_sel_set_attr_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+
+
+<!-- ##### FUNCTION cr_additional_sel_prepend ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_additional_sel_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_additional_sel_one_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_additional_sel_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_additional_sel_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-attr-sel.sgml b/docs/reference/tmpl/cr-attr-sel.sgml
new file mode 100644
index 0000000..89b1a26
--- /dev/null
+++ b/docs/reference/tmpl/cr-attr-sel.sgml
@@ -0,0 +1,81 @@
+<!-- ##### SECTION Title ##### -->
+cr-attr-sel
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRAttrSel ##### -->
+<para>
+
+</para>
+
+@name:
+@value:
+@next:
+@prev:
+@location:
+
+<!-- ##### FUNCTION cr_attr_sel_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_attr_sel_append_attr_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_attr_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_attr_sel_prepend_attr_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_attr_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_attr_sel_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_attr_sel_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_attr_sel_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-cascade.sgml b/docs/reference/tmpl/cr-cascade.sgml
new file mode 100644
index 0000000..3032c33
--- /dev/null
+++ b/docs/reference/tmpl/cr-cascade.sgml
@@ -0,0 +1,85 @@
+<!-- ##### SECTION Title ##### -->
+cr-cascade
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRCascadePriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT CRCascade ##### -->
+<para>
+
+</para>
+
+@priv:
+
+<!-- ##### FUNCTION cr_cascade_new ##### -->
+<para>
+
+</para>
+
+@a_author_sheet:
+@a_user_sheet:
+@a_ua_sheet:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_cascade_get_sheet ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_origin:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_cascade_set_sheet ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sheet:
+@a_origin:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_cascade_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_cascade_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_cascade_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-declaration.sgml b/docs/reference/tmpl/cr-declaration.sgml
new file mode 100644
index 0000000..20af87f
--- /dev/null
+++ b/docs/reference/tmpl/cr-declaration.sgml
@@ -0,0 +1,225 @@
+<!-- ##### SECTION Title ##### -->
+cr-declaration
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRStatement ##### -->
+<para>
+
+</para>
+
+@specificity:
+@parent_sheet:
+@next:
+@prev:
+@location:
+@app_data:
+@croco_data:
+
+<!-- ##### STRUCT CRDeclaration ##### -->
+<para>
+
+</para>
+
+@property:
+@value:
+@parent_statement:
+@next:
+@prev:
+@important:
+@ref_count:
+@location:
+@rfu0:
+@rfu1:
+@rfu2:
+@rfu3:
+
+<!-- ##### FUNCTION cr_declaration_new ##### -->
+<para>
+
+</para>
+
+@a_statement:
+@a_property:
+@a_value:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_statement:
+@a_str:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_parse_list_from_buf ##### -->
+<para>
+
+</para>
+
+@a_str:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_append ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_append2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@a_value:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_prepend ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_unlink ##### -->
+<para>
+
+</para>
+
+@a_decl:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+@a_one_per_line:
+
+
+<!-- ##### FUNCTION cr_declaration_dump_one ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_declaration_nr_props ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_get_from_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@itemnr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_get_by_prop_name ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_list_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_list_to_string2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_indent:
+@a_one_decl_per_line:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_declaration_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_declaration_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-doc-handler.sgml b/docs/reference/tmpl/cr-doc-handler.sgml
new file mode 100644
index 0000000..4339747
--- /dev/null
+++ b/docs/reference/tmpl/cr-doc-handler.sgml
@@ -0,0 +1,142 @@
+<!-- ##### SECTION Title ##### -->
+cr-doc-handler
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRDocHandler ##### -->
+<para>
+
+</para>
+
+@priv:
+@app_data:
+@start_document:
+@end_document:
+@charset:
+@import_style:
+@import_style_result:
+@namespace_declaration:
+@comment:
+@start_selector:
+@end_selector:
+@property:
+@start_font_face:
+@end_font_face:
+@start_media:
+@end_media:
+@start_page:
+@end_page:
+@ignorable_at_rule:
+@error:
+@unrecoverable_error:
+@resolve_import:
+@ref_count:
+
+<!-- ##### STRUCT CRDocHandlerPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION cr_doc_handler_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_doc_handler_set_result ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_doc_handler_get_result ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_doc_handler_set_ctxt ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_ctxt:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_doc_handler_get_ctxt ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_ctxt:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_doc_handler_set_default_sac_handler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_doc_handler_associate_a_parser ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_parser:
+
+
+<!-- ##### FUNCTION cr_doc_handler_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_doc_handler_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_doc_handler_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-enc-handler.sgml b/docs/reference/tmpl/cr-enc-handler.sgml
new file mode 100644
index 0000000..59656a8
--- /dev/null
+++ b/docs/reference/tmpl/cr-enc-handler.sgml
@@ -0,0 +1,54 @@
+<!-- ##### SECTION Title ##### -->
+cr-enc-handler
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CREncHandler ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION cr_enc_handler_get_instance ##### -->
+<para>
+
+</para>
+
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_enc_handler_resolve_enc_alias ##### -->
+<para>
+
+</para>
+
+@a_alias_name:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_enc_handler_convert_input ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_in:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
diff --git a/docs/reference/tmpl/cr-fonts.sgml b/docs/reference/tmpl/cr-fonts.sgml
new file mode 100644
index 0000000..f93838e
--- /dev/null
+++ b/docs/reference/tmpl/cr-fonts.sgml
@@ -0,0 +1,287 @@
+<!-- ##### SECTION Title ##### -->
+cr-fonts
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRFontFamily ##### -->
+<para>
+
+</para>
+
+@name:
+@next:
+@prev:
+
+<!-- ##### STRUCT CRFontSize ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT CRFontSizeAdjust ##### -->
+<para>
+
+</para>
+
+@num:
+
+<!-- ##### FUNCTION cr_font_family_new ##### -->
+<para>
+
+</para>
+
+@a_type:
+@a_name:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_family_append ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_family_to_append:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_family_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_walk_font_family_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_family_prepend ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_family_to_prepend:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_family_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_family_set_name ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_name:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_clear ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_copy ##### -->
+<para>
+
+</para>
+
+@a_dst:
+@a_src:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_set_predefined_absolute_font_size ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_predefined:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_set_relative_font_size ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_relative:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_set_absolute_font_size ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num_type:
+@a_value:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_set_to_inherit ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_is_set_to_inherit ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_destroy ##### -->
+<para>
+
+</para>
+
+@a_font_size:
+
+
+<!-- ##### FUNCTION cr_font_size_adjust_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_adjust_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_size_adjust_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_font_size_get_smaller_predefined_font_size ##### -->
+<para>
+
+</para>
+
+@a_font_size:
+@a_smaller_size:
+
+
+<!-- ##### FUNCTION cr_font_size_get_larger_predefined_font_size ##### -->
+<para>
+
+</para>
+
+@a_font_size:
+@a_larger_size:
+
+
+<!-- ##### FUNCTION cr_font_size_is_predefined_absolute_font_size ##### -->
+<para>
+
+</para>
+
+@a_font_size:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_style_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_weight_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_weight_get_bolder ##### -->
+<para>
+
+</para>
+
+@a_weight:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_variant_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_font_stretch_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@Returns:
+
+
diff --git a/docs/reference/tmpl/cr-input.sgml b/docs/reference/tmpl/cr-input.sgml
new file mode 100644
index 0000000..96d4539
--- /dev/null
+++ b/docs/reference/tmpl/cr-input.sgml
@@ -0,0 +1,371 @@
+<!-- ##### SECTION Title ##### -->
+cr-input
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRInput ##### -->
+<para>
+
+</para>
+
+@priv:
+
+<!-- ##### STRUCT CRInputPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### STRUCT CRInputPos ##### -->
+<para>
+
+</para>
+
+@line:
+@col:
+@end_of_file:
+@end_of_line:
+@next_byte_index:
+
+<!-- ##### FUNCTION cr_input_new_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_len:
+@a_enc:
+@a_free_buf:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_new_from_uri ##### -->
+<para>
+
+</para>
+
+@a_file_uri:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_input_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_input_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_read_byte ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_byte:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_read_char ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_consume_chars ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@a_nb_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_consume_char ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_consume_white_spaces ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_nb_chars:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_peek_byte ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_origin:
+@a_offset:
+@a_byte:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_peek_byte2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_offset:
+@a_eof:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_peek_char ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_byte_addr ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_offset:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_cur_byte_addr ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_offset:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_seek_index ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_origin:
+@a_pos:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_cur_index ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_index:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_set_cur_index ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_index:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_cur_pos ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pos:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_set_cur_pos ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pos:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_parsing_location ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_loc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_end_of_line ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_eol:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_set_end_of_line ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_eol:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_end_of_file ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_eof:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_set_end_of_file ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_eof:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_set_line_num ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_line_num:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_line_num ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_line_num:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_set_column_num ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_col:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_column_num ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_col:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_increment_line_num ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_increment:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_increment_col_num ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_increment:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_get_nb_bytes_left ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_input_end_of_input ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_end_of_input:
+@Returns:
+
+
diff --git a/docs/reference/tmpl/cr-num.sgml b/docs/reference/tmpl/cr-num.sgml
new file mode 100644
index 0000000..04840ca
--- /dev/null
+++ b/docs/reference/tmpl/cr-num.sgml
@@ -0,0 +1,98 @@
+<!-- ##### SECTION Title ##### -->
+cr-num
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRNum ##### -->
+<para>
+
+</para>
+
+@val:
+@location:
+
+<!-- ##### FUNCTION cr_num_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_num_new_with_val ##### -->
+<para>
+
+</para>
+
+@a_val:
+@a_type:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_num_dup ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_num_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_num_copy ##### -->
+<para>
+
+</para>
+
+@a_dest:
+@a_src:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_num_set ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_val:
+@a_type:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_num_is_fixed_length ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_num_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-om-parser.sgml b/docs/reference/tmpl/cr-om-parser.sgml
new file mode 100644
index 0000000..949c41e
--- /dev/null
+++ b/docs/reference/tmpl/cr-om-parser.sgml
@@ -0,0 +1,121 @@
+<!-- ##### SECTION Title ##### -->
+cr-om-parser
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CROMParser ##### -->
+<para>
+
+</para>
+
+@priv:
+
+<!-- ##### STRUCT CROMParserPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION cr_om_parser_new ##### -->
+<para>
+
+</para>
+
+@a_input:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_om_parser_simply_parse_file ##### -->
+<para>
+
+</para>
+
+@a_file_path:
+@a_enc:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_om_parser_parse_file ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_file_uri:
+@a_enc:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_om_parser_simply_parse_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_len:
+@a_enc:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_om_parser_parse_buf ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_buf:
+@a_len:
+@a_enc:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_om_parser_parse_paths_to_cascade ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_author_path:
+@a_user_path:
+@a_ua_path:
+@a_encoding:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_om_parser_simply_parse_paths_to_cascade ##### -->
+<para>
+
+</para>
+
+@a_author_path:
+@a_user_path:
+@a_ua_path:
+@a_encoding:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_om_parser_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-parser.sgml b/docs/reference/tmpl/cr-parser.sgml
new file mode 100644
index 0000000..3c7cb46
--- /dev/null
+++ b/docs/reference/tmpl/cr-parser.sgml
@@ -0,0 +1,307 @@
+<!-- ##### SECTION Title ##### -->
+cr-parser
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRParser ##### -->
+<para>
+
+</para>
+
+@priv:
+
+<!-- ##### STRUCT CRParserPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION cr_parser_new ##### -->
+<para>
+
+</para>
+
+@a_tknzr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_new_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_len:
+@a_enc:
+@a_free_buf:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_new_from_file ##### -->
+<para>
+
+</para>
+
+@a_file_uri:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_new_from_input ##### -->
+<para>
+
+</para>
+
+@a_input:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_set_tknzr ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_tknzr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_get_tknzr ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_tknzr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_get_parsing_location ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_loc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_try_to_skip_spaces_and_comments ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_set_sac_handler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_handler:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_get_sac_handler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_handler:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_set_use_core_grammar ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_use_core_grammar:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_get_use_core_grammar ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_use_core_grammar:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_file ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_file_uri:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_buf ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_buf:
+@a_len:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_set_default_sac_handler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_term ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_term:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_expr ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_expr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_prio ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prio:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_declaration ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_property:
+@a_expr:
+@a_important:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_statement_core ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_ruleset ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_import ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_media_list:
+@a_import_string:
+@a_location:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_media ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_page ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_charset ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_value:
+@a_charset_sym_location:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_parse_font_face ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parser_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-parsing-location.sgml b/docs/reference/tmpl/cr-parsing-location.sgml
new file mode 100644
index 0000000..5677d38
--- /dev/null
+++ b/docs/reference/tmpl/cr-parsing-location.sgml
@@ -0,0 +1,80 @@
+<!-- ##### SECTION Title ##### -->
+cr-parsing-location
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRParsingLocation ##### -->
+<para>
+
+</para>
+
+@line:
+@column:
+@byte_offset:
+
+<!-- ##### FUNCTION cr_parsing_location_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parsing_location_init ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parsing_location_copy ##### -->
+<para>
+
+</para>
+
+@a_to:
+@a_from:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parsing_location_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_mask:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_parsing_location_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_mask:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_parsing_location_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-prop-list.sgml b/docs/reference/tmpl/cr-prop-list.sgml
new file mode 100644
index 0000000..392c7e7
--- /dev/null
+++ b/docs/reference/tmpl/cr-prop-list.sgml
@@ -0,0 +1,158 @@
+<!-- ##### SECTION Title ##### -->
+cr-prop-list
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRPropList ##### -->
+<para>
+
+</para>
+
+@priv:
+
+<!-- ##### STRUCT CRPropListPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION cr_prop_list_append ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_to_append:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_append2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@a_decl:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_prepend ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_to_append:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_prepend2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@a_decl:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_set_prop ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_get_prop ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_lookup_prop ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@a_pair:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_get_next ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_get_prev ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_set_decl ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decl:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_get_decl ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decl:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_unlink ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pair:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_prop_list_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-pseudo.sgml b/docs/reference/tmpl/cr-pseudo.sgml
new file mode 100644
index 0000000..0d76bcf
--- /dev/null
+++ b/docs/reference/tmpl/cr-pseudo.sgml
@@ -0,0 +1,59 @@
+<!-- ##### SECTION Title ##### -->
+cr-pseudo
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRPseudo ##### -->
+<para>
+
+</para>
+
+@name:
+@extra:
+@location:
+
+<!-- ##### FUNCTION cr_pseudo_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_pseudo_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_pseudo_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_pseudo_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-rgb.sgml b/docs/reference/tmpl/cr-rgb.sgml
new file mode 100644
index 0000000..b9534f7
--- /dev/null
+++ b/docs/reference/tmpl/cr-rgb.sgml
@@ -0,0 +1,196 @@
+<!-- ##### SECTION Title ##### -->
+cr-rgb
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRRgb ##### -->
+<para>
+
+</para>
+
+@name:
+@red:
+@green:
+@blue:
+@is_percentage:
+@inherit:
+@is_transparent:
+@location:
+
+<!-- ##### FUNCTION cr_rgb_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_new_with_vals ##### -->
+<para>
+
+</para>
+
+@a_red:
+@a_green:
+@a_blue:
+@a_is_percentage:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_str:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_compute_from_percentage ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_set ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_red:
+@a_green:
+@a_blue:
+@a_is_percentage:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_copy ##### -->
+<para>
+
+</para>
+
+@a_dest:
+@a_src:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_set_to_inherit ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_inherit:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_is_set_to_inherit ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_is_set_to_transparent ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_set_to_transparent ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_is_transparent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_set_from_rgb ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_rgb:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_set_from_name ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_color_name:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_set_from_hex_str ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_hex_value:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_set_from_term ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_value:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_rgb_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_rgb_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-sel-eng.sgml b/docs/reference/tmpl/cr-sel-eng.sgml
new file mode 100644
index 0000000..1027505
--- /dev/null
+++ b/docs/reference/tmpl/cr-sel-eng.sgml
@@ -0,0 +1,151 @@
+<!-- ##### SECTION Title ##### -->
+cr-sel-eng
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRSelEng ##### -->
+<para>
+
+</para>
+
+@priv:
+
+<!-- ##### STRUCT CRSelEngPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### USER_FUNCTION CRPseudoClassSelectorHandler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_add_sel:
+@a_node:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_register_pseudo_class_sel_handler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pseudo_class_sel_name:
+@a_pseudo_class_type:
+@a_handler:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_unregister_pseudo_class_sel_handler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pseudo_class_sel_name:
+@a_pseudo_class_type:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_unregister_all_pseudo_class_sel_handlers ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_get_pseudo_class_selector_handler ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pseudo_class_sel_name:
+@a_pseudo_class_type:
+@a_handler:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_matches_node ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+@a_node:
+@a_result:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_get_matched_rulesets ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sheet:
+@a_node:
+@a_rulesets:
+@a_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_get_matched_properties_from_cascade ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_cascade:
+@a_node:
+@a_props:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_get_matched_style ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_cascade:
+@a_node:
+@a_parent_style:
+@a_style:
+@a_set_props_to_initial_values:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_sel_eng_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-selector.sgml b/docs/reference/tmpl/cr-selector.sgml
new file mode 100644
index 0000000..ddfc87c
--- /dev/null
+++ b/docs/reference/tmpl/cr-selector.sgml
@@ -0,0 +1,119 @@
+<!-- ##### SECTION Title ##### -->
+cr-selector
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRSelector ##### -->
+<para>
+
+</para>
+
+@simple_sel:
+@next:
+@prev:
+@location:
+@ref_count:
+
+<!-- ##### FUNCTION cr_selector_new ##### -->
+<para>
+
+</para>
+
+@a_sel_expr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_selector_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_char_buf:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_selector_append ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_selector_append_simple_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_simple_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_selector_prepend ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_selector_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_selector_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_selector_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_selector_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_selector_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-simple-sel.sgml b/docs/reference/tmpl/cr-simple-sel.sgml
new file mode 100644
index 0000000..e7dc7a4
--- /dev/null
+++ b/docs/reference/tmpl/cr-simple-sel.sgml
@@ -0,0 +1,111 @@
+<!-- ##### SECTION Title ##### -->
+cr-simple-sel
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRSimpleSel ##### -->
+<para>
+
+</para>
+
+@is_case_sentive:
+@name:
+@add_sel:
+@specificity:
+@next:
+@prev:
+@location:
+
+<!-- ##### FUNCTION cr_simple_sel_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_append_simple_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_prepend_simple_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_one_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_dump_attr_sel_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_compute_specificity ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_simple_sel_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-statement.sgml b/docs/reference/tmpl/cr-statement.sgml
new file mode 100644
index 0000000..77092d4
--- /dev/null
+++ b/docs/reference/tmpl/cr-statement.sgml
@@ -0,0 +1,613 @@
+<!-- ##### SECTION Title ##### -->
+cr-statement
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRAtMediaRule ##### -->
+<para>
+
+</para>
+
+@media_list:
+@rulesets:
+
+<!-- ##### STRUCT CRRuleSet ##### -->
+<para>
+
+</para>
+
+@sel_list:
+@decl_list:
+@parent_media_rule:
+
+<!-- ##### STRUCT CRStyleSheet ##### -->
+<para>
+
+</para>
+
+@statements:
+@parent_import_rule:
+@croco_data:
+@app_data:
+@ref_count:
+
+<!-- ##### STRUCT CRAtImportRule ##### -->
+<para>
+
+</para>
+
+@url:
+@media_list:
+@sheet:
+
+<!-- ##### STRUCT CRAtPageRule ##### -->
+<para>
+
+</para>
+
+@decl_list:
+@name:
+@pseudo:
+
+<!-- ##### STRUCT CRAtCharsetRule ##### -->
+<para>
+
+</para>
+
+@charset:
+
+<!-- ##### STRUCT CRAtFontFaceRule ##### -->
+<para>
+
+</para>
+
+@decl_list:
+
+<!-- ##### STRUCT CRStatement ##### -->
+<para>
+
+</para>
+
+@specificity:
+@parent_sheet:
+@next:
+@prev:
+@location:
+@app_data:
+@croco_data:
+
+<!-- ##### FUNCTION cr_statement_does_buf_parses_against_core ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_encoding:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_encoding:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_new_ruleset ##### -->
+<para>
+
+</para>
+
+@a_sheet:
+@a_sel_list:
+@a_decl_list:
+@a_media_rule:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_ruleset_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_new_at_import_rule ##### -->
+<para>
+
+</para>
+
+@a_container_sheet:
+@a_url:
+@a_media_list:
+@a_imported_sheet:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_import_rule_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_encoding:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_new_at_media_rule ##### -->
+<para>
+
+</para>
+
+@a_sheet:
+@a_ruleset:
+@a_media:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_media_rule_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_new_at_charset_rule ##### -->
+<para>
+
+</para>
+
+@a_sheet:
+@a_charset:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_charset_rule_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_encoding:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_new_at_font_face_rule ##### -->
+<para>
+
+</para>
+
+@a_sheet:
+@a_font_decls:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_font_face_rule_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_encoding:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_new_at_page_rule ##### -->
+<para>
+
+</para>
+
+@a_sheet:
+@a_decl_list:
+@a_name:
+@a_pseudo:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_page_rule_parse_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_encoding:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_set_parent_sheet ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sheet:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_get_parent_sheet ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sheet:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_append ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_prepend ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_unlink ##### -->
+<para>
+
+</para>
+
+@a_stmt:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_ruleset_set_sel_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_ruleset_get_sel_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_ruleset_set_decl_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_ruleset_get_declarations ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decl_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_ruleset_append_decl2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@a_value:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_ruleset_append_decl ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decl:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_import_rule_set_imported_sheet ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sheet:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_import_rule_get_imported_sheet ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sheet:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_import_rule_set_url ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_url:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_import_rule_get_url ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_url:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_media_nr_rules ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_media_get_from_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@itemnr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_page_rule_set_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_page_rule_get_sel ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_sel:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_page_rule_set_declarations ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decl_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_page_rule_get_declarations ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decl_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_charset_rule_set_charset ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_charset:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_charset_rule_get_charset ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_charset:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_font_face_rule_set_decls ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decls:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_font_face_rule_get_decls ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decls:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_at_font_face_rule_add_decl ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_prop:
+@a_value:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_list_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_statement_dump_ruleset ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_statement_dump_font_face_rule ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_statement_dump_page ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_statement_dump_media_rule ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_statement_dump_import_rule ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_statement_dump_charset ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+@a_indent:
+
+
+<!-- ##### FUNCTION cr_statement_nr_rules ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_get_from_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@itemnr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_statement_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-string.sgml b/docs/reference/tmpl/cr-string.sgml
new file mode 100644
index 0000000..18b3aa3
--- /dev/null
+++ b/docs/reference/tmpl/cr-string.sgml
@@ -0,0 +1,94 @@
+<!-- ##### SECTION Title ##### -->
+cr-string
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRString ##### -->
+<para>
+
+</para>
+
+@stryng:
+@location:
+
+<!-- ##### FUNCTION cr_string_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_string_new_from_string ##### -->
+<para>
+
+</para>
+
+@a_string:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_string_new_from_gstring ##### -->
+<para>
+
+</para>
+
+@a_string:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_string_dup ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_string_dup2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_string_peek_raw_str ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_string_peek_raw_str_len ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_string_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-style.sgml b/docs/reference/tmpl/cr-style.sgml
new file mode 100644
index 0000000..00569a0
--- /dev/null
+++ b/docs/reference/tmpl/cr-style.sgml
@@ -0,0 +1,266 @@
+<!-- ##### SECTION Title ##### -->
+cr-style
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRStyle ##### -->
+<para>
+
+</para>
+
+@num_props:
+@rgb_props:
+@font_family:
+@font_size:
+@font_size_adjust:
+@inherited_props_resolved:
+@parent_style:
+@ref_count:
+
+<!-- ##### MACRO BORDER_THIN ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO BORDER_MEDIUM ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO BORDER_THICK ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### STRUCT CRNumPropVal ##### -->
+<para>
+
+</para>
+
+@sv:
+@cv:
+@av:
+
+<!-- ##### STRUCT CRRgbPropVal ##### -->
+<para>
+
+</para>
+
+@sv:
+@cv:
+@av:
+
+<!-- ##### STRUCT CRFontSizeVal ##### -->
+<para>
+
+</para>
+
+@sv:
+@cv:
+@av:
+
+<!-- ##### FUNCTION cr_style_white_space_type_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_num_prop_val_to_string ##### -->
+<para>
+
+</para>
+
+@a_prop_val:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_rgb_prop_val_to_string ##### -->
+<para>
+
+</para>
+
+@a_prop_val:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_border_style_to_string ##### -->
+<para>
+
+</para>
+
+@a_prop:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_display_type_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_position_type_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_float_type_to_string ##### -->
+<para>
+
+</para>
+
+@a_code:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_new ##### -->
+<para>
+
+</para>
+
+@a_set_props_to_initial_values:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_set_props_to_default_values ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_set_props_to_initial_values ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_resolve_inherited_properties ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_propagate_from_parent ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_set_style_from_decl ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_decl:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_copy ##### -->
+<para>
+
+</para>
+
+@a_dest:
+@a_src:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_style_dup ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_style_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@a_nb_indent:
+@Returns:
+
+
diff --git a/docs/reference/tmpl/cr-stylesheet.sgml b/docs/reference/tmpl/cr-stylesheet.sgml
new file mode 100644
index 0000000..ee5176d
--- /dev/null
+++ b/docs/reference/tmpl/cr-stylesheet.sgml
@@ -0,0 +1,98 @@
+<!-- ##### SECTION Title ##### -->
+cr-stylesheet
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRStyleSheet ##### -->
+<para>
+
+</para>
+
+@statements:
+@parent_import_rule:
+@croco_data:
+@app_data:
+@ref_count:
+
+<!-- ##### FUNCTION cr_stylesheet_new ##### -->
+<para>
+
+</para>
+
+@a_stmts:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_stylesheet_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_stylesheet_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_stylesheet_nr_rules ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_stylesheet_statement_get_from_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@itemnr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_stylesheet_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_stylesheet_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_stylesheet_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-term.sgml b/docs/reference/tmpl/cr-term.sgml
new file mode 100644
index 0000000..21308cb
--- /dev/null
+++ b/docs/reference/tmpl/cr-term.sgml
@@ -0,0 +1,207 @@
+<!-- ##### SECTION Title ##### -->
+cr-term
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRTerm ##### -->
+<para>
+
+</para>
+
+@app_data:
+@ref_count:
+@next:
+@prev:
+@location:
+
+<!-- ##### FUNCTION cr_term_parse_expression_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_encoding:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_set_number ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_set_function ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_func_name:
+@a_func_param:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_set_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_set_ident ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_set_uri ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_set_rgb ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_rgb:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_set_hash ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_append_term ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new_term:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_prepend_term ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_new_term:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_one_to_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_dump ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fp:
+
+
+<!-- ##### FUNCTION cr_term_nr_values ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_get_from_list ##### -->
+<para>
+
+</para>
+
+@a_this:
+@itemnr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_term_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_term_destroy ##### -->
+<para>
+
+</para>
+
+@a_term:
+
+
diff --git a/docs/reference/tmpl/cr-tknzr.sgml b/docs/reference/tmpl/cr-tknzr.sgml
new file mode 100644
index 0000000..e216e11
--- /dev/null
+++ b/docs/reference/tmpl/cr-tknzr.sgml
@@ -0,0 +1,261 @@
+<!-- ##### SECTION Title ##### -->
+cr-tknzr
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRTknzr ##### -->
+<para>
+
+</para>
+
+@priv:
+
+<!-- ##### STRUCT CRTknzrPriv ##### -->
+<para>
+
+</para>
+
+
+<!-- ##### FUNCTION cr_tknzr_new ##### -->
+<para>
+
+</para>
+
+@a_input:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_new_from_uri ##### -->
+<para>
+
+</para>
+
+@a_file_uri:
+@a_enc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_new_from_buf ##### -->
+<para>
+
+</para>
+
+@a_buf:
+@a_len:
+@a_enc:
+@a_free_at_destroy:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_unref ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_ref ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
+<!-- ##### FUNCTION cr_tknzr_read_byte ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_byte:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_read_char ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_peek_char ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_peek_byte ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_offset:
+@a_byte:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_peek_byte2 ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_offset:
+@a_eof:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_set_cur_pos ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pos:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_get_nb_bytes_left ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_get_cur_pos ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_pos:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_get_parsing_location ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_loc:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_seek_index ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_origin:
+@a_pos:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_get_cur_byte_addr ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_addr:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_consume_chars ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@a_nb_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_get_next_token ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_tk:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_unget_token ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_token:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_parse_token ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_type:
+@a_et:
+@a_res:
+@a_extra_res:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_set_input ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_input:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_get_input ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_input:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_tknzr_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-token.sgml b/docs/reference/tmpl/cr-token.sgml
new file mode 100644
index 0000000..8f762e5
--- /dev/null
+++ b/docs/reference/tmpl/cr-token.sgml
@@ -0,0 +1,388 @@
+<!-- ##### SECTION Title ##### -->
+cr-token
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### STRUCT CRToken ##### -->
+<para>
+
+</para>
+
+@pos:
+@dimen:
+@location:
+
+<!-- ##### FUNCTION cr_token_new ##### -->
+<para>
+
+</para>
+
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_s ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_cdo ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_cdc ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_includes ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_dashmatch ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_comment ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_string ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_str:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_ident ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_ident:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_hash ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_hash:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_rgb ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_rgb:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_import_sym ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_page_sym ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_media_sym ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_font_face_sym ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_charset_sym ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_atkeyword ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_atname:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_important_sym ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_ems ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_exs ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_length ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@a_et:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_angle ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@a_et:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_time ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@a_et:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_freq ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@a_et:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_dimen ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@a_dim:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_percentage ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_number ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_num:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_uri ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_uri:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_function ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_fun_name:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_bc ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_bo ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_po ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_pc ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_cbc ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_cbo ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_semicolon ##### -->
+<para>
+
+</para>
+
+@a_this:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_set_delim ##### -->
+<para>
+
+</para>
+
+@a_this:
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_token_destroy ##### -->
+<para>
+
+</para>
+
+@a_this:
+
+
diff --git a/docs/reference/tmpl/cr-utils.sgml b/docs/reference/tmpl/cr-utils.sgml
new file mode 100644
index 0000000..caedf1a
--- /dev/null
+++ b/docs/reference/tmpl/cr-utils.sgml
@@ -0,0 +1,283 @@
+<!-- ##### SECTION Title ##### -->
+cr-utils
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO CROCO_LOG_DOMAIN ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO cr_utils_trace ##### -->
+<para>
+
+</para>
+
+@a_log_level:
+@a_msg:
+
+
+<!-- ##### MACRO cr_utils_trace_info ##### -->
+<para>
+
+</para>
+
+@a_msg:
+
+
+<!-- ##### MACRO cr_utils_trace_debug ##### -->
+<para>
+
+</para>
+
+@a_msg:
+
+
+<!-- ##### FUNCTION cr_utils_read_char_from_utf8_buf ##### -->
+<para>
+
+</para>
+
+@a_in:
+@a_in_len:
+@a_out:
+@a_consumed:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_ucs1_to_utf8 ##### -->
+<para>
+
+</para>
+
+@a_in:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_utf8_to_ucs1 ##### -->
+<para>
+
+</para>
+
+@a_in:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_ucs4_to_utf8 ##### -->
+<para>
+
+</para>
+
+@a_in:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_utf8_str_len_as_ucs4 ##### -->
+<para>
+
+</para>
+
+@a_in_start:
+@a_in_end:
+@a_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_ucs1_str_len_as_utf8 ##### -->
+<para>
+
+</para>
+
+@a_in_start:
+@a_in_end:
+@a_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_utf8_str_len_as_ucs1 ##### -->
+<para>
+
+</para>
+
+@a_in_start:
+@a_in_end:
+@a_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_ucs4_str_len_as_utf8 ##### -->
+<para>
+
+</para>
+
+@a_in_start:
+@a_in_end:
+@a_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_ucs1_str_to_utf8 ##### -->
+<para>
+
+</para>
+
+@a_in_start:
+@a_in_len:
+@a_out:
+@a_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_utf8_str_to_ucs1 ##### -->
+<para>
+
+</para>
+
+@a_in_start:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_utf8_to_ucs4 ##### -->
+<para>
+
+</para>
+
+@a_in:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_ucs4_str_to_utf8 ##### -->
+<para>
+
+</para>
+
+@a_in:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_utf8_str_to_ucs4 ##### -->
+<para>
+
+</para>
+
+@a_in:
+@a_in_len:
+@a_out:
+@a_out_len:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_is_newline ##### -->
+<para>
+
+</para>
+
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_is_white_space ##### -->
+<para>
+
+</para>
+
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_is_nonascii ##### -->
+<para>
+
+</para>
+
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_is_hexa_char ##### -->
+<para>
+
+</para>
+
+@a_char:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_dump_n_chars ##### -->
+<para>
+
+</para>
+
+@a_char:
+@a_fp:
+@a_nb:
+
+
+<!-- ##### FUNCTION cr_utils_dump_n_chars2 ##### -->
+<para>
+
+</para>
+
+@a_char:
+@a_string:
+@a_nb:
+
+
+<!-- ##### FUNCTION cr_utils_n_to_0_dot_n ##### -->
+<para>
+
+</para>
+
+@a_n:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_dup_glist_of_string ##### -->
+<para>
+
+</para>
+
+@a_list:
+@Returns:
+
+
+<!-- ##### FUNCTION cr_utils_dup_glist_of_cr_string ##### -->
+<para>
+
+</para>
+
+@a_list_of_strings:
+@Returns:
+
+
diff --git a/docs/reference/tmpl/libcroco-config.sgml b/docs/reference/tmpl/libcroco-config.sgml
new file mode 100644
index 0000000..3fc26d9
--- /dev/null
+++ b/docs/reference/tmpl/libcroco-config.sgml
@@ -0,0 +1,37 @@
+<!-- ##### SECTION Title ##### -->
+libcroco-config
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
+<!-- ##### MACRO LIBCROCO_VERSION ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO G_DISABLE_CHECKS ##### -->
+<para>
+
+</para>
+
+
+
+<!-- ##### MACRO CROCO_HAVE_LIBXML2 ##### -->
+<para>
+
+</para>
+
+
+
diff --git a/docs/reference/tmpl/libcroco.sgml b/docs/reference/tmpl/libcroco.sgml
new file mode 100644
index 0000000..7545128
--- /dev/null
+++ b/docs/reference/tmpl/libcroco.sgml
@@ -0,0 +1,16 @@
+<!-- ##### SECTION Title ##### -->
+libcroco
+
+<!-- ##### SECTION Short_Description ##### -->
+
+
+<!-- ##### SECTION Long_Description ##### -->
+<para>
+
+</para>
+
+<!-- ##### SECTION See_Also ##### -->
+<para>
+
+</para>
+
diff --git a/gtk-doc.make b/gtk-doc.make
new file mode 100644
index 0000000..445c6e8
--- /dev/null
+++ b/gtk-doc.make
@@ -0,0 +1,151 @@
+# -*- mode: makefile -*-
+
+####################################
+# Everything below here is generic #
+####################################
+
+if GTK_DOC_USE_LIBTOOL
+GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+else
+GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CFLAGS) $(CFLAGS)
+GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS)
+endif
+
+# We set GPATH here; this gives us semantics for GNU make
+# which are more like other make's VPATH, when it comes to
+# whether a source that is a target of one rule is then
+# searched for in VPATH/GPATH.
+#
+GPATH = $(srcdir)
+
+TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
+
+EXTRA_DIST = \
+ $(content_files) \
+ $(HTML_IMAGES) \
+ $(DOC_MAIN_SGML_FILE) \
+ $(DOC_MODULE).types \
+ $(DOC_MODULE)-sections.txt \
+ $(DOC_MODULE)-overrides.txt
+
+DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
+ $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
+
+SCANOBJ_FILES = \
+ $(DOC_MODULE).args \
+ $(DOC_MODULE).hierarchy \
+ $(DOC_MODULE).interfaces \
+ $(DOC_MODULE).prerequisites \
+ $(DOC_MODULE).signals
+
+CLEANFILES = $(SCANOBJ_FILES) $(DOC_MODULE)-unused.txt $(DOC_STAMPS)
+
+if ENABLE_GTK_DOC
+all-local: html-build.stamp
+
+#### scan ####
+
+scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
+ @echo '*** Scanning header files ***'
+ @-chmod -R u+w $(srcdir)
+ if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
+ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
+ else \
+ cd $(srcdir) ; \
+ for i in $(SCANOBJ_FILES) ; do \
+ test -f $$i || touch $$i ; \
+ done \
+ fi
+ cd $(srcdir) && \
+ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
+ touch scan-build.stamp
+
+$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
+ @true
+
+#### templates ####
+
+tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
+ @echo '*** Rebuilding template files ***'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
+ touch tmpl-build.stamp
+
+tmpl.stamp: tmpl-build.stamp
+ @true
+
+#### xml ####
+
+sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
+ @echo '*** Building XML ***'
+ @-chmod -R u+w $(srcdir)
+ cd $(srcdir) && \
+ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml $(MKDB_OPTIONS)
+ touch sgml-build.stamp
+
+sgml.stamp: sgml-build.stamp
+ @true
+
+#### html ####
+
+html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
+ @echo '*** Building HTML ***'
+ @-chmod -R u+w $(srcdir)
+ rm -rf $(srcdir)/html
+ mkdir $(srcdir)/html
+ cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
+ test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
+ @echo '-- Fixing Crossreferences'
+ cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
+ touch html-build.stamp
+else
+all-local:
+endif
+
+##############
+
+clean-local:
+ rm -f *~ *.bak
+ rm -rf .libs
+
+maintainer-clean-local: clean
+ cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
+
+install-data-local:
+ installfiles=`echo $(srcdir)/html/*`; \
+ if test "$$installfiles" = '$(srcdir)/html/*'; \
+ then echo '-- Nothing to install' ; \
+ else \
+ $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \
+ for i in $$installfiles; do \
+ echo '-- Installing '$$i ; \
+ $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
+ done; \
+ echo '-- Installing $(srcdir)/html/index.sgml' ; \
+ $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \
+ fi
+
+uninstall-local:
+ rm -f $(DESTDIR)$(TARGET_DIR)/*
+
+#
+# Require gtk-doc when making dist
+#
+if ENABLE_GTK_DOC
+dist-check-gtkdoc:
+else
+dist-check-gtkdoc:
+ @echo "*** gtk-doc must be installed and enabled in order to make dist"
+ @false
+endif
+
+dist-hook: dist-check-gtkdoc dist-hook-local
+ mkdir $(distdir)/tmpl
+ mkdir $(distdir)/xml
+ mkdir $(distdir)/html
+ -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
+ -cp $(srcdir)/xml/*.xml $(distdir)/xml
+ -cp $(srcdir)/html/* $(distdir)/html
+
+.PHONY : dist-hook-local
diff --git a/src/Makefile.am b/src/Makefile.am
index 37afde4..9eeca3f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -90,6 +90,6 @@ lib_LTLIBRARIES=libcroco-0.6.la
libcroco_0_6_la_SOURCES= $(SRCS)
INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/intl \
-@GLIB2_CFLAGS@ @LIBXML2_CFLAGS@
+-I $(top_builddir)/src @GLIB2_CFLAGS@ @LIBXML2_CFLAGS@
libcroco_0_6_la_LDFLAGS=-version-info @LIBCROCO_VERSION_INFO@ \
@GLIB2_CFLAGS@
diff --git a/src/cr-additional-sel.c b/src/cr-additional-sel.c
index 9f511af..45bf2c7 100644
--- a/src/cr-additional-sel.c
+++ b/src/cr-additional-sel.c
@@ -26,8 +26,21 @@
#include "string.h"
/**
- *Default constructor of #CRAdditionalSel.
- *@return the newly build instance of #CRAdditionalSel.
+ * CRAdditionalSel:
+ *
+ * #CRAdditionalSel abstracts an additionnal selector.
+ * An additional selector is the selector part
+ * that comes after the combination of type selectors.
+ * It can be either "a class selector (the .class part),
+ * a pseudo class selector, an attribute selector
+ * or an id selector.
+ */
+
+/**
+ * cr_additional_sel_new:
+ *
+ * Default constructor of #CRAdditionalSel.
+ * Returns the newly build instance of #CRAdditionalSel.
*/
CRAdditionalSel *
cr_additional_sel_new (void)
@@ -47,10 +60,12 @@ cr_additional_sel_new (void)
}
/**
- *Constructor of #CRAdditionalSel.
- *@param a_sel_type the type of the newly built instance
- *of #CRAdditionalSel.
- *@return the newly built instance of #CRAdditionalSel.
+ * cr_additional_sel_new_with_type:
+ * @a_sel_type: the type of the newly built instance
+ * of #CRAdditionalSel.
+ *
+ * Constructor of #CRAdditionalSel.
+ * Returns the newly built instance of #CRAdditionalSel.
*/
CRAdditionalSel *
cr_additional_sel_new_with_type (enum AddSelectorType a_sel_type)
@@ -67,12 +82,13 @@ cr_additional_sel_new_with_type (enum AddSelectorType a_sel_type)
}
/**
- *Sets a new class name to a
- *CLASS additional selector.
- *@param a_this the "this pointer" of the current instance
- *of #CRAdditionalSel .
- *@param a_class_name the new class name to set.
+ * cr_additional_sel_set_class_name:
+ * @a_this: the "this pointer" of the current instance
+ * of #CRAdditionalSel .
+ * @a_class_name: the new class name to set.
*
+ * Sets a new class name to a
+ * CLASS additional selector.
*/
void
cr_additional_sel_set_class_name (CRAdditionalSel * a_this,
@@ -88,11 +104,13 @@ cr_additional_sel_set_class_name (CRAdditionalSel * a_this,
}
/**
- *Sets a new id name to an
- *ID additional selector.
- *@param a_this the "this pointer" of the current instance
- *of #CRAdditionalSel .
- *@param a_id the new id to set.
+ * cr_additional_sel_set_id_name:
+ * @a_this: the "this pointer" of the current instance
+ * of #CRAdditionalSel .
+ * @a_id: the new id to set.
+ *
+ * Sets a new id name to an
+ * ID additional selector.
*/
void
cr_additional_sel_set_id_name (CRAdditionalSel * a_this, CRString * a_id)
@@ -107,11 +125,13 @@ cr_additional_sel_set_id_name (CRAdditionalSel * a_this, CRString * a_id)
}
/**
- *Sets a new pseudo to a
- *PSEUDO additional selector.
- *@param a_this the "this pointer" of the current instance
- *of #CRAdditionalSel .
- *@param a_pseudo the new pseudo to set.
+ * cr_additional_sel_set_pseudo:
+ * @a_this: the "this pointer" of the current instance
+ * of #CRAdditionalSel .
+ * @a_pseudo: the new pseudo to set.
+ *
+ * Sets a new pseudo to a
+ * PSEUDO additional selector.
*/
void
cr_additional_sel_set_pseudo (CRAdditionalSel * a_this, CRPseudo * a_pseudo)
@@ -127,11 +147,13 @@ cr_additional_sel_set_pseudo (CRAdditionalSel * a_this, CRPseudo * a_pseudo)
}
/**
- *Sets a new instance of #CRAttrSel to
- *a ATTRIBUTE additional selector.
- *@param a_this the "this pointer" of the current instance
- *of #CRAdditionalSel .
- *@param a_sel the new instance of #CRAttrSel to set.
+ * cr_additional_sel_set_attr_sel:
+ * @a_this: the "this pointer" of the current instance
+ * of #CRAdditionalSel .
+ * @a_sel: the new instance of #CRAttrSel to set.
+ *
+ * Sets a new instance of #CRAttrSel to
+ * a ATTRIBUTE additional selector.
*/
void
cr_additional_sel_set_attr_sel (CRAdditionalSel * a_this, CRAttrSel * a_sel)
@@ -146,12 +168,15 @@ cr_additional_sel_set_attr_sel (CRAdditionalSel * a_this, CRAttrSel * a_sel)
}
/**
- *Appends a new instance of #CRAdditional to the
- *current list of #CRAdditional.
- *@param a_this the "this pointer" of the current instance
- *of #CRAdditionalSel .
- *@param a_sel the new instance to #CRAdditional to append.
- *@return the new list of CRAdditionalSel or NULL if an error arises.
+ * cr_additional_sel_append:
+ * @a_this: the "this pointer" of the current instance
+ * of #CRAdditionalSel .
+ * @a_sel: the new instance to #CRAdditional to append.
+ *
+ * Appends a new instance of #CRAdditional to the
+ * current list of #CRAdditional.
+ *
+ * Returns the new list of CRAdditionalSel or NULL if an error arises.
*/
CRAdditionalSel *
cr_additional_sel_append (CRAdditionalSel * a_this, CRAdditionalSel * a_sel)
@@ -179,12 +204,15 @@ cr_additional_sel_append (CRAdditionalSel * a_this, CRAdditionalSel * a_sel)
}
/**
- *Preppends a new instance of #CRAdditional to the
- *current list of #CRAdditional.
- *@param a_this the "this pointer" of the current instance
- *of #CRAdditionalSel .
- *@param a_sel the new instance to #CRAdditional to preappend.
- *@return the new list of CRAdditionalSel or NULL if an error arises.
+ * cr_additional_sel_prepend:
+ * @a_this: the "this pointer" of the current instance
+ * of #CRAdditionalSel .
+ * @a_sel: the new instance to #CRAdditional to preappend.
+ *
+ * Preppends a new instance of #CRAdditional to the
+ * current list of #CRAdditional.
+ *
+ * Returns the new list of CRAdditionalSel or NULL if an error arises.
*/
CRAdditionalSel *
cr_additional_sel_prepend (CRAdditionalSel * a_this, CRAdditionalSel * a_sel)
@@ -403,10 +431,12 @@ cr_additional_sel_one_to_string (CRAdditionalSel *a_this)
}
/**
- *Dumps the current instance of #CRAdditionalSel to a file
- *@param a_this the "this pointer" of the current instance of
- *#CRAdditionalSel.
- *@param a_fp the destination file.
+ * cr_additional_sel_dump:
+ * @a_this: the "this pointer" of the current instance of
+ * #CRAdditionalSel.
+ * @a_fp: the destination file.
+ *
+ * Dumps the current instance of #CRAdditionalSel to a file
*/
void
cr_additional_sel_dump (CRAdditionalSel * a_this, FILE * a_fp)
@@ -426,9 +456,11 @@ cr_additional_sel_dump (CRAdditionalSel * a_this, FILE * a_fp)
}
/**
- *Destroys an instance of #CRAdditional.
- *@param a_this the "this pointer" of the current instance
- *of #CRAdditionalSel .
+ * cr_additional_sel_destroy:
+ * @a_this: the "this pointer" of the current instance
+ * of #CRAdditionalSel .
+ *
+ * Destroys an instance of #CRAdditional.
*/
void
cr_additional_sel_destroy (CRAdditionalSel * a_this)
diff --git a/src/cr-additional-sel.h b/src/cr-additional-sel.h
index 1ec1aa0..536ad2d 100644
--- a/src/cr-additional-sel.h
+++ b/src/cr-additional-sel.h
@@ -22,11 +22,6 @@
*/
-/**
- *@file
- *This file holds the declaration of the
- *#CRAddSel class.
- */
#ifndef __CR_ADD_SEL_H__
#define __CR_ADD_SEL_H__
@@ -58,15 +53,6 @@ union CRAdditionalSelectorContent
typedef struct _CRAdditionalSel CRAdditionalSel ;
-/**
- *#CRAdditionalSel abstracts
- *an additionnal selector.
- *An additional selector is the selector part
- *that comes after the combination of type selectors.
- *It can be either "a class selector (the .class part),
- *a pseudo class selector, an attribute selector
- *or an id selector.
- */
struct _CRAdditionalSel
{
enum AddSelectorType type ;
diff --git a/src/cr-attr-sel.c b/src/cr-attr-sel.c
index cf048d1..65ed7e6 100644
--- a/src/cr-attr-sel.c
+++ b/src/cr-attr-sel.c
@@ -24,17 +24,19 @@
#include "cr-attr-sel.h"
/**
- *@file
- *The class that abstracts an attribute selector.
- *Attributes selectors are described in the css2 spec [5.8].
- *There are more generally used in the css2 selectors described in
- *css2 spec [5] .
+ * CRAttrSel:
+ *
+ * #CRAdditionalSel abstracts an attribute selector.
+ * Attributes selectors are described in the css2 spec [5.8].
+ * There are more generally used in the css2 selectors described in
+ * css2 spec [5] .
*/
/**
- *The constructor of #CRAttrSel.
- *@return the newly allocated instance
- *of #CRAttrSel.
+ * cr_attr_sel_new:
+ * The constructor of #CRAttrSel.
+ * Returns the newly allocated instance
+ * of #CRAttrSel.
*/
CRAttrSel *
cr_attr_sel_new (void)
@@ -47,13 +49,13 @@ cr_attr_sel_new (void)
}
/**
- *Appends an attribute selector to the current list of
- *attribute selectors represented by a_this.
+ * cr_attr_sel_append_attr_sel:
+ * @a_this: the this pointer of the current instance of #CRAttrSel.
+ * @a_attr_sel: selector to append.
*
- *@param a_this the this pointer of the current instance of
- *#CRAttrSel.
- *@param a_attr_sel selector to append.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ * Appends an attribute selector to the current list of
+ * attribute selectors represented by a_this.
+ * Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_attr_sel_append_attr_sel (CRAttrSel * a_this, CRAttrSel * a_attr_sel)
@@ -74,13 +76,13 @@ cr_attr_sel_append_attr_sel (CRAttrSel * a_this, CRAttrSel * a_attr_sel)
}
/**
+ * cr_attr_sel_prepend_attr_sel:
+ *@a_this: the "this pointer" of the current instance *of #CRAttrSel.
+ *@a_attr_sel: the attribute selector to append.
+ *
*Prepends an attribute selector to the list of
*attributes selector represented by a_this.
- *
- *@param a_this the "this pointer" of the current instance
- *of #CRAttrSel.
- *@param a_attr_sel the attribute selector to append.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_attr_sel_prepend_attr_sel (CRAttrSel * a_this,
@@ -95,6 +97,13 @@ cr_attr_sel_prepend_attr_sel (CRAttrSel * a_this,
return CR_OK;
}
+/**
+ * cr_attr_sel_to_string:
+ * @a_this: the current instance of #CRAttrSel.
+ *
+ * Serializes an attribute selector into a string
+ * Returns the serialized attribute selector.
+ */
guchar *
cr_attr_sel_to_string (CRAttrSel * a_this)
{
@@ -167,10 +176,12 @@ cr_attr_sel_to_string (CRAttrSel * a_this)
}
/**
- *Dumps the current instance of #CRAttrSel to a file.
- *@param a_this the "this pointer" of the current instance of
- *#CRAttrSel.
- *@param a_fp the destination file.
+ * cr_attr_sel_dump:
+ * @a_this: the "this pointer" of the current instance of
+ * #CRAttrSel.
+ * @a_fp: the destination file.
+ *
+ * Dumps the current instance of #CRAttrSel to a file.
*/
void
cr_attr_sel_dump (CRAttrSel * a_this, FILE * a_fp)
@@ -189,10 +200,12 @@ cr_attr_sel_dump (CRAttrSel * a_this, FILE * a_fp)
}
/**
+ *cr_attr_sel_destroy:
+ *@a_this: the "this pointer" of the current
+ *instance of #CRAttrSel.
+ *
*Destroys the current instance of #CRAttrSel.
*Frees all the fields if they are non null.
- *@param a_this the "this pointer" of the current
- *instance of #CRAttrSel.
*/
void
cr_attr_sel_destroy (CRAttrSel * a_this)
@@ -219,3 +232,4 @@ cr_attr_sel_destroy (CRAttrSel * a_this)
a_this = NULL;
}
}
+
diff --git a/src/cr-attr-sel.h b/src/cr-attr-sel.h
index 9cc03d3..27dfd34 100644
--- a/src/cr-attr-sel.h
+++ b/src/cr-attr-sel.h
@@ -58,7 +58,7 @@ struct _CRAttrSel
CRAttrSel * cr_attr_sel_new (void) ;
enum CRStatus cr_attr_sel_append_attr_sel (CRAttrSel * a_this,
- CRAttrSel *a_new) ;
+ CRAttrSel *a_attr_sel) ;
enum CRStatus cr_attr_sel_prepend_attr_sel (CRAttrSel *a_this,
CRAttrSel *a_attr_sel) ;
diff --git a/src/cr-cascade.c b/src/cr-cascade.c
index ccb32c2..4fa69bb 100644
--- a/src/cr-cascade.c
+++ b/src/cr-cascade.c
@@ -44,6 +44,11 @@ struct _CRCascadePriv {
};
/**
+ * cr_cascade_new:
+ *@a_author_sheet: the author origin style sheet. May be NULL.
+ *@a_user_sheet: the user origin style sheet. May be NULL.
+ *@a_ua_sheet: the user agent origin style sheet. May be NULL.
+ *
*Constructor of the #CRCascade class.
*Note that all three parameters of this
*method are ref counted and their refcount is increased.
@@ -51,10 +56,8 @@ struct _CRCascadePriv {
*the instance of #CRCascade.
*So the caller should not call their destructor. The caller
*should call their ref/unref method instead if it wants
- *@param a_author_sheet the autor origin style sheet
- *@param a_user_sheet the user origin style sheet.
- *@param a_ua_sheet the user agent origin style sheet.
- *@return the newly built instance of CRCascade or NULL if
+ *
+ *Returns the newly built instance of CRCascade or NULL if
*an error arose during constrution.
*/
CRCascade *
@@ -91,16 +94,19 @@ cr_cascade_new (CRStyleSheet * a_author_sheet,
}
/**
+ * cr_cascade_get_sheet:
+ *@a_this: the current instance of #CRCascade.
+ *@a_origin: the origin of the style sheet as
+ *defined in the css2 spec in chapter 6.4.
*Gets a given origin sheet.
+ *
+ *Gets a sheet, part of the cascade.
*Note that the returned stylesheet
*is refcounted so if the caller wants
*to manage it's lifecycle, it must use
*cr_stylesheet_ref()/cr_stylesheet_unref() instead
*of the cr_stylesheet_destroy() method.
- *@param a_this the current instance of #CRCascade.
- *@param a_origin the origin of the style sheet as
- *defined in the css2 spec in chapter 6.4.
- *@return the style sheet, or NULL if it does not
+ *Returns the style sheet, or NULL if it does not
*exist.
*/
CRStyleSheet *
@@ -114,11 +120,14 @@ cr_cascade_get_sheet (CRCascade * a_this, enum CRStyleOrigin a_origin)
}
/**
+ * cr_cascade_set_sheet:
+ *@a_this: the current instance of #CRCascade.
+ *@a_sheet: the stylesheet to set.
+ *@a_origin: the origin of the stylesheet.
+ *
*Sets a stylesheet in the cascade
- *@param a_this the current instance of #CRCascade.
- *@param a_sheet the stylesheet to set.
- *@param a_origin the origin of the stylesheet.
- *@return CR_OK upon successfull completion, an error
+ *
+ *Returns CR_OK upon successfull completion, an error
*code otherwise.
*/
enum CRStatus
@@ -139,10 +148,11 @@ cr_cascade_set_sheet (CRCascade * a_this,
}
/**
+ *cr_cascade_ref:
+ *@a_this: the current instance of #CRCascade
+ *
*Increases the reference counter of the current instance
*of #CRCascade.
- *@param a_this the current instance of #CRCascade
- *
*/
void
cr_cascade_ref (CRCascade * a_this)
@@ -153,12 +163,14 @@ cr_cascade_ref (CRCascade * a_this)
}
/**
+ * cr_cascade_unref:
+ *@a_this: the current instance of
+ *#CRCascade.
+ *
*Decrements the reference counter associated
*to this instance of #CRCascade. If the reference
*counter reaches zero, the instance is destroyed
*using cr_cascade_destroy()
- *@param a_this the current instance of
- *#CRCascade.
*/
void
cr_cascade_unref (CRCascade * a_this)
@@ -173,7 +185,10 @@ cr_cascade_unref (CRCascade * a_this)
}
/**
- *Destructor of #CRCascade.
+ * cr_cascade_destroy:
+ * @a_this: the current instance of #CRCascade
+ *
+ * Destructor of #CRCascade.
*/
void
cr_cascade_destroy (CRCascade * a_this)
diff --git a/src/cr-declaration.c b/src/cr-declaration.c
index a1ff0d2..dbb6b50 100644
--- a/src/cr-declaration.c
+++ b/src/cr-declaration.c
@@ -28,15 +28,18 @@
#include "cr-parser.h"
/**
- *@file
+ *@CRDeclaration:
+ *
*The definition of the #CRDeclaration class.
*/
/**
+ * dump:
+ *@a_this: the current instance of #CRDeclaration.
+ *@a_fp: the destination file pointer.
+ *@a_indent: the number of indentation white char.
+ *
*Dumps (serializes) one css declaration to a file.
- *@param a_this the current instance of #CRDeclaration.
- *@param a_fp the destination file pointer.
- *@param a_indent the number of indentation white char.
*/
static void
dump (CRDeclaration * a_this, FILE * a_fp, glong a_indent)
@@ -54,10 +57,13 @@ dump (CRDeclaration * a_this, FILE * a_fp, glong a_indent)
}
/**
+ * cr_declaration_new:
+ * @a_statement: the statement this declaration belongs to. can be NULL.
+ *@a_property: the property string of the declaration
+ *@a_value: the value expression of the declaration.
*Constructor of #CRDeclaration.
- *@param a_property the property string of the declaration
- *@param a_value the value expression of the declaration.
- *@return the newly built instance of #CRDeclaration, or NULL in
+ *
+ *Returns the newly built instance of #CRDeclaration, or NULL in
*case of error.
*/
CRDeclaration *
@@ -93,15 +99,16 @@ cr_declaration_new (CRStatement * a_statement,
}
/**
- *Parses a text buffer that contains
- *a css declaration.
- *
- *@param a_statement the parent css2 statement of this
+ * cr_declaration_parse_from_buf:
+ *@a_statement: the parent css2 statement of this
*this declaration. Must be non NULL and of type
*RULESET_STMT (must be a ruleset).
- *@param a_str the string that contains the statement.
- *@param a_enc the encoding of a_str.
- *@return the parsed declaration, or NULL in case of error.
+ *@a_str: the string that contains the statement.
+ *@a_enc: the encoding of a_str.
+ *
+ *Parses a text buffer that contains
+ *a css declaration.
+ *Returns the parsed declaration, or NULL in case of error.
*/
CRDeclaration *
cr_declaration_parse_from_buf (CRStatement * a_statement,
@@ -159,11 +166,13 @@ cr_declaration_parse_from_buf (CRStatement * a_statement,
}
/**
- *Parses a ';' separated list of properties declaration.
- *@param a_str the input buffer that contains the list of declaration to
+ * cr_declaration_parse_list_from_buf:
+ *@a_str: the input buffer that contains the list of declaration to
*parse.
- *@param a_enc the encoding of a_str
- *@return the parsed list of declaration, NULL if parsing failed.
+ *@a_enc: the encoding of a_str
+ *
+ *Parses a ';' separated list of properties declaration.
+ *Returns the parsed list of declaration, NULL if parsing failed.
*/
CRDeclaration *
cr_declaration_parse_list_from_buf (const guchar * a_str,
@@ -269,10 +278,12 @@ cr_declaration_parse_list_from_buf (const guchar * a_str,
}
/**
+ * cr_declaration_append:
+ *@a_this: the current declaration list.
+ *@a_new: the declaration to append.
+ *
*Appends a new declaration to the current declarations list.
- *@param a_this the current declaration list.
- *@param a_new the declaration to append.
- *@return the declaration list with a_new appended to it, or NULL
+ *Returns the declaration list with a_new appended to it, or NULL
*in case of error.
*/
CRDeclaration *
@@ -294,10 +305,13 @@ cr_declaration_append (CRDeclaration * a_this, CRDeclaration * a_new)
}
/**
+ * cr_declaration_unlink:
+ *@a_decls: the declaration to unlink.
+ *
*Unlinks the declaration from the declaration list.
- *@param a_decl the declaration to unlink.
- *@return a pointer to the unlinked declaration in
*case of a successfull completion, NULL otherwise.
+ *
+ *Returns a pointer to the unlinked declaration in
*/
CRDeclaration *
cr_declaration_unlink (CRDeclaration * a_decl)
@@ -369,10 +383,13 @@ cr_declaration_unlink (CRDeclaration * a_decl)
}
/**
- *prepends a declaration to the current declaration list.
- *@param a_this the current declaration list.
- *@param a_new the declaration to prepend.
- *@return the list with a_new prepended or NULL in case of error.
+ * cr_declaration_prepend:
+ * @a_this: the current declaration list.
+ * @a_new: the declaration to prepend.
+ *
+ * prepends a declaration to the current declaration list.
+ *
+ * Returns the list with a_new prepended or NULL in case of error.
*/
CRDeclaration *
cr_declaration_prepend (CRDeclaration * a_this, CRDeclaration * a_new)
@@ -393,11 +410,13 @@ cr_declaration_prepend (CRDeclaration * a_this, CRDeclaration * a_new)
}
/**
+ * cr_declaration_append2:
+ *@a_this: the current declaration list.
+ *@a_prop: the property string of the declaration to append.
+ *@a_value: the value of the declaration to append.
+ *
*Appends a declaration to the current declaration list.
- *@param a_this the current declaration list.
- *@param a_prop the property string of the declaration to append.
- *@param a_value the value of the declaration to append.
- *@return the list with the new property appended to it, or NULL in
+ *Returns the list with the new property appended to it, or NULL in
*case of an error.
*/
CRDeclaration *
@@ -419,10 +438,14 @@ cr_declaration_append2 (CRDeclaration * a_this,
}
/**
+ * cr_declaration_dump:
+ *@a_this: the current instance of #CRDeclaration.
+ *@a_fp: the destination file.
+ *@a_indent: the number of indentation white char.
+ *@a_one_per_line: whether to put one declaration per line of not .
+ *
+ *
*Dumps a declaration list to a file.
- *@param a_this the current instance of #CRDeclaration.
- *@param a_fp the destination file.
- *@param a_indent the number of indentation white char.
*/
void
cr_declaration_dump (CRDeclaration * a_this, FILE * a_fp, glong a_indent,
@@ -444,10 +467,12 @@ cr_declaration_dump (CRDeclaration * a_this, FILE * a_fp, glong a_indent,
}
/**
+ * cr_declaration_dump_one:
+ *@a_this: the current instance of #CRDeclaration.
+ *@a_fp: the destination file.
+ *@a_indent: the number of indentation white char.
+ *
*Dumps the first declaration of the declaration list to a file.
- *@param a_this the current instance of #CRDeclaration.
- *@param a_fp the destination file.
- *@param a_indent the number of indentation white char.
*/
void
cr_declaration_dump_one (CRDeclaration * a_this, FILE * a_fp, glong a_indent)
@@ -458,10 +483,14 @@ cr_declaration_dump_one (CRDeclaration * a_this, FILE * a_fp, glong a_indent)
}
/**
- *Serializes the declaration into a string
- *@param a_this the current instance of #CRDeclaration.
- *@param a_indent the number of indentation white char
+ * cr_declaration_to_string:
+ *@a_this: the current instance of #CRDeclaration.
+ *@a_indent: the number of indentation white char
*to put before the actual serialisation.
+ *
+ *Serializes the declaration into a string
+ *Returns the serialized form the declaration. The caller must
+ *free the string using g_free().
*/
gchar *
cr_declaration_to_string (CRDeclaration * a_this, gulong a_indent)
@@ -525,10 +554,12 @@ cr_declaration_to_string (CRDeclaration * a_this, gulong a_indent)
}
/**
- *Serializes the declaration list into a string
- *@param a_this the current instance of #CRDeclaration.
- *@param a_indent the number of indentation white char
+ * cr_declaration_list_to_string:
+ *@a_this: the current instance of #CRDeclaration.
+ *@a_indent: the number of indentation white char
*to put before the actual serialisation.
+ *
+ *Serializes the declaration list into a string
*/
guchar *
cr_declaration_list_to_string (CRDeclaration * a_this, gulong a_indent)
@@ -559,10 +590,14 @@ cr_declaration_list_to_string (CRDeclaration * a_this, gulong a_indent)
}
/**
- *Serializes the declaration list into a string
- *@param a_this the current instance of #CRDeclaration.
- *@param a_indent the number of indentation white char
+ * cr_declaration_list_to_string2:
+ *@a_this: the current instance of #CRDeclaration.
+ *@a_indent: the number of indentation white char
+ @a_one_decl_per_line: whether to output one doc per line or not.
*to put before the actual serialisation.
+ *
+ *Serializes the declaration list into a string
+ *Returns the serialized form the declararation.
*/
guchar *
cr_declaration_list_to_string2 (CRDeclaration * a_this,
@@ -608,9 +643,9 @@ cr_declaration_list_to_string2 (CRDeclaration * a_this,
}
/**
- *Return the number of properties in the declaration;
- *@param a_this the current instance of #CRDeclaration.
- *@return number of properties in the declaration list.
+ * cr_declaration_nr_props:
+ *@a_this: the current instance of #CRDeclaration.
+ *Return the number of properties in the declaration
*/
gint
cr_declaration_nr_props (CRDeclaration * a_this)
@@ -626,10 +661,14 @@ cr_declaration_nr_props (CRDeclaration * a_this)
}
/**
+ * cr_declaration_get_from_list:
+ *@a_this: the current instance of #CRDeclaration.
+ *@itemnr: the index into the declaration list.
+ *
*Use an index to get a CRDeclaration from the declaration list.
- *@param a_this the current instance of #CRDeclaration.
- *@param itemnr the index into the declaration list.
- *@return CRDeclaration at position itemnr, if itemnr > number of declarations - 1,
+ *
+ *Returns #CRDeclaration at position itemnr,
+ *if itemnr > number of declarations - 1,
*it will return NULL.
*/
CRDeclaration *
@@ -647,10 +686,12 @@ cr_declaration_get_from_list (CRDeclaration * a_this, int itemnr)
}
/**
+ * cr_declaration_get_by_prop_name:
+ *@a_this: the current instance of #CRDeclaration.
+ *@a_prop: the property name to search for.
+ *
*Use property name to get a CRDeclaration from the declaration list.
- *@param a_this the current instance of #CRDeclaration.
- *@param a_prop the property name to search for.
- *@return CRDeclaration with property name a_prop, or NULL if not found.
+ *Returns #CRDeclaration with property name a_prop, or NULL if not found.
*/
CRDeclaration *
cr_declaration_get_by_prop_name (CRDeclaration * a_this,
@@ -675,8 +716,10 @@ cr_declaration_get_by_prop_name (CRDeclaration * a_this,
}
/**
+ * cr_declaration_ref:
+ *@a_this: the current instance of #CRDeclaration.
+ *
*Increases the ref count of the current instance of #CRDeclaration.
- *@param a_this the current instance of #CRDeclaration.
*/
void
cr_declaration_ref (CRDeclaration * a_this)
@@ -687,12 +730,15 @@ cr_declaration_ref (CRDeclaration * a_this)
}
/**
- *Decrements the ref count of the current instance of #CRDeclaration.
- *If the ref count reaches zero, the current instance of #CRDeclaration
- *if destroyed.
+ * cr_declaration_unref:
*@param a_this the current instance of #CRDeclaration.
*@return TRUE if the current instance of #CRDeclaration has been destroyed
*(ref count reached zero), FALSE otherwise.
+ *
+ *Decrements the ref count of the current instance of #CRDeclaration.
+ *If the ref count reaches zero, the current instance of #CRDeclaration
+ *if destroyed.
+ *Returns TRUE if the object got destroyed, FALSE otherwise.
*/
gboolean
cr_declaration_unref (CRDeclaration * a_this)
@@ -711,8 +757,10 @@ cr_declaration_unref (CRDeclaration * a_this)
}
/**
+ * cr_declaration_destroy:
+ *@a_this: the current instance of #CRDeclaration.
+ *
*Destructor of the declaration list.
- *@param a_this the current instance of #CRDeclaration.
*/
void
cr_declaration_destroy (CRDeclaration * a_this)
diff --git a/src/cr-doc-handler.c b/src/cr-doc-handler.c
index 2780b6a..8e2ad85 100644
--- a/src/cr-doc-handler.c
+++ b/src/cr-doc-handler.c
@@ -25,7 +25,8 @@
#include "cr-parser.h"
/**
- *@file
+ *@CRDocHandler:
+ *
*The definition of the CRDocHandler class.
*Contains methods to instantiate, destroy,
*and initialyze instances of #CRDocHandler
@@ -58,9 +59,12 @@ struct _CRDocHandlerPriv {
};
/**
+ * cr_doc_handler_new:
*Constructor of #CRDocHandler.
- *@return the newly built instance of
+ *
+ *Returns the newly built instance of
*#CRDocHandler
+ *
*/
CRDocHandler *
cr_doc_handler_new (void)
@@ -86,12 +90,14 @@ cr_doc_handler_new (void)
}
/**
- *Returns the private parsing context.
+ * cr_doc_handler_get_ctxt:
+ *@a_this: the current instance of #CRDocHandler.
+ *@a_ctxt: out parameter. The new parsing context.
+ *
+ *Gets the private parsing context associated to the document handler
*The private parsing context is used by libcroco only.
- *@param a_this the current instance of #CRDocHandler.
- *@param a_ctxt out parameter. The new parsing context.
- *@return CR_OK upon successfull completion, an error code otherwise.
- *@return the parsing context, or NULL if an error occured.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_doc_handler_get_ctxt (CRDocHandler * a_this, gpointer * a_ctxt)
@@ -104,11 +110,13 @@ cr_doc_handler_get_ctxt (CRDocHandler * a_this, gpointer * a_ctxt)
}
/**
+ * cr_doc_handler_set_ctxt:
+ *@a_this: the current instance of #CRDocHandler
+ *@a_ctxt: a pointer to the parsing context.
+ *
*Sets the private parsing context.
*This is used by libcroco only.
- *@param a_this the current instance of #CRDocHandler
- *@param a_ctxt a pointer to the parsing context.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_doc_handler_set_ctxt (CRDocHandler * a_this, gpointer a_ctxt)
@@ -119,11 +127,14 @@ cr_doc_handler_set_ctxt (CRDocHandler * a_this, gpointer a_ctxt)
}
/**
- *Returns the private parsing result.
+ * cr_doc_handler_get_result:
+ *@a_this: the current instance of #CRDocHandler
+ *@a_result: out parameter. The returned result.
+ *
+ *Gets the private parsing result.
*The private parsing result is used by libcroco only.
- *@param a_this the current instance of #CRDocHandler
- *@param a_result out parameter. The returned result.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_doc_handler_get_result (CRDocHandler * a_this, gpointer * a_result)
@@ -136,11 +147,14 @@ cr_doc_handler_get_result (CRDocHandler * a_this, gpointer * a_result)
}
/**
+ * cr_doc_handler_set_result:
+ *@a_this: the current instance of #CRDocHandler
+ *@a_result: the new result.
+ *
*Sets the private parsing context.
*This is used by libcroco only.
- *@param a_this the current instance of #CRDocHandler
- *@param a_result the new result.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_doc_handler_set_result (CRDocHandler * a_this, gpointer a_result)
@@ -151,14 +165,16 @@ cr_doc_handler_set_result (CRDocHandler * a_this, gpointer a_result)
}
/**
+ *cr_doc_handler_set_default_sac_handler:
+ *@a_this: a pointer to the current instance of #CRDocHandler.
+ *
*Sets the sac handlers contained in the current
*instance of DocHandler to the default handlers.
*For the time being the default handlers are
*test handlers. This is expected to change in a
*near future, when the libcroco gets a bit debugged.
*
- *@param a_this a pointer to the current instance of #CRDocHandler.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_doc_handler_set_default_sac_handler (CRDocHandler * a_this)
@@ -186,8 +202,8 @@ cr_doc_handler_set_default_sac_handler (CRDocHandler * a_this)
}
/**
- *Increases the reference count of the doc handler
- *@param a_this the current instance of #CRDocHandler.
+ * cr_doc_handler_ref:
+ *@a_this: the current instance of #CRDocHandler.
*/
void
cr_doc_handler_ref (CRDocHandler * a_this)
@@ -198,10 +214,13 @@ cr_doc_handler_ref (CRDocHandler * a_this)
}
/**
+ * cr_doc_handler_unref:
+ *@a_this: the currrent instance of #CRDocHandler.
+ *
*Decreases the ref count of the current instance of #CRDocHandler.
*If the ref count reaches '0' then, destroys the instance.
- *@param a_this the currrent instance of #CRDocHandler.
- *@return TRUE if the instance as been destroyed, FALSE otherwise.
+ *
+ *Returns TRUE if the instance as been destroyed, FALSE otherwise.
*/
gboolean
cr_doc_handler_unref (CRDocHandler * a_this)
@@ -220,9 +239,11 @@ cr_doc_handler_unref (CRDocHandler * a_this)
}
/**
- *The destructor of the #CRDocHandler class.
- *@param a_this the instance of #CRDocHandler to
+ * cr_doc_handler_destroy:
+ *@a_this: the instance of #CRDocHandler to
*destroy.
+ *
+ *The destructor of the #CRDocHandler class.
*/
void
cr_doc_handler_destroy (CRDocHandler * a_this)
@@ -237,9 +258,10 @@ cr_doc_handler_destroy (CRDocHandler * a_this)
}
/**
+ * cr_doc_handler_associate_a_parser:
*Associates a parser to the current document handler
- *@param a_this the current instance of document handler.
- *@param a_parser the parser to associate.
+ *@a_this: the current instance of document handler.
+ *@a_parser: the parser to associate.
*/
void
cr_doc_handler_associate_a_parser (CRDocHandler *a_this,
diff --git a/src/cr-enc-handler.c b/src/cr-enc-handler.c
index 216ca47..b3e5b7e 100644
--- a/src/cr-enc-handler.c
+++ b/src/cr-enc-handler.c
@@ -74,10 +74,13 @@ static CREncHandler gv_default_enc_handlers[] = {
};
/**
+ * cr_enc_handler_get_instance:
+ *@a_enc: the encoding of the Handler.
+ *
*Gets the instance of encoding handler.
*This function implements a singleton pattern.
- *@param a_enc the encoding of the Handler.
- *@return the instance of #CREncHandler.
+ *
+ *Returns the instance of #CREncHandler.
*/
CREncHandler *
cr_enc_handler_get_instance (enum CREncoding a_enc)
@@ -95,12 +98,15 @@ cr_enc_handler_get_instance (enum CREncoding a_enc)
}
/**
+ * cr_enc_handler_resolve_enc_alias:
+ *@a_alias_name: the encoding name.
+ *@a_enc: output param. The returned encoding type
+ *or 0 if the alias is not supported.
+ *
*Given an encoding name (called an alias name)
*the function returns the matching encoding type.
- *@param a_alias_name the encoding name
- *@param a_enc output param. The returned encoding type
- *or 0 if the alias is not supported.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_enc_handler_resolve_enc_alias (const guchar * a_alias_name,
@@ -127,16 +133,19 @@ cr_enc_handler_resolve_enc_alias (const guchar * a_alias_name,
}
/**
- *Converts a raw input buffer into an utf8 buffer.
- *@param a_this the current instance of #CREncHandler.
- *@param a_in the input buffer to convert.
- *@param a_in_len in/out parameter. The len of the input
+ * cr_enc_handler_convert_input:
+ *@a_this: the current instance of #CREncHandler.
+ *@a_in: the input buffer to convert.
+ *@a_in_len: in/out parameter. The len of the input
*buffer to convert. After return, contains the number of
*bytes actually consumed.
- *@param @a_out output parameter. The converted output buffer.
+ *@a_out: output parameter. The converted output buffer.
*Must be freed by the buffer.
- *@param a_out_len output parameter. The length of the output buffer.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *@a_out_len: output parameter. The length of the output buffer.
+ *
+ *Converts a raw input buffer into an utf8 buffer.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_enc_handler_convert_input (CREncHandler * a_this,
diff --git a/src/cr-enc-handler.h b/src/cr-enc-handler.h
index 8155833..0727764 100644
--- a/src/cr-enc-handler.h
+++ b/src/cr-enc-handler.h
@@ -79,10 +79,8 @@ CREncHandler *
cr_enc_handler_get_instance (enum CREncoding a_enc) ;
enum CRStatus
-cr_enc_handler_resolve_enc_alias (const guchar *a_en_alias,
+cr_enc_handler_resolve_enc_alias (const guchar *a_alias_name,
enum CREncoding *a_enc) ;
-void
-cr_enc_handler_destroy (CREncHandler * a_enc_hdlr) ;
enum CRStatus
cr_enc_handler_convert_input (CREncHandler *a_this,
diff --git a/src/cr-fonts.c b/src/cr-fonts.c
index 0b431fb..2b0f7e3 100644
--- a/src/cr-fonts.c
+++ b/src/cr-fonts.c
@@ -141,6 +141,15 @@ cr_relative_font_size_to_string (enum CRRelativeFontSize a_code)
return str;
}
+/**
+ * cr_font_family_new:
+ * @a_type: the type of font family to create.
+ * @a_name: the name of the font family:
+ *
+ * create a font family.
+ *
+ * Returns the newly built font family.
+ */
CRFontFamily *
cr_font_family_new (enum CRFontFamilyType a_type, guchar * a_name)
{
@@ -161,6 +170,14 @@ cr_font_family_new (enum CRFontFamilyType a_type, guchar * a_name)
return result;
}
+/**
+ * cr_font_family_to_string:
+ * @a_this: the current instance of #CRFontFamily.
+ * @a_walk_font_family_list: wether the serialize the entire list.
+ *
+ * Returns the seriliazed font family. The caller has to free it using
+ * g_free().
+ */
guchar *
cr_font_family_to_string (CRFontFamily * a_this,
gboolean a_walk_font_family_list)
@@ -192,6 +209,14 @@ cr_font_family_to_string (CRFontFamily * a_this,
return result;
}
+
+/**
+ * cr_font_family_set_name:
+ * @a_this: the current instance of #CRFontFamily.
+ * @a_name: the new name
+ *
+ * Returns CR_OK upon sucessful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_family_set_name (CRFontFamily * a_this, guchar * a_name)
{
@@ -214,6 +239,13 @@ cr_font_family_set_name (CRFontFamily * a_this, guchar * a_name)
return CR_OK;
}
+/**
+ * cr_font_family_append:
+ * @a_this: the current instance of #CRFontFamily.
+ * @a_family_to_append: the font family to append to the list
+ *
+ * Returns the new font family list.
+ */
CRFontFamily *
cr_font_family_append (CRFontFamily * a_this,
CRFontFamily * a_family_to_append)
@@ -234,6 +266,13 @@ cr_font_family_append (CRFontFamily * a_this,
}
+/**
+ * cr_font_family_prepend:
+ * @a_this: the current instance #CRFontFamily.
+ * @a_family_to_prepend: the font family to prepend to the list.
+ *
+ * Returns the font family list.
+ */
CRFontFamily *
cr_font_family_prepend (CRFontFamily * a_this,
CRFontFamily * a_family_to_prepend)
@@ -249,6 +288,12 @@ cr_font_family_prepend (CRFontFamily * a_this,
return CR_OK;
}
+/**
+ * cr_font_family_destroy:
+ * @a_this: the current instance of #CRFontFamily.
+ *
+ * Returns CR_OK upon sucessful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_family_destroy (CRFontFamily * a_this)
{
@@ -281,6 +326,11 @@ cr_font_family_destroy (CRFontFamily * a_this)
*'font-size' manipulation functions definitions
***************************************************/
+/**
+ * cr_font_size_new:
+ *
+ * Returns the newly created font size.
+ */
CRFontSize *
cr_font_size_new (void)
{
@@ -296,6 +346,12 @@ cr_font_size_new (void)
return result;
}
+/**
+ * cr_font_size_clear:
+ * @a_this: the current instance of #CRFontSize
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_size_clear (CRFontSize * a_this)
{
@@ -319,6 +375,13 @@ cr_font_size_clear (CRFontSize * a_this)
return CR_OK;
}
+/**
+ * cr_font_size_copy:
+ * @a_dst: the destination #CRFontSize (where to copy to).
+ * @a_src: the source #CRFontSize (where to copy from).
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_size_copy (CRFontSize * a_dst, CRFontSize * a_src)
{
@@ -345,6 +408,13 @@ cr_font_size_copy (CRFontSize * a_dst, CRFontSize * a_src)
return CR_OK;
}
+/**
+ * cr_font_size_set_predefined_absolute_font_size:
+ * @a_this: the current instance of #CRFontSize.
+ * @a_predefined: what to set.
+ *
+ * Returns CR_OK upon sucessful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_size_set_predefined_absolute_font_size (CRFontSize *a_this,
enum CRPredefinedAbsoluteFontSize a_predefined)
@@ -360,6 +430,13 @@ cr_font_size_set_predefined_absolute_font_size (CRFontSize *a_this,
return CR_OK ;
}
+/**
+ * cr_font_size_set_relative_font_size:
+ * @a_this: the current instance of #CRFontSize
+ * @a_relative: the new relative font size
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_size_set_relative_font_size (CRFontSize *a_this,
enum CRRelativeFontSize a_relative)
@@ -374,6 +451,14 @@ cr_font_size_set_relative_font_size (CRFontSize *a_this,
return CR_OK ;
}
+/**
+ * cr_font_size_set_absolute_font_size:
+ * @a_this: the current instance of #CRFontSize
+ * @a_num_type: the type of number to set.
+ * @a_value: the actual value to set.
+ *
+ * Returns CR_OK upon succesful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_size_set_absolute_font_size (CRFontSize *a_this,
enum CRNumType a_num_type,
@@ -390,6 +475,12 @@ cr_font_size_set_absolute_font_size (CRFontSize *a_this,
return CR_OK ;
}
+/**
+ * cr_font_size_set_to_inherit:
+ * @a_this: the current instance of #CRFontSize
+ *
+ * Returns CR_OK upon succesful completion, an error code otherwise.
+ */
enum CRStatus
cr_font_size_set_to_inherit (CRFontSize *a_this)
{
@@ -401,6 +492,12 @@ cr_font_size_set_to_inherit (CRFontSize *a_this)
return CR_OK ;
}
+/**
+ * cr_font_size_is_set_to_inherit:
+ * @a_this: the current instance of #CRFontSize.
+ *
+ * Returns TRUE if the current instance is set to 'inherit'.
+ */
gboolean
cr_font_size_is_set_to_inherit (CRFontSize *a_this)
{
@@ -409,6 +506,13 @@ cr_font_size_is_set_to_inherit (CRFontSize *a_this)
return a_this->type == INHERITED_FONT_SIZE ;
}
+/**
+ * cr_font_size_to_string:
+ * @a_this: the current instance of #CRFontSize
+ *
+ * Returns the serialized form of #CRFontSize. The returned string
+ * has to bee freed using g_free().
+ */
gchar *
cr_font_size_to_string (CRFontSize * a_this)
{
@@ -440,9 +544,15 @@ cr_font_size_to_string (CRFontSize * a_this)
return str;
}
+/**
+ * cr_font_size_get_smaller_predefined:
+ * @a_font_size: the font size to consider.
+ * @a_smaller_size: out parameter. The a smaller value than @a_font_size.
+ */
void
-cr_font_size_get_smaller_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size,
- enum CRPredefinedAbsoluteFontSize *a_smaller_size)
+cr_font_size_get_smaller_predefined_font_size
+ (enum CRPredefinedAbsoluteFontSize a_font_size,
+ enum CRPredefinedAbsoluteFontSize *a_smaller_size)
{
enum CRPredefinedAbsoluteFontSize result = FONT_SIZE_MEDIUM ;
@@ -485,9 +595,17 @@ cr_font_size_get_smaller_predefined_font_size (enum CRPredefinedAbsoluteFontSize
}
+/**
+ * cr_font_size_get_larger_predefined_font_size:
+ * @a_font_size: the font size to consider.
+ * @a_larger_size: out parameter. the font size considered larger than
+ * @a_font_size.
+ *
+ */
void
-cr_font_size_get_larger_predefined_font_size (enum CRPredefinedAbsoluteFontSize a_font_size,
- enum CRPredefinedAbsoluteFontSize *a_larger_size)
+cr_font_size_get_larger_predefined_font_size
+ (enum CRPredefinedAbsoluteFontSize a_font_size,
+ enum CRPredefinedAbsoluteFontSize *a_larger_size)
{
enum CRPredefinedAbsoluteFontSize result = FONT_SIZE_MEDIUM ;
@@ -529,8 +647,16 @@ cr_font_size_get_larger_predefined_font_size (enum CRPredefinedAbsoluteFontSize
*a_larger_size = result ;
}
+/**
+ * cr_font_size_is_predefined_absolute_font_size:
+ * @a_font_size: the font size to consider.
+ *
+ * Returns TRUE if the instance is an predefined absolute font size, FALSE
+ * otherwise.
+ */
gboolean
-cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize a_font_size)
+cr_font_size_is_predefined_absolute_font_size
+ (enum CRPredefinedAbsoluteFontSize a_font_size)
{
if (a_font_size >= FONT_SIZE_XX_SMALL
&& a_font_size < NB_PREDEFINED_ABSOLUTE_FONT_SIZES) {
@@ -540,6 +666,12 @@ cr_font_size_is_predefined_absolute_font_size (enum CRPredefinedAbsoluteFontSize
}
}
+/**
+ * cr_font_size_adjust_to_string:
+ * @a_this: the instance of #CRFontSizeAdjust.
+ *
+ * Returns the serialized form of #CRFontSizeAdjust
+ */
gchar *
cr_font_size_adjust_to_string (CRFontSizeAdjust * a_this)
{
@@ -559,7 +691,7 @@ cr_font_size_adjust_to_string (CRFontSizeAdjust * a_this)
if (a_this->num)
str = cr_num_to_string (a_this->num);
else
- str = g_strdup ("unknow font-size-adjust property value"); // Should raise an error no?
+ str = g_strdup ("unknow font-size-adjust property value"); /* Should raise an error no?*/
break;
case FONT_SIZE_ADJUST_INHERIT:
str = g_strdup ("inherit");
@@ -567,6 +699,13 @@ cr_font_size_adjust_to_string (CRFontSizeAdjust * a_this)
return str;
}
+/**
+ * cr_font_style_to_string:
+ * @a_code the current instance of #CRFontStyle
+ *
+ * Returns the serialized #CRFontStyle. The caller must free the returned
+ * string using g_free().
+ */
const gchar *
cr_font_style_to_string (enum CRFontStyle a_code)
{
@@ -592,6 +731,13 @@ cr_font_style_to_string (enum CRFontStyle a_code)
return str;
}
+/**
+ * cr_font_variant_to_string:
+ * @a_code: the current instance of #CRFontVariant.
+ *
+ * Returns the serialized form of #CRFontVariant. The caller has
+ * to free the returned string using g_free().
+ */
const gchar *
cr_font_variant_to_string (enum CRFontVariant a_code)
{
@@ -611,6 +757,12 @@ cr_font_variant_to_string (enum CRFontVariant a_code)
return str;
}
+/**
+ * cr_font_weight_get_bolder:
+ * @a_weight: the #CRFontWeight to consider.
+ *
+ * Returns a font weight bolder than @a_weight
+ */
enum CRFontWeight
cr_font_weight_get_bolder (enum CRFontWeight a_weight)
{
@@ -627,6 +779,12 @@ cr_font_weight_get_bolder (enum CRFontWeight a_weight)
}
}
+/**
+ * cr_font_weight_to_string:
+ * @a_code: the font weight to consider.
+ *
+ * Returns the serialized form of #CRFontWeight.
+ */
const gchar *
cr_font_weight_to_string (enum CRFontWeight a_code)
{
@@ -682,6 +840,12 @@ cr_font_weight_to_string (enum CRFontWeight a_code)
return str;
}
+/**
+ * cr_font_stretch_to_string:
+ * @a_code: the instance of #CRFontStretch to consider.
+ *
+ * Returns the serialized form of #CRFontStretch.
+ */
const gchar *
cr_font_stretch_to_string (enum CRFontStretch a_code)
{
@@ -728,6 +892,11 @@ cr_font_stretch_to_string (enum CRFontStretch a_code)
return str;
}
+/**
+ * cr_font_size_destroy:
+ * @a_font_size: the font size to destroy
+ *
+ */
void
cr_font_size_destroy (CRFontSize * a_font_size)
{
@@ -740,6 +909,11 @@ cr_font_size_destroy (CRFontSize * a_font_size)
*'font-size-adjust' manipulation function definition
*******************************************************/
+/**
+ * cr_font_size_adjust_new:
+ *
+ * Returns a newly built instance of #CRFontSizeAdjust
+ */
CRFontSizeAdjust *
cr_font_size_adjust_new (void)
{
@@ -755,6 +929,11 @@ cr_font_size_adjust_new (void)
return result;
}
+/**
+ * cr_font_size_adjust_destroy:
+ * @a_this: the current instance of #CRFontSizeAdjust.
+ *
+ */
void
cr_font_size_adjust_destroy (CRFontSizeAdjust * a_this)
{
diff --git a/src/cr-input.c b/src/cr-input.c
index 9485df3..242a185 100644
--- a/src/cr-input.c
+++ b/src/cr-input.c
@@ -27,7 +27,8 @@
#include "cr-enc-handler.h"
/**
- *@file
+ *@CRInput:
+ *
*The definition of the #CRInput class.
*/
@@ -112,15 +113,17 @@ cr_input_new_real (void)
***************/
/**
- *Creates a new input stream from a memory buffer.
- *@param a_buf the memory buffer to create the input stream from.
+ * cr_input_new_from_buf:
+ *@a_buf: the memory buffer to create the input stream from.
*The #CRInput keeps this pointer so user should not free it !.
- *@param a_len the size of the input buffer.
- *@param a_enc the buffer's encoding.
- *@param a_free_buf if set to TRUE, this a_buf will be freed
+ *@a_len: the size of the input buffer.
+ *@a_enc: the buffer's encoding.
+ *@a_free_buf: if set to TRUE, this a_buf will be freed
*at the destruction of this instance. If set to false, it is up
*to the caller to free it.
- *@return the newly built instance of #CRInput.
+ *
+ *Creates a new input stream from a memory buffer.
+ *Returns the newly built instance of #CRInput.
*/
CRInput *
cr_input_new_from_buf (guchar * a_buf,
@@ -177,13 +180,14 @@ cr_input_new_from_buf (guchar * a_buf,
}
/**
+ * cr_input_new_from_uri:
+ *@a_file_uri: the file to create *the input stream from.
+ *@a_enc: the encoding of the file *to create the input from.
+ *
*Creates a new input stream from
*a file.
- *@param a_file_uri the file to create
- *the input stream from.
- *@param a_enc the encoding of the file
- *to create the input from
- *@return the newly created input stream if
+ *
+ *Returns the newly created input stream if
*this method could read the file and create it,
*NULL otherwise.
*/
@@ -270,8 +274,10 @@ cr_input_new_from_uri (const gchar * a_file_uri, enum CREncoding a_enc)
}
/**
+ * cr_input_destroy:
+ *@a_this: the current instance of #CRInput.
+ *
*The destructor of the #CRInput class.
- *@param a_this the current instance of #CRInput.
*/
void
cr_input_destroy (CRInput * a_this)
@@ -293,9 +299,11 @@ cr_input_destroy (CRInput * a_this)
}
/**
+ * cr_input_ref:
+ *@a_this: the current instance of #CRInput.
+ *
*Increments the reference count of the current
*instance of #CRInput.
- *@param a_this the current instance of #CRInput.
*/
void
cr_input_ref (CRInput * a_this)
@@ -306,11 +314,14 @@ cr_input_ref (CRInput * a_this)
}
/**
+ * cr_input_unref:
+ *@a_this: the current instance of #CRInput.
+ *
*Decrements the reference count of this instance
*of #CRInput. If the reference count goes down to
*zero, this instance is destroyed.
- *@param a_this the current instance of #CRInput.
*
+ * Returns TRUE if the instance of #CRInput got destroyed, false otherwise.
*/
gboolean
cr_input_unref (CRInput * a_this)
@@ -329,15 +340,18 @@ cr_input_unref (CRInput * a_this)
}
/**
- *Tests wether the current instance of
- *#CRInput has reached its input buffer.
- *@param a_this the current instance of #CRInput.
- *@param a_end_of_input out parameter. Is set to TRUE if
+ * cr_input_end_of_input:
+ *@a_this: the current instance of #CRInput.
+ *@a_end_of_input: out parameter. Is set to TRUE if
*the current instance has reached the end of its input buffer,
*FALSE otherwise.
- *@param CR_OK upon successful completion, an error code otherwise.
- *Note that all the out parameters of this method are valid if
- *and only if this method returns CR_OK.
+ *
+ *Tests wether the current instance of
+ *#CRInput has reached its input buffer.
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
+ * Note that all the out parameters of this method are valid if
+ * and only if this method returns CR_OK.
*/
enum CRStatus
cr_input_end_of_input (CRInput * a_this, gboolean * a_end_of_input)
@@ -352,10 +366,11 @@ cr_input_end_of_input (CRInput * a_this, gboolean * a_end_of_input)
}
/**
+ * cr_input_get_nb_bytes_left:
+ *@a_this: the current instance of #CRInput.
+ *
*Returns the number of bytes left in the input stream
- *before the end.
- *@param a_this the current instance of #CRInput.
- *@return the number of characters left or -1 in case of error.
+ *before the end, -1 in case of error.
*/
glong
cr_input_get_nb_bytes_left (CRInput * a_this)
@@ -373,14 +388,16 @@ cr_input_get_nb_bytes_left (CRInput * a_this)
}
/**
- *Returns the next byte of the input.
- *Update the state of the input so that
+ * cr_input_read_byte:
+ *@a_this: the current instance of #CRInput.
+ *@a_byte: out parameter the returned byte.
+ *
+ *Gets the next byte of the input.
+ *Updates the state of the input so that
*the next invocation of this method returns
*the next coming byte.
*
- *@param a_this the current instance of #CRInput.
- *@param a_byte out parameter the returned byte.
- *@return CR_OK upon successful completion, an error code
+ *Returns CR_OK upon successful completion, an error code
*otherwise. All the out parameters of this method are valid if
*and only if this method returns CR_OK.
*/
@@ -409,11 +426,14 @@ cr_input_read_byte (CRInput * a_this, guchar * a_byte)
}
/**
+ * cr_input_read_char:
+ *@a_this: the current instance of CRInput.
+ *@a_char: out parameter. The read character.
+ *
*Reads an unicode character from the current instance of
*#CRInput.
- *@param a_this the current instance of CRInput.
- *@param a_char out parameter. The read character.
- *@return CR_OK upon successful completion, an error code
+ *
+ *Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -464,11 +484,13 @@ cr_input_read_char (CRInput * a_this, guint32 * a_char)
}
/**
+ * cr_input_set_line_num:
+ *@a_this: the "this pointer" of the current instance of #CRInput.
+ *@a_line_num: the new line number.
+ *
*Setter of the current line number.
- *@param a_this the "this pointer" of the current instance of
- *#CRInput.
- *@param a_line_num the new line number.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Return CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_set_line_num (CRInput * a_this, glong a_line_num)
@@ -481,11 +503,13 @@ cr_input_set_line_num (CRInput * a_this, glong a_line_num)
}
/**
+ * cr_input_get_line_num:
+ *@a_this: the "this pointer" of the current instance of #CRInput.
+ *@a_line_num: the returned line number.
+ *
*Getter of the current line number.
- *@param a_this the "this pointer" of the current instance of
- *#CRInput.
- *@param a_line_num the returned line number.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_get_line_num (CRInput * a_this, glong * a_line_num)
@@ -499,11 +523,13 @@ cr_input_get_line_num (CRInput * a_this, glong * a_line_num)
}
/**
+ * cr_input_set_column_num:
+ *@a_this: the "this pointer" of the current instance of #CRInput.
+ *@a_col: the new column number.
+ *
*Setter of the current column number.
- *@param a_this the "this pointer" of the current instance of
- *#CRInput.
- *@param a_col the new column number.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_set_column_num (CRInput * a_this, glong a_col)
@@ -516,11 +542,13 @@ cr_input_set_column_num (CRInput * a_this, glong a_col)
}
/**
+ * cr_input_get_column_num:
+ *@a_this: the "this pointer" of the current instance of #CRInput.
+ *@a_col: out parameter
+ *
*Getter of the current column number.
- *@param a_this the "this pointer" of the current instance of
- *#CRInput.
- *@param a_col out parameter
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_get_column_num (CRInput * a_this, glong * a_col)
@@ -534,10 +562,13 @@ cr_input_get_column_num (CRInput * a_this, glong * a_col)
}
/**
+ * cr_input_increment_line_num:
+ *@a_this: the "this pointer" of the current instance of #CRInput.
+ *@a_increment: the increment to add to the line number.
+ *
*Increments the current line number.
- *@param a_this the "this pointer" of the current instance of
- *#CRInput.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_increment_line_num (CRInput * a_this, glong a_increment)
@@ -550,10 +581,13 @@ cr_input_increment_line_num (CRInput * a_this, glong a_increment)
}
/**
+ * cr_input_increment_col_num:
+ *@a_this: the "this pointer" of the current instance of #CRInput.
+ *@a_increment: the increment to add to the column number.
+ *
*Increments the current column number.
- *@param a_this the "this pointer" of the current instance of
- *#CRInput.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_increment_col_num (CRInput * a_this, glong a_increment)
@@ -566,13 +600,15 @@ cr_input_increment_col_num (CRInput * a_this, glong a_increment)
}
/**
+ * cr_input_consume_char:
+ *@a_this: the this pointer.
+ *@a_char: the character to consume. If set to zero,
+ *consumes any character.
+ *
*Consumes the next character of the input stream if
*and only if that character equals a_char.
*
- *@param a_this the this pointer.
- *@param a_char the character to consume. If set to zero,
- *consumes any character.
- *@return CR_OK upon successful completion, CR_PARSING_ERROR if
+ *Returns CR_OK upon successful completion, CR_PARSING_ERROR if
*next char is different from a_char, an other error code otherwise
*/
enum CRStatus
@@ -597,21 +633,23 @@ cr_input_consume_char (CRInput * a_this, guint32 a_char)
}
/**
+ * cr_input_consume_chars:
+ *@a_this: the this pointer of the current instance of #CRInput.
+ *@a_char: the character to consume.
+ *@a_nb_char: in/out parameter. The number of characters to consume.
+ *If set to a negative value, the function will consume all the occurences
+ *of a_char found.
+ *After return, if the return value equals CR_OK, this variable contains
+ *the number of characters actually consumed.
+ *
*Consumes up to a_nb_char occurences of the next contiguous characters
*which equal a_char. Note that the next character of the input stream
**MUST* equal a_char to trigger the consumption, or else, the error
*code CR_PARSING_ERROR is returned.
*If the number of contiguous characters that equals a_char is less than
*a_nb_char, then this function consumes all the characters it can consume.
- *
- *@param a_this the this pointer of the current instance of #CRInput.
- *@param a_char the character to consume.
- *@param a_nb_char in/out parameter. The number of characters to consume.
- *If set to a negative value, the function will consume all the occurences
- *of a_char found.
- *After return, if the return value equals CR_OK, this variable contains
- *the number of characters actually consumed.
- *@return CR_OK if at least one character has been consumed, an error code
+ *
+ *Returns CR_OK if at least one character has been consumed, an error code
*otherwise.
*/
enum CRStatus
@@ -645,13 +683,15 @@ cr_input_consume_chars (CRInput * a_this, guint32 a_char, gulong * a_nb_char)
}
/**
+ * cr_input_consume_white_spaces:
+ *@a_this: the "this pointer" of the current instance of #CRInput.
+ *@a_nb_chars: in/out parameter. The number of white spaces to
+ *consume. After return, holds the number of white spaces actually consumed.
+ *
*Same as cr_input_consume_chars() but this one consumes white
*spaces.
*
- *@param a_this the "this pointer" of the current instance of #CRInput.
- *@param a_nb_chars in/out parameter. The number of white spaces to
- *consume. After return, holds the number of white spaces actually consumed.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_consume_white_spaces (CRInput * a_this, gulong * a_nb_chars)
@@ -690,13 +730,16 @@ cr_input_consume_white_spaces (CRInput * a_this, gulong * a_nb_chars)
}
/**
+ * cr_input_peek_char:
+ *@a_this: the current instance of #CRInput.
+ *@a_char: out parameter. The returned character.
+ *
*Same as cr_input_read_char() but does not update the
*internal state of the input stream. The next call
*to cr_input_peek_char() or cr_input_read_char() will thus
*return the same character as the current one.
- *@param a_this the current instance of #CRInput.
- *@param a_char out parameter. The returned character.
- *@return CR_OK upon successful completion, an error code
+ *
+ *Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -729,6 +772,14 @@ cr_input_peek_char (CRInput * a_this, guint32 * a_char)
}
/**
+ * cr_input_peek_byte:
+ *@a_this: the current instance of #CRInput.
+ *@a_origin: the origin to consider in the calculation
+ *of the position of the byte to peek.
+ *@a_offset: the offset of the byte to peek, starting from
+ *the origin specified by a_origin.
+ *@a_byte: out parameter the peeked byte.
+ *
*Gets a byte from the input stream,
*starting from the current position in the input stream.
*Unlike cr_input_peek_next_byte() this method
@@ -736,18 +787,9 @@ cr_input_peek_char (CRInput * a_this, guint32 * a_char)
*Subsequent calls to cr_input_peek_byte with the same arguments
*will return the same byte.
*
- *@param a_this the current instance of #CRInput.
- *@param a_origin the origin to consider in the calculation
- *of the position of the byte to peek.
- *@param a_offset the offset of the byte to peek, starting from
- *the origin specified by a_origin.
- *@param a_byte out parameter the peeked byte.
- *@return CR_OK upon successful completion or,
- *
- *<ul>
- *<li>CR_BAD_PARAM_ERROR if at least one of the parameters is invalid</li>
- *<li>CR_OUT_OF_BOUNDS_ERROR if the indexed byte is out of bounds</li>
- *</ul>
+ *Returns CR_OK upon successful completion or,
+ *CR_BAD_PARAM_ERROR if at least one of the parameters is invalid;
+ *CR_OUT_OF_BOUNDS_ERROR if the indexed byte is out of bounds.
*/
enum CRStatus
cr_input_peek_byte (CRInput * a_this, enum CRSeekPos a_origin,
@@ -788,15 +830,18 @@ cr_input_peek_byte (CRInput * a_this, enum CRSeekPos a_origin,
}
/**
- *Same as cr_input_peek_byte() but with a simplified
- *interface.
- *@param a_this the current byte input stream.
- *@param a_offset the offset of the byte to peek, starting
+ * cr_input_peek_byte2:
+ *@a_this: the current byte input stream.
+ *@a_offset: the offset of the byte to peek, starting
*from the current input position pointer.
- *@param a_eof out parameter. Is set to true is we reach end of
+ *@a_eof: out parameter. Is set to true is we reach end of
*stream. If set to NULL by the caller, this parameter is not taken
*in account.
- *@return the read byte or 0 if something bad happened.
+ *
+ *Same as cr_input_peek_byte() but with a simplified
+ *interface.
+ *
+ *Returns the read byte or 0 if something bad happened.
*/
guchar
cr_input_peek_byte2 (CRInput * a_this, gulong a_offset, gboolean * a_eof)
@@ -819,12 +864,15 @@ cr_input_peek_byte2 (CRInput * a_this, gulong a_offset, gboolean * a_eof)
}
/**
- *Returns the memory address of the byte located at a given offset
- *in the input stream.
- *@param a_this the current instance of #CRInput.
- *@param a_offset the offset of the byte in the input stream starting
+ * cr_input_get_byte_addr:
+ *@a_this: the current instance of #CRInput.
+ *@a_offset: the offset of the byte in the input stream starting
*from the beginning of the stream.
- *@return the address, otherwise NULL if an error occured.
+ *
+ *Gets the memory address of the byte located at a given offset
+ *in the input stream.
+ *
+ *Returns the address, otherwise NULL if an error occured.
*/
guchar *
cr_input_get_byte_addr (CRInput * a_this, gulong a_offset)
@@ -839,10 +887,13 @@ cr_input_get_byte_addr (CRInput * a_this, gulong a_offset)
}
/**
- *Returns the address of the current character pointer.
- *@param a_this the current input stream
- *@param a_offset out parameter. The returned address.
- *@return CR_OK upon successful completion, an error code otherwise.
+ * cr_input_get_cur_byte_addr:
+ *@a_this: the current input stream
+ *@a_offset: out parameter. The returned address.
+ *
+ *Gets the address of the current character pointer.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_get_cur_byte_addr (CRInput * a_this, guchar ** a_offset)
@@ -861,23 +912,20 @@ cr_input_get_cur_byte_addr (CRInput * a_this, guchar ** a_offset)
}
/**
+ * cr_input_seek_index:
+ *@a_this: the current instance of #CRInput.
+ *@a_origin: the origin to consider during the calculation
+ *of the absolute position of the new "current byte index".
+ *@a_pos: the relative offset of the new "current byte index."
+ *This offset is relative to the origin a_origin.
+ *
*Sets the "current byte index" of the current instance
*of #CRInput. Next call to cr_input_get_byte() will return
*the byte next after the new "current byte index".
*
- *@param a_this the current instance of #CRInput.
- *
- *@param a_origin the origin to consider during the calculation
- *of the absolute position of the new "current byte index".
- *
- *@param a_pos the relative offset of the new "current byte index."
- *This offset is relative to the origin a_origin.
- *
- *@return CR_OK upon successful completion otherwise returns
- *<ul>
- *<li>CR_BAD_PARAM_ERROR if at least one of the parameters is not valid</li>
- *<li>CR_OUT_BOUNDS_ERROR</li>
- *</ul>
+ *Returns CR_OK upon successful completion otherwise returns
+ *CR_BAD_PARAM_ERROR if at least one of the parameters is not valid
+ *or CR_OUT_BOUNDS_ERROR in case of error.
*/
enum CRStatus
cr_input_seek_index (CRInput * a_this, enum CRSeekPos a_origin, gint a_pos)
@@ -918,21 +966,19 @@ cr_input_seek_index (CRInput * a_this, enum CRSeekPos a_origin, gint a_pos)
}
/**
+ * cr_input_get_cur_pos:
+ *@a_this: the current instance of #CRInput.
+ *@a_pos: out parameter. The returned position.
+ *
*Gets the position of the "current byte index" which
*is basically the position of the last returned byte in the
*input stream.
*
- *@param a_this the current instance of #CRInput.
- *
- *@param a_pos out parameter. The returned position.
- *
- *@return CR_OK upon successful completion. Otherwise,
- *<ul>
- *<li>CR_BAD_PARAMETER_ERROR if at least one of the arguments is invalid.</li>
- *<li>CR_START_OF_INPUT if no call to either cr_input_read_byte()
+ *Returns CR_OK upon successful completion. Otherwise,
+ *CR_BAD_PARAMETER_ERROR if at least one of the arguments is invalid.
+ *CR_START_OF_INPUT if no call to either cr_input_read_byte()
*or cr_input_seek_index() have been issued before calling
- *cr_input_get_cur_pos()</li>
- *</ul>
+ *cr_input_get_cur_pos()
*Note that the out parameters of this function are valid if and only if this
*function returns CR_OK.
*/
@@ -952,13 +998,16 @@ cr_input_get_cur_pos (CRInput * a_this, CRInputPos * a_pos)
}
/**
+ * cr_input_get_parsing_location:
+ *@a_this: the current instance of #CRInput
+ *@a_loc: the set parsing location.
+ *
*Gets the current parsing location.
*The Parsing location is a public datastructure that
*represents the current line/column/byte offset/ in the input
*stream.
- *@param a_this the current instance of #CRInput
- *@param a_loc the set parsing location.
- *@return CR_OK upon successful completion, an error
+ *
+ *Returns CR_OK upon successful completion, an error
*code otherwise.
*/
enum CRStatus
@@ -981,13 +1030,16 @@ cr_input_get_parsing_location (CRInput *a_this,
}
/**
+ * cr_input_get_cur_index:
+ *@a_this: the "this pointer" of the current instance of
+ *#CRInput
+ *@a_index: out parameter. The returned index.
+ *
*Getter of the next byte index.
*It actually returns the index of the
*next byte to be read.
- *@param a_this the "this pointer" of the current instance of
- *#CRInput
- *@param a_index out parameter. The returned index.
- *@return CR_OK upon successful completion, an error code
+ *
+ *Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -1002,12 +1054,15 @@ cr_input_get_cur_index (CRInput * a_this, glong * a_index)
}
/**
+ * cr_input_set_cur_index:
+ *@a_this: the "this pointer" of the current instance
+ *of #CRInput .
+ *@a_index: the new index to set.
+ *
*Setter of the next byte index.
*It sets the index of the next byte to be read.
- *@param a_this the "this pointer" of the current instance
- *of #CRInput .
- *@param a_index the new index to set.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_set_cur_index (CRInput * a_this, glong a_index)
@@ -1020,10 +1075,13 @@ cr_input_set_cur_index (CRInput * a_this, glong a_index)
}
/**
+ * cr_input_set_end_of_file:
+ *@a_this: the current instance of #CRInput.
+ *@a_eof: the new end of file flag.
+ *
*Sets the end of file flag.
- *@param a_this the current instance of #CRInput.
- *@param a_eof the new end of file flag.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_set_end_of_file (CRInput * a_this, gboolean a_eof)
@@ -1036,11 +1094,14 @@ cr_input_set_end_of_file (CRInput * a_this, gboolean a_eof)
}
/**
- *Gets the end of file flag.
- *@param a_this the current instance of #CRInput.
- *@param a_eof out parameter the place to put the end of
+ * cr_input_get_end_of_file:
+ *@a_this: the current instance of #CRInput.
+ *@a_eof: out parameter the place to put the end of
*file flag.
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Gets the end of file flag.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_get_end_of_file (CRInput * a_this, gboolean * a_eof)
@@ -1054,10 +1115,13 @@ cr_input_get_end_of_file (CRInput * a_this, gboolean * a_eof)
}
/**
+ * cr_input_set_end_of_line:
+ *@a_this: the current instance of #CRInput.
+ *@a_eol: the new end of line flag.
+ *
*Sets the end of line flag.
- *@param a_this the current instance of #CRInput.
- *@param a_eol the new end of line flag.
- *@return CR_OK upon successful completion, an error code
+ *
+ *Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -1071,11 +1135,14 @@ cr_input_set_end_of_line (CRInput * a_this, gboolean a_eol)
}
/**
- *Gets the end of line flag of the current input.
- *@param a_this the current instance of #CRInput
- *@param a_eol out parameter. The place to put
+ * cr_input_get_end_of_line:
+ *@a_this: the current instance of #CRInput
+ *@a_eol: out parameter. The place to put
*the returned flag
- *@return CR_OK upon successful completion, an error code
+ *
+ *Gets the end of line flag of the current input.
+ *
+ *Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -1090,11 +1157,14 @@ cr_input_get_end_of_line (CRInput * a_this, gboolean * a_eol)
}
/**
+ * cr_input_set_cur_pos:
+ *@a_this: the "this pointer" of the current instance of
+ *#CRInput.
+ *@a_pos: the new position.
+ *
*Sets the current position in the input stream.
*
- *@param a_this the "this pointer" of the current instance of
- *#CRInput.
- *@param a_pos the new position.
+ * Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_input_set_cur_pos (CRInput * a_this, CRInputPos * a_pos)
diff --git a/src/cr-num.c b/src/cr-num.c
index d95be07..cce30ff 100644
--- a/src/cr-num.c
+++ b/src/cr-num.c
@@ -23,7 +23,8 @@
*/
/**
- *@file
+ *@CRNum:
+ *
*The definition
*of the #CRNum class.
*/
@@ -32,9 +33,11 @@
#include "string.h"
/**
- *The default constructor of
+ * cr_num_new:
+ *
*#CRNum.
- *@return the newly built instance of
+ *
+ *Returns the newly built instance of
*#CRNum.
*/
CRNum *
@@ -55,16 +58,14 @@ cr_num_new (void)
}
/**
- *A constructor of #CRNum.
- *@param a_is_natural indicates whether the intance of #CRNum is
- *a natural number or not.
- *@param a_integer_part the integer part of the instance
- *of #CRNum
- *@param a_decimal_part in case the instance of #CRNum
- *natural number (but a decimal one) this parameter
- *is the decimal part of the instance of #CRNum.
- *@return the newly built instance of #CRNum or
- *NULL if an error arises.
+ * cr_num_new_with_val:
+ * @a_val: the numerical value of the number.
+ * @a_type: the type of number.
+ *
+ * A constructor of #CRNum.
+ *
+ * Returns the newly built instance of #CRNum or
+ * NULL if an error arises.
*/
CRNum *
cr_num_new_with_val (gdouble a_val, enum CRNumType a_type)
@@ -82,10 +83,10 @@ cr_num_new_with_val (gdouble a_val, enum CRNumType a_type)
}
/**
- *Returns the string representation of the
- *current instance of #CRNum.
- *@param a_this the current instance of #CRNum.
- *@return the newly built string representation
+ * cr_num_to_string:
+ *@a_this: the current instance of #CRNum.
+ *
+ *Returns the newly built string representation
*of the current instance of #CRNum. The returned
*string is NULL terminated. The caller *must*
*free the returned string.
@@ -200,12 +201,15 @@ cr_num_to_string (CRNum * a_this)
}
/**
- *Copies an instance of #CRNum.
- *@param a_src the instance of #CRNum to copy.
+ * cr_num_copy:
+ *@a_src: the instance of #CRNum to copy.
*Must be non NULL.
- *@param a_dst the destination of the copy.
+ *@a_dest: the destination of the copy.
*Must be non NULL
- *@return CR_OK upon successful completion, an
+ *
+ *Copies an instance of #CRNum.
+ *
+ *Returns CR_OK upon successful completion, an
*error code otherwise.
*/
enum CRStatus
@@ -219,9 +223,12 @@ cr_num_copy (CRNum * a_dest, CRNum * a_src)
}
/**
+ * cr_num_dup:
+ *@a_this: the instance of #CRNum to duplicate.
+ *
*Duplicates an instance of #CRNum
- *@param a_this the instance of #CRNum to duplicate.
- *@return the newly created (duplicated) instance of #CRNum.
+ *
+ *Returns the newly created (duplicated) instance of #CRNum.
*Must be freed by cr_num_destroy().
*/
CRNum *
@@ -242,11 +249,14 @@ cr_num_dup (CRNum * a_this)
}
/**
+ * cr_num_set:
*Sets an instance of #CRNum.
- *@param a_this the current instance of #CRNum to be set.
- *@param a_val the new numerical value to be hold by the current
+ *@a_this: the current instance of #CRNum to be set.
+ *@a_val: the new numerical value to be hold by the current
*instance of #CRNum
- *@param a_type the new type of #CRNum.
+ *@a_type: the new type of #CRNum.
+ *
+ * Returns CR_OK upon succesful completion, an error code otherwise.
*/
enum CRStatus
cr_num_set (CRNum * a_this, gdouble a_val, enum CRNumType a_type)
@@ -260,11 +270,15 @@ cr_num_set (CRNum * a_this, gdouble a_val, enum CRNumType a_type)
}
/**
+ * cr_num_is_fixed_length:
+ * @a_this: the current instance of #CRNum .
+ *
*Tests if the current instance of #CRNum is a fixed
*length value or not. Typically a fixed length value
*is anything from NUM_LENGTH_EM to NUM_LENGTH_PC.
*See the definition of #CRNumType to see what we mean.
- *@return TRUE if the instance of #CRNum is a fixed length number,
+ *
+ *Returns TRUE if the instance of #CRNum is a fixed length number,
*FALSE otherwise.
*/
gboolean
@@ -282,9 +296,11 @@ cr_num_is_fixed_length (CRNum * a_this)
}
/**
- *The destructor of #CRNum.
- *@param a_this the this pointer of
+ * cr_num_destroy:
+ *@a_this: the this pointer of
*the current instance of #CRNum.
+ *
+ *The destructor of #CRNum.
*/
void
cr_num_destroy (CRNum * a_this)
diff --git a/src/cr-om-parser.c b/src/cr-om-parser.c
index b672499..a62e98d 100644
--- a/src/cr-om-parser.c
+++ b/src/cr-om-parser.c
@@ -26,7 +26,8 @@
#include "cr-om-parser.h"
/**
- *@file
+ *@CROMParser:
+ *
*The definition of the CSS Object Model Parser.
*This parser uses (and sits) the SAC api of libcroco defined
*in cr-parser.h and cr-doc-handler.h
@@ -761,9 +762,11 @@ unrecoverable_error (CRDocHandler * a_this)
********************************************/
/**
+ * cr_om_parser_new:
+ *@a_input: the input stream.
+ *
*Constructor of the CROMParser.
- *@param a_input the input stream.
- *@return the newly built instance of #CROMParser.
+ *Returns the newly built instance of #CROMParser.
*/
CROMParser *
cr_om_parser_new (CRInput * a_input)
@@ -813,13 +816,16 @@ cr_om_parser_new (CRInput * a_input)
}
/**
+ * cr_om_parser_parse_buf:
+ *@a_this: the current instance of #CROMParser.
+ *@a_buf: the in memory buffer to parse.
+ *@a_len: the length of the in memory buffer in number of bytes.
+ *@a_enc: the encoding of the in memory buffer.
+ *@a_result: out parameter the resulting style sheet
+ *
*Parses the content of an in memory buffer.
- *@param a_this the current instance of #CROMParser.
- *@param a_buf the in memory buffer to parse.
- *@param a_len the length of the in memory buffer in number of bytes.
- *@param a_enc the encoding of the in memory buffer.
- *@param a_result out parameter the resulting style sheet
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_om_parser_parse_buf (CROMParser * a_this,
@@ -860,12 +866,15 @@ cr_om_parser_parse_buf (CROMParser * a_this,
}
/**
+ * cr_om_parser_simply_parse_buf:
+ *@a_buf: the css2 in memory buffer.
+ *@a_len: the length of the in memory buffer.
+ *@a_enc: the encoding of the in memory buffer.
+ *@a_result: out parameter. The resulting css2 style sheet.
+ *
*The simpler way to parse an in memory css2 buffer.
- *@param a_buf the css2 in memory buffer.
- *@param a_len the length of the in memory buffer.
- *@param a_enc the encoding of the in memory buffer.
- *@param a_result out parameter. The resulting css2 style sheet.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_om_parser_simply_parse_buf (const guchar * a_buf,
@@ -895,16 +904,18 @@ cr_om_parser_simply_parse_buf (const guchar * a_buf,
}
/**
- *Parses a css2 stylesheet contained
- *in a file.
- *@param a_this the current instance of the cssom parser.
- *@param a_file_uri the uri of the file.
+ * cr_om_parser_parse_file:
+ *@a_this: the current instance of the cssom parser.
+ *@a_file_uri: the uri of the file.
*(only local file paths are suppported so far)
- *@param a_enc the encoding of the file.
- *@param a_result out parameter. A pointer
+ *@a_enc: the encoding of the file.
+ *@a_result: out parameter. A pointer
*the build css object model.
- *@param CR_OK upon successfull completion, an error code
- *otherwise.
+ *
+ *Parses a css2 stylesheet contained
+ *in a file.
+ *
+ * Returns CR_OK upon succesful completion, an error code otherwise.
*/
enum CRStatus
cr_om_parser_parse_file (CROMParser * a_this,
@@ -944,12 +955,15 @@ cr_om_parser_parse_file (CROMParser * a_this,
}
/**
- *The simpler method to parse a css2 file.
- *@param a_file_path the css2 local file path.
- *@param a_enc the file encoding.
- *@param a_result out parameter. The returned css stylesheet.
+ * cr_om_parser_simply_parse_file:
+ *@a_file_path: the css2 local file path.
+ *@a_enc: the file encoding.
+ *@a_result: out parameter. The returned css stylesheet.
*Must be freed by the caller using cr_stylesheet_destroy.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *The simpler method to parse a css2 file.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*Note that this method uses cr_om_parser_parse_file() so both methods
*have the same return values.
*/
@@ -979,14 +993,18 @@ cr_om_parser_simply_parse_file (const guchar * a_file_path,
}
/**
- *Parses three sheets located by their paths and build a cascade
- *@param a_this the current instance of #CROMParser
- *@param a_author_path the path to the author stylesheet
- *@param a_user_path the path to the user stylesheet
- *@param a_ua_path the path to the User Agent stylesheet
- *@param a_result out parameter. The resulting cascade if the parsing
+ * cr_om_parser_parse_paths_to_cascade:
+ *@a_this: the current instance of #CROMParser
+ *@a_author_path: the path to the author stylesheet
+ *@a_user_path: the path to the user stylesheet
+ *@a_ua_path: the path to the User Agent stylesheet
+ *@a_encoding: the encoding of the sheets.
+ *@a_result: out parameter. The resulting cascade if the parsing
*was okay
- *@return CR_OK upon successful completion, an error code otherwise
+ *
+ *Parses three sheets located by their paths and build a cascade
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise
*/
enum CRStatus
cr_om_parser_parse_paths_to_cascade (CROMParser * a_this,
@@ -1006,7 +1024,7 @@ cr_om_parser_parse_paths_to_cascade (CROMParser * a_this,
g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR);
- memset (sheets, 0, sizeof (CRStyleSheet) * 3);
+ memset (sheets, 0, sizeof (CRStyleSheet*) * 3);
paths[0] = (guchar *) a_author_path;
paths[1] = (guchar *) a_user_path;
paths[2] = (guchar *) a_ua_path;
@@ -1035,13 +1053,17 @@ cr_om_parser_parse_paths_to_cascade (CROMParser * a_this,
}
/**
- *Parses three sheets located by their paths and build a cascade
- *@param a_author_path the path to the author stylesheet
- *@param a_user_path the path to the user stylesheet
- *@param a_ua_path the path to the User Agent stylesheet
- *@param a_result out parameter. The resulting cascade if the parsing
+ * cr_om_parser_simply_parse_paths_to_cascade:
+ *@a_author_path: the path to the author stylesheet
+ *@a_user_path: the path to the user stylesheet
+ *@a_ua_path: the path to the User Agent stylesheet
+ *@a_encoding: the encoding of the sheets.
+ *@a_result: out parameter. The resulting cascade if the parsing
*was okay
- *@return CR_OK upon successful completion, an error code otherwise
+ *
+ *Parses three sheets located by their paths and build a cascade
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise
*/
enum CRStatus
cr_om_parser_simply_parse_paths_to_cascade (const guchar * a_author_path,
@@ -1072,8 +1094,10 @@ cr_om_parser_simply_parse_paths_to_cascade (const guchar * a_author_path,
}
/**
+ * cr_om_parser_destroy:
+ *@a_this: the current instance of #CROMParser.
+ *
*Destructor of the #CROMParser.
- *@param a_this the current instance of #CROMParser.
*/
void
cr_om_parser_destroy (CROMParser * a_this)
diff --git a/src/cr-parser.c b/src/cr-parser.c
index e713ff6..84a992f 100644
--- a/src/cr-parser.c
+++ b/src/cr-parser.c
@@ -24,7 +24,8 @@
*/
/**
- *@file
+ *@CRParser:
+ *
*The definition of the #CRParser class.
*/
@@ -41,7 +42,7 @@
*=====================================
*
*One must keep in mind
- *that css UA must comply with two syntax.
+ *that css UA must comply with two syntaxes.
*
*1/the specific syntax that defines the css language
*for a given level of specificatin (e.g css2 syntax
@@ -136,8 +137,9 @@ struct _CRParserPriv {
#define CHARS_TAB_SIZE 12
/**
+ * IS_NUM:
+ *@a_char: the char to test.
*return TRUE if the character is a number ([0-9]), FALSE otherwise
- *@param a_char the char to test.
*/
#define IS_NUM(a_char) (((a_char) >= '0' && (a_char) <= '9')?TRUE:FALSE)
@@ -161,16 +163,18 @@ if ((status) != CR_OK) \
}
/**
- *same as CHECK_PARSING_STATUS() but this one pushes an error
- *on the parser error stack when an error arises.
- *@param a_this the current instance of #CRParser .
- *@param a_status the status to check. Is of type enum #CRStatus.
- *@param a_is_exception in case of error, if is TRUE, the status
+ * CHECK_PARSING_STATUS_ERR:
+ *@a_this: the current instance of #CRParser .
+ *@a_status: the status to check. Is of type enum #CRStatus.
+ *@a_is_exception: in case of error, if is TRUE, the status
*is set to CR_PARSING_ERROR before goto error. If is false, the
*real low level status is kept and will be returned by the
*upper level function that called this macro. Usally,this must
*be set to FALSE.
*
+ *same as CHECK_PARSING_STATUS() but this one pushes an error
+ *on the parser error stack when an error arises.
+ *
*/
#define CHECK_PARSING_STATUS_ERR(a_this, a_status, a_is_exception,\
a_err_msg, a_err_status) \
@@ -605,11 +609,13 @@ cr_parser_clear_errors (CRParser * a_this)
}
/**
+ * cr_parser_try_to_skip_spaces_and_comments:
+ *@a_this: the current instance of #CRParser.
+ *
*Same as cr_parser_try_to_skip_spaces() but this one skips
*spaces and comments.
*
- *@param a_this the current instance of #CRParser.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_try_to_skip_spaces_and_comments (CRParser * a_this)
@@ -665,7 +671,7 @@ cr_parser_try_to_skip_spaces_and_comments (CRParser * a_this)
*css core syntax.
*stylesheet : [ CDO | CDC | S | statement ]*;
*@param a_this the current instance of #CRParser.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *@return CR_OK upon successful completion, an error code otherwise.
*/
static enum CRStatus
cr_parser_parse_stylesheet_core (CRParser * a_this)
@@ -1485,6 +1491,9 @@ cr_parser_parse_property (CRParser * a_this,
}
/**
+ * cr_parser_parse_term:
+ *@a_term: out parameter. The successfully parsed term.
+ *
*Parses a "term" as defined in the css2 spec, appendix D.1:
*term ::= unary_operator? [NUMBER S* | PERCENTAGE S* | LENGTH S* |
*EMS S* | EXS S* | ANGLE S* | TIME S* | FREQ S* | function ] |
@@ -1492,8 +1501,7 @@ cr_parser_parse_property (CRParser * a_this,
*
*TODO: handle parsing of 'RGB'
*
- *@param a_term out parameter. The successfully parsed term.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_term (CRParser * a_this, CRTerm ** a_term)
@@ -1638,15 +1646,17 @@ cr_parser_parse_term (CRParser * a_this, CRTerm ** a_term)
}
/**
+ * cr_parser_parse_simple_selector:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *@a_sel: out parameter. Is set to the successfully parsed simple
+ *selector.
+ *
*Parses a "simple_selector" as defined by the css2 spec in appendix D.1 :
*element_name? [ HASH | class | attrib | pseudo ]* S*
*and where pseudo is:
*pseudo ::= ':' [ IDENT | FUNCTION S* IDENT S* ')' ]
*
- *@Param a_this the "this pointer" of the current instance of #CRParser.
- *@param a_sel out parameter. Is set to the successfully parsed simple
- *selector.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
static enum CRStatus
cr_parser_parse_simple_selector (CRParser * a_this, CRSimpleSel ** a_sel)
@@ -1902,16 +1912,18 @@ cr_parser_parse_simple_selector (CRParser * a_this, CRSimpleSel ** a_sel)
}
/**
- *Parses a "selector" as defined by the css2 spec in appendix D.1:
- *selector ::= simple_selector [ combinator simple_selector ]*
- *
- *@param a_this the this pointer of the current instance of #CRParser.
- *@param a_start a pointer to the
+ * cr_parser_parse_simple_sels:
+ *@a_this: the this pointer of the current instance of #CRParser.
+ *@a_start: a pointer to the
*first chararcter of the successfully parsed
*string.
- *@param a_end a pointer to the last character of the successfully parsed
+ *@a_end: a pointer to the last character of the successfully parsed
*string.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Parses a "selector" as defined by the css2 spec in appendix D.1:
+ *selector ::= simple_selector [ combinator simple_selector ]*
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
static enum CRStatus
cr_parser_parse_simple_sels (CRParser * a_this,
@@ -1978,11 +1990,14 @@ cr_parser_parse_simple_sels (CRParser * a_this,
}
/**
- *Parses a comma separated list of selectors.
- *@param a_this the current instance of #CRParser.
- *@param a_selector the parsed list of comma separated
+ * cr_parser_parse_selector:
+ *@a_this: the current instance of #CRParser.
+ *@a_selector: the parsed list of comma separated
*selectors.
- *@return CR_OK upon successful completion, an error
+ *
+ *Parses a comma separated list of selectors.
+ *
+ *Returns CR_OK upon successful completion, an error
*code otherwise.
*/
static enum CRStatus
@@ -2096,16 +2111,17 @@ cr_parser_parse_selector (CRParser * a_this,
}
/**
+ * cr_parser_parse_function:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *
+ *@a_func_name: out parameter. The parsed function name
+ *@a_expr: out parameter. The successfully parsed term.
+ *
*Parses a "function" as defined in css spec at appendix D.1:
*function ::= FUNCTION S* expr ')' S*
*FUNCTION ::= ident'('
*
- *@param a_this the "this pointer" of the current instance of
- *#CRParser.
- *
- *@param a_func_name out parameter. The parsed function name
- *@param a_expr out parameter. The successfully parsed term.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
static enum CRStatus
cr_parser_parse_function (CRParser * a_this,
@@ -2183,13 +2199,15 @@ cr_parser_parse_function (CRParser * a_this,
}
/**
+ * cr_parser_parse_uri:
+ *@a_this: the current instance of #CRParser.
+ *@a_str: the successfully parsed url.
+ *
*Parses an uri as defined by the css spec [4.1.1]:
* URI ::= url\({w}{string}{w}\)
* |url\({w}([!#$%&*-~]|{nonascii}|{escape})*{w}\)
*
- *@param a_this the current instance of #CRParser.
- *@param a_str the successfully parsed url.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
static enum CRStatus
cr_parser_parse_uri (CRParser * a_this, CRString ** a_str)
@@ -2206,19 +2224,21 @@ cr_parser_parse_uri (CRParser * a_this, CRString ** a_str)
}
/**
+ * cr_parser_parse_string:
+ *@a_this: the current instance of #CRParser.
+ *@a_start: out parameter. Upon successfull completion,
+ *points to the beginning of the string, points to an undefined value
+ *otherwise.
+ *@a_end: out parameter. Upon successfull completion, points to
+ *the beginning of the string, points to an undefined value otherwise.
+ *
*Parses a string type as defined in css spec [4.1.1]:
*
*string ::= {string1}|{string2}
*string1 ::= \"([\t !#$%&(-~]|\\{nl}|\'|{nonascii}|{escape})*\"
*string2 ::= \'([\t !#$%&(-~]|\\{nl}|\"|{nonascii}|{escape})*\'
*
- *@param a_this the current instance of #CRParser.
- *@param a_start out parameter. Upon successfull completion,
- *points to the beginning of the string, points to an undefined value
- *otherwise.
- *@param a_end out parameter. Upon successfull completion, points to
- *the beginning of the string, points to an undefined value otherwise.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
static enum CRStatus
cr_parser_parse_string (CRParser * a_this, CRString ** a_str)
@@ -2718,13 +2738,13 @@ cr_parser_parse_stylesheet (CRParser * a_this)
****************************************/
/**
+ * cr_parser_new:
+ * @a_tknzr: the tokenizer to use for the parsing.
+ *
*Creates a new parser to parse data
*coming the input stream given in parameter.
- *@param a_input the input stream of the parser.
- *Note that the newly created parser will ref
- *a_input and unref it when parsing reaches the
- *end of the input stream.
- *@return the newly created instance of #CRParser,
+ *
+ *Returns the newly created instance of #CRParser,
*or NULL if an error occured.
*/
CRParser *
@@ -2747,15 +2767,18 @@ cr_parser_new (CRTknzr * a_tknzr)
}
/**
- *Instanciates a new parser from a memory buffer.
- *@param a_buf the buffer to parse.
- *@param a_len the length of the data in the buffer.
- *@param a_enc the encoding of the input buffer a_buf.
- *@param a_free_buf if set to TRUE, a_buf will be freed
+ * cr_parser_new_from_buf:
+ *@a_buf: the buffer to parse.
+ *@a_len: the length of the data in the buffer.
+ *@a_enc: the encoding of the input buffer a_buf.
+ *@a_free_buf: if set to TRUE, a_buf will be freed
*during the destruction of the newly built instance
*of #CRParser. If set to FALSE, it is up to the caller to
*eventually free it.
- *@return the newly built parser, or NULL if an error arises.
+ *
+ *Instanciates a new parser from a memory buffer.
+ *
+ *Returns the newly built parser, or NULL if an error arises.
*/
CRParser *
cr_parser_new_from_buf (guchar * a_buf,
@@ -2780,6 +2803,12 @@ cr_parser_new_from_buf (guchar * a_buf,
return result;
}
+/**
+ * cr_parser_new_from_input:
+ * @a_input: the parser input stream to use.
+ *
+ * Returns a newly built parser input.
+ */
CRParser *
cr_parser_new_from_input (CRInput * a_input)
{
@@ -2797,6 +2826,13 @@ cr_parser_new_from_input (CRInput * a_input)
return result;
}
+/**
+ * cr_parser_new_from_file:
+ * @a_file_uri: the uri of the file to parse.
+ * @a_enc: the file encoding to use.
+ *
+ * Returns the newly built parser.
+ */
CRParser *
cr_parser_new_from_file (const guchar * a_file_uri, enum CREncoding a_enc)
{
@@ -2815,10 +2851,13 @@ cr_parser_new_from_file (const guchar * a_file_uri, enum CREncoding a_enc)
}
/**
+ * cr_parser_set_sac_handler:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *@a_handler: the handler to set.
+ *
*Sets a SAC document handler to the parser.
- *@param a_this the "this pointer" of the current instance of #CRParser.
- *@param a_handler the handler to set.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_set_sac_handler (CRParser * a_this, CRDocHandler * a_handler)
@@ -2836,11 +2875,14 @@ cr_parser_set_sac_handler (CRParser * a_this, CRDocHandler * a_handler)
}
/**
- *Gets the SAC document handler.
- *@param a_this the "this pointer" of the current instance of
+ * cr_parser_get_sac_handler:
+ *@a_this: the "this pointer" of the current instance of
*#CRParser.
- *@param a_handler out parameter. The returned handler.
- *@return CR_OK upon successfull completion, an error code
+ *@a_handler: out parameter. The returned handler.
+ *
+ *Gets the SAC document handler.
+ *
+ *Returns CR_OK upon successfull completion, an error code
*otherwise.
*/
enum CRStatus
@@ -2854,10 +2896,13 @@ cr_parser_get_sac_handler (CRParser * a_this, CRDocHandler ** a_handler)
}
/**
+ * cr_parser_set_default_sac_handler:
+ *@a_this: a pointer to the current instance of #CRParser.
+ *
*Sets the SAC handler associated to the current instance
*of #CRParser to the default SAC handler.
- *@param a_this a pointer to the current instance of #CRParser.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_set_default_sac_handler (CRParser * a_this)
@@ -2881,6 +2926,13 @@ cr_parser_set_default_sac_handler (CRParser * a_this)
return status;
}
+/**
+ * cr_parser_set_use_core_grammar:
+ * @a_this: the current instance of #CRParser.
+ * @a_use_core_grammar: where to parse against the css core grammar.
+ *
+ * Returns CR_OK upon succesful completion, an error code otherwise.
+ */
enum CRStatus
cr_parser_set_use_core_grammar (CRParser * a_this,
gboolean a_use_core_grammar)
@@ -2892,6 +2944,13 @@ cr_parser_set_use_core_grammar (CRParser * a_this,
return CR_OK;
}
+/**
+ * cr_parser_get_use_core_grammar:
+ * @a_this: the current instance of #CRParser.
+ * @a_use_core_grammar: wether to use the core grammar or not.
+ *
+ * Returns CR_OK upon succesful completion, an error code otherwise.
+ */
enum CRStatus
cr_parser_get_use_core_grammar (CRParser * a_this,
gboolean * a_use_core_grammar)
@@ -2904,11 +2963,15 @@ cr_parser_get_use_core_grammar (CRParser * a_this,
}
/**
- *Parses a the given in parameter.
- *@param a_this a pointer to the current instance of #CRParser.
- *@param a_file_uri the uri to the file to load. For the time being,
+ * cr_parser_parse_file:
+ *@a_this: a pointer to the current instance of #CRParser.
+ *@a_file_uri: the uri to the file to load. For the time being,
+ *@a_enc: the encoding of the file to parse.
*only local files are supported.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Parses a the given in parameter.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_file (CRParser * a_this,
@@ -2933,9 +2996,16 @@ cr_parser_parse_file (CRParser * a_this,
}
/**
+ * cr_parser_parse_expr:
+ * @a_this: the current instance of #CRParser.
+ * @a_expr: out parameter. the parsed expression.
+ *
*Parses an expression as defined by the css2 spec in appendix
*D.1:
*expr: term [ operator term ]*
+ *
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr)
@@ -3032,13 +3102,17 @@ cr_parser_parse_expr (CRParser * a_this, CRTerm ** a_expr)
}
/**
+ * cr_parser_parse_prio:
+ *@a_this: the current instance of #CRParser.
+ *@a_prio: a string representing the priority.
+ *Today, only "!important" is returned as only this
+ *priority is defined by css2.
+ *
*Parses a declaration priority as defined by
*the css2 grammar in appendix C:
*prio: IMPORTANT_SYM S*
- *@param a_this the current instance of #CRParser.
- *@param a_prio a string representing the priority.
- *Today, only "!important" is returned as only this
- *priority is defined by css2.
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_prio (CRParser * a_this, CRString ** a_prio)
@@ -3077,17 +3151,19 @@ cr_parser_parse_prio (CRParser * a_this, CRString ** a_prio)
}
/**
+ * cr_parser_parse_declaration:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *@a_property: the successfully parsed property. The caller
+ * *must* free the returned pointer.
+ *@a_expr: the expression that represents the attribute value.
+ *The caller *must* free the returned pointer.
+ *
*TODO: return the parsed priority, so that
*upper layers can take benefit from it.
*Parses a "declaration" as defined by the css2 spec in appendix D.1:
*declaration ::= [property ':' S* expr prio?]?
*
- *@param a_this the "this pointer" of the current instance of #CRParser.
- *@param a_property the successfully parsed property. The caller
- * *must* free the returned pointer.
- *@param a_expr the expression that represents the attribute value.
- *The caller *must* free the returned pointer.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_declaration (CRParser * a_this,
@@ -3174,11 +3250,14 @@ cr_parser_parse_declaration (CRParser * a_this,
}
/**
+ * cr_parser_parse_statement_core:
+ *@a_this: the current instance of #CRParser.
+ *
*Parses a statement as defined by the css core grammar in
*chapter 4.1 of the css2 spec.
*statement : ruleset | at-rule;
- *@param a_this the current instance of #CRParser.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_statement_core (CRParser * a_this)
@@ -3230,6 +3309,9 @@ cr_parser_parse_statement_core (CRParser * a_this)
}
/**
+ * cr_parser_parse_ruleset:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *
*Parses a "ruleset" as defined in the css2 spec at appendix D.1.
*ruleset ::= selector [ ',' S* selector ]*
*'{' S* declaration? [ ';' S* declaration? ]* '}' S*;
@@ -3238,8 +3320,8 @@ cr_parser_parse_statement_core (CRParser * a_this)
*callbacks whenever it encounters some specific constructions.
*See the documentation of #CRDocHandler (the SAC handler) to know
*when which SAC handler is called.
- *@param a_this the "this pointer" of the current instance of #CRParser.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_ruleset (CRParser * a_this)
@@ -3430,29 +3512,29 @@ cr_parser_parse_ruleset (CRParser * a_this)
}
/**
- *Parses an 'import' declaration as defined in the css2 spec
- *in appendix D.1:
- *
- *import ::=
- *@import [STRING|URI] S* [ medium [ ',' S* medium]* ]? ';' S*
- *
- *@param a_this the "this pointer" of the current instance
+ * cr_parser_parse_import:
+ *@a_this: the "this pointer" of the current instance
*of #CRParser.
- *
- *@param a_medium_list out parameter. A linked list of
+ *@a_media_list: out parameter. A linked list of
*#CRString
*Each CRString is a string that contains
*a 'medium' declaration part of the successfully
*parsed 'import' declaration.
- *
- *@param a_import_string out parameter.
+ *@a_import_string: out parameter.
*A string that contains the 'import
*string". The import string can be either an uri (if it starts with
*the substring "uri(") or a any other css2 string. Note that
* *a_import_string must be initially set to NULL or else, this function
*will return CR_BAD_PARAM_ERROR.
+ *@a_location: the location (line, column) where the import has been parsed
*
- *@return CR_OK upon sucessfull completion, an error code otherwise.
+ *Parses an 'import' declaration as defined in the css2 spec
+ *in appendix D.1:
+ *
+ *import ::=
+ *@import [STRING|URI] S* [ medium [ ',' S* medium]* ]? ';' S*
+ *
+ *Returns CR_OK upon sucessfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_import (CRParser * a_this,
@@ -3601,6 +3683,9 @@ cr_parser_parse_import (CRParser * a_this,
}
/**
+ * cr_parser_parse_media:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *
*Parses a 'media' declaration as specified in the css2 spec at
*appendix D.1:
*
@@ -3609,8 +3694,8 @@ cr_parser_parse_import (CRParser * a_this,
*Note that this function calls the required sac handlers during the parsing
*to notify media productions. See #CRDocHandler to know the callback called
*during @media parsing.
- *@param a_this the "this pointer" of the current instance of #CRParser.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_media (CRParser * a_this)
@@ -3769,6 +3854,9 @@ cr_parser_parse_media (CRParser * a_this)
}
/**
+ * cr_parser_parse_page:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *
*Parses '@page' rule as specified in the css2 spec in appendix D.1:
*page ::= PAGE_SYM S* IDENT? pseudo_page? S*
*'{' S* declaration [ ';' S* declaration ]* '}' S*
@@ -3776,8 +3864,8 @@ cr_parser_parse_media (CRParser * a_this)
*This function also calls the relevant SAC handlers whenever it
*encounters a construction that must
*be reported to the calling application.
- *@param a_this the "this pointer" of the current instance of #CRParser.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_page (CRParser * a_this)
@@ -4017,16 +4105,18 @@ cr_parser_parse_page (CRParser * a_this)
}
/**
+ * cr_parser_parse_charset:
+ *@a_this: the "this pointer" of the current instance of #CRParser.
+ *@a_value: out parameter. The actual parsed value of the charset
+ *declararation. Note that for safety check reasons, *a_value must be
+ *set to NULL.
+ *@a_charset_sym_location: the parsing location of the charset rule
+ *
*Parses a charset declaration as defined implictly by the css2 spec in
*appendix D.1:
*charset ::= CHARSET_SYM S* STRING S* ';'
*
- *@param a_this the "this pointer" of the current instance of #CRParser.
- *@param a_value out parameter. The actual parsed value of the charset
- *declararation. Note that for safety check reasons, *a_value must be
- *set to NULL.
- *@param a_charset_sym_location the parsing location of
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_charset (CRParser * a_this, CRString ** a_value,
@@ -4106,6 +4196,9 @@ cr_parser_parse_charset (CRParser * a_this, CRString ** a_value,
}
/**
+ * cr_parser_parse_font_face:
+ *@a_this: the current instance of #CRParser.
+ *
*Parses the "@font-face" rule specified in the css1 spec in
*appendix D.1:
*
@@ -4113,7 +4206,8 @@ cr_parser_parse_charset (CRParser * a_this, CRString ** a_value,
*'{' S* declaration [ ';' S* declaration ]* '}' S*
*
*This function will call SAC handlers whenever it is necessary.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_font_face (CRParser * a_this)
@@ -4263,11 +4357,14 @@ cr_parser_parse_font_face (CRParser * a_this)
}
/**
+ * cr_parser_parse:
+ *@a_this: the current instance of #CRParser.
+ *
*Parses the data that comes from the
*input previously associated to the current instance of
*#CRParser.
- *@param a_this the current instance of #CRParser.
- *@return CR_OK ;
+ *
+ *Returns CR_OK upon succesful completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse (CRParser * a_this)
@@ -4286,6 +4383,13 @@ cr_parser_parse (CRParser * a_this)
return status;
}
+/**
+ * cr_parser_set_tknzr:
+ * @a_this: the current instance of #CRParser;
+ * @a_tknzr: the new tokenizer.
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
+ */
enum CRStatus
cr_parser_set_tknzr (CRParser * a_this, CRTknzr * a_tknzr)
{
@@ -4304,10 +4408,13 @@ cr_parser_set_tknzr (CRParser * a_this, CRTknzr * a_tknzr)
}
/**
+ * cr_parser_get_tknzr:
+ *@a_this: the current instance of #CRParser
+ *@a_tknzr: out parameter. The returned tokenizer
+ *
*Getter of the parser's underlying tokenizer
- *@param a_this the current instance of #CRParser
- *@param a_tknzr out parameter. The returned tokenizer
- *@return CR_OK upon succesful completion, an error code
+ *
+ *Returns CR_OK upon succesful completion, an error code
*otherwise
*/
enum CRStatus
@@ -4321,10 +4428,13 @@ cr_parser_get_tknzr (CRParser * a_this, CRTknzr ** a_tknzr)
}
/**
+ * cr_parser_get_parsing_location:
+ *@a_this: the current instance of #CRParser
+ *@a_loc: the parsing location to get.
+ *
*Gets the current parsing location.
- *@param a_this the current instance of #CRParser
- *@param a_loc the parsing location to get.
- *@return CR_OK upon succesful completion, an error code
+ *
+ *Returns CR_OK upon succesful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -4340,12 +4450,15 @@ cr_parser_get_parsing_location (CRParser *a_this,
}
/**
+ * cr_parser_parse_buf:
+ *@a_this: the current instance of #CRparser
+ *@a_buf: the input buffer
+ *@a_len: the length of the input buffer
+ *@a_enc: the encoding of the buffer
+ *
*Parses a stylesheet from a buffer
- *@param a_this the current instance of #CRparser
- *@param a_buf the input buffer
- *@param a_len the length of the input buffer
- *@param a_enc the encoding of the buffer
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_parser_parse_buf (CRParser * a_this,
@@ -4371,10 +4484,12 @@ cr_parser_parse_buf (CRParser * a_this,
}
/**
+ * cr_parser_destroy:
+ *@a_this: the current instance of #CRParser to
+ *destroy.
+ *
*Destroys the current instance
*of #CRParser.
- *@param a_this the current instance of #CRParser to
- *destroy.
*/
void
cr_parser_destroy (CRParser * a_this)
diff --git a/src/cr-parsing-location.c b/src/cr-parsing-location.c
index 81b05f7..b712d70 100644
--- a/src/cr-parsing-location.c
+++ b/src/cr-parsing-location.c
@@ -25,14 +25,17 @@
#include "cr-parsing-location.h"
/**
- *@file
+ *@CRParsingLocation:
+ *
*Definition of the #CRparsingLocation class.
*/
/**
+ * cr_parsing_location_new:
*Instanciates a new parsing location.
- *@return the newly instanciated #CRParsingLocation.
+ *
+ *Returns the newly instanciated #CRParsingLocation.
*Must be freed by cr_parsing_location_destroy()
*/
CRParsingLocation *
@@ -50,9 +53,12 @@ cr_parsing_location_new (void)
}
/**
+ * cr_parsing_location_init:
+ *@a_this: the current instance of #CRParsingLocation.
+ *
*Initializes the an instance of #CRparsingLocation.
- *@param a_this the current instance of #CRParsingLocation.
- *@return CR_OK upon
+ *
+ *Returns CR_OK upon succesful completion, an error code otherwise.
*/
enum CRStatus
cr_parsing_location_init (CRParsingLocation *a_this)
@@ -64,11 +70,14 @@ cr_parsing_location_init (CRParsingLocation *a_this)
}
/**
- *Copies an instance of CRParsingLocation into another one.
- *@param a_to the destination of the copy.
+ * cr_parsing_location_copy:
+ *@a_to: the destination of the copy.
*Must be allocated by the caller.
- *@param a_from the source of the copy.
- *@return CR_OK upon succesful completion, an error code
+ *@a_from: the source of the copy.
+ *
+ *Copies an instance of CRParsingLocation into another one.
+ *
+ *Returns CR_OK upon succesful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -82,10 +91,12 @@ cr_parsing_location_copy (CRParsingLocation *a_to,
}
/**
- *@param a_this the current instance of #CRParsingLocation.
- *@param a_mask a bitmap that defines which parts of the
+ * cr_parsing_location_to_string:
+ *@a_this: the current instance of #CRParsingLocation.
+ *@a_mask: a bitmap that defines which parts of the
*parsing location are to be serialized (line, column or byte offset)
- *@return the serialized string or NULL in case of an error.
+ *
+ *Returns the serialized string or NULL in case of an error.
*/
gchar *
cr_parsing_location_to_string (CRParsingLocation *a_this,
@@ -123,6 +134,12 @@ cr_parsing_location_to_string (CRParsingLocation *a_this,
return str ;
}
+/**
+ * cr_parsing_location_dump:
+ * @a_this: current instance of #CRParsingLocation
+ * @a_mask: the serialization mask.
+ * @a_fp: the file pointer to dump the parsing location to.
+ */
void
cr_parsing_location_dump (CRParsingLocation *a_this,
enum CRParsingLocationSerialisationMask a_mask,
@@ -140,9 +157,11 @@ cr_parsing_location_dump (CRParsingLocation *a_this,
}
/**
- *Destroys the current instance of #CRParsingLocation
- *@param a_this the current instance of #CRParsingLocation. Must
+ * cr_parsing_location_destroy:
+ *@a_this: the current instance of #CRParsingLocation. Must
*have been allocated with cr_parsing_location_new().
+ *
+ *Destroys the current instance of #CRParsingLocation
*/
void
cr_parsing_location_destroy (CRParsingLocation *a_this)
diff --git a/src/cr-prop-list.c b/src/cr-prop-list.c
index 4c56b9c..4c65e67 100644
--- a/src/cr-prop-list.c
+++ b/src/cr-prop-list.c
@@ -64,10 +64,13 @@ cr_prop_list_allocate (void)
***************/
/**
+ * cr_prop_list_append:
+ *@a_this: the current instance of #CRPropList
+ *@a_to_append: the property list to append
+ *
*Appends a property list to the current one.
- *@param a_this the current instance of #CRPropList
- *@param a_to_append the property list to append
- *@return the resulting prop list, or NULL if an error
+ *
+ *Returns the resulting prop list, or NULL if an error
*occured
*/
CRPropList *
@@ -91,12 +94,13 @@ cr_prop_list_append (CRPropList * a_this, CRPropList * a_to_append)
}
/**
+ * cr_prop_list_append2:
*Appends a pair of prop/declaration to
*the current prop list.
- *@param a_this the current instance of #CRPropList
- *@param a_prop the property to consider
- *@param a_decl the declaration to consider
- *@return the resulting property list, or NULL in case
+ *@a_this: the current instance of #CRPropList
+ *@a_prop: the property to consider
+ *@a_decl: the declaration to consider
+ *Returns the resulting property list, or NULL in case
*of an error.
*/
CRPropList *
@@ -120,9 +124,12 @@ cr_prop_list_append2 (CRPropList * a_this,
}
/**
+ * cr_prop_list_prepend:
+ *@a_this: the current instance of #CRPropList
+ *@a_to_prepend: the new list to prepend.
+ *
*Prepends a list to the current list
- *@param a_this the current instance of #CRPropList
- *@param the new list to prepend.
+ *Returns the new properties list.
*/
CRPropList *
cr_prop_list_prepend (CRPropList * a_this, CRPropList * a_to_prepend)
@@ -143,32 +150,39 @@ cr_prop_list_prepend (CRPropList * a_this, CRPropList * a_to_prepend)
}
/**
- *Prepends a list to the current list
- *@param a_this the current instance of #CRPropList
- *@param the new list to prepend.
+ * cr_prop_list_prepend2:
+ *@a_this: the current instance of #CRPropList
+ *@a_prop_name: property name to append
+ *@a_decl: the property value to append.
+ *
+ *Prepends a propertie to a list of properties
+ *
+ * Returns the new property list.
*/
CRPropList *
cr_prop_list_prepend2 (CRPropList * a_this,
- CRString * a_prop, CRDeclaration * a_decl)
+ CRString * a_prop_name, CRDeclaration * a_decl)
{
CRPropList *list = NULL,
*result = NULL;
g_return_val_if_fail (a_this && PRIVATE (a_this)
- && a_prop && a_decl, NULL);
+ && a_prop_name && a_decl, NULL);
list = cr_prop_list_allocate ();
g_return_val_if_fail (list, NULL);
- PRIVATE (list)->prop = a_prop;
+ PRIVATE (list)->prop = a_prop_name;
PRIVATE (list)->decl = a_decl;
result = cr_prop_list_prepend (a_this, list);
return result;
}
/**
+ * cr_prop_list_set_prop:
+ *@a_this: the current instance of #CRPropList
+ *@a_prop: the property to set
+ *
*Sets the property of a CRPropList
- *@param a_this the current instance of #CRPropList
- *@param a_prop the property to set
*/
enum CRStatus
cr_prop_list_set_prop (CRPropList * a_this, CRString * a_prop)
@@ -181,11 +195,14 @@ cr_prop_list_set_prop (CRPropList * a_this, CRString * a_prop)
}
/**
+ * cr_prop_list_get_prop:
+ *@a_this: the current instance of #CRPropList
+ *@a_prop: out parameter. The returned property
+ *
*Getter of the property associated to the current instance
*of #CRPropList
- *@param a_this the current instance of #CRPropList
- *@param a_prop out parameter. The returned property
- *@return CR_OK upon successful completion, an error code
+ *
+ *Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -198,6 +215,12 @@ cr_prop_list_get_prop (CRPropList * a_this, CRString ** a_prop)
return CR_OK;
}
+/**
+ * cr_prop_list_set_decl:
+ * @a_this: the current instance of #CRPropList
+ * @a_decl: the new property value.
+ * Returns CR_OK upon successful completion, an error code otherwise.
+ */
enum CRStatus
cr_prop_list_set_decl (CRPropList * a_this, CRDeclaration * a_decl)
{
@@ -208,6 +231,12 @@ cr_prop_list_set_decl (CRPropList * a_this, CRDeclaration * a_decl)
return CR_OK;
}
+/**
+ * cr_prop_list_get_decl:
+ * @a_this: the current instance of #CRPropList
+ * @a_decl: out parameter. The property value
+ * Returns CR_OK upon successful completion.
+ */
enum CRStatus
cr_prop_list_get_decl (CRPropList * a_this, CRDeclaration ** a_decl)
{
@@ -219,12 +248,15 @@ cr_prop_list_get_decl (CRPropList * a_this, CRDeclaration ** a_decl)
}
/**
- *Lookup a given property/declaration pair
- *@param a_this the current instance of #CRPropList
- *@param a_prop the property to lookup
- *@param a_prop_list out parameter. The property/declaration
+ * cr_prop_list_lookup_prop:
+ *@a_this: the current instance of #CRPropList
+ *@a_prop: the property to lookup
+ *@a_prop_list: out parameter. The property/declaration
*pair found (if and only if the function returned code if CR_OK)
- *@return CR_OK if a prop/decl pair has been found,
+ *
+ *Lookup a given property/declaration pair
+ *
+ *Returns CR_OK if a prop/decl pair has been found,
*CR_VALUE_NOT_FOUND_ERROR if not, or an error code if something
*bad happens.
*/
@@ -261,11 +293,12 @@ cr_prop_list_lookup_prop (CRPropList * a_this,
}
/**
+ * cr_prop_list_get_next:
+ *@a_this: the current instance of CRPropList
+ *
*Gets the next prop/decl pair in the list
- *@param a_this the current instance of CRPropList
- *@param the next prop/decl pair, or NULL if we
- *reached the end of the list.
- *@return the next prop/declaration pair of the list,
+ *
+ *Returns the next prop/declaration pair of the list,
*or NULL if we reached end of list (or if an error occurs)
*/
CRPropList *
@@ -277,11 +310,12 @@ cr_prop_list_get_next (CRPropList * a_this)
}
/**
+ * cr_prop_list_get_prev:
+ *@a_this: the current instance of CRPropList
+ *
*Gets the previous prop/decl pair in the list
- *@param a_this the current instance of CRPropList
- *@param the previous prop/decl pair, or NULL if we
- *reached the end of the list.
- *@return the previous prop/declaration pair of the list,
+ *
+ *Returns the previous prop/declaration pair of the list,
*or NULL if we reached end of list (or if an error occurs)
*/
CRPropList *
@@ -293,10 +327,13 @@ cr_prop_list_get_prev (CRPropList * a_this)
}
/**
+ * cr_prop_list_unlink:
+ *@a_this: the current list of prop/decl pairs
+ *@a_pair: the prop/decl pair to unlink.
+ *
*Unlinks a prop/decl pair from the list
- *@param a_this the current list of prop/decl pairs
- *@param a_pair the prop/decl pair to unlink.
- *@return the new list or NULL in case of an error.
+ *
+ *Returns the new list or NULL in case of an error.
*/
CRPropList *
cr_prop_list_unlink (CRPropList * a_this, CRPropList * a_pair)
@@ -332,6 +369,10 @@ cr_prop_list_unlink (CRPropList * a_this, CRPropList * a_pair)
return a_this;
}
+/**
+ * cr_prop_list_detroy:
+ * @a_this: the current instance of #CRPropList
+ */
void
cr_prop_list_destroy (CRPropList * a_this)
{
diff --git a/src/cr-pseudo.c b/src/cr-pseudo.c
index 8e036a3..1a3b2c5 100644
--- a/src/cr-pseudo.c
+++ b/src/cr-pseudo.c
@@ -24,13 +24,15 @@
#include "cr-pseudo.h"
/**
- *@file
+ *@CRPseudo:
*The definition of the #CRPseudo class.
*/
/**
+ * cr_pseudo_new:
*Constructor of the #CRPseudo class.
- *@return the newly build instance.
+ *
+ *Returns the newly build instance.
*/
CRPseudo *
cr_pseudo_new (void)
@@ -42,6 +44,12 @@ cr_pseudo_new (void)
return result;
}
+/**
+ * cr_pseudo_to_string:
+ * @a_this: the current instance of #CRPseud.
+ * Returns the serialized pseudo. Caller must free the returned
+ * string using g_free().
+ */
guchar *
cr_pseudo_to_string (CRPseudo * a_this)
{
@@ -111,9 +119,12 @@ cr_pseudo_to_string (CRPseudo * a_this)
}
/**
+ * cr_pseudo_dump:
+ *@a_this: the current instance of pseudo
+ *@a_fp: the destination file pointer.
+ *
*Dumps the pseudo to a file.
- *@param a_this the current instance of pseudo
- *@param a_fp the destination file pointer.
+ *
*/
void
cr_pseudo_dump (CRPseudo * a_this, FILE * a_fp)
@@ -131,8 +142,10 @@ cr_pseudo_dump (CRPseudo * a_this, FILE * a_fp)
}
/**
+ * cr_pseudo_destroy:
+ *@a_this: the current instance to destroy.
+ *
*destructor of the #CRPseudo class.
- *@param a_this the current instance to destroy.
*/
void
cr_pseudo_destroy (CRPseudo * a_this)
diff --git a/src/cr-rgb.c b/src/cr-rgb.c
index e7d8090..637051f 100644
--- a/src/cr-rgb.c
+++ b/src/cr-rgb.c
@@ -180,8 +180,11 @@ static CRRgb gv_standard_colors[] = {
};
/**
+ * cr_rgb_new:
+ *
*The default constructor of #CRRgb.
- *@return the newly built instance of #CRRgb
+ *
+ *Returns the newly built instance of #CRRgb
*/
CRRgb *
cr_rgb_new (void)
@@ -201,13 +204,16 @@ cr_rgb_new (void)
}
/**
- *A constructor of #CRRgb.
- *@param a_red the red component of the color.
- *@param a_green the green component of the color.
- *@param a_blue the blue component of the color.
- *@param a_unit the unit of the rgb values.
+ * cr_rgb_new_with_vals:
+ *@a_red: the red component of the color.
+ *@a_green: the green component of the color.
+ *@a_blue: the blue component of the color.
+ *@a_unit: the unit of the rgb values.
*(either percentage or integer values)
- *@return the newly built instance of #CRRgb.
+ *
+ *A constructor of #CRRgb.
+ *
+ *Returns the newly built instance of #CRRgb.
*/
CRRgb *
cr_rgb_new_with_vals (gulong a_red, gulong a_green,
@@ -228,9 +234,12 @@ cr_rgb_new_with_vals (gulong a_red, gulong a_green,
}
/**
+ * cr_rgb_to_string:
+ *@a_this: the instance of #CRRgb to serialize.
+ *
*Serializes the rgb into a zero terminated string.
- *@param a_this the instance of #CRRgb to serialize.
- *@return the zero terminated string containing the serialized
+ *
+ *Returns the zero terminated string containing the serialized
*rgb. MUST BE FREED by the caller using g_free().
*/
guchar *
@@ -271,11 +280,13 @@ cr_rgb_to_string (CRRgb * a_this)
}
/**
+ * cr_rgb_dump:
+ *@a_this: the "this pointer" of
+ *the current instance of #CRRgb.
+ *@a_fp: the destination file pointer.
+ *
*Dumps the current instance of #CRRgb
*to a file.
- *@param a_this the "this pointer" of
- *the current instance of #CRRgb.
- *@param a_fp the destination file pointer.
*/
void
cr_rgb_dump (CRRgb * a_this, FILE * a_fp)
@@ -294,10 +305,13 @@ cr_rgb_dump (CRRgb * a_this, FILE * a_fp)
}
/**
+ * cr_rgb_compute_from_percentage:
+ *@a_this: the current instance of #CRRgb
+ *
*If the rgb values are expressed in percentage,
*compute their real value.
- *@param a_this the current instance of #CRRgb
- *@return
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_rgb_compute_from_percentage (CRRgb * a_this)
@@ -314,12 +328,15 @@ cr_rgb_compute_from_percentage (CRRgb * a_this)
}
/**
+ * cr_rgb_set:
+ *@a_this: the current instance of #CRRgb.
+ *@a_red: the red value.
+ *@a_green: the green value.
+ *@a_blue: the blue value.
+ *
*Sets rgb values to the RGB.
- *@param a_this the current instance of #CRRgb.
- *@param a_red the red value.
- *@param a_green the green value.
- *@param a_blue the blue value.
- *@return CR_OK upon successful completion, an error code
+ *
+ *Returns CR_OK upon successful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -344,11 +361,14 @@ cr_rgb_set (CRRgb * a_this, gulong a_red,
}
/**
+ * cr_rgb_set_to_inherit:
+ *@a_this: the current instance of #CRRgb
+ *
*sets the value of the rgb to inherit.
*Look at the css spec from chapter 6.1 to 6.2 to understand
*the meaning of "inherit".
- *@param a_this the current instance of #CRRgb
*
+ * Returns CR_OK upon succesful completion, an error code otherwise.
*/
enum CRStatus
cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit)
@@ -360,6 +380,13 @@ cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit)
return CR_OK ;
}
+/**
+ * cr_rgb_is_set_to_inherit:
+ *
+ * @a_this: the current instance of #CRRgb.
+ *
+ * Returns TRUE if the rgb is set to the value "inherit", FALSE otherwise.
+ */
gboolean
cr_rgb_is_set_to_inherit (CRRgb *a_this)
{
@@ -369,11 +396,14 @@ cr_rgb_is_set_to_inherit (CRRgb *a_this)
}
/**
+ * cr_rgb_is_set_to_transparent:
+ *@a_this: the current instance of
+ *#CRRgb
+ *
*Tests if the the rgb is set to the
*value "transparent" or not.
- *@param a_this the current instance of
- *#CRRgb
- *@return TRUE if the rgb has been set to
+ *
+ *Returns TRUE if the rgb has been set to
*transparent, FALSE otherwise.
*/
gboolean
@@ -385,9 +415,12 @@ cr_rgb_is_set_to_transparent (CRRgb *a_this)
/**
+ * cr_rgb_set_to_transparent:
+ *@a_this: the current instance of #CRRgb
+ *@a_is_transparent: set to transparent or not.
+ *
*Sets the rgb to the "transparent" value (or not)
- *@param a_this the current instance of #CRRgb
- *@param a_is_transparent set to transparent or not.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_rgb_set_to_transparent (CRRgb *a_this,
@@ -399,10 +432,13 @@ cr_rgb_set_to_transparent (CRRgb *a_this,
}
/**
+ * cr_rgb_set_from_rgb:
+ *@a_this: the current instance of #CRRgb.
+ *@a_rgb: the rgb to "copy"
+ *
*Sets the rgb from an other one.
- *@param a_this the current instance of #CRRgb.
- *@param a_rgb the rgb to "copy"
- *@return CR_OK upon successful completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_rgb_set_from_rgb (CRRgb * a_this, CRRgb * a_rgb)
@@ -414,6 +450,13 @@ cr_rgb_set_from_rgb (CRRgb * a_this, CRRgb * a_rgb)
return CR_OK;
}
+/**
+ * cr_rgb_set_from_name:
+ * @a_this: the current instance of #CRRgb
+ * @a_color_name: the color name
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
+ */
enum CRStatus
cr_rgb_set_from_name (CRRgb * a_this, const guchar * a_color_name)
{
@@ -437,6 +480,13 @@ cr_rgb_set_from_name (CRRgb * a_this, const guchar * a_color_name)
return status;
}
+/**
+ * cr_rgb_set_from_hex_str:
+ * @a_this: the current instance of #CRRgb
+ * @a_hex: the hexadecimal value to set.
+ *
+ * Returns CR_OK upon successful completion.
+ */
enum CRStatus
cr_rgb_set_from_hex_str (CRRgb * a_this, const guchar * a_hex)
{
@@ -492,9 +542,13 @@ cr_rgb_set_from_hex_str (CRRgb * a_this, const guchar * a_hex)
}
/**
+ * cr_rgb_set_from_term:
+ *@a_this: the instance of #CRRgb to set
+ *@a_value: the terminal from which to set
+ *
*Set the rgb from a terminal symbol
- *@param a_this the instance of #CRRgb to set
- *@param a_value the terminal from which to set
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value)
@@ -558,9 +612,11 @@ cr_rgb_copy (CRRgb *a_dest, CRRgb*a_src)
}
/**
- *Destructor of #CRRgb.
- *@param a_this the "this pointer" of the
+ * cr_rgb_destroy:
+ *@a_this: the "this pointer" of the
*current instance of #CRRgb.
+ *
+ *Destructor of #CRRgb.
*/
void
cr_rgb_destroy (CRRgb * a_this)
@@ -570,13 +626,16 @@ cr_rgb_destroy (CRRgb * a_this)
}
/**
+ * cr_rgb_parse_from_buf:
+ *@a_str: a string that contains a color description
+ *@a_enc: the encoding of a_str
+ *
*Parses a text buffer that contains a rgb color
*
- *@param a_str a string that contains a color description
- *@param a_enc the encoding of a_str
- *@return the parsed color, or NULL in case of error
+ *Returns the parsed color, or NULL in case of error
*/
-CRRgb *cr_rgb_parse_from_buf (const guchar *a_str,
+CRRgb *
+cr_rgb_parse_from_buf (const guchar *a_str,
enum CREncoding a_enc)
{
enum CRStatus status = CR_OK ;
@@ -616,6 +675,4 @@ cleanup:
}
return result ;
}
-
-
diff --git a/src/cr-sel-eng.c b/src/cr-sel-eng.c
index daa30b7..c839908 100644
--- a/src/cr-sel-eng.c
+++ b/src/cr-sel-eng.c
@@ -25,7 +25,8 @@
#include "cr-sel-eng.h"
/**
- *@file:
+ *@CRSelEng:
+ *
*The definition of the #CRSelEng class.
*The #CRSelEng is actually the "Selection Engine"
*class. This is highly experimental for at the moment and
@@ -1102,8 +1103,10 @@ set_style_from_props (CRStyle * a_style, CRPropList * a_props)
****************************************/
/**
+ * cr_sel_eng_new:
*Creates a new instance of #CRSelEng.
- *@return the newly built instance of #CRSelEng of
+ *
+ *Returns the newly built instance of #CRSelEng of
*NULL if an error occurs.
*/
CRSelEng *
@@ -1138,13 +1141,16 @@ cr_sel_eng_new (void)
}
/**
- *Adds a new handler entry in the handlers entry table.
- *@param a_this the current instance of #CRSelEng
- *@param a_pseudo_class_sel_name the name of the pseudo class selector.
- *@param a_pseudo_class_type the type of the pseudo class selector.
- *@param a_handler the actual handler or callback to be called during
+ * cr_sel_eng_register_pseudo_class_sel_handler:
+ *@a_this: the current instance of #CRSelEng
+ *@a_pseudo_class_sel_name: the name of the pseudo class selector.
+ *@a_pseudo_class_type: the type of the pseudo class selector.
+ *@a_handler: the actual handler or callback to be called during
*the selector evaluation process.
- *@return CR_OK, upon successful completion, an error code otherwise.
+ *
+ *Adds a new handler entry in the handlers entry table.
+ *
+ *Returns CR_OK, upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_sel_eng_register_pseudo_class_sel_handler (CRSelEng * a_this,
@@ -1212,10 +1218,13 @@ cr_sel_eng_unregister_pseudo_class_sel_handler (CRSelEng * a_this,
}
/**
+ * cr_sel_eng_unregister_all_pseudo_class_sel_handlers:
+ *@a_this: the current instance of #CRSelEng .
+ *
*Unregisters all the pseudo class sel handlers
*and frees all the associated allocated datastructures.
- *@param a_this the current instance of #CRSelEng .
- *@return CR_OK upon succesful completion, an error code
+ *
+ *Returns CR_OK upon succesful completion, an error code
*otherwise.
*/
enum CRStatus
@@ -1276,17 +1285,20 @@ cr_sel_eng_get_pseudo_class_selector_handler (CRSelEng * a_this,
}
/**
- *Evaluates a chained list of simple selectors (known as a css2 selector).
- *Says wheter if this selector matches the xml node given in parameter or
- *not.
- *@param a_this the selection engine.
- *@param a_sel the simple selector against which the xml node
+ * cr_sel_eng_matches_node:
+ *@a_this: the selection engine.
+ *@a_sel: the simple selector against which the xml node
*is going to be matched.
- *@param a_node the node against which the selector is going to be matched.
- *@param a_result out parameter. The result of the match. Is set to
+ *@a_node: the node against which the selector is going to be matched.
+ *@a_result: out parameter. The result of the match. Is set to
*TRUE if the selector matches the node, FALSE otherwise. This value
*is considered if and only if this functions returns CR_OK.
- *@return the CR_OK if the selection ran correctly, an error code otherwise.
+ *
+ *Evaluates a chained list of simple selectors (known as a css2 selector).
+ *Says wheter if this selector matches the xml node given in parameter or
+ *not.
+ *
+ *Returns the CR_OK if the selection ran correctly, an error code otherwise.
*/
enum CRStatus
cr_sel_eng_matches_node (CRSelEng * a_this, CRSimpleSel * a_sel,
@@ -1307,20 +1319,22 @@ cr_sel_eng_matches_node (CRSelEng * a_this, CRSimpleSel * a_sel,
}
/**
- *Returns an array of pointers to selectors that matches
- *the xml node given in parameter.
- *
- *@param a_this the current instance of the selection engine.
- *@param a_sheet the stylesheet that holds the selectors.
- *@param a_node the xml node to consider during the walk thru
+ * cr_sel_eng_get_matched_rulesets:
+ *@a_this: the current instance of the selection engine.
+ *@a_sheet: the stylesheet that holds the selectors.
+ *@a_node: the xml node to consider during the walk thru
*the stylesheet.
- *@param a_rulesets out parameter. A pointer to an array of
+ *@a_rulesets: out parameter. A pointer to an array of
*rulesets statement pointers. *a_rulesets is allocated by
*this function and must be freed by the caller. However, the caller
*must not alter the rulesets statements pointer because they
*point to statements that are still in the css stylesheet.
- *@param a_len the length of *a_ruleset.
- *@return CR_OK upon sucessfull completion, an error code otherwise.
+ *@a_len: the length of *a_ruleset.
+ *
+ *Returns an array of pointers to selectors that matches
+ *the xml node given in parameter.
+ *
+ *Returns CR_OK upon sucessfull completion, an error code otherwise.
*/
enum CRStatus
cr_sel_eng_get_matched_rulesets (CRSelEng * a_this,
@@ -1531,8 +1545,10 @@ cr_sel_eng_get_matched_style (CRSelEng * a_this,
}
/**
+ * cr_sel_eng_destroy:
+ *@a_this: the current instance of the selection engine.
+ *
*The destructor of #CRSelEng
- *@param a_this the current instance of the selection engine.
*/
void
cr_sel_eng_destroy (CRSelEng * a_this)
diff --git a/src/cr-selector.c b/src/cr-selector.c
index 5f7316a..2dd5491 100644
--- a/src/cr-selector.c
+++ b/src/cr-selector.c
@@ -25,10 +25,14 @@
#include "cr-parser.h"
/**
- *Creates a new instance of #CRSelector.
- *@param a_simple_sel the initial simple selector list
+ * cr_selector_new:
+ *
+ *@a_simple_sel: the initial simple selector list
*of the current instance of #CRSelector.
- *@return the newly built instance of #CRSelector, or
+ *
+ *Creates a new instance of #CRSelector.
+ *
+ *Returns the newly built instance of #CRSelector, or
*NULL in case of failure.
*/
CRSelector *
@@ -61,10 +65,14 @@ cr_selector_parse_from_buf (const guchar * a_char_buf, enum CREncoding a_enc)
}
/**
+ * cr_selector_append:
+ *
+ *@a_this: the current instance of #CRSelector.
+ *@a_new: the instance of #CRSelector to be appended.
+ *
*Appends a new instance of #CRSelector to the current selector list.
- *@param a_this the current instance of #CRSelector.
- *@param a_new the instance of #CRSelector to be appended.
- *@return the new list.
+ *
+ *Returns the new list.
*/
CRSelector *
cr_selector_append (CRSelector * a_this, CRSelector * a_new)
@@ -85,10 +93,14 @@ cr_selector_append (CRSelector * a_this, CRSelector * a_new)
}
/**
+ * cr_selector_prepend:
+ *
+ *@a_this: the current instance of #CRSelector list.
+ *@a_new: the instance of #CRSelector.
+ *
*Prepends an element to the #CRSelector list.
- *@param a_this the current instance of #CRSelector list.
- *@param a_new the instance of #CRSelector.
- *@return the new list.
+ *
+ *Returns the new list.
*/
CRSelector *
cr_selector_prepend (CRSelector * a_this, CRSelector * a_new)
@@ -104,10 +116,14 @@ cr_selector_prepend (CRSelector * a_this, CRSelector * a_new)
}
/**
+ * cr_selector_append_simple_sel:
+ *
+ *@a_this: the current instance of #CRSelector.
+ *@a_simple_sel: the simple selector to append.
+ *
*append a simple selector to the current #CRSelector list.
- *@param a_this the current instance of #CRSelector.
- *@param a_simple_sel the simple selector to append.
- *@return the new list or NULL in case of failure.
+ *
+ *Returns the new list or NULL in case of failure.
*/
CRSelector *
cr_selector_append_simple_sel (CRSelector * a_this,
@@ -164,9 +180,12 @@ cr_selector_to_string (CRSelector * a_this)
}
/**
+ * cr_selector_dump:
+ *
+ *@a_this: the current instance of #CRSelector.
+ *@a_fp: the destination file.
+ *
*Serializes the current instance of #CRSelector to a file.
- *@param a_this the current instance of #CRSelector.
- *@param a_fp the destination file.
*/
void
cr_selector_dump (CRSelector * a_this, FILE * a_fp)
@@ -184,9 +203,12 @@ cr_selector_dump (CRSelector * a_this, FILE * a_fp)
}
/**
+ * cr_selector_ref:
+ *
+ *@a_this: the current instance of #CRSelector.
+ *
*Increments the ref count of the current instance
*of #CRSelector.
- *@param a_this the current instance of #CRSelector.
*/
void
cr_selector_ref (CRSelector * a_this)
@@ -197,12 +219,16 @@ cr_selector_ref (CRSelector * a_this)
}
/**
+ * cr_selector_unref:
+ *
+ *@a_this: the current instance of #CRSelector.
+ *
*Decrements the ref count of the current instance of
*#CRSelector.
*If the ref count reaches zero, the current instance of
*#CRSelector is destroyed.
- *@param a_this the current instance of #CRSelector.
- *@return TRUE if this function destroyed the current instance
+ *
+ *Returns TRUE if this function destroyed the current instance
*of #CRSelector, FALSE otherwise.
*/
gboolean
@@ -223,8 +249,11 @@ cr_selector_unref (CRSelector * a_this)
}
/**
+ * cr_selector_destroy:
+ *
+ *@a_this: the current instance of #CRSelector.
+ *
*Destroys the selector list.
- *@param a_this the current instance of #CRSelector.
*/
void
cr_selector_destroy (CRSelector * a_this)
diff --git a/src/cr-simple-sel.c b/src/cr-simple-sel.c
index 1b941da..f753a45 100644
--- a/src/cr-simple-sel.c
+++ b/src/cr-simple-sel.c
@@ -26,9 +26,11 @@
#include "cr-simple-sel.h"
/**
+ * cr_simple_sel_new:
+ *
*The constructor of #CRSimpleSel.
*
- *@return the new instance of #CRSimpleSel.
+ *Returns the new instance of #CRSimpleSel.
*/
CRSimpleSel *
cr_simple_sel_new (void)
@@ -46,11 +48,13 @@ cr_simple_sel_new (void)
}
/**
+ * cr_simple_sel_append_simple_sel:
+ *
*Appends a simpe selector to the current list of simple selector.
*
- *@param a_this the this pointer of the current instance of #CRSimpleSel.
- *@param a_sel the simple selector to append.
- *@return the new list upon successfull completion, an error code otherwise.
+ *@a_this: the this pointer of the current instance of #CRSimpleSel.
+ *@a_sel: the simple selector to append.
+ *Returns: the new list upon successfull completion, an error code otherwise.
*/
CRSimpleSel *
cr_simple_sel_append_simple_sel (CRSimpleSel * a_this, CRSimpleSel * a_sel)
@@ -71,10 +75,14 @@ cr_simple_sel_append_simple_sel (CRSimpleSel * a_this, CRSimpleSel * a_sel)
}
/**
+ * cr_simple_sel_prepend_simple_sel:
+ *
+ *@a_this: the this pointer of the current instance of #CRSimpleSel.
+ *@a_sel: the simple selector to prepend.
+ *
*Prepends a simple selector to the current list of simple selectors.
- *@param a_this the this pointer of the current instance of #CRSimpleSel.
- *@param a_sel the simple selector to prepend.
- *@return the new list upon successfull completion, an error code otherwise.
+ *
+ *Returns the new list upon successfull completion, an error code otherwise.
*/
CRSimpleSel *
cr_simple_sel_prepend_simple_sel (CRSimpleSel * a_this, CRSimpleSel * a_sel)
@@ -194,12 +202,14 @@ cr_simple_sel_one_to_string (CRSimpleSel * a_this)
}
/**
+ * cr_simple_sel_dump:
+ *@a_this: the current instance of #CRSimpleSel.
+ *@a_fp: the destination file pointer.
+ *
*Dumps the selector to a file.
*TODO: add the support of unicode in the dump.
*
- *@param a_this the current instance of #CRSimpleSel.
- *@param a_fp the destination file pointer.
- *@return CR_OK upon successfull completion, an error code
+ *Returns CR_OK upon successfull completion, an error code
*otherwise.
*/
enum CRStatus
@@ -222,10 +232,14 @@ cr_simple_sel_dump (CRSimpleSel * a_this, FILE * a_fp)
}
/**
+ * cr_simple_sel_compute_specificity:
+ *
+ *@a_this: the current instance of #CRSimpleSel
+ *
*Computes the selector (combinator separated list of simple selectors)
*as defined in the css2 spec in chapter 6.4.3
- *@param a_this the current instance of #CRSimpleSel
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_simple_sel_compute_specificity (CRSimpleSel * a_this)
@@ -278,10 +292,12 @@ cr_simple_sel_compute_specificity (CRSimpleSel * a_this)
}
/**
+ * cr_simple_sel_destroy:
+ *
+ *@a_this: the this pointer of the current instance of #CRSimpleSel.
+ *
*The destructor of the current instance of
*#CRSimpleSel.
- *@param a_this the this pointer of the current instance of #CRSimpleSel.
- *
*/
void
cr_simple_sel_destroy (CRSimpleSel * a_this)
diff --git a/src/cr-simple-sel.h b/src/cr-simple-sel.h
index 29033af..6c35ec7 100644
--- a/src/cr-simple-sel.h
+++ b/src/cr-simple-sel.h
@@ -40,9 +40,9 @@ G_BEGIN_DECLS
enum Combinator
{
NO_COMBINATOR,
- COMB_WS,/*whitesape*/
- COMB_PLUS,
- COMB_GT/*greater than*/
+ COMB_WS,/*whitespace: descendent*/
+ COMB_PLUS,/*'+': preceded by*/
+ COMB_GT/*greater than ('>'): child*/
} ;
enum SimpleSelectorType
diff --git a/src/cr-statement.c b/src/cr-statement.c
index 7babd08..655446b 100644
--- a/src/cr-statement.c
+++ b/src/cr-statement.c
@@ -575,10 +575,14 @@ cr_statement_clear (CRStatement * a_this)
}
/**
+ * cr_statement_ruleset_to_string:
+ *
+ *@a_this: the current instance of #CRStatement
+ *@a_indent: the number of whitespace to use for indentation
+ *
*Serializes the ruleset statement into a string
- *@param a_this the current instance of #CRStatement
- *@param a_indent the number of whitespace to use for indentation
- *@return the newly allocated serialised string. Must be freed
+ *
+ *Returns the newly allocated serialised string. Must be freed
*by the caller, using g_free().
*/
static gchar *
@@ -634,11 +638,15 @@ cr_statement_ruleset_to_string (CRStatement * a_this, glong a_indent)
/**
- *Serializes a font face rule statement into a string.
- *@param a_this the current instance of #CRStatement to consider
+ * cr_statement_font_face_rule_to_string:
+ *
+ *@a_this: the current instance of #CRStatement to consider
*It must be a font face rule statement.
- *@param a_indent the number of white spaces of indentation.
- *@return the serialized string. Must be deallocated by the caller
+ *@a_indent: the number of white spaces of indentation.
+ *
+ *Serializes a font face rule statement into a string.
+ *
+ *Returns the serialized string. Must be deallocated by the caller
*using g_free().
*/
static gchar *
@@ -680,9 +688,12 @@ cr_statement_font_face_rule_to_string (CRStatement * a_this,
/**
+ * cr_statetement_charset_to_string:
+ *
*Serialises an @charset statement into a string.
- *@param a_this the statement to serialize.
- *@return the serialized charset statement. Must be
+ *@a_this: the statement to serialize.
+ *@a_indent: the number of indentation spaces
+ *Returns the serialized charset statement. Must be
*freed by the caller using g_free().
*/
static gchar *
@@ -722,10 +733,12 @@ cr_statement_charset_to_string (CRStatement *a_this,
/**
+ * cr_statement_at_page_rule_to_string:
+ *
*Serialises the at page rule statement into a string
- *@param a_this the current instance of #CRStatement. Must
+ *@a_this: the current instance of #CRStatement. Must
*be an "@page" rule statement.
- *@return the serialized string. Must be freed by the caller
+ *Returns the serialized string. Must be freed by the caller
*/
static gchar *
cr_statement_at_page_rule_to_string (CRStatement *a_this,
@@ -901,12 +914,16 @@ cr_statement_import_rule_to_string (CRStatement *a_this,
******************/
/**
+ * cr_statement_does_buf_parses_against_core:
+ *
+ *@a_buf: the buffer to parse.
+ *@a_encoding: the character encoding of a_buf.
+ *
*Tries to parse a buffer and says whether if the content of the buffer
*is a css statement as defined by the "Core CSS Grammar" (chapter 4 of the
*css spec) or not.
- *@param a_buf the buffer to parse.
- *@param a_encoding the character encoding of a_buf.
- *@return TRUE if the buffer parses against the core grammar, false otherwise.
+ *
+ *Returns TRUE if the buffer parses against the core grammar, false otherwise.
*/
gboolean
cr_statement_does_buf_parses_against_core (const guchar * a_buf,
@@ -939,12 +956,16 @@ cr_statement_does_buf_parses_against_core (const guchar * a_buf,
}
/**
+ * cr_statement_parse_from_buf:
+ *
+ *@a_buf: the buffer to parse.
+ *@a_encoding: the character encoding of a_buf.
+ *
*Parses a buffer that contains a css statement and returns
*an instance of #CRStatement in case of successfull parsing.
*TODO: at support of "@import" rules.
- *@param a_buf the buffer to parse.
- *@param a_encoding the character encoding of a_buf.
- *@return the newly built instance of #CRStatement in case
+ *
+ *Returns the newly built instance of #CRStatement in case
*of successfull parsing, NULL otherwise.
*/
CRStatement *
@@ -1009,11 +1030,15 @@ cr_statement_parse_from_buf (const guchar * a_buf, enum CREncoding a_encoding)
}
/**
+ * cr_statement_ruleset_parse_from_buf:
+ *
+ *@a_buf: the buffer to parse.
+ *@a_enc: the character encoding of a_buf.
+ *
*Parses a buffer that contains a ruleset statement an instanciates
*a #CRStatement of type RULESET_STMT.
- *@param a_buf the buffer to parse.
- *@param a_enc the character encoding of a_buf.
- *@param the newly built instance of #CRStatement in case of successfull parsing,
+ *
+ *Returns the newly built instance of #CRStatement in case of successfull parsing,
*NULL otherwise.
*/
CRStatement *
@@ -1073,15 +1098,19 @@ cr_statement_ruleset_parse_from_buf (const guchar * a_buf,
}
/**
- *Creates a new instance of #CRStatement of type
- *#CRRulSet.
- *@param a_sel_list the list of #CRSimpleSel (selectors)
+ * cr_statement_new_ruleset:
+ *
+ *@a_sel_list: the list of #CRSimpleSel (selectors)
*the rule applies to.
- *@param a_decl_list the list of instances of #CRDeclaration
+ *@a_decl_list: the list of instances of #CRDeclaration
*that composes the ruleset.
- *@param a_media_types a list of instances of GString that
+ *@a_media_types: a list of instances of GString that
*describe the media list this ruleset applies to.
- *@return the new instance of #CRStatement or NULL if something
+ *
+ *Creates a new instance of #CRStatement of type
+ *#CRRulSet.
+ *
+ *Returns the new instance of #CRStatement or NULL if something
*went wrong.
*/
CRStatement *
@@ -1140,11 +1169,15 @@ cr_statement_new_ruleset (CRStyleSheet * a_sheet,
}
/**
+ * cr_statement_at_media_rule_parse_from_buf:
+ *
+ *@a_buf: the input to parse.
+ *@a_enc: the encoding of the buffer.
+ *
*Parses a buffer that contains an "@media" declaration
*and builds an @media css statement.
- *@param a_buf the input to parse.
- *@param a_enc the encoding of the buffer.
- *@return the @media statement, or NULL if the buffer could not
+ *
+ *Returns the @media statement, or NULL if the buffer could not
*be successfully parsed.
*/
CRStatement *
@@ -1213,11 +1246,15 @@ cr_statement_at_media_rule_parse_from_buf (const guchar * a_buf,
}
/**
+ * cr_statement_new_at_media_rule:
+ *
+ *@a_ruleset: the ruleset statements contained
+ *in the @media rule.
+ *@a_media: the media string list. A list of GString pointers.
+ *
*Instanciates an instance of #CRStatement of type
*AT_MEDIA_RULE_STMT (@media ruleset).
- *@param a_ruleset the ruleset statements contained
- *in the @media rule.
- *@param a_media, the media string list. A list of GString pointers.
+ *
*/
CRStatement *
cr_statement_new_at_media_rule (CRStyleSheet * a_sheet,
@@ -1269,12 +1306,16 @@ cr_statement_new_at_media_rule (CRStyleSheet * a_sheet,
}
/**
+ * cr_statement_new_at_import_rule:
+ *
+ *@a_url: the url to connect to the get the file
+ *to be imported.
+ *@a_sheet: the imported parsed stylesheet.
+ *
*Creates a new instance of #CRStatment of type
*#CRAtImportRule.
- *@param a_url the url to connect to the get the file
- *to be imported.
- *@param a_sheet the imported parsed stylesheet.
- *@return the newly built instance of #CRStatement.
+ *
+ *Returns the newly built instance of #CRStatement.
*/
CRStatement *
cr_statement_new_at_import_rule (CRStyleSheet * a_container_sheet,
@@ -1313,11 +1354,15 @@ cr_statement_new_at_import_rule (CRStyleSheet * a_container_sheet,
}
/**
+ * cr_statement_at_import_rule_parse_from_buf:
+ *
+ *@a_buf: the buffer to parse.
+ *@a_encoding: the encoding of a_buf.
+ *
*Parses a buffer that contains an "@import" rule and
*instanciate a #CRStatement of type AT_IMPORT_RULE_STMT
- *@param a_buf the buffer to parse.
- *@param a_encoding the encoding of a_buf.
- *@return the newly built instance of #CRStatement in case of
+ *
+ *Returns the newly built instance of #CRStatement in case of
*a successfull parsing, NULL otherwise.
*/
CRStatement *
@@ -1385,13 +1430,17 @@ cr_statement_at_import_rule_parse_from_buf (const guchar * a_buf,
}
/**
- *Creates a new instance of #CRStatement of type
- *#CRAtPageRule.
- *@param a_decl_list a list of instances of #CRDeclarations
+ * cr_statement_new_at_page_rule:
+ *
+ *@a_decl_list: a list of instances of #CRDeclarations
*which is actually the list of declarations that applies to
*this page rule.
- *@param a_selector the page rule selector.
- *@return the newly built instance of #CRStatement or NULL
+ *@a_selector: the page rule selector.
+ *
+ *Creates a new instance of #CRStatement of type
+ *#CRAtPageRule.
+ *
+ *Returns the newly built instance of #CRStatement or NULL
*in case of error.
*/
CRStatement *
@@ -1433,11 +1482,15 @@ cr_statement_new_at_page_rule (CRStyleSheet * a_sheet,
}
/**
+ * cr_statement_at_page_rule_parse_from_buf:
+ *
+ *@a_buf: the character buffer to parse.
+ *@a_encoding: the character encoding of a_buf.
+ *
*Parses a buffer that contains an "@page" production and,
*if the parsing succeeds, builds the page statement.
- *@param a_buf the character buffer to parse.
- *@param a_encoding the character encoding of a_buf.
- *@return the newly built at page statement in case of successfull parsing,
+ *
+ *Returns the newly built at page statement in case of successfull parsing,
*NULL otherwise.
*/
CRStatement *
@@ -1502,12 +1555,16 @@ cr_statement_at_page_rule_parse_from_buf (const guchar * a_buf,
}
/**
- *Creates a new instance of #CRStatement of type
- *#CRAtCharsetRule.
- *@param a_charset the string representing the charset.
+ * cr_statement_new_at_charset_rule:
+ *
+ *@a_charset: the string representing the charset.
*Note that the newly built instance of #CRStatement becomes
*the owner of a_charset. The caller must not free a_charset !!!.
- *@return the newly built instance of #CRStatement or NULL
+ *
+ *Creates a new instance of #CRStatement of type
+ *#CRAtCharsetRule.
+ *
+ *Returns the newly built instance of #CRStatement or NULL
*if an error arises.
*/
CRStatement *
@@ -1543,11 +1600,15 @@ cr_statement_new_at_charset_rule (CRStyleSheet * a_sheet,
}
/**
+ * cr_statement_at_charset_rule_parse_from_buf:
+ *
+ *@a_buf: the buffer to parse.
+ *@a_encoding: the character encoding of the buffer.
+ *
*Parses a buffer that contains an '@charset' rule and
*creates an instance of #CRStatement of type AT_CHARSET_RULE_STMT.
- *@param a_buf the buffer to parse.
- *@param the character encoding of the buffer.
- *@return the newly built instance of #CRStatement.
+ *
+ *Returns the newly built instance of #CRStatement.
*/
CRStatement *
cr_statement_at_charset_rule_parse_from_buf (const guchar * a_buf,
@@ -1593,10 +1654,14 @@ cr_statement_at_charset_rule_parse_from_buf (const guchar * a_buf,
}
/**
- *Creates an instance of #CRStatement of type #CRAtFontFaceRule.
- *@param a_font_decls a list of instances of #CRDeclaration. Each declaration
+ * cr_statemeent_new_at_font_face_rule:
+ *
+ *@a_font_decls: a list of instances of #CRDeclaration. Each declaration
*is actually a font declaration.
- *@return the newly built instance of #CRStatement.
+ *
+ *Creates an instance of #CRStatement of type #CRAtFontFaceRule.
+ *
+ *Returns the newly built instance of #CRStatement.
*/
CRStatement *
cr_statement_new_at_font_face_rule (CRStyleSheet * a_sheet,
@@ -1631,11 +1696,16 @@ cr_statement_new_at_font_face_rule (CRStyleSheet * a_sheet,
}
/**
+ * cr_statement_font_face_rule_parse_from_buf:
+ *
+ *
+ *@a_buf: the buffer to parse.
+ *@a_encoding: the character encoding of a_buf.
+ *
*Parses a buffer that contains an "@font-face" rule and builds
*an instance of #CRStatement of type AT_FONT_FACE_RULE_STMT out of it.
- *@param a_buf the buffer to parse.
- *@param a_encoding the character encoding of a_buf.
- *@return the newly built instance of #CRStatement in case of successufull
+ *
+ *Returns the newly built instance of #CRStatement in case of successufull
*parsing, NULL otherwise.
*/
CRStatement *
@@ -1702,10 +1772,14 @@ cr_statement_font_face_rule_parse_from_buf (const guchar * a_buf,
}
/**
+ * cr_statement_set_parent_sheet:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *@a_sheet: the sheet that contains the current statement.
+ *
*Sets the container stylesheet.
- *@param a_this the current instance of #CRStatement.
- *@param a_sheet the sheet that contains the current statement.
- *@return CR_OK upon successfull completion, an errror code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an errror code otherwise.
*/
enum CRStatus
cr_statement_set_parent_sheet (CRStatement * a_this, CRStyleSheet * a_sheet)
@@ -1716,10 +1790,14 @@ cr_statement_set_parent_sheet (CRStatement * a_this, CRStyleSheet * a_sheet)
}
/**
+ * cr_statement_get_parent_sheet:
+ *
+ *@a_this: the current #CRStatement.
+ *@a_sheet: out parameter. A pointer to the sheets that
+ *
*Gets the sheets that contains the current statement.
- *@param a_this the current #CRStatement.
- *@param a_sheet out parameter. A pointer to the sheets that
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_get_parent_sheet (CRStatement * a_this, CRStyleSheet ** a_sheet)
@@ -1730,10 +1808,14 @@ cr_statement_get_parent_sheet (CRStatement * a_this, CRStyleSheet ** a_sheet)
}
/**
+ * cr_statement_append:
+ *
+ *@a_this: the current instance of the statement list.
+ *@a_new: a_new the new instance of #CRStatement to append.
+ *
*Appends a new statement to the statement list.
- *@param a_this the current instance of the statement list.
- *@param a_this a_new the new instance of #CRStatement to append.
- *@return the new list statement list, or NULL in cas of failure.
+ *
+ *Returns the new list statement list, or NULL in cas of failure.
*/
CRStatement *
cr_statement_append (CRStatement * a_this, CRStatement * a_new)
@@ -1756,11 +1838,15 @@ cr_statement_append (CRStatement * a_this, CRStatement * a_new)
}
/**
+ * cr_statement_prepend:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *@a_new: the new statement to prepend.
+ *
*Prepends the an instance of #CRStatement to
*the current statement list.
- *@param a_this the current instance of #CRStatement.
- *@param a_new the new statement to prepend.
- *@return the new list with the new statement prepended,
+ *
+ *Returns the new list with the new statement prepended,
*or NULL in case of an error.
*/
CRStatement *
@@ -1783,10 +1869,14 @@ cr_statement_prepend (CRStatement * a_this, CRStatement * a_new)
}
/**
+ * cr_statement_unlink:
+ *
+ *@a_this: the current statements list.
+ *@a_to_unlink: the statement to unlink from the list.
+ *Returns the new list where a_to_unlink has been unlinked
+ *
*Unlinks a statement from the statements list.
- *@param a_this the current statements list.
- *@param a_to_unlink the statement to unlink from the list.
- *@return the new list where a_to_unlink has been unlinked
+ *
*from, or NULL in case of error.
*/
CRStatement *
@@ -1830,9 +1920,13 @@ cr_statement_unlink (CRStatement * a_stmt)
}
/**
- *Return the number of rules in the statement list;
- *@param a_this the current instance of #CRStatement.
- *@return number of rules in the statement list.
+ * cr_statement_nr_rules:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *
+ *Gets the number of rules in the statement list;
+ *
+ *Returns number of rules in the statement list.
*/
gint
cr_statement_nr_rules (CRStatement * a_this)
@@ -1848,10 +1942,14 @@ cr_statement_nr_rules (CRStatement * a_this)
}
/**
+ * cr_statement_get_from_list:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *@itemnr: the index into the statement list.
+ *
*Use an index to get a CRStatement from the statement list.
- *@param a_this the current instance of #CRStatement.
- *@param itemnr the index into the statement list.
- *@return CRStatement at position itemnr, if itemnr > number of statements - 1,
+ *
+ *Returns CRStatement at position itemnr, if itemnr > number of statements - 1,
*it will return NULL.
*/
CRStatement *
@@ -1869,13 +1967,17 @@ cr_statement_get_from_list (CRStatement * a_this, int itemnr)
}
/**
- *Sets a selector list to a ruleset statement.
- *@param a_this the current ruleset statement.
- *@param a_sel_list the selector list to set. Note
+ * cr_statement_ruleset_set_sel_list:
+ *
+ *@a_this: the current ruleset statement.
+ *@a_sel_list: the selector list to set. Note
*that this function increments the ref count of a_sel_list.
*The sel list will be destroyed at the destruction of the
*current instance of #CRStatement.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Sets a selector list to a ruleset statement.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_ruleset_set_sel_list (CRStatement * a_this,
@@ -1896,12 +1998,16 @@ cr_statement_ruleset_set_sel_list (CRStatement * a_this,
}
/**
+ * cr_statement_ruleset_get_declarations:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *@a_decl_list: out parameter. A pointer to the the returned
+ *list of declaration. Must not be NULL.
+ *
*Gets a pointer to the list of declaration contained
*in the ruleset statement.
- *@param a_this the current instance of #CRStatement.
- *@a_decl_list out parameter. A pointer to the the returned
- *list of declaration. Must not be NULL.
- *@return CR_OK upon successfull completion, an error code if something
+ *
+ *Returns CR_OK upon successfull completion, an error code if something
*bad happened.
*/
enum CRStatus
@@ -1919,12 +2025,16 @@ cr_statement_ruleset_get_declarations (CRStatement * a_this,
}
/**
+ * cr_statement_get_sel_list:
+ *
+ *@a_this: the current ruleset statement.
+ *@a_list: out parameter. The returned selector list,
+ *if and only if the function returned CR_OK.
+ *
*Gets a pointer to the selector list contained in
*the current ruleset statement.
- *@param a_this the current ruleset statement.
- *@param a_list out parameter. The returned selector list,
- *if and only if the function returned CR_OK.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_ruleset_get_sel_list (CRStatement * a_this, CRSelector ** a_list)
@@ -1938,11 +2048,15 @@ cr_statement_ruleset_get_sel_list (CRStatement * a_this, CRSelector ** a_list)
}
/**
- *Sets a declaration list to the current ruleset statement.
- *@param a_this the current ruleset statement.
- *@param a_list the declaration list to be added to the current
+ * cr_statement_ruleset_sel_decl_list:
+ *
+ *@a_this: the current ruleset statement.
+ *@a_list: the declaration list to be added to the current
*ruleset statement.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Sets a declaration list to the current ruleset statement.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_ruleset_set_decl_list (CRStatement * a_this,
@@ -1964,11 +2078,15 @@ cr_statement_ruleset_set_decl_list (CRStatement * a_this,
}
/**
+ * cr_statement_ruleset_append_decl2:
+ *
+ *@a_this: the current statement.
+ *@a_prop: the property of the declaration.
+ *@a_value: the value of the declaration.
+ *
*Appends a declaration to the current ruleset statement.
- *@param a_this the current statement.
- *@param a_prop the property of the declaration.
- *@param a_value the value of the declaration.
- *@return CR_OK uppon successfull completion, an error code
+ *
+ *@Returns CR_OK uppon successfull completion, an error code
*otherwise.
*/
enum CRStatus
@@ -1991,10 +2109,13 @@ cr_statement_ruleset_append_decl2 (CRStatement * a_this,
}
/**
+ * cr_statement_ruleset_append_decl:
+ *
*Appends a declaration to the current statement.
- *@param a_this the current statement.
- *@param a_declaration the declaration to append.
- *@return CR_OK upon sucessfull completion, an error code
+ *
+ *@a_this: the current statement.
+ *@a_declaration: the declaration to append.
+ *Returns CR_OK upon sucessfull completion, an error code
*otherwise.
*/
enum CRStatus
@@ -2015,13 +2136,15 @@ cr_statement_ruleset_append_decl (CRStatement * a_this,
}
/**
+ * cr_statement_ruleset_append_decl:
+ *
*Sets a stylesheet to the current @import rule.
- *@param a_this the current @import rule.
- *@param a_sheet the stylesheet. The stylesheet is owned
+ *@a_this: the current @import rule.
+ *@a_sheet: the stylesheet. The stylesheet is owned
*by the current instance of #CRStatement, that is, the
*stylesheet will be destroyed when the current instance
*of #CRStatement will be destroyed.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_import_rule_set_imported_sheet (CRStatement * a_this,
@@ -2038,11 +2161,14 @@ cr_statement_at_import_rule_set_imported_sheet (CRStatement * a_this,
}
/**
- *Gets the stylesheet contained by the @import rule statement.
- *@param a_this the current @import rule statement.
- *@param a_sheet out parameter. The returned stylesheet if and
+ * cr_statement_at_import_rule_get_importe_sheet:
+ *
+ *@a_this: the current @import rule statement.
+ *@a_sheet: out parameter. The returned stylesheet if and
*only if the function returns CR_OK.
- *@return CR_OK upon sucessfull completion, an error code otherwise.
+ *
+ *Gets the stylesheet contained by the @import rule statement.
+ *Returns CR_OK upon sucessfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_import_rule_get_imported_sheet (CRStatement * a_this,
@@ -2058,10 +2184,14 @@ cr_statement_at_import_rule_get_imported_sheet (CRStatement * a_this,
}
/**
+ * cr_statement_at_import_rule_set_url:
+ *
+ *@a_this: the current @import rule statement.
+ *@a_url: the url to set.
+ *
*Sets an url to the current @import rule statement.
- *@param a_this the current @import rule statement.
- *@param a_url the url to set.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_import_rule_set_url (CRStatement * a_this,
@@ -2082,10 +2212,14 @@ cr_statement_at_import_rule_set_url (CRStatement * a_this,
}
/**
- *Gets the url of the @import rule statement.
- *@param the current @import rule statement.
- *@param a_url out parameter. The returned url if
+ * cr_statement_at_import_rule_get_url:
+ *
+ *@a_this: the current @import rule statement.
+ *@a_url: out parameter. The returned url if
*and only if the function returned CR_OK.
+ *
+ *Gets the url of the @import rule statement.
+ *Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_import_rule_get_url (CRStatement * a_this,
@@ -2102,9 +2236,10 @@ cr_statement_at_import_rule_get_url (CRStatement * a_this,
}
/**
- *Return the number of rules in the media rule;
- *@param a_this the current instance of #CRStatement.
- *@return number of rules in the media rule.
+ * cr_statement_at_media_nr_rules:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *Returns the number of rules in the media rule;
*/
int
cr_statement_at_media_nr_rules (CRStatement * a_this)
@@ -2117,10 +2252,14 @@ cr_statement_at_media_nr_rules (CRStatement * a_this)
}
/**
+ * cr_statement_at_media_get_from_list:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *@itemnr: the index into the media rule list of rules.
+ *
*Use an index to get a CRStatement from the media rule list of rules.
- *@param a_this the current instance of #CRStatement.
- *@param itemnr the index into the media rule list of rules.
- *@return CRStatement at position itemnr, if itemnr > number of rules - 1,
+ *
+ *Returns CRStatement at position itemnr, if itemnr > number of rules - 1,
*it will return NULL.
*/
CRStatement *
@@ -2135,11 +2274,15 @@ cr_statement_at_media_get_from_list (CRStatement * a_this, int itemnr)
}
/**
- *Sets a declaration list to the current @page rule statement.
- *@param a_this the current @page rule statement.
- *@param a_decl_list the declaration list to add. Will be freed
+ * cr_statement_at_page_rule_get_declarations:
+ *
+ *@a_this: the current @page rule statement.
+ *@a_decl_list: the declaration list to add. Will be freed
*by the current instance of #CRStatement when it is destroyed.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Sets a declaration list to the current @page rule statement.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_page_rule_set_declarations (CRStatement * a_this,
@@ -2163,11 +2306,15 @@ cr_statement_at_page_rule_set_declarations (CRStatement * a_this,
}
/**
+ * cr_statemenet_at_page_rule_get_declarations:
+ *
+ *@a_this: the current @page rule statement.
+ *@a_decl_list: out parameter. The returned declaration list.
+ *
*Gets the declaration list associated to the current @page rule
*statement.
- *@param a_this the current @page rule statement.
- *@param a_decl_list out parameter. The returned declaration list.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_page_rule_get_declarations (CRStatement * a_this,
@@ -2183,10 +2330,15 @@ cr_statement_at_page_rule_get_declarations (CRStatement * a_this,
}
/**
+ * cr_statement_at_charset_rule_set_charset:
+ *
+ *
+ *@a_this: the current @charset rule statement.
+ *@a_charset: the charset to set.
+ *
*Sets the charset of the current @charset rule statement.
- *@param a_this the current @charset rule statement.
- *@param a_charset the charset to set.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_charset_rule_set_charset (CRStatement * a_this,
@@ -2205,11 +2357,15 @@ cr_statement_at_charset_rule_set_charset (CRStatement * a_this,
}
/**
+ * cr_statement_at_charset_rule_get_charset:
+ *@a_this: the current @charset rule statement.
+ *@a_charset: out parameter. The returned charset string if
+ *and only if the function returned CR_OK.
+ *
*Gets the charset string associated to the current
*@charset rule statement.
- *@param a_this the current @charset rule statement.
- *@param a_charset out parameter. The returned charset string if
- *and only if the function returned CR_OK.
+ *
+ * Returns CR_OK upon successful completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_charset_rule_get_charset (CRStatement * a_this,
@@ -2226,10 +2382,14 @@ cr_statement_at_charset_rule_get_charset (CRStatement * a_this,
}
/**
+ * cr_statement_at_font_face_rule_set_decls:
+ *
+ *@a_this: the current @font-face rule statement.
+ *@a_decls: the declarations list to set.
+ *
*Sets a declaration list to the current @font-face rule statement.
- *@param a_this the current @font-face rule statement.
- *@param a_decls the declarations list to set.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_font_face_rule_set_decls (CRStatement * a_this,
@@ -2251,12 +2411,16 @@ cr_statement_at_font_face_rule_set_decls (CRStatement * a_this,
}
/**
+ * cr_statement_at_fot_face_rule_set_decls:
+ *
+ *@a_this: the current @font-face rule statement.
+ *@a_decls: out parameter. The returned declaration list if
+ *and only if this function returns CR_OK.
+ *
*Gets the declaration list associated to the current instance
*of @font-face rule statement.
- *@param a_this the current @font-face rule statement.
- *@param a_decls out parameter. The returned declaration list if
- *and only if this function returns CR_OK.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_font_face_rule_get_decls (CRStatement * a_this,
@@ -2273,12 +2437,16 @@ cr_statement_at_font_face_rule_get_decls (CRStatement * a_this,
}
/**
+ * cr_statement_at_font_face_rule_add_decl:
+ *
+ *@a_this: the current @font-face rule statement.
+ *@a_prop: the property of the declaration.
+ *@a_value: the value of the declaration.
+ *
*Adds a declaration to the current @font-face rule
*statement.
- *@param a_this the current @font-face rule statement.
- *@param a_prop the property of the declaration.
- *@param a_value the value of the declaration.
- *@return CR_OK upon successfull completion, an error code otherwise.
+ *
+ *Returns CR_OK upon successfull completion, an error code otherwise.
*/
enum CRStatus
cr_statement_at_font_face_rule_add_decl (CRStatement * a_this,
@@ -2305,11 +2473,16 @@ cr_statement_at_font_face_rule_add_decl (CRStatement * a_this,
return CR_OK;
}
+
/**
+ * cr_statement_to_string:
+ *
+ *@a_this: the current statement to serialize
+ *@a_indent: the number of white space of indentation.
+ *
*Serializes a css statement into a string
- *@param a_this the current statement to serialize
- *@param a_indent the number of white space of indentation.
- *@return the serialized statement. Must be freed by the caller
+ *
+ *Returns the serialized statement. Must be freed by the caller
*using g_free().
*/
gchar *
@@ -2392,10 +2565,13 @@ cr_statement_list_to_string (CRStatement *a_this, gulong a_indent)
}
/**
+ * cr_statement_dump:
+ *
+ *@a_this: the current css2 statement.
+ *@a_fp: the destination file pointer.
+ *@a_indent: the number of white space indentation characters.
+ *
*Dumps the css2 statement to a file.
- *@param a_this the current css2 statement.
- *@param a_fp the destination file pointer.
- *@param a_indent the number of white space indentation characters.
*/
void
cr_statement_dump (CRStatement * a_this, FILE * a_fp, gulong a_indent)
@@ -2414,10 +2590,13 @@ cr_statement_dump (CRStatement * a_this, FILE * a_fp, gulong a_indent)
}
/**
+ * cr_statement_dump_ruleset:
+ *
+ *@a_this: the current instance of #CRStatement.
+ *@a_fp: the destination file pointer.
+ *@a_indent: the number of indentation white spaces to add.
+ *
*Dumps a ruleset statement to a file.
- *@param a_this the current instance of #CRStatement.
- *@param a_fp the destination file pointer.
- *@param a_indent the number of indentation white spaces to add.
*/
void
cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent)
@@ -2434,10 +2613,13 @@ cr_statement_dump_ruleset (CRStatement * a_this, FILE * a_fp, glong a_indent)
}
/**
+ * cr_statement_dump_font_face_rule:
+ *
+ *@a_this: the current instance of font face rule statement.
+ *@a_fp: the destination file pointer.
+ *@a_indent: the number of white space indentation.
+ *
*Dumps a font face rule statement to a file.
- *@param a_this the current instance of font face rule statement.
- *@param a_fp the destination file pointer.
- *@param a_indent the number of white space indentation.
*/
void
cr_statement_dump_font_face_rule (CRStatement * a_this, FILE * a_fp,
@@ -2457,10 +2639,13 @@ cr_statement_dump_font_face_rule (CRStatement * a_this, FILE * a_fp,
}
/**
+ * cr_statement_dump_charset:
+ *
+ *@a_this: the current instance of the @charset rule statement.
+ *@a_fp: the destination file pointer.
+ *@a_indent: the number of indentation white spaces.
+ *
*Dumps an @charset rule statement to a file.
- *@param a_this the current instance of the @charset rule statement.
- *@param a_fp the destination file pointer.
- *@param a_indent the number of indentation white spaces.
*/
void
cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent)
@@ -2480,10 +2665,13 @@ cr_statement_dump_charset (CRStatement * a_this, FILE * a_fp, gulong a_indent)
/**
+ * cr_statement_dump_page:
+ *
+ *@a_this: the statement to dump on stdout.
+ *@a_fp: the destination file pointer.
+ *@a_indent: the number of indentation white spaces.
+ *
*Dumps an @page rule statement on stdout.
- *@param a_this the statement to dump on stdout.
- *@param a_fp the destination file pointer.
- *@param a_indent the number of indentation white spaces.
*/
void
cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent)
@@ -2504,10 +2692,13 @@ cr_statement_dump_page (CRStatement * a_this, FILE * a_fp, gulong a_indent)
/**
+ * cr_statement_dump_media_rule:
+ *
+ *@a_this: the statement to dump.
+ *@a_fp: the destination file pointer
+ *@a_indent: the number of white spaces indentation.
+ *
*Dumps an @media rule statement to a file.
- *@param a_this the statement to dump.
- *@param a_fp the destination file pointer
- *@param a_indent the number of white spaces indentation.
*/
void
cr_statement_dump_media_rule (CRStatement * a_this,
@@ -2526,9 +2717,12 @@ cr_statement_dump_media_rule (CRStatement * a_this,
}
/**
+ * cr_statement_dump_import_rule:
+ *
+ *@a_fp: the destination file pointer.
+ *@a_indent: the number of white space indentations.
+ *
*Dumps an @import rule statement to a file.
- *@param a_fp the destination file pointer.
- *@param a_indent the number of white space indentations.
*/
void
cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp,
@@ -2549,6 +2743,9 @@ cr_statement_dump_import_rule (CRStatement * a_this, FILE * a_fp,
}
/**
+ * cr_statement_destroy:
+ *
+ * @a_this: the current instance of #CRStatement.
*Destructor of #CRStatement.
*/
void
diff --git a/src/cr-statement.h b/src/cr-statement.h
index 5639ab7..9e44e1d 100644
--- a/src/cr-statement.h
+++ b/src/cr-statement.h
@@ -176,8 +176,8 @@ enum CRStatementType
*The abstraction of css statement as defined
*in the chapter 4 and appendix D.1 of the css2 spec.
*A statement is actually a double chained list of
- *statements.A statement can be a ruleset, an @import
- *rule, an @page rule etc ...
+ *statements.A statement can be a ruleset, an \@import
+ *rule, an \@page rule etc ...
*/
struct _CRStatement
{
diff --git a/src/cr-string.h b/src/cr-string.h
index d83888f..2564534 100644
--- a/src/cr-string.h
+++ b/src/cr-string.h
@@ -32,6 +32,8 @@
#include "cr-utils.h"
#include "cr-parsing-location.h"
+G_BEGIN_DECLS
+
typedef struct _CRString CRString ;
/**
@@ -69,4 +71,6 @@ const gchar *cr_string_peek_raw_str (CRString *a_this) ;
gint cr_string_peek_raw_str_len (CRString *a_this) ;
void cr_string_destroy (CRString *a_this) ;
+G_END_DECLS
+
#endif
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9bcb645..e54313f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -27,6 +27,6 @@ test6_LDFLAGS=$(EXTRALDFLAGS)
croco_lib=$(top_builddir)/src/@CROCO_LIB@
LDADD=$(croco_lib)
-INCLUDES=-I$(top_srcdir)/intl -I$(top_srcdir)/src
+INCLUDES=-I$(top_srcdir)/intl -I$(top_srcdir)/src -I$(top_builddir)/src
AM_CFLAGS=-I. @LIBXML2_CFLAGS@ @GLIB2_CFLAGS@
diff --git a/tests/test-functional-notation.sh b/tests/test-functional-notation.sh
index 5d23685..b53974c 100755
--- a/tests/test-functional-notation.sh
+++ b/tests/test-functional-notation.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. global-test-vars.sh
$CSSLINT $TEST_INPUTS_DIR/functional-notation.css
diff --git a/tests/test-lots-of-comments.sh b/tests/test-lots-of-comments.sh
index c47a6c2..f403831 100755
--- a/tests/test-lots-of-comments.sh
+++ b/tests/test-lots-of-comments.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. global-test-vars.sh
$CSSLINT $TEST_INPUTS_DIR/lots-of-comments.css
diff --git a/tests/test-parsing-location.sh b/tests/test-parsing-location.sh
index 70fa409..e37e089 100755
--- a/tests/test-parsing-location.sh
+++ b/tests/test-parsing-location.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. global-test-vars.sh
$CSSLINT --dump-location $TEST_INPUTS_DIR/parsing-location.css
diff --git a/tests/test-prop-ident.sh b/tests/test-prop-ident.sh
index e07005d..4689d13 100755
--- a/tests/test-prop-ident.sh
+++ b/tests/test-prop-ident.sh
@@ -1,6 +1,5 @@
-#!/bin/sh
+#! /bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. global-test-vars.sh
-$CSSLINT $TEST_INPUTS_DIR/prop-vendor-ident.css
+$CSSLINT "$TEST_INPUTS_DIR"/prop-vendor-ident.css
diff --git a/tests/test-sel-child-class.sh b/tests/test-sel-child-class.sh
index cb1e4d3..16589ec 100755
--- a/tests/test-sel-child-class.sh
+++ b/tests/test-sel-child-class.sh
@@ -1,6 +1,5 @@
#!/bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. global-test-vars.sh
$CSSLINT -e --user-sheet $TEST_INPUTS_DIR/sel-child-class.css --xml $TEST_INPUTS_DIR/sel-child-class.xml --xpath /test/body/div/div/p
diff --git a/tests/test-several-media.sh b/tests/test-several-media.sh
index 394d43a..7b0279d 100755
--- a/tests/test-several-media.sh
+++ b/tests/test-several-media.sh
@@ -1,6 +1,5 @@
-#!/bin/sh
+#! /bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. global-test-vars.sh
-$CSSLINT $TEST_INPUTS_DIR/several-media.css
+$CSSLINT "$TEST_INPUTS_DIR"/several-media.css
diff --git a/tests/test-unknown-at-rule.sh b/tests/test-unknown-at-rule.sh
index a9de6c8..5059cd1 100755
--- a/tests/test-unknown-at-rule.sh
+++ b/tests/test-unknown-at-rule.sh
@@ -1,6 +1,5 @@
-#!/bin/sh
+#! /bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. ./global-test-vars.sh
-$CSSLINT $TEST_INPUTS_DIR/unknown-at-rule.css
+$CSSLINT "$TEST_INPUTS_DIR"/unknown-at-rule.css
diff --git a/tests/test-unknown-at-rule2.sh b/tests/test-unknown-at-rule2.sh
index 8b421ad..54b4ff2 100755
--- a/tests/test-unknown-at-rule2.sh
+++ b/tests/test-unknown-at-rule2.sh
@@ -1,6 +1,5 @@
-#!/bin/sh
+#! /bin/sh
-HERE_DIR=`dirname $0`
-. $HERE_DIR/global-vars.sh
+. ./global-test-vars.sh
-$CSSLINT $TEST_INPUTS_DIR/unknown-at-rule2.css
+$CSSLINT "$TEST_INPUTS_DIR"/unknown-at-rule2.css
diff --git a/tests/testctl b/tests/testctl
index 88dba5e..68f5190 100755
--- a/tests/testctl
+++ b/tests/testctl
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
#####################################
#This script just runs the tests of
@@ -9,8 +9,20 @@
#just to run 'testctl run' and see the result.
####################################
-#the directory that contains the tests
-HERE=`dirname $0`
+#the directory that contains the tests sources is:
+#$TEST_SOURCE_DIR. User can set this var in the environment
+#before calling this script. Otherwise, we set it to a default value
+if test x$TEST_SOURCE_DIR = x ; then
+ TEST_SOURCE_DIR=`dirname "$0"`
+fi
+
+#the directory that contains the test outputs is:
+#$TEST_OUT_DIR
+#User can set this var in the environment before
+#calling this script. Otherwise, we set it to a default value.
+if test x$TEST_OUT_DIR = x ; then
+ TEST_OUT_DIR=tests
+fi
#the list of tests to be run
@@ -117,7 +129,7 @@ parse_command_line ()
#builds the list of available test functions.
build_tests_list ()
{
- for TEST_PROG in `find $HERE -type f -print | egrep ^$HERE/test\(\([-0-9a-zA-Z_]\)+\)?\(\.sh\)?$ | grep -v testctl` ; do
+ for TEST_PROG in "$TEST_SOURCE_DIR"/test*.sh "$TEST_OUT_DIR"/test?; do
TEST_PROG=`basename $TEST_PROG`
echo "run test: $TEST_PROG"
TEST_PROG_LIST="$TEST_PROG_LIST $TEST_PROG"
@@ -132,23 +144,23 @@ build_tests_list ()
#if no, means that the output of the test is to be saved as a result of a test.
run_test_prog ()
{
- TEST_PROG=$1
- REFERENCE=$2
- DISPLAY_ON_STDOUT=$3
+ TEST_PROG="$1"
+ REFERENCE="$2"
+ DISPLAY_ON_STDOUT="$3"
OUTPUT_DIR=
OUTPUT_SUFFIX=
TEST_INPUT_LIST=
- VALGRIND_OPTIONS="--error-limit=no --num-callers=100 --logfile=$HERE/$VALGRIND_LOGS_DIR/$TEST_PROG-valgrind.log --leak-check=yes --show-reachable=yes --quiet --suppressions=$HERE/vg.supp"
+ VALGRIND_OPTIONS="--error-limit=no --num-callers=100 --logfile=$TEST_OUT_DIR/$VALGRIND_LOGS_DIR/$TEST_PROG-valgrind.log --leak-check=yes --show-reachable=yes --quiet --suppressions=$TEST_SOURCE_DIR/vg.supp"
if test x$RUN_VALGRIND = xno ; then
VALGRIND=
else
- if ! test -x $HERE/valgrind-version.sh ; then
- echo "Argh! Could not find file $HERE/valgrind-version.sh"
+ if ! test -x "$TEST_SOURCE_DIR"/valgrind-version.sh ; then
+ echo "Argh! Could not find file $TEST_SOURCE_DIR/valgrind-version.sh"
exit -1 ;
fi
- version=`$HERE/valgrind-version.sh`
+ version=`"$TEST_SOURCE_DIR"/valgrind-version.sh`
if ! test "x$version" = "xokay" ; then
- echo "You must install a valgrind versin greater than 2.1.1"
+ echo "You must install a valgrind version greater than 2.1.1"
echo "version=$version"
exit -1
fi
@@ -166,36 +178,30 @@ run_test_prog ()
fi
fi
export VALGRIND
- is_shell_script=`echo $TEST_PROG | egrep "(.*)?.sh"`
- if test x$is_shell_script = x ; then
- is_shell_script=no
- else
- is_shell_script=yes
- fi
+ case "$TEST_PROG" in
+ *.sh) is_shell_script=yes ;;
+ *) is_shell_script=no ;;
+ esac
- if ! test -d $HERE/$VALGRIND_LOGS_DIR ; then
- mkdir $HERE/$VALGRIND_LOGS_DIR
+ if ! test -d "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR" ; then
+ mkdir "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR"
fi
- for TEST_INPUT in `ls -1 $HERE/$TEST_INPUT_DIR | egrep ^${TEST_PROG}\([\.0-9]\)+\css\$` ; do
+ for TEST_INPUT in `ls -1 "$TEST_SOURCE_DIR/$TEST_INPUT_DIR" | egrep "^${TEST_PROG}"'[.0-9]+css$'` ; do
TEST_INPUT_LIST="$TEST_INPUT_LIST $TEST_INPUT"
done
if test "$REFERENCE" = "yes" ; then
- OUTPUT_DIR=$HERE/$TEST_OUT_REF_DIR
+ OUTPUT_DIR="$TEST_SOURCE_DIR/$TEST_OUT_REF_DIR"
OUTPUT_SUFFIX=.out
-
- if test ! -d $HERE/$OUTPUT_DIR ; then
- mkdir $HERE/$OUTPUT_DIR
- fi
else
- if test ! -d $HERE/$TEST_OUTPUT_DIR/ ; then
- echo "creating tmp directory $$HERE/$TEST_OUTPUT_DIR ..."
- mkdir $HERE/$TEST_OUTPUT_DIR ;
+ OUTPUT_DIR="$TEST_OUT_DIR/$TEST_OUTPUT_DIR"
+ OUTPUT_SUFFIX=.out
+ if test ! -d "$OUTPUT_DIR" ; then
+ echo "creating tmp directory $OUTPUT_DIR ..."
+ mkdir "$OUTPUT_DIR"
echo "done"
fi
- OUTPUT_DIR=$HERE/$TEST_OUTPUT_DIR
- OUTPUT_SUFFIX=.out
fi
if test "empty$TEST_INPUT_LIST" != "empty" ; then
@@ -203,44 +209,44 @@ run_test_prog ()
TEST_INPUT_NAME=`basename $TEST_INPUT .sh`
if test "$DISPLAY_ON_STDOUT" = "yes" ; then
echo "###############################################"
- echo "launching $VALGRIND $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT"....
+ echo "launching $VALGRIND $TEST_PROG $TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT"....
echo "###############################################"
if test x$is_shell_script = xyes ; then
- $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT
+ "$TEST_SOURCE_DIR/$TEST_PROG" "$TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT"
else
- $VALGRIND $HERE/.libs/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT
+ $VALGRIND "$TEST_OUT_DIR/.libs/$TEST_PROG" "$TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT"
fi
echo "###############################################"
echo "done"
echo "###############################################"
echo ""
else
- echo "executing $VALGRIND $HERE/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX} ..."
- $VALGRIND $HERE/.libs/$TEST_PROG $HERE/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}
+ echo "executing $VALGRIND $TEST_PROG $TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT > $OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX} ..."
+ $VALGRIND "$TEST_OUT_DIR/.libs/$TEST_PROG" "$TEST_SOURCE_DIR/$TEST_INPUT_DIR/$TEST_INPUT" > "$OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}"
echo "done"
fi
done
else
if test "$DISPLAY_ON_STDOUT" = "yes" ; then
echo "####################################################"
- echo "launching $VALGRIND $HERE/$TEST_PROG ..."
+ echo "launching $VALGRIND $TEST_PROG ..."
echo "####################################################"
if test x$is_shell_script = xyes ; then
- $HERE/$TEST_PROG
+ "$TEST_SOURCE_DIR/$TEST_PROG"
else
- $VALGRIND $HERE/.libs/$TEST_PROG
+ $VALGRIND "$TEST_OUT_DIR/.libs/$TEST_PROG"
fi
echo "####################################################"
echo "done"
echo "####################################################"
echo ""
else
- TEST_INPUT_NAME=`basename $TEST_PROG .sh`
- echo "executing $VALGRIND $HERE/$TEST_PROG > $OUTPUT_DIR/${TEST_PROG}${OUTPUT_SUFFIX} ..."
+ TEST_INPUT_NAME=`basename "$TEST_PROG" .sh`
+ echo "executing $VALGRIND $TEST_PROG > $OUTPUT_DIR/${TEST_PROG}${OUTPUT_SUFFIX} ..."
if test x$is_shell_script = xyes ; then
- $HERE/$TEST_PROG > $OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}
+ "$TEST_SOURCE_DIR/$TEST_PROG" > "$OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}"
else
- $VALGRIND $HERE/.libs/$TEST_PROG > $OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}
+ $VALGRIND "$TEST_OUT_DIR/.libs/$TEST_PROG" > "$OUTPUT_DIR/${TEST_INPUT_NAME}${OUTPUT_SUFFIX}"
fi
echo "done"
fi
@@ -250,46 +256,46 @@ run_test_prog ()
cleanup_tests ()
{
- if test -d $HERE/$TEST_OUTPUT_DIR ; then
- echo "removing $HERE/$TEST_OUTPUT_DIR"
- rm -rf $HERE/$TEST_OUTPUT_DIR/*
- rm -rf $HERE/$VALGRIND_LOGS_DIR
+ if test -d "$TEST_OUT_DIR/$TEST_OUTPUT_DIR" ; then
+ echo "removing $TEST_OUT_DIR/$TEST_OUTPUT_DIR/*"
+ rm -rf "$TEST_OUT_DIR/$TEST_OUTPUT_DIR"
+ rm -rf "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR"
fi
- if test -f $HERE/$ERROR_REPORT_FILE ; then
- rm $HERE/$ERROR_REPORT_FILE
+ if test -f "$TEST_OUT_DIR/$ERROR_REPORT_FILE" ; then
+ rm "$TEST_OUT_DIR/$ERROR_REPORT_FILE"
fi
}
run_test_report ()
{
- diff -ur --exclude=*CVS* --exclude=*cvs* --exclude=Makefile* --exclude=.arch-ids $HERE/$TEST_OUT_REF_DIR $HERE/$TEST_OUTPUT_DIR > /tmp/toto$$
- NB_DIFF=`cat /tmp/toto$$ | wc -l`
+ diff -ur --exclude='*CVS*' --exclude='*cvs*' --exclude='Makefile*' --exclude=.arch-ids "$TEST_SOURCE_DIR/$TEST_OUT_REF_DIR" "$TEST_OUT_DIR/$TEST_OUTPUT_DIR" > "$TEST_OUT_DIR/tmpdiff.$$"
+ NB_DIFF=`wc -l < "$TEST_OUT_DIR/tmpdiff.$$"`
if test "$NB_DIFF" -eq 0 ; then
echo "/////////////ALL THE TESTS ARE OK :) //////////////////"
- rm /tmp/toto$$
+ rm "$TEST_OUT_DIR/tmpdiff.$$"
else
echo "SOME TESTS ARE KO :("
- mv /tmp/toto$$ $HERE/$ERROR_REPORT_FILE
- echo "See $HERE/$ERROR_REPORT_FILE to see what's going on"
+ mv "$TEST_OUT_DIR/tmpdiff.$$" "$TEST_OUT_DIR/$ERROR_REPORT_FILE"
+ echo "See $TEST_OUT_DIR/$ERROR_REPORT_FILE to see what's going on"
fi
###################
#Valgrind errors #
###################
memleaks=no
- for vg_log in `find $HERE/$VALGRIND_LOGS_DIR -name "*-valgrind.log*" -print` ; do
- if test -s $vg_log ; then
- leaks=`cat $vg_log | grep -i leak | grep -v no`
- errors=`cat $vg_log | grep -w Invalid`
+ for vg_log in `find "$TEST_OUT_DIR/$VALGRIND_LOGS_DIR" -name '*-valgrind.log*' -print` ; do
+ if test -s "$vg_log" ; then
+ leaks=`cat "$vg_log" | grep -i leak | grep -v no`
+ errors=`cat "$vg_log" | grep -w Invalid`
if test "x$leaks" = "x" -a "x$errors" = "x" ; then
- rm -f $vg_log ;
+ rm -f "$vg_log" ;
else
echo "valgrind reported some memory leaks/corruptions in $vg_log"
memleaks=yes
fi
else
- rm $vg_log
+ rm "$vg_log"
fi
done
if test "x$RUN_VALGRIND" = "xyes" ; then
@@ -303,7 +309,7 @@ run_test_report ()
############################
#Executes the "run" command along with
-#it's command options.
+#its command options.
#For the sake of safety checking
############################
execute_run_cmd ()
@@ -352,12 +358,12 @@ execute_run_cmd ()
fi
for TEST in $TEST_PROG_LIST ; do
- run_test_prog $TEST no no;
+ run_test_prog "$TEST" no no;
done
run_test_report ;
else
#run the test and display result on stdout
- run_test_prog $TEST_PROG no yes ;
+ run_test_prog "$TEST_PROG" no yes ;
fi
}
@@ -372,12 +378,12 @@ execute_run_cmd ()
#############################
execute_command ()
{
- arg=$1 ;
+ arg="$1" ;
case "$arg" in
run)
- execute_run_cmd $@
+ execute_run_cmd "$@"
;;
ref)
@@ -388,7 +394,7 @@ execute_command ()
fi
for TEST in $TEST_PROG_LIST ; do
- run_test_prog $TEST yes no;
+ run_test_prog "$TEST" yes no;
done
;;
diff --git a/tests/valgrind-version.sh b/tests/valgrind-version.sh
index fbfd326..55cbfc2 100755
--- a/tests/valgrind-version.sh
+++ b/tests/valgrind-version.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#! /bin/sh
valgrind=`which valgrind`
awk=`which awk`