/* screen-saver-provider.c generated by valac 0.56.19, the Vala compiler
 * generated from screen-saver-provider.vala, do not modify */

/*
 * Copyright (c) 2026 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include "ft_core.h"
#include <glib-object.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include "ft_ui.h"
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER (ft_default_screen_saver_provider_get_type ())
#define FT_DEFAULT_SCREEN_SAVER_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER, FtDefaultScreenSaverProvider))
#define FT_DEFAULT_SCREEN_SAVER_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER, FtDefaultScreenSaverProviderClass))
#define FT_IS_DEFAULT_SCREEN_SAVER_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER))
#define FT_IS_DEFAULT_SCREEN_SAVER_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER))
#define FT_DEFAULT_SCREEN_SAVER_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER, FtDefaultScreenSaverProviderClass))

typedef struct _FtDefaultScreenSaverProvider FtDefaultScreenSaverProvider;
typedef struct _FtDefaultScreenSaverProviderClass FtDefaultScreenSaverProviderClass;
typedef struct _FtDefaultScreenSaverProviderPrivate FtDefaultScreenSaverProviderPrivate;
enum  {
	FT_DEFAULT_SCREEN_SAVER_PROVIDER_0_PROPERTY,
	FT_DEFAULT_SCREEN_SAVER_PROVIDER_ACTIVE_PROPERTY,
	FT_DEFAULT_SCREEN_SAVER_PROVIDER_NUM_PROPERTIES
};
static GParamSpec* ft_default_screen_saver_provider_properties[FT_DEFAULT_SCREEN_SAVER_PROVIDER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _FtDefaultScreenSaverProviderInitializeData FtDefaultScreenSaverProviderInitializeData;
typedef struct _FtDefaultScreenSaverProviderUninitializeData FtDefaultScreenSaverProviderUninitializeData;
typedef struct _FtDefaultScreenSaverProviderEnableData FtDefaultScreenSaverProviderEnableData;
typedef struct _FtDefaultScreenSaverProviderDisableData FtDefaultScreenSaverProviderDisableData;

struct _FtDefaultScreenSaverProvider {
	FtProvider parent_instance;
	FtDefaultScreenSaverProviderPrivate * priv;
};

struct _FtDefaultScreenSaverProviderClass {
	FtProviderClass parent_class;
};

struct _FtDefaultScreenSaverProviderPrivate {
	gboolean _active;
	GtkApplication* application;
};

struct _FtDefaultScreenSaverProviderInitializeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultScreenSaverProvider* self;
	GCancellable* cancellable;
};

struct _FtDefaultScreenSaverProviderUninitializeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultScreenSaverProvider* self;
};

struct _FtDefaultScreenSaverProviderEnableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultScreenSaverProvider* self;
	GCancellable* cancellable;
	FtApplication* _tmp0_;
	GtkApplication* _tmp1_;
	GtkApplication* _tmp2_;
};

struct _FtDefaultScreenSaverProviderDisableData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	FtDefaultScreenSaverProvider* self;
	GtkApplication* _tmp0_;
	GtkApplication* _tmp1_;
	guint _tmp2_;
	GQuark _tmp3_;
};

static gint FtDefaultScreenSaverProvider_private_offset;
static gpointer ft_default_screen_saver_provider_parent_class = NULL;
static FtScreenSaverProviderIface * ft_default_screen_saver_provider_ft_screen_saver_provider_parent_iface = NULL;

VALA_EXTERN GType ft_default_screen_saver_provider_get_type (void) G_GNUC_CONST ;
static void ft_default_screen_saver_provider_on_notify_screensaver_active (FtDefaultScreenSaverProvider* self,
                                                                    GObject* obj,
                                                                    GParamSpec* pspec);
static void ft_default_screen_saver_provider_real_initialize_data_free (gpointer _data);
static void ft_default_screen_saver_provider_real_initialize (FtProvider* base,
                                                       GCancellable* cancellable,
                                                       GAsyncReadyCallback _callback_,
                                                       gpointer _user_data_);
static gboolean ft_default_screen_saver_provider_real_initialize_co (FtDefaultScreenSaverProviderInitializeData* _data_);
static void ft_default_screen_saver_provider_real_uninitialize_data_free (gpointer _data);
static void ft_default_screen_saver_provider_real_uninitialize (FtProvider* base,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
static gboolean ft_default_screen_saver_provider_real_uninitialize_co (FtDefaultScreenSaverProviderUninitializeData* _data_);
static void ft_default_screen_saver_provider_real_enable_data_free (gpointer _data);
static void ft_default_screen_saver_provider_real_enable (FtProvider* base,
                                                   GCancellable* cancellable,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
static gboolean ft_default_screen_saver_provider_real_enable_co (FtDefaultScreenSaverProviderEnableData* _data_);
static void _ft_default_screen_saver_provider_on_notify_screensaver_active_g_object_notify (GObject* _sender,
                                                                                     GParamSpec* pspec,
                                                                                     gpointer self);
static void ft_default_screen_saver_provider_real_disable_data_free (gpointer _data);
static void ft_default_screen_saver_provider_real_disable (FtProvider* base,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
static gboolean ft_default_screen_saver_provider_real_disable_co (FtDefaultScreenSaverProviderDisableData* _data_);
VALA_EXTERN FtDefaultScreenSaverProvider* ft_default_screen_saver_provider_new (void);
VALA_EXTERN FtDefaultScreenSaverProvider* ft_default_screen_saver_provider_construct (GType object_type);
static void ft_default_screen_saver_provider_finalize (GObject * obj);
static GType ft_default_screen_saver_provider_get_type_once (void);
static void _vala_ft_default_screen_saver_provider_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
ft_default_screen_saver_provider_get_instance_private (FtDefaultScreenSaverProvider* self)
{
	return G_STRUCT_MEMBER_P (self, FtDefaultScreenSaverProvider_private_offset);
}

static void
ft_default_screen_saver_provider_on_notify_screensaver_active (FtDefaultScreenSaverProvider* self,
                                                               GObject* obj,
                                                               GParamSpec* pspec)
{
	gboolean active = FALSE;
	GtkApplication* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (obj != NULL);
	g_return_if_fail (pspec != NULL);
	_tmp0_ = self->priv->application;
	g_object_get (_tmp0_, "screensaver-active", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	active = _tmp2_;
	if (self->priv->_active != active) {
		self->priv->_active = active;
		g_object_notify ((GObject*) self, "active");
	}
}

static void
ft_default_screen_saver_provider_real_initialize_data_free (gpointer _data)
{
	FtDefaultScreenSaverProviderInitializeData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultScreenSaverProviderInitializeData, _data_);
}

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

static void
ft_default_screen_saver_provider_real_initialize (FtProvider* base,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_)
{
	FtDefaultScreenSaverProvider * self;
	FtDefaultScreenSaverProviderInitializeData* _data_;
	FtDefaultScreenSaverProvider* _tmp0_;
	GCancellable* _tmp1_;
	self = (FtDefaultScreenSaverProvider*) base;
	_data_ = g_slice_new0 (FtDefaultScreenSaverProviderInitializeData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_screen_saver_provider_real_initialize_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	ft_default_screen_saver_provider_real_initialize_co (_data_);
}

static void
ft_default_screen_saver_provider_initialize_finish (FtProvider* base,
                                                    GAsyncResult* _res_,
                                                    GError** error)
{
	FtDefaultScreenSaverProviderInitializeData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
ft_default_screen_saver_provider_real_initialize_co (FtDefaultScreenSaverProviderInitializeData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	ft_provider_set_available ((FtProvider*) _data_->self, TRUE);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
ft_default_screen_saver_provider_real_uninitialize_data_free (gpointer _data)
{
	FtDefaultScreenSaverProviderUninitializeData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultScreenSaverProviderUninitializeData, _data_);
}

static void
ft_default_screen_saver_provider_real_uninitialize (FtProvider* base,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_)
{
	FtDefaultScreenSaverProvider * self;
	FtDefaultScreenSaverProviderUninitializeData* _data_;
	FtDefaultScreenSaverProvider* _tmp0_;
	self = (FtDefaultScreenSaverProvider*) base;
	_data_ = g_slice_new0 (FtDefaultScreenSaverProviderUninitializeData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_screen_saver_provider_real_uninitialize_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	ft_default_screen_saver_provider_real_uninitialize_co (_data_);
}

static void
ft_default_screen_saver_provider_uninitialize_finish (FtProvider* base,
                                                      GAsyncResult* _res_,
                                                      GError** error)
{
	FtDefaultScreenSaverProviderUninitializeData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
ft_default_screen_saver_provider_real_uninitialize_co (FtDefaultScreenSaverProviderUninitializeData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
ft_default_screen_saver_provider_real_enable_data_free (gpointer _data)
{
	FtDefaultScreenSaverProviderEnableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultScreenSaverProviderEnableData, _data_);
}

static void
ft_default_screen_saver_provider_real_enable (FtProvider* base,
                                              GCancellable* cancellable,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_)
{
	FtDefaultScreenSaverProvider * self;
	FtDefaultScreenSaverProviderEnableData* _data_;
	FtDefaultScreenSaverProvider* _tmp0_;
	GCancellable* _tmp1_;
	self = (FtDefaultScreenSaverProvider*) base;
	_data_ = g_slice_new0 (FtDefaultScreenSaverProviderEnableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_screen_saver_provider_real_enable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	ft_default_screen_saver_provider_real_enable_co (_data_);
}

static void
ft_default_screen_saver_provider_enable_finish (FtProvider* base,
                                                GAsyncResult* _res_,
                                                GError** error)
{
	FtDefaultScreenSaverProviderEnableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static void
_ft_default_screen_saver_provider_on_notify_screensaver_active_g_object_notify (GObject* _sender,
                                                                                GParamSpec* pspec,
                                                                                gpointer self)
{
	ft_default_screen_saver_provider_on_notify_screensaver_active ((FtDefaultScreenSaverProvider*) self, _sender, pspec);
}

static gboolean
ft_default_screen_saver_provider_real_enable_co (FtDefaultScreenSaverProviderEnableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ft_application_get_default ();
	_data_->_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_data_->_tmp0_, gtk_application_get_type (), GtkApplication));
	_g_object_unref0 (_data_->self->priv->application);
	_data_->self->priv->application = _data_->_tmp1_;
	_data_->_tmp2_ = _data_->self->priv->application;
	g_signal_connect_object ((GObject*) _data_->_tmp2_, "notify::screensaver-active", (GCallback) _ft_default_screen_saver_provider_on_notify_screensaver_active_g_object_notify, _data_->self, 0);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
ft_default_screen_saver_provider_real_disable_data_free (gpointer _data)
{
	FtDefaultScreenSaverProviderDisableData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (FtDefaultScreenSaverProviderDisableData, _data_);
}

static void
ft_default_screen_saver_provider_real_disable (FtProvider* base,
                                               GAsyncReadyCallback _callback_,
                                               gpointer _user_data_)
{
	FtDefaultScreenSaverProvider * self;
	FtDefaultScreenSaverProviderDisableData* _data_;
	FtDefaultScreenSaverProvider* _tmp0_;
	self = (FtDefaultScreenSaverProvider*) base;
	_data_ = g_slice_new0 (FtDefaultScreenSaverProviderDisableData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, ft_default_screen_saver_provider_real_disable_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	ft_default_screen_saver_provider_real_disable_co (_data_);
}

static void
ft_default_screen_saver_provider_disable_finish (FtProvider* base,
                                                 GAsyncResult* _res_,
                                                 GError** error)
{
	FtDefaultScreenSaverProviderDisableData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return;
	}
}

static gboolean
ft_default_screen_saver_provider_real_disable_co (FtDefaultScreenSaverProviderDisableData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->application;
	if (_data_->_tmp0_ != NULL) {
		_data_->_tmp1_ = _data_->self->priv->application;
		g_signal_parse_name ("notify::screensaver-active", G_TYPE_OBJECT, &_data_->_tmp2_, &_data_->_tmp3_, TRUE);
		g_signal_handlers_disconnect_matched ((GObject*) _data_->_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_DETAIL | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _data_->_tmp2_, _data_->_tmp3_, NULL, (GCallback) _ft_default_screen_saver_provider_on_notify_screensaver_active_g_object_notify, _data_->self);
		_g_object_unref0 (_data_->self->priv->application);
		_data_->self->priv->application = NULL;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

FtDefaultScreenSaverProvider*
ft_default_screen_saver_provider_construct (GType object_type)
{
	FtDefaultScreenSaverProvider * self = NULL;
	self = (FtDefaultScreenSaverProvider*) ft_provider_construct (object_type);
	return self;
}

FtDefaultScreenSaverProvider*
ft_default_screen_saver_provider_new (void)
{
	return ft_default_screen_saver_provider_construct (FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER);
}

static gboolean
ft_default_screen_saver_provider_real_get_active (FtScreenSaverProvider* base)
{
	gboolean result;
	FtDefaultScreenSaverProvider* self;
	self = (FtDefaultScreenSaverProvider*) base;
	result = self->priv->_active;
	return result;
}

static void
ft_default_screen_saver_provider_class_init (FtDefaultScreenSaverProviderClass * klass,
                                             gpointer klass_data)
{
	ft_default_screen_saver_provider_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtDefaultScreenSaverProvider_private_offset);
	((FtProviderClass *) klass)->initialize = (void (*) (FtProvider*, GCancellable*, GAsyncReadyCallback, gpointer)) ft_default_screen_saver_provider_real_initialize;
	((FtProviderClass *) klass)->initialize_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_screen_saver_provider_initialize_finish;
	((FtProviderClass *) klass)->uninitialize = (void (*) (FtProvider*, GAsyncReadyCallback, gpointer)) ft_default_screen_saver_provider_real_uninitialize;
	((FtProviderClass *) klass)->uninitialize_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_screen_saver_provider_uninitialize_finish;
	((FtProviderClass *) klass)->enable = (void (*) (FtProvider*, GCancellable*, GAsyncReadyCallback, gpointer)) ft_default_screen_saver_provider_real_enable;
	((FtProviderClass *) klass)->enable_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_screen_saver_provider_enable_finish;
	((FtProviderClass *) klass)->disable = (void (*) (FtProvider*, GAsyncReadyCallback, gpointer)) ft_default_screen_saver_provider_real_disable;
	((FtProviderClass *) klass)->disable_finish = (void (*) (FtProvider*, GAsyncResult*, GError**)) ft_default_screen_saver_provider_disable_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_ft_default_screen_saver_provider_get_property;
	G_OBJECT_CLASS (klass)->finalize = ft_default_screen_saver_provider_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_DEFAULT_SCREEN_SAVER_PROVIDER_ACTIVE_PROPERTY, ft_default_screen_saver_provider_properties[FT_DEFAULT_SCREEN_SAVER_PROVIDER_ACTIVE_PROPERTY] = g_param_spec_boolean ("active", "active", "active", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
ft_default_screen_saver_provider_ft_screen_saver_provider_interface_init (FtScreenSaverProviderIface * iface,
                                                                          gpointer iface_data)
{
	ft_default_screen_saver_provider_ft_screen_saver_provider_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_active = ft_default_screen_saver_provider_real_get_active;
}

static void
ft_default_screen_saver_provider_instance_init (FtDefaultScreenSaverProvider * self,
                                                gpointer klass)
{
	self->priv = ft_default_screen_saver_provider_get_instance_private (self);
	self->priv->_active = FALSE;
	self->priv->application = NULL;
}

static void
ft_default_screen_saver_provider_finalize (GObject * obj)
{
	FtDefaultScreenSaverProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER, FtDefaultScreenSaverProvider);
	_g_object_unref0 (self->priv->application);
	G_OBJECT_CLASS (ft_default_screen_saver_provider_parent_class)->finalize (obj);
}

static GType
ft_default_screen_saver_provider_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtDefaultScreenSaverProviderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_default_screen_saver_provider_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtDefaultScreenSaverProvider), 0, (GInstanceInitFunc) ft_default_screen_saver_provider_instance_init, NULL };
	static const GInterfaceInfo ft_screen_saver_provider_info = { (GInterfaceInitFunc) ft_default_screen_saver_provider_ft_screen_saver_provider_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType ft_default_screen_saver_provider_type_id;
	ft_default_screen_saver_provider_type_id = g_type_register_static (FT_TYPE_PROVIDER, "FtDefaultScreenSaverProvider", &g_define_type_info, 0);
	g_type_add_interface_static (ft_default_screen_saver_provider_type_id, FT_TYPE_SCREEN_SAVER_PROVIDER, &ft_screen_saver_provider_info);
	FtDefaultScreenSaverProvider_private_offset = g_type_add_instance_private (ft_default_screen_saver_provider_type_id, sizeof (FtDefaultScreenSaverProviderPrivate));
	return ft_default_screen_saver_provider_type_id;
}

GType
ft_default_screen_saver_provider_get_type (void)
{
	static volatile gsize ft_default_screen_saver_provider_type_id__once = 0;
	if (g_once_init_enter (&ft_default_screen_saver_provider_type_id__once)) {
		GType ft_default_screen_saver_provider_type_id;
		ft_default_screen_saver_provider_type_id = ft_default_screen_saver_provider_get_type_once ();
		g_once_init_leave (&ft_default_screen_saver_provider_type_id__once, ft_default_screen_saver_provider_type_id);
	}
	return ft_default_screen_saver_provider_type_id__once;
}

static void
_vala_ft_default_screen_saver_provider_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	FtDefaultScreenSaverProvider * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_DEFAULT_SCREEN_SAVER_PROVIDER, FtDefaultScreenSaverProvider);
	switch (property_id) {
		case FT_DEFAULT_SCREEN_SAVER_PROVIDER_ACTIVE_PROPERTY:
		g_value_set_boolean (value, ft_screen_saver_provider_get_active ((FtScreenSaverProvider*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

