/* keys-input-popover.c generated by valac 0.34.0.71-0c51, the Vala compiler
 * generated from keys-input-popover.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 <gio/gio.h>
#include <glib/gi18n-lib.h>
#include <atk/atk.h>
#include <gdk/gdk.h>
#include <stdlib.h>
#include <string.h>


#define BOXES_TYPE_KEYS_INPUT_POPOVER (boxes_keys_input_popover_get_type ())
#define BOXES_KEYS_INPUT_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_KEYS_INPUT_POPOVER, BoxesKeysInputPopover))
#define BOXES_KEYS_INPUT_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_KEYS_INPUT_POPOVER, BoxesKeysInputPopoverClass))
#define BOXES_IS_KEYS_INPUT_POPOVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_KEYS_INPUT_POPOVER))
#define BOXES_IS_KEYS_INPUT_POPOVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_KEYS_INPUT_POPOVER))
#define BOXES_KEYS_INPUT_POPOVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_KEYS_INPUT_POPOVER, BoxesKeysInputPopoverClass))

typedef struct _BoxesKeysInputPopover BoxesKeysInputPopover;
typedef struct _BoxesKeysInputPopoverClass BoxesKeysInputPopoverClass;
typedef struct _BoxesKeysInputPopoverPrivate BoxesKeysInputPopoverPrivate;

#define BOXES_TYPE_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_TYPE_DISPLAY (boxes_display_get_type ())
#define BOXES_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY, BoxesDisplay))
#define BOXES_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY, BoxesDisplayClass))
#define BOXES_IS_DISPLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY))
#define BOXES_IS_DISPLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY))
#define BOXES_DISPLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY, BoxesDisplayClass))

typedef struct _BoxesDisplay BoxesDisplay;
typedef struct _BoxesDisplayClass BoxesDisplayClass;

struct _BoxesKeysInputPopover {
	GtkPopover parent_instance;
	BoxesKeysInputPopoverPrivate * priv;
};

struct _BoxesKeysInputPopoverClass {
	GtkPopoverClass parent_class;
};

struct _BoxesKeysInputPopoverPrivate {
	BoxesAppWindow* window;
	GSimpleActionGroup* action_group;
};


static gpointer boxes_keys_input_popover_parent_class = NULL;

GType boxes_keys_input_popover_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
#define BOXES_KEYS_INPUT_POPOVER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_KEYS_INPUT_POPOVER, BoxesKeysInputPopoverPrivate))
enum  {
	BOXES_KEYS_INPUT_POPOVER_DUMMY_PROPERTY
};
static void boxes_keys_input_popover_ctrl_alt_backspace_activated (BoxesKeysInputPopover* self);
static void _boxes_keys_input_popover_ctrl_alt_backspace_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
static void boxes_keys_input_popover_ctrl_alt_fn_activated (BoxesKeysInputPopover* self, GSimpleAction* action);
static void _boxes_keys_input_popover_ctrl_alt_fn_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self);
BoxesKeysInputPopover* boxes_keys_input_popover_new (BoxesAppWindow* window);
BoxesKeysInputPopover* boxes_keys_input_popover_construct (GType object_type, BoxesAppWindow* window);
static void boxes_keys_input_popover_send_keys (BoxesKeysInputPopover* self, guint* keyvals, int keyvals_length1);
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
GType boxes_machine_get_type (void) G_GNUC_CONST;
BoxesCollectionItem* boxes_app_window_get_current_item (BoxesAppWindow* self);
GType boxes_display_get_type (void) G_GNUC_CONST;
BoxesDisplay* boxes_machine_get_display (BoxesMachine* self);
void boxes_display_send_keys (BoxesDisplay* self, guint* keyvals, int keyvals_length1);
static void boxes_keys_input_popover_finalize (GObject* obj);

static const GActionEntry BOXES_KEYS_INPUT_POPOVER_action_entries[5] = {{"ctrl+alt+backspace", _boxes_keys_input_popover_ctrl_alt_backspace_activated_gsimple_action_activate_callback}, {"ctrl+alt+f1", _boxes_keys_input_popover_ctrl_alt_fn_activated_gsimple_action_activate_callback}, {"ctrl+alt+f2", _boxes_keys_input_popover_ctrl_alt_fn_activated_gsimple_action_activate_callback}, {"ctrl+alt+f3", _boxes_keys_input_popover_ctrl_alt_fn_activated_gsimple_action_activate_callback}, {"ctrl+alt+f7", _boxes_keys_input_popover_ctrl_alt_fn_activated_gsimple_action_activate_callback}};

static void _boxes_keys_input_popover_ctrl_alt_backspace_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	boxes_keys_input_popover_ctrl_alt_backspace_activated ((BoxesKeysInputPopover*) self);
#line 113 "keys-input-popover.c"
}


static void _boxes_keys_input_popover_ctrl_alt_fn_activated_gsimple_action_activate_callback (GSimpleAction* action, GVariant* parameter, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	boxes_keys_input_popover_ctrl_alt_fn_activated ((BoxesKeysInputPopover*) self, action);
#line 120 "keys-input-popover.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	return self ? g_object_ref (self) : NULL;
#line 127 "keys-input-popover.c"
}


BoxesKeysInputPopover* boxes_keys_input_popover_construct (GType object_type, BoxesAppWindow* window) {
	BoxesKeysInputPopover * self = NULL;
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesAppWindow* _tmp1_ = NULL;
	GSimpleActionGroup* _tmp2_ = NULL;
	GSimpleActionGroup* _tmp3_ = NULL;
	GSimpleActionGroup* _tmp4_ = NULL;
	GMenu* menu = NULL;
	GMenu* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GMenu* section = NULL;
	GMenu* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	const gchar* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	AtkObject* a11y = NULL;
	AtkObject* _tmp12_ = NULL;
	AtkObject* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_return_val_if_fail (window != NULL, NULL);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	self = (BoxesKeysInputPopover*) g_object_new (object_type, NULL);
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_ = window;
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (self->priv->window);
#line 17 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	self->priv->window = _tmp1_;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp2_ = g_simple_action_group_new ();
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (self->priv->action_group);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	self->priv->action_group = _tmp2_;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp3_ = self->priv->action_group;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_action_map_add_action_entries ((GActionMap*) _tmp3_, BOXES_KEYS_INPUT_POPOVER_action_entries, G_N_ELEMENTS (BOXES_KEYS_INPUT_POPOVER_action_entries), self);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp4_ = self->priv->action_group;
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	gtk_widget_insert_action_group ((GtkWidget*) self, "key", (GActionGroup*) _tmp4_);
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp5_ = g_menu_new ();
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	menu = _tmp5_;
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp6_ = _ ("Ctrl + Alt + Backspace");
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_menu_append (menu, _tmp6_, "key.ctrl+alt+backspace");
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp7_ = g_menu_new ();
#line 28 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	section = _tmp7_;
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp8_ = _ ("Ctrl + Alt + F1");
#line 29 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_menu_append (section, _tmp8_, "key.ctrl+alt+f1");
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp9_ = _ ("Ctrl + Alt + F2");
#line 30 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_menu_append (section, _tmp9_, "key.ctrl+alt+f2");
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp10_ = _ ("Ctrl + Alt + F3");
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_menu_append (section, _tmp10_, "key.ctrl+alt+f2");
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp11_ = _ ("Ctrl + Alt + F7");
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_menu_append (section, _tmp11_, "key.ctrl+alt+f7");
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_menu_append_section (menu, NULL, (GMenuModel*) section);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	gtk_popover_bind_model ((GtkPopover*) self, (GMenuModel*) menu, NULL);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp12_ = gtk_widget_get_accessible ((GtkWidget*) self);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp13_ = _g_object_ref0 (_tmp12_);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	a11y = _tmp13_;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	a11y->role = ATK_ROLE_POPUP_MENU;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp14_ = _ ("Send key combinations");
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	a11y->name = _tmp14_;
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (a11y);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (section);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (menu);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	return self;
#line 229 "keys-input-popover.c"
}


BoxesKeysInputPopover* boxes_keys_input_popover_new (BoxesAppWindow* window) {
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	return boxes_keys_input_popover_construct (BOXES_TYPE_KEYS_INPUT_POPOVER, window);
#line 236 "keys-input-popover.c"
}


static void boxes_keys_input_popover_ctrl_alt_backspace_activated (BoxesKeysInputPopover* self) {
	guint* keyvals = NULL;
	guint* _tmp0_ = NULL;
	gint keyvals_length1 = 0;
	gint _keyvals_size_ = 0;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_return_if_fail (self != NULL);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_ = g_new0 (guint, 3);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_[0] = (guint) GDK_KEY_Control_L;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_[1] = (guint) GDK_KEY_Alt_L;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_[2] = (guint) GDK_KEY_BackSpace;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	keyvals = _tmp0_;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	keyvals_length1 = 3;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_keyvals_size_ = keyvals_length1;
#line 47 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	boxes_keys_input_popover_send_keys (self, keyvals, keyvals_length1);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	keyvals = (g_free (keyvals), NULL);
#line 265 "keys-input-popover.c"
}


static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_ = 0L;
	gchar _tmp1_ = '\0';
#line 1102 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, '\0');
#line 1103 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = index;
#line 1103 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = ((gchar*) self)[_tmp0_];
#line 1103 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	result = _tmp1_;
#line 1103 "/jhbuild/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 283 "keys-input-popover.c"
}


static void boxes_keys_input_popover_ctrl_alt_fn_activated (BoxesKeysInputPopover* self, GSimpleAction* action) {
	guint* keyvals = NULL;
	guint* _tmp0_ = NULL;
	gint keyvals_length1 = 0;
	gint _keyvals_size_ = 0;
	GSimpleAction* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	GSimpleAction* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	gchar _tmp9_ = '\0';
	guint* _tmp45_ = NULL;
	gint _tmp45__length1 = 0;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_return_if_fail (self != NULL);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_return_if_fail (action != NULL);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_ = g_new0 (guint, 3);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_[0] = (guint) GDK_KEY_Control_L;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_[1] = (guint) GDK_KEY_Alt_L;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_[2] = (guint) 0;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	keyvals = _tmp0_;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	keyvals_length1 = 3;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_keyvals_size_ = keyvals_length1;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp1_ = action;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp2_ = g_action_get_name ((GAction*) _tmp1_);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp3_ = _tmp2_;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp4_ = action;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp5_ = g_action_get_name ((GAction*) _tmp4_);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp6_ = _tmp5_;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp7_ = strlen (_tmp6_);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp8_ = _tmp7_;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp9_ = string_get (_tmp3_, (glong) (_tmp8_ - 1));
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	if (_tmp9_ == '1') {
#line 341 "keys-input-popover.c"
		guint* _tmp10_ = NULL;
		gint _tmp10__length1 = 0;
		guint _tmp11_ = 0U;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp10_ = keyvals;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp10__length1 = keyvals_length1;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp10_[2] = (guint) GDK_KEY_F1;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp11_ = _tmp10_[2];
#line 353 "keys-input-popover.c"
	} else {
		GSimpleAction* _tmp12_ = NULL;
		const gchar* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		GSimpleAction* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		const gchar* _tmp17_ = NULL;
		gint _tmp18_ = 0;
		gint _tmp19_ = 0;
		gchar _tmp20_ = '\0';
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp12_ = action;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp13_ = g_action_get_name ((GAction*) _tmp12_);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp14_ = _tmp13_;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp15_ = action;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp16_ = g_action_get_name ((GAction*) _tmp15_);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp17_ = _tmp16_;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp18_ = strlen (_tmp17_);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp19_ = _tmp18_;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp20_ = string_get (_tmp14_, (glong) (_tmp19_ - 1));
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		if (_tmp20_ == '2') {
#line 384 "keys-input-popover.c"
			guint* _tmp21_ = NULL;
			gint _tmp21__length1 = 0;
			guint _tmp22_ = 0U;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp21_ = keyvals;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp21__length1 = keyvals_length1;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp21_[2] = (guint) GDK_KEY_F2;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp22_ = _tmp21_[2];
#line 396 "keys-input-popover.c"
		} else {
			GSimpleAction* _tmp23_ = NULL;
			const gchar* _tmp24_ = NULL;
			const gchar* _tmp25_ = NULL;
			GSimpleAction* _tmp26_ = NULL;
			const gchar* _tmp27_ = NULL;
			const gchar* _tmp28_ = NULL;
			gint _tmp29_ = 0;
			gint _tmp30_ = 0;
			gchar _tmp31_ = '\0';
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp23_ = action;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp24_ = g_action_get_name ((GAction*) _tmp23_);
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp25_ = _tmp24_;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp26_ = action;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp27_ = g_action_get_name ((GAction*) _tmp26_);
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp28_ = _tmp27_;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp29_ = strlen (_tmp28_);
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp30_ = _tmp29_;
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			_tmp31_ = string_get (_tmp25_, (glong) (_tmp30_ - 1));
#line 57 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
			if (_tmp31_ == '3') {
#line 427 "keys-input-popover.c"
				guint* _tmp32_ = NULL;
				gint _tmp32__length1 = 0;
				guint _tmp33_ = 0U;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp32_ = keyvals;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp32__length1 = keyvals_length1;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp32_[3] = (guint) GDK_KEY_F3;
#line 58 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp33_ = _tmp32_[3];
#line 439 "keys-input-popover.c"
			} else {
				GSimpleAction* _tmp34_ = NULL;
				const gchar* _tmp35_ = NULL;
				const gchar* _tmp36_ = NULL;
				GSimpleAction* _tmp37_ = NULL;
				const gchar* _tmp38_ = NULL;
				const gchar* _tmp39_ = NULL;
				gint _tmp40_ = 0;
				gint _tmp41_ = 0;
				gchar _tmp42_ = '\0';
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp34_ = action;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp35_ = g_action_get_name ((GAction*) _tmp34_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp36_ = _tmp35_;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp37_ = action;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp38_ = g_action_get_name ((GAction*) _tmp37_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp39_ = _tmp38_;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp40_ = strlen (_tmp39_);
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp41_ = _tmp40_;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				_tmp42_ = string_get (_tmp36_, (glong) (_tmp41_ - 1));
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
				if (_tmp42_ == '7') {
#line 470 "keys-input-popover.c"
					guint* _tmp43_ = NULL;
					gint _tmp43__length1 = 0;
					guint _tmp44_ = 0U;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
					_tmp43_ = keyvals;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
					_tmp43__length1 = keyvals_length1;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
					_tmp43_[2] = (guint) GDK_KEY_F7;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
					_tmp44_ = _tmp43_[2];
#line 482 "keys-input-popover.c"
				} else {
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
					g_warn_if_reached ();
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
					keyvals = (g_free (keyvals), NULL);
#line 64 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
					return;
#line 490 "keys-input-popover.c"
				}
			}
		}
	}
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp45_ = keyvals;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp45__length1 = keyvals_length1;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	boxes_keys_input_popover_send_keys (self, _tmp45_, _tmp45__length1);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	keyvals = (g_free (keyvals), NULL);
#line 503 "keys-input-popover.c"
}


static void boxes_keys_input_popover_send_keys (BoxesKeysInputPopover* self, guint* keyvals, int keyvals_length1) {
	BoxesMachine* machine = NULL;
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesMachine* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
	BoxesMachine* _tmp5_ = NULL;
	BoxesMachine* _tmp9_ = NULL;
	BoxesDisplay* _tmp10_ = NULL;
	BoxesDisplay* _tmp11_ = NULL;
	guint* _tmp12_ = NULL;
	gint _tmp12__length1 = 0;
#line 70 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_return_if_fail (self != NULL);
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp0_ = self->priv->window;
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp1_ = boxes_app_window_get_current_item (_tmp0_);
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp2_ = _tmp1_;
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp2_) : NULL);
#line 71 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	machine = _tmp3_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp5_ = machine;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	if (_tmp5_ != NULL) {
#line 536 "keys-input-popover.c"
		BoxesMachine* _tmp6_ = NULL;
		BoxesDisplay* _tmp7_ = NULL;
		BoxesDisplay* _tmp8_ = NULL;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp6_ = machine;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp7_ = boxes_machine_get_display (_tmp6_);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp8_ = _tmp7_;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp4_ = _tmp8_ != NULL;
#line 548 "keys-input-popover.c"
	} else {
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
		_tmp4_ = FALSE;
#line 552 "keys-input-popover.c"
	}
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_return_if_fail (_tmp4_);
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp9_ = machine;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp10_ = boxes_machine_get_display (_tmp9_);
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp11_ = _tmp10_;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp12_ = keyvals;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_tmp12__length1 = keyvals_length1;
#line 74 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	boxes_display_send_keys (_tmp11_, _tmp12_, _tmp12__length1);
#line 70 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (machine);
#line 570 "keys-input-popover.c"
}


static void boxes_keys_input_popover_class_init (BoxesKeysInputPopoverClass * klass) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	boxes_keys_input_popover_parent_class = g_type_class_peek_parent (klass);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	g_type_class_add_private (klass, sizeof (BoxesKeysInputPopoverPrivate));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_keys_input_popover_finalize;
#line 581 "keys-input-popover.c"
}


static void boxes_keys_input_popover_instance_init (BoxesKeysInputPopover * self) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	self->priv = BOXES_KEYS_INPUT_POPOVER_GET_PRIVATE (self);
#line 588 "keys-input-popover.c"
}


static void boxes_keys_input_popover_finalize (GObject* obj) {
	BoxesKeysInputPopover * self;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_KEYS_INPUT_POPOVER, BoxesKeysInputPopover);
#line 13 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (self->priv->window);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	_g_object_unref0 (self->priv->action_group);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/keys-input-popover.vala"
	G_OBJECT_CLASS (boxes_keys_input_popover_parent_class)->finalize (obj);
#line 602 "keys-input-popover.c"
}


GType boxes_keys_input_popover_get_type (void) {
	static volatile gsize boxes_keys_input_popover_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_keys_input_popover_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesKeysInputPopoverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_keys_input_popover_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesKeysInputPopover), 0, (GInstanceInitFunc) boxes_keys_input_popover_instance_init, NULL };
		GType boxes_keys_input_popover_type_id;
		boxes_keys_input_popover_type_id = g_type_register_static (gtk_popover_get_type (), "BoxesKeysInputPopover", &g_define_type_info, 0);
		g_once_init_leave (&boxes_keys_input_popover_type_id__volatile, boxes_keys_input_popover_type_id);
	}
	return boxes_keys_input_popover_type_id__volatile;
}



