/* properties-toolbar.c generated by valac 0.24.0.112-bbf5, the Vala compiler
 * generated from properties-toolbar.vala, do not modify */

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

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>


#define BOXES_TYPE_PROPERTIES_TOOLBAR (boxes_properties_toolbar_get_type ())
#define BOXES_PROPERTIES_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar))
#define BOXES_PROPERTIES_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbarClass))
#define BOXES_IS_PROPERTIES_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES_TOOLBAR))
#define BOXES_IS_PROPERTIES_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES_TOOLBAR))
#define BOXES_PROPERTIES_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbarClass))

typedef struct _BoxesPropertiesToolbar BoxesPropertiesToolbar;
typedef struct _BoxesPropertiesToolbarClass BoxesPropertiesToolbarClass;
typedef struct _BoxesPropertiesToolbarPrivate BoxesPropertiesToolbarPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_APP (boxes_app_get_type ())
#define BOXES_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP, BoxesApp))
#define BOXES_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP, BoxesAppClass))
#define BOXES_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP))
#define BOXES_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP))
#define BOXES_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP, BoxesAppClass))

typedef struct _BoxesApp BoxesApp;
typedef struct _BoxesAppClass BoxesAppClass;

#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;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

struct _BoxesPropertiesToolbar {
	GtkHeaderBar parent_instance;
	BoxesPropertiesToolbarPrivate * priv;
};

struct _BoxesPropertiesToolbarClass {
	GtkHeaderBarClass parent_class;
};

struct _BoxesPropertiesToolbarPrivate {
	GtkImage* back_image;
};

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
} BoxesUIState;

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);
};


static gpointer boxes_properties_toolbar_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GType boxes_properties_toolbar_get_type (void) G_GNUC_CONST;
#define BOXES_PROPERTIES_TOOLBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbarPrivate))
enum  {
	BOXES_PROPERTIES_TOOLBAR_DUMMY_PROPERTY
};
static void boxes_properties_toolbar_on_back_clicked (BoxesPropertiesToolbar* self);
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
void boxes_ui_set_state (BoxesUI* self, BoxesUIState new_state);
BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
static void _boxes_properties_toolbar_on_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self);
BoxesPropertiesToolbar* boxes_properties_toolbar_new (void);
BoxesPropertiesToolbar* boxes_properties_toolbar_construct (GType object_type);
static GObject * boxes_properties_toolbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void boxes_properties_toolbar_finalize (GObject* obj);


static void boxes_properties_toolbar_on_back_clicked (BoxesPropertiesToolbar* self) {
	BoxesApp* _tmp0_ = NULL;
	BoxesApp* _tmp1_ = NULL;
	BoxesUIState _tmp2_ = 0;
	BoxesUIState _tmp3_ = 0;
#line 15 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_return_if_fail (self != NULL);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp0_ = boxes_app_app;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = boxes_app_app;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = boxes_ui_get_previous_ui_state ((BoxesUI*) _tmp1_);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp3_ = _tmp2_;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_ui_set_state ((BoxesUI*) _tmp0_, _tmp3_);
#line 115 "properties-toolbar.c"
}


static void _boxes_properties_toolbar_on_back_clicked_gtk_button_clicked (GtkButton* _sender, gpointer self) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_on_back_clicked ((BoxesPropertiesToolbar*) self);
#line 122 "properties-toolbar.c"
}


BoxesPropertiesToolbar* boxes_properties_toolbar_construct (GType object_type) {
	BoxesPropertiesToolbar * self = NULL;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self = (BoxesPropertiesToolbar*) g_object_new (object_type, NULL);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	return self;
#line 132 "properties-toolbar.c"
}


BoxesPropertiesToolbar* boxes_properties_toolbar_new (void) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	return boxes_properties_toolbar_construct (BOXES_TYPE_PROPERTIES_TOOLBAR);
#line 139 "properties-toolbar.c"
}


static GObject * boxes_properties_toolbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesPropertiesToolbar * self;
	const gchar* _tmp0_ = NULL;
	GtkTextDirection _tmp1_ = 0;
	GtkImage* _tmp2_ = NULL;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	parent_class = G_OBJECT_CLASS (boxes_properties_toolbar_parent_class);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp1_ = gtk_widget_get_direction ((GtkWidget*) self);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	if (_tmp1_ == GTK_TEXT_DIR_RTL) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp0_ = "go-previous-rtl-symbolic";
#line 162 "properties-toolbar.c"
	} else {
#line 11 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
		_tmp0_ = "go-previous-symbolic";
#line 166 "properties-toolbar.c"
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_tmp2_ = self->priv->back_image;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_object_set (_tmp2_, "icon-name", _tmp0_, NULL);
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	return obj;
#line 174 "properties-toolbar.c"
}


static void boxes_properties_toolbar_class_init (BoxesPropertiesToolbarClass * klass) {
	gint BoxesPropertiesToolbar_private_offset;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	boxes_properties_toolbar_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesPropertiesToolbarPrivate));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_properties_toolbar_constructor;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_properties_toolbar_finalize;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	BoxesPropertiesToolbar_private_offset = g_type_class_get_instance_private_offset (klass);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/properties-toolbar.ui");
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "back_image", FALSE, BoxesPropertiesToolbar_private_offset + G_STRUCT_OFFSET (BoxesPropertiesToolbarPrivate, back_image));
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_back_clicked", G_CALLBACK(_boxes_properties_toolbar_on_back_clicked_gtk_button_clicked));
#line 196 "properties-toolbar.c"
}


static void boxes_properties_toolbar_instance_init (BoxesPropertiesToolbar * self) {
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self->priv = BOXES_PROPERTIES_TOOLBAR_GET_PRIVATE (self);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 205 "properties-toolbar.c"
}


static void boxes_properties_toolbar_finalize (GObject* obj) {
	BoxesPropertiesToolbar * self;
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_PROPERTIES_TOOLBAR, BoxesPropertiesToolbar);
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	_g_object_unref0 (self->priv->back_image);
#line 5 "/home/zeenix/checkout/gnome/gnome-boxes/src/properties-toolbar.vala"
	G_OBJECT_CLASS (boxes_properties_toolbar_parent_class)->finalize (obj);
#line 217 "properties-toolbar.c"
}


GType boxes_properties_toolbar_get_type (void) {
	static volatile gsize boxes_properties_toolbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_properties_toolbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesPropertiesToolbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_properties_toolbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesPropertiesToolbar), 0, (GInstanceInitFunc) boxes_properties_toolbar_instance_init, NULL };
		GType boxes_properties_toolbar_type_id;
		boxes_properties_toolbar_type_id = g_type_register_static (GTK_TYPE_HEADER_BAR, "BoxesPropertiesToolbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_properties_toolbar_type_id__volatile, boxes_properties_toolbar_type_id);
	}
	return boxes_properties_toolbar_type_id__volatile;
}



