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

/* embedded.vala
 *
 * Copyright (C) 2008-2009 Didier Villevalois
 * Copyright (C) 2008-2012 Florian Brosch
 *
 * 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 <glib/gstdio.h>

enum  {
	VALADOC_CONTENT_EMBEDDED_0_PROPERTY,
	VALADOC_CONTENT_EMBEDDED_URL_PROPERTY,
	VALADOC_CONTENT_EMBEDDED_CAPTION_PROPERTY,
	VALADOC_CONTENT_EMBEDDED_HORIZONTAL_ALIGN_PROPERTY,
	VALADOC_CONTENT_EMBEDDED_VERTICAL_ALIGN_PROPERTY,
	VALADOC_CONTENT_EMBEDDED_STYLE_PROPERTY,
	VALADOC_CONTENT_EMBEDDED_NUM_PROPERTIES
};
static GParamSpec* valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ValadocContentEmbeddedPrivate {
	gchar* _url;
	gchar* _caption;
	ValadocContentHorizontalAlign _horizontal_align;
	ValadocContentVerticalAlign _vertical_align;
	gchar* _style;
	ValadocResourceLocator* _locator;
};


static gpointer valadoc_content_embedded_parent_class = NULL;
static ValadocContentInlineIface * valadoc_content_embedded_valadoc_content_inline_parent_iface = NULL;
static ValadocContentStyleAttributesIface * valadoc_content_embedded_valadoc_content_style_attributes_parent_iface = NULL;

#define VALADOC_CONTENT_EMBEDDED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), VALADOC_CONTENT_TYPE_EMBEDDED, ValadocContentEmbeddedPrivate))
G_GNUC_INTERNAL ValadocContentEmbedded* valadoc_content_embedded_new (void);
G_GNUC_INTERNAL ValadocContentEmbedded* valadoc_content_embedded_construct (GType object_type);
static void valadoc_content_embedded_real_configure (ValadocContentContentElement* base, ValadocSettings* settings, ValadocResourceLocator* locator);
static void valadoc_content_embedded_real_check (ValadocContentContentElement* base, ValadocApiTree* api_root, ValadocApiNode* container, const gchar* file_path, ValadocErrorReporter* reporter, ValadocSettings* settings);
static void valadoc_content_embedded_real_accept (ValadocContentContentElement* base, ValadocContentContentVisitor* visitor);
static gboolean valadoc_content_embedded_real_is_empty (ValadocContentContentElement* base);
static ValadocContentContentElement* valadoc_content_embedded_real_copy (ValadocContentContentElement* base, ValadocContentContentElement* new_parent);
G_GNUC_INTERNAL void valadoc_content_content_element_set_parent (ValadocContentContentElement* self, ValadocContentContentElement* value);
static void valadoc_content_embedded_finalize (GObject * obj);
static void _vala_valadoc_content_embedded_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_valadoc_content_embedded_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


G_GNUC_INTERNAL ValadocContentEmbedded* valadoc_content_embedded_construct (GType object_type) {
	ValadocContentEmbedded * self = NULL;
	self = (ValadocContentEmbedded*) valadoc_content_content_element_construct (object_type);
	return self;
}


G_GNUC_INTERNAL ValadocContentEmbedded* valadoc_content_embedded_new (void) {
	return valadoc_content_embedded_construct (VALADOC_CONTENT_TYPE_EMBEDDED);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void valadoc_content_embedded_real_configure (ValadocContentContentElement* base, ValadocSettings* settings, ValadocResourceLocator* locator) {
	ValadocContentEmbedded * self;
	ValadocResourceLocator* _tmp0_;
	ValadocResourceLocator* _tmp1_;
	self = (ValadocContentEmbedded*) base;
	g_return_if_fail (settings != NULL);
	g_return_if_fail (locator != NULL);
	_tmp0_ = locator;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_locator);
	self->priv->_locator = _tmp1_;
}


static void valadoc_content_embedded_real_check (ValadocContentContentElement* base, ValadocApiTree* api_root, ValadocApiNode* container, const gchar* file_path, ValadocErrorReporter* reporter, ValadocSettings* settings) {
	ValadocContentEmbedded * self;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp16_;
	gboolean _tmp17_;
	self = (ValadocContentEmbedded*) base;
	g_return_if_fail (api_root != NULL);
	g_return_if_fail (container != NULL);
	g_return_if_fail (file_path != NULL);
	g_return_if_fail (reporter != NULL);
	g_return_if_fail (settings != NULL);
	_tmp0_ = self->priv->_url;
	_tmp1_ = g_path_is_absolute (_tmp0_);
	if (!_tmp1_) {
		gchar* relative_to_file = NULL;
		const gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		gboolean _tmp9_;
		_tmp2_ = file_path;
		_tmp3_ = g_path_get_dirname (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->_url;
		_tmp6_ = g_build_path (G_DIR_SEPARATOR_S, _tmp4_, _tmp5_, NULL);
		_tmp7_ = _tmp6_;
		_g_free0 (_tmp4_);
		relative_to_file = _tmp7_;
		_tmp8_ = relative_to_file;
		_tmp9_ = g_file_test (_tmp8_, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR);
		if (_tmp9_) {
			gchar* _tmp10_;
			gchar* _tmp11_;
			ValadocApiNode* _tmp12_;
			ValadocApiPackage* _tmp13_;
			ValadocApiPackage* _tmp14_;
			ValadocApiPackage* _tmp15_;
			_tmp10_ = relative_to_file;
			relative_to_file = NULL;
			_tmp11_ = _tmp10_;
			valadoc_content_embedded_set_url (self, _tmp11_);
			_g_free0 (_tmp11_);
			_tmp12_ = container;
			_tmp13_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = _g_object_ref0 (_tmp14_);
			_g_object_unref0 (self->package);
			self->package = _tmp15_;
			_g_free0 (relative_to_file);
			return;
		}
		_g_free0 (relative_to_file);
	}
	_tmp16_ = self->priv->_url;
	_tmp17_ = g_file_test (_tmp16_, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR);
	if (!_tmp17_) {
		gchar* base_name = NULL;
		const gchar* _tmp18_;
		gchar* _tmp19_;
		ValadocSettings* _tmp20_;
		gchar** _tmp21_;
		gint _tmp21__length1;
		gchar* _tmp33_ = NULL;
		ValadocApiNode* _tmp34_;
		gchar* node_segment = NULL;
		gchar* _tmp40_;
		ValadocErrorReporter* _tmp41_;
		const gchar* _tmp42_;
		const gchar* _tmp43_;
		gchar* _tmp44_;
		gchar* _tmp45_;
		const gchar* _tmp46_;
		_tmp18_ = self->priv->_url;
		_tmp19_ = g_path_get_basename (_tmp18_);
		base_name = _tmp19_;
		_tmp20_ = settings;
		_tmp21_ = _tmp20_->alternative_resource_dirs;
		_tmp21__length1 = _tmp20_->alternative_resource_dirs_length1;
		{
			gchar** dir_collection = NULL;
			gint dir_collection_length1 = 0;
			gint _dir_collection_size_ = 0;
			gint dir_it = 0;
			dir_collection = _tmp21_;
			dir_collection_length1 = _tmp21__length1;
			for (dir_it = 0; dir_it < _tmp21__length1; dir_it = dir_it + 1) {
				const gchar* dir = NULL;
				dir = dir_collection[dir_it];
				{
					gchar* alternative_path = NULL;
					const gchar* _tmp22_;
					const gchar* _tmp23_;
					gchar* _tmp24_;
					const gchar* _tmp25_;
					gboolean _tmp26_;
					_tmp22_ = dir;
					_tmp23_ = base_name;
					_tmp24_ = g_build_path (G_DIR_SEPARATOR_S, _tmp22_, _tmp23_, NULL);
					alternative_path = _tmp24_;
					_tmp25_ = alternative_path;
					_tmp26_ = g_file_test (_tmp25_, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR);
					if (_tmp26_) {
						gchar* _tmp27_;
						gchar* _tmp28_;
						ValadocApiNode* _tmp29_;
						ValadocApiPackage* _tmp30_;
						ValadocApiPackage* _tmp31_;
						ValadocApiPackage* _tmp32_;
						_tmp27_ = alternative_path;
						alternative_path = NULL;
						_tmp28_ = _tmp27_;
						valadoc_content_embedded_set_url (self, _tmp28_);
						_g_free0 (_tmp28_);
						_tmp29_ = container;
						_tmp30_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp29_);
						_tmp31_ = _tmp30_;
						_tmp32_ = _g_object_ref0 (_tmp31_);
						_g_object_unref0 (self->package);
						self->package = _tmp32_;
						_g_free0 (alternative_path);
						_g_free0 (base_name);
						return;
					}
					_g_free0 (alternative_path);
				}
			}
		}
		_tmp34_ = container;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp34_, VALADOC_API_TYPE_PACKAGE)) {
			gchar* _tmp35_;
			_tmp35_ = g_strdup ("");
			_g_free0 (_tmp33_);
			_tmp33_ = _tmp35_;
		} else {
			ValadocApiNode* _tmp36_;
			gchar* _tmp37_;
			gchar* _tmp38_;
			gchar* _tmp39_;
			_tmp36_ = container;
			_tmp37_ = valadoc_api_node_get_full_name (_tmp36_);
			_tmp38_ = _tmp37_;
			_tmp39_ = g_strconcat (_tmp38_, ": ", NULL);
			_g_free0 (_tmp33_);
			_tmp33_ = _tmp39_;
			_g_free0 (_tmp38_);
		}
		_tmp40_ = g_strdup (_tmp33_);
		node_segment = _tmp40_;
		_tmp41_ = reporter;
		_tmp42_ = file_path;
		_tmp43_ = node_segment;
		_tmp44_ = g_strdup_printf ("%s: %s{{", _tmp42_, _tmp43_);
		_tmp45_ = _tmp44_;
		_tmp46_ = self->priv->_url;
		valadoc_error_reporter_simple_error (_tmp41_, _tmp45_, "'%s' does not exist", _tmp46_);
		_g_free0 (_tmp45_);
		_g_free0 (node_segment);
		_g_free0 (_tmp33_);
		_g_free0 (base_name);
	} else {
		ValadocApiNode* _tmp47_;
		ValadocApiPackage* _tmp48_;
		ValadocApiPackage* _tmp49_;
		ValadocApiPackage* _tmp50_;
		_tmp47_ = container;
		_tmp48_ = valadoc_documentation_get_package ((ValadocDocumentation*) _tmp47_);
		_tmp49_ = _tmp48_;
		_tmp50_ = _g_object_ref0 (_tmp49_);
		_g_object_unref0 (self->package);
		self->package = _tmp50_;
	}
}


static void valadoc_content_embedded_real_accept (ValadocContentContentElement* base, ValadocContentContentVisitor* visitor) {
	ValadocContentEmbedded * self;
	ValadocContentContentVisitor* _tmp0_;
	self = (ValadocContentEmbedded*) base;
	g_return_if_fail (visitor != NULL);
	_tmp0_ = visitor;
	valadoc_content_content_visitor_visit_embedded (_tmp0_, self);
}


static gboolean valadoc_content_embedded_real_is_empty (ValadocContentContentElement* base) {
	ValadocContentEmbedded * self;
	gboolean result = FALSE;
	self = (ValadocContentEmbedded*) base;
	result = FALSE;
	return result;
}


static ValadocContentContentElement* valadoc_content_embedded_real_copy (ValadocContentContentElement* base, ValadocContentContentElement* new_parent) {
	ValadocContentEmbedded * self;
	ValadocContentContentElement* result = NULL;
	ValadocContentEmbedded* embedded = NULL;
	ValadocContentEmbedded* _tmp0_;
	ValadocContentContentElement* _tmp1_;
	ValadocContentHorizontalAlign _tmp2_;
	ValadocContentHorizontalAlign _tmp3_;
	ValadocContentVerticalAlign _tmp4_;
	ValadocContentVerticalAlign _tmp5_;
	ValadocResourceLocator* _tmp6_;
	ValadocResourceLocator* _tmp7_;
	const gchar* _tmp8_;
	ValadocApiPackage* _tmp9_;
	ValadocApiPackage* _tmp10_;
	const gchar* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	self = (ValadocContentEmbedded*) base;
	_tmp0_ = valadoc_content_embedded_new ();
	embedded = _tmp0_;
	_tmp1_ = new_parent;
	valadoc_content_content_element_set_parent ((ValadocContentContentElement*) embedded, _tmp1_);
	_tmp2_ = valadoc_content_style_attributes_get_horizontal_align ((ValadocContentStyleAttributes*) self);
	_tmp3_ = _tmp2_;
	valadoc_content_style_attributes_set_horizontal_align ((ValadocContentStyleAttributes*) embedded, _tmp3_);
	_tmp4_ = valadoc_content_style_attributes_get_vertical_align ((ValadocContentStyleAttributes*) self);
	_tmp5_ = _tmp4_;
	valadoc_content_style_attributes_set_vertical_align ((ValadocContentStyleAttributes*) embedded, _tmp5_);
	_tmp6_ = self->priv->_locator;
	_tmp7_ = _g_object_ref0 (_tmp6_);
	_g_object_unref0 (embedded->priv->_locator);
	embedded->priv->_locator = _tmp7_;
	_tmp8_ = self->priv->_caption;
	valadoc_content_embedded_set_caption (embedded, _tmp8_);
	_tmp9_ = self->package;
	_tmp10_ = _g_object_ref0 (_tmp9_);
	_g_object_unref0 (embedded->package);
	embedded->package = _tmp10_;
	_tmp11_ = valadoc_content_style_attributes_get_style ((ValadocContentStyleAttributes*) self);
	_tmp12_ = _tmp11_;
	valadoc_content_style_attributes_set_style ((ValadocContentStyleAttributes*) embedded, _tmp12_);
	_tmp13_ = self->priv->_url;
	valadoc_content_embedded_set_url (embedded, _tmp13_);
	result = (ValadocContentContentElement*) embedded;
	return result;
}


const gchar* valadoc_content_embedded_get_url (ValadocContentEmbedded* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_url;
	result = _tmp0_;
	return result;
}


void valadoc_content_embedded_set_url (ValadocContentEmbedded* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, valadoc_content_embedded_get_url (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		_g_free0 (self->priv->_url);
		self->priv->_url = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_URL_PROPERTY]);
	}
}


const gchar* valadoc_content_embedded_get_caption (ValadocContentEmbedded* self) {
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_caption;
	result = _tmp0_;
	return result;
}


void valadoc_content_embedded_set_caption (ValadocContentEmbedded* self, const gchar* value) {
	g_return_if_fail (self != NULL);
	if (g_strcmp0 (value, valadoc_content_embedded_get_caption (self)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		_g_free0 (self->priv->_caption);
		self->priv->_caption = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_CAPTION_PROPERTY]);
	}
}


static ValadocContentHorizontalAlign valadoc_content_embedded_real_get_horizontal_align (ValadocContentStyleAttributes* base) {
	ValadocContentHorizontalAlign result;
	ValadocContentEmbedded* self;
	ValadocContentHorizontalAlign _tmp0_;
	self = (ValadocContentEmbedded*) base;
	_tmp0_ = self->priv->_horizontal_align;
	result = _tmp0_;
	return result;
}


static void valadoc_content_embedded_real_set_horizontal_align (ValadocContentStyleAttributes* base, ValadocContentHorizontalAlign value) {
	ValadocContentEmbedded* self;
	self = (ValadocContentEmbedded*) base;
	if (valadoc_content_embedded_real_get_horizontal_align (base) != value) {
		ValadocContentHorizontalAlign _tmp0_;
		_tmp0_ = value;
		self->priv->_horizontal_align = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_HORIZONTAL_ALIGN_PROPERTY]);
	}
}


static ValadocContentVerticalAlign valadoc_content_embedded_real_get_vertical_align (ValadocContentStyleAttributes* base) {
	ValadocContentVerticalAlign result;
	ValadocContentEmbedded* self;
	ValadocContentVerticalAlign _tmp0_;
	self = (ValadocContentEmbedded*) base;
	_tmp0_ = self->priv->_vertical_align;
	result = _tmp0_;
	return result;
}


static void valadoc_content_embedded_real_set_vertical_align (ValadocContentStyleAttributes* base, ValadocContentVerticalAlign value) {
	ValadocContentEmbedded* self;
	self = (ValadocContentEmbedded*) base;
	if (valadoc_content_embedded_real_get_vertical_align (base) != value) {
		ValadocContentVerticalAlign _tmp0_;
		_tmp0_ = value;
		self->priv->_vertical_align = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_VERTICAL_ALIGN_PROPERTY]);
	}
}


static const gchar* valadoc_content_embedded_real_get_style (ValadocContentStyleAttributes* base) {
	const gchar* result;
	ValadocContentEmbedded* self;
	const gchar* _tmp0_;
	self = (ValadocContentEmbedded*) base;
	_tmp0_ = self->priv->_style;
	result = _tmp0_;
	return result;
}


static void valadoc_content_embedded_real_set_style (ValadocContentStyleAttributes* base, const gchar* value) {
	ValadocContentEmbedded* self;
	self = (ValadocContentEmbedded*) base;
	if (g_strcmp0 (value, valadoc_content_embedded_real_get_style (base)) != 0) {
		const gchar* _tmp0_;
		gchar* _tmp1_;
		_tmp0_ = value;
		_tmp1_ = g_strdup (_tmp0_);
		_g_free0 (self->priv->_style);
		self->priv->_style = _tmp1_;
		g_object_notify_by_pspec ((GObject *) self, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_STYLE_PROPERTY]);
	}
}


static void valadoc_content_embedded_class_init (ValadocContentEmbeddedClass * klass) {
	valadoc_content_embedded_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ValadocContentEmbeddedPrivate));
	((ValadocContentContentElementClass *) klass)->configure = (void (*) (ValadocContentContentElement *, ValadocSettings*, ValadocResourceLocator*)) valadoc_content_embedded_real_configure;
	((ValadocContentContentElementClass *) klass)->check = (void (*) (ValadocContentContentElement *, ValadocApiTree*, ValadocApiNode*, const gchar*, ValadocErrorReporter*, ValadocSettings*)) valadoc_content_embedded_real_check;
	((ValadocContentContentElementClass *) klass)->accept = (void (*) (ValadocContentContentElement *, ValadocContentContentVisitor*)) valadoc_content_embedded_real_accept;
	((ValadocContentContentElementClass *) klass)->is_empty = (gboolean (*) (ValadocContentContentElement *)) valadoc_content_embedded_real_is_empty;
	((ValadocContentContentElementClass *) klass)->copy = (ValadocContentContentElement* (*) (ValadocContentContentElement *, ValadocContentContentElement*)) valadoc_content_embedded_real_copy;
	G_OBJECT_CLASS (klass)->get_property = _vala_valadoc_content_embedded_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_valadoc_content_embedded_set_property;
	G_OBJECT_CLASS (klass)->finalize = valadoc_content_embedded_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_EMBEDDED_URL_PROPERTY, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_URL_PROPERTY] = g_param_spec_string ("url", "url", "url", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_EMBEDDED_CAPTION_PROPERTY, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_CAPTION_PROPERTY] = g_param_spec_string ("caption", "caption", "caption", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_EMBEDDED_HORIZONTAL_ALIGN_PROPERTY, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_HORIZONTAL_ALIGN_PROPERTY] = g_param_spec_enum ("horizontal-align", "horizontal-align", "horizontal-align", VALADOC_CONTENT_TYPE_HORIZONTAL_ALIGN, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_EMBEDDED_VERTICAL_ALIGN_PROPERTY, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_VERTICAL_ALIGN_PROPERTY] = g_param_spec_enum ("vertical-align", "vertical-align", "vertical-align", VALADOC_CONTENT_TYPE_VERTICAL_ALIGN, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), VALADOC_CONTENT_EMBEDDED_STYLE_PROPERTY, valadoc_content_embedded_properties[VALADOC_CONTENT_EMBEDDED_STYLE_PROPERTY] = g_param_spec_string ("style", "style", "style", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void valadoc_content_embedded_valadoc_content_inline_interface_init (ValadocContentInlineIface * iface) {
	valadoc_content_embedded_valadoc_content_inline_parent_iface = g_type_interface_peek_parent (iface);
}


static void valadoc_content_embedded_valadoc_content_style_attributes_interface_init (ValadocContentStyleAttributesIface * iface) {
	valadoc_content_embedded_valadoc_content_style_attributes_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_horizontal_align = valadoc_content_embedded_real_get_horizontal_align;
	iface->set_horizontal_align = valadoc_content_embedded_real_set_horizontal_align;
	iface->get_vertical_align = valadoc_content_embedded_real_get_vertical_align;
	iface->set_vertical_align = valadoc_content_embedded_real_set_vertical_align;
	iface->get_style = valadoc_content_embedded_real_get_style;
	iface->set_style = valadoc_content_embedded_real_set_style;
}


static void valadoc_content_embedded_instance_init (ValadocContentEmbedded * self) {
	self->priv = VALADOC_CONTENT_EMBEDDED_GET_PRIVATE (self);
}


static void valadoc_content_embedded_finalize (GObject * obj) {
	ValadocContentEmbedded * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALADOC_CONTENT_TYPE_EMBEDDED, ValadocContentEmbedded);
	_g_free0 (self->priv->_url);
	_g_free0 (self->priv->_caption);
	_g_free0 (self->priv->_style);
	_g_object_unref0 (self->package);
	_g_object_unref0 (self->priv->_locator);
	G_OBJECT_CLASS (valadoc_content_embedded_parent_class)->finalize (obj);
}


GType valadoc_content_embedded_get_type (void) {
	static volatile gsize valadoc_content_embedded_type_id__volatile = 0;
	if (g_once_init_enter (&valadoc_content_embedded_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ValadocContentEmbeddedClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) valadoc_content_embedded_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValadocContentEmbedded), 0, (GInstanceInitFunc) valadoc_content_embedded_instance_init, NULL };
		static const GInterfaceInfo valadoc_content_inline_info = { (GInterfaceInitFunc) valadoc_content_embedded_valadoc_content_inline_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		static const GInterfaceInfo valadoc_content_style_attributes_info = { (GInterfaceInitFunc) valadoc_content_embedded_valadoc_content_style_attributes_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType valadoc_content_embedded_type_id;
		valadoc_content_embedded_type_id = g_type_register_static (VALADOC_CONTENT_TYPE_CONTENT_ELEMENT, "ValadocContentEmbedded", &g_define_type_info, 0);
		g_type_add_interface_static (valadoc_content_embedded_type_id, VALADOC_CONTENT_TYPE_INLINE, &valadoc_content_inline_info);
		g_type_add_interface_static (valadoc_content_embedded_type_id, VALADOC_CONTENT_TYPE_STYLE_ATTRIBUTES, &valadoc_content_style_attributes_info);
		g_once_init_leave (&valadoc_content_embedded_type_id__volatile, valadoc_content_embedded_type_id);
	}
	return valadoc_content_embedded_type_id__volatile;
}


static void _vala_valadoc_content_embedded_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	ValadocContentEmbedded * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_CONTENT_TYPE_EMBEDDED, ValadocContentEmbedded);
	switch (property_id) {
		case VALADOC_CONTENT_EMBEDDED_URL_PROPERTY:
		g_value_set_string (value, valadoc_content_embedded_get_url (self));
		break;
		case VALADOC_CONTENT_EMBEDDED_CAPTION_PROPERTY:
		g_value_set_string (value, valadoc_content_embedded_get_caption (self));
		break;
		case VALADOC_CONTENT_EMBEDDED_HORIZONTAL_ALIGN_PROPERTY:
		g_value_set_enum (value, valadoc_content_style_attributes_get_horizontal_align ((ValadocContentStyleAttributes*) self));
		break;
		case VALADOC_CONTENT_EMBEDDED_VERTICAL_ALIGN_PROPERTY:
		g_value_set_enum (value, valadoc_content_style_attributes_get_vertical_align ((ValadocContentStyleAttributes*) self));
		break;
		case VALADOC_CONTENT_EMBEDDED_STYLE_PROPERTY:
		g_value_set_string (value, valadoc_content_style_attributes_get_style ((ValadocContentStyleAttributes*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_valadoc_content_embedded_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	ValadocContentEmbedded * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, VALADOC_CONTENT_TYPE_EMBEDDED, ValadocContentEmbedded);
	switch (property_id) {
		case VALADOC_CONTENT_EMBEDDED_URL_PROPERTY:
		valadoc_content_embedded_set_url (self, g_value_get_string (value));
		break;
		case VALADOC_CONTENT_EMBEDDED_CAPTION_PROPERTY:
		valadoc_content_embedded_set_caption (self, g_value_get_string (value));
		break;
		case VALADOC_CONTENT_EMBEDDED_HORIZONTAL_ALIGN_PROPERTY:
		valadoc_content_style_attributes_set_horizontal_align ((ValadocContentStyleAttributes*) self, g_value_get_enum (value));
		break;
		case VALADOC_CONTENT_EMBEDDED_VERTICAL_ALIGN_PROPERTY:
		valadoc_content_style_attributes_set_vertical_align ((ValadocContentStyleAttributes*) self, g_value_get_enum (value));
		break;
		case VALADOC_CONTENT_EMBEDDED_STYLE_PROPERTY:
		valadoc_content_style_attributes_set_style ((ValadocContentStyleAttributes*) self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



