/* contacts-contact-frame.c generated by valac 0.26.2, the Vala compiler
 * generated from contacts-contact-frame.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 <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <pango/pango.h>
#include <atk/atk.h>
#include <glib/gi18n-lib.h>
#include <cairo.h>
#include <folks/folks.h>
#include <gio/gio.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <pango/pangocairo.h>


#define CONTACTS_TYPE_CONTACT_FRAME (contacts_contact_frame_get_type ())
#define CONTACTS_CONTACT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrame))
#define CONTACTS_CONTACT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrameClass))
#define CONTACTS_IS_CONTACT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT_FRAME))
#define CONTACTS_IS_CONTACT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT_FRAME))
#define CONTACTS_CONTACT_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrameClass))

typedef struct _ContactsContactFrame ContactsContactFrame;
typedef struct _ContactsContactFrameClass ContactsContactFrameClass;
typedef struct _ContactsContactFramePrivate ContactsContactFramePrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define CONTACTS_TYPE_CONTACT (contacts_contact_get_type ())
#define CONTACTS_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONTACTS_TYPE_CONTACT, ContactsContact))
#define CONTACTS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONTACTS_TYPE_CONTACT, ContactsContactClass))
#define CONTACTS_IS_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONTACTS_TYPE_CONTACT))
#define CONTACTS_IS_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONTACTS_TYPE_CONTACT))
#define CONTACTS_CONTACT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONTACTS_TYPE_CONTACT, ContactsContactClass))

typedef struct _ContactsContact ContactsContact;
typedef struct _ContactsContactClass ContactsContactClass;
#define __vala_PangoFontDescription_free0(var) ((var == NULL) ? NULL : (var = (_vala_PangoFontDescription_free (var), NULL)))

struct _ContactsContactFrame {
	GtkFrame parent_instance;
	ContactsContactFramePrivate * priv;
};

struct _ContactsContactFrameClass {
	GtkFrameClass parent_class;
};

struct _ContactsContactFramePrivate {
	gint size;
	gchar* text;
	GdkPixbuf* pixbuf;
	PangoLayout* layout;
	gint text_height;
};


static gpointer contacts_contact_frame_parent_class = NULL;

GType contacts_contact_frame_get_type (void) G_GNUC_CONST;
#define CONTACTS_CONTACT_FRAME_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFramePrivate))
enum  {
	CONTACTS_CONTACT_FRAME_DUMMY_PROPERTY
};
ContactsContactFrame* contacts_contact_frame_new (gint size, gboolean with_button);
ContactsContactFrame* contacts_contact_frame_construct (GType object_type, gint size, gboolean with_button);
static void ___lambda27_ (ContactsContactFrame* self);
static void ____lambda27__gtk_button_clicked (GtkButton* _sender, gpointer self);
gboolean contacts_contact_frame_draw_image (ContactsContactFrame* self, cairo_t* cr);
static gboolean _contacts_contact_frame_draw_image_gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self);
void contacts_contact_frame_set_pixbuf (ContactsContactFrame* self, GdkPixbuf* a_pixbuf);
GdkPixbuf* contacts_contact_frame_icon (GdkPixbuf* icon);
GType contacts_contact_get_type (void) G_GNUC_CONST;
void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact);
GdkPixbuf* contacts_contact_draw_fallback_avatar (gint size, ContactsContact* contact);
void contacts_contact_frame_set_text (ContactsContactFrame* self, const gchar* text_, gint text_height_);
static void _vala_PangoFontDescription_free (PangoFontDescription* self);
void contacts_utils_cairo_rounded_box (cairo_t* cr, gint x, gint y, gint width, gint height, gint radius);
static void contacts_contact_frame_finalize (GObject* obj);


static void ___lambda27_ (ContactsContactFrame* self) {
	g_signal_emit_by_name (self, "clicked");
}


static void ____lambda27__gtk_button_clicked (GtkButton* _sender, gpointer self) {
	___lambda27_ ((ContactsContactFrame*) self);
}


static gboolean _contacts_contact_frame_draw_image_gtk_widget_draw (GtkWidget* _sender, cairo_t* cr, gpointer self) {
	gboolean result;
	result = contacts_contact_frame_draw_image ((ContactsContactFrame*) self, cr);
	return result;
}


ContactsContactFrame* contacts_contact_frame_construct (GType object_type, gint size, gboolean with_button) {
	ContactsContactFrame * self = NULL;
	gint _tmp0_ = 0;
	GtkImage* image = NULL;
	GtkImage* _tmp1_ = NULL;
	GtkImage* _tmp2_ = NULL;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	gboolean _tmp5_ = FALSE;
	GtkImage* _tmp19_ = NULL;
	GtkImage* _tmp20_ = NULL;
	self = (ContactsContactFrame*) g_object_new (object_type, NULL);
	_tmp0_ = size;
	self->priv->size = _tmp0_;
	_tmp1_ = (GtkImage*) gtk_image_new ();
	g_object_ref_sink (_tmp1_);
	image = _tmp1_;
	_tmp2_ = image;
	_tmp3_ = size;
	_tmp4_ = size;
	gtk_widget_set_size_request ((GtkWidget*) _tmp2_, _tmp3_, _tmp4_);
	_tmp5_ = with_button;
	if (_tmp5_) {
		GtkButton* button = NULL;
		GtkButton* _tmp6_ = NULL;
		GtkButton* _tmp7_ = NULL;
		AtkObject* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		GtkButton* _tmp10_ = NULL;
		GtkStyleContext* _tmp11_ = NULL;
		GtkButton* _tmp12_ = NULL;
		GtkButton* _tmp13_ = NULL;
		GtkButton* _tmp14_ = NULL;
		GtkImage* _tmp15_ = NULL;
		GtkButton* _tmp16_ = NULL;
		GtkButton* _tmp17_ = NULL;
		_tmp6_ = (GtkButton*) gtk_button_new ();
		g_object_ref_sink (_tmp6_);
		button = _tmp6_;
		_tmp7_ = button;
		_tmp8_ = gtk_widget_get_accessible ((GtkWidget*) _tmp7_);
		_tmp9_ = _ ("Change avatar");
		atk_object_set_name (_tmp8_, _tmp9_);
		_tmp10_ = button;
		_tmp11_ = gtk_widget_get_style_context ((GtkWidget*) _tmp10_);
		gtk_style_context_add_class (_tmp11_, "contacts-square");
		_tmp12_ = button;
		gtk_button_set_relief (_tmp12_, GTK_RELIEF_NONE);
		_tmp13_ = button;
		gtk_button_set_focus_on_click (_tmp13_, FALSE);
		_tmp14_ = button;
		_tmp15_ = image;
		gtk_container_add ((GtkContainer*) _tmp14_, (GtkWidget*) _tmp15_);
		_tmp16_ = button;
		g_signal_connect_object (_tmp16_, "clicked", (GCallback) ____lambda27__gtk_button_clicked, self, 0);
		_tmp17_ = button;
		gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp17_);
		_g_object_unref0 (button);
	} else {
		GtkImage* _tmp18_ = NULL;
		_tmp18_ = image;
		gtk_container_add ((GtkContainer*) self, (GtkWidget*) _tmp18_);
	}
	_tmp19_ = image;
	gtk_widget_show ((GtkWidget*) _tmp19_);
	_tmp20_ = image;
	g_signal_connect_object ((GtkWidget*) _tmp20_, "draw", (GCallback) _contacts_contact_frame_draw_image_gtk_widget_draw, self, 0);
	gtk_frame_set_shadow_type ((GtkFrame*) self, GTK_SHADOW_NONE);
	_g_object_unref0 (image);
	return self;
}


ContactsContactFrame* contacts_contact_frame_new (gint size, gboolean with_button) {
	return contacts_contact_frame_construct (CONTACTS_TYPE_CONTACT_FRAME, size, with_button);
}


void contacts_contact_frame_set_pixbuf (ContactsContactFrame* self, GdkPixbuf* a_pixbuf) {
	GdkPixbuf* _tmp0_ = NULL;
	GdkPixbuf* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (a_pixbuf != NULL);
	_tmp0_ = a_pixbuf;
	_tmp1_ = contacts_contact_frame_icon (_tmp0_);
	_g_object_unref0 (self->priv->pixbuf);
	self->priv->pixbuf = _tmp1_;
	gtk_widget_queue_draw ((GtkWidget*) self);
}


void contacts_contact_frame_set_image (ContactsContactFrame* self, FolksAvatarDetails* details, ContactsContact* contact) {
	GdkPixbuf* a_pixbuf = NULL;
	gboolean _tmp0_ = FALSE;
	FolksAvatarDetails* _tmp1_ = NULL;
	GdkPixbuf* _tmp16_ = NULL;
	GdkPixbuf* _tmp20_ = NULL;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	a_pixbuf = NULL;
	_tmp1_ = details;
	if (_tmp1_ != NULL) {
		FolksAvatarDetails* _tmp2_ = NULL;
		GLoadableIcon* _tmp3_ = NULL;
		GLoadableIcon* _tmp4_ = NULL;
		_tmp2_ = details;
		_tmp3_ = folks_avatar_details_get_avatar (_tmp2_);
		_tmp4_ = _tmp3_;
		_tmp0_ = _tmp4_ != NULL;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		{
			GInputStream* stream = NULL;
			FolksAvatarDetails* _tmp5_ = NULL;
			GLoadableIcon* _tmp6_ = NULL;
			GLoadableIcon* _tmp7_ = NULL;
			gint _tmp8_ = 0;
			GInputStream* _tmp9_ = NULL;
			GdkPixbuf* _tmp10_ = NULL;
			GInputStream* _tmp11_ = NULL;
			gint _tmp12_ = 0;
			gint _tmp13_ = 0;
			GdkPixbuf* _tmp14_ = NULL;
			GdkPixbuf* _tmp15_ = NULL;
			_tmp5_ = details;
			_tmp6_ = folks_avatar_details_get_avatar (_tmp5_);
			_tmp7_ = _tmp6_;
			_tmp8_ = self->priv->size;
			_tmp9_ = g_loadable_icon_load (_tmp7_, _tmp8_, NULL, NULL, &_inner_error_);
			stream = _tmp9_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				goto __catch38_g_error;
			}
			_tmp11_ = stream;
			_tmp12_ = self->priv->size;
			_tmp13_ = self->priv->size;
			_tmp14_ = gdk_pixbuf_new_from_stream_at_scale (_tmp11_, _tmp12_, _tmp13_, TRUE, NULL, &_inner_error_);
			_tmp10_ = _tmp14_;
			if (G_UNLIKELY (_inner_error_ != NULL)) {
				_g_object_unref0 (stream);
				goto __catch38_g_error;
			}
			_tmp15_ = _tmp10_;
			_tmp10_ = NULL;
			_g_object_unref0 (a_pixbuf);
			a_pixbuf = _tmp15_;
			_g_object_unref0 (_tmp10_);
			_g_object_unref0 (stream);
		}
		goto __finally38;
		__catch38_g_error:
		{
			g_clear_error (&_inner_error_);
			_inner_error_ = NULL;
		}
		__finally38:
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			_g_object_unref0 (a_pixbuf);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return;
		}
	}
	_tmp16_ = a_pixbuf;
	if (_tmp16_ == NULL) {
		gint _tmp17_ = 0;
		ContactsContact* _tmp18_ = NULL;
		GdkPixbuf* _tmp19_ = NULL;
		_tmp17_ = self->priv->size;
		_tmp18_ = contact;
		_tmp19_ = contacts_contact_draw_fallback_avatar (_tmp17_, _tmp18_);
		_g_object_unref0 (a_pixbuf);
		a_pixbuf = _tmp19_;
	}
	_tmp20_ = a_pixbuf;
	contacts_contact_frame_set_pixbuf (self, _tmp20_);
	_g_object_unref0 (a_pixbuf);
}


static void _vala_PangoFontDescription_free (PangoFontDescription* self) {
	g_boxed_free (pango_font_description_get_type (), self);
}


void contacts_contact_frame_set_text (ContactsContactFrame* self, const gchar* text_, gint text_height_) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gint _tmp2_ = 0;
	const gchar* _tmp3_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = text_;
	_tmp1_ = g_strdup (_tmp0_);
	_g_free0 (self->priv->text);
	self->priv->text = _tmp1_;
	_tmp2_ = text_height_;
	self->priv->text_height = _tmp2_;
	_g_object_unref0 (self->priv->layout);
	self->priv->layout = NULL;
	_tmp3_ = self->priv->text;
	if (_tmp3_ != NULL) {
		const gchar* _tmp4_ = NULL;
		PangoLayout* _tmp5_ = NULL;
		PangoRectangle rect = {0};
		PangoRectangle _tmp6_ = {0};
		gint font_size = 0;
		gint _tmp7_ = 0;
		_tmp4_ = self->priv->text;
		_tmp5_ = gtk_widget_create_pango_layout ((GtkWidget*) self, _tmp4_);
		_g_object_unref0 (self->priv->layout);
		self->priv->layout = _tmp5_;
		_tmp6_.x = 0;
		rect = _tmp6_;
		_tmp7_ = self->priv->text_height;
		font_size = (_tmp7_ - 4) + 1;
		{
			gboolean _tmp8_ = FALSE;
			_tmp8_ = TRUE;
			while (TRUE) {
				gint _tmp12_ = 0;
				PangoFontDescription* fd = NULL;
				PangoFontDescription* _tmp13_ = NULL;
				PangoFontDescription* _tmp14_ = NULL;
				gint _tmp15_ = 0;
				PangoLayout* _tmp16_ = NULL;
				PangoFontDescription* _tmp17_ = NULL;
				PangoLayout* _tmp18_ = NULL;
				PangoRectangle _tmp19_ = {0};
				if (!_tmp8_) {
					PangoRectangle _tmp9_ = {0};
					gint _tmp10_ = 0;
					gint _tmp11_ = 0;
					_tmp9_ = rect;
					_tmp10_ = _tmp9_.width;
					_tmp11_ = self->priv->size;
					if (!(_tmp10_ > (_tmp11_ * PANGO_SCALE))) {
						break;
					}
				}
				_tmp8_ = FALSE;
				_tmp12_ = font_size;
				font_size = _tmp12_ - 1;
				_tmp13_ = pango_font_description_new ();
				fd = _tmp13_;
				_tmp14_ = fd;
				_tmp15_ = font_size;
				pango_font_description_set_absolute_size (_tmp14_, (gdouble) (_tmp15_ * PANGO_SCALE));
				_tmp16_ = self->priv->layout;
				_tmp17_ = fd;
				pango_layout_set_font_description (_tmp16_, _tmp17_);
				_tmp18_ = self->priv->layout;
				pango_layout_get_extents (_tmp18_, NULL, &_tmp19_);
				rect = _tmp19_;
				__vala_PangoFontDescription_free0 (fd);
			}
		}
	}
	gtk_widget_queue_draw ((GtkWidget*) self);
}


gboolean contacts_contact_frame_draw_image (ContactsContactFrame* self, cairo_t* cr) {
	gboolean result = FALSE;
	cairo_t* _tmp0_ = NULL;
	GdkPixbuf* _tmp1_ = NULL;
	PangoLayout* _tmp5_ = NULL;
	cairo_t* _tmp35_ = NULL;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (cr != NULL, FALSE);
	_tmp0_ = cr;
	cairo_save (_tmp0_);
	_tmp1_ = self->priv->pixbuf;
	if (_tmp1_ != NULL) {
		cairo_t* _tmp2_ = NULL;
		GdkPixbuf* _tmp3_ = NULL;
		cairo_t* _tmp4_ = NULL;
		_tmp2_ = cr;
		_tmp3_ = self->priv->pixbuf;
		gdk_cairo_set_source_pixbuf (_tmp2_, _tmp3_, (gdouble) 0, (gdouble) 0);
		_tmp4_ = cr;
		cairo_paint (_tmp4_);
	}
	_tmp5_ = self->priv->layout;
	if (_tmp5_ != NULL) {
		cairo_t* _tmp6_ = NULL;
		gint _tmp7_ = 0;
		gint _tmp8_ = 0;
		cairo_t* _tmp9_ = NULL;
		cairo_t* _tmp10_ = NULL;
		cairo_t* _tmp11_ = NULL;
		gint _tmp12_ = 0;
		gint _tmp13_ = 0;
		gint _tmp14_ = 0;
		gint _tmp15_ = 0;
		cairo_t* _tmp16_ = NULL;
		cairo_t* _tmp17_ = NULL;
		PangoRectangle rect = {0};
		PangoLayout* _tmp18_ = NULL;
		PangoRectangle _tmp19_ = {0};
		gdouble label_width = 0.0;
		PangoRectangle _tmp20_ = {0};
		gint _tmp21_ = 0;
		gdouble label_height = 0.0;
		PangoRectangle _tmp22_ = {0};
		gint _tmp23_ = 0;
		cairo_t* _tmp24_ = NULL;
		gint _tmp25_ = 0;
		gdouble _tmp26_ = 0.0;
		gdouble _tmp27_ = 0.0;
		gint _tmp28_ = 0;
		gint _tmp29_ = 0;
		gint _tmp30_ = 0;
		gdouble _tmp31_ = 0.0;
		gdouble _tmp32_ = 0.0;
		cairo_t* _tmp33_ = NULL;
		PangoLayout* _tmp34_ = NULL;
		_tmp6_ = cr;
		_tmp7_ = self->priv->size;
		_tmp8_ = self->priv->size;
		contacts_utils_cairo_rounded_box (_tmp6_, 0, 0, _tmp7_, _tmp8_, 4);
		_tmp9_ = cr;
		cairo_clip (_tmp9_);
		_tmp10_ = cr;
		cairo_set_source_rgba (_tmp10_, (gdouble) 0, (gdouble) 0, (gdouble) 0, 0.5);
		_tmp11_ = cr;
		_tmp12_ = self->priv->size;
		_tmp13_ = self->priv->text_height;
		_tmp14_ = self->priv->size;
		_tmp15_ = self->priv->text_height;
		cairo_rectangle (_tmp11_, (gdouble) 0, (gdouble) (_tmp12_ - _tmp13_), (gdouble) _tmp14_, (gdouble) _tmp15_);
		_tmp16_ = cr;
		cairo_fill (_tmp16_);
		_tmp17_ = cr;
		cairo_set_source_rgb (_tmp17_, 1.0, 1.0, 1.0);
		_tmp18_ = self->priv->layout;
		pango_layout_get_extents (_tmp18_, NULL, &_tmp19_);
		rect = _tmp19_;
		_tmp20_ = rect;
		_tmp21_ = _tmp20_.width;
		label_width = _tmp21_ / ((gdouble) PANGO_SCALE);
		_tmp22_ = rect;
		_tmp23_ = _tmp22_.height;
		label_height = _tmp23_ / ((gdouble) PANGO_SCALE);
		_tmp24_ = cr;
		_tmp25_ = self->priv->size;
		_tmp26_ = label_width;
		_tmp27_ = round ((_tmp25_ - _tmp26_) / 2.0);
		_tmp28_ = self->priv->size;
		_tmp29_ = self->priv->text_height;
		_tmp30_ = self->priv->text_height;
		_tmp31_ = label_height;
		_tmp32_ = floor ((_tmp30_ - _tmp31_) / 2.0);
		cairo_move_to (_tmp24_, _tmp27_, (_tmp28_ - _tmp29_) + _tmp32_);
		_tmp33_ = cr;
		_tmp34_ = self->priv->layout;
		pango_cairo_show_layout (_tmp33_, _tmp34_);
	}
	_tmp35_ = cr;
	cairo_restore (_tmp35_);
	result = TRUE;
	return result;
}


static void contacts_contact_frame_class_init (ContactsContactFrameClass * klass) {
	contacts_contact_frame_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (ContactsContactFramePrivate));
	G_OBJECT_CLASS (klass)->finalize = contacts_contact_frame_finalize;
	g_signal_new ("clicked", CONTACTS_TYPE_CONTACT_FRAME, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}


static void contacts_contact_frame_instance_init (ContactsContactFrame * self) {
	self->priv = CONTACTS_CONTACT_FRAME_GET_PRIVATE (self);
}


static void contacts_contact_frame_finalize (GObject* obj) {
	ContactsContactFrame * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONTACTS_TYPE_CONTACT_FRAME, ContactsContactFrame);
	_g_free0 (self->priv->text);
	_g_object_unref0 (self->priv->pixbuf);
	_g_object_unref0 (self->priv->layout);
	G_OBJECT_CLASS (contacts_contact_frame_parent_class)->finalize (obj);
}


GType contacts_contact_frame_get_type (void) {
	static volatile gsize contacts_contact_frame_type_id__volatile = 0;
	if (g_once_init_enter (&contacts_contact_frame_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ContactsContactFrameClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) contacts_contact_frame_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContactsContactFrame), 0, (GInstanceInitFunc) contacts_contact_frame_instance_init, NULL };
		GType contacts_contact_frame_type_id;
		contacts_contact_frame_type_id = g_type_register_static (gtk_frame_get_type (), "ContactsContactFrame", &g_define_type_info, 0);
		g_once_init_leave (&contacts_contact_frame_type_id__volatile, contacts_contact_frame_type_id);
	}
	return contacts_contact_frame_type_id__volatile;
}



