/* view-base.c generated by valac 0.56.17, the Vala compiler
 * generated from view-base.vala, do not modify */

/*
 * Copyright (C) 2010 Michal Hruby <michal.mhr@gmail.com>
 * Copyright (C) 2010 Alberto Aldegheri <albyrock87+dev@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by Alberto Aldegheri <albyrock87+dev@gmail.com>
 *
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <synapse-core.h>
#include <gee.h>
#include <gdk/gdk.h>
#include <cairo-gobject.h>
#include <stdlib.h>
#include <string.h>
#include <gdk/gdkx.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf.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

#define SYNAPSE_GUI_TYPE_IVIEW (synapse_gui_iview_get_type ())
#define SYNAPSE_GUI_IVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_IVIEW, SynapseGuiIView))
#define SYNAPSE_GUI_IS_IVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_IVIEW))
#define SYNAPSE_GUI_IVIEW_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SYNAPSE_GUI_TYPE_IVIEW, SynapseGuiIViewIface))

typedef struct _SynapseGuiIView SynapseGuiIView;
typedef struct _SynapseGuiIViewIface SynapseGuiIViewIface;

#define SYNAPSE_GUI_TYPE_ENTRY (synapse_gui_entry_get_type ())
#define SYNAPSE_GUI_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_ENTRY, SynapseGuiEntry))
#define SYNAPSE_GUI_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_ENTRY, SynapseGuiEntryClass))
#define SYNAPSE_GUI_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_ENTRY))
#define SYNAPSE_GUI_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_ENTRY))
#define SYNAPSE_GUI_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_ENTRY, SynapseGuiEntryClass))

typedef struct _SynapseGuiEntry SynapseGuiEntry;
typedef struct _SynapseGuiEntryClass SynapseGuiEntryClass;

#define SYNAPSE_GUI_TYPE_MODEL (synapse_gui_model_get_type ())
#define SYNAPSE_GUI_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_MODEL, SynapseGuiModel))
#define SYNAPSE_GUI_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_MODEL, SynapseGuiModelClass))
#define SYNAPSE_GUI_IS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_MODEL))
#define SYNAPSE_GUI_IS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_MODEL))
#define SYNAPSE_GUI_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_MODEL, SynapseGuiModelClass))

typedef struct _SynapseGuiModel SynapseGuiModel;
typedef struct _SynapseGuiModelClass SynapseGuiModelClass;

#define SYNAPSE_GUI_TYPE_ICONTROLLER (synapse_gui_icontroller_get_type ())
#define SYNAPSE_GUI_ICONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_ICONTROLLER, SynapseGuiIController))
#define SYNAPSE_GUI_IS_ICONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_ICONTROLLER))
#define SYNAPSE_GUI_ICONTROLLER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), SYNAPSE_GUI_TYPE_ICONTROLLER, SynapseGuiIControllerIface))

typedef struct _SynapseGuiIController SynapseGuiIController;
typedef struct _SynapseGuiIControllerIface SynapseGuiIControllerIface;

#define SYNAPSE_GUI_TYPE_KEY_COMBO_CONFIG (synapse_gui_key_combo_config_get_type ())
#define SYNAPSE_GUI_KEY_COMBO_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_KEY_COMBO_CONFIG, SynapseGuiKeyComboConfig))
#define SYNAPSE_GUI_KEY_COMBO_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_KEY_COMBO_CONFIG, SynapseGuiKeyComboConfigClass))
#define SYNAPSE_GUI_IS_KEY_COMBO_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_KEY_COMBO_CONFIG))
#define SYNAPSE_GUI_IS_KEY_COMBO_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_KEY_COMBO_CONFIG))
#define SYNAPSE_GUI_KEY_COMBO_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_KEY_COMBO_CONFIG, SynapseGuiKeyComboConfigClass))

typedef struct _SynapseGuiKeyComboConfig SynapseGuiKeyComboConfig;
typedef struct _SynapseGuiKeyComboConfigClass SynapseGuiKeyComboConfigClass;

#define SYNAPSE_GUI_TYPE_CATEGORY_CONFIG (synapse_gui_category_config_get_type ())
#define SYNAPSE_GUI_CATEGORY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_CATEGORY_CONFIG, SynapseGuiCategoryConfig))
#define SYNAPSE_GUI_CATEGORY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_CATEGORY_CONFIG, SynapseGuiCategoryConfigClass))
#define SYNAPSE_GUI_IS_CATEGORY_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_CATEGORY_CONFIG))
#define SYNAPSE_GUI_IS_CATEGORY_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_CATEGORY_CONFIG))
#define SYNAPSE_GUI_CATEGORY_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_CATEGORY_CONFIG, SynapseGuiCategoryConfigClass))

typedef struct _SynapseGuiCategoryConfig SynapseGuiCategoryConfig;
typedef struct _SynapseGuiCategoryConfigClass SynapseGuiCategoryConfigClass;

#define SYNAPSE_GUI_TYPE_VIEW (synapse_gui_view_get_type ())
#define SYNAPSE_GUI_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_VIEW, SynapseGuiView))
#define SYNAPSE_GUI_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_VIEW, SynapseGuiViewClass))
#define SYNAPSE_GUI_IS_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_VIEW))
#define SYNAPSE_GUI_IS_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_VIEW))
#define SYNAPSE_GUI_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_VIEW, SynapseGuiViewClass))

typedef struct _SynapseGuiView SynapseGuiView;
typedef struct _SynapseGuiViewClass SynapseGuiViewClass;
typedef struct _SynapseGuiViewPrivate SynapseGuiViewPrivate;

#define SYNAPSE_GUI_UTILS_TYPE_COLOR_HELPER (synapse_gui_utils_color_helper_get_type ())
#define SYNAPSE_GUI_UTILS_COLOR_HELPER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_UTILS_TYPE_COLOR_HELPER, SynapseGuiUtilsColorHelper))
#define SYNAPSE_GUI_UTILS_COLOR_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_UTILS_TYPE_COLOR_HELPER, SynapseGuiUtilsColorHelperClass))
#define SYNAPSE_GUI_UTILS_IS_COLOR_HELPER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_UTILS_TYPE_COLOR_HELPER))
#define SYNAPSE_GUI_UTILS_IS_COLOR_HELPER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_UTILS_TYPE_COLOR_HELPER))
#define SYNAPSE_GUI_UTILS_COLOR_HELPER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_UTILS_TYPE_COLOR_HELPER, SynapseGuiUtilsColorHelperClass))

typedef struct _SynapseGuiUtilsColorHelper SynapseGuiUtilsColorHelper;
typedef struct _SynapseGuiUtilsColorHelperClass SynapseGuiUtilsColorHelperClass;

#define SYNAPSE_GUI_TYPE_HTEXT_SELECTOR (synapse_gui_htext_selector_get_type ())
#define SYNAPSE_GUI_HTEXT_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_HTEXT_SELECTOR, SynapseGuiHTextSelector))
#define SYNAPSE_GUI_HTEXT_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_HTEXT_SELECTOR, SynapseGuiHTextSelectorClass))
#define SYNAPSE_GUI_IS_HTEXT_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_HTEXT_SELECTOR))
#define SYNAPSE_GUI_IS_HTEXT_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_HTEXT_SELECTOR))
#define SYNAPSE_GUI_HTEXT_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_HTEXT_SELECTOR, SynapseGuiHTextSelectorClass))

typedef struct _SynapseGuiHTextSelector SynapseGuiHTextSelector;
typedef struct _SynapseGuiHTextSelectorClass SynapseGuiHTextSelectorClass;

#define SYNAPSE_GUI_TYPE_FAKE_BUTTON (synapse_gui_fake_button_get_type ())
#define SYNAPSE_GUI_FAKE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_FAKE_BUTTON, SynapseGuiFakeButton))
#define SYNAPSE_GUI_FAKE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_FAKE_BUTTON, SynapseGuiFakeButtonClass))
#define SYNAPSE_GUI_IS_FAKE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_FAKE_BUTTON))
#define SYNAPSE_GUI_IS_FAKE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_FAKE_BUTTON))
#define SYNAPSE_GUI_FAKE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_FAKE_BUTTON, SynapseGuiFakeButtonClass))

typedef struct _SynapseGuiFakeButton SynapseGuiFakeButton;
typedef struct _SynapseGuiFakeButtonClass SynapseGuiFakeButtonClass;

#define SYNAPSE_GUI_TYPE_MENU_BUTTON (synapse_gui_menu_button_get_type ())
#define SYNAPSE_GUI_MENU_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_MENU_BUTTON, SynapseGuiMenuButton))
#define SYNAPSE_GUI_MENU_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_MENU_BUTTON, SynapseGuiMenuButtonClass))
#define SYNAPSE_GUI_IS_MENU_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_MENU_BUTTON))
#define SYNAPSE_GUI_IS_MENU_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_MENU_BUTTON))
#define SYNAPSE_GUI_MENU_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_MENU_BUTTON, SynapseGuiMenuButtonClass))

typedef struct _SynapseGuiMenuButton SynapseGuiMenuButton;
typedef struct _SynapseGuiMenuButtonClass SynapseGuiMenuButtonClass;
enum  {
	SYNAPSE_GUI_VIEW_0_PROPERTY,
	SYNAPSE_GUI_VIEW_CONTROLLER_MODEL_PROPERTY,
	SYNAPSE_GUI_VIEW_CONTROLLER_PROPERTY,
	SYNAPSE_GUI_VIEW_NUM_PROPERTIES
};
static GParamSpec* synapse_gui_view_properties[SYNAPSE_GUI_VIEW_NUM_PROPERTIES];
#define _synapse_gui_utils_color_helper_unref0(var) ((var == NULL) ? NULL : (var = (synapse_gui_utils_color_helper_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _cairo_region_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_region_destroy (var), NULL)))
typedef enum  {
	SYNAPSE_GUI_SMART_LABEL_SIZE_XX_SMALL,
	SYNAPSE_GUI_SMART_LABEL_SIZE_X_SMALL,
	SYNAPSE_GUI_SMART_LABEL_SIZE_SMALL,
	SYNAPSE_GUI_SMART_LABEL_SIZE_MEDIUM,
	SYNAPSE_GUI_SMART_LABEL_SIZE_LARGE,
	SYNAPSE_GUI_SMART_LABEL_SIZE_X_LARGE,
	SYNAPSE_GUI_SMART_LABEL_SIZE_XX_LARGE
} SynapseGuiSmartLabelSize;

#define SYNAPSE_GUI_SMART_LABEL_TYPE_SIZE (synapse_gui_smart_label_size_get_type ())
typedef struct _SynapseGuiModelPrivate SynapseGuiModelPrivate;
typedef enum  {
	SYNAPSE_GUI_SEARCHING_FOR_SOURCES,
	SYNAPSE_GUI_SEARCHING_FOR_ACTIONS,
	SYNAPSE_GUI_SEARCHING_FOR_TARGETS,
	SYNAPSE_GUI_SEARCHING_FOR_COUNT
} SynapseGuiSearchingFor;

#define SYNAPSE_GUI_TYPE_SEARCHING_FOR (synapse_gui_searching_for_get_type ())
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))

#define SYNAPSE_GUI_TYPE_MATCH_LIST_VIEW (synapse_gui_match_list_view_get_type ())
#define SYNAPSE_GUI_MATCH_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_MATCH_LIST_VIEW, SynapseGuiMatchListView))
#define SYNAPSE_GUI_MATCH_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_MATCH_LIST_VIEW, SynapseGuiMatchListViewClass))
#define SYNAPSE_GUI_IS_MATCH_LIST_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_MATCH_LIST_VIEW))
#define SYNAPSE_GUI_IS_MATCH_LIST_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_MATCH_LIST_VIEW))
#define SYNAPSE_GUI_MATCH_LIST_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_MATCH_LIST_VIEW, SynapseGuiMatchListViewClass))

typedef struct _SynapseGuiMatchListView SynapseGuiMatchListView;
typedef struct _SynapseGuiMatchListViewClass SynapseGuiMatchListViewClass;

#define SYNAPSE_GUI_TYPE_SELECTION_CONTAINER (synapse_gui_selection_container_get_type ())
#define SYNAPSE_GUI_SELECTION_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_SELECTION_CONTAINER, SynapseGuiSelectionContainer))
#define SYNAPSE_GUI_SELECTION_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_SELECTION_CONTAINER, SynapseGuiSelectionContainerClass))
#define SYNAPSE_GUI_IS_SELECTION_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_SELECTION_CONTAINER))
#define SYNAPSE_GUI_IS_SELECTION_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_SELECTION_CONTAINER))
#define SYNAPSE_GUI_SELECTION_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_SELECTION_CONTAINER, SynapseGuiSelectionContainerClass))

typedef struct _SynapseGuiSelectionContainer SynapseGuiSelectionContainer;
typedef struct _SynapseGuiSelectionContainerClass SynapseGuiSelectionContainerClass;

#define SYNAPSE_GUI_TYPE_RESULT_BOX (synapse_gui_result_box_get_type ())
#define SYNAPSE_GUI_RESULT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_RESULT_BOX, SynapseGuiResultBox))
#define SYNAPSE_GUI_RESULT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_RESULT_BOX, SynapseGuiResultBoxClass))
#define SYNAPSE_GUI_IS_RESULT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_RESULT_BOX))
#define SYNAPSE_GUI_IS_RESULT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_RESULT_BOX))
#define SYNAPSE_GUI_RESULT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_RESULT_BOX, SynapseGuiResultBoxClass))

typedef struct _SynapseGuiResultBox SynapseGuiResultBox;
typedef struct _SynapseGuiResultBoxClass SynapseGuiResultBoxClass;
typedef enum  {
	SYNAPSE_GUI_STYLE_TYPE_BG,
	SYNAPSE_GUI_STYLE_TYPE_FG,
	SYNAPSE_GUI_STYLE_TYPE_BASE,
	SYNAPSE_GUI_STYLE_TYPE_TEXT
} SynapseGuiStyleType;

#define SYNAPSE_GUI_TYPE_STYLE_TYPE (synapse_gui_style_type_get_type ())
typedef enum  {
	SYNAPSE_GUI_MOD_NORMAL,
	SYNAPSE_GUI_MOD_LIGHTER,
	SYNAPSE_GUI_MOD_LIGHTEST,
	SYNAPSE_GUI_MOD_DARKER,
	SYNAPSE_GUI_MOD_DARKEST,
	SYNAPSE_GUI_MOD_INVERTED
} SynapseGuiMod;

#define SYNAPSE_GUI_TYPE_MOD (synapse_gui_mod_get_type ())

#define SYNAPSE_GUI_TYPE_ICON_CACHE_SERVICE (synapse_gui_icon_cache_service_get_type ())
#define SYNAPSE_GUI_ICON_CACHE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_ICON_CACHE_SERVICE, SynapseGuiIconCacheService))
#define SYNAPSE_GUI_ICON_CACHE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_ICON_CACHE_SERVICE, SynapseGuiIconCacheServiceClass))
#define SYNAPSE_GUI_IS_ICON_CACHE_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_ICON_CACHE_SERVICE))
#define SYNAPSE_GUI_IS_ICON_CACHE_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_ICON_CACHE_SERVICE))
#define SYNAPSE_GUI_ICON_CACHE_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_ICON_CACHE_SERVICE, SynapseGuiIconCacheServiceClass))

typedef struct _SynapseGuiIconCacheService SynapseGuiIconCacheService;
typedef struct _SynapseGuiIconCacheServiceClass SynapseGuiIconCacheServiceClass;
#define _gtk_target_list_unref0(var) ((var == NULL) ? NULL : (var = (gtk_target_list_unref (var), NULL)))

#define SYNAPSE_GUI_TYPE_SMART_LABEL (synapse_gui_smart_label_get_type ())
#define SYNAPSE_GUI_SMART_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_TYPE_SMART_LABEL, SynapseGuiSmartLabel))
#define SYNAPSE_GUI_SMART_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_TYPE_SMART_LABEL, SynapseGuiSmartLabelClass))
#define SYNAPSE_GUI_IS_SMART_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_TYPE_SMART_LABEL))
#define SYNAPSE_GUI_IS_SMART_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_TYPE_SMART_LABEL))
#define SYNAPSE_GUI_SMART_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_TYPE_SMART_LABEL, SynapseGuiSmartLabelClass))

typedef struct _SynapseGuiSmartLabel SynapseGuiSmartLabel;
typedef struct _SynapseGuiSmartLabelClass SynapseGuiSmartLabelClass;

#define SYNAPSE_GUI_CATEGORY_CONFIG_TYPE_CATEGORY (synapse_gui_category_config_category_get_type ())
#define SYNAPSE_GUI_CATEGORY_CONFIG_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SYNAPSE_GUI_CATEGORY_CONFIG_TYPE_CATEGORY, SynapseGuiCategoryConfigCategory))
#define SYNAPSE_GUI_CATEGORY_CONFIG_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SYNAPSE_GUI_CATEGORY_CONFIG_TYPE_CATEGORY, SynapseGuiCategoryConfigCategoryClass))
#define SYNAPSE_GUI_CATEGORY_CONFIG_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SYNAPSE_GUI_CATEGORY_CONFIG_TYPE_CATEGORY))
#define SYNAPSE_GUI_CATEGORY_CONFIG_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SYNAPSE_GUI_CATEGORY_CONFIG_TYPE_CATEGORY))
#define SYNAPSE_GUI_CATEGORY_CONFIG_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SYNAPSE_GUI_CATEGORY_CONFIG_TYPE_CATEGORY, SynapseGuiCategoryConfigCategoryClass))

typedef struct _SynapseGuiCategoryConfigCategory SynapseGuiCategoryConfigCategory;
typedef struct _SynapseGuiCategoryConfigCategoryClass SynapseGuiCategoryConfigCategoryClass;
#define _g_param_spec_unref0(var) ((var == NULL) ? NULL : (var = (g_param_spec_unref (var), NULL)))

struct _SynapseGuiIControllerIface {
	GTypeInterface parent_iface;
	void (*key_press_event) (SynapseGuiIController* self, GdkEventKey* event);
	void (*category_changed_event) (SynapseGuiIController* self, gint category_index);
	void (*fire_focus_context_switch_event) (SynapseGuiIController* self);
	void (*fire_focus) (SynapseGuiIController* self);
	void (*selected_index_changed_event) (SynapseGuiIController* self, gint focus_index);
	void (*set_view) (SynapseGuiIController* self, GType view_type);
	void (*summon_or_vanish) (SynapseGuiIController* self);
	gboolean (*is_in_initial_state) (SynapseGuiIController* self);
	gboolean (*searched_for_recent) (SynapseGuiIController* self);
	SynapseDataSink* (*get_data_sink) (SynapseGuiIController* self);
	void (*set_data_sink) (SynapseGuiIController* self, SynapseDataSink* value);
	SynapseGuiKeyComboConfig* (*get_key_combo_config) (SynapseGuiIController* self);
	void (*set_key_combo_config) (SynapseGuiIController* self, SynapseGuiKeyComboConfig* value);
	SynapseGuiCategoryConfig* (*get_category_config) (SynapseGuiIController* self);
	void (*set_category_config) (SynapseGuiIController* self, SynapseGuiCategoryConfig* value);
};

struct _SynapseGuiIViewIface {
	GTypeInterface parent_iface;
	void (*summon) (SynapseGuiIView* self);
	void (*vanish) (SynapseGuiIView* self);
	void (*summon_or_vanish) (SynapseGuiIView* self);
	void (*update_focused_source) (SynapseGuiIView* self, SynapseGuiEntry* m);
	void (*update_focused_action) (SynapseGuiIView* self, SynapseGuiEntry* m);
	void (*update_focused_target) (SynapseGuiIView* self, SynapseGuiEntry* m);
	void (*update_sources) (SynapseGuiIView* self, GeeList* list);
	void (*update_actions) (SynapseGuiIView* self, GeeList* list);
	void (*update_targets) (SynapseGuiIView* self, GeeList* list);
	void (*update_selected_category) (SynapseGuiIView* self);
	void (*update_searching_for) (SynapseGuiIView* self);
	gboolean (*is_list_visible) (SynapseGuiIView* self);
	void (*set_list_visible) (SynapseGuiIView* self, gboolean visible);
	void (*set_throbber_visible) (SynapseGuiIView* self, gboolean visible);
	SynapseGuiModel* (*get_controller_model) (SynapseGuiIView* self);
	void (*set_controller_model) (SynapseGuiIView* self, SynapseGuiModel* value);
	SynapseGuiIController* (*get_controller) (SynapseGuiIView* self);
	void (*set_controller) (SynapseGuiIView* self, SynapseGuiIController* value);
};

struct _SynapseGuiView {
	GtkWindow parent_instance;
	SynapseGuiViewPrivate * priv;
	gboolean is_kwin;
	SynapseGuiUtilsColorHelper* ch;
	SynapseGuiHTextSelector* flag_selector;
	SynapseGuiMenuButton* menu;
	GtkLabel* spacer;
	gint BORDER_RADIUS;
	gint SHADOW_SIZE;
	GtkStateFlags bg_state;
	gboolean cache_enabled;
	GeeMap* bg_cache;
	SynapseGuiModel* model;
};

struct _SynapseGuiViewClass {
	GtkWindowClass parent_class;
	void (*build_ui) (SynapseGuiView* self);
	void (*paint_background) (SynapseGuiView* self, cairo_t* ctx);
	void (*summon) (SynapseGuiView* self);
	void (*vanish) (SynapseGuiView* self);
	void (*summon_or_vanish) (SynapseGuiView* self);
	void (*update_focused_source) (SynapseGuiView* self, SynapseGuiEntry* m);
	void (*update_focused_action) (SynapseGuiView* self, SynapseGuiEntry* m);
	void (*update_focused_target) (SynapseGuiView* self, SynapseGuiEntry* m);
	void (*update_sources) (SynapseGuiView* self, GeeList* list);
	void (*update_actions) (SynapseGuiView* self, GeeList* list);
	void (*update_targets) (SynapseGuiView* self, GeeList* list);
	void (*update_selected_category) (SynapseGuiView* self);
	void (*update_searching_for) (SynapseGuiView* self);
	gboolean (*is_list_visible) (SynapseGuiView* self);
	void (*set_list_visible) (SynapseGuiView* self, gboolean visible);
	void (*set_throbber_visible) (SynapseGuiView* self, gboolean visible);
};

struct _SynapseGuiViewPrivate {
	GtkRequisition req_target;
	GtkRequisition req_current;
	GtkRequisition old_alloc;
	gchar* dragdrop_name;
	gchar* dragdrop_uri;
	SynapseGuiModel* _controller_model;
	SynapseGuiIController* _controller;
};

struct _SynapseGuiModel {
	GObject parent_instance;
	SynapseGuiModelPrivate * priv;
	gchar** query;
	gint query_length1;
	GeeList** results;
	gint results_length1;
	SynapseGuiEntry** focus;
	gint focus_length1;
	gint selected_category;
	SynapseGuiSearchingFor searching_for;
};

struct _SynapseGuiModelClass {
	GObjectClass parent_class;
};

static gint SynapseGuiView_private_offset;
static gpointer synapse_gui_view_parent_class = NULL;
static SynapseGuiIViewIface * synapse_gui_view_synapse_gui_iview_parent_iface = NULL;

VALA_EXTERN gpointer synapse_gui_entry_ref (gpointer instance);
VALA_EXTERN void synapse_gui_entry_unref (gpointer instance);
VALA_EXTERN GParamSpec* synapse_gui_param_spec_entry (const gchar* name,
                                          const gchar* nick,
                                          const gchar* blurb,
                                          GType object_type,
                                          GParamFlags flags);
VALA_EXTERN void synapse_gui_value_set_entry (GValue* value,
                                  gpointer v_object);
VALA_EXTERN void synapse_gui_value_take_entry (GValue* value,
                                   gpointer v_object);
VALA_EXTERN gpointer synapse_gui_value_get_entry (const GValue* value);
VALA_EXTERN GType synapse_gui_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiEntry, synapse_gui_entry_unref)
VALA_EXTERN GType synapse_gui_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiModel, g_object_unref)
VALA_EXTERN GType synapse_gui_key_combo_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiKeyComboConfig, g_object_unref)
VALA_EXTERN GType synapse_gui_category_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiCategoryConfig, g_object_unref)
VALA_EXTERN GType synapse_gui_icontroller_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiIController, g_object_unref)
VALA_EXTERN GType synapse_gui_iview_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiIView, g_object_unref)
VALA_EXTERN GType synapse_gui_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiView, g_object_unref)
VALA_EXTERN gpointer synapse_gui_utils_color_helper_ref (gpointer instance);
VALA_EXTERN void synapse_gui_utils_color_helper_unref (gpointer instance);
VALA_EXTERN GParamSpec* synapse_gui_utils_param_spec_color_helper (const gchar* name,
                                                       const gchar* nick,
                                                       const gchar* blurb,
                                                       GType object_type,
                                                       GParamFlags flags);
VALA_EXTERN void synapse_gui_utils_value_set_color_helper (GValue* value,
                                               gpointer v_object);
VALA_EXTERN void synapse_gui_utils_value_take_color_helper (GValue* value,
                                                gpointer v_object);
VALA_EXTERN gpointer synapse_gui_utils_value_get_color_helper (const GValue* value);
VALA_EXTERN GType synapse_gui_utils_color_helper_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiUtilsColorHelper, synapse_gui_utils_color_helper_unref)
VALA_EXTERN GType synapse_gui_htext_selector_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiHTextSelector, g_object_unref)
VALA_EXTERN GType synapse_gui_fake_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiFakeButton, g_object_unref)
VALA_EXTERN GType synapse_gui_menu_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiMenuButton, g_object_unref)
VALA_EXTERN void synapse_gui_view_build_ui (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_view_paint_background (SynapseGuiView* self,
                                        cairo_t* ctx);
VALA_EXTERN void synapse_gui_view_summon (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_view_vanish (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_view_summon_or_vanish (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_view_update_focused_source (SynapseGuiView* self,
                                             SynapseGuiEntry* m);
VALA_EXTERN void synapse_gui_view_update_focused_action (SynapseGuiView* self,
                                             SynapseGuiEntry* m);
VALA_EXTERN void synapse_gui_view_update_focused_target (SynapseGuiView* self,
                                             SynapseGuiEntry* m);
VALA_EXTERN void synapse_gui_view_update_sources (SynapseGuiView* self,
                                      GeeList* list);
VALA_EXTERN void synapse_gui_view_update_actions (SynapseGuiView* self,
                                      GeeList* list);
VALA_EXTERN void synapse_gui_view_update_targets (SynapseGuiView* self,
                                      GeeList* list);
VALA_EXTERN void synapse_gui_view_update_selected_category (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_view_update_searching_for (SynapseGuiView* self);
VALA_EXTERN gboolean synapse_gui_view_is_list_visible (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_view_set_list_visible (SynapseGuiView* self,
                                        gboolean visible);
VALA_EXTERN void synapse_gui_view_set_throbber_visible (SynapseGuiView* self,
                                            gboolean visible);
static void synapse_gui_view_update_wm (SynapseGuiView* self);
static void synapse_gui_view_real_build_ui (SynapseGuiView* self);
static void synapse_gui_view_real_size_allocate (GtkWidget* base,
                                          GtkAllocation* alloc);
VALA_EXTERN void synapse_gui_view_add_kde_compatibility (SynapseGuiView* self,
                                             GtkWindow* window,
                                             gint w,
                                             gint h);
static void synapse_gui_view_real_composited_changed (GtkWidget* base);
VALA_EXTERN void synapse_gui_view_update_border_and_shadow (SynapseGuiView* self);
static void synapse_gui_view_real_style_updated (GtkWidget* base);
VALA_EXTERN GType synapse_gui_smart_label_size_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SynapseGuiSmartLabelSize synapse_gui_smart_label_string_to_size (const gchar* sizename);
VALA_EXTERN void synapse_gui_htext_selector_set_selected_markup (SynapseGuiHTextSelector* self,
                                                     const gchar* value);
VALA_EXTERN void synapse_gui_htext_selector_set_unselected_markup (SynapseGuiHTextSelector* self,
                                                       const gchar* value);
static gboolean synapse_gui_view_real_button_press_event (GtkWidget* base,
                                                   GdkEventButton* event);
VALA_EXTERN gboolean synapse_gui_utils_is_point_in_mask (GtkWidget* w,
                                             gint x,
                                             gint y);
static gboolean synapse_gui_view_real_key_press_event (GtkWidget* base,
                                                GdkEventKey* event);
VALA_EXTERN SynapseGuiIController* synapse_gui_iview_get_controller (SynapseGuiIView* self);
VALA_EXTERN void synapse_gui_icontroller_key_press_event (SynapseGuiIController* self,
                                              GdkEventKey* event);
static gboolean synapse_gui_view_real_draw (GtkWidget* base,
                                     cairo_t* ctx);
VALA_EXTERN GType synapse_gui_searching_for_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType synapse_gui_match_list_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiMatchListView, g_object_unref)
VALA_EXTERN void synapse_gui_view_connect_handlers (SynapseGuiView* self,
                                        SynapseGuiMatchListView* view);
VALA_EXTERN void synapse_gui_view_drag_end_handler (SynapseGuiView* self,
                                        GtkWidget* w,
                                        GdkDragContext* context);
static void _synapse_gui_view_drag_end_handler_gtk_widget_drag_end (GtkWidget* _sender,
                                                             GdkDragContext* context,
                                                             gpointer self);
VALA_EXTERN void synapse_gui_icontroller_selected_index_changed_event (SynapseGuiIController* self,
                                                           gint focus_index);
static void _synapse_gui_icontroller_selected_index_changed_event_synapse_gui_match_list_view_selected_index_changed (SynapseGuiMatchListView* _sender,
                                                                                                               gint new_index,
                                                                                                               gpointer self);
VALA_EXTERN void synapse_gui_icontroller_fire_focus (SynapseGuiIController* self);
static void _synapse_gui_icontroller_fire_focus_synapse_gui_match_list_view_fire_item (SynapseGuiMatchListView* _sender,
                                                                                gpointer self);
VALA_EXTERN void synapse_gui_icontroller_fire_focus_context_switch_event (SynapseGuiIController* self);
static void _synapse_gui_icontroller_fire_focus_context_switch_event_synapse_gui_match_list_view_fire_item_context_switch (SynapseGuiMatchListView* _sender,
                                                                                                                    gpointer self);
VALA_EXTERN GType synapse_gui_selection_container_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiSelectionContainer, g_object_unref)
VALA_EXTERN GType synapse_gui_result_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiResultBox, g_object_unref)
VALA_EXTERN void synapse_gui_view_prepare_results_container (SynapseGuiView* self,
                                                 SynapseGuiSelectionContainer** results_container,
                                                 SynapseGuiResultBox** results_sources,
                                                 SynapseGuiResultBox** results_actions,
                                                 SynapseGuiResultBox** results_targets,
                                                 GtkStateFlags state_type,
                                                 gboolean add_to_container);
VALA_EXTERN SynapseGuiResultBox* synapse_gui_result_box_new (gint width,
                                                 gint nrows);
VALA_EXTERN SynapseGuiResultBox* synapse_gui_result_box_construct (GType object_type,
                                                       gint width,
                                                       gint nrows);
VALA_EXTERN SynapseGuiMatchListView* synapse_gui_result_box_get_match_list_view (SynapseGuiResultBox* self);
VALA_EXTERN SynapseGuiSelectionContainer* synapse_gui_selection_container_new (void);
VALA_EXTERN SynapseGuiSelectionContainer* synapse_gui_selection_container_construct (GType object_type);
VALA_EXTERN void synapse_gui_result_box_set_state (SynapseGuiResultBox* self,
                                       GtkStateFlags state);
static void synapse_gui_view_real_paint_background (SynapseGuiView* self,
                                             cairo_t* ctx);
VALA_EXTERN GType synapse_gui_style_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType synapse_gui_mod_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void synapse_gui_utils_color_helper_set_source_rgba (SynapseGuiUtilsColorHelper* self,
                                                     cairo_t* ctx,
                                                     gdouble alpha,
                                                     SynapseGuiStyleType t,
                                                     GtkStateFlags st,
                                                     SynapseGuiMod mod);
VALA_EXTERN void synapse_gui_view_force_grab (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_utils_present_window (GtkWindow* window);
static void synapse_gui_view_real_summon (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_utils_move_window_to_center (GtkWindow* win);
static void synapse_gui_view_real_vanish (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_utils_unpresent_window (GtkWindow* window);
VALA_EXTERN GType synapse_gui_icon_cache_service_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiIconCacheService, g_object_unref)
VALA_EXTERN SynapseGuiIconCacheService* synapse_gui_icon_cache_service_get_default (void);
VALA_EXTERN void synapse_gui_icon_cache_service_reduce_cache (SynapseGuiIconCacheService* self);
static void synapse_gui_view_real_summon_or_vanish (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_view_make_draggable (SynapseGuiView* self,
                                      GtkEventBox* obj);
static gboolean synapse_gui_view_draggable_clicked (SynapseGuiView* self,
                                             GtkWidget* w,
                                             GdkEventButton* event);
static gboolean _synapse_gui_view_draggable_clicked_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                            GdkEventButton* event,
                                                                            gpointer self);
static void synapse_gui_view_draggable_get (SynapseGuiView* self,
                                     GtkWidget* w,
                                     GdkDragContext* context,
                                     GtkSelectionData* selection_data,
                                     guint info,
                                     guint time_);
static void _synapse_gui_view_draggable_get_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                               GdkDragContext* context,
                                                               GtkSelectionData* selection_data,
                                                               guint info,
                                                               guint time_,
                                                               gpointer self);
VALA_EXTERN gconstpointer synapse_gui_entry_get_value (SynapseGuiEntry* self);
static void synapse_gui_view_real_update_focused_source (SynapseGuiView* self,
                                                  SynapseGuiEntry* m);
static void synapse_gui_view_real_update_focused_action (SynapseGuiView* self,
                                                  SynapseGuiEntry* m);
static void synapse_gui_view_real_update_focused_target (SynapseGuiView* self,
                                                  SynapseGuiEntry* m);
static void synapse_gui_view_real_update_sources (SynapseGuiView* self,
                                           GeeList* list);
static void synapse_gui_view_real_update_actions (SynapseGuiView* self,
                                           GeeList* list);
static void synapse_gui_view_real_update_targets (SynapseGuiView* self,
                                           GeeList* list);
static void synapse_gui_view_real_update_selected_category (SynapseGuiView* self);
static void synapse_gui_view_real_update_searching_for (SynapseGuiView* self);
static gboolean synapse_gui_view_real_is_list_visible (SynapseGuiView* self);
static void synapse_gui_view_real_set_list_visible (SynapseGuiView* self,
                                             gboolean visible);
static void synapse_gui_view_real_set_throbber_visible (SynapseGuiView* self,
                                                 gboolean visible);
VALA_EXTERN SynapseGuiView* synapse_gui_view_new (void);
VALA_EXTERN SynapseGuiView* synapse_gui_view_construct (GType object_type);
static GObject * synapse_gui_view_constructor (GType type,
                                        guint n_construct_properties,
                                        GObjectConstructParam * construct_properties);
VALA_EXTERN SynapseGuiModel* synapse_gui_iview_get_controller_model (SynapseGuiIView* self);
VALA_EXTERN void synapse_gui_utils_ensure_transparent_bg (GtkWidget* widget);
VALA_EXTERN SynapseGuiUtilsColorHelper* synapse_gui_utils_color_helper_get_default (void);
VALA_EXTERN GType synapse_gui_smart_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiSmartLabel, g_object_unref)
VALA_EXTERN SynapseGuiSmartLabel* synapse_gui_smart_label_new (void);
VALA_EXTERN SynapseGuiSmartLabel* synapse_gui_smart_label_construct (GType object_type);
VALA_EXTERN SynapseGuiHTextSelector* synapse_gui_htext_selector_new (void);
VALA_EXTERN SynapseGuiHTextSelector* synapse_gui_htext_selector_construct (GType object_type);
VALA_EXTERN GType synapse_gui_category_config_category_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SynapseGuiCategoryConfigCategory, g_object_unref)
VALA_EXTERN SynapseGuiCategoryConfig* synapse_gui_icontroller_get_category_config (SynapseGuiIController* self);
VALA_EXTERN GeeList* synapse_gui_category_config_get_categories (SynapseGuiCategoryConfig* self);
VALA_EXTERN void synapse_gui_htext_selector_add_text (SynapseGuiHTextSelector* self,
                                          const gchar* txt);
VALA_EXTERN const gchar* synapse_gui_category_config_category_get_name (SynapseGuiCategoryConfigCategory* self);
VALA_EXTERN gint synapse_gui_category_config_get_default_category_index (SynapseGuiCategoryConfig* self);
VALA_EXTERN void synapse_gui_htext_selector_set_selected (SynapseGuiHTextSelector* self,
                                              gint value);
static void _synapse_gui_view___lambda18_ (SynapseGuiView* self);
VALA_EXTERN void synapse_gui_icontroller_category_changed_event (SynapseGuiIController* self,
                                                     gint category_index);
VALA_EXTERN gint synapse_gui_htext_selector_get_selected (SynapseGuiHTextSelector* self);
static void __synapse_gui_view___lambda18__synapse_gui_htext_selector_selection_changed (SynapseGuiHTextSelector* _sender,
                                                                                  gpointer self);
VALA_EXTERN GtkMenu* synapse_gui_menu_button_get_menu (SynapseGuiMenuButton* self);
static void _synapse_gui_view_force_grab_gtk_widget_show (GtkWidget* _sender,
                                                   gpointer self);
static void _synapse_gui_view____lambda19_ (SynapseGuiView* self);
static void __synapse_gui_view____lambda19__synapse_gui_menu_button_settings_clicked (SynapseGuiMenuButton* _sender,
                                                                               gpointer self);
VALA_EXTERN void synapse_gui_iview_summon (SynapseGuiIView* self);
VALA_EXTERN void synapse_gui_iview_vanish (SynapseGuiIView* self);
VALA_EXTERN void synapse_gui_iview_summon_or_vanish (SynapseGuiIView* self);
VALA_EXTERN void synapse_gui_iview_update_focused_source (SynapseGuiIView* self,
                                              SynapseGuiEntry* m);
VALA_EXTERN void synapse_gui_iview_update_focused_action (SynapseGuiIView* self,
                                              SynapseGuiEntry* m);
VALA_EXTERN void synapse_gui_iview_update_focused_target (SynapseGuiIView* self,
                                              SynapseGuiEntry* m);
VALA_EXTERN void synapse_gui_iview_update_sources (SynapseGuiIView* self,
                                       GeeList* list);
VALA_EXTERN void synapse_gui_iview_update_actions (SynapseGuiIView* self,
                                       GeeList* list);
VALA_EXTERN void synapse_gui_iview_update_targets (SynapseGuiIView* self,
                                       GeeList* list);
VALA_EXTERN void synapse_gui_iview_update_selected_category (SynapseGuiIView* self);
VALA_EXTERN void synapse_gui_iview_update_searching_for (SynapseGuiIView* self);
VALA_EXTERN gboolean synapse_gui_iview_is_list_visible (SynapseGuiIView* self);
VALA_EXTERN void synapse_gui_iview_set_list_visible (SynapseGuiIView* self,
                                         gboolean visible);
VALA_EXTERN void synapse_gui_iview_set_throbber_visible (SynapseGuiIView* self,
                                             gboolean visible);
VALA_EXTERN void synapse_gui_iview_set_controller_model (SynapseGuiIView* self,
                                             SynapseGuiModel* value);
VALA_EXTERN void synapse_gui_iview_set_controller (SynapseGuiIView* self,
                                       SynapseGuiIController* value);
static void synapse_gui_view_finalize (GObject * obj);
static GType synapse_gui_view_get_type_once (void);
static void _vala_synapse_gui_view_get_property (GObject * object,
                                          guint property_id,
                                          GValue * value,
                                          GParamSpec * pspec);
static void _vala_synapse_gui_view_set_property (GObject * object,
                                          guint property_id,
                                          const GValue * value,
                                          GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

VALA_EXTERN const gchar* SYNAPSE_GUI_SMART_LABEL_size_to_string[7];

static inline gpointer
synapse_gui_view_get_instance_private (SynapseGuiView* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseGuiView_private_offset);
}

static void
synapse_gui_view_update_wm (SynapseGuiView* self)
{
	GdkX11Screen* x11_screen = NULL;
	GdkScreen* _tmp0_;
	GdkX11Screen* _tmp1_;
	gchar* wmname = NULL;
	GdkX11Screen* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
#line 31 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 33 "view-base.vala"
	_tmp0_ = gdk_screen_get_default ();
#line 33 "view-base.vala"
	x11_screen = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, gdk_x11_screen_get_type ()) ? ((GdkX11Screen*) _tmp0_) : NULL;
#line 34 "view-base.vala"
	_tmp1_ = x11_screen;
#line 34 "view-base.vala"
	if (_tmp1_ == NULL) {
#line 34 "view-base.vala"
		return;
#line 701 "view-base.c"
	}
#line 35 "view-base.vala"
	_tmp2_ = x11_screen;
#line 35 "view-base.vala"
	_tmp3_ = gdk_x11_screen_get_window_manager_name (_tmp2_);
#line 35 "view-base.vala"
	_tmp4_ = g_utf8_strdown (_tmp3_, (gssize) -1);
#line 35 "view-base.vala"
	wmname = _tmp4_;
#line 36 "view-base.vala"
	_tmp5_ = wmname;
#line 36 "view-base.vala"
	self->is_kwin = g_strcmp0 (_tmp5_, "kwin") == 0;
#line 31 "view-base.vala"
	_g_free0 (wmname);
#line 717 "view-base.c"
}

static void
synapse_gui_view_real_build_ui (SynapseGuiView* self)
{
}

void
synapse_gui_view_build_ui (SynapseGuiView* self)
{
	SynapseGuiViewClass* _klass_;
#line 216 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 216 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 216 "view-base.vala"
	if (_klass_->build_ui) {
#line 216 "view-base.vala"
		_klass_->build_ui (self);
#line 737 "view-base.c"
	}
}

static void
synapse_gui_view_real_size_allocate (GtkWidget* base,
                                     GtkAllocation* alloc)
{
	SynapseGuiView * self;
	GtkAllocation _tmp0_;
	GtkAllocation allocation = {0};
	GtkAllocation _tmp1_ = {0};
	gboolean _tmp2_ = FALSE;
#line 221 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 221 "view-base.vala"
	g_return_if_fail (alloc != NULL);
#line 223 "view-base.vala"
	_tmp0_ = *alloc;
#line 223 "view-base.vala"
	GTK_WIDGET_CLASS (synapse_gui_view_parent_class)->size_allocate ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), &_tmp0_);
#line 226 "view-base.vala"
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp1_);
#line 226 "view-base.vala"
	allocation = _tmp1_;
#line 228 "view-base.vala"
	if (self->is_kwin) {
#line 764 "view-base.c"
		gboolean _tmp3_ = FALSE;
		GtkRequisition _tmp4_;
		GtkAllocation _tmp5_;
#line 229 "view-base.vala"
		_tmp4_ = self->priv->old_alloc;
#line 229 "view-base.vala"
		_tmp5_ = allocation;
#line 229 "view-base.vala"
		if (_tmp4_.width != _tmp5_.width) {
#line 229 "view-base.vala"
			_tmp3_ = TRUE;
#line 776 "view-base.c"
		} else {
			GtkRequisition _tmp6_;
			GtkAllocation _tmp7_;
#line 230 "view-base.vala"
			_tmp6_ = self->priv->old_alloc;
#line 230 "view-base.vala"
			_tmp7_ = allocation;
#line 230 "view-base.vala"
			_tmp3_ = _tmp6_.height != _tmp7_.height;
#line 786 "view-base.c"
		}
#line 229 "view-base.vala"
		_tmp2_ = _tmp3_;
#line 790 "view-base.c"
	} else {
#line 228 "view-base.vala"
		_tmp2_ = FALSE;
#line 794 "view-base.c"
	}
#line 228 "view-base.vala"
	if (_tmp2_) {
#line 798 "view-base.c"
		GtkAllocation _tmp8_;
		GtkAllocation _tmp9_;
		GtkAllocation _tmp10_;
		GtkAllocation _tmp11_;
		GtkRequisition _tmp12_ = {0};
#line 233 "view-base.vala"
		_tmp8_ = allocation;
#line 233 "view-base.vala"
		_tmp9_ = allocation;
#line 233 "view-base.vala"
		synapse_gui_view_add_kde_compatibility (self, (GtkWindow*) self, _tmp8_.width, _tmp9_.height);
#line 234 "view-base.vala"
		_tmp10_ = allocation;
#line 234 "view-base.vala"
		_tmp11_ = allocation;
#line 234 "view-base.vala"
		_tmp12_.width = _tmp10_.width;
#line 234 "view-base.vala"
		_tmp12_.height = _tmp11_.height;
#line 234 "view-base.vala"
		self->priv->old_alloc = _tmp12_;
#line 820 "view-base.c"
	}
}

static gpointer
_g_object_ref0 (gpointer self)
{
#line 243 "view-base.vala"
	return self ? g_object_ref (self) : NULL;
#line 829 "view-base.c"
}

static void
synapse_gui_view_real_composited_changed (GtkWidget* base)
{
	SynapseGuiView * self;
	GdkScreen* screen = NULL;
	GdkScreen* _tmp0_;
	GdkScreen* _tmp1_;
	gboolean comp = FALSE;
	GdkScreen* _tmp2_;
	GdkVisual* visual = NULL;
	GdkScreen* _tmp3_;
	GdkVisual* _tmp4_;
	GdkVisual* _tmp5_;
	GdkVisual* _tmp6_;
	const gchar* _tmp10_ = NULL;
	GdkVisual* _tmp11_;
#line 241 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 243 "view-base.vala"
	_tmp0_ = gtk_window_get_screen ((GtkWindow*) self);
#line 243 "view-base.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 243 "view-base.vala"
	screen = _tmp1_;
#line 244 "view-base.vala"
	_tmp2_ = screen;
#line 244 "view-base.vala"
	comp = gdk_screen_is_composited (_tmp2_);
#line 245 "view-base.vala"
	_tmp3_ = screen;
#line 245 "view-base.vala"
	_tmp4_ = gdk_screen_get_rgba_visual (_tmp3_);
#line 245 "view-base.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 245 "view-base.vala"
	visual = _tmp5_;
#line 246 "view-base.vala"
	_tmp6_ = visual;
#line 246 "view-base.vala"
	if (_tmp6_ == NULL) {
#line 872 "view-base.c"
		GdkScreen* _tmp7_;
		GdkVisual* _tmp8_;
		GdkVisual* _tmp9_;
#line 248 "view-base.vala"
		comp = FALSE;
#line 249 "view-base.vala"
		_tmp7_ = screen;
#line 249 "view-base.vala"
		_tmp8_ = gdk_screen_get_system_visual (_tmp7_);
#line 249 "view-base.vala"
		_tmp9_ = _g_object_ref0 (_tmp8_);
#line 249 "view-base.vala"
		_g_object_unref0 (visual);
#line 249 "view-base.vala"
		visual = _tmp9_;
#line 888 "view-base.c"
	}
#line 251 "view-base.vala"
	if (comp) {
#line 251 "view-base.vala"
		_tmp10_ = "";
#line 894 "view-base.c"
	} else {
#line 251 "view-base.vala"
		_tmp10_ = " NOT";
#line 898 "view-base.c"
	}
#line 251 "view-base.vala"
	g_message ("view-base.vala:251: Screen is%s composited.", _tmp10_);
#line 252 "view-base.vala"
	_tmp11_ = visual;
#line 252 "view-base.vala"
	gtk_widget_set_visual ((GtkWidget*) self, _tmp11_);
#line 254 "view-base.vala"
	synapse_gui_view_update_wm (self);
#line 255 "view-base.vala"
	synapse_gui_view_update_border_and_shadow (self);
#line 241 "view-base.vala"
	_g_object_unref0 (visual);
#line 241 "view-base.vala"
	_g_object_unref0 (screen);
#line 914 "view-base.c"
}

void
synapse_gui_view_add_kde_compatibility (SynapseGuiView* self,
                                        GtkWindow* window,
                                        gint w,
                                        gint h)
{
	cairo_region_t* region = NULL;
	cairo_rectangle_int_t _tmp0_ = {0};
	cairo_region_t* _tmp1_;
	GdkWindow* gdkwin = NULL;
	GdkWindow* _tmp2_;
	GdkWindow* _tmp3_;
#line 258 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 258 "view-base.vala"
	g_return_if_fail (window != NULL);
#line 262 "view-base.vala"
	_tmp0_.x = 0;
#line 262 "view-base.vala"
	_tmp0_.y = 0;
#line 262 "view-base.vala"
	_tmp0_.width = w;
#line 262 "view-base.vala"
	_tmp0_.height = h;
#line 262 "view-base.vala"
	_tmp1_ = cairo_region_create_rectangle (&_tmp0_);
#line 262 "view-base.vala"
	region = _tmp1_;
#line 263 "view-base.vala"
	_tmp2_ = gtk_widget_get_window ((GtkWidget*) window);
#line 263 "view-base.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 263 "view-base.vala"
	gdkwin = _tmp3_;
#line 264 "view-base.vala"
	gdk_window_shape_combine_region (gdkwin, NULL, 0, 0);
#line 265 "view-base.vala"
	gdk_window_shape_combine_region (gdkwin, region, 0, 0);
#line 258 "view-base.vala"
	_g_object_unref0 (gdkwin);
#line 258 "view-base.vala"
	_cairo_region_destroy0 (region);
#line 959 "view-base.c"
}

static void
synapse_gui_view_real_style_updated (GtkWidget* base)
{
	SynapseGuiView * self;
	gchar* dmax = NULL;
	gchar* dmin = NULL;
	gboolean bgselected = FALSE;
	gboolean _tmp0_ = FALSE;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GtkStateFlags _tmp3_ = 0U;
	SynapseGuiHTextSelector* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	SynapseGuiHTextSelector* _tmp9_;
	const gchar* _tmp10_;
	const gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	GeeMap* _tmp14_;
#line 268 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 270 "view-base.vala"
	GTK_WIDGET_CLASS (synapse_gui_view_parent_class)->style_updated ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow));
#line 273 "view-base.vala"
	gtk_widget_style_get ((GtkWidget*) self, "use-selected-color", &_tmp0_, "selected-category-size", &_tmp1_, "unselected-category-size", &_tmp2_, NULL);
#line 273 "view-base.vala"
	bgselected = _tmp0_;
#line 273 "view-base.vala"
	_g_free0 (dmax);
#line 273 "view-base.vala"
	dmax = _tmp1_;
#line 273 "view-base.vala"
	_g_free0 (dmin);
#line 273 "view-base.vala"
	dmin = _tmp2_;
#line 275 "view-base.vala"
	if (bgselected) {
#line 275 "view-base.vala"
		_tmp3_ = GTK_STATE_FLAG_SELECTED;
#line 1004 "view-base.c"
	} else {
#line 275 "view-base.vala"
		_tmp3_ = GTK_STATE_FLAG_NORMAL;
#line 1008 "view-base.c"
	}
#line 275 "view-base.vala"
	self->bg_state = _tmp3_;
#line 276 "view-base.vala"
	_tmp4_ = self->flag_selector;
#line 276 "view-base.vala"
	_tmp5_ = dmax;
#line 276 "view-base.vala"
	_tmp6_ = SYNAPSE_GUI_SMART_LABEL_size_to_string[synapse_gui_smart_label_string_to_size (_tmp5_)];
#line 276 "view-base.vala"
	_tmp7_ = g_strdup_printf ("<span size=\"%s\"><b>%s</b></span>", _tmp6_, "%s");
#line 276 "view-base.vala"
	_tmp8_ = _tmp7_;
#line 276 "view-base.vala"
	synapse_gui_htext_selector_set_selected_markup (_tmp4_, _tmp8_);
#line 276 "view-base.vala"
	_g_free0 (_tmp8_);
#line 278 "view-base.vala"
	_tmp9_ = self->flag_selector;
#line 278 "view-base.vala"
	_tmp10_ = dmin;
#line 278 "view-base.vala"
	_tmp11_ = SYNAPSE_GUI_SMART_LABEL_size_to_string[synapse_gui_smart_label_string_to_size (_tmp10_)];
#line 278 "view-base.vala"
	_tmp12_ = g_strdup_printf ("<span size=\"%s\">%s</span>", _tmp11_, "%s");
#line 278 "view-base.vala"
	_tmp13_ = _tmp12_;
#line 278 "view-base.vala"
	synapse_gui_htext_selector_set_unselected_markup (_tmp9_, _tmp13_);
#line 278 "view-base.vala"
	_g_free0 (_tmp13_);
#line 280 "view-base.vala"
	_tmp14_ = self->bg_cache;
#line 280 "view-base.vala"
	gee_map_clear (_tmp14_);
#line 281 "view-base.vala"
	synapse_gui_view_update_border_and_shadow (self);
#line 268 "view-base.vala"
	_g_free0 (dmin);
#line 268 "view-base.vala"
	_g_free0 (dmax);
#line 1050 "view-base.c"
}

void
synapse_gui_view_update_border_and_shadow (SynapseGuiView* self)
{
	GtkLabel* _tmp2_;
#line 284 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 286 "view-base.vala"
	if (gtk_widget_is_composited ((GtkWidget*) self)) {
#line 1061 "view-base.c"
		gint _tmp0_ = 0;
		gint _tmp1_ = 0;
#line 288 "view-base.vala"
		gtk_widget_style_get ((GtkWidget*) self, "border-radius", &_tmp0_, "shadow-size", &_tmp1_, NULL);
#line 288 "view-base.vala"
		self->BORDER_RADIUS = _tmp0_;
#line 288 "view-base.vala"
		self->SHADOW_SIZE = _tmp1_;
#line 1070 "view-base.c"
	} else {
#line 292 "view-base.vala"
		self->BORDER_RADIUS = 0;
#line 293 "view-base.vala"
		self->SHADOW_SIZE = 1;
#line 1076 "view-base.c"
	}
#line 296 "view-base.vala"
	gtk_container_set_border_width ((GtkContainer*) self, (guint) (self->BORDER_RADIUS + self->SHADOW_SIZE));
#line 297 "view-base.vala"
	_tmp2_ = self->spacer;
#line 297 "view-base.vala"
	gtk_widget_set_size_request ((GtkWidget*) _tmp2_, 1, self->SHADOW_SIZE + self->BORDER_RADIUS);
#line 299 "view-base.vala"
	gtk_widget_queue_resize ((GtkWidget*) self);
#line 300 "view-base.vala"
	gtk_widget_queue_draw ((GtkWidget*) self);
#line 1088 "view-base.c"
}

static gboolean
synapse_gui_view_real_button_press_event (GtkWidget* base,
                                          GdkEventButton* event)
{
	SynapseGuiView * self;
	gint x = 0;
	gint y = 0;
	gint rx = 0;
	gint ry = 0;
	GdkWindow* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gboolean result;
#line 303 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 303 "view-base.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 305 "view-base.vala"
	x = (gint) event->x_root;
#line 306 "view-base.vala"
	y = (gint) event->y_root;
#line 308 "view-base.vala"
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
#line 308 "view-base.vala"
	gdk_window_get_root_origin (_tmp0_, &_tmp1_, &_tmp2_);
#line 308 "view-base.vala"
	rx = _tmp1_;
#line 308 "view-base.vala"
	ry = _tmp2_;
#line 310 "view-base.vala"
	if (!synapse_gui_utils_is_point_in_mask ((GtkWidget*) self, x - rx, y - ry)) {
#line 310 "view-base.vala"
		synapse_gui_view_vanish (self);
#line 1124 "view-base.c"
	}
#line 312 "view-base.vala"
	result = FALSE;
#line 312 "view-base.vala"
	return result;
#line 1130 "view-base.c"
}

static gboolean
synapse_gui_view_real_key_press_event (GtkWidget* base,
                                       GdkEventKey* event)
{
	SynapseGuiView * self;
	SynapseGuiIController* _tmp0_;
	SynapseGuiIController* _tmp1_;
	gboolean result;
#line 315 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 315 "view-base.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 317 "view-base.vala"
	_tmp0_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 317 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 317 "view-base.vala"
	synapse_gui_icontroller_key_press_event (_tmp1_, event);
#line 318 "view-base.vala"
	result = FALSE;
#line 318 "view-base.vala"
	return result;
#line 1155 "view-base.c"
}

static gboolean
synapse_gui_view_real_draw (GtkWidget* base,
                            cairo_t* ctx)
{
	SynapseGuiView * self;
	GtkAllocation allocation = {0};
	GtkAllocation _tmp0_ = {0};
	GtkWidget* _tmp1_;
	GtkAllocation _tmp2_;
	GtkAllocation _tmp3_;
	gchar* key = NULL;
	GtkAllocation _tmp4_;
	GtkAllocation _tmp5_;
	SynapseGuiModel* _tmp6_;
	gchar* _tmp7_;
	gboolean result;
#line 321 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 321 "view-base.vala"
	g_return_val_if_fail (ctx != NULL, FALSE);
#line 324 "view-base.vala"
	gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
#line 324 "view-base.vala"
	allocation = _tmp0_;
#line 326 "view-base.vala"
	cairo_set_operator (ctx, CAIRO_OPERATOR_CLEAR);
#line 327 "view-base.vala"
	cairo_paint (ctx);
#line 330 "view-base.vala"
	_tmp1_ = gtk_bin_get_child ((GtkBin*) self);
#line 330 "view-base.vala"
	gtk_container_propagate_draw ((GtkContainer*) self, _tmp1_, ctx);
#line 332 "view-base.vala"
	_tmp2_ = allocation;
#line 332 "view-base.vala"
	_tmp3_ = allocation;
#line 332 "view-base.vala"
	cairo_rectangle (ctx, (gdouble) 0, (gdouble) 0, (gdouble) _tmp2_.width, (gdouble) _tmp3_.height);
#line 333 "view-base.vala"
	cairo_clip (ctx);
#line 335 "view-base.vala"
	_tmp4_ = allocation;
#line 335 "view-base.vala"
	_tmp5_ = allocation;
#line 335 "view-base.vala"
	_tmp6_ = self->model;
#line 335 "view-base.vala"
	_tmp7_ = g_strdup_printf ("%dx%dx%d", _tmp4_.width, _tmp5_.height, (gint) _tmp6_->searching_for);
#line 335 "view-base.vala"
	key = _tmp7_;
#line 337 "view-base.vala"
	if (self->cache_enabled) {
#line 1210 "view-base.c"
		GeeMap* _tmp8_;
		const gchar* _tmp9_;
#line 339 "view-base.vala"
		_tmp8_ = self->bg_cache;
#line 339 "view-base.vala"
		_tmp9_ = key;
#line 339 "view-base.vala"
		if (gee_map_has_key (_tmp8_, _tmp9_)) {
#line 1219 "view-base.c"
			GeeMap* _tmp10_;
			const gchar* _tmp11_;
			gpointer _tmp12_;
			cairo_surface_t* _tmp13_;
#line 341 "view-base.vala"
			_tmp10_ = self->bg_cache;
#line 341 "view-base.vala"
			_tmp11_ = key;
#line 341 "view-base.vala"
			_tmp12_ = gee_map_get (_tmp10_, _tmp11_);
#line 341 "view-base.vala"
			_tmp13_ = (cairo_surface_t*) _tmp12_;
#line 341 "view-base.vala"
			cairo_set_source_surface (ctx, _tmp13_, (gdouble) 0, (gdouble) 0);
#line 341 "view-base.vala"
			_cairo_surface_destroy0 (_tmp13_);
#line 1236 "view-base.c"
		} else {
			cairo_surface_t* surf = NULL;
			cairo_surface_t* _tmp14_;
			GtkAllocation _tmp15_;
			GtkAllocation _tmp16_;
			cairo_surface_t* _tmp17_;
			cairo_t* cr = NULL;
			cairo_surface_t* _tmp18_;
			cairo_t* _tmp19_;
			cairo_t* _tmp20_;
			GeeMap* _tmp21_;
			const gchar* _tmp22_;
			cairo_surface_t* _tmp23_;
			cairo_surface_t* _tmp24_;
#line 345 "view-base.vala"
			_tmp14_ = cairo_get_target (ctx);
#line 345 "view-base.vala"
			_tmp15_ = allocation;
#line 345 "view-base.vala"
			_tmp16_ = allocation;
#line 345 "view-base.vala"
			_tmp17_ = cairo_surface_create_similar (_tmp14_, CAIRO_CONTENT_COLOR_ALPHA, _tmp15_.width, _tmp16_.height);
#line 345 "view-base.vala"
			surf = _tmp17_;
#line 349 "view-base.vala"
			_tmp18_ = surf;
#line 349 "view-base.vala"
			_tmp19_ = cairo_create (_tmp18_);
#line 349 "view-base.vala"
			cr = _tmp19_;
#line 350 "view-base.vala"
			_tmp20_ = cr;
#line 350 "view-base.vala"
			synapse_gui_view_paint_background (self, _tmp20_);
#line 351 "view-base.vala"
			_tmp21_ = self->bg_cache;
#line 351 "view-base.vala"
			_tmp22_ = key;
#line 351 "view-base.vala"
			_tmp23_ = surf;
#line 351 "view-base.vala"
			gee_map_set (_tmp21_, _tmp22_, _tmp23_);
#line 352 "view-base.vala"
			_tmp24_ = surf;
#line 352 "view-base.vala"
			cairo_set_source_surface (ctx, _tmp24_, (gdouble) 0, (gdouble) 0);
#line 339 "view-base.vala"
			_cairo_destroy0 (cr);
#line 339 "view-base.vala"
			_cairo_surface_destroy0 (surf);
#line 1287 "view-base.c"
		}
	} else {
#line 357 "view-base.vala"
		cairo_push_group (ctx);
#line 358 "view-base.vala"
		synapse_gui_view_paint_background (self, ctx);
#line 359 "view-base.vala"
		cairo_pop_group_to_source (ctx);
#line 1296 "view-base.c"
	}
#line 362 "view-base.vala"
	cairo_set_operator (ctx, CAIRO_OPERATOR_DEST_OVER);
#line 363 "view-base.vala"
	cairo_paint (ctx);
#line 365 "view-base.vala"
	result = TRUE;
#line 365 "view-base.vala"
	_g_free0 (key);
#line 365 "view-base.vala"
	return result;
#line 1308 "view-base.c"
}

static void
_synapse_gui_view_drag_end_handler_gtk_widget_drag_end (GtkWidget* _sender,
                                                        GdkDragContext* context,
                                                        gpointer self)
{
#line 371 "view-base.vala"
	synapse_gui_view_drag_end_handler ((SynapseGuiView*) self, _sender, context);
#line 1318 "view-base.c"
}

static void
_synapse_gui_icontroller_selected_index_changed_event_synapse_gui_match_list_view_selected_index_changed (SynapseGuiMatchListView* _sender,
                                                                                                          gint new_index,
                                                                                                          gpointer self)
{
#line 373 "view-base.vala"
	synapse_gui_icontroller_selected_index_changed_event ((SynapseGuiIController*) self, new_index);
#line 1328 "view-base.c"
}

static void
_synapse_gui_icontroller_fire_focus_synapse_gui_match_list_view_fire_item (SynapseGuiMatchListView* _sender,
                                                                           gpointer self)
{
#line 374 "view-base.vala"
	synapse_gui_icontroller_fire_focus ((SynapseGuiIController*) self);
#line 1337 "view-base.c"
}

static void
_synapse_gui_icontroller_fire_focus_context_switch_event_synapse_gui_match_list_view_fire_item_context_switch (SynapseGuiMatchListView* _sender,
                                                                                                               gpointer self)
{
#line 375 "view-base.vala"
	synapse_gui_icontroller_fire_focus_context_switch_event ((SynapseGuiIController*) self);
#line 1346 "view-base.c"
}

void
synapse_gui_view_connect_handlers (SynapseGuiView* self,
                                   SynapseGuiMatchListView* view)
{
	SynapseGuiIController* _tmp0_;
	SynapseGuiIController* _tmp1_;
	SynapseGuiIController* _tmp2_;
	SynapseGuiIController* _tmp3_;
	SynapseGuiIController* _tmp4_;
	SynapseGuiIController* _tmp5_;
#line 368 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 368 "view-base.vala"
	g_return_if_fail (view != NULL);
#line 371 "view-base.vala"
	g_signal_connect_object ((GtkWidget*) view, "drag-end", (GCallback) _synapse_gui_view_drag_end_handler_gtk_widget_drag_end, self, 0);
#line 373 "view-base.vala"
	_tmp0_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 373 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 373 "view-base.vala"
	g_signal_connect_object (view, "selected-index-changed", (GCallback) _synapse_gui_icontroller_selected_index_changed_event_synapse_gui_match_list_view_selected_index_changed, _tmp1_, 0);
#line 374 "view-base.vala"
	_tmp2_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 374 "view-base.vala"
	_tmp3_ = _tmp2_;
#line 374 "view-base.vala"
	g_signal_connect_object (view, "fire-item", (GCallback) _synapse_gui_icontroller_fire_focus_synapse_gui_match_list_view_fire_item, _tmp3_, 0);
#line 375 "view-base.vala"
	_tmp4_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 375 "view-base.vala"
	_tmp5_ = _tmp4_;
#line 375 "view-base.vala"
	g_signal_connect_object (view, "fire-item-context-switch", (GCallback) _synapse_gui_icontroller_fire_focus_context_switch_event_synapse_gui_match_list_view_fire_item_context_switch, _tmp5_, 0);
#line 1383 "view-base.c"
}

void
synapse_gui_view_prepare_results_container (SynapseGuiView* self,
                                            SynapseGuiSelectionContainer** results_container,
                                            SynapseGuiResultBox** results_sources,
                                            SynapseGuiResultBox** results_actions,
                                            SynapseGuiResultBox** results_targets,
                                            GtkStateFlags state_type,
                                            gboolean add_to_container)
{
	SynapseGuiSelectionContainer* _vala_results_container = NULL;
	SynapseGuiResultBox* _vala_results_sources = NULL;
	SynapseGuiResultBox* _vala_results_actions = NULL;
	SynapseGuiResultBox* _vala_results_targets = NULL;
	SynapseGuiResultBox* _tmp0_;
	SynapseGuiResultBox* _tmp1_;
	SynapseGuiResultBox* _tmp2_;
	SynapseGuiMatchListView* results_sources_view = NULL;
	SynapseGuiResultBox* _tmp3_;
	SynapseGuiMatchListView* _tmp4_;
	SynapseGuiMatchListView* results_actions_view = NULL;
	SynapseGuiResultBox* _tmp5_;
	SynapseGuiMatchListView* _tmp6_;
	SynapseGuiMatchListView* results_targets_view = NULL;
	SynapseGuiResultBox* _tmp7_;
	SynapseGuiMatchListView* _tmp8_;
	SynapseGuiMatchListView* _tmp9_;
	SynapseGuiMatchListView* _tmp10_;
	SynapseGuiMatchListView* _tmp11_;
	SynapseGuiResultBox* _tmp19_;
	SynapseGuiResultBox* _tmp20_;
	SynapseGuiResultBox* _tmp21_;
#line 378 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 385 "view-base.vala"
	_tmp0_ = synapse_gui_result_box_new (100, 5);
#line 385 "view-base.vala"
	g_object_ref_sink (_tmp0_);
#line 385 "view-base.vala"
	_g_object_unref0 (_vala_results_sources);
#line 385 "view-base.vala"
	_vala_results_sources = _tmp0_;
#line 386 "view-base.vala"
	_tmp1_ = synapse_gui_result_box_new (100, 5);
#line 386 "view-base.vala"
	g_object_ref_sink (_tmp1_);
#line 386 "view-base.vala"
	_g_object_unref0 (_vala_results_actions);
#line 386 "view-base.vala"
	_vala_results_actions = _tmp1_;
#line 387 "view-base.vala"
	_tmp2_ = synapse_gui_result_box_new (100, 5);
#line 387 "view-base.vala"
	g_object_ref_sink (_tmp2_);
#line 387 "view-base.vala"
	_g_object_unref0 (_vala_results_targets);
#line 387 "view-base.vala"
	_vala_results_targets = _tmp2_;
#line 389 "view-base.vala"
	_tmp3_ = _vala_results_sources;
#line 389 "view-base.vala"
	_tmp4_ = synapse_gui_result_box_get_match_list_view (_tmp3_);
#line 389 "view-base.vala"
	results_sources_view = _tmp4_;
#line 390 "view-base.vala"
	_tmp5_ = _vala_results_actions;
#line 390 "view-base.vala"
	_tmp6_ = synapse_gui_result_box_get_match_list_view (_tmp5_);
#line 390 "view-base.vala"
	results_actions_view = _tmp6_;
#line 391 "view-base.vala"
	_tmp7_ = _vala_results_targets;
#line 391 "view-base.vala"
	_tmp8_ = synapse_gui_result_box_get_match_list_view (_tmp7_);
#line 391 "view-base.vala"
	results_targets_view = _tmp8_;
#line 393 "view-base.vala"
	_tmp9_ = results_sources_view;
#line 393 "view-base.vala"
	synapse_gui_view_connect_handlers (self, _tmp9_);
#line 394 "view-base.vala"
	_tmp10_ = results_actions_view;
#line 394 "view-base.vala"
	synapse_gui_view_connect_handlers (self, _tmp10_);
#line 395 "view-base.vala"
	_tmp11_ = results_targets_view;
#line 395 "view-base.vala"
	synapse_gui_view_connect_handlers (self, _tmp11_);
#line 397 "view-base.vala"
	if (add_to_container) {
#line 1475 "view-base.c"
		SynapseGuiSelectionContainer* _tmp12_;
		SynapseGuiSelectionContainer* _tmp13_;
		SynapseGuiResultBox* _tmp14_;
		SynapseGuiSelectionContainer* _tmp15_;
		SynapseGuiResultBox* _tmp16_;
		SynapseGuiSelectionContainer* _tmp17_;
		SynapseGuiResultBox* _tmp18_;
#line 399 "view-base.vala"
		_tmp12_ = synapse_gui_selection_container_new ();
#line 399 "view-base.vala"
		g_object_ref_sink (_tmp12_);
#line 399 "view-base.vala"
		_g_object_unref0 (_vala_results_container);
#line 399 "view-base.vala"
		_vala_results_container = _tmp12_;
#line 400 "view-base.vala"
		_tmp13_ = _vala_results_container;
#line 400 "view-base.vala"
		_tmp14_ = _vala_results_sources;
#line 400 "view-base.vala"
		gtk_container_add ((GtkContainer*) _tmp13_, (GtkWidget*) _tmp14_);
#line 401 "view-base.vala"
		_tmp15_ = _vala_results_container;
#line 401 "view-base.vala"
		_tmp16_ = _vala_results_actions;
#line 401 "view-base.vala"
		gtk_container_add ((GtkContainer*) _tmp15_, (GtkWidget*) _tmp16_);
#line 402 "view-base.vala"
		_tmp17_ = _vala_results_container;
#line 402 "view-base.vala"
		_tmp18_ = _vala_results_targets;
#line 402 "view-base.vala"
		gtk_container_add ((GtkContainer*) _tmp17_, (GtkWidget*) _tmp18_);
#line 1509 "view-base.c"
	} else {
#line 406 "view-base.vala"
		_g_object_unref0 (_vala_results_container);
#line 406 "view-base.vala"
		_vala_results_container = NULL;
#line 1515 "view-base.c"
	}
#line 409 "view-base.vala"
	_tmp19_ = _vala_results_sources;
#line 409 "view-base.vala"
	synapse_gui_result_box_set_state (_tmp19_, state_type);
#line 410 "view-base.vala"
	_tmp20_ = _vala_results_actions;
#line 410 "view-base.vala"
	synapse_gui_result_box_set_state (_tmp20_, state_type);
#line 411 "view-base.vala"
	_tmp21_ = _vala_results_targets;
#line 411 "view-base.vala"
	synapse_gui_result_box_set_state (_tmp21_, state_type);
#line 378 "view-base.vala"
	_g_object_unref0 (results_targets_view);
#line 378 "view-base.vala"
	_g_object_unref0 (results_actions_view);
#line 378 "view-base.vala"
	_g_object_unref0 (results_sources_view);
#line 378 "view-base.vala"
	if (results_container) {
#line 378 "view-base.vala"
		*results_container = _vala_results_container;
#line 1539 "view-base.c"
	} else {
#line 378 "view-base.vala"
		_g_object_unref0 (_vala_results_container);
#line 1543 "view-base.c"
	}
#line 378 "view-base.vala"
	if (results_sources) {
#line 378 "view-base.vala"
		*results_sources = _vala_results_sources;
#line 1549 "view-base.c"
	} else {
#line 378 "view-base.vala"
		_g_object_unref0 (_vala_results_sources);
#line 1553 "view-base.c"
	}
#line 378 "view-base.vala"
	if (results_actions) {
#line 378 "view-base.vala"
		*results_actions = _vala_results_actions;
#line 1559 "view-base.c"
	} else {
#line 378 "view-base.vala"
		_g_object_unref0 (_vala_results_actions);
#line 1563 "view-base.c"
	}
#line 378 "view-base.vala"
	if (results_targets) {
#line 378 "view-base.vala"
		*results_targets = _vala_results_targets;
#line 1569 "view-base.c"
	} else {
#line 378 "view-base.vala"
		_g_object_unref0 (_vala_results_targets);
#line 1573 "view-base.c"
	}
}

static void
synapse_gui_view_real_paint_background (SynapseGuiView* self,
                                        cairo_t* ctx)
{
	SynapseGuiUtilsColorHelper* _tmp0_;
#line 414 "view-base.vala"
	g_return_if_fail (ctx != NULL);
#line 416 "view-base.vala"
	_tmp0_ = self->ch;
#line 416 "view-base.vala"
	synapse_gui_utils_color_helper_set_source_rgba (_tmp0_, ctx, 0.9, SYNAPSE_GUI_STYLE_TYPE_BG, GTK_STATE_FLAG_NORMAL, SYNAPSE_GUI_MOD_NORMAL);
#line 417 "view-base.vala"
	cairo_set_operator (ctx, CAIRO_OPERATOR_SOURCE);
#line 418 "view-base.vala"
	cairo_paint (ctx);
#line 1592 "view-base.c"
}

void
synapse_gui_view_paint_background (SynapseGuiView* self,
                                   cairo_t* ctx)
{
	SynapseGuiViewClass* _klass_;
#line 414 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 414 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 414 "view-base.vala"
	if (_klass_->paint_background) {
#line 414 "view-base.vala"
		_klass_->paint_background (self, ctx);
#line 1608 "view-base.c"
	}
}

void
synapse_gui_view_force_grab (SynapseGuiView* self)
{
#line 421 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 423 "view-base.vala"
	synapse_gui_utils_present_window ((GtkWindow*) self);
#line 1619 "view-base.c"
}

static void
synapse_gui_view_real_summon (SynapseGuiView* self)
{
#line 428 "view-base.vala"
	synapse_gui_view_set_list_visible (self, TRUE);
#line 429 "view-base.vala"
	synapse_gui_utils_move_window_to_center ((GtkWindow*) self);
#line 430 "view-base.vala"
	synapse_gui_view_set_list_visible (self, FALSE);
#line 431 "view-base.vala"
	gtk_widget_show ((GtkWidget*) self);
#line 432 "view-base.vala"
	if (self->is_kwin) {
#line 1635 "view-base.c"
		GtkAllocation allocation = {0};
		GtkAllocation _tmp0_ = {0};
		GtkAllocation _tmp1_;
		GtkAllocation _tmp2_;
#line 435 "view-base.vala"
		gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
#line 435 "view-base.vala"
		allocation = _tmp0_;
#line 436 "view-base.vala"
		_tmp1_ = allocation;
#line 436 "view-base.vala"
		_tmp2_ = allocation;
#line 436 "view-base.vala"
		synapse_gui_view_add_kde_compatibility (self, (GtkWindow*) self, _tmp1_.width, _tmp2_.height);
#line 1650 "view-base.c"
	}
#line 438 "view-base.vala"
	synapse_gui_utils_present_window ((GtkWindow*) self);
#line 439 "view-base.vala"
	gtk_widget_queue_draw ((GtkWidget*) self);
#line 440 "view-base.vala"
	g_signal_emit_by_name ((SynapseGuiIView*) self, "summoned");
#line 1658 "view-base.c"
}

void
synapse_gui_view_summon (SynapseGuiView* self)
{
	SynapseGuiViewClass* _klass_;
#line 426 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 426 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 426 "view-base.vala"
	if (_klass_->summon) {
#line 426 "view-base.vala"
		_klass_->summon (self);
#line 1673 "view-base.c"
	}
}

static void
synapse_gui_view_real_vanish (SynapseGuiView* self)
{
	SynapseGuiIconCacheService* _tmp0_;
	SynapseGuiIconCacheService* _tmp1_;
#line 445 "view-base.vala"
	synapse_gui_utils_unpresent_window ((GtkWindow*) self);
#line 446 "view-base.vala"
	gtk_widget_hide ((GtkWidget*) self);
#line 447 "view-base.vala"
	g_signal_emit_by_name ((SynapseGuiIView*) self, "vanished");
#line 448 "view-base.vala"
	_tmp0_ = synapse_gui_icon_cache_service_get_default ();
#line 448 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 448 "view-base.vala"
	synapse_gui_icon_cache_service_reduce_cache (_tmp1_);
#line 448 "view-base.vala"
	_g_object_unref0 (_tmp1_);
#line 1696 "view-base.c"
}

void
synapse_gui_view_vanish (SynapseGuiView* self)
{
	SynapseGuiViewClass* _klass_;
#line 443 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 443 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 443 "view-base.vala"
	if (_klass_->vanish) {
#line 443 "view-base.vala"
		_klass_->vanish (self);
#line 1711 "view-base.c"
	}
}

static void
synapse_gui_view_real_summon_or_vanish (SynapseGuiView* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
#line 453 "view-base.vala"
	_tmp0_ = gtk_widget_get_visible ((GtkWidget*) self);
#line 453 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 453 "view-base.vala"
	if (_tmp1_) {
#line 454 "view-base.vala"
		synapse_gui_view_vanish (self);
#line 1728 "view-base.c"
	} else {
#line 456 "view-base.vala"
		synapse_gui_view_summon (self);
#line 1732 "view-base.c"
	}
}

void
synapse_gui_view_summon_or_vanish (SynapseGuiView* self)
{
	SynapseGuiViewClass* _klass_;
#line 451 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 451 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 451 "view-base.vala"
	if (_klass_->summon_or_vanish) {
#line 451 "view-base.vala"
		_klass_->summon_or_vanish (self);
#line 1748 "view-base.c"
	}
}

static gboolean
_synapse_gui_view_draggable_clicked_gtk_widget_button_press_event (GtkWidget* _sender,
                                                                   GdkEventButton* event,
                                                                   gpointer self)
{
	gboolean result;
	result = synapse_gui_view_draggable_clicked ((SynapseGuiView*) self, _sender, event);
#line 471 "view-base.vala"
	return result;
#line 1761 "view-base.c"
}

static void
_synapse_gui_view_draggable_get_gtk_widget_drag_data_get (GtkWidget* _sender,
                                                          GdkDragContext* context,
                                                          GtkSelectionData* selection_data,
                                                          guint info,
                                                          guint time_,
                                                          gpointer self)
{
#line 472 "view-base.vala"
	synapse_gui_view_draggable_get ((SynapseGuiView*) self, _sender, context, selection_data, info, time_);
#line 1774 "view-base.c"
}

void
synapse_gui_view_make_draggable (SynapseGuiView* self,
                                 GtkEventBox* obj)
{
	GtkTargetEntry* _tmp0_;
	GtkTargetEntry* _tmp1_;
	gint _tmp1__length1;
#line 462 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 462 "view-base.vala"
	g_return_if_fail (obj != NULL);
#line 464 "view-base.vala"
	gtk_widget_set_events ((GtkWidget*) obj, gtk_widget_get_events ((GtkWidget*) obj) | GDK_BUTTON_PRESS_MASK);
#line 466 "view-base.vala"
	_tmp0_ = g_new0 (GtkTargetEntry, 0);
#line 466 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 466 "view-base.vala"
	_tmp1__length1 = 0;
#line 466 "view-base.vala"
	gtk_drag_source_set ((GtkWidget*) obj, GDK_BUTTON1_MASK, _tmp1_, (gint) 0, ((GDK_ACTION_ASK | GDK_ACTION_COPY) | GDK_ACTION_MOVE) | GDK_ACTION_LINK);
#line 466 "view-base.vala"
	_tmp1_ = (g_free (_tmp1_), NULL);
#line 471 "view-base.vala"
	g_signal_connect_object ((GtkWidget*) obj, "button-press-event", (GCallback) _synapse_gui_view_draggable_clicked_gtk_widget_button_press_event, self, 0);
#line 472 "view-base.vala"
	g_signal_connect_object ((GtkWidget*) obj, "drag-data-get", (GCallback) _synapse_gui_view_draggable_get_gtk_widget_drag_data_get, self, 0);
#line 473 "view-base.vala"
	g_signal_connect_object ((GtkWidget*) obj, "drag-end", (GCallback) _synapse_gui_view_drag_end_handler_gtk_widget_drag_end, self, 0);
#line 1806 "view-base.c"
}

void
synapse_gui_view_drag_end_handler (SynapseGuiView* self,
                                   GtkWidget* w,
                                   GdkDragContext* context)
{
#line 477 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 477 "view-base.vala"
	g_return_if_fail (w != NULL);
#line 477 "view-base.vala"
	g_return_if_fail (context != NULL);
#line 479 "view-base.vala"
	synapse_gui_view_force_grab (self);
#line 1822 "view-base.c"
}

static void
synapse_gui_view_draggable_get (SynapseGuiView* self,
                                GtkWidget* w,
                                GdkDragContext* context,
                                GtkSelectionData* selection_data,
                                guint info,
                                guint time_)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
#line 482 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 482 "view-base.vala"
	g_return_if_fail (w != NULL);
#line 482 "view-base.vala"
	g_return_if_fail (context != NULL);
#line 482 "view-base.vala"
	g_return_if_fail (selection_data != NULL);
#line 485 "view-base.vala"
	_tmp0_ = self->priv->dragdrop_name;
#line 485 "view-base.vala"
	gtk_selection_data_set_text (selection_data, _tmp0_, -1);
#line 486 "view-base.vala"
	_tmp1_ = self->priv->dragdrop_uri;
#line 486 "view-base.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 486 "view-base.vala"
	_tmp3_ = g_new0 (gchar*, 1 + 1);
#line 486 "view-base.vala"
	_tmp3_[0] = _tmp2_;
#line 486 "view-base.vala"
	_tmp4_ = _tmp3_;
#line 486 "view-base.vala"
	_tmp4__length1 = 1;
#line 486 "view-base.vala"
	gtk_selection_data_set_uris (selection_data, _tmp4_);
#line 486 "view-base.vala"
	_tmp4_ = (_vala_array_free (_tmp4_, _tmp4__length1, (GDestroyNotify) g_free), NULL);
#line 1867 "view-base.c"
}

static gboolean
synapse_gui_view_draggable_clicked (SynapseGuiView* self,
                                    GtkWidget* w,
                                    GdkEventButton* event)
{
	GtkTargetList* tl = NULL;
	GtkTargetEntry* _tmp0_;
	GtkTargetEntry* _tmp1_;
	gint _tmp1__length1;
	GtkTargetList* _tmp2_;
	GtkTargetList* _tmp3_;
	SynapseGuiSearchingFor sf = 0;
	SynapseGuiModel* _tmp4_;
	SynapseGuiModel* _tmp5_;
	SynapseGuiEntry** _tmp6_;
	gint _tmp6__length1;
	SynapseGuiEntry* _tmp7_;
	gconstpointer _tmp8_;
	gconstpointer _tmp9_;
	SynapseUriMatch* um = NULL;
	SynapseGuiModel* _tmp13_;
	SynapseGuiEntry** _tmp14_;
	gint _tmp14__length1;
	SynapseGuiEntry* _tmp15_;
	gconstpointer _tmp16_;
	gconstpointer _tmp17_;
	SynapseMatch* _tmp18_;
	SynapseUriMatch* _tmp19_;
	SynapseUriMatch* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	gchar* _tmp26_;
	SynapseUriMatch* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	GtkTargetList* _tmp31_;
	GtkTargetList* _tmp32_;
	GtkTargetList* _tmp33_;
	GError* _inner_error0_ = NULL;
	gboolean result;
#line 489 "view-base.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 489 "view-base.vala"
	g_return_val_if_fail (w != NULL, FALSE);
#line 489 "view-base.vala"
	g_return_val_if_fail (event != NULL, FALSE);
#line 491 "view-base.vala"
	_tmp0_ = g_new0 (GtkTargetEntry, 0);
#line 491 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 491 "view-base.vala"
	_tmp1__length1 = 0;
#line 491 "view-base.vala"
	_tmp2_ = gtk_target_list_new (_tmp1_, 0);
#line 491 "view-base.vala"
	_tmp3_ = _tmp2_;
#line 491 "view-base.vala"
	_tmp1_ = (g_free (_tmp1_), NULL);
#line 491 "view-base.vala"
	tl = _tmp3_;
#line 492 "view-base.vala"
	_tmp4_ = self->model;
#line 492 "view-base.vala"
	sf = _tmp4_->searching_for;
#line 493 "view-base.vala"
	if (sf == SYNAPSE_GUI_SEARCHING_FOR_ACTIONS) {
#line 493 "view-base.vala"
		sf = SYNAPSE_GUI_SEARCHING_FOR_SOURCES;
#line 1939 "view-base.c"
	}
#line 494 "view-base.vala"
	_tmp5_ = self->model;
#line 494 "view-base.vala"
	_tmp6_ = _tmp5_->focus;
#line 494 "view-base.vala"
	_tmp6__length1 = _tmp5_->focus_length1;
#line 494 "view-base.vala"
	_tmp7_ = _tmp6_[sf];
#line 494 "view-base.vala"
	_tmp8_ = synapse_gui_entry_get_value (_tmp7_);
#line 494 "view-base.vala"
	_tmp9_ = _tmp8_;
#line 494 "view-base.vala"
	if (((SynapseMatch*) _tmp9_) == NULL) {
#line 1955 "view-base.c"
		gchar* _tmp10_;
		gchar* _tmp11_;
		GtkTargetList* _tmp12_;
#line 496 "view-base.vala"
		_tmp10_ = g_strdup ("");
#line 496 "view-base.vala"
		_g_free0 (self->priv->dragdrop_name);
#line 496 "view-base.vala"
		self->priv->dragdrop_name = _tmp10_;
#line 497 "view-base.vala"
		_tmp11_ = g_strdup ("");
#line 497 "view-base.vala"
		_g_free0 (self->priv->dragdrop_uri);
#line 497 "view-base.vala"
		self->priv->dragdrop_uri = _tmp11_;
#line 498 "view-base.vala"
		_tmp12_ = tl;
#line 498 "view-base.vala"
		gtk_drag_source_set_target_list (w, _tmp12_);
#line 499 "view-base.vala"
		gtk_drag_source_set_icon_stock (w, GTK_STOCK_MISSING_IMAGE);
#line 500 "view-base.vala"
		result = FALSE;
#line 500 "view-base.vala"
		_gtk_target_list_unref0 (tl);
#line 500 "view-base.vala"
		return result;
#line 1983 "view-base.c"
	}
#line 503 "view-base.vala"
	_tmp13_ = self->model;
#line 503 "view-base.vala"
	_tmp14_ = _tmp13_->focus;
#line 503 "view-base.vala"
	_tmp14__length1 = _tmp13_->focus_length1;
#line 503 "view-base.vala"
	_tmp15_ = _tmp14_[sf];
#line 503 "view-base.vala"
	_tmp16_ = synapse_gui_entry_get_value (_tmp15_);
#line 503 "view-base.vala"
	_tmp17_ = _tmp16_;
#line 503 "view-base.vala"
	_tmp18_ = (SynapseMatch*) _tmp17_;
#line 503 "view-base.vala"
	um = G_TYPE_CHECK_INSTANCE_TYPE (_tmp18_, SYNAPSE_TYPE_URI_MATCH) ? ((SynapseUriMatch*) _tmp18_) : NULL;
#line 504 "view-base.vala"
	_tmp19_ = um;
#line 504 "view-base.vala"
	if (_tmp19_ == NULL) {
#line 2005 "view-base.c"
		gchar* _tmp20_;
		gchar* _tmp21_;
		GtkTargetList* _tmp22_;
#line 506 "view-base.vala"
		_tmp20_ = g_strdup ("");
#line 506 "view-base.vala"
		_g_free0 (self->priv->dragdrop_name);
#line 506 "view-base.vala"
		self->priv->dragdrop_name = _tmp20_;
#line 507 "view-base.vala"
		_tmp21_ = g_strdup ("");
#line 507 "view-base.vala"
		_g_free0 (self->priv->dragdrop_uri);
#line 507 "view-base.vala"
		self->priv->dragdrop_uri = _tmp21_;
#line 508 "view-base.vala"
		_tmp22_ = tl;
#line 508 "view-base.vala"
		gtk_drag_source_set_target_list (w, _tmp22_);
#line 509 "view-base.vala"
		gtk_drag_source_set_icon_stock (w, GTK_STOCK_MISSING_IMAGE);
#line 510 "view-base.vala"
		result = FALSE;
#line 510 "view-base.vala"
		_gtk_target_list_unref0 (tl);
#line 510 "view-base.vala"
		return result;
#line 2033 "view-base.c"
	}
#line 513 "view-base.vala"
	_tmp23_ = um;
#line 513 "view-base.vala"
	_tmp24_ = synapse_match_get_title ((SynapseMatch*) _tmp23_);
#line 513 "view-base.vala"
	_tmp25_ = _tmp24_;
#line 513 "view-base.vala"
	_tmp26_ = g_strdup (_tmp25_);
#line 513 "view-base.vala"
	_g_free0 (self->priv->dragdrop_name);
#line 513 "view-base.vala"
	self->priv->dragdrop_name = _tmp26_;
#line 514 "view-base.vala"
	_tmp27_ = um;
#line 514 "view-base.vala"
	_tmp28_ = synapse_uri_match_get_uri (_tmp27_);
#line 514 "view-base.vala"
	_tmp29_ = _tmp28_;
#line 514 "view-base.vala"
	_tmp30_ = g_strdup (_tmp29_);
#line 514 "view-base.vala"
	_g_free0 (self->priv->dragdrop_uri);
#line 514 "view-base.vala"
	self->priv->dragdrop_uri = _tmp30_;
#line 515 "view-base.vala"
	_tmp31_ = tl;
#line 515 "view-base.vala"
	gtk_target_list_add_text_targets (_tmp31_, (guint) 0);
#line 516 "view-base.vala"
	_tmp32_ = tl;
#line 516 "view-base.vala"
	gtk_target_list_add_uri_targets (_tmp32_, (guint) 1);
#line 517 "view-base.vala"
	_tmp33_ = tl;
#line 517 "view-base.vala"
	gtk_drag_source_set_target_list (w, _tmp33_);
#line 2071 "view-base.c"
	{
		GIcon* icon = NULL;
		SynapseUriMatch* _tmp34_;
		const gchar* _tmp35_;
		const gchar* _tmp36_;
		GIcon* _tmp37_;
		GIcon* _tmp38_;
		GtkIconInfo* iconinfo = NULL;
		GtkIconTheme* _tmp39_;
		GIcon* _tmp40_;
		GtkIconInfo* _tmp41_;
		GtkIconInfo* _tmp42_;
		GdkPixbuf* icon_pixbuf = NULL;
		GtkIconInfo* _tmp43_;
		GdkPixbuf* _tmp44_;
		GdkPixbuf* _tmp45_;
		GdkPixbuf* _tmp46_;
#line 520 "view-base.vala"
		_tmp34_ = um;
#line 520 "view-base.vala"
		_tmp35_ = synapse_match_get_icon_name ((SynapseMatch*) _tmp34_);
#line 520 "view-base.vala"
		_tmp36_ = _tmp35_;
#line 520 "view-base.vala"
		_tmp37_ = g_icon_new_for_string (_tmp36_, &_inner_error0_);
#line 520 "view-base.vala"
		icon = _tmp37_;
#line 520 "view-base.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 2101 "view-base.c"
			goto __catch0_g_error;
		}
#line 521 "view-base.vala"
		_tmp38_ = icon;
#line 521 "view-base.vala"
		if (_tmp38_ == NULL) {
#line 521 "view-base.vala"
			result = FALSE;
#line 521 "view-base.vala"
			_g_object_unref0 (icon);
#line 521 "view-base.vala"
			_gtk_target_list_unref0 (tl);
#line 521 "view-base.vala"
			return result;
#line 2116 "view-base.c"
		}
#line 523 "view-base.vala"
		_tmp39_ = gtk_icon_theme_get_default ();
#line 523 "view-base.vala"
		_tmp40_ = icon;
#line 523 "view-base.vala"
		_tmp41_ = gtk_icon_theme_lookup_by_gicon (_tmp39_, _tmp40_, 48, GTK_ICON_LOOKUP_FORCE_SIZE);
#line 523 "view-base.vala"
		iconinfo = _tmp41_;
#line 524 "view-base.vala"
		_tmp42_ = iconinfo;
#line 524 "view-base.vala"
		if (_tmp42_ == NULL) {
#line 524 "view-base.vala"
			result = FALSE;
#line 524 "view-base.vala"
			_g_object_unref0 (iconinfo);
#line 524 "view-base.vala"
			_g_object_unref0 (icon);
#line 524 "view-base.vala"
			_gtk_target_list_unref0 (tl);
#line 524 "view-base.vala"
			return result;
#line 2140 "view-base.c"
		}
#line 526 "view-base.vala"
		_tmp43_ = iconinfo;
#line 526 "view-base.vala"
		_tmp44_ = gtk_icon_info_load_icon (_tmp43_, &_inner_error0_);
#line 526 "view-base.vala"
		icon_pixbuf = _tmp44_;
#line 526 "view-base.vala"
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 526 "view-base.vala"
			_g_object_unref0 (iconinfo);
#line 526 "view-base.vala"
			_g_object_unref0 (icon);
#line 2154 "view-base.c"
			goto __catch0_g_error;
		}
#line 527 "view-base.vala"
		_tmp45_ = icon_pixbuf;
#line 527 "view-base.vala"
		if (_tmp45_ == NULL) {
#line 527 "view-base.vala"
			result = FALSE;
#line 527 "view-base.vala"
			_g_object_unref0 (icon_pixbuf);
#line 527 "view-base.vala"
			_g_object_unref0 (iconinfo);
#line 527 "view-base.vala"
			_g_object_unref0 (icon);
#line 527 "view-base.vala"
			_gtk_target_list_unref0 (tl);
#line 527 "view-base.vala"
			return result;
#line 2173 "view-base.c"
		}
#line 529 "view-base.vala"
		_tmp46_ = icon_pixbuf;
#line 529 "view-base.vala"
		gtk_drag_source_set_icon_pixbuf (w, _tmp46_);
#line 519 "view-base.vala"
		_g_object_unref0 (icon_pixbuf);
#line 519 "view-base.vala"
		_g_object_unref0 (iconinfo);
#line 519 "view-base.vala"
		_g_object_unref0 (icon);
#line 2185 "view-base.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 519 "view-base.vala"
		g_clear_error (&_inner_error0_);
#line 2192 "view-base.c"
	}
	__finally0:
#line 519 "view-base.vala"
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
#line 2197 "view-base.c"
		gboolean _tmp47_ = FALSE;
#line 519 "view-base.vala"
		_gtk_target_list_unref0 (tl);
#line 519 "view-base.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
#line 519 "view-base.vala"
		g_clear_error (&_inner_error0_);
#line 519 "view-base.vala"
		return _tmp47_;
#line 2207 "view-base.c"
	}
#line 532 "view-base.vala"
	result = FALSE;
#line 532 "view-base.vala"
	_gtk_target_list_unref0 (tl);
#line 532 "view-base.vala"
	return result;
#line 2215 "view-base.c"
}

static void
synapse_gui_view_real_update_focused_source (SynapseGuiView* self,
                                             SynapseGuiEntry* m)
{
#line 540 "view-base.vala"
	g_return_if_fail (m != NULL);
#line 2224 "view-base.c"
}

void
synapse_gui_view_update_focused_source (SynapseGuiView* self,
                                        SynapseGuiEntry* m)
{
	SynapseGuiViewClass* _klass_;
#line 540 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 540 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 540 "view-base.vala"
	if (_klass_->update_focused_source) {
#line 540 "view-base.vala"
		_klass_->update_focused_source (self, m);
#line 2240 "view-base.c"
	}
}

static void
synapse_gui_view_real_update_focused_action (SynapseGuiView* self,
                                             SynapseGuiEntry* m)
{
#line 541 "view-base.vala"
	g_return_if_fail (m != NULL);
#line 2250 "view-base.c"
}

void
synapse_gui_view_update_focused_action (SynapseGuiView* self,
                                        SynapseGuiEntry* m)
{
	SynapseGuiViewClass* _klass_;
#line 541 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 541 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 541 "view-base.vala"
	if (_klass_->update_focused_action) {
#line 541 "view-base.vala"
		_klass_->update_focused_action (self, m);
#line 2266 "view-base.c"
	}
}

static void
synapse_gui_view_real_update_focused_target (SynapseGuiView* self,
                                             SynapseGuiEntry* m)
{
#line 542 "view-base.vala"
	g_return_if_fail (m != NULL);
#line 2276 "view-base.c"
}

void
synapse_gui_view_update_focused_target (SynapseGuiView* self,
                                        SynapseGuiEntry* m)
{
	SynapseGuiViewClass* _klass_;
#line 542 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 542 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 542 "view-base.vala"
	if (_klass_->update_focused_target) {
#line 542 "view-base.vala"
		_klass_->update_focused_target (self, m);
#line 2292 "view-base.c"
	}
}

static void
synapse_gui_view_real_update_sources (SynapseGuiView* self,
                                      GeeList* list)
{
}

void
synapse_gui_view_update_sources (SynapseGuiView* self,
                                 GeeList* list)
{
	SynapseGuiViewClass* _klass_;
#line 544 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 544 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 544 "view-base.vala"
	if (_klass_->update_sources) {
#line 544 "view-base.vala"
		_klass_->update_sources (self, list);
#line 2315 "view-base.c"
	}
}

static void
synapse_gui_view_real_update_actions (SynapseGuiView* self,
                                      GeeList* list)
{
}

void
synapse_gui_view_update_actions (SynapseGuiView* self,
                                 GeeList* list)
{
	SynapseGuiViewClass* _klass_;
#line 545 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 545 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 545 "view-base.vala"
	if (_klass_->update_actions) {
#line 545 "view-base.vala"
		_klass_->update_actions (self, list);
#line 2338 "view-base.c"
	}
}

static void
synapse_gui_view_real_update_targets (SynapseGuiView* self,
                                      GeeList* list)
{
}

void
synapse_gui_view_update_targets (SynapseGuiView* self,
                                 GeeList* list)
{
	SynapseGuiViewClass* _klass_;
#line 546 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 546 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 546 "view-base.vala"
	if (_klass_->update_targets) {
#line 546 "view-base.vala"
		_klass_->update_targets (self, list);
#line 2361 "view-base.c"
	}
}

static void
synapse_gui_view_real_update_selected_category (SynapseGuiView* self)
{
}

void
synapse_gui_view_update_selected_category (SynapseGuiView* self)
{
	SynapseGuiViewClass* _klass_;
#line 548 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 548 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 548 "view-base.vala"
	if (_klass_->update_selected_category) {
#line 548 "view-base.vala"
		_klass_->update_selected_category (self);
#line 2382 "view-base.c"
	}
}

static void
synapse_gui_view_real_update_searching_for (SynapseGuiView* self)
{
}

void
synapse_gui_view_update_searching_for (SynapseGuiView* self)
{
	SynapseGuiViewClass* _klass_;
#line 550 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 550 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 550 "view-base.vala"
	if (_klass_->update_searching_for) {
#line 550 "view-base.vala"
		_klass_->update_searching_for (self);
#line 2403 "view-base.c"
	}
}

static gboolean
synapse_gui_view_real_is_list_visible (SynapseGuiView* self)
{
	gboolean result;
#line 552 "view-base.vala"
	result = TRUE;
#line 552 "view-base.vala"
	return result;
#line 2415 "view-base.c"
}

gboolean
synapse_gui_view_is_list_visible (SynapseGuiView* self)
{
	SynapseGuiViewClass* _klass_;
#line 552 "view-base.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 552 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 552 "view-base.vala"
	if (_klass_->is_list_visible) {
#line 552 "view-base.vala"
		return _klass_->is_list_visible (self);
#line 2430 "view-base.c"
	}
#line 552 "view-base.vala"
	return FALSE;
#line 2434 "view-base.c"
}

static void
synapse_gui_view_real_set_list_visible (SynapseGuiView* self,
                                        gboolean visible)
{
}

void
synapse_gui_view_set_list_visible (SynapseGuiView* self,
                                   gboolean visible)
{
	SynapseGuiViewClass* _klass_;
#line 553 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 553 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 553 "view-base.vala"
	if (_klass_->set_list_visible) {
#line 553 "view-base.vala"
		_klass_->set_list_visible (self, visible);
#line 2456 "view-base.c"
	}
}

static void
synapse_gui_view_real_set_throbber_visible (SynapseGuiView* self,
                                            gboolean visible)
{
}

void
synapse_gui_view_set_throbber_visible (SynapseGuiView* self,
                                       gboolean visible)
{
	SynapseGuiViewClass* _klass_;
#line 554 "view-base.vala"
	g_return_if_fail (self != NULL);
#line 554 "view-base.vala"
	_klass_ = SYNAPSE_GUI_VIEW_GET_CLASS (self);
#line 554 "view-base.vala"
	if (_klass_->set_throbber_visible) {
#line 554 "view-base.vala"
		_klass_->set_throbber_visible (self, visible);
#line 2479 "view-base.c"
	}
}

SynapseGuiView*
synapse_gui_view_construct (GType object_type)
{
	SynapseGuiView * self = NULL;
#line 25 "view-base.vala"
	self = (SynapseGuiView*) g_object_new (object_type, NULL);
#line 25 "view-base.vala"
	return self;
#line 2491 "view-base.c"
}

SynapseGuiView*
synapse_gui_view_new (void)
{
#line 25 "view-base.vala"
	return synapse_gui_view_construct (SYNAPSE_GUI_TYPE_VIEW);
#line 2499 "view-base.c"
}

static SynapseGuiModel*
synapse_gui_view_real_get_controller_model (SynapseGuiIView* base)
{
	SynapseGuiModel* result;
	SynapseGuiView* self;
	SynapseGuiModel* _tmp0_;
#line 537 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 537 "view-base.vala"
	_tmp0_ = self->priv->_controller_model;
#line 537 "view-base.vala"
	result = _tmp0_;
#line 537 "view-base.vala"
	return result;
#line 2516 "view-base.c"
}

static void
synapse_gui_view_real_set_controller_model (SynapseGuiIView* base,
                                            SynapseGuiModel* value)
{
	SynapseGuiView* self;
	SynapseGuiModel* old_value;
#line 537 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 537 "view-base.vala"
	old_value = synapse_gui_view_real_get_controller_model (base);
#line 537 "view-base.vala"
	if (old_value != value) {
#line 2531 "view-base.c"
		SynapseGuiModel* _tmp0_;
#line 537 "view-base.vala"
		_tmp0_ = _g_object_ref0 (value);
#line 537 "view-base.vala"
		_g_object_unref0 (self->priv->_controller_model);
#line 537 "view-base.vala"
		self->priv->_controller_model = _tmp0_;
#line 537 "view-base.vala"
		g_object_notify_by_pspec ((GObject *) self, synapse_gui_view_properties[SYNAPSE_GUI_VIEW_CONTROLLER_MODEL_PROPERTY]);
#line 2541 "view-base.c"
	}
}

static SynapseGuiIController*
synapse_gui_view_real_get_controller (SynapseGuiIView* base)
{
	SynapseGuiIController* result;
	SynapseGuiView* self;
	SynapseGuiIController* _tmp0_;
#line 538 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 538 "view-base.vala"
	_tmp0_ = self->priv->_controller;
#line 538 "view-base.vala"
	result = _tmp0_;
#line 538 "view-base.vala"
	return result;
#line 2559 "view-base.c"
}

static void
synapse_gui_view_real_set_controller (SynapseGuiIView* base,
                                      SynapseGuiIController* value)
{
	SynapseGuiView* self;
	SynapseGuiIController* old_value;
#line 538 "view-base.vala"
	self = (SynapseGuiView*) base;
#line 538 "view-base.vala"
	old_value = synapse_gui_view_real_get_controller (base);
#line 538 "view-base.vala"
	if (old_value != value) {
#line 2574 "view-base.c"
		SynapseGuiIController* _tmp0_;
#line 538 "view-base.vala"
		_tmp0_ = _g_object_ref0 (value);
#line 538 "view-base.vala"
		_g_object_unref0 (self->priv->_controller);
#line 538 "view-base.vala"
		self->priv->_controller = _tmp0_;
#line 538 "view-base.vala"
		g_object_notify_by_pspec ((GObject *) self, synapse_gui_view_properties[SYNAPSE_GUI_VIEW_CONTROLLER_PROPERTY]);
#line 2584 "view-base.c"
	}
}

static void
_synapse_gui_view___lambda18_ (SynapseGuiView* self)
{
	SynapseGuiIController* _tmp0_;
	SynapseGuiIController* _tmp1_;
	SynapseGuiHTextSelector* _tmp2_;
	gint _tmp3_;
	gint _tmp4_;
#line 189 "view-base.vala"
	_tmp0_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 189 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 189 "view-base.vala"
	_tmp2_ = self->flag_selector;
#line 189 "view-base.vala"
	_tmp3_ = synapse_gui_htext_selector_get_selected (_tmp2_);
#line 189 "view-base.vala"
	_tmp4_ = _tmp3_;
#line 189 "view-base.vala"
	synapse_gui_icontroller_category_changed_event (_tmp1_, _tmp4_);
#line 2608 "view-base.c"
}

static void
__synapse_gui_view___lambda18__synapse_gui_htext_selector_selection_changed (SynapseGuiHTextSelector* _sender,
                                                                             gpointer self)
{
#line 188 "view-base.vala"
	_synapse_gui_view___lambda18_ ((SynapseGuiView*) self);
#line 2617 "view-base.c"
}

static void
_synapse_gui_view_force_grab_gtk_widget_show (GtkWidget* _sender,
                                              gpointer self)
{
#line 206 "view-base.vala"
	synapse_gui_view_force_grab ((SynapseGuiView*) self);
#line 2626 "view-base.c"
}

static void
_synapse_gui_view____lambda19_ (SynapseGuiView* self)
{
	SynapseGuiIController* _tmp0_;
	SynapseGuiIController* _tmp1_;
#line 208 "view-base.vala"
	_tmp0_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 208 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 208 "view-base.vala"
	g_signal_emit_by_name (_tmp1_, "show-settings-requested");
#line 2640 "view-base.c"
}

static void
__synapse_gui_view____lambda19__synapse_gui_menu_button_settings_clicked (SynapseGuiMenuButton* _sender,
                                                                          gpointer self)
{
#line 207 "view-base.vala"
	_synapse_gui_view____lambda19_ ((SynapseGuiView*) self);
#line 2649 "view-base.c"
}

static GObject *
synapse_gui_view_constructor (GType type,
                              guint n_construct_properties,
                              GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseGuiView * self;
	SynapseGuiModel* _tmp0_;
	SynapseGuiModel* _tmp1_;
	SynapseGuiModel* _tmp2_;
	GtkRequisition _tmp3_ = {0};
	GeeHashMap* _tmp4_;
	GtkRequisition _tmp5_ = {0};
	GtkRequisition _tmp6_ = {0};
	gint _tmp7_ = 0;
	gint _tmp8_ = 0;
	SynapseGuiUtilsColorHelper* _tmp9_;
	SynapseGuiSmartLabel* initialize_smartlabel = NULL;
	SynapseGuiSmartLabel* _tmp10_;
	SynapseGuiHTextSelector* _tmp11_;
	SynapseGuiHTextSelector* _tmp29_;
	SynapseGuiIController* _tmp30_;
	SynapseGuiIController* _tmp31_;
	SynapseGuiCategoryConfig* _tmp32_;
	SynapseGuiCategoryConfig* _tmp33_;
	gint _tmp34_;
	gint _tmp35_;
	SynapseGuiHTextSelector* _tmp36_;
	GtkLabel* _tmp37_;
	GtkLabel* _tmp38_;
	SynapseGuiMenuButton* _tmp39_;
#line 139 "view-base.vala"
	parent_class = G_OBJECT_CLASS (synapse_gui_view_parent_class);
#line 139 "view-base.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 139 "view-base.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_GUI_TYPE_VIEW, SynapseGuiView);
#line 141 "view-base.vala"
	_tmp0_ = synapse_gui_iview_get_controller_model ((SynapseGuiIView*) self);
#line 141 "view-base.vala"
	_tmp1_ = _tmp0_;
#line 141 "view-base.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 141 "view-base.vala"
	_g_object_unref0 (self->model);
#line 141 "view-base.vala"
	self->model = _tmp2_;
#line 142 "view-base.vala"
	_tmp3_.width = 1;
#line 142 "view-base.vala"
	_tmp3_.height = 1;
#line 142 "view-base.vala"
	self->priv->old_alloc = _tmp3_;
#line 143 "view-base.vala"
	synapse_gui_view_update_wm (self);
#line 144 "view-base.vala"
	if (self->is_kwin) {
#line 144 "view-base.vala"
		g_message ("view-base.vala:144: Using KWin compatibility mode.");
#line 2712 "view-base.c"
	}
#line 146 "view-base.vala"
	self->cache_enabled = TRUE;
#line 147 "view-base.vala"
	_tmp4_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, cairo_gobject_surface_get_type (), (GBoxedCopyFunc) cairo_surface_reference, (GDestroyNotify) cairo_surface_destroy, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 147 "view-base.vala"
	_g_object_unref0 (self->bg_cache);
#line 147 "view-base.vala"
	self->bg_cache = (GeeMap*) _tmp4_;
#line 148 "view-base.vala"
	self->bg_state = GTK_STATE_FLAG_SELECTED;
#line 150 "view-base.vala"
	self->priv->req_target = _tmp5_;
#line 151 "view-base.vala"
	self->priv->req_current = _tmp6_;
#line 153 "view-base.vala"
	gtk_widget_style_get ((GtkWidget*) self, "border-radius", &_tmp7_, "shadow-size", &_tmp8_, NULL);
#line 153 "view-base.vala"
	self->BORDER_RADIUS = _tmp7_;
#line 153 "view-base.vala"
	self->SHADOW_SIZE = _tmp8_;
#line 156 "view-base.vala"
	gtk_widget_set_app_paintable ((GtkWidget*) self, TRUE);
#line 157 "view-base.vala"
	gtk_window_set_skip_taskbar_hint ((GtkWindow*) self, TRUE);
#line 158 "view-base.vala"
	gtk_window_set_skip_pager_hint ((GtkWindow*) self, TRUE);
#line 159 "view-base.vala"
	gtk_window_set_position ((GtkWindow*) self, GTK_WIN_POS_CENTER);
#line 160 "view-base.vala"
	gtk_window_set_decorated ((GtkWindow*) self, FALSE);
#line 161 "view-base.vala"
	gtk_window_set_resizable ((GtkWindow*) self, FALSE);
#line 164 "view-base.vala"
	if (self->is_kwin) {
#line 165 "view-base.vala"
		gtk_window_set_type_hint ((GtkWindow*) self, GDK_WINDOW_TYPE_HINT_NORMAL);
#line 2750 "view-base.c"
	} else {
#line 167 "view-base.vala"
		gtk_window_set_type_hint ((GtkWindow*) self, GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
#line 2754 "view-base.c"
	}
#line 168 "view-base.vala"
	gtk_window_set_keep_above ((GtkWindow*) self, TRUE);
#line 171 "view-base.vala"
	gtk_widget_set_events ((GtkWidget*) self, (gtk_widget_get_events ((GtkWidget*) self) | GDK_BUTTON_PRESS_MASK) | GDK_KEY_PRESS_MASK);
#line 174 "view-base.vala"
	synapse_gui_utils_ensure_transparent_bg ((GtkWidget*) self);
#line 176 "view-base.vala"
	_tmp9_ = synapse_gui_utils_color_helper_get_default ();
#line 176 "view-base.vala"
	_synapse_gui_utils_color_helper_unref0 (self->ch);
#line 176 "view-base.vala"
	self->ch = _tmp9_;
#line 179 "view-base.vala"
	_tmp10_ = synapse_gui_smart_label_new ();
#line 179 "view-base.vala"
	g_object_ref_sink (_tmp10_);
#line 179 "view-base.vala"
	initialize_smartlabel = _tmp10_;
#line 182 "view-base.vala"
	_tmp11_ = synapse_gui_htext_selector_new ();
#line 182 "view-base.vala"
	g_object_ref_sink (_tmp11_);
#line 182 "view-base.vala"
	_g_object_unref0 (self->flag_selector);
#line 182 "view-base.vala"
	self->flag_selector = _tmp11_;
#line 2782 "view-base.c"
	{
		GeeList* _c_list = NULL;
		SynapseGuiIController* _tmp12_;
		SynapseGuiIController* _tmp13_;
		SynapseGuiCategoryConfig* _tmp14_;
		SynapseGuiCategoryConfig* _tmp15_;
		GeeList* _tmp16_;
		GeeList* _tmp17_;
		gint _c_size = 0;
		GeeList* _tmp18_;
		gint _tmp19_;
		gint _tmp20_;
		gint _c_index = 0;
#line 183 "view-base.vala"
		_tmp12_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 183 "view-base.vala"
		_tmp13_ = _tmp12_;
#line 183 "view-base.vala"
		_tmp14_ = synapse_gui_icontroller_get_category_config (_tmp13_);
#line 183 "view-base.vala"
		_tmp15_ = _tmp14_;
#line 183 "view-base.vala"
		_tmp16_ = synapse_gui_category_config_get_categories (_tmp15_);
#line 183 "view-base.vala"
		_tmp17_ = _tmp16_;
#line 183 "view-base.vala"
		_c_list = _tmp17_;
#line 183 "view-base.vala"
		_tmp18_ = _c_list;
#line 183 "view-base.vala"
		_tmp19_ = gee_collection_get_size ((GeeCollection*) _tmp18_);
#line 183 "view-base.vala"
		_tmp20_ = _tmp19_;
#line 183 "view-base.vala"
		_c_size = _tmp20_;
#line 183 "view-base.vala"
		_c_index = -1;
#line 183 "view-base.vala"
		while (TRUE) {
#line 2822 "view-base.c"
			gint _tmp21_;
			gint _tmp22_;
			SynapseGuiCategoryConfigCategory* c = NULL;
			GeeList* _tmp23_;
			gpointer _tmp24_;
			SynapseGuiHTextSelector* _tmp25_;
			SynapseGuiCategoryConfigCategory* _tmp26_;
			const gchar* _tmp27_;
			const gchar* _tmp28_;
#line 183 "view-base.vala"
			_c_index = _c_index + 1;
#line 183 "view-base.vala"
			_tmp21_ = _c_index;
#line 183 "view-base.vala"
			_tmp22_ = _c_size;
#line 183 "view-base.vala"
			if (!(_tmp21_ < _tmp22_)) {
#line 183 "view-base.vala"
				break;
#line 2842 "view-base.c"
			}
#line 183 "view-base.vala"
			_tmp23_ = _c_list;
#line 183 "view-base.vala"
			_tmp24_ = gee_list_get (_tmp23_, _c_index);
#line 183 "view-base.vala"
			c = (SynapseGuiCategoryConfigCategory*) _tmp24_;
#line 185 "view-base.vala"
			_tmp25_ = self->flag_selector;
#line 185 "view-base.vala"
			_tmp26_ = c;
#line 185 "view-base.vala"
			_tmp27_ = synapse_gui_category_config_category_get_name (_tmp26_);
#line 185 "view-base.vala"
			_tmp28_ = _tmp27_;
#line 185 "view-base.vala"
			synapse_gui_htext_selector_add_text (_tmp25_, _tmp28_);
#line 183 "view-base.vala"
			_g_object_unref0 (c);
#line 2862 "view-base.c"
		}
	}
#line 187 "view-base.vala"
	_tmp29_ = self->flag_selector;
#line 187 "view-base.vala"
	_tmp30_ = synapse_gui_iview_get_controller ((SynapseGuiIView*) self);
#line 187 "view-base.vala"
	_tmp31_ = _tmp30_;
#line 187 "view-base.vala"
	_tmp32_ = synapse_gui_icontroller_get_category_config (_tmp31_);
#line 187 "view-base.vala"
	_tmp33_ = _tmp32_;
#line 187 "view-base.vala"
	_tmp34_ = synapse_gui_category_config_get_default_category_index (_tmp33_);
#line 187 "view-base.vala"
	_tmp35_ = _tmp34_;
#line 187 "view-base.vala"
	synapse_gui_htext_selector_set_selected (_tmp29_, _tmp35_);
#line 188 "view-base.vala"
	_tmp36_ = self->flag_selector;
#line 188 "view-base.vala"
	g_signal_connect_object (_tmp36_, "selection-changed", (GCallback) __synapse_gui_view___lambda18__synapse_gui_htext_selector_selection_changed, self, 0);
#line 195 "view-base.vala"
	_tmp37_ = (GtkLabel*) gtk_label_new (NULL);
#line 195 "view-base.vala"
	g_object_ref_sink (_tmp37_);
#line 195 "view-base.vala"
	_g_object_unref0 (self->spacer);
#line 195 "view-base.vala"
	self->spacer = _tmp37_;
#line 196 "view-base.vala"
	_tmp38_ = self->spacer;
#line 196 "view-base.vala"
	gtk_widget_set_size_request ((GtkWidget*) _tmp38_, 1, self->SHADOW_SIZE + self->BORDER_RADIUS);
#line 198 "view-base.vala"
	_g_object_unref0 (self->menu);
#line 198 "view-base.vala"
	self->menu = NULL;
#line 200 "view-base.vala"
	synapse_gui_view_build_ui (self);
#line 202 "view-base.vala"
	g_signal_emit_by_name ((GtkWidget*) self, "composited-changed");
#line 204 "view-base.vala"
	_tmp39_ = self->menu;
#line 204 "view-base.vala"
	if (_tmp39_ != NULL) {
#line 2909 "view-base.c"
		SynapseGuiMenuButton* _tmp40_;
		GtkMenu* _tmp41_;
		SynapseGuiMenuButton* _tmp42_;
#line 206 "view-base.vala"
		_tmp40_ = self->menu;
#line 206 "view-base.vala"
		_tmp41_ = synapse_gui_menu_button_get_menu (_tmp40_);
#line 206 "view-base.vala"
		g_signal_connect_object ((GtkWidget*) _tmp41_, "show", (GCallback) _synapse_gui_view_force_grab_gtk_widget_show, self, 0);
#line 207 "view-base.vala"
		_tmp42_ = self->menu;
#line 207 "view-base.vala"
		g_signal_connect_object (_tmp42_, "settings-clicked", (GCallback) __synapse_gui_view____lambda19__synapse_gui_menu_button_settings_clicked, self, 0);
#line 2923 "view-base.c"
	}
#line 213 "view-base.vala"
	g_signal_emit_by_name ((GtkWidget*) self, "style-updated");
#line 139 "view-base.vala"
	_g_object_unref0 (initialize_smartlabel);
#line 139 "view-base.vala"
	return obj;
#line 2931 "view-base.c"
}

static void
synapse_gui_view_class_init (SynapseGuiViewClass * klass,
                             gpointer klass_data)
{
	GParamSpecBoolean* bg_style = NULL;
	GParamSpecBoolean* _tmp0_;
	GParamSpecInt* border_radius = NULL;
	GParamSpecInt* _tmp1_;
	GParamSpecInt* shadow_size = NULL;
	GParamSpecInt* _tmp2_;
	GParamSpecInt* width = NULL;
	GParamSpecInt* _tmp3_;
	GParamSpecInt* spacing = NULL;
	GParamSpecInt* _tmp4_;
	GParamSpecInt* icon_size = NULL;
	GParamSpecInt* _tmp5_;
	GParamSpecString* title_max = NULL;
	GParamSpecString* _tmp6_;
	GParamSpecString* title_min = NULL;
	GParamSpecString* _tmp7_;
	GParamSpecString* descr_max = NULL;
	GParamSpecString* _tmp8_;
	GParamSpecString* descr_min = NULL;
	GParamSpecString* _tmp9_;
	GParamSpecString* cat_max = NULL;
	GParamSpecString* _tmp10_;
	GParamSpecString* cat_min = NULL;
	GParamSpecString* _tmp11_;
	GParamSpecInt* _tmp12_;
	GParamSpecBoolean* _tmp13_;
	GParamSpecInt* _tmp14_;
	GParamSpecInt* _tmp15_;
	GParamSpecString* _tmp16_;
	GParamSpecString* _tmp17_;
	GParamSpecString* _tmp18_;
	GParamSpecString* _tmp19_;
	GParamSpecString* _tmp20_;
	GParamSpecString* _tmp21_;
	GParamSpecInt* _tmp22_;
	GParamSpecInt* _tmp23_;
#line 25 "view-base.vala"
	synapse_gui_view_parent_class = g_type_class_peek_parent (klass);
#line 25 "view-base.vala"
	g_type_class_adjust_private_offset (klass, &SynapseGuiView_private_offset);
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->build_ui = (void (*) (SynapseGuiView*)) synapse_gui_view_real_build_ui;
#line 25 "view-base.vala"
	((GtkWidgetClass *) klass)->size_allocate = (void (*) (GtkWidget*, GtkAllocation*)) synapse_gui_view_real_size_allocate;
#line 25 "view-base.vala"
	((GtkWidgetClass *) klass)->composited_changed = (void (*) (GtkWidget*)) synapse_gui_view_real_composited_changed;
#line 25 "view-base.vala"
	((GtkWidgetClass *) klass)->style_updated = (void (*) (GtkWidget*)) synapse_gui_view_real_style_updated;
#line 25 "view-base.vala"
	((GtkWidgetClass *) klass)->button_press_event = (gboolean (*) (GtkWidget*, GdkEventButton*)) synapse_gui_view_real_button_press_event;
#line 25 "view-base.vala"
	((GtkWidgetClass *) klass)->key_press_event = (gboolean (*) (GtkWidget*, GdkEventKey*)) synapse_gui_view_real_key_press_event;
#line 25 "view-base.vala"
	((GtkWidgetClass *) klass)->draw = (gboolean (*) (GtkWidget*, cairo_t*)) synapse_gui_view_real_draw;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->paint_background = (void (*) (SynapseGuiView*, cairo_t*)) synapse_gui_view_real_paint_background;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->summon = (void (*) (SynapseGuiView*)) synapse_gui_view_real_summon;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->vanish = (void (*) (SynapseGuiView*)) synapse_gui_view_real_vanish;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->summon_or_vanish = (void (*) (SynapseGuiView*)) synapse_gui_view_real_summon_or_vanish;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_focused_source = (void (*) (SynapseGuiView*, SynapseGuiEntry*)) synapse_gui_view_real_update_focused_source;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_focused_action = (void (*) (SynapseGuiView*, SynapseGuiEntry*)) synapse_gui_view_real_update_focused_action;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_focused_target = (void (*) (SynapseGuiView*, SynapseGuiEntry*)) synapse_gui_view_real_update_focused_target;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_sources = (void (*) (SynapseGuiView*, GeeList*)) synapse_gui_view_real_update_sources;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_actions = (void (*) (SynapseGuiView*, GeeList*)) synapse_gui_view_real_update_actions;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_targets = (void (*) (SynapseGuiView*, GeeList*)) synapse_gui_view_real_update_targets;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_selected_category = (void (*) (SynapseGuiView*)) synapse_gui_view_real_update_selected_category;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->update_searching_for = (void (*) (SynapseGuiView*)) synapse_gui_view_real_update_searching_for;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->is_list_visible = (gboolean (*) (SynapseGuiView*)) synapse_gui_view_real_is_list_visible;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->set_list_visible = (void (*) (SynapseGuiView*, gboolean)) synapse_gui_view_real_set_list_visible;
#line 25 "view-base.vala"
	((SynapseGuiViewClass *) klass)->set_throbber_visible = (void (*) (SynapseGuiView*, gboolean)) synapse_gui_view_real_set_throbber_visible;
#line 25 "view-base.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_synapse_gui_view_get_property;
#line 25 "view-base.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_synapse_gui_view_set_property;
#line 25 "view-base.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_gui_view_constructor;
#line 25 "view-base.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_gui_view_finalize;
#line 25 "view-base.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_GUI_VIEW_CONTROLLER_MODEL_PROPERTY, synapse_gui_view_properties[SYNAPSE_GUI_VIEW_CONTROLLER_MODEL_PROPERTY] = g_param_spec_object ("controller-model", "controller-model", "controller-model", SYNAPSE_GUI_TYPE_MODEL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
#line 25 "view-base.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_GUI_VIEW_CONTROLLER_PROPERTY, synapse_gui_view_properties[SYNAPSE_GUI_VIEW_CONTROLLER_PROPERTY] = g_param_spec_object ("controller", "controller", "controller", SYNAPSE_GUI_TYPE_ICONTROLLER, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
#line 57 "view-base.vala"
	_tmp0_ = (GParamSpecBoolean*) g_param_spec_boolean ("use-selected-color", "Use selected color", "Use selected color for the background of Synapse in supported themes", FALSE, G_PARAM_READWRITE);
#line 57 "view-base.vala"
	bg_style = _tmp0_;
#line 63 "view-base.vala"
	_tmp1_ = (GParamSpecInt*) g_param_spec_int ("border-radius", "Border Radius", "Border Radius of Synapse window", 0, 50, 12, G_PARAM_READWRITE);
#line 63 "view-base.vala"
	border_radius = _tmp1_;
#line 68 "view-base.vala"
	_tmp2_ = (GParamSpecInt*) g_param_spec_int ("shadow-size", "Shadow Size", "Shadow size of Synapse window", 0, 50, 13, G_PARAM_READWRITE);
#line 68 "view-base.vala"
	shadow_size = _tmp2_;
#line 74 "view-base.vala"
	_tmp3_ = (GParamSpecInt*) g_param_spec_int ("ui-width", "Width", "The width of the content in supported themes", 0, 1024, 560, G_PARAM_READWRITE);
#line 74 "view-base.vala"
	width = _tmp3_;
#line 80 "view-base.vala"
	_tmp4_ = (GParamSpecInt*) g_param_spec_int ("pane-spacing", "Pane Spacing", "The space between panes in supported themes", 5, 100, 30, G_PARAM_READWRITE);
#line 80 "view-base.vala"
	spacing = _tmp4_;
#line 86 "view-base.vala"
	_tmp5_ = (GParamSpecInt*) g_param_spec_int ("icon-size", "Icon Size", "The size of focused icon in supported themes", 32, 256, 128, G_PARAM_READWRITE);
#line 86 "view-base.vala"
	icon_size = _tmp5_;
#line 92 "view-base.vala"
	_tmp6_ = (GParamSpecString*) g_param_spec_string ("title-size", "Title Font Size", "The standard size the match title in Pango absolute sizes (string)", "x-large", G_PARAM_READWRITE);
#line 92 "view-base.vala"
	title_max = _tmp6_;
#line 97 "view-base.vala"
	_tmp7_ = (GParamSpecString*) g_param_spec_string ("title-min-size", "Title minimum Font Size", "The minimum size the match title in Pango absolute sizes (string)", "medium", G_PARAM_READWRITE);
#line 97 "view-base.vala"
	title_min = _tmp7_;
#line 102 "view-base.vala"
	_tmp8_ = (GParamSpecString*) g_param_spec_string ("description-size", "Description Font Size", "The standard size the match description in Pango absolute sizes (strin" \
"g)", "medium", G_PARAM_READWRITE);
#line 102 "view-base.vala"
	descr_max = _tmp8_;
#line 107 "view-base.vala"
	_tmp9_ = (GParamSpecString*) g_param_spec_string ("description-min-size", "Description minimum Font Size", "The minimum size the match description in Pango absolute sizes (string" \
")", "medium", G_PARAM_READWRITE);
#line 107 "view-base.vala"
	descr_min = _tmp9_;
#line 112 "view-base.vala"
	_tmp10_ = (GParamSpecString*) g_param_spec_string ("selected-category-size", "Selected Category Font Size", "Font size of selected category in Pango absolute sizes (string)", "medium", G_PARAM_READWRITE);
#line 112 "view-base.vala"
	cat_max = _tmp10_;
#line 117 "view-base.vala"
	_tmp11_ = (GParamSpecString*) g_param_spec_string ("unselected-category-size", "Unselected Category Font Size", "Font size of unselected categories in Pango absolute sizes (string)", "small", G_PARAM_READWRITE);
#line 117 "view-base.vala"
	cat_min = _tmp11_;
#line 123 "view-base.vala"
	_tmp12_ = width;
#line 123 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp12_);
#line 124 "view-base.vala"
	_tmp13_ = bg_style;
#line 124 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp13_);
#line 125 "view-base.vala"
	_tmp14_ = spacing;
#line 125 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp14_);
#line 126 "view-base.vala"
	_tmp15_ = icon_size;
#line 126 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp15_);
#line 127 "view-base.vala"
	_tmp16_ = title_max;
#line 127 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp16_);
#line 128 "view-base.vala"
	_tmp17_ = title_min;
#line 128 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp17_);
#line 129 "view-base.vala"
	_tmp18_ = descr_max;
#line 129 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp18_);
#line 130 "view-base.vala"
	_tmp19_ = descr_min;
#line 130 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp19_);
#line 131 "view-base.vala"
	_tmp20_ = cat_max;
#line 131 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp20_);
#line 132 "view-base.vala"
	_tmp21_ = cat_min;
#line 132 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp21_);
#line 133 "view-base.vala"
	_tmp22_ = border_radius;
#line 133 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp22_);
#line 134 "view-base.vala"
	_tmp23_ = shadow_size;
#line 134 "view-base.vala"
	gtk_widget_class_install_style_property (GTK_WIDGET_CLASS (klass), (GParamSpec*) _tmp23_);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (cat_min);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (cat_max);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (descr_min);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (descr_max);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (title_min);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (title_max);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (icon_size);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (spacing);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (width);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (shadow_size);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (border_radius);
#line 55 "view-base.vala"
	_g_param_spec_unref0 (bg_style);
#line 3154 "view-base.c"
}

static void
synapse_gui_view_synapse_gui_iview_interface_init (SynapseGuiIViewIface * iface,
                                                   gpointer iface_data)
{
#line 25 "view-base.vala"
	synapse_gui_view_synapse_gui_iview_parent_iface = g_type_interface_peek_parent (iface);
#line 25 "view-base.vala"
	iface->summon = (void (*) (SynapseGuiIView*)) synapse_gui_view_summon;
#line 25 "view-base.vala"
	iface->vanish = (void (*) (SynapseGuiIView*)) synapse_gui_view_vanish;
#line 25 "view-base.vala"
	iface->summon_or_vanish = (void (*) (SynapseGuiIView*)) synapse_gui_view_summon_or_vanish;
#line 25 "view-base.vala"
	iface->update_focused_source = (void (*) (SynapseGuiIView*, SynapseGuiEntry*)) synapse_gui_view_update_focused_source;
#line 25 "view-base.vala"
	iface->update_focused_action = (void (*) (SynapseGuiIView*, SynapseGuiEntry*)) synapse_gui_view_update_focused_action;
#line 25 "view-base.vala"
	iface->update_focused_target = (void (*) (SynapseGuiIView*, SynapseGuiEntry*)) synapse_gui_view_update_focused_target;
#line 25 "view-base.vala"
	iface->update_sources = (void (*) (SynapseGuiIView*, GeeList*)) synapse_gui_view_update_sources;
#line 25 "view-base.vala"
	iface->update_actions = (void (*) (SynapseGuiIView*, GeeList*)) synapse_gui_view_update_actions;
#line 25 "view-base.vala"
	iface->update_targets = (void (*) (SynapseGuiIView*, GeeList*)) synapse_gui_view_update_targets;
#line 25 "view-base.vala"
	iface->update_selected_category = (void (*) (SynapseGuiIView*)) synapse_gui_view_update_selected_category;
#line 25 "view-base.vala"
	iface->update_searching_for = (void (*) (SynapseGuiIView*)) synapse_gui_view_update_searching_for;
#line 25 "view-base.vala"
	iface->is_list_visible = (gboolean (*) (SynapseGuiIView*)) synapse_gui_view_is_list_visible;
#line 25 "view-base.vala"
	iface->set_list_visible = (void (*) (SynapseGuiIView*, gboolean)) synapse_gui_view_set_list_visible;
#line 25 "view-base.vala"
	iface->set_throbber_visible = (void (*) (SynapseGuiIView*, gboolean)) synapse_gui_view_set_throbber_visible;
#line 25 "view-base.vala"
	iface->get_controller_model = synapse_gui_view_real_get_controller_model;
#line 25 "view-base.vala"
	iface->set_controller_model = synapse_gui_view_real_set_controller_model;
#line 25 "view-base.vala"
	iface->get_controller = synapse_gui_view_real_get_controller;
#line 25 "view-base.vala"
	iface->set_controller = synapse_gui_view_real_set_controller;
#line 3199 "view-base.c"
}

static void
synapse_gui_view_instance_init (SynapseGuiView * self,
                                gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
#line 25 "view-base.vala"
	self->priv = synapse_gui_view_get_instance_private (self);
#line 29 "view-base.vala"
	self->is_kwin = FALSE;
#line 459 "view-base.vala"
	_tmp0_ = g_strdup ("");
#line 459 "view-base.vala"
	self->priv->dragdrop_name = _tmp0_;
#line 460 "view-base.vala"
	_tmp1_ = g_strdup ("");
#line 460 "view-base.vala"
	self->priv->dragdrop_uri = _tmp1_;
#line 535 "view-base.vala"
	self->model = NULL;
#line 3222 "view-base.c"
}

static void
synapse_gui_view_finalize (GObject * obj)
{
	SynapseGuiView * self;
#line 25 "view-base.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_GUI_TYPE_VIEW, SynapseGuiView);
#line 42 "view-base.vala"
	_synapse_gui_utils_color_helper_unref0 (self->ch);
#line 43 "view-base.vala"
	_g_object_unref0 (self->flag_selector);
#line 44 "view-base.vala"
	_g_object_unref0 (self->menu);
#line 46 "view-base.vala"
	_g_object_unref0 (self->spacer);
#line 53 "view-base.vala"
	_g_object_unref0 (self->bg_cache);
#line 459 "view-base.vala"
	_g_free0 (self->priv->dragdrop_name);
#line 460 "view-base.vala"
	_g_free0 (self->priv->dragdrop_uri);
#line 535 "view-base.vala"
	_g_object_unref0 (self->model);
#line 537 "view-base.vala"
	_g_object_unref0 (self->priv->_controller_model);
#line 538 "view-base.vala"
	_g_object_unref0 (self->priv->_controller);
#line 25 "view-base.vala"
	G_OBJECT_CLASS (synapse_gui_view_parent_class)->finalize (obj);
#line 3253 "view-base.c"
}

static GType
synapse_gui_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseGuiViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_gui_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseGuiView), 0, (GInstanceInitFunc) synapse_gui_view_instance_init, NULL };
	static const GInterfaceInfo synapse_gui_iview_info = { (GInterfaceInitFunc) synapse_gui_view_synapse_gui_iview_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType synapse_gui_view_type_id;
	synapse_gui_view_type_id = g_type_register_static (gtk_window_get_type (), "SynapseGuiView", &g_define_type_info, 0);
	g_type_add_interface_static (synapse_gui_view_type_id, SYNAPSE_GUI_TYPE_IVIEW, &synapse_gui_iview_info);
	SynapseGuiView_private_offset = g_type_add_instance_private (synapse_gui_view_type_id, sizeof (SynapseGuiViewPrivate));
	return synapse_gui_view_type_id;
}

GType
synapse_gui_view_get_type (void)
{
	static volatile gsize synapse_gui_view_type_id__once = 0;
	if (g_once_init_enter (&synapse_gui_view_type_id__once)) {
		GType synapse_gui_view_type_id;
		synapse_gui_view_type_id = synapse_gui_view_get_type_once ();
		g_once_init_leave (&synapse_gui_view_type_id__once, synapse_gui_view_type_id);
	}
	return synapse_gui_view_type_id__once;
}

static void
_vala_synapse_gui_view_get_property (GObject * object,
                                     guint property_id,
                                     GValue * value,
                                     GParamSpec * pspec)
{
	SynapseGuiView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SYNAPSE_GUI_TYPE_VIEW, SynapseGuiView);
#line 25 "view-base.vala"
	switch (property_id) {
#line 25 "view-base.vala"
		case SYNAPSE_GUI_VIEW_CONTROLLER_MODEL_PROPERTY:
#line 25 "view-base.vala"
		g_value_set_object (value, synapse_gui_iview_get_controller_model ((SynapseGuiIView*) self));
#line 25 "view-base.vala"
		break;
#line 25 "view-base.vala"
		case SYNAPSE_GUI_VIEW_CONTROLLER_PROPERTY:
#line 25 "view-base.vala"
		g_value_set_object (value, synapse_gui_iview_get_controller ((SynapseGuiIView*) self));
#line 25 "view-base.vala"
		break;
#line 3302 "view-base.c"
		default:
#line 25 "view-base.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 25 "view-base.vala"
		break;
#line 3308 "view-base.c"
	}
}

static void
_vala_synapse_gui_view_set_property (GObject * object,
                                     guint property_id,
                                     const GValue * value,
                                     GParamSpec * pspec)
{
	SynapseGuiView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SYNAPSE_GUI_TYPE_VIEW, SynapseGuiView);
#line 25 "view-base.vala"
	switch (property_id) {
#line 25 "view-base.vala"
		case SYNAPSE_GUI_VIEW_CONTROLLER_MODEL_PROPERTY:
#line 25 "view-base.vala"
		synapse_gui_iview_set_controller_model ((SynapseGuiIView*) self, g_value_get_object (value));
#line 25 "view-base.vala"
		break;
#line 25 "view-base.vala"
		case SYNAPSE_GUI_VIEW_CONTROLLER_PROPERTY:
#line 25 "view-base.vala"
		synapse_gui_iview_set_controller ((SynapseGuiIView*) self, g_value_get_object (value));
#line 25 "view-base.vala"
		break;
#line 3334 "view-base.c"
		default:
#line 25 "view-base.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 25 "view-base.vala"
		break;
#line 3340 "view-base.c"
	}
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
#line 24 "controller.vala"
	if ((array != NULL) && (destroy_func != NULL)) {
#line 3351 "view-base.c"
		gssize i;
#line 24 "controller.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 24 "controller.vala"
			if (((gpointer*) array)[i] != NULL) {
#line 24 "controller.vala"
				destroy_func (((gpointer*) array)[i]);
#line 3359 "view-base.c"
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
#line 24 "controller.vala"
	_vala_array_destroy (array, array_length, destroy_func);
#line 24 "controller.vala"
	g_free (array);
#line 3374 "view-base.c"
}

