/* DragDropAction.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from DragDropAction.vala, do not modify */

/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 * SPDX-FileCopyrightText: 2025 elementary, Inc. (https://elementary.io)
 *                         2013 Tom Beckmann
 */

#include "gala.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <clutter/clutter.h>
#include <float.h>
#include <math.h>
#include <gee.h>
#include <glib-object.h>
#include <meta/util.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  {
	GALA_DRAG_DROP_ACTION_0_PROPERTY,
	GALA_DRAG_DROP_ACTION_DRAG_TYPE_PROPERTY,
	GALA_DRAG_DROP_ACTION_DRAG_ID_PROPERTY,
	GALA_DRAG_DROP_ACTION_HANDLE_PROPERTY,
	GALA_DRAG_DROP_ACTION_DRAGGING_PROPERTY,
	GALA_DRAG_DROP_ACTION_ALLOW_BUBBLING_PROPERTY,
	GALA_DRAG_DROP_ACTION_HOVERED_PROPERTY,
	GALA_DRAG_DROP_ACTION_NUM_PROPERTIES
};
static GParamSpec* gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	GALA_DRAG_DROP_ACTION_DRAG_BEGIN_SIGNAL,
	GALA_DRAG_DROP_ACTION_DRAG_CANCELED_SIGNAL,
	GALA_DRAG_DROP_ACTION_DRAG_END_SIGNAL,
	GALA_DRAG_DROP_ACTION_CROSSED_SIGNAL,
	GALA_DRAG_DROP_ACTION_DESTINATION_CROSSED_SIGNAL,
	GALA_DRAG_DROP_ACTION_DESTINATION_MOTION_SIGNAL,
	GALA_DRAG_DROP_ACTION_ACTOR_CLICKED_SIGNAL,
	GALA_DRAG_DROP_ACTION_NUM_SIGNALS
};
static guint gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_NUM_SIGNALS] = {0};
#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 _GalaDragDropActionPrivate {
	GalaDragDropActionType _drag_type;
	gchar* _drag_id;
	ClutterActor* _handle;
	gboolean _dragging;
	gboolean _allow_bubbling;
	ClutterActor* _hovered;
	gboolean clicked;
	gfloat last_x;
	gfloat last_y;
	ClutterGrab* grab;
	ClutterInputDevice* grabbed_device;
	gulong on_event_id;
};

static gint GalaDragDropAction_private_offset;
static gpointer gala_drag_drop_action_parent_class = NULL;
static GeeHashMap* gala_drag_drop_action_sources;
static GeeHashMap* gala_drag_drop_action_sources = NULL;
static GeeHashMap* gala_drag_drop_action_destinations;
static GeeHashMap* gala_drag_drop_action_destinations = NULL;
static ClutterActor* gala_drag_drop_action_grabbed_actor;
static ClutterActor* gala_drag_drop_action_grabbed_actor = NULL;

static void gala_drag_drop_action_release_actor (GalaDragDropAction* self,
                                          ClutterActor* actor);
static void gala_drag_drop_action_real_set_actor (ClutterActorMeta* base,
                                           ClutterActor* new_actor);
static void gala_drag_drop_action_connect_actor (GalaDragDropAction* self,
                                          ClutterActor* actor);
static void _gala_drag_drop_action_release_actor_clutter_actor_destroy (ClutterActor* _sender,
                                                                 gpointer self);
static void gala_drag_drop_action_emit_crossed (GalaDragDropAction* self,
                                         ClutterActor* destination,
                                         gboolean is_hovered);
static GalaDragDropAction* gala_drag_drop_action_get_drag_drop_action (GalaDragDropAction* self,
                                                                ClutterActor* actor);
static gboolean gala_drag_drop_action_real_handle_event (ClutterAction* base,
                                                  ClutterEvent* event);
static gboolean gala_drag_drop_action_is_valid_touch_event (GalaDragDropAction* self,
                                                     ClutterEvent* event);
static void gala_drag_drop_action_set_handle (GalaDragDropAction* self,
                                       ClutterActor* value);
static void gala_drag_drop_action_set_dragging (GalaDragDropAction* self,
                                         gboolean value);
static void gala_drag_drop_action_grab_actor (GalaDragDropAction* self,
                                       ClutterActor* actor,
                                       ClutterInputDevice* device);
static gboolean gala_drag_drop_action_on_event (GalaDragDropAction* self,
                                         ClutterEvent* event);
static gboolean _gala_drag_drop_action_on_event_clutter_actor_event (ClutterActor* _sender,
                                                              ClutterEvent* event,
                                                              gpointer self);
static void gala_drag_drop_action_ungrab_actor (GalaDragDropAction* self);
static ClutterActor* gala_drag_drop_action_get_hovered (GalaDragDropAction* self);
static void gala_drag_drop_action_finish (GalaDragDropAction* self);
static void gala_drag_drop_action_cleanup (GalaDragDropAction* self);
static void g_cclosure_user_marshal_OBJECT__FLOAT_FLOAT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN (GClosure * closure,
                                                   GValue * return_value,
                                                   guint n_param_values,
                                                   const GValue * param_values,
                                                   gpointer invocation_hint,
                                                   gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__OBJECT_FLOAT_FLOAT (GClosure * closure,
                                                       GValue * return_value,
                                                       guint n_param_values,
                                                       const GValue * param_values,
                                                       gpointer invocation_hint,
                                                       gpointer marshal_data);
static void g_cclosure_user_marshal_VOID__UINT_ENUM (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data);
static void gala_drag_drop_action_finalize (GObject * obj);
static GType gala_drag_drop_action_get_type_once (void);
static void _vala_gala_drag_drop_action_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec);
static void _vala_gala_drag_drop_action_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec);

 G_GNUC_NO_INLINE static GType
gala_drag_drop_action_type_get_type_once (void)
{
	static const GFlagsValue values[] = {{GALA_DRAG_DROP_ACTION_TYPE_SOURCE, "GALA_DRAG_DROP_ACTION_TYPE_SOURCE", "source"}, {GALA_DRAG_DROP_ACTION_TYPE_DESTINATION, "GALA_DRAG_DROP_ACTION_TYPE_DESTINATION", "destination"}, {0, NULL, NULL}};
	GType gala_drag_drop_action_type_type_id;
	gala_drag_drop_action_type_type_id = g_flags_register_static ("GalaDragDropActionType", values);
	return gala_drag_drop_action_type_type_id;
}

GType
gala_drag_drop_action_type_get_type (void)
{
	static gsize gala_drag_drop_action_type_type_id__once = 0;
	if (g_once_init_enter (&gala_drag_drop_action_type_type_id__once)) {
		GType gala_drag_drop_action_type_type_id;
		gala_drag_drop_action_type_type_id = gala_drag_drop_action_type_get_type_once ();
		g_once_init_leave (&gala_drag_drop_action_type_type_id__once, gala_drag_drop_action_type_type_id);
	}
	return gala_drag_drop_action_type_type_id__once;
}

static inline gpointer
gala_drag_drop_action_get_instance_private (GalaDragDropAction* self)
{
	return G_STRUCT_MEMBER_P (self, GalaDragDropAction_private_offset);
}

/**
         * Create a new DragDropAction
         *
         * @param type The type of this actor
         * @param id   An ID that marks which sources can be dragged on
         *             which destinations. It has to be the same for all actors that
         *             should be compatible with each other.
         */
GalaDragDropAction*
gala_drag_drop_action_construct (GType object_type,
                                 GalaDragDropActionType type,
                                 const gchar* id)
{
	GalaDragDropAction * self = NULL;
	g_return_val_if_fail (id != NULL, NULL);
	self = (GalaDragDropAction*) g_object_new (object_type, "drag-type", type, "drag-id", id, NULL);
	return self;
}

GalaDragDropAction*
gala_drag_drop_action_new (GalaDragDropActionType type,
                           const gchar* id)
{
	return gala_drag_drop_action_construct (GALA_TYPE_DRAG_DROP_ACTION, type, id);
}

static void
gala_drag_drop_action_real_set_actor (ClutterActorMeta* base,
                                      ClutterActor* new_actor)
{
	GalaDragDropAction * self;
	ClutterActor* _tmp0_;
	ClutterActor* _tmp1_;
	self = (GalaDragDropAction*) base;
	_tmp0_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		ClutterActor* _tmp2_;
		ClutterActor* _tmp3_;
		_tmp2_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
		_tmp3_ = _tmp2_;
		gala_drag_drop_action_release_actor (self, _tmp3_);
	}
	if (new_actor != NULL) {
		gala_drag_drop_action_connect_actor (self, new_actor);
	}
	CLUTTER_ACTOR_META_CLASS (gala_drag_drop_action_parent_class)->set_actor ((ClutterActorMeta*) G_TYPE_CHECK_INSTANCE_CAST (self, clutter_action_get_type (), ClutterAction), new_actor);
}

static void
_gala_drag_drop_action_release_actor_clutter_actor_destroy (ClutterActor* _sender,
                                                            gpointer self)
{
	gala_drag_drop_action_release_actor ((GalaDragDropAction*) self, _sender);
}

static void
gala_drag_drop_action_release_actor (GalaDragDropAction* self,
                                     ClutterActor* actor)
{
	GalaDragDropActionType _tmp0_;
	GalaDragDropActionType _tmp5_;
	guint _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (actor != NULL);
	_tmp0_ = self->priv->_drag_type;
	if ((_tmp0_ & GALA_DRAG_DROP_ACTION_TYPE_SOURCE) == GALA_DRAG_DROP_ACTION_TYPE_SOURCE) {
		GeeLinkedList* source_list = NULL;
		GeeHashMap* _tmp1_;
		const gchar* _tmp2_;
		gpointer _tmp3_;
		GeeLinkedList* _tmp4_;
		_tmp1_ = gala_drag_drop_action_sources;
		_tmp2_ = self->priv->_drag_id;
		_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _tmp2_);
		source_list = (GeeLinkedList*) _tmp3_;
		_tmp4_ = source_list;
		gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp4_, actor);
		_g_object_unref0 (source_list);
	}
	_tmp5_ = self->priv->_drag_type;
	if ((_tmp5_ & GALA_DRAG_DROP_ACTION_TYPE_DESTINATION) == GALA_DRAG_DROP_ACTION_TYPE_DESTINATION) {
		GeeLinkedList* dest_list = NULL;
		GeeHashMap* _tmp6_;
		const gchar* _tmp7_;
		gpointer _tmp8_;
		GeeLinkedList* _tmp9_;
		_tmp6_ = gala_drag_drop_action_destinations;
		_tmp7_ = self->priv->_drag_id;
		_tmp8_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp6_, _tmp7_);
		dest_list = (GeeLinkedList*) _tmp8_;
		_tmp9_ = dest_list;
		gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp9_, actor);
		_g_object_unref0 (dest_list);
	}
	g_signal_parse_name ("destroy", clutter_actor_get_type (), &_tmp10_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (actor, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _gala_drag_drop_action_release_actor_clutter_actor_destroy, self);
}

static void
gala_drag_drop_action_connect_actor (GalaDragDropAction* self,
                                     ClutterActor* actor)
{
	GalaDragDropActionType _tmp0_;
	GalaDragDropActionType _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (actor != NULL);
	_tmp0_ = self->priv->_drag_type;
	if ((_tmp0_ & GALA_DRAG_DROP_ACTION_TYPE_SOURCE) == GALA_DRAG_DROP_ACTION_TYPE_SOURCE) {
		GeeLinkedList* source_list = NULL;
		GeeHashMap* _tmp1_;
		const gchar* _tmp2_;
		gpointer _tmp3_;
		GeeLinkedList* _tmp4_;
		GeeLinkedList* _tmp9_;
		_tmp1_ = gala_drag_drop_action_sources;
		_tmp2_ = self->priv->_drag_id;
		_tmp3_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp1_, _tmp2_);
		source_list = (GeeLinkedList*) _tmp3_;
		_tmp4_ = source_list;
		if (_tmp4_ == NULL) {
			GeeLinkedList* _tmp5_;
			GeeHashMap* _tmp6_;
			const gchar* _tmp7_;
			GeeLinkedList* _tmp8_;
			_tmp5_ = gee_linked_list_new (clutter_actor_get_type (), NULL, NULL, NULL, NULL, NULL);
			_g_object_unref0 (source_list);
			source_list = _tmp5_;
			_tmp6_ = gala_drag_drop_action_sources;
			_tmp7_ = self->priv->_drag_id;
			_tmp8_ = source_list;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, _tmp7_, _tmp8_);
		}
		_tmp9_ = source_list;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, actor);
		_g_object_unref0 (source_list);
	}
	_tmp10_ = self->priv->_drag_type;
	if ((_tmp10_ & GALA_DRAG_DROP_ACTION_TYPE_DESTINATION) == GALA_DRAG_DROP_ACTION_TYPE_DESTINATION) {
		GeeLinkedList* dest_list = NULL;
		GeeHashMap* _tmp11_;
		const gchar* _tmp12_;
		gpointer _tmp13_;
		GeeLinkedList* _tmp14_;
		GeeLinkedList* _tmp19_;
		_tmp11_ = gala_drag_drop_action_destinations;
		_tmp12_ = self->priv->_drag_id;
		_tmp13_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp11_, _tmp12_);
		dest_list = (GeeLinkedList*) _tmp13_;
		_tmp14_ = dest_list;
		if (_tmp14_ == NULL) {
			GeeLinkedList* _tmp15_;
			GeeHashMap* _tmp16_;
			const gchar* _tmp17_;
			GeeLinkedList* _tmp18_;
			_tmp15_ = gee_linked_list_new (clutter_actor_get_type (), NULL, NULL, NULL, NULL, NULL);
			_g_object_unref0 (dest_list);
			dest_list = _tmp15_;
			_tmp16_ = gala_drag_drop_action_destinations;
			_tmp17_ = self->priv->_drag_id;
			_tmp18_ = dest_list;
			gee_abstract_map_set ((GeeAbstractMap*) _tmp16_, _tmp17_, _tmp18_);
		}
		_tmp19_ = dest_list;
		gee_abstract_collection_add ((GeeAbstractCollection*) _tmp19_, actor);
		_g_object_unref0 (dest_list);
	}
	g_signal_connect_object (actor, "destroy", (GCallback) _gala_drag_drop_action_release_actor_clutter_actor_destroy, self, 0);
}

static void
gala_drag_drop_action_emit_crossed (GalaDragDropAction* self,
                                    ClutterActor* destination,
                                    gboolean is_hovered)
{
	GalaDragDropAction* _tmp0_;
	GalaDragDropAction* _tmp1_;
	ClutterActor* _tmp2_;
	ClutterActor* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (destination != NULL);
	_tmp0_ = gala_drag_drop_action_get_drag_drop_action (self, destination);
	_tmp1_ = _tmp0_;
	_tmp2_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
	_tmp3_ = _tmp2_;
	g_signal_emit (_tmp1_, gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_CROSSED_SIGNAL], 0, _tmp3_, is_hovered);
	_g_object_unref0 (_tmp1_);
	g_signal_emit (self, gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DESTINATION_CROSSED_SIGNAL], 0, destination, is_hovered);
}

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

static gboolean
gala_drag_drop_action_real_handle_event (ClutterAction* base,
                                         ClutterEvent* event)
{
	GalaDragDropAction * self;
	GalaDragDropActionType _tmp0_;
	gboolean result;
	self = (GalaDragDropAction*) base;
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->_drag_type;
	if (!((_tmp0_ & GALA_DRAG_DROP_ACTION_TYPE_SOURCE) == GALA_DRAG_DROP_ACTION_TYPE_SOURCE)) {
		result = CLUTTER_EVENT_PROPAGATE;
		return result;
	}
	switch (clutter_event_type (event)) {
		case CLUTTER_BUTTON_PRESS:
		case CLUTTER_TOUCH_BEGIN:
		{
			ClutterActor* _tmp1_;
			gfloat x = 0.0F;
			gfloat y = 0.0F;
			gfloat _tmp2_ = 0.0F;
			gfloat _tmp3_ = 0.0F;
			if (!gala_drag_drop_action_is_valid_touch_event (self, event)) {
				result = CLUTTER_EVENT_PROPAGATE;
				return result;
			}
			_tmp1_ = gala_drag_drop_action_grabbed_actor;
			if (_tmp1_ != NULL) {
				result = CLUTTER_EVENT_PROPAGATE;
				return result;
			}
			self->priv->clicked = TRUE;
			clutter_event_get_coords (event, &_tmp2_, &_tmp3_);
			x = _tmp2_;
			y = _tmp3_;
			self->priv->last_x = x;
			self->priv->last_y = y;
			result = CLUTTER_EVENT_PROPAGATE;
			return result;
		}
		case CLUTTER_MOTION:
		case CLUTTER_TOUCH_UPDATE:
		{
			gfloat x = 0.0F;
			gfloat y = 0.0F;
			gfloat _tmp4_ = 0.0F;
			gfloat _tmp5_ = 0.0F;
			gint drag_threshold = 0;
			ClutterSettings* _tmp6_;
			gint _tmp7_;
			gint _tmp8_;
			gboolean _tmp9_ = FALSE;
			ClutterActor* _tmp10_ = NULL;
			ClutterActor* _tmp11_;
			ClutterActor* _tmp12_;
			ClutterActor* _tmp13_;
			ClutterInputDevice* _tmp14_;
			GeeLinkedList* source_list = NULL;
			GeeHashMap* _tmp15_;
			const gchar* _tmp16_;
			gpointer _tmp17_;
			GeeLinkedList* _tmp18_;
			if (!gala_drag_drop_action_is_valid_touch_event (self, event)) {
				result = CLUTTER_EVENT_PROPAGATE;
				return result;
			}
			if (!self->priv->clicked) {
				result = CLUTTER_EVENT_PROPAGATE;
				return result;
			}
			clutter_event_get_coords (event, &_tmp4_, &_tmp5_);
			x = _tmp4_;
			y = _tmp5_;
			_tmp6_ = clutter_settings_get_default ();
			g_object_get (_tmp6_, "dnd-drag-threshold", &_tmp7_, NULL);
			_tmp8_ = _tmp7_;
			drag_threshold = _tmp8_;
			if (fabsf (self->priv->last_x - x) < ((gfloat) drag_threshold)) {
				_tmp9_ = fabsf (self->priv->last_y - y) < ((gfloat) drag_threshold);
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				result = CLUTTER_EVENT_PROPAGATE;
				return result;
			}
			g_signal_emit (self, gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DRAG_BEGIN_SIGNAL], 0, self->priv->last_x, self->priv->last_y, &_tmp10_);
			_tmp11_ = _tmp10_;
			gala_drag_drop_action_set_handle (self, _tmp11_);
			_g_object_unref0 (_tmp11_);
			_tmp12_ = self->priv->_handle;
			if (_tmp12_ == NULL) {
				g_critical ("DragDropAction.vala:242: No handle has been returned by the started si" \
"gnal, aborting drag.");
				result = CLUTTER_EVENT_PROPAGATE;
				return result;
			}
			self->priv->clicked = FALSE;
			gala_drag_drop_action_set_dragging (self, TRUE);
			_tmp13_ = self->priv->_handle;
			_tmp14_ = clutter_event_get_source_device (event);
			gala_drag_drop_action_grab_actor (self, _tmp13_, _tmp14_);
			_tmp15_ = gala_drag_drop_action_sources;
			_tmp16_ = self->priv->_drag_id;
			_tmp17_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp15_, _tmp16_);
			source_list = (GeeLinkedList*) _tmp17_;
			_tmp18_ = source_list;
			if (_tmp18_ != NULL) {
				GeeLinkedList* dest_list = NULL;
				GeeHashMap* _tmp19_;
				const gchar* _tmp20_;
				gpointer _tmp21_;
				_tmp19_ = gala_drag_drop_action_destinations;
				_tmp20_ = self->priv->_drag_id;
				_tmp21_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp19_, _tmp20_);
				dest_list = (GeeLinkedList*) _tmp21_;
				{
					GeeLinkedList* _actor_list = NULL;
					GeeLinkedList* _tmp22_;
					gint _actor_size = 0;
					GeeLinkedList* _tmp23_;
					gint _tmp24_;
					gint _tmp25_;
					gint _actor_index = 0;
					_tmp22_ = source_list;
					_actor_list = _tmp22_;
					_tmp23_ = _actor_list;
					_tmp24_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp23_);
					_tmp25_ = _tmp24_;
					_actor_size = _tmp25_;
					_actor_index = -1;
					while (TRUE) {
						gint _tmp26_;
						gint _tmp27_;
						ClutterActor* actor = NULL;
						GeeLinkedList* _tmp28_;
						gpointer _tmp29_;
						ClutterActor* _tmp30_;
						gboolean _tmp31_ = FALSE;
						GeeLinkedList* _tmp32_;
						ClutterActor* _tmp35_;
						_actor_index = _actor_index + 1;
						_tmp26_ = _actor_index;
						_tmp27_ = _actor_size;
						if (!(_tmp26_ < _tmp27_)) {
							break;
						}
						_tmp28_ = _actor_list;
						_tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _tmp28_, _actor_index);
						_tmp30_ = _g_object_ref0 ((ClutterActor*) _tmp29_);
						actor = _tmp30_;
						_tmp32_ = dest_list;
						if (_tmp32_ == NULL) {
							_tmp31_ = TRUE;
						} else {
							GeeLinkedList* _tmp33_;
							ClutterActor* _tmp34_;
							_tmp33_ = dest_list;
							_tmp34_ = actor;
							_tmp31_ = gee_abstract_collection_contains ((GeeAbstractCollection*) _tmp33_, _tmp34_);
						}
						if (_tmp31_) {
							_g_object_unref0 (actor);
							continue;
						}
						_tmp35_ = actor;
						clutter_actor_set_reactive (_tmp35_, FALSE);
						_g_object_unref0 (actor);
					}
				}
				_g_object_unref0 (dest_list);
			}
			result = CLUTTER_EVENT_STOP;
			_g_object_unref0 (source_list);
			return result;
		}
		case CLUTTER_BUTTON_RELEASE:
		case CLUTTER_TOUCH_END:
		{
			gfloat x = 0.0F;
			gfloat y = 0.0F;
			gfloat ex = 0.0F;
			gfloat ey = 0.0F;
			gfloat _tmp36_ = 0.0F;
			gfloat _tmp37_ = 0.0F;
			ClutterActor* _tmp38_;
			ClutterActor* _tmp39_;
			gfloat _tmp40_ = 0.0F;
			gfloat _tmp41_ = 0.0F;
			gboolean _tmp42_ = FALSE;
			gboolean _tmp43_ = FALSE;
			gboolean _tmp44_ = FALSE;
			gboolean _tmp45_ = FALSE;
			clutter_event_get_coords (event, &_tmp36_, &_tmp37_);
			ex = _tmp36_;
			ey = _tmp37_;
			_tmp38_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
			_tmp39_ = _tmp38_;
			clutter_actor_get_transformed_position (_tmp39_, &_tmp40_, &_tmp41_);
			x = _tmp40_;
			y = _tmp41_;
			if (self->priv->clicked) {
				_tmp45_ = x < ex;
			} else {
				_tmp45_ = FALSE;
			}
			if (_tmp45_) {
				ClutterActor* _tmp46_;
				ClutterActor* _tmp47_;
				gfloat _tmp48_;
				gfloat _tmp49_;
				_tmp46_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
				_tmp47_ = _tmp46_;
				_tmp48_ = clutter_actor_get_width (_tmp47_);
				_tmp49_ = _tmp48_;
				_tmp44_ = (x + _tmp49_) > ex;
			} else {
				_tmp44_ = FALSE;
			}
			if (_tmp44_) {
				_tmp43_ = y < ey;
			} else {
				_tmp43_ = FALSE;
			}
			if (_tmp43_) {
				ClutterActor* _tmp50_;
				ClutterActor* _tmp51_;
				gfloat _tmp52_;
				gfloat _tmp53_;
				_tmp50_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
				_tmp51_ = _tmp50_;
				_tmp52_ = clutter_actor_get_height (_tmp51_);
				_tmp53_ = _tmp52_;
				_tmp42_ = (y + _tmp53_) > ey;
			} else {
				_tmp42_ = FALSE;
			}
			if (_tmp42_) {
				guint32 _tmp54_ = 0U;
				ClutterInputDevice* _tmp55_;
				if (clutter_event_type (event) == CLUTTER_BUTTON_RELEASE) {
					_tmp54_ = clutter_event_get_button (event);
				} else {
					_tmp54_ = CLUTTER_BUTTON_PRIMARY;
				}
				_tmp55_ = clutter_event_get_source_device (event);
				g_signal_emit (self, gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_ACTOR_CLICKED_SIGNAL], 0, _tmp54_, clutter_input_device_get_device_type (_tmp55_));
			}
			self->priv->clicked = FALSE;
			result = CLUTTER_EVENT_PROPAGATE;
			return result;
		}
		default:
		{
			break;
		}
	}
	result = CLUTTER_ACTION_CLASS (gala_drag_drop_action_parent_class)->handle_event (G_TYPE_CHECK_INSTANCE_CAST (self, clutter_action_get_type (), ClutterAction), (const ClutterEvent *) event);
	return result;
}

static gboolean
_gala_drag_drop_action_on_event_clutter_actor_event (ClutterActor* _sender,
                                                     ClutterEvent* event,
                                                     gpointer self)
{
	gboolean result;
	result = gala_drag_drop_action_on_event ((GalaDragDropAction*) self, event);
	return result;
}

static void
gala_drag_drop_action_grab_actor (GalaDragDropAction* self,
                                  ClutterActor* actor,
                                  ClutterInputDevice* device)
{
	ClutterActor* _tmp0_;
	ClutterStage* _tmp1_;
	ClutterGrab* _tmp2_;
	ClutterInputDevice* _tmp3_;
	gulong _tmp4_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (actor != NULL);
	g_return_if_fail (device != NULL);
	_tmp0_ = gala_drag_drop_action_grabbed_actor;
	if (_tmp0_ != NULL) {
		g_critical ("DragDropAction.vala:293: Tried to grab an actor with a grab already in" \
" progress");
	}
	_tmp1_ = (ClutterStage*) clutter_actor_get_stage (actor);
	_tmp2_ = clutter_stage_grab (_tmp1_, actor);
	_g_object_unref0 (self->priv->grab);
	self->priv->grab = _tmp2_;
	gala_drag_drop_action_grabbed_actor = actor;
	_tmp3_ = _g_object_ref0 (device);
	_g_object_unref0 (self->priv->grabbed_device);
	self->priv->grabbed_device = _tmp3_;
	_tmp4_ = g_signal_connect_object (actor, "event", (GCallback) _gala_drag_drop_action_on_event_clutter_actor_event, self, 0);
	self->priv->on_event_id = _tmp4_;
}

static void
gala_drag_drop_action_ungrab_actor (GalaDragDropAction* self)
{
	gboolean _tmp0_ = FALSE;
	ClutterGrab* _tmp2_;
	ClutterActor* _tmp4_;
	g_return_if_fail (self != NULL);
	if (self->priv->on_event_id == ((gulong) 0)) {
		_tmp0_ = TRUE;
	} else {
		ClutterActor* _tmp1_;
		_tmp1_ = gala_drag_drop_action_grabbed_actor;
		_tmp0_ = _tmp1_ == NULL;
	}
	if (_tmp0_) {
		return;
	}
	_tmp2_ = self->priv->grab;
	if (_tmp2_ != NULL) {
		ClutterGrab* _tmp3_;
		_tmp3_ = self->priv->grab;
		clutter_grab_dismiss (_tmp3_);
		_g_object_unref0 (self->priv->grab);
		self->priv->grab = NULL;
	}
	_g_object_unref0 (self->priv->grabbed_device);
	self->priv->grabbed_device = NULL;
	_tmp4_ = gala_drag_drop_action_grabbed_actor;
	g_signal_handler_disconnect ((GObject*) _tmp4_, self->priv->on_event_id);
	self->priv->on_event_id = (gulong) 0;
	gala_drag_drop_action_grabbed_actor = NULL;
}

static gboolean
gala_drag_drop_action_on_event (GalaDragDropAction* self,
                                ClutterEvent* event)
{
	gboolean _tmp0_;
	ClutterInputDevice* device = NULL;
	ClutterInputDevice* _tmp1_;
	ClutterInputDevice* _tmp2_;
	gboolean _tmp3_ = FALSE;
	gboolean _tmp4_ = FALSE;
	ClutterInputDevice* _tmp5_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	_tmp0_ = self->priv->_dragging;
	_vala_return_val_if_fail (_tmp0_, "dragging", FALSE);
	_tmp1_ = clutter_event_get_source_device (event);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	device = _tmp2_;
	_tmp5_ = self->priv->grabbed_device;
	if (_tmp5_ != NULL) {
		ClutterInputDevice* _tmp6_;
		ClutterInputDevice* _tmp7_;
		_tmp6_ = device;
		_tmp7_ = self->priv->grabbed_device;
		_tmp4_ = _tmp6_ != _tmp7_;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		ClutterInputDevice* _tmp8_;
		_tmp8_ = device;
		_tmp3_ = clutter_input_device_get_device_type (_tmp8_) != CLUTTER_KEYBOARD_DEVICE;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		result = CLUTTER_EVENT_PROPAGATE;
		_g_object_unref0 (device);
		return result;
	}
	switch (clutter_event_type (event)) {
		case CLUTTER_KEY_PRESS:
		{
			if (clutter_event_get_key_symbol (event) == CLUTTER_KEY_Escape) {
				gala_drag_drop_action_cancel (self);
			}
			result = CLUTTER_EVENT_STOP;
			_g_object_unref0 (device);
			return result;
		}
		case CLUTTER_BUTTON_RELEASE:
		case CLUTTER_TOUCH_END:
		{
			ClutterActor* _tmp9_;
			if (!gala_drag_drop_action_is_valid_touch_event (self, event)) {
				result = CLUTTER_EVENT_PROPAGATE;
				_g_object_unref0 (device);
				return result;
			}
			_tmp9_ = self->priv->_hovered;
			if (_tmp9_ != NULL) {
				gala_drag_drop_action_finish (self);
				gala_drag_drop_action_set_hovered (self, NULL);
			} else {
				gala_drag_drop_action_cancel (self);
			}
			result = CLUTTER_EVENT_STOP;
			_g_object_unref0 (device);
			return result;
		}
		case CLUTTER_MOTION:
		case CLUTTER_TOUCH_UPDATE:
		{
			gfloat x = 0.0F;
			gfloat y = 0.0F;
			gfloat _tmp10_ = 0.0F;
			gfloat _tmp11_ = 0.0F;
			ClutterActor* _tmp12_;
			ClutterActor* _tmp13_;
			gfloat _tmp14_;
			gfloat _tmp15_;
			ClutterActor* _tmp16_;
			ClutterActor* _tmp17_;
			gfloat _tmp18_;
			gfloat _tmp19_;
			ClutterStage* stage = NULL;
			ClutterActor* _tmp20_;
			ClutterActor* _tmp21_;
			ClutterStage* _tmp22_;
			ClutterStage* _tmp23_;
			ClutterActor* actor = NULL;
			ClutterStage* _tmp24_;
			ClutterActor* _tmp25_;
			ClutterActor* _tmp26_;
			GalaDragDropAction* action = NULL;
			gboolean _tmp27_ = FALSE;
			gboolean _tmp28_ = FALSE;
			ClutterActor* _tmp29_;
			ClutterActor* _tmp42_;
			ClutterActor* _tmp43_;
			GalaDragDropAction* _tmp52_;
			ClutterActor* _tmp55_;
			ClutterActor* _tmp57_;
			ClutterActor* _tmp58_;
			if (!gala_drag_drop_action_is_valid_touch_event (self, event)) {
				result = CLUTTER_EVENT_PROPAGATE;
				_g_object_unref0 (device);
				return result;
			}
			clutter_event_get_coords (event, &_tmp10_, &_tmp11_);
			x = _tmp10_;
			y = _tmp11_;
			_tmp12_ = self->priv->_handle;
			_tmp13_ = self->priv->_handle;
			_tmp14_ = clutter_actor_get_x (_tmp13_);
			_tmp15_ = _tmp14_;
			clutter_actor_set_x (_tmp13_, _tmp15_ - (self->priv->last_x - x));
			_tmp16_ = self->priv->_handle;
			_tmp17_ = self->priv->_handle;
			_tmp18_ = clutter_actor_get_y (_tmp17_);
			_tmp19_ = _tmp18_;
			clutter_actor_set_y (_tmp17_, _tmp19_ - (self->priv->last_y - y));
			self->priv->last_x = x;
			self->priv->last_y = y;
			_tmp20_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
			_tmp21_ = _tmp20_;
			_tmp22_ = (ClutterStage*) clutter_actor_get_stage (_tmp21_);
			_tmp23_ = _g_object_ref0 (_tmp22_);
			stage = _tmp23_;
			_tmp24_ = stage;
			_tmp25_ = clutter_stage_get_actor_at_pos (_tmp24_, CLUTTER_PICK_NONE, (gfloat) ((gint) x), (gfloat) ((gint) y));
			_tmp26_ = _g_object_ref0 (_tmp25_);
			actor = _tmp26_;
			action = NULL;
			_tmp29_ = actor;
			if (_tmp29_ != NULL) {
				ClutterActor* _tmp30_;
				GalaDragDropAction* _tmp31_;
				GalaDragDropAction* _tmp32_;
				_tmp30_ = actor;
				_tmp31_ = gala_drag_drop_action_get_drag_drop_action (self, _tmp30_);
				_g_object_unref0 (action);
				action = _tmp31_;
				_tmp32_ = action;
				_tmp28_ = _tmp32_ == NULL;
			} else {
				_tmp28_ = FALSE;
			}
			if (_tmp28_) {
				gboolean _tmp33_;
				_tmp33_ = self->priv->_allow_bubbling;
				_tmp27_ = _tmp33_;
			} else {
				_tmp27_ = FALSE;
			}
			if (_tmp27_) {
				while (TRUE) {
					ClutterActor* _tmp34_;
					ClutterActor* _tmp35_;
					ClutterActor* _tmp36_;
					ClutterActor* _tmp37_;
					ClutterStage* _tmp38_;
					ClutterActor* _tmp39_;
					GalaDragDropAction* _tmp40_;
					GalaDragDropAction* _tmp41_;
					_tmp34_ = actor;
					_tmp35_ = clutter_actor_get_parent (_tmp34_);
					_tmp36_ = _g_object_ref0 (_tmp35_);
					_g_object_unref0 (actor);
					actor = _tmp36_;
					_tmp37_ = actor;
					_tmp38_ = stage;
					if (!(_tmp37_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, clutter_actor_get_type (), ClutterActor))) {
						break;
					}
					_tmp39_ = actor;
					_tmp40_ = gala_drag_drop_action_get_drag_drop_action (self, _tmp39_);
					_g_object_unref0 (action);
					action = _tmp40_;
					_tmp41_ = action;
					if (_tmp41_ != NULL) {
						break;
					}
				}
			}
			_tmp42_ = actor;
			_tmp43_ = self->priv->_hovered;
			if (_tmp42_ == _tmp43_) {
				ClutterActor* _tmp44_;
				_tmp44_ = self->priv->_hovered;
				if (_tmp44_ != NULL) {
					ClutterActor* _tmp45_;
					ClutterActor* _tmp46_;
					gfloat _tmp47_;
					gfloat _tmp48_;
					ClutterActor* _tmp49_;
					gfloat _tmp50_;
					gfloat _tmp51_;
					_tmp45_ = self->priv->_hovered;
					_tmp46_ = self->priv->_hovered;
					_tmp47_ = clutter_actor_get_x (_tmp46_);
					_tmp48_ = _tmp47_;
					_tmp49_ = self->priv->_hovered;
					_tmp50_ = clutter_actor_get_y (_tmp49_);
					_tmp51_ = _tmp50_;
					g_signal_emit (self, gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DESTINATION_MOTION_SIGNAL], 0, _tmp45_, x - _tmp48_, y - _tmp51_);
				}
				result = CLUTTER_EVENT_STOP;
				_g_object_unref0 (action);
				_g_object_unref0 (actor);
				_g_object_unref0 (stage);
				_g_object_unref0 (device);
				return result;
			}
			_tmp52_ = action;
			if (_tmp52_ == NULL) {
				ClutterActor* _tmp53_;
				_tmp53_ = self->priv->_hovered;
				if (_tmp53_ != NULL) {
					ClutterActor* _tmp54_;
					_tmp54_ = self->priv->_hovered;
					gala_drag_drop_action_emit_crossed (self, _tmp54_, FALSE);
					gala_drag_drop_action_set_hovered (self, NULL);
				}
				result = CLUTTER_EVENT_STOP;
				_g_object_unref0 (action);
				_g_object_unref0 (actor);
				_g_object_unref0 (stage);
				_g_object_unref0 (device);
				return result;
			}
			_tmp55_ = self->priv->_hovered;
			if (_tmp55_ != NULL) {
				ClutterActor* _tmp56_;
				_tmp56_ = self->priv->_hovered;
				gala_drag_drop_action_emit_crossed (self, _tmp56_, FALSE);
			}
			_tmp57_ = actor;
			gala_drag_drop_action_set_hovered (self, _tmp57_);
			_tmp58_ = self->priv->_hovered;
			gala_drag_drop_action_emit_crossed (self, _tmp58_, TRUE);
			result = CLUTTER_EVENT_STOP;
			_g_object_unref0 (action);
			_g_object_unref0 (actor);
			_g_object_unref0 (stage);
			_g_object_unref0 (device);
			return result;
		}
		default:
		{
			break;
		}
	}
	result = CLUTTER_EVENT_PROPAGATE;
	_g_object_unref0 (device);
	return result;
}

/**
         * Looks for a DragDropAction instance if this actor has one or NULL.
         * It also checks if it is a DESTINATION and if the id matches
         *
         * @return the DragDropAction instance on this actor or NULL
         */
static GalaDragDropAction*
gala_drag_drop_action_get_drag_drop_action (GalaDragDropAction* self,
                                            ClutterActor* actor)
{
	GalaDragDropAction* drop_action = NULL;
	GList* _tmp0_;
	GalaDragDropAction* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (actor != NULL, NULL);
	drop_action = NULL;
	_tmp0_ = clutter_actor_get_actions (actor);
	{
		GList* action_collection = NULL;
		GList* action_it = NULL;
		action_collection = _tmp0_;
		for (action_it = action_collection; action_it != NULL; action_it = action_it->next) {
			ClutterAction* action = NULL;
			action = (ClutterAction*) action_it->data;
			{
				ClutterAction* _tmp1_;
				GalaDragDropAction* _tmp2_;
				gboolean _tmp3_ = FALSE;
				gboolean _tmp4_ = FALSE;
				GalaDragDropAction* _tmp5_;
				_tmp1_ = action;
				_tmp2_ = _g_object_ref0 (GALA_IS_DRAG_DROP_ACTION (_tmp1_) ? ((GalaDragDropAction*) _tmp1_) : NULL);
				_g_object_unref0 (drop_action);
				drop_action = _tmp2_;
				_tmp5_ = drop_action;
				if (_tmp5_ == NULL) {
					_tmp4_ = TRUE;
				} else {
					GalaDragDropAction* _tmp6_;
					GalaDragDropActionType _tmp7_;
					_tmp6_ = drop_action;
					_tmp7_ = _tmp6_->priv->_drag_type;
					_tmp4_ = !((_tmp7_ & GALA_DRAG_DROP_ACTION_TYPE_DESTINATION) == GALA_DRAG_DROP_ACTION_TYPE_DESTINATION);
				}
				if (_tmp4_) {
					_tmp3_ = TRUE;
				} else {
					GalaDragDropAction* _tmp8_;
					const gchar* _tmp9_;
					const gchar* _tmp10_;
					_tmp8_ = drop_action;
					_tmp9_ = _tmp8_->priv->_drag_id;
					_tmp10_ = self->priv->_drag_id;
					_tmp3_ = g_strcmp0 (_tmp9_, _tmp10_) != 0;
				}
				if (_tmp3_) {
					continue;
				}
				result = drop_action;
				(action_collection == NULL) ? NULL : (action_collection = (g_list_free (action_collection), NULL));
				return result;
			}
		}
		(action_collection == NULL) ? NULL : (action_collection = (g_list_free (action_collection), NULL));
	}
	result = NULL;
	_g_object_unref0 (drop_action);
	return result;
}

/**
         * Abort the drag
         */
void
gala_drag_drop_action_cancel (GalaDragDropAction* self)
{
	g_return_if_fail (self != NULL);
	gala_drag_drop_action_cleanup (self);
	g_signal_emit (self, gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DRAG_CANCELED_SIGNAL], 0);
}

/**
         * Allows you to abort all drags currently running for a given drag-id
         */
void
gala_drag_drop_action_cancel_all_by_id (const gchar* id)
{
	GeeLinkedList* actors = NULL;
	GeeHashMap* _tmp0_;
	gpointer _tmp1_;
	GeeLinkedList* _tmp2_;
	g_return_if_fail (id != NULL);
	_tmp0_ = gala_drag_drop_action_sources;
	_tmp1_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, id);
	actors = (GeeLinkedList*) _tmp1_;
	_tmp2_ = actors;
	if (_tmp2_ == NULL) {
		_g_object_unref0 (actors);
		return;
	}
	{
		GeeLinkedList* _actor_list = NULL;
		GeeLinkedList* _tmp3_;
		gint _actor_size = 0;
		GeeLinkedList* _tmp4_;
		gint _tmp5_;
		gint _tmp6_;
		gint _actor_index = 0;
		_tmp3_ = actors;
		_actor_list = _tmp3_;
		_tmp4_ = _actor_list;
		_tmp5_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp4_);
		_tmp6_ = _tmp5_;
		_actor_size = _tmp6_;
		_actor_index = -1;
		while (TRUE) {
			gint _tmp7_;
			gint _tmp8_;
			ClutterActor* actor = NULL;
			GeeLinkedList* _tmp9_;
			gpointer _tmp10_;
			ClutterActor* _tmp11_;
			ClutterActor* _tmp12_;
			GList* _tmp13_;
			_actor_index = _actor_index + 1;
			_tmp7_ = _actor_index;
			_tmp8_ = _actor_size;
			if (!(_tmp7_ < _tmp8_)) {
				break;
			}
			_tmp9_ = _actor_list;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp9_, _actor_index);
			_tmp11_ = _g_object_ref0 ((ClutterActor*) _tmp10_);
			actor = _tmp11_;
			_tmp12_ = actor;
			_tmp13_ = clutter_actor_get_actions (_tmp12_);
			{
				GList* action_collection = NULL;
				GList* action_it = NULL;
				action_collection = _tmp13_;
				for (action_it = action_collection; action_it != NULL; action_it = action_it->next) {
					ClutterAction* action = NULL;
					action = (ClutterAction*) action_it->data;
					{
						GalaDragDropAction* drag_action = NULL;
						ClutterAction* _tmp14_;
						GalaDragDropAction* _tmp15_;
						gboolean _tmp16_ = FALSE;
						GalaDragDropAction* _tmp17_;
						_tmp14_ = action;
						_tmp15_ = _g_object_ref0 (GALA_IS_DRAG_DROP_ACTION (_tmp14_) ? ((GalaDragDropAction*) _tmp14_) : NULL);
						drag_action = _tmp15_;
						_tmp17_ = drag_action;
						if (_tmp17_ != NULL) {
							GalaDragDropAction* _tmp18_;
							gboolean _tmp19_;
							_tmp18_ = drag_action;
							_tmp19_ = _tmp18_->priv->_dragging;
							_tmp16_ = _tmp19_;
						} else {
							_tmp16_ = FALSE;
						}
						if (_tmp16_) {
							GalaDragDropAction* _tmp20_;
							_tmp20_ = drag_action;
							gala_drag_drop_action_cancel (_tmp20_);
							_g_object_unref0 (drag_action);
							break;
						}
						_g_object_unref0 (drag_action);
					}
				}
				(action_collection == NULL) ? NULL : (action_collection = (g_list_free (action_collection), NULL));
			}
			_g_object_unref0 (actor);
		}
	}
	_g_object_unref0 (actors);
}

static void
gala_drag_drop_action_finish (GalaDragDropAction* self)
{
	ClutterActor* _tmp0_;
	ClutterActor* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_hovered;
	g_signal_emit (self, gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DRAG_END_SIGNAL], 0, _tmp0_);
	_tmp1_ = self->priv->_hovered;
	gala_drag_drop_action_emit_crossed (self, _tmp1_, FALSE);
	gala_drag_drop_action_cleanup (self);
}

static void
gala_drag_drop_action_cleanup (GalaDragDropAction* self)
{
	GeeLinkedList* source_list = NULL;
	GeeHashMap* _tmp0_;
	const gchar* _tmp1_;
	gpointer _tmp2_;
	GeeLinkedList* _tmp3_;
	gboolean _tmp14_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gala_drag_drop_action_sources;
	_tmp1_ = self->priv->_drag_id;
	_tmp2_ = gee_abstract_map_get ((GeeAbstractMap*) _tmp0_, _tmp1_);
	source_list = (GeeLinkedList*) _tmp2_;
	_tmp3_ = source_list;
	if (_tmp3_ != NULL) {
		{
			GeeLinkedList* _actor_list = NULL;
			GeeLinkedList* _tmp4_;
			gint _actor_size = 0;
			GeeLinkedList* _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			gint _actor_index = 0;
			_tmp4_ = source_list;
			_actor_list = _tmp4_;
			_tmp5_ = _actor_list;
			_tmp6_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp5_);
			_tmp7_ = _tmp6_;
			_actor_size = _tmp7_;
			_actor_index = -1;
			while (TRUE) {
				gint _tmp8_;
				gint _tmp9_;
				ClutterActor* actor = NULL;
				GeeLinkedList* _tmp10_;
				gpointer _tmp11_;
				ClutterActor* _tmp12_;
				ClutterActor* _tmp13_;
				_actor_index = _actor_index + 1;
				_tmp8_ = _actor_index;
				_tmp9_ = _actor_size;
				if (!(_tmp8_ < _tmp9_)) {
					break;
				}
				_tmp10_ = _actor_list;
				_tmp11_ = gee_abstract_list_get ((GeeAbstractList*) _tmp10_, _actor_index);
				_tmp12_ = _g_object_ref0 ((ClutterActor*) _tmp11_);
				actor = _tmp12_;
				_tmp13_ = actor;
				clutter_actor_set_reactive (_tmp13_, TRUE);
				_g_object_unref0 (actor);
			}
		}
	}
	_tmp14_ = self->priv->_dragging;
	if (_tmp14_) {
		gala_drag_drop_action_ungrab_actor (self);
	}
	gala_drag_drop_action_set_dragging (self, FALSE);
	gala_drag_drop_action_set_handle (self, NULL);
	_g_object_unref0 (source_list);
}

static gboolean
gala_drag_drop_action_is_valid_touch_event (GalaDragDropAction* self,
                                            ClutterEvent* event)
{
	ClutterEventType type = 0;
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	type = clutter_event_type (event);
	if (meta_is_wayland_compositor ()) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp1_ = FALSE;
		gboolean _tmp2_ = FALSE;
		gboolean _tmp3_ = FALSE;
		if (type != CLUTTER_TOUCH_BEGIN) {
			_tmp3_ = type != CLUTTER_TOUCH_CANCEL;
		} else {
			_tmp3_ = FALSE;
		}
		if (_tmp3_) {
			_tmp2_ = type != CLUTTER_TOUCH_END;
		} else {
			_tmp2_ = FALSE;
		}
		if (_tmp2_) {
			_tmp1_ = type != CLUTTER_TOUCH_UPDATE;
		} else {
			_tmp1_ = FALSE;
		}
		_tmp0_ = _tmp1_;
	}
	result = _tmp0_;
	return result;
}

GalaDragDropActionType
gala_drag_drop_action_get_drag_type (GalaDragDropAction* self)
{
	GalaDragDropActionType result;
	g_return_val_if_fail (self != NULL, 0U);
	result = self->priv->_drag_type;
	return result;
}

static void
gala_drag_drop_action_set_drag_type (GalaDragDropAction* self,
                                     GalaDragDropActionType value)
{
	GalaDragDropActionType old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_drag_drop_action_get_drag_type (self);
	if (old_value != value) {
		self->priv->_drag_type = value;
		g_object_notify_by_pspec ((GObject *) self, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_DRAG_TYPE_PROPERTY]);
	}
}

const gchar*
gala_drag_drop_action_get_drag_id (GalaDragDropAction* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_drag_id;
	result = _tmp0_;
	return result;
}

static void
gala_drag_drop_action_set_drag_id (GalaDragDropAction* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_drag_drop_action_get_drag_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_drag_id);
		self->priv->_drag_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_DRAG_ID_PROPERTY]);
	}
}

ClutterActor*
gala_drag_drop_action_get_handle (GalaDragDropAction* self)
{
	ClutterActor* result;
	ClutterActor* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_handle;
	result = _tmp0_;
	return result;
}

static void
gala_drag_drop_action_set_handle (GalaDragDropAction* self,
                                  ClutterActor* value)
{
	ClutterActor* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_drag_drop_action_get_handle (self);
	if (old_value != value) {
		ClutterActor* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_handle);
		self->priv->_handle = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_HANDLE_PROPERTY]);
	}
}

gboolean
gala_drag_drop_action_get_dragging (GalaDragDropAction* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_dragging;
	return result;
}

static void
gala_drag_drop_action_set_dragging (GalaDragDropAction* self,
                                    gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_drag_drop_action_get_dragging (self);
	if (old_value != value) {
		self->priv->_dragging = value;
		g_object_notify_by_pspec ((GObject *) self, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_DRAGGING_PROPERTY]);
	}
}

gboolean
gala_drag_drop_action_get_allow_bubbling (GalaDragDropAction* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_allow_bubbling;
	return result;
}

void
gala_drag_drop_action_set_allow_bubbling (GalaDragDropAction* self,
                                          gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_drag_drop_action_get_allow_bubbling (self);
	if (old_value != value) {
		self->priv->_allow_bubbling = value;
		g_object_notify_by_pspec ((GObject *) self, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_ALLOW_BUBBLING_PROPERTY]);
	}
}

static ClutterActor*
gala_drag_drop_action_get_hovered (GalaDragDropAction* self)
{
	ClutterActor* result;
	ClutterActor* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_hovered;
	result = _tmp0_;
	return result;
}

void
gala_drag_drop_action_set_hovered (GalaDragDropAction* self,
                                   ClutterActor* value)
{
	ClutterActor* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_drag_drop_action_get_hovered (self);
	if (old_value != value) {
		ClutterActor* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_hovered);
		self->priv->_hovered = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_HOVERED_PROPERTY]);
	}
}

static void
g_cclosure_user_marshal_OBJECT__FLOAT_FLOAT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef gpointer (*GMarshalFunc_OBJECT__FLOAT_FLOAT) (gpointer data1, gfloat arg_1, gfloat arg_2, gpointer data2);
	register GMarshalFunc_OBJECT__FLOAT_FLOAT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
	g_return_if_fail (return_value != NULL);
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_OBJECT__FLOAT_FLOAT) (marshal_data ? marshal_data : cc->callback);
	v_return = callback (data1, g_value_get_float (param_values + 1), g_value_get_float (param_values + 2), data2);
	g_value_take_object (return_value, v_return);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN (GClosure * closure,
                                              GValue * return_value,
                                              guint n_param_values,
                                              const GValue * param_values,
                                              gpointer invocation_hint,
                                              gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gboolean arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_boolean (param_values + 2), data2);
}

static void
g_cclosure_user_marshal_VOID__OBJECT_FLOAT_FLOAT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_FLOAT_FLOAT) (gpointer data1, gpointer arg_1, gfloat arg_2, gfloat arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_FLOAT_FLOAT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 4);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__OBJECT_FLOAT_FLOAT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_object (param_values + 1), g_value_get_float (param_values + 2), g_value_get_float (param_values + 3), data2);
}

static void
g_cclosure_user_marshal_VOID__UINT_ENUM (GClosure * closure,
                                         GValue * return_value,
                                         guint n_param_values,
                                         const GValue * param_values,
                                         gpointer invocation_hint,
                                         gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__UINT_ENUM) (gpointer data1, guint32 arg_1, gint arg_2, gpointer data2);
	register GMarshalFunc_VOID__UINT_ENUM callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__UINT_ENUM) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_uint (param_values + 1), g_value_get_enum (param_values + 2), data2);
}

static void
gala_drag_drop_action_class_init (GalaDragDropActionClass * klass,
                                  gpointer klass_data)
{
	GeeHashMap* _tmp0_;
	GeeHashMap* _tmp1_;
	gala_drag_drop_action_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GalaDragDropAction_private_offset);
	((ClutterActorMetaClass *) klass)->set_actor = (void (*) (ClutterActorMeta*, ClutterActor*)) gala_drag_drop_action_real_set_actor;
	((ClutterActionClass *) klass)->handle_event = (gboolean (*) (ClutterAction*, const ClutterEvent *)) gala_drag_drop_action_real_handle_event;
	G_OBJECT_CLASS (klass)->get_property = _vala_gala_drag_drop_action_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gala_drag_drop_action_set_property;
	G_OBJECT_CLASS (klass)->finalize = gala_drag_drop_action_finalize;
	/**
	         * The type of the action
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DRAG_DROP_ACTION_DRAG_TYPE_PROPERTY, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_DRAG_TYPE_PROPERTY] = g_param_spec_flags ("drag-type", "drag-type", "drag-type", GALA_TYPE_DRAG_DROP_ACTION_TYPE, 0U, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	/**
	         * The unique id given to this drag-drop-group
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DRAG_DROP_ACTION_DRAG_ID_PROPERTY, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_DRAG_ID_PROPERTY] = g_param_spec_string ("drag-id", "drag-id", "drag-id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DRAG_DROP_ACTION_HANDLE_PROPERTY, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_HANDLE_PROPERTY] = g_param_spec_object ("handle", "handle", "handle", clutter_actor_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	         * Indicates whether a drag action is currently active
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DRAG_DROP_ACTION_DRAGGING_PROPERTY, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_DRAGGING_PROPERTY] = g_param_spec_boolean ("dragging", "dragging", "dragging", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	/**
	         * Allow checking the parents of reactive children if they are valid destinations
	         * if the child is none
	         */
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DRAG_DROP_ACTION_ALLOW_BUBBLING_PROPERTY, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_ALLOW_BUBBLING_PROPERTY] = g_param_spec_boolean ("allow-bubbling", "allow-bubbling", "allow-bubbling", TRUE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_DRAG_DROP_ACTION_HOVERED_PROPERTY, gala_drag_drop_action_properties[GALA_DRAG_DROP_ACTION_HOVERED_PROPERTY] = g_param_spec_object ("hovered", "hovered", "hovered", clutter_actor_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	/**
	         * A drag has been started. You have to connect to this signal and
	         * return an actor that is transformed during the drag operation.
	         *
	         * @param x The global x coordinate where the action was activated
	         * @param y The global y coordinate where the action was activated
	         * @return  A ClutterActor that serves as handle
	         */
	gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DRAG_BEGIN_SIGNAL] = g_signal_new ("drag-begin", GALA_TYPE_DRAG_DROP_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__FLOAT_FLOAT, clutter_actor_get_type (), 2, G_TYPE_FLOAT, G_TYPE_FLOAT);
	/**
	         * A drag has been canceled. You may want to consider cleaning up
	         * your handle.
	         */
	gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DRAG_CANCELED_SIGNAL] = g_signal_new ("drag-canceled", GALA_TYPE_DRAG_DROP_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	/**
	         * A drag action has successfully been finished.
	         *
	         * @param actor The actor on which the drag finished
	         */
	gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DRAG_END_SIGNAL] = g_signal_new ("drag-end", GALA_TYPE_DRAG_DROP_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, clutter_actor_get_type ());
	/**
	         * The destination has been crossed
	         *
	         * @param target the target actor that is crossing the destination
	         * @param hovered indicates whether the actor is now hovered or not
	         */
	gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_CROSSED_SIGNAL] = g_signal_new ("crossed", GALA_TYPE_DRAG_DROP_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, clutter_actor_get_type (), G_TYPE_BOOLEAN);
	/**
	         * Emitted on the source when a destination is crossed.
	         *
	         * @param destination The destination actor that has been crossed
	         * @param hovered     Whether the actor is now hovered or has just been left
	         */
	gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DESTINATION_CROSSED_SIGNAL] = g_signal_new ("destination-crossed", GALA_TYPE_DRAG_DROP_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, clutter_actor_get_type (), G_TYPE_BOOLEAN);
	/**
	         * Emitted on the source when we are hovering over a destination.
	         *
	         * @param destination The destination actor that we are hovering over
	         * @param x           The x coordinate relative to the destination actor
	         * @param y           The y coordinate relative to the destination actor
	         */
	gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_DESTINATION_MOTION_SIGNAL] = g_signal_new ("destination-motion", GALA_TYPE_DRAG_DROP_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_FLOAT_FLOAT, G_TYPE_NONE, 3, clutter_actor_get_type (), G_TYPE_FLOAT, G_TYPE_FLOAT);
	/**
	         * The source has been clicked, but the movement was not larger than
	         * the drag threshold. Useful if the source is also activatable.
	         *
	         * @param button The button which was pressed
	         */
	gala_drag_drop_action_signals[GALA_DRAG_DROP_ACTION_ACTOR_CLICKED_SIGNAL] = g_signal_new ("actor-clicked", GALA_TYPE_DRAG_DROP_ACTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__UINT_ENUM, G_TYPE_NONE, 2, G_TYPE_UINT, clutter_input_device_type_get_type ());
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_LINKED_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (gala_drag_drop_action_sources);
	gala_drag_drop_action_sources = _tmp0_;
	_tmp1_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, GEE_TYPE_LINKED_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
	_g_object_unref0 (gala_drag_drop_action_destinations);
	gala_drag_drop_action_destinations = _tmp1_;
}

static void
gala_drag_drop_action_instance_init (GalaDragDropAction * self,
                                     gpointer klass)
{
	self->priv = gala_drag_drop_action_get_instance_private (self);
	self->priv->_dragging = FALSE;
	self->priv->_allow_bubbling = TRUE;
	self->priv->_hovered = NULL;
	self->priv->clicked = FALSE;
	self->priv->grab = NULL;
	self->priv->grabbed_device = NULL;
	self->priv->on_event_id = (gulong) 0;
}

static void
gala_drag_drop_action_finalize (GObject * obj)
{
	GalaDragDropAction * self;
	ClutterActor* _tmp0_;
	ClutterActor* _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_DRAG_DROP_ACTION, GalaDragDropAction);
	_tmp0_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		ClutterActor* _tmp2_;
		ClutterActor* _tmp3_;
		_tmp2_ = clutter_actor_meta_get_actor ((ClutterActorMeta*) self);
		_tmp3_ = _tmp2_;
		gala_drag_drop_action_release_actor (self, _tmp3_);
	}
	_g_free0 (self->priv->_drag_id);
	_g_object_unref0 (self->priv->_handle);
	_g_object_unref0 (self->priv->_hovered);
	_g_object_unref0 (self->priv->grab);
	_g_object_unref0 (self->priv->grabbed_device);
	G_OBJECT_CLASS (gala_drag_drop_action_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gala_drag_drop_action_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaDragDropActionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_drag_drop_action_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaDragDropAction), 0, (GInstanceInitFunc) gala_drag_drop_action_instance_init, NULL };
	GType gala_drag_drop_action_type_id;
	gala_drag_drop_action_type_id = g_type_register_static (clutter_action_get_type (), "GalaDragDropAction", &g_define_type_info, 0);
	GalaDragDropAction_private_offset = g_type_add_instance_private (gala_drag_drop_action_type_id, sizeof (GalaDragDropActionPrivate));
	return gala_drag_drop_action_type_id;
}

GType
gala_drag_drop_action_get_type (void)
{
	static gsize gala_drag_drop_action_type_id__once = 0;
	if (g_once_init_enter (&gala_drag_drop_action_type_id__once)) {
		GType gala_drag_drop_action_type_id;
		gala_drag_drop_action_type_id = gala_drag_drop_action_get_type_once ();
		g_once_init_leave (&gala_drag_drop_action_type_id__once, gala_drag_drop_action_type_id);
	}
	return gala_drag_drop_action_type_id__once;
}

static void
_vala_gala_drag_drop_action_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec)
{
	GalaDragDropAction * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_TYPE_DRAG_DROP_ACTION, GalaDragDropAction);
	switch (property_id) {
		case GALA_DRAG_DROP_ACTION_DRAG_TYPE_PROPERTY:
		g_value_set_flags (value, gala_drag_drop_action_get_drag_type (self));
		break;
		case GALA_DRAG_DROP_ACTION_DRAG_ID_PROPERTY:
		g_value_set_string (value, gala_drag_drop_action_get_drag_id (self));
		break;
		case GALA_DRAG_DROP_ACTION_HANDLE_PROPERTY:
		g_value_set_object (value, gala_drag_drop_action_get_handle (self));
		break;
		case GALA_DRAG_DROP_ACTION_DRAGGING_PROPERTY:
		g_value_set_boolean (value, gala_drag_drop_action_get_dragging (self));
		break;
		case GALA_DRAG_DROP_ACTION_ALLOW_BUBBLING_PROPERTY:
		g_value_set_boolean (value, gala_drag_drop_action_get_allow_bubbling (self));
		break;
		case GALA_DRAG_DROP_ACTION_HOVERED_PROPERTY:
		g_value_set_object (value, gala_drag_drop_action_get_hovered (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gala_drag_drop_action_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec)
{
	GalaDragDropAction * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_TYPE_DRAG_DROP_ACTION, GalaDragDropAction);
	switch (property_id) {
		case GALA_DRAG_DROP_ACTION_DRAG_TYPE_PROPERTY:
		gala_drag_drop_action_set_drag_type (self, g_value_get_flags (value));
		break;
		case GALA_DRAG_DROP_ACTION_DRAG_ID_PROPERTY:
		gala_drag_drop_action_set_drag_id (self, g_value_get_string (value));
		break;
		case GALA_DRAG_DROP_ACTION_HANDLE_PROPERTY:
		gala_drag_drop_action_set_handle (self, g_value_get_object (value));
		break;
		case GALA_DRAG_DROP_ACTION_DRAGGING_PROPERTY:
		gala_drag_drop_action_set_dragging (self, g_value_get_boolean (value));
		break;
		case GALA_DRAG_DROP_ACTION_ALLOW_BUBBLING_PROPERTY:
		gala_drag_drop_action_set_allow_bubbling (self, g_value_get_boolean (value));
		break;
		case GALA_DRAG_DROP_ACTION_HOVERED_PROPERTY:
		gala_drag_drop_action_set_hovered (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

