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

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

#include <meta/meta-background-group.h>
#include <glib-object.h>
#include <meta/meta-plugin.h>
#include <glib.h>
#include <meta/meta-background-actor.h>
#include <float.h>
#include <math.h>
#include <clutter/clutter.h>
#include <meta/meta-background-content.h>
#include <meta/meta-background.h>
#include <meta/display.h>
#include <mtk/mtk.h>

#define GREETER_COMPOSITOR_BACKGROUND_MANAGER_DIM_OPACITY 0.55
#define GREETER_COMPOSITOR_BACKGROUND_MANAGER_FADE_ANIMATION_TIME 1000
#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_BACKGROUND_MANAGER (greeter_compositor_background_manager_get_type ())
#define GREETER_COMPOSITOR_BACKGROUND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, GreeterCompositorBackgroundManager))
#define GREETER_COMPOSITOR_BACKGROUND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, GreeterCompositorBackgroundManagerClass))
#define GREETER_COMPOSITOR_IS_BACKGROUND_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER))
#define GREETER_COMPOSITOR_IS_BACKGROUND_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER))
#define GREETER_COMPOSITOR_BACKGROUND_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, GreeterCompositorBackgroundManagerClass))

typedef struct _GreeterCompositorBackgroundManager GreeterCompositorBackgroundManager;
typedef struct _GreeterCompositorBackgroundManagerClass GreeterCompositorBackgroundManagerClass;
typedef struct _GreeterCompositorBackgroundManagerPrivate GreeterCompositorBackgroundManagerPrivate;

#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;

#define GREETER_COMPOSITOR_TYPE_BACKGROUND_SOURCE (greeter_compositor_background_source_get_type ())
#define GREETER_COMPOSITOR_BACKGROUND_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_SOURCE, GreeterCompositorBackgroundSource))
#define GREETER_COMPOSITOR_BACKGROUND_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND_SOURCE, GreeterCompositorBackgroundSourceClass))
#define GREETER_COMPOSITOR_IS_BACKGROUND_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_SOURCE))
#define GREETER_COMPOSITOR_IS_BACKGROUND_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND_SOURCE))
#define GREETER_COMPOSITOR_BACKGROUND_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_SOURCE, GreeterCompositorBackgroundSourceClass))

typedef struct _GreeterCompositorBackgroundSource GreeterCompositorBackgroundSource;
typedef struct _GreeterCompositorBackgroundSourceClass GreeterCompositorBackgroundSourceClass;
enum  {
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_0_PROPERTY,
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_WM_PROPERTY,
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_MONITOR_INDEX_PROPERTY,
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_CONTROL_POSITION_PROPERTY,
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_NEWEST_BACKGROUND_ACTOR_PROPERTY,
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_NUM_PROPERTIES
};
static GParamSpec* greeter_compositor_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GREETER_COMPOSITOR_TYPE_BACKGROUND_CACHE (greeter_compositor_background_cache_get_type ())
#define GREETER_COMPOSITOR_BACKGROUND_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_CACHE, GreeterCompositorBackgroundCache))
#define GREETER_COMPOSITOR_BACKGROUND_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND_CACHE, GreeterCompositorBackgroundCacheClass))
#define GREETER_COMPOSITOR_IS_BACKGROUND_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_CACHE))
#define GREETER_COMPOSITOR_IS_BACKGROUND_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND_CACHE))
#define GREETER_COMPOSITOR_BACKGROUND_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND_CACHE, GreeterCompositorBackgroundCacheClass))

typedef struct _GreeterCompositorBackgroundCache GreeterCompositorBackgroundCache;
typedef struct _GreeterCompositorBackgroundCacheClass GreeterCompositorBackgroundCacheClass;
typedef struct _Block10Data Block10Data;

#define GREETER_COMPOSITOR_TYPE_BACKGROUND (greeter_compositor_background_get_type ())
#define GREETER_COMPOSITOR_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND, GreeterCompositorBackground))
#define GREETER_COMPOSITOR_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND, GreeterCompositorBackgroundClass))
#define GREETER_COMPOSITOR_IS_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND))
#define GREETER_COMPOSITOR_IS_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GREETER_COMPOSITOR_TYPE_BACKGROUND))
#define GREETER_COMPOSITOR_BACKGROUND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GREETER_COMPOSITOR_TYPE_BACKGROUND, GreeterCompositorBackgroundClass))

typedef struct _GreeterCompositorBackground GreeterCompositorBackground;
typedef struct _GreeterCompositorBackgroundClass GreeterCompositorBackgroundClass;
typedef struct _Block11Data Block11Data;
typedef struct _Block12Data Block12Data;
enum  {
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_CHANGED_SIGNAL,
	GREETER_COMPOSITOR_BACKGROUND_MANAGER_NUM_SIGNALS
};
static guint greeter_compositor_background_manager_signals[GREETER_COMPOSITOR_BACKGROUND_MANAGER_NUM_SIGNALS] = {0};

struct _GreeterCompositorBackgroundManager {
	MetaBackgroundGroup parent_instance;
	GreeterCompositorBackgroundManagerPrivate * priv;
};

struct _GreeterCompositorBackgroundManagerClass {
	MetaBackgroundGroupClass parent_class;
};

struct _GreeterCompositorBackgroundManagerPrivate {
	GreeterCompositorWindowManager* _wm;
	gint _monitor_index;
	gboolean _control_position;
	GreeterCompositorBackgroundSource* background_source;
	MetaBackgroundActor* background_actor;
	MetaBackgroundActor* new_background_actor;
};

struct _Block10Data {
	int _ref_count_;
	GreeterCompositorBackgroundManager* self;
	MetaBackgroundActor* old_background_actor;
};

struct _Block11Data {
	int _ref_count_;
	GreeterCompositorBackgroundManager* self;
	GreeterCompositorBackground* background;
	gulong handler;
	gboolean animate;
};

struct _Block12Data {
	int _ref_count_;
	GreeterCompositorBackgroundManager* self;
	GreeterCompositorBackground* background;
	gulong changed_handler;
};

static gint GreeterCompositorBackgroundManager_private_offset;
static gpointer greeter_compositor_background_manager_parent_class = NULL;

VALA_EXTERN GType greeter_compositor_background_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorBackgroundManager, 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 GType greeter_compositor_background_source_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorBackgroundSource, g_object_unref)
VALA_EXTERN GreeterCompositorBackgroundManager* greeter_compositor_background_manager_new (GreeterCompositorWindowManager* wm,
                                                                               gint monitor_index,
                                                                               gboolean control_position);
VALA_EXTERN GreeterCompositorBackgroundManager* greeter_compositor_background_manager_construct (GType object_type,
                                                                                     GreeterCompositorWindowManager* wm,
                                                                                     gint monitor_index,
                                                                                     gboolean control_position);
static void greeter_compositor_background_manager_on_destroy (GreeterCompositorBackgroundManager* self);
VALA_EXTERN GType greeter_compositor_background_cache_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorBackgroundCache, g_object_unref)
VALA_EXTERN GreeterCompositorBackgroundCache* greeter_compositor_background_cache_get_default (void);
VALA_EXTERN void greeter_compositor_background_cache_release_background_source (GreeterCompositorBackgroundCache* self);
static void greeter_compositor_background_manager_swap_background_actor (GreeterCompositorBackgroundManager* self,
                                                                  gboolean animate);
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
static void ___lambda40_ (Block10Data* _data10_);
static void ____lambda40__clutter_timeline_completed (ClutterTimeline* _sender,
                                               gpointer self);
static void greeter_compositor_background_manager_update_background_actor (GreeterCompositorBackgroundManager* self,
                                                                    gboolean animate);
VALA_EXTERN GType greeter_compositor_background_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GreeterCompositorBackground, g_object_unref)
static Block11Data* block11_data_ref (Block11Data* _data11_);
static void block11_data_unref (void * _userdata_);
static MetaBackgroundActor* greeter_compositor_background_manager_create_background_actor (GreeterCompositorBackgroundManager* self);
VALA_EXTERN gboolean greeter_compositor_background_get_is_loaded (GreeterCompositorBackground* self);
static void __lambda43_ (Block11Data* _data11_);
static void ___lambda43__greeter_compositor_background_loaded (GreeterCompositorBackground* _sender,
                                                        gpointer self);
VALA_EXTERN void greeter_compositor_background_manager_set_size (GreeterCompositorBackgroundManager* self,
                                                     gfloat width,
                                                     gfloat height);
static Block12Data* block12_data_ref (Block12Data* _data12_);
static void block12_data_unref (void * _userdata_);
VALA_EXTERN GreeterCompositorWindowManager* greeter_compositor_background_manager_get_wm (GreeterCompositorBackgroundManager* self);
VALA_EXTERN GreeterCompositorBackground* greeter_compositor_background_source_get_background (GreeterCompositorBackgroundSource* self,
                                                                                  gint monitor_index);
VALA_EXTERN gint greeter_compositor_background_manager_get_monitor_index (GreeterCompositorBackgroundManager* self);
VALA_EXTERN MetaBackground* greeter_compositor_background_get_background (GreeterCompositorBackground* self);
VALA_EXTERN gboolean greeter_compositor_background_manager_get_control_position (GreeterCompositorBackgroundManager* self);
static void __lambda41_ (Block12Data* _data12_);
static void ___lambda41__greeter_compositor_background_changed (GreeterCompositorBackground* _sender,
                                                         gpointer self);
static void __lambda42_ (Block12Data* _data12_);
static void ___lambda42__clutter_actor_destroy (ClutterActor* _sender,
                                         gpointer self);
static void greeter_compositor_background_manager_set_wm (GreeterCompositorBackgroundManager* self,
                                                   GreeterCompositorWindowManager* value);
static void greeter_compositor_background_manager_set_monitor_index (GreeterCompositorBackgroundManager* self,
                                                              gint value);
static void greeter_compositor_background_manager_set_control_position (GreeterCompositorBackgroundManager* self,
                                                                 gboolean value);
VALA_EXTERN MetaBackgroundActor* greeter_compositor_background_manager_get_newest_background_actor (GreeterCompositorBackgroundManager* self);
static GObject * greeter_compositor_background_manager_constructor (GType type,
                                                             guint n_construct_properties,
                                                             GObjectConstructParam * construct_properties);
VALA_EXTERN GreeterCompositorBackgroundSource* greeter_compositor_background_cache_get_background_source (GreeterCompositorBackgroundCache* self,
                                                                                              MetaDisplay* display);
static void _greeter_compositor_background_manager_on_destroy_clutter_actor_destroy (ClutterActor* _sender,
                                                                              gpointer self);
static void greeter_compositor_background_manager_finalize (GObject * obj);
static GType greeter_compositor_background_manager_get_type_once (void);
static void _vala_greeter_compositor_background_manager_get_property (GObject * object,
                                                               guint property_id,
                                                               GValue * value,
                                                               GParamSpec * pspec);
static void _vala_greeter_compositor_background_manager_set_property (GObject * object,
                                                               guint property_id,
                                                               const GValue * value,
                                                               GParamSpec * pspec);

static inline gpointer
greeter_compositor_background_manager_get_instance_private (GreeterCompositorBackgroundManager* self)
{
	return G_STRUCT_MEMBER_P (self, GreeterCompositorBackgroundManager_private_offset);
}

GreeterCompositorBackgroundManager*
greeter_compositor_background_manager_construct (GType object_type,
                                                 GreeterCompositorWindowManager* wm,
                                                 gint monitor_index,
                                                 gboolean control_position)
{
	GreeterCompositorBackgroundManager * self = NULL;
	g_return_val_if_fail (wm != NULL, NULL);
	self = (GreeterCompositorBackgroundManager*) g_object_new (object_type, "wm", wm, "monitor-index", monitor_index, "control-position", control_position, NULL);
	return self;
}

GreeterCompositorBackgroundManager*
greeter_compositor_background_manager_new (GreeterCompositorWindowManager* wm,
                                           gint monitor_index,
                                           gboolean control_position)
{
	return greeter_compositor_background_manager_construct (GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, wm, monitor_index, control_position);
}

static void
greeter_compositor_background_manager_on_destroy (GreeterCompositorBackgroundManager* self)
{
	GreeterCompositorBackgroundCache* _tmp0_;
	MetaBackgroundActor* _tmp1_;
	MetaBackgroundActor* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = greeter_compositor_background_cache_get_default ();
	greeter_compositor_background_cache_release_background_source (_tmp0_);
	_g_object_unref0 (self->priv->background_source);
	self->priv->background_source = NULL;
	_tmp1_ = self->priv->new_background_actor;
	if (_tmp1_ != NULL) {
		MetaBackgroundActor* _tmp2_;
		_tmp2_ = self->priv->new_background_actor;
		clutter_actor_destroy ((ClutterActor*) _tmp2_);
		_g_object_unref0 (self->priv->new_background_actor);
		self->priv->new_background_actor = NULL;
	}
	_tmp3_ = self->priv->background_actor;
	if (_tmp3_ != NULL) {
		MetaBackgroundActor* _tmp4_;
		_tmp4_ = self->priv->background_actor;
		clutter_actor_destroy ((ClutterActor*) _tmp4_);
		_g_object_unref0 (self->priv->background_actor);
		self->priv->background_actor = NULL;
	}
}

static Block10Data*
block10_data_ref (Block10Data* _data10_)
{
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}

static void
block10_data_unref (void * _userdata_)
{
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		GreeterCompositorBackgroundManager* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->old_background_actor);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}

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

static void
___lambda40_ (Block10Data* _data10_)
{
	GreeterCompositorBackgroundManager* self;
	MetaBackgroundActor* _tmp0_;
	self = _data10_->self;
	_tmp0_ = _data10_->old_background_actor;
	clutter_actor_destroy ((ClutterActor*) _tmp0_);
}

static void
____lambda40__clutter_timeline_completed (ClutterTimeline* _sender,
                                          gpointer self)
{
	___lambda40_ (self);
}

static void
greeter_compositor_background_manager_swap_background_actor (GreeterCompositorBackgroundManager* self,
                                                             gboolean animate)
{
	Block10Data* _data10_;
	MetaBackgroundActor* _tmp0_;
	MetaBackgroundActor* _tmp1_;
	MetaBackgroundActor* _tmp2_;
	MetaBackgroundActor* _tmp3_;
	MetaBackgroundActor* _tmp4_;
	MetaBackgroundActor* _tmp5_;
	g_return_if_fail (self != NULL);
	_data10_ = g_slice_new0 (Block10Data);
	_data10_->_ref_count_ = 1;
	_data10_->self = g_object_ref (self);
	_tmp0_ = self->priv->new_background_actor;
	g_return_if_fail (_tmp0_ != NULL);
	_tmp1_ = self->priv->background_actor;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_data10_->old_background_actor = _tmp2_;
	_tmp3_ = self->priv->new_background_actor;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (self->priv->background_actor);
	self->priv->background_actor = _tmp4_;
	_g_object_unref0 (self->priv->new_background_actor);
	self->priv->new_background_actor = NULL;
	_tmp5_ = _data10_->old_background_actor;
	if (_tmp5_ == NULL) {
		block10_data_unref (_data10_);
		_data10_ = NULL;
		return;
	}
	if (animate) {
		ClutterPropertyTransition* transition = NULL;
		ClutterPropertyTransition* _tmp6_;
		ClutterPropertyTransition* _tmp7_;
		GValue _tmp8_ = {0};
		ClutterPropertyTransition* _tmp9_;
		GValue _tmp10_ = {0};
		ClutterPropertyTransition* _tmp11_;
		ClutterPropertyTransition* _tmp12_;
		ClutterPropertyTransition* _tmp13_;
		ClutterPropertyTransition* _tmp14_;
		MetaBackgroundActor* _tmp15_;
		ClutterPropertyTransition* _tmp16_;
		_tmp6_ = (ClutterPropertyTransition*) clutter_property_transition_new ("opacity");
		transition = _tmp6_;
		_tmp7_ = transition;
		g_value_init (&_tmp8_, G_TYPE_INT);
		g_value_set_int (&_tmp8_, 255);
		clutter_transition_set_from_value ((ClutterTransition*) _tmp7_, &_tmp8_);
		G_IS_VALUE (&_tmp8_) ? (g_value_unset (&_tmp8_), NULL) : NULL;
		_tmp9_ = transition;
		g_value_init (&_tmp10_, G_TYPE_INT);
		g_value_set_int (&_tmp10_, 0);
		clutter_transition_set_to_value ((ClutterTransition*) _tmp9_, &_tmp10_);
		G_IS_VALUE (&_tmp10_) ? (g_value_unset (&_tmp10_), NULL) : NULL;
		_tmp11_ = transition;
		clutter_timeline_set_duration ((ClutterTimeline*) _tmp11_, (guint) GREETER_COMPOSITOR_BACKGROUND_MANAGER_FADE_ANIMATION_TIME);
		_tmp12_ = transition;
		clutter_timeline_set_progress_mode ((ClutterTimeline*) _tmp12_, CLUTTER_EASE_OUT_QUAD);
		_tmp13_ = transition;
		clutter_transition_set_remove_on_complete ((ClutterTransition*) _tmp13_, TRUE);
		_tmp14_ = transition;
		g_signal_connect_data ((ClutterTimeline*) _tmp14_, "completed", (GCallback) ____lambda40__clutter_timeline_completed, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
		_tmp15_ = _data10_->old_background_actor;
		_tmp16_ = transition;
		clutter_actor_add_transition ((ClutterActor*) _tmp15_, "fade-out", (ClutterTransition*) _tmp16_);
		_g_object_unref0 (transition);
	} else {
		MetaBackgroundActor* _tmp17_;
		_tmp17_ = _data10_->old_background_actor;
		clutter_actor_destroy ((ClutterActor*) _tmp17_);
	}
	g_signal_emit (self, greeter_compositor_background_manager_signals[GREETER_COMPOSITOR_BACKGROUND_MANAGER_CHANGED_SIGNAL], 0);
	block10_data_unref (_data10_);
	_data10_ = NULL;
}

static Block11Data*
block11_data_ref (Block11Data* _data11_)
{
	g_atomic_int_inc (&_data11_->_ref_count_);
	return _data11_;
}

static void
block11_data_unref (void * _userdata_)
{
	Block11Data* _data11_;
	_data11_ = (Block11Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data11_->_ref_count_)) {
		GreeterCompositorBackgroundManager* self;
		self = _data11_->self;
		_g_object_unref0 (_data11_->background);
		_g_object_unref0 (self);
		g_slice_free (Block11Data, _data11_);
	}
}

static void
__lambda43_ (Block11Data* _data11_)
{
	GreeterCompositorBackgroundManager* self;
	GreeterCompositorBackground* _tmp0_;
	GreeterCompositorBackground* _tmp1_;
	self = _data11_->self;
	_tmp0_ = _data11_->background;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _data11_->handler);
	_tmp1_ = _data11_->background;
	g_object_set_data_full ((GObject*) _tmp1_, "background-loaded-handler", (gpointer) ((guintptr) 0), NULL);
	greeter_compositor_background_manager_swap_background_actor (self, _data11_->animate);
}

static void
___lambda43__greeter_compositor_background_loaded (GreeterCompositorBackground* _sender,
                                                   gpointer self)
{
	__lambda43_ (self);
}

static void
greeter_compositor_background_manager_update_background_actor (GreeterCompositorBackgroundManager* self,
                                                               gboolean animate)
{
	Block11Data* _data11_;
	MetaBackgroundActor* _tmp0_;
	MetaBackgroundActor* _tmp2_;
	MetaBackgroundContent* new_content = NULL;
	MetaBackgroundActor* _tmp3_;
	ClutterContent* _tmp4_;
	ClutterContent* _tmp5_;
	MetaBackgroundContent* _tmp6_;
	MetaBackgroundActor* _tmp7_;
	MetaBackgroundActor* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	MetaBackgroundContent* _tmp11_;
	MetaBackground* _tmp12_;
	MetaBackground* _tmp13_;
	MetaBackground* _tmp14_;
	gconstpointer _tmp15_;
	GreeterCompositorBackground* _tmp16_;
	GreeterCompositorBackground* _tmp17_;
	GreeterCompositorBackground* _tmp18_;
	gboolean _tmp19_;
	gboolean _tmp20_;
	GreeterCompositorBackground* _tmp21_;
	gulong _tmp22_;
	GreeterCompositorBackground* _tmp23_;
	g_return_if_fail (self != NULL);
	_data11_ = g_slice_new0 (Block11Data);
	_data11_->_ref_count_ = 1;
	_data11_->self = g_object_ref (self);
	_data11_->animate = animate;
	_tmp0_ = self->priv->new_background_actor;
	if (_tmp0_ != NULL) {
		MetaBackgroundActor* _tmp1_;
		_tmp1_ = self->priv->new_background_actor;
		clutter_actor_destroy ((ClutterActor*) _tmp1_);
		_g_object_unref0 (self->priv->new_background_actor);
		self->priv->new_background_actor = NULL;
	}
	_tmp2_ = greeter_compositor_background_manager_create_background_actor (self);
	_g_object_unref0 (self->priv->new_background_actor);
	self->priv->new_background_actor = _tmp2_;
	_tmp3_ = self->priv->new_background_actor;
	_tmp4_ = clutter_actor_get_content ((ClutterActor*) _tmp3_);
	_tmp5_ = _tmp4_;
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, meta_background_content_get_type (), MetaBackgroundContent));
	new_content = _tmp6_;
	_tmp7_ = self->priv->new_background_actor;
	_tmp8_ = self->priv->background_actor;
	g_object_get ((ClutterActor*) _tmp8_, "visible", &_tmp9_, NULL);
	_tmp10_ = _tmp9_;
	g_object_set ((ClutterActor*) _tmp7_, "visible", _tmp10_, NULL);
	_tmp11_ = new_content;
	g_object_get (_tmp11_, "background", &_tmp12_, NULL);
	_tmp13_ = _tmp12_;
	_tmp14_ = _tmp13_;
	_tmp15_ = g_object_get_data ((GObject*) _tmp14_, "delegate");
	_tmp16_ = _g_object_ref0 ((GreeterCompositorBackground*) _tmp15_);
	_tmp17_ = _tmp16_;
	_g_object_unref0 (_tmp14_);
	_data11_->background = _tmp17_;
	_tmp18_ = _data11_->background;
	_tmp19_ = greeter_compositor_background_get_is_loaded (_tmp18_);
	_tmp20_ = _tmp19_;
	if (_tmp20_) {
		greeter_compositor_background_manager_swap_background_actor (self, _data11_->animate);
		_g_object_unref0 (new_content);
		block11_data_unref (_data11_);
		_data11_ = NULL;
		return;
	}
	_data11_->handler = (gulong) 0;
	_tmp21_ = _data11_->background;
	_tmp22_ = g_signal_connect_data (_tmp21_, "loaded", (GCallback) ___lambda43__greeter_compositor_background_loaded, block11_data_ref (_data11_), (GClosureNotify) block11_data_unref, 0);
	_data11_->handler = _tmp22_;
	_tmp23_ = _data11_->background;
	g_object_set_data_full ((GObject*) _tmp23_, "background-loaded-handler", (gpointer) ((guintptr) _data11_->handler), NULL);
	_g_object_unref0 (new_content);
	block11_data_unref (_data11_);
	_data11_ = NULL;
}

void
greeter_compositor_background_manager_set_size (GreeterCompositorBackgroundManager* self,
                                                gfloat width,
                                                gfloat height)
{
	gboolean _tmp0_ = FALSE;
	MetaBackgroundActor* _tmp1_;
	gfloat _tmp2_;
	gfloat _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->background_actor;
	_tmp2_ = clutter_actor_get_width ((ClutterActor*) _tmp1_);
	_tmp3_ = _tmp2_;
	if (width != _tmp3_) {
		_tmp0_ = TRUE;
	} else {
		MetaBackgroundActor* _tmp4_;
		gfloat _tmp5_;
		gfloat _tmp6_;
		_tmp4_ = self->priv->background_actor;
		_tmp5_ = clutter_actor_get_height ((ClutterActor*) _tmp4_);
		_tmp6_ = _tmp5_;
		_tmp0_ = height != _tmp6_;
	}
	if (_tmp0_) {
		greeter_compositor_background_manager_update_background_actor (self, FALSE);
	}
}

static Block12Data*
block12_data_ref (Block12Data* _data12_)
{
	g_atomic_int_inc (&_data12_->_ref_count_);
	return _data12_;
}

static void
block12_data_unref (void * _userdata_)
{
	Block12Data* _data12_;
	_data12_ = (Block12Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data12_->_ref_count_)) {
		GreeterCompositorBackgroundManager* self;
		self = _data12_->self;
		_g_object_unref0 (_data12_->background);
		_g_object_unref0 (self);
		g_slice_free (Block12Data, _data12_);
	}
}

static void
__lambda41_ (Block12Data* _data12_)
{
	GreeterCompositorBackgroundManager* self;
	GreeterCompositorBackground* _tmp0_;
	self = _data12_->self;
	_tmp0_ = _data12_->background;
	g_signal_handler_disconnect ((GObject*) _tmp0_, _data12_->changed_handler);
	_data12_->changed_handler = (gulong) 0;
	greeter_compositor_background_manager_update_background_actor (self, TRUE);
}

static void
___lambda41__greeter_compositor_background_changed (GreeterCompositorBackground* _sender,
                                                    gpointer self)
{
	__lambda41_ (self);
}

static void
__lambda42_ (Block12Data* _data12_)
{
	GreeterCompositorBackgroundManager* self;
	gulong loaded_handler = 0UL;
	GreeterCompositorBackground* _tmp1_;
	gconstpointer _tmp2_;
	self = _data12_->self;
	if (_data12_->changed_handler != ((gulong) 0)) {
		GreeterCompositorBackground* _tmp0_;
		_tmp0_ = _data12_->background;
		g_signal_handler_disconnect ((GObject*) _tmp0_, _data12_->changed_handler);
		_data12_->changed_handler = (gulong) 0;
	}
	_tmp1_ = _data12_->background;
	_tmp2_ = g_object_get_data ((GObject*) _tmp1_, "background-loaded-handler");
	loaded_handler = (gulong) ((guintptr) _tmp2_);
	if (loaded_handler != ((gulong) 0)) {
		GreeterCompositorBackground* _tmp3_;
		GreeterCompositorBackground* _tmp4_;
		_tmp3_ = _data12_->background;
		g_signal_handler_disconnect ((GObject*) _tmp3_, loaded_handler);
		_tmp4_ = _data12_->background;
		g_object_set_data_full ((GObject*) _tmp4_, "background-loaded-handler", (gpointer) ((guintptr) 0), NULL);
	}
}

static void
___lambda42__clutter_actor_destroy (ClutterActor* _sender,
                                    gpointer self)
{
	__lambda42_ (self);
}

static MetaBackgroundActor*
greeter_compositor_background_manager_create_background_actor (GreeterCompositorBackgroundManager* self)
{
	Block12Data* _data12_;
	MetaDisplay* display = NULL;
	GreeterCompositorWindowManager* _tmp0_;
	MetaDisplay* _tmp1_;
	GreeterCompositorBackgroundSource* _tmp2_;
	gint _tmp3_;
	GreeterCompositorBackground* _tmp4_;
	MetaBackgroundActor* background_actor = NULL;
	MetaDisplay* _tmp5_;
	gint _tmp6_;
	MetaBackgroundActor* _tmp7_;
	MetaBackgroundContent* content = NULL;
	MetaBackgroundActor* _tmp8_;
	ClutterContent* _tmp9_;
	ClutterContent* _tmp10_;
	MetaBackgroundContent* _tmp11_;
	GreeterCompositorBackground* _tmp12_;
	MetaBackground* _tmp13_;
	MetaBackground* _tmp14_;
	MetaBackgroundActor* _tmp15_;
	MtkRectangle monitor = {0};
	MetaDisplay* _tmp16_;
	gint _tmp17_;
	MtkRectangle _tmp18_ = {0};
	MetaBackgroundActor* _tmp19_;
	MtkRectangle _tmp20_;
	MtkRectangle _tmp21_;
	gboolean _tmp22_;
	GreeterCompositorBackground* _tmp26_;
	gulong _tmp27_;
	MetaBackgroundActor* _tmp28_;
	MetaBackgroundActor* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data12_ = g_slice_new0 (Block12Data);
	_data12_->_ref_count_ = 1;
	_data12_->self = g_object_ref (self);
	_tmp0_ = self->priv->_wm;
	_tmp1_ = meta_plugin_get_display ((MetaPlugin*) _tmp0_);
	display = _tmp1_;
	_tmp2_ = self->priv->background_source;
	_tmp3_ = self->priv->_monitor_index;
	_tmp4_ = greeter_compositor_background_source_get_background (_tmp2_, _tmp3_);
	_data12_->background = _tmp4_;
	_tmp5_ = display;
	_tmp6_ = self->priv->_monitor_index;
	_tmp7_ = (MetaBackgroundActor*) meta_background_actor_new (_tmp5_, _tmp6_);
	g_object_ref_sink (_tmp7_);
	background_actor = _tmp7_;
	_tmp8_ = background_actor;
	_tmp9_ = clutter_actor_get_content ((ClutterActor*) _tmp8_);
	_tmp10_ = _tmp9_;
	content = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, meta_background_content_get_type (), MetaBackgroundContent);
	_tmp11_ = content;
	_tmp12_ = _data12_->background;
	_tmp13_ = greeter_compositor_background_get_background (_tmp12_);
	_tmp14_ = _tmp13_;
	g_object_set (_tmp11_, "background", _tmp14_, NULL);
	_tmp15_ = background_actor;
	clutter_actor_insert_child_below ((ClutterActor*) self, (ClutterActor*) _tmp15_, NULL);
	_tmp16_ = display;
	_tmp17_ = self->priv->_monitor_index;
	meta_display_get_monitor_geometry (_tmp16_, _tmp17_, &_tmp18_);
	monitor = _tmp18_;
	_tmp19_ = background_actor;
	_tmp20_ = monitor;
	_tmp21_ = monitor;
	clutter_actor_set_size ((ClutterActor*) _tmp19_, (gfloat) _tmp20_.width, (gfloat) _tmp21_.height);
	_tmp22_ = self->priv->_control_position;
	if (_tmp22_) {
		MetaBackgroundActor* _tmp23_;
		MtkRectangle _tmp24_;
		MtkRectangle _tmp25_;
		_tmp23_ = background_actor;
		_tmp24_ = monitor;
		_tmp25_ = monitor;
		clutter_actor_set_position ((ClutterActor*) _tmp23_, (gfloat) _tmp24_.x, (gfloat) _tmp25_.y);
	}
	_data12_->changed_handler = (gulong) 0;
	_tmp26_ = _data12_->background;
	_tmp27_ = g_signal_connect_data (_tmp26_, "changed", (GCallback) ___lambda41__greeter_compositor_background_changed, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
	_data12_->changed_handler = _tmp27_;
	_tmp28_ = background_actor;
	g_signal_connect_data ((ClutterActor*) _tmp28_, "destroy", (GCallback) ___lambda42__clutter_actor_destroy, block12_data_ref (_data12_), (GClosureNotify) block12_data_unref, 0);
	result = background_actor;
	block12_data_unref (_data12_);
	_data12_ = NULL;
	return result;
}

GreeterCompositorWindowManager*
greeter_compositor_background_manager_get_wm (GreeterCompositorBackgroundManager* 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_background_manager_set_wm (GreeterCompositorBackgroundManager* self,
                                              GreeterCompositorWindowManager* value)
{
	GreeterCompositorWindowManager* old_value;
	g_return_if_fail (self != NULL);
	old_value = greeter_compositor_background_manager_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_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_WM_PROPERTY]);
	}
}

gint
greeter_compositor_background_manager_get_monitor_index (GreeterCompositorBackgroundManager* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_monitor_index;
	return result;
}

static void
greeter_compositor_background_manager_set_monitor_index (GreeterCompositorBackgroundManager* self,
                                                         gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = greeter_compositor_background_manager_get_monitor_index (self);
	if (old_value != value) {
		self->priv->_monitor_index = value;
		g_object_notify_by_pspec ((GObject *) self, greeter_compositor_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_MONITOR_INDEX_PROPERTY]);
	}
}

gboolean
greeter_compositor_background_manager_get_control_position (GreeterCompositorBackgroundManager* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_control_position;
	return result;
}

static void
greeter_compositor_background_manager_set_control_position (GreeterCompositorBackgroundManager* self,
                                                            gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = greeter_compositor_background_manager_get_control_position (self);
	if (old_value != value) {
		self->priv->_control_position = value;
		g_object_notify_by_pspec ((GObject *) self, greeter_compositor_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_CONTROL_POSITION_PROPERTY]);
	}
}

MetaBackgroundActor*
greeter_compositor_background_manager_get_newest_background_actor (GreeterCompositorBackgroundManager* self)
{
	MetaBackgroundActor* result;
	MetaBackgroundActor* _tmp0_ = NULL;
	MetaBackgroundActor* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->new_background_actor;
	if (_tmp1_ != NULL) {
		MetaBackgroundActor* _tmp2_;
		_tmp2_ = self->priv->new_background_actor;
		_tmp0_ = _tmp2_;
	} else {
		MetaBackgroundActor* _tmp3_;
		_tmp3_ = self->priv->background_actor;
		_tmp0_ = _tmp3_;
	}
	result = _tmp0_;
	return result;
}

static void
_greeter_compositor_background_manager_on_destroy_clutter_actor_destroy (ClutterActor* _sender,
                                                                         gpointer self)
{
	greeter_compositor_background_manager_on_destroy ((GreeterCompositorBackgroundManager*) self);
}

static GObject *
greeter_compositor_background_manager_constructor (GType type,
                                                   guint n_construct_properties,
                                                   GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	GreeterCompositorBackgroundManager * self;
	GreeterCompositorBackgroundCache* _tmp0_;
	GreeterCompositorWindowManager* _tmp1_;
	MetaDisplay* _tmp2_;
	GreeterCompositorBackgroundSource* _tmp3_;
	parent_class = G_OBJECT_CLASS (greeter_compositor_background_manager_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, GreeterCompositorBackgroundManager);
	_tmp0_ = greeter_compositor_background_cache_get_default ();
	_tmp1_ = self->priv->_wm;
	_tmp2_ = meta_plugin_get_display ((MetaPlugin*) _tmp1_);
	_tmp3_ = greeter_compositor_background_cache_get_background_source (_tmp0_, _tmp2_);
	_g_object_unref0 (self->priv->background_source);
	self->priv->background_source = _tmp3_;
	greeter_compositor_background_manager_update_background_actor (self, FALSE);
	g_signal_connect_object ((ClutterActor*) self, "destroy", (GCallback) _greeter_compositor_background_manager_on_destroy_clutter_actor_destroy, self, 0);
	return obj;
}

static void
greeter_compositor_background_manager_class_init (GreeterCompositorBackgroundManagerClass * klass,
                                                  gpointer klass_data)
{
	greeter_compositor_background_manager_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GreeterCompositorBackgroundManager_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_greeter_compositor_background_manager_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_greeter_compositor_background_manager_set_property;
	G_OBJECT_CLASS (klass)->constructor = greeter_compositor_background_manager_constructor;
	G_OBJECT_CLASS (klass)->finalize = greeter_compositor_background_manager_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GREETER_COMPOSITOR_BACKGROUND_MANAGER_WM_PROPERTY, greeter_compositor_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_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_BACKGROUND_MANAGER_MONITOR_INDEX_PROPERTY, greeter_compositor_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_MONITOR_INDEX_PROPERTY] = g_param_spec_int ("monitor-index", "monitor-index", "monitor-index", G_MININT, G_MAXINT, 0, 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_BACKGROUND_MANAGER_CONTROL_POSITION_PROPERTY, greeter_compositor_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_CONTROL_POSITION_PROPERTY] = g_param_spec_boolean ("control-position", "control-position", "control-position", FALSE, 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_BACKGROUND_MANAGER_NEWEST_BACKGROUND_ACTOR_PROPERTY, greeter_compositor_background_manager_properties[GREETER_COMPOSITOR_BACKGROUND_MANAGER_NEWEST_BACKGROUND_ACTOR_PROPERTY] = g_param_spec_object ("newest-background-actor", "newest-background-actor", "newest-background-actor", meta_background_actor_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	greeter_compositor_background_manager_signals[GREETER_COMPOSITOR_BACKGROUND_MANAGER_CHANGED_SIGNAL] = g_signal_new ("changed", GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
greeter_compositor_background_manager_instance_init (GreeterCompositorBackgroundManager * self,
                                                     gpointer klass)
{
	self->priv = greeter_compositor_background_manager_get_instance_private (self);
	self->priv->new_background_actor = NULL;
}

static void
greeter_compositor_background_manager_finalize (GObject * obj)
{
	GreeterCompositorBackgroundManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, GreeterCompositorBackgroundManager);
	_g_object_unref0 (self->priv->_wm);
	_g_object_unref0 (self->priv->background_source);
	_g_object_unref0 (self->priv->background_actor);
	_g_object_unref0 (self->priv->new_background_actor);
	G_OBJECT_CLASS (greeter_compositor_background_manager_parent_class)->finalize (obj);
}

static GType
greeter_compositor_background_manager_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GreeterCompositorBackgroundManagerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) greeter_compositor_background_manager_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GreeterCompositorBackgroundManager), 0, (GInstanceInitFunc) greeter_compositor_background_manager_instance_init, NULL };
	GType greeter_compositor_background_manager_type_id;
	greeter_compositor_background_manager_type_id = g_type_register_static (meta_background_group_get_type (), "GreeterCompositorBackgroundManager", &g_define_type_info, 0);
	GreeterCompositorBackgroundManager_private_offset = g_type_add_instance_private (greeter_compositor_background_manager_type_id, sizeof (GreeterCompositorBackgroundManagerPrivate));
	return greeter_compositor_background_manager_type_id;
}

GType
greeter_compositor_background_manager_get_type (void)
{
	static volatile gsize greeter_compositor_background_manager_type_id__once = 0;
	if (g_once_init_enter (&greeter_compositor_background_manager_type_id__once)) {
		GType greeter_compositor_background_manager_type_id;
		greeter_compositor_background_manager_type_id = greeter_compositor_background_manager_get_type_once ();
		g_once_init_leave (&greeter_compositor_background_manager_type_id__once, greeter_compositor_background_manager_type_id);
	}
	return greeter_compositor_background_manager_type_id__once;
}

static void
_vala_greeter_compositor_background_manager_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec)
{
	GreeterCompositorBackgroundManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, GreeterCompositorBackgroundManager);
	switch (property_id) {
		case GREETER_COMPOSITOR_BACKGROUND_MANAGER_WM_PROPERTY:
		g_value_set_object (value, greeter_compositor_background_manager_get_wm (self));
		break;
		case GREETER_COMPOSITOR_BACKGROUND_MANAGER_MONITOR_INDEX_PROPERTY:
		g_value_set_int (value, greeter_compositor_background_manager_get_monitor_index (self));
		break;
		case GREETER_COMPOSITOR_BACKGROUND_MANAGER_CONTROL_POSITION_PROPERTY:
		g_value_set_boolean (value, greeter_compositor_background_manager_get_control_position (self));
		break;
		case GREETER_COMPOSITOR_BACKGROUND_MANAGER_NEWEST_BACKGROUND_ACTOR_PROPERTY:
		g_value_set_object (value, greeter_compositor_background_manager_get_newest_background_actor (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_greeter_compositor_background_manager_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec)
{
	GreeterCompositorBackgroundManager * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GREETER_COMPOSITOR_TYPE_BACKGROUND_MANAGER, GreeterCompositorBackgroundManager);
	switch (property_id) {
		case GREETER_COMPOSITOR_BACKGROUND_MANAGER_WM_PROPERTY:
		greeter_compositor_background_manager_set_wm (self, g_value_get_object (value));
		break;
		case GREETER_COMPOSITOR_BACKGROUND_MANAGER_MONITOR_INDEX_PROPERTY:
		greeter_compositor_background_manager_set_monitor_index (self, g_value_get_int (value));
		break;
		case GREETER_COMPOSITOR_BACKGROUND_MANAGER_CONTROL_POSITION_PROPERTY:
		greeter_compositor_background_manager_set_control_position (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

