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

/*
* Copyright (c) 2010 Maxim Kartashev
*               2011-2013 Yorba Foundation
*
* This program 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 program 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*/

#include "io.elementary.photos.h"
#include <gee.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <gobject/gvaluecollector.h>
#include <float.h>
#include <math.h>
#include <cairo-gobject.h>
#include <gdk/gdk.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

#define _plugins_notifier_unref0(var) ((var == NULL) ? NULL : (var = (plugins_notifier_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _transition_effects_manager_unref0(var) ((var == NULL) ? NULL : (var = (transition_effects_manager_unref (var), NULL)))
#define _transition_clock_unref0(var) ((var == NULL) ? NULL : (var = (transition_clock_unref (var), NULL)))
typedef struct _ParamSpecTransitionEffectsManager ParamSpecTransitionEffectsManager;
#define _op_timer_unref0(var) ((var == NULL) ? NULL : (var = (op_timer_unref (var), NULL)))
typedef struct _ParamSpecTransitionClock ParamSpecTransitionClock;
enum  {
	NULL_TRANSITION_DESCRIPTOR_0_PROPERTY,
	NULL_TRANSITION_DESCRIPTOR_NUM_PROPERTIES
};
static GParamSpec* null_transition_descriptor_properties[NULL_TRANSITION_DESCRIPTOR_NUM_PROPERTIES];
enum  {
	NULL_EFFECT_0_PROPERTY,
	NULL_EFFECT_NUM_PROPERTIES
};
static GParamSpec* null_effect_properties[NULL_EFFECT_NUM_PROPERTIES];
enum  {
	RANDOM_EFFECT_DESCRIPTOR_0_PROPERTY,
	RANDOM_EFFECT_DESCRIPTOR_NUM_PROPERTIES
};
static GParamSpec* random_effect_descriptor_properties[RANDOM_EFFECT_DESCRIPTOR_NUM_PROPERTIES];
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _TransitionEffectsManagerPrivate {
	GeeMap* effects;
	SpitTransitionsDescriptor* null_descriptor;
	SpitTransitionsDescriptor* random_descriptor;
};

struct _ParamSpecTransitionEffectsManager {
	GParamSpec parent_instance;
};

struct _TransitionClockPrivate {
	SpitTransitionsDescriptor* desc;
	SpitTransitionsEffect* effect;
	gint desired_fps;
	gint min_fps;
	gint current_fps;
	OpTimer* paint_timer;
	SpitTransitionsVisuals* visuals;
	SpitTransitionsMotion* motion;
	TransitionClockRepaintCallback repaint;
	gpointer repaint_target;
	guint timer_id;
	gint64 time_started;
	gint frame_number;
	gboolean cancelled;
};

struct _ParamSpecTransitionClock {
	GParamSpec parent_instance;
};

static gint TransitionEffectsManager_private_offset;
static gpointer transition_effects_manager_parent_class = NULL;
static TransitionEffectsManager* transition_effects_manager_instance;
static TransitionEffectsManager* transition_effects_manager_instance = NULL;
static gint TransitionClock_private_offset;
static gpointer transition_clock_parent_class = NULL;
static gpointer null_transition_descriptor_parent_class = NULL;
static SpitPluggableIface * null_transition_descriptor_spit_pluggable_parent_iface = NULL;
static SpitTransitionsDescriptorIface * null_transition_descriptor_spit_transitions_descriptor_parent_iface = NULL;
static gpointer null_effect_parent_class = NULL;
static SpitTransitionsEffectIface * null_effect_spit_transitions_effect_parent_iface = NULL;
static gpointer random_effect_descriptor_parent_class = NULL;
static SpitPluggableIface * random_effect_descriptor_spit_pluggable_parent_iface = NULL;
static SpitTransitionsDescriptorIface * random_effect_descriptor_spit_transitions_descriptor_parent_iface = NULL;

static void transition_effects_manager_load_transitions (TransitionEffectsManager* self);
static void _transition_effects_manager_load_transitions_plugins_notifier_pluggable_activation (PluginsNotifier* _sender,
                                                                                         SpitPluggable* pluggable,
                                                                                         gboolean enabled,
                                                                                         gpointer self);
static TransitionEffectsManager* transition_effects_manager_new (void);
static TransitionEffectsManager* transition_effects_manager_construct (GType object_type);
static void transition_effects_manager_finalize (TransitionEffectsManager * obj);
static GType transition_effects_manager_get_type_once (void);
static void transition_clock_cancel_timer (TransitionClock* self);
static void transition_clock_reset (TransitionClock* self);
static gboolean transition_clock_tick (TransitionClock* self);
static gboolean _transition_clock_tick_gsource_func (gpointer self);
static gboolean transition_clock_is_fps_ok (TransitionClock* self);
static void transition_clock_finalize (TransitionClock * obj);
static GType transition_clock_get_type_once (void);
static gint null_transition_descriptor_real_get_pluggable_interface (SpitPluggable* base,
                                                              gint min_host_version,
                                                              gint max_host_version);
static const gchar* null_transition_descriptor_real_get_id (SpitPluggable* base);
static const gchar* null_transition_descriptor_real_get_pluggable_name (SpitPluggable* base);
static void null_transition_descriptor_real_get_info (SpitPluggable* base,
                                               SpitPluggableInfo* info);
static void null_transition_descriptor_real_activation (SpitPluggable* base,
                                                 gboolean enabled);
static SpitTransitionsEffect* null_transition_descriptor_real_create (SpitTransitionsDescriptor* base,
                                                               SpitHostInterface* host);
static GType null_transition_descriptor_get_type_once (void);
static void null_effect_real_get_fps (SpitTransitionsEffect* base,
                               gint* desired_fps,
                               gint* min_fps);
static void null_effect_real_start (SpitTransitionsEffect* base,
                             SpitTransitionsVisuals* visuals,
                             SpitTransitionsMotion* motion);
static gboolean null_effect_real_needs_clear_background (SpitTransitionsEffect* base);
static void null_effect_real_paint (SpitTransitionsEffect* base,
                             SpitTransitionsVisuals* visuals,
                             SpitTransitionsMotion* motion,
                             cairo_t* ctx,
                             gint width,
                             gint height,
                             gint frame_number);
static void null_effect_real_advance (SpitTransitionsEffect* base,
                               SpitTransitionsVisuals* visuals,
                               SpitTransitionsMotion* motion,
                               gint frame_number);
static void null_effect_real_cancel (SpitTransitionsEffect* base);
static GType null_effect_get_type_once (void);
static gint random_effect_descriptor_real_get_pluggable_interface (SpitPluggable* base,
                                                            gint min_host_version,
                                                            gint max_host_version);
static const gchar* random_effect_descriptor_real_get_id (SpitPluggable* base);
static const gchar* random_effect_descriptor_real_get_pluggable_name (SpitPluggable* base);
static void random_effect_descriptor_real_get_info (SpitPluggable* base,
                                             SpitPluggableInfo* info);
static void random_effect_descriptor_real_activation (SpitPluggable* base,
                                               gboolean enabled);
static SpitTransitionsEffect* random_effect_descriptor_real_create (SpitTransitionsDescriptor* base,
                                                             SpitHostInterface* host);
static GType random_effect_descriptor_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
transition_effects_manager_get_instance_private (TransitionEffectsManager* self)
{
	return G_STRUCT_MEMBER_P (self, TransitionEffectsManager_private_offset);
}

static void
_transition_effects_manager_load_transitions_plugins_notifier_pluggable_activation (PluginsNotifier* _sender,
                                                                                    SpitPluggable* pluggable,
                                                                                    gboolean enabled,
                                                                                    gpointer self)
{
	transition_effects_manager_load_transitions ((TransitionEffectsManager*) self);
}

static TransitionEffectsManager*
transition_effects_manager_construct (GType object_type)
{
	TransitionEffectsManager* self = NULL;
	PluginsNotifier* _tmp0_;
	PluginsNotifier* _tmp1_;
	self = (TransitionEffectsManager*) g_type_create_instance (object_type);
	transition_effects_manager_load_transitions (self);
	_tmp0_ = plugins_notifier_get_instance ();
	_tmp1_ = _tmp0_;
	g_signal_connect (_tmp1_, "pluggable-activation", (GCallback) _transition_effects_manager_load_transitions_plugins_notifier_pluggable_activation, self);
	_plugins_notifier_unref0 (_tmp1_);
	return self;
}

static TransitionEffectsManager*
transition_effects_manager_new (void)
{
	return transition_effects_manager_construct (TYPE_TRANSITION_EFFECTS_MANAGER);
}

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

static void
transition_effects_manager_load_transitions (TransitionEffectsManager* self)
{
	GeeMap* _tmp0_;
	GeeMap* _tmp1_;
	SpitTransitionsDescriptor* _tmp2_;
	const gchar* _tmp3_;
	SpitTransitionsDescriptor* _tmp4_;
	GeeMap* _tmp5_;
	SpitTransitionsDescriptor* _tmp6_;
	const gchar* _tmp7_;
	SpitTransitionsDescriptor* _tmp8_;
	GeeCollection* pluggables = NULL;
	GeeCollection* _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->effects;
	gee_map_clear (_tmp0_);
	_tmp1_ = self->priv->effects;
	_tmp2_ = self->priv->null_descriptor;
	_tmp3_ = spit_pluggable_get_id ((SpitPluggable*) _tmp2_);
	_tmp4_ = self->priv->null_descriptor;
	gee_map_set (_tmp1_, _tmp3_, _tmp4_);
	_tmp5_ = self->priv->effects;
	_tmp6_ = self->priv->random_descriptor;
	_tmp7_ = spit_pluggable_get_id ((SpitPluggable*) _tmp6_);
	_tmp8_ = self->priv->random_descriptor;
	gee_map_set (_tmp5_, _tmp7_, _tmp8_);
	_tmp9_ = plugins_get_pluggables_for_type (SPIT_TRANSITIONS_TYPE_DESCRIPTOR, NULL, NULL, NULL, FALSE);
	pluggables = _tmp9_;
	{
		GeeIterator* _pluggable_it = NULL;
		GeeCollection* _tmp10_;
		GeeIterator* _tmp11_;
		_tmp10_ = pluggables;
		_tmp11_ = gee_iterable_iterator ((GeeIterable*) _tmp10_);
		_pluggable_it = _tmp11_;
		while (TRUE) {
			GeeIterator* _tmp12_;
			SpitPluggable* pluggable = NULL;
			GeeIterator* _tmp13_;
			gpointer _tmp14_;
			gint pluggable_interface = 0;
			SpitPluggable* _tmp15_;
			SpitTransitionsDescriptor* desc = NULL;
			SpitPluggable* _tmp19_;
			SpitTransitionsDescriptor* _tmp20_;
			GeeMap* _tmp21_;
			SpitTransitionsDescriptor* _tmp22_;
			const gchar* _tmp23_;
			_tmp12_ = _pluggable_it;
			if (!gee_iterator_next (_tmp12_)) {
				break;
			}
			_tmp13_ = _pluggable_it;
			_tmp14_ = gee_iterator_get (_tmp13_);
			pluggable = (SpitPluggable*) _tmp14_;
			_tmp15_ = pluggable;
			pluggable_interface = spit_pluggable_get_pluggable_interface (_tmp15_, SPIT_TRANSITIONS_CURRENT_INTERFACE, SPIT_TRANSITIONS_CURRENT_INTERFACE);
			if (pluggable_interface != SPIT_TRANSITIONS_CURRENT_INTERFACE) {
				SpitPluggable* _tmp16_;
				gchar* _tmp17_;
				gchar* _tmp18_;
				_tmp16_ = pluggable;
				_tmp17_ = plugins_get_pluggable_module_id (_tmp16_);
				_tmp18_ = _tmp17_;
				g_warning ("TransitionEffects.vala:55: Unable to load transitions plug-in %s: repo" \
"rted interface %d", _tmp18_, pluggable_interface);
				_g_free0 (_tmp18_);
				_g_object_unref0 (pluggable);
				continue;
			}
			_tmp19_ = pluggable;
			_tmp20_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, SPIT_TRANSITIONS_TYPE_DESCRIPTOR, SpitTransitionsDescriptor));
			desc = _tmp20_;
			_tmp21_ = self->priv->effects;
			_tmp22_ = desc;
			_tmp23_ = spit_pluggable_get_id ((SpitPluggable*) _tmp22_);
			if (gee_map_has_key (_tmp21_, _tmp23_)) {
				SpitTransitionsDescriptor* _tmp24_;
				const gchar* _tmp25_;
				_tmp24_ = desc;
				_tmp25_ = spit_pluggable_get_id ((SpitPluggable*) _tmp24_);
				g_warning ("TransitionEffects.vala:63: Multiple transitions loaded with same effec" \
"t ID %s", _tmp25_);
			} else {
				GeeMap* _tmp26_;
				SpitTransitionsDescriptor* _tmp27_;
				const gchar* _tmp28_;
				SpitTransitionsDescriptor* _tmp29_;
				_tmp26_ = self->priv->effects;
				_tmp27_ = desc;
				_tmp28_ = spit_pluggable_get_id ((SpitPluggable*) _tmp27_);
				_tmp29_ = desc;
				gee_map_set (_tmp26_, _tmp28_, _tmp29_);
			}
			_g_object_unref0 (desc);
			_g_object_unref0 (pluggable);
		}
		_g_object_unref0 (_pluggable_it);
	}
	_g_object_unref0 (pluggables);
}

void
transition_effects_manager_init (void)
{
	TransitionEffectsManager* _tmp0_;
	_tmp0_ = transition_effects_manager_new ();
	_transition_effects_manager_unref0 (transition_effects_manager_instance);
	transition_effects_manager_instance = _tmp0_;
}

void
transition_effects_manager_terminate (void)
{
	_transition_effects_manager_unref0 (transition_effects_manager_instance);
	transition_effects_manager_instance = NULL;
}

static gpointer
_transition_effects_manager_ref0 (gpointer self)
{
	return self ? transition_effects_manager_ref (self) : NULL;
}

TransitionEffectsManager*
transition_effects_manager_get_instance (void)
{
	TransitionEffectsManager* _tmp0_;
	TransitionEffectsManager* _tmp1_;
	TransitionEffectsManager* _tmp2_;
	TransitionEffectsManager* result;
	_tmp0_ = transition_effects_manager_instance;
	_vala_assert (_tmp0_ != NULL, "instance != null");
	_tmp1_ = transition_effects_manager_instance;
	_tmp2_ = _transition_effects_manager_ref0 (_tmp1_);
	result = _tmp2_;
	return result;
}

GeeCollection*
transition_effects_manager_get_effect_ids (TransitionEffectsManager* self)
{
	GeeMap* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeCollection* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->effects;
	_tmp1_ = gee_map_get_keys (_tmp0_);
	_tmp2_ = _tmp1_;
	result = (GeeCollection*) _tmp2_;
	return result;
}

GeeCollection*
transition_effects_manager_get_effect_names (TransitionEffectsManager* self,
                                             GCompareDataFunc comparator,
                                             gpointer comparator_target,
                                             GDestroyNotify comparator_target_destroy_notify)
{
	GeeCollection* effect_names = NULL;
	GCompareDataFunc _tmp0_;
	gpointer _tmp0__target;
	GDestroyNotify _tmp0__target_destroy_notify;
	GeeTreeSet* _tmp1_;
	GeeCollection* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = comparator;
	_tmp0__target = comparator_target;
	_tmp0__target_destroy_notify = comparator_target_destroy_notify;
	comparator = NULL;
	comparator_target = NULL;
	comparator_target_destroy_notify = NULL;
	_tmp1_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp0_, _tmp0__target, _tmp0__target_destroy_notify);
	effect_names = (GeeCollection*) _tmp1_;
	{
		GeeIterator* _desc_it = NULL;
		GeeMap* _tmp2_;
		GeeCollection* _tmp3_;
		GeeCollection* _tmp4_;
		GeeCollection* _tmp5_;
		GeeIterator* _tmp6_;
		GeeIterator* _tmp7_;
		_tmp2_ = self->priv->effects;
		_tmp3_ = gee_map_get_values (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp5_ = _tmp4_;
		_tmp6_ = gee_iterable_iterator ((GeeIterable*) _tmp5_);
		_tmp7_ = _tmp6_;
		_g_object_unref0 (_tmp5_);
		_desc_it = _tmp7_;
		while (TRUE) {
			GeeIterator* _tmp8_;
			SpitTransitionsDescriptor* desc = NULL;
			GeeIterator* _tmp9_;
			gpointer _tmp10_;
			GeeCollection* _tmp11_;
			SpitTransitionsDescriptor* _tmp12_;
			const gchar* _tmp13_;
			_tmp8_ = _desc_it;
			if (!gee_iterator_next (_tmp8_)) {
				break;
			}
			_tmp9_ = _desc_it;
			_tmp10_ = gee_iterator_get (_tmp9_);
			desc = (SpitTransitionsDescriptor*) _tmp10_;
			_tmp11_ = effect_names;
			_tmp12_ = desc;
			_tmp13_ = spit_pluggable_get_pluggable_name ((SpitPluggable*) _tmp12_);
			gee_collection_add (_tmp11_, _tmp13_);
			_g_object_unref0 (desc);
		}
		_g_object_unref0 (_desc_it);
	}
	result = effect_names;
	(comparator_target_destroy_notify == NULL) ? NULL : (comparator_target_destroy_notify (comparator_target), NULL);
	comparator = NULL;
	comparator_target = NULL;
	comparator_target_destroy_notify = NULL;
	return result;
}

gchar*
transition_effects_manager_get_id_for_effect_name (TransitionEffectsManager* self,
                                                   const gchar* effect_name)
{
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (effect_name != NULL, NULL);
	{
		GeeIterator* _desc_it = NULL;
		GeeMap* _tmp0_;
		GeeCollection* _tmp1_;
		GeeCollection* _tmp2_;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
		GeeIterator* _tmp5_;
		_tmp0_ = self->priv->effects;
		_tmp1_ = gee_map_get_values (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = _tmp2_;
		_tmp4_ = gee_iterable_iterator ((GeeIterable*) _tmp3_);
		_tmp5_ = _tmp4_;
		_g_object_unref0 (_tmp3_);
		_desc_it = _tmp5_;
		while (TRUE) {
			GeeIterator* _tmp6_;
			SpitTransitionsDescriptor* desc = NULL;
			GeeIterator* _tmp7_;
			gpointer _tmp8_;
			SpitTransitionsDescriptor* _tmp9_;
			const gchar* _tmp10_;
			_tmp6_ = _desc_it;
			if (!gee_iterator_next (_tmp6_)) {
				break;
			}
			_tmp7_ = _desc_it;
			_tmp8_ = gee_iterator_get (_tmp7_);
			desc = (SpitTransitionsDescriptor*) _tmp8_;
			_tmp9_ = desc;
			_tmp10_ = spit_pluggable_get_pluggable_name ((SpitPluggable*) _tmp9_);
			if (g_strcmp0 (_tmp10_, effect_name) == 0) {
				SpitTransitionsDescriptor* _tmp11_;
				const gchar* _tmp12_;
				gchar* _tmp13_;
				_tmp11_ = desc;
				_tmp12_ = spit_pluggable_get_id ((SpitPluggable*) _tmp11_);
				_tmp13_ = g_strdup (_tmp12_);
				result = _tmp13_;
				_g_object_unref0 (desc);
				_g_object_unref0 (_desc_it);
				return result;
			}
			_g_object_unref0 (desc);
		}
		_g_object_unref0 (_desc_it);
	}
	result = NULL;
	return result;
}

SpitTransitionsDescriptor*
transition_effects_manager_get_effect_descriptor (TransitionEffectsManager* self,
                                                  const gchar* effect_id)
{
	GeeMap* _tmp0_;
	gpointer _tmp1_;
	SpitTransitionsDescriptor* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (effect_id != NULL, NULL);
	_tmp0_ = self->priv->effects;
	_tmp1_ = gee_map_get (_tmp0_, effect_id);
	result = (SpitTransitionsDescriptor*) _tmp1_;
	return result;
}

gchar*
transition_effects_manager_get_effect_name (TransitionEffectsManager* self,
                                            const gchar* effect_id)
{
	SpitTransitionsDescriptor* desc = NULL;
	SpitTransitionsDescriptor* _tmp0_;
	const gchar* _tmp1_ = NULL;
	SpitTransitionsDescriptor* _tmp2_;
	gchar* _tmp5_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (effect_id != NULL, NULL);
	_tmp0_ = transition_effects_manager_get_effect_descriptor (self, effect_id);
	desc = _tmp0_;
	_tmp2_ = desc;
	if (_tmp2_ != NULL) {
		SpitTransitionsDescriptor* _tmp3_;
		const gchar* _tmp4_;
		_tmp3_ = desc;
		_tmp4_ = spit_pluggable_get_pluggable_name ((SpitPluggable*) _tmp3_);
		_tmp1_ = _tmp4_;
	} else {
		_tmp1_ = _ ("(None)");
	}
	_tmp5_ = g_strdup (_tmp1_);
	result = _tmp5_;
	_g_object_unref0 (desc);
	return result;
}

SpitTransitionsDescriptor*
transition_effects_manager_get_null_descriptor (TransitionEffectsManager* self)
{
	SpitTransitionsDescriptor* _tmp0_;
	SpitTransitionsDescriptor* _tmp1_;
	SpitTransitionsDescriptor* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->null_descriptor;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	result = _tmp1_;
	return result;
}

TransitionClock*
transition_effects_manager_create_transition_clock (TransitionEffectsManager* self,
                                                    const gchar* effect_id)
{
	SpitTransitionsDescriptor* desc = NULL;
	SpitTransitionsDescriptor* _tmp0_;
	TransitionClock* _tmp1_ = NULL;
	SpitTransitionsDescriptor* _tmp2_;
	TransitionClock* _tmp5_;
	TransitionClock* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (effect_id != NULL, NULL);
	_tmp0_ = transition_effects_manager_get_effect_descriptor (self, effect_id);
	desc = _tmp0_;
	_tmp2_ = desc;
	if (_tmp2_ != NULL) {
		SpitTransitionsDescriptor* _tmp3_;
		TransitionClock* _tmp4_;
		_tmp3_ = desc;
		_tmp4_ = transition_clock_new (_tmp3_);
		_transition_clock_unref0 (_tmp1_);
		_tmp1_ = _tmp4_;
	} else {
		_transition_clock_unref0 (_tmp1_);
		_tmp1_ = NULL;
	}
	_tmp5_ = _tmp1_;
	_tmp1_ = NULL;
	result = _tmp5_;
	_transition_clock_unref0 (_tmp1_);
	_g_object_unref0 (desc);
	return result;
}

TransitionClock*
transition_effects_manager_create_null_transition_clock (TransitionEffectsManager* self)
{
	SpitTransitionsDescriptor* _tmp0_;
	TransitionClock* _tmp1_;
	TransitionClock* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->null_descriptor;
	_tmp1_ = transition_clock_new (_tmp0_);
	result = _tmp1_;
	return result;
}

static void
value_transition_effects_manager_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
value_transition_effects_manager_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		transition_effects_manager_unref (value->data[0].v_pointer);
	}
}

static void
value_transition_effects_manager_copy_value (const GValue* src_value,
                                             GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = transition_effects_manager_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
value_transition_effects_manager_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
value_transition_effects_manager_collect_value (GValue* value,
                                                guint n_collect_values,
                                                GTypeCValue* collect_values,
                                                guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		TransitionEffectsManager * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = transition_effects_manager_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
value_transition_effects_manager_lcopy_value (const GValue* value,
                                              guint n_collect_values,
                                              GTypeCValue* collect_values,
                                              guint collect_flags)
{
	TransitionEffectsManager ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = transition_effects_manager_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
param_spec_transition_effects_manager (const gchar* name,
                                       const gchar* nick,
                                       const gchar* blurb,
                                       GType object_type,
                                       GParamFlags flags)
{
	ParamSpecTransitionEffectsManager* spec;
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_TRANSITION_EFFECTS_MANAGER), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
value_get_transition_effects_manager (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSITION_EFFECTS_MANAGER), NULL);
	return value->data[0].v_pointer;
}

void
value_set_transition_effects_manager (GValue* value,
                                      gpointer v_object)
{
	TransitionEffectsManager * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSITION_EFFECTS_MANAGER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TRANSITION_EFFECTS_MANAGER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		transition_effects_manager_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		transition_effects_manager_unref (old);
	}
}

void
value_take_transition_effects_manager (GValue* value,
                                       gpointer v_object)
{
	TransitionEffectsManager * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSITION_EFFECTS_MANAGER));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TRANSITION_EFFECTS_MANAGER));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		transition_effects_manager_unref (old);
	}
}

static void
transition_effects_manager_class_init (TransitionEffectsManagerClass * klass,
                                       gpointer klass_data)
{
	transition_effects_manager_parent_class = g_type_class_peek_parent (klass);
	((TransitionEffectsManagerClass *) klass)->finalize = transition_effects_manager_finalize;
	g_type_class_adjust_private_offset (klass, &TransitionEffectsManager_private_offset);
}

static void
transition_effects_manager_instance_init (TransitionEffectsManager * self,
                                          gpointer klass)
{
	GeeHashMap* _tmp0_;
	NullTransitionDescriptor* _tmp1_;
	RandomEffectDescriptor* _tmp2_;
	self->priv = transition_effects_manager_get_instance_private (self);
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, SPIT_TRANSITIONS_TYPE_DESCRIPTOR, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	self->priv->effects = (GeeMap*) _tmp0_;
	_tmp1_ = null_transition_descriptor_new ();
	self->priv->null_descriptor = (SpitTransitionsDescriptor*) _tmp1_;
	_tmp2_ = random_effect_descriptor_new ();
	self->priv->random_descriptor = (SpitTransitionsDescriptor*) _tmp2_;
	self->ref_count = 1;
}

static void
transition_effects_manager_finalize (TransitionEffectsManager * obj)
{
	TransitionEffectsManager * self;
	PluginsNotifier* _tmp0_;
	PluginsNotifier* _tmp1_;
	guint _tmp2_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRANSITION_EFFECTS_MANAGER, TransitionEffectsManager);
	g_signal_handlers_destroy (self);
	_tmp0_ = plugins_notifier_get_instance ();
	_tmp1_ = _tmp0_;
	g_signal_parse_name ("pluggable-activation", PLUGINS_TYPE_NOTIFIER, &_tmp2_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _transition_effects_manager_load_transitions_plugins_notifier_pluggable_activation, self);
	_plugins_notifier_unref0 (_tmp1_);
	_g_object_unref0 (self->priv->effects);
	_g_object_unref0 (self->priv->null_descriptor);
	_g_object_unref0 (self->priv->random_descriptor);
}

static GType
transition_effects_manager_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { value_transition_effects_manager_init, value_transition_effects_manager_free_value, value_transition_effects_manager_copy_value, value_transition_effects_manager_peek_pointer, "p", value_transition_effects_manager_collect_value, "p", value_transition_effects_manager_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (TransitionEffectsManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) transition_effects_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TransitionEffectsManager), 0, (GInstanceInitFunc) transition_effects_manager_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType transition_effects_manager_type_id;
	transition_effects_manager_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TransitionEffectsManager", &g_define_type_info, &g_define_type_fundamental_info, 0);
	TransitionEffectsManager_private_offset = g_type_add_instance_private (transition_effects_manager_type_id, sizeof (TransitionEffectsManagerPrivate));
	return transition_effects_manager_type_id;
}

GType
transition_effects_manager_get_type (void)
{
	static volatile gsize transition_effects_manager_type_id__once = 0;
	if (g_once_init_enter (&transition_effects_manager_type_id__once)) {
		GType transition_effects_manager_type_id;
		transition_effects_manager_type_id = transition_effects_manager_get_type_once ();
		g_once_init_leave (&transition_effects_manager_type_id__once, transition_effects_manager_type_id);
	}
	return transition_effects_manager_type_id__once;
}

gpointer
transition_effects_manager_ref (gpointer instance)
{
	TransitionEffectsManager * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
transition_effects_manager_unref (gpointer instance)
{
	TransitionEffectsManager * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		TRANSITION_EFFECTS_MANAGER_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static inline gpointer
transition_clock_get_instance_private (TransitionClock* self)
{
	return G_STRUCT_MEMBER_P (self, TransitionClock_private_offset);
}

TransitionClock*
transition_clock_construct (GType object_type,
                            SpitTransitionsDescriptor* desc)
{
	TransitionClock* self = NULL;
	SpitTransitionsDescriptor* _tmp0_;
	PluginsStandardHostInterface* _tmp1_;
	PluginsStandardHostInterface* _tmp2_;
	SpitTransitionsEffect* _tmp3_;
	SpitTransitionsEffect* _tmp4_;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	const gchar* _tmp7_;
	OpTimer* _tmp8_;
	g_return_val_if_fail (desc != NULL, NULL);
	self = (TransitionClock*) g_type_create_instance (object_type);
	_tmp0_ = _g_object_ref0 (desc);
	_g_object_unref0 (self->priv->desc);
	self->priv->desc = _tmp0_;
	_tmp1_ = plugins_standard_host_interface_new ((SpitPluggable*) desc, "transitions");
	_tmp2_ = _tmp1_;
	_tmp3_ = spit_transitions_descriptor_create (desc, (SpitHostInterface*) _tmp2_);
	_g_object_unref0 (self->priv->effect);
	self->priv->effect = _tmp3_;
	_g_object_unref0 (_tmp2_);
	_tmp4_ = self->priv->effect;
	spit_transitions_effect_get_fps (_tmp4_, &_tmp5_, &_tmp6_);
	self->priv->desired_fps = _tmp5_;
	self->priv->min_fps = _tmp6_;
	_tmp7_ = spit_pluggable_get_pluggable_name ((SpitPluggable*) desc);
	_tmp8_ = op_timer_new (_tmp7_);
	_op_timer_unref0 (self->priv->paint_timer);
	self->priv->paint_timer = _tmp8_;
	return self;
}

TransitionClock*
transition_clock_new (SpitTransitionsDescriptor* desc)
{
	return transition_clock_construct (TYPE_TRANSITION_CLOCK, desc);
}

gboolean
transition_clock_is_in_progress (TransitionClock* self)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (!self->priv->cancelled) {
		SpitTransitionsMotion* _tmp2_;
		_tmp2_ = self->priv->motion;
		_tmp1_ = _tmp2_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		SpitTransitionsMotion* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
		_tmp3_ = self->priv->motion;
		_tmp4_ = spit_transitions_motion_get_total_frames (_tmp3_);
		_tmp5_ = _tmp4_;
		_tmp0_ = self->priv->frame_number < _tmp5_;
	} else {
		_tmp0_ = FALSE;
	}
	result = _tmp0_;
	return result;
}

static gboolean
_transition_clock_tick_gsource_func (gpointer self)
{
	gboolean result;
	result = transition_clock_tick ((TransitionClock*) self);
	return result;
}

void
transition_clock_start (TransitionClock* self,
                        SpitTransitionsVisuals* visuals,
                        SpitTransitionsDirection direction,
                        gint duration_msec,
                        TransitionClockRepaintCallback repaint,
                        gpointer repaint_target)
{
	SpitTransitionsVisuals* _tmp0_;
	SpitTransitionsMotion* _tmp1_;
	SpitTransitionsEffect* _tmp2_;
	SpitTransitionsMotion* _tmp3_;
	SpitTransitionsMotion* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (visuals != NULL);
	transition_clock_reset (self);
	if (self->priv->desired_fps == 0) {
		return;
	}
	_tmp0_ = _g_object_ref0 (visuals);
	_g_object_unref0 (self->priv->visuals);
	self->priv->visuals = _tmp0_;
	self->priv->repaint = repaint;
	self->priv->repaint_target = repaint_target;
	_tmp1_ = spit_transitions_motion_new (direction, self->priv->desired_fps, duration_msec);
	_g_object_unref0 (self->priv->motion);
	self->priv->motion = _tmp1_;
	_tmp2_ = self->priv->effect;
	_tmp3_ = self->priv->motion;
	spit_transitions_effect_start (_tmp2_, visuals, _tmp3_);
	self->priv->time_started = now_ms ();
	_tmp4_ = self->priv->motion;
	_tmp5_ = spit_transitions_motion_get_tick_msec (_tmp4_);
	_tmp6_ = _tmp5_;
	self->priv->timer_id = g_timeout_add_full (G_PRIORITY_HIGH, (guint) _tmp6_, _transition_clock_tick_gsource_func, transition_clock_ref (self), transition_clock_unref);
}

static void
transition_clock_reset (TransitionClock* self)
{
	g_return_if_fail (self != NULL);
	_g_object_unref0 (self->priv->visuals);
	self->priv->visuals = NULL;
	_g_object_unref0 (self->priv->motion);
	self->priv->motion = NULL;
	self->priv->repaint = NULL;
	self->priv->repaint_target = NULL;
	transition_clock_cancel_timer (self);
	self->priv->time_started = (gint64) 0;
	self->priv->frame_number = 1;
	self->priv->current_fps = 0;
	self->priv->cancelled = FALSE;
}

static void
transition_clock_cancel_timer (TransitionClock* self)
{
	g_return_if_fail (self != NULL);
	if (self->priv->timer_id != ((guint) 0)) {
		g_source_remove (self->priv->timer_id);
		self->priv->timer_id = (guint) 0;
	}
}

static gboolean
transition_clock_is_fps_ok (TransitionClock* self)
{
	gdouble elapsed_msec = 0.0;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_vala_assert (self->priv->time_started > ((gint64) 0), "time_started > 0");
	if (self->priv->frame_number <= 3) {
		result = TRUE;
		return result;
	}
	elapsed_msec = (gdouble) (now_ms () - self->priv->time_started);
	if (elapsed_msec <= 0.0) {
		result = TRUE;
		return result;
	}
	self->priv->current_fps = (gint) ((self->priv->frame_number * 1000.0) / elapsed_msec);
	if (self->priv->current_fps < self->priv->min_fps) {
		g_debug ("TransitionEffects.vala:221: Transition rate of %dfps below minimum of " \
"%dfps (elapsed=%lf frames=%d)", self->priv->current_fps, self->priv->min_fps, elapsed_msec, self->priv->frame_number);
	}
	result = self->priv->current_fps >= self->priv->min_fps;
	return result;
}

void
transition_clock_cancel (TransitionClock* self)
{
	SpitTransitionsEffect* _tmp0_;
	TransitionClockRepaintCallback _tmp1_;
	gpointer _tmp1__target;
	g_return_if_fail (self != NULL);
	self->priv->cancelled = TRUE;
	transition_clock_cancel_timer (self);
	_tmp0_ = self->priv->effect;
	spit_transitions_effect_cancel (_tmp0_);
	_tmp1_ = self->priv->repaint;
	_tmp1__target = self->priv->repaint_target;
	_tmp1_ (_tmp1__target);
}

gboolean
transition_clock_paint (TransitionClock* self,
                        cairo_t* ctx,
                        gint width,
                        gint height)
{
	OpTimer* _tmp0_;
	SpitTransitionsEffect* _tmp1_;
	SpitTransitionsEffect* _tmp14_;
	SpitTransitionsVisuals* _tmp15_;
	SpitTransitionsMotion* _tmp16_;
	OpTimer* _tmp17_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (ctx != NULL, FALSE);
	if (!transition_clock_is_in_progress (self)) {
		result = FALSE;
		return result;
	}
	_tmp0_ = self->priv->paint_timer;
	op_timer_start (_tmp0_);
	cairo_save (ctx);
	_tmp1_ = self->priv->effect;
	if (spit_transitions_effect_needs_clear_background (_tmp1_)) {
		SpitTransitionsVisuals* _tmp2_;
		GdkRGBA _tmp3_ = {0};
		GdkRGBA _tmp4_;
		SpitTransitionsVisuals* _tmp5_;
		GdkRGBA _tmp6_ = {0};
		GdkRGBA _tmp7_;
		SpitTransitionsVisuals* _tmp8_;
		GdkRGBA _tmp9_ = {0};
		GdkRGBA _tmp10_;
		SpitTransitionsVisuals* _tmp11_;
		GdkRGBA _tmp12_ = {0};
		GdkRGBA _tmp13_;
		_tmp2_ = self->priv->visuals;
		spit_transitions_visuals_get_bg_color (_tmp2_, &_tmp3_);
		_tmp4_ = _tmp3_;
		_tmp5_ = self->priv->visuals;
		spit_transitions_visuals_get_bg_color (_tmp5_, &_tmp6_);
		_tmp7_ = _tmp6_;
		_tmp8_ = self->priv->visuals;
		spit_transitions_visuals_get_bg_color (_tmp8_, &_tmp9_);
		_tmp10_ = _tmp9_;
		_tmp11_ = self->priv->visuals;
		spit_transitions_visuals_get_bg_color (_tmp11_, &_tmp12_);
		_tmp13_ = _tmp12_;
		cairo_set_source_rgba (ctx, _tmp4_.red, _tmp7_.green, _tmp10_.blue, _tmp13_.alpha);
		cairo_rectangle (ctx, (gdouble) 0, (gdouble) 0, (gdouble) width, (gdouble) height);
		cairo_fill (ctx);
	}
	_tmp14_ = self->priv->effect;
	_tmp15_ = self->priv->visuals;
	_tmp16_ = self->priv->motion;
	spit_transitions_effect_paint (_tmp14_, _tmp15_, _tmp16_, ctx, width, height, self->priv->frame_number);
	cairo_restore (ctx);
	_tmp17_ = self->priv->paint_timer;
	op_timer_stop (_tmp17_);
	result = TRUE;
	return result;
}

static gboolean
transition_clock_tick (TransitionClock* self)
{
	TransitionClockRepaintCallback _tmp0_;
	gpointer _tmp0__target;
	SpitTransitionsMotion* _tmp1_;
	gint _tmp2_;
	gint _tmp3_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	if (!transition_clock_is_fps_ok (self)) {
		g_debug ("TransitionEffects.vala:266: Cancelling transition: below minimum fps");
		transition_clock_cancel (self);
	}
	_tmp0_ = self->priv->repaint;
	_tmp0__target = self->priv->repaint_target;
	_tmp0_ (_tmp0__target);
	if (!transition_clock_is_in_progress (self)) {
		transition_clock_cancel_timer (self);
		result = FALSE;
		return result;
	}
	_tmp1_ = self->priv->motion;
	_tmp2_ = spit_transitions_motion_get_total_frames (_tmp1_);
	_tmp3_ = _tmp2_;
	if (self->priv->frame_number < _tmp3_) {
		SpitTransitionsEffect* _tmp4_;
		SpitTransitionsVisuals* _tmp5_;
		SpitTransitionsMotion* _tmp6_;
		gint _tmp7_;
		_tmp4_ = self->priv->effect;
		_tmp5_ = self->priv->visuals;
		_tmp6_ = self->priv->motion;
		self->priv->frame_number = self->priv->frame_number + 1;
		_tmp7_ = self->priv->frame_number;
		spit_transitions_effect_advance (_tmp4_, _tmp5_, _tmp6_, _tmp7_);
	}
	result = TRUE;
	return result;
}

static void
value_transition_clock_init (GValue* value)
{
	value->data[0].v_pointer = NULL;
}

static void
value_transition_clock_free_value (GValue* value)
{
	if (value->data[0].v_pointer) {
		transition_clock_unref (value->data[0].v_pointer);
	}
}

static void
value_transition_clock_copy_value (const GValue* src_value,
                                   GValue* dest_value)
{
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = transition_clock_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}

static gpointer
value_transition_clock_peek_pointer (const GValue* value)
{
	return value->data[0].v_pointer;
}

static gchar*
value_transition_clock_collect_value (GValue* value,
                                      guint n_collect_values,
                                      GTypeCValue* collect_values,
                                      guint collect_flags)
{
	if (collect_values[0].v_pointer) {
		TransitionClock * object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = transition_clock_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}

static gchar*
value_transition_clock_lcopy_value (const GValue* value,
                                    guint n_collect_values,
                                    GTypeCValue* collect_values,
                                    guint collect_flags)
{
	TransitionClock ** object_p;
	object_p = collect_values[0].v_pointer;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = transition_clock_ref (value->data[0].v_pointer);
	}
	return NULL;
}

GParamSpec*
param_spec_transition_clock (const gchar* name,
                             const gchar* nick,
                             const gchar* blurb,
                             GType object_type,
                             GParamFlags flags)
{
	ParamSpecTransitionClock* spec;
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_TRANSITION_CLOCK), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}

gpointer
value_get_transition_clock (const GValue* value)
{
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSITION_CLOCK), NULL);
	return value->data[0].v_pointer;
}

void
value_set_transition_clock (GValue* value,
                            gpointer v_object)
{
	TransitionClock * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSITION_CLOCK));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TRANSITION_CLOCK));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		transition_clock_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		transition_clock_unref (old);
	}
}

void
value_take_transition_clock (GValue* value,
                             gpointer v_object)
{
	TransitionClock * old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSITION_CLOCK));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TRANSITION_CLOCK));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		transition_clock_unref (old);
	}
}

static void
transition_clock_class_init (TransitionClockClass * klass,
                             gpointer klass_data)
{
	transition_clock_parent_class = g_type_class_peek_parent (klass);
	((TransitionClockClass *) klass)->finalize = transition_clock_finalize;
	g_type_class_adjust_private_offset (klass, &TransitionClock_private_offset);
}

static void
transition_clock_instance_init (TransitionClock * self,
                                gpointer klass)
{
	self->priv = transition_clock_get_instance_private (self);
	self->priv->current_fps = 0;
	self->priv->visuals = NULL;
	self->priv->motion = NULL;
	self->priv->repaint = NULL;
	self->priv->repaint_target = NULL;
	self->priv->timer_id = (guint) 0;
	self->priv->time_started = (gint64) 0;
	self->priv->frame_number = 0;
	self->priv->cancelled = FALSE;
	self->ref_count = 1;
}

static void
transition_clock_finalize (TransitionClock * obj)
{
	TransitionClock * self;
	gint _tmp0_ = 0;
	SpitTransitionsMotion* _tmp1_;
	OpTimer* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRANSITION_CLOCK, TransitionClock);
	g_signal_handlers_destroy (self);
	transition_clock_cancel_timer (self);
	_tmp1_ = self->priv->motion;
	if (_tmp1_ != NULL) {
		SpitTransitionsMotion* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		_tmp2_ = self->priv->motion;
		_tmp3_ = spit_transitions_motion_get_tick_msec (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_;
	} else {
		_tmp0_ = 0;
	}
	_tmp5_ = self->priv->paint_timer;
	_tmp6_ = op_timer_to_string (_tmp5_);
	_tmp7_ = _tmp6_;
	g_debug ("TransitionEffects.vala:160: %s tick_msec=%d min/desired/current fps=%d" \
"/%d/%d", _tmp7_, _tmp0_, self->priv->min_fps, self->priv->desired_fps, self->priv->current_fps);
	_g_free0 (_tmp7_);
	_g_object_unref0 (self->priv->desc);
	_g_object_unref0 (self->priv->effect);
	_op_timer_unref0 (self->priv->paint_timer);
	_g_object_unref0 (self->priv->visuals);
	_g_object_unref0 (self->priv->motion);
}

static GType
transition_clock_get_type_once (void)
{
	static const GTypeValueTable g_define_type_value_table = { value_transition_clock_init, value_transition_clock_free_value, value_transition_clock_copy_value, value_transition_clock_peek_pointer, "p", value_transition_clock_collect_value, "p", value_transition_clock_lcopy_value };
	static const GTypeInfo g_define_type_info = { sizeof (TransitionClockClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) transition_clock_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TransitionClock), 0, (GInstanceInitFunc) transition_clock_instance_init, &g_define_type_value_table };
	static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
	GType transition_clock_type_id;
	transition_clock_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TransitionClock", &g_define_type_info, &g_define_type_fundamental_info, 0);
	TransitionClock_private_offset = g_type_add_instance_private (transition_clock_type_id, sizeof (TransitionClockPrivate));
	return transition_clock_type_id;
}

GType
transition_clock_get_type (void)
{
	static volatile gsize transition_clock_type_id__once = 0;
	if (g_once_init_enter (&transition_clock_type_id__once)) {
		GType transition_clock_type_id;
		transition_clock_type_id = transition_clock_get_type_once ();
		g_once_init_leave (&transition_clock_type_id__once, transition_clock_type_id);
	}
	return transition_clock_type_id__once;
}

gpointer
transition_clock_ref (gpointer instance)
{
	TransitionClock * self;
	self = instance;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}

void
transition_clock_unref (gpointer instance)
{
	TransitionClock * self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		TRANSITION_CLOCK_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}

static gint
null_transition_descriptor_real_get_pluggable_interface (SpitPluggable* base,
                                                         gint min_host_version,
                                                         gint max_host_version)
{
	NullTransitionDescriptor * self;
	gint result;
	self = (NullTransitionDescriptor*) base;
	result = SPIT_TRANSITIONS_CURRENT_INTERFACE;
	return result;
}

static const gchar*
null_transition_descriptor_real_get_id (SpitPluggable* base)
{
	NullTransitionDescriptor * self;
	const gchar* result;
	self = (NullTransitionDescriptor*) base;
	result = NULL_TRANSITION_DESCRIPTOR_EFFECT_ID;
	return result;
}

static const gchar*
null_transition_descriptor_real_get_pluggable_name (SpitPluggable* base)
{
	NullTransitionDescriptor * self;
	const gchar* result;
	self = (NullTransitionDescriptor*) base;
	result = _ ("None");
	return result;
}

static void
null_transition_descriptor_real_get_info (SpitPluggable* base,
                                          SpitPluggableInfo* info)
{
	NullTransitionDescriptor * self;
	self = (NullTransitionDescriptor*) base;
	g_return_if_fail (info != NULL);
}

static void
null_transition_descriptor_real_activation (SpitPluggable* base,
                                            gboolean enabled)
{
	NullTransitionDescriptor * self;
	self = (NullTransitionDescriptor*) base;
}

static SpitTransitionsEffect*
null_transition_descriptor_real_create (SpitTransitionsDescriptor* base,
                                        SpitHostInterface* host)
{
	NullTransitionDescriptor * self;
	NullEffect* _tmp0_;
	SpitTransitionsEffect* result;
	self = (NullTransitionDescriptor*) base;
	g_return_val_if_fail (host != NULL, NULL);
	_tmp0_ = null_effect_new ();
	result = (SpitTransitionsEffect*) _tmp0_;
	return result;
}

NullTransitionDescriptor*
null_transition_descriptor_construct (GType object_type)
{
	NullTransitionDescriptor * self = NULL;
	self = (NullTransitionDescriptor*) g_object_new (object_type, NULL);
	return self;
}

NullTransitionDescriptor*
null_transition_descriptor_new (void)
{
	return null_transition_descriptor_construct (TYPE_NULL_TRANSITION_DESCRIPTOR);
}

static void
null_transition_descriptor_class_init (NullTransitionDescriptorClass * klass,
                                       gpointer klass_data)
{
	null_transition_descriptor_parent_class = g_type_class_peek_parent (klass);
}

static void
null_transition_descriptor_spit_pluggable_interface_init (SpitPluggableIface * iface,
                                                          gpointer iface_data)
{
	null_transition_descriptor_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_pluggable_interface = (gint (*) (SpitPluggable*, gint, gint)) null_transition_descriptor_real_get_pluggable_interface;
	iface->get_id = (const gchar* (*) (SpitPluggable*)) null_transition_descriptor_real_get_id;
	iface->get_pluggable_name = (const gchar* (*) (SpitPluggable*)) null_transition_descriptor_real_get_pluggable_name;
	iface->get_info = (void (*) (SpitPluggable*, SpitPluggableInfo*)) null_transition_descriptor_real_get_info;
	iface->activation = (void (*) (SpitPluggable*, gboolean)) null_transition_descriptor_real_activation;
}

static void
null_transition_descriptor_spit_transitions_descriptor_interface_init (SpitTransitionsDescriptorIface * iface,
                                                                       gpointer iface_data)
{
	null_transition_descriptor_spit_transitions_descriptor_parent_iface = g_type_interface_peek_parent (iface);
	iface->create = (SpitTransitionsEffect* (*) (SpitTransitionsDescriptor*, SpitHostInterface*)) null_transition_descriptor_real_create;
}

static void
null_transition_descriptor_instance_init (NullTransitionDescriptor * self,
                                          gpointer klass)
{
}

static GType
null_transition_descriptor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (NullTransitionDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) null_transition_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NullTransitionDescriptor), 0, (GInstanceInitFunc) null_transition_descriptor_instance_init, NULL };
	static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) null_transition_descriptor_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo spit_transitions_descriptor_info = { (GInterfaceInitFunc) null_transition_descriptor_spit_transitions_descriptor_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType null_transition_descriptor_type_id;
	null_transition_descriptor_type_id = g_type_register_static (G_TYPE_OBJECT, "NullTransitionDescriptor", &g_define_type_info, 0);
	g_type_add_interface_static (null_transition_descriptor_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info);
	g_type_add_interface_static (null_transition_descriptor_type_id, SPIT_TRANSITIONS_TYPE_DESCRIPTOR, &spit_transitions_descriptor_info);
	return null_transition_descriptor_type_id;
}

GType
null_transition_descriptor_get_type (void)
{
	static volatile gsize null_transition_descriptor_type_id__once = 0;
	if (g_once_init_enter (&null_transition_descriptor_type_id__once)) {
		GType null_transition_descriptor_type_id;
		null_transition_descriptor_type_id = null_transition_descriptor_get_type_once ();
		g_once_init_leave (&null_transition_descriptor_type_id__once, null_transition_descriptor_type_id);
	}
	return null_transition_descriptor_type_id__once;
}

NullEffect*
null_effect_construct (GType object_type)
{
	NullEffect * self = NULL;
	self = (NullEffect*) g_object_new (object_type, NULL);
	return self;
}

NullEffect*
null_effect_new (void)
{
	return null_effect_construct (TYPE_NULL_EFFECT);
}

static void
null_effect_real_get_fps (SpitTransitionsEffect* base,
                          gint* desired_fps,
                          gint* min_fps)
{
	NullEffect * self;
	gint _vala_desired_fps = 0;
	gint _vala_min_fps = 0;
	self = (NullEffect*) base;
	_vala_desired_fps = 0;
	_vala_min_fps = 0;
	if (desired_fps) {
		*desired_fps = _vala_desired_fps;
	}
	if (min_fps) {
		*min_fps = _vala_min_fps;
	}
}

static void
null_effect_real_start (SpitTransitionsEffect* base,
                        SpitTransitionsVisuals* visuals,
                        SpitTransitionsMotion* motion)
{
	NullEffect * self;
	self = (NullEffect*) base;
	g_return_if_fail (visuals != NULL);
	g_return_if_fail (motion != NULL);
}

static gboolean
null_effect_real_needs_clear_background (SpitTransitionsEffect* base)
{
	NullEffect * self;
	gboolean result;
	self = (NullEffect*) base;
	result = FALSE;
	return result;
}

static void
null_effect_real_paint (SpitTransitionsEffect* base,
                        SpitTransitionsVisuals* visuals,
                        SpitTransitionsMotion* motion,
                        cairo_t* ctx,
                        gint width,
                        gint height,
                        gint frame_number)
{
	NullEffect * self;
	self = (NullEffect*) base;
	g_return_if_fail (visuals != NULL);
	g_return_if_fail (motion != NULL);
	g_return_if_fail (ctx != NULL);
}

static void
null_effect_real_advance (SpitTransitionsEffect* base,
                          SpitTransitionsVisuals* visuals,
                          SpitTransitionsMotion* motion,
                          gint frame_number)
{
	NullEffect * self;
	self = (NullEffect*) base;
	g_return_if_fail (visuals != NULL);
	g_return_if_fail (motion != NULL);
}

static void
null_effect_real_cancel (SpitTransitionsEffect* base)
{
	NullEffect * self;
	self = (NullEffect*) base;
}

static void
null_effect_class_init (NullEffectClass * klass,
                        gpointer klass_data)
{
	null_effect_parent_class = g_type_class_peek_parent (klass);
}

static void
null_effect_spit_transitions_effect_interface_init (SpitTransitionsEffectIface * iface,
                                                    gpointer iface_data)
{
	null_effect_spit_transitions_effect_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_fps = (void (*) (SpitTransitionsEffect*, gint*, gint*)) null_effect_real_get_fps;
	iface->start = (void (*) (SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*)) null_effect_real_start;
	iface->needs_clear_background = (gboolean (*) (SpitTransitionsEffect*)) null_effect_real_needs_clear_background;
	iface->paint = (void (*) (SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, cairo_t*, gint, gint, gint)) null_effect_real_paint;
	iface->advance = (void (*) (SpitTransitionsEffect*, SpitTransitionsVisuals*, SpitTransitionsMotion*, gint)) null_effect_real_advance;
	iface->cancel = (void (*) (SpitTransitionsEffect*)) null_effect_real_cancel;
}

static void
null_effect_instance_init (NullEffect * self,
                           gpointer klass)
{
}

static GType
null_effect_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (NullEffectClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) null_effect_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (NullEffect), 0, (GInstanceInitFunc) null_effect_instance_init, NULL };
	static const GInterfaceInfo spit_transitions_effect_info = { (GInterfaceInitFunc) null_effect_spit_transitions_effect_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType null_effect_type_id;
	null_effect_type_id = g_type_register_static (G_TYPE_OBJECT, "NullEffect", &g_define_type_info, 0);
	g_type_add_interface_static (null_effect_type_id, SPIT_TRANSITIONS_TYPE_EFFECT, &spit_transitions_effect_info);
	return null_effect_type_id;
}

GType
null_effect_get_type (void)
{
	static volatile gsize null_effect_type_id__once = 0;
	if (g_once_init_enter (&null_effect_type_id__once)) {
		GType null_effect_type_id;
		null_effect_type_id = null_effect_get_type_once ();
		g_once_init_leave (&null_effect_type_id__once, null_effect_type_id);
	}
	return null_effect_type_id__once;
}

static gint
random_effect_descriptor_real_get_pluggable_interface (SpitPluggable* base,
                                                       gint min_host_version,
                                                       gint max_host_version)
{
	RandomEffectDescriptor * self;
	gint result;
	self = (RandomEffectDescriptor*) base;
	result = SPIT_TRANSITIONS_CURRENT_INTERFACE;
	return result;
}

static const gchar*
random_effect_descriptor_real_get_id (SpitPluggable* base)
{
	RandomEffectDescriptor * self;
	const gchar* result;
	self = (RandomEffectDescriptor*) base;
	result = RANDOM_EFFECT_DESCRIPTOR_EFFECT_ID;
	return result;
}

static const gchar*
random_effect_descriptor_real_get_pluggable_name (SpitPluggable* base)
{
	RandomEffectDescriptor * self;
	const gchar* result;
	self = (RandomEffectDescriptor*) base;
	result = _ ("Random");
	return result;
}

static void
random_effect_descriptor_real_get_info (SpitPluggable* base,
                                        SpitPluggableInfo* info)
{
	RandomEffectDescriptor * self;
	self = (RandomEffectDescriptor*) base;
	g_return_if_fail (info != NULL);
}

static void
random_effect_descriptor_real_activation (SpitPluggable* base,
                                          gboolean enabled)
{
	RandomEffectDescriptor * self;
	self = (RandomEffectDescriptor*) base;
}

static SpitTransitionsEffect*
random_effect_descriptor_real_create (SpitTransitionsDescriptor* base,
                                      SpitHostInterface* host)
{
	RandomEffectDescriptor * self;
	NullEffect* _tmp0_;
	SpitTransitionsEffect* result;
	self = (RandomEffectDescriptor*) base;
	g_return_val_if_fail (host != NULL, NULL);
	_tmp0_ = null_effect_new ();
	result = (SpitTransitionsEffect*) _tmp0_;
	return result;
}

RandomEffectDescriptor*
random_effect_descriptor_construct (GType object_type)
{
	RandomEffectDescriptor * self = NULL;
	self = (RandomEffectDescriptor*) g_object_new (object_type, NULL);
	return self;
}

RandomEffectDescriptor*
random_effect_descriptor_new (void)
{
	return random_effect_descriptor_construct (TYPE_RANDOM_EFFECT_DESCRIPTOR);
}

static void
random_effect_descriptor_class_init (RandomEffectDescriptorClass * klass,
                                     gpointer klass_data)
{
	random_effect_descriptor_parent_class = g_type_class_peek_parent (klass);
}

static void
random_effect_descriptor_spit_pluggable_interface_init (SpitPluggableIface * iface,
                                                        gpointer iface_data)
{
	random_effect_descriptor_spit_pluggable_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_pluggable_interface = (gint (*) (SpitPluggable*, gint, gint)) random_effect_descriptor_real_get_pluggable_interface;
	iface->get_id = (const gchar* (*) (SpitPluggable*)) random_effect_descriptor_real_get_id;
	iface->get_pluggable_name = (const gchar* (*) (SpitPluggable*)) random_effect_descriptor_real_get_pluggable_name;
	iface->get_info = (void (*) (SpitPluggable*, SpitPluggableInfo*)) random_effect_descriptor_real_get_info;
	iface->activation = (void (*) (SpitPluggable*, gboolean)) random_effect_descriptor_real_activation;
}

static void
random_effect_descriptor_spit_transitions_descriptor_interface_init (SpitTransitionsDescriptorIface * iface,
                                                                     gpointer iface_data)
{
	random_effect_descriptor_spit_transitions_descriptor_parent_iface = g_type_interface_peek_parent (iface);
	iface->create = (SpitTransitionsEffect* (*) (SpitTransitionsDescriptor*, SpitHostInterface*)) random_effect_descriptor_real_create;
}

static void
random_effect_descriptor_instance_init (RandomEffectDescriptor * self,
                                        gpointer klass)
{
}

static GType
random_effect_descriptor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RandomEffectDescriptorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) random_effect_descriptor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RandomEffectDescriptor), 0, (GInstanceInitFunc) random_effect_descriptor_instance_init, NULL };
	static const GInterfaceInfo spit_pluggable_info = { (GInterfaceInitFunc) random_effect_descriptor_spit_pluggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo spit_transitions_descriptor_info = { (GInterfaceInitFunc) random_effect_descriptor_spit_transitions_descriptor_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType random_effect_descriptor_type_id;
	random_effect_descriptor_type_id = g_type_register_static (G_TYPE_OBJECT, "RandomEffectDescriptor", &g_define_type_info, 0);
	g_type_add_interface_static (random_effect_descriptor_type_id, SPIT_TYPE_PLUGGABLE, &spit_pluggable_info);
	g_type_add_interface_static (random_effect_descriptor_type_id, SPIT_TRANSITIONS_TYPE_DESCRIPTOR, &spit_transitions_descriptor_info);
	return random_effect_descriptor_type_id;
}

GType
random_effect_descriptor_get_type (void)
{
	static volatile gsize random_effect_descriptor_type_id__once = 0;
	if (g_once_init_enter (&random_effect_descriptor_type_id__once)) {
		GType random_effect_descriptor_type_id;
		random_effect_descriptor_type_id = random_effect_descriptor_get_type_once ();
		g_once_init_leave (&random_effect_descriptor_type_id__once, random_effect_descriptor_type_id);
	}
	return random_effect_descriptor_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

