/* rumble.c generated by valac 0.36.4, the Vala compiler
 * generated from rumble.vala, do not modify */

/* This file is part of retro-gtk. License: GPLv3*/

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


#define RETRO_TYPE_RUMBLE_EFFECT (retro_rumble_effect_get_type ())

#define RETRO_TYPE_RUMBLE (retro_rumble_get_type ())
#define RETRO_RUMBLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RETRO_TYPE_RUMBLE, RetroRumble))
#define RETRO_IS_RUMBLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RETRO_TYPE_RUMBLE))
#define RETRO_RUMBLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RETRO_TYPE_RUMBLE, RetroRumbleIface))

typedef struct _RetroRumble RetroRumble;
typedef struct _RetroRumbleIface RetroRumbleIface;

typedef enum  {
	RETRO_RUMBLE_EFFECT_STRONG,
	RETRO_RUMBLE_EFFECT_WEAK
} RetroRumbleEffect;

struct _RetroRumbleIface {
	GTypeInterface parent_iface;
	gboolean (*set_rumble_state) (RetroRumble* self, guint port, RetroRumbleEffect effect, guint16 strength);
};



GType retro_rumble_effect_get_type (void) G_GNUC_CONST;
GType retro_rumble_get_type (void) G_GNUC_CONST;
gboolean retro_rumble_set_rumble_state (RetroRumble* self, guint port, RetroRumbleEffect effect, guint16 strength);


GType retro_rumble_effect_get_type (void) {
	static volatile gsize retro_rumble_effect_type_id__volatile = 0;
	if (g_once_init_enter (&retro_rumble_effect_type_id__volatile)) {
		static const GEnumValue values[] = {{RETRO_RUMBLE_EFFECT_STRONG, "RETRO_RUMBLE_EFFECT_STRONG", "strong"}, {RETRO_RUMBLE_EFFECT_WEAK, "RETRO_RUMBLE_EFFECT_WEAK", "weak"}, {0, NULL, NULL}};
		GType retro_rumble_effect_type_id;
		retro_rumble_effect_type_id = g_enum_register_static ("RetroRumbleEffect", values);
		g_once_init_leave (&retro_rumble_effect_type_id__volatile, retro_rumble_effect_type_id);
	}
	return retro_rumble_effect_type_id__volatile;
}


gboolean retro_rumble_set_rumble_state (RetroRumble* self, guint port, RetroRumbleEffect effect, guint16 strength) {
	g_return_val_if_fail (self != NULL, FALSE);
	return RETRO_RUMBLE_GET_INTERFACE (self)->set_rumble_state (self, port, effect, strength);
}


static void retro_rumble_base_init (RetroRumbleIface * iface) {
	static gboolean initialized = FALSE;
	if (!initialized) {
		initialized = TRUE;
	}
}


GType retro_rumble_get_type (void) {
	static volatile gsize retro_rumble_type_id__volatile = 0;
	if (g_once_init_enter (&retro_rumble_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RetroRumbleIface), (GBaseInitFunc) retro_rumble_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType retro_rumble_type_id;
		retro_rumble_type_id = g_type_register_static (G_TYPE_INTERFACE, "RetroRumble", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (retro_rumble_type_id, G_TYPE_OBJECT);
		g_once_init_leave (&retro_rumble_type_id__volatile, retro_rumble_type_id);
	}
	return retro_rumble_type_id__volatile;
}



