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

/*
 * Copyright 2025 elementary, Inc. (https://elementary.io)
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 * Authored by: Leonhard Kargl <leo.kargl@proton.me>
 */

#include <glib-object.h>
#include <meta/display.h>
#include <gio/gio.h>
#include <glib.h>
#include <meta/window.h>
#include <meta/workspace.h>
#include "gala.h"
#include <meta/meta-workspace-manager.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define GALA_TYPE_WINDOW_MOVER (gala_window_mover_get_type ())
#define GALA_WINDOW_MOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_WINDOW_MOVER, GalaWindowMover))
#define GALA_WINDOW_MOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_WINDOW_MOVER, GalaWindowMoverClass))
#define GALA_IS_WINDOW_MOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_WINDOW_MOVER))
#define GALA_IS_WINDOW_MOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_WINDOW_MOVER))
#define GALA_WINDOW_MOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_WINDOW_MOVER, GalaWindowMoverClass))

typedef struct _GalaWindowMover GalaWindowMover;
typedef struct _GalaWindowMoverClass GalaWindowMoverClass;
typedef struct _GalaWindowMoverPrivate GalaWindowMoverPrivate;

#define GALA_TYPE_WINDOW_LISTENER (gala_window_listener_get_type ())
#define GALA_WINDOW_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_WINDOW_LISTENER, GalaWindowListener))
#define GALA_WINDOW_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_WINDOW_LISTENER, GalaWindowListenerClass))
#define GALA_IS_WINDOW_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_WINDOW_LISTENER))
#define GALA_IS_WINDOW_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_WINDOW_LISTENER))
#define GALA_WINDOW_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_WINDOW_LISTENER, GalaWindowListenerClass))

typedef struct _GalaWindowListener GalaWindowListener;
typedef struct _GalaWindowListenerClass GalaWindowListenerClass;
enum  {
	GALA_WINDOW_MOVER_0_PROPERTY,
	GALA_WINDOW_MOVER_DISPLAY_PROPERTY,
	GALA_WINDOW_MOVER_WINDOW_LISTENER_PROPERTY,
	GALA_WINDOW_MOVER_NUM_PROPERTIES
};
static GParamSpec* gala_window_mover_properties[GALA_WINDOW_MOVER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))

struct _GalaWindowMover {
	GObject parent_instance;
	GalaWindowMoverPrivate * priv;
};

struct _GalaWindowMoverClass {
	GObjectClass parent_class;
};

struct _GalaWindowMoverPrivate {
	MetaDisplay* _display;
	GalaWindowListener* _window_listener;
	GSettings* behavior_settings;
	GHashTable* old_workspaces;
};

static gint GalaWindowMover_private_offset;
static gpointer gala_window_mover_parent_class = NULL;

VALA_EXTERN GType gala_window_mover_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaWindowMover, g_object_unref)
VALA_EXTERN GType gala_window_listener_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaWindowListener, g_object_unref)
VALA_EXTERN GalaWindowMover* gala_window_mover_new (MetaDisplay* display,
                                        GalaWindowListener* window_listener);
VALA_EXTERN GalaWindowMover* gala_window_mover_construct (GType object_type,
                                              MetaDisplay* display,
                                              GalaWindowListener* window_listener);
static void gala_window_mover_on_window_maximized_changed (GalaWindowMover* self,
                                                    MetaWindow* window);
static void gala_window_mover_move_window_to_next_ws (GalaWindowMover* self,
                                               MetaWindow* window);
static void gala_window_mover_move_window_to_old_ws (GalaWindowMover* self,
                                              MetaWindow* window);
static void gala_window_mover_on_window_fullscreen_changed (GalaWindowMover* self,
                                                     MetaWindow* window);
VALA_EXTERN void gala_internal_utils_insert_workspace_with_window (gint index,
                                                       MetaWindow* new_window);
VALA_EXTERN MetaDisplay* gala_window_mover_get_display (GalaWindowMover* self);
static void _gala_window_mover_move_window_to_old_ws_meta_window_unmanaged (MetaWindow* _sender,
                                                                     gpointer self);
static void gala_window_mover_set_display (GalaWindowMover* self,
                                    MetaDisplay* value);
VALA_EXTERN GalaWindowListener* gala_window_mover_get_window_listener (GalaWindowMover* self);
static void gala_window_mover_set_window_listener (GalaWindowMover* self,
                                            GalaWindowListener* value);
static GObject * gala_window_mover_constructor (GType type,
                                         guint n_construct_properties,
                                         GObjectConstructParam * construct_properties);
static void _g_object_unref0_ (gpointer var);
static void _gala_window_mover_on_window_maximized_changed_gala_window_listener_window_maximized_changed (GalaWindowListener* _sender,
                                                                                                   MetaWindow* window,
                                                                                                   gpointer self);
static void _gala_window_mover_on_window_fullscreen_changed_gala_window_listener_window_fullscreen_changed (GalaWindowListener* _sender,
                                                                                                     MetaWindow* window,
                                                                                                     gpointer self);
static void gala_window_mover_finalize (GObject * obj);
static GType gala_window_mover_get_type_once (void);
static void _vala_gala_window_mover_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec);
static void _vala_gala_window_mover_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec);

static inline gpointer
gala_window_mover_get_instance_private (GalaWindowMover* self)
{
	return G_STRUCT_MEMBER_P (self, GalaWindowMover_private_offset);
}

GalaWindowMover*
gala_window_mover_construct (GType object_type,
                             MetaDisplay* display,
                             GalaWindowListener* window_listener)
{
	GalaWindowMover * self = NULL;
	g_return_val_if_fail (display != NULL, NULL);
	g_return_val_if_fail (window_listener != NULL, NULL);
	self = (GalaWindowMover*) g_object_new (object_type, "display", display, "window-listener", window_listener, NULL);
	return self;
}

GalaWindowMover*
gala_window_mover_new (MetaDisplay* display,
                       GalaWindowListener* window_listener)
{
	return gala_window_mover_construct (GALA_TYPE_WINDOW_MOVER, display, window_listener);
}

static void
gala_window_mover_on_window_maximized_changed (GalaWindowMover* self,
                                               MetaWindow* window)
{
	GSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	_tmp0_ = self->priv->behavior_settings;
	if (!g_settings_get_boolean (_tmp0_, "move-maximized-workspace")) {
		return;
	}
	g_object_get (window, "maximized-horizontally", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		gala_window_mover_move_window_to_next_ws (self, window);
	} else {
		gala_window_mover_move_window_to_old_ws (self, window);
	}
}

static void
gala_window_mover_on_window_fullscreen_changed (GalaWindowMover* self,
                                                MetaWindow* window)
{
	GSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	_tmp0_ = self->priv->behavior_settings;
	if (!g_settings_get_boolean (_tmp0_, "move-fullscreened-workspace")) {
		return;
	}
	g_object_get (window, "fullscreen", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	if (_tmp2_) {
		gala_window_mover_move_window_to_next_ws (self, window);
	} else {
		gala_window_mover_move_window_to_old_ws (self, window);
	}
}

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

static void
_gala_window_mover_move_window_to_old_ws_meta_window_unmanaged (MetaWindow* _sender,
                                                                gpointer self)
{
	gala_window_mover_move_window_to_old_ws ((GalaWindowMover*) self, _sender);
}

static void
gala_window_mover_move_window_to_next_ws (GalaWindowMover* self,
                                          MetaWindow* window)
{
	MetaWorkspace* win_ws = NULL;
	MetaWorkspace* _tmp0_;
	MetaWorkspace* _tmp1_;
	gint old_ws_index = 0;
	MetaWorkspace* _tmp2_;
	gint new_ws_index = 0;
	MetaWorkspace* new_ws = NULL;
	MetaDisplay* _tmp3_;
	MetaWorkspaceManager* _tmp4_;
	MetaWorkspace* _tmp5_;
	MetaWorkspace* _tmp6_;
	guint32 time = 0U;
	MetaDisplay* _tmp7_;
	MetaWorkspace* _tmp8_;
	GHashTable* _tmp9_;
	GHashTable* _tmp10_;
	MetaWindow* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	_tmp0_ = meta_window_get_workspace (window);
	win_ws = _tmp0_;
	_tmp1_ = win_ws;
	if (gala_utils_get_n_windows (_tmp1_, FALSE, NULL) <= ((guint) 1)) {
		return;
	}
	if (!meta_window_is_on_primary_monitor (window)) {
		return;
	}
	_tmp2_ = win_ws;
	old_ws_index = meta_workspace_index (_tmp2_);
	new_ws_index = old_ws_index + 1;
	gala_internal_utils_insert_workspace_with_window (new_ws_index, window);
	_tmp3_ = self->priv->_display;
	_tmp4_ = meta_display_get_workspace_manager (_tmp3_);
	_tmp5_ = meta_workspace_manager_get_workspace_by_index (_tmp4_, new_ws_index);
	_tmp6_ = _g_object_ref0 (_tmp5_);
	new_ws = _tmp6_;
	_tmp7_ = self->priv->_display;
	time = meta_display_get_current_time (_tmp7_);
	_tmp8_ = new_ws;
	meta_workspace_activate_with_focus (_tmp8_, window, time);
	_tmp9_ = self->priv->old_workspaces;
	if (!g_hash_table_contains (_tmp9_, window)) {
		g_signal_connect_object (window, "unmanaged", (GCallback) _gala_window_mover_move_window_to_old_ws_meta_window_unmanaged, self, 0);
	}
	_tmp10_ = self->priv->old_workspaces;
	_tmp11_ = _g_object_ref0 (window);
	g_hash_table_insert (_tmp10_, _tmp11_, (gpointer) ((gintptr) old_ws_index));
	_g_object_unref0 (new_ws);
}

static void
gala_window_mover_move_window_to_old_ws (GalaWindowMover* self,
                                         MetaWindow* window)
{
	MetaWorkspace* win_ws = NULL;
	MetaWorkspace* _tmp0_;
	MetaWorkspace* _tmp1_;
	GHashTable* _tmp2_;
	gint old_ws_index = 0;
	GHashTable* _tmp3_;
	gconstpointer _tmp4_;
	gint new_ws_index = 0;
	MetaWorkspace* _tmp5_;
	MetaWorkspaceManager* workspace_manager = NULL;
	MetaDisplay* _tmp6_;
	MetaWorkspaceManager* _tmp7_;
	gboolean _tmp8_ = FALSE;
	GHashTable* _tmp15_;
	guint _tmp16_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	_tmp0_ = meta_window_get_workspace (window);
	win_ws = _tmp0_;
	_tmp1_ = win_ws;
	if (gala_utils_get_n_windows (_tmp1_, FALSE, NULL) > ((guint) 1)) {
		return;
	}
	_tmp2_ = self->priv->old_workspaces;
	if (!g_hash_table_contains (_tmp2_, window)) {
		return;
	}
	_tmp3_ = self->priv->old_workspaces;
	_tmp4_ = g_hash_table_lookup (_tmp3_, window);
	old_ws_index = (gint) ((gintptr) _tmp4_);
	_tmp5_ = win_ws;
	new_ws_index = meta_workspace_index (_tmp5_);
	_tmp6_ = self->priv->_display;
	_tmp7_ = meta_display_get_workspace_manager (_tmp6_);
	workspace_manager = _tmp7_;
	if (new_ws_index != old_ws_index) {
		MetaWorkspaceManager* _tmp9_;
		_tmp9_ = workspace_manager;
		_tmp8_ = old_ws_index < meta_workspace_manager_get_n_workspaces (_tmp9_);
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		guint time = 0U;
		MetaDisplay* _tmp10_;
		MetaWorkspace* old_ws = NULL;
		MetaWorkspaceManager* _tmp11_;
		MetaWorkspace* _tmp12_;
		MetaWorkspace* _tmp13_;
		MetaWorkspace* _tmp14_;
		_tmp10_ = self->priv->_display;
		time = (guint) meta_display_get_current_time (_tmp10_);
		_tmp11_ = workspace_manager;
		_tmp12_ = meta_workspace_manager_get_workspace_by_index (_tmp11_, old_ws_index);
		old_ws = _tmp12_;
		_tmp13_ = old_ws;
		meta_window_change_workspace (window, _tmp13_);
		_tmp14_ = old_ws;
		meta_workspace_activate_with_focus (_tmp14_, window, (guint32) time);
	}
	_tmp15_ = self->priv->old_workspaces;
	g_hash_table_remove (_tmp15_, window);
	g_signal_parse_name ("unmanaged", meta_window_get_type (), &_tmp16_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (window, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp16_, 0, NULL, (GCallback) _gala_window_mover_move_window_to_old_ws_meta_window_unmanaged, self);
}

MetaDisplay*
gala_window_mover_get_display (GalaWindowMover* self)
{
	MetaDisplay* result;
	MetaDisplay* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_display;
	result = _tmp0_;
	return result;
}

static void
gala_window_mover_set_display (GalaWindowMover* self,
                               MetaDisplay* value)
{
	MetaDisplay* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_window_mover_get_display (self);
	if (old_value != value) {
		MetaDisplay* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_display);
		self->priv->_display = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_window_mover_properties[GALA_WINDOW_MOVER_DISPLAY_PROPERTY]);
	}
}

GalaWindowListener*
gala_window_mover_get_window_listener (GalaWindowMover* self)
{
	GalaWindowListener* result;
	GalaWindowListener* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_window_listener;
	result = _tmp0_;
	return result;
}

static void
gala_window_mover_set_window_listener (GalaWindowMover* self,
                                       GalaWindowListener* value)
{
	GalaWindowListener* old_value;
	g_return_if_fail (self != NULL);
	old_value = gala_window_mover_get_window_listener (self);
	if (old_value != value) {
		GalaWindowListener* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_window_listener);
		self->priv->_window_listener = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gala_window_mover_properties[GALA_WINDOW_MOVER_WINDOW_LISTENER_PROPERTY]);
	}
}

static void
_g_object_unref0_ (gpointer var)
{
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
}

static void
_gala_window_mover_on_window_maximized_changed_gala_window_listener_window_maximized_changed (GalaWindowListener* _sender,
                                                                                              MetaWindow* window,
                                                                                              gpointer self)
{
	gala_window_mover_on_window_maximized_changed ((GalaWindowMover*) self, window);
}

static void
_gala_window_mover_on_window_fullscreen_changed_gala_window_listener_window_fullscreen_changed (GalaWindowListener* _sender,
                                                                                                MetaWindow* window,
                                                                                                gpointer self)
{
	gala_window_mover_on_window_fullscreen_changed ((GalaWindowMover*) self, window);
}

static GObject *
gala_window_mover_constructor (GType type,
                               guint n_construct_properties,
                               GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GalaWindowMover * self;
	GSettings* _tmp0_;
	GHashTable* _tmp1_;
	GalaWindowListener* _tmp2_;
	GalaWindowListener* _tmp3_;
	parent_class = G_OBJECT_CLASS (gala_window_mover_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_WINDOW_MOVER, GalaWindowMover);
	_tmp0_ = g_settings_new ("io.elementary.desktop.wm.behavior");
	_g_object_unref0 (self->priv->behavior_settings);
	self->priv->behavior_settings = _tmp0_;
	_tmp1_ = g_hash_table_new_full (NULL, NULL, _g_object_unref0_, NULL);
	_g_hash_table_unref0 (self->priv->old_workspaces);
	self->priv->old_workspaces = _tmp1_;
	_tmp2_ = self->priv->_window_listener;
	g_signal_connect_object (_tmp2_, "window-maximized-changed", (GCallback) _gala_window_mover_on_window_maximized_changed_gala_window_listener_window_maximized_changed, self, 0);
	_tmp3_ = self->priv->_window_listener;
	g_signal_connect_object (_tmp3_, "window-fullscreen-changed", (GCallback) _gala_window_mover_on_window_fullscreen_changed_gala_window_listener_window_fullscreen_changed, self, 0);
	return obj;
}

static void
gala_window_mover_class_init (GalaWindowMoverClass * klass,
                              gpointer klass_data)
{
	gala_window_mover_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GalaWindowMover_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gala_window_mover_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gala_window_mover_set_property;
	G_OBJECT_CLASS (klass)->constructor = gala_window_mover_constructor;
	G_OBJECT_CLASS (klass)->finalize = gala_window_mover_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_WINDOW_MOVER_DISPLAY_PROPERTY, gala_window_mover_properties[GALA_WINDOW_MOVER_DISPLAY_PROPERTY] = g_param_spec_object ("display", "display", "display", meta_display_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GALA_WINDOW_MOVER_WINDOW_LISTENER_PROPERTY, gala_window_mover_properties[GALA_WINDOW_MOVER_WINDOW_LISTENER_PROPERTY] = g_param_spec_object ("window-listener", "window-listener", "window-listener", GALA_TYPE_WINDOW_LISTENER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
gala_window_mover_instance_init (GalaWindowMover * self,
                                 gpointer klass)
{
	self->priv = gala_window_mover_get_instance_private (self);
}

static void
gala_window_mover_finalize (GObject * obj)
{
	GalaWindowMover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_WINDOW_MOVER, GalaWindowMover);
	_g_object_unref0 (self->priv->_display);
	_g_object_unref0 (self->priv->_window_listener);
	_g_object_unref0 (self->priv->behavior_settings);
	_g_hash_table_unref0 (self->priv->old_workspaces);
	G_OBJECT_CLASS (gala_window_mover_parent_class)->finalize (obj);
}

/**
 * This class handles moving windows to a new workspace when they are
 * maximized or fullscreened, depending on user settings.
 */
 G_GNUC_NO_INLINE static GType
gala_window_mover_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaWindowMoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_window_mover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaWindowMover), 0, (GInstanceInitFunc) gala_window_mover_instance_init, NULL };
	GType gala_window_mover_type_id;
	gala_window_mover_type_id = g_type_register_static (G_TYPE_OBJECT, "GalaWindowMover", &g_define_type_info, 0);
	GalaWindowMover_private_offset = g_type_add_instance_private (gala_window_mover_type_id, sizeof (GalaWindowMoverPrivate));
	return gala_window_mover_type_id;
}

GType
gala_window_mover_get_type (void)
{
	static gsize gala_window_mover_type_id__once = 0;
	if (g_once_init_enter (&gala_window_mover_type_id__once)) {
		GType gala_window_mover_type_id;
		gala_window_mover_type_id = gala_window_mover_get_type_once ();
		g_once_init_leave (&gala_window_mover_type_id__once, gala_window_mover_type_id);
	}
	return gala_window_mover_type_id__once;
}

static void
_vala_gala_window_mover_get_property (GObject * object,
                                      guint property_id,
                                      GValue * value,
                                      GParamSpec * pspec)
{
	GalaWindowMover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_TYPE_WINDOW_MOVER, GalaWindowMover);
	switch (property_id) {
		case GALA_WINDOW_MOVER_DISPLAY_PROPERTY:
		g_value_set_object (value, gala_window_mover_get_display (self));
		break;
		case GALA_WINDOW_MOVER_WINDOW_LISTENER_PROPERTY:
		g_value_set_object (value, gala_window_mover_get_window_listener (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gala_window_mover_set_property (GObject * object,
                                      guint property_id,
                                      const GValue * value,
                                      GParamSpec * pspec)
{
	GalaWindowMover * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GALA_TYPE_WINDOW_MOVER, GalaWindowMover);
	switch (property_id) {
		case GALA_WINDOW_MOVER_DISPLAY_PROPERTY:
		gala_window_mover_set_display (self, g_value_get_object (value));
		break;
		case GALA_WINDOW_MOVER_WINDOW_LISTENER_PROPERTY:
		gala_window_mover_set_window_listener (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

