/* GXmlDomEvents.c generated by valac 0.34.6, the Vala compiler
 * generated from GXmlDomEvents.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 <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>


#define GXML_TYPE_DOM_EVENT (gxml_dom_event_get_type ())
#define GXML_DOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT, GXmlDomEvent))
#define GXML_IS_DOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT))
#define GXML_DOM_EVENT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT, GXmlDomEventIface))

typedef struct _GXmlDomEvent GXmlDomEvent;
typedef struct _GXmlDomEventIface GXmlDomEventIface;

#define GXML_TYPE_DOM_EVENT_TARGET (gxml_dom_event_target_get_type ())
#define GXML_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTarget))
#define GXML_IS_DOM_EVENT_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT_TARGET))
#define GXML_DOM_EVENT_TARGET_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT_TARGET, GXmlDomEventTargetIface))

typedef struct _GXmlDomEventTarget GXmlDomEventTarget;
typedef struct _GXmlDomEventTargetIface GXmlDomEventTargetIface;

#define GXML_TYPE_DOM_EVENT_LISTENER (gxml_dom_event_listener_get_type ())
#define GXML_DOM_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_EVENT_LISTENER, GXmlDomEventListener))
#define GXML_IS_DOM_EVENT_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_EVENT_LISTENER))
#define GXML_DOM_EVENT_LISTENER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GXML_TYPE_DOM_EVENT_LISTENER, GXmlDomEventListenerIface))

typedef struct _GXmlDomEventListener GXmlDomEventListener;
typedef struct _GXmlDomEventListenerIface GXmlDomEventListenerIface;

#define GXML_TYPE_DOM_TIME_STAMP (gxml_dom_time_stamp_get_type ())
#define GXML_DOM_TIME_STAMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStamp))
#define GXML_DOM_TIME_STAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStampClass))
#define GXML_IS_DOM_TIME_STAMP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_DOM_TIME_STAMP))
#define GXML_IS_DOM_TIME_STAMP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_DOM_TIME_STAMP))
#define GXML_DOM_TIME_STAMP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_DOM_TIME_STAMP, GXmlDomTimeStampClass))

typedef struct _GXmlDomTimeStamp GXmlDomTimeStamp;
typedef struct _GXmlDomTimeStampClass GXmlDomTimeStampClass;

#define GXML_DOM_EVENT_TYPE_PHASE (gxml_dom_event_phase_get_type ())

#define GXML_TYPE_GDOM_EVENT (gxml_gdom_event_get_type ())
#define GXML_GDOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GDOM_EVENT, GXmlGDomEvent))
#define GXML_GDOM_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GDOM_EVENT, GXmlGDomEventClass))
#define GXML_IS_GDOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GDOM_EVENT))
#define GXML_IS_GDOM_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GDOM_EVENT))
#define GXML_GDOM_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GDOM_EVENT, GXmlGDomEventClass))

typedef struct _GXmlGDomEvent GXmlGDomEvent;
typedef struct _GXmlGDomEventClass GXmlGDomEventClass;
typedef struct _GXmlGDomEventPrivate GXmlGDomEventPrivate;

#define GXML_DOM_EVENT_TYPE_FLAGS (gxml_dom_event_flags_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GXML_TYPE_GDOM_CUSTOM_EVENT (gxml_gdom_custom_event_get_type ())
#define GXML_GDOM_CUSTOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GXML_TYPE_GDOM_CUSTOM_EVENT, GXmlGDomCustomEvent))
#define GXML_GDOM_CUSTOM_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GXML_TYPE_GDOM_CUSTOM_EVENT, GXmlGDomCustomEventClass))
#define GXML_IS_GDOM_CUSTOM_EVENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GXML_TYPE_GDOM_CUSTOM_EVENT))
#define GXML_IS_GDOM_CUSTOM_EVENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GXML_TYPE_GDOM_CUSTOM_EVENT))
#define GXML_GDOM_CUSTOM_EVENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GXML_TYPE_GDOM_CUSTOM_EVENT, GXmlGDomCustomEventClass))

typedef struct _GXmlGDomCustomEvent GXmlGDomCustomEvent;
typedef struct _GXmlGDomCustomEventClass GXmlGDomCustomEventClass;
typedef struct _GXmlGDomCustomEventPrivate GXmlGDomCustomEventPrivate;
#define __vala_GValue_free0(var) ((var == NULL) ? NULL : (var = (_vala_GValue_free (var), NULL)))

struct _GXmlDomEventListenerIface {
	GTypeInterface parent_iface;
	void (*handle_event) (GXmlDomEventListener* self, GXmlDomEvent* event);
};

struct _GXmlDomEventTargetIface {
	GTypeInterface parent_iface;
	void (*add_event_listener) (GXmlDomEventTarget* self, const gchar* type, GXmlDomEventListener* callback, gboolean capture);
	void (*remove_event_listener) (GXmlDomEventTarget* self, const gchar* type, GXmlDomEventListener* callback, gboolean capture);
	gboolean (*dispatch_event) (GXmlDomEventTarget* self, GXmlDomEvent* event, GError** error);
};

typedef enum  {
	GXML_DOM_EVENT_PHASE_NONE = 0,
	GXML_DOM_EVENT_PHASE_CAPTURING_PHASE,
	GXML_DOM_EVENT_PHASE_AT_TARGET,
	GXML_DOM_EVENT_PHASE_BUBBLING_PHASE
} GXmlDomEventPhase;

struct _GXmlDomEventIface {
	GTypeInterface parent_iface;
	void (*stop_propagation) (GXmlDomEvent* self);
	void (*stop_immediate_propagation) (GXmlDomEvent* self);
	void (*prevent_default) (GXmlDomEvent* self);
	void (*init_event) (GXmlDomEvent* self, const gchar* type, gboolean bubbles, gboolean cancelable);
	const gchar* (*get_etype) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_event_target) (GXmlDomEvent* self);
	GXmlDomEventTarget* (*get_current_target) (GXmlDomEvent* self);
	gboolean (*get_bubbles) (GXmlDomEvent* self);
	gboolean (*get_cancelable) (GXmlDomEvent* self);
	gboolean (*get_is_trusted) (GXmlDomEvent* self);
	GXmlDomTimeStamp* (*get_time_stamp) (GXmlDomEvent* self);
	gboolean (*get_default_prevented) (GXmlDomEvent* self);
	GXmlDomEventPhase (*get_event_phase) (GXmlDomEvent* self);
};

typedef enum  {
	GXML_DOM_EVENT_FLAGS_STOP_PROPAGATION_FLAG = 1 << 0,
	GXML_DOM_EVENT_FLAGS_STOP_IMMEDIATE_PROPAGATION_FLAG = 1 << 1,
	GXML_DOM_EVENT_FLAGS_CANCELED_FLAG = 1 << 2,
	GXML_DOM_EVENT_FLAGS_INITIALIZED_FLAG = 1 << 3,
	GXML_DOM_EVENT_FLAGS_DISPATCH_FLAG = 1 << 4
} GXmlDomEventFlags;

struct _GXmlGDomEvent {
	GObject parent_instance;
	GXmlGDomEventPrivate * priv;
	gchar* _etype;
	GXmlDomEventTarget* _event_target;
	GXmlDomEventTarget* _current_target;
	gboolean _bubbles;
	gboolean _cancelable;
	gboolean _is_trusted;
	GXmlDomTimeStamp* _time_stamp;
	gboolean _default_prevented;
	GXmlDomEventPhase _event_phase;
	GXmlDomEventFlags _flags;
};

struct _GXmlGDomEventClass {
	GObjectClass parent_class;
};

struct _GXmlGDomCustomEvent {
	GXmlGDomEvent parent_instance;
	GXmlGDomCustomEventPrivate * priv;
	GValue* _detail;
};

struct _GXmlGDomCustomEventClass {
	GXmlGDomEventClass parent_class;
};


static gpointer gxml_gdom_event_parent_class = NULL;
static GXmlDomEventIface* gxml_gdom_event_gxml_dom_event_parent_iface = NULL;
static gpointer gxml_gdom_custom_event_parent_class = NULL;

GType gxml_dom_event_listener_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_target_get_type (void) G_GNUC_CONST;
GType gxml_dom_time_stamp_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_phase_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_get_type (void) G_GNUC_CONST;
GType gxml_gdom_event_get_type (void) G_GNUC_CONST;
GType gxml_dom_event_flags_get_type (void) G_GNUC_CONST;
enum  {
	GXML_GDOM_EVENT_DUMMY_PROPERTY,
	GXML_GDOM_EVENT_ETYPE,
	GXML_GDOM_EVENT_EVENT_TARGET,
	GXML_GDOM_EVENT_CURRENT_TARGET,
	GXML_GDOM_EVENT_BUBBLES,
	GXML_GDOM_EVENT_CANCELABLE,
	GXML_GDOM_EVENT_IS_TRUSTED,
	GXML_GDOM_EVENT_TIME_STAMP,
	GXML_GDOM_EVENT_DEFAULT_PREVENTED,
	GXML_GDOM_EVENT_EVENT_PHASE
};
GXmlDomTimeStamp* gxml_dom_time_stamp_new (void);
GXmlDomTimeStamp* gxml_dom_time_stamp_construct (GType object_type);
static void gxml_gdom_event_real_stop_propagation (GXmlDomEvent* base);
static void gxml_gdom_event_real_stop_immediate_propagation (GXmlDomEvent* base);
static void gxml_gdom_event_real_prevent_default (GXmlDomEvent* base);
gboolean gxml_dom_event_get_cancelable (GXmlDomEvent* self);
static void gxml_gdom_event_real_init_event (GXmlDomEvent* base, const gchar* type, gboolean bubbles, gboolean cancelable);
GXmlGDomEvent* gxml_gdom_event_new (void);
GXmlGDomEvent* gxml_gdom_event_construct (GType object_type);
static void gxml_gdom_event_finalize (GObject* obj);
const gchar* gxml_dom_event_get_etype (GXmlDomEvent* self);
GXmlDomEventTarget* gxml_dom_event_get_event_target (GXmlDomEvent* self);
GXmlDomEventTarget* gxml_dom_event_get_current_target (GXmlDomEvent* self);
gboolean gxml_dom_event_get_bubbles (GXmlDomEvent* self);
gboolean gxml_dom_event_get_is_trusted (GXmlDomEvent* self);
GXmlDomTimeStamp* gxml_dom_event_get_time_stamp (GXmlDomEvent* self);
gboolean gxml_dom_event_get_default_prevented (GXmlDomEvent* self);
GXmlDomEventPhase gxml_dom_event_get_event_phase (GXmlDomEvent* self);
static void _vala_gxml_gdom_event_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
GType gxml_gdom_custom_event_get_type (void) G_GNUC_CONST;
enum  {
	GXML_GDOM_CUSTOM_EVENT_DUMMY_PROPERTY
};
static void _vala_GValue_free (GValue* self);
void gxml_gdom_custom_event_init_custom_event (GXmlGDomCustomEvent* self, const gchar* type, gboolean bubbles, gboolean cancelable, GValue* detail);
static GValue* _g_value_dup (GValue* self);
GXmlGDomCustomEvent* gxml_gdom_custom_event_new (void);
GXmlGDomCustomEvent* gxml_gdom_custom_event_construct (GType object_type);
GValue* gxml_gdom_custom_event_get_detail (GXmlGDomCustomEvent* self);
static void gxml_gdom_custom_event_finalize (GObject* obj);
static void _vala_gxml_gdom_custom_event_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);


static void gxml_gdom_event_real_stop_propagation (GXmlDomEvent* base) {
	GXmlGDomEvent * self;
	GXmlDomEventFlags _tmp0_ = 0;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_flags;
	self->_flags = _tmp0_ & GXML_DOM_EVENT_FLAGS_STOP_PROPAGATION_FLAG;
}


static void gxml_gdom_event_real_stop_immediate_propagation (GXmlDomEvent* base) {
	GXmlGDomEvent * self;
	GXmlDomEventFlags _tmp0_ = 0;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_flags;
	self->_flags = _tmp0_ & GXML_DOM_EVENT_FLAGS_STOP_IMMEDIATE_PROPAGATION_FLAG;
}


static void gxml_gdom_event_real_prevent_default (GXmlDomEvent* base) {
	GXmlGDomEvent * self;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = gxml_dom_event_get_cancelable ((GXmlDomEvent*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		GXmlDomEventFlags _tmp2_ = 0;
		_tmp2_ = self->_flags;
		self->_flags = _tmp2_ & GXML_DOM_EVENT_FLAGS_CANCELED_FLAG;
	}
}


static void gxml_gdom_event_real_init_event (GXmlDomEvent* base, const gchar* type, gboolean bubbles, gboolean cancelable) {
	GXmlGDomEvent * self;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	self = (GXmlGDomEvent*) base;
	g_return_if_fail (type != NULL);
	_tmp0_ = type;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->_etype);
	self->_etype = _tmp1_;
	_tmp2_ = bubbles;
	self->_bubbles = _tmp2_;
	_tmp3_ = cancelable;
	self->_cancelable = _tmp3_;
}


GXmlGDomEvent* gxml_gdom_event_construct (GType object_type) {
	GXmlGDomEvent * self = NULL;
	self = (GXmlGDomEvent*) g_object_new (object_type, NULL);
	return self;
}


GXmlGDomEvent* gxml_gdom_event_new (void) {
	return gxml_gdom_event_construct (GXML_TYPE_GDOM_EVENT);
}


static const gchar* gxml_gdom_event_real_get_etype (GXmlDomEvent* base) {
	const gchar* result;
	GXmlGDomEvent* self;
	const gchar* _tmp0_ = NULL;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_etype;
	result = _tmp0_;
	return result;
}


static GXmlDomEventTarget* gxml_gdom_event_real_get_event_target (GXmlDomEvent* base) {
	GXmlDomEventTarget* result;
	GXmlGDomEvent* self;
	GXmlDomEventTarget* _tmp0_ = NULL;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_event_target;
	result = _tmp0_;
	return result;
}


static GXmlDomEventTarget* gxml_gdom_event_real_get_current_target (GXmlDomEvent* base) {
	GXmlDomEventTarget* result;
	GXmlGDomEvent* self;
	GXmlDomEventTarget* _tmp0_ = NULL;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_current_target;
	result = _tmp0_;
	return result;
}


static gboolean gxml_gdom_event_real_get_bubbles (GXmlDomEvent* base) {
	gboolean result;
	GXmlGDomEvent* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_bubbles;
	result = _tmp0_;
	return result;
}


static gboolean gxml_gdom_event_real_get_cancelable (GXmlDomEvent* base) {
	gboolean result;
	GXmlGDomEvent* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_cancelable;
	result = _tmp0_;
	return result;
}


static gboolean gxml_gdom_event_real_get_is_trusted (GXmlDomEvent* base) {
	gboolean result;
	GXmlGDomEvent* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_is_trusted;
	result = _tmp0_;
	return result;
}


static GXmlDomTimeStamp* gxml_gdom_event_real_get_time_stamp (GXmlDomEvent* base) {
	GXmlDomTimeStamp* result;
	GXmlGDomEvent* self;
	GXmlDomTimeStamp* _tmp0_ = NULL;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_time_stamp;
	result = _tmp0_;
	return result;
}


static gboolean gxml_gdom_event_real_get_default_prevented (GXmlDomEvent* base) {
	gboolean result;
	GXmlGDomEvent* self;
	gboolean _tmp0_ = FALSE;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_default_prevented;
	result = _tmp0_;
	return result;
}


static GXmlDomEventPhase gxml_gdom_event_real_get_event_phase (GXmlDomEvent* base) {
	GXmlDomEventPhase result;
	GXmlGDomEvent* self;
	GXmlDomEventPhase _tmp0_ = 0;
	self = (GXmlGDomEvent*) base;
	_tmp0_ = self->_event_phase;
	result = _tmp0_;
	return result;
}


static void gxml_gdom_event_class_init (GXmlGDomEventClass * klass) {
	gxml_gdom_event_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_gdom_event_get_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_gdom_event_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_ETYPE, g_param_spec_string ("etype", "etype", "etype", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_EVENT_TARGET, g_param_spec_object ("event-target", "event-target", "event-target", GXML_TYPE_DOM_EVENT_TARGET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_CURRENT_TARGET, g_param_spec_object ("current-target", "current-target", "current-target", GXML_TYPE_DOM_EVENT_TARGET, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_BUBBLES, g_param_spec_boolean ("bubbles", "bubbles", "bubbles", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_CANCELABLE, g_param_spec_boolean ("cancelable", "cancelable", "cancelable", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_IS_TRUSTED, g_param_spec_boolean ("is-trusted", "is-trusted", "is-trusted", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_TIME_STAMP, g_param_spec_object ("time-stamp", "time-stamp", "time-stamp", GXML_TYPE_DOM_TIME_STAMP, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_DEFAULT_PREVENTED, g_param_spec_boolean ("default-prevented", "default-prevented", "default-prevented", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GXML_GDOM_EVENT_EVENT_PHASE, g_param_spec_enum ("event-phase", "event-phase", "event-phase", GXML_DOM_EVENT_TYPE_PHASE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
}


static void gxml_gdom_event_gxml_dom_event_interface_init (GXmlDomEventIface * iface) {
	gxml_gdom_event_gxml_dom_event_parent_iface = g_type_interface_peek_parent (iface);
	iface->stop_propagation = (void (*)(GXmlDomEvent*)) gxml_gdom_event_real_stop_propagation;
	iface->stop_immediate_propagation = (void (*)(GXmlDomEvent*)) gxml_gdom_event_real_stop_immediate_propagation;
	iface->prevent_default = (void (*)(GXmlDomEvent*)) gxml_gdom_event_real_prevent_default;
	iface->init_event = (void (*)(GXmlDomEvent*, const gchar*, gboolean, gboolean)) gxml_gdom_event_real_init_event;
	iface->get_etype = gxml_gdom_event_real_get_etype;
	iface->get_event_target = gxml_gdom_event_real_get_event_target;
	iface->get_current_target = gxml_gdom_event_real_get_current_target;
	iface->get_bubbles = gxml_gdom_event_real_get_bubbles;
	iface->get_cancelable = gxml_gdom_event_real_get_cancelable;
	iface->get_is_trusted = gxml_gdom_event_real_get_is_trusted;
	iface->get_time_stamp = gxml_gdom_event_real_get_time_stamp;
	iface->get_default_prevented = gxml_gdom_event_real_get_default_prevented;
	iface->get_event_phase = gxml_gdom_event_real_get_event_phase;
}


static void gxml_gdom_event_instance_init (GXmlGDomEvent * self) {
	GXmlDomTimeStamp* _tmp0_ = NULL;
	self->_is_trusted = FALSE;
	_tmp0_ = gxml_dom_time_stamp_new ();
	self->_time_stamp = _tmp0_;
}


static void gxml_gdom_event_finalize (GObject* obj) {
	GXmlGDomEvent * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_GDOM_EVENT, GXmlGDomEvent);
	_g_free0 (self->_etype);
	_g_object_unref0 (self->_event_target);
	_g_object_unref0 (self->_current_target);
	_g_object_unref0 (self->_time_stamp);
	G_OBJECT_CLASS (gxml_gdom_event_parent_class)->finalize (obj);
}


GType gxml_gdom_event_get_type (void) {
	static volatile gsize gxml_gdom_event_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_gdom_event_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGDomEventClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_gdom_event_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGDomEvent), 0, (GInstanceInitFunc) gxml_gdom_event_instance_init, NULL };
		static const GInterfaceInfo gxml_dom_event_info = { (GInterfaceInitFunc) gxml_gdom_event_gxml_dom_event_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType gxml_gdom_event_type_id;
		gxml_gdom_event_type_id = g_type_register_static (G_TYPE_OBJECT, "GXmlGDomEvent", &g_define_type_info, 0);
		g_type_add_interface_static (gxml_gdom_event_type_id, GXML_TYPE_DOM_EVENT, &gxml_dom_event_info);
		g_once_init_leave (&gxml_gdom_event_type_id__volatile, gxml_gdom_event_type_id);
	}
	return gxml_gdom_event_type_id__volatile;
}


static void _vala_gxml_gdom_event_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlGDomEvent * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GDOM_EVENT, GXmlGDomEvent);
	switch (property_id) {
		case GXML_GDOM_EVENT_ETYPE:
		g_value_set_string (value, gxml_dom_event_get_etype ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_EVENT_TARGET:
		g_value_set_object (value, gxml_dom_event_get_event_target ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_CURRENT_TARGET:
		g_value_set_object (value, gxml_dom_event_get_current_target ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_BUBBLES:
		g_value_set_boolean (value, gxml_dom_event_get_bubbles ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_CANCELABLE:
		g_value_set_boolean (value, gxml_dom_event_get_cancelable ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_IS_TRUSTED:
		g_value_set_boolean (value, gxml_dom_event_get_is_trusted ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_TIME_STAMP:
		g_value_set_object (value, gxml_dom_event_get_time_stamp ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_DEFAULT_PREVENTED:
		g_value_set_boolean (value, gxml_dom_event_get_default_prevented ((GXmlDomEvent*) self));
		break;
		case GXML_GDOM_EVENT_EVENT_PHASE:
		g_value_set_enum (value, gxml_dom_event_get_event_phase ((GXmlDomEvent*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_GValue_free (GValue* self) {
	g_value_unset (self);
	g_free (self);
}


static GValue* _g_value_dup (GValue* self) {
	return g_boxed_copy (G_TYPE_VALUE, self);
}


static gpointer __g_value_dup0 (gpointer self) {
	return self ? _g_value_dup (self) : NULL;
}


void gxml_gdom_custom_event_init_custom_event (GXmlGDomCustomEvent* self, const gchar* type, gboolean bubbles, gboolean cancelable, GValue* detail) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	gboolean _tmp3_ = FALSE;
	GValue* _tmp4_ = NULL;
	GValue* _tmp5_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (type != NULL);
	_tmp0_ = type;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (((GXmlGDomEvent*) self)->_etype);
	((GXmlGDomEvent*) self)->_etype = _tmp1_;
	_tmp2_ = bubbles;
	((GXmlGDomEvent*) self)->_bubbles = _tmp2_;
	_tmp3_ = cancelable;
	((GXmlGDomEvent*) self)->_cancelable = _tmp3_;
	_tmp4_ = detail;
	_tmp5_ = __g_value_dup0 (_tmp4_);
	__vala_GValue_free0 (self->_detail);
	self->_detail = _tmp5_;
}


GXmlGDomCustomEvent* gxml_gdom_custom_event_construct (GType object_type) {
	GXmlGDomCustomEvent * self = NULL;
	self = (GXmlGDomCustomEvent*) gxml_gdom_event_construct (object_type);
	return self;
}


GXmlGDomCustomEvent* gxml_gdom_custom_event_new (void) {
	return gxml_gdom_custom_event_construct (GXML_TYPE_GDOM_CUSTOM_EVENT);
}


GValue* gxml_gdom_custom_event_get_detail (GXmlGDomCustomEvent* self) {
	GValue* result;
	GValue* _tmp0_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->_detail;
	result = _tmp0_;
	return result;
}


static void gxml_gdom_custom_event_class_init (GXmlGDomCustomEventClass * klass) {
	gxml_gdom_custom_event_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->get_property = _vala_gxml_gdom_custom_event_get_property;
	G_OBJECT_CLASS (klass)->finalize = gxml_gdom_custom_event_finalize;
}


static void gxml_gdom_custom_event_instance_init (GXmlGDomCustomEvent * self) {
}


static void gxml_gdom_custom_event_finalize (GObject* obj) {
	GXmlGDomCustomEvent * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GXML_TYPE_GDOM_CUSTOM_EVENT, GXmlGDomCustomEvent);
	__vala_GValue_free0 (self->_detail);
	G_OBJECT_CLASS (gxml_gdom_custom_event_parent_class)->finalize (obj);
}


GType gxml_gdom_custom_event_get_type (void) {
	static volatile gsize gxml_gdom_custom_event_type_id__volatile = 0;
	if (g_once_init_enter (&gxml_gdom_custom_event_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GXmlGDomCustomEventClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gxml_gdom_custom_event_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GXmlGDomCustomEvent), 0, (GInstanceInitFunc) gxml_gdom_custom_event_instance_init, NULL };
		GType gxml_gdom_custom_event_type_id;
		gxml_gdom_custom_event_type_id = g_type_register_static (GXML_TYPE_GDOM_EVENT, "GXmlGDomCustomEvent", &g_define_type_info, 0);
		g_once_init_leave (&gxml_gdom_custom_event_type_id__volatile, gxml_gdom_custom_event_type_id);
	}
	return gxml_gdom_custom_event_type_id__volatile;
}


static void _vala_gxml_gdom_custom_event_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GXmlGDomCustomEvent * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GXML_TYPE_GDOM_CUSTOM_EVENT, GXmlGDomCustomEvent);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



