/* contacts-row.c generated by valac 0.23.3.11-4a731, the Vala compiler
 * generated from contacts-row.vala, do not modify */

/* -*- Mode: vala; indent-tabs-mode: t; c-basic-offset: 2; tab-width: 8 -*- */
/*
 * Copyright (C) 2011 Alexander Larsson <alexl@redhat.com>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

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


#define CONTACTS_TYPE_ROW_GROUP (contacts_row_group_get_type ())
#define CONTACTS_ROW_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_ROW_GROUP, ContactsRowGroup))
#define CONTACTS_ROW_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_ROW_GROUP, ContactsRowGroupClass))
#define CONTACTS_IS_ROW_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_ROW_GROUP))
#define CONTACTS_IS_ROW_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_ROW_GROUP))
#define CONTACTS_ROW_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_ROW_GROUP, ContactsRowGroupClass))

typedef struct _ContactsRowGroup ContactsRowGroup;
typedef struct _ContactsRowGroupClass ContactsRowGroupClass;
typedef struct _ContactsRowGroupPrivate ContactsRowGroupPrivate;

#define CONTACTS_ROW_GROUP_TYPE_COLUMN_INFO (contacts_row_group_column_info_get_type ())
typedef struct _ContactsRowGroupColumnInfo ContactsRowGroupColumnInfo;

#define CONTACTS_TYPE_ROW (contacts_row_get_type ())
#define CONTACTS_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_ROW, ContactsRow))
#define CONTACTS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_ROW, ContactsRowClass))
#define CONTACTS_IS_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_ROW))
#define CONTACTS_IS_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_ROW))
#define CONTACTS_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_ROW, ContactsRowClass))

typedef struct _ContactsRow ContactsRow;
typedef struct _ContactsRowClass ContactsRowClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _Block33Data Block33Data;
typedef struct _ContactsRowPrivate ContactsRowPrivate;

#define CONTACTS_ROW_TYPE_CHILD (contacts_row_child_get_type ())
typedef struct _ContactsRowChild ContactsRowChild;

#define CONTACTS_ROW_TYPE_ROW_INFO (contacts_row_row_info_get_type ())
typedef struct _ContactsRowRowInfo ContactsRowRowInfo;

struct _ContactsRowGroup {
	GObject parent_instance;
	ContactsRowGroupPrivate * priv;
	gint n_columns;
};

struct _ContactsRowGroupClass {
	GObjectClass parent_class;
};

struct _ContactsRowGroupColumnInfo {
	gint min_width;
	gint nat_width;
	gint max_width;
	gint prio;
	gint spacing;
};

struct _ContactsRowGroupPrivate {
	ContactsRowGroupColumnInfo* column_info;
	gint column_info_length1;
	gint _column_info_size_;
	gint* cached_widths;
	gint cached_widths_length1;
	gint _cached_widths_size_;
	gint cached_widths_for_width;
	GeeArrayList* rows;
};

struct _Block33Data {
	int _ref_count_;
	ContactsRowGroup* self;
	ContactsRow* row;
};

struct _ContactsRow {
	GtkContainer parent_instance;
	ContactsRowPrivate * priv;
	GdkWindow* event_window;
};

struct _ContactsRowClass {
	GtkContainerClass parent_class;
};

struct _ContactsRowChild {
	GtkWidget** widgets;
	gint widgets_length1;
	gint _widgets_size_;
};

struct _ContactsRowPrivate {
	ContactsRowGroup* group;
	gint n_rows;
	ContactsRowChild* row_children;
	gint row_children_length1;
	gint row_children_length2;
};

struct _ContactsRowRowInfo {
	gint min_height;
	gint nat_height;
	gboolean expand;
};


static gpointer contacts_row_group_parent_class = NULL;
static gpointer contacts_row_parent_class = NULL;

GType contacts_row_group_get_type (void) G_GNUC_CONST;
GType contacts_row_group_column_info_get_type (void) G_GNUC_CONST;
ContactsRowGroupColumnInfo* contacts_row_group_column_info_dup (const ContactsRowGroupColumnInfo* self);
void contacts_row_group_column_info_free (ContactsRowGroupColumnInfo* self);
GType contacts_row_get_type (void) G_GNUC_CONST;
#define CONTACTS_ROW_GROUP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CONTACTS_TYPE_ROW_GROUP, ContactsRowGroupPrivate))
enum  {
	CONTACTS_ROW_GROUP_DUMMY_PROPERTY
};
ContactsRowGroup* contacts_row_group_new (gint n_columns);
ContactsRowGroup* contacts_row_group_construct (GType object_type, gint n_columns);
ContactsRowGroup* contacts_row_group_copy (ContactsRowGroup* self);
ContactsRowGroupColumnInfo* contacts_row_group_get_column_info (ContactsRowGroup* self, gint col);
void contacts_row_group_add (ContactsRowGroup* self, ContactsRow* row);
static Block33Data* block33_data_ref (Block33Data* _data33_);
static void block33_data_unref (void * _userdata_);
static void __lambda139_ (Block33Data* _data33_, GtkWidget* widget);
static void ___lambda139__gtk_widget_destroy (GtkWidget* _sender, gpointer self);
static void contacts_row_group_queue_resize (ContactsRowGroup* self);
void contacts_row_group_set_column_priority (ContactsRowGroup* self, gint column, gint priority);
void contacts_row_group_set_column_min_width (ContactsRowGroup* self, gint column, gint min_width);
void contacts_row_group_set_column_max_width (ContactsRowGroup* self, gint column, gint max_width);
void contacts_row_group_set_column_spacing (ContactsRowGroup* self, gint column, gint spacing);
gint* contacts_row_group_distribute_widths (ContactsRowGroup* self, gint width, int* result_length1);
static gint* _vala_array_dup1 (gint* self, int length);
static gint* _vala_array_dup2 (gint* self, int length);
void contacts_row_group_get_width (ContactsRowGroup* self, gint* minimum_width, gint* natural_width);
gboolean contacts_row_group_is_expanding (ContactsRowGroup* self);
static void contacts_row_group_finalize (GObject* obj);
static GType contacts_row_child_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ContactsRowChild* contacts_row_child_dup (const ContactsRowChild* self);
static void contacts_row_child_free (ContactsRowChild* self);
static void contacts_row_child_copy (const ContactsRowChild* self, ContactsRowChild* dest);
static void contacts_row_child_destroy (ContactsRowChild* self);
#define CONTACTS_ROW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CONTACTS_TYPE_ROW, ContactsRowPrivate))
enum  {
	CONTACTS_ROW_DUMMY_PROPERTY
};
static void _vala_ContactsRowChild_array_free (ContactsRowChild* array, gint array_length);
ContactsRow* contacts_row_new (ContactsRowGroup* group);
ContactsRow* contacts_row_construct (GType object_type, ContactsRowGroup* group);
static void contacts_row_real_realize (GtkWidget* base);
static void contacts_row_real_unrealize (GtkWidget* base);
static void contacts_row_real_map (GtkWidget* base);
static void contacts_row_real_unmap (GtkWidget* base);
void contacts_row_attach (ContactsRow* self, GtkWidget* widget, gint attach_col, gint attach_row);
static void contacts_row_real_add (GtkContainer* base, GtkWidget* widget);
static void contacts_row_real_remove (GtkContainer* base, GtkWidget* widget);
GeeList* contacts_row_get_children_at (ContactsRow* self, gint col, gint row);
static void contacts_row_real_forall_internal (GtkContainer* base, gboolean include_internals, GtkCallback callback, void* callback_target);
static void contacts_row_real_compute_expand_internal (GtkWidget* base, gboolean* hexpand, gboolean* vexpand);
static GType contacts_row_real_child_type (GtkContainer* base);
static GtkSizeRequestMode contacts_row_real_get_request_mode (GtkWidget* base);
static void contacts_row_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height);
static GType contacts_row_row_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
static ContactsRowRowInfo* contacts_row_row_info_dup (const ContactsRowRowInfo* self);
static void contacts_row_row_info_free (ContactsRowRowInfo* self);
static gint* contacts_row_distribute_heights (ContactsRow* self, gint height, ContactsRowRowInfo* row_info, int row_info_length1, int* result_length1);
static ContactsRowRowInfo* contacts_row_get_row_heights_for_widths (ContactsRow* self, gint* widths, int widths_length1, int* result_length1);
static void contacts_row_real_get_preferred_height_for_width (GtkWidget* base, gint width, gint* minimum_height, gint* natural_height);
static void contacts_row_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width);
static void contacts_row_real_get_preferred_width_for_height (GtkWidget* base, gint height, gint* minimum_width, gint* natural_width);
static void contacts_row_real_size_allocate (GtkWidget* base, GtkAllocation* allocation);
static GtkWidget** _vala_array_dup3 (GtkWidget** self, int length);
static void contacts_row_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


ContactsRowGroup* contacts_row_group_construct (GType object_type, gint n_columns) {
	ContactsRowGroup * self = NULL;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	ContactsRowGroupColumnInfo* _tmp2_ = NULL;
	GeeArrayList* _tmp17_ = NULL;
	self = (ContactsRowGroup*) g_object_new (object_type, NULL);
	_tmp0_ = n_columns;
	self->n_columns = _tmp0_;
	_tmp1_ = n_columns;
	_tmp2_ = g_new0 (ContactsRowGroupColumnInfo, _tmp1_);
	self->priv->column_info = (g_free (self->priv->column_info), NULL);
	self->priv->column_info = _tmp2_;
	self->priv->column_info_length1 = _tmp1_;
	self->priv->_column_info_size_ = self->priv->column_info_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp3_ = FALSE;
			_tmp3_ = TRUE;
			while (TRUE) {
				gint _tmp5_ = 0;
				gint _tmp6_ = 0;
				ContactsRowGroupColumnInfo* _tmp7_ = NULL;
				gint _tmp7__length1 = 0;
				gint _tmp8_ = 0;
				ContactsRowGroupColumnInfo* _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				gint _tmp10_ = 0;
				ContactsRowGroupColumnInfo* _tmp11_ = NULL;
				gint _tmp11__length1 = 0;
				gint _tmp12_ = 0;
				ContactsRowGroupColumnInfo* _tmp13_ = NULL;
				gint _tmp13__length1 = 0;
				gint _tmp14_ = 0;
				ContactsRowGroupColumnInfo* _tmp15_ = NULL;
				gint _tmp15__length1 = 0;
				gint _tmp16_ = 0;
				if (!_tmp3_) {
					gint _tmp4_ = 0;
					_tmp4_ = i;
					i = _tmp4_ + 1;
				}
				_tmp3_ = FALSE;
				_tmp5_ = i;
				_tmp6_ = n_columns;
				if (!(_tmp5_ < _tmp6_)) {
					break;
				}
				_tmp7_ = self->priv->column_info;
				_tmp7__length1 = self->priv->column_info_length1;
				_tmp8_ = i;
				_tmp7_[_tmp8_].min_width = 0;
				_tmp9_ = self->priv->column_info;
				_tmp9__length1 = self->priv->column_info_length1;
				_tmp10_ = i;
				_tmp9_[_tmp10_].nat_width = -1;
				_tmp11_ = self->priv->column_info;
				_tmp11__length1 = self->priv->column_info_length1;
				_tmp12_ = i;
				_tmp11_[_tmp12_].max_width = -1;
				_tmp13_ = self->priv->column_info;
				_tmp13__length1 = self->priv->column_info_length1;
				_tmp14_ = i;
				_tmp13_[_tmp14_].prio = 0;
				_tmp15_ = self->priv->column_info;
				_tmp15__length1 = self->priv->column_info_length1;
				_tmp16_ = i;
				_tmp15_[_tmp16_].spacing = 0;
			}
		}
	}
	_tmp17_ = gee_array_list_new (CONTACTS_TYPE_ROW, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->rows);
	self->priv->rows = _tmp17_;
	return self;
}


ContactsRowGroup* contacts_row_group_new (gint n_columns) {
	return contacts_row_group_construct (CONTACTS_TYPE_ROW_GROUP, n_columns);
}


ContactsRowGroup* contacts_row_group_copy (ContactsRowGroup* self) {
	ContactsRowGroup* result = NULL;
	ContactsRowGroup* n = NULL;
	gint _tmp0_ = 0;
	ContactsRowGroup* _tmp1_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->n_columns;
	_tmp1_ = contacts_row_group_new (_tmp0_);
	n = _tmp1_;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_ = 0;
				gint _tmp5_ = 0;
				ContactsRowGroup* _tmp6_ = NULL;
				ContactsRowGroupColumnInfo* _tmp7_ = NULL;
				gint _tmp7__length1 = 0;
				gint _tmp8_ = 0;
				ContactsRowGroupColumnInfo* _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				gint _tmp10_ = 0;
				ContactsRowGroupColumnInfo _tmp11_ = {0};
				ContactsRowGroupColumnInfo _tmp12_ = {0};
				if (!_tmp2_) {
					gint _tmp3_ = 0;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = i;
				_tmp5_ = self->n_columns;
				if (!(_tmp4_ < _tmp5_)) {
					break;
				}
				_tmp6_ = n;
				_tmp7_ = _tmp6_->priv->column_info;
				_tmp7__length1 = _tmp6_->priv->column_info_length1;
				_tmp8_ = i;
				_tmp9_ = self->priv->column_info;
				_tmp9__length1 = self->priv->column_info_length1;
				_tmp10_ = i;
				_tmp11_ = _tmp9_[_tmp10_];
				_tmp7_[_tmp8_] = _tmp11_;
				_tmp12_ = _tmp7_[_tmp8_];
			}
		}
	}
	result = n;
	return result;
}


ContactsRowGroupColumnInfo* contacts_row_group_get_column_info (ContactsRowGroup* self, gint col) {
	ContactsRowGroupColumnInfo* result = NULL;
	ContactsRowGroupColumnInfo* _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gint _tmp1_ = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->column_info;
	_tmp0__length1 = self->priv->column_info_length1;
	_tmp1_ = col;
	result = &_tmp0_[_tmp1_];
	return result;
}


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


static Block33Data* block33_data_ref (Block33Data* _data33_) {
	g_atomic_int_inc (&_data33_->_ref_count_);
	return _data33_;
}


static void block33_data_unref (void * _userdata_) {
	Block33Data* _data33_;
	_data33_ = (Block33Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data33_->_ref_count_)) {
		ContactsRowGroup* self;
		self = _data33_->self;
		_g_object_unref0 (_data33_->row);
		_g_object_unref0 (self);
		g_slice_free (Block33Data, _data33_);
	}
}


static void __lambda139_ (Block33Data* _data33_, GtkWidget* widget) {
	ContactsRowGroup* self;
	GeeArrayList* _tmp0_ = NULL;
	ContactsRow* _tmp1_ = NULL;
	self = _data33_->self;
	g_return_if_fail (widget != NULL);
	_tmp0_ = self->priv->rows;
	_tmp1_ = _data33_->row;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp0_, _tmp1_);
}


static void ___lambda139__gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
	__lambda139_ (self, _sender);
}


void contacts_row_group_add (ContactsRowGroup* self, ContactsRow* row) {
	Block33Data* _data33_;
	ContactsRow* _tmp0_ = NULL;
	ContactsRow* _tmp1_ = NULL;
	GeeArrayList* _tmp2_ = NULL;
	ContactsRow* _tmp3_ = NULL;
	ContactsRow* _tmp4_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (row != NULL);
	_data33_ = g_slice_new0 (Block33Data);
	_data33_->_ref_count_ = 1;
	_data33_->self = g_object_ref (self);
	_tmp0_ = row;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (_data33_->row);
	_data33_->row = _tmp1_;
	_tmp2_ = self->priv->rows;
	_tmp3_ = _data33_->row;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp3_);
	_tmp4_ = _data33_->row;
	g_signal_connect_data ((GtkWidget*) _tmp4_, "destroy", (GCallback) ___lambda139__gtk_widget_destroy, block33_data_ref (_data33_), (GClosureNotify) block33_data_unref, 0);
	block33_data_unref (_data33_);
	_data33_ = NULL;
}


static void contacts_row_group_queue_resize (ContactsRowGroup* self) {
	g_return_if_fail (self != NULL);
	{
		GeeArrayList* _row_list = NULL;
		GeeArrayList* _tmp0_ = NULL;
		GeeArrayList* _tmp1_ = NULL;
		gint _row_size = 0;
		GeeArrayList* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
		gint _row_index = 0;
		_tmp0_ = self->priv->rows;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_row_list = _tmp1_;
		_tmp2_ = _row_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_row_size = _tmp4_;
		_row_index = -1;
		while (TRUE) {
			gint _tmp5_ = 0;
			gint _tmp6_ = 0;
			gint _tmp7_ = 0;
			ContactsRow* row = NULL;
			GeeArrayList* _tmp8_ = NULL;
			gint _tmp9_ = 0;
			gpointer _tmp10_ = NULL;
			ContactsRow* _tmp11_ = NULL;
			gboolean _tmp12_ = FALSE;
			_tmp5_ = _row_index;
			_row_index = _tmp5_ + 1;
			_tmp6_ = _row_index;
			_tmp7_ = _row_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _row_list;
			_tmp9_ = _row_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			row = (ContactsRow*) _tmp10_;
			_tmp11_ = row;
			_tmp12_ = gtk_widget_get_visible ((GtkWidget*) _tmp11_);
			if (_tmp12_) {
				ContactsRow* _tmp13_ = NULL;
				_tmp13_ = row;
				gtk_widget_queue_resize ((GtkWidget*) _tmp13_);
			}
		}
		_g_object_unref0 (_row_list);
	}
}


void contacts_row_group_set_column_priority (ContactsRowGroup* self, gint column, gint priority) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	ContactsRowGroupColumnInfo* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = column;
	_tmp1_ = self->n_columns;
	if (_tmp0_ >= _tmp1_) {
		return;
	}
	_tmp2_ = self->priv->column_info;
	_tmp2__length1 = self->priv->column_info_length1;
	_tmp3_ = column;
	_tmp4_ = priority;
	_tmp2_[_tmp3_].prio = _tmp4_;
	self->priv->cached_widths = (g_free (self->priv->cached_widths), NULL);
	self->priv->cached_widths = NULL;
	self->priv->cached_widths_length1 = 0;
	self->priv->_cached_widths_size_ = self->priv->cached_widths_length1;
	contacts_row_group_queue_resize (self);
}


void contacts_row_group_set_column_min_width (ContactsRowGroup* self, gint column, gint min_width) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	ContactsRowGroupColumnInfo* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = column;
	_tmp1_ = self->n_columns;
	if (_tmp0_ >= _tmp1_) {
		return;
	}
	_tmp2_ = self->priv->column_info;
	_tmp2__length1 = self->priv->column_info_length1;
	_tmp3_ = column;
	_tmp4_ = min_width;
	_tmp2_[_tmp3_].min_width = _tmp4_;
	self->priv->cached_widths = (g_free (self->priv->cached_widths), NULL);
	self->priv->cached_widths = NULL;
	self->priv->cached_widths_length1 = 0;
	self->priv->_cached_widths_size_ = self->priv->cached_widths_length1;
	contacts_row_group_queue_resize (self);
}


void contacts_row_group_set_column_max_width (ContactsRowGroup* self, gint column, gint max_width) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	ContactsRowGroupColumnInfo* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = column;
	_tmp1_ = self->n_columns;
	if (_tmp0_ >= _tmp1_) {
		return;
	}
	_tmp2_ = self->priv->column_info;
	_tmp2__length1 = self->priv->column_info_length1;
	_tmp3_ = column;
	_tmp4_ = max_width;
	_tmp2_[_tmp3_].max_width = _tmp4_;
	self->priv->cached_widths = (g_free (self->priv->cached_widths), NULL);
	self->priv->cached_widths = NULL;
	self->priv->cached_widths_length1 = 0;
	self->priv->_cached_widths_size_ = self->priv->cached_widths_length1;
	contacts_row_group_queue_resize (self);
}


void contacts_row_group_set_column_spacing (ContactsRowGroup* self, gint column, gint spacing) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	ContactsRowGroupColumnInfo* _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	g_return_if_fail (self != NULL);
	_tmp0_ = column;
	_tmp1_ = self->n_columns;
	if (_tmp0_ >= _tmp1_) {
		return;
	}
	_tmp2_ = self->priv->column_info;
	_tmp2__length1 = self->priv->column_info_length1;
	_tmp3_ = column;
	_tmp4_ = spacing;
	_tmp2_[_tmp3_].spacing = _tmp4_;
	self->priv->cached_widths = (g_free (self->priv->cached_widths), NULL);
	self->priv->cached_widths = NULL;
	self->priv->cached_widths_length1 = 0;
	self->priv->_cached_widths_size_ = self->priv->cached_widths_length1;
	contacts_row_group_queue_resize (self);
}


static gint* _vala_array_dup1 (gint* self, int length) {
	return g_memdup (self, length * sizeof (gint));
}


static gint* _vala_array_dup2 (gint* self, int length) {
	return g_memdup (self, length * sizeof (gint));
}


gint* contacts_row_group_distribute_widths (ContactsRowGroup* self, gint width, int* result_length1) {
	gint* result = NULL;
	gboolean _tmp0_ = FALSE;
	gint* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gint max_prio = 0;
	gint* widths = NULL;
	gint _tmp7_ = 0;
	gint* _tmp8_ = NULL;
	gint widths_length1 = 0;
	gint _widths_size_ = 0;
	gint* _tmp125_ = NULL;
	gint _tmp125__length1 = 0;
	gint* _tmp126_ = NULL;
	gint _tmp126__length1 = 0;
	gint _tmp127_ = 0;
	gint* _tmp128_ = NULL;
	gint _tmp128__length1 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->cached_widths;
	_tmp1__length1 = self->priv->cached_widths_length1;
	if (_tmp1_ != NULL) {
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		_tmp2_ = self->priv->cached_widths_for_width;
		_tmp3_ = width;
		_tmp0_ = _tmp2_ == _tmp3_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		gint* _tmp4_ = NULL;
		gint _tmp4__length1 = 0;
		gint* _tmp5_ = NULL;
		gint _tmp5__length1 = 0;
		gint* _tmp6_ = NULL;
		gint _tmp6__length1 = 0;
		_tmp4_ = self->priv->cached_widths;
		_tmp4__length1 = self->priv->cached_widths_length1;
		_tmp5_ = (_tmp4_ != NULL) ? _vala_array_dup1 (_tmp4_, _tmp4__length1) : ((gpointer) _tmp4_);
		_tmp5__length1 = _tmp4__length1;
		_tmp6_ = _tmp5_;
		_tmp6__length1 = _tmp5__length1;
		if (result_length1) {
			*result_length1 = _tmp6__length1;
		}
		result = _tmp6_;
		return result;
	}
	max_prio = 0;
	_tmp7_ = self->n_columns;
	_tmp8_ = g_new0 (gint, _tmp7_);
	widths = _tmp8_;
	widths_length1 = _tmp7_;
	_widths_size_ = widths_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp9_ = FALSE;
			_tmp9_ = TRUE;
			while (TRUE) {
				gint _tmp11_ = 0;
				gint _tmp12_ = 0;
				ContactsRowGroupColumnInfo* info = NULL;
				ContactsRowGroupColumnInfo* _tmp13_ = NULL;
				gint _tmp13__length1 = 0;
				gint _tmp14_ = 0;
				ContactsRowGroupColumnInfo* _tmp15_ = NULL;
				gint _tmp16_ = 0;
				gint _tmp17_ = 0;
				gint _tmp20_ = 0;
				ContactsRowGroupColumnInfo* _tmp21_ = NULL;
				gint _tmp22_ = 0;
				gint _tmp39_ = 0;
				ContactsRowGroupColumnInfo* _tmp40_ = NULL;
				gint _tmp41_ = 0;
				if (!_tmp9_) {
					gint _tmp10_ = 0;
					_tmp10_ = i;
					i = _tmp10_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp11_ = i;
				_tmp12_ = self->n_columns;
				if (!(_tmp11_ < _tmp12_)) {
					break;
				}
				_tmp13_ = self->priv->column_info;
				_tmp13__length1 = self->priv->column_info_length1;
				_tmp14_ = i;
				info = &_tmp13_[_tmp14_];
				_tmp15_ = info;
				_tmp16_ = (*_tmp15_).prio;
				_tmp17_ = max_prio;
				if (_tmp16_ > _tmp17_) {
					ContactsRowGroupColumnInfo* _tmp18_ = NULL;
					gint _tmp19_ = 0;
					_tmp18_ = info;
					_tmp19_ = (*_tmp18_).prio;
					max_prio = _tmp19_;
				}
				_tmp20_ = width;
				_tmp21_ = info;
				_tmp22_ = (*_tmp21_).min_width;
				if (_tmp20_ > _tmp22_) {
					gint* _tmp23_ = NULL;
					gint _tmp23__length1 = 0;
					gint _tmp24_ = 0;
					ContactsRowGroupColumnInfo* _tmp25_ = NULL;
					gint _tmp26_ = 0;
					gint _tmp27_ = 0;
					gint _tmp28_ = 0;
					ContactsRowGroupColumnInfo* _tmp29_ = NULL;
					gint _tmp30_ = 0;
					_tmp23_ = widths;
					_tmp23__length1 = widths_length1;
					_tmp24_ = i;
					_tmp25_ = info;
					_tmp26_ = (*_tmp25_).min_width;
					_tmp23_[_tmp24_] = _tmp26_;
					_tmp27_ = _tmp23_[_tmp24_];
					_tmp28_ = width;
					_tmp29_ = info;
					_tmp30_ = (*_tmp29_).min_width;
					width = _tmp28_ - _tmp30_;
				} else {
					gint _tmp31_ = 0;
					_tmp31_ = width;
					if (_tmp31_ > 0) {
						gint* _tmp32_ = NULL;
						gint _tmp32__length1 = 0;
						gint _tmp33_ = 0;
						gint _tmp34_ = 0;
						gint _tmp35_ = 0;
						_tmp32_ = widths;
						_tmp32__length1 = widths_length1;
						_tmp33_ = i;
						_tmp34_ = width;
						_tmp32_[_tmp33_] = _tmp34_;
						_tmp35_ = _tmp32_[_tmp33_];
						width = 0;
					} else {
						gint* _tmp36_ = NULL;
						gint _tmp36__length1 = 0;
						gint _tmp37_ = 0;
						gint _tmp38_ = 0;
						_tmp36_ = widths;
						_tmp36__length1 = widths_length1;
						_tmp37_ = i;
						_tmp36_[_tmp37_] = 0;
						_tmp38_ = _tmp36_[_tmp37_];
					}
				}
				_tmp39_ = width;
				_tmp40_ = info;
				_tmp41_ = (*_tmp40_).spacing;
				width = _tmp39_ - _tmp41_;
			}
		}
	}
	{
		gint prio = 0;
		gint _tmp42_ = 0;
		_tmp42_ = max_prio;
		prio = _tmp42_;
		{
			gboolean _tmp43_ = FALSE;
			_tmp43_ = TRUE;
			while (TRUE) {
				gboolean _tmp45_ = FALSE;
				gint _tmp46_ = 0;
				gint n_children = 0;
				if (!_tmp43_) {
					gint _tmp44_ = 0;
					_tmp44_ = prio;
					prio = _tmp44_ - 1;
				}
				_tmp43_ = FALSE;
				_tmp46_ = width;
				if (_tmp46_ > 0) {
					gint _tmp47_ = 0;
					_tmp47_ = prio;
					_tmp45_ = _tmp47_ >= 0;
				} else {
					_tmp45_ = FALSE;
				}
				if (!_tmp45_) {
					break;
				}
				while (TRUE) {
					gint _tmp48_ = 0;
					gint max_extra = 0;
					gint _tmp49_ = 0;
					gint _tmp83_ = 0;
					gint distribute = 0;
					gint _tmp84_ = 0;
					gint _tmp85_ = 0;
					gint _tmp86_ = 0;
					gint _tmp87_ = 0;
					gint _tmp88_ = 0;
					gint _tmp89_ = 0;
					gint per_child = 0;
					gint _tmp90_ = 0;
					gint _tmp91_ = 0;
					gint per_child_extra = 0;
					gint _tmp92_ = 0;
					gint _tmp93_ = 0;
					gint per_child_extra_sum = 0;
					_tmp48_ = width;
					if (!(_tmp48_ > 0)) {
						break;
					}
					n_children = 0;
					_tmp49_ = width;
					max_extra = _tmp49_;
					{
						gint i = 0;
						i = 0;
						{
							gboolean _tmp50_ = FALSE;
							_tmp50_ = TRUE;
							while (TRUE) {
								gint _tmp52_ = 0;
								gint _tmp53_ = 0;
								ContactsRowGroupColumnInfo* info = NULL;
								ContactsRowGroupColumnInfo* _tmp54_ = NULL;
								gint _tmp54__length1 = 0;
								gint _tmp55_ = 0;
								gboolean _tmp56_ = FALSE;
								ContactsRowGroupColumnInfo* _tmp57_ = NULL;
								gint _tmp58_ = 0;
								gint _tmp59_ = 0;
								if (!_tmp50_) {
									gint _tmp51_ = 0;
									_tmp51_ = i;
									i = _tmp51_ + 1;
								}
								_tmp50_ = FALSE;
								_tmp52_ = i;
								_tmp53_ = self->n_columns;
								if (!(_tmp52_ < _tmp53_)) {
									break;
								}
								_tmp54_ = self->priv->column_info;
								_tmp54__length1 = self->priv->column_info_length1;
								_tmp55_ = i;
								info = &_tmp54_[_tmp55_];
								_tmp57_ = info;
								_tmp58_ = (*_tmp57_).prio;
								_tmp59_ = prio;
								if (_tmp58_ == _tmp59_) {
									gboolean _tmp60_ = FALSE;
									ContactsRowGroupColumnInfo* _tmp61_ = NULL;
									gint _tmp62_ = 0;
									_tmp61_ = info;
									_tmp62_ = (*_tmp61_).max_width;
									if (_tmp62_ < 0) {
										_tmp60_ = TRUE;
									} else {
										gint* _tmp63_ = NULL;
										gint _tmp63__length1 = 0;
										gint _tmp64_ = 0;
										gint _tmp65_ = 0;
										ContactsRowGroupColumnInfo* _tmp66_ = NULL;
										gint _tmp67_ = 0;
										_tmp63_ = widths;
										_tmp63__length1 = widths_length1;
										_tmp64_ = i;
										_tmp65_ = _tmp63_[_tmp64_];
										_tmp66_ = info;
										_tmp67_ = (*_tmp66_).max_width;
										_tmp60_ = _tmp65_ < _tmp67_;
									}
									_tmp56_ = _tmp60_;
								} else {
									_tmp56_ = FALSE;
								}
								if (_tmp56_) {
									gint _tmp68_ = 0;
									gboolean _tmp69_ = FALSE;
									ContactsRowGroupColumnInfo* _tmp70_ = NULL;
									gint _tmp71_ = 0;
									_tmp68_ = n_children;
									n_children = _tmp68_ + 1;
									_tmp70_ = info;
									_tmp71_ = (*_tmp70_).max_width;
									if (_tmp71_ >= 0) {
										ContactsRowGroupColumnInfo* _tmp72_ = NULL;
										gint _tmp73_ = 0;
										gint* _tmp74_ = NULL;
										gint _tmp74__length1 = 0;
										gint _tmp75_ = 0;
										gint _tmp76_ = 0;
										gint _tmp77_ = 0;
										_tmp72_ = info;
										_tmp73_ = (*_tmp72_).max_width;
										_tmp74_ = widths;
										_tmp74__length1 = widths_length1;
										_tmp75_ = i;
										_tmp76_ = _tmp74_[_tmp75_];
										_tmp77_ = max_extra;
										_tmp69_ = (_tmp73_ - _tmp76_) < _tmp77_;
									} else {
										_tmp69_ = FALSE;
									}
									if (_tmp69_) {
										ContactsRowGroupColumnInfo* _tmp78_ = NULL;
										gint _tmp79_ = 0;
										gint* _tmp80_ = NULL;
										gint _tmp80__length1 = 0;
										gint _tmp81_ = 0;
										gint _tmp82_ = 0;
										_tmp78_ = info;
										_tmp79_ = (*_tmp78_).max_width;
										_tmp80_ = widths;
										_tmp80__length1 = widths_length1;
										_tmp81_ = i;
										_tmp82_ = _tmp80_[_tmp81_];
										max_extra = _tmp79_ - _tmp82_;
									}
								}
							}
						}
					}
					_tmp83_ = n_children;
					if (_tmp83_ == 0) {
						break;
					}
					_tmp84_ = width;
					_tmp85_ = max_extra;
					_tmp86_ = n_children;
					_tmp87_ = MIN (_tmp84_, _tmp85_ * _tmp86_);
					distribute = _tmp87_;
					_tmp88_ = width;
					_tmp89_ = distribute;
					width = _tmp88_ - _tmp89_;
					_tmp90_ = distribute;
					_tmp91_ = n_children;
					per_child = _tmp90_ / _tmp91_;
					_tmp92_ = distribute;
					_tmp93_ = n_children;
					per_child_extra = _tmp92_ % _tmp93_;
					per_child_extra_sum = 0;
					{
						gint i = 0;
						i = 0;
						{
							gboolean _tmp94_ = FALSE;
							_tmp94_ = TRUE;
							while (TRUE) {
								gint _tmp96_ = 0;
								gint _tmp97_ = 0;
								ContactsRowGroupColumnInfo* info = NULL;
								ContactsRowGroupColumnInfo* _tmp98_ = NULL;
								gint _tmp98__length1 = 0;
								gint _tmp99_ = 0;
								gboolean _tmp100_ = FALSE;
								ContactsRowGroupColumnInfo* _tmp101_ = NULL;
								gint _tmp102_ = 0;
								gint _tmp103_ = 0;
								if (!_tmp94_) {
									gint _tmp95_ = 0;
									_tmp95_ = i;
									i = _tmp95_ + 1;
								}
								_tmp94_ = FALSE;
								_tmp96_ = i;
								_tmp97_ = self->n_columns;
								if (!(_tmp96_ < _tmp97_)) {
									break;
								}
								_tmp98_ = self->priv->column_info;
								_tmp98__length1 = self->priv->column_info_length1;
								_tmp99_ = i;
								info = &_tmp98_[_tmp99_];
								_tmp101_ = info;
								_tmp102_ = (*_tmp101_).prio;
								_tmp103_ = prio;
								if (_tmp102_ == _tmp103_) {
									gboolean _tmp104_ = FALSE;
									ContactsRowGroupColumnInfo* _tmp105_ = NULL;
									gint _tmp106_ = 0;
									_tmp105_ = info;
									_tmp106_ = (*_tmp105_).max_width;
									if (_tmp106_ < 0) {
										_tmp104_ = TRUE;
									} else {
										gint* _tmp107_ = NULL;
										gint _tmp107__length1 = 0;
										gint _tmp108_ = 0;
										gint _tmp109_ = 0;
										ContactsRowGroupColumnInfo* _tmp110_ = NULL;
										gint _tmp111_ = 0;
										_tmp107_ = widths;
										_tmp107__length1 = widths_length1;
										_tmp108_ = i;
										_tmp109_ = _tmp107_[_tmp108_];
										_tmp110_ = info;
										_tmp111_ = (*_tmp110_).max_width;
										_tmp104_ = _tmp109_ < _tmp111_;
									}
									_tmp100_ = _tmp104_;
								} else {
									_tmp100_ = FALSE;
								}
								if (_tmp100_) {
									gint* _tmp112_ = NULL;
									gint _tmp112__length1 = 0;
									gint _tmp113_ = 0;
									gint _tmp114_ = 0;
									gint _tmp115_ = 0;
									gint _tmp116_ = 0;
									gint _tmp117_ = 0;
									gint _tmp118_ = 0;
									gint _tmp119_ = 0;
									_tmp112_ = widths;
									_tmp112__length1 = widths_length1;
									_tmp113_ = i;
									_tmp114_ = per_child;
									_tmp112_[_tmp113_] += _tmp114_;
									_tmp115_ = _tmp112_[_tmp113_];
									_tmp116_ = per_child_extra_sum;
									_tmp117_ = per_child_extra;
									per_child_extra_sum = _tmp116_ + _tmp117_;
									_tmp118_ = per_child_extra_sum;
									_tmp119_ = distribute;
									if (_tmp118_ > _tmp119_) {
										gint* _tmp120_ = NULL;
										gint _tmp120__length1 = 0;
										gint _tmp121_ = 0;
										gint _tmp122_ = 0;
										gint _tmp123_ = 0;
										gint _tmp124_ = 0;
										_tmp120_ = widths;
										_tmp120__length1 = widths_length1;
										_tmp121_ = i;
										_tmp120_[_tmp121_] += 1;
										_tmp122_ = _tmp120_[_tmp121_];
										_tmp123_ = per_child_extra_sum;
										_tmp124_ = distribute;
										per_child_extra_sum = _tmp123_ - _tmp124_;
									}
								}
							}
						}
					}
				}
			}
		}
	}
	_tmp125_ = widths;
	_tmp125__length1 = widths_length1;
	_tmp126_ = (_tmp125_ != NULL) ? _vala_array_dup2 (_tmp125_, _tmp125__length1) : ((gpointer) _tmp125_);
	_tmp126__length1 = _tmp125__length1;
	self->priv->cached_widths = (g_free (self->priv->cached_widths), NULL);
	self->priv->cached_widths = _tmp126_;
	self->priv->cached_widths_length1 = _tmp126__length1;
	self->priv->_cached_widths_size_ = self->priv->cached_widths_length1;
	_tmp127_ = width;
	self->priv->cached_widths_for_width = _tmp127_;
	_tmp128_ = widths;
	_tmp128__length1 = widths_length1;
	if (result_length1) {
		*result_length1 = _tmp128__length1;
	}
	result = _tmp128_;
	return result;
}


void contacts_row_group_get_width (ContactsRowGroup* self, gint* minimum_width, gint* natural_width) {
	gint _vala_minimum_width = 0;
	gint _vala_natural_width = 0;
	g_return_if_fail (self != NULL);
	_vala_minimum_width = 0;
	_vala_natural_width = 0;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
				gint _tmp4_ = 0;
				ContactsRowGroupColumnInfo* _tmp5_ = NULL;
				gint _tmp5__length1 = 0;
				gint _tmp6_ = 0;
				ContactsRowGroupColumnInfo _tmp7_ = {0};
				gint _tmp8_ = 0;
				ContactsRowGroupColumnInfo* _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				gint _tmp10_ = 0;
				ContactsRowGroupColumnInfo _tmp11_ = {0};
				gint _tmp12_ = 0;
				gint _tmp32_ = 0;
				ContactsRowGroupColumnInfo* _tmp33_ = NULL;
				gint _tmp33__length1 = 0;
				gint _tmp34_ = 0;
				ContactsRowGroupColumnInfo _tmp35_ = {0};
				gint _tmp36_ = 0;
				gint _tmp37_ = 0;
				ContactsRowGroupColumnInfo* _tmp38_ = NULL;
				gint _tmp38__length1 = 0;
				gint _tmp39_ = 0;
				ContactsRowGroupColumnInfo _tmp40_ = {0};
				gint _tmp41_ = 0;
				if (!_tmp0_) {
					gint _tmp1_ = 0;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = i;
				_tmp3_ = self->n_columns;
				if (!(_tmp2_ < _tmp3_)) {
					break;
				}
				_tmp4_ = _vala_minimum_width;
				_tmp5_ = self->priv->column_info;
				_tmp5__length1 = self->priv->column_info_length1;
				_tmp6_ = i;
				_tmp7_ = _tmp5_[_tmp6_];
				_tmp8_ = _tmp7_.min_width;
				_vala_minimum_width = _tmp4_ + _tmp8_;
				_tmp9_ = self->priv->column_info;
				_tmp9__length1 = self->priv->column_info_length1;
				_tmp10_ = i;
				_tmp11_ = _tmp9_[_tmp10_];
				_tmp12_ = _tmp11_.nat_width;
				if (_tmp12_ >= 0) {
					gint _tmp13_ = 0;
					ContactsRowGroupColumnInfo* _tmp14_ = NULL;
					gint _tmp14__length1 = 0;
					gint _tmp15_ = 0;
					ContactsRowGroupColumnInfo _tmp16_ = {0};
					gint _tmp17_ = 0;
					_tmp13_ = _vala_natural_width;
					_tmp14_ = self->priv->column_info;
					_tmp14__length1 = self->priv->column_info_length1;
					_tmp15_ = i;
					_tmp16_ = _tmp14_[_tmp15_];
					_tmp17_ = _tmp16_.nat_width;
					_vala_natural_width = _tmp13_ + _tmp17_;
				} else {
					ContactsRowGroupColumnInfo* _tmp18_ = NULL;
					gint _tmp18__length1 = 0;
					gint _tmp19_ = 0;
					ContactsRowGroupColumnInfo _tmp20_ = {0};
					gint _tmp21_ = 0;
					_tmp18_ = self->priv->column_info;
					_tmp18__length1 = self->priv->column_info_length1;
					_tmp19_ = i;
					_tmp20_ = _tmp18_[_tmp19_];
					_tmp21_ = _tmp20_.max_width;
					if (_tmp21_ >= 0) {
						gint _tmp22_ = 0;
						ContactsRowGroupColumnInfo* _tmp23_ = NULL;
						gint _tmp23__length1 = 0;
						gint _tmp24_ = 0;
						ContactsRowGroupColumnInfo _tmp25_ = {0};
						gint _tmp26_ = 0;
						_tmp22_ = _vala_natural_width;
						_tmp23_ = self->priv->column_info;
						_tmp23__length1 = self->priv->column_info_length1;
						_tmp24_ = i;
						_tmp25_ = _tmp23_[_tmp24_];
						_tmp26_ = _tmp25_.max_width;
						_vala_natural_width = _tmp22_ + _tmp26_;
					} else {
						gint _tmp27_ = 0;
						ContactsRowGroupColumnInfo* _tmp28_ = NULL;
						gint _tmp28__length1 = 0;
						gint _tmp29_ = 0;
						ContactsRowGroupColumnInfo _tmp30_ = {0};
						gint _tmp31_ = 0;
						_tmp27_ = _vala_natural_width;
						_tmp28_ = self->priv->column_info;
						_tmp28__length1 = self->priv->column_info_length1;
						_tmp29_ = i;
						_tmp30_ = _tmp28_[_tmp29_];
						_tmp31_ = _tmp30_.min_width;
						_vala_natural_width = _tmp27_ + _tmp31_;
					}
				}
				_tmp32_ = _vala_minimum_width;
				_tmp33_ = self->priv->column_info;
				_tmp33__length1 = self->priv->column_info_length1;
				_tmp34_ = i;
				_tmp35_ = _tmp33_[_tmp34_];
				_tmp36_ = _tmp35_.spacing;
				_vala_minimum_width = _tmp32_ + _tmp36_;
				_tmp37_ = _vala_natural_width;
				_tmp38_ = self->priv->column_info;
				_tmp38__length1 = self->priv->column_info_length1;
				_tmp39_ = i;
				_tmp40_ = _tmp38_[_tmp39_];
				_tmp41_ = _tmp40_.spacing;
				_vala_natural_width = _tmp37_ + _tmp41_;
			}
		}
	}
	if (minimum_width) {
		*minimum_width = _vala_minimum_width;
	}
	if (natural_width) {
		*natural_width = _vala_natural_width;
	}
}


gboolean contacts_row_group_is_expanding (ContactsRowGroup* self) {
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
				ContactsRowGroupColumnInfo* info = NULL;
				ContactsRowGroupColumnInfo* _tmp4_ = NULL;
				gint _tmp4__length1 = 0;
				gint _tmp5_ = 0;
				gboolean _tmp6_ = FALSE;
				ContactsRowGroupColumnInfo* _tmp7_ = NULL;
				gint _tmp8_ = 0;
				if (!_tmp0_) {
					gint _tmp1_ = 0;
					_tmp1_ = i;
					i = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = i;
				_tmp3_ = self->n_columns;
				if (!(_tmp2_ < _tmp3_)) {
					break;
				}
				_tmp4_ = self->priv->column_info;
				_tmp4__length1 = self->priv->column_info_length1;
				_tmp5_ = i;
				info = &_tmp4_[_tmp5_];
				_tmp7_ = info;
				_tmp8_ = (*_tmp7_).max_width;
				if (_tmp8_ == (-1)) {
					ContactsRowGroupColumnInfo* _tmp9_ = NULL;
					gint _tmp10_ = 0;
					ContactsRowGroupColumnInfo* _tmp11_ = NULL;
					gint _tmp12_ = 0;
					_tmp9_ = info;
					_tmp10_ = (*_tmp9_).max_width;
					_tmp11_ = info;
					_tmp12_ = (*_tmp11_).min_width;
					_tmp6_ = _tmp10_ != _tmp12_;
				} else {
					_tmp6_ = FALSE;
				}
				if (_tmp6_) {
					result = TRUE;
					return result;
				}
			}
		}
	}
	result = FALSE;
	return result;
}


ContactsRowGroupColumnInfo* contacts_row_group_column_info_dup (const ContactsRowGroupColumnInfo* self) {
	ContactsRowGroupColumnInfo* dup;
	dup = g_new0 (ContactsRowGroupColumnInfo, 1);
	memcpy (dup, self, sizeof (ContactsRowGroupColumnInfo));
	return dup;
}


void contacts_row_group_column_info_free (ContactsRowGroupColumnInfo* self) {
	g_free (self);
}


GType contacts_row_group_column_info_get_type (void) {
	static volatile gsize contacts_row_group_column_info_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_row_group_column_info_type_id__volatile)) {
		GType contacts_row_group_column_info_type_id;
		contacts_row_group_column_info_type_id = g_boxed_type_register_static ("ContactsRowGroupColumnInfo", (GBoxedCopyFunc) contacts_row_group_column_info_dup, (GBoxedFreeFunc) contacts_row_group_column_info_free);
		g_once_init_leave (&contacts_row_group_column_info_type_id__volatile, contacts_row_group_column_info_type_id);
	}
	return contacts_row_group_column_info_type_id__volatile;
}


static void contacts_row_group_class_init (ContactsRowGroupClass * klass) {
	contacts_row_group_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ContactsRowGroupPrivate));
	G_OBJECT_CLASS (klass)->finalize = contacts_row_group_finalize;
}


static void contacts_row_group_instance_init (ContactsRowGroup * self) {
	self->priv = CONTACTS_ROW_GROUP_GET_PRIVATE (self);
}


static void contacts_row_group_finalize (GObject* obj) {
	ContactsRowGroup * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_ROW_GROUP, ContactsRowGroup);
	self->priv->column_info = (g_free (self->priv->column_info), NULL);
	self->priv->cached_widths = (g_free (self->priv->cached_widths), NULL);
	_g_object_unref0 (self->priv->rows);
	G_OBJECT_CLASS (contacts_row_group_parent_class)->finalize (obj);
}


GType contacts_row_group_get_type (void) {
	static volatile gsize contacts_row_group_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_row_group_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ContactsRowGroupClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_row_group_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsRowGroup), 0, (GInstanceInitFunc) contacts_row_group_instance_init, NULL };
		GType contacts_row_group_type_id;
		contacts_row_group_type_id = g_type_register_static (G_TYPE_OBJECT, "ContactsRowGroup", &g_define_type_info, 0);
		g_once_init_leave (&contacts_row_group_type_id__volatile, contacts_row_group_type_id);
	}
	return contacts_row_group_type_id__volatile;
}


static void _vala_ContactsRowChild_array_free (ContactsRowChild* array, gint array_length) {
	if (array != NULL) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			contacts_row_child_destroy (&array[i]);
		}
	}
	g_free (array);
}


ContactsRow* contacts_row_construct (GType object_type, ContactsRowGroup* group) {
	ContactsRow * self = NULL;
	ContactsRowGroup* _tmp0_ = NULL;
	ContactsRowGroup* _tmp1_ = NULL;
	ContactsRowGroup* _tmp2_ = NULL;
	ContactsRowGroup* _tmp3_ = NULL;
	gint _tmp4_ = 0;
	gint _tmp5_ = 0;
	ContactsRowChild* _tmp6_ = NULL;
	g_return_val_if_fail (group != NULL, NULL);
	self = (ContactsRow*) g_object_new (object_type, NULL);
	_tmp0_ = group;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->group);
	self->priv->group = _tmp1_;
	_tmp2_ = group;
	contacts_row_group_add (_tmp2_, self);
	gtk_widget_set_has_window ((GtkWidget*) self, FALSE);
	gtk_widget_set_redraw_on_allocate ((GtkWidget*) self, FALSE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	self->priv->n_rows = 1;
	_tmp3_ = group;
	_tmp4_ = _tmp3_->n_columns;
	_tmp5_ = self->priv->n_rows;
	_tmp6_ = g_new0 (ContactsRowChild, _tmp4_ * _tmp5_);
	self->priv->row_children = (_vala_ContactsRowChild_array_free (self->priv->row_children, self->priv->row_children_length1 * self->priv->row_children_length2), NULL);
	self->priv->row_children = _tmp6_;
	self->priv->row_children_length1 = _tmp4_;
	self->priv->row_children_length2 = _tmp5_;
	return self;
}


ContactsRow* contacts_row_new (ContactsRowGroup* group) {
	return contacts_row_construct (CONTACTS_TYPE_ROW, group);
}


static void contacts_row_real_realize (GtkWidget* base) {
	ContactsRow * self;
	GtkAllocation allocation = {0};
	GtkAllocation _tmp0_ = {0};
	GdkWindowAttr attributes = {0};
	GdkWindowAttr _tmp1_ = {0};
	GtkAllocation _tmp2_ = {0};
	gint _tmp3_ = 0;
	GtkAllocation _tmp4_ = {0};
	gint _tmp5_ = 0;
	GtkAllocation _tmp6_ = {0};
	gint _tmp7_ = 0;
	GtkAllocation _tmp8_ = {0};
	gint _tmp9_ = 0;
	gint _tmp10_ = 0;
	GdkWindow* window = NULL;
	GdkWindow* _tmp11_ = NULL;
	GdkWindow* _tmp12_ = NULL;
	GdkWindow* _tmp13_ = NULL;
	GdkWindowAttr _tmp14_ = {0};
	GdkWindow* _tmp15_ = NULL;
	GdkWindow* _tmp16_ = NULL;
	self = (ContactsRow*) base;
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
	allocation = _tmp0_;
	gtk_widget_set_realized ((GtkWidget*) self, TRUE);
	attributes = _tmp1_;
	_tmp2_ = allocation;
	_tmp3_ = _tmp2_.x;
	attributes.x = _tmp3_;
	_tmp4_ = allocation;
	_tmp5_ = _tmp4_.y;
	attributes.y = _tmp5_;
	_tmp6_ = allocation;
	_tmp7_ = _tmp6_.width;
	attributes.width = _tmp7_;
	_tmp8_ = allocation;
	_tmp9_ = _tmp8_.height;
	attributes.height = _tmp9_;
	attributes.window_type = GDK_WINDOW_CHILD;
	_tmp10_ = gtk_widget_get_events ((GtkWidget*) self);
	attributes.event_mask = ((_tmp10_ | GDK_EXPOSURE_MASK) | GDK_ENTER_NOTIFY_MASK) | GDK_LEAVE_NOTIFY_MASK;
	_tmp11_ = gtk_widget_get_parent_window ((GtkWidget*) self);
	_tmp12_ = _g_object_ref0 (_tmp11_);
	window = _tmp12_;
	_tmp13_ = _g_object_ref0 (window);
	gtk_widget_set_window ((GtkWidget*) self, _tmp13_);
	attributes.wclass = GDK_INPUT_ONLY;
	_tmp14_ = attributes;
	_tmp15_ = gdk_window_new (window, &_tmp14_, GDK_WA_X | GDK_WA_Y);
	_g_object_unref0 (self->event_window);
	self->event_window = _tmp15_;
	_tmp16_ = self->event_window;
	gdk_window_set_user_data (_tmp16_, (GObject*) self);
	_g_object_unref0 (window);
}


static void contacts_row_real_unrealize (GtkWidget* base) {
	ContactsRow * self;
	GdkWindow* _tmp0_ = NULL;
	GdkWindow* _tmp1_ = NULL;
	GdkWindow* _tmp2_ = NULL;
	self = (ContactsRow*) base;
	_tmp0_ = self->event_window;
	gdk_window_set_user_data (_tmp0_, NULL);
	_tmp1_ = self->event_window;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	gdk_window_destroy (_tmp2_);
	_g_object_unref0 (self->event_window);
	self->event_window = NULL;
	GTK_WIDGET_CLASS (contacts_row_parent_class)->unrealize ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_CONTAINER, GtkContainer));
}


static void contacts_row_real_map (GtkWidget* base) {
	ContactsRow * self;
	GdkWindow* _tmp0_ = NULL;
	self = (ContactsRow*) base;
	_tmp0_ = self->event_window;
	gdk_window_show (_tmp0_);
	GTK_WIDGET_CLASS (contacts_row_parent_class)->map ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_CONTAINER, GtkContainer));
}


static void contacts_row_real_unmap (GtkWidget* base) {
	ContactsRow * self;
	GdkWindow* _tmp0_ = NULL;
	self = (ContactsRow*) base;
	_tmp0_ = self->event_window;
	gdk_window_hide (_tmp0_);
	GTK_WIDGET_CLASS (contacts_row_parent_class)->unmap ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_CONTAINER, GtkContainer));
}


void contacts_row_attach (ContactsRow* self, GtkWidget* widget, gint attach_col, gint attach_row) {
	gint _tmp0_ = 0;
	ContactsRowGroup* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	ContactsRowChild* child_info = NULL;
	ContactsRowChild* _tmp35_ = NULL;
	gint _tmp35__length1 = 0;
	gint _tmp35__length2 = 0;
	gint _tmp36_ = 0;
	gint _tmp37_ = 0;
	ContactsRowChild* _tmp38_ = NULL;
	GtkWidget** _tmp39_ = NULL;
	gint _tmp39__length1 = 0;
	ContactsRowChild* _tmp44_ = NULL;
	GtkWidget** _tmp45_ = NULL;
	gint _tmp45__length1 = 0;
	ContactsRowChild* _tmp46_ = NULL;
	GtkWidget** _tmp47_ = NULL;
	gint _tmp47__length1 = 0;
	GtkWidget* _tmp48_ = NULL;
	GtkWidget* _tmp49_ = NULL;
	GtkWidget* _tmp50_ = NULL;
	GtkWidget* _tmp51_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (widget != NULL);
	_tmp0_ = attach_col;
	_tmp1_ = self->priv->group;
	_tmp2_ = _tmp1_->n_columns;
	if (_tmp0_ >= _tmp2_) {
		g_warning ("contacts-row.vala:297: Tryint to attach widget to non-existing column");
		return;
	}
	_tmp3_ = attach_row;
	_tmp4_ = self->priv->n_rows;
	if (_tmp3_ >= _tmp4_) {
		gint old_n_rows = 0;
		gint _tmp5_ = 0;
		gint _tmp6_ = 0;
		ContactsRowChild* old_row_children = NULL;
		ContactsRowChild* _tmp7_ = NULL;
		gint _tmp7__length1 = 0;
		gint _tmp7__length2 = 0;
		gint old_row_children_length1 = 0;
		gint old_row_children_length2 = 0;
		ContactsRowGroup* _tmp8_ = NULL;
		gint _tmp9_ = 0;
		gint _tmp10_ = 0;
		ContactsRowChild* _tmp11_ = NULL;
		_tmp5_ = self->priv->n_rows;
		old_n_rows = _tmp5_;
		_tmp6_ = attach_row;
		self->priv->n_rows = _tmp6_ + 1;
		_tmp7_ = self->priv->row_children;
		_tmp7__length1 = self->priv->row_children_length1;
		_tmp7__length2 = self->priv->row_children_length2;
		self->priv->row_children = NULL;
		self->priv->row_children_length1 = 0;
		self->priv->row_children_length2 = 0;
		old_row_children = _tmp7_;
		old_row_children_length1 = _tmp7__length1;
		old_row_children_length2 = _tmp7__length2;
		_tmp8_ = self->priv->group;
		_tmp9_ = _tmp8_->n_columns;
		_tmp10_ = self->priv->n_rows;
		_tmp11_ = g_new0 (ContactsRowChild, _tmp9_ * _tmp10_);
		self->priv->row_children = (_vala_ContactsRowChild_array_free (self->priv->row_children, self->priv->row_children_length1 * self->priv->row_children_length2), NULL);
		self->priv->row_children = _tmp11_;
		self->priv->row_children_length1 = _tmp9_;
		self->priv->row_children_length2 = _tmp10_;
		{
			gint row = 0;
			row = 0;
			{
				gboolean _tmp12_ = FALSE;
				_tmp12_ = TRUE;
				while (TRUE) {
					gint _tmp14_ = 0;
					gint _tmp15_ = 0;
					if (!_tmp12_) {
						gint _tmp13_ = 0;
						_tmp13_ = row;
						row = _tmp13_ + 1;
					}
					_tmp12_ = FALSE;
					_tmp14_ = row;
					_tmp15_ = self->priv->n_rows;
					if (!(_tmp14_ < _tmp15_)) {
						break;
					}
					{
						gint col = 0;
						col = 0;
						{
							gboolean _tmp16_ = FALSE;
							_tmp16_ = TRUE;
							while (TRUE) {
								gint _tmp18_ = 0;
								ContactsRowGroup* _tmp19_ = NULL;
								gint _tmp20_ = 0;
								gboolean _tmp21_ = FALSE;
								gint _tmp22_ = 0;
								gint _tmp23_ = 0;
								if (!_tmp16_) {
									gint _tmp17_ = 0;
									_tmp17_ = col;
									col = _tmp17_ + 1;
								}
								_tmp16_ = FALSE;
								_tmp18_ = col;
								_tmp19_ = self->priv->group;
								_tmp20_ = _tmp19_->n_columns;
								if (!(_tmp18_ < _tmp20_)) {
									break;
								}
								_tmp22_ = row;
								_tmp23_ = old_n_rows;
								if (_tmp22_ < _tmp23_) {
									gint _tmp24_ = 0;
									ContactsRowGroup* _tmp25_ = NULL;
									gint _tmp26_ = 0;
									_tmp24_ = col;
									_tmp25_ = self->priv->group;
									_tmp26_ = _tmp25_->n_columns;
									_tmp21_ = _tmp24_ < _tmp26_;
								} else {
									_tmp21_ = FALSE;
								}
								if (_tmp21_) {
									ContactsRowChild* _tmp27_ = NULL;
									gint _tmp27__length1 = 0;
									gint _tmp27__length2 = 0;
									gint _tmp28_ = 0;
									gint _tmp29_ = 0;
									ContactsRowChild* _tmp30_ = NULL;
									gint _tmp30__length1 = 0;
									gint _tmp30__length2 = 0;
									gint _tmp31_ = 0;
									gint _tmp32_ = 0;
									ContactsRowChild _tmp33_ = {0};
									ContactsRowChild _tmp34_ = {0};
									_tmp27_ = self->priv->row_children;
									_tmp27__length1 = self->priv->row_children_length1;
									_tmp27__length2 = self->priv->row_children_length2;
									_tmp28_ = col;
									_tmp29_ = row;
									_tmp30_ = old_row_children;
									_tmp30__length1 = old_row_children_length1;
									_tmp30__length2 = old_row_children_length2;
									_tmp31_ = col;
									_tmp32_ = row;
									_tmp33_ = _tmp30_[(_tmp31_ * _tmp30__length2) + _tmp32_];
									memset (&_tmp30_[(_tmp31_ * _tmp30__length2) + _tmp32_], 0, sizeof (ContactsRowChild));
									contacts_row_child_destroy (&_tmp27_[(_tmp28_ * _tmp27__length2) + _tmp29_]);
									_tmp27_[(_tmp28_ * _tmp27__length2) + _tmp29_] = _tmp33_;
									_tmp34_ = _tmp27_[(_tmp28_ * _tmp27__length2) + _tmp29_];
								}
							}
						}
					}
				}
			}
		}
		old_row_children = (_vala_ContactsRowChild_array_free (old_row_children, old_row_children_length1 * old_row_children_length2), NULL);
	}
	_tmp35_ = self->priv->row_children;
	_tmp35__length1 = self->priv->row_children_length1;
	_tmp35__length2 = self->priv->row_children_length2;
	_tmp36_ = attach_col;
	_tmp37_ = attach_row;
	child_info = &_tmp35_[(_tmp36_ * _tmp35__length2) + _tmp37_];
	_tmp38_ = child_info;
	_tmp39_ = (*_tmp38_).widgets;
	_tmp39__length1 = (*_tmp38_).widgets_length1;
	if (_tmp39_ == NULL) {
		GtkWidget** _tmp40_ = NULL;
		_tmp40_ = g_new0 (GtkWidget*, 1 + 1);
		(*child_info).widgets = (_vala_array_free ((*child_info).widgets, (*child_info).widgets_length1, (GDestroyNotify) g_object_unref), NULL);
		(*child_info).widgets = _tmp40_;
		(*child_info).widgets_length1 = 1;
		(*child_info)._widgets_size_ = (*child_info).widgets_length1;
	} else {
		ContactsRowChild* _tmp41_ = NULL;
		GtkWidget** _tmp42_ = NULL;
		gint _tmp42__length1 = 0;
		gint _tmp43_ = 0;
		_tmp41_ = child_info;
		_tmp42_ = (*_tmp41_).widgets;
		_tmp42__length1 = (*_tmp41_).widgets_length1;
		_tmp43_ = _tmp42__length1 + 1;
		(*child_info).widgets = g_renew (GtkWidget*, (*child_info).widgets, _tmp42__length1 + 1);
		(_tmp43_ > (*child_info).widgets_length1) ? memset ((*child_info).widgets + (*child_info).widgets_length1, 0, sizeof (GtkWidget*) * (_tmp43_ - (*child_info).widgets_length1)) : NULL;
		(*child_info).widgets_length1 = _tmp43_;
		(*child_info)._widgets_size_ = _tmp43_;
	}
	_tmp44_ = child_info;
	_tmp45_ = (*_tmp44_).widgets;
	_tmp45__length1 = (*_tmp44_).widgets_length1;
	_tmp46_ = child_info;
	_tmp47_ = (*_tmp46_).widgets;
	_tmp47__length1 = (*_tmp46_).widgets_length1;
	_tmp48_ = widget;
	_tmp49_ = _g_object_ref0 (_tmp48_);
	_g_object_unref0 (_tmp45_[_tmp47__length1 - 1]);
	_tmp45_[_tmp47__length1 - 1] = _tmp49_;
	_tmp50_ = _tmp45_[_tmp47__length1 - 1];
	_tmp51_ = widget;
	gtk_widget_set_parent (_tmp51_, (GtkWidget*) self);
}


static void contacts_row_real_add (GtkContainer* base, GtkWidget* widget) {
	ContactsRow * self;
	GtkWidget* _tmp20_ = NULL;
	gint _tmp21_ = 0;
	self = (ContactsRow*) base;
	g_return_if_fail (widget != NULL);
	{
		gint row = 0;
		row = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
				if (!_tmp0_) {
					gint _tmp1_ = 0;
					_tmp1_ = row;
					row = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = row;
				_tmp3_ = self->priv->n_rows;
				if (!(_tmp2_ < _tmp3_)) {
					break;
				}
				{
					gint col = 0;
					col = 0;
					{
						gboolean _tmp4_ = FALSE;
						_tmp4_ = TRUE;
						while (TRUE) {
							gint _tmp6_ = 0;
							ContactsRowGroup* _tmp7_ = NULL;
							gint _tmp8_ = 0;
							ContactsRowChild* child_info = NULL;
							ContactsRowChild* _tmp9_ = NULL;
							gint _tmp9__length1 = 0;
							gint _tmp9__length2 = 0;
							gint _tmp10_ = 0;
							gint _tmp11_ = 0;
							gboolean _tmp12_ = FALSE;
							ContactsRowChild* _tmp13_ = NULL;
							GtkWidget** _tmp14_ = NULL;
							gint _tmp14__length1 = 0;
							if (!_tmp4_) {
								gint _tmp5_ = 0;
								_tmp5_ = col;
								col = _tmp5_ + 1;
							}
							_tmp4_ = FALSE;
							_tmp6_ = col;
							_tmp7_ = self->priv->group;
							_tmp8_ = _tmp7_->n_columns;
							if (!(_tmp6_ < _tmp8_)) {
								break;
							}
							_tmp9_ = self->priv->row_children;
							_tmp9__length1 = self->priv->row_children_length1;
							_tmp9__length2 = self->priv->row_children_length2;
							_tmp10_ = col;
							_tmp11_ = row;
							child_info = &_tmp9_[(_tmp10_ * _tmp9__length2) + _tmp11_];
							_tmp13_ = child_info;
							_tmp14_ = (*_tmp13_).widgets;
							_tmp14__length1 = (*_tmp13_).widgets_length1;
							if (_tmp14_ == NULL) {
								_tmp12_ = TRUE;
							} else {
								ContactsRowChild* _tmp15_ = NULL;
								GtkWidget** _tmp16_ = NULL;
								gint _tmp16__length1 = 0;
								_tmp15_ = child_info;
								_tmp16_ = (*_tmp15_).widgets;
								_tmp16__length1 = (*_tmp15_).widgets_length1;
								_tmp12_ = _tmp16__length1 == 0;
							}
							if (_tmp12_) {
								GtkWidget* _tmp17_ = NULL;
								gint _tmp18_ = 0;
								gint _tmp19_ = 0;
								_tmp17_ = widget;
								_tmp18_ = col;
								_tmp19_ = row;
								contacts_row_attach (self, _tmp17_, _tmp18_, _tmp19_);
								return;
							}
						}
					}
				}
			}
		}
	}
	_tmp20_ = widget;
	_tmp21_ = self->priv->n_rows;
	contacts_row_attach (self, _tmp20_, 0, _tmp21_);
}


static void contacts_row_real_remove (GtkContainer* base, GtkWidget* widget) {
	ContactsRow * self;
	self = (ContactsRow*) base;
	g_return_if_fail (widget != NULL);
	{
		gint row = 0;
		row = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
				if (!_tmp0_) {
					gint _tmp1_ = 0;
					_tmp1_ = row;
					row = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = row;
				_tmp3_ = self->priv->n_rows;
				if (!(_tmp2_ < _tmp3_)) {
					break;
				}
				{
					gint col = 0;
					col = 0;
					{
						gboolean _tmp4_ = FALSE;
						_tmp4_ = TRUE;
						while (TRUE) {
							gint _tmp6_ = 0;
							ContactsRowGroup* _tmp7_ = NULL;
							gint _tmp8_ = 0;
							ContactsRowChild* child_info = NULL;
							ContactsRowChild* _tmp9_ = NULL;
							gint _tmp9__length1 = 0;
							gint _tmp9__length2 = 0;
							gint _tmp10_ = 0;
							gint _tmp11_ = 0;
							if (!_tmp4_) {
								gint _tmp5_ = 0;
								_tmp5_ = col;
								col = _tmp5_ + 1;
							}
							_tmp4_ = FALSE;
							_tmp6_ = col;
							_tmp7_ = self->priv->group;
							_tmp8_ = _tmp7_->n_columns;
							if (!(_tmp6_ < _tmp8_)) {
								break;
							}
							_tmp9_ = self->priv->row_children;
							_tmp9__length1 = self->priv->row_children_length1;
							_tmp9__length2 = self->priv->row_children_length2;
							_tmp10_ = col;
							_tmp11_ = row;
							child_info = &_tmp9_[(_tmp10_ * _tmp9__length2) + _tmp11_];
							{
								gint i = 0;
								i = 0;
								{
									gboolean _tmp12_ = FALSE;
									_tmp12_ = TRUE;
									while (TRUE) {
										gboolean _tmp14_ = FALSE;
										ContactsRowChild* _tmp15_ = NULL;
										GtkWidget** _tmp16_ = NULL;
										gint _tmp16__length1 = 0;
										ContactsRowChild* _tmp20_ = NULL;
										GtkWidget** _tmp21_ = NULL;
										gint _tmp21__length1 = 0;
										gint _tmp22_ = 0;
										GtkWidget* _tmp23_ = NULL;
										GtkWidget* _tmp24_ = NULL;
										if (!_tmp12_) {
											gint _tmp13_ = 0;
											_tmp13_ = i;
											i = _tmp13_ + 1;
										}
										_tmp12_ = FALSE;
										_tmp15_ = child_info;
										_tmp16_ = (*_tmp15_).widgets;
										_tmp16__length1 = (*_tmp15_).widgets_length1;
										if (_tmp16_ != NULL) {
											gint _tmp17_ = 0;
											ContactsRowChild* _tmp18_ = NULL;
											GtkWidget** _tmp19_ = NULL;
											gint _tmp19__length1 = 0;
											_tmp17_ = i;
											_tmp18_ = child_info;
											_tmp19_ = (*_tmp18_).widgets;
											_tmp19__length1 = (*_tmp18_).widgets_length1;
											_tmp14_ = _tmp17_ < _tmp19__length1;
										} else {
											_tmp14_ = FALSE;
										}
										if (!_tmp14_) {
											break;
										}
										_tmp20_ = child_info;
										_tmp21_ = (*_tmp20_).widgets;
										_tmp21__length1 = (*_tmp20_).widgets_length1;
										_tmp22_ = i;
										_tmp23_ = _tmp21_[_tmp22_];
										_tmp24_ = widget;
										if (_tmp23_ == _tmp24_) {
											gboolean was_visible = FALSE;
											GtkWidget* _tmp25_ = NULL;
											gboolean _tmp26_ = FALSE;
											GtkWidget* _tmp27_ = NULL;
											gint j = 0;
											ContactsRowChild* _tmp43_ = NULL;
											GtkWidget** _tmp44_ = NULL;
											gint _tmp44__length1 = 0;
											gint _tmp45_ = 0;
											GtkWidget* _tmp46_ = NULL;
											ContactsRowChild* _tmp47_ = NULL;
											GtkWidget** _tmp48_ = NULL;
											gint _tmp48__length1 = 0;
											gint _tmp49_ = 0;
											gboolean _tmp50_ = FALSE;
											gboolean _tmp51_ = FALSE;
											_tmp25_ = widget;
											_tmp26_ = gtk_widget_get_visible (_tmp25_);
											was_visible = _tmp26_;
											_tmp27_ = widget;
											gtk_widget_unparent (_tmp27_);
											{
												gint _tmp28_ = 0;
												gboolean _tmp29_ = FALSE;
												_tmp28_ = i;
												j = _tmp28_;
												_tmp29_ = TRUE;
												while (TRUE) {
													gint _tmp31_ = 0;
													ContactsRowChild* _tmp32_ = NULL;
													GtkWidget** _tmp33_ = NULL;
													gint _tmp33__length1 = 0;
													ContactsRowChild* _tmp34_ = NULL;
													GtkWidget** _tmp35_ = NULL;
													gint _tmp35__length1 = 0;
													gint _tmp36_ = 0;
													ContactsRowChild* _tmp37_ = NULL;
													GtkWidget** _tmp38_ = NULL;
													gint _tmp38__length1 = 0;
													gint _tmp39_ = 0;
													GtkWidget* _tmp40_ = NULL;
													GtkWidget* _tmp41_ = NULL;
													GtkWidget* _tmp42_ = NULL;
													if (!_tmp29_) {
														gint _tmp30_ = 0;
														_tmp30_ = j;
														j = _tmp30_ + 1;
													}
													_tmp29_ = FALSE;
													_tmp31_ = j;
													_tmp32_ = child_info;
													_tmp33_ = (*_tmp32_).widgets;
													_tmp33__length1 = (*_tmp32_).widgets_length1;
													if (!(_tmp31_ < (_tmp33__length1 - 1))) {
														break;
													}
													_tmp34_ = child_info;
													_tmp35_ = (*_tmp34_).widgets;
													_tmp35__length1 = (*_tmp34_).widgets_length1;
													_tmp36_ = j;
													_tmp37_ = child_info;
													_tmp38_ = (*_tmp37_).widgets;
													_tmp38__length1 = (*_tmp37_).widgets_length1;
													_tmp39_ = j;
													_tmp40_ = _tmp38_[_tmp39_ + 1];
													_tmp41_ = _g_object_ref0 (_tmp40_);
													_g_object_unref0 (_tmp35_[_tmp36_]);
													_tmp35_[_tmp36_] = _tmp41_;
													_tmp42_ = _tmp35_[_tmp36_];
												}
											}
											_tmp43_ = child_info;
											_tmp44_ = (*_tmp43_).widgets;
											_tmp44__length1 = (*_tmp43_).widgets_length1;
											_tmp45_ = j;
											_g_object_unref0 (_tmp44_[_tmp45_]);
											_tmp44_[_tmp45_] = NULL;
											_tmp46_ = _tmp44_[_tmp45_];
											_tmp47_ = child_info;
											_tmp48_ = (*_tmp47_).widgets;
											_tmp48__length1 = (*_tmp47_).widgets_length1;
											_tmp49_ = _tmp48__length1 - 1;
											(*child_info).widgets = g_renew (GtkWidget*, (*child_info).widgets, _tmp48__length1 - 1);
											(_tmp49_ > (*child_info).widgets_length1) ? memset ((*child_info).widgets + (*child_info).widgets_length1, 0, sizeof (GtkWidget*) * (_tmp49_ - (*child_info).widgets_length1)) : NULL;
											(*child_info).widgets_length1 = _tmp49_;
											(*child_info)._widgets_size_ = _tmp49_;
											_tmp51_ = was_visible;
											if (_tmp51_) {
												gboolean _tmp52_ = FALSE;
												_tmp52_ = gtk_widget_get_visible ((GtkWidget*) self);
												_tmp50_ = _tmp52_;
											} else {
												_tmp50_ = FALSE;
											}
											if (_tmp50_) {
												gtk_widget_queue_resize ((GtkWidget*) self);
											}
											return;
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}
}


GeeList* contacts_row_get_children_at (ContactsRow* self, gint col, gint row) {
	GeeList* result = NULL;
	GeeArrayList* l = NULL;
	GeeArrayList* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gee_array_list_new (GTK_TYPE_WIDGET, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	l = _tmp0_;
	_tmp2_ = row;
	_tmp3_ = self->priv->n_rows;
	if (_tmp2_ < _tmp3_) {
		gint _tmp4_ = 0;
		ContactsRowGroup* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		_tmp4_ = col;
		_tmp5_ = self->priv->group;
		_tmp6_ = _tmp5_->n_columns;
		_tmp1_ = _tmp4_ < _tmp6_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		ContactsRowChild* child_info = NULL;
		ContactsRowChild* _tmp7_ = NULL;
		gint _tmp7__length1 = 0;
		gint _tmp7__length2 = 0;
		gint _tmp8_ = 0;
		gint _tmp9_ = 0;
		_tmp7_ = self->priv->row_children;
		_tmp7__length1 = self->priv->row_children_length1;
		_tmp7__length2 = self->priv->row_children_length2;
		_tmp8_ = col;
		_tmp9_ = row;
		child_info = &_tmp7_[(_tmp8_ * _tmp7__length2) + _tmp9_];
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp10_ = FALSE;
				_tmp10_ = TRUE;
				while (TRUE) {
					gboolean _tmp12_ = FALSE;
					ContactsRowChild* _tmp13_ = NULL;
					GtkWidget** _tmp14_ = NULL;
					gint _tmp14__length1 = 0;
					GeeArrayList* _tmp18_ = NULL;
					ContactsRowChild* _tmp19_ = NULL;
					GtkWidget** _tmp20_ = NULL;
					gint _tmp20__length1 = 0;
					gint _tmp21_ = 0;
					GtkWidget* _tmp22_ = NULL;
					if (!_tmp10_) {
						gint _tmp11_ = 0;
						_tmp11_ = i;
						i = _tmp11_ + 1;
					}
					_tmp10_ = FALSE;
					_tmp13_ = child_info;
					_tmp14_ = (*_tmp13_).widgets;
					_tmp14__length1 = (*_tmp13_).widgets_length1;
					if (_tmp14_ != NULL) {
						gint _tmp15_ = 0;
						ContactsRowChild* _tmp16_ = NULL;
						GtkWidget** _tmp17_ = NULL;
						gint _tmp17__length1 = 0;
						_tmp15_ = i;
						_tmp16_ = child_info;
						_tmp17_ = (*_tmp16_).widgets;
						_tmp17__length1 = (*_tmp16_).widgets_length1;
						_tmp12_ = _tmp15_ < _tmp17__length1;
					} else {
						_tmp12_ = FALSE;
					}
					if (!_tmp12_) {
						break;
					}
					_tmp18_ = l;
					_tmp19_ = child_info;
					_tmp20_ = (*_tmp19_).widgets;
					_tmp20__length1 = (*_tmp19_).widgets_length1;
					_tmp21_ = i;
					_tmp22_ = _tmp20_[_tmp21_];
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp18_, _tmp22_);
				}
			}
		}
	}
	result = (GeeList*) l;
	return result;
}


static void contacts_row_real_forall_internal (GtkContainer* base, gboolean include_internals, GtkCallback callback, void* callback_target) {
	ContactsRow * self;
	self = (ContactsRow*) base;
	{
		gint row = 0;
		row = 0;
		{
			gboolean _tmp0_ = FALSE;
			_tmp0_ = TRUE;
			while (TRUE) {
				gint _tmp2_ = 0;
				gint _tmp3_ = 0;
				if (!_tmp0_) {
					gint _tmp1_ = 0;
					_tmp1_ = row;
					row = _tmp1_ + 1;
				}
				_tmp0_ = FALSE;
				_tmp2_ = row;
				_tmp3_ = self->priv->n_rows;
				if (!(_tmp2_ < _tmp3_)) {
					break;
				}
				{
					gint col = 0;
					col = 0;
					{
						gboolean _tmp4_ = FALSE;
						_tmp4_ = TRUE;
						while (TRUE) {
							gint _tmp6_ = 0;
							ContactsRowGroup* _tmp7_ = NULL;
							gint _tmp8_ = 0;
							ContactsRowChild* child_info = NULL;
							ContactsRowChild* _tmp9_ = NULL;
							gint _tmp9__length1 = 0;
							gint _tmp9__length2 = 0;
							gint _tmp10_ = 0;
							gint _tmp11_ = 0;
							if (!_tmp4_) {
								gint _tmp5_ = 0;
								_tmp5_ = col;
								col = _tmp5_ + 1;
							}
							_tmp4_ = FALSE;
							_tmp6_ = col;
							_tmp7_ = self->priv->group;
							_tmp8_ = _tmp7_->n_columns;
							if (!(_tmp6_ < _tmp8_)) {
								break;
							}
							_tmp9_ = self->priv->row_children;
							_tmp9__length1 = self->priv->row_children_length1;
							_tmp9__length2 = self->priv->row_children_length2;
							_tmp10_ = col;
							_tmp11_ = row;
							child_info = &_tmp9_[(_tmp10_ * _tmp9__length2) + _tmp11_];
							{
								gint i = 0;
								i = 0;
								{
									gboolean _tmp12_ = FALSE;
									_tmp12_ = TRUE;
									while (TRUE) {
										gboolean _tmp14_ = FALSE;
										ContactsRowChild* _tmp15_ = NULL;
										GtkWidget** _tmp16_ = NULL;
										gint _tmp16__length1 = 0;
										GtkCallback _tmp20_ = NULL;
										void* _tmp20__target = NULL;
										ContactsRowChild* _tmp21_ = NULL;
										GtkWidget** _tmp22_ = NULL;
										gint _tmp22__length1 = 0;
										gint _tmp23_ = 0;
										GtkWidget* _tmp24_ = NULL;
										if (!_tmp12_) {
											gint _tmp13_ = 0;
											_tmp13_ = i;
											i = _tmp13_ + 1;
										}
										_tmp12_ = FALSE;
										_tmp15_ = child_info;
										_tmp16_ = (*_tmp15_).widgets;
										_tmp16__length1 = (*_tmp15_).widgets_length1;
										if (_tmp16_ != NULL) {
											gint _tmp17_ = 0;
											ContactsRowChild* _tmp18_ = NULL;
											GtkWidget** _tmp19_ = NULL;
											gint _tmp19__length1 = 0;
											_tmp17_ = i;
											_tmp18_ = child_info;
											_tmp19_ = (*_tmp18_).widgets;
											_tmp19__length1 = (*_tmp18_).widgets_length1;
											_tmp14_ = _tmp17_ < _tmp19__length1;
										} else {
											_tmp14_ = FALSE;
										}
										if (!_tmp14_) {
											break;
										}
										_tmp20_ = callback;
										_tmp20__target = callback_target;
										_tmp21_ = child_info;
										_tmp22_ = (*_tmp21_).widgets;
										_tmp22__length1 = (*_tmp21_).widgets_length1;
										_tmp23_ = i;
										_tmp24_ = _tmp22_[_tmp23_];
										_tmp20_ (_tmp24_, _tmp20__target);
									}
								}
							}
						}
					}
				}
			}
		}
	}
}


static void contacts_row_real_compute_expand_internal (GtkWidget* base, gboolean* hexpand, gboolean* vexpand) {
	ContactsRow * self;
	gboolean _vala_hexpand = FALSE;
	gboolean _vala_vexpand = FALSE;
	ContactsRowGroup* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	self = (ContactsRow*) base;
	_tmp0_ = self->priv->group;
	_tmp1_ = contacts_row_group_is_expanding (_tmp0_);
	_vala_hexpand = _tmp1_;
	_vala_vexpand = FALSE;
	{
		gint row = 0;
		row = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_ = 0;
				gint _tmp5_ = 0;
				if (!_tmp2_) {
					gint _tmp3_ = 0;
					_tmp3_ = row;
					row = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = row;
				_tmp5_ = self->priv->n_rows;
				if (!(_tmp4_ < _tmp5_)) {
					break;
				}
				{
					gint col = 0;
					col = 0;
					{
						gboolean _tmp6_ = FALSE;
						_tmp6_ = TRUE;
						while (TRUE) {
							gint _tmp8_ = 0;
							ContactsRowGroup* _tmp9_ = NULL;
							gint _tmp10_ = 0;
							ContactsRowChild* child_info = NULL;
							ContactsRowChild* _tmp11_ = NULL;
							gint _tmp11__length1 = 0;
							gint _tmp11__length2 = 0;
							gint _tmp12_ = 0;
							gint _tmp13_ = 0;
							if (!_tmp6_) {
								gint _tmp7_ = 0;
								_tmp7_ = col;
								col = _tmp7_ + 1;
							}
							_tmp6_ = FALSE;
							_tmp8_ = col;
							_tmp9_ = self->priv->group;
							_tmp10_ = _tmp9_->n_columns;
							if (!(_tmp8_ < _tmp10_)) {
								break;
							}
							_tmp11_ = self->priv->row_children;
							_tmp11__length1 = self->priv->row_children_length1;
							_tmp11__length2 = self->priv->row_children_length2;
							_tmp12_ = col;
							_tmp13_ = row;
							child_info = &_tmp11_[(_tmp12_ * _tmp11__length2) + _tmp13_];
							{
								gint i = 0;
								i = 0;
								{
									gboolean _tmp14_ = FALSE;
									_tmp14_ = TRUE;
									while (TRUE) {
										gboolean _tmp16_ = FALSE;
										ContactsRowChild* _tmp17_ = NULL;
										GtkWidget** _tmp18_ = NULL;
										gint _tmp18__length1 = 0;
										gboolean _tmp22_ = FALSE;
										ContactsRowChild* _tmp23_ = NULL;
										GtkWidget** _tmp24_ = NULL;
										gint _tmp24__length1 = 0;
										gint _tmp25_ = 0;
										GtkWidget* _tmp26_ = NULL;
										gboolean _tmp27_ = FALSE;
										if (!_tmp14_) {
											gint _tmp15_ = 0;
											_tmp15_ = i;
											i = _tmp15_ + 1;
										}
										_tmp14_ = FALSE;
										_tmp17_ = child_info;
										_tmp18_ = (*_tmp17_).widgets;
										_tmp18__length1 = (*_tmp17_).widgets_length1;
										if (_tmp18_ != NULL) {
											gint _tmp19_ = 0;
											ContactsRowChild* _tmp20_ = NULL;
											GtkWidget** _tmp21_ = NULL;
											gint _tmp21__length1 = 0;
											_tmp19_ = i;
											_tmp20_ = child_info;
											_tmp21_ = (*_tmp20_).widgets;
											_tmp21__length1 = (*_tmp20_).widgets_length1;
											_tmp16_ = _tmp19_ < _tmp21__length1;
										} else {
											_tmp16_ = FALSE;
										}
										if (!_tmp16_) {
											break;
										}
										_tmp22_ = _vala_vexpand;
										_tmp23_ = child_info;
										_tmp24_ = (*_tmp23_).widgets;
										_tmp24__length1 = (*_tmp23_).widgets_length1;
										_tmp25_ = i;
										_tmp26_ = _tmp24_[_tmp25_];
										_tmp27_ = gtk_widget_compute_expand (_tmp26_, GTK_ORIENTATION_VERTICAL);
										_vala_vexpand = _tmp22_ | _tmp27_;
									}
								}
							}
						}
					}
				}
			}
		}
	}
	if (hexpand) {
		*hexpand = _vala_hexpand;
	}
	if (vexpand) {
		*vexpand = _vala_vexpand;
	}
}


static GType contacts_row_real_child_type (GtkContainer* base) {
	ContactsRow * self;
	GType result = 0UL;
	self = (ContactsRow*) base;
	result = GTK_TYPE_WIDGET;
	return result;
}


static GtkSizeRequestMode contacts_row_real_get_request_mode (GtkWidget* base) {
	ContactsRow * self;
	GtkSizeRequestMode result = 0;
	self = (ContactsRow*) base;
	result = GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH;
	return result;
}


static void contacts_row_real_get_preferred_height (GtkWidget* base, gint* minimum_height, gint* natural_height) {
	ContactsRow * self;
	gint _vala_minimum_height = 0;
	gint _vala_natural_height = 0;
	gint natural_width = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	self = (ContactsRow*) base;
	gtk_widget_get_preferred_width ((GtkWidget*) self, NULL, &_tmp0_);
	natural_width = _tmp0_;
	gtk_widget_get_preferred_height_for_width ((GtkWidget*) self, natural_width, &_tmp1_, &_tmp2_);
	_vala_minimum_height = _tmp1_;
	_vala_natural_height = _tmp2_;
	if (minimum_height) {
		*minimum_height = _vala_minimum_height;
	}
	if (natural_height) {
		*natural_height = _vala_natural_height;
	}
}


static gint* contacts_row_distribute_heights (ContactsRow* self, gint height, ContactsRowRowInfo* row_info, int row_info_length1, int* result_length1) {
	gint* result = NULL;
	gint* heights = NULL;
	gint _tmp0_ = 0;
	gint* _tmp1_ = NULL;
	gint heights_length1 = 0;
	gint _heights_size_ = 0;
	gint n_children = 0;
	gint* _tmp99_ = NULL;
	gint _tmp99__length1 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->n_rows;
	_tmp1_ = g_new0 (gint, _tmp0_);
	heights = _tmp1_;
	heights_length1 = _tmp0_;
	_heights_size_ = heights_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_ = 0;
				gint _tmp5_ = 0;
				ContactsRowRowInfo* info = NULL;
				ContactsRowRowInfo* _tmp6_ = NULL;
				gint _tmp6__length1 = 0;
				gint _tmp7_ = 0;
				gint _tmp8_ = 0;
				ContactsRowRowInfo* _tmp9_ = NULL;
				gint _tmp10_ = 0;
				if (!_tmp2_) {
					gint _tmp3_ = 0;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = i;
				_tmp5_ = self->priv->n_rows;
				if (!(_tmp4_ < _tmp5_)) {
					break;
				}
				_tmp6_ = row_info;
				_tmp6__length1 = row_info_length1;
				_tmp7_ = i;
				info = &_tmp6_[_tmp7_];
				_tmp8_ = height;
				_tmp9_ = info;
				_tmp10_ = (*_tmp9_).min_height;
				if (_tmp8_ > _tmp10_) {
					gint* _tmp11_ = NULL;
					gint _tmp11__length1 = 0;
					gint _tmp12_ = 0;
					ContactsRowRowInfo* _tmp13_ = NULL;
					gint _tmp14_ = 0;
					gint _tmp15_ = 0;
					gint _tmp16_ = 0;
					ContactsRowRowInfo* _tmp17_ = NULL;
					gint _tmp18_ = 0;
					_tmp11_ = heights;
					_tmp11__length1 = heights_length1;
					_tmp12_ = i;
					_tmp13_ = info;
					_tmp14_ = (*_tmp13_).min_height;
					_tmp11_[_tmp12_] = _tmp14_;
					_tmp15_ = _tmp11_[_tmp12_];
					_tmp16_ = height;
					_tmp17_ = info;
					_tmp18_ = (*_tmp17_).min_height;
					height = _tmp16_ - _tmp18_;
				} else {
					gint _tmp19_ = 0;
					_tmp19_ = height;
					if (_tmp19_ > 0) {
						gint* _tmp20_ = NULL;
						gint _tmp20__length1 = 0;
						gint _tmp21_ = 0;
						gint _tmp22_ = 0;
						gint _tmp23_ = 0;
						_tmp20_ = heights;
						_tmp20__length1 = heights_length1;
						_tmp21_ = i;
						_tmp22_ = height;
						_tmp20_[_tmp21_] = _tmp22_;
						_tmp23_ = _tmp20_[_tmp21_];
						height = 0;
					} else {
						gint* _tmp24_ = NULL;
						gint _tmp24__length1 = 0;
						gint _tmp25_ = 0;
						gint _tmp26_ = 0;
						_tmp24_ = heights;
						_tmp24__length1 = heights_length1;
						_tmp25_ = i;
						_tmp24_[_tmp25_] = 0;
						_tmp26_ = _tmp24_[_tmp25_];
					}
				}
			}
		}
	}
	while (TRUE) {
		gint _tmp27_ = 0;
		gint max_extra = 0;
		gint _tmp28_ = 0;
		gint _tmp61_ = 0;
		gint distribute = 0;
		gint _tmp62_ = 0;
		gint _tmp63_ = 0;
		gint _tmp64_ = 0;
		gint _tmp65_ = 0;
		gint _tmp66_ = 0;
		gint _tmp67_ = 0;
		gint per_child = 0;
		gint _tmp68_ = 0;
		gint _tmp69_ = 0;
		gint per_child_extra = 0;
		gint _tmp70_ = 0;
		gint _tmp71_ = 0;
		gint per_child_extra_sum = 0;
		_tmp27_ = height;
		if (!(_tmp27_ > 0)) {
			break;
		}
		n_children = 0;
		_tmp28_ = height;
		max_extra = _tmp28_;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp29_ = FALSE;
				_tmp29_ = TRUE;
				while (TRUE) {
					gint _tmp31_ = 0;
					gint _tmp32_ = 0;
					ContactsRowRowInfo* info = NULL;
					ContactsRowRowInfo* _tmp33_ = NULL;
					gint _tmp33__length1 = 0;
					gint _tmp34_ = 0;
					gboolean _tmp35_ = FALSE;
					ContactsRowRowInfo* _tmp36_ = NULL;
					gboolean _tmp37_ = FALSE;
					if (!_tmp29_) {
						gint _tmp30_ = 0;
						_tmp30_ = i;
						i = _tmp30_ + 1;
					}
					_tmp29_ = FALSE;
					_tmp31_ = i;
					_tmp32_ = self->priv->n_rows;
					if (!(_tmp31_ < _tmp32_)) {
						break;
					}
					_tmp33_ = row_info;
					_tmp33__length1 = row_info_length1;
					_tmp34_ = i;
					info = &_tmp33_[_tmp34_];
					_tmp36_ = info;
					_tmp37_ = (*_tmp36_).expand;
					if (_tmp37_) {
						_tmp35_ = TRUE;
					} else {
						gint* _tmp38_ = NULL;
						gint _tmp38__length1 = 0;
						gint _tmp39_ = 0;
						gint _tmp40_ = 0;
						ContactsRowRowInfo* _tmp41_ = NULL;
						gint _tmp42_ = 0;
						_tmp38_ = heights;
						_tmp38__length1 = heights_length1;
						_tmp39_ = i;
						_tmp40_ = _tmp38_[_tmp39_];
						_tmp41_ = info;
						_tmp42_ = (*_tmp41_).nat_height;
						_tmp35_ = _tmp40_ < _tmp42_;
					}
					if (_tmp35_) {
						gint _tmp43_ = 0;
						gboolean _tmp44_ = FALSE;
						ContactsRowRowInfo* _tmp45_ = NULL;
						gint _tmp46_ = 0;
						gint* _tmp47_ = NULL;
						gint _tmp47__length1 = 0;
						gint _tmp48_ = 0;
						gint _tmp49_ = 0;
						_tmp43_ = n_children;
						n_children = _tmp43_ + 1;
						_tmp45_ = info;
						_tmp46_ = (*_tmp45_).nat_height;
						_tmp47_ = heights;
						_tmp47__length1 = heights_length1;
						_tmp48_ = i;
						_tmp49_ = _tmp47_[_tmp48_];
						if (_tmp46_ < _tmp49_) {
							ContactsRowRowInfo* _tmp50_ = NULL;
							gint _tmp51_ = 0;
							gint* _tmp52_ = NULL;
							gint _tmp52__length1 = 0;
							gint _tmp53_ = 0;
							gint _tmp54_ = 0;
							gint _tmp55_ = 0;
							_tmp50_ = info;
							_tmp51_ = (*_tmp50_).nat_height;
							_tmp52_ = heights;
							_tmp52__length1 = heights_length1;
							_tmp53_ = i;
							_tmp54_ = _tmp52_[_tmp53_];
							_tmp55_ = max_extra;
							_tmp44_ = (_tmp51_ - _tmp54_) < _tmp55_;
						} else {
							_tmp44_ = FALSE;
						}
						if (_tmp44_) {
							ContactsRowRowInfo* _tmp56_ = NULL;
							gint _tmp57_ = 0;
							gint* _tmp58_ = NULL;
							gint _tmp58__length1 = 0;
							gint _tmp59_ = 0;
							gint _tmp60_ = 0;
							_tmp56_ = info;
							_tmp57_ = (*_tmp56_).nat_height;
							_tmp58_ = heights;
							_tmp58__length1 = heights_length1;
							_tmp59_ = i;
							_tmp60_ = _tmp58_[_tmp59_];
							max_extra = _tmp57_ - _tmp60_;
						}
					}
				}
			}
		}
		_tmp61_ = n_children;
		if (_tmp61_ == 0) {
			break;
		}
		_tmp62_ = height;
		_tmp63_ = max_extra;
		_tmp64_ = n_children;
		_tmp65_ = MIN (_tmp62_, _tmp63_ * _tmp64_);
		distribute = _tmp65_;
		_tmp66_ = height;
		_tmp67_ = distribute;
		height = _tmp66_ - _tmp67_;
		_tmp68_ = distribute;
		_tmp69_ = n_children;
		per_child = _tmp68_ / _tmp69_;
		_tmp70_ = distribute;
		_tmp71_ = n_children;
		per_child_extra = _tmp70_ % _tmp71_;
		per_child_extra_sum = 0;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp72_ = FALSE;
				_tmp72_ = TRUE;
				while (TRUE) {
					gint _tmp74_ = 0;
					gint _tmp75_ = 0;
					ContactsRowRowInfo* info = NULL;
					ContactsRowRowInfo* _tmp76_ = NULL;
					gint _tmp76__length1 = 0;
					gint _tmp77_ = 0;
					gboolean _tmp78_ = FALSE;
					gint* _tmp79_ = NULL;
					gint _tmp79__length1 = 0;
					gint _tmp80_ = 0;
					gint _tmp81_ = 0;
					ContactsRowRowInfo* _tmp82_ = NULL;
					gint _tmp83_ = 0;
					if (!_tmp72_) {
						gint _tmp73_ = 0;
						_tmp73_ = i;
						i = _tmp73_ + 1;
					}
					_tmp72_ = FALSE;
					_tmp74_ = i;
					_tmp75_ = self->priv->n_rows;
					if (!(_tmp74_ < _tmp75_)) {
						break;
					}
					_tmp76_ = row_info;
					_tmp76__length1 = row_info_length1;
					_tmp77_ = i;
					info = &_tmp76_[_tmp77_];
					_tmp79_ = heights;
					_tmp79__length1 = heights_length1;
					_tmp80_ = i;
					_tmp81_ = _tmp79_[_tmp80_];
					_tmp82_ = info;
					_tmp83_ = (*_tmp82_).nat_height;
					if (_tmp81_ < _tmp83_) {
						_tmp78_ = TRUE;
					} else {
						gint _tmp84_ = 0;
						gint _tmp85_ = 0;
						_tmp84_ = n_children;
						_tmp85_ = self->priv->n_rows;
						_tmp78_ = _tmp84_ == _tmp85_;
					}
					if (_tmp78_) {
						gint* _tmp86_ = NULL;
						gint _tmp86__length1 = 0;
						gint _tmp87_ = 0;
						gint _tmp88_ = 0;
						gint _tmp89_ = 0;
						gint _tmp90_ = 0;
						gint _tmp91_ = 0;
						gint _tmp92_ = 0;
						gint _tmp93_ = 0;
						_tmp86_ = heights;
						_tmp86__length1 = heights_length1;
						_tmp87_ = i;
						_tmp88_ = per_child;
						_tmp86_[_tmp87_] += _tmp88_;
						_tmp89_ = _tmp86_[_tmp87_];
						_tmp90_ = per_child_extra_sum;
						_tmp91_ = per_child_extra;
						per_child_extra_sum = _tmp90_ + _tmp91_;
						_tmp92_ = per_child_extra_sum;
						_tmp93_ = distribute;
						if (_tmp92_ > _tmp93_) {
							gint* _tmp94_ = NULL;
							gint _tmp94__length1 = 0;
							gint _tmp95_ = 0;
							gint _tmp96_ = 0;
							gint _tmp97_ = 0;
							gint _tmp98_ = 0;
							_tmp94_ = heights;
							_tmp94__length1 = heights_length1;
							_tmp95_ = i;
							_tmp94_[_tmp95_] += 1;
							_tmp96_ = _tmp94_[_tmp95_];
							_tmp97_ = per_child_extra_sum;
							_tmp98_ = distribute;
							per_child_extra_sum = _tmp97_ - _tmp98_;
						}
					}
				}
			}
		}
	}
	_tmp99_ = heights;
	_tmp99__length1 = heights_length1;
	if (result_length1) {
		*result_length1 = _tmp99__length1;
	}
	result = _tmp99_;
	return result;
}


static ContactsRowRowInfo* contacts_row_get_row_heights_for_widths (ContactsRow* self, gint* widths, int widths_length1, int* result_length1) {
	ContactsRowRowInfo* result = NULL;
	ContactsRowRowInfo* info = NULL;
	gint _tmp0_ = 0;
	ContactsRowRowInfo* _tmp1_ = NULL;
	gint info_length1 = 0;
	gint _info_size_ = 0;
	ContactsRowRowInfo* _tmp56_ = NULL;
	gint _tmp56__length1 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->n_rows;
	_tmp1_ = g_new0 (ContactsRowRowInfo, _tmp0_);
	info = _tmp1_;
	info_length1 = _tmp0_;
	_info_size_ = info_length1;
	{
		gint row = 0;
		row = 0;
		{
			gboolean _tmp2_ = FALSE;
			_tmp2_ = TRUE;
			while (TRUE) {
				gint _tmp4_ = 0;
				gint _tmp5_ = 0;
				gint row_min = 0;
				gint row_nat = 0;
				gboolean first = FALSE;
				gboolean expand = FALSE;
				ContactsRowRowInfo* _tmp47_ = NULL;
				gint _tmp47__length1 = 0;
				gint _tmp48_ = 0;
				gint _tmp49_ = 0;
				ContactsRowRowInfo* _tmp50_ = NULL;
				gint _tmp50__length1 = 0;
				gint _tmp51_ = 0;
				gint _tmp52_ = 0;
				ContactsRowRowInfo* _tmp53_ = NULL;
				gint _tmp53__length1 = 0;
				gint _tmp54_ = 0;
				gboolean _tmp55_ = FALSE;
				if (!_tmp2_) {
					gint _tmp3_ = 0;
					_tmp3_ = row;
					row = _tmp3_ + 1;
				}
				_tmp2_ = FALSE;
				_tmp4_ = row;
				_tmp5_ = self->priv->n_rows;
				if (!(_tmp4_ < _tmp5_)) {
					break;
				}
				row_min = 0;
				row_nat = 0;
				first = TRUE;
				expand = FALSE;
				{
					gint col = 0;
					col = 0;
					{
						gboolean _tmp6_ = FALSE;
						_tmp6_ = TRUE;
						while (TRUE) {
							gint _tmp8_ = 0;
							ContactsRowGroup* _tmp9_ = NULL;
							gint _tmp10_ = 0;
							ContactsRowChild* child_info = NULL;
							ContactsRowChild* _tmp11_ = NULL;
							gint _tmp11__length1 = 0;
							gint _tmp11__length2 = 0;
							gint _tmp12_ = 0;
							gint _tmp13_ = 0;
							if (!_tmp6_) {
								gint _tmp7_ = 0;
								_tmp7_ = col;
								col = _tmp7_ + 1;
							}
							_tmp6_ = FALSE;
							_tmp8_ = col;
							_tmp9_ = self->priv->group;
							_tmp10_ = _tmp9_->n_columns;
							if (!(_tmp8_ < _tmp10_)) {
								break;
							}
							_tmp11_ = self->priv->row_children;
							_tmp11__length1 = self->priv->row_children_length1;
							_tmp11__length2 = self->priv->row_children_length2;
							_tmp12_ = col;
							_tmp13_ = row;
							child_info = &_tmp11_[(_tmp12_ * _tmp11__length2) + _tmp13_];
							{
								gint i = 0;
								i = 0;
								{
									gboolean _tmp14_ = FALSE;
									_tmp14_ = TRUE;
									while (TRUE) {
										gboolean _tmp16_ = FALSE;
										ContactsRowChild* _tmp17_ = NULL;
										GtkWidget** _tmp18_ = NULL;
										gint _tmp18__length1 = 0;
										GtkWidget* widget = NULL;
										ContactsRowChild* _tmp22_ = NULL;
										GtkWidget** _tmp23_ = NULL;
										gint _tmp23__length1 = 0;
										gint _tmp24_ = 0;
										GtkWidget* _tmp25_ = NULL;
										GtkWidget* _tmp26_ = NULL;
										GtkWidget* _tmp27_ = NULL;
										gboolean _tmp28_ = FALSE;
										gint child_min = 0;
										gint child_nat = 0;
										GtkWidget* _tmp29_ = NULL;
										gint* _tmp30_ = NULL;
										gint _tmp30__length1 = 0;
										gint _tmp31_ = 0;
										gint _tmp32_ = 0;
										gint _tmp33_ = 0;
										gint _tmp34_ = 0;
										gboolean _tmp35_ = FALSE;
										GtkWidget* _tmp36_ = NULL;
										gboolean _tmp37_ = FALSE;
										gboolean _tmp38_ = FALSE;
										if (!_tmp14_) {
											gint _tmp15_ = 0;
											_tmp15_ = i;
											i = _tmp15_ + 1;
										}
										_tmp14_ = FALSE;
										_tmp17_ = child_info;
										_tmp18_ = (*_tmp17_).widgets;
										_tmp18__length1 = (*_tmp17_).widgets_length1;
										if (_tmp18_ != NULL) {
											gint _tmp19_ = 0;
											ContactsRowChild* _tmp20_ = NULL;
											GtkWidget** _tmp21_ = NULL;
											gint _tmp21__length1 = 0;
											_tmp19_ = i;
											_tmp20_ = child_info;
											_tmp21_ = (*_tmp20_).widgets;
											_tmp21__length1 = (*_tmp20_).widgets_length1;
											_tmp16_ = _tmp19_ < _tmp21__length1;
										} else {
											_tmp16_ = FALSE;
										}
										if (!_tmp16_) {
											break;
										}
										_tmp22_ = child_info;
										_tmp23_ = (*_tmp22_).widgets;
										_tmp23__length1 = (*_tmp22_).widgets_length1;
										_tmp24_ = i;
										_tmp25_ = _tmp23_[_tmp24_];
										_tmp26_ = _g_object_ref0 (_tmp25_);
										widget = _tmp26_;
										_tmp27_ = widget;
										_tmp28_ = gtk_widget_get_visible (_tmp27_);
										if (!_tmp28_) {
											_g_object_unref0 (widget);
											continue;
										}
										_tmp29_ = widget;
										_tmp30_ = widths;
										_tmp30__length1 = widths_length1;
										_tmp31_ = col;
										_tmp32_ = _tmp30_[_tmp31_];
										gtk_widget_get_preferred_height_for_width (_tmp29_, _tmp32_, &_tmp33_, &_tmp34_);
										child_min = _tmp33_;
										child_nat = _tmp34_;
										_tmp35_ = expand;
										_tmp36_ = widget;
										_tmp37_ = gtk_widget_compute_expand (_tmp36_, GTK_ORIENTATION_VERTICAL);
										expand = _tmp35_ | _tmp37_;
										_tmp38_ = first;
										if (_tmp38_) {
											gint _tmp39_ = 0;
											gint _tmp40_ = 0;
											first = FALSE;
											_tmp39_ = child_min;
											row_min = _tmp39_;
											_tmp40_ = child_nat;
											row_nat = _tmp40_;
										} else {
											gint _tmp41_ = 0;
											gint _tmp42_ = 0;
											gint _tmp43_ = 0;
											gint _tmp44_ = 0;
											gint _tmp45_ = 0;
											gint _tmp46_ = 0;
											_tmp41_ = row_min;
											_tmp42_ = child_min;
											_tmp43_ = MAX (_tmp41_, _tmp42_);
											row_min = _tmp43_;
											_tmp44_ = row_nat;
											_tmp45_ = child_nat;
											_tmp46_ = MAX (_tmp44_, _tmp45_);
											row_nat = _tmp46_;
										}
										_g_object_unref0 (widget);
									}
								}
							}
						}
					}
				}
				_tmp47_ = info;
				_tmp47__length1 = info_length1;
				_tmp48_ = row;
				_tmp49_ = row_min;
				_tmp47_[_tmp48_].min_height = _tmp49_;
				_tmp50_ = info;
				_tmp50__length1 = info_length1;
				_tmp51_ = row;
				_tmp52_ = row_nat;
				_tmp50_[_tmp51_].nat_height = _tmp52_;
				_tmp53_ = info;
				_tmp53__length1 = info_length1;
				_tmp54_ = row;
				_tmp55_ = expand;
				_tmp53_[_tmp54_].expand = _tmp55_;
			}
		}
	}
	_tmp56_ = info;
	_tmp56__length1 = info_length1;
	if (result_length1) {
		*result_length1 = _tmp56__length1;
	}
	result = _tmp56_;
	return result;
}


static void contacts_row_real_get_preferred_height_for_width (GtkWidget* base, gint width, gint* minimum_height, gint* natural_height) {
	ContactsRow * self;
	gint _vala_minimum_height = 0;
	gint _vala_natural_height = 0;
	gint* widths = NULL;
	ContactsRowGroup* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint* _tmp3_ = NULL;
	gint widths_length1 = 0;
	gint _widths_size_ = 0;
	ContactsRowRowInfo* row_info = NULL;
	gint* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gint _tmp5_ = 0;
	ContactsRowRowInfo* _tmp6_ = NULL;
	gint row_info_length1 = 0;
	gint _row_info_size_ = 0;
	self = (ContactsRow*) base;
	_tmp0_ = self->priv->group;
	_tmp1_ = width;
	_tmp3_ = contacts_row_group_distribute_widths (_tmp0_, _tmp1_, &_tmp2_);
	widths = _tmp3_;
	widths_length1 = _tmp2_;
	_widths_size_ = widths_length1;
	_tmp4_ = widths;
	_tmp4__length1 = widths_length1;
	_tmp6_ = contacts_row_get_row_heights_for_widths (self, _tmp4_, _tmp4__length1, &_tmp5_);
	row_info = _tmp6_;
	row_info_length1 = _tmp5_;
	_row_info_size_ = row_info_length1;
	_vala_minimum_height = 0;
	_vala_natural_height = 0;
	{
		gint row = 0;
		row = 0;
		{
			gboolean _tmp7_ = FALSE;
			_tmp7_ = TRUE;
			while (TRUE) {
				gint _tmp9_ = 0;
				gint _tmp10_ = 0;
				gint _tmp11_ = 0;
				ContactsRowRowInfo* _tmp12_ = NULL;
				gint _tmp12__length1 = 0;
				gint _tmp13_ = 0;
				ContactsRowRowInfo _tmp14_ = {0};
				gint _tmp15_ = 0;
				gint _tmp16_ = 0;
				ContactsRowRowInfo* _tmp17_ = NULL;
				gint _tmp17__length1 = 0;
				gint _tmp18_ = 0;
				ContactsRowRowInfo _tmp19_ = {0};
				gint _tmp20_ = 0;
				if (!_tmp7_) {
					gint _tmp8_ = 0;
					_tmp8_ = row;
					row = _tmp8_ + 1;
				}
				_tmp7_ = FALSE;
				_tmp9_ = row;
				_tmp10_ = self->priv->n_rows;
				if (!(_tmp9_ < _tmp10_)) {
					break;
				}
				_tmp11_ = _vala_minimum_height;
				_tmp12_ = row_info;
				_tmp12__length1 = row_info_length1;
				_tmp13_ = row;
				_tmp14_ = _tmp12_[_tmp13_];
				_tmp15_ = _tmp14_.min_height;
				_vala_minimum_height = _tmp11_ + _tmp15_;
				_tmp16_ = _vala_natural_height;
				_tmp17_ = row_info;
				_tmp17__length1 = row_info_length1;
				_tmp18_ = row;
				_tmp19_ = _tmp17_[_tmp18_];
				_tmp20_ = _tmp19_.nat_height;
				_vala_natural_height = _tmp16_ + _tmp20_;
			}
		}
	}
	row_info = (g_free (row_info), NULL);
	widths = (g_free (widths), NULL);
	if (minimum_height) {
		*minimum_height = _vala_minimum_height;
	}
	if (natural_height) {
		*natural_height = _vala_natural_height;
	}
}


static void contacts_row_real_get_preferred_width (GtkWidget* base, gint* minimum_width, gint* natural_width) {
	ContactsRow * self;
	gint _vala_minimum_width = 0;
	gint _vala_natural_width = 0;
	ContactsRowGroup* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	self = (ContactsRow*) base;
	_tmp0_ = self->priv->group;
	contacts_row_group_get_width (_tmp0_, &_tmp1_, &_tmp2_);
	_vala_minimum_width = _tmp1_;
	_vala_natural_width = _tmp2_;
	if (minimum_width) {
		*minimum_width = _vala_minimum_width;
	}
	if (natural_width) {
		*natural_width = _vala_natural_width;
	}
}


static void contacts_row_real_get_preferred_width_for_height (GtkWidget* base, gint height, gint* minimum_width, gint* natural_width) {
	ContactsRow * self;
	gint _vala_minimum_width = 0;
	gint _vala_natural_width = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	self = (ContactsRow*) base;
	gtk_widget_get_preferred_width ((GtkWidget*) self, &_tmp0_, &_tmp1_);
	_vala_minimum_width = _tmp0_;
	_vala_natural_width = _tmp1_;
	if (minimum_width) {
		*minimum_width = _vala_minimum_width;
	}
	if (natural_width) {
		*natural_width = _vala_natural_width;
	}
}


static void contacts_row_real_size_allocate (GtkWidget* base, GtkAllocation* allocation) {
	ContactsRow * self;
	gint* widths = NULL;
	ContactsRowGroup* _tmp0_ = NULL;
	GtkAllocation _tmp1_ = {0};
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint* _tmp4_ = NULL;
	gint widths_length1 = 0;
	gint _widths_size_ = 0;
	ContactsRowRowInfo* row_info = NULL;
	gint* _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	gint _tmp6_ = 0;
	ContactsRowRowInfo* _tmp7_ = NULL;
	gint row_info_length1 = 0;
	gint _row_info_size_ = 0;
	gint* heights = NULL;
	GtkAllocation _tmp8_ = {0};
	gint _tmp9_ = 0;
	ContactsRowRowInfo* _tmp10_ = NULL;
	gint _tmp10__length1 = 0;
	gint _tmp11_ = 0;
	gint* _tmp12_ = NULL;
	gint heights_length1 = 0;
	gint _heights_size_ = 0;
	GtkAllocation _tmp13_ = {0};
	GdkWindow* _tmp14_ = NULL;
	gint y = 0;
	self = (ContactsRow*) base;
	g_return_if_fail (allocation != NULL);
	_tmp0_ = self->priv->group;
	_tmp1_ = *allocation;
	_tmp2_ = _tmp1_.width;
	_tmp4_ = contacts_row_group_distribute_widths (_tmp0_, _tmp2_, &_tmp3_);
	widths = _tmp4_;
	widths_length1 = _tmp3_;
	_widths_size_ = widths_length1;
	_tmp5_ = widths;
	_tmp5__length1 = widths_length1;
	_tmp7_ = contacts_row_get_row_heights_for_widths (self, _tmp5_, _tmp5__length1, &_tmp6_);
	row_info = _tmp7_;
	row_info_length1 = _tmp6_;
	_row_info_size_ = row_info_length1;
	_tmp8_ = *allocation;
	_tmp9_ = _tmp8_.height;
	_tmp10_ = row_info;
	_tmp10__length1 = row_info_length1;
	_tmp12_ = contacts_row_distribute_heights (self, _tmp9_, _tmp10_, _tmp10__length1, &_tmp11_);
	heights = _tmp12_;
	heights_length1 = _tmp11_;
	_heights_size_ = heights_length1;
	_tmp13_ = *allocation;
	gtk_widget_set_allocation ((GtkWidget*) self, &_tmp13_);
	_tmp14_ = self->event_window;
	if (_tmp14_ != NULL) {
		GdkWindow* _tmp15_ = NULL;
		GtkAllocation _tmp16_ = {0};
		gint _tmp17_ = 0;
		GtkAllocation _tmp18_ = {0};
		gint _tmp19_ = 0;
		GtkAllocation _tmp20_ = {0};
		gint _tmp21_ = 0;
		GtkAllocation _tmp22_ = {0};
		gint _tmp23_ = 0;
		_tmp15_ = self->event_window;
		_tmp16_ = *allocation;
		_tmp17_ = _tmp16_.x;
		_tmp18_ = *allocation;
		_tmp19_ = _tmp18_.y;
		_tmp20_ = *allocation;
		_tmp21_ = _tmp20_.width;
		_tmp22_ = *allocation;
		_tmp23_ = _tmp22_.height;
		gdk_window_move_resize (_tmp15_, _tmp17_, _tmp19_, _tmp21_, _tmp23_);
	}
	y = 0;
	{
		gint row = 0;
		row = 0;
		{
			gboolean _tmp24_ = FALSE;
			_tmp24_ = TRUE;
			while (TRUE) {
				gint _tmp26_ = 0;
				gint _tmp27_ = 0;
				gint x = 0;
				gint _tmp80_ = 0;
				gint* _tmp81_ = NULL;
				gint _tmp81__length1 = 0;
				gint _tmp82_ = 0;
				gint _tmp83_ = 0;
				if (!_tmp24_) {
					gint _tmp25_ = 0;
					_tmp25_ = row;
					row = _tmp25_ + 1;
				}
				_tmp24_ = FALSE;
				_tmp26_ = row;
				_tmp27_ = self->priv->n_rows;
				if (!(_tmp26_ < _tmp27_)) {
					break;
				}
				x = 0;
				{
					gint col = 0;
					col = 0;
					{
						gboolean _tmp28_ = FALSE;
						_tmp28_ = TRUE;
						while (TRUE) {
							gint _tmp30_ = 0;
							ContactsRowGroup* _tmp31_ = NULL;
							gint _tmp32_ = 0;
							ContactsRowChild* child_info = NULL;
							ContactsRowChild* _tmp33_ = NULL;
							gint _tmp33__length1 = 0;
							gint _tmp33__length2 = 0;
							gint _tmp34_ = 0;
							gint _tmp35_ = 0;
							gint _tmp72_ = 0;
							gint* _tmp73_ = NULL;
							gint _tmp73__length1 = 0;
							gint _tmp74_ = 0;
							gint _tmp75_ = 0;
							ContactsRowGroup* _tmp76_ = NULL;
							gint _tmp77_ = 0;
							ContactsRowGroupColumnInfo* _tmp78_ = NULL;
							gint _tmp79_ = 0;
							if (!_tmp28_) {
								gint _tmp29_ = 0;
								_tmp29_ = col;
								col = _tmp29_ + 1;
							}
							_tmp28_ = FALSE;
							_tmp30_ = col;
							_tmp31_ = self->priv->group;
							_tmp32_ = _tmp31_->n_columns;
							if (!(_tmp30_ < _tmp32_)) {
								break;
							}
							_tmp33_ = self->priv->row_children;
							_tmp33__length1 = self->priv->row_children_length1;
							_tmp33__length2 = self->priv->row_children_length2;
							_tmp34_ = col;
							_tmp35_ = row;
							child_info = &_tmp33_[(_tmp34_ * _tmp33__length2) + _tmp35_];
							{
								gint i = 0;
								i = 0;
								{
									gboolean _tmp36_ = FALSE;
									_tmp36_ = TRUE;
									while (TRUE) {
										gboolean _tmp38_ = FALSE;
										ContactsRowChild* _tmp39_ = NULL;
										GtkWidget** _tmp40_ = NULL;
										gint _tmp40__length1 = 0;
										GtkWidget* widget = NULL;
										ContactsRowChild* _tmp44_ = NULL;
										GtkWidget** _tmp45_ = NULL;
										gint _tmp45__length1 = 0;
										gint _tmp46_ = 0;
										GtkWidget* _tmp47_ = NULL;
										GtkWidget* _tmp48_ = NULL;
										GtkAllocation child_allocation = {0};
										GtkAllocation _tmp49_ = {0};
										gint* _tmp50_ = NULL;
										gint _tmp50__length1 = 0;
										gint _tmp51_ = 0;
										gint _tmp52_ = 0;
										gint* _tmp53_ = NULL;
										gint _tmp53__length1 = 0;
										gint _tmp54_ = 0;
										gint _tmp55_ = 0;
										GtkTextDirection _tmp56_ = 0;
										GtkAllocation _tmp67_ = {0};
										gint _tmp68_ = 0;
										gint _tmp69_ = 0;
										GtkWidget* _tmp70_ = NULL;
										GtkAllocation _tmp71_ = {0};
										if (!_tmp36_) {
											gint _tmp37_ = 0;
											_tmp37_ = i;
											i = _tmp37_ + 1;
										}
										_tmp36_ = FALSE;
										_tmp39_ = child_info;
										_tmp40_ = (*_tmp39_).widgets;
										_tmp40__length1 = (*_tmp39_).widgets_length1;
										if (_tmp40_ != NULL) {
											gint _tmp41_ = 0;
											ContactsRowChild* _tmp42_ = NULL;
											GtkWidget** _tmp43_ = NULL;
											gint _tmp43__length1 = 0;
											_tmp41_ = i;
											_tmp42_ = child_info;
											_tmp43_ = (*_tmp42_).widgets;
											_tmp43__length1 = (*_tmp42_).widgets_length1;
											_tmp38_ = _tmp41_ < _tmp43__length1;
										} else {
											_tmp38_ = FALSE;
										}
										if (!_tmp38_) {
											break;
										}
										_tmp44_ = child_info;
										_tmp45_ = (*_tmp44_).widgets;
										_tmp45__length1 = (*_tmp44_).widgets_length1;
										_tmp46_ = i;
										_tmp47_ = _tmp45_[_tmp46_];
										_tmp48_ = _g_object_ref0 (_tmp47_);
										widget = _tmp48_;
										_tmp49_.x = 0;
										_tmp49_.y = 0;
										_tmp49_.width = 0;
										_tmp49_.height = 0;
										child_allocation = _tmp49_;
										_tmp50_ = widths;
										_tmp50__length1 = widths_length1;
										_tmp51_ = col;
										_tmp52_ = _tmp50_[_tmp51_];
										child_allocation.width = _tmp52_;
										_tmp53_ = heights;
										_tmp53__length1 = heights_length1;
										_tmp54_ = row;
										_tmp55_ = _tmp53_[_tmp54_];
										child_allocation.height = _tmp55_;
										_tmp56_ = gtk_widget_get_direction ((GtkWidget*) self);
										if (_tmp56_ == GTK_TEXT_DIR_RTL) {
											GtkAllocation _tmp57_ = {0};
											gint _tmp58_ = 0;
											GtkAllocation _tmp59_ = {0};
											gint _tmp60_ = 0;
											gint _tmp61_ = 0;
											GtkAllocation _tmp62_ = {0};
											gint _tmp63_ = 0;
											_tmp57_ = *allocation;
											_tmp58_ = _tmp57_.x;
											_tmp59_ = *allocation;
											_tmp60_ = _tmp59_.width;
											_tmp61_ = x;
											_tmp62_ = child_allocation;
											_tmp63_ = _tmp62_.width;
											child_allocation.x = ((_tmp58_ + _tmp60_) - _tmp61_) - _tmp63_;
										} else {
											GtkAllocation _tmp64_ = {0};
											gint _tmp65_ = 0;
											gint _tmp66_ = 0;
											_tmp64_ = *allocation;
											_tmp65_ = _tmp64_.x;
											_tmp66_ = x;
											child_allocation.x = _tmp65_ + _tmp66_;
										}
										_tmp67_ = *allocation;
										_tmp68_ = _tmp67_.y;
										_tmp69_ = y;
										child_allocation.y = _tmp68_ + _tmp69_;
										_tmp70_ = widget;
										_tmp71_ = child_allocation;
										gtk_widget_size_allocate (_tmp70_, &_tmp71_);
										_g_object_unref0 (widget);
									}
								}
							}
							_tmp72_ = x;
							_tmp73_ = widths;
							_tmp73__length1 = widths_length1;
							_tmp74_ = col;
							_tmp75_ = _tmp73_[_tmp74_];
							_tmp76_ = self->priv->group;
							_tmp77_ = col;
							_tmp78_ = contacts_row_group_get_column_info (_tmp76_, _tmp77_);
							_tmp79_ = (*_tmp78_).spacing;
							x = _tmp72_ + (_tmp75_ + _tmp79_);
						}
					}
				}
				_tmp80_ = y;
				_tmp81_ = heights;
				_tmp81__length1 = heights_length1;
				_tmp82_ = row;
				_tmp83_ = _tmp81_[_tmp82_];
				y = _tmp80_ + _tmp83_;
			}
		}
	}
	heights = (g_free (heights), NULL);
	row_info = (g_free (row_info), NULL);
	widths = (g_free (widths), NULL);
}


static ContactsRowRowInfo* contacts_row_row_info_dup (const ContactsRowRowInfo* self) {
	ContactsRowRowInfo* dup;
	dup = g_new0 (ContactsRowRowInfo, 1);
	memcpy (dup, self, sizeof (ContactsRowRowInfo));
	return dup;
}


static void contacts_row_row_info_free (ContactsRowRowInfo* self) {
	g_free (self);
}


static GType contacts_row_row_info_get_type (void) {
	static volatile gsize contacts_row_row_info_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_row_row_info_type_id__volatile)) {
		GType contacts_row_row_info_type_id;
		contacts_row_row_info_type_id = g_boxed_type_register_static ("ContactsRowRowInfo", (GBoxedCopyFunc) contacts_row_row_info_dup, (GBoxedFreeFunc) contacts_row_row_info_free);
		g_once_init_leave (&contacts_row_row_info_type_id__volatile, contacts_row_row_info_type_id);
	}
	return contacts_row_row_info_type_id__volatile;
}


static GtkWidget** _vala_array_dup3 (GtkWidget** self, int length) {
	GtkWidget** result;
	int i;
	result = g_new0 (GtkWidget*, length + 1);
	for (i = 0; i < length; i++) {
		GtkWidget* _tmp0_ = NULL;
		_tmp0_ = _g_object_ref0 (self[i]);
		result[i] = _tmp0_;
	}
	return result;
}


static void contacts_row_child_copy (const ContactsRowChild* self, ContactsRowChild* dest) {
	GtkWidget** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	GtkWidget** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	_tmp0_ = (*self).widgets;
	_tmp0__length1 = (*self).widgets_length1;
	_tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup3 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_);
	_tmp1__length1 = _tmp0__length1;
	(*dest).widgets = (_vala_array_free ((*dest).widgets, (*dest).widgets_length1, (GDestroyNotify) g_object_unref), NULL);
	(*dest).widgets = _tmp1_;
	(*dest).widgets_length1 = _tmp1__length1;
	(*dest)._widgets_size_ = (*dest).widgets_length1;
}


static void contacts_row_child_destroy (ContactsRowChild* self) {
	(*self).widgets = (_vala_array_free ((*self).widgets, (*self).widgets_length1, (GDestroyNotify) g_object_unref), NULL);
}


static ContactsRowChild* contacts_row_child_dup (const ContactsRowChild* self) {
	ContactsRowChild* dup;
	dup = g_new0 (ContactsRowChild, 1);
	contacts_row_child_copy (self, dup);
	return dup;
}


static void contacts_row_child_free (ContactsRowChild* self) {
	contacts_row_child_destroy (self);
	g_free (self);
}


static GType contacts_row_child_get_type (void) {
	static volatile gsize contacts_row_child_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_row_child_type_id__volatile)) {
		GType contacts_row_child_type_id;
		contacts_row_child_type_id = g_boxed_type_register_static ("ContactsRowChild", (GBoxedCopyFunc) contacts_row_child_dup, (GBoxedFreeFunc) contacts_row_child_free);
		g_once_init_leave (&contacts_row_child_type_id__volatile, contacts_row_child_type_id);
	}
	return contacts_row_child_type_id__volatile;
}


static void contacts_row_class_init (ContactsRowClass * klass) {
	contacts_row_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ContactsRowPrivate));
	GTK_WIDGET_CLASS (klass)->realize = contacts_row_real_realize;
	GTK_WIDGET_CLASS (klass)->unrealize = contacts_row_real_unrealize;
	GTK_WIDGET_CLASS (klass)->map = contacts_row_real_map;
	GTK_WIDGET_CLASS (klass)->unmap = contacts_row_real_unmap;
	GTK_CONTAINER_CLASS (klass)->add = contacts_row_real_add;
	GTK_CONTAINER_CLASS (klass)->remove = contacts_row_real_remove;
	GTK_CONTAINER_CLASS (klass)->forall = contacts_row_real_forall_internal;
	GTK_WIDGET_CLASS (klass)->compute_expand = contacts_row_real_compute_expand_internal;
	GTK_CONTAINER_CLASS (klass)->child_type = contacts_row_real_child_type;
	GTK_WIDGET_CLASS (klass)->get_request_mode = contacts_row_real_get_request_mode;
	GTK_WIDGET_CLASS (klass)->get_preferred_height = contacts_row_real_get_preferred_height;
	GTK_WIDGET_CLASS (klass)->get_preferred_height_for_width = contacts_row_real_get_preferred_height_for_width;
	GTK_WIDGET_CLASS (klass)->get_preferred_width = contacts_row_real_get_preferred_width;
	GTK_WIDGET_CLASS (klass)->get_preferred_width_for_height = contacts_row_real_get_preferred_width_for_height;
	GTK_WIDGET_CLASS (klass)->size_allocate = contacts_row_real_size_allocate;
	G_OBJECT_CLASS (klass)->finalize = contacts_row_finalize;
}


static void contacts_row_instance_init (ContactsRow * self) {
	self->priv = CONTACTS_ROW_GET_PRIVATE (self);
}


static void contacts_row_finalize (GObject* obj) {
	ContactsRow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_ROW, ContactsRow);
	_g_object_unref0 (self->event_window);
	_g_object_unref0 (self->priv->group);
	self->priv->row_children = (_vala_ContactsRowChild_array_free (self->priv->row_children, self->priv->row_children_length1 * self->priv->row_children_length2), NULL);
	G_OBJECT_CLASS (contacts_row_parent_class)->finalize (obj);
}


GType contacts_row_get_type (void) {
	static volatile gsize contacts_row_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_row_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ContactsRowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_row_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsRow), 0, (GInstanceInitFunc) contacts_row_instance_init, NULL };
		GType contacts_row_type_id;
		contacts_row_type_id = g_type_register_static (GTK_TYPE_CONTAINER, "ContactsRow", &g_define_type_info, 0);
		g_once_init_leave (&contacts_row_type_id__volatile, contacts_row_type_id);
	}
	return contacts_row_type_id__volatile;
}


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


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



