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

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

#include <glib-object.h>
#include <glib.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

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

#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_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

VALA_EXTERN GType boxes_ui_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType boxes_ui_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (BoxesUI, g_object_unref)
VALA_EXTERN void boxes_ui_set_state (BoxesUI* self,
                         BoxesUIState new_state);
VALA_EXTERN BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
VALA_EXTERN void boxes_ui_set_previous_ui_state (BoxesUI* self,
                                     BoxesUIState value);
VALA_EXTERN void boxes_ui_set_ui_state (BoxesUI* self,
                            BoxesUIState value);
VALA_EXTERN BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
static GType boxes_ui_get_type_once (void);

static GType
boxes_ui_state_get_type_once (void)
{
	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_WIZARD, "BOXES_UI_STATE_WIZARD", "wizard"}, {BOXES_UI_STATE_PROPERTIES, "BOXES_UI_STATE_PROPERTIES", "properties"}, {BOXES_UI_STATE_TROUBLESHOOT, "BOXES_UI_STATE_TROUBLESHOOT", "troubleshoot"}, {0, NULL, NULL}};
	GType boxes_ui_state_type_id;
	boxes_ui_state_type_id = g_enum_register_static ("BoxesUIState", values);
	return boxes_ui_state_type_id;
}

GType
boxes_ui_state_get_type (void)
{
	static volatile gsize boxes_ui_state_type_id__once = 0;
	if (g_once_init_enter (&boxes_ui_state_type_id__once)) {
		GType boxes_ui_state_type_id;
		boxes_ui_state_type_id = boxes_ui_state_get_type_once ();
		g_once_init_leave (&boxes_ui_state_type_id__once, boxes_ui_state_type_id);
	}
	return boxes_ui_state_type_id__once;
}

void
boxes_ui_set_state (BoxesUI* self,
                    BoxesUIState new_state)
{
	BoxesUIState _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	BoxesUIState _tmp3_;
	_tmp0_ = boxes_ui_get_ui_state (self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ == new_state) {
		return;
	}
	_tmp2_ = boxes_ui_get_ui_state (self);
	_tmp3_ = _tmp2_;
	boxes_ui_set_previous_ui_state (self, _tmp3_);
	boxes_ui_set_ui_state (self, new_state);
}

BoxesUIState
boxes_ui_get_previous_ui_state (BoxesUI* self)
{
	BoxesUIIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = BOXES_UI_GET_INTERFACE (self);
	if (_iface_->get_previous_ui_state) {
		return _iface_->get_previous_ui_state (self);
	}
	return 0;
}

void
boxes_ui_set_previous_ui_state (BoxesUI* self,
                                BoxesUIState value)
{
	BoxesUIIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BOXES_UI_GET_INTERFACE (self);
	if (_iface_->set_previous_ui_state) {
		_iface_->set_previous_ui_state (self, value);
	}
}

BoxesUIState
boxes_ui_get_ui_state (BoxesUI* self)
{
	BoxesUIIface* _iface_;
	g_return_val_if_fail (self != NULL, 0);
	_iface_ = BOXES_UI_GET_INTERFACE (self);
	if (_iface_->get_ui_state) {
		return _iface_->get_ui_state (self);
	}
	return 0;
}

void
boxes_ui_set_ui_state (BoxesUI* self,
                       BoxesUIState value)
{
	BoxesUIIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = BOXES_UI_GET_INTERFACE (self);
	if (_iface_->set_ui_state) {
		_iface_->set_ui_state (self, value);
	}
}

static void
boxes_ui_default_init (BoxesUIIface * iface,
                       gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_enum ("previous-ui-state", "previous-ui-state", "previous-ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_interface_install_property (iface, g_param_spec_enum ("ui-state", "ui-state", "ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
}

static GType
boxes_ui_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BoxesUIIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_ui_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType boxes_ui_type_id;
	boxes_ui_type_id = g_type_register_static (G_TYPE_INTERFACE, "BoxesUI", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (boxes_ui_type_id, G_TYPE_OBJECT);
	return boxes_ui_type_id;
}

GType
boxes_ui_get_type (void)
{
	static volatile gsize boxes_ui_type_id__once = 0;
	if (g_once_init_enter (&boxes_ui_type_id__once)) {
		GType boxes_ui_type_id;
		boxes_ui_type_id = boxes_ui_get_type_once ();
		g_once_init_leave (&boxes_ui_type_id__once, boxes_ui_type_id);
	}
	return boxes_ui_type_id__once;
}

