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

/* This file is part of GNOME Games. License: GPLv3*/

#include <glib.h>
#include <glib-object.h>


#define GAMES_TYPE_GAMEPAD_DPAD (games_gamepad_dpad_get_type ())
#define GAMES_GAMEPAD_DPAD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GAMES_TYPE_GAMEPAD_DPAD, GamesGamepadDPad))
#define GAMES_GAMEPAD_DPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GAMES_TYPE_GAMEPAD_DPAD, GamesGamepadDPadClass))
#define GAMES_IS_GAMEPAD_DPAD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GAMES_TYPE_GAMEPAD_DPAD))
#define GAMES_IS_GAMEPAD_DPAD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GAMES_TYPE_GAMEPAD_DPAD))
#define GAMES_GAMEPAD_DPAD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GAMES_TYPE_GAMEPAD_DPAD, GamesGamepadDPadClass))

typedef struct _GamesGamepadDPad GamesGamepadDPad;
typedef struct _GamesGamepadDPadClass GamesGamepadDPadClass;
typedef struct _GamesGamepadDPadPrivate GamesGamepadDPadPrivate;

#define GAMES_TYPE_GAMEPAD_INPUT_TYPE (games_gamepad_input_type_get_type ())

typedef enum  {
	GAMES_GAMEPAD_INPUT_TYPE_AXIS,
	GAMES_GAMEPAD_INPUT_TYPE_BUTTON,
	GAMES_GAMEPAD_INPUT_TYPE_INVALID
} GamesGamepadInputType;

struct _GamesGamepadDPad {
	GObject parent_instance;
	GamesGamepadDPadPrivate * priv;
	GamesGamepadInputType types[4];
	gint values[4];
	gint axis_values[2];
};

struct _GamesGamepadDPadClass {
	GObjectClass parent_class;
};


static gpointer games_gamepad_dpad_parent_class = NULL;

GType games_gamepad_dpad_get_type (void) G_GNUC_CONST;
GType games_gamepad_input_type_get_type (void) G_GNUC_CONST;
enum  {
	GAMES_GAMEPAD_DPAD_DUMMY_PROPERTY
};
GamesGamepadDPad* games_gamepad_dpad_new (void);
GamesGamepadDPad* games_gamepad_dpad_construct (GType object_type);
static void games_gamepad_dpad_finalize (GObject * obj);


GamesGamepadDPad* games_gamepad_dpad_construct (GType object_type) {
	GamesGamepadDPad * self = NULL;
	gint _tmp0_;
	gint _tmp1_;
	GamesGamepadInputType _tmp2_;
	GamesGamepadInputType _tmp3_;
	GamesGamepadInputType _tmp4_;
	GamesGamepadInputType _tmp5_;
	self = (GamesGamepadDPad*) g_object_new (object_type, NULL);
	self->axis_values[1] = 0;
	_tmp0_ = self->axis_values[1];
	self->axis_values[0] = _tmp0_;
	_tmp1_ = self->axis_values[0];
	self->types[3] = GAMES_GAMEPAD_INPUT_TYPE_INVALID;
	_tmp2_ = self->types[3];
	self->types[2] = _tmp2_;
	_tmp3_ = self->types[2];
	self->types[1] = _tmp3_;
	_tmp4_ = self->types[1];
	self->types[0] = _tmp4_;
	_tmp5_ = self->types[0];
	return self;
}


GamesGamepadDPad* games_gamepad_dpad_new (void) {
	return games_gamepad_dpad_construct (GAMES_TYPE_GAMEPAD_DPAD);
}


static void games_gamepad_dpad_class_init (GamesGamepadDPadClass * klass) {
	games_gamepad_dpad_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = games_gamepad_dpad_finalize;
}


static void games_gamepad_dpad_instance_init (GamesGamepadDPad * self) {
}


static void games_gamepad_dpad_finalize (GObject * obj) {
	GamesGamepadDPad * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GAMES_TYPE_GAMEPAD_DPAD, GamesGamepadDPad);
	G_OBJECT_CLASS (games_gamepad_dpad_parent_class)->finalize (obj);
}


GType games_gamepad_dpad_get_type (void) {
	static volatile gsize games_gamepad_dpad_type_id__volatile = 0;
	if (g_once_init_enter (&games_gamepad_dpad_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GamesGamepadDPadClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) games_gamepad_dpad_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GamesGamepadDPad), 0, (GInstanceInitFunc) games_gamepad_dpad_instance_init, NULL };
		GType games_gamepad_dpad_type_id;
		games_gamepad_dpad_type_id = g_type_register_static (G_TYPE_OBJECT, "GamesGamepadDPad", &g_define_type_info, 0);
		g_once_init_leave (&games_gamepad_dpad_type_id__volatile, games_gamepad_dpad_type_id);
	}
	return games_gamepad_dpad_type_id__volatile;
}



