/* htmlmarkupwriter.c generated by valac, the Vala compiler
 * generated from htmlmarkupwriter.vala, do not modify */

/* markupwriter.vala
 *
 * Copyright (C) 2008-2014 Florian Brosch, Didier Villevalois
 *
 * 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:
 * 	Didier 'Ptitjes Villevalois <ptitjes@free.fr>
 */

#include <glib.h>
#include <glib-object.h>
#include "valadoc.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

typedef struct _Block7Data Block7Data;
#define _valadoc_markup_writer_unref0(var) ((var == NULL) ? NULL : (var = (valadoc_markup_writer_unref (var), NULL)))
typedef struct _Block8Data Block8Data;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _Block7Data {
	int _ref_count_;
	ValadocHtmlMarkupWriter* self;
	FILE* _stream;
};

struct _Block8Data {
	int _ref_count_;
	ValadocHtmlMarkupWriter* self;
	GString* _builder;
};


static gpointer valadoc_html_markup_writer_parent_class = NULL;

static Block7Data* block7_data_ref (Block7Data* _data7_);
static void block7_data_unref (void * _userdata_);
static void __lambda138_ (Block7Data* _data7_, const gchar* str);
static void ___lambda138__valadoc_markup_writer_write_func (const gchar* text, gpointer self);
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
static void __lambda139_ (Block8Data* _data8_, const gchar* str);
static void ___lambda139__valadoc_markup_writer_write_func (const gchar* text, gpointer self);
static gboolean valadoc_html_markup_writer_real_inline_element (ValadocMarkupWriter* base, const gchar* name);
static gboolean valadoc_html_markup_writer_real_content_inline_element (ValadocMarkupWriter* base, const gchar* name);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static Block7Data* block7_data_ref (Block7Data* _data7_) {
	g_atomic_int_inc (&_data7_->_ref_count_);
	return _data7_;
}


static void block7_data_unref (void * _userdata_) {
	Block7Data* _data7_;
	_data7_ = (Block7Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data7_->_ref_count_)) {
		ValadocHtmlMarkupWriter* self;
		self = _data7_->self;
		_valadoc_markup_writer_unref0 (self);
		g_slice_free (Block7Data, _data7_);
	}
}


static void __lambda138_ (Block7Data* _data7_, const gchar* str) {
	ValadocHtmlMarkupWriter* self;
	const gchar* _tmp0_;
	self = _data7_->self;
	g_return_if_fail (str != NULL);
	_tmp0_ = str;
	fprintf (_data7_->_stream, "%s", _tmp0_);
}


static void ___lambda138__valadoc_markup_writer_write_func (const gchar* text, gpointer self) {
	__lambda138_ (self, text);
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_construct (GType object_type, FILE* stream, gboolean xml_declaration) {
	ValadocHtmlMarkupWriter* self = NULL;
	Block7Data* _data7_;
	FILE* _tmp0_;
	gboolean _tmp1_;
	g_return_val_if_fail (stream != NULL, NULL);
	_data7_ = g_slice_new0 (Block7Data);
	_data7_->_ref_count_ = 1;
	_tmp0_ = stream;
	_data7_->_stream = _tmp0_;
	_tmp1_ = xml_declaration;
	self = (ValadocHtmlMarkupWriter*) valadoc_markup_writer_construct (object_type, ___lambda138__valadoc_markup_writer_write_func, block7_data_ref (_data7_), block7_data_unref, _tmp1_);
	_data7_->self = valadoc_markup_writer_ref (self);
	block7_data_unref (_data7_);
	_data7_ = NULL;
	return self;
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_new (FILE* stream, gboolean xml_declaration) {
	return valadoc_html_markup_writer_construct (VALADOC_HTML_TYPE_MARKUP_WRITER, stream, xml_declaration);
}


static Block8Data* block8_data_ref (Block8Data* _data8_) {
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}


static void block8_data_unref (void * _userdata_) {
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		ValadocHtmlMarkupWriter* self;
		self = _data8_->self;
		_valadoc_markup_writer_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}


static void __lambda139_ (Block8Data* _data8_, const gchar* str) {
	ValadocHtmlMarkupWriter* self;
	const gchar* _tmp0_;
	self = _data8_->self;
	g_return_if_fail (str != NULL);
	_tmp0_ = str;
	g_string_append (_data8_->_builder, _tmp0_);
}


static void ___lambda139__valadoc_markup_writer_write_func (const gchar* text, gpointer self) {
	__lambda139_ (self, text);
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_construct_builder (GType object_type, GString* builder, gboolean xml_declaration) {
	ValadocHtmlMarkupWriter* self = NULL;
	Block8Data* _data8_;
	GString* _tmp0_;
	gboolean _tmp1_;
	g_return_val_if_fail (builder != NULL, NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_tmp0_ = builder;
	_data8_->_builder = _tmp0_;
	_tmp1_ = xml_declaration;
	self = (ValadocHtmlMarkupWriter*) valadoc_markup_writer_construct (object_type, ___lambda139__valadoc_markup_writer_write_func, block8_data_ref (_data8_), block8_data_unref, _tmp1_);
	_data8_->self = valadoc_markup_writer_ref (self);
	block8_data_unref (_data8_);
	_data8_ = NULL;
	return self;
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_new_builder (GString* builder, gboolean xml_declaration) {
	return valadoc_html_markup_writer_construct_builder (VALADOC_HTML_TYPE_MARKUP_WRITER, builder, xml_declaration);
}


static gpointer _valadoc_markup_writer_ref0 (gpointer self) {
	return self ? valadoc_markup_writer_ref (self) : NULL;
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_add_usemap (ValadocHtmlMarkupWriter* self, ValadocChartsChart* chart) {
	ValadocHtmlMarkupWriter* result = NULL;
	gchar* buf = NULL;
	ValadocChartsChart* _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	const gchar* _tmp3_;
	ValadocHtmlMarkupWriter* _tmp9_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (chart != NULL, NULL);
	_tmp0_ = chart;
	_tmp2_ = valadoc_charts_chart_write_buffer (_tmp0_, "cmapx", &_tmp1_);
	buf = (gchar*) _tmp2_;
	_tmp3_ = buf;
	if (_tmp3_ != NULL) {
		ValadocMarkupWriter* _tmp4_;
		ValadocMarkupWriter* _tmp5_;
		const gchar* _tmp6_;
		ValadocMarkupWriter* _tmp7_;
		ValadocMarkupWriter* _tmp8_;
		_tmp4_ = valadoc_markup_writer_raw_text ((ValadocMarkupWriter*) self, "\n");
		_tmp5_ = _tmp4_;
		_valadoc_markup_writer_unref0 (_tmp5_);
		_tmp6_ = buf;
		_tmp7_ = valadoc_markup_writer_raw_text ((ValadocMarkupWriter*) self, (const gchar*) _tmp6_);
		_tmp8_ = _tmp7_;
		_valadoc_markup_writer_unref0 (_tmp8_);
	}
	_tmp9_ = _valadoc_markup_writer_ref0 (self);
	result = _tmp9_;
	_g_free0 (buf);
	return result;
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_link (ValadocHtmlMarkupWriter* self, const gchar* url, const gchar* label, const gchar* css_class) {
	ValadocHtmlMarkupWriter* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp18_;
	ValadocMarkupWriter* _tmp19_;
	ValadocMarkupWriter* _tmp20_;
	ValadocMarkupWriter* _tmp21_;
	ValadocMarkupWriter* _tmp22_;
	ValadocHtmlMarkupWriter* _tmp23_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (url != NULL, NULL);
	g_return_val_if_fail (label != NULL, NULL);
	_tmp0_ = css_class;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		gchar** _tmp4_;
		gchar** _tmp5_;
		gint _tmp5__length1;
		ValadocMarkupWriter* _tmp6_;
		ValadocMarkupWriter* _tmp7_;
		_tmp1_ = g_strdup ("href");
		_tmp2_ = url;
		_tmp3_ = g_strdup (_tmp2_);
		_tmp4_ = g_new0 (gchar*, 2 + 1);
		_tmp4_[0] = _tmp1_;
		_tmp4_[1] = _tmp3_;
		_tmp5_ = _tmp4_;
		_tmp5__length1 = 2;
		_tmp6_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) self, "a", _tmp5_, 2);
		_tmp7_ = _tmp6_;
		_valadoc_markup_writer_unref0 (_tmp7_);
		_tmp5_ = (_vala_array_free (_tmp5_, _tmp5__length1, (GDestroyNotify) g_free), NULL);
	} else {
		gchar* _tmp8_;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar** _tmp14_;
		gchar** _tmp15_;
		gint _tmp15__length1;
		ValadocMarkupWriter* _tmp16_;
		ValadocMarkupWriter* _tmp17_;
		_tmp8_ = g_strdup ("href");
		_tmp9_ = url;
		_tmp10_ = g_strdup (_tmp9_);
		_tmp11_ = g_strdup ("class");
		_tmp12_ = css_class;
		_tmp13_ = g_strdup (_tmp12_);
		_tmp14_ = g_new0 (gchar*, 4 + 1);
		_tmp14_[0] = _tmp8_;
		_tmp14_[1] = _tmp10_;
		_tmp14_[2] = _tmp11_;
		_tmp14_[3] = _tmp13_;
		_tmp15_ = _tmp14_;
		_tmp15__length1 = 4;
		_tmp16_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) self, "a", _tmp15_, 4);
		_tmp17_ = _tmp16_;
		_valadoc_markup_writer_unref0 (_tmp17_);
		_tmp15_ = (_vala_array_free (_tmp15_, _tmp15__length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp18_ = label;
	_tmp19_ = valadoc_markup_writer_text ((ValadocMarkupWriter*) self, _tmp18_);
	_tmp20_ = _tmp19_;
	_valadoc_markup_writer_unref0 (_tmp20_);
	_tmp21_ = valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) self, "a");
	_tmp22_ = _tmp21_;
	_valadoc_markup_writer_unref0 (_tmp22_);
	_tmp23_ = _valadoc_markup_writer_ref0 (self);
	result = _tmp23_;
	return result;
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_image (ValadocHtmlMarkupWriter* self, const gchar* src, const gchar* caption, const gchar* css_class) {
	ValadocHtmlMarkupWriter* result = NULL;
	const gchar* _tmp0_;
	ValadocHtmlMarkupWriter* _tmp24_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (src != NULL, NULL);
	_tmp0_ = css_class;
	if (_tmp0_ == NULL) {
		gchar* _tmp1_;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar** _tmp7_;
		gchar** _tmp8_;
		gint _tmp8__length1;
		ValadocMarkupWriter* _tmp9_;
		ValadocMarkupWriter* _tmp10_;
		_tmp1_ = g_strdup ("src");
		_tmp2_ = src;
		_tmp3_ = g_strdup (_tmp2_);
		_tmp4_ = g_strdup ("alt");
		_tmp5_ = caption;
		_tmp6_ = g_strdup (_tmp5_);
		_tmp7_ = g_new0 (gchar*, 4 + 1);
		_tmp7_[0] = _tmp1_;
		_tmp7_[1] = _tmp3_;
		_tmp7_[2] = _tmp4_;
		_tmp7_[3] = _tmp6_;
		_tmp8_ = _tmp7_;
		_tmp8__length1 = 4;
		_tmp9_ = valadoc_markup_writer_simple_tag ((ValadocMarkupWriter*) self, "img", _tmp8_, 4);
		_tmp10_ = _tmp9_;
		_valadoc_markup_writer_unref0 (_tmp10_);
		_tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL);
	} else {
		gchar* _tmp11_;
		const gchar* _tmp12_;
		gchar* _tmp13_;
		gchar* _tmp14_;
		const gchar* _tmp15_;
		gchar* _tmp16_;
		gchar* _tmp17_;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		gchar** _tmp20_;
		gchar** _tmp21_;
		gint _tmp21__length1;
		ValadocMarkupWriter* _tmp22_;
		ValadocMarkupWriter* _tmp23_;
		_tmp11_ = g_strdup ("src");
		_tmp12_ = src;
		_tmp13_ = g_strdup (_tmp12_);
		_tmp14_ = g_strdup ("alt");
		_tmp15_ = caption;
		_tmp16_ = g_strdup (_tmp15_);
		_tmp17_ = g_strdup ("class");
		_tmp18_ = css_class;
		_tmp19_ = g_strdup (_tmp18_);
		_tmp20_ = g_new0 (gchar*, 6 + 1);
		_tmp20_[0] = _tmp11_;
		_tmp20_[1] = _tmp13_;
		_tmp20_[2] = _tmp14_;
		_tmp20_[3] = _tmp16_;
		_tmp20_[4] = _tmp17_;
		_tmp20_[5] = _tmp19_;
		_tmp21_ = _tmp20_;
		_tmp21__length1 = 6;
		_tmp22_ = valadoc_markup_writer_simple_tag ((ValadocMarkupWriter*) self, "img", _tmp21_, 6);
		_tmp23_ = _tmp22_;
		_valadoc_markup_writer_unref0 (_tmp23_);
		_tmp21_ = (_vala_array_free (_tmp21_, _tmp21__length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp24_ = _valadoc_markup_writer_ref0 (self);
	result = _tmp24_;
	return result;
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_stylesheet_link (ValadocHtmlMarkupWriter* self, const gchar* url) {
	ValadocHtmlMarkupWriter* result = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	ValadocMarkupWriter* _tmp9_;
	ValadocMarkupWriter* _tmp10_;
	ValadocHtmlMarkupWriter* _tmp11_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (url != NULL, NULL);
	_tmp0_ = g_strdup ("href");
	_tmp1_ = url;
	_tmp2_ = g_strdup (_tmp1_);
	_tmp3_ = g_strdup ("rel");
	_tmp4_ = g_strdup ("stylesheet");
	_tmp5_ = g_strdup ("type");
	_tmp6_ = g_strdup ("text/css");
	_tmp7_ = g_new0 (gchar*, 6 + 1);
	_tmp7_[0] = _tmp0_;
	_tmp7_[1] = _tmp2_;
	_tmp7_[2] = _tmp3_;
	_tmp7_[3] = _tmp4_;
	_tmp7_[4] = _tmp5_;
	_tmp7_[5] = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp8__length1 = 6;
	_tmp9_ = valadoc_markup_writer_simple_tag ((ValadocMarkupWriter*) self, "link", _tmp8_, 6);
	_tmp10_ = _tmp9_;
	_valadoc_markup_writer_unref0 (_tmp10_);
	_tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL);
	_tmp11_ = _valadoc_markup_writer_ref0 (self);
	result = _tmp11_;
	return result;
}


ValadocHtmlMarkupWriter* valadoc_html_markup_writer_javascript_link (ValadocHtmlMarkupWriter* self, const gchar* url) {
	ValadocHtmlMarkupWriter* result = NULL;
	gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gchar** _tmp6_;
	gint _tmp6__length1;
	ValadocMarkupWriter* _tmp7_;
	ValadocMarkupWriter* _tmp8_;
	ValadocMarkupWriter* _tmp9_;
	ValadocMarkupWriter* _tmp10_;
	ValadocHtmlMarkupWriter* _tmp11_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (url != NULL, NULL);
	_tmp0_ = g_strdup ("src");
	_tmp1_ = url;
	_tmp2_ = g_strdup (_tmp1_);
	_tmp3_ = g_strdup ("type");
	_tmp4_ = g_strdup ("text/javascript");
	_tmp5_ = g_new0 (gchar*, 4 + 1);
	_tmp5_[0] = _tmp0_;
	_tmp5_[1] = _tmp2_;
	_tmp5_[2] = _tmp3_;
	_tmp5_[3] = _tmp4_;
	_tmp6_ = _tmp5_;
	_tmp6__length1 = 4;
	_tmp7_ = valadoc_markup_writer_start_tag ((ValadocMarkupWriter*) self, "script", _tmp6_, 4);
	_tmp8_ = _tmp7_;
	_valadoc_markup_writer_unref0 (_tmp8_);
	_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
	_tmp9_ = valadoc_markup_writer_end_tag ((ValadocMarkupWriter*) self, "script");
	_tmp10_ = _tmp9_;
	_valadoc_markup_writer_unref0 (_tmp10_);
	_tmp11_ = _valadoc_markup_writer_ref0 (self);
	result = _tmp11_;
	return result;
}


static gboolean valadoc_html_markup_writer_real_inline_element (ValadocMarkupWriter* base, const gchar* name) {
	ValadocHtmlMarkupWriter * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	gboolean _tmp15_ = FALSE;
	gboolean _tmp16_ = FALSE;
	gboolean _tmp17_ = FALSE;
	gboolean _tmp18_ = FALSE;
	gboolean _tmp19_ = FALSE;
	const gchar* _tmp20_;
	self = (ValadocHtmlMarkupWriter*) base;
	g_return_val_if_fail (name != NULL, FALSE);
	_tmp20_ = name;
	if (g_strcmp0 (_tmp20_, "html") != 0) {
		const gchar* _tmp21_;
		_tmp21_ = name;
		_tmp19_ = g_strcmp0 (_tmp21_, "head") != 0;
	} else {
		_tmp19_ = FALSE;
	}
	if (_tmp19_) {
		const gchar* _tmp22_;
		_tmp22_ = name;
		_tmp18_ = g_strcmp0 (_tmp22_, "title") != 0;
	} else {
		_tmp18_ = FALSE;
	}
	if (_tmp18_) {
		const gchar* _tmp23_;
		_tmp23_ = name;
		_tmp17_ = g_strcmp0 (_tmp23_, "meta") != 0;
	} else {
		_tmp17_ = FALSE;
	}
	if (_tmp17_) {
		const gchar* _tmp24_;
		_tmp24_ = name;
		_tmp16_ = g_strcmp0 (_tmp24_, "link") != 0;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		const gchar* _tmp25_;
		_tmp25_ = name;
		_tmp15_ = g_strcmp0 (_tmp25_, "body") != 0;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		const gchar* _tmp26_;
		_tmp26_ = name;
		_tmp14_ = g_strcmp0 (_tmp26_, "div") != 0;
	} else {
		_tmp14_ = FALSE;
	}
	if (_tmp14_) {
		const gchar* _tmp27_;
		_tmp27_ = name;
		_tmp13_ = g_strcmp0 (_tmp27_, "p") != 0;
	} else {
		_tmp13_ = FALSE;
	}
	if (_tmp13_) {
		const gchar* _tmp28_;
		_tmp28_ = name;
		_tmp12_ = g_strcmp0 (_tmp28_, "table") != 0;
	} else {
		_tmp12_ = FALSE;
	}
	if (_tmp12_) {
		const gchar* _tmp29_;
		_tmp29_ = name;
		_tmp11_ = g_strcmp0 (_tmp29_, "tr") != 0;
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		const gchar* _tmp30_;
		_tmp30_ = name;
		_tmp10_ = g_strcmp0 (_tmp30_, "td") != 0;
	} else {
		_tmp10_ = FALSE;
	}
	if (_tmp10_) {
		const gchar* _tmp31_;
		_tmp31_ = name;
		_tmp9_ = g_strcmp0 (_tmp31_, "ul") != 0;
	} else {
		_tmp9_ = FALSE;
	}
	if (_tmp9_) {
		const gchar* _tmp32_;
		_tmp32_ = name;
		_tmp8_ = g_strcmp0 (_tmp32_, "ol") != 0;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		const gchar* _tmp33_;
		_tmp33_ = name;
		_tmp7_ = g_strcmp0 (_tmp33_, "li") != 0;
	} else {
		_tmp7_ = FALSE;
	}
	if (_tmp7_) {
		const gchar* _tmp34_;
		_tmp34_ = name;
		_tmp6_ = g_strcmp0 (_tmp34_, "h1") != 0;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		const gchar* _tmp35_;
		_tmp35_ = name;
		_tmp5_ = g_strcmp0 (_tmp35_, "h2") != 0;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		const gchar* _tmp36_;
		_tmp36_ = name;
		_tmp4_ = g_strcmp0 (_tmp36_, "h3") != 0;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		const gchar* _tmp37_;
		_tmp37_ = name;
		_tmp3_ = g_strcmp0 (_tmp37_, "h4") != 0;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		const gchar* _tmp38_;
		_tmp38_ = name;
		_tmp2_ = g_strcmp0 (_tmp38_, "h5") != 0;
	} else {
		_tmp2_ = FALSE;
	}
	if (_tmp2_) {
		const gchar* _tmp39_;
		_tmp39_ = name;
		_tmp1_ = g_strcmp0 (_tmp39_, "hr") != 0;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		const gchar* _tmp40_;
		_tmp40_ = name;
		_tmp0_ = g_strcmp0 (_tmp40_, "img") != 0;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}


static gboolean valadoc_html_markup_writer_real_content_inline_element (ValadocMarkupWriter* base, const gchar* name) {
	ValadocHtmlMarkupWriter * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	gboolean _tmp13_ = FALSE;
	gboolean _tmp14_ = FALSE;
	const gchar* _tmp15_;
	self = (ValadocHtmlMarkupWriter*) base;
	g_return_val_if_fail (name != NULL, FALSE);
	_tmp15_ = name;
	if (g_strcmp0 (_tmp15_, "title") == 0) {
		_tmp14_ = TRUE;
	} else {
		const gchar* _tmp16_;
		_tmp16_ = name;
		_tmp14_ = g_strcmp0 (_tmp16_, "meta") == 0;
	}
	if (_tmp14_) {
		_tmp13_ = TRUE;
	} else {
		const gchar* _tmp17_;
		_tmp17_ = name;
		_tmp13_ = g_strcmp0 (_tmp17_, "p") == 0;
	}
	if (_tmp13_) {
		_tmp12_ = TRUE;
	} else {
		const gchar* _tmp18_;
		_tmp18_ = name;
		_tmp12_ = g_strcmp0 (_tmp18_, "a") == 0;
	}
	if (_tmp12_) {
		_tmp11_ = TRUE;
	} else {
		const gchar* _tmp19_;
		_tmp19_ = name;
		_tmp11_ = g_strcmp0 (_tmp19_, "h1") == 0;
	}
	if (_tmp11_) {
		_tmp10_ = TRUE;
	} else {
		const gchar* _tmp20_;
		_tmp20_ = name;
		_tmp10_ = g_strcmp0 (_tmp20_, "h2") == 0;
	}
	if (_tmp10_) {
		_tmp9_ = TRUE;
	} else {
		const gchar* _tmp21_;
		_tmp21_ = name;
		_tmp9_ = g_strcmp0 (_tmp21_, "h3") == 0;
	}
	if (_tmp9_) {
		_tmp8_ = TRUE;
	} else {
		const gchar* _tmp22_;
		_tmp22_ = name;
		_tmp8_ = g_strcmp0 (_tmp22_, "h4") == 0;
	}
	if (_tmp8_) {
		_tmp7_ = TRUE;
	} else {
		const gchar* _tmp23_;
		_tmp23_ = name;
		_tmp7_ = g_strcmp0 (_tmp23_, "h5") == 0;
	}
	if (_tmp7_) {
		_tmp6_ = TRUE;
	} else {
		const gchar* _tmp24_;
		_tmp24_ = name;
		_tmp6_ = g_strcmp0 (_tmp24_, "li") == 0;
	}
	if (_tmp6_) {
		_tmp5_ = TRUE;
	} else {
		const gchar* _tmp25_;
		_tmp25_ = name;
		_tmp5_ = g_strcmp0 (_tmp25_, "span") == 0;
	}
	if (_tmp5_) {
		_tmp4_ = TRUE;
	} else {
		const gchar* _tmp26_;
		_tmp26_ = name;
		_tmp4_ = g_strcmp0 (_tmp26_, "code") == 0;
	}
	if (_tmp4_) {
		_tmp3_ = TRUE;
	} else {
		const gchar* _tmp27_;
		_tmp27_ = name;
		_tmp3_ = g_strcmp0 (_tmp27_, "b") == 0;
	}
	if (_tmp3_) {
		_tmp2_ = TRUE;
	} else {
		const gchar* _tmp28_;
		_tmp28_ = name;
		_tmp2_ = g_strcmp0 (_tmp28_, "i") == 0;
	}
	if (_tmp2_) {
		_tmp1_ = TRUE;
	} else {
		const gchar* _tmp29_;
		_tmp29_ = name;
		_tmp1_ = g_strcmp0 (_tmp29_, "u") == 0;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp30_;
		_tmp30_ = name;
		_tmp0_ = g_strcmp0 (_tmp30_, "stoke") == 0;
	}
	result = _tmp0_;
	return result;
}


static void valadoc_html_markup_writer_class_init (ValadocHtmlMarkupWriterClass * klass) {
	valadoc_html_markup_writer_parent_class = g_type_class_peek_parent (klass);
	((ValadocMarkupWriterClass *) klass)->inline_element = (gboolean (*) (ValadocMarkupWriter *, const gchar*)) valadoc_html_markup_writer_real_inline_element;
	((ValadocMarkupWriterClass *) klass)->content_inline_element = (gboolean (*) (ValadocMarkupWriter *, const gchar*)) valadoc_html_markup_writer_real_content_inline_element;
}


static void valadoc_html_markup_writer_instance_init (ValadocHtmlMarkupWriter * self) {
}


GType valadoc_html_markup_writer_get_type (void) {
	static volatile gsize valadoc_html_markup_writer_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_html_markup_writer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocHtmlMarkupWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_html_markup_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocHtmlMarkupWriter), 0, (GInstanceInitFunc) valadoc_html_markup_writer_instance_init, NULL };
		GType valadoc_html_markup_writer_type_id;
		valadoc_html_markup_writer_type_id = g_type_register_static (VALADOC_TYPE_MARKUP_WRITER, "ValadocHtmlMarkupWriter", &g_define_type_info, 0);
		g_once_init_leave (&valadoc_html_markup_writer_type_id__volatile, valadoc_html_markup_writer_type_id);
	}
	return valadoc_html_markup_writer_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



