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

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

#include <adwaita.h>
#include <glib-object.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdlib.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 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;
typedef struct _ElasticBasicViewPrivate ElasticBasicViewPrivate;

#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_TRANSFORMS_VIEW (elastic_transforms_view_get_type ())
#define ELASTIC_TRANSFORMS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_TRANSFORMS_VIEW, ElasticTransformsView))
#define ELASTIC_TRANSFORMS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_TRANSFORMS_VIEW, ElasticTransformsViewClass))
#define ELASTIC_IS_TRANSFORMS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_TRANSFORMS_VIEW))
#define ELASTIC_IS_TRANSFORMS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_TRANSFORMS_VIEW))
#define ELASTIC_TRANSFORMS_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_TRANSFORMS_VIEW, ElasticTransformsViewClass))

typedef struct _ElasticTransformsView ElasticTransformsView;
typedef struct _ElasticTransformsViewClass ElasticTransformsViewClass;

#define ELASTIC_TYPE_GRAPH_VIEW (elastic_graph_view_get_type ())
#define ELASTIC_GRAPH_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_GRAPH_VIEW, ElasticGraphView))
#define ELASTIC_GRAPH_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_GRAPH_VIEW, ElasticGraphViewClass))
#define ELASTIC_IS_GRAPH_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_GRAPH_VIEW))
#define ELASTIC_IS_GRAPH_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_GRAPH_VIEW))
#define ELASTIC_GRAPH_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_GRAPH_VIEW, ElasticGraphViewClass))

typedef struct _ElasticGraphView ElasticGraphView;
typedef struct _ElasticGraphViewClass ElasticGraphViewClass;

#define ELASTIC_TYPE_PROPERTY_ROW (elastic_property_row_get_type ())
#define ELASTIC_PROPERTY_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRow))
#define ELASTIC_PROPERTY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRowClass))
#define ELASTIC_IS_PROPERTY_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ELASTIC_TYPE_PROPERTY_ROW))
#define ELASTIC_IS_PROPERTY_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ELASTIC_TYPE_PROPERTY_ROW))
#define ELASTIC_PROPERTY_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ELASTIC_TYPE_PROPERTY_ROW, ElasticPropertyRowClass))

typedef struct _ElasticPropertyRow ElasticPropertyRow;
typedef struct _ElasticPropertyRowClass ElasticPropertyRowClass;
enum  {
	ELASTIC_BASIC_VIEW_0_PROPERTY,
	ELASTIC_BASIC_VIEW_SPRING_PROPERTY,
	ELASTIC_BASIC_VIEW_SHOWING_GRAPH_PROPERTY,
	ELASTIC_BASIC_VIEW_COMPACT_PROPERTY,
	ELASTIC_BASIC_VIEW_NUM_PROPERTIES
};
static GParamSpec* elastic_basic_view_properties[ELASTIC_BASIC_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ElasticBasicView {
	AdwBin parent_instance;
	ElasticBasicViewPrivate * priv;
};

struct _ElasticBasicViewClass {
	AdwBinClass parent_class;
};

struct _ElasticBasicViewPrivate {
	ElasticSpringParams* _spring;
	gboolean _showing_graph;
	gboolean _compact;
	AdwViewStack* stack;
	ElasticTransformsView* transforms_view;
	ElasticGraphView* graph_view;
	AdwMultiLayoutView* multi_layout_view;
	ElasticPropertyRow* velocity_row;
	GBindingGroup* spring_bindings;
};

static gint ElasticBasicView_private_offset;
static gpointer elastic_basic_view_parent_class = NULL;

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_spring_params_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticSpringParams, g_object_unref)
VALA_EXTERN GType elastic_transforms_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticTransformsView, g_object_unref)
VALA_EXTERN GType elastic_graph_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticGraphView, g_object_unref)
VALA_EXTERN GType elastic_property_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ElasticPropertyRow, g_object_unref)
static void elastic_basic_view_reset_animation (ElasticBasicView* self);
VALA_EXTERN void elastic_graph_view_reset (ElasticGraphView* self);
VALA_EXTERN void elastic_transforms_view_reset (ElasticTransformsView* self);
static void elastic_basic_view_notify_visible_child_cb (ElasticBasicView* self);
static void _elastic_basic_view_notify_visible_child_cb_g_object_notify (GObject* _sender,
                                                                  GParamSpec* pspec,
                                                                  gpointer self);
static void elastic_basic_view_notify_transition_running_cb (ElasticBasicView* self);
static void _elastic_basic_view_notify_transition_running_cb_g_object_notify (GObject* _sender,
                                                                       GParamSpec* pspec,
                                                                       gpointer self);
VALA_EXTERN ElasticBasicView* elastic_basic_view_new (void);
VALA_EXTERN ElasticBasicView* elastic_basic_view_construct (GType object_type);
VALA_EXTERN ElasticSpringParams* elastic_basic_view_get_spring (ElasticBasicView* self);
VALA_EXTERN void elastic_basic_view_set_spring (ElasticBasicView* self,
                                    ElasticSpringParams* value);
VALA_EXTERN gboolean elastic_basic_view_get_showing_graph (ElasticBasicView* self);
VALA_EXTERN void elastic_basic_view_set_showing_graph (ElasticBasicView* self,
                                           gboolean value);
VALA_EXTERN gboolean elastic_basic_view_get_compact (ElasticBasicView* self);
VALA_EXTERN void elastic_basic_view_set_compact (ElasticBasicView* self,
                                     gboolean value);
static GObject * elastic_basic_view_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties);
static void _elastic_basic_view___lambda6_ (ElasticBasicView* self);
static void __elastic_basic_view___lambda6__g_object_notify (GObject* _sender,
                                                      GParamSpec* pspec,
                                                      gpointer self);
static void _elastic_basic_view___lambda7_ (GtkWidget* widget);
VALA_EXTERN void elastic_graph_view_run_animation (ElasticGraphView* self);
VALA_EXTERN void elastic_transforms_view_run_animation (ElasticTransformsView* self);
static void __elastic_basic_view___lambda7__gtk_widget_action_activate_func (GtkWidget* widget,
                                                                      const gchar* action_name,
                                                                      GVariant* parameter);
static void elastic_basic_view_finalize (GObject * obj);
static GType elastic_basic_view_get_type_once (void);
static void _vala_elastic_basic_view_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_elastic_basic_view_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);

static inline gpointer
elastic_basic_view_get_instance_private (ElasticBasicView* self)
{
	return G_STRUCT_MEMBER_P (self, ElasticBasicView_private_offset);
}

static void
elastic_basic_view_reset_animation (ElasticBasicView* self)
{
	AdwViewStack* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	ElasticTransformsView* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stack;
	_tmp1_ = adw_view_stack_get_visible_child (_tmp0_);
	_tmp2_ = _tmp1_;
	_tmp3_ = self->priv->transforms_view;
	if (_tmp2_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_widget_get_type (), GtkWidget)) {
		ElasticGraphView* _tmp4_;
		_tmp4_ = self->priv->graph_view;
		elastic_graph_view_reset (_tmp4_);
	} else {
		ElasticTransformsView* _tmp5_;
		_tmp5_ = self->priv->transforms_view;
		elastic_transforms_view_reset (_tmp5_);
	}
}

static void
elastic_basic_view_notify_visible_child_cb (ElasticBasicView* self)
{
	g_return_if_fail (self != NULL);
	if (adw_get_enable_animations ((GtkWidget*) self)) {
		return;
	}
	elastic_basic_view_reset_animation (self);
}

static void
_elastic_basic_view_notify_visible_child_cb_g_object_notify (GObject* _sender,
                                                             GParamSpec* pspec,
                                                             gpointer self)
{
	elastic_basic_view_notify_visible_child_cb ((ElasticBasicView*) self);
}

static void
elastic_basic_view_notify_transition_running_cb (ElasticBasicView* self)
{
	gboolean _tmp0_ = FALSE;
	g_return_if_fail (self != NULL);
	if (!adw_get_enable_animations ((GtkWidget*) self)) {
		_tmp0_ = TRUE;
	} else {
		AdwViewStack* _tmp1_;
		gboolean _tmp2_;
		gboolean _tmp3_;
		_tmp1_ = self->priv->stack;
		_tmp2_ = adw_view_stack_get_transition_running (_tmp1_);
		_tmp3_ = _tmp2_;
		_tmp0_ = _tmp3_;
	}
	if (_tmp0_) {
		return;
	}
	elastic_basic_view_reset_animation (self);
}

static void
_elastic_basic_view_notify_transition_running_cb_g_object_notify (GObject* _sender,
                                                                  GParamSpec* pspec,
                                                                  gpointer self)
{
	elastic_basic_view_notify_transition_running_cb ((ElasticBasicView*) self);
}

ElasticBasicView*
elastic_basic_view_construct (GType object_type)
{
	ElasticBasicView * self = NULL;
	self = (ElasticBasicView*) g_object_new (object_type, NULL);
	return self;
}

ElasticBasicView*
elastic_basic_view_new (void)
{
	return elastic_basic_view_construct (ELASTIC_TYPE_BASIC_VIEW);
}

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

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

void
elastic_basic_view_set_spring (ElasticBasicView* self,
                               ElasticSpringParams* value)
{
	ElasticSpringParams* old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_basic_view_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_basic_view_properties[ELASTIC_BASIC_VIEW_SPRING_PROPERTY]);
	}
}

gboolean
elastic_basic_view_get_showing_graph (ElasticBasicView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_showing_graph;
	return result;
}

void
elastic_basic_view_set_showing_graph (ElasticBasicView* self,
                                      gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = elastic_basic_view_get_showing_graph (self);
	if (old_value != value) {
		self->priv->_showing_graph = value;
		g_object_notify_by_pspec ((GObject *) self, elastic_basic_view_properties[ELASTIC_BASIC_VIEW_SHOWING_GRAPH_PROPERTY]);
	}
}

gboolean
elastic_basic_view_get_compact (ElasticBasicView* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_compact;
	return result;
}

void
elastic_basic_view_set_compact (ElasticBasicView* self,
                                gboolean value)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_;
	gboolean _tmp4_;
	AdwMultiLayoutView* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = elastic_basic_view_get_compact (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == value) {
		return;
	}
	self->priv->_compact = value;
	_tmp3_ = elastic_basic_view_get_compact (self);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		_tmp2_ = "narrow";
	} else {
		_tmp2_ = "wide";
	}
	_tmp5_ = self->priv->multi_layout_view;
	adw_multi_layout_view_set_layout_name (_tmp5_, _tmp2_);
	g_object_notify_by_pspec ((GObject *) self, elastic_basic_view_properties[ELASTIC_BASIC_VIEW_COMPACT_PROPERTY]);
}

static void
_elastic_basic_view___lambda6_ (ElasticBasicView* self)
{
	gboolean _tmp0_;
	_tmp0_ = self->priv->_showing_graph;
	if (_tmp0_) {
		AdwViewStack* _tmp1_;
		ElasticGraphView* _tmp2_;
		_tmp1_ = self->priv->stack;
		_tmp2_ = self->priv->graph_view;
		adw_view_stack_set_visible_child (_tmp1_, (GtkWidget*) _tmp2_);
	} else {
		AdwViewStack* _tmp3_;
		ElasticTransformsView* _tmp4_;
		_tmp3_ = self->priv->stack;
		_tmp4_ = self->priv->transforms_view;
		adw_view_stack_set_visible_child (_tmp3_, (GtkWidget*) _tmp4_);
	}
}

static void
__elastic_basic_view___lambda6__g_object_notify (GObject* _sender,
                                                 GParamSpec* pspec,
                                                 gpointer self)
{
	_elastic_basic_view___lambda6_ ((ElasticBasicView*) self);
}

static GObject *
elastic_basic_view_constructor (GType type,
                                guint n_construct_properties,
                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ElasticBasicView * self;
	GBindingGroup* _tmp0_;
	GBindingGroup* _tmp1_;
	ElasticPropertyRow* _tmp2_;
	GBindingGroup* _tmp3_;
	parent_class = G_OBJECT_CLASS (elastic_basic_view_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ELASTIC_TYPE_BASIC_VIEW, ElasticBasicView);
	_tmp0_ = g_binding_group_new ();
	_g_object_unref0 (self->priv->spring_bindings);
	self->priv->spring_bindings = _tmp0_;
	_tmp1_ = self->priv->spring_bindings;
	_tmp2_ = self->priv->velocity_row;
	g_binding_group_bind (_tmp1_, "velocity", (GObject*) _tmp2_, "value", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
	_tmp3_ = self->priv->spring_bindings;
	g_object_bind_property_with_closures ((GObject*) self, "spring", (GObject*) _tmp3_, "source", G_BINDING_DEFAULT, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	g_signal_connect_object ((GObject*) self, "notify::showing-graph", (GCallback) __elastic_basic_view___lambda6__g_object_notify, self, 0);
	return obj;
}

static void
_elastic_basic_view___lambda7_ (GtkWidget* widget)
{
	ElasticBasicView* _self_ = NULL;
	ElasticBasicView* _tmp0_;
	ElasticBasicView* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (widget != NULL);
	_tmp0_ = _g_object_ref0 (ELASTIC_IS_BASIC_VIEW (widget) ? ((ElasticBasicView*) widget) : NULL);
	_self_ = _tmp0_;
	_tmp1_ = _self_;
	_tmp2_ = _tmp1_->priv->_showing_graph;
	if (_tmp2_) {
		ElasticBasicView* _tmp3_;
		ElasticGraphView* _tmp4_;
		_tmp3_ = _self_;
		_tmp4_ = _tmp3_->priv->graph_view;
		elastic_graph_view_run_animation (_tmp4_);
	} else {
		ElasticBasicView* _tmp5_;
		ElasticTransformsView* _tmp6_;
		_tmp5_ = _self_;
		_tmp6_ = _tmp5_->priv->transforms_view;
		elastic_transforms_view_run_animation (_tmp6_);
	}
	_g_object_unref0 (_self_);
}

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

static void
elastic_basic_view_class_init (ElasticBasicViewClass * klass,
                               gpointer klass_data)
{
	elastic_basic_view_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ElasticBasicView_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_elastic_basic_view_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_elastic_basic_view_set_property;
	G_OBJECT_CLASS (klass)->constructor = elastic_basic_view_constructor;
	G_OBJECT_CLASS (klass)->finalize = elastic_basic_view_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_BASIC_VIEW_SPRING_PROPERTY, elastic_basic_view_properties[ELASTIC_BASIC_VIEW_SPRING_PROPERTY] = g_param_spec_object ("spring", "spring", "spring", ELASTIC_TYPE_SPRING_PARAMS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_BASIC_VIEW_SHOWING_GRAPH_PROPERTY, elastic_basic_view_properties[ELASTIC_BASIC_VIEW_SHOWING_GRAPH_PROPERTY] = g_param_spec_boolean ("showing-graph", "showing-graph", "showing-graph", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), ELASTIC_BASIC_VIEW_COMPACT_PROPERTY, elastic_basic_view_properties[ELASTIC_BASIC_VIEW_COMPACT_PROPERTY] = g_param_spec_boolean ("compact", "compact", "compact", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/app/drey/Elastic/basic-view.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, ElasticBasicView_private_offset + G_STRUCT_OFFSET (ElasticBasicViewPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "transforms_view", FALSE, ElasticBasicView_private_offset + G_STRUCT_OFFSET (ElasticBasicViewPrivate, transforms_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "graph_view", FALSE, ElasticBasicView_private_offset + G_STRUCT_OFFSET (ElasticBasicViewPrivate, graph_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "multi_layout_view", FALSE, ElasticBasicView_private_offset + G_STRUCT_OFFSET (ElasticBasicViewPrivate, multi_layout_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "velocity_row", FALSE, ElasticBasicView_private_offset + G_STRUCT_OFFSET (ElasticBasicViewPrivate, velocity_row));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "notify_visible_child_cb", G_CALLBACK(_elastic_basic_view_notify_visible_child_cb_g_object_notify));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "notify_transition_running_cb", G_CALLBACK(_elastic_basic_view_notify_transition_running_cb_g_object_notify));
	gtk_widget_class_install_property_action (GTK_WIDGET_CLASS (klass), "editor.toggle-graph", "showing-graph");
	gtk_widget_class_install_action (GTK_WIDGET_CLASS (klass), "editor.run-animation", NULL, __elastic_basic_view___lambda7__gtk_widget_action_activate_func);
	gtk_widget_class_set_css_name (GTK_WIDGET_CLASS (klass), "basic-view");
}

static void
elastic_basic_view_instance_init (ElasticBasicView * self,
                                  gpointer klass)
{
	self->priv = elastic_basic_view_get_instance_private (self);
	g_type_ensure (ELASTIC_TYPE_TRANSFORMS_VIEW);
	g_type_ensure (ELASTIC_TYPE_GRAPH_VIEW);
	g_type_ensure (ELASTIC_TYPE_PROPERTY_ROW);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
elastic_basic_view_finalize (GObject * obj)
{
	ElasticBasicView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, ELASTIC_TYPE_BASIC_VIEW, ElasticBasicView);
	_g_object_unref0 (self->priv->_spring);
	_g_object_unref0 (self->priv->spring_bindings);
	G_OBJECT_CLASS (elastic_basic_view_parent_class)->finalize (obj);
}

static GType
elastic_basic_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ElasticBasicViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) elastic_basic_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ElasticBasicView), 0, (GInstanceInitFunc) elastic_basic_view_instance_init, NULL };
	GType elastic_basic_view_type_id;
	elastic_basic_view_type_id = g_type_register_static (adw_bin_get_type (), "ElasticBasicView", &g_define_type_info, 0);
	ElasticBasicView_private_offset = g_type_add_instance_private (elastic_basic_view_type_id, sizeof (ElasticBasicViewPrivate));
	return elastic_basic_view_type_id;
}

GType
elastic_basic_view_get_type (void)
{
	static volatile gsize elastic_basic_view_type_id__once = 0;
	if (g_once_init_enter (&elastic_basic_view_type_id__once)) {
		GType elastic_basic_view_type_id;
		elastic_basic_view_type_id = elastic_basic_view_get_type_once ();
		g_once_init_leave (&elastic_basic_view_type_id__once, elastic_basic_view_type_id);
	}
	return elastic_basic_view_type_id__once;
}

static void
_vala_elastic_basic_view_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	ElasticBasicView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ELASTIC_TYPE_BASIC_VIEW, ElasticBasicView);
	switch (property_id) {
		case ELASTIC_BASIC_VIEW_SPRING_PROPERTY:
		g_value_set_object (value, elastic_basic_view_get_spring (self));
		break;
		case ELASTIC_BASIC_VIEW_SHOWING_GRAPH_PROPERTY:
		g_value_set_boolean (value, elastic_basic_view_get_showing_graph (self));
		break;
		case ELASTIC_BASIC_VIEW_COMPACT_PROPERTY:
		g_value_set_boolean (value, elastic_basic_view_get_compact (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_elastic_basic_view_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	ElasticBasicView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, ELASTIC_TYPE_BASIC_VIEW, ElasticBasicView);
	switch (property_id) {
		case ELASTIC_BASIC_VIEW_SPRING_PROPERTY:
		elastic_basic_view_set_spring (self, g_value_get_object (value));
		break;
		case ELASTIC_BASIC_VIEW_SHOWING_GRAPH_PROPERTY:
		elastic_basic_view_set_showing_graph (self, g_value_get_boolean (value));
		break;
		case ELASTIC_BASIC_VIEW_COMPACT_PROPERTY:
		elastic_basic_view_set_compact (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

