/* gitg-when-mapped.c generated by valac 0.34.7, the Vala compiler
 * generated from gitg-when-mapped.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2012 - Jesse van den Kieboom
 *
 * gitg 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.
 *
 * gitg 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 gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gobject/gvaluecollector.h>


#define GITG_TYPE_WHEN_MAPPED (gitg_when_mapped_get_type ())
#define GITG_WHEN_MAPPED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_WHEN_MAPPED, GitgWhenMapped))
#define GITG_WHEN_MAPPED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_WHEN_MAPPED, GitgWhenMappedClass))
#define GITG_IS_WHEN_MAPPED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_WHEN_MAPPED))
#define GITG_IS_WHEN_MAPPED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_WHEN_MAPPED))
#define GITG_WHEN_MAPPED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_WHEN_MAPPED, GitgWhenMappedClass))

typedef struct _GitgWhenMapped GitgWhenMapped;
typedef struct _GitgWhenMappedClass GitgWhenMappedClass;
typedef struct _GitgWhenMappedPrivate GitgWhenMappedPrivate;
typedef struct _Block38Data Block38Data;
#define _gitg_when_mapped_unref0(var) ((var == NULL) ? NULL : (var = (gitg_when_mapped_unref (var), NULL)))
typedef struct _GitgParamSpecWhenMapped GitgParamSpecWhenMapped;

struct _GitgWhenMapped {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GitgWhenMappedPrivate * priv;
};

struct _GitgWhenMappedClass {
	GTypeClass parent_class;
	void (*finalize) (GitgWhenMapped *self);
};

struct _GitgWhenMappedPrivate {
	GtkWidget* d_widget;
	GObject* d_lifetime;
	gulong d_sid;
};

typedef void (*GitgWhenMappedOnMapped) (void* user_data);
struct _Block38Data {
	int _ref_count_;
	GitgWhenMapped* self;
	GitgWhenMappedOnMapped mapped;
	gpointer mapped_target;
	GDestroyNotify mapped_target_destroy_notify;
};

struct _GitgParamSpecWhenMapped {
	GParamSpec parent_instance;
};


static gpointer gitg_when_mapped_parent_class = NULL;

gpointer gitg_when_mapped_ref (gpointer instance);
void gitg_when_mapped_unref (gpointer instance);
GParamSpec* gitg_param_spec_when_mapped (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gitg_value_set_when_mapped (GValue* value, gpointer v_object);
void gitg_value_take_when_mapped (GValue* value, gpointer v_object);
gpointer gitg_value_get_when_mapped (const GValue* value);
GType gitg_when_mapped_get_type (void) G_GNUC_CONST;
#define GITG_WHEN_MAPPED_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_WHEN_MAPPED, GitgWhenMappedPrivate))
enum  {
	GITG_WHEN_MAPPED_DUMMY_PROPERTY
};
static void gitg_when_mapped_weak_notify (GitgWhenMapped* self, GObject* o);
static void _gitg_when_mapped_weak_notify_gweak_notify (gpointer self, GObject* object);
static void gitg_when_mapped_lifetime_weak_notify (GitgWhenMapped* self, GObject* o);
static void _gitg_when_mapped_lifetime_weak_notify_gweak_notify (gpointer self, GObject* object);
GitgWhenMapped* gitg_when_mapped_new (GtkWidget* widget);
GitgWhenMapped* gitg_when_mapped_construct (GType object_type, GtkWidget* widget);
void gitg_when_mapped_update (GitgWhenMapped* self, GitgWhenMappedOnMapped mapped, void* mapped_target, GDestroyNotify mapped_target_destroy_notify, GObject* lifetime);
static Block38Data* block38_data_ref (Block38Data* _data38_);
static void block38_data_unref (void * _userdata_);
static void ___lambda79_ (Block38Data* _data38_);
static void ____lambda79__gtk_widget_map (GtkWidget* _sender, gpointer self);
static void gitg_when_mapped_finalize (GitgWhenMapped* obj);


static void _gitg_when_mapped_weak_notify_gweak_notify (gpointer self, GObject* object) {
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	gitg_when_mapped_weak_notify ((GitgWhenMapped*) self, object);
#line 105 "gitg-when-mapped.c"
}


static void _gitg_when_mapped_lifetime_weak_notify_gweak_notify (gpointer self, GObject* object) {
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	gitg_when_mapped_lifetime_weak_notify ((GitgWhenMapped*) self, object);
#line 112 "gitg-when-mapped.c"
}


GitgWhenMapped* gitg_when_mapped_construct (GType object_type, GtkWidget* widget) {
	GitgWhenMapped* self = NULL;
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
#line 30 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_val_if_fail (widget != NULL, NULL);
#line 30 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self = (GitgWhenMapped*) g_type_create_instance (object_type);
#line 32 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->priv->d_sid = (gulong) 0;
#line 33 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp0_ = widget;
#line 33 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->priv->d_widget = _tmp0_;
#line 35 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp1_ = self->priv->d_widget;
#line 35 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_object_weak_ref ((GObject*) _tmp1_, _gitg_when_mapped_weak_notify_gweak_notify, self);
#line 30 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return self;
#line 136 "gitg-when-mapped.c"
}


GitgWhenMapped* gitg_when_mapped_new (GtkWidget* widget) {
#line 30 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return gitg_when_mapped_construct (GITG_TYPE_WHEN_MAPPED, widget);
#line 143 "gitg-when-mapped.c"
}


static void gitg_when_mapped_weak_notify (GitgWhenMapped* self, GObject* o) {
	GObject* _tmp0_ = NULL;
#line 38 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_if_fail (self != NULL);
#line 38 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_if_fail (o != NULL);
#line 40 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->priv->d_widget = NULL;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->priv->d_sid = (gulong) 0;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp0_ = self->priv->d_lifetime;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp0_ != NULL) {
#line 161 "gitg-when-mapped.c"
		GObject* _tmp1_ = NULL;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp1_ = self->priv->d_lifetime;
#line 45 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_object_weak_unref (_tmp1_, _gitg_when_mapped_lifetime_weak_notify_gweak_notify, self);
#line 46 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_lifetime = NULL;
#line 169 "gitg-when-mapped.c"
	}
}


static void gitg_when_mapped_lifetime_weak_notify (GitgWhenMapped* self, GObject* o) {
	gboolean _tmp0_ = FALSE;
	gulong _tmp1_ = 0UL;
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_if_fail (self != NULL);
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_if_fail (o != NULL);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp1_ = self->priv->d_sid;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp1_ != ((gulong) 0)) {
#line 185 "gitg-when-mapped.c"
		GtkWidget* _tmp2_ = NULL;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp2_ = self->priv->d_widget;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp0_ = _tmp2_ != NULL;
#line 191 "gitg-when-mapped.c"
	} else {
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp0_ = FALSE;
#line 195 "gitg-when-mapped.c"
	}
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp0_) {
#line 199 "gitg-when-mapped.c"
		GtkWidget* _tmp3_ = NULL;
		gulong _tmp4_ = 0UL;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp3_ = self->priv->d_widget;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp4_ = self->priv->d_sid;
#line 74 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_signal_handler_disconnect ((GObject*) _tmp3_, _tmp4_);
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_sid = (gulong) 0;
#line 210 "gitg-when-mapped.c"
	}
#line 78 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->priv->d_lifetime = NULL;
#line 214 "gitg-when-mapped.c"
}


static Block38Data* block38_data_ref (Block38Data* _data38_) {
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_atomic_int_inc (&_data38_->_ref_count_);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return _data38_;
#line 223 "gitg-when-mapped.c"
}


static void block38_data_unref (void * _userdata_) {
	Block38Data* _data38_;
	_data38_ = (Block38Data*) _userdata_;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (g_atomic_int_dec_and_test (&_data38_->_ref_count_)) {
#line 232 "gitg-when-mapped.c"
		GitgWhenMapped* self;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self = _data38_->self;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		(_data38_->mapped_target_destroy_notify == NULL) ? NULL : (_data38_->mapped_target_destroy_notify (_data38_->mapped_target), NULL);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_data38_->mapped = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_data38_->mapped_target = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_data38_->mapped_target_destroy_notify = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_gitg_when_mapped_unref0 (self);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_slice_free (Block38Data, _data38_);
#line 248 "gitg-when-mapped.c"
	}
}


static void ___lambda79_ (Block38Data* _data38_) {
	GitgWhenMapped* self;
	GtkWidget* _tmp0_ = NULL;
	gulong _tmp1_ = 0UL;
	GObject* _tmp2_ = NULL;
	GitgWhenMappedOnMapped _tmp4_ = NULL;
	void* _tmp4__target = NULL;
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self = _data38_->self;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp0_ = self->priv->d_widget;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp1_ = self->priv->d_sid;
#line 107 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_signal_handler_disconnect ((GObject*) _tmp0_, _tmp1_);
#line 108 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->priv->d_sid = (gulong) 0;
#line 110 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp2_ = self->priv->d_lifetime;
#line 110 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp2_ != NULL) {
#line 274 "gitg-when-mapped.c"
		GObject* _tmp3_ = NULL;
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp3_ = self->priv->d_lifetime;
#line 112 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_object_weak_unref (_tmp3_, _gitg_when_mapped_lifetime_weak_notify_gweak_notify, self);
#line 113 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_lifetime = NULL;
#line 282 "gitg-when-mapped.c"
	}
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp4_ = _data38_->mapped;
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp4__target = _data38_->mapped_target;
#line 116 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp4_ (_tmp4__target);
#line 290 "gitg-when-mapped.c"
}


static void ____lambda79__gtk_widget_map (GtkWidget* _sender, gpointer self) {
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	___lambda79_ (self);
#line 297 "gitg-when-mapped.c"
}


void gitg_when_mapped_update (GitgWhenMapped* self, GitgWhenMappedOnMapped mapped, void* mapped_target, GDestroyNotify mapped_target_destroy_notify, GObject* lifetime) {
	Block38Data* _data38_;
	GitgWhenMappedOnMapped _tmp0_ = NULL;
	void* _tmp0__target = NULL;
	GtkWidget* _tmp1_ = NULL;
	gulong _tmp2_ = 0UL;
	GObject* _tmp5_ = NULL;
	GtkWidget* _tmp7_ = NULL;
	gboolean _tmp8_ = FALSE;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_if_fail (self != NULL);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_ = g_slice_new0 (Block38Data);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->_ref_count_ = 1;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->self = gitg_when_mapped_ref (self);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp0_ = mapped;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp0__target = mapped_target;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	(_data38_->mapped_target_destroy_notify == NULL) ? NULL : (_data38_->mapped_target_destroy_notify (_data38_->mapped_target), NULL);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->mapped = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->mapped_target = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->mapped_target_destroy_notify = NULL;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->mapped = _tmp0_;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->mapped_target = _tmp0__target;
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_->mapped_target_destroy_notify = mapped_target_destroy_notify;
#line 83 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp1_ = self->priv->d_widget;
#line 83 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp1_ == NULL) {
#line 85 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		block38_data_unref (_data38_);
#line 85 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_data38_ = NULL;
#line 85 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		return;
#line 346 "gitg-when-mapped.c"
	}
#line 88 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp2_ = self->priv->d_sid;
#line 88 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp2_ != ((gulong) 0)) {
#line 352 "gitg-when-mapped.c"
		GtkWidget* _tmp3_ = NULL;
		gulong _tmp4_ = 0UL;
#line 90 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp3_ = self->priv->d_widget;
#line 90 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp4_ = self->priv->d_sid;
#line 90 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_signal_handler_disconnect ((GObject*) _tmp3_, _tmp4_);
#line 91 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_sid = (gulong) 0;
#line 363 "gitg-when-mapped.c"
	}
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp5_ = self->priv->d_lifetime;
#line 94 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp5_ != NULL) {
#line 369 "gitg-when-mapped.c"
		GObject* _tmp6_ = NULL;
#line 96 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp6_ = self->priv->d_lifetime;
#line 96 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_object_weak_unref (_tmp6_, _gitg_when_mapped_lifetime_weak_notify_gweak_notify, self);
#line 97 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_lifetime = NULL;
#line 377 "gitg-when-mapped.c"
	}
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp7_ = self->priv->d_widget;
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp8_ = gtk_widget_get_mapped (_tmp7_);
#line 100 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp8_) {
#line 385 "gitg-when-mapped.c"
		GitgWhenMappedOnMapped _tmp9_ = NULL;
		void* _tmp9__target = NULL;
#line 102 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp9_ = _data38_->mapped;
#line 102 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp9__target = _data38_->mapped_target;
#line 102 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp9_ (_tmp9__target);
#line 394 "gitg-when-mapped.c"
	} else {
		GtkWidget* _tmp10_ = NULL;
		gulong _tmp11_ = 0UL;
		GObject* _tmp12_ = NULL;
		GObject* _tmp13_ = NULL;
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp10_ = self->priv->d_widget;
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp11_ = g_signal_connect_data (_tmp10_, "map", (GCallback) ____lambda79__gtk_widget_map, block38_data_ref (_data38_), (GClosureNotify) block38_data_unref, 0);
#line 106 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_sid = _tmp11_;
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp12_ = lifetime;
#line 119 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_lifetime = _tmp12_;
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp13_ = self->priv->d_lifetime;
#line 121 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		if (_tmp13_ != NULL) {
#line 414 "gitg-when-mapped.c"
			GObject* _tmp14_ = NULL;
#line 123 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp14_ = self->priv->d_lifetime;
#line 123 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			g_object_weak_ref (_tmp14_, _gitg_when_mapped_lifetime_weak_notify_gweak_notify, self);
#line 420 "gitg-when-mapped.c"
		}
	}
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	block38_data_unref (_data38_);
#line 81 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_data38_ = NULL;
#line 427 "gitg-when-mapped.c"
}


static void gitg_value_when_mapped_init (GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	value->data[0].v_pointer = NULL;
#line 434 "gitg-when-mapped.c"
}


static void gitg_value_when_mapped_free_value (GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (value->data[0].v_pointer) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		gitg_when_mapped_unref (value->data[0].v_pointer);
#line 443 "gitg-when-mapped.c"
	}
}


static void gitg_value_when_mapped_copy_value (const GValue* src_value, GValue* dest_value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (src_value->data[0].v_pointer) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		dest_value->data[0].v_pointer = gitg_when_mapped_ref (src_value->data[0].v_pointer);
#line 453 "gitg-when-mapped.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		dest_value->data[0].v_pointer = NULL;
#line 457 "gitg-when-mapped.c"
	}
}


static gpointer gitg_value_when_mapped_peek_pointer (const GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return value->data[0].v_pointer;
#line 465 "gitg-when-mapped.c"
}


static gchar* gitg_value_when_mapped_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (collect_values[0].v_pointer) {
#line 472 "gitg-when-mapped.c"
		GitgWhenMapped* object;
		object = collect_values[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		if (object->parent_instance.g_class == NULL) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 479 "gitg-when-mapped.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 483 "gitg-when-mapped.c"
		}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		value->data[0].v_pointer = gitg_when_mapped_ref (object);
#line 487 "gitg-when-mapped.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		value->data[0].v_pointer = NULL;
#line 491 "gitg-when-mapped.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return NULL;
#line 495 "gitg-when-mapped.c"
}


static gchar* gitg_value_when_mapped_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	GitgWhenMapped** object_p;
	object_p = collect_values[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (!object_p) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 506 "gitg-when-mapped.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (!value->data[0].v_pointer) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		*object_p = NULL;
#line 512 "gitg-when-mapped.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		*object_p = value->data[0].v_pointer;
#line 516 "gitg-when-mapped.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		*object_p = gitg_when_mapped_ref (value->data[0].v_pointer);
#line 520 "gitg-when-mapped.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return NULL;
#line 524 "gitg-when-mapped.c"
}


GParamSpec* gitg_param_spec_when_mapped (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	GitgParamSpecWhenMapped* spec;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_val_if_fail (g_type_is_a (object_type, GITG_TYPE_WHEN_MAPPED), NULL);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return G_PARAM_SPEC (spec);
#line 538 "gitg-when-mapped.c"
}


gpointer gitg_value_get_when_mapped (const GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_WHEN_MAPPED), NULL);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return value->data[0].v_pointer;
#line 547 "gitg-when-mapped.c"
}


void gitg_value_set_when_mapped (GValue* value, gpointer v_object) {
	GitgWhenMapped* old;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_WHEN_MAPPED));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	old = value->data[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (v_object) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GITG_TYPE_WHEN_MAPPED));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		value->data[0].v_pointer = v_object;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		gitg_when_mapped_ref (value->data[0].v_pointer);
#line 567 "gitg-when-mapped.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		value->data[0].v_pointer = NULL;
#line 571 "gitg-when-mapped.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (old) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		gitg_when_mapped_unref (old);
#line 577 "gitg-when-mapped.c"
	}
}


void gitg_value_take_when_mapped (GValue* value, gpointer v_object) {
	GitgWhenMapped* old;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_WHEN_MAPPED));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	old = value->data[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (v_object) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GITG_TYPE_WHEN_MAPPED));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		value->data[0].v_pointer = v_object;
#line 596 "gitg-when-mapped.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		value->data[0].v_pointer = NULL;
#line 600 "gitg-when-mapped.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (old) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		gitg_when_mapped_unref (old);
#line 606 "gitg-when-mapped.c"
	}
}


static void gitg_when_mapped_class_init (GitgWhenMappedClass * klass) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	gitg_when_mapped_parent_class = g_type_class_peek_parent (klass);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	((GitgWhenMappedClass *) klass)->finalize = gitg_when_mapped_finalize;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_type_class_add_private (klass, sizeof (GitgWhenMappedPrivate));
#line 618 "gitg-when-mapped.c"
}


static void gitg_when_mapped_instance_init (GitgWhenMapped * self) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->priv = GITG_WHEN_MAPPED_GET_PRIVATE (self);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self->ref_count = 1;
#line 627 "gitg-when-mapped.c"
}


static void gitg_when_mapped_finalize (GitgWhenMapped* obj) {
	GitgWhenMapped * self;
	GtkWidget* _tmp0_ = NULL;
	GObject* _tmp9_ = NULL;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_WHEN_MAPPED, GitgWhenMapped);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_signal_handlers_destroy (self);
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp0_ = self->priv->d_widget;
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp0_ != NULL) {
#line 643 "gitg-when-mapped.c"
		gboolean _tmp1_ = FALSE;
		gulong _tmp2_ = 0UL;
		GtkWidget* _tmp8_ = NULL;
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp2_ = self->priv->d_sid;
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		if (_tmp2_ != ((gulong) 0)) {
#line 651 "gitg-when-mapped.c"
			GtkWidget* _tmp3_ = NULL;
			gulong _tmp4_ = 0UL;
			gboolean _tmp5_ = FALSE;
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp3_ = self->priv->d_widget;
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp4_ = self->priv->d_sid;
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp5_ = g_signal_handler_is_connected (_tmp3_, _tmp4_);
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp1_ = _tmp5_;
#line 663 "gitg-when-mapped.c"
		} else {
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp1_ = FALSE;
#line 667 "gitg-when-mapped.c"
		}
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		if (_tmp1_) {
#line 671 "gitg-when-mapped.c"
			GtkWidget* _tmp6_ = NULL;
			gulong _tmp7_ = 0UL;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp6_ = self->priv->d_widget;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			_tmp7_ = self->priv->d_sid;
#line 56 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
			g_signal_handler_disconnect ((GObject*) _tmp6_, _tmp7_);
#line 680 "gitg-when-mapped.c"
		}
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp8_ = self->priv->d_widget;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_object_weak_unref ((GObject*) _tmp8_, _gitg_when_mapped_weak_notify_gweak_notify, self);
#line 60 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_widget = NULL;
#line 688 "gitg-when-mapped.c"
	}
#line 63 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	_tmp9_ = self->priv->d_lifetime;
#line 63 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (_tmp9_ != NULL) {
#line 694 "gitg-when-mapped.c"
		GObject* _tmp10_ = NULL;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		_tmp10_ = self->priv->d_lifetime;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_object_weak_unref (_tmp10_, _gitg_when_mapped_lifetime_weak_notify_gweak_notify, self);
#line 66 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		self->priv->d_lifetime = NULL;
#line 702 "gitg-when-mapped.c"
	}
}


GType gitg_when_mapped_get_type (void) {
	static volatile gsize gitg_when_mapped_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_when_mapped_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { gitg_value_when_mapped_init, gitg_value_when_mapped_free_value, gitg_value_when_mapped_copy_value, gitg_value_when_mapped_peek_pointer, "p", gitg_value_when_mapped_collect_value, "p", gitg_value_when_mapped_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (GitgWhenMappedClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_when_mapped_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgWhenMapped), 0, (GInstanceInitFunc) gitg_when_mapped_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType gitg_when_mapped_type_id;
		gitg_when_mapped_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GitgWhenMapped", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&gitg_when_mapped_type_id__volatile, gitg_when_mapped_type_id);
	}
	return gitg_when_mapped_type_id__volatile;
}


gpointer gitg_when_mapped_ref (gpointer instance) {
	GitgWhenMapped* self;
	self = instance;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	g_atomic_int_inc (&self->ref_count);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	return instance;
#line 728 "gitg-when-mapped.c"
}


void gitg_when_mapped_unref (gpointer instance) {
	GitgWhenMapped* self;
	self = instance;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		GITG_WHEN_MAPPED_GET_CLASS (self)->finalize (self);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-when-mapped.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 741 "gitg-when-mapped.c"
	}
}



