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

#include <glib-object.h>
#include <glib.h>
#include <adwaita.h>
#include <gtk/gtk.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
#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 DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE (dino_ui_view_model_general_preferences_page_get_type ())
#define DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiViewModelGeneralPreferencesPage))
#define DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiViewModelGeneralPreferencesPageClass))
#define DINO_UI_VIEW_MODEL_IS_GENERAL_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE))
#define DINO_UI_VIEW_MODEL_IS_GENERAL_PREFERENCES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE))
#define DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiViewModelGeneralPreferencesPageClass))

typedef struct _DinoUiViewModelGeneralPreferencesPage DinoUiViewModelGeneralPreferencesPage;
typedef struct _DinoUiViewModelGeneralPreferencesPageClass DinoUiViewModelGeneralPreferencesPageClass;
typedef struct _DinoUiViewModelGeneralPreferencesPagePrivate DinoUiViewModelGeneralPreferencesPagePrivate;
enum  {
	DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_0_PROPERTY,
	DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_TYPING_PROPERTY,
	DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_MARKER_PROPERTY,
	DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NOTIFICATIONS_PROPERTY,
	DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_CONVERT_EMOJIS_PROPERTY,
	DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NUM_PROPERTIES
};
static GParamSpec* dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NUM_PROPERTIES];

#define DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE (dino_ui_general_preferences_page_get_type ())
#define DINO_UI_GENERAL_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPage))
#define DINO_UI_GENERAL_PREFERENCES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPageClass))
#define DINO_UI_IS_GENERAL_PREFERENCES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE))
#define DINO_UI_IS_GENERAL_PREFERENCES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE))
#define DINO_UI_GENERAL_PREFERENCES_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPageClass))

typedef struct _DinoUiGeneralPreferencesPage DinoUiGeneralPreferencesPage;
typedef struct _DinoUiGeneralPreferencesPageClass DinoUiGeneralPreferencesPageClass;
typedef struct _DinoUiGeneralPreferencesPagePrivate DinoUiGeneralPreferencesPagePrivate;
enum  {
	DINO_UI_GENERAL_PREFERENCES_PAGE_0_PROPERTY,
	DINO_UI_GENERAL_PREFERENCES_PAGE_MODEL_PROPERTY,
	DINO_UI_GENERAL_PREFERENCES_PAGE_NUM_PROPERTIES
};
static GParamSpec* dino_ui_general_preferences_page_properties[DINO_UI_GENERAL_PREFERENCES_PAGE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _DinoUiViewModelGeneralPreferencesPage {
	GObject parent_instance;
	DinoUiViewModelGeneralPreferencesPagePrivate * priv;
};

struct _DinoUiViewModelGeneralPreferencesPageClass {
	GObjectClass parent_class;
};

struct _DinoUiViewModelGeneralPreferencesPagePrivate {
	gboolean _send_typing;
	gboolean _send_marker;
	gboolean _notifications;
	gboolean _convert_emojis;
};

struct _DinoUiGeneralPreferencesPage {
	AdwPreferencesPage parent_instance;
	DinoUiGeneralPreferencesPagePrivate * priv;
};

struct _DinoUiGeneralPreferencesPageClass {
	AdwPreferencesPageClass parent_class;
};

struct _DinoUiGeneralPreferencesPagePrivate {
	GtkSwitch* typing_switch;
	GtkSwitch* marker_switch;
	GtkSwitch* notification_switch;
	GtkSwitch* emoji_switch;
	DinoUiViewModelGeneralPreferencesPage* _model;
	GBinding** model_bindings;
	gint model_bindings_length1;
	gint _model_bindings_size_;
};

static gint DinoUiViewModelGeneralPreferencesPage_private_offset;
static gpointer dino_ui_view_model_general_preferences_page_parent_class = NULL;
static gint DinoUiGeneralPreferencesPage_private_offset;
static gpointer dino_ui_general_preferences_page_parent_class = NULL;

VALA_EXTERN GType dino_ui_view_model_general_preferences_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiViewModelGeneralPreferencesPage, g_object_unref)
VALA_EXTERN DinoUiViewModelGeneralPreferencesPage* dino_ui_view_model_general_preferences_page_new (void);
VALA_EXTERN DinoUiViewModelGeneralPreferencesPage* dino_ui_view_model_general_preferences_page_construct (GType object_type);
VALA_EXTERN gboolean dino_ui_view_model_general_preferences_page_get_send_typing (DinoUiViewModelGeneralPreferencesPage* self);
VALA_EXTERN void dino_ui_view_model_general_preferences_page_set_send_typing (DinoUiViewModelGeneralPreferencesPage* self,
                                                                  gboolean value);
VALA_EXTERN gboolean dino_ui_view_model_general_preferences_page_get_send_marker (DinoUiViewModelGeneralPreferencesPage* self);
VALA_EXTERN void dino_ui_view_model_general_preferences_page_set_send_marker (DinoUiViewModelGeneralPreferencesPage* self,
                                                                  gboolean value);
VALA_EXTERN gboolean dino_ui_view_model_general_preferences_page_get_notifications (DinoUiViewModelGeneralPreferencesPage* self);
VALA_EXTERN void dino_ui_view_model_general_preferences_page_set_notifications (DinoUiViewModelGeneralPreferencesPage* self,
                                                                    gboolean value);
VALA_EXTERN gboolean dino_ui_view_model_general_preferences_page_get_convert_emojis (DinoUiViewModelGeneralPreferencesPage* self);
VALA_EXTERN void dino_ui_view_model_general_preferences_page_set_convert_emojis (DinoUiViewModelGeneralPreferencesPage* self,
                                                                     gboolean value);
static void dino_ui_view_model_general_preferences_page_finalize (GObject * obj);
static GType dino_ui_view_model_general_preferences_page_get_type_once (void);
static void _vala_dino_ui_view_model_general_preferences_page_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec);
static void _vala_dino_ui_view_model_general_preferences_page_set_property (GObject * object,
                                                                     guint property_id,
                                                                     const GValue * value,
                                                                     GParamSpec * pspec);
VALA_EXTERN GType dino_ui_general_preferences_page_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiGeneralPreferencesPage, g_object_unref)
static void dino_ui_general_preferences_page_on_model_changed (DinoUiGeneralPreferencesPage* self);
VALA_EXTERN DinoUiViewModelGeneralPreferencesPage* dino_ui_general_preferences_page_get_model (DinoUiGeneralPreferencesPage* self);
VALA_EXTERN DinoUiGeneralPreferencesPage* dino_ui_general_preferences_page_new (void);
VALA_EXTERN DinoUiGeneralPreferencesPage* dino_ui_general_preferences_page_construct (GType object_type);
VALA_EXTERN void dino_ui_general_preferences_page_set_model (DinoUiGeneralPreferencesPage* self,
                                                 DinoUiViewModelGeneralPreferencesPage* value);
static GObject * dino_ui_general_preferences_page_constructor (GType type,
                                                        guint n_construct_properties,
                                                        GObjectConstructParam * construct_properties);
static void _dino_ui_general_preferences_page_on_model_changed_g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void dino_ui_general_preferences_page_finalize (GObject * obj);
static GType dino_ui_general_preferences_page_get_type_once (void);
static void _vala_dino_ui_general_preferences_page_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec);
static void _vala_dino_ui_general_preferences_page_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_view_model_general_preferences_page_get_instance_private (DinoUiViewModelGeneralPreferencesPage* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiViewModelGeneralPreferencesPage_private_offset);
}

DinoUiViewModelGeneralPreferencesPage*
dino_ui_view_model_general_preferences_page_construct (GType object_type)
{
	DinoUiViewModelGeneralPreferencesPage * self = NULL;
	self = (DinoUiViewModelGeneralPreferencesPage*) g_object_new (object_type, NULL);
	return self;
}

DinoUiViewModelGeneralPreferencesPage*
dino_ui_view_model_general_preferences_page_new (void)
{
	return dino_ui_view_model_general_preferences_page_construct (DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE);
}

gboolean
dino_ui_view_model_general_preferences_page_get_send_typing (DinoUiViewModelGeneralPreferencesPage* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_send_typing;
	return result;
}

void
dino_ui_view_model_general_preferences_page_set_send_typing (DinoUiViewModelGeneralPreferencesPage* self,
                                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_view_model_general_preferences_page_get_send_typing (self);
	if (old_value != value) {
		self->priv->_send_typing = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_TYPING_PROPERTY]);
	}
}

gboolean
dino_ui_view_model_general_preferences_page_get_send_marker (DinoUiViewModelGeneralPreferencesPage* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_send_marker;
	return result;
}

void
dino_ui_view_model_general_preferences_page_set_send_marker (DinoUiViewModelGeneralPreferencesPage* self,
                                                             gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_view_model_general_preferences_page_get_send_marker (self);
	if (old_value != value) {
		self->priv->_send_marker = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_MARKER_PROPERTY]);
	}
}

gboolean
dino_ui_view_model_general_preferences_page_get_notifications (DinoUiViewModelGeneralPreferencesPage* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_notifications;
	return result;
}

void
dino_ui_view_model_general_preferences_page_set_notifications (DinoUiViewModelGeneralPreferencesPage* self,
                                                               gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_view_model_general_preferences_page_get_notifications (self);
	if (old_value != value) {
		self->priv->_notifications = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NOTIFICATIONS_PROPERTY]);
	}
}

gboolean
dino_ui_view_model_general_preferences_page_get_convert_emojis (DinoUiViewModelGeneralPreferencesPage* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_convert_emojis;
	return result;
}

void
dino_ui_view_model_general_preferences_page_set_convert_emojis (DinoUiViewModelGeneralPreferencesPage* self,
                                                                gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_view_model_general_preferences_page_get_convert_emojis (self);
	if (old_value != value) {
		self->priv->_convert_emojis = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_CONVERT_EMOJIS_PROPERTY]);
	}
}

static void
dino_ui_view_model_general_preferences_page_class_init (DinoUiViewModelGeneralPreferencesPageClass * klass,
                                                        gpointer klass_data)
{
	dino_ui_view_model_general_preferences_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiViewModelGeneralPreferencesPage_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_view_model_general_preferences_page_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_view_model_general_preferences_page_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_view_model_general_preferences_page_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_TYPING_PROPERTY, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_TYPING_PROPERTY] = g_param_spec_boolean ("send-typing", "send-typing", "send-typing", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_MARKER_PROPERTY, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_MARKER_PROPERTY] = g_param_spec_boolean ("send-marker", "send-marker", "send-marker", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NOTIFICATIONS_PROPERTY, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NOTIFICATIONS_PROPERTY] = g_param_spec_boolean ("notifications", "notifications", "notifications", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_CONVERT_EMOJIS_PROPERTY, dino_ui_view_model_general_preferences_page_properties[DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_CONVERT_EMOJIS_PROPERTY] = g_param_spec_boolean ("convert-emojis", "convert-emojis", "convert-emojis", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
dino_ui_view_model_general_preferences_page_instance_init (DinoUiViewModelGeneralPreferencesPage * self,
                                                           gpointer klass)
{
	self->priv = dino_ui_view_model_general_preferences_page_get_instance_private (self);
}

static void
dino_ui_view_model_general_preferences_page_finalize (GObject * obj)
{
	DinoUiViewModelGeneralPreferencesPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiViewModelGeneralPreferencesPage);
	G_OBJECT_CLASS (dino_ui_view_model_general_preferences_page_parent_class)->finalize (obj);
}

static GType
dino_ui_view_model_general_preferences_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiViewModelGeneralPreferencesPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_view_model_general_preferences_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiViewModelGeneralPreferencesPage), 0, (GInstanceInitFunc) dino_ui_view_model_general_preferences_page_instance_init, NULL };
	GType dino_ui_view_model_general_preferences_page_type_id;
	dino_ui_view_model_general_preferences_page_type_id = g_type_register_static (G_TYPE_OBJECT, "DinoUiViewModelGeneralPreferencesPage", &g_define_type_info, 0);
	DinoUiViewModelGeneralPreferencesPage_private_offset = g_type_add_instance_private (dino_ui_view_model_general_preferences_page_type_id, sizeof (DinoUiViewModelGeneralPreferencesPagePrivate));
	return dino_ui_view_model_general_preferences_page_type_id;
}

GType
dino_ui_view_model_general_preferences_page_get_type (void)
{
	static volatile gsize dino_ui_view_model_general_preferences_page_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_view_model_general_preferences_page_type_id__once)) {
		GType dino_ui_view_model_general_preferences_page_type_id;
		dino_ui_view_model_general_preferences_page_type_id = dino_ui_view_model_general_preferences_page_get_type_once ();
		g_once_init_leave (&dino_ui_view_model_general_preferences_page_type_id__once, dino_ui_view_model_general_preferences_page_type_id);
	}
	return dino_ui_view_model_general_preferences_page_type_id__once;
}

static void
_vala_dino_ui_view_model_general_preferences_page_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec)
{
	DinoUiViewModelGeneralPreferencesPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiViewModelGeneralPreferencesPage);
	switch (property_id) {
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_TYPING_PROPERTY:
		g_value_set_boolean (value, dino_ui_view_model_general_preferences_page_get_send_typing (self));
		break;
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_MARKER_PROPERTY:
		g_value_set_boolean (value, dino_ui_view_model_general_preferences_page_get_send_marker (self));
		break;
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NOTIFICATIONS_PROPERTY:
		g_value_set_boolean (value, dino_ui_view_model_general_preferences_page_get_notifications (self));
		break;
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_CONVERT_EMOJIS_PROPERTY:
		g_value_set_boolean (value, dino_ui_view_model_general_preferences_page_get_convert_emojis (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_view_model_general_preferences_page_set_property (GObject * object,
                                                                guint property_id,
                                                                const GValue * value,
                                                                GParamSpec * pspec)
{
	DinoUiViewModelGeneralPreferencesPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiViewModelGeneralPreferencesPage);
	switch (property_id) {
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_TYPING_PROPERTY:
		dino_ui_view_model_general_preferences_page_set_send_typing (self, g_value_get_boolean (value));
		break;
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_SEND_MARKER_PROPERTY:
		dino_ui_view_model_general_preferences_page_set_send_marker (self, g_value_get_boolean (value));
		break;
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_NOTIFICATIONS_PROPERTY:
		dino_ui_view_model_general_preferences_page_set_notifications (self, g_value_get_boolean (value));
		break;
		case DINO_UI_VIEW_MODEL_GENERAL_PREFERENCES_PAGE_CONVERT_EMOJIS_PROPERTY:
		dino_ui_view_model_general_preferences_page_set_convert_emojis (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
dino_ui_general_preferences_page_get_instance_private (DinoUiGeneralPreferencesPage* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiGeneralPreferencesPage_private_offset);
}

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

static void
dino_ui_general_preferences_page_on_model_changed (DinoUiGeneralPreferencesPage* self)
{
	GBinding** _tmp0_;
	gint _tmp0__length1;
	DinoUiViewModelGeneralPreferencesPage* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->model_bindings;
	_tmp0__length1 = self->priv->model_bindings_length1;
	{
		GBinding** binding_collection = NULL;
		gint binding_collection_length1 = 0;
		gint _binding_collection_size_ = 0;
		gint binding_it = 0;
		binding_collection = _tmp0_;
		binding_collection_length1 = _tmp0__length1;
		for (binding_it = 0; binding_it < binding_collection_length1; binding_it = binding_it + 1) {
			GBinding* _tmp1_;
			GBinding* binding = NULL;
			_tmp1_ = _g_object_ref0 (binding_collection[binding_it]);
			binding = _tmp1_;
			{
				GBinding* _tmp2_;
				GBinding* _tmp3_;
				_tmp2_ = binding;
				_tmp3_ = _g_object_ref0 (_tmp2_);
				g_binding_unbind (_tmp3_);
				_g_object_unref0 (binding);
			}
		}
	}
	_tmp4_ = self->priv->_model;
	if (_tmp4_ != NULL) {
		DinoUiViewModelGeneralPreferencesPage* _tmp5_;
		GtkSwitch* _tmp6_;
		GBinding* _tmp7_;
		GBinding* _tmp8_;
		DinoUiViewModelGeneralPreferencesPage* _tmp9_;
		GtkSwitch* _tmp10_;
		GBinding* _tmp11_;
		GBinding* _tmp12_;
		DinoUiViewModelGeneralPreferencesPage* _tmp13_;
		GtkSwitch* _tmp14_;
		GBinding* _tmp15_;
		GBinding* _tmp16_;
		DinoUiViewModelGeneralPreferencesPage* _tmp17_;
		GtkSwitch* _tmp18_;
		GBinding* _tmp19_;
		GBinding* _tmp20_;
		GBinding** _tmp21_;
		_tmp5_ = self->priv->_model;
		_tmp6_ = self->priv->typing_switch;
		_tmp7_ = g_object_bind_property_with_closures ((GObject*) _tmp5_, "send-typing", (GObject*) _tmp6_, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp8_ = _g_object_ref0 (_tmp7_);
		_tmp9_ = self->priv->_model;
		_tmp10_ = self->priv->marker_switch;
		_tmp11_ = g_object_bind_property_with_closures ((GObject*) _tmp9_, "send-marker", (GObject*) _tmp10_, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp12_ = _g_object_ref0 (_tmp11_);
		_tmp13_ = self->priv->_model;
		_tmp14_ = self->priv->notification_switch;
		_tmp15_ = g_object_bind_property_with_closures ((GObject*) _tmp13_, "notifications", (GObject*) _tmp14_, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp16_ = _g_object_ref0 (_tmp15_);
		_tmp17_ = self->priv->_model;
		_tmp18_ = self->priv->emoji_switch;
		_tmp19_ = g_object_bind_property_with_closures ((GObject*) _tmp17_, "convert-emojis", (GObject*) _tmp18_, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
		_tmp20_ = _g_object_ref0 (_tmp19_);
		_tmp21_ = g_new0 (GBinding*, 4 + 1);
		_tmp21_[0] = _tmp8_;
		_tmp21_[1] = _tmp12_;
		_tmp21_[2] = _tmp16_;
		_tmp21_[3] = _tmp20_;
		self->priv->model_bindings = (_vala_array_free (self->priv->model_bindings, self->priv->model_bindings_length1, (GDestroyNotify) g_object_unref), NULL);
		self->priv->model_bindings = _tmp21_;
		self->priv->model_bindings_length1 = 4;
		self->priv->_model_bindings_size_ = self->priv->model_bindings_length1;
	} else {
		GBinding** _tmp22_;
		_tmp22_ = g_new0 (GBinding*, 0 + 1);
		self->priv->model_bindings = (_vala_array_free (self->priv->model_bindings, self->priv->model_bindings_length1, (GDestroyNotify) g_object_unref), NULL);
		self->priv->model_bindings = _tmp22_;
		self->priv->model_bindings_length1 = 0;
		self->priv->_model_bindings_size_ = self->priv->model_bindings_length1;
	}
}

DinoUiGeneralPreferencesPage*
dino_ui_general_preferences_page_construct (GType object_type)
{
	DinoUiGeneralPreferencesPage * self = NULL;
	self = (DinoUiGeneralPreferencesPage*) g_object_new (object_type, NULL);
	return self;
}

DinoUiGeneralPreferencesPage*
dino_ui_general_preferences_page_new (void)
{
	return dino_ui_general_preferences_page_construct (DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE);
}

DinoUiViewModelGeneralPreferencesPage*
dino_ui_general_preferences_page_get_model (DinoUiGeneralPreferencesPage* self)
{
	DinoUiViewModelGeneralPreferencesPage* result;
	DinoUiViewModelGeneralPreferencesPage* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_model;
	result = _tmp0_;
	return result;
}

void
dino_ui_general_preferences_page_set_model (DinoUiGeneralPreferencesPage* self,
                                            DinoUiViewModelGeneralPreferencesPage* value)
{
	DinoUiViewModelGeneralPreferencesPage* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_general_preferences_page_get_model (self);
	if (old_value != value) {
		DinoUiViewModelGeneralPreferencesPage* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_model);
		self->priv->_model = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_general_preferences_page_properties[DINO_UI_GENERAL_PREFERENCES_PAGE_MODEL_PROPERTY]);
	}
}

static void
_dino_ui_general_preferences_page_on_model_changed_g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	dino_ui_general_preferences_page_on_model_changed ((DinoUiGeneralPreferencesPage*) self);
}

static GObject *
dino_ui_general_preferences_page_constructor (GType type,
                                              guint n_construct_properties,
                                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	DinoUiGeneralPreferencesPage * self;
	parent_class = G_OBJECT_CLASS (dino_ui_general_preferences_page_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPage);
	g_signal_connect_object ((GObject*) self, "notify::model", (GCallback) _dino_ui_general_preferences_page_on_model_changed_g_object_notify, self, 0);
	return obj;
}

static void
dino_ui_general_preferences_page_class_init (DinoUiGeneralPreferencesPageClass * klass,
                                             gpointer klass_data)
{
	dino_ui_general_preferences_page_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiGeneralPreferencesPage_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_general_preferences_page_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_general_preferences_page_set_property;
	G_OBJECT_CLASS (klass)->constructor = dino_ui_general_preferences_page_constructor;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_general_preferences_page_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_GENERAL_PREFERENCES_PAGE_MODEL_PROPERTY, dino_ui_general_preferences_page_properties[DINO_UI_GENERAL_PREFERENCES_PAGE_MODEL_PROPERTY] = g_param_spec_object ("model", "model", "model", DINO_UI_VIEW_MODEL_TYPE_GENERAL_PREFERENCES_PAGE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/im/dino/Dino/preferences_window/general_preferences_page.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "typing_switch", FALSE, DinoUiGeneralPreferencesPage_private_offset + G_STRUCT_OFFSET (DinoUiGeneralPreferencesPagePrivate, typing_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "marker_switch", FALSE, DinoUiGeneralPreferencesPage_private_offset + G_STRUCT_OFFSET (DinoUiGeneralPreferencesPagePrivate, marker_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notification_switch", FALSE, DinoUiGeneralPreferencesPage_private_offset + G_STRUCT_OFFSET (DinoUiGeneralPreferencesPagePrivate, notification_switch));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "emoji_switch", FALSE, DinoUiGeneralPreferencesPage_private_offset + G_STRUCT_OFFSET (DinoUiGeneralPreferencesPagePrivate, emoji_switch));
}

static void
dino_ui_general_preferences_page_instance_init (DinoUiGeneralPreferencesPage * self,
                                                gpointer klass)
{
	DinoUiViewModelGeneralPreferencesPage* _tmp0_;
	GBinding** _tmp1_;
	self->priv = dino_ui_general_preferences_page_get_instance_private (self);
	_tmp0_ = dino_ui_view_model_general_preferences_page_new ();
	self->priv->_model = _tmp0_;
	_tmp1_ = g_new0 (GBinding*, 0 + 1);
	self->priv->model_bindings = _tmp1_;
	self->priv->model_bindings_length1 = 0;
	self->priv->_model_bindings_size_ = self->priv->model_bindings_length1;
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
dino_ui_general_preferences_page_finalize (GObject * obj)
{
	DinoUiGeneralPreferencesPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPage);
	_g_object_unref0 (self->priv->_model);
	self->priv->model_bindings = (_vala_array_free (self->priv->model_bindings, self->priv->model_bindings_length1, (GDestroyNotify) g_object_unref), NULL);
	G_OBJECT_CLASS (dino_ui_general_preferences_page_parent_class)->finalize (obj);
}

static GType
dino_ui_general_preferences_page_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiGeneralPreferencesPageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_general_preferences_page_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiGeneralPreferencesPage), 0, (GInstanceInitFunc) dino_ui_general_preferences_page_instance_init, NULL };
	GType dino_ui_general_preferences_page_type_id;
	dino_ui_general_preferences_page_type_id = g_type_register_static (adw_preferences_page_get_type (), "DinoUiGeneralPreferencesPage", &g_define_type_info, 0);
	DinoUiGeneralPreferencesPage_private_offset = g_type_add_instance_private (dino_ui_general_preferences_page_type_id, sizeof (DinoUiGeneralPreferencesPagePrivate));
	return dino_ui_general_preferences_page_type_id;
}

GType
dino_ui_general_preferences_page_get_type (void)
{
	static volatile gsize dino_ui_general_preferences_page_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_general_preferences_page_type_id__once)) {
		GType dino_ui_general_preferences_page_type_id;
		dino_ui_general_preferences_page_type_id = dino_ui_general_preferences_page_get_type_once ();
		g_once_init_leave (&dino_ui_general_preferences_page_type_id__once, dino_ui_general_preferences_page_type_id);
	}
	return dino_ui_general_preferences_page_type_id__once;
}

static void
_vala_dino_ui_general_preferences_page_get_property (GObject * object,
                                                     guint property_id,
                                                     GValue * value,
                                                     GParamSpec * pspec)
{
	DinoUiGeneralPreferencesPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPage);
	switch (property_id) {
		case DINO_UI_GENERAL_PREFERENCES_PAGE_MODEL_PROPERTY:
		g_value_set_object (value, dino_ui_general_preferences_page_get_model (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_general_preferences_page_set_property (GObject * object,
                                                     guint property_id,
                                                     const GValue * value,
                                                     GParamSpec * pspec)
{
	DinoUiGeneralPreferencesPage * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_GENERAL_PREFERENCES_PAGE, DinoUiGeneralPreferencesPage);
	switch (property_id) {
		case DINO_UI_GENERAL_PREFERENCES_PAGE_MODEL_PROPERTY:
		dino_ui_general_preferences_page_set_model (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

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

