/* mass-edit-button.c generated by valac 0.56.19, the Vala compiler
 * generated from mass-edit-button.vala, do not modify */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <adwaita.h>
#include <glib.h>
#include <glib/gi18n-lib.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON (proton_plus_widgets_mass_edit_button_get_type ())
#define PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, ProtonPlusWidgetsMassEditButton))
#define PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, ProtonPlusWidgetsMassEditButtonClass))
#define PROTON_PLUS_WIDGETS_IS_MASS_EDIT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON))
#define PROTON_PLUS_WIDGETS_IS_MASS_EDIT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON))
#define PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, ProtonPlusWidgetsMassEditButtonClass))

typedef struct _ProtonPlusWidgetsMassEditButton ProtonPlusWidgetsMassEditButton;
typedef struct _ProtonPlusWidgetsMassEditButtonClass ProtonPlusWidgetsMassEditButtonClass;
typedef struct _ProtonPlusWidgetsMassEditButtonPrivate ProtonPlusWidgetsMassEditButtonPrivate;
enum  {
	PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_0_PROPERTY,
	PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_NUM_PROPERTIES
};
static GParamSpec* proton_plus_widgets_mass_edit_button_properties[PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define PROTON_PLUS_WIDGETS_TYPE_GAME_ROW (proton_plus_widgets_game_row_get_type ())
#define PROTON_PLUS_WIDGETS_GAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRow))
#define PROTON_PLUS_WIDGETS_GAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRowClass))
#define PROTON_PLUS_WIDGETS_IS_GAME_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW))
#define PROTON_PLUS_WIDGETS_IS_GAME_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW))
#define PROTON_PLUS_WIDGETS_GAME_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRowClass))

typedef struct _ProtonPlusWidgetsGameRow ProtonPlusWidgetsGameRow;
typedef struct _ProtonPlusWidgetsGameRowClass ProtonPlusWidgetsGameRowClass;

#define PROTON_PLUS_WIDGETS_TYPE_WARNING_DIALOG (proton_plus_widgets_warning_dialog_get_type ())
#define PROTON_PLUS_WIDGETS_WARNING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_WARNING_DIALOG, ProtonPlusWidgetsWarningDialog))
#define PROTON_PLUS_WIDGETS_WARNING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_WARNING_DIALOG, ProtonPlusWidgetsWarningDialogClass))
#define PROTON_PLUS_WIDGETS_IS_WARNING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_WARNING_DIALOG))
#define PROTON_PLUS_WIDGETS_IS_WARNING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_WARNING_DIALOG))
#define PROTON_PLUS_WIDGETS_WARNING_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_WARNING_DIALOG, ProtonPlusWidgetsWarningDialogClass))

typedef struct _ProtonPlusWidgetsWarningDialog ProtonPlusWidgetsWarningDialog;
typedef struct _ProtonPlusWidgetsWarningDialogClass ProtonPlusWidgetsWarningDialogClass;

#define PROTON_PLUS_WIDGETS_TYPE_WINDOW (proton_plus_widgets_window_get_type ())
#define PROTON_PLUS_WIDGETS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindow))
#define PROTON_PLUS_WIDGETS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindowClass))
#define PROTON_PLUS_WIDGETS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW))
#define PROTON_PLUS_WIDGETS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_WIDGETS_TYPE_WINDOW))
#define PROTON_PLUS_WIDGETS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_WIDGETS_TYPE_WINDOW, ProtonPlusWidgetsWindowClass))

typedef struct _ProtonPlusWidgetsWindow ProtonPlusWidgetsWindow;
typedef struct _ProtonPlusWidgetsWindowClass ProtonPlusWidgetsWindowClass;
enum  {
	PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_MASS_EDIT_REQUESTED_SIGNAL,
	PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_NUM_SIGNALS
};
static guint proton_plus_widgets_mass_edit_button_signals[PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_NUM_SIGNALS] = {0};

struct _ProtonPlusWidgetsMassEditButton {
	GtkButton parent_instance;
	ProtonPlusWidgetsMassEditButtonPrivate * priv;
};

struct _ProtonPlusWidgetsMassEditButtonClass {
	GtkButtonClass parent_class;
};

struct _ProtonPlusWidgetsMassEditButtonPrivate {
	GtkListBox* _game_list_box;
	AdwButtonContent* _mass_edit_button_content;
};

static gint ProtonPlusWidgetsMassEditButton_private_offset;
static gpointer proton_plus_widgets_mass_edit_button_parent_class = NULL;
VALA_EXTERN ProtonPlusWidgetsWindow* proton_plus_widgets_application_window;

VALA_EXTERN GType proton_plus_widgets_mass_edit_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsMassEditButton, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsMassEditButton* proton_plus_widgets_mass_edit_button_new (GtkListBox* game_list_box);
VALA_EXTERN ProtonPlusWidgetsMassEditButton* proton_plus_widgets_mass_edit_button_construct (GType object_type,
                                                                                 GtkListBox* game_list_box);
static void proton_plus_widgets_mass_edit_button_set_game_list_box (ProtonPlusWidgetsMassEditButton* self,
                                                             GtkListBox* value);
static void proton_plus_widgets_mass_edit_button_mass_edit_button_clicked (ProtonPlusWidgetsMassEditButton* self);
static GtkListBox* proton_plus_widgets_mass_edit_button_get_game_list_box (ProtonPlusWidgetsMassEditButton* self);
VALA_EXTERN GType proton_plus_widgets_game_row_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsGameRow, g_object_unref)
VALA_EXTERN GType proton_plus_widgets_warning_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsWarningDialog, g_object_unref)
VALA_EXTERN ProtonPlusWidgetsWarningDialog* proton_plus_widgets_warning_dialog_new (const gchar* heading,
                                                                        const gchar* body);
VALA_EXTERN ProtonPlusWidgetsWarningDialog* proton_plus_widgets_warning_dialog_construct (GType object_type,
                                                                              const gchar* heading,
                                                                              const gchar* body);
VALA_EXTERN GType proton_plus_widgets_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ProtonPlusWidgetsWindow, g_object_unref)
static AdwButtonContent* proton_plus_widgets_mass_edit_button_get_mass_edit_button_content (ProtonPlusWidgetsMassEditButton* self);
static void proton_plus_widgets_mass_edit_button_set_mass_edit_button_content (ProtonPlusWidgetsMassEditButton* self,
                                                                        AdwButtonContent* value);
static void g_cclosure_user_marshal_VOID__POINTER_INT (GClosure * closure,
                                                GValue * return_value,
                                                guint n_param_values,
                                                const GValue * param_values,
                                                gpointer invocation_hint,
                                                gpointer marshal_data);
static GObject * proton_plus_widgets_mass_edit_button_constructor (GType type,
                                                            guint n_construct_properties,
                                                            GObjectConstructParam * construct_properties);
static void _proton_plus_widgets_mass_edit_button_mass_edit_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                        gpointer self);
static void proton_plus_widgets_mass_edit_button_finalize (GObject * obj);
static GType proton_plus_widgets_mass_edit_button_get_type_once (void);
static void _vala_proton_plus_widgets_mass_edit_button_get_property (GObject * object,
                                                              guint property_id,
                                                              GValue * value,
                                                              GParamSpec * pspec);
static void _vala_proton_plus_widgets_mass_edit_button_set_property (GObject * object,
                                                              guint property_id,
                                                              const GValue * value,
                                                              GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
proton_plus_widgets_mass_edit_button_get_instance_private (ProtonPlusWidgetsMassEditButton* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusWidgetsMassEditButton_private_offset);
}

ProtonPlusWidgetsMassEditButton*
proton_plus_widgets_mass_edit_button_construct (GType object_type,
                                                GtkListBox* game_list_box)
{
	ProtonPlusWidgetsMassEditButton * self = NULL;
	g_return_val_if_fail (game_list_box != NULL, NULL);
	self = (ProtonPlusWidgetsMassEditButton*) g_object_new (object_type, NULL);
	proton_plus_widgets_mass_edit_button_set_game_list_box (self, game_list_box);
	return self;
}

ProtonPlusWidgetsMassEditButton*
proton_plus_widgets_mass_edit_button_new (GtkListBox* game_list_box)
{
	return proton_plus_widgets_mass_edit_button_construct (PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, game_list_box);
}

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

static void
proton_plus_widgets_mass_edit_button_mass_edit_button_clicked (ProtonPlusWidgetsMassEditButton* self)
{
	GList* rows = NULL;
	GtkListBox* _tmp0_;
	GList* _tmp1_;
	GList* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_game_list_box;
	_tmp1_ = gtk_list_box_get_selected_rows (_tmp0_);
	rows = _tmp1_;
	_tmp2_ = rows;
	if (g_list_length (_tmp2_) > ((guint) 0)) {
		ProtonPlusWidgetsGameRow** game_rows = NULL;
		GList* _tmp3_;
		ProtonPlusWidgetsGameRow** _tmp4_;
		gint game_rows_length1;
		gint _game_rows_size_;
		ProtonPlusWidgetsGameRow** _tmp14_;
		gint _tmp14__length1;
		_tmp3_ = rows;
		_tmp4_ = g_new0 (ProtonPlusWidgetsGameRow*, g_list_length (_tmp3_) + 1);
		game_rows = _tmp4_;
		game_rows_length1 = g_list_length (_tmp3_);
		_game_rows_size_ = game_rows_length1;
		{
			gint i = 0;
			i = 0;
			{
				gboolean _tmp5_ = FALSE;
				_tmp5_ = TRUE;
				while (TRUE) {
					GList* _tmp7_;
					ProtonPlusWidgetsGameRow* game_row = NULL;
					GList* _tmp8_;
					gconstpointer _tmp9_;
					ProtonPlusWidgetsGameRow* _tmp10_;
					ProtonPlusWidgetsGameRow** _tmp11_;
					gint _tmp11__length1;
					ProtonPlusWidgetsGameRow* _tmp12_;
					ProtonPlusWidgetsGameRow* _tmp13_;
					if (!_tmp5_) {
						gint _tmp6_;
						_tmp6_ = i;
						i = _tmp6_ + 1;
					}
					_tmp5_ = FALSE;
					_tmp7_ = rows;
					if (!(((guint) i) < g_list_length (_tmp7_))) {
						break;
					}
					_tmp8_ = rows;
					_tmp9_ = g_list_nth_data (_tmp8_, (guint) i);
					_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST ((GtkListBoxRow*) _tmp9_, PROTON_PLUS_WIDGETS_TYPE_GAME_ROW, ProtonPlusWidgetsGameRow));
					game_row = _tmp10_;
					_tmp11_ = game_rows;
					_tmp11__length1 = game_rows_length1;
					_tmp12_ = game_row;
					_tmp13_ = _g_object_ref0 (_tmp12_);
					_g_object_unref0 (_tmp11_[i]);
					_tmp11_[i] = _tmp13_;
					_g_object_unref0 (game_row);
				}
			}
		}
		_tmp14_ = game_rows;
		_tmp14__length1 = game_rows_length1;
		g_signal_emit (self, proton_plus_widgets_mass_edit_button_signals[PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_MASS_EDIT_REQUESTED_SIGNAL], 0, _tmp14_, (gint) _tmp14__length1);
		game_rows = (_vala_array_free (game_rows, game_rows_length1, (GDestroyNotify) g_object_unref), NULL);
	} else {
		ProtonPlusWidgetsWarningDialog* dialog = NULL;
		ProtonPlusWidgetsWarningDialog* _tmp15_;
		ProtonPlusWidgetsWarningDialog* _tmp16_;
		ProtonPlusWidgetsWindow* _tmp17_;
		_tmp15_ = proton_plus_widgets_warning_dialog_new (_ ("Warning"), _ ("Please make sure to select at least one game before using the mass edi" \
"t feature."));
		g_object_ref_sink (_tmp15_);
		dialog = _tmp15_;
		_tmp16_ = dialog;
		_tmp17_ = proton_plus_widgets_application_window;
		adw_dialog_present ((AdwDialog*) _tmp16_, (GtkWidget*) _tmp17_);
		_g_object_unref0 (dialog);
	}
	(rows == NULL) ? NULL : (rows = (g_list_free (rows), NULL));
}

static GtkListBox*
proton_plus_widgets_mass_edit_button_get_game_list_box (ProtonPlusWidgetsMassEditButton* self)
{
	GtkListBox* result;
	GtkListBox* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_game_list_box;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_mass_edit_button_set_game_list_box (ProtonPlusWidgetsMassEditButton* self,
                                                        GtkListBox* value)
{
	GtkListBox* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_game_list_box);
	self->priv->_game_list_box = _tmp0_;
}

static AdwButtonContent*
proton_plus_widgets_mass_edit_button_get_mass_edit_button_content (ProtonPlusWidgetsMassEditButton* self)
{
	AdwButtonContent* result;
	AdwButtonContent* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_mass_edit_button_content;
	result = _tmp0_;
	return result;
}

static void
proton_plus_widgets_mass_edit_button_set_mass_edit_button_content (ProtonPlusWidgetsMassEditButton* self,
                                                                   AdwButtonContent* value)
{
	AdwButtonContent* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = _g_object_ref0 (value);
	_g_object_unref0 (self->priv->_mass_edit_button_content);
	self->priv->_mass_edit_button_content = _tmp0_;
}

static void
g_cclosure_user_marshal_VOID__POINTER_INT (GClosure * closure,
                                           GValue * return_value,
                                           guint n_param_values,
                                           const GValue * param_values,
                                           gpointer invocation_hint,
                                           gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__POINTER_INT) (gpointer data1, gpointer arg_1, gint arg_2, gpointer data2);
	register GMarshalFunc_VOID__POINTER_INT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__POINTER_INT) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_pointer (param_values + 1), g_value_get_int (param_values + 2), data2);
}

static void
_proton_plus_widgets_mass_edit_button_mass_edit_button_clicked_gtk_button_clicked (GtkButton* _sender,
                                                                                   gpointer self)
{
	proton_plus_widgets_mass_edit_button_mass_edit_button_clicked ((ProtonPlusWidgetsMassEditButton*) self);
}

static GObject *
proton_plus_widgets_mass_edit_button_constructor (GType type,
                                                  guint n_construct_properties,
                                                  GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	ProtonPlusWidgetsMassEditButton * self;
	AdwButtonContent* _tmp0_;
	AdwButtonContent* _tmp1_;
	AdwButtonContent* _tmp2_;
	AdwButtonContent* _tmp3_;
	AdwButtonContent* _tmp4_;
	parent_class = G_OBJECT_CLASS (proton_plus_widgets_mass_edit_button_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, ProtonPlusWidgetsMassEditButton);
	_tmp0_ = (AdwButtonContent*) adw_button_content_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	proton_plus_widgets_mass_edit_button_set_mass_edit_button_content (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = self->priv->_mass_edit_button_content;
	adw_button_content_set_label (_tmp2_, _ ("Mass edit"));
	_tmp3_ = self->priv->_mass_edit_button_content;
	adw_button_content_set_icon_name (_tmp3_, "edit-symbolic");
	gtk_widget_set_tooltip_text ((GtkWidget*) self, _ ("Edit the selected games at once"));
	gtk_widget_add_css_class ((GtkWidget*) self, "flat");
	_tmp4_ = self->priv->_mass_edit_button_content;
	gtk_button_set_child ((GtkButton*) self, (GtkWidget*) _tmp4_);
	g_signal_connect_object ((GtkButton*) self, "clicked", (GCallback) _proton_plus_widgets_mass_edit_button_mass_edit_button_clicked_gtk_button_clicked, self, 0);
	return obj;
}

static void
proton_plus_widgets_mass_edit_button_class_init (ProtonPlusWidgetsMassEditButtonClass * klass,
                                                 gpointer klass_data)
{
	proton_plus_widgets_mass_edit_button_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusWidgetsMassEditButton_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_widgets_mass_edit_button_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_widgets_mass_edit_button_set_property;
	G_OBJECT_CLASS (klass)->constructor = proton_plus_widgets_mass_edit_button_constructor;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_widgets_mass_edit_button_finalize;
	proton_plus_widgets_mass_edit_button_signals[PROTON_PLUS_WIDGETS_MASS_EDIT_BUTTON_MASS_EDIT_REQUESTED_SIGNAL] = g_signal_new ("mass-edit-requested", PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__POINTER_INT, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_INT);
}

static void
proton_plus_widgets_mass_edit_button_instance_init (ProtonPlusWidgetsMassEditButton * self,
                                                    gpointer klass)
{
	self->priv = proton_plus_widgets_mass_edit_button_get_instance_private (self);
}

static void
proton_plus_widgets_mass_edit_button_finalize (GObject * obj)
{
	ProtonPlusWidgetsMassEditButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, ProtonPlusWidgetsMassEditButton);
	_g_object_unref0 (self->priv->_game_list_box);
	_g_object_unref0 (self->priv->_mass_edit_button_content);
	G_OBJECT_CLASS (proton_plus_widgets_mass_edit_button_parent_class)->finalize (obj);
}

static GType
proton_plus_widgets_mass_edit_button_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusWidgetsMassEditButtonClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_widgets_mass_edit_button_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusWidgetsMassEditButton), 0, (GInstanceInitFunc) proton_plus_widgets_mass_edit_button_instance_init, NULL };
	GType proton_plus_widgets_mass_edit_button_type_id;
	proton_plus_widgets_mass_edit_button_type_id = g_type_register_static (gtk_button_get_type (), "ProtonPlusWidgetsMassEditButton", &g_define_type_info, 0);
	ProtonPlusWidgetsMassEditButton_private_offset = g_type_add_instance_private (proton_plus_widgets_mass_edit_button_type_id, sizeof (ProtonPlusWidgetsMassEditButtonPrivate));
	return proton_plus_widgets_mass_edit_button_type_id;
}

GType
proton_plus_widgets_mass_edit_button_get_type (void)
{
	static volatile gsize proton_plus_widgets_mass_edit_button_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_widgets_mass_edit_button_type_id__once)) {
		GType proton_plus_widgets_mass_edit_button_type_id;
		proton_plus_widgets_mass_edit_button_type_id = proton_plus_widgets_mass_edit_button_get_type_once ();
		g_once_init_leave (&proton_plus_widgets_mass_edit_button_type_id__once, proton_plus_widgets_mass_edit_button_type_id);
	}
	return proton_plus_widgets_mass_edit_button_type_id__once;
}

static void
_vala_proton_plus_widgets_mass_edit_button_get_property (GObject * object,
                                                         guint property_id,
                                                         GValue * value,
                                                         GParamSpec * pspec)
{
	ProtonPlusWidgetsMassEditButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, ProtonPlusWidgetsMassEditButton);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_widgets_mass_edit_button_set_property (GObject * object,
                                                         guint property_id,
                                                         const GValue * value,
                                                         GParamSpec * pspec)
{
	ProtonPlusWidgetsMassEditButton * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_WIDGETS_TYPE_MASS_EDIT_BUTTON, ProtonPlusWidgetsMassEditButton);
	switch (property_id) {
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

