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

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 2 -*- */
/*
 *
 * Copyright (C) 2016  Daniel Espinosa <esodan@gmail.com>
 *
 * 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, see <http://www.gnu.org/licenses/>.
 *
 * Authors:
 *      Daniel Espinosa <esodan@gmail.com>
 */

#include "gxml/gxml.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>
#include "gxml.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	GXML_DOM_EVENT_INIT_0_PROPERTY,
	GXML_DOM_EVENT_INIT_BUBBLES_PROPERTY,
	GXML_DOM_EVENT_INIT_CANCELABLE_PROPERTY,
	GXML_DOM_EVENT_INIT_NUM_PROPERTIES
};
static GParamSpec* gxml_dom_event_init_properties[GXML_DOM_EVENT_INIT_NUM_PROPERTIES];
enum  {
	GXML_DOM_CUSTOM_EVENT_INIT_0_PROPERTY,
	GXML_DOM_CUSTOM_EVENT_INIT_DETAIL_PROPERTY,
	GXML_DOM_CUSTOM_EVENT_INIT_NUM_PROPERTIES
};
static GParamSpec* gxml_dom_custom_event_init_properties[GXML_DOM_CUSTOM_EVENT_INIT_NUM_PROPERTIES];
enum  {
	GXML_DOM_TIME_STAMP_0_PROPERTY,
	GXML_DOM_TIME_STAMP_TIME_PROPERTY,
	GXML_DOM_TIME_STAMP_NUM_PROPERTIES
};
static GParamSpec* gxml_dom_time_stamp_properties[GXML_DOM_TIME_STAMP_NUM_PROPERTIES];
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

struct _GXmlDomEventInitPrivate {
	gboolean _bubbles;
	gboolean _cancelable;
};

struct _GXmlDomCustomEventInitPrivate {
	GValue _detail;
};

struct _GXmlDomTimeStampPrivate {
	GDateTime* _time;
};

static gint GXmlDomEventInit_private_offset;
static gpointer gxml_dom_event_init_parent_class = NULL;
static gint GXmlDomCustomEventInit_private_offset;
static gpointer gxml_dom_custom_event_init_parent_class = NULL;
static gint GXmlDomTimeStamp_private_offset;
static gpointer gxml_dom_time_stamp_parent_class = NULL;

static GType gxml_dom_event_target_get_type_once (void);
static GType gxml_dom_event_listener_get_type_once (void);
static GType gxml_dom_event_get_type_once (void);
static void gxml_dom_event_init_finalize (GObject * obj);
static GType gxml_dom_event_init_get_type_once (void);
static void _vala_gxml_dom_event_init_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_gxml_dom_event_init_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
static GType gxml_dom_custom_event_get_type_once (void);
static gboolean _g_value_equal (const GValue * s1,
                         const GValue * s2);
static void gxml_dom_custom_event_init_finalize (GObject * obj);
static GType gxml_dom_custom_event_init_get_type_once (void);
static void _vala_gxml_dom_custom_event_init_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_gxml_dom_custom_event_init_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static void gxml_dom_time_stamp_finalize (GObject * obj);
static GType gxml_dom_time_stamp_get_type_once (void);
static void _vala_gxml_dom_time_stamp_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_gxml_dom_time_stamp_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);

void
gxml_dom_event_target_add_event_listener (GXmlDomEventTarget* self,
                                          const gchar* type,
                                          GXmlDomEventListener* callback,
                                          gboolean capture)
{
	GXmlDomEventTargetIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_EVENT_TARGET_GET_INTERFACE (self);
	if (_iface_->add_event_listener) {
		_iface_->add_event_listener (self, type, callback, capture);
	}
}

void
gxml_dom_event_target_remove_event_listener (GXmlDomEventTarget* self,
                                             const gchar* type,
                                             GXmlDomEventListener* callback,
                                             gboolean capture)
{
	GXmlDomEventTargetIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_EVENT_TARGET_GET_INTERFACE (self);
	if (_iface_->remove_event_listener) {
		_iface_->remove_event_listener (self, type, callback, capture);
	}
}

gboolean
gxml_dom_event_target_dispatch_event (GXmlDomEventTarget* self,
                                      GXmlDomEvent* event,
                                      GError** error)
{
	GXmlDomEventTargetIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_EVENT_TARGET_GET_INTERFACE (self);
	if (_iface_->dispatch_event) {
		return _iface_->dispatch_event (self, event, error);
	}
	return FALSE;
}

static void
gxml_dom_event_target_default_init (GXmlDomEventTargetIface * iface,
                                    gpointer iface_data)
{
}

static GType
gxml_dom_event_target_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomEventTargetIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_event_target_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_event_target_type_id;
	gxml_dom_event_target_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomEventTarget", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_event_target_type_id, G_TYPE_OBJECT);
	return gxml_dom_event_target_type_id;
}

GType
gxml_dom_event_target_get_type (void)
{
	static volatile gsize gxml_dom_event_target_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_event_target_type_id__once)) {
		GType gxml_dom_event_target_type_id;
		gxml_dom_event_target_type_id = gxml_dom_event_target_get_type_once ();
		g_once_init_leave (&gxml_dom_event_target_type_id__once, gxml_dom_event_target_type_id);
	}
	return gxml_dom_event_target_type_id__once;
}

void
gxml_dom_event_listener_handle_event (GXmlDomEventListener* self,
                                      GXmlDomEvent* event)
{
	GXmlDomEventListenerIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_EVENT_LISTENER_GET_INTERFACE (self);
	if (_iface_->handle_event) {
		_iface_->handle_event (self, event);
	}
}

static void
gxml_dom_event_listener_default_init (GXmlDomEventListenerIface * iface,
                                      gpointer iface_data)
{
}

static GType
gxml_dom_event_listener_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomEventListenerIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_event_listener_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_event_listener_type_id;
	gxml_dom_event_listener_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomEventListener", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_event_listener_type_id, G_TYPE_OBJECT);
	return gxml_dom_event_listener_type_id;
}

GType
gxml_dom_event_listener_get_type (void)
{
	static volatile gsize gxml_dom_event_listener_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_event_listener_type_id__once)) {
		GType gxml_dom_event_listener_type_id;
		gxml_dom_event_listener_type_id = gxml_dom_event_listener_get_type_once ();
		g_once_init_leave (&gxml_dom_event_listener_type_id__once, gxml_dom_event_listener_type_id);
	}
	return gxml_dom_event_listener_type_id__once;
}

static GType
gxml_dom_event_phase_get_type_once (void)
{
	static const GEnumValue values[] = {{GXML_DOM_EVENT_PHASE_NONE, "GXML_DOM_EVENT_PHASE_NONE", "none"}, {GXML_DOM_EVENT_PHASE_CAPTURING_PHASE, "GXML_DOM_EVENT_PHASE_CAPTURING_PHASE", "capturing-phase"}, {GXML_DOM_EVENT_PHASE_AT_TARGET, "GXML_DOM_EVENT_PHASE_AT_TARGET", "at-target"}, {GXML_DOM_EVENT_PHASE_BUBBLING_PHASE, "GXML_DOM_EVENT_PHASE_BUBBLING_PHASE", "bubbling-phase"}, {0, NULL, NULL}};
	GType gxml_dom_event_phase_type_id;
	gxml_dom_event_phase_type_id = g_enum_register_static ("GXmlDomEventPhase", values);
	return gxml_dom_event_phase_type_id;
}

GType
gxml_dom_event_phase_get_type (void)
{
	static volatile gsize gxml_dom_event_phase_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_event_phase_type_id__once)) {
		GType gxml_dom_event_phase_type_id;
		gxml_dom_event_phase_type_id = gxml_dom_event_phase_get_type_once ();
		g_once_init_leave (&gxml_dom_event_phase_type_id__once, gxml_dom_event_phase_type_id);
	}
	return gxml_dom_event_phase_type_id__once;
}

static GType
gxml_dom_event_flags_get_type_once (void)
{
	static const GFlagsValue values[] = {{GXML_DOM_EVENT_FLAGS_STOP_PROPAGATION_FLAG, "GXML_DOM_EVENT_FLAGS_STOP_PROPAGATION_FLAG", "stop-propagation-flag"}, {GXML_DOM_EVENT_FLAGS_STOP_IMMEDIATE_PROPAGATION_FLAG, "GXML_DOM_EVENT_FLAGS_STOP_IMMEDIATE_PROPAGATION_FLAG", "stop-immediate-propagation-flag"}, {GXML_DOM_EVENT_FLAGS_CANCELED_FLAG, "GXML_DOM_EVENT_FLAGS_CANCELED_FLAG", "canceled-flag"}, {GXML_DOM_EVENT_FLAGS_INITIALIZED_FLAG, "GXML_DOM_EVENT_FLAGS_INITIALIZED_FLAG", "initialized-flag"}, {GXML_DOM_EVENT_FLAGS_DISPATCH_FLAG, "GXML_DOM_EVENT_FLAGS_DISPATCH_FLAG", "dispatch-flag"}, {0, NULL, NULL}};
	GType gxml_dom_event_flags_type_id;
	gxml_dom_event_flags_type_id = g_flags_register_static ("GXmlDomEventFlags", values);
	return gxml_dom_event_flags_type_id;
}

GType
gxml_dom_event_flags_get_type (void)
{
	static volatile gsize gxml_dom_event_flags_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_event_flags_type_id__once)) {
		GType gxml_dom_event_flags_type_id;
		gxml_dom_event_flags_type_id = gxml_dom_event_flags_get_type_once ();
		g_once_init_leave (&gxml_dom_event_flags_type_id__once, gxml_dom_event_flags_type_id);
	}
	return gxml_dom_event_flags_type_id__once;
}

const gchar*
gxml_dom_event_get_etype (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_etype) {
		return _iface_->get_etype (self);
	}
	return NULL;
}

GXmlDomEventTarget*
gxml_dom_event_get_event_target (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_event_target) {
		return _iface_->get_event_target (self);
	}
	return NULL;
}

GXmlDomEventTarget*
gxml_dom_event_get_current_target (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_current_target) {
		return _iface_->get_current_target (self);
	}
	return NULL;
}

gboolean
gxml_dom_event_get_bubbles (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_bubbles) {
		return _iface_->get_bubbles (self);
	}
	return FALSE;
}

gboolean
gxml_dom_event_get_cancelable (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_cancelable) {
		return _iface_->get_cancelable (self);
	}
	return FALSE;
}

gboolean
gxml_dom_event_get_is_trusted (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_is_trusted) {
		return _iface_->get_is_trusted (self);
	}
	return FALSE;
}

GXmlDomTimeStamp*
gxml_dom_event_get_time_stamp (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_time_stamp) {
		return _iface_->get_time_stamp (self);
	}
	return NULL;
}

gboolean
gxml_dom_event_get_default_prevented (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, FALSE);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_default_prevented) {
		return _iface_->get_default_prevented (self);
	}
	return FALSE;
}

GXmlDomEventPhase
gxml_dom_event_get_event_phase (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_event_phase) {
		return _iface_->get_event_phase (self);
	}
	return 0;
}

void
gxml_dom_event_stop_propagation (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->stop_propagation) {
		_iface_->stop_propagation (self);
	}
}

void
gxml_dom_event_stop_immediate_propagation (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->stop_immediate_propagation) {
		_iface_->stop_immediate_propagation (self);
	}
}

void
gxml_dom_event_prevent_default (GXmlDomEvent* self)
{
	GXmlDomEventIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->prevent_default) {
		_iface_->prevent_default (self);
	}
}

void
gxml_dom_event_init_event (GXmlDomEvent* self,
                           const gchar* type,
                           gboolean bubbles,
                           gboolean cancelable)
{
	GXmlDomEventIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_EVENT_GET_INTERFACE (self);
	if (_iface_->init_event) {
		_iface_->init_event (self, type, bubbles, cancelable);
	}
}

static void
gxml_dom_event_default_init (GXmlDomEventIface * iface,
                             gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_string ("etype", "etype", "etype", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("event-target", "event-target", "event-target", GXML_TYPE_DOM_EVENT_TARGET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("current-target", "current-target", "current-target", GXML_TYPE_DOM_EVENT_TARGET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("bubbles", "bubbles", "bubbles", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("cancelable", "cancelable", "cancelable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("is-trusted", "is-trusted", "is-trusted", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_object ("time-stamp", "time-stamp", "time-stamp", GXML_TYPE_DOM_TIME_STAMP, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_boolean ("default-prevented", "default-prevented", "default-prevented", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_interface_install_property (iface, g_param_spec_enum ("event-phase", "event-phase", "event-phase", GXML_DOM_EVENT_TYPE_PHASE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gxml_dom_event_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomEventIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_event_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_event_type_id;
	gxml_dom_event_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomEvent", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_event_type_id, G_TYPE_OBJECT);
	return gxml_dom_event_type_id;
}

GType
gxml_dom_event_get_type (void)
{
	static volatile gsize gxml_dom_event_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_event_type_id__once)) {
		GType gxml_dom_event_type_id;
		gxml_dom_event_type_id = gxml_dom_event_get_type_once ();
		g_once_init_leave (&gxml_dom_event_type_id__once, gxml_dom_event_type_id);
	}
	return gxml_dom_event_type_id__once;
}

static inline gpointer
gxml_dom_event_init_get_instance_private (GXmlDomEventInit* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlDomEventInit_private_offset);
}

gboolean
gxml_dom_event_init_get_bubbles (GXmlDomEventInit* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_bubbles;
	return result;
}

void
gxml_dom_event_init_set_bubbles (GXmlDomEventInit* self,
                                 gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gxml_dom_event_init_get_bubbles (self);
	if (old_value != value) {
		self->priv->_bubbles = value;
		g_object_notify_by_pspec ((GObject *) self, gxml_dom_event_init_properties[GXML_DOM_EVENT_INIT_BUBBLES_PROPERTY]);
	}
}

gboolean
gxml_dom_event_init_get_cancelable (GXmlDomEventInit* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_cancelable;
	return result;
}

void
gxml_dom_event_init_set_cancelable (GXmlDomEventInit* self,
                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gxml_dom_event_init_get_cancelable (self);
	if (old_value != value) {
		self->priv->_cancelable = value;
		g_object_notify_by_pspec ((GObject *) self, gxml_dom_event_init_properties[GXML_DOM_EVENT_INIT_CANCELABLE_PROPERTY]);
	}
}

GXmlDomEventInit*
gxml_dom_event_init_construct (GType object_type)
{
	GXmlDomEventInit * self = NULL;
	self = (GXmlDomEventInit*) g_object_new (object_type, NULL);
	return self;
}

GXmlDomEventInit*
gxml_dom_event_init_new (void)
{
	return gxml_dom_event_init_construct (GXML_TYPE_DOM_EVENT_INIT);
}

static void
gxml_dom_event_init_class_init (GXmlDomEventInitClass * klass,
                                gpointer klass_data)
{
	gxml_dom_event_init_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlDomEventInit_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_dom_event_init_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_dom_event_init_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_dom_event_init_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_DOM_EVENT_INIT_BUBBLES_PROPERTY, gxml_dom_event_init_properties[GXML_DOM_EVENT_INIT_BUBBLES_PROPERTY] = g_param_spec_boolean ("bubbles", "bubbles", "bubbles", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_DOM_EVENT_INIT_CANCELABLE_PROPERTY, gxml_dom_event_init_properties[GXML_DOM_EVENT_INIT_CANCELABLE_PROPERTY] = g_param_spec_boolean ("cancelable", "cancelable", "cancelable", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_dom_event_init_instance_init (GXmlDomEventInit * self,
                                   gpointer klass)
{
	self->priv = gxml_dom_event_init_get_instance_private (self);
	self->priv->_bubbles = FALSE;
	self->priv->_cancelable = FALSE;
}

static void
gxml_dom_event_init_finalize (GObject * obj)
{
	GXmlDomEventInit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_DOM_EVENT_INIT, GXmlDomEventInit);
	G_OBJECT_CLASS (gxml_dom_event_init_parent_class)->finalize (obj);
}

static GType
gxml_dom_event_init_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomEventInitClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_event_init_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlDomEventInit), 0, (GInstanceInitFunc) gxml_dom_event_init_instance_init, NULL };
	GType gxml_dom_event_init_type_id;
	gxml_dom_event_init_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlDomEventInit", &g_define_type_info, 0);
	GXmlDomEventInit_private_offset = g_type_add_instance_private (gxml_dom_event_init_type_id, sizeof (GXmlDomEventInitPrivate));
	return gxml_dom_event_init_type_id;
}

GType
gxml_dom_event_init_get_type (void)
{
	static volatile gsize gxml_dom_event_init_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_event_init_type_id__once)) {
		GType gxml_dom_event_init_type_id;
		gxml_dom_event_init_type_id = gxml_dom_event_init_get_type_once ();
		g_once_init_leave (&gxml_dom_event_init_type_id__once, gxml_dom_event_init_type_id);
	}
	return gxml_dom_event_init_type_id__once;
}

static void
_vala_gxml_dom_event_init_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	GXmlDomEventInit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_DOM_EVENT_INIT, GXmlDomEventInit);
	switch (property_id) {
		case GXML_DOM_EVENT_INIT_BUBBLES_PROPERTY:
		g_value_set_boolean (value, gxml_dom_event_init_get_bubbles (self));
		break;
		case GXML_DOM_EVENT_INIT_CANCELABLE_PROPERTY:
		g_value_set_boolean (value, gxml_dom_event_init_get_cancelable (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gxml_dom_event_init_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	GXmlDomEventInit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_DOM_EVENT_INIT, GXmlDomEventInit);
	switch (property_id) {
		case GXML_DOM_EVENT_INIT_BUBBLES_PROPERTY:
		gxml_dom_event_init_set_bubbles (self, g_value_get_boolean (value));
		break;
		case GXML_DOM_EVENT_INIT_CANCELABLE_PROPERTY:
		gxml_dom_event_init_set_cancelable (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

void
gxml_dom_custom_event_get_detail (GXmlDomCustomEvent* self,
                                  GValue * result)
{
	GXmlDomCustomEventIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_CUSTOM_EVENT_GET_INTERFACE (self);
	if (_iface_->get_detail) {
		_iface_->get_detail (self, result);
	}
	return;
}

void
gxml_dom_custom_event_init_custom_event (GXmlDomCustomEvent* self,
                                         const gchar* type,
                                         gboolean bubbles,
                                         gboolean cancelable,
                                         GValue* detail)
{
	GXmlDomCustomEventIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GXML_DOM_CUSTOM_EVENT_GET_INTERFACE (self);
	if (_iface_->init_custom_event) {
		_iface_->init_custom_event (self, type, bubbles, cancelable, detail);
	}
}

static void
gxml_dom_custom_event_default_init (GXmlDomCustomEventIface * iface,
                                    gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_boxed ("detail", "detail", "detail", G_TYPE_VALUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static GType
gxml_dom_custom_event_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomCustomEventIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_custom_event_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gxml_dom_custom_event_type_id;
	gxml_dom_custom_event_type_id = g_type_register_static (G_TYPE_INTERFACE, "GXmlDomCustomEvent", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gxml_dom_custom_event_type_id, G_TYPE_OBJECT);
	g_type_interface_add_prerequisite (gxml_dom_custom_event_type_id, GXML_TYPE_DOM_EVENT);
	return gxml_dom_custom_event_type_id;
}

GType
gxml_dom_custom_event_get_type (void)
{
	static volatile gsize gxml_dom_custom_event_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_custom_event_type_id__once)) {
		GType gxml_dom_custom_event_type_id;
		gxml_dom_custom_event_type_id = gxml_dom_custom_event_get_type_once ();
		g_once_init_leave (&gxml_dom_custom_event_type_id__once, gxml_dom_custom_event_type_id);
	}
	return gxml_dom_custom_event_type_id__once;
}

static inline gpointer
gxml_dom_custom_event_init_get_instance_private (GXmlDomCustomEventInit* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlDomCustomEventInit_private_offset);
}

void
gxml_dom_custom_event_init_get_detail (GXmlDomCustomEventInit* self,
                                       GValue * result)
{
	GValue _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_detail;
	*result = _tmp0_;
	return;
}

static gboolean
_g_value_equal (const GValue * s1,
                const GValue * s2)
{
	if (s1 == s2) {
		return TRUE;
	}
	if (s1 == NULL) {
		return FALSE;
	}
	if (s2 == NULL) {
		return FALSE;
	}
	return FALSE;
}

void
gxml_dom_custom_event_init_set_detail (GXmlDomCustomEventInit* self,
                                       GValue * value)
{
	GValue old_value;
	g_return_if_fail (self != NULL);
	gxml_dom_custom_event_init_get_detail (self, &old_value);
	if (_g_value_equal (value, &old_value) != TRUE) {
		GValue _tmp0_;
		GValue _tmp1_;
		GValue _tmp2_ = {0};
		_tmp0_ = *value;
		_tmp1_ = _tmp0_;
		if (G_IS_VALUE (&_tmp1_)) {
			g_value_init (&_tmp2_, G_VALUE_TYPE (&_tmp1_));
			g_value_copy (&_tmp1_, &_tmp2_);
		} else {
			_tmp2_ = _tmp1_;
		}
		G_IS_VALUE (&self->priv->_detail) ? (g_value_unset (&self->priv->_detail), NULL) : NULL;
		self->priv->_detail = _tmp2_;
		g_object_notify_by_pspec ((GObject *) self, gxml_dom_custom_event_init_properties[GXML_DOM_CUSTOM_EVENT_INIT_DETAIL_PROPERTY]);
	}
}

GXmlDomCustomEventInit*
gxml_dom_custom_event_init_construct (GType object_type)
{
	GXmlDomCustomEventInit * self = NULL;
	self = (GXmlDomCustomEventInit*) gxml_dom_event_init_construct (object_type);
	return self;
}

GXmlDomCustomEventInit*
gxml_dom_custom_event_init_new (void)
{
	return gxml_dom_custom_event_init_construct (GXML_TYPE_DOM_CUSTOM_EVENT_INIT);
}

static void
gxml_dom_custom_event_init_class_init (GXmlDomCustomEventInitClass * klass,
                                       gpointer klass_data)
{
	gxml_dom_custom_event_init_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlDomCustomEventInit_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_dom_custom_event_init_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_dom_custom_event_init_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_dom_custom_event_init_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_DOM_CUSTOM_EVENT_INIT_DETAIL_PROPERTY, gxml_dom_custom_event_init_properties[GXML_DOM_CUSTOM_EVENT_INIT_DETAIL_PROPERTY] = g_param_spec_boxed ("detail", "detail", "detail", G_TYPE_VALUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_dom_custom_event_init_instance_init (GXmlDomCustomEventInit * self,
                                          gpointer klass)
{
	self->priv = gxml_dom_custom_event_init_get_instance_private (self);
}

static void
gxml_dom_custom_event_init_finalize (GObject * obj)
{
	GXmlDomCustomEventInit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_DOM_CUSTOM_EVENT_INIT, GXmlDomCustomEventInit);
	G_IS_VALUE (&self->priv->_detail) ? (g_value_unset (&self->priv->_detail), NULL) : NULL;
	G_OBJECT_CLASS (gxml_dom_custom_event_init_parent_class)->finalize (obj);
}

static GType
gxml_dom_custom_event_init_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomCustomEventInitClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_custom_event_init_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlDomCustomEventInit), 0, (GInstanceInitFunc) gxml_dom_custom_event_init_instance_init, NULL };
	GType gxml_dom_custom_event_init_type_id;
	gxml_dom_custom_event_init_type_id = g_type_register_static (GXML_TYPE_DOM_EVENT_INIT, "GXmlDomCustomEventInit", &g_define_type_info, 0);
	GXmlDomCustomEventInit_private_offset = g_type_add_instance_private (gxml_dom_custom_event_init_type_id, sizeof (GXmlDomCustomEventInitPrivate));
	return gxml_dom_custom_event_init_type_id;
}

GType
gxml_dom_custom_event_init_get_type (void)
{
	static volatile gsize gxml_dom_custom_event_init_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_custom_event_init_type_id__once)) {
		GType gxml_dom_custom_event_init_type_id;
		gxml_dom_custom_event_init_type_id = gxml_dom_custom_event_init_get_type_once ();
		g_once_init_leave (&gxml_dom_custom_event_init_type_id__once, gxml_dom_custom_event_init_type_id);
	}
	return gxml_dom_custom_event_init_type_id__once;
}

static void
_vala_gxml_dom_custom_event_init_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	GXmlDomCustomEventInit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_DOM_CUSTOM_EVENT_INIT, GXmlDomCustomEventInit);
	switch (property_id) {
		case GXML_DOM_CUSTOM_EVENT_INIT_DETAIL_PROPERTY:
		{
			GValue boxed;
			gxml_dom_custom_event_init_get_detail (self, &boxed);
			g_value_set_boxed (value, &boxed);
		}
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gxml_dom_custom_event_init_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	GXmlDomCustomEventInit * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_DOM_CUSTOM_EVENT_INIT, GXmlDomCustomEventInit);
	switch (property_id) {
		case GXML_DOM_CUSTOM_EVENT_INIT_DETAIL_PROPERTY:
		gxml_dom_custom_event_init_set_detail (self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
gxml_dom_time_stamp_get_instance_private (GXmlDomTimeStamp* self)
{
	return G_STRUCT_MEMBER_P (self, GXmlDomTimeStamp_private_offset);
}

GDateTime*
gxml_dom_time_stamp_get_time (GXmlDomTimeStamp* self)
{
	GDateTime* result;
	GDateTime* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_time;
	result = _tmp0_;
	return result;
}

static gpointer
_g_date_time_ref0 (gpointer self)
{
	return self ? g_date_time_ref (self) : NULL;
}

void
gxml_dom_time_stamp_set_time (GXmlDomTimeStamp* self,
                              GDateTime* value)
{
	GDateTime* old_value;
	g_return_if_fail (self != NULL);
	old_value = gxml_dom_time_stamp_get_time (self);
	if (old_value != value) {
		GDateTime* _tmp0_;
		_tmp0_ = _g_date_time_ref0 (value);
		_g_date_time_unref0 (self->priv->_time);
		self->priv->_time = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gxml_dom_time_stamp_properties[GXML_DOM_TIME_STAMP_TIME_PROPERTY]);
	}
}

gchar*
gxml_dom_time_stamp_to_string (GXmlDomTimeStamp* self)
{
	GDateTime* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_time;
	_tmp1_ = g_date_time_format (_tmp0_, "%y-%m-%dT%T");
	result = _tmp1_;
	return result;
}

GXmlDomTimeStamp*
gxml_dom_time_stamp_construct (GType object_type)
{
	GXmlDomTimeStamp * self = NULL;
	self = (GXmlDomTimeStamp*) g_object_new (object_type, NULL);
	return self;
}

GXmlDomTimeStamp*
gxml_dom_time_stamp_new (void)
{
	return gxml_dom_time_stamp_construct (GXML_TYPE_DOM_TIME_STAMP);
}

static void
gxml_dom_time_stamp_class_init (GXmlDomTimeStampClass * klass,
                                gpointer klass_data)
{
	gxml_dom_time_stamp_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GXmlDomTimeStamp_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_dom_time_stamp_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gxml_dom_time_stamp_set_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_dom_time_stamp_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_DOM_TIME_STAMP_TIME_PROPERTY, gxml_dom_time_stamp_properties[GXML_DOM_TIME_STAMP_TIME_PROPERTY] = g_param_spec_boxed ("time", "time", "time", G_TYPE_DATE_TIME, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
gxml_dom_time_stamp_instance_init (GXmlDomTimeStamp * self,
                                   gpointer klass)
{
	self->priv = gxml_dom_time_stamp_get_instance_private (self);
}

static void
gxml_dom_time_stamp_finalize (GObject * obj)
{
	GXmlDomTimeStamp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStamp);
	_g_date_time_unref0 (self->priv->_time);
	G_OBJECT_CLASS (gxml_dom_time_stamp_parent_class)->finalize (obj);
}

static GType
gxml_dom_time_stamp_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GXmlDomTimeStampClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_dom_time_stamp_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlDomTimeStamp), 0, (GInstanceInitFunc) gxml_dom_time_stamp_instance_init, NULL };
	GType gxml_dom_time_stamp_type_id;
	gxml_dom_time_stamp_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlDomTimeStamp", &g_define_type_info, 0);
	GXmlDomTimeStamp_private_offset = g_type_add_instance_private (gxml_dom_time_stamp_type_id, sizeof (GXmlDomTimeStampPrivate));
	return gxml_dom_time_stamp_type_id;
}

GType
gxml_dom_time_stamp_get_type (void)
{
	static volatile gsize gxml_dom_time_stamp_type_id__once = 0;
	if (g_once_init_enter (&gxml_dom_time_stamp_type_id__once)) {
		GType gxml_dom_time_stamp_type_id;
		gxml_dom_time_stamp_type_id = gxml_dom_time_stamp_get_type_once ();
		g_once_init_leave (&gxml_dom_time_stamp_type_id__once, gxml_dom_time_stamp_type_id);
	}
	return gxml_dom_time_stamp_type_id__once;
}

static void
_vala_gxml_dom_time_stamp_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	GXmlDomTimeStamp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStamp);
	switch (property_id) {
		case GXML_DOM_TIME_STAMP_TIME_PROPERTY:
		g_value_set_boxed (value, gxml_dom_time_stamp_get_time (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gxml_dom_time_stamp_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	GXmlDomTimeStamp * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStamp);
	switch (property_id) {
		case GXML_DOM_TIME_STAMP_TIME_PROPERTY:
		gxml_dom_time_stamp_set_time (self, g_value_get_boxed (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

