/* gamepad-configurer.c generated by valac 0.38.2, the Vala compiler
 * generated from gamepad-configurer.vala, do not modify */

/* This file is part of GNOME Games. License: GPL-3.0+.*/

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <gamepad.h>
#include <gamepad-mappings-manager.h>
#include <gamepad-input.h>
#include <linux/input-event-codes.h>
#include <stdlib.h>
#include <string.h>
#include <gamepad-mapping.h>
#include <glib/gi18n-lib.h>


#define GAMES_TYPE_GAMEPAD_CONFIGURER (games_gamepad_configurer_get_type ())
#define GAMES_GAMEPAD_CONFIGURER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurer))
#define GAMES_GAMEPAD_CONFIGURER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurerClass))
#define GAMES_IS_GAMEPAD_CONFIGURER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAMEPAD_CONFIGURER))
#define GAMES_IS_GAMEPAD_CONFIGURER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GAMEPAD_CONFIGURER))
#define GAMES_GAMEPAD_CONFIGURER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurerClass))

typedef struct _GamesGamepadConfigurer GamesGamepadConfigurer;
typedef struct _GamesGamepadConfigurerClass GamesGamepadConfigurerClass;
typedef struct _GamesGamepadConfigurerPrivate GamesGamepadConfigurerPrivate;

#define GAMES_GAMEPAD_CONFIGURER_TYPE_STATE (games_gamepad_configurer_state_get_type ())

#define GAMES_TYPE_GAMEPAD_MAPPER (games_gamepad_mapper_get_type ())
#define GAMES_GAMEPAD_MAPPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAMEPAD_MAPPER, GamesGamepadMapper))
#define GAMES_GAMEPAD_MAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GAMEPAD_MAPPER, GamesGamepadMapperClass))
#define GAMES_IS_GAMEPAD_MAPPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAMEPAD_MAPPER))
#define GAMES_IS_GAMEPAD_MAPPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GAMEPAD_MAPPER))
#define GAMES_GAMEPAD_MAPPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GAMEPAD_MAPPER, GamesGamepadMapperClass))

typedef struct _GamesGamepadMapper GamesGamepadMapper;
typedef struct _GamesGamepadMapperClass GamesGamepadMapperClass;

#define GAMES_TYPE_GAMEPAD_TESTER (games_gamepad_tester_get_type ())
#define GAMES_GAMEPAD_TESTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAMEPAD_TESTER, GamesGamepadTester))
#define GAMES_GAMEPAD_TESTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GAMEPAD_TESTER, GamesGamepadTesterClass))
#define GAMES_IS_GAMEPAD_TESTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAMEPAD_TESTER))
#define GAMES_IS_GAMEPAD_TESTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GAMEPAD_TESTER))
#define GAMES_GAMEPAD_TESTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GAMEPAD_TESTER, GamesGamepadTesterClass))

typedef struct _GamesGamepadTester GamesGamepadTester;
typedef struct _GamesGamepadTesterClass GamesGamepadTesterClass;
enum  {
	GAMES_GAMEPAD_CONFIGURER_DUMMY_PROPERTY,
	GAMES_GAMEPAD_CONFIGURER_HEADER_BAR_PROPERTY,
	GAMES_GAMEPAD_CONFIGURER_IMMERSIVE_MODE_PROPERTY,
	GAMES_GAMEPAD_CONFIGURER_LAST_PROPERTY
};
static GParamSpec* games_gamepad_configurer_properties[GAMES_GAMEPAD_CONFIGURER_LAST_PROPERTY];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GAMES_TYPE_GAMEPAD_INPUT_PATH (games_gamepad_input_path_get_type ())
typedef struct _GamesGamepadInputPath GamesGamepadInputPath;

#define GAMES_TYPE_GAMEPAD_VIEW_CONFIGURATION (games_gamepad_view_configuration_get_type ())
typedef struct _GamesGamepadViewConfiguration GamesGamepadViewConfiguration;

#define GAMES_TYPE_RESET_GAMEPAD_MAPPING_DIALOG (games_reset_gamepad_mapping_dialog_get_type ())
#define GAMES_RESET_GAMEPAD_MAPPING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_RESET_GAMEPAD_MAPPING_DIALOG, GamesResetGamepadMappingDialog))
#define GAMES_RESET_GAMEPAD_MAPPING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_RESET_GAMEPAD_MAPPING_DIALOG, GamesResetGamepadMappingDialogClass))
#define GAMES_IS_RESET_GAMEPAD_MAPPING_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_RESET_GAMEPAD_MAPPING_DIALOG))
#define GAMES_IS_RESET_GAMEPAD_MAPPING_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_RESET_GAMEPAD_MAPPING_DIALOG))
#define GAMES_RESET_GAMEPAD_MAPPING_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_RESET_GAMEPAD_MAPPING_DIALOG, GamesResetGamepadMappingDialogClass))

typedef struct _GamesResetGamepadMappingDialog GamesResetGamepadMappingDialog;
typedef struct _GamesResetGamepadMappingDialogClass GamesResetGamepadMappingDialogClass;
typedef struct _Block10Data Block10Data;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
enum  {
	GAMES_GAMEPAD_CONFIGURER_BACK_SIGNAL,
	GAMES_GAMEPAD_CONFIGURER_LAST_SIGNAL
};
static guint games_gamepad_configurer_signals[GAMES_GAMEPAD_CONFIGURER_LAST_SIGNAL] = {0};

struct _GamesGamepadConfigurer {
	GtkBox parent_instance;
	GamesGamepadConfigurerPrivate * priv;
};

struct _GamesGamepadConfigurerClass {
	GtkBoxClass parent_class;
};

typedef enum  {
	GAMES_GAMEPAD_CONFIGURER_STATE_TEST,
	GAMES_GAMEPAD_CONFIGURER_STATE_CONFIGURE
} GamesGamepadConfigurerState;

struct _GamesGamepadConfigurerPrivate {
	GamesGamepadConfigurerState _state;
	GtkHeaderBar* _header_bar;
	gboolean _immersive_mode;
	GtkStack* stack;
	GtkBox* gamepad_mapper_holder;
	GtkBox* gamepad_tester_holder;
	GtkActionBar* action_bar;
	GtkButton* reset_button;
	GtkButton* back_button;
	GtkButton* cancel_button;
	GamesGamepad* gamepad;
	GamesGamepadMapper* mapper;
	GamesGamepadTester* tester;
	GamesGamepadMappingsManager* mappings_manager;
};

struct _GamesGamepadInputPath {
	GamesGamepadInput input;
	gchar* path;
};

struct _GamesGamepadViewConfiguration {
	gchar* svg_path;
	GamesGamepadInputPath* input_paths;
	gint input_paths_length1;
	gint _input_paths_size_;
};

struct _Block10Data {
	int _ref_count_;
	GamesGamepadConfigurer* self;
	GamesResetGamepadMappingDialog* message_dialog;
};


static gpointer games_gamepad_configurer_parent_class = NULL;

GType games_gamepad_configurer_get_type (void) G_GNUC_CONST;
static GType games_gamepad_configurer_state_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
GType games_gamepad_mapper_get_type (void) G_GNUC_CONST;
GType games_gamepad_tester_get_type (void) G_GNUC_CONST;
#define GAMES_GAMEPAD_CONFIGURER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurerPrivate))
GType games_gamepad_input_path_get_type (void) G_GNUC_CONST;
GamesGamepadInputPath* games_gamepad_input_path_dup (const GamesGamepadInputPath* self);
void games_gamepad_input_path_free (GamesGamepadInputPath* self);
void games_gamepad_input_path_copy (const GamesGamepadInputPath* self, GamesGamepadInputPath* dest);
void games_gamepad_input_path_destroy (GamesGamepadInputPath* self);
GType games_gamepad_view_configuration_get_type (void) G_GNUC_CONST;
GamesGamepadViewConfiguration* games_gamepad_view_configuration_dup (const GamesGamepadViewConfiguration* self);
void games_gamepad_view_configuration_free (GamesGamepadViewConfiguration* self);
void games_gamepad_view_configuration_copy (const GamesGamepadViewConfiguration* self, GamesGamepadViewConfiguration* dest);
void games_gamepad_view_configuration_destroy (GamesGamepadViewConfiguration* self);
GamesGamepadConfigurer* games_gamepad_configurer_new (GamesGamepad* gamepad);
GamesGamepadConfigurer* games_gamepad_configurer_construct (GType object_type, GamesGamepad* gamepad);
GamesGamepadMapper* games_gamepad_mapper_new (GamesGamepad* gamepad, GamesGamepadViewConfiguration* configuration, GamesGamepadInput* mapping_inputs, int mapping_inputs_length1);
GamesGamepadMapper* games_gamepad_mapper_construct (GType object_type, GamesGamepad* gamepad, GamesGamepadViewConfiguration* configuration, GamesGamepadInput* mapping_inputs, int mapping_inputs_length1);
GamesGamepadTester* games_gamepad_tester_new (GamesGamepad* gamepad, GamesGamepadViewConfiguration* configuration);
GamesGamepadTester* games_gamepad_tester_construct (GType object_type, GamesGamepad* gamepad, GamesGamepadViewConfiguration* configuration);
static void games_gamepad_configurer_set_state (GamesGamepadConfigurer* self, GamesGamepadConfigurerState value);
static void games_gamepad_configurer_on_reset_clicked (GamesGamepadConfigurer* self);
static void games_gamepad_configurer_reset_mapping (GamesGamepadConfigurer* self);
static void _games_gamepad_configurer_on_reset_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void games_gamepad_configurer_on_configure_clicked (GamesGamepadConfigurer* self);
static void _games_gamepad_configurer_on_configure_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void games_gamepad_configurer_on_back_clicked (GamesGamepadConfigurer* self);
static void _games_gamepad_configurer_on_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
static void games_gamepad_configurer_on_cancel_clicked (GamesGamepadConfigurer* self);
static void _games_gamepad_configurer_on_cancel_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
GType games_reset_gamepad_mapping_dialog_get_type (void) G_GNUC_CONST;
static Block10Data* block10_data_ref (Block10Data* _data10_);
static void block10_data_unref (void * _userdata_);
GamesResetGamepadMappingDialog* games_reset_gamepad_mapping_dialog_new (void);
GamesResetGamepadMappingDialog* games_reset_gamepad_mapping_dialog_construct (GType object_type);
static void __lambda32_ (Block10Data* _data10_, gint response);
static void games_gamepad_configurer_set_gamepad_mapping (GamesGamepadConfigurer* self, const gchar* sdl_string);
static void ___lambda32__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self);
static void games_gamepad_configurer_on_mapper_finished (GamesGamepadConfigurer* self, const gchar* sdl_string);
static GamesGamepadConfigurerState games_gamepad_configurer_get_state (GamesGamepadConfigurer* self);
static void games_gamepad_configurer_set_immersive_mode (GamesGamepadConfigurer* self, gboolean value);
GtkHeaderBar* games_gamepad_configurer_get_header_bar (GamesGamepadConfigurer* self);
void games_gamepad_tester_start (GamesGamepadTester* self);
void games_gamepad_mapper_stop (GamesGamepadMapper* self);
static void _games_gamepad_configurer_on_mapper_finished_games_gamepad_mapper_finished (GamesGamepadMapper* _sender, const gchar* sdl_string, gpointer self);
void games_gamepad_tester_stop (GamesGamepadTester* self);
void games_gamepad_mapper_start (GamesGamepadMapper* self);
static void games_gamepad_configurer_set_header_bar (GamesGamepadConfigurer* self, GtkHeaderBar* value);
gboolean games_gamepad_configurer_get_immersive_mode (GamesGamepadConfigurer* self);
static GObject * games_gamepad_configurer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void games_gamepad_configurer_finalize (GObject * obj);
static void _vala_games_gamepad_configurer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_games_gamepad_configurer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);

static const GamesGamepadInput GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_INPUTS[21] = {{EV_KEY, BTN_A}, {EV_KEY, BTN_B}, {EV_KEY, BTN_X}, {EV_KEY, BTN_Y}, {EV_KEY, BTN_START}, {EV_KEY, BTN_MODE}, {EV_KEY, BTN_SELECT}, {EV_KEY, BTN_THUMBL}, {EV_KEY, BTN_THUMBR}, {EV_KEY, BTN_TL}, {EV_KEY, BTN_TR}, {EV_KEY, BTN_DPAD_UP}, {EV_KEY, BTN_DPAD_LEFT}, {EV_KEY, BTN_DPAD_DOWN}, {EV_KEY, BTN_DPAD_RIGHT}, {EV_ABS, ABS_X}, {EV_ABS, ABS_Y}, {EV_ABS, ABS_RX}, {EV_ABS, ABS_RY}, {EV_KEY, BTN_TL2}, {EV_KEY, BTN_TR2}};
static const GamesGamepadInputPath GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_INPUT_PATHS[21] = {{{EV_ABS, ABS_X}, "leftx"}, {{EV_ABS, ABS_Y}, "lefty"}, {{EV_ABS, ABS_RX}, "rightx"}, {{EV_ABS, ABS_RY}, "righty"}, {{EV_KEY, BTN_A}, "a"}, {{EV_KEY, BTN_B}, "b"}, {{EV_KEY, BTN_DPAD_DOWN}, "dpdown"}, {{EV_KEY, BTN_DPAD_LEFT}, "dpleft"}, {{EV_KEY, BTN_DPAD_RIGHT}, "dpright"}, {{EV_KEY, BTN_DPAD_UP}, "dpup"}, {{EV_KEY, BTN_MODE}, "guide"}, {{EV_KEY, BTN_SELECT}, "back"}, {{EV_KEY, BTN_TL}, "leftshoulder"}, {{EV_KEY, BTN_TR}, "rightshoulder"}, {{EV_KEY, BTN_START}, "start"}, {{EV_KEY, BTN_THUMBL}, "leftstick"}, {{EV_KEY, BTN_THUMBR}, "rightstick"}, {{EV_KEY, BTN_TL2}, "lefttrigger"}, {{EV_KEY, BTN_TR2}, "righttrigger"}, {{EV_KEY, BTN_Y}, "x"}, {{EV_KEY, BTN_X}, "y"}};
static const GamesGamepadViewConfiguration GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_VIEW_CONFIGURATION = {"resource:///org/gnome/Games/gamepads/standard-gamepad.svg", GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_INPUT_PATHS, G_N_ELEMENTS (GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_INPUT_PATHS)};

static GType games_gamepad_configurer_state_get_type (void) {
	static volatile gsize games_gamepad_configurer_state_type_id__volatile = 0;
	if (g_once_init_enter (&games_gamepad_configurer_state_type_id__volatile)) {
		static const GEnumValue values[] = {{GAMES_GAMEPAD_CONFIGURER_STATE_TEST, "GAMES_GAMEPAD_CONFIGURER_STATE_TEST", "test"}, {GAMES_GAMEPAD_CONFIGURER_STATE_CONFIGURE, "GAMES_GAMEPAD_CONFIGURER_STATE_CONFIGURE", "configure"}, {0, NULL, NULL}};
		GType games_gamepad_configurer_state_type_id;
		games_gamepad_configurer_state_type_id = g_enum_register_static ("GamesGamepadConfigurerState", values);
		g_once_init_leave (&games_gamepad_configurer_state_type_id__volatile, games_gamepad_configurer_state_type_id);
	}
	return games_gamepad_configurer_state_type_id__volatile;
}


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


GamesGamepadConfigurer* games_gamepad_configurer_construct (GType object_type, GamesGamepad* gamepad) {
	GamesGamepadConfigurer * self = NULL;
	GamesGamepad* _tmp0_;
	GamesGamepad* _tmp1_;
	GamesGamepad* _tmp2_;
	GamesGamepadMapper* _tmp3_;
	GtkBox* _tmp4_;
	GamesGamepadMapper* _tmp5_;
	GamesGamepad* _tmp6_;
	GamesGamepadTester* _tmp7_;
	GtkBox* _tmp8_;
	GamesGamepadTester* _tmp9_;
	g_return_val_if_fail (gamepad != NULL, NULL);
	self = (GamesGamepadConfigurer*) g_object_new (object_type, NULL);
	_tmp0_ = gamepad;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->gamepad);
	self->priv->gamepad = _tmp1_;
	_tmp2_ = gamepad;
	_tmp3_ = games_gamepad_mapper_new (_tmp2_, &GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_VIEW_CONFIGURATION, GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_INPUTS, G_N_ELEMENTS (GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_INPUTS));
	g_object_ref_sink (_tmp3_);
	_g_object_unref0 (self->priv->mapper);
	self->priv->mapper = _tmp3_;
	_tmp4_ = self->priv->gamepad_mapper_holder;
	_tmp5_ = self->priv->mapper;
	gtk_box_pack_start (_tmp4_, (GtkWidget*) _tmp5_, TRUE, TRUE, (guint) 0);
	_tmp6_ = gamepad;
	_tmp7_ = games_gamepad_tester_new (_tmp6_, &GAMES_GAMEPAD_CONFIGURER_STANDARD_GAMEPAD_VIEW_CONFIGURATION);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->tester);
	self->priv->tester = _tmp7_;
	_tmp8_ = self->priv->gamepad_tester_holder;
	_tmp9_ = self->priv->tester;
	gtk_box_pack_start (_tmp8_, (GtkWidget*) _tmp9_, TRUE, TRUE, (guint) 0);
	games_gamepad_configurer_set_state (self, GAMES_GAMEPAD_CONFIGURER_STATE_TEST);
	return self;
}


GamesGamepadConfigurer* games_gamepad_configurer_new (GamesGamepad* gamepad) {
	return games_gamepad_configurer_construct (GAMES_TYPE_GAMEPAD_CONFIGURER, gamepad);
}


static void games_gamepad_configurer_on_reset_clicked (GamesGamepadConfigurer* self) {
	g_return_if_fail (self != NULL);
	games_gamepad_configurer_reset_mapping (self);
}


static void _games_gamepad_configurer_on_reset_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	games_gamepad_configurer_on_reset_clicked ((GamesGamepadConfigurer*) self);
}


static void games_gamepad_configurer_on_configure_clicked (GamesGamepadConfigurer* self) {
	g_return_if_fail (self != NULL);
	games_gamepad_configurer_set_state (self, GAMES_GAMEPAD_CONFIGURER_STATE_CONFIGURE);
}


static void _games_gamepad_configurer_on_configure_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	games_gamepad_configurer_on_configure_clicked ((GamesGamepadConfigurer*) self);
}


static void games_gamepad_configurer_on_back_clicked (GamesGamepadConfigurer* self) {
	g_return_if_fail (self != NULL);
	g_signal_emit (self, games_gamepad_configurer_signals[GAMES_GAMEPAD_CONFIGURER_BACK_SIGNAL], 0);
}


static void _games_gamepad_configurer_on_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	games_gamepad_configurer_on_back_clicked ((GamesGamepadConfigurer*) self);
}


static void games_gamepad_configurer_on_cancel_clicked (GamesGamepadConfigurer* self) {
	g_return_if_fail (self != NULL);
	games_gamepad_configurer_set_state (self, GAMES_GAMEPAD_CONFIGURER_STATE_TEST);
}


static void _games_gamepad_configurer_on_cancel_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
	games_gamepad_configurer_on_cancel_clicked ((GamesGamepadConfigurer*) self);
}


static Block10Data* block10_data_ref (Block10Data* _data10_) {
	g_atomic_int_inc (&_data10_->_ref_count_);
	return _data10_;
}


static void block10_data_unref (void * _userdata_) {
	Block10Data* _data10_;
	_data10_ = (Block10Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data10_->_ref_count_)) {
		GamesGamepadConfigurer* self;
		self = _data10_->self;
		_g_object_unref0 (_data10_->message_dialog);
		_g_object_unref0 (self);
		g_slice_free (Block10Data, _data10_);
	}
}


static void __lambda32_ (Block10Data* _data10_, gint response) {
	GamesGamepadConfigurer* self;
	gint _tmp0_;
	self = _data10_->self;
	_tmp0_ = response;
	switch (_tmp0_) {
		case GTK_RESPONSE_ACCEPT:
		{
			GamesGamepadMappingsManager* _tmp1_;
			GamesGamepad* _tmp2_;
			const gchar* _tmp3_;
			const gchar* _tmp4_;
			gchar* sdl_string = NULL;
			GamesGamepadMappingsManager* _tmp5_;
			GamesGamepad* _tmp6_;
			const gchar* _tmp7_;
			const gchar* _tmp8_;
			gchar* _tmp9_;
			const gchar* _tmp10_;
			GtkButton* _tmp11_;
			_tmp1_ = self->priv->mappings_manager;
			_tmp2_ = self->priv->gamepad;
			_tmp3_ = games_gamepad_get_guid (_tmp2_);
			_tmp4_ = _tmp3_;
			games_gamepad_mappings_manager_delete_mapping (_tmp1_, _tmp4_);
			_tmp5_ = self->priv->mappings_manager;
			_tmp6_ = self->priv->gamepad;
			_tmp7_ = games_gamepad_get_guid (_tmp6_);
			_tmp8_ = _tmp7_;
			_tmp9_ = games_gamepad_mappings_manager_get_default_mapping (_tmp5_, _tmp8_);
			sdl_string = _tmp9_;
			_tmp10_ = sdl_string;
			games_gamepad_configurer_set_gamepad_mapping (self, _tmp10_);
			_tmp11_ = self->priv->reset_button;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp11_, FALSE);
			_g_free0 (sdl_string);
			break;
		}
		default:
		{
			break;
		}
	}
	gtk_widget_destroy ((GtkWidget*) _data10_->message_dialog);
}


static void ___lambda32__gtk_dialog_response (GtkDialog* _sender, gint response_id, gpointer self) {
	__lambda32_ (self, response_id);
}


static void games_gamepad_configurer_reset_mapping (GamesGamepadConfigurer* self) {
	Block10Data* _data10_;
	GamesResetGamepadMappingDialog* _tmp0_;
	GtkWidget* _tmp1_;
	g_return_if_fail (self != NULL);
	_data10_ = g_slice_new0 (Block10Data);
	_data10_->_ref_count_ = 1;
	_data10_->self = g_object_ref (self);
	_tmp0_ = games_reset_gamepad_mapping_dialog_new ();
	g_object_ref_sink (_tmp0_);
	_data10_->message_dialog = _tmp0_;
	_tmp1_ = gtk_widget_get_toplevel ((GtkWidget*) self);
	gtk_window_set_transient_for ((GtkWindow*) _data10_->message_dialog, G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_window_get_type (), GtkWindow));
	g_signal_connect_data ((GtkDialog*) _data10_->message_dialog, "response", (GCallback) ___lambda32__gtk_dialog_response, block10_data_ref (_data10_), (GClosureNotify) block10_data_unref, 0);
	gtk_widget_show ((GtkWidget*) _data10_->message_dialog);
	block10_data_unref (_data10_);
	_data10_ = NULL;
}


static void games_gamepad_configurer_on_mapper_finished (GamesGamepadConfigurer* self, const gchar* sdl_string) {
	GamesGamepadMappingsManager* _tmp0_;
	GamesGamepad* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	GamesGamepad* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	const gchar* _tmp8_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (sdl_string != NULL);
	_tmp0_ = self->priv->mappings_manager;
	_tmp1_ = self->priv->gamepad;
	_tmp2_ = games_gamepad_get_guid (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = self->priv->gamepad;
	_tmp5_ = games_gamepad_get_name (_tmp4_);
	_tmp6_ = _tmp5_;
	_tmp7_ = sdl_string;
	games_gamepad_mappings_manager_save_mapping (_tmp0_, _tmp3_, _tmp6_, _tmp7_);
	_tmp8_ = sdl_string;
	games_gamepad_configurer_set_gamepad_mapping (self, _tmp8_);
	games_gamepad_configurer_set_state (self, GAMES_GAMEPAD_CONFIGURER_STATE_TEST);
}


static void games_gamepad_configurer_set_gamepad_mapping (GamesGamepadConfigurer* self, const gchar* sdl_string) {
	const gchar* _tmp0_;
	GError * _inner_error_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = sdl_string;
	if (_tmp0_ == NULL) {
		GamesGamepad* _tmp1_;
		_tmp1_ = self->priv->gamepad;
		games_gamepad_set_mapping (_tmp1_, NULL);
		return;
	}
	{
		GamesGamepadMapping* mapping = NULL;
		const gchar* _tmp2_;
		GamesGamepadMapping* _tmp3_;
		GamesGamepad* _tmp4_;
		GamesGamepadMapping* _tmp5_;
		_tmp2_ = sdl_string;
		_tmp3_ = games_gamepad_mapping_new_from_sdl_string (_tmp2_, &_inner_error_);
		mapping = _tmp3_;
		if (G_UNLIKELY (_inner_error_ != NULL)) {
			goto __catch34_g_error;
		}
		_tmp4_ = self->priv->gamepad;
		_tmp5_ = mapping;
		games_gamepad_set_mapping (_tmp4_, _tmp5_);
		_g_object_unref0 (mapping);
	}
	goto __finally34;
	__catch34_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_;
		const gchar* _tmp7_;
		e = _inner_error_;
		_inner_error_ = NULL;
		_tmp6_ = e;
		_tmp7_ = _tmp6_->message;
		g_critical ("gamepad-configurer.vala:209: %s", _tmp7_);
		_g_error_free0 (e);
	}
	__finally34:
	if (G_UNLIKELY (_inner_error_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return;
	}
}


static GamesGamepadConfigurerState games_gamepad_configurer_get_state (GamesGamepadConfigurer* self) {
	GamesGamepadConfigurerState result;
	GamesGamepadConfigurerState _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_state;
	result = _tmp0_;
	return result;
}


static void _games_gamepad_configurer_on_mapper_finished_games_gamepad_mapper_finished (GamesGamepadMapper* _sender, const gchar* sdl_string, gpointer self) {
	games_gamepad_configurer_on_mapper_finished ((GamesGamepadConfigurer*) self, sdl_string);
}


static void games_gamepad_configurer_set_state (GamesGamepadConfigurer* self, GamesGamepadConfigurerState value) {
	GamesGamepadConfigurerState _tmp0_;
	GamesGamepadConfigurerState _tmp1_;
	GamesGamepadConfigurerState _tmp2_;
	GamesGamepadConfigurerState _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = value;
	self->priv->_state = _tmp0_;
	_tmp1_ = games_gamepad_configurer_get_state (self);
	_tmp2_ = _tmp1_;
	games_gamepad_configurer_set_immersive_mode (self, _tmp2_ == GAMES_GAMEPAD_CONFIGURER_STATE_CONFIGURE);
	_tmp3_ = value;
	switch (_tmp3_) {
		case GAMES_GAMEPAD_CONFIGURER_STATE_TEST:
		{
			gchar* user_mapping = NULL;
			GamesGamepadMappingsManager* _tmp4_;
			GamesGamepad* _tmp5_;
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			gchar* _tmp8_;
			GtkButton* _tmp9_;
			const gchar* _tmp10_;
			GtkButton* _tmp11_;
			GtkButton* _tmp12_;
			GtkActionBar* _tmp13_;
			GtkHeaderBar* _tmp14_;
			GtkHeaderBar* _tmp15_;
			GamesGamepad* _tmp16_;
			const gchar* _tmp17_;
			const gchar* _tmp18_;
			gchar* _tmp19_;
			gchar* _tmp20_;
			GtkHeaderBar* _tmp21_;
			GtkHeaderBar* _tmp22_;
			GtkStyleContext* _tmp23_;
			GtkStack* _tmp24_;
			GamesGamepadTester* _tmp25_;
			GamesGamepadMapper* _tmp26_;
			GamesGamepadMapper* _tmp27_;
			guint _tmp28_;
			_tmp4_ = self->priv->mappings_manager;
			_tmp5_ = self->priv->gamepad;
			_tmp6_ = games_gamepad_get_guid (_tmp5_);
			_tmp7_ = _tmp6_;
			_tmp8_ = games_gamepad_mappings_manager_get_user_mapping (_tmp4_, _tmp7_);
			user_mapping = _tmp8_;
			_tmp9_ = self->priv->reset_button;
			_tmp10_ = user_mapping;
			gtk_widget_set_sensitive ((GtkWidget*) _tmp9_, _tmp10_ != NULL);
			_tmp11_ = self->priv->back_button;
			gtk_widget_show ((GtkWidget*) _tmp11_);
			_tmp12_ = self->priv->cancel_button;
			gtk_widget_hide ((GtkWidget*) _tmp12_);
			_tmp13_ = self->priv->action_bar;
			gtk_widget_show ((GtkWidget*) _tmp13_);
			_tmp14_ = games_gamepad_configurer_get_header_bar (self);
			_tmp15_ = _tmp14_;
			_tmp16_ = self->priv->gamepad;
			_tmp17_ = games_gamepad_get_name (_tmp16_);
			_tmp18_ = _tmp17_;
			_tmp19_ = g_strdup_printf (_ ("Testing %s"), _tmp18_);
			_tmp20_ = _tmp19_;
			gtk_header_bar_set_title (_tmp15_, _tmp20_);
			_g_free0 (_tmp20_);
			_tmp21_ = games_gamepad_configurer_get_header_bar (self);
			_tmp22_ = _tmp21_;
			_tmp23_ = gtk_widget_get_style_context ((GtkWidget*) _tmp22_);
			gtk_style_context_remove_class (_tmp23_, "selection-mode");
			_tmp24_ = self->priv->stack;
			gtk_stack_set_visible_child_name (_tmp24_, "gamepad_tester");
			_tmp25_ = self->priv->tester;
			games_gamepad_tester_start (_tmp25_);
			_tmp26_ = self->priv->mapper;
			games_gamepad_mapper_stop (_tmp26_);
			_tmp27_ = self->priv->mapper;
			g_signal_parse_name ("finished", GAMES_TYPE_GAMEPAD_MAPPER, &_tmp28_, NULL, FALSE);
			g_signal_handlers_disconnect_matched (_tmp27_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp28_, 0, NULL, (GCallback) _games_gamepad_configurer_on_mapper_finished_games_gamepad_mapper_finished, self);
			_g_free0 (user_mapping);
			break;
		}
		case GAMES_GAMEPAD_CONFIGURER_STATE_CONFIGURE:
		{
			GtkButton* _tmp29_;
			GtkButton* _tmp30_;
			GtkActionBar* _tmp31_;
			GtkHeaderBar* _tmp32_;
			GtkHeaderBar* _tmp33_;
			GamesGamepad* _tmp34_;
			const gchar* _tmp35_;
			const gchar* _tmp36_;
			gchar* _tmp37_;
			gchar* _tmp38_;
			GtkHeaderBar* _tmp39_;
			GtkHeaderBar* _tmp40_;
			GtkStyleContext* _tmp41_;
			GtkStack* _tmp42_;
			GamesGamepadTester* _tmp43_;
			GamesGamepadMapper* _tmp44_;
			GamesGamepadMapper* _tmp45_;
			_tmp29_ = self->priv->back_button;
			gtk_widget_hide ((GtkWidget*) _tmp29_);
			_tmp30_ = self->priv->cancel_button;
			gtk_widget_show ((GtkWidget*) _tmp30_);
			_tmp31_ = self->priv->action_bar;
			gtk_widget_hide ((GtkWidget*) _tmp31_);
			_tmp32_ = games_gamepad_configurer_get_header_bar (self);
			_tmp33_ = _tmp32_;
			_tmp34_ = self->priv->gamepad;
			_tmp35_ = games_gamepad_get_name (_tmp34_);
			_tmp36_ = _tmp35_;
			_tmp37_ = g_strdup_printf (_ ("Configuring %s"), _tmp36_);
			_tmp38_ = _tmp37_;
			gtk_header_bar_set_title (_tmp33_, _tmp38_);
			_g_free0 (_tmp38_);
			_tmp39_ = games_gamepad_configurer_get_header_bar (self);
			_tmp40_ = _tmp39_;
			_tmp41_ = gtk_widget_get_style_context ((GtkWidget*) _tmp40_);
			gtk_style_context_add_class (_tmp41_, "selection-mode");
			_tmp42_ = self->priv->stack;
			gtk_stack_set_visible_child_name (_tmp42_, "gamepad_mapper");
			_tmp43_ = self->priv->tester;
			games_gamepad_tester_stop (_tmp43_);
			_tmp44_ = self->priv->mapper;
			games_gamepad_mapper_start (_tmp44_);
			_tmp45_ = self->priv->mapper;
			g_signal_connect_object (_tmp45_, "finished", (GCallback) _games_gamepad_configurer_on_mapper_finished_games_gamepad_mapper_finished, self, 0);
			break;
		}
		default:
		break;
	}
}


GtkHeaderBar* games_gamepad_configurer_get_header_bar (GamesGamepadConfigurer* self) {
	GtkHeaderBar* result;
	GtkHeaderBar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_header_bar;
	result = _tmp0_;
	return result;
}


static void games_gamepad_configurer_set_header_bar (GamesGamepadConfigurer* self, GtkHeaderBar* value) {
	g_return_if_fail (self != NULL);
	g_object_notify_by_pspec ((GObject *) self, games_gamepad_configurer_properties[GAMES_GAMEPAD_CONFIGURER_HEADER_BAR_PROPERTY]);
}


gboolean games_gamepad_configurer_get_immersive_mode (GamesGamepadConfigurer* self) {
	gboolean result;
	gboolean _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->_immersive_mode;
	result = _tmp0_;
	return result;
}


static void games_gamepad_configurer_set_immersive_mode (GamesGamepadConfigurer* self, gboolean value) {
	g_return_if_fail (self != NULL);
	if (games_gamepad_configurer_get_immersive_mode (self) != value) {
		gboolean _tmp0_;
		_tmp0_ = value;
		self->priv->_immersive_mode = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, games_gamepad_configurer_properties[GAMES_GAMEPAD_CONFIGURER_IMMERSIVE_MODE_PROPERTY]);
	}
}


static GObject * games_gamepad_configurer_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	GamesGamepadConfigurer * self;
	GamesGamepadMappingsManager* _tmp0_;
	parent_class = G_OBJECT_CLASS (games_gamepad_configurer_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurer);
	_tmp0_ = games_gamepad_mappings_manager_get_instance ();
	_g_object_unref0 (self->priv->mappings_manager);
	self->priv->mappings_manager = _tmp0_;
	return obj;
}


static void games_gamepad_configurer_class_init (GamesGamepadConfigurerClass * klass) {
	gint GamesGamepadConfigurer_private_offset;
	games_gamepad_configurer_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (GamesGamepadConfigurerPrivate));
	G_OBJECT_CLASS (klass)->get_property = _vala_games_gamepad_configurer_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_games_gamepad_configurer_set_property;
	G_OBJECT_CLASS (klass)->constructor = games_gamepad_configurer_constructor;
	G_OBJECT_CLASS (klass)->finalize = games_gamepad_configurer_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_GAMEPAD_CONFIGURER_HEADER_BAR_PROPERTY, games_gamepad_configurer_properties[GAMES_GAMEPAD_CONFIGURER_HEADER_BAR_PROPERTY] = g_param_spec_object ("header-bar", "header-bar", "header-bar", gtk_header_bar_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GAMES_GAMEPAD_CONFIGURER_IMMERSIVE_MODE_PROPERTY, games_gamepad_configurer_properties[GAMES_GAMEPAD_CONFIGURER_IMMERSIVE_MODE_PROPERTY] = g_param_spec_boolean ("immersive-mode", "immersive-mode", "immersive-mode", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
	GamesGamepadConfigurer_private_offset = g_type_class_get_instance_private_offset (klass);
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Games/ui/gamepad-configurer.ui");
	games_gamepad_configurer_signals[GAMES_GAMEPAD_CONFIGURER_BACK_SIGNAL] = g_signal_new ("back", GAMES_TYPE_GAMEPAD_CONFIGURER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "header_bar", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, _header_bar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "gamepad_mapper_holder", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, gamepad_mapper_holder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "gamepad_tester_holder", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, gamepad_tester_holder));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "action_bar", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, action_bar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "reset_button", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, reset_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_button", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, back_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "cancel_button", FALSE, GamesGamepadConfigurer_private_offset + G_STRUCT_OFFSET (GamesGamepadConfigurerPrivate, cancel_button));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_reset_clicked", G_CALLBACK(_games_gamepad_configurer_on_reset_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_configure_clicked", G_CALLBACK(_games_gamepad_configurer_on_configure_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_back_clicked", G_CALLBACK(_games_gamepad_configurer_on_back_clicked_gtk_button_clicked));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_cancel_clicked", G_CALLBACK(_games_gamepad_configurer_on_cancel_clicked_gtk_button_clicked));
}


static void games_gamepad_configurer_instance_init (GamesGamepadConfigurer * self) {
	self->priv = GAMES_GAMEPAD_CONFIGURER_GET_PRIVATE (self);
	gtk_widget_init_template (GTK_WIDGET (self));
}


static void games_gamepad_configurer_finalize (GObject * obj) {
	GamesGamepadConfigurer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurer);
	_g_object_unref0 (self->priv->_header_bar);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->gamepad_mapper_holder);
	_g_object_unref0 (self->priv->gamepad_tester_holder);
	_g_object_unref0 (self->priv->action_bar);
	_g_object_unref0 (self->priv->reset_button);
	_g_object_unref0 (self->priv->back_button);
	_g_object_unref0 (self->priv->cancel_button);
	_g_object_unref0 (self->priv->gamepad);
	_g_object_unref0 (self->priv->mapper);
	_g_object_unref0 (self->priv->tester);
	_g_object_unref0 (self->priv->mappings_manager);
	G_OBJECT_CLASS (games_gamepad_configurer_parent_class)->finalize (obj);
}


GType games_gamepad_configurer_get_type (void) {
	static volatile gsize games_gamepad_configurer_type_id__volatile = 0;
	if (g_once_init_enter (&games_gamepad_configurer_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesGamepadConfigurerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_gamepad_configurer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesGamepadConfigurer), 0, (GInstanceInitFunc) games_gamepad_configurer_instance_init, NULL };
		GType games_gamepad_configurer_type_id;
		games_gamepad_configurer_type_id = g_type_register_static (gtk_box_get_type (), "GamesGamepadConfigurer", &g_define_type_info, 0);
		g_once_init_leave (&games_gamepad_configurer_type_id__volatile, games_gamepad_configurer_type_id);
	}
	return games_gamepad_configurer_type_id__volatile;
}


static void _vala_games_gamepad_configurer_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	GamesGamepadConfigurer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurer);
	switch (property_id) {
		case GAMES_GAMEPAD_CONFIGURER_HEADER_BAR_PROPERTY:
		g_value_set_object (value, games_gamepad_configurer_get_header_bar (self));
		break;
		case GAMES_GAMEPAD_CONFIGURER_IMMERSIVE_MODE_PROPERTY:
		g_value_set_boolean (value, games_gamepad_configurer_get_immersive_mode (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_games_gamepad_configurer_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	GamesGamepadConfigurer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GAMES_TYPE_GAMEPAD_CONFIGURER, GamesGamepadConfigurer);
	switch (property_id) {
		case GAMES_GAMEPAD_CONFIGURER_HEADER_BAR_PROPERTY:
		games_gamepad_configurer_set_header_bar (self, g_value_get_object (value));
		break;
		case GAMES_GAMEPAD_CONFIGURER_IMMERSIVE_MODE_PROPERTY:
		games_gamepad_configurer_set_immersive_mode (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



