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

/*
* Copyright © 2025 Alain M. (https://github.com/alainm23/planify)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Alain M. <alainmh23@gmail.com>
*/

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gio/gio.h>
#include <float.h>
#include <math.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 WIDGETS_TYPE_COMBO_WRAP_ROW (widgets_combo_wrap_row_get_type ())
#define WIDGETS_COMBO_WRAP_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRow))
#define WIDGETS_COMBO_WRAP_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRowClass))
#define WIDGETS_IS_COMBO_WRAP_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_COMBO_WRAP_ROW))
#define WIDGETS_IS_COMBO_WRAP_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_COMBO_WRAP_ROW))
#define WIDGETS_COMBO_WRAP_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRowClass))

typedef struct _WidgetsComboWrapRow WidgetsComboWrapRow;
typedef struct _WidgetsComboWrapRowClass WidgetsComboWrapRowClass;
typedef struct _WidgetsComboWrapRowPrivate WidgetsComboWrapRowPrivate;
enum  {
	WIDGETS_COMBO_WRAP_ROW_0_PROPERTY,
	WIDGETS_COMBO_WRAP_ROW_TITLE_PROPERTY,
	WIDGETS_COMBO_WRAP_ROW_SUBTITLE_PROPERTY,
	WIDGETS_COMBO_WRAP_ROW_MODEL_PROPERTY,
	WIDGETS_COMBO_WRAP_ROW_SELECTED_PROPERTY,
	WIDGETS_COMBO_WRAP_ROW_NUM_PROPERTIES
};
static GParamSpec* widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block61Data Block61Data;

struct _WidgetsComboWrapRow {
	AdwPreferencesRow parent_instance;
	WidgetsComboWrapRowPrivate * priv;
};

struct _WidgetsComboWrapRowClass {
	AdwPreferencesRowClass parent_class;
};

struct _WidgetsComboWrapRowPrivate {
	GtkLabel* _title_label;
	GtkLabel* _subtitle_label;
	AdwWrapBox* _wrap_box;
};

struct _Block61Data {
	int _ref_count_;
	WidgetsComboWrapRow* self;
	gint index;
};

static gint WidgetsComboWrapRow_private_offset;
static gpointer widgets_combo_wrap_row_parent_class = NULL;

VALA_EXTERN GType widgets_combo_wrap_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsComboWrapRow, g_object_unref)
VALA_EXTERN WidgetsComboWrapRow* widgets_combo_wrap_row_new (void);
VALA_EXTERN WidgetsComboWrapRow* widgets_combo_wrap_row_construct (GType object_type);
VALA_EXTERN gchar* widgets_combo_wrap_row_get_title (WidgetsComboWrapRow* self);
VALA_EXTERN void widgets_combo_wrap_row_set_title (WidgetsComboWrapRow* self,
                                       const gchar* value);
VALA_EXTERN gchar* widgets_combo_wrap_row_get_subtitle (WidgetsComboWrapRow* self);
VALA_EXTERN void widgets_combo_wrap_row_set_subtitle (WidgetsComboWrapRow* self,
                                          const gchar* value);
VALA_EXTERN void widgets_combo_wrap_row_set_model (WidgetsComboWrapRow* self,
                                       GtkStringList* value);
static Block61Data* block61_data_ref (Block61Data* _data61_);
static void block61_data_unref (void * _userdata_);
static void _widgets_combo_wrap_row_model______lambda24_ (Block61Data* _data61_);
VALA_EXTERN void widgets_combo_wrap_row_set_selected (WidgetsComboWrapRow* self,
                                          gint value);
static void __widgets_combo_wrap_row_model______lambda24__gtk_button_clicked (GtkButton* _sender,
                                                                       gpointer self);
VALA_EXTERN gint widgets_combo_wrap_row_get_selected (WidgetsComboWrapRow* self);
static GObject * widgets_combo_wrap_row_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties);
static void widgets_combo_wrap_row_finalize (GObject * obj);
static GType widgets_combo_wrap_row_get_type_once (void);
static void _vala_widgets_combo_wrap_row_get_property (GObject * object,
                                                guint property_id,
                                                GValue * value,
                                                GParamSpec * pspec);
static void _vala_widgets_combo_wrap_row_set_property (GObject * object,
                                                guint property_id,
                                                const GValue * value,
                                                GParamSpec * pspec);

static inline gpointer
widgets_combo_wrap_row_get_instance_private (WidgetsComboWrapRow* self)
{
	return G_STRUCT_MEMBER_P (self, WidgetsComboWrapRow_private_offset);
}

WidgetsComboWrapRow*
widgets_combo_wrap_row_construct (GType object_type)
{
	WidgetsComboWrapRow * self = NULL;
	self = (WidgetsComboWrapRow*) g_object_new (object_type, NULL);
	return self;
}

WidgetsComboWrapRow*
widgets_combo_wrap_row_new (void)
{
	return widgets_combo_wrap_row_construct (WIDGETS_TYPE_COMBO_WRAP_ROW);
}

gchar*
widgets_combo_wrap_row_get_title (WidgetsComboWrapRow* self)
{
	gchar* result;
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title_label;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

void
widgets_combo_wrap_row_set_title (WidgetsComboWrapRow* self,
                                  const gchar* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_title_label;
	gtk_label_set_label (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_TITLE_PROPERTY]);
}

gchar*
widgets_combo_wrap_row_get_subtitle (WidgetsComboWrapRow* self)
{
	gchar* result;
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_subtitle_label;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = g_strdup (_tmp2_);
	result = _tmp3_;
	return result;
}

void
widgets_combo_wrap_row_set_subtitle (WidgetsComboWrapRow* self,
                                     const gchar* value)
{
	GtkLabel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_subtitle_label;
	gtk_label_set_label (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_SUBTITLE_PROPERTY]);
}

static Block61Data*
block61_data_ref (Block61Data* _data61_)
{
	g_atomic_int_inc (&_data61_->_ref_count_);
	return _data61_;
}

static void
block61_data_unref (void * _userdata_)
{
	Block61Data* _data61_;
	_data61_ = (Block61Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data61_->_ref_count_)) {
		WidgetsComboWrapRow* self;
		self = _data61_->self;
		_g_object_unref0 (self);
		g_slice_free (Block61Data, _data61_);
	}
}

static void
_widgets_combo_wrap_row_model______lambda24_ (Block61Data* _data61_)
{
	WidgetsComboWrapRow* self;
	self = _data61_->self;
	widgets_combo_wrap_row_set_selected (self, _data61_->index);
}

static void
__widgets_combo_wrap_row_model______lambda24__gtk_button_clicked (GtkButton* _sender,
                                                                  gpointer self)
{
	_widgets_combo_wrap_row_model______lambda24_ (self);
}

void
widgets_combo_wrap_row_set_model (WidgetsComboWrapRow* self,
                                  GtkStringList* value)
{
	g_return_if_fail (self != NULL);
	{
		guint i = 0U;
		i = (guint) 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				Block61Data* _data61_;
				GtkButton* button = NULL;
				const gchar* _tmp2_;
				GtkButton* _tmp3_;
				GtkButton* _tmp4_;
				GtkButton* _tmp5_;
				GtkButton* _tmp6_;
				AdwWrapBox* _tmp7_;
				GtkButton* _tmp8_;
				_data61_ = g_slice_new0 (Block61Data);
				_data61_->_ref_count_ = 1;
				_data61_->self = g_object_ref (self);
				if (!_tmp0_) {
					guint _tmp1_;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				if (!(i < g_list_model_get_n_items ((GListModel*) value))) {
					block61_data_unref (_data61_);
					_data61_ = NULL;
					break;
				}
				_tmp2_ = gtk_string_list_get_string (value, i);
				_tmp3_ = (GtkButton*) gtk_button_new_with_label (_tmp2_);
				g_object_ref_sink (_tmp3_);
				button = _tmp3_;
				_tmp4_ = button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp4_, "tiny-button");
				_tmp5_ = button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp5_, "caption");
				_data61_->index = (gint) i;
				_tmp6_ = button;
				g_signal_connect_data (_tmp6_, "clicked", (GCallback) __widgets_combo_wrap_row_model______lambda24__gtk_button_clicked, block61_data_ref (_data61_), (GClosureNotify) block61_data_unref, 0);
				_tmp7_ = self->priv->_wrap_box;
				_tmp8_ = button;
				adw_wrap_box_append (_tmp7_, (GtkWidget*) _tmp8_);
				_g_object_unref0 (button);
				block61_data_unref (_data61_);
				_data61_ = NULL;
			}
		}
	}
	g_object_notify_by_pspec ((GObject *) self, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_MODEL_PROPERTY]);
}

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

gint
widgets_combo_wrap_row_get_selected (WidgetsComboWrapRow* self)
{
	gint result;
	GtkWidget* child = NULL;
	AdwWrapBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gint index = 0;
	g_return_val_if_fail (self != NULL, -1);
	_tmp0_ = self->priv->_wrap_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	index = 0;
	while (TRUE) {
		GtkWidget* _tmp3_;
		gboolean _tmp4_ = FALSE;
		GtkWidget* _tmp5_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		gint _tmp10_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp5_ = child;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp5_, gtk_button_get_type ())) {
			GtkWidget* _tmp6_;
			_tmp6_ = child;
			_tmp4_ = gtk_widget_has_css_class ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_button_get_type (), GtkButton), "color-primary");
		} else {
			_tmp4_ = FALSE;
		}
		if (_tmp4_) {
			result = index;
			_g_object_unref0 (child);
			return result;
		}
		_tmp7_ = child;
		_tmp8_ = gtk_widget_get_next_sibling (_tmp7_);
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_g_object_unref0 (child);
		child = _tmp9_;
		_tmp10_ = index;
		index = _tmp10_ + 1;
	}
	result = -1;
	_g_object_unref0 (child);
	return result;
}

void
widgets_combo_wrap_row_set_selected (WidgetsComboWrapRow* self,
                                     gint value)
{
	GtkWidget* child = NULL;
	AdwWrapBox* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	gint index = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_wrap_box;
	_tmp1_ = gtk_widget_get_first_child ((GtkWidget*) _tmp0_);
	_tmp2_ = _g_object_ref0 (_tmp1_);
	child = _tmp2_;
	index = 0;
	while (TRUE) {
		GtkWidget* _tmp3_;
		GtkWidget* _tmp4_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		gint _tmp12_;
		_tmp3_ = child;
		if (!(_tmp3_ != NULL)) {
			break;
		}
		_tmp4_ = child;
		if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, gtk_button_get_type ())) {
			GtkButton* button = NULL;
			GtkWidget* _tmp5_;
			GtkButton* _tmp6_;
			_tmp5_ = child;
			_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_button_get_type (), GtkButton));
			button = _tmp6_;
			if (index == value) {
				GtkButton* _tmp7_;
				_tmp7_ = button;
				gtk_widget_add_css_class ((GtkWidget*) _tmp7_, "color-primary");
			} else {
				GtkButton* _tmp8_;
				_tmp8_ = button;
				gtk_widget_remove_css_class ((GtkWidget*) _tmp8_, "color-primary");
			}
			_g_object_unref0 (button);
		}
		_tmp9_ = child;
		_tmp10_ = gtk_widget_get_next_sibling (_tmp9_);
		_tmp11_ = _g_object_ref0 (_tmp10_);
		_g_object_unref0 (child);
		child = _tmp11_;
		_tmp12_ = index;
		index = _tmp12_ + 1;
	}
	_g_object_unref0 (child);
	g_object_notify_by_pspec ((GObject *) self, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_SELECTED_PROPERTY]);
}

static GObject *
widgets_combo_wrap_row_constructor (GType type,
                                    guint n_construct_properties,
                                    GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	WidgetsComboWrapRow * self;
	GtkLabel* _tmp0_ = NULL;
	GtkLabel* _tmp1_ = NULL;
	GtkLabel* _tmp2_;
	GtkLabel* _tmp3_;
	GtkBox* _text_box = NULL;
	GtkBox* _tmp4_ = NULL;
	GtkBox* _tmp5_;
	GtkLabel* _tmp6_;
	GtkBox* _tmp7_;
	GtkLabel* _tmp8_;
	AdwWrapBox* _tmp9_ = NULL;
	GtkBox* main_box = NULL;
	GtkBox* _tmp10_ = NULL;
	GtkBox* _tmp11_;
	GtkBox* _tmp12_;
	GtkBox* _tmp13_;
	AdwWrapBox* _tmp14_;
	GtkBox* _tmp15_;
	parent_class = G_OBJECT_CLASS (widgets_combo_wrap_row_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRow);
	_tmp0_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_label_set_xalign (_tmp0_, (gfloat) 0);
	gtk_label_set_wrap (_tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->_title_label);
	self->priv->_title_label = _tmp0_;
	_tmp1_ = (GtkLabel*) gtk_label_new (NULL);
	gtk_label_set_xalign (_tmp1_, (gfloat) 0);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp1_, TRUE);
	gtk_label_set_use_markup (_tmp1_, TRUE);
	gtk_label_set_wrap (_tmp1_, TRUE);
	g_object_ref_sink (_tmp1_);
	_g_object_unref0 (self->priv->_subtitle_label);
	self->priv->_subtitle_label = _tmp1_;
	_tmp2_ = self->priv->_subtitle_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp2_, "dimmed");
	_tmp3_ = self->priv->_subtitle_label;
	gtk_widget_add_css_class ((GtkWidget*) _tmp3_, "caption");
	_tmp4_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 3);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp4_, TRUE);
	gtk_widget_set_valign ((GtkWidget*) _tmp4_, GTK_ALIGN_CENTER);
	g_object_ref_sink (_tmp4_);
	_text_box = _tmp4_;
	_tmp5_ = _text_box;
	_tmp6_ = self->priv->_title_label;
	gtk_box_append (_tmp5_, (GtkWidget*) _tmp6_);
	_tmp7_ = _text_box;
	_tmp8_ = self->priv->_subtitle_label;
	gtk_box_append (_tmp7_, (GtkWidget*) _tmp8_);
	_tmp9_ = (AdwWrapBox*) adw_wrap_box_new ();
	adw_wrap_box_set_line_spacing (_tmp9_, 6);
	adw_wrap_box_set_child_spacing (_tmp9_, 6);
	g_object_ref_sink (_tmp9_);
	_g_object_unref0 (self->priv->_wrap_box);
	self->priv->_wrap_box = _tmp9_;
	_tmp10_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp10_, 12);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp10_, 12);
	gtk_widget_set_margin_top ((GtkWidget*) _tmp10_, 8);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp10_, 8);
	g_object_ref_sink (_tmp10_);
	main_box = _tmp10_;
	_tmp11_ = main_box;
	_tmp12_ = _text_box;
	gtk_box_append (_tmp11_, (GtkWidget*) _tmp12_);
	_tmp13_ = main_box;
	_tmp14_ = self->priv->_wrap_box;
	gtk_box_append (_tmp13_, (GtkWidget*) _tmp14_);
	_tmp15_ = main_box;
	gtk_list_box_row_set_child ((GtkListBoxRow*) self, (GtkWidget*) _tmp15_);
	_g_object_unref0 (main_box);
	_g_object_unref0 (_text_box);
	return obj;
}

static void
widgets_combo_wrap_row_class_init (WidgetsComboWrapRowClass * klass,
                                   gpointer klass_data)
{
	widgets_combo_wrap_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &WidgetsComboWrapRow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_widgets_combo_wrap_row_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_widgets_combo_wrap_row_set_property;
	G_OBJECT_CLASS (klass)->constructor = widgets_combo_wrap_row_constructor;
	G_OBJECT_CLASS (klass)->finalize = widgets_combo_wrap_row_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_COMBO_WRAP_ROW_TITLE_PROPERTY, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_COMBO_WRAP_ROW_SUBTITLE_PROPERTY, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_SUBTITLE_PROPERTY] = g_param_spec_string ("subtitle", "subtitle", "subtitle", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_COMBO_WRAP_ROW_MODEL_PROPERTY, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", gtk_string_list_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), WIDGETS_COMBO_WRAP_ROW_SELECTED_PROPERTY, widgets_combo_wrap_row_properties[WIDGETS_COMBO_WRAP_ROW_SELECTED_PROPERTY] = g_param_spec_int ("selected", "selected", "selected", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
widgets_combo_wrap_row_instance_init (WidgetsComboWrapRow * self,
                                      gpointer klass)
{
	self->priv = widgets_combo_wrap_row_get_instance_private (self);
}

static void
widgets_combo_wrap_row_finalize (GObject * obj)
{
	WidgetsComboWrapRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRow);
	_g_object_unref0 (self->priv->_title_label);
	_g_object_unref0 (self->priv->_subtitle_label);
	_g_object_unref0 (self->priv->_wrap_box);
	G_OBJECT_CLASS (widgets_combo_wrap_row_parent_class)->finalize (obj);
}

static GType
widgets_combo_wrap_row_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsComboWrapRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_combo_wrap_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsComboWrapRow), 0, (GInstanceInitFunc) widgets_combo_wrap_row_instance_init, NULL };
	GType widgets_combo_wrap_row_type_id;
	widgets_combo_wrap_row_type_id = g_type_register_static (adw_preferences_row_get_type (), "WidgetsComboWrapRow", &g_define_type_info, 0);
	WidgetsComboWrapRow_private_offset = g_type_add_instance_private (widgets_combo_wrap_row_type_id, sizeof (WidgetsComboWrapRowPrivate));
	return widgets_combo_wrap_row_type_id;
}

GType
widgets_combo_wrap_row_get_type (void)
{
	static volatile gsize widgets_combo_wrap_row_type_id__once = 0;
	if (g_once_init_enter (&widgets_combo_wrap_row_type_id__once)) {
		GType widgets_combo_wrap_row_type_id;
		widgets_combo_wrap_row_type_id = widgets_combo_wrap_row_get_type_once ();
		g_once_init_leave (&widgets_combo_wrap_row_type_id__once, widgets_combo_wrap_row_type_id);
	}
	return widgets_combo_wrap_row_type_id__once;
}

static void
_vala_widgets_combo_wrap_row_get_property (GObject * object,
                                           guint property_id,
                                           GValue * value,
                                           GParamSpec * pspec)
{
	WidgetsComboWrapRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRow);
	switch (property_id) {
		case WIDGETS_COMBO_WRAP_ROW_TITLE_PROPERTY:
		g_value_take_string (value, widgets_combo_wrap_row_get_title (self));
		break;
		case WIDGETS_COMBO_WRAP_ROW_SUBTITLE_PROPERTY:
		g_value_take_string (value, widgets_combo_wrap_row_get_subtitle (self));
		break;
		case WIDGETS_COMBO_WRAP_ROW_SELECTED_PROPERTY:
		g_value_set_int (value, widgets_combo_wrap_row_get_selected (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_widgets_combo_wrap_row_set_property (GObject * object,
                                           guint property_id,
                                           const GValue * value,
                                           GParamSpec * pspec)
{
	WidgetsComboWrapRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, WIDGETS_TYPE_COMBO_WRAP_ROW, WidgetsComboWrapRow);
	switch (property_id) {
		case WIDGETS_COMBO_WRAP_ROW_TITLE_PROPERTY:
		widgets_combo_wrap_row_set_title (self, g_value_get_string (value));
		break;
		case WIDGETS_COMBO_WRAP_ROW_SUBTITLE_PROPERTY:
		widgets_combo_wrap_row_set_subtitle (self, g_value_get_string (value));
		break;
		case WIDGETS_COMBO_WRAP_ROW_MODEL_PROPERTY:
		widgets_combo_wrap_row_set_model (self, g_value_get_object (value));
		break;
		case WIDGETS_COMBO_WRAP_ROW_SELECTED_PROPERTY:
		widgets_combo_wrap_row_set_selected (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

