[gxml] Added Autotools and GObject Introspection support.
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Added Autotools and GObject Introspection support.
- Date: Thu, 17 Nov 2011 22:52:39 +0000 (UTC)
commit 1e6c23966d7c9fc979832b6ae2f9e00904ff51d7
Author: Daniel Espinosa Ortiz <despinosa git gnome org>
Date: Mon Nov 14 16:42:33 2011 -0600
Added Autotools and GObject Introspection support.
ChangeLog | 2 +
Makefile.am | 31 +
autogen.sh | 157 ++++
configure.ac | 77 ++
gxml/Makefile.am | 93 +++
gxml/libgxml-1.0.pc.in | 13 +
po/LINGUAS | 2 +
po/Makefile.in.in | 217 ++++++
po/POTFILES.in | 3 +
vapi/Makefile.am | 3 +
vapi/config.vapi | 11 +
vapi/libxml-2.0.vapi | 1869 ++++++++++++++++++++++++++++++++++++++++++++++++
12 files changed, 2478 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..139597f
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2 @@
+
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..89ca7bf
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,31 @@
+## Process this file with automake to produce Makefile.in
+## Created by Anjuta
+
+SUBDIRS = gxml po
+
+gxmldocdir = ${prefix}/doc/gxml
+gxmldoc_DATA = \
+ README\
+ COPYING\
+ AUTHORS\
+ ChangeLog\
+ INSTALL\
+ NEWS
+
+
+INTLTOOL_FILES = intltool-extract.in \
+ intltool-merge.in \
+ intltool-update.in
+
+EXTRA_DIST = $(gxmldoc_DATA) \
+ $(INTLTOOL_FILES)
+
+DISTCLEANFILES = intltool-extract \
+ intltool-merge \
+ intltool-update \
+ po/.intltool-merge-cache
+
+
+# Remove doc directory on uninstall
+uninstall-local:
+ -rm -r $(gxmldocdir)
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..d4437e3
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,157 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+DIE=0
+
+if [ -n "$GNOME2_DIR" ]; then
+ ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS"
+ LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH"
+ PATH="$GNOME2_DIR/bin:$PATH"
+ export PATH
+ export LD_LIBRARY_PATH
+fi
+
+(test -f $srcdir/configure.ac) || {
+ echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+ echo " top-level package directory"
+ exit 1
+}
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`autoconf' installed."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && {
+ (intltoolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`intltool' installed."
+ echo "You can get it from:"
+ echo " ftp://ftp.gnome.org/pub/GNOME/"
+ DIE=1
+ }
+}
+
+(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && {
+ (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`xml-i18n-toolize' installed."
+ echo "You can get it from:"
+ echo " ftp://ftp.gnome.org/pub/GNOME/"
+ DIE=1
+ }
+}
+
+(grep "^LT_INIT" $srcdir/configure.ac >/dev/null) && {
+ (libtool --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`libtool' installed."
+ echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+ }
+}
+
+(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && {
+ (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \
+ (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`glib' installed."
+ echo "You can get it from: ftp://ftp.gtk.org/pub/gtk"
+ DIE=1
+ }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: You must have \`automake' installed."
+ echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+ NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "**Error**: Missing \`aclocal'. The version of \`automake'"
+ echo "installed doesn't appear recent enough."
+ echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
+fi
+
+if test -z "$*"; then
+ echo "**Warning**: I am going to run \`configure' with no arguments."
+ echo "If you wish to pass any to it, please specify them on the"
+ echo \`$0\'" command line."
+ echo
+fi
+
+case $CC in
+xlc )
+ am_opt=--include-deps;;
+esac
+
+for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print`
+do
+ dr=`dirname $coin`
+ if test -f $dr/NO-AUTO-GEN; then
+ echo skipping $dr -- flagged as no auto-gen
+ else
+ echo processing $dr
+ ( cd $dr
+
+ aclocalinclude="$ACLOCAL_FLAGS"
+
+ if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
+ echo "Creating $dr/aclocal.m4 ..."
+ test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+ echo "Running glib-gettextize... Ignore non-fatal messages."
+ echo "no" | glib-gettextize --force --copy
+ echo "Making $dr/aclocal.m4 writable ..."
+ test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+ fi
+ if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then
+ echo "Running intltoolize..."
+ intltoolize --copy --force --automake
+ fi
+ if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then
+ echo "Running xml-i18n-toolize..."
+ xml-i18n-toolize --copy --force --automake
+ fi
+ if grep "^LT_INIT" configure.ac >/dev/null; then
+ if test -z "$NO_LIBTOOLIZE" ; then
+ echo "Running libtoolize..."
+ libtoolize --force --copy
+ fi
+ fi
+ echo "Running aclocal $aclocalinclude ..."
+ aclocal $aclocalinclude
+ if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
+ echo "Running autoheader..."
+ autoheader
+ fi
+ echo "Running automake --gnu $am_opt ..."
+ automake --add-missing --gnu $am_opt
+ echo "Running autoconf ..."
+ autoconf
+ )
+ fi
+done
+
+if test x$NOCONFIGURE = x; then
+ echo Running $srcdir/configure "$@" ...
+ $srcdir/configure "$@" \
+ && echo Now type \`make\' to compile. || exit 1
+else
+ echo Skipping configure process.
+fi
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..5544066
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,77 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl Created by Anjuta application wizard.
+
+AC_INIT(gxml, 1.0)
+
+AC_CONFIG_HEADERS([config.h])
+
+AM_INIT_AUTOMAKE([1.11])
+
+AM_SILENT_RULES([yes])
+
+AC_PROG_CC
+
+
+
+
+dnl ***************************************************************************
+dnl Internationalization
+dnl ***************************************************************************
+IT_PROG_INTLTOOL([0.35.0])
+
+GETTEXT_PACKAGE=gxml
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
+AM_GLIB_GNU_GETTEXT
+
+
+LT_INIT
+
+dnl Check for GLib
+GLIB_REQUIRED=2.16.0
+
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+dnl Check for vala
+VALA_MODULES="libvala-0.14 >= 0.14"
+
+PKG_CHECK_MODULES(VALA, $VALA_MODULES)
+AC_SUBST(VALA_CFLAGS)
+AC_SUBST(VALA_LIBS)
+VALA_BINDIR=`pkg-config $VALA_MODULES --variable=bindir`
+AC_SUBST(VALA_BINDIR)
+VALA_COMPILER="$VALA_BINDIR/valac"
+AC_SUBST(VALA_COMPILER)
+VALA_VAPIGEN=`pkg-config $VALA_MODULES --variable=vapigen`
+AM_CONDITIONAL(HAVE_VAPIGEN, test x$VALA_VAPIGEN != x"")
+VALA_VAPIDIR=`pkg-config $VALA_MODULES --variable=vapidir`
+AC_SUBST(VALA_VAPIDIR)
+
+dnl Check for libgee
+GEE_REQUIRED="0.6.2"
+
+PKG_CHECK_MODULES(GEE, gee-1.0 >= $GEE_REQUIRED)
+AC_SUBST(GEE_CFLAGS)
+AC_SUBST(GEE_LIBS)
+
+dnl Check for libxml2
+LIBXML_REQUIRED="2.7"
+
+PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= $LIBXML_REQUIRED)
+AC_SUBST(LIBXML_CFLAGS)
+AC_SUBST(LIBXML_LIBS)
+
+dnl Check for GIO
+GIO_MODULES="gio-2.0 >= 2.16"
+PKG_CHECK_MODULES(GIO, $GIO_MODULES)
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+
+
+AC_OUTPUT([
+Makefile
+gxml/libgxml-1.0.pc
+gxml/Makefile
+po/Makefile.in])
diff --git a/gxml/Makefile.am b/gxml/Makefile.am
new file mode 100644
index 0000000..8108666
--- /dev/null
+++ b/gxml/Makefile.am
@@ -0,0 +1,93 @@
+## Process this file with automake to produce Makefile.in
+
+## Created by Anjuta
+
+NULL =
+
+
+AM_CPPFLAGS = \
+ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+ -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
+ -DPACKAGE_DATA_DIR=\""$(datadir)"\"
+
+BUILT_SOURCES = gxml.vala.stamp
+CLEANFILES = gxml.vala.stamp
+
+AM_CFLAGS =\
+ -Wall\
+ -g \
+ $(GLIB_CFLAGS) \
+ $(LIBXML_CFLAGS) \
+ $(GIO_CFLAGS) \
+ $(GEE_CFLAGS) \
+ $(VALA_CFLAGS) \
+ $(NULL)
+
+lib_LTLIBRARIES = libgxml.la
+
+VALAFLAGS = \
+ $(top_srcdir)/vapi/config.vapi \
+ --pkg libxml-2.0 \
+ --pkg gee-1.0 \
+ --pkg gobject-2.0 \
+ --pkg gio-2.0 \
+ $(NULL)
+
+libgxml_la_VALASOURCES = \
+ Attr.vala \
+ BackedNode.vala \
+ CDATASection.vala \
+ CharacterData.vala \
+ Comment.vala \
+ Document.vala \
+ DocumentFragment.vala \
+ DocumentType.vala \
+ DomError.vala \
+ Element.vala \
+ Entity.vala \
+ EntityReference.vala \
+ Implementation.vala \
+ NamespaceAttr.vala \
+ NodeList.vala \
+ NodeType.vala \
+ Notation.vala \
+ ProcessingInstruction.vala \
+ Text.vala \
+ XNode.vala \
+ $(NULL)
+
+libgxml_la_SOURCES = \
+ gxml.vala.stamp \
+ $(libgxml_la_VALASOURCES:.vala=.c) \
+ $(NULL)
+
+gxml-1.0.vapi gxml.vala.stamp: $(libgxml_la_VALASOURCES)
+ $(VALA_COMPILER) $(VALAFLAGS) -C -H gxml.h --gir=GXml-1.0.gir --vapidir=$(top_srcdir)/vapi --library gxml-1.0 $^
+ @touch $@
+
+CLEANFILES+= gxml-1.0.vapi GXml-1.0.gir
+
+libgxml_la_LDFLAGS =
+
+libgxml_la_LIBADD = \
+ $(GLIB_LIBS) \
+ $(LIBXML_LIBS) \
+ $(GIO_LIBS) \
+ $(GEE_LIBS) \
+ $(VALA_LIBS) \
+ $(NULL)
+
+include_HEADERS = \
+ gxml.h \
+ $(NULL)
+
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libgxml-1.0.pc
+
+EXTRA_DIST = \
+ libgxml-1.0.pc.in \
+ $(libgxml_la_VALASOURCES) \
+ gxml-1.0.vapi \
+ GXml-1.0.gir \
+ gxml.vala.stamp
diff --git a/gxml/libgxml-1.0.pc.in b/gxml/libgxml-1.0.pc.in
new file mode 100644
index 0000000..4a4a372
--- /dev/null
+++ b/gxml/libgxml-1.0.pc.in
@@ -0,0 +1,13 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+datarootdir= datarootdir@
+datadir= datadir@
+includedir= includedir@/libgxml-1.0
+
+Name: libgxml
+Description: Sample library created by Anjuta project wizard.
+Version: @VERSION@
+Requires:
+Libs: -L${libdir} -lgxml
+Cflags: -I${includedir}
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..e69de29
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..bc8cbb0
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,2 @@
+# please keep this list sorted alphabetically
+#
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..cc8a222
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,217 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper gnu ai mit edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey pwns gmail com>
+#
+# This file may be copied and used freely without restrictions. It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor redhat com> to use GETTEXT_PACKAGE
+# instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob ximian com> to install
+# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey pwns gmail com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.SUFFIXES:
+.SUFFIXES: .po .pox .gmo .mo .msg .cat
+
+.po.pox:
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
+
+.po.mo:
+ $(MSGFMT) -o $@ $<
+
+.po.gmo:
+ file=`echo $* | sed 's,.*/,,'`.gmo \
+ && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+ sed -f ../intl/po2msg.sed < $< > $*.msg \
+ && rm -f $@ && gencat $@ $*.msg
+
+
+all: all- USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+ $(GENPOT)
+
+install: install-data
+install-data: install-data- USE_NLS@
+install-data-no: all
+install-data-yes: all
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $$dir; \
+ if test -r $$lang.gmo; then \
+ $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+ else \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+ echo "installing $(srcdir)/$$lang.gmo as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo"; \
+ fi; \
+ if test -r $$lang.gmo.m; then \
+ $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ if test -r $(srcdir)/$$lang.gmo.m ; then \
+ $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+ $$dir/$(GETTEXT_PACKAGE).mo.m; \
+ echo "installing $(srcdir)/$$lang.gmo.m as" \
+ "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+ else \
+ true; \
+ fi; \
+ fi; \
+ done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info ctags tags CTAGS TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+ rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+ done
+
+check: all $(GETTEXT_PACKAGE).pot
+ rm -f missing notexist
+ srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+ if [ -r missing -o -r notexist ]; then \
+ exit 1; \
+ fi
+
+mostlyclean:
+ rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+ rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES stamp-it
+ rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ extra_dists="$(EXTRA_DISTFILES)"; \
+ for file in $$extra_dists; do \
+ test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+ done; \
+ for file in $$dists; do \
+ test -f $$file || file="$(srcdir)/$$file"; \
+ ln $$file $(distdir) 2> /dev/null \
+ || cp -p $$file $(distdir); \
+ done
+
+update-po: Makefile
+ $(MAKE) $(GETTEXT_PACKAGE).pot
+ tmpdir=`pwd`; \
+ linguas="$(USE_LINGUAS)"; \
+ for lang in $$linguas; do \
+ echo "$$lang:"; \
+ result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+ if $$result; then \
+ if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.gmo failed!"; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi; \
+ done
+
+Makefile POTFILES: stamp-it
+ @if test ! -f $@; then \
+ rm -f stamp-it; \
+ $(MAKE) stamp-it; \
+ fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+ $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..71a7163
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,3 @@
+# List of source files containing translatable strings.
+
+src/lib.c
diff --git a/vapi/Makefile.am b/vapi/Makefile.am
new file mode 100644
index 0000000..d614b25
--- /dev/null
+++ b/vapi/Makefile.am
@@ -0,0 +1,3 @@
+dist_noinst_DATA = \
+ config.vapi \
+ libxml-2.0.vapi
diff --git a/vapi/config.vapi b/vapi/config.vapi
new file mode 100644
index 0000000..ee98230
--- /dev/null
+++ b/vapi/config.vapi
@@ -0,0 +1,11 @@
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "config.h")]
+namespace Config {
+ public const string GETTEXT_PACKAGE;
+ public const string SPRITE_DIR;
+ public const string BACKGROUND_DIR;
+ public const string PACKAGE_DATA_DIR;
+ public const string PACKAGE_LOCALE_DIR;
+ public const string PACKAGE_NAME;
+ public const string PACKAGE_VERSION;
+ public const string VERSION;
+}
diff --git a/vapi/libxml-2.0.vapi b/vapi/libxml-2.0.vapi
new file mode 100644
index 0000000..a88a2e7
--- /dev/null
+++ b/vapi/libxml-2.0.vapi
@@ -0,0 +1,1869 @@
+/* libxml2.vala
+ *
+ * Copyright (C) 2006-2008 JÃrg Billeter, Raffaele Sandrini, Michael Lawrence
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * JÃrg Billeter <j bitron ch>
+ * Raffaele Sandrini <rasa gmx ch>
+ * Michael Lawrence <lawremi iastate edu>
+ * OndÅej Jirman <megous megous com>
+ */
+
+namespace Xml {
+ /* nanoftp - minimal FTP implementation */
+
+ [CCode (has_target = false, cname = "ftpDataCallback", cheader_filename = "libxml/nanoftp.h")]
+ public delegate void FtpDataCallback (void* userData, [CCode (array_length = false)] char[] data, int len);
+
+ [CCode (has_target = false, cname = "ftpListCallback", cheader_filename = "libxml/nanoftp.h")]
+ public delegate void FtpListCallback (void* userData, string filename, string attrib, string owner, string group, ulong size, int links, int year, string month, int day, int hour, int minute);
+
+ [Compact]
+ [CCode (cname = "void", free_function = "xmlNanoFTPFreeCtxt", cheader_filename = "libxml/nanoftp.h")]
+ public class NanoFTP {
+ [CCode (cname = "xmlNanoFTPCheckResponse")]
+ public int check_response ();
+
+ [CCode (cname = "xmlNanoFTPCleanup")]
+ public static void cleanup ();
+
+ [CCode (cname = "xmlNanoFTPClose")]
+ public int close ();
+
+ [CCode (cname = "xmlNanoFTPCloseConnection")]
+ public int close_connection ();
+
+ [CCode (cname = "xmlNanoFTPConnect")]
+ public int connect ();
+
+ [CCode (cname = "xmlNanoFTPConnectTo")]
+ public static NanoFTP* connect_to (string server, int port);
+
+ [CCode (cname = "xmlNanoFTPCwd")]
+ public int cwd (string directory);
+
+ [CCode (cname = "xmlNanoFTPDele")]
+ public int dele (string file);
+
+ [CCode (cname = "xmlNanoFTPGet")]
+ public int get (FtpDataCallback cb, void* user_data, string filename);
+
+ [CCode (cname = "xmlNanoFTPGetConnection")]
+ public int get_connection ();
+
+ [CCode (cname = "xmlNanoFTPGetResponse")]
+ public int get_response ();
+
+ [CCode (cname = "xmlNanoFTPGetSocket")]
+ public int get_socket (string filename);
+
+ [CCode (cname = "xmlNanoFTPInit")]
+ public static void init ();
+
+ [CCode (cname = "xmlNanoFTPList")]
+ public int list (FtpListCallback cb, void* user_data, string filename);
+
+ [CCode (cname = "xmlNanoFTPNewCtxt")]
+ public NanoFTP (string url);
+
+ [CCode (cname = "xmlNanoFTPOpen")]
+ public static NanoFTP* open (string url);
+
+ [CCode (cname = "xmlNanoFTPProxy")]
+ public static void proxy (string host, int port, string user, string passwd, int type);
+
+ [CCode (cname = "xmlNanoFTPQuit")]
+ public int quit ();
+
+ [CCode (cname = "xmlNanoFTPRead")]
+ public int read (void* dest, int len);
+
+ [CCode (cname = "xmlNanoFTPScanProxy")]
+ public static void scan_proxy (string url);
+
+ [CCode (cname = "xmlNanoFTPUpdateURL")]
+ public int update_url (string url);
+ }
+
+
+ /* nanohttp - minimal HTTP implementation */
+
+ [Compact]
+ [CCode (cname = "void", cheader_filename = "libxml/nanohttp.h")]
+ public class NanoHTTP {
+ [CCode (cname = "xmlNanoHTTPAuthHeader")]
+ public unowned string auth_header ();
+
+ [CCode (cname = "xmlNanoHTTPCleanup")]
+ public static void cleanup ();
+
+ [CCode (cname = "xmlNanoHTTPClose")]
+ public int close ();
+
+ [CCode (cname = "xmlNanoHTTPContentLength")]
+ public int content_length ();
+
+ [CCode (cname = "xmlNanoHTTPEncoding")]
+ public unowned string http_encoding ();
+
+ [CCode (cname = "xmlNanoHTTPFetch")]
+ public static int fetch (string url, string filename, out string content_type);
+
+ [CCode (cname = "xmlNanoHTTPInit")]
+ public static void init ();
+
+ [CCode (cname = "xmlNanoHTTPMethod")]
+ public static NanoHTTP* method (string url, string method, string input, out string content_type, string headers, int ilen);
+
+ [CCode (cname = "xmlNanoHTTPMethodRedir")]
+ public static NanoHTTP* method_redir (string url, string method, string input, out string content_type, out string redir, string headers, int ilen);
+
+ [CCode (cname = "xmlNanoHTTPMimeType")]
+ public string mime_type ();
+
+ [CCode (cname = "xmlNanoHTTPOpen")]
+ public static NanoHTTP* open (string url, out string content_type);
+
+ [CCode (cname = "xmlNanoHTTPOpenRedir")]
+ public static NanoHTTP* open_redir (string url, out string content_type, out string redir);
+
+ [CCode (cname = "xmlNanoHTTPRead")]
+ public int read (void* dest, int len);
+
+ [CCode (cname = "xmlNanoHTTPRedir")]
+ public unowned string redir ();
+
+ [CCode (cname = "xmlNanoHTTPReturnCode")]
+ public int return_code ();
+
+ [CCode (cname = "xmlNanoHTTPSave")]
+ public int save (string filename);
+
+ [CCode (cname = "xmlNanoHTTPScanProxy")]
+ public static void scan_proxy (string URL);
+ }
+
+
+ /* parser - the core parser module */
+
+ [CCode (cheader_filename = "libxml/parser.h")]
+ namespace Parser {
+ [CCode (cname = "xmlCleanupParser")]
+ public static void cleanup ();
+
+ [CCode (cname = "xmlInitParser")]
+ public static void init ();
+
+ [CCode (cname = "xmlParseDoc")]
+ public static Doc* parse_doc (string cur);
+
+ [CCode (cname = "xmlParseFile")]
+ public static Doc* parse_file (string filename);
+
+ [CCode (cname = "xmlParseMemory")]
+ public static Doc* parse_memory (string buffer, int size);
+
+ [CCode (cname = "xmlReadDoc")]
+ public static Doc* read_doc (string cur, string? url = null, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReadFd")]
+ public static Doc* read_fd (int fd, string? base_url = null, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReadFile")]
+ public static Doc* read_file (string filename, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReadMemory")]
+ public static Doc* read_memory (string text, int len, string? url = null, string? encoding = null, int options = 0);
+ }
+
+ [CCode (cname = "xmlParserOption", cprefix = "XML_PARSE_", cheader_filename = "libxml/parser.h")]
+ public enum ParserOption {
+ RECOVER,
+ NOENT,
+ DTDLOAD,
+ DTDATTR,
+ DTDVALID,
+ NOERROR,
+ NOWARNING,
+ PEDANTIC,
+ NOBLANKS,
+ SAX1,
+ XINCLUDE,
+ NONET,
+ NODICT,
+ NSCLEAN,
+ NOCDATA,
+ NOXINCNODE,
+ COMPACT,
+ }
+
+ [CCode (cname = "xmlCharEncoding", cprefix = "XML_CHAR_ENCODING_", cheader_filename = "libxml/encoding.h")]
+ public enum CharEncoding {
+ ERROR,
+ NONE,
+ UTF8,
+ UTF16LE,
+ UTF16BE,
+ UCS4LE,
+ UCS4BE,
+ EBCDIC,
+ UCS4_2143,
+ UCS4_3412,
+ UCS2,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_1")]
+ ISO_8859_1,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_2")]
+ ISO_8859_2,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_3")]
+ ISO_8859_3,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_4")]
+ ISO_8859_4,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_5")]
+ ISO_8859_5,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_6")]
+ ISO_8859_6,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_7")]
+ ISO_8859_7,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_8")]
+ ISO_8859_8,
+ [CCode (cname = "XML_CHAR_ENCODING_8859_9")]
+ ISO_8859_9,
+ ISO_2022_JP,
+ SHIFT_JIS,
+ EUC_JP,
+ ASCII,
+ }
+
+ /* tree - interfaces for tree manipulation */
+
+ [CCode (cheader_filename = "libxml/tree.h")]
+ namespace Tree {
+ [CCode (cname = "xmlGetCompressMode")]
+ public static int get_compress_mode ();
+
+ [CCode (cname = "xmlIsXHTML")]
+ public static int is_xhtml (string system_id, string public_id);
+
+ [CCode (cname = "xmlSetCompressMode")]
+ public static void set_compress_mode (int mode);
+ }
+
+ [Compact]
+ [CCode (cname = "xmlAttr", free_function = "xmlFreeProp", cheader_filename = "libxml/tree.h")]
+ public class Attr {
+ public ElementType type;
+ public weak string name;
+ public Node* children;
+ public Node* last;
+ public Node* parent;
+ public Attr* next;
+ public Attr* prev;
+ public Doc* doc;
+ public Ns* ns;
+ public AttributeType atype;
+
+ [CCode (cname = "xmlRemoveProp")]
+ public int remove();
+ }
+
+ [Compact]
+ [CCode (cname = "xmlAttribute", cheader_filename = "libxml/tree.h")]
+ public class Attribute {
+ public ElementType type;
+ public weak string name;
+ public Node* children;
+ public Node* last;
+ public Dtd* parent;
+ public Node* next;
+ public Node* prev;
+ public Doc* doc;
+ public Attribute* nexth;
+ public AttributeType atype;
+ public AttributeDefault def;
+ public weak string default_value;
+ public weak string prefix;
+ public weak string elem;
+ }
+
+ [CCode (cname = "xmlAttributeDefault", cprefix = "XML_ATTRIBUTE_", cheader_filename = "libxml/tree.h")]
+ public enum AttributeDefault {
+ NONE,
+ REQUIRED,
+ IMPLIED,
+ FIXED
+ }
+
+ [CCode (cname = "xmlAttributeType", cprefix = "XML_ATTRIBUTE_", cheader_filename = "libxml/tree.h")]
+ public enum AttributeType {
+ CDATA,
+ ID,
+ IDREF ,
+ IDREFS,
+ ENTITY,
+ ENTITIES,
+ NMTOKEN,
+ NMTOKENS,
+ ENUMERATION,
+ NOTATION
+ }
+
+ // TODO: what does has_target portend to?
+ [CCode (has_target = false, cname = "xmlHashScannerFull", cheader_filename = "libxml/hash.h")]
+ public delegate void ScannerFull (void *payload, void *user_data, string name, string name2, string name3);
+
+ // xmlHashFree takes a deallocator, how to specify?
+ [Compact] // TODO: what does Compact do?
+ [CCode (cname = "xmlHashTable", free_function = "xmlHashFree", cheader_filename="libxml/hash.h")]
+ public class HashTable {
+ [CCode (cname = "xmlHashScanFull")]
+ public void scan_full (ScannerFull f, void *user_data); // TODO: do we want to get rid of user data?
+ }
+
+ [Compact]
+ [CCode (cname = "xmlDoc", free_function = "xmlFreeDoc", cheader_filename = "libxml/tree.h,libxml/parser.h")]
+ public class Doc {
+ public ElementType type;
+ public string name;
+ public Node* children;
+ public Node* last;
+ public Node* parent;
+ public Node* next;
+ public Node* prev;
+ public Doc* doc;
+ public int compression;
+ public int standalone;
+ [CCode (cname = "intSubset")]
+ public Dtd* int_subset;
+ [CCode (cname = "extSubset")]
+ public Dtd* ext_subset;
+ public Ns* old_ns;
+ public weak string version;
+ public weak string encoding;
+ public weak string url;
+ public int charset;
+
+ [CCode (cname = "xmlCopyDoc")]
+ public Doc* copy (int recursive);
+
+ [CCode (cname = "xmlCreateIntSubset")]
+ public Dtd* create_int_subset (string name, string external_id, string system_id);
+
+ [CCode (cname = "xmlDocDump", instance_pos = -1)]
+#if POSIX
+ public int dump (Posix.FILE f);
+#else
+ public int dump (GLib.FileStream f);
+#endif
+
+ [CCode (cname = "xmlDocDumpFormatMemory")]
+ public void dump_memory_format (out string mem, out int len = null, bool format = true);
+
+ [CCode (cname = "xmlDocDumpFormatMemoryEnc")]
+ public void dump_memory_enc_format (out string mem, out int len = null, string enc = "UTF-8", bool format = true);
+
+ [CCode (cname = "xmlDocDumpMemory")]
+ public void dump_memory (out string mem, out int len = null);
+
+ [CCode (cname = "xmlDocDumpMemoryEnc")]
+ public void dump_memory_enc (out string mem, out int len = null, string enc = "UTF-8");
+
+ [CCode (cname = "xmlDocFormatDump", instance_pos = 1.1)]
+#if POSIX
+ public int dump_format (Posix.FILE f, bool format = true);
+#else
+ public int dump_format (GLib.FileStream f, bool format = true);
+#endif
+
+ [CCode (cname = "xmlDocGetRootElement")]
+ public Node* get_root_element();
+
+ [CCode (cname = "xmlDocSetRootElement")]
+ public Node* set_root_element(Node* root);
+
+ [CCode (cname = "xmlElemDump", instance_pos = 1.1)]
+#if POSIX
+ public void elem_dump (Posix.FILE f, Node* cur);
+#else
+ public void elem_dump (GLib.FileStream f, Node* cur);
+#endif
+
+ [CCode (cname = "xmlGetDocCompressMode")]
+ public int get_compress_mode ();
+
+ [CCode (cname = "xmlNewCDataBlock")]
+ public Node* new_cdata_block (string content, int len);
+
+ [CCode (cname = "xmlNewCharRef")]
+ public Node* new_char_ref (string name);
+
+ [CCode (cname = "xmlNewDoc")]
+ public Doc (string? version = null);
+
+ [CCode (cname = "xmlNewDocComment")]
+ public Node* new_comment (string content);
+
+ [CCode (cname = "xmlNewDocFragment")]
+ public Node* new_fragment ();
+
+ [CCode (cname = "xmlNewDocNode")]
+ public Node* new_node (Ns* ns, string name, string? content = null);
+
+ [CCode (cname = "xmlNewDocNodeEatName")]
+ public Node* new_node_eat_name (Ns* ns, owned string name, string? content = null);
+
+ [CCode (cname = "xmlNewDocPI")]
+ public Node* new_pi (string name, string content);
+
+ [CCode (cname = "xmlNewDocProp")]
+ public Attr* new_prop (string name, string value);
+
+ [CCode (cname = "xmlNewDocRawNode")]
+ public Node* new_raw_node (Ns* ns, string name, string? content = null);
+
+ [CCode (cname = "xmlNewDocText")]
+ public Node* new_text (string content);
+
+ [CCode (cname = "xmlNewDocTextLen")]
+ public Node* new_text_len (string content, int len);
+
+ [CCode (cname = "xmlNewReference")]
+ public Node* new_reference (string name);
+
+ [CCode (cname = "xmlNodeListGetRawString")]
+ public string node_list_get_raw_string (Node* list, bool in_line);
+
+ [CCode (cname = "xmlNodeListGetString")]
+ public string node_list_get_string (Node* list, bool in_line);
+
+ [CCode (cname = "xmlSaveFile", instance_pos = -1)]
+ public int save_file (string filename);
+
+ [CCode (cname = "xmlSaveFileEnc", instance_pos = 1.1)]
+ public void save_file_enc (string filename, string enc = "UTF-8");
+
+ [CCode (cname = "xmlSaveFormatFile", instance_pos = 1.1)]
+ public int save_format_file (string filename, int format);
+
+ [CCode (cname = "xmlSaveFormatFileEnc", instance_pos = 1.1)]
+ public void save_format_file_enc (string filename, string enc = "UTf-8", bool format = true);
+
+ [CCode (cname = "xmlSetDocCompressMode")]
+ public void set_compress_mode (int mode);
+
+ [CCode (cname = "xmlStringGetNodeList")]
+ public Node* string_get_node_list (string str);
+
+ [CCode (cname = "xmlStringLenGetNodeList")]
+ public Node* string_len_get_node_list (string str, int len);
+ }
+
+ [Compact]
+ [CCode (cname = "xmlDtd", free_function="xmlFreeDtd", cheader_filename = "libxml/tree.h")]
+ public class Dtd {
+ public ElementType type;
+ public string name;
+ public Node* children;
+ public Node* last;
+ public Node* parent;
+ public Node* next;
+ public Node* prev;
+ public Doc* doc;
+
+ public HashTable notations;
+ public HashTable elements;
+ public HashTable attributes;
+ public HashTable entities;
+
+ public weak string external_id;
+ public weak string system_id;
+
+ [CCode (cname = "xmlNewDtd")]
+ public Dtd (Doc* doc, string name, string external_id, string system_id);
+
+ [CCode (cname = "xmlCopyDtd")]
+ public Dtd* copy();
+ }
+
+ [Compact]
+ [CCode (cname = "xmlElement", cheader_filename = "libxml/tree.h")]
+ public class Element {
+ public ElementType type;
+ public weak string name;
+ public Node* children;
+ public Node* last;
+ public Dtd* parent;
+ public Node* next;
+ public Node* prev;
+ public Doc* doc;
+ public Attribute* attributes;
+ public weak string prefix;
+ }
+
+ [CCode (cname = "xmlElementType", cprefix = "XML_", cheader_filename = "libxml/tree.h")]
+ public enum ElementType {
+ ELEMENT_NODE,
+ ATTRIBUTE_NODE,
+ TEXT_NODE,
+ CDATA_SECTION_NODE,
+ ENTITY_REF_NODE,
+ ENTITY_NODE,
+ PI_NODE,
+ COMMENT_NODE,
+ DOCUMENT_NODE,
+ DOCUMENT_TYPE_NODE,
+ DOCUMENT_FRAG_NODE,
+ NOTATION_NODE,
+ HTML_DOCUMENT_NODE,
+ DTD_NODE,
+ ELEMENT_DECL,
+ ATTRIBUTE_DECL,
+ ENTITY_DECL,
+ NAMESPACE_DECL,
+ XINCLUDE_START,
+ XINCLUDE_END,
+ DOCB_DOCUMENT_NODE
+ }
+
+ [Compact]
+ [CCode (cname = "xmlElementContent", free_function = "xmlFreeElementContent", cheader_filename = "libxml/tree.h")]
+ public class ElementContent {
+ [CCode (cname = "xmlNewElementContent")]
+ ElementContent (string name, ElementContentType type);
+
+ public ElementContentType type;
+ public ElementContentOccur ocur;
+ public const string name;
+ public ElementContent c1;
+ public ElementContent c2;
+ public ElementContent parent;
+ public const string prefix;
+ }
+
+ [CCode (cname = "xmlElementContentType", cprefix = "XML_ELEMENT_CONTENT_", cheader_filename = "libxml/tree.h")]
+ public enum ElementContentType {
+ PCDATA,
+ ELEMENT,
+ SEQ,
+ OR
+ }
+
+ [CCode (cname = "xmlElementContentOccur", cprefix = "XML_ELEMENT_CONTENT_", cheader_filename = "libxml/tree.h")]
+ public enum ElementContentOccur {
+ ONCE,
+ OPT,
+ MULT,
+ PLUS
+ }
+
+ [Compact]
+ [CCode (cname = "xmlEntity", cheader_filename = "libxml/tree.h")]
+ public struct Entity {
+ public void* private;
+ public ElementType type;
+ public const string name;
+ public Node* children;
+ public Node* last;
+ public Dtd* parent;
+ public Node* next;
+ public Node* prev;
+ public Doc* doc;
+ public string orig;
+ public string content;
+ public int length;
+ public EntityType etype;
+ [CCode (cname = "ExternalID")]
+ public const string external_id;
+ [CCode (cname = "SystemID")]
+ public const string system_id;
+ public Entity* nexte;
+ [CCode (cname = "URI")]
+ public const string uri;
+ public int owner;
+ public int checked;
+ }
+
+ [CCode (cname = "xmlEntityType", cprefix = "XML_", cheader_filename = "libxml/tree.h")]
+ public enum EntityType {
+ INTERNAL_GENERAL_ENTITY,
+ EXTERNAL_GENERAL_PARSED_ENTITY,
+ EXTERNAL_GENERAL_UNPARSED_ENTITY,
+ INTERNAL_PARAMETER_ENTITY,
+ EXTERNAL_PARAMETER_ENTITY,
+ INTERNAL_PREDEFINED_ENTITY
+ }
+
+ [Compact]
+ [CCode (cname = "xmlEnumeration", cheader_filename = "libxml/tree.h")]
+ public struct Enumeration {
+ public Enumeration* next;
+ public const string name;
+ }
+
+
+ [Compact]
+ [CCode (cname = "xmlNode", free_function = "xmlFreeNode", cheader_filename = "libxml/tree.h")]
+ public class Node {
+ public ElementType type;
+ public weak string name;
+ public Node* children;
+ public Node* last;
+ public Node* parent;
+ public Node* next;
+ public Node* prev;
+ public Doc* doc;
+ public Ns* ns;
+ public string content;
+ public Attr* properties;
+ [CCode (cname = "nsDef")]
+ public Ns* ns_def;
+ public ushort line;
+ public ushort extra;
+
+ [CCode (cname = "xmlAddChild")]
+ public Node* add_child (Node* cur);
+
+ [CCode (cname = "xmlAddChildList")]
+ public Node* add_child_list (Node* cur);
+
+ [CCode (cname = "xmlAddNextSibling")]
+ public Node* add_next_sibling (Node* elem);
+
+ [CCode (cname = "xmlAddPrevSibling")]
+ public Node* add_prev_sibling (Node* elem);
+
+ [CCode (cname = "xmlAddSibling")]
+ public Node* add_sibling (Node* elem);
+
+ [CCode (cname = "xmlCopyNode")]
+ public Node* copy (int extended);
+
+ [CCode (cname = "xmlCopyNodeList")]
+ public Node copy_list();
+
+ [CCode (cname = "xmlDocCopyNode")]
+ public Node* doc_copy (Doc* doc, int extended);
+
+ [CCode (cname = "xmlDocCopyNodeList")]
+ public Node* doc_copy_list (Doc* doc);
+
+ [CCode (cname = "xmlFreeNodeList")]
+ public void free_list ();
+
+ [CCode (cname = "xmlGetLastChild")]
+ public Node* get_last_child ();
+
+ [CCode (cname = "xmlGetLineNo")]
+ public long get_line_no ();
+
+ [CCode (cname = "xmlGetNoNsProp")]
+ public string? get_no_ns_prop (string name);
+
+ [CCode (cname = "xmlGetNodePath")]
+ public string get_path ();
+
+ [CCode (cname = "xmlGetNsProp")]
+ public string? get_ns_prop (string name, string ns);
+
+ [CCode (cname = "xmlGetProp")]
+ public string? get_prop (string name);
+
+ [CCode (cname = "xmlHasNsProp")]
+ public Attr* has_ns_prop (string name, string name_space);
+
+ [CCode (cname = "xmlHasProp")]
+ public Attr* has_prop (string name);
+
+ [CCode (cname = "xmlIsBlankNode")]
+ public int is_blank ();
+
+ [CCode (cname = "xmlNewChild")]
+ public Node* new_child (Ns* ns, string name, string? content = null);
+
+ [CCode (cname = "xmlSetNs")]
+ public void set_ns (Ns* ns);
+
+ [CCode (cname = "xmlNewNs")]
+ public Ns* new_ns (string href, string prefix);
+
+ [CCode (cname = "xmlNewNsProp")]
+ public Attr* new_ns_prop (Ns* ns, string name, string value);
+
+ [CCode (cname = "xmlNewProp")]
+ public Attr* new_prop (string name, string value);
+
+ [CCode (cname = "xmlNewTextChild")]
+ public Node* new_text_child (Ns* ns, string name, string content);
+
+ [CCode (cname = "xmlNodeAddContent")]
+ public void add_content (string content);
+
+ [CCode (cname = "xmlNodeAddContentLen")]
+ public void add_content_len (string content, int len);
+
+ [CCode (cname = "xmlNodeGetContent")]
+ public string get_content();
+
+ [CCode (cname = "xmlNodeGetLang")]
+ public string get_lang();
+
+ [CCode (cname = "xmlNodeGetSpacePreserve")]
+ public int get_space_preserve();
+
+ [CCode (cname = "xmlNodeIsText")]
+ public int is_text();
+
+ [CCode (cname = "xmlNodeSetContent")]
+ public void set_content (string content);
+
+ [CCode (cname = "xmlNodeSetContentLen")]
+ public void set_content_len (string content, int len);
+
+ [CCode (cname = "xmlNodeSetLang")]
+ public void set_lang (string val);
+
+ [CCode (cname = "xmlNodeSetName")]
+ public void set_name (string name);
+
+ [CCode (cname = "xmlNodeSetSpacePreserve")]
+ public void set_space_preserve (int val);
+
+ [CCode (cname = "xmlReplaceNode")]
+ public Node* replace (Node* cur);
+
+ [CCode (cname = "xmlNewComment")]
+ public Node.comment (string content);
+
+ [CCode (cname = "xmlNewNode")]
+ public Node (Ns* ns, string name);
+
+ [CCode (cname = "xmlNewNodeEatName")]
+ public Node.eat_name (Ns* ns, owned string name);
+
+ [CCode (cname = "xmlNewText")]
+ public Node.text (string content);
+
+ [CCode (cname = "xmlNewTextLen")]
+ public Node.text_len (string content, int len);
+
+ [CCode (cname = "xmlNewPI")]
+ public Node.pi (string name, string content);
+
+ [CCode (cname = "xmlSetListDoc")]
+ public void set_list_doc (Doc* doc);
+
+ [CCode (cname = "xmlSetNsProp")]
+ public Attr* set_ns_prop (Ns* ns, string name, string value);
+
+ [CCode (cname = "xmlSetProp")]
+ public Attr* set_prop (string name, string value);
+
+ [CCode (cname = "xmlSetTreeDoc")]
+ public void set_tree_doc (Doc* doc);
+
+ [CCode (cname = "xmlTextConcat")]
+ public int text_concat (string content, int len);
+
+ [CCode (cname = "xmlTextMerge")]
+ public Node* text_merge (Node* second);
+
+ [CCode (cname = "xmlUnlinkNode")]
+ public void unlink ();
+
+ [CCode (cname = "xmlUnsetNsProp")]
+ public int unset_ns_prop (Ns* ns, string name);
+
+ [CCode (cname = "xmlUnsetProp")]
+ public int unset_prop (string name);
+
+ [CCode (cname = "xmlNextElementSibling")]
+ public Node* next_element_sibling ();
+
+ [CCode (cname = "xmlFirstElementChild")]
+ public Node* first_element_child ();
+
+ [CCode (cname = "xmlChildElementCount")]
+ public ulong child_element_count ();
+ }
+
+ [Compact]
+ [CCode (cname = "xmlNs", free_function= "xmlFreeNs", cheader_filename = "libxml/tree.h")]
+ public class Ns {
+ [CCode (cname = "xmlNewNs")]
+ public Ns (Xml.Node* node, string href, string prefix);
+ public Ns* next;
+ public ElementType type;
+ public string href;
+ public string prefix;
+ public Doc* context;
+ }
+
+ [Compact]
+ [CCode (cname = "xmlBuffer", free_function = "xmlBufferFree", cheader_filename = "libxml/tree.h")]
+ public class Buffer {
+ [CCode (cname = "xmlBufferCreate")]
+ public Buffer ();
+
+ [CCode (cname = "xmlBufferContent")]
+ public string content ();
+
+ [CCode (cname = "xmlNodeDump")]
+ public int node_dump (Xml.Doc *doc, Xml.Node *cur, int level, int format);
+ }
+
+ [Compact]
+ [CCode (cname = "xmlSaveCtxt", free_function = "xmlSaveClose", cheader_filename = "libxml/xmlsave.h")]
+ public class SaveCtxt {
+ [CCode (cname = "xmlSaveToIO")] // , instance_pos = -1)]
+ public SaveCtxt.to_io (OutputWriteCallback iowrite, OutputCloseCallback ioclose, void * ioctx, string? encoding, int options = 0);
+
+ // [CCode (cname = "xmlSaveClose")]
+ // public int close ();
+ [CCode (cname = "xmlSaveFlush")]
+ public int flush ();
+ [CCode (cname = "xmlSaveDoc")]
+ public int save_doc (Xml.Doc *doc);
+ [CCode (cname = "xmlSaveTree")]
+ public int save_tree (Xml.Node *node);
+
+ }
+
+ [Compact]
+ [CCode (cname = "xmlParserCtxt")]
+ public class ParserCtxt {
+ public SAXHandler* sax;
+ [CCode (cname = "userData")]
+ public void* user_data;
+
+ [CCode (cname = "xmlParseDocument")]
+ public int parse_document ();
+ }
+
+
+ /* uri - library of generic URI related routines */
+
+ [Compact]
+ [CCode (cname = "xmlURI", free_function = "xmlFreeURI", cheader_filename = "libxml/uri.h")]
+ public class URI {
+ [CCode (cname = "xmlBuildRelativeURI")]
+ public static string build_relative (string uri, string @base);
+
+ [CCode (cname = "xmlBuildURI")]
+ public static string build (string URI, string @base);
+
+ [CCode (cname = "xmlCanonicPath")]
+ public static string canonic_path (string path);
+
+ [CCode (cname = "xmlCreateURI")]
+ public URI ();
+
+ [CCode (cname = "xmlNormalizeURIPath")]
+ public static int normalize_uri_path (string path);
+
+ [CCode (cname = "xmlParseURI")]
+ public static URI parse (string str);
+
+ [CCode (cname = "xmlParseURIRaw")]
+ public static URI parse_raw (string str, bool raw);
+
+ [CCode (cname = "xmlParseURIReference")]
+ public int parse_reference (string str);
+
+ [CCode (cname = "xmlPathToURI")]
+ public static string path_to_uri (string path);
+
+ [CCode (cname = "xmlPrintURI", instance_pos = -1)]
+#if POSIX
+ public void print (Posix.FILE stream);
+#else
+ public void print (GLib.FileStream stream);
+#endif
+
+ [CCode (cname = "xmlSaveUri")]
+ public string save ();
+
+ [CCode (cname = "xmlURIEscape")]
+ public static string escape (string str);
+
+ [CCode (cname = "xmlURIEscapeStr")]
+ public static string escape_str (string str, string list);
+
+ [CCode (cname = "xmlURIUnescapeString")]
+ public static string unescape_string (string str, int len, string? target);
+
+ public string scheme;
+ public string opaque;
+ public string authority;
+ public string server;
+ public string user;
+ public int port;
+ public string path;
+ public string query;
+ public string fragment;
+ public int cleanup;
+ public string query_raw;
+ }
+
+
+ /* xmlIO - interface for the I/O interfaces used by the parser */
+
+ [CCode (has_target = false, cname = "xmlInputCloseCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate int InputCloseCallback (void* context);
+
+ [CCode (has_target = false, cname = "xmlInputReadCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate int InputReadCallback (void* context, [CCode (array_length = false)] char[] buffer, int len);
+
+ [CCode (has_target = false, cname = "xmlInputMatchCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate int InputMatchCallback (string filename);
+
+ [CCode (has_target = false, cname = "xmlInputOpenCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate void* InputOpenCallback (string filename);
+
+ [CCode (has_target = false, cname = "xmlOutputMatchCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate int OutputMatchCallback (string filename);
+
+ [CCode (has_target = false, cname = "xmlOutputOpenCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate void* OutputOpenCallback (string filename);
+
+ [CCode (has_target = false, cname = "xmlOutputWriteCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate int OutputWriteCallback (void* context, [CCode (array_length = false)] char[] buffer, int len);
+
+ [CCode (has_target = false, cname = "xmlOutputCloseCallback", cheader_filename = "libxml/xmlIO.h")]
+ public delegate int OutputCloseCallback (void * context);
+
+ [CCode (cname = "xmlRegisterInputCallbacks", cheader_filename = "libxml/xmlIO.h")]
+ public int registerInputCallbacks (InputMatchCallback matchFunc, InputOpenCallback openFunc, InputReadCallback readFunc, InputCloseCallback closeFunc);
+
+ [CCode (cname = "xmlRegisterOutputCallbacks", cheader_filename = "libxml/xmlIO.h")]
+ public int registerOutputCallbacks(OutputMatchCallback matchFunc, OutputOpenCallback openFunc, OutputWriteCallback writeFunc, OutputCloseCallback closeFunc);
+
+ /* xmlschemas - incomplete XML Schemas structure implementation */
+
+ [Compact]
+ [CCode (cname = "xmlSchemaValidCtxt", cheader_filename = "libxml/xmlreader.h")]
+ public class SchemaValidCtxt {
+ }
+
+ /* xmlwriter - the XMLWriter implementation */
+
+ [Compact]
+ [CCode (cname = "xmlTextWriter", free_function = "xmlFreeTextWriter", cheader_filename = "libxml/xmlwriter.h")]
+ public class TextWriter {
+ [CCode (cname = "xmlNewTextWriterFilename")]
+ public TextWriter.filename (string uri, bool compression = false);
+
+ [CCode (cname = "xmlTextWriterFlush")]
+ public int flush ();
+
+ [CCode (cname = "xmlTextWriterSetIndent")]
+ public int set_indent (bool indent);
+
+ [CCode (cname = "xmlTextWriterSetIndentString")]
+ public int set_indent_string (string str);
+
+ /* End */
+ [CCode (cname = "xmlTextWriterEndCDATA")]
+ public int end_cdata ();
+
+ [CCode (cname = "xmlTextWriterEndComment")]
+ public int end_comment ();
+
+ [CCode (cname = "xmlTextWriterEndDocument")]
+ public int end_document ();
+
+ [CCode (cname = "xmlTextWriterEndElement")]
+ public int end_element ();
+
+ [CCode (cname = "xmlTextWriterEndAttribute")]
+ public int end_attribute ();
+
+ /* Start */
+
+ [CCode (cname = "xmlTextWriterStartCDATA")]
+ public int start_cdata ();
+
+ [CCode (cname = "xmlTextWriterStartComment")]
+ public int start_comment ();
+
+ [CCode (cname = "xmlTextWriterStartDocument")]
+ public int start_document (string? version = null, string? encoding = null, string? standalone = null);
+
+ [CCode (cname = "xmlTextWriterStartElement")]
+ public int start_element (string name);
+
+ [CCode (cname = "xmlTextWriterStartElementNS")]
+ public int start_element_ns (string prefix, string name, string namespaceURI);
+
+ [CCode (cname = "xmlTextWriterStartAttribute")]
+ public int start_attribute (string name);
+
+ [CCode (cname = "xmlTextWriterStartAttributeNS")]
+ public int start_attribute_ns (string prefix, string name, string namespaceURI);
+
+ /* write */
+
+ [CCode (cname = "xmlTextWriterWriteAttribute")]
+ public int write_attribute (string name, string content);
+
+ [CCode (cname = "xmlTextWriterWriteAttributeNS")]
+ public int write_attribute_ns (string prefix, string name, string namespaceURI, string content);
+
+ [CCode (cname = "xmlTextWriterWriteElement")]
+ public int write_element (string name, string content);
+
+ [CCode (cname = "xmlTextWriterWriteElementNS")]
+ public int write_element_ns (string prefix, string name, string namespaceURI, string content);
+
+ [CCode (cname = "xmlTextWriterWriteBase64")]
+ public int write_base64 (void* data, int start, int length);
+
+ [CCode (cname = "xmlTextWriterWriteComment")]
+ public int write_comment (string content);
+
+ [CCode (cname = "xmlTextWriterWriteString")]
+ public int write_string (string content);
+
+ /* formatted */
+
+ [CCode (cname = "xmlTextWriterWriteFormatAttribute")]
+ public int format_attribute (string name, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatAttributeNS")]
+ public int format_attribute_ns (string prefix, string name, string namespaceURI, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatCDATA")]
+ public int format_cdata (string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatComment")]
+ public int format_comment (string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatElement")]
+ public int format_element (string name, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatElementNS")]
+ public int format_element_ns (string prefix, string name, string namespaceURI, string format, ...);
+
+ [CCode (cname = "xmlTextWriterWriteFormatString")]
+ public int format_string (string format, ...);
+ }
+
+ /* xmlreader - the XMLReader implementation */
+
+ [CCode (cname = "xmlParserProperties", cprefix = "XML_PARSER_", cheader_filename = "libxml/xmlreader.h")]
+ public enum ParserProperties {
+ LOADDTD,
+ DEFAULTATTRS,
+ VALIDATE,
+ SUBST_ENTITIES
+ }
+
+ [CCode (cname = "xmlParserSeverities", cprefix = "XML_PARSER_SEVERITY_", cheader_filename = "libxml/xmlreader.h")]
+ public enum ParserSeverities {
+ VALIDITY_WARNING,
+ VALIDITY_ERROR,
+ WARNING,
+ ERROR
+ }
+
+ [CCode (cname = "xmlReaderTypes", cheader_filename = "libxml/xmlreader.h")]
+ public enum ReaderType {
+ NONE,
+ ELEMENT,
+ ATTRIBUTE,
+ TEXT,
+ CDATA,
+ ENTITY_REFERENCE,
+ ENTITY,
+ PROCESSING_INSTRUCTION,
+ COMMENT,
+ DOCUMENT,
+ DOCUMENT_TYPE,
+ DOCUMENT_FRAGMENT,
+ NOTATION,
+ WHITESPACE,
+ SIGNIFICANT_WHITESPACE,
+ END_ELEMENT,
+ END_ENTITY,
+ XML_DECLARATION
+ }
+
+ [Compact]
+ [CCode (cname = "xmlTextReader", free_function = "xmlFreeTextReader", cheader_filename = "libxml/xmlreader.h")]
+ public class TextReader {
+ [CCode (cname = "xmlNewTextReaderFilename")]
+ public TextReader.filename (string uri);
+
+ [CCode (cname = "xmlReaderForDoc")]
+ public TextReader.for_doc (string cur, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderForFd")]
+ public TextReader.for_fd (int fd, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderForFile")]
+ public TextReader.for_file (string filename, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderForIO")]
+ public TextReader.for_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderForMemory")]
+ public TextReader.for_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderNewDoc")]
+ public int new_doc (string cur, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderNewFd")]
+ public int new_fd (int fd, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderNewFile")]
+ public int new_file (string filename, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderNewIO")]
+ public int new_io (InputReadCallback ioread, InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderNewMemory")]
+ public int new_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "xmlReaderNewWalker")]
+ public int new_walker (Doc* doc);
+
+ [CCode (cname = "xmlReaderWalker")]
+ public TextReader.walker (Doc* doc);
+
+ [CCode (cname = "xmlTextReaderAttributeCount")]
+ public int attribute_count ();
+
+ [CCode (cname = "xmlTextReaderBaseUri")]
+ public string base_uri ();
+
+ [CCode (cname = "xmlTextReaderByteConsumed")]
+ public long byte_consumed ();
+
+ [CCode (cname = "xmlTextReaderClose")]
+ public int close ();
+
+ [CCode (cname = "xmlTextReaderConstBaseUri")]
+ public unowned string const_base_uri ();
+
+ [CCode (cname = "xmlTextReaderConstEncoding")]
+ public unowned string const_encoding ();
+
+ [CCode (cname = "xmlTextReaderConstLocalName")]
+ public unowned string const_local_name ();
+
+ [CCode (cname = "xmlTextReaderConstName")]
+ public unowned string const_name ();
+
+ [CCode (cname = "xmlTextReaderConstNamespaceUri")]
+ public unowned string const_namespace_uri ();
+
+ [CCode (cname = "xmlTextReaderConstPrefix")]
+ public unowned string const_prefix ();
+
+ [CCode (cname = "xmlTextReaderConstString")]
+ public unowned string const_string (string str);
+
+ [CCode (cname = "xmlTextReaderConstValue")]
+ public unowned string const_value ();
+
+ [CCode (cname = "xmlTextReaderConstXmlLang")]
+ public unowned string const_xml_lang ();
+
+ [CCode (cname = "xmlTextReaderConstXmlVersion")]
+ public unowned string const_xml_version ();
+
+ [CCode (cname = "xmlTextReaderCurrentDoc")]
+ public Doc* current_doc ();
+
+ [CCode (cname = "xmlTextReaderCurrentNode")]
+ public Node* current_node ();
+
+ [CCode (cname = "xmlTextReaderDepth")]
+ public int depth ();
+
+ [CCode (cname = "xmlTextReaderExpand")]
+ public Node* expand ();
+
+ [CCode (cname = "xmlTextReaderGetAttribute")]
+ public string get_attribute (string name);
+
+ [CCode (cname = "xmlTextReaderGetAttributeNo")]
+ public string get_attribute_no (int no);
+
+ [CCode (cname = "xmlTextReaderGetAttributeNs")]
+ public string get_attribute_ns (string local_name, string namespace_uri);
+
+ [CCode (cname = "xmlTextReaderGetErrorHandler")]
+ public void get_error_handler (out TextReaderErrorFunc f, void** arg);
+
+ [CCode (cname = "xmlTextReaderGetParserColumnNumber")]
+ public int get_parser_column_number ();
+
+ [CCode (cname = "xmlTextReaderGetParserLineNumber")]
+ public int get_parser_line_number ();
+
+ [CCode (cname = "xmlTextReaderGetParserProp")]
+ public int get_parser_prop (int prop);
+
+ [CCode (cname = "xmlTextReaderHasAttributes")]
+ public int has_attributes ();
+
+ [CCode (cname = "xmlTextReaderHasValue")]
+ public int has_value ();
+
+ [CCode (cname = "xmlTextReaderIsDefault")]
+ public int is_default ();
+
+ [CCode (cname = "xmlTextReaderIsEmptyElement")]
+ public int is_empty_element ();
+
+ [CCode (cname = "xmlTextReaderIsNamespaceDecl")]
+ public int is_namespace_decl ();
+
+ [CCode (cname = "xmlTextReaderIsValid")]
+ public int is_valid ();
+
+ [CCode (cname = "xmlTextReaderLocalName")]
+ public string local_name ();
+
+ [CCode (cname = "xmlTextReaderLookupNamespace")]
+ public string lookup_namespace (string prefix);
+
+ [CCode (cname = "xmlTextReaderMoveToAttribute")]
+ public int move_to_attribute (string name);
+
+ [CCode (cname = "xmlTextReaderMoveToAttributeNo")]
+ public int move_to_attribute_no (int no);
+
+ [CCode (cname = "xmlTextReaderMoveToAttributeNs")]
+ public int move_to_attribute_ns (string local_name, string namespace_uri);
+
+ [CCode (cname = "xmlTextReaderMoveToElement")]
+ public int move_to_element ();
+
+ [CCode (cname = "xmlTextReaderMoveToFirstAttribute")]
+ public int move_to_first_attribute ();
+
+ [CCode (cname = "xmlTextReaderMoveToNextAttribute")]
+ public int move_to_next_attribute ();
+
+ [CCode (cname = "xmlTextReaderName")]
+ public string name ();
+
+ [CCode (cname = "xmlTextReaderNamespaceUri")]
+ public string namespace_uri ();
+
+ [CCode (cname = "xmlTextReaderNext")]
+ public int next ();
+
+ [CCode (cname = "xmlTextReaderNextSibling")]
+ public int next_sibling ();
+
+ [CCode (cname = "xmlTextReaderNodeType")]
+ public int node_type ();
+
+ [CCode (cname = "xmlTextReaderNormalization")]
+ public int normalization ();
+
+ [CCode (cname = "xmlTextReaderPrefix")]
+ public string prefix ();
+
+ [CCode (cname = "xmlTextReaderPreserve")]
+ public Node* preserve ();
+
+ [CCode (cname = "xmlTextReaderPreservePattern")]
+ public int preserve_pattern (string pattern, [CCode (array_length = false)] string[] namespaces);
+
+ [CCode (cname = "xmlTextReaderQuoteChar")]
+ public int quote_char ();
+
+ [CCode (cname = "xmlTextReaderRead")]
+ public int read ();
+
+ [CCode (cname = "xmlTextReaderReadAttributeValue")]
+ public int read_attribute_value ();
+
+ [CCode (cname = "xmlTextReaderReadInnerXml")]
+ public string read_inner_xml ();
+
+ [CCode (cname = "xmlTextReaderReadOuterXml")]
+ public string read_outer_xml ();
+
+ [CCode (cname = "xmlTextReaderReadState")]
+ public int read_state ();
+
+ [CCode (cname = "xmlTextReaderReadString")]
+ public string read_string ();
+
+ [CCode (cname = "xmlTextReaderSchemaValidate")]
+ public int schema_validate (string xsd);
+
+ [CCode (cname = "xmlTextReaderSchemaValidateCtxt")]
+ public int schema_validate_ctxt (SchemaValidCtxt* ctxt, int options);
+
+ [CCode (cname = "xmlTextReaderSetErrorHandler")]
+ public void set_error_handler (TextReaderErrorFunc f, void* arg);
+
+ [CCode (cname = "xmlTextReaderSetParserProp")]
+ public int set_parser_prop (SchemaValidCtxt* ctxt, int options);
+
+ [CCode (cname = "xmlTextReaderStandalone")]
+ public int standalone ();
+
+ [CCode (cname = "xmlTextReaderValue")]
+ public string value ();
+
+ [CCode (cname = "xmlTextReaderXmlLang")]
+ public string xml_lang ();
+ }
+
+ [Compact]
+ [CCode (cname = "void", cheader_filename = "libxml/xmlreader.h")]
+ public class TextReaderLocator {
+ }
+
+ [CCode (cname = "xmlTextReaderMode", cprefix = "XML_TEXTREADER_MODE_", cheader_filename = "libxml/xmlreader.h")]
+ public enum TextReaderMode {
+ INITIAL,
+ INTERACTIVE,
+ ERROR,
+ EOF,
+ CLOSED,
+ READING
+ }
+
+ [CCode (has_target = false)]
+ public delegate void TextReaderErrorFunc (void* arg, string msg, ParserSeverities severity, TextReaderLocator* locator);
+
+
+ /* xpath - XML Path Language implementation */
+
+ [CCode (cheader_filename = "libxml/xpath.h")]
+ namespace XPath {
+ [CCode (cname = "xmlXPathOrderDocElems")]
+ public static long order_doc_elements (Doc* doc);
+
+ [Compact]
+ [CCode (cname = "xmlNodeSet", free_function="xmlXPathFreeNodeSet", cheader_filename = "libxml/xpath.h")]
+ public class NodeSet {
+ [CCode (cname = "xmlXPathNodeSetGetLength")]
+ public int length ();
+
+ [CCode (cname = "xmlXPathNodeSetIsEmpty")]
+ public bool is_empty ();
+
+ [CCode (cname = "xmlXPathNodeSetItem")]
+ public Node* item (int index);
+ }
+
+ [Compact]
+ [CCode (cname = "xmlXPathContext", free_function = "xmlXPathFreeContext", cheader_filename = "libxml/xpath.h")]
+ public class Context {
+ public Doc* doc;
+ public Node* node;
+
+ [CCode (cname = "xmlXPathContextSetCache")]
+ public int set_cache (int active, int value, int options);
+
+ [CCode (cname = "xmlXPathEval", instance_pos = -1)]
+ public Object* eval (string str);
+
+ [CCode (cname = "xmlXPathEvalExpression", instance_pos = -1)]
+ public Object* eval_expression (string str);
+
+ [CCode (cname = "xmlXPathRegisterNs")]
+ public int register_ns (string prefix, string ns_uri);
+
+ [CCode (cname = "xmlXPathNewContext")]
+ public Context (Doc* doc);
+ }
+
+ [CCode (cname = "xmlXPathError", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h")]
+ public enum Error {
+ EXPRESSION_OK,
+ NUMBER_ERROR,
+ UNFINISHED_LITERAL_ERROR,
+ START_LITERAL_ERROR,
+ VARIABLE_REF_ERROR,
+ UNDEF_VARIABLE_ERROR,
+ INVALID_PREDICATE_ERROR,
+ EXPR_ERROR,
+ UNCLOSED_ERROR,
+ UNKNOWN_FUNC_ERROR,
+ INVALID_OPERAND,
+ INVALID_TYPE,
+ INVALID_ARITY,
+ INVALID_CTXT_SIZE,
+ INVALID_CTXT_POSITION,
+ MEMORY_ERROR,
+ [CCode (cname = "XPTR_SYNTAX_ERROR")]
+ XPTR_SYNTAX_ERROR,
+ [CCode (cname = "XPTR_RESOURCE_ERROR")]
+ XPTR_RESOURCE_ERROR,
+ [CCode (cname = "XPTR_SUB_RESOURCE_ERROR")]
+ XPTR_SUB_RESOURCE_ERROR,
+ UNDEF_PREFIX_ERROR,
+ ENCODING_ERROR,
+ INVALID_CHAR_ERROR,
+ INVALID_CTXT
+ }
+
+ [Compact]
+ [CCode (cname = "xmlXPathObject", free_function="xmlXPathFreeObject", cheader_filename = "libxml/xpath.h")]
+ public class Object {
+ public ObjectType type;
+ public NodeSet* nodesetval;
+ public int boolval;
+ public double floatval;
+ public string stringval;
+ public void* user;
+ public int index;
+ public void* user2;
+ public int index2;
+ }
+
+ [CCode (cname = "xmlXPathObjectType", cprefix = "XPATH_", cheader_filename = "libxml/xpath.h")]
+ public enum ObjectType {
+ UNDEFINED,
+ NODESET,
+ BOOLEAN,
+ NUMBER,
+ STRING,
+ POINT,
+ RANGE,
+ LOCATIONSET,
+ USERS,
+ XSLT_TREE
+ }
+ }
+
+ /* SAX CALLBACKS */
+
+ [CCode (cname = "attributeDeclSAXFunc", has_target = false)]
+ public delegate void attributeDeclSAXFunc (void* ctx, string elem, string fullname, int type, int def, string defaultValue, Enumeration* tree);
+
+ [CCode (cname = "attributeSAXFunc", has_target = false)]
+ public delegate void attributeSAXFunc (void* ctx, string name, string value);
+
+ [CCode (cname = "cdataBlockSAXFunc", has_target = false)]
+ public delegate void cdataBlockSAXFunc (void* ctx, string value, int len);
+
+ [CCode (cname = "charactersSAXFunc", has_target = false)]
+ public delegate void charactersSAXFunc (void* ctx, string ch, int len);
+
+ [CCode (cname = "commentsSAXFunc", has_target = false)]
+ public delegate void commentSAXFunc (void* ctx, string value);
+
+ [CCode (cname = "elementDeclSAXFunc", has_target = false)]
+ public delegate void elementDeclSAXFunc (void* ctx, string name, int type, ElementContent content);
+
+ [CCode (cname = "endDocumentSAXFunc", has_target = false)]
+ public delegate void endDocumentSAXFunc (void* ctx);
+
+ [CCode (cname = "endElementNsSAX2Func", has_target = false)]
+ public delegate void endElementNsSAX2Func (void* ctx, string localname, string prefix, string URI);
+
+ [CCode (cname = "endElementSAXFunc", has_target = false)]
+ public delegate void endElementSAXFunc (void* ctx, string name);
+
+ [CCode (cname = "entityDeclSAXFunc", has_target = false)]
+ public delegate void entityDeclSAXFunc (void* ctx, string name, int type, string publicId, string systemId, string content);
+
+ [CCode (cname = "errorSAXFunc", has_target = false)]
+ public delegate void errorSAXFunc (void* ctx, string msg, ...);
+
+ [CCode (cname = "externalSubsetSAXFunc", has_target = false)]
+ public delegate void externalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
+
+ [CCode (cname = "fatalErrorSAXFunc", has_target = false)]
+ public delegate void fatalErrorSAXFunc (void* ctx, string msg, ...);
+
+ [CCode (cname = "getEntitySAXFunc", has_target = false)]
+ public delegate Entity* getEntitySAXFunc (void* ctx, string name);
+
+ [CCode (cname = "getParameterEntitySAXFunc", has_target = false)]
+ public delegate Entity* getParameterEntitySAXFunc (void* ctx, string name);
+
+ [CCode (cname = "hasExternalSubsetSAXFunc", has_target = false)]
+ public delegate int hasExternalSubsetSAXFunc (void* ctx);
+
+ [CCode (cname = "hasInternalSubsetSAXFunc", has_target = false)]
+ public delegate int hasInternalSubsetSAXFunc (void* ctx);
+
+ [CCode (cname = "ignorableWhitespaceSAXFunc", has_target = false)]
+ public delegate void ignorableWhitespaceSAXFunc (void* ctx, string ch, int len);
+
+ [CCode (cname = "internalSubsetSAXFunc", has_target = false)]
+ public delegate void internalSubsetSAXFunc (void* ctx, string name, string ExternalID, string SystemID);
+
+ [CCode (cname = "isStandaloneSAXFunc", has_target = false)]
+ public delegate int isStandaloneSAXFunc (void* ctx);
+
+ [CCode (cname = "notationDeclSAXFunc", has_target = false)]
+ public delegate void notationDeclSAXFunc (void* ctx, string name, string publicId, string systemId);
+
+ [CCode (cname = "processingInstructionSAXFunc", has_target = false)]
+ public delegate void processingInstructionSAXFunc (void* ctx, string target, string data);
+
+ [CCode (cname = "referenceSAXFunc", has_target = false)]
+ public delegate void referenceSAXFunc (void* ctx, string name);
+
+ // [CCode (cname = "resolveEntitySAXFunc", has_target = false)]
+ // public delegate ParserInput resolveEntitySAXFunc (void* ctx, string publicId, string systemId);
+
+ // [CCode (cname = "setDocumentLocatorSAXFunc", has_target = false)]
+ // public delegate void setDocumentLocatorSAXFunc (void* ctx, SAXLocator loc);
+
+ [CCode (cname = "startDocumentSAXFunc", has_target = false)]
+ public delegate void startDocumentSAXFunc (void* ctx);
+
+ [CCode (cname = "startElementNsSAX2Func", has_target = false)]
+ public delegate void startElementNsSAX2Func (void* ctx, string localname, string prefix, string URI, int nb_namespaces, [CCode (array_length = false, array_null_terminated = true)] string[] namespaces, int nb_attributes, int nb_defaulted, [CCode (array_length = false)] string[] attributes);
+
+ [CCode (cname = "startElementSAXFunc", has_target = false)]
+ public delegate void startElementSAXFunc (void* ctx, string name, [CCode (array_length = false, array_null_terminated = true)] string[] atts);
+
+ [CCode (cname = "unparsedEntityDeclSAXFunc", has_target = false)]
+ public delegate void unparsedEntityDeclSAXFunc (void* ctx, string name, string publicId, string systemId, string notationName);
+
+ [CCode (cname = "warningSAXFunc", has_target = false)]
+ public delegate void warningSAXFunc (void* ctx, string msg, ...);
+
+ [CCode (cname ="xmlStructuredErrorFunc", has_target = false)]
+ public delegate void xmlStructuredErrorFunc (void* ctx, Error* error);
+
+ [Compact]
+ [CCode (cname = "xmlSAXHandler", cheader_filename = "libxml/parser.h")]
+ public struct SAXHandler {
+ [CCode (cname = "internalSubset")]
+ public internalSubsetSAXFunc internalSubset;
+ [CCode (cname = "isStandalone")]
+ public isStandaloneSAXFunc is_standalone;
+ [CCode (cname = "hasInternalSubset")]
+ public hasInternalSubsetSAXFunc hasInternalSubset;
+ [CCode (cname = "hasExternalSubset")]
+ public hasExternalSubsetSAXFunc hasExternalSubset;
+ // public resolveEntitySAXFunc resolveEntity;
+ [CCode (cname = "getEntity")]
+ public getEntitySAXFunc getEntity;
+ [CCode (cname = "entityDecl")]
+ public entityDeclSAXFunc entityDecl;
+ [CCode (cname = "notationDecl")]
+ public notationDeclSAXFunc notationDecl;
+ [CCode (cname = "attributeDecl")]
+ public attributeDeclSAXFunc attributeDecl;
+ [CCode (cname = "elementDecl")]
+ public elementDeclSAXFunc elementDecl;
+ [CCode (cname = "unparsedEntityDecl")]
+ public unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ // public setDocumentLocatorSAXFunc setDocumentLocator;
+ [CCode (cname = "startDocument")]
+ public startDocumentSAXFunc startDocument;
+ [CCode (cname = "endDocument")]
+ public endDocumentSAXFunc endDocument;
+ [CCode (cname = "startElement")]
+ public startElementSAXFunc startElement;
+ [CCode (cname = "endElement")]
+ public endElementSAXFunc endElement;
+ public referenceSAXFunc reference;
+ public charactersSAXFunc characters;
+ [CCode (cname = "ignorableWhitespace")]
+ public ignorableWhitespaceSAXFunc ignorableWhitespace;
+ [CCode (cname = "processingInstruction")]
+ public processingInstructionSAXFunc processingInstruction;
+ public commentSAXFunc comment;
+ public warningSAXFunc warning;
+ public errorSAXFunc error;
+ [CCode (cname = "fatalError")]
+ public fatalErrorSAXFunc fatalError;
+ [CCode (cname = "getParameterEntity")]
+ public getParameterEntitySAXFunc getParameterEntity;
+ [CCode (cname = "cdataBlock")]
+ public cdataBlockSAXFunc cdataBlock;
+ [CCode (cname = "externalSubset")]
+ public externalSubsetSAXFunc externalSubset;
+ public uint initialized;
+ [CCode (cname = "startElementNs")]
+ public startElementNsSAX2Func startElementNs;
+ [CCode (cname = "endElementNs")]
+ public endElementNsSAX2Func endElementNs;
+ public xmlStructuredErrorFunc serror;
+
+ [CCode (cname = "xmlSAXUserParseMemory")]
+ public int user_parse_memory (void* user_data, string buffer, int size);
+ [CCode (cname = "xmlSAXUserParseFile")]
+ public int user_parse_file (void* user_data, string filename);
+ }
+
+
+ /* xmlerror - error handling */
+
+ [Compact]
+ [CCode (cname = "xmlError", cheader_filename = "libxml/xmlerror.h")]
+ public struct Error {
+ public int domain;
+ public int code;
+ public string message;
+ public ErrorLevel level;
+ public string file;
+ public int line;
+ public string str1;
+ public string str2;
+ public string str3;
+ public int int1;
+ public int int2;
+ public void* ctx;
+ public void* node;
+ }
+
+ [CCode (cname = "xmlErrorLevel", cprefix = "XML_ERR_", cheader_filename = "libxml/xmlerror.h")]
+ public enum ErrorLevel {
+ NONE = 0,
+ WARNING = 1,
+ ERROR = 2,
+ FATAL = 3
+ }
+
+}
+
+namespace Html {
+ [CCode (cname = "htmlIsBooleanAttr", cheader_filename = "libxml/HTMLtree.h")]
+ public static int is_boolean_attr (string name);
+
+ [CCode (cname = "UTF8ToHtml", cheader_filename = "libxml/HTMLparser.h")]
+ public static int utf8_to_html ([CCode (array_length = false)] char[] outdata, out int outlen, [CCode (array_length = false)] char[] indata, out int inlen);
+
+ [CCode (cname = "htmlEncodeEntities", cheader_filename = "libxml/HTMLparser.h")]
+ public static int encode_entities ([CCode (array_length = false)] char[] outdata, out int outlen, [CCode (array_length = false)] char[] indata, out int inlen, char quote_char = '\0');
+
+ [CCode (cname = "htmlIsScriptAttribute", cheader_filename = "libxml/HTMLparser.h")]
+ public static bool is_script_attribute (string name);
+
+ [CCode (cname = "htmlHandleOmittedElem", cheader_filename = "libxml/HTMLparser.h")]
+ public static bool handle_omitted_elem (bool val);
+
+ [CCode (cname = "htmlParserOption", cprefix = "HTML_PARSE_", cheader_filename = "libxml/HTMLparser.h")]
+ public enum ParserOption {
+ RECOVER,
+ NOERROR,
+ NOWARNING,
+ PEDANTIC,
+ NOBLANKS,
+ NONET,
+ COMPACT,
+ }
+
+ [CCode (cname = "htmlStatus", cprefix = "HTML_", cheader_filename = "libxml/HTMLparser.h")]
+ public enum Status {
+ NA,
+ INVALID,
+ DEPRECATED,
+ VALID,
+ REQUIRED,
+ }
+
+ [Compact]
+ [CCode (cname = "xmlNode", cheader_filename = "libxml/HTMLparser.h")]
+ public class Node : Xml.Node {
+ [CCode (cname = "htmlNodeStatus")]
+ public Status status (bool legacy);
+ }
+
+ [Compact]
+ [CCode (cname = "xmlDoc", cheader_filename = "libxml/HTMLtree.h,libxml/HTMLparser.h")]
+ public class Doc : Xml.Doc {
+ [CCode (cname = "htmlNewDoc")]
+ public Doc (string? uri = null, string? external_id = null);
+
+ [CCode (cname = "htmlNewNoDtD")]
+ public Doc.new_no_dtd (string? uri = null, string? external_id = null);
+
+ [CCode (cname = "htmlSAXParseDoc")]
+ public static Doc* sax_parse_doc (string cur, string? encoding, Xml.SAXHandler* sax, void* user_data = null);
+
+ [CCode (cname = "htmlSAXParseFile")]
+ public static Doc* sax_parse_file (string filename, string? encoding, Xml.SAXHandler* sax, void* user_data = null);
+
+ [CCode (cname = "htmlParseFile")]
+ public static Doc* parse_file (string filename, string? encoding);
+
+ [CCode (cname = "htmlReadDoc")]
+ public static Doc* read_doc (string cur, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlReadMemory")]
+ public static Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlReadFd")]
+ public static Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlReadIO")]
+ public static Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlGetMetaEncoding")]
+ public string get_meta_encoding ();
+
+ [CCode (cname = "htmlSetMetaEncoding")]
+ public int set_meta_encoding (string encoding);
+
+ [CCode (cname = "htmlDocDumpMemory")]
+ public void dump_memory (out string mem, out int len = null);
+
+ [CCode (cname = "htmlDocDumpMemoryFormat")]
+ public void dump_memory_format (out string mem, out int len = null, bool format = true);
+
+ [CCode (cname = "htmlDocDump", instance_pos = -1)]
+#if POSIX
+ public int dump (Posix.FILE f);
+#else
+ public int dump (GLib.FileStream f);
+#endif
+
+ [CCode (cname = "htmlSaveFile", instance_pos = -1)]
+ public int save_file (string filename);
+
+ [CCode (cname = "htmlNodeDumpFile", instance_pos = 1.1)]
+#if POSIX
+ public int node_dump_file (Posix.FILE file, Xml.Node* node);
+#else
+ public int node_dump_file (GLib.FileStream file, Xml.Node* node);
+#endif
+
+ [CCode (cname = "htmlNodeDumpFileFormat", instance_pos = 1.1)]
+#if POSIX
+ public int node_dump_file_format (Posix.FILE file, string enc = "UTF-8", bool format = true);
+#else
+ public int node_dump_file_format (GLib.FileStream file, string enc = "UTF-8", bool format = true);
+#endif
+
+ [CCode (cname = "htmlSaveFileEnc", instance_pos = 1.1)]
+ public int save_file_enc (string filename, string enc = "UTF-8");
+
+ [CCode (cname = "htmlSaveFileFormat", instance_pos = 1.1)]
+ public int save_file_format (string filename, string enc = "UTF-8", bool format = true);
+
+ [CCode (cname = "htmlIsAutoClosed")]
+ public bool is_auto_closed (Node* elem);
+
+ [CCode (cname = "htmlAutoCloseTag")]
+ public bool auto_close_tag (string name, Node* elem);
+ }
+
+ [Compact]
+ [CCode (cname = "htmlElemDesc", cheader_filename = "libxml/HTMLparser.h")]
+ public class ElemDesc {
+ public weak string name;
+ [CCode (cname = "startTag")]
+ public bool start_tag;
+ [CCode (cname = "endTag")]
+ public bool end_tag;
+ [CCode (cname = "saveEndTag")]
+ public bool save_end_tag;
+ public bool empty;
+ public bool depr;
+ public char dtd;
+ public bool isinline;
+ public weak string desc;
+ public weak string[] subelts;
+ public weak string defaultsubelt;
+ public weak string[] attrs_opt;
+ public weak string[] attrs_depr;
+ public weak string[] attrs_req;
+
+ [CCode (cname = "htmlTagLookup")]
+ public static ElemDesc* tag_lookup (string tag);
+
+ [CCode (cname = "htmlAttrAllowed")]
+ public Status attr_allowed (string attr, bool legacy);
+
+ [CCode (cname = "htmlElementAllowedHere")]
+ public bool allowed_here (string elt);
+
+ [CCode (cname = "htmlElementAllowedHereDesc")]
+ public bool allowed_here_desc (ElemDesc* child);
+
+ [CCode (cname = "htmlElementStatusHere")]
+ public Status status_here (ElemDesc* child);
+
+ [Ccode (cname = "htmlDefaultSubelement")]
+ public unowned string default_subelement ();
+
+ [Ccode (cname = "htmlRequiredAttrs")]
+ public unowned string[] required_attrs ();
+ }
+
+ [Compact]
+ [CCode (cname = "htmlEntityDesc", cheader_filename = "libxml/HTMLParser.h")]
+ public class EntityDesc
+ {
+ public uint value;
+ public weak string name;
+ public weak string desc;
+
+ [CCode (cname = "htmlEntityDesc")]
+ public static EntityDesc* lookup (string name);
+
+ [CCode (cname = "htmlEntityValueDesc")]
+ public static EntityDesc* value_lookup (uint value);
+ }
+
+ [Compact]
+ [CCode (cname = "htmlParserCtxt", free_function = "htmlFreeParserCtxt", cheader_filename = "libxml/HTMLparser.h")]
+ public class ParserCtxt : Xml.ParserCtxt {
+ [CCode (cname = "htmlNewParserCtxt")]
+ public ParserCtxt ();
+
+ [CCode (cname = "htmlCreateMemoryParserCtxt")]
+ public ParserCtxt.create_memory ([CCode (array_length = false)] char[] buffer, int size);
+
+ [CCode (cname = "htmlCreatePushParserCtxt")]
+ public ParserCtxt.create_push (Xml.SAXHandler* sax, void* user_data, [CCode (array_length = false)] char[] data, int len, string? filename = null, Xml.CharEncoding enc = Xml.CharEncoding.NONE);
+
+ [CCode (cname = "htmlParseChunk")]
+ public int parse_chunk ([CCode (array_length = false)] char[] data, int size, bool terminate);
+
+ [CCode (cname = "htmlParseEntityRef")]
+ public EntityDesc* parse_entity_ref (out string entity_name);
+
+ [CCode (cname = "htmlParseCharRef")]
+ public int parse_char_ref ();
+
+ [CCode (cname = "htmlParseElement")]
+ public void parse_element ();
+
+ [CCode (cname = "htmlParseDocument")]
+ public int parse_document ();
+
+ [CCode (cname = "htmlCtxtReset")]
+ public void reset ();
+
+ [CCode (cname = "htmlCtxtUseOptions")]
+ public int use_options (int options);
+
+ [CCode (cname = "htmlCtxtReadDoc")]
+ public Doc* read_doc (string cur, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlCtxtReadFile")]
+ public Doc* read_file (string filename, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlCtxtReadMemory")]
+ public Doc* read_memory ([CCode (array_length = false)] char[] buffer, int size, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlCtxtReadFd")]
+ public Doc* read_fd (int fd, string url, string? encoding = null, int options = 0);
+
+ [CCode (cname = "htmlCtxtReadIO")]
+ public Doc* read_io (Xml.InputReadCallback ioread, Xml.InputCloseCallback ioclose, void* ioctx, string url, string? encoding = null, int options = 0);
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]