/* ui.c generated by valac 0.17.1.6-d284, the Vala compiler
 * generated from ui.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

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


#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UI, BoxesUIClass))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_IS_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UI))
#define BOXES_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UI, BoxesUIClass))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_SETTINGS,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES
} BoxesUIState;

struct _BoxesUI {
	GObject parent_instance;
	BoxesUIPrivate * priv;
	BoxesUIState previous_ui_state;
};

struct _BoxesUIClass {
	GObjectClass parent_class;
	void (*ui_state_changed) (BoxesUI* self);
	ClutterActor* (*get_actor) (BoxesUI* self);
};

struct _BoxesUIPrivate {
	BoxesUIState _ui_state;
};


static gpointer boxes_ui_parent_class = NULL;

GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
#define BOXES_UI_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_UI, BoxesUIPrivate))
enum  {
	BOXES_UI_DUMMY_PROPERTY,
	BOXES_UI_ACTOR,
	BOXES_UI_UI_STATE
};
void boxes_ui_ui_state_changed (BoxesUI* self);
static void boxes_ui_real_ui_state_changed (BoxesUI* self);
BoxesUI* boxes_ui_construct (GType object_type);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void boxes_ui_finalize (GObject* obj);
static void _vala_boxes_ui_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_ui_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GType boxes_ui_state_get_type (void) {
	static volatile gsize boxes_ui_state_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_ui_state_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_UI_STATE_NONE, "BOXES_UI_STATE_NONE", "none"}, {BOXES_UI_STATE_COLLECTION, "BOXES_UI_STATE_COLLECTION", "collection"}, {BOXES_UI_STATE_CREDS, "BOXES_UI_STATE_CREDS", "creds"}, {BOXES_UI_STATE_DISPLAY, "BOXES_UI_STATE_DISPLAY", "display"}, {BOXES_UI_STATE_SETTINGS, "BOXES_UI_STATE_SETTINGS", "settings"}, {BOXES_UI_STATE_WIZARD, "BOXES_UI_STATE_WIZARD", "wizard"}, {BOXES_UI_STATE_PROPERTIES, "BOXES_UI_STATE_PROPERTIES", "properties"}, {0, NULL, NULL}};
		GType boxes_ui_state_type_id;
		boxes_ui_state_type_id = g_enum_register_static ("BoxesUIState", values);
		g_once_init_leave (&boxes_ui_state_type_id__volatile, boxes_ui_state_type_id);
	}
	return boxes_ui_state_type_id__volatile;
}


static void boxes_ui_real_ui_state_changed (BoxesUI* self) {
	g_critical ("Type `%s' does not implement abstract method `boxes_ui_ui_state_changed'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
	return;
}


void boxes_ui_ui_state_changed (BoxesUI* self) {
	g_return_if_fail (self != NULL);
	BOXES_UI_GET_CLASS (self)->ui_state_changed (self);
}


BoxesUI* boxes_ui_construct (GType object_type) {
	BoxesUI * self = NULL;
	self = (BoxesUI*) g_object_new (object_type, NULL);
	return self;
}


ClutterActor* boxes_ui_get_actor (BoxesUI* self) {
	g_return_val_if_fail (self != NULL, NULL);
	return BOXES_UI_GET_CLASS (self)->get_actor (self);
}


BoxesUIState boxes_ui_get_ui_state (BoxesUI* self) {
	BoxesUIState result;
	BoxesUIState _tmp0_;
	g_return_val_if_fail (self != NULL, 0);
	_tmp0_ = self->priv->_ui_state;
	result = _tmp0_;
	return result;
}


void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value) {
	BoxesUIState _tmp0_;
	BoxesUIState _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_ui_state;
	_tmp1_ = value;
	if (_tmp0_ != _tmp1_) {
		BoxesUIState _tmp2_;
		BoxesUIState _tmp3_;
		_tmp2_ = self->priv->_ui_state;
		self->previous_ui_state = _tmp2_;
		_tmp3_ = value;
		self->priv->_ui_state = _tmp3_;
		boxes_ui_ui_state_changed (self);
		g_object_notify ((GObject*) self, "ui-state");
	}
}


static void boxes_ui_class_init (BoxesUIClass * klass) {
	boxes_ui_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (BoxesUIPrivate));
	BOXES_UI_CLASS (klass)->ui_state_changed = boxes_ui_real_ui_state_changed;
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_ui_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_ui_set_property;
	G_OBJECT_CLASS (klass)->finalize = boxes_ui_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_UI_ACTOR, g_param_spec_object ("actor", "actor", "actor", clutter_actor_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), BOXES_UI_UI_STATE, g_param_spec_enum ("ui-state", "ui-state", "ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void boxes_ui_instance_init (BoxesUI * self) {
	self->priv = BOXES_UI_GET_PRIVATE (self);
}


static void boxes_ui_finalize (GObject* obj) {
	BoxesUI * self;
	self = BOXES_UI (obj);
	G_OBJECT_CLASS (boxes_ui_parent_class)->finalize (obj);
}


GType boxes_ui_get_type (void) {
	static volatile gsize boxes_ui_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_ui_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesUIClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_ui_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesUI), 0, (GInstanceInitFunc) boxes_ui_instance_init, NULL };
		GType boxes_ui_type_id;
		boxes_ui_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesUI", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&boxes_ui_type_id__volatile, boxes_ui_type_id);
	}
	return boxes_ui_type_id__volatile;
}


static void _vala_boxes_ui_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesUI * self;
	self = BOXES_UI (object);
	switch (property_id) {
		case BOXES_UI_UI_STATE:
		g_value_set_enum (value, boxes_ui_get_ui_state (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_boxes_ui_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesUI * self;
	self = BOXES_UI (object);
	switch (property_id) {
		case BOXES_UI_UI_STATE:
		boxes_ui_set_ui_state (self, g_value_get_enum (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



