/* interfaces.c generated by valac 0.56.19, the Vala compiler
 * generated from interfaces.vala, do not modify */

/*
 * Copyright (c) 2026 focus-timer contributors
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 *
 *
 * This module holds public interfaces for Peas extensions.
 */

#include "ft_ui.h"
#include <glib-object.h>
#include <glib.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

enum  {
	FT_APPLICATION_EXTENSION_0_PROPERTY,
	FT_APPLICATION_EXTENSION_NUM_PROPERTIES
};
static GParamSpec* ft_application_extension_properties[FT_APPLICATION_EXTENSION_NUM_PROPERTIES];
enum  {
	FT_WINDOW_EXTENSION_0_PROPERTY,
	FT_WINDOW_EXTENSION_WINDOW_PROPERTY,
	FT_WINDOW_EXTENSION_NUM_PROPERTIES
};
static GParamSpec* ft_window_extension_properties[FT_WINDOW_EXTENSION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
enum  {
	FT_PREFERENCES_WINDOW_EXTENSION_0_PROPERTY,
	FT_PREFERENCES_WINDOW_EXTENSION_WINDOW_PROPERTY,
	FT_PREFERENCES_WINDOW_EXTENSION_NUM_PROPERTIES
};
static GParamSpec* ft_preferences_window_extension_properties[FT_PREFERENCES_WINDOW_EXTENSION_NUM_PROPERTIES];

struct _FtWindowExtensionPrivate {
	GWeakRef window_ref;
};

struct _FtPreferencesWindowExtensionPrivate {
	GWeakRef window_ref;
};

static gpointer ft_application_extension_parent_class = NULL;
static gint FtWindowExtension_private_offset;
static gpointer ft_window_extension_parent_class = NULL;
static gint FtPreferencesWindowExtension_private_offset;
static gpointer ft_preferences_window_extension_parent_class = NULL;

static GType ft_application_extension_get_type_once (void);
static void ft_window_extension_finalize (GObject * obj);
static GType ft_window_extension_get_type_once (void);
static void _vala_ft_window_extension_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_ft_window_extension_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
static void ft_preferences_window_extension_finalize (GObject * obj);
static GType ft_preferences_window_extension_get_type_once (void);
static void _vala_ft_preferences_window_extension_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec);
static void _vala_ft_preferences_window_extension_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

FtApplicationExtension*
ft_application_extension_construct (GType object_type)
{
	FtApplicationExtension * self = NULL;
	self = (FtApplicationExtension*) g_object_new (object_type, NULL);
	return self;
}

static void
ft_application_extension_class_init (FtApplicationExtensionClass * klass,
                                     gpointer klass_data)
{
	ft_application_extension_parent_class = g_type_class_peek_parent (klass);
}

static void
ft_application_extension_instance_init (FtApplicationExtension * self,
                                        gpointer klass)
{
}

static GType
ft_application_extension_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtApplicationExtensionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_application_extension_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtApplicationExtension), 0, (GInstanceInitFunc) ft_application_extension_instance_init, NULL };
	GType ft_application_extension_type_id;
	ft_application_extension_type_id = g_type_register_static (G_TYPE_OBJECT, "FtApplicationExtension", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	return ft_application_extension_type_id;
}

GType
ft_application_extension_get_type (void)
{
	static volatile gsize ft_application_extension_type_id__once = 0;
	if (g_once_init_enter (&ft_application_extension_type_id__once)) {
		GType ft_application_extension_type_id;
		ft_application_extension_type_id = ft_application_extension_get_type_once ();
		g_once_init_leave (&ft_application_extension_type_id__once, ft_application_extension_type_id);
	}
	return ft_application_extension_type_id__once;
}

static inline gpointer
ft_window_extension_get_instance_private (FtWindowExtension* self)
{
	return G_STRUCT_MEMBER_P (self, FtWindowExtension_private_offset);
}

FtWindowExtension*
ft_window_extension_construct (GType object_type)
{
	FtWindowExtension * self = NULL;
	self = (FtWindowExtension*) g_object_new (object_type, NULL);
	return self;
}

FtWindow*
ft_window_extension_get_window (FtWindowExtension* self)
{
	FtWindow* result;
	GObject* _tmp0_;
	FtWindow* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_weak_ref_get (&self->priv->window_ref);
	_tmp1_ = FT_IS_WINDOW (_tmp0_) ? ((FtWindow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	result = _tmp1_;
	return result;
}

void
ft_window_extension_set_window (FtWindowExtension* self,
                                FtWindow* value)
{
	g_return_if_fail (self != NULL);
	g_weak_ref_set (&self->priv->window_ref, (GObject*) value);
	g_object_notify_by_pspec ((GObject *) self, ft_window_extension_properties[FT_WINDOW_EXTENSION_WINDOW_PROPERTY]);
}

static void
ft_window_extension_class_init (FtWindowExtensionClass * klass,
                                gpointer klass_data)
{
	ft_window_extension_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtWindowExtension_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_ft_window_extension_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_ft_window_extension_set_property;
	G_OBJECT_CLASS (klass)->finalize = ft_window_extension_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_WINDOW_EXTENSION_WINDOW_PROPERTY, ft_window_extension_properties[FT_WINDOW_EXTENSION_WINDOW_PROPERTY] = g_param_spec_object ("window", "window", "window", FT_TYPE_WINDOW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
ft_window_extension_instance_init (FtWindowExtension * self,
                                   gpointer klass)
{
	self->priv = ft_window_extension_get_instance_private (self);
}

static void
ft_window_extension_finalize (GObject * obj)
{
	FtWindowExtension * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_WINDOW_EXTENSION, FtWindowExtension);
	g_weak_ref_clear (&self->priv->window_ref);
	G_OBJECT_CLASS (ft_window_extension_parent_class)->finalize (obj);
}

static GType
ft_window_extension_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtWindowExtensionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_window_extension_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtWindowExtension), 0, (GInstanceInitFunc) ft_window_extension_instance_init, NULL };
	GType ft_window_extension_type_id;
	ft_window_extension_type_id = g_type_register_static (G_TYPE_OBJECT, "FtWindowExtension", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	FtWindowExtension_private_offset = g_type_add_instance_private (ft_window_extension_type_id, sizeof (FtWindowExtensionPrivate));
	return ft_window_extension_type_id;
}

GType
ft_window_extension_get_type (void)
{
	static volatile gsize ft_window_extension_type_id__once = 0;
	if (g_once_init_enter (&ft_window_extension_type_id__once)) {
		GType ft_window_extension_type_id;
		ft_window_extension_type_id = ft_window_extension_get_type_once ();
		g_once_init_leave (&ft_window_extension_type_id__once, ft_window_extension_type_id);
	}
	return ft_window_extension_type_id__once;
}

static void
_vala_ft_window_extension_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	FtWindowExtension * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_WINDOW_EXTENSION, FtWindowExtension);
	switch (property_id) {
		case FT_WINDOW_EXTENSION_WINDOW_PROPERTY:
		g_value_take_object (value, ft_window_extension_get_window (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_ft_window_extension_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	FtWindowExtension * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_WINDOW_EXTENSION, FtWindowExtension);
	switch (property_id) {
		case FT_WINDOW_EXTENSION_WINDOW_PROPERTY:
		ft_window_extension_set_window (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
ft_preferences_window_extension_get_instance_private (FtPreferencesWindowExtension* self)
{
	return G_STRUCT_MEMBER_P (self, FtPreferencesWindowExtension_private_offset);
}

FtPreferencesWindowExtension*
ft_preferences_window_extension_construct (GType object_type)
{
	FtPreferencesWindowExtension * self = NULL;
	self = (FtPreferencesWindowExtension*) g_object_new (object_type, NULL);
	return self;
}

FtPreferencesWindow*
ft_preferences_window_extension_get_window (FtPreferencesWindowExtension* self)
{
	FtPreferencesWindow* result;
	GObject* _tmp0_;
	FtPreferencesWindow* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_weak_ref_get (&self->priv->window_ref);
	_tmp1_ = FT_IS_PREFERENCES_WINDOW (_tmp0_) ? ((FtPreferencesWindow*) _tmp0_) : NULL;
	if (_tmp1_ == NULL) {
		_g_object_unref0 (_tmp0_);
	}
	result = _tmp1_;
	return result;
}

void
ft_preferences_window_extension_set_window (FtPreferencesWindowExtension* self,
                                            FtPreferencesWindow* value)
{
	g_return_if_fail (self != NULL);
	g_weak_ref_set (&self->priv->window_ref, (GObject*) value);
	g_object_notify_by_pspec ((GObject *) self, ft_preferences_window_extension_properties[FT_PREFERENCES_WINDOW_EXTENSION_WINDOW_PROPERTY]);
}

static void
ft_preferences_window_extension_class_init (FtPreferencesWindowExtensionClass * klass,
                                            gpointer klass_data)
{
	ft_preferences_window_extension_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &FtPreferencesWindowExtension_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_ft_preferences_window_extension_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_ft_preferences_window_extension_set_property;
	G_OBJECT_CLASS (klass)->finalize = ft_preferences_window_extension_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), FT_PREFERENCES_WINDOW_EXTENSION_WINDOW_PROPERTY, ft_preferences_window_extension_properties[FT_PREFERENCES_WINDOW_EXTENSION_WINDOW_PROPERTY] = g_param_spec_object ("window", "window", "window", FT_TYPE_PREFERENCES_WINDOW, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
ft_preferences_window_extension_instance_init (FtPreferencesWindowExtension * self,
                                               gpointer klass)
{
	self->priv = ft_preferences_window_extension_get_instance_private (self);
}

static void
ft_preferences_window_extension_finalize (GObject * obj)
{
	FtPreferencesWindowExtension * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, FT_TYPE_PREFERENCES_WINDOW_EXTENSION, FtPreferencesWindowExtension);
	g_weak_ref_clear (&self->priv->window_ref);
	G_OBJECT_CLASS (ft_preferences_window_extension_parent_class)->finalize (obj);
}

static GType
ft_preferences_window_extension_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (FtPreferencesWindowExtensionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ft_preferences_window_extension_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (FtPreferencesWindowExtension), 0, (GInstanceInitFunc) ft_preferences_window_extension_instance_init, NULL };
	GType ft_preferences_window_extension_type_id;
	ft_preferences_window_extension_type_id = g_type_register_static (G_TYPE_OBJECT, "FtPreferencesWindowExtension", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	FtPreferencesWindowExtension_private_offset = g_type_add_instance_private (ft_preferences_window_extension_type_id, sizeof (FtPreferencesWindowExtensionPrivate));
	return ft_preferences_window_extension_type_id;
}

GType
ft_preferences_window_extension_get_type (void)
{
	static volatile gsize ft_preferences_window_extension_type_id__once = 0;
	if (g_once_init_enter (&ft_preferences_window_extension_type_id__once)) {
		GType ft_preferences_window_extension_type_id;
		ft_preferences_window_extension_type_id = ft_preferences_window_extension_get_type_once ();
		g_once_init_leave (&ft_preferences_window_extension_type_id__once, ft_preferences_window_extension_type_id);
	}
	return ft_preferences_window_extension_type_id__once;
}

static void
_vala_ft_preferences_window_extension_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec)
{
	FtPreferencesWindowExtension * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_PREFERENCES_WINDOW_EXTENSION, FtPreferencesWindowExtension);
	switch (property_id) {
		case FT_PREFERENCES_WINDOW_EXTENSION_WINDOW_PROPERTY:
		g_value_take_object (value, ft_preferences_window_extension_get_window (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_ft_preferences_window_extension_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec)
{
	FtPreferencesWindowExtension * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, FT_TYPE_PREFERENCES_WINDOW_EXTENSION, FtPreferencesWindowExtension);
	switch (property_id) {
		case FT_PREFERENCES_WINDOW_EXTENSION_WINDOW_PROPERTY:
		ft_preferences_window_extension_set_window (self, g_value_get_object (value));
		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;
}

