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

#include <glib-object.h>
#include <glib.h>
#include <gtk/gtk.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 TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE (tuba_dialogs_composer_preferred_sizeable_get_type ())
#define TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE, TubaDialogsComposerPreferredSizeable))
#define TUBA_DIALOGS_COMPOSER_IS_PREFERRED_SIZEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE))
#define TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZEABLE, TubaDialogsComposerPreferredSizeableIface))

typedef struct _TubaDialogsComposerPreferredSizeable TubaDialogsComposerPreferredSizeable;
typedef struct _TubaDialogsComposerPreferredSizeableIface TubaDialogsComposerPreferredSizeableIface;

#define TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN (tuba_dialogs_composer_preferred_size_bin_get_type ())
#define TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN, TubaDialogsComposerPreferredSizeBin))
#define TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN, TubaDialogsComposerPreferredSizeBinClass))
#define TUBA_DIALOGS_COMPOSER_IS_PREFERRED_SIZE_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN))
#define TUBA_DIALOGS_COMPOSER_IS_PREFERRED_SIZE_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN))
#define TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN, TubaDialogsComposerPreferredSizeBinClass))

typedef struct _TubaDialogsComposerPreferredSizeBin TubaDialogsComposerPreferredSizeBin;
typedef struct _TubaDialogsComposerPreferredSizeBinClass TubaDialogsComposerPreferredSizeBinClass;
typedef struct _TubaDialogsComposerPreferredSizeBinPrivate TubaDialogsComposerPreferredSizeBinPrivate;
enum  {
	TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_HEIGHT_PROPERTY,
	TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_WIDTH_PROPERTY,
	TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_CHILD_PROPERTY,
	TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_preferred_size_bin_properties[TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _TubaDialogsComposerPreferredSizeableIface {
	GTypeInterface parent_iface;
	gint (*get_preferred_height) (TubaDialogsComposerPreferredSizeable* self);
	void (*set_preferred_height) (TubaDialogsComposerPreferredSizeable* self, gint value);
	gint (*get_preferred_width) (TubaDialogsComposerPreferredSizeable* self);
	void (*set_preferred_width) (TubaDialogsComposerPreferredSizeable* self, gint value);
};

struct _TubaDialogsComposerPreferredSizeBin {
	GtkWidget parent_instance;
	TubaDialogsComposerPreferredSizeBinPrivate * priv;
};

struct _TubaDialogsComposerPreferredSizeBinClass {
	GtkWidgetClass parent_class;
};

struct _TubaDialogsComposerPreferredSizeBinPrivate {
	gint _height;
	gint _width;
	GtkWidget* _child;
};

static gint TubaDialogsComposerPreferredSizeBin_private_offset;
static gpointer tuba_dialogs_composer_preferred_size_bin_parent_class = NULL;

VALA_EXTERN GType tuba_dialogs_composer_preferred_sizeable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerPreferredSizeable, g_object_unref)
VALA_EXTERN gint tuba_dialogs_composer_preferred_sizeable_get_preferred_height (TubaDialogsComposerPreferredSizeable* self);
VALA_EXTERN void tuba_dialogs_composer_preferred_sizeable_set_preferred_height (TubaDialogsComposerPreferredSizeable* self,
                                                                    gint value);
VALA_EXTERN gint tuba_dialogs_composer_preferred_sizeable_get_preferred_width (TubaDialogsComposerPreferredSizeable* self);
VALA_EXTERN void tuba_dialogs_composer_preferred_sizeable_set_preferred_width (TubaDialogsComposerPreferredSizeable* self,
                                                                   gint value);
static GType tuba_dialogs_composer_preferred_sizeable_get_type_once (void);
VALA_EXTERN GType tuba_dialogs_composer_preferred_size_bin_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerPreferredSizeBin, g_object_unref)
static void tuba_dialogs_composer_preferred_size_bin_real_dispose (GObject* base);
VALA_EXTERN GtkWidget* tuba_dialogs_composer_preferred_size_bin_get_child (TubaDialogsComposerPreferredSizeBin* self);
VALA_EXTERN void tuba_dialogs_composer_preferred_size_bin_set_child (TubaDialogsComposerPreferredSizeBin* self,
                                                         GtkWidget* value);
static GtkSizeRequestMode tuba_dialogs_composer_preferred_size_bin_real_get_request_mode (GtkWidget* base);
static void tuba_dialogs_composer_preferred_size_bin_real_measure (GtkWidget* base,
                                                            GtkOrientation orientation,
                                                            gint for_size,
                                                            gint* minimum,
                                                            gint* natural,
                                                            gint* minimum_baseline,
                                                            gint* natural_baseline);
VALA_EXTERN gint tuba_dialogs_composer_preferred_size_bin_get_width (TubaDialogsComposerPreferredSizeBin* self);
VALA_EXTERN gint tuba_dialogs_composer_preferred_size_bin_get_height (TubaDialogsComposerPreferredSizeBin* self);
static void tuba_dialogs_composer_preferred_size_bin_real_snapshot (GtkWidget* base,
                                                             GtkSnapshot* snapshot);
static void tuba_dialogs_composer_preferred_size_bin_real_size_allocate (GtkWidget* base,
                                                                  gint width,
                                                                  gint height,
                                                                  gint baseline);
VALA_EXTERN TubaDialogsComposerPreferredSizeBin* tuba_dialogs_composer_preferred_size_bin_new (void);
VALA_EXTERN TubaDialogsComposerPreferredSizeBin* tuba_dialogs_composer_preferred_size_bin_construct (GType object_type);
VALA_EXTERN void tuba_dialogs_composer_preferred_size_bin_set_height (TubaDialogsComposerPreferredSizeBin* self,
                                                          gint value);
VALA_EXTERN void tuba_dialogs_composer_preferred_size_bin_set_width (TubaDialogsComposerPreferredSizeBin* self,
                                                         gint value);
static void tuba_dialogs_composer_preferred_size_bin_finalize (GObject * obj);
static GType tuba_dialogs_composer_preferred_size_bin_get_type_once (void);
static void _vala_tuba_dialogs_composer_preferred_size_bin_get_property (GObject * object,
                                                                  guint property_id,
                                                                  GValue * value,
                                                                  GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_preferred_size_bin_set_property (GObject * object,
                                                                  guint property_id,
                                                                  const GValue * value,
                                                                  GParamSpec * pspec);

gint
tuba_dialogs_composer_preferred_sizeable_get_preferred_height (TubaDialogsComposerPreferredSizeable* self)
{
	TubaDialogsComposerPreferredSizeableIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE_GET_INTERFACE (self);
	if (_iface_->get_preferred_height) {
		return _iface_->get_preferred_height (self);
	}
	return -1;
}

void
tuba_dialogs_composer_preferred_sizeable_set_preferred_height (TubaDialogsComposerPreferredSizeable* self,
                                                               gint value)
{
	TubaDialogsComposerPreferredSizeableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE_GET_INTERFACE (self);
	if (_iface_->set_preferred_height) {
		_iface_->set_preferred_height (self, value);
	}
}

gint
tuba_dialogs_composer_preferred_sizeable_get_preferred_width (TubaDialogsComposerPreferredSizeable* self)
{
	TubaDialogsComposerPreferredSizeableIface* _iface_;
	g_return_val_if_fail (self != NULL, -1);
	_iface_ = TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE_GET_INTERFACE (self);
	if (_iface_->get_preferred_width) {
		return _iface_->get_preferred_width (self);
	}
	return -1;
}

void
tuba_dialogs_composer_preferred_sizeable_set_preferred_width (TubaDialogsComposerPreferredSizeable* self,
                                                              gint value)
{
	TubaDialogsComposerPreferredSizeableIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = TUBA_DIALOGS_COMPOSER_PREFERRED_SIZEABLE_GET_INTERFACE (self);
	if (_iface_->set_preferred_width) {
		_iface_->set_preferred_width (self, value);
	}
}

static void
tuba_dialogs_composer_preferred_sizeable_default_init (TubaDialogsComposerPreferredSizeableIface * iface,
                                                       gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_int ("preferred-height", "preferred-height", "preferred-height", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_interface_install_property (iface, g_param_spec_int ("preferred-width", "preferred-width", "preferred-width", G_MININT, G_MAXINT, -1, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_preferred_sizeable_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerPreferredSizeableIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_preferred_sizeable_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType tuba_dialogs_composer_preferred_sizeable_type_id;
	tuba_dialogs_composer_preferred_sizeable_type_id = g_type_register_static (G_TYPE_INTERFACE, "TubaDialogsComposerPreferredSizeable", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_interface_add_prerequisite (tuba_dialogs_composer_preferred_sizeable_type_id, G_TYPE_OBJECT);
	return tuba_dialogs_composer_preferred_sizeable_type_id;
}

GType
tuba_dialogs_composer_preferred_sizeable_get_type (void)
{
	static GType tuba_dialogs_composer_preferred_sizeable_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_preferred_sizeable_type_id__once)) {
		GType tuba_dialogs_composer_preferred_sizeable_type_id;
		tuba_dialogs_composer_preferred_sizeable_type_id = tuba_dialogs_composer_preferred_sizeable_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_preferred_sizeable_type_id__once, tuba_dialogs_composer_preferred_sizeable_type_id);
	}
	return tuba_dialogs_composer_preferred_sizeable_type_id__once;
}

static inline gpointer
tuba_dialogs_composer_preferred_size_bin_get_instance_private (TubaDialogsComposerPreferredSizeBin* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerPreferredSizeBin_private_offset);
}

static void
tuba_dialogs_composer_preferred_size_bin_real_dispose (GObject* base)
{
	TubaDialogsComposerPreferredSizeBin * self;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	self = (TubaDialogsComposerPreferredSizeBin*) base;
	_tmp0_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		_tmp2_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
		_tmp3_ = _tmp2_;
		gtk_widget_unparent (_tmp3_);
		tuba_dialogs_composer_preferred_size_bin_set_child (self, NULL);
	}
	G_OBJECT_CLASS (tuba_dialogs_composer_preferred_size_bin_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
}

static GtkSizeRequestMode
tuba_dialogs_composer_preferred_size_bin_real_get_request_mode (GtkWidget* base)
{
	TubaDialogsComposerPreferredSizeBin * self;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkSizeRequestMode result;
	self = (TubaDialogsComposerPreferredSizeBin*) base;
	_tmp0_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		GtkWidget* _tmp2_;
		GtkWidget* _tmp3_;
		_tmp2_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
		_tmp3_ = _tmp2_;
		result = gtk_widget_get_request_mode (_tmp3_);
		return result;
	}
	result = GTK_SIZE_REQUEST_CONSTANT_SIZE;
	return result;
}

static void
tuba_dialogs_composer_preferred_size_bin_real_measure (GtkWidget* base,
                                                       GtkOrientation orientation,
                                                       gint for_size,
                                                       gint* minimum,
                                                       gint* natural,
                                                       gint* minimum_baseline,
                                                       gint* natural_baseline)
{
	TubaDialogsComposerPreferredSizeBin * self;
	gint _vala_minimum = 0;
	gint _vala_natural = 0;
	gint _vala_minimum_baseline = 0;
	gint _vala_natural_baseline = 0;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
	gint _tmp7_ = 0;
	gboolean _tmp8_ = FALSE;
	gint _tmp9_;
	gint _tmp10_;
	self = (TubaDialogsComposerPreferredSizeBin*) base;
	_tmp0_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		_vala_natural_baseline = -1;
		_vala_minimum_baseline = _vala_natural_baseline;
		_vala_natural = 0;
		_vala_minimum = _vala_natural;
		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;
		}
		return;
	}
	_tmp2_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp3_ = _tmp2_;
	gtk_widget_measure (_tmp3_, orientation, for_size, &_tmp4_, &_tmp5_, &_tmp6_, &_tmp7_);
	_vala_minimum = _tmp4_;
	_vala_natural = _tmp5_;
	_vala_minimum_baseline = _tmp6_;
	_vala_natural_baseline = _tmp7_;
	_tmp9_ = tuba_dialogs_composer_preferred_size_bin_get_width (self);
	_tmp10_ = _tmp9_;
	if (_tmp10_ != -1) {
		_tmp8_ = TRUE;
	} else {
		gint _tmp11_;
		gint _tmp12_;
		_tmp11_ = tuba_dialogs_composer_preferred_size_bin_get_height (self);
		_tmp12_ = _tmp11_;
		_tmp8_ = _tmp12_ != -1;
	}
	if (_tmp8_) {
		gint _tmp13_ = 0;
		if (orientation == GTK_ORIENTATION_HORIZONTAL) {
			gint _tmp14_;
			gint _tmp15_;
			_tmp14_ = tuba_dialogs_composer_preferred_size_bin_get_width (self);
			_tmp15_ = _tmp14_;
			_tmp13_ = _tmp15_;
		} else {
			gint _tmp16_;
			gint _tmp17_;
			_tmp16_ = tuba_dialogs_composer_preferred_size_bin_get_height (self);
			_tmp17_ = _tmp16_;
			_tmp13_ = _tmp17_;
		}
		_vala_natural = MAX (_vala_minimum, MAX (_vala_natural, _tmp13_));
	}
	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 void
tuba_dialogs_composer_preferred_size_bin_real_snapshot (GtkWidget* base,
                                                        GtkSnapshot* snapshot)
{
	TubaDialogsComposerPreferredSizeBin * self;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	self = (TubaDialogsComposerPreferredSizeBin*) base;
	g_return_if_fail (snapshot != NULL);
	_tmp0_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		GTK_WIDGET_CLASS (tuba_dialogs_composer_preferred_size_bin_parent_class)->snapshot (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), snapshot);
		return;
	}
	_tmp2_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp3_ = _tmp2_;
	gtk_widget_snapshot_child ((GtkWidget*) self, _tmp3_, snapshot);
}

static void
tuba_dialogs_composer_preferred_size_bin_real_size_allocate (GtkWidget* base,
                                                             gint width,
                                                             gint height,
                                                             gint baseline)
{
	TubaDialogsComposerPreferredSizeBin * self;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	self = (TubaDialogsComposerPreferredSizeBin*) base;
	_tmp0_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == NULL) {
		GTK_WIDGET_CLASS (tuba_dialogs_composer_preferred_size_bin_parent_class)->size_allocate (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), width, height, baseline);
		return;
	}
	_tmp2_ = tuba_dialogs_composer_preferred_size_bin_get_child (self);
	_tmp3_ = _tmp2_;
	gtk_widget_allocate (_tmp3_, width, height, baseline, NULL);
}

TubaDialogsComposerPreferredSizeBin*
tuba_dialogs_composer_preferred_size_bin_construct (GType object_type)
{
	TubaDialogsComposerPreferredSizeBin * self = NULL;
	self = (TubaDialogsComposerPreferredSizeBin*) g_object_new (object_type, NULL);
	return self;
}

TubaDialogsComposerPreferredSizeBin*
tuba_dialogs_composer_preferred_size_bin_new (void)
{
	return tuba_dialogs_composer_preferred_size_bin_construct (TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN);
}

gint
tuba_dialogs_composer_preferred_size_bin_get_height (TubaDialogsComposerPreferredSizeBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_height;
	return result;
}

void
tuba_dialogs_composer_preferred_size_bin_set_height (TubaDialogsComposerPreferredSizeBin* self,
                                                     gint value)
{
	g_return_if_fail (self != NULL);
	self->priv->_height = value;
	gtk_widget_queue_resize ((GtkWidget*) self);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_preferred_size_bin_properties[TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_HEIGHT_PROPERTY]);
}

gint
tuba_dialogs_composer_preferred_size_bin_get_width (TubaDialogsComposerPreferredSizeBin* self)
{
	gint result;
	g_return_val_if_fail (self != NULL, -1);
	result = self->priv->_width;
	return result;
}

void
tuba_dialogs_composer_preferred_size_bin_set_width (TubaDialogsComposerPreferredSizeBin* self,
                                                    gint value)
{
	g_return_if_fail (self != NULL);
	self->priv->_width = value;
	gtk_widget_queue_resize ((GtkWidget*) self);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_preferred_size_bin_properties[TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_WIDTH_PROPERTY]);
}

GtkWidget*
tuba_dialogs_composer_preferred_size_bin_get_child (TubaDialogsComposerPreferredSizeBin* self)
{
	GtkWidget* result;
	GtkWidget* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_child;
	result = _tmp0_;
	return result;
}

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

void
tuba_dialogs_composer_preferred_size_bin_set_child (TubaDialogsComposerPreferredSizeBin* self,
                                                    GtkWidget* value)
{
	GtkWidget* _tmp0_;
	GtkWidget* _tmp2_;
	GtkWidget* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_child;
	if (_tmp0_ != NULL) {
		GtkWidget* _tmp1_;
		_tmp1_ = self->priv->_child;
		gtk_widget_unparent (_tmp1_);
	}
	_tmp2_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_child);
	self->priv->_child = _tmp2_;
	_tmp3_ = self->priv->_child;
	if (_tmp3_ != NULL) {
		GtkWidget* _tmp4_;
		_tmp4_ = self->priv->_child;
		gtk_widget_set_parent (_tmp4_, (GtkWidget*) self);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_preferred_size_bin_properties[TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_CHILD_PROPERTY]);
}

static void
tuba_dialogs_composer_preferred_size_bin_class_init (TubaDialogsComposerPreferredSizeBinClass * klass,
                                                     gpointer klass_data)
{
	tuba_dialogs_composer_preferred_size_bin_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerPreferredSizeBin_private_offset);
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) tuba_dialogs_composer_preferred_size_bin_real_dispose;
	((GtkWidgetClass *) klass)->get_request_mode = (GtkSizeRequestMode (*) (GtkWidget*)) tuba_dialogs_composer_preferred_size_bin_real_get_request_mode;
	((GtkWidgetClass *) klass)->measure = (void (*) (GtkWidget*, GtkOrientation, gint, gint*, gint*, gint*, gint*)) tuba_dialogs_composer_preferred_size_bin_real_measure;
	((GtkWidgetClass *) klass)->snapshot = (void (*) (GtkWidget*, GtkSnapshot*)) tuba_dialogs_composer_preferred_size_bin_real_snapshot;
	((GtkWidgetClass *) klass)->size_allocate = (void (*) (GtkWidget*, gint, gint, gint)) tuba_dialogs_composer_preferred_size_bin_real_size_allocate;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_preferred_size_bin_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_preferred_size_bin_set_property;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_preferred_size_bin_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_HEIGHT_PROPERTY, tuba_dialogs_composer_preferred_size_bin_properties[TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_HEIGHT_PROPERTY] = g_param_spec_int ("height", "height", "height", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_WIDTH_PROPERTY, tuba_dialogs_composer_preferred_size_bin_properties[TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_WIDTH_PROPERTY] = g_param_spec_int ("width", "width", "width", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_CHILD_PROPERTY, tuba_dialogs_composer_preferred_size_bin_properties[TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_CHILD_PROPERTY] = g_param_spec_object ("child", "child", "child", gtk_widget_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (klass), GTK_ACCESSIBLE_ROLE_GENERIC);
}

static void
tuba_dialogs_composer_preferred_size_bin_instance_init (TubaDialogsComposerPreferredSizeBin * self,
                                                        gpointer klass)
{
	self->priv = tuba_dialogs_composer_preferred_size_bin_get_instance_private (self);
	self->priv->_height = -1;
	self->priv->_width = -1;
	self->priv->_child = NULL;
}

static void
tuba_dialogs_composer_preferred_size_bin_finalize (GObject * obj)
{
	TubaDialogsComposerPreferredSizeBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN, TubaDialogsComposerPreferredSizeBin);
	g_debug ("PreferredSizeBin.vala:26: Destroying PreferredSizeBin");
	_g_object_unref0 (self->priv->_child);
	G_OBJECT_CLASS (tuba_dialogs_composer_preferred_size_bin_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_preferred_size_bin_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerPreferredSizeBinClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_preferred_size_bin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerPreferredSizeBin), 0, (GInstanceInitFunc) tuba_dialogs_composer_preferred_size_bin_instance_init, NULL };
	GType tuba_dialogs_composer_preferred_size_bin_type_id;
	tuba_dialogs_composer_preferred_size_bin_type_id = g_type_register_static (gtk_widget_get_type (), "TubaDialogsComposerPreferredSizeBin", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerPreferredSizeBin_private_offset = g_type_add_instance_private (tuba_dialogs_composer_preferred_size_bin_type_id, sizeof (TubaDialogsComposerPreferredSizeBinPrivate));
	return tuba_dialogs_composer_preferred_size_bin_type_id;
}

GType
tuba_dialogs_composer_preferred_size_bin_get_type (void)
{
	static GType tuba_dialogs_composer_preferred_size_bin_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_preferred_size_bin_type_id__once)) {
		GType tuba_dialogs_composer_preferred_size_bin_type_id;
		tuba_dialogs_composer_preferred_size_bin_type_id = tuba_dialogs_composer_preferred_size_bin_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_preferred_size_bin_type_id__once, tuba_dialogs_composer_preferred_size_bin_type_id);
	}
	return tuba_dialogs_composer_preferred_size_bin_type_id__once;
}

static void
_vala_tuba_dialogs_composer_preferred_size_bin_get_property (GObject * object,
                                                             guint property_id,
                                                             GValue * value,
                                                             GParamSpec * pspec)
{
	TubaDialogsComposerPreferredSizeBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN, TubaDialogsComposerPreferredSizeBin);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_HEIGHT_PROPERTY:
		g_value_set_int (value, tuba_dialogs_composer_preferred_size_bin_get_height (self));
		break;
		case TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_WIDTH_PROPERTY:
		g_value_set_int (value, tuba_dialogs_composer_preferred_size_bin_get_width (self));
		break;
		case TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_CHILD_PROPERTY:
		g_value_set_object (value, tuba_dialogs_composer_preferred_size_bin_get_child (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_preferred_size_bin_set_property (GObject * object,
                                                             guint property_id,
                                                             const GValue * value,
                                                             GParamSpec * pspec)
{
	TubaDialogsComposerPreferredSizeBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_TYPE_PREFERRED_SIZE_BIN, TubaDialogsComposerPreferredSizeBin);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_HEIGHT_PROPERTY:
		tuba_dialogs_composer_preferred_size_bin_set_height (self, g_value_get_int (value));
		break;
		case TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_WIDTH_PROPERTY:
		tuba_dialogs_composer_preferred_size_bin_set_width (self, g_value_get_int (value));
		break;
		case TUBA_DIALOGS_COMPOSER_PREFERRED_SIZE_BIN_CHILD_PROPERTY:
		tuba_dialogs_composer_preferred_size_bin_set_child (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

