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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#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_TYPE_SIZING_BIN (dino_ui_sizing_bin_get_type ())
#define DINO_UI_SIZING_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_SIZING_BIN, DinoUiSizingBin))
#define DINO_UI_SIZING_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_SIZING_BIN, DinoUiSizingBinClass))
#define DINO_UI_IS_SIZING_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_SIZING_BIN))
#define DINO_UI_IS_SIZING_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_SIZING_BIN))
#define DINO_UI_SIZING_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_SIZING_BIN, DinoUiSizingBinClass))

typedef struct _DinoUiSizingBin DinoUiSizingBin;
typedef struct _DinoUiSizingBinClass DinoUiSizingBinClass;
typedef struct _DinoUiSizingBinPrivate DinoUiSizingBinPrivate;
enum  {
	DINO_UI_SIZING_BIN_0_PROPERTY,
	DINO_UI_SIZING_BIN_MIN_WIDTH_PROPERTY,
	DINO_UI_SIZING_BIN_TARGET_WIDTH_PROPERTY,
	DINO_UI_SIZING_BIN_MAX_WIDTH_PROPERTY,
	DINO_UI_SIZING_BIN_MIN_HEIGHT_PROPERTY,
	DINO_UI_SIZING_BIN_TARGET_HEIGHT_PROPERTY,
	DINO_UI_SIZING_BIN_MAX_HEIGHT_PROPERTY,
	DINO_UI_SIZING_BIN_NUM_PROPERTIES
};
static GParamSpec* dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _DinoUiSizingBin {
	GtkWidget parent_instance;
	DinoUiSizingBinPrivate * priv;
};

struct _DinoUiSizingBinClass {
	GtkWidgetClass parent_class;
};

struct _DinoUiSizingBinPrivate {
	gint _min_width;
	gint _target_width;
	gint _max_width;
	gint _min_height;
	gint _target_height;
	gint _max_height;
};

static gint DinoUiSizingBin_private_offset;
static gpointer dino_ui_sizing_bin_parent_class = NULL;

VALA_EXTERN GType dino_ui_sizing_bin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiSizingBin, g_object_unref)
static void dino_ui_sizing_bin_real_compute_expand_internal (GtkWidget* base,
                                                      gboolean* hexpand,
                                                      gboolean* vexpand);
static void dino_ui_sizing_bin_real_size_allocate (GtkWidget* base,
                                            gint width,
                                            gint height,
                                            gint baseline);
VALA_EXTERN gint dino_ui_sizing_bin_get_max_height (DinoUiSizingBin* self);
VALA_EXTERN gint dino_ui_sizing_bin_get_max_width (DinoUiSizingBin* self);
static void dino_ui_sizing_bin_real_measure (GtkWidget* base,
                                      GtkOrientation orientation,
                                      gint for_size,
                                      gint* minimum,
                                      gint* natural,
                                      gint* minimum_baseline,
                                      gint* natural_baseline);
VALA_EXTERN gint dino_ui_sizing_bin_get_min_width (DinoUiSizingBin* self);
VALA_EXTERN gint dino_ui_sizing_bin_get_target_width (DinoUiSizingBin* self);
VALA_EXTERN gint dino_ui_sizing_bin_get_min_height (DinoUiSizingBin* self);
VALA_EXTERN gint dino_ui_sizing_bin_get_target_height (DinoUiSizingBin* self);
static GtkSizeRequestMode dino_ui_sizing_bin_real_get_request_mode (GtkWidget* base);
static void dino_ui_sizing_bin_real_dispose (GObject* base);
VALA_EXTERN DinoUiSizingBin* dino_ui_sizing_bin_new (void);
VALA_EXTERN DinoUiSizingBin* dino_ui_sizing_bin_construct (GType object_type);
VALA_EXTERN void dino_ui_sizing_bin_set_min_width (DinoUiSizingBin* self,
                                       gint value);
VALA_EXTERN void dino_ui_sizing_bin_set_target_width (DinoUiSizingBin* self,
                                          gint value);
VALA_EXTERN void dino_ui_sizing_bin_set_max_width (DinoUiSizingBin* self,
                                       gint value);
VALA_EXTERN void dino_ui_sizing_bin_set_min_height (DinoUiSizingBin* self,
                                        gint value);
VALA_EXTERN void dino_ui_sizing_bin_set_target_height (DinoUiSizingBin* self,
                                           gint value);
VALA_EXTERN void dino_ui_sizing_bin_set_max_height (DinoUiSizingBin* self,
                                        gint value);
static void dino_ui_sizing_bin_finalize (GObject * obj);
static GType dino_ui_sizing_bin_get_type_once (void);
static void _vala_dino_ui_sizing_bin_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_dino_ui_sizing_bin_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_sizing_bin_get_instance_private (DinoUiSizingBin* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiSizingBin_private_offset);
}

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

static void
dino_ui_sizing_bin_real_compute_expand_internal (GtkWidget* base,
                                                 gboolean* hexpand,
                                                 gboolean* vexpand)
{
	DinoUiSizingBin * self;
	gboolean _vala_hexpand = FALSE;
	gboolean _vala_vexpand = FALSE;
	GtkWidget* child = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	self = (DinoUiSizingBin*) base;
	_vala_hexpand = FALSE;
	_vala_vexpand = FALSE;
	_tmp0_ = gtk_widget_get_first_child ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	child = _tmp1_;
	while (TRUE) {
		GtkWidget* _tmp2_;
		gboolean _tmp3_ = FALSE;
		gboolean _tmp5_ = FALSE;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp8_;
		GtkWidget* _tmp9_;
		_tmp2_ = child;
		if (!(_tmp2_ != NULL)) {
			break;
		}
		if (_vala_hexpand) {
			_tmp3_ = TRUE;
		} else {
			GtkWidget* _tmp4_;
			_tmp4_ = child;
			_tmp3_ = gtk_widget_compute_expand (_tmp4_, GTK_ORIENTATION_HORIZONTAL);
		}
		_vala_hexpand = _tmp3_;
		if (_vala_vexpand) {
			_tmp5_ = TRUE;
		} else {
			GtkWidget* _tmp6_;
			_tmp6_ = child;
			_tmp5_ = gtk_widget_compute_expand (_tmp6_, GTK_ORIENTATION_VERTICAL);
		}
		_vala_vexpand = _tmp5_;
		_tmp7_ = child;
		_tmp8_ = gtk_widget_get_next_sibling (_tmp7_);
		_tmp9_ = _g_object_ref0 (_tmp8_);
		_g_object_unref0 (child);
		child = _tmp9_;
	}
	_g_object_unref0 (child);
	if (hexpand) {
		*hexpand = _vala_hexpand;
	}
	if (vexpand) {
		*vexpand = _vala_vexpand;
	}
}

static void
dino_ui_sizing_bin_real_size_allocate (GtkWidget* base,
                                       gint width,
                                       gint height,
                                       gint baseline)
{
	DinoUiSizingBin * self;
	gint _tmp0_;
	gint _tmp2_;
	GtkWidget* child = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	self = (DinoUiSizingBin*) base;
	_tmp0_ = self->priv->_max_height;
	if (_tmp0_ != -1) {
		gint _tmp1_;
		_tmp1_ = self->priv->_max_height;
		height = MIN (height, _tmp1_);
	}
	_tmp2_ = self->priv->_max_width;
	if (_tmp2_ != -1) {
		gint _tmp3_;
		_tmp3_ = self->priv->_max_width;
		width = MIN (width, _tmp3_);
	}
	_tmp4_ = gtk_widget_get_first_child ((GtkWidget*) self);
	_tmp5_ = _g_object_ref0 (_tmp4_);
	child = _tmp5_;
	while (TRUE) {
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp9_;
		GtkWidget* _tmp10_;
		GtkWidget* _tmp11_;
		_tmp6_ = child;
		if (!(_tmp6_ != NULL)) {
			break;
		}
		_tmp7_ = child;
		if (gtk_widget_should_layout (_tmp7_)) {
			GtkWidget* _tmp8_;
			_tmp8_ = child;
			gtk_widget_allocate (_tmp8_, width, height, baseline, NULL);
		}
		_tmp9_ = child;
		_tmp10_ = gtk_widget_get_next_sibling (_tmp9_);
		_tmp11_ = _g_object_ref0 (_tmp10_);
		_g_object_unref0 (child);
		child = _tmp11_;
	}
	_g_object_unref0 (child);
}

static void
dino_ui_sizing_bin_real_measure (GtkWidget* base,
                                 GtkOrientation orientation,
                                 gint for_size,
                                 gint* minimum,
                                 gint* natural,
                                 gint* minimum_baseline,
                                 gint* natural_baseline)
{
	DinoUiSizingBin * self;
	gint _vala_minimum = 0;
	gint _vala_natural = 0;
	gint _vala_minimum_baseline = 0;
	gint _vala_natural_baseline = 0;
	GtkWidget* child = NULL;
	GtkWidget* _tmp4_;
	GtkWidget* _tmp5_;
	self = (DinoUiSizingBin*) base;
	if (orientation == GTK_ORIENTATION_HORIZONTAL) {
		gint _tmp0_;
		gint _tmp1_;
		_tmp0_ = self->priv->_min_width;
		_vala_minimum = _tmp0_;
		_tmp1_ = self->priv->_target_width;
		_vala_natural = _tmp1_;
	} else {
		gint _tmp2_;
		gint _tmp3_;
		_tmp2_ = self->priv->_min_height;
		_vala_minimum = _tmp2_;
		_tmp3_ = self->priv->_target_height;
		_vala_natural = _tmp3_;
	}
	_vala_minimum_baseline = -1;
	_vala_natural_baseline = -1;
	_tmp4_ = gtk_widget_get_first_child ((GtkWidget*) self);
	_tmp5_ = _g_object_ref0 (_tmp4_);
	child = _tmp5_;
	while (TRUE) {
		GtkWidget* _tmp6_;
		GtkWidget* _tmp7_;
		GtkWidget* _tmp13_;
		GtkWidget* _tmp14_;
		GtkWidget* _tmp15_;
		_tmp6_ = child;
		if (!(_tmp6_ != NULL)) {
			break;
		}
		_tmp7_ = child;
		if (gtk_widget_should_layout (_tmp7_)) {
			gint child_min = 0;
			gint child_nat = 0;
			gint child_min_baseline = 0;
			gint child_nat_baseline = 0;
			GtkWidget* _tmp8_;
			gint _tmp9_ = 0;
			gint _tmp10_ = 0;
			gint _tmp11_ = 0;
			gint _tmp12_ = 0;
			child_min = 0;
			child_nat = 0;
			child_min_baseline = -1;
			child_nat_baseline = -1;
			_tmp8_ = child;
			gtk_widget_measure (_tmp8_, orientation, for_size, &_tmp9_, &_tmp10_, &_tmp11_, &_tmp12_);
			child_min = _tmp9_;
			child_nat = _tmp10_;
			child_min_baseline = _tmp11_;
			child_nat_baseline = _tmp12_;
			_vala_minimum = MAX (_vala_minimum, child_min);
			_vala_natural = MAX (_vala_natural, child_nat);
			if (child_min_baseline > 0) {
				_vala_minimum_baseline = MAX (_vala_minimum_baseline, child_min_baseline);
			}
			if (child_nat_baseline > 0) {
				_vala_natural_baseline = MAX (_vala_natural_baseline, child_nat_baseline);
			}
		}
		_tmp13_ = child;
		_tmp14_ = gtk_widget_get_next_sibling (_tmp13_);
		_tmp15_ = _g_object_ref0 (_tmp14_);
		_g_object_unref0 (child);
		child = _tmp15_;
	}
	if (orientation == GTK_ORIENTATION_HORIZONTAL) {
		gint _tmp16_;
		_tmp16_ = self->priv->_max_width;
		if (_tmp16_ != -1) {
			gint _tmp17_;
			_tmp17_ = self->priv->_max_width;
			_vala_natural = MIN (_vala_natural, _tmp17_);
		}
	} else {
		gint _tmp18_;
		_tmp18_ = self->priv->_max_height;
		if (_tmp18_ != -1) {
			gint _tmp19_;
			_tmp19_ = self->priv->_max_height;
			_vala_natural = MIN (_vala_natural, _tmp19_);
		}
	}
	_vala_natural = MAX (_vala_natural, _vala_minimum);
	_g_object_unref0 (child);
	if (minimum) {
		*minimum = _vala_minimum;
	}
	if (natural) {
		*natural = _vala_natural;
	}
	if (minimum_baseline) {
		*minimum_baseline = _vala_minimum_baseline;
	}
	if (natural_baseline) {
		*natural_baseline = _vala_natural_baseline;
	}
}

static GtkSizeRequestMode
dino_ui_sizing_bin_real_get_request_mode (GtkWidget* base)
{
	DinoUiSizingBin * self;
	GtkWidget* child = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkSizeRequestMode result;
	self = (DinoUiSizingBin*) base;
	_tmp0_ = gtk_widget_get_first_child ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	child = _tmp1_;
	_tmp2_ = child;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = child;
		result = gtk_widget_get_request_mode (_tmp3_);
		_g_object_unref0 (child);
		return result;
	}
	result = GTK_SIZE_REQUEST_CONSTANT_SIZE;
	_g_object_unref0 (child);
	return result;
}

static void
dino_ui_sizing_bin_real_dispose (GObject* base)
{
	DinoUiSizingBin * self;
	GtkWidget* child = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	self = (DinoUiSizingBin*) base;
	_tmp0_ = gtk_widget_get_first_child ((GtkWidget*) self);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	child = _tmp1_;
	_tmp2_ = child;
	if (_tmp2_ != NULL) {
		GtkWidget* _tmp3_;
		_tmp3_ = child;
		gtk_widget_unparent (_tmp3_);
	}
	_g_object_unref0 (child);
}

DinoUiSizingBin*
dino_ui_sizing_bin_construct (GType object_type)
{
	DinoUiSizingBin * self = NULL;
	self = (DinoUiSizingBin*) g_object_new (object_type, NULL);
	return self;
}

DinoUiSizingBin*
dino_ui_sizing_bin_new (void)
{
	return dino_ui_sizing_bin_construct (DINO_UI_TYPE_SIZING_BIN);
}

gint
dino_ui_sizing_bin_get_min_width (DinoUiSizingBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_min_width;
	return result;
}

void
dino_ui_sizing_bin_set_min_width (DinoUiSizingBin* self,
                                  gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_sizing_bin_get_min_width (self);
	if (old_value != value) {
		self->priv->_min_width = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MIN_WIDTH_PROPERTY]);
	}
}

gint
dino_ui_sizing_bin_get_target_width (DinoUiSizingBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_target_width;
	return result;
}

void
dino_ui_sizing_bin_set_target_width (DinoUiSizingBin* self,
                                     gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_sizing_bin_get_target_width (self);
	if (old_value != value) {
		self->priv->_target_width = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_TARGET_WIDTH_PROPERTY]);
	}
}

gint
dino_ui_sizing_bin_get_max_width (DinoUiSizingBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_max_width;
	return result;
}

void
dino_ui_sizing_bin_set_max_width (DinoUiSizingBin* self,
                                  gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_sizing_bin_get_max_width (self);
	if (old_value != value) {
		self->priv->_max_width = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MAX_WIDTH_PROPERTY]);
	}
}

gint
dino_ui_sizing_bin_get_min_height (DinoUiSizingBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_min_height;
	return result;
}

void
dino_ui_sizing_bin_set_min_height (DinoUiSizingBin* self,
                                   gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_sizing_bin_get_min_height (self);
	if (old_value != value) {
		self->priv->_min_height = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MIN_HEIGHT_PROPERTY]);
	}
}

gint
dino_ui_sizing_bin_get_target_height (DinoUiSizingBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_target_height;
	return result;
}

void
dino_ui_sizing_bin_set_target_height (DinoUiSizingBin* self,
                                      gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_sizing_bin_get_target_height (self);
	if (old_value != value) {
		self->priv->_target_height = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_TARGET_HEIGHT_PROPERTY]);
	}
}

gint
dino_ui_sizing_bin_get_max_height (DinoUiSizingBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_max_height;
	return result;
}

void
dino_ui_sizing_bin_set_max_height (DinoUiSizingBin* self,
                                   gint value)
{
	gint old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_sizing_bin_get_max_height (self);
	if (old_value != value) {
		self->priv->_max_height = value;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MAX_HEIGHT_PROPERTY]);
	}
}

static void
dino_ui_sizing_bin_class_init (DinoUiSizingBinClass * klass,
                               gpointer klass_data)
{
	dino_ui_sizing_bin_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiSizingBin_private_offset);
	((GtkWidgetClass *) klass)->compute_expand = (void (*) (GtkWidget*, gboolean*, gboolean*)) dino_ui_sizing_bin_real_compute_expand_internal;
	((GtkWidgetClass *) klass)->size_allocate = (void (*) (GtkWidget*, gint, gint, gint)) dino_ui_sizing_bin_real_size_allocate;
	((GtkWidgetClass *) klass)->measure = (void (*) (GtkWidget*, GtkOrientation, gint, gint*, gint*, gint*, gint*)) dino_ui_sizing_bin_real_measure;
	((GtkWidgetClass *) klass)->get_request_mode = (GtkSizeRequestMode (*) (GtkWidget*)) dino_ui_sizing_bin_real_get_request_mode;
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) dino_ui_sizing_bin_real_dispose;
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_sizing_bin_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_sizing_bin_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_sizing_bin_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_SIZING_BIN_MIN_WIDTH_PROPERTY, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MIN_WIDTH_PROPERTY] = g_param_spec_int ("min-width", "min-width", "min-width", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_SIZING_BIN_TARGET_WIDTH_PROPERTY, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_TARGET_WIDTH_PROPERTY] = g_param_spec_int ("target-width", "target-width", "target-width", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_SIZING_BIN_MAX_WIDTH_PROPERTY, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MAX_WIDTH_PROPERTY] = g_param_spec_int ("max-width", "max-width", "max-width", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_SIZING_BIN_MIN_HEIGHT_PROPERTY, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MIN_HEIGHT_PROPERTY] = g_param_spec_int ("min-height", "min-height", "min-height", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_SIZING_BIN_TARGET_HEIGHT_PROPERTY, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_TARGET_HEIGHT_PROPERTY] = g_param_spec_int ("target-height", "target-height", "target-height", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_SIZING_BIN_MAX_HEIGHT_PROPERTY, dino_ui_sizing_bin_properties[DINO_UI_SIZING_BIN_MAX_HEIGHT_PROPERTY] = g_param_spec_int ("max-height", "max-height", "max-height", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static void
dino_ui_sizing_bin_instance_init (DinoUiSizingBin * self,
                                  gpointer klass)
{
	self->priv = dino_ui_sizing_bin_get_instance_private (self);
	self->priv->_min_width = -1;
	self->priv->_target_width = -1;
	self->priv->_max_width = -1;
	self->priv->_min_height = -1;
	self->priv->_target_height = -1;
	self->priv->_max_height = -1;
}

static void
dino_ui_sizing_bin_finalize (GObject * obj)
{
	DinoUiSizingBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_SIZING_BIN, DinoUiSizingBin);
	G_OBJECT_CLASS (dino_ui_sizing_bin_parent_class)->finalize (obj);
}

static GType
dino_ui_sizing_bin_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiSizingBinClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_sizing_bin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiSizingBin), 0, (GInstanceInitFunc) dino_ui_sizing_bin_instance_init, NULL };
	GType dino_ui_sizing_bin_type_id;
	dino_ui_sizing_bin_type_id = g_type_register_static (gtk_widget_get_type (), "DinoUiSizingBin", &g_define_type_info, 0);
	DinoUiSizingBin_private_offset = g_type_add_instance_private (dino_ui_sizing_bin_type_id, sizeof (DinoUiSizingBinPrivate));
	return dino_ui_sizing_bin_type_id;
}

GType
dino_ui_sizing_bin_get_type (void)
{
	static volatile gsize dino_ui_sizing_bin_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_sizing_bin_type_id__once)) {
		GType dino_ui_sizing_bin_type_id;
		dino_ui_sizing_bin_type_id = dino_ui_sizing_bin_get_type_once ();
		g_once_init_leave (&dino_ui_sizing_bin_type_id__once, dino_ui_sizing_bin_type_id);
	}
	return dino_ui_sizing_bin_type_id__once;
}

static void
_vala_dino_ui_sizing_bin_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	DinoUiSizingBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_SIZING_BIN, DinoUiSizingBin);
	switch (property_id) {
		case DINO_UI_SIZING_BIN_MIN_WIDTH_PROPERTY:
		g_value_set_int (value, dino_ui_sizing_bin_get_min_width (self));
		break;
		case DINO_UI_SIZING_BIN_TARGET_WIDTH_PROPERTY:
		g_value_set_int (value, dino_ui_sizing_bin_get_target_width (self));
		break;
		case DINO_UI_SIZING_BIN_MAX_WIDTH_PROPERTY:
		g_value_set_int (value, dino_ui_sizing_bin_get_max_width (self));
		break;
		case DINO_UI_SIZING_BIN_MIN_HEIGHT_PROPERTY:
		g_value_set_int (value, dino_ui_sizing_bin_get_min_height (self));
		break;
		case DINO_UI_SIZING_BIN_TARGET_HEIGHT_PROPERTY:
		g_value_set_int (value, dino_ui_sizing_bin_get_target_height (self));
		break;
		case DINO_UI_SIZING_BIN_MAX_HEIGHT_PROPERTY:
		g_value_set_int (value, dino_ui_sizing_bin_get_max_height (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_sizing_bin_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	DinoUiSizingBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_SIZING_BIN, DinoUiSizingBin);
	switch (property_id) {
		case DINO_UI_SIZING_BIN_MIN_WIDTH_PROPERTY:
		dino_ui_sizing_bin_set_min_width (self, g_value_get_int (value));
		break;
		case DINO_UI_SIZING_BIN_TARGET_WIDTH_PROPERTY:
		dino_ui_sizing_bin_set_target_width (self, g_value_get_int (value));
		break;
		case DINO_UI_SIZING_BIN_MAX_WIDTH_PROPERTY:
		dino_ui_sizing_bin_set_max_width (self, g_value_get_int (value));
		break;
		case DINO_UI_SIZING_BIN_MIN_HEIGHT_PROPERTY:
		dino_ui_sizing_bin_set_min_height (self, g_value_get_int (value));
		break;
		case DINO_UI_SIZING_BIN_TARGET_HEIGHT_PROPERTY:
		dino_ui_sizing_bin_set_target_height (self, g_value_get_int (value));
		break;
		case DINO_UI_SIZING_BIN_MAX_HEIGHT_PROPERTY:
		dino_ui_sizing_bin_set_max_height (self, g_value_get_int (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

