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

/* This file is part of Elastic. License: GPL-3.0+.*/

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdk.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 ELASTIC_TYPE_WINDOW (elastic_window_get_type ())
#define ELASTIC_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_WINDOW, ElasticWindow))
#define ELASTIC_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_WINDOW, ElasticWindowClass))
#define ELASTIC_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_WINDOW))
#define ELASTIC_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_WINDOW))
#define ELASTIC_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_WINDOW, ElasticWindowClass))

typedef struct _ElasticWindow ElasticWindow;
typedef struct _ElasticWindowClass ElasticWindowClass;
typedef struct _ElasticWindowPrivate ElasticWindowPrivate;

#define ELASTIC_TYPE_SPRING_PARAMS (elastic_spring_params_get_type ())
#define ELASTIC_SPRING_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_SPRING_PARAMS, ElasticSpringParams))
#define ELASTIC_SPRING_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_SPRING_PARAMS, ElasticSpringParamsClass))
#define ELASTIC_IS_SPRING_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_SPRING_PARAMS))
#define ELASTIC_IS_SPRING_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_SPRING_PARAMS))
#define ELASTIC_SPRING_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_SPRING_PARAMS, ElasticSpringParamsClass))

typedef struct _ElasticSpringParams ElasticSpringParams;
typedef struct _ElasticSpringParamsClass ElasticSpringParamsClass;

#define ELASTIC_TYPE_BASIC_VIEW (elastic_basic_view_get_type ())
#define ELASTIC_BASIC_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_BASIC_VIEW, ElasticBasicView))
#define ELASTIC_BASIC_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_BASIC_VIEW, ElasticBasicViewClass))
#define ELASTIC_IS_BASIC_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_BASIC_VIEW))
#define ELASTIC_IS_BASIC_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_BASIC_VIEW))
#define ELASTIC_BASIC_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_BASIC_VIEW, ElasticBasicViewClass))

typedef struct _ElasticBasicView ElasticBasicView;
typedef struct _ElasticBasicViewClass ElasticBasicViewClass;

#define ELASTIC_TYPE_TRANSFORM_BIN (elastic_transform_bin_get_type ())
#define ELASTIC_TRANSFORM_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_TRANSFORM_BIN, ElasticTransformBin))
#define ELASTIC_TRANSFORM_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_TRANSFORM_BIN, ElasticTransformBinClass))
#define ELASTIC_IS_TRANSFORM_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_TRANSFORM_BIN))
#define ELASTIC_IS_TRANSFORM_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_TRANSFORM_BIN))
#define ELASTIC_TRANSFORM_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_TRANSFORM_BIN, ElasticTransformBinClass))

typedef struct _ElasticTransformBin ElasticTransformBin;
typedef struct _ElasticTransformBinClass ElasticTransformBinClass;

#define ELASTIC_TYPE_INTERACTIVE_VIEW (elastic_interactive_view_get_type ())
#define ELASTIC_INTERACTIVE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_INTERACTIVE_VIEW, ElasticInteractiveView))
#define ELASTIC_INTERACTIVE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_INTERACTIVE_VIEW, ElasticInteractiveViewClass))
#define ELASTIC_IS_INTERACTIVE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_INTERACTIVE_VIEW))
#define ELASTIC_IS_INTERACTIVE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_INTERACTIVE_VIEW))
#define ELASTIC_INTERACTIVE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_INTERACTIVE_VIEW, ElasticInteractiveViewClass))

typedef struct _ElasticInteractiveView ElasticInteractiveView;
typedef struct _ElasticInteractiveViewClass ElasticInteractiveViewClass;
enum  {
	ELASTIC_WINDOW_0_PROPERTY,
	ELASTIC_WINDOW_SPRING_PROPERTY,
	ELASTIC_WINDOW_NUM_PROPERTIES
};
static GParamSpec* elastic_window_properties[ELASTIC_WINDOW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define ELASTIC_TYPE_PROPERTIES_VIEW (elastic_properties_view_get_type ())
#define ELASTIC_PROPERTIES_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_PROPERTIES_VIEW, ElasticPropertiesView))
#define ELASTIC_PROPERTIES_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_PROPERTIES_VIEW, ElasticPropertiesViewClass))
#define ELASTIC_IS_PROPERTIES_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_PROPERTIES_VIEW))
#define ELASTIC_IS_PROPERTIES_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_PROPERTIES_VIEW))
#define ELASTIC_PROPERTIES_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_PROPERTIES_VIEW, ElasticPropertiesViewClass))

typedef struct _ElasticPropertiesView ElasticPropertiesView;
typedef struct _ElasticPropertiesViewClass ElasticPropertiesViewClass;

#define ELASTIC_TYPE_EXPORT_VIEW (elastic_export_view_get_type ())
#define ELASTIC_EXPORT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_EXPORT_VIEW, ElasticExportView))
#define ELASTIC_EXPORT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_EXPORT_VIEW, ElasticExportViewClass))
#define ELASTIC_IS_EXPORT_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_EXPORT_VIEW))
#define ELASTIC_IS_EXPORT_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_EXPORT_VIEW))
#define ELASTIC_EXPORT_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_EXPORT_VIEW, ElasticExportViewClass))

typedef struct _ElasticExportView ElasticExportView;
typedef struct _ElasticExportViewClass ElasticExportViewClass;

struct _ElasticWindow {
	AdwApplicationWindow parent_instance;
	ElasticWindowPrivate * priv;
};

struct _ElasticWindowClass {
	AdwApplicationWindowClass parent_class;
};

struct _ElasticWindowPrivate {
	ElasticSpringParams* _spring;
	AdwViewStack* stack;
	ElasticBasicView* basic_view;
	ElasticInteractiveView* interactive_view;
	AdwToastOverlay* toast_overlay;
};

static gint ElasticWindow_private_offset;
static gpointer elastic_window_parent_class = NULL;

VALA_EXTERN GType elastic_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticWindow, g_object_unref)
VALA_EXTERN GType elastic_spring_params_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticSpringParams, g_object_unref)
VALA_EXTERN GType elastic_basic_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticBasicView, g_object_unref)
VALA_EXTERN GType elastic_transform_bin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticTransformBin, g_object_unref)
VALA_EXTERN GType elastic_interactive_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticInteractiveView, g_object_unref)
VALA_EXTERN ElasticWindow* elastic_window_new (GtkApplication* app);
VALA_EXTERN ElasticWindow* elastic_window_construct (GType object_type,
                                         GtkApplication* app);
static void elastic_window_real_snapshot (GtkWidget* base,
                                   GtkSnapshot* snapshot);
VALA_EXTERN void elastic_interactive_view_snapshot_toplevel (ElasticInteractiveView* self,
                                                 GtkWidget* toplevel,
                                                 GtkSnapshot* snapshot);
VALA_EXTERN void elastic_window_show_copy_toast (ElasticWindow* self);
VALA_EXTERN ElasticSpringParams* elastic_window_get_spring (ElasticWindow* self);
VALA_EXTERN void elastic_window_set_spring (ElasticWindow* self,
                                ElasticSpringParams* value);
static GObject * elastic_window_constructor (GType type,
                                      guint n_construct_properties,
                                      GObjectConstructParam * construct_properties);
VALA_EXTERN ElasticSpringParams* elastic_spring_params_new (void);
VALA_EXTERN ElasticSpringParams* elastic_spring_params_construct (GType object_type);
static void _elastic_window___lambda10_ (ElasticWindow* self);
VALA_EXTERN gboolean elastic_spring_params_get_is_modified (ElasticSpringParams* self);
static void __elastic_window___lambda10__g_object_notify (GObject* _sender,
                                                   GParamSpec* pspec,
                                                   gpointer self);
static void _elastic_window___lambda11_ (ElasticWindow* self);
static void __elastic_window___lambda11__g_object_notify (GObject* _sender,
                                                   GParamSpec* pspec,
                                                   gpointer self);
VALA_EXTERN GType elastic_properties_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticPropertiesView, g_object_unref)
VALA_EXTERN GType elastic_export_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticExportView, g_object_unref)
static void _elastic_window___lambda14_ (GtkWidget* widget);
VALA_EXTERN void elastic_spring_params_reset_to_defaults (ElasticSpringParams* self);
static void __elastic_window___lambda14__gtk_widget_action_activate_func (GtkWidget* widget,
                                                                   const gchar* action_name,
                                                                   GVariant* parameter);
static void _elastic_window___lambda15_ (GtkWidget* widget);
static void __elastic_window___lambda15__gtk_widget_action_activate_func (GtkWidget* widget,
                                                                   const gchar* action_name,
                                                                   GVariant* parameter);
static void _elastic_window___lambda16_ (GtkWidget* widget);
static void __elastic_window___lambda16__gtk_widget_action_activate_func (GtkWidget* widget,
                                                                   const gchar* action_name,
                                                                   GVariant* parameter);
static void elastic_window_finalize (GObject * obj);
static GType elastic_window_get_type_once (void);
static void _vala_elastic_window_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec);
static void _vala_elastic_window_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec);

static inline gpointer
elastic_window_get_instance_private (ElasticWindow* self)
{
	return G_STRUCT_MEMBER_P (self, ElasticWindow_private_offset);
}

ElasticWindow*
elastic_window_construct (GType object_type,
                          GtkApplication* app)
{
	ElasticWindow * self = NULL;
	g_return_val_if_fail (app != NULL, NULL);
	self = (ElasticWindow*) g_object_new (object_type, "application", app, NULL);
	return self;
}

ElasticWindow*
elastic_window_new (GtkApplication* app)
{
	return elastic_window_construct (ELASTIC_TYPE_WINDOW, app);
}

static void
elastic_window_real_snapshot (GtkWidget* base,
                              GtkSnapshot* snapshot)
{
	ElasticWindow * self;
	ElasticInteractiveView* _tmp0_;
	self = (ElasticWindow*) base;
	g_return_if_fail (snapshot != NULL);
	GTK_WIDGET_CLASS (elastic_window_parent_class)->snapshot ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, adw_application_window_get_type (), AdwApplicationWindow), snapshot);
	_tmp0_ = self->priv->interactive_view;
	elastic_interactive_view_snapshot_toplevel (_tmp0_, (GtkWidget*) self, snapshot);
}

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

void
elastic_window_show_copy_toast (ElasticWindow* self)
{
	AdwToast* toast = NULL;
	AdwToast* _tmp0_;
	AdwToastOverlay* _tmp1_;
	AdwToast* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = adw_toast_new (_ ("Copied to clipboard"));
	toast = _tmp0_;
	_tmp1_ = self->priv->toast_overlay;
	_tmp2_ = _g_object_ref0 (toast);
	adw_toast_overlay_add_toast (_tmp1_, _tmp2_);
	_g_object_unref0 (toast);
}

ElasticSpringParams*
elastic_window_get_spring (ElasticWindow* self)
{
	ElasticSpringParams* result;
	ElasticSpringParams* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_spring;
	result = _tmp0_;
	return result;
}

void
elastic_window_set_spring (ElasticWindow* self,
                           ElasticSpringParams* value)
{
	ElasticSpringParams* old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_window_get_spring (self);
	if (old_value != value) {
		ElasticSpringParams* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_spring);
		self->priv->_spring = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, elastic_window_properties[ELASTIC_WINDOW_SPRING_PROPERTY]);
	}
}

static void
_elastic_window___lambda10_ (ElasticWindow* self)
{
	ElasticSpringParams* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	_tmp0_ = self->priv->_spring;
	_tmp1_ = elastic_spring_params_get_is_modified (_tmp0_);
	_tmp2_ = _tmp1_;
	gtk_widget_action_set_enabled ((GtkWidget*) self, "editor.reset", _tmp2_);
}

static void
__elastic_window___lambda10__g_object_notify (GObject* _sender,
                                              GParamSpec* pspec,
                                              gpointer self)
{
	_elastic_window___lambda10_ ((ElasticWindow*) self);
}

static void
_elastic_window___lambda11_ (ElasticWindow* self)
{
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	ElasticBasicView* _tmp3_;
	AdwViewStack* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
	ElasticInteractiveView* _tmp7_;
	_tmp0_ = self->priv->stack;
	_tmp1_ = adw_view_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->basic_view;
	gtk_widget_action_set_enabled ((GtkWidget*) self, "editor.basic-view", _tmp2_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget));
	_tmp4_ = self->priv->stack;
	_tmp5_ = adw_view_stack_get_visible_child (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = self->priv->interactive_view;
	gtk_widget_action_set_enabled ((GtkWidget*) self, "editor.interactive-view", _tmp6_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_widget_get_type (), GtkWidget));
}

static void
__elastic_window___lambda11__g_object_notify (GObject* _sender,
                                              GParamSpec* pspec,
                                              gpointer self)
{
	_elastic_window___lambda11_ ((ElasticWindow*) self);
}

static GObject *
elastic_window_constructor (GType type,
                            guint n_construct_properties,
                            GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ElasticWindow * self;
	ElasticSpringParams* _tmp0_;
	ElasticSpringParams* _tmp1_;
	ElasticSpringParams* _tmp2_;
	AdwViewStack* _tmp3_;
	parent_class = G_OBJECT_CLASS (elastic_window_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ELASTIC_TYPE_WINDOW, ElasticWindow);
	_tmp0_ = elastic_spring_params_new ();
	_tmp1_ = _tmp0_;
	elastic_window_set_spring (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = self->priv->_spring;
	g_signal_connect_object ((GObject*) _tmp2_, "notify::is-modified", (GCallback) __elastic_window___lambda10__g_object_notify, self, 0);
	gtk_widget_action_set_enabled ((GtkWidget*) self, "editor.reset", FALSE);
	_tmp3_ = self->priv->stack;
	g_signal_connect_object ((GObject*) _tmp3_, "notify::visible-child", (GCallback) __elastic_window___lambda11__g_object_notify, self, 0);
	return obj;
}

static void
_elastic_window___lambda14_ (GtkWidget* widget)
{
	ElasticSpringParams* _tmp0_;
	g_return_if_fail (widget != NULL);
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (widget, ELASTIC_TYPE_WINDOW, ElasticWindow)->priv->_spring;
	elastic_spring_params_reset_to_defaults (_tmp0_);
}

static void
__elastic_window___lambda14__gtk_widget_action_activate_func (GtkWidget* widget,
                                                              const gchar* action_name,
                                                              GVariant* parameter)
{
	_elastic_window___lambda14_ (widget);
}

static void
_elastic_window___lambda15_ (GtkWidget* widget)
{
	ElasticWindow* _self_ = NULL;
	ElasticWindow* _tmp0_;
	ElasticWindow* _tmp1_;
	AdwViewStack* _tmp2_;
	ElasticWindow* _tmp3_;
	ElasticBasicView* _tmp4_;
	g_return_if_fail (widget != NULL);
	_tmp0_ = _g_object_ref0 (ELASTIC_IS_WINDOW (widget) ? ((ElasticWindow*) widget) : NULL);
	_self_ = _tmp0_;
	_tmp1_ = _self_;
	_tmp2_ = _tmp1_->priv->stack;
	_tmp3_ = _self_;
	_tmp4_ = _tmp3_->priv->basic_view;
	adw_view_stack_set_visible_child (_tmp2_, (GtkWidget*) _tmp4_);
	_g_object_unref0 (_self_);
}

static void
__elastic_window___lambda15__gtk_widget_action_activate_func (GtkWidget* widget,
                                                              const gchar* action_name,
                                                              GVariant* parameter)
{
	_elastic_window___lambda15_ (widget);
}

static void
_elastic_window___lambda16_ (GtkWidget* widget)
{
	ElasticWindow* _self_ = NULL;
	ElasticWindow* _tmp0_;
	ElasticWindow* _tmp1_;
	AdwViewStack* _tmp2_;
	ElasticWindow* _tmp3_;
	ElasticInteractiveView* _tmp4_;
	g_return_if_fail (widget != NULL);
	_tmp0_ = _g_object_ref0 (ELASTIC_IS_WINDOW (widget) ? ((ElasticWindow*) widget) : NULL);
	_self_ = _tmp0_;
	_tmp1_ = _self_;
	_tmp2_ = _tmp1_->priv->stack;
	_tmp3_ = _self_;
	_tmp4_ = _tmp3_->priv->interactive_view;
	adw_view_stack_set_visible_child (_tmp2_, (GtkWidget*) _tmp4_);
	_g_object_unref0 (_self_);
}

static void
__elastic_window___lambda16__gtk_widget_action_activate_func (GtkWidget* widget,
                                                              const gchar* action_name,
                                                              GVariant* parameter)
{
	_elastic_window___lambda16_ (widget);
}

static void
elastic_window_class_init (ElasticWindowClass * klass,
                           gpointer klass_data)
{
	elastic_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ElasticWindow_private_offset);
	((GtkWidgetClass *) klass)->snapshot = (void (*) (GtkWidget*, GtkSnapshot*)) elastic_window_real_snapshot;
	G_OBJECT_CLASS (klass)->get_property = _vala_elastic_window_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_elastic_window_set_property;
	G_OBJECT_CLASS (klass)->constructor = elastic_window_constructor;
	G_OBJECT_CLASS (klass)->finalize = elastic_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_WINDOW_SPRING_PROPERTY, elastic_window_properties[ELASTIC_WINDOW_SPRING_PROPERTY] = g_param_spec_object ("spring", "spring", "spring", ELASTIC_TYPE_SPRING_PARAMS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/app/drey/Elastic/window.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, ElasticWindow_private_offset + G_STRUCT_OFFSET (ElasticWindowPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "basic_view", FALSE, ElasticWindow_private_offset + G_STRUCT_OFFSET (ElasticWindowPrivate, basic_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "interactive_view", FALSE, ElasticWindow_private_offset + G_STRUCT_OFFSET (ElasticWindowPrivate, interactive_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "toast_overlay", FALSE, ElasticWindow_private_offset + G_STRUCT_OFFSET (ElasticWindowPrivate, toast_overlay));
	g_type_ensure (ELASTIC_TYPE_PROPERTIES_VIEW);
	g_type_ensure (ELASTIC_TYPE_EXPORT_VIEW);
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "editor.reset", NULL, __elastic_window___lambda14__gtk_widget_action_activate_func);
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "editor.basic-view", NULL, __elastic_window___lambda15__gtk_widget_action_activate_func);
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "editor.interactive-view", NULL, __elastic_window___lambda16__gtk_widget_action_activate_func);
	gtk_widget_class_add_binding_action (GTK_WIDGET_CLASS (klass), GDK_KEY_W, GDK_CONTROL_MASK, "window.close", NULL, NULL);
}

static void
elastic_window_instance_init (ElasticWindow * self,
                              gpointer klass)
{
	self->priv = elastic_window_get_instance_private (self);
	g_type_ensure (ELASTIC_TYPE_BASIC_VIEW);
	g_type_ensure (ELASTIC_TYPE_INTERACTIVE_VIEW);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
elastic_window_finalize (GObject * obj)
{
	ElasticWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ELASTIC_TYPE_WINDOW, ElasticWindow);
	_g_object_unref0 (self->priv->_spring);
	G_OBJECT_CLASS (elastic_window_parent_class)->finalize (obj);
}

static GType
elastic_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ElasticWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) elastic_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ElasticWindow), 0, (GInstanceInitFunc) elastic_window_instance_init, NULL };
	GType elastic_window_type_id;
	elastic_window_type_id = g_type_register_static (adw_application_window_get_type (), "ElasticWindow", &g_define_type_info, 0);
	ElasticWindow_private_offset = g_type_add_instance_private (elastic_window_type_id, sizeof (ElasticWindowPrivate));
	return elastic_window_type_id;
}

GType
elastic_window_get_type (void)
{
	static volatile gsize elastic_window_type_id__once = 0;
	if (g_once_init_enter (&elastic_window_type_id__once)) {
		GType elastic_window_type_id;
		elastic_window_type_id = elastic_window_get_type_once ();
		g_once_init_leave (&elastic_window_type_id__once, elastic_window_type_id);
	}
	return elastic_window_type_id__once;
}

static void
_vala_elastic_window_get_property (GObject * object,
                                   guint property_id,
                                   GValue * value,
                                   GParamSpec * pspec)
{
	ElasticWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ELASTIC_TYPE_WINDOW, ElasticWindow);
	switch (property_id) {
		case ELASTIC_WINDOW_SPRING_PROPERTY:
		g_value_set_object (value, elastic_window_get_spring (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_elastic_window_set_property (GObject * object,
                                   guint property_id,
                                   const GValue * value,
                                   GParamSpec * pspec)
{
	ElasticWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ELASTIC_TYPE_WINDOW, ElasticWindow);
	switch (property_id) {
		case ELASTIC_WINDOW_SPRING_PROPERTY:
		elastic_window_set_spring (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

