/* searchbar.c generated by valac 0.26.0.19-b2255, the Vala compiler
 * generated from searchbar.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 <gdk/gdk.h>
#include <stdlib.h>
#include <string.h>
#include <libgd/gd.h>
#include <gio/gio.h>


#define BOXES_TYPE_SEARCHBAR (boxes_searchbar_get_type ())
#define BOXES_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbar))
#define BOXES_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))
#define BOXES_IS_SEARCHBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SEARCHBAR))
#define BOXES_IS_SEARCHBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SEARCHBAR))
#define BOXES_SEARCHBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SEARCHBAR, BoxesSearchbarClass))

typedef struct _BoxesSearchbar BoxesSearchbar;
typedef struct _BoxesSearchbarClass BoxesSearchbarClass;
typedef struct _BoxesSearchbarPrivate BoxesSearchbarPrivate;

#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_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;
typedef struct _BoxesAppPrivate BoxesAppPrivate;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;

#define BOXES_TYPE_COLLECTION_FILTER (boxes_collection_filter_get_type ())
#define BOXES_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter))
#define BOXES_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))
#define BOXES_IS_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_IS_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_COLLECTION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))

typedef struct _BoxesCollectionFilter BoxesCollectionFilter;
typedef struct _BoxesCollectionFilterClass BoxesCollectionFilterClass;

#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 ())
typedef struct _BoxesAppWindowPrivate BoxesAppWindowPrivate;

#define BOXES_TYPE_TOPBAR (boxes_topbar_get_type ())
#define BOXES_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_TOPBAR, BoxesTopbar))
#define BOXES_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_TOPBAR, BoxesTopbarClass))
#define BOXES_IS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_TOPBAR))
#define BOXES_IS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_TOPBAR))
#define BOXES_TOPBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_TOPBAR, BoxesTopbarClass))

typedef struct _BoxesTopbar BoxesTopbar;
typedef struct _BoxesTopbarClass BoxesTopbarClass;

#define BOXES_TYPE_NOTIFICATIONBAR (boxes_notificationbar_get_type ())
#define BOXES_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbar))
#define BOXES_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))
#define BOXES_IS_NOTIFICATIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_IS_NOTIFICATIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_NOTIFICATIONBAR))
#define BOXES_NOTIFICATIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_NOTIFICATIONBAR, BoxesNotificationbarClass))

typedef struct _BoxesNotificationbar BoxesNotificationbar;
typedef struct _BoxesNotificationbarClass BoxesNotificationbarClass;

#define BOXES_TYPE_SELECTIONBAR (boxes_selectionbar_get_type ())
#define BOXES_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbar))
#define BOXES_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))
#define BOXES_IS_SELECTIONBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SELECTIONBAR))
#define BOXES_IS_SELECTIONBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SELECTIONBAR))
#define BOXES_SELECTIONBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SELECTIONBAR, BoxesSelectionbarClass))

typedef struct _BoxesSelectionbar BoxesSelectionbar;
typedef struct _BoxesSelectionbarClass BoxesSelectionbarClass;

#define BOXES_TYPE_SIDEBAR (boxes_sidebar_get_type ())
#define BOXES_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebar))
#define BOXES_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))
#define BOXES_IS_SIDEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_SIDEBAR))
#define BOXES_IS_SIDEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_SIDEBAR))
#define BOXES_SIDEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_SIDEBAR, BoxesSidebarClass))

typedef struct _BoxesSidebar BoxesSidebar;
typedef struct _BoxesSidebarClass BoxesSidebarClass;

#define BOXES_TYPE_WIZARD (boxes_wizard_get_type ())
#define BOXES_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_WIZARD, BoxesWizard))
#define BOXES_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_WIZARD, BoxesWizardClass))
#define BOXES_IS_WIZARD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_WIZARD))
#define BOXES_IS_WIZARD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_WIZARD))
#define BOXES_WIZARD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_WIZARD, BoxesWizardClass))

typedef struct _BoxesWizard BoxesWizard;
typedef struct _BoxesWizardClass BoxesWizardClass;

#define BOXES_TYPE_PROPERTIES (boxes_properties_get_type ())
#define BOXES_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_PROPERTIES, BoxesProperties))
#define BOXES_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))
#define BOXES_IS_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_PROPERTIES))
#define BOXES_IS_PROPERTIES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_PROPERTIES))
#define BOXES_PROPERTIES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_PROPERTIES, BoxesPropertiesClass))

typedef struct _BoxesProperties BoxesProperties;
typedef struct _BoxesPropertiesClass BoxesPropertiesClass;

#define BOXES_TYPE_DISPLAY_PAGE (boxes_display_page_get_type ())
#define BOXES_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPage))
#define BOXES_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))
#define BOXES_IS_DISPLAY_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_IS_DISPLAY_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_DISPLAY_PAGE))
#define BOXES_DISPLAY_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_DISPLAY_PAGE, BoxesDisplayPageClass))

typedef struct _BoxesDisplayPage BoxesDisplayPage;
typedef struct _BoxesDisplayPageClass BoxesDisplayPageClass;

#define BOXES_TYPE_EMPTY_BOXES (boxes_empty_boxes_get_type ())
#define BOXES_EMPTY_BOXES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxes))
#define BOXES_EMPTY_BOXES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxesClass))
#define BOXES_IS_EMPTY_BOXES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_EMPTY_BOXES))
#define BOXES_IS_EMPTY_BOXES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_EMPTY_BOXES))
#define BOXES_EMPTY_BOXES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_EMPTY_BOXES, BoxesEmptyBoxesClass))

typedef struct _BoxesEmptyBoxes BoxesEmptyBoxes;
typedef struct _BoxesEmptyBoxesClass BoxesEmptyBoxesClass;

#define BOXES_TYPE_COLLECTION_VIEW (boxes_collection_view_get_type ())
#define BOXES_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionView))
#define BOXES_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))
#define BOXES_IS_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_IS_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_VIEW))
#define BOXES_COLLECTION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_VIEW, BoxesCollectionViewClass))

typedef struct _BoxesCollectionView BoxesCollectionView;
typedef struct _BoxesCollectionViewClass BoxesCollectionViewClass;

struct _BoxesSearchbar {
	GtkSearchBar parent_instance;
	BoxesSearchbarPrivate * priv;
};

struct _BoxesSearchbarClass {
	GtkSearchBarClass parent_class;
};

struct _BoxesSearchbarPrivate {
	GtkSearchEntry* entry;
	BoxesAppWindow* window;
	gulong key_handler_id;
};

struct _BoxesApp {
	GtkApplication parent_instance;
	BoxesAppPrivate * priv;
	BoxesCollection* collection;
	BoxesCollectionFilter* filter;
};

struct _BoxesAppClass {
	GtkApplicationClass parent_class;
};

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

struct _BoxesAppWindow {
	GtkApplicationWindow parent_instance;
	BoxesAppWindowPrivate * priv;
	BoxesSearchbar* searchbar;
	BoxesTopbar* topbar;
	BoxesNotificationbar* notificationbar;
	BoxesSelectionbar* selectionbar;
	BoxesSidebar* sidebar;
	BoxesWizard* wizard;
	BoxesProperties* properties;
	BoxesDisplayPage* display_page;
	BoxesEmptyBoxes* empty_boxes;
	GtkStack* below_bin;
	BoxesCollectionView* view;
	GSettings* settings;
};

struct _BoxesAppWindowClass {
	GtkApplicationWindowClass parent_class;
};


static gpointer boxes_searchbar_parent_class = NULL;
extern BoxesApp* boxes_app_app;

GType boxes_searchbar_get_type (void) G_GNUC_CONST;
GType boxes_app_window_get_type (void) G_GNUC_CONST;
#define BOXES_SEARCHBAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_SEARCHBAR, BoxesSearchbarPrivate))
enum  {
	BOXES_SEARCHBAR_DUMMY_PROPERTY,
	BOXES_SEARCHBAR_ENABLE_KEY_HANDLER,
	BOXES_SEARCHBAR_TEXT
};
void boxes_searchbar_setup_ui (BoxesSearchbar* self, BoxesAppWindow* window);
static gboolean boxes_searchbar_on_app_key_pressed (BoxesSearchbar* self, GtkWidget* widget, GdkEventKey* event);
static gboolean _boxes_searchbar_on_app_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self);
static void boxes_searchbar_on_search_changed (BoxesSearchbar* self);
GType boxes_app_get_type (void) G_GNUC_CONST;
GType boxes_collection_get_type (void) G_GNUC_CONST;
GType boxes_collection_filter_get_type (void) G_GNUC_CONST;
const gchar* boxes_searchbar_get_text (BoxesSearchbar* self);
void boxes_collection_filter_set_text (BoxesCollectionFilter* self, const gchar* value);
GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_topbar_get_type (void) G_GNUC_CONST;
GType boxes_notificationbar_get_type (void) G_GNUC_CONST;
GType boxes_selectionbar_get_type (void) G_GNUC_CONST;
GType boxes_sidebar_get_type (void) G_GNUC_CONST;
GType boxes_wizard_get_type (void) G_GNUC_CONST;
GType boxes_properties_get_type (void) G_GNUC_CONST;
GType boxes_display_page_get_type (void) G_GNUC_CONST;
GType boxes_empty_boxes_get_type (void) G_GNUC_CONST;
GType boxes_collection_view_get_type (void) G_GNUC_CONST;
void boxes_collection_view_refilter (BoxesCollectionView* self);
static void _boxes_searchbar_on_search_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender, gpointer self);
static void boxes_searchbar_on_search_activated (BoxesSearchbar* self);
void boxes_collection_view_activate_first_item (BoxesCollectionView* self);
static void _boxes_searchbar_on_search_activated_gtk_entry_activate (GtkEntry* _sender, gpointer self);
static void boxes_searchbar_on_search_mode_notify (BoxesSearchbar* self);
void boxes_searchbar_set_text (BoxesSearchbar* self, const gchar* value);
static void _boxes_searchbar_on_search_mode_notify_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
BoxesSearchbar* boxes_searchbar_new (void);
BoxesSearchbar* boxes_searchbar_construct (GType object_type);
void boxes_searchbar_set_enable_key_handler (BoxesSearchbar* self, gboolean value);
static GObject * boxes_searchbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void boxes_searchbar_finalize (GObject* obj);
static void _vala_boxes_searchbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_boxes_searchbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


static gpointer _g_object_ref0 (gpointer self) {
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	return self ? g_object_ref (self) : NULL;
#line 288 "searchbar.c"
}


static gboolean _boxes_searchbar_on_app_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender, GdkEventKey* event, gpointer self) {
	gboolean result;
	result = boxes_searchbar_on_app_key_pressed ((BoxesSearchbar*) self, _sender, event);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	return result;
#line 297 "searchbar.c"
}


void boxes_searchbar_setup_ui (BoxesSearchbar* self, BoxesAppWindow* window) {
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesAppWindow* _tmp1_ = NULL;
	BoxesAppWindow* _tmp2_ = NULL;
	gulong _tmp3_ = 0UL;
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_if_fail (self != NULL);
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_if_fail (window != NULL);
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp0_ = window;
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_g_object_unref0 (self->priv->window);
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	self->priv->window = _tmp1_;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp2_ = window;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp3_ = g_signal_connect_object ((GtkWidget*) _tmp2_, "key-press-event", (GCallback) _boxes_searchbar_on_app_key_pressed_gtk_widget_key_press_event, self, 0);
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	self->priv->key_handler_id = _tmp3_;
#line 324 "searchbar.c"
}


static void boxes_searchbar_on_search_changed (BoxesSearchbar* self) {
	BoxesApp* _tmp0_ = NULL;
	BoxesCollectionFilter* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	const gchar* _tmp3_ = NULL;
	BoxesAppWindow* _tmp4_ = NULL;
	BoxesCollectionView* _tmp5_ = NULL;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_if_fail (self != NULL);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp0_ = boxes_app_app;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp1_ = _tmp0_->filter;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp2_ = boxes_searchbar_get_text (self);
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp3_ = _tmp2_;
#line 32 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	boxes_collection_filter_set_text (_tmp1_, _tmp3_);
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp4_ = self->priv->window;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp5_ = _tmp4_->view;
#line 33 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	boxes_collection_view_refilter (_tmp5_);
#line 353 "searchbar.c"
}


static void _boxes_searchbar_on_search_changed_gtk_search_entry_search_changed (GtkSearchEntry* _sender, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	boxes_searchbar_on_search_changed ((BoxesSearchbar*) self);
#line 360 "searchbar.c"
}


static void boxes_searchbar_on_search_activated (BoxesSearchbar* self) {
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesCollectionView* _tmp1_ = NULL;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_if_fail (self != NULL);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp0_ = self->priv->window;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp1_ = _tmp0_->view;
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	boxes_collection_view_activate_first_item (_tmp1_);
#line 375 "searchbar.c"
}


static void _boxes_searchbar_on_search_activated_gtk_entry_activate (GtkEntry* _sender, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	boxes_searchbar_on_search_activated ((BoxesSearchbar*) self);
#line 382 "searchbar.c"
}


static void boxes_searchbar_on_search_mode_notify (BoxesSearchbar* self) {
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
#line 42 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_if_fail (self != NULL);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_object_get ((GtkSearchBar*) self, "search-mode-enabled", &_tmp0_, NULL);
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp1_ = _tmp0_;
#line 43 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	if (!_tmp1_) {
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		boxes_searchbar_set_text (self, "");
#line 399 "searchbar.c"
	}
}


static void _boxes_searchbar_on_search_mode_notify_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	boxes_searchbar_on_search_mode_notify ((BoxesSearchbar*) self);
#line 407 "searchbar.c"
}


static gboolean boxes_searchbar_on_app_key_pressed (BoxesSearchbar* self, GtkWidget* widget, GdkEventKey* event) {
	gboolean result = FALSE;
	BoxesAppWindow* _tmp0_ = NULL;
	BoxesUIState _tmp1_ = 0;
	BoxesUIState _tmp2_ = 0;
	GdkEventKey* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_val_if_fail (widget != NULL, FALSE);
#line 52 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp0_ = self->priv->window;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp2_ = _tmp1_;
#line 53 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	if (_tmp2_ != BOXES_UI_STATE_COLLECTION) {
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		result = FALSE;
#line 54 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		return result;
#line 436 "searchbar.c"
	}
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp3_ = event;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp4_ = gtk_search_bar_handle_event ((GtkSearchBar*) self, (GdkEvent*) _tmp3_);
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	result = _tmp4_;
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	return result;
#line 446 "searchbar.c"
}


BoxesSearchbar* boxes_searchbar_construct (GType object_type) {
	BoxesSearchbar * self = NULL;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	self = (BoxesSearchbar*) g_object_new (object_type, NULL);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	return self;
#line 456 "searchbar.c"
}


BoxesSearchbar* boxes_searchbar_new (void) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	return boxes_searchbar_construct (BOXES_TYPE_SEARCHBAR);
#line 463 "searchbar.c"
}


void boxes_searchbar_set_enable_key_handler (BoxesSearchbar* self, gboolean value) {
	gboolean _tmp0_ = FALSE;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_if_fail (self != NULL);
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp0_ = value;
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	if (_tmp0_) {
#line 475 "searchbar.c"
		BoxesAppWindow* _tmp1_ = NULL;
		gulong _tmp2_ = 0UL;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		_tmp1_ = self->priv->window;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		_tmp2_ = self->priv->key_handler_id;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		g_signal_handler_unblock (_tmp1_, _tmp2_);
#line 484 "searchbar.c"
	} else {
		BoxesAppWindow* _tmp3_ = NULL;
		gulong _tmp4_ = 0UL;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		_tmp3_ = self->priv->window;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		_tmp4_ = self->priv->key_handler_id;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		g_signal_handler_block (_tmp3_, _tmp4_);
#line 494 "searchbar.c"
	}
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_object_notify ((GObject *) self, "enable-key-handler");
#line 498 "searchbar.c"
}


const gchar* boxes_searchbar_get_text (BoxesSearchbar* self) {
	const gchar* result;
	GtkSearchEntry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp0_ = self->priv->entry;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp1_ = gtk_entry_get_text ((GtkEntry*) _tmp0_);
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp2_ = _tmp1_;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	result = _tmp2_;
#line 48 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	return result;
#line 519 "searchbar.c"
}


void boxes_searchbar_set_text (BoxesSearchbar* self, const gchar* value) {
	GtkSearchEntry* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_return_if_fail (self != NULL);
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp0_ = self->priv->entry;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_tmp1_ = value;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	gtk_entry_set_text ((GtkEntry*) _tmp0_, _tmp1_);
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_object_notify ((GObject *) self, "text");
#line 536 "searchbar.c"
}


static GObject * boxes_searchbar_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesSearchbar * self;
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	parent_class = G_OBJECT_CLASS (boxes_searchbar_parent_class);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
#line 21 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_object_set ((GtkSearchBar*) self, "search-mode-enabled", FALSE, NULL);
#line 20 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	return obj;
#line 554 "searchbar.c"
}


static void boxes_searchbar_class_init (BoxesSearchbarClass * klass) {
	gint BoxesSearchbar_private_offset;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	boxes_searchbar_parent_class = g_type_class_peek_parent (klass);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_type_class_add_private (klass, sizeof (BoxesSearchbarPrivate));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_searchbar_get_property;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_searchbar_set_property;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_searchbar_constructor;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_searchbar_finalize;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SEARCHBAR_ENABLE_KEY_HANDLER, g_param_spec_boolean ("enable-key-handler", "enable-key-handler", "enable-key-handler", FALSE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_SEARCHBAR_TEXT, g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	BoxesSearchbar_private_offset = g_type_class_get_instance_private_offset (klass);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Boxes/ui/searchbar.ui");
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "entry", FALSE, BoxesSearchbar_private_offset + G_STRUCT_OFFSET (BoxesSearchbarPrivate, entry));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_changed", G_CALLBACK(_boxes_searchbar_on_search_changed_gtk_search_entry_search_changed));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_activated", G_CALLBACK(_boxes_searchbar_on_search_activated_gtk_entry_activate));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_search_mode_notify", G_CALLBACK(_boxes_searchbar_on_search_mode_notify_g_object_notify));
#line 588 "searchbar.c"
}


static void boxes_searchbar_instance_init (BoxesSearchbar * self) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	self->priv = BOXES_SEARCHBAR_GET_PRIVATE (self);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	gtk_widget_init_template (GTK_WIDGET (self));
#line 597 "searchbar.c"
}


static void boxes_searchbar_finalize (GObject* obj) {
	BoxesSearchbar * self;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_g_object_unref0 (self->priv->entry);
#line 16 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	_g_object_unref0 (self->priv->window);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	G_OBJECT_CLASS (boxes_searchbar_parent_class)->finalize (obj);
#line 611 "searchbar.c"
}


GType boxes_searchbar_get_type (void) {
	static volatile gsize boxes_searchbar_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_searchbar_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesSearchbarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_searchbar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesSearchbar), 0, (GInstanceInitFunc) boxes_searchbar_instance_init, NULL };
		GType boxes_searchbar_type_id;
		boxes_searchbar_type_id = g_type_register_static (gtk_search_bar_get_type (), "BoxesSearchbar", &g_define_type_info, 0);
		g_once_init_leave (&boxes_searchbar_type_id__volatile, boxes_searchbar_type_id);
	}
	return boxes_searchbar_type_id__volatile;
}


static void _vala_boxes_searchbar_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesSearchbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	switch (property_id) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		case BOXES_SEARCHBAR_TEXT:
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		g_value_set_string (value, boxes_searchbar_get_text (self));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		break;
#line 638 "searchbar.c"
		default:
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		break;
#line 644 "searchbar.c"
	}
}


static void _vala_boxes_searchbar_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesSearchbar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_SEARCHBAR, BoxesSearchbar);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
	switch (property_id) {
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		case BOXES_SEARCHBAR_ENABLE_KEY_HANDLER:
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		boxes_searchbar_set_enable_key_handler (self, g_value_get_boolean (value));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		break;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		case BOXES_SEARCHBAR_TEXT:
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		boxes_searchbar_set_text (self, g_value_get_string (value));
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		break;
#line 666 "searchbar.c"
		default:
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/searchbar.vala"
		break;
#line 672 "searchbar.c"
	}
}



