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

/*
 * Copyright 2024 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/meta-plugin.h>
#include <meta/window.h>
#include <glib.h>
#include <meta/display.h>
#include <mtk/mtk.h>
#include <meta/meta-monitor-manager.h>
#include <meta/meta-context.h>
#include <meta/meta-backend.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 GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW (greeter_compositor_centered_window_get_type ())
#define GREETER_COMPOSITOR_CENTERED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, GreeterCompositorCenteredWindow))
#define GREETER_COMPOSITOR_CENTERED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, GreeterCompositorCenteredWindowClass))
#define GREETER_COMPOSITOR_IS_CENTERED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW))
#define GREETER_COMPOSITOR_IS_CENTERED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW))
#define GREETER_COMPOSITOR_CENTERED_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, GreeterCompositorCenteredWindowClass))

typedef struct _GreeterCompositorCenteredWindow GreeterCompositorCenteredWindow;
typedef struct _GreeterCompositorCenteredWindowClass GreeterCompositorCenteredWindowClass;
typedef struct _GreeterCompositorCenteredWindowPrivate GreeterCompositorCenteredWindowPrivate;

#define GREETER_COMPOSITOR_TYPE_WINDOW_MANAGER (greeter_compositor_window_manager_get_type ())
#define GREETER_COMPOSITOR_WINDOW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_WINDOW_MANAGER, GreeterCompositorWindowManager))
#define GREETER_COMPOSITOR_WINDOW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_COMPOSITOR_TYPE_WINDOW_MANAGER, GreeterCompositorWindowManagerClass))
#define GREETER_COMPOSITOR_IS_WINDOW_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_WINDOW_MANAGER))
#define GREETER_COMPOSITOR_IS_WINDOW_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_COMPOSITOR_TYPE_WINDOW_MANAGER))
#define GREETER_COMPOSITOR_WINDOW_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_COMPOSITOR_TYPE_WINDOW_MANAGER, GreeterCompositorWindowManagerClass))

typedef struct _GreeterCompositorWindowManager GreeterCompositorWindowManager;
typedef struct _GreeterCompositorWindowManagerClass GreeterCompositorWindowManagerClass;
enum  {
	GREETER_COMPOSITOR_CENTERED_WINDOW_0_PROPERTY,
	GREETER_COMPOSITOR_CENTERED_WINDOW_WM_PROPERTY,
	GREETER_COMPOSITOR_CENTERED_WINDOW_WINDOW_PROPERTY,
	GREETER_COMPOSITOR_CENTERED_WINDOW_NUM_PROPERTIES
};
static GParamSpec* greeter_compositor_centered_window_properties[GREETER_COMPOSITOR_CENTERED_WINDOW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block14Data Block14Data;

struct _GreeterCompositorCenteredWindow {
	GObject parent_instance;
	GreeterCompositorCenteredWindowPrivate * priv;
};

struct _GreeterCompositorCenteredWindowClass {
	GObjectClass parent_class;
};

struct _GreeterCompositorCenteredWindowPrivate {
	GreeterCompositorWindowManager* _wm;
	MetaWindow* _window;
	guint idle_move_id;
};

struct _Block14Data {
	int _ref_count_;
	GreeterCompositorCenteredWindow* self;
	gint x;
	gint y;
};

static gint GreeterCompositorCenteredWindow_private_offset;
static gpointer greeter_compositor_centered_window_parent_class = NULL;

VALA_EXTERN GType greeter_compositor_centered_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorCenteredWindow, g_object_unref)
VALA_EXTERN GType greeter_compositor_window_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorWindowManager, g_object_unref)
VALA_EXTERN GreeterCompositorCenteredWindow* greeter_compositor_centered_window_new (GreeterCompositorWindowManager* wm,
                                                                         MetaWindow* window);
VALA_EXTERN GreeterCompositorCenteredWindow* greeter_compositor_centered_window_construct (GType object_type,
                                                                               GreeterCompositorWindowManager* wm,
                                                                               MetaWindow* window);
static void greeter_compositor_centered_window_position_window (GreeterCompositorCenteredWindow* self);
static Block14Data* block14_data_ref (Block14Data* _data14_);
static void block14_data_unref (void * _userdata_);
VALA_EXTERN GreeterCompositorWindowManager* greeter_compositor_centered_window_get_wm (GreeterCompositorCenteredWindow* self);
VALA_EXTERN MetaWindow* greeter_compositor_centered_window_get_window (GreeterCompositorCenteredWindow* self);
static gboolean __lambda106_ (Block14Data* _data14_);
static gboolean ___lambda106__gsource_func (gpointer self);
static void greeter_compositor_centered_window_set_wm (GreeterCompositorCenteredWindow* self,
                                                GreeterCompositorWindowManager* value);
static void greeter_compositor_centered_window_set_window (GreeterCompositorCenteredWindow* self,
                                                    MetaWindow* value);
static GObject * greeter_compositor_centered_window_constructor (GType type,
                                                          guint n_construct_properties,
                                                          GObjectConstructParam * construct_properties);
static void _greeter_compositor_centered_window_position_window_meta_window_size_changed (MetaWindow* _sender,
                                                                                   gpointer self);
static void _greeter_compositor_centered_window___lambda107_ (GreeterCompositorCenteredWindow* self);
static void __greeter_compositor_centered_window___lambda107__meta_monitor_manager_monitors_changed (MetaMonitorManager* _sender,
                                                                                              gpointer self);
static void _greeter_compositor_centered_window___lambda108_ (GreeterCompositorCenteredWindow* self);
static void __greeter_compositor_centered_window___lambda108__meta_window_shown (MetaWindow* _sender,
                                                                          gpointer self);
static void _greeter_compositor_centered_window___lambda109_ (GreeterCompositorCenteredWindow* self);
static void __greeter_compositor_centered_window___lambda109__meta_window_unmanaging (MetaWindow* _sender,
                                                                               gpointer self);
static void greeter_compositor_centered_window_finalize (GObject * obj);
static GType greeter_compositor_centered_window_get_type_once (void);
static void _vala_greeter_compositor_centered_window_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec);
static void _vala_greeter_compositor_centered_window_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec);

static inline gpointer
greeter_compositor_centered_window_get_instance_private (GreeterCompositorCenteredWindow* self)
{
	return G_STRUCT_MEMBER_P (self, GreeterCompositorCenteredWindow_private_offset);
}

GreeterCompositorCenteredWindow*
greeter_compositor_centered_window_construct (GType object_type,
                                              GreeterCompositorWindowManager* wm,
                                              MetaWindow* window)
{
	GreeterCompositorCenteredWindow * self = NULL;
	g_return_val_if_fail (wm != NULL, NULL);
	g_return_val_if_fail (window != NULL, NULL);
	self = (GreeterCompositorCenteredWindow*) g_object_new (object_type, "wm", wm, "window", window, NULL);
	return self;
}

GreeterCompositorCenteredWindow*
greeter_compositor_centered_window_new (GreeterCompositorWindowManager* wm,
                                        MetaWindow* window)
{
	return greeter_compositor_centered_window_construct (GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, wm, window);
}

static Block14Data*
block14_data_ref (Block14Data* _data14_)
{
	g_atomic_int_inc (&_data14_->_ref_count_);
	return _data14_;
}

static void
block14_data_unref (void * _userdata_)
{
	Block14Data* _data14_;
	_data14_ = (Block14Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data14_->_ref_count_)) {
		GreeterCompositorCenteredWindow* self;
		self = _data14_->self;
		_g_object_unref0 (self);
		g_slice_free (Block14Data, _data14_);
	}
}

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

static gboolean
__lambda106_ (Block14Data* _data14_)
{
	GreeterCompositorCenteredWindow* self;
	MetaWindow* _tmp0_;
	gboolean result;
	self = _data14_->self;
	_tmp0_ = self->priv->_window;
	meta_window_move_frame (_tmp0_, FALSE, _data14_->x, _data14_->y);
	self->priv->idle_move_id = (guint) 0;
	result = G_SOURCE_REMOVE;
	return result;
}

static gboolean
___lambda106__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda106_ (self);
	return result;
}

static void
greeter_compositor_centered_window_position_window (GreeterCompositorCenteredWindow* self)
{
	Block14Data* _data14_;
	MetaDisplay* display = NULL;
	GreeterCompositorWindowManager* _tmp0_;
	MetaDisplay* _tmp1_;
	MetaDisplay* _tmp2_;
	MtkRectangle monitor_geom = {0};
	MetaDisplay* _tmp3_;
	MetaDisplay* _tmp4_;
	MtkRectangle _tmp5_ = {0};
	MtkRectangle window_rect = {0};
	MetaWindow* _tmp6_;
	MtkRectangle _tmp7_ = {0};
	MtkRectangle _tmp8_;
	MtkRectangle _tmp9_;
	MtkRectangle _tmp10_;
	MtkRectangle _tmp11_;
	MtkRectangle _tmp12_;
	MtkRectangle _tmp13_;
	g_return_if_fail (self != NULL);
	_data14_ = g_slice_new0 (Block14Data);
	_data14_->_ref_count_ = 1;
	_data14_->self = g_object_ref (self);
	_tmp0_ = self->priv->_wm;
	_tmp1_ = meta_plugin_get_display ((MetaPlugin*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	display = _tmp2_;
	_tmp3_ = display;
	_tmp4_ = display;
	meta_display_get_monitor_geometry (_tmp3_, meta_display_get_primary_monitor (_tmp4_), &_tmp5_);
	monitor_geom = _tmp5_;
	_tmp6_ = self->priv->_window;
	meta_window_get_frame_rect (_tmp6_, &_tmp7_);
	window_rect = _tmp7_;
	_tmp8_ = monitor_geom;
	_tmp9_ = monitor_geom;
	_tmp10_ = window_rect;
	_data14_->x = _tmp8_.x + ((_tmp9_.width - _tmp10_.width) / 2);
	_tmp11_ = monitor_geom;
	_tmp12_ = monitor_geom;
	_tmp13_ = window_rect;
	_data14_->y = _tmp11_.y + ((_tmp12_.height - _tmp13_.height) / 2);
	if (self->priv->idle_move_id != ((guint) 0)) {
		g_source_remove (self->priv->idle_move_id);
	}
	self->priv->idle_move_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, ___lambda106__gsource_func, block14_data_ref (_data14_), block14_data_unref);
	_g_object_unref0 (display);
	block14_data_unref (_data14_);
	_data14_ = NULL;
}

GreeterCompositorWindowManager*
greeter_compositor_centered_window_get_wm (GreeterCompositorCenteredWindow* self)
{
	GreeterCompositorWindowManager* result;
	GreeterCompositorWindowManager* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_wm;
	result = _tmp0_;
	return result;
}

static void
greeter_compositor_centered_window_set_wm (GreeterCompositorCenteredWindow* self,
                                           GreeterCompositorWindowManager* value)
{
	GreeterCompositorWindowManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = greeter_compositor_centered_window_get_wm (self);
	if (old_value != value) {
		GreeterCompositorWindowManager* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_wm);
		self->priv->_wm = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, greeter_compositor_centered_window_properties[GREETER_COMPOSITOR_CENTERED_WINDOW_WM_PROPERTY]);
	}
}

MetaWindow*
greeter_compositor_centered_window_get_window (GreeterCompositorCenteredWindow* self)
{
	MetaWindow* result;
	MetaWindow* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_window;
	result = _tmp0_;
	return result;
}

static void
greeter_compositor_centered_window_set_window (GreeterCompositorCenteredWindow* self,
                                               MetaWindow* value)
{
	MetaWindow* old_value;
	g_return_if_fail (self != NULL);
	old_value = greeter_compositor_centered_window_get_window (self);
	if (old_value != value) {
		MetaWindow* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_window);
		self->priv->_window = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, greeter_compositor_centered_window_properties[GREETER_COMPOSITOR_CENTERED_WINDOW_WINDOW_PROPERTY]);
	}
}

static void
_greeter_compositor_centered_window_position_window_meta_window_size_changed (MetaWindow* _sender,
                                                                              gpointer self)
{
	greeter_compositor_centered_window_position_window ((GreeterCompositorCenteredWindow*) self);
}

static void
_greeter_compositor_centered_window___lambda107_ (GreeterCompositorCenteredWindow* self)
{
	greeter_compositor_centered_window_position_window (self);
}

static void
__greeter_compositor_centered_window___lambda107__meta_monitor_manager_monitors_changed (MetaMonitorManager* _sender,
                                                                                         gpointer self)
{
	_greeter_compositor_centered_window___lambda107_ ((GreeterCompositorCenteredWindow*) self);
}

static void
_greeter_compositor_centered_window___lambda108_ (GreeterCompositorCenteredWindow* self)
{
	MetaWindow* _tmp0_;
	GreeterCompositorWindowManager* _tmp1_;
	MetaDisplay* _tmp2_;
	_tmp0_ = self->priv->_window;
	_tmp1_ = self->priv->_wm;
	_tmp2_ = meta_plugin_get_display ((MetaPlugin*) _tmp1_);
	meta_window_focus (_tmp0_, meta_display_get_current_time (_tmp2_));
}

static void
__greeter_compositor_centered_window___lambda108__meta_window_shown (MetaWindow* _sender,
                                                                     gpointer self)
{
	_greeter_compositor_centered_window___lambda108_ ((GreeterCompositorCenteredWindow*) self);
}

static void
_greeter_compositor_centered_window___lambda109_ (GreeterCompositorCenteredWindow* self)
{
	if (self->priv->idle_move_id != ((guint) 0)) {
		g_source_remove (self->priv->idle_move_id);
	}
}

static void
__greeter_compositor_centered_window___lambda109__meta_window_unmanaging (MetaWindow* _sender,
                                                                          gpointer self)
{
	_greeter_compositor_centered_window___lambda109_ ((GreeterCompositorCenteredWindow*) self);
}

static GObject *
greeter_compositor_centered_window_constructor (GType type,
                                                guint n_construct_properties,
                                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GreeterCompositorCenteredWindow * self;
	MetaWindow* _tmp0_;
	MetaWindow* _tmp1_;
	MetaMonitorManager* monitor_manager = NULL;
	GreeterCompositorWindowManager* _tmp2_;
	MetaDisplay* _tmp3_;
	MetaContext* _tmp4_;
	MetaBackend* _tmp5_;
	MetaMonitorManager* _tmp6_;
	MetaMonitorManager* _tmp7_;
	MetaMonitorManager* _tmp8_;
	MetaWindow* _tmp9_;
	MetaWindow* _tmp10_;
	parent_class = G_OBJECT_CLASS (greeter_compositor_centered_window_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, GreeterCompositorCenteredWindow);
	_tmp0_ = self->priv->_window;
	g_signal_connect_object (_tmp0_, "size-changed", (GCallback) _greeter_compositor_centered_window_position_window_meta_window_size_changed, self, 0);
	_tmp1_ = self->priv->_window;
	meta_window_stick (_tmp1_);
	_tmp2_ = self->priv->_wm;
	_tmp3_ = meta_plugin_get_display ((MetaPlugin*) _tmp2_);
	_tmp4_ = meta_display_get_context (_tmp3_);
	_tmp5_ = meta_context_get_backend (_tmp4_);
	_tmp6_ = meta_backend_get_monitor_manager (_tmp5_);
	_tmp7_ = _g_object_ref0 (_tmp6_);
	monitor_manager = _tmp7_;
	_tmp8_ = monitor_manager;
	g_signal_connect_object (_tmp8_, "monitors-changed", (GCallback) __greeter_compositor_centered_window___lambda107__meta_monitor_manager_monitors_changed, self, 0);
	greeter_compositor_centered_window_position_window (self);
	_tmp9_ = self->priv->_window;
	g_signal_connect_object (_tmp9_, "shown", (GCallback) __greeter_compositor_centered_window___lambda108__meta_window_shown, self, 0);
	_tmp10_ = self->priv->_window;
	g_signal_connect_object (_tmp10_, "unmanaging", (GCallback) __greeter_compositor_centered_window___lambda109__meta_window_unmanaging, self, 0);
	_g_object_unref0 (monitor_manager);
	return obj;
}

static void
greeter_compositor_centered_window_class_init (GreeterCompositorCenteredWindowClass * klass,
                                               gpointer klass_data)
{
	greeter_compositor_centered_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GreeterCompositorCenteredWindow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_greeter_compositor_centered_window_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_greeter_compositor_centered_window_set_property;
	G_OBJECT_CLASS (klass)->constructor = greeter_compositor_centered_window_constructor;
	G_OBJECT_CLASS (klass)->finalize = greeter_compositor_centered_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GREETER_COMPOSITOR_CENTERED_WINDOW_WM_PROPERTY, greeter_compositor_centered_window_properties[GREETER_COMPOSITOR_CENTERED_WINDOW_WM_PROPERTY] = g_param_spec_object ("wm", "wm", "wm", GREETER_COMPOSITOR_TYPE_WINDOW_MANAGER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GREETER_COMPOSITOR_CENTERED_WINDOW_WINDOW_PROPERTY, greeter_compositor_centered_window_properties[GREETER_COMPOSITOR_CENTERED_WINDOW_WINDOW_PROPERTY] = g_param_spec_object ("window", "window", "window", meta_window_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
}

static void
greeter_compositor_centered_window_instance_init (GreeterCompositorCenteredWindow * self,
                                                  gpointer klass)
{
	self->priv = greeter_compositor_centered_window_get_instance_private (self);
	self->priv->idle_move_id = (guint) 0;
}

static void
greeter_compositor_centered_window_finalize (GObject * obj)
{
	GreeterCompositorCenteredWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, GreeterCompositorCenteredWindow);
	_g_object_unref0 (self->priv->_wm);
	_g_object_unref0 (self->priv->_window);
	G_OBJECT_CLASS (greeter_compositor_centered_window_parent_class)->finalize (obj);
}

static GType
greeter_compositor_centered_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GreeterCompositorCenteredWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) greeter_compositor_centered_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GreeterCompositorCenteredWindow), 0, (GInstanceInitFunc) greeter_compositor_centered_window_instance_init, NULL };
	GType greeter_compositor_centered_window_type_id;
	greeter_compositor_centered_window_type_id = g_type_register_static (G_TYPE_OBJECT, "GreeterCompositorCenteredWindow", &g_define_type_info, 0);
	GreeterCompositorCenteredWindow_private_offset = g_type_add_instance_private (greeter_compositor_centered_window_type_id, sizeof (GreeterCompositorCenteredWindowPrivate));
	return greeter_compositor_centered_window_type_id;
}

GType
greeter_compositor_centered_window_get_type (void)
{
	static volatile gsize greeter_compositor_centered_window_type_id__once = 0;
	if (g_once_init_enter (&greeter_compositor_centered_window_type_id__once)) {
		GType greeter_compositor_centered_window_type_id;
		greeter_compositor_centered_window_type_id = greeter_compositor_centered_window_get_type_once ();
		g_once_init_leave (&greeter_compositor_centered_window_type_id__once, greeter_compositor_centered_window_type_id);
	}
	return greeter_compositor_centered_window_type_id__once;
}

static void
_vala_greeter_compositor_centered_window_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec)
{
	GreeterCompositorCenteredWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, GreeterCompositorCenteredWindow);
	switch (property_id) {
		case GREETER_COMPOSITOR_CENTERED_WINDOW_WM_PROPERTY:
		g_value_set_object (value, greeter_compositor_centered_window_get_wm (self));
		break;
		case GREETER_COMPOSITOR_CENTERED_WINDOW_WINDOW_PROPERTY:
		g_value_set_object (value, greeter_compositor_centered_window_get_window (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_greeter_compositor_centered_window_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec)
{
	GreeterCompositorCenteredWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GREETER_COMPOSITOR_TYPE_CENTERED_WINDOW, GreeterCompositorCenteredWindow);
	switch (property_id) {
		case GREETER_COMPOSITOR_CENTERED_WINDOW_WM_PROPERTY:
		greeter_compositor_centered_window_set_wm (self, g_value_get_object (value));
		break;
		case GREETER_COMPOSITOR_CENTERED_WINDOW_WINDOW_PROPERTY:
		greeter_compositor_centered_window_set_window (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

