/* gitg-progress-bin.c generated by valac 0.27.1.26-9b1a5-dirty, the Vala compiler
 * generated from gitg-progress-bin.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2013 - Ignacio Casal Quinteiro
 *
 * 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 <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <cairo.h>


#define GITG_TYPE_PROGRESS_BIN (gitg_progress_bin_get_type ())
#define GITG_PROGRESS_BIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_PROGRESS_BIN, GitgProgressBin))
#define GITG_PROGRESS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_PROGRESS_BIN, GitgProgressBinClass))
#define GITG_IS_PROGRESS_BIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_PROGRESS_BIN))
#define GITG_IS_PROGRESS_BIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_PROGRESS_BIN))
#define GITG_PROGRESS_BIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_PROGRESS_BIN, GitgProgressBinClass))

typedef struct _GitgProgressBin GitgProgressBin;
typedef struct _GitgProgressBinClass GitgProgressBinClass;
typedef struct _GitgProgressBinPrivate GitgProgressBinPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _GitgProgressBin {
	GtkBin parent_instance;
	GitgProgressBinPrivate * priv;
};

struct _GitgProgressBinClass {
	GtkBinClass parent_class;
};

struct _GitgProgressBinPrivate {
	gdouble d_fraction;
};


static gpointer gitg_progress_bin_parent_class = NULL;

GType gitg_progress_bin_get_type (void) G_GNUC_CONST;
#define GITG_PROGRESS_BIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_PROGRESS_BIN, GitgProgressBinPrivate))
enum  {
	GITG_PROGRESS_BIN_DUMMY_PROPERTY,
	GITG_PROGRESS_BIN_FRACTION
};
static void gitg_progress_bin_real_realize (GtkWidget* base);
static void gitg_progress_bin_real_size_allocate (GtkWidget* base, GtkAllocation* allocation);
static gboolean gitg_progress_bin_real_draw (GtkWidget* base, cairo_t* cr);
GitgProgressBin* gitg_progress_bin_new (void);
GitgProgressBin* gitg_progress_bin_construct (GType object_type);
gdouble gitg_progress_bin_get_fraction (GitgProgressBin* self);
void gitg_progress_bin_set_fraction (GitgProgressBin* self, gdouble value);
static GObject * gitg_progress_bin_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void gitg_progress_bin_finalize (GObject* obj);
static void _vala_gitg_progress_bin_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_gitg_progress_bin_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static gpointer _g_object_ref0 (gpointer self) {
#line 65 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	return self ? g_object_ref (self) : NULL;
#line 83 "gitg-progress-bin.c"
}


static void gitg_progress_bin_real_realize (GtkWidget* base) {
	GitgProgressBin * 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;
	GdkWindowAttributesType attributes_mask = 0;
	GdkWindow* window = NULL;
	GdkWindow* _tmp11_ = NULL;
	GdkWindowAttr _tmp12_ = {0};
	GdkWindow* _tmp13_ = NULL;
	GtkStyleContext* context = NULL;
	GtkStyleContext* _tmp14_ = NULL;
	GtkStyleContext* _tmp15_ = NULL;
	GdkWindow* _tmp16_ = NULL;
#line 42 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self = (GitgProgressBin*) base;
#line 44 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_set_realized ((GtkWidget*) self, TRUE);
#line 47 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
#line 47 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	allocation = _tmp0_;
#line 49 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes = _tmp1_;
#line 50 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp2_ = allocation;
#line 50 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp3_ = _tmp2_.x;
#line 50 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes.x = _tmp3_;
#line 51 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp4_ = allocation;
#line 51 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp5_ = _tmp4_.y;
#line 51 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes.y = _tmp5_;
#line 52 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp6_ = allocation;
#line 52 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp7_ = _tmp6_.width;
#line 52 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes.width = _tmp7_;
#line 53 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp8_ = allocation;
#line 53 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp9_ = _tmp8_.height;
#line 53 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes.height = _tmp9_;
#line 54 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes.window_type = GDK_WINDOW_CHILD;
#line 55 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes.wclass = GDK_INPUT_OUTPUT;
#line 56 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp10_ = gtk_widget_get_events ((GtkWidget*) self);
#line 56 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes.event_mask = ((_tmp10_ | GDK_EXPOSURE_MASK) | GDK_BUTTON_PRESS_MASK) | GDK_BUTTON_RELEASE_MASK;
#line 61 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	attributes_mask = GDK_WA_X | GDK_WA_Y;
#line 62 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp11_ = gtk_widget_get_parent_window ((GtkWidget*) self);
#line 62 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp12_ = attributes;
#line 62 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp13_ = gdk_window_new (_tmp11_, &_tmp12_, attributes_mask);
#line 62 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	window = _tmp13_;
#line 65 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp14_ = gtk_widget_get_style_context ((GtkWidget*) self);
#line 65 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp15_ = _g_object_ref0 (_tmp14_);
#line 65 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	context = _tmp15_;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_style_context_set_background (context, window);
#line 68 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp16_ = _g_object_ref0 (window);
#line 68 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_set_window ((GtkWidget*) self, _tmp16_);
#line 69 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gdk_window_set_user_data (window, (GObject*) self);
#line 42 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_g_object_unref0 (context);
#line 42 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_g_object_unref0 (window);
#line 181 "gitg-progress-bin.c"
}


static void gitg_progress_bin_real_size_allocate (GtkWidget* base, GtkAllocation* allocation) {
	GitgProgressBin * self;
	GtkAllocation _tmp0_ = {0};
	GdkWindow* window = NULL;
	GdkWindow* _tmp1_ = NULL;
	GdkWindow* _tmp2_ = NULL;
	GdkWindow* _tmp3_ = NULL;
	GtkWidget* child = NULL;
	GtkWidget* _tmp13_ = NULL;
	GtkWidget* _tmp14_ = NULL;
	gboolean _tmp15_ = FALSE;
	GtkWidget* _tmp16_ = NULL;
#line 72 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self = (GitgProgressBin*) base;
#line 72 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	g_return_if_fail (allocation != NULL);
#line 74 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp0_ = *allocation;
#line 74 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_set_allocation ((GtkWidget*) self, &_tmp0_);
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp1_ = gtk_widget_get_window ((GtkWidget*) self);
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	window = _tmp2_;
#line 77 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp3_ = window;
#line 77 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	if (_tmp3_ != NULL) {
#line 215 "gitg-progress-bin.c"
		GdkWindow* _tmp4_ = NULL;
		GtkAllocation _tmp5_ = {0};
		gint _tmp6_ = 0;
		GtkAllocation _tmp7_ = {0};
		gint _tmp8_ = 0;
		GtkAllocation _tmp9_ = {0};
		gint _tmp10_ = 0;
		GtkAllocation _tmp11_ = {0};
		gint _tmp12_ = 0;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp4_ = window;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp5_ = *allocation;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp6_ = _tmp5_.x;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp7_ = *allocation;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp8_ = _tmp7_.y;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp9_ = *allocation;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp10_ = _tmp9_.width;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp11_ = *allocation;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp12_ = _tmp11_.height;
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		gdk_window_move_resize (_tmp4_, _tmp6_, _tmp8_, _tmp10_, _tmp12_);
#line 245 "gitg-progress-bin.c"
	}
#line 82 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp13_ = gtk_bin_get_child ((GtkBin*) self);
#line 82 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp14_ = _g_object_ref0 (_tmp13_);
#line 82 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	child = _tmp14_;
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp16_ = child;
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	if (_tmp16_ != NULL) {
#line 257 "gitg-progress-bin.c"
		GtkWidget* _tmp17_ = NULL;
		gboolean _tmp18_ = FALSE;
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp17_ = child;
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp18_ = gtk_widget_get_visible (_tmp17_);
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp15_ = _tmp18_;
#line 266 "gitg-progress-bin.c"
	} else {
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp15_ = FALSE;
#line 270 "gitg-progress-bin.c"
	}
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	if (_tmp15_) {
#line 274 "gitg-progress-bin.c"
		GtkAllocation child_allocation = {0};
		GtkAllocation _tmp19_ = {0};
		gint border_width = 0;
		guint _tmp20_ = 0U;
		gint _tmp21_ = 0;
		gint _tmp22_ = 0;
		GtkAllocation _tmp23_ = {0};
		gint _tmp24_ = 0;
		gint _tmp25_ = 0;
		GtkAllocation _tmp26_ = {0};
		gint _tmp27_ = 0;
		gint _tmp28_ = 0;
		GtkWidget* _tmp29_ = NULL;
		GtkAllocation _tmp30_ = {0};
#line 85 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		child_allocation = _tmp19_;
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp20_ = gtk_container_get_border_width ((GtkContainer*) self);
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		border_width = (gint) _tmp20_;
#line 87 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp21_ = border_width;
#line 87 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		child_allocation.x = _tmp21_;
#line 88 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp22_ = border_width;
#line 88 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		child_allocation.y = _tmp22_;
#line 89 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp23_ = *allocation;
#line 89 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp24_ = _tmp23_.width;
#line 89 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp25_ = border_width;
#line 89 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		child_allocation.width = _tmp24_ - (2 * _tmp25_);
#line 90 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp26_ = *allocation;
#line 90 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp27_ = _tmp26_.height;
#line 90 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp28_ = border_width;
#line 90 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		child_allocation.height = _tmp27_ - (2 * _tmp28_);
#line 92 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp29_ = child;
#line 92 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		_tmp30_ = child_allocation;
#line 92 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		gtk_widget_size_allocate (_tmp29_, &_tmp30_);
#line 325 "gitg-progress-bin.c"
	}
#line 72 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_g_object_unref0 (child);
#line 72 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_g_object_unref0 (window);
#line 331 "gitg-progress-bin.c"
}


static gboolean gitg_progress_bin_real_draw (GtkWidget* base, cairo_t* cr) {
	GitgProgressBin * self;
	gboolean result = FALSE;
	GtkAllocation allocation = {0};
	GtkAllocation _tmp0_ = {0};
	GtkStyleContext* context = NULL;
	GtkStyleContext* _tmp1_ = NULL;
	GtkStyleContext* _tmp2_ = NULL;
	cairo_t* _tmp3_ = NULL;
	GtkAllocation _tmp4_ = {0};
	gint _tmp5_ = 0;
	GtkAllocation _tmp6_ = {0};
	gint _tmp7_ = 0;
	cairo_t* _tmp8_ = NULL;
	GtkAllocation _tmp9_ = {0};
	gint _tmp10_ = 0;
	gdouble _tmp11_ = 0.0;
	GtkAllocation _tmp12_ = {0};
	gint _tmp13_ = 0;
	cairo_t* _tmp14_ = NULL;
#line 96 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self = (GitgProgressBin*) base;
#line 96 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	g_return_val_if_fail (cr != NULL, FALSE);
#line 99 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
#line 99 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	allocation = _tmp0_;
#line 101 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp1_ = gtk_widget_get_style_context ((GtkWidget*) self);
#line 101 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 101 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	context = _tmp2_;
#line 102 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp3_ = cr;
#line 102 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp4_ = allocation;
#line 102 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp5_ = _tmp4_.width;
#line 102 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp6_ = allocation;
#line 102 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp7_ = _tmp6_.height;
#line 102 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_render_background (context, _tmp3_, (gdouble) 0, (gdouble) 0, (gdouble) _tmp5_, (gdouble) _tmp7_);
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_style_context_save (context);
#line 105 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_style_context_add_class (context, "progress-bin");
#line 107 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp8_ = cr;
#line 107 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp9_ = allocation;
#line 107 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp10_ = _tmp9_.width;
#line 107 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp11_ = self->priv->d_fraction;
#line 107 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp12_ = allocation;
#line 107 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp13_ = _tmp12_.height;
#line 107 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_render_background (context, _tmp8_, (gdouble) 0, (gdouble) 0, _tmp10_ * _tmp11_, (gdouble) _tmp13_);
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_style_context_restore (context);
#line 110 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp14_ = cr;
#line 110 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	GTK_WIDGET_CLASS (gitg_progress_bin_parent_class)->draw ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_bin_get_type (), GtkBin), _tmp14_);
#line 111 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	result = TRUE;
#line 111 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_g_object_unref0 (context);
#line 111 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	return result;
#line 411 "gitg-progress-bin.c"
}


GitgProgressBin* gitg_progress_bin_construct (GType object_type) {
	GitgProgressBin * self = NULL;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self = (GitgProgressBin*) g_object_new (object_type, NULL);
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	return self;
#line 421 "gitg-progress-bin.c"
}


GitgProgressBin* gitg_progress_bin_new (void) {
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	return gitg_progress_bin_construct (GITG_TYPE_PROGRESS_BIN);
#line 428 "gitg-progress-bin.c"
}


gdouble gitg_progress_bin_get_fraction (GitgProgressBin* self) {
	gdouble result;
	gdouble _tmp0_ = 0.0;
#line 28 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	g_return_val_if_fail (self != NULL, 0.0);
#line 28 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp0_ = self->priv->d_fraction;
#line 28 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	result = _tmp0_;
#line 28 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	return result;
#line 443 "gitg-progress-bin.c"
}


void gitg_progress_bin_set_fraction (GitgProgressBin* self, gdouble value) {
	gdouble _tmp0_ = 0.0;
#line 29 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	g_return_if_fail (self != NULL);
#line 31 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	_tmp0_ = value;
#line 31 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self->priv->d_fraction = _tmp0_;
#line 32 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_queue_draw ((GtkWidget*) self);
#line 29 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	g_object_notify ((GObject *) self, "fraction");
#line 459 "gitg-progress-bin.c"
}


static GObject * gitg_progress_bin_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GitgProgressBin * self;
#line 36 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	parent_class = G_OBJECT_CLASS (gitg_progress_bin_parent_class);
#line 36 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 36 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_PROGRESS_BIN, GitgProgressBin);
#line 38 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_set_has_window ((GtkWidget*) self, TRUE);
#line 39 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gtk_widget_set_redraw_on_allocate ((GtkWidget*) self, FALSE);
#line 36 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	return obj;
#line 479 "gitg-progress-bin.c"
}


static void gitg_progress_bin_class_init (GitgProgressBinClass * klass) {
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	gitg_progress_bin_parent_class = g_type_class_peek_parent (klass);
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	g_type_class_add_private (klass, sizeof (GitgProgressBinPrivate));
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	((GtkWidgetClass *) klass)->realize = gitg_progress_bin_real_realize;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	((GtkWidgetClass *) klass)->size_allocate = gitg_progress_bin_real_size_allocate;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	((GtkWidgetClass *) klass)->draw = gitg_progress_bin_real_draw;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_progress_bin_get_property;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_progress_bin_set_property;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	G_OBJECT_CLASS (klass)->constructor = gitg_progress_bin_constructor;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_progress_bin_finalize;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_PROGRESS_BIN_FRACTION, g_param_spec_double ("fraction", "fraction", "fraction", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 504 "gitg-progress-bin.c"
}


static void gitg_progress_bin_instance_init (GitgProgressBin * self) {
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self->priv = GITG_PROGRESS_BIN_GET_PRIVATE (self);
#line 511 "gitg-progress-bin.c"
}


static void gitg_progress_bin_finalize (GObject* obj) {
	GitgProgressBin * self;
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_PROGRESS_BIN, GitgProgressBin);
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	G_OBJECT_CLASS (gitg_progress_bin_parent_class)->finalize (obj);
#line 521 "gitg-progress-bin.c"
}


GType gitg_progress_bin_get_type (void) {
	static volatile gsize gitg_progress_bin_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_progress_bin_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgProgressBinClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_progress_bin_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgProgressBin), 0, (GInstanceInitFunc) gitg_progress_bin_instance_init, NULL };
		GType gitg_progress_bin_type_id;
		gitg_progress_bin_type_id = g_type_register_static (gtk_bin_get_type (), "GitgProgressBin", &g_define_type_info, 0);
		g_once_init_leave (&gitg_progress_bin_type_id__volatile, gitg_progress_bin_type_id);
	}
	return gitg_progress_bin_type_id__volatile;
}


static void _vala_gitg_progress_bin_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GitgProgressBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_PROGRESS_BIN, GitgProgressBin);
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	switch (property_id) {
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		case GITG_PROGRESS_BIN_FRACTION:
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		g_value_set_double (value, gitg_progress_bin_get_fraction (self));
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		break;
#line 548 "gitg-progress-bin.c"
		default:
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		break;
#line 554 "gitg-progress-bin.c"
	}
}


static void _vala_gitg_progress_bin_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GitgProgressBin * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_PROGRESS_BIN, GitgProgressBin);
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
	switch (property_id) {
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		case GITG_PROGRESS_BIN_FRACTION:
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		gitg_progress_bin_set_fraction (self, g_value_get_double (value));
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		break;
#line 570 "gitg-progress-bin.c"
		default:
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 22 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-progress-bin.vala"
		break;
#line 576 "gitg-progress-bin.c"
	}
}



