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

/*
 * This file is part of gitg
 *
 * Copyright (C) 2014 - 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 <gdk/gdk.h>


#define GITG_TYPE_POPUP_MENU (gitg_popup_menu_get_type ())
#define GITG_POPUP_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_POPUP_MENU, GitgPopupMenu))
#define GITG_POPUP_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_POPUP_MENU, GitgPopupMenuClass))
#define GITG_IS_POPUP_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_POPUP_MENU))
#define GITG_IS_POPUP_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_POPUP_MENU))
#define GITG_POPUP_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_POPUP_MENU, GitgPopupMenuClass))

typedef struct _GitgPopupMenu GitgPopupMenu;
typedef struct _GitgPopupMenuClass GitgPopupMenuClass;
typedef struct _GitgPopupMenuPrivate GitgPopupMenuPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))

struct _GitgPopupMenu {
	GObject parent_instance;
	GitgPopupMenuPrivate * priv;
};

struct _GitgPopupMenuClass {
	GObjectClass parent_class;
};

struct _GitgPopupMenuPrivate {
	GtkWidget* d_widget;
};


static gpointer gitg_popup_menu_parent_class = NULL;

GType gitg_popup_menu_get_type (void) G_GNUC_CONST;
#define GITG_POPUP_MENU_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_POPUP_MENU, GitgPopupMenuPrivate))
enum  {
	GITG_POPUP_MENU_DUMMY_PROPERTY
};
GitgPopupMenu* gitg_popup_menu_new (GtkWidget* widget);
GitgPopupMenu* gitg_popup_menu_construct (GType object_type, GtkWidget* widget);
static gboolean gitg_popup_menu_on_button_press_event (GitgPopupMenu* self, GtkWidget* widget, GdkEventButton* event);
static gboolean _gitg_popup_menu_on_button_press_event_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self);
static gboolean gitg_popup_menu_on_popup_menu (GitgPopupMenu* self, GtkWidget* widget);
static gboolean _gitg_popup_menu_on_popup_menu_gtk_widget_popup_menu (GtkWidget* _sender, gpointer self);
static void gitg_popup_menu_real_dispose (GObject* base);
static gboolean gitg_popup_menu_popup_menu (GitgPopupMenu* self, GtkWidget* widget, GdkEventButton* event);
static void g_cclosure_user_marshal_OBJECT__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void g_cclosure_user_marshal_POINTER__VOID (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
static void gitg_popup_menu_finalize (GObject* obj);


static gboolean _gitg_popup_menu_on_button_press_event_gtk_widget_button_press_event (GtkWidget* _sender, GdkEventButton* event, gpointer self) {
	gboolean result;
	result = gitg_popup_menu_on_button_press_event ((GitgPopupMenu*) self, _sender, event);
#line 32 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return result;
#line 82 "gitg-popup-menu.c"
}


static gboolean _gitg_popup_menu_on_popup_menu_gtk_widget_popup_menu (GtkWidget* _sender, gpointer self) {
	gboolean result;
	result = gitg_popup_menu_on_popup_menu ((GitgPopupMenu*) self, _sender);
#line 33 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return result;
#line 91 "gitg-popup-menu.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 35 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return self ? g_object_ref (self) : NULL;
#line 98 "gitg-popup-menu.c"
}


GitgPopupMenu* gitg_popup_menu_construct (GType object_type, GtkWidget* widget) {
	GitgPopupMenu * self = NULL;
	GtkWidget* _tmp0_ = NULL;
	GtkWidget* _tmp1_ = NULL;
	GtkWidget* _tmp2_ = NULL;
	GtkWidget* _tmp3_ = NULL;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (widget != NULL, NULL);
#line 30 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	self = (GitgPopupMenu*) g_object_new (object_type, NULL);
#line 32 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp0_ = widget;
#line 32 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_signal_connect_object (_tmp0_, "button-press-event", (GCallback) _gitg_popup_menu_on_button_press_event_gtk_widget_button_press_event, self, 0);
#line 33 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp1_ = widget;
#line 33 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_signal_connect_object (_tmp1_, "popup-menu", (GCallback) _gitg_popup_menu_on_popup_menu_gtk_widget_popup_menu, self, 0);
#line 35 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp2_ = widget;
#line 35 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 35 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_g_object_unref0 (self->priv->d_widget);
#line 35 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	self->priv->d_widget = _tmp3_;
#line 30 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return self;
#line 130 "gitg-popup-menu.c"
}


GitgPopupMenu* gitg_popup_menu_new (GtkWidget* widget) {
#line 30 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return gitg_popup_menu_construct (GITG_TYPE_POPUP_MENU, widget);
#line 137 "gitg-popup-menu.c"
}


static void gitg_popup_menu_real_dispose (GObject* base) {
	GitgPopupMenu * self;
	GtkWidget* _tmp0_ = NULL;
#line 38 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	self = (GitgPopupMenu*) base;
#line 40 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp0_ = self->priv->d_widget;
#line 40 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	if (_tmp0_ != NULL) {
#line 150 "gitg-popup-menu.c"
		GtkWidget* _tmp1_ = NULL;
		guint _tmp2_ = 0U;
		GtkWidget* _tmp3_ = NULL;
		guint _tmp4_ = 0U;
#line 42 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_tmp1_ = self->priv->d_widget;
#line 42 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		g_signal_parse_name ("button-press-event", gtk_widget_get_type (), &_tmp2_, NULL, FALSE);
#line 42 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		g_signal_handlers_disconnect_matched (_tmp1_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _gitg_popup_menu_on_button_press_event_gtk_widget_button_press_event, self);
#line 43 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_tmp3_ = self->priv->d_widget;
#line 43 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		g_signal_parse_name ("popup-menu", gtk_widget_get_type (), &_tmp4_, NULL, FALSE);
#line 43 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		g_signal_handlers_disconnect_matched (_tmp3_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp4_, 0, NULL, (GCallback) _gitg_popup_menu_on_popup_menu_gtk_widget_popup_menu, self);
#line 45 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_g_object_unref0 (self->priv->d_widget);
#line 45 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		self->priv->d_widget = NULL;
#line 171 "gitg-popup-menu.c"
	}
}


static gboolean gitg_popup_menu_popup_menu (GitgPopupMenu* self, GtkWidget* widget, GdkEventButton* event) {
	gboolean result = FALSE;
	GtkMenu* menu = NULL;
	GdkEventButton* _tmp0_ = NULL;
	GtkMenu* _tmp1_ = NULL;
	GtkMenu* _tmp2_ = NULL;
	GtkMenu* _tmp3_ = NULL;
	GtkWidget* _tmp4_ = NULL;
	GdkEventButton* _tmp5_ = NULL;
#line 49 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 49 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 51 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp0_ = event;
#line 51 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_signal_emit_by_name (self, "populate-menu", _tmp0_, &_tmp1_);
#line 51 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	menu = _tmp1_;
#line 53 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp2_ = menu;
#line 53 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	if (_tmp2_ == NULL) {
#line 55 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		result = FALSE;
#line 55 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_g_object_unref0 (menu);
#line 55 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		return result;
#line 205 "gitg-popup-menu.c"
	}
#line 58 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp3_ = menu;
#line 58 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp4_ = widget;
#line 58 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	gtk_menu_attach_to_widget (_tmp3_, _tmp4_, NULL);
#line 60 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp5_ = event;
#line 60 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	if (_tmp5_ == NULL) {
#line 217 "gitg-popup-menu.c"
		GdkRectangle* position = NULL;
		GdkRectangle* _tmp6_ = NULL;
		GdkRectangle* _tmp7_ = NULL;
#line 62 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		g_signal_emit_by_name (self, "request-menu-position", &_tmp6_);
#line 62 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		position = _tmp6_;
#line 64 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_tmp7_ = position;
#line 64 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		if (_tmp7_ == NULL) {
#line 229 "gitg-popup-menu.c"
			GtkMenu* _tmp8_ = NULL;
			GtkWidget* _tmp9_ = NULL;
#line 66 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			_tmp8_ = menu;
#line 66 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			_tmp9_ = widget;
#line 66 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			gtk_menu_popup_at_widget (_tmp8_, _tmp9_, GDK_GRAVITY_CENTER, GDK_GRAVITY_CENTER, NULL);
#line 238 "gitg-popup-menu.c"
		} else {
			GtkMenu* _tmp10_ = NULL;
			GtkWidget* _tmp11_ = NULL;
			GdkWindow* _tmp12_ = NULL;
			GdkRectangle* _tmp13_ = NULL;
			GdkRectangle _tmp14_ = {0};
#line 70 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			_tmp10_ = menu;
#line 70 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			_tmp11_ = widget;
#line 70 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			_tmp12_ = gtk_widget_get_window (_tmp11_);
#line 70 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			_tmp13_ = position;
#line 70 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			_tmp14_ = *_tmp13_;
#line 70 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
			gtk_menu_popup_at_rect (_tmp10_, _tmp12_, &_tmp14_, GDK_GRAVITY_CENTER, GDK_GRAVITY_WEST, NULL);
#line 257 "gitg-popup-menu.c"
		}
#line 60 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_g_free0 (position);
#line 261 "gitg-popup-menu.c"
	} else {
		GtkMenu* _tmp15_ = NULL;
		GdkEventButton* _tmp16_ = NULL;
#line 77 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_tmp15_ = menu;
#line 77 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		_tmp16_ = event;
#line 77 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		gtk_menu_popup_at_pointer (_tmp15_, (GdkEvent*) _tmp16_);
#line 271 "gitg-popup-menu.c"
	}
#line 80 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	result = TRUE;
#line 80 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_g_object_unref0 (menu);
#line 80 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return result;
#line 279 "gitg-popup-menu.c"
}


static gboolean gitg_popup_menu_on_popup_menu (GitgPopupMenu* self, GtkWidget* widget) {
	gboolean result = FALSE;
	GtkWidget* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 83 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 83 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp0_ = widget;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp1_ = gitg_popup_menu_popup_menu (self, _tmp0_, NULL);
#line 85 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	result = _tmp1_;
#line 85 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return result;
#line 299 "gitg-popup-menu.c"
}


static gboolean gitg_popup_menu_on_button_press_event (GitgPopupMenu* self, GtkWidget* widget, GdkEventButton* event) {
	gboolean result = FALSE;
	GdkEvent* ev = NULL;
	GdkEventButton* _tmp0_ = NULL;
	GdkEvent* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	GtkWidget* _tmp3_ = NULL;
	GdkEventButton* _tmp4_ = NULL;
	gboolean _tmp5_ = FALSE;
#line 88 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 88 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 88 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 90 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp0_ = event;
#line 90 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	ev = (GdkEvent*) _tmp0_;
#line 92 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp1_ = ev;
#line 92 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp2_ = gdk_event_triggers_context_menu (_tmp1_);
#line 92 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	if (!_tmp2_) {
#line 94 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		result = FALSE;
#line 94 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		return result;
#line 332 "gitg-popup-menu.c"
	}
#line 97 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp3_ = widget;
#line 97 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp4_ = event;
#line 97 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_tmp5_ = gitg_popup_menu_popup_menu (self, _tmp3_, _tmp4_);
#line 97 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	result = _tmp5_;
#line 97 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	return result;
#line 344 "gitg-popup-menu.c"
}


static void g_cclosure_user_marshal_OBJECT__BOXED (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef gpointer (*GMarshalFunc_OBJECT__BOXED) (gpointer data1, gpointer arg_1, gpointer data2);
	register GMarshalFunc_OBJECT__BOXED callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_if_fail (return_value != NULL);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_if_fail (n_param_values == 2);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data1 = closure->data;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data2 = param_values->data[0].v_pointer;
#line 366 "gitg-popup-menu.c"
	} else {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data1 = param_values->data[0].v_pointer;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data2 = closure->data;
#line 372 "gitg-popup-menu.c"
	}
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	callback = (GMarshalFunc_OBJECT__BOXED) (marshal_data ? marshal_data : cc->callback);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	v_return = callback (data1, g_value_get_boxed (param_values + 1), data2);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_value_take_object (return_value, v_return);
#line 380 "gitg-popup-menu.c"
}


static void g_cclosure_user_marshal_POINTER__VOID (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) {
	typedef gpointer (*GMarshalFunc_POINTER__VOID) (gpointer data1, gpointer data2);
	register GMarshalFunc_POINTER__VOID callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	gpointer v_return;
	cc = (GCClosure *) closure;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_if_fail (return_value != NULL);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_return_if_fail (n_param_values == 1);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data1 = closure->data;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data2 = param_values->data[0].v_pointer;
#line 402 "gitg-popup-menu.c"
	} else {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data1 = param_values->data[0].v_pointer;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
		data2 = closure->data;
#line 408 "gitg-popup-menu.c"
	}
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	callback = (GMarshalFunc_POINTER__VOID) (marshal_data ? marshal_data : cc->callback);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	v_return = callback (data1, data2);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_value_set_pointer (return_value, v_return);
#line 416 "gitg-popup-menu.c"
}


static void gitg_popup_menu_class_init (GitgPopupMenuClass * klass) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	gitg_popup_menu_parent_class = g_type_class_peek_parent (klass);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_type_class_add_private (klass, sizeof (GitgPopupMenuPrivate));
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	((GObjectClass *) klass)->dispose = (void (*)(GObject*)) gitg_popup_menu_real_dispose;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_popup_menu_finalize;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_signal_new ("populate_menu", GITG_TYPE_POPUP_MENU, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_OBJECT__BOXED, gtk_menu_get_type (), 1, gdk_event_get_type ());
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	g_signal_new ("request_menu_position", GITG_TYPE_POPUP_MENU, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_POINTER__VOID, G_TYPE_POINTER, 0);
#line 433 "gitg-popup-menu.c"
}


static void gitg_popup_menu_instance_init (GitgPopupMenu * self) {
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	self->priv = GITG_POPUP_MENU_GET_PRIVATE (self);
#line 440 "gitg-popup-menu.c"
}


static void gitg_popup_menu_finalize (GObject* obj) {
	GitgPopupMenu * self;
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_POPUP_MENU, GitgPopupMenu);
#line 28 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	_g_object_unref0 (self->priv->d_widget);
#line 23 "/home/jesse/dev/gitg/gitg/gitg-popup-menu.vala"
	G_OBJECT_CLASS (gitg_popup_menu_parent_class)->finalize (obj);
#line 452 "gitg-popup-menu.c"
}


GType gitg_popup_menu_get_type (void) {
	static volatile gsize gitg_popup_menu_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_popup_menu_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgPopupMenuClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_popup_menu_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgPopupMenu), 0, (GInstanceInitFunc) gitg_popup_menu_instance_init, NULL };
		GType gitg_popup_menu_type_id;
		gitg_popup_menu_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgPopupMenu", &g_define_type_info, 0);
		g_once_init_leave (&gitg_popup_menu_type_id__volatile, gitg_popup_menu_type_id);
	}
	return gitg_popup_menu_type_id__volatile;
}



