/* window.c generated by valac 0.56.3, the Vala compiler
 * generated from window.vala, do not modify */

/* window.vala
 *
 * Copyright (C) Red Hat, Inc
 *
 * 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/>.
 *
 * Author: Felipe Borges <felipeborges@gnome.org>
 *
 */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <handy.h>
#include <glib.h>
#include <gio/gio.h>
#include <gdk/gdk.h>
#include <stdlib.h>
#include <string.h>
#include <glib/gi18n-lib.h>

#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 CONNECTIONS_TYPE_WINDOW (connections_window_get_type ())
#define CONNECTIONS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_WINDOW, ConnectionsWindow))
#define CONNECTIONS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_WINDOW, ConnectionsWindowClass))
#define CONNECTIONS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_WINDOW))
#define CONNECTIONS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_WINDOW))
#define CONNECTIONS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_WINDOW, ConnectionsWindowClass))

typedef struct _ConnectionsWindow ConnectionsWindow;
typedef struct _ConnectionsWindowClass ConnectionsWindowClass;
typedef struct _ConnectionsWindowPrivate ConnectionsWindowPrivate;

#define CONNECTIONS_TYPE_COLLECTION_VIEW (connections_collection_view_get_type ())
#define CONNECTIONS_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_COLLECTION_VIEW, ConnectionsCollectionView))
#define CONNECTIONS_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_COLLECTION_VIEW, ConnectionsCollectionViewClass))
#define CONNECTIONS_IS_COLLECTION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_COLLECTION_VIEW))
#define CONNECTIONS_IS_COLLECTION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_COLLECTION_VIEW))
#define CONNECTIONS_COLLECTION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_COLLECTION_VIEW, ConnectionsCollectionViewClass))

typedef struct _ConnectionsCollectionView ConnectionsCollectionView;
typedef struct _ConnectionsCollectionViewClass ConnectionsCollectionViewClass;

#define CONNECTIONS_TYPE_NOTIFICATIONS_BAR (connections_notifications_bar_get_type ())
#define CONNECTIONS_NOTIFICATIONS_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_NOTIFICATIONS_BAR, ConnectionsNotificationsBar))
#define CONNECTIONS_NOTIFICATIONS_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_NOTIFICATIONS_BAR, ConnectionsNotificationsBarClass))
#define CONNECTIONS_IS_NOTIFICATIONS_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_NOTIFICATIONS_BAR))
#define CONNECTIONS_IS_NOTIFICATIONS_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_NOTIFICATIONS_BAR))
#define CONNECTIONS_NOTIFICATIONS_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_NOTIFICATIONS_BAR, ConnectionsNotificationsBarClass))

typedef struct _ConnectionsNotificationsBar ConnectionsNotificationsBar;
typedef struct _ConnectionsNotificationsBarClass ConnectionsNotificationsBarClass;

#define CONNECTIONS_TYPE_TOPBAR (connections_topbar_get_type ())
#define CONNECTIONS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_TOPBAR, ConnectionsTopbar))
#define CONNECTIONS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_TOPBAR, ConnectionsTopbarClass))
#define CONNECTIONS_IS_TOPBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_TOPBAR))
#define CONNECTIONS_IS_TOPBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_TOPBAR))
#define CONNECTIONS_TOPBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_TOPBAR, ConnectionsTopbarClass))

typedef struct _ConnectionsTopbar ConnectionsTopbar;
typedef struct _ConnectionsTopbarClass ConnectionsTopbarClass;

#define CONNECTIONS_TYPE_DISPLAY_VIEW (connections_display_view_get_type ())
#define CONNECTIONS_DISPLAY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_DISPLAY_VIEW, ConnectionsDisplayView))
#define CONNECTIONS_DISPLAY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_DISPLAY_VIEW, ConnectionsDisplayViewClass))
#define CONNECTIONS_IS_DISPLAY_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_DISPLAY_VIEW))
#define CONNECTIONS_IS_DISPLAY_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_DISPLAY_VIEW))
#define CONNECTIONS_DISPLAY_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_DISPLAY_VIEW, ConnectionsDisplayViewClass))

typedef struct _ConnectionsDisplayView ConnectionsDisplayView;
typedef struct _ConnectionsDisplayViewClass ConnectionsDisplayViewClass;
enum  {
	CONNECTIONS_WINDOW_0_PROPERTY,
	CONNECTIONS_WINDOW_FULLSCREENED_PROPERTY,
	CONNECTIONS_WINDOW_NUM_PROPERTIES
};
static GParamSpec* connections_window_properties[CONNECTIONS_WINDOW_NUM_PROPERTIES];

#define CONNECTIONS_TYPE_APPLICATION (connections_application_get_type ())
#define CONNECTIONS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_APPLICATION, ConnectionsApplication))
#define CONNECTIONS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_APPLICATION, ConnectionsApplicationClass))
#define CONNECTIONS_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_APPLICATION))
#define CONNECTIONS_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_APPLICATION))
#define CONNECTIONS_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_APPLICATION, ConnectionsApplicationClass))

typedef struct _ConnectionsApplication ConnectionsApplication;
typedef struct _ConnectionsApplicationClass ConnectionsApplicationClass;
typedef struct _ConnectionsApplicationPrivate ConnectionsApplicationPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ConnectionsTopbarPrivate ConnectionsTopbarPrivate;

#define CONNECTIONS_TYPE_ASSISTANT (connections_assistant_get_type ())
#define CONNECTIONS_ASSISTANT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_ASSISTANT, ConnectionsAssistant))
#define CONNECTIONS_ASSISTANT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_ASSISTANT, ConnectionsAssistantClass))
#define CONNECTIONS_IS_ASSISTANT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_ASSISTANT))
#define CONNECTIONS_IS_ASSISTANT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_ASSISTANT))
#define CONNECTIONS_ASSISTANT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_ASSISTANT, ConnectionsAssistantClass))

typedef struct _ConnectionsAssistant ConnectionsAssistant;
typedef struct _ConnectionsAssistantClass ConnectionsAssistantClass;
typedef struct _ConnectionsCollectionViewPrivate ConnectionsCollectionViewPrivate;
typedef struct _Block8Data Block8Data;

#define CONNECTIONS_TYPE_CONNECTION (connections_connection_get_type ())
#define CONNECTIONS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_CONNECTION, ConnectionsConnection))
#define CONNECTIONS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_CONNECTION, ConnectionsConnectionClass))
#define CONNECTIONS_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_CONNECTION))
#define CONNECTIONS_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_CONNECTION))
#define CONNECTIONS_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_CONNECTION, ConnectionsConnectionClass))

typedef struct _ConnectionsConnection ConnectionsConnection;
typedef struct _ConnectionsConnectionClass ConnectionsConnectionClass;

#define CONNECTIONS_TYPE_AUTH_NOTIFICATION (connections_auth_notification_get_type ())
#define CONNECTIONS_AUTH_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_AUTH_NOTIFICATION, ConnectionsAuthNotification))
#define CONNECTIONS_AUTH_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_AUTH_NOTIFICATION, ConnectionsAuthNotificationClass))
#define CONNECTIONS_IS_AUTH_NOTIFICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_AUTH_NOTIFICATION))
#define CONNECTIONS_IS_AUTH_NOTIFICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_AUTH_NOTIFICATION))
#define CONNECTIONS_AUTH_NOTIFICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_AUTH_NOTIFICATION, ConnectionsAuthNotificationClass))

typedef struct _ConnectionsAuthNotification ConnectionsAuthNotification;
typedef struct _ConnectionsAuthNotificationClass ConnectionsAuthNotificationClass;

#define CONNECTIONS_TYPE_VNC_CONNECTION (connections_vnc_connection_get_type ())
#define CONNECTIONS_VNC_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_VNC_CONNECTION, ConnectionsVncConnection))
#define CONNECTIONS_VNC_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_VNC_CONNECTION, ConnectionsVncConnectionClass))
#define CONNECTIONS_IS_VNC_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_VNC_CONNECTION))
#define CONNECTIONS_IS_VNC_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_VNC_CONNECTION))
#define CONNECTIONS_VNC_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_VNC_CONNECTION, ConnectionsVncConnectionClass))

typedef struct _ConnectionsVncConnection ConnectionsVncConnection;
typedef struct _ConnectionsVncConnectionClass ConnectionsVncConnectionClass;

#define CONNECTIONS_TYPE_PREFERENCES_WINDOW (connections_preferences_window_get_type ())
#define CONNECTIONS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_PREFERENCES_WINDOW, ConnectionsPreferencesWindow))
#define CONNECTIONS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_PREFERENCES_WINDOW, ConnectionsPreferencesWindowClass))
#define CONNECTIONS_IS_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_PREFERENCES_WINDOW))
#define CONNECTIONS_IS_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_PREFERENCES_WINDOW))
#define CONNECTIONS_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_PREFERENCES_WINDOW, ConnectionsPreferencesWindowClass))

typedef struct _ConnectionsPreferencesWindow ConnectionsPreferencesWindow;
typedef struct _ConnectionsPreferencesWindowClass ConnectionsPreferencesWindowClass;

#define CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW (connections_vnc_preferences_window_get_type ())
#define CONNECTIONS_VNC_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, ConnectionsVncPreferencesWindow))
#define CONNECTIONS_VNC_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, ConnectionsVncPreferencesWindowClass))
#define CONNECTIONS_IS_VNC_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW))
#define CONNECTIONS_IS_VNC_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW))
#define CONNECTIONS_VNC_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_VNC_PREFERENCES_WINDOW, ConnectionsVncPreferencesWindowClass))

typedef struct _ConnectionsVncPreferencesWindow ConnectionsVncPreferencesWindow;
typedef struct _ConnectionsVncPreferencesWindowClass ConnectionsVncPreferencesWindowClass;

#define CONNECTIONS_TYPE_RDP_CONNECTION (connections_rdp_connection_get_type ())
#define CONNECTIONS_RDP_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_RDP_CONNECTION, ConnectionsRdpConnection))
#define CONNECTIONS_RDP_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_RDP_CONNECTION, ConnectionsRdpConnectionClass))
#define CONNECTIONS_IS_RDP_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_RDP_CONNECTION))
#define CONNECTIONS_IS_RDP_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_RDP_CONNECTION))
#define CONNECTIONS_RDP_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_RDP_CONNECTION, ConnectionsRdpConnectionClass))

typedef struct _ConnectionsRdpConnection ConnectionsRdpConnection;
typedef struct _ConnectionsRdpConnectionClass ConnectionsRdpConnectionClass;

#define CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW (connections_rdp_preferences_window_get_type ())
#define CONNECTIONS_RDP_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, ConnectionsRdpPreferencesWindow))
#define CONNECTIONS_RDP_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, ConnectionsRdpPreferencesWindowClass))
#define CONNECTIONS_IS_RDP_PREFERENCES_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW))
#define CONNECTIONS_IS_RDP_PREFERENCES_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW))
#define CONNECTIONS_RDP_PREFERENCES_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONNECTIONS_TYPE_RDP_PREFERENCES_WINDOW, ConnectionsRdpPreferencesWindowClass))

typedef struct _ConnectionsRdpPreferencesWindow ConnectionsRdpPreferencesWindow;
typedef struct _ConnectionsRdpPreferencesWindowClass ConnectionsRdpPreferencesWindowClass;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _ConnectionsWindow {
	GtkApplicationWindow parent_instance;
	ConnectionsWindowPrivate * priv;
	ConnectionsCollectionView* collection_view;
	ConnectionsNotificationsBar* notifications_bar;
};

struct _ConnectionsWindowClass {
	GtkApplicationWindowClass parent_class;
};

struct _ConnectionsWindowPrivate {
	ConnectionsTopbar* topbar;
	GtkStack* stack;
	HdyStatusPage* empty_view;
	ConnectionsDisplayView* display_view;
};

struct _ConnectionsApplication {
	GtkApplication parent_instance;
	ConnectionsApplicationPrivate * priv;
	GListStore* model;
};

struct _ConnectionsApplicationClass {
	GtkApplicationClass parent_class;
};

struct _ConnectionsTopbar {
	GtkStack parent_instance;
	ConnectionsTopbarPrivate * priv;
	GtkButton* search_button;
	ConnectionsAssistant* assistant;
};

struct _ConnectionsTopbarClass {
	GtkStackClass parent_class;
};

struct _ConnectionsCollectionView {
	GtkScrolledWindow parent_instance;
	ConnectionsCollectionViewPrivate * priv;
	GtkSearchBar* search_bar;
};

struct _ConnectionsCollectionViewClass {
	GtkScrolledWindowClass parent_class;
};

struct _Block8Data {
	int _ref_count_;
	ConnectionsWindow* self;
	GListModel* model;
};

static gint ConnectionsWindow_private_offset;
static gpointer connections_window_parent_class = NULL;
VALA_EXTERN ConnectionsApplication* connections_application_application;

VALA_EXTERN GType connections_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsWindow, g_object_unref)
VALA_EXTERN GType connections_collection_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsCollectionView, g_object_unref)
VALA_EXTERN GType connections_notifications_bar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsNotificationsBar, g_object_unref)
VALA_EXTERN GType connections_topbar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsTopbar, g_object_unref)
VALA_EXTERN GType connections_display_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsDisplayView, g_object_unref)
VALA_EXTERN ConnectionsWindow* connections_window_new (GtkApplication* app);
VALA_EXTERN ConnectionsWindow* connections_window_construct (GType object_type,
                                                 GtkApplication* app);
VALA_EXTERN void connections_window_bind_model (ConnectionsWindow* self,
                                    GListModel* model);
VALA_EXTERN GType connections_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsApplication, g_object_unref)
VALA_EXTERN void connections_window_items_changed (ConnectionsWindow* self);
static void _connections_window_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                                   guint position,
                                                                   guint removed,
                                                                   guint added,
                                                                   gpointer self);
VALA_EXTERN GType connections_assistant_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsAssistant, g_object_unref)
static Block8Data* block8_data_ref (Block8Data* _data8_);
static void block8_data_unref (void * _userdata_);
VALA_EXTERN void connections_collection_view_bind_model (ConnectionsCollectionView* self,
                                             GListModel* model);
static void __lambda18_ (Block8Data* _data8_);
static void ___lambda18__g_list_model_items_changed (GListModel* _sender,
                                              guint position,
                                              guint removed,
                                              guint added,
                                              gpointer self);
VALA_EXTERN GType connections_connection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsConnection, g_object_unref)
VALA_EXTERN void connections_window_open_connection (ConnectionsWindow* self,
                                         ConnectionsConnection* connection);
VALA_EXTERN void connections_display_view_connect_to (ConnectionsDisplayView* self,
                                          ConnectionsConnection* connection);
VALA_EXTERN void connections_topbar_show_display_view (ConnectionsTopbar* self,
                                           ConnectionsConnection* connection);
VALA_EXTERN void connections_window_show_collection_view (ConnectionsWindow* self);
VALA_EXTERN void connections_topbar_show_collection_view (ConnectionsTopbar* self);
VALA_EXTERN void connections_topbar_set_title (ConnectionsTopbar* self,
                                   const gchar* title);
VALA_EXTERN GtkWidget* connections_notifications_bar_get_active_notification (ConnectionsNotificationsBar* self);
VALA_EXTERN GType connections_auth_notification_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsAuthNotification, g_object_unref)
VALA_EXTERN void connections_notifications_bar_dismiss (ConnectionsNotificationsBar* self);
VALA_EXTERN void connections_window_show_preferences_window (ConnectionsWindow* self,
                                                 ConnectionsConnection* connection);
VALA_EXTERN GType connections_vnc_connection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsVncConnection, g_object_unref)
VALA_EXTERN ConnectionsVncPreferencesWindow* connections_vnc_preferences_window_new (ConnectionsConnection* connection);
VALA_EXTERN ConnectionsVncPreferencesWindow* connections_vnc_preferences_window_construct (GType object_type,
                                                                               ConnectionsConnection* connection);
VALA_EXTERN GType connections_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsPreferencesWindow, g_object_unref)
VALA_EXTERN GType connections_vnc_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsVncPreferencesWindow, g_object_unref)
VALA_EXTERN GType connections_rdp_connection_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsRdpConnection, g_object_unref)
VALA_EXTERN ConnectionsRdpPreferencesWindow* connections_rdp_preferences_window_new (ConnectionsConnection* connection);
VALA_EXTERN ConnectionsRdpPreferencesWindow* connections_rdp_preferences_window_construct (GType object_type,
                                                                               ConnectionsConnection* connection);
VALA_EXTERN GType connections_rdp_preferences_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConnectionsRdpPreferencesWindow, g_object_unref)
VALA_EXTERN gchar* connections_connection_get_uri (ConnectionsConnection* self);
static gboolean connections_window_on_key_pressed (ConnectionsWindow* self,
                                            GtkWidget* widget,
                                            GdkEventKey* event);
VALA_EXTERN gboolean connections_window_get_fullscreened (ConnectionsWindow* self);
VALA_EXTERN void connections_window_set_fullscreened (ConnectionsWindow* self,
                                          gboolean value);
VALA_EXTERN void connections_application_quit_app (ConnectionsApplication* self);
static gboolean _connections_window_on_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender,
                                                                        GdkEventKey* event,
                                                                        gpointer self);
static gboolean connections_window_on_delete_event (ConnectionsWindow* self);
static gboolean _connections_window_on_delete_event_gtk_widget_delete_event (GtkWidget* _sender,
                                                                      GdkEventAny* event,
                                                                      gpointer self);
static void connections_window_finalize (GObject * obj);
static GType connections_window_get_type_once (void);
static void _vala_connections_window_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_connections_window_set_property (GObject * object,
                                            guint property_id,
                                            const GValue * value,
                                            GParamSpec * pspec);

static inline gpointer
connections_window_get_instance_private (ConnectionsWindow* self)
{
	return G_STRUCT_MEMBER_P (self, ConnectionsWindow_private_offset);
}

static void
_connections_window_items_changed_g_list_model_items_changed (GListModel* _sender,
                                                              guint position,
                                                              guint removed,
                                                              guint added,
                                                              gpointer self)
{
	connections_window_items_changed ((ConnectionsWindow*) self);
}

ConnectionsWindow*
connections_window_construct (GType object_type,
                              GtkApplication* app)
{
	ConnectionsWindow * self = NULL;
	GtkStack* _tmp0_;
	HdyStatusPage* _tmp1_;
	ConnectionsApplication* _tmp2_;
	GListStore* _tmp3_;
	ConnectionsApplication* _tmp4_;
	GListStore* _tmp5_;
	ConnectionsTopbar* _tmp11_;
	GtkButton* _tmp12_;
	ConnectionsCollectionView* _tmp13_;
	GtkSearchBar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	GError* _inner_error0_ = NULL;
	g_return_val_if_fail (app != NULL, NULL);
	self = (ConnectionsWindow*) g_object_new (object_type, "application", app, NULL);
	_tmp0_ = self->priv->stack;
	_tmp1_ = self->priv->empty_view;
	gtk_stack_set_visible_child (_tmp0_, (GtkWidget*) _tmp1_);
	_tmp2_ = connections_application_application;
	_tmp3_ = _tmp2_->model;
	connections_window_bind_model (self, (GListModel*) _tmp3_);
	_tmp4_ = connections_application_application;
	_tmp5_ = _tmp4_->model;
	g_signal_connect_object ((GListModel*) _tmp5_, "items-changed", (GCallback) _connections_window_items_changed_g_list_model_items_changed, self, 0);
	{
		GtkCssProvider* style_provider = NULL;
		GtkCssProvider* _tmp6_;
		GFile* file = NULL;
		GFile* _tmp7_;
		GdkScreen* _tmp8_;
		_tmp6_ = gtk_css_provider_new ();
		style_provider = _tmp6_;
		_tmp7_ = g_file_new_for_uri ("resource:///org/gnome/Connections/ui/style.css");
		file = _tmp7_;
		gtk_css_provider_load_from_file (style_provider, file, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (file);
			_g_object_unref0 (style_provider);
			goto __catch0_g_error;
		}
		_tmp8_ = gdk_screen_get_default ();
		gtk_style_context_add_provider_for_screen (_tmp8_, (GtkStyleProvider*) style_provider, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
		_g_object_unref0 (file);
		_g_object_unref0 (style_provider);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp9_;
		const gchar* _tmp10_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp9_ = _error_;
		_tmp10_ = _tmp9_->message;
		g_warning ("window.vala:70: Failed to load CSS: %s", _tmp10_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		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);
		g_clear_error (&_inner_error0_);
		return NULL;
	}
	_tmp11_ = self->priv->topbar;
	_tmp12_ = _tmp11_->search_button;
	_tmp13_ = self->collection_view;
	_tmp14_ = _tmp13_->search_bar;
	g_object_bind_property_with_closures ((GObject*) _tmp12_, "active", (GObject*) _tmp14_, "search_mode_enabled", G_BINDING_BIDIRECTIONAL, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp15_ = g_application_get_application_id ((GApplication*) app);
	_tmp16_ = _tmp15_;
	if (g_strcmp0 (_tmp16_, "org.gnome.Connections.Devel") == 0) {
		GtkStyleContext* _tmp17_;
		_tmp17_ = gtk_widget_get_style_context ((GtkWidget*) self);
		gtk_style_context_add_class (_tmp17_, "devel");
	}
	return self;
}

ConnectionsWindow*
connections_window_new (GtkApplication* app)
{
	return connections_window_construct (CONNECTIONS_TYPE_WINDOW, app);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static Block8Data*
block8_data_ref (Block8Data* _data8_)
{
	g_atomic_int_inc (&_data8_->_ref_count_);
	return _data8_;
}

static void
block8_data_unref (void * _userdata_)
{
	Block8Data* _data8_;
	_data8_ = (Block8Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data8_->_ref_count_)) {
		ConnectionsWindow* self;
		self = _data8_->self;
		_g_object_unref0 (_data8_->model);
		_g_object_unref0 (self);
		g_slice_free (Block8Data, _data8_);
	}
}

static void
__lambda18_ (Block8Data* _data8_)
{
	ConnectionsWindow* self;
	ConnectionsTopbar* _tmp0_;
	GtkButton* _tmp1_;
	self = _data8_->self;
	_tmp0_ = self->priv->topbar;
	_tmp1_ = _tmp0_->search_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp1_, g_list_model_get_n_items (_data8_->model) > ((guint) 0));
}

static void
___lambda18__g_list_model_items_changed (GListModel* _sender,
                                         guint position,
                                         guint removed,
                                         guint added,
                                         gpointer self)
{
	__lambda18_ (self);
}

void
connections_window_bind_model (ConnectionsWindow* self,
                               GListModel* model)
{
	Block8Data* _data8_;
	GListModel* _tmp0_;
	ConnectionsCollectionView* _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (model != NULL);
	_data8_ = g_slice_new0 (Block8Data);
	_data8_->_ref_count_ = 1;
	_data8_->self = g_object_ref (self);
	_tmp0_ = _g_object_ref0 (model);
	_g_object_unref0 (_data8_->model);
	_data8_->model = _tmp0_;
	_tmp1_ = self->collection_view;
	connections_collection_view_bind_model (_tmp1_, _data8_->model);
	g_signal_connect_data (_data8_->model, "items-changed", (GCallback) ___lambda18__g_list_model_items_changed, block8_data_ref (_data8_), (GClosureNotify) block8_data_unref, 0);
	block8_data_unref (_data8_);
	_data8_ = NULL;
}

void
connections_window_items_changed (ConnectionsWindow* self)
{
	ConnectionsApplication* _tmp0_;
	GListStore* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = connections_application_application;
	_tmp1_ = _tmp0_->model;
	if (g_list_model_get_n_items ((GListModel*) _tmp1_) > ((guint) 0)) {
		GtkStack* _tmp2_;
		ConnectionsCollectionView* _tmp3_;
		_tmp2_ = self->priv->stack;
		_tmp3_ = self->collection_view;
		gtk_stack_set_visible_child (_tmp2_, (GtkWidget*) _tmp3_);
	} else {
		GtkStack* _tmp4_;
		HdyStatusPage* _tmp5_;
		_tmp4_ = self->priv->stack;
		_tmp5_ = self->priv->empty_view;
		gtk_stack_set_visible_child (_tmp4_, (GtkWidget*) _tmp5_);
	}
}

void
connections_window_open_connection (ConnectionsWindow* self,
                                    ConnectionsConnection* connection)
{
	ConnectionsDisplayView* _tmp0_;
	GtkStack* _tmp1_;
	ConnectionsDisplayView* _tmp2_;
	ConnectionsTopbar* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (connection != NULL);
	_tmp0_ = self->priv->display_view;
	connections_display_view_connect_to (_tmp0_, connection);
	_tmp1_ = self->priv->stack;
	_tmp2_ = self->priv->display_view;
	gtk_stack_set_visible_child (_tmp1_, (GtkWidget*) _tmp2_);
	_tmp3_ = self->priv->topbar;
	connections_topbar_show_display_view (_tmp3_, connection);
}

void
connections_window_show_collection_view (ConnectionsWindow* self)
{
	GtkStack* _tmp0_;
	ConnectionsCollectionView* _tmp1_;
	ConnectionsTopbar* _tmp2_;
	ConnectionsTopbar* _tmp3_;
	ConnectionsNotificationsBar* _tmp4_;
	GtkWidget* _tmp5_;
	GtkWidget* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stack;
	_tmp1_ = self->collection_view;
	gtk_stack_set_visible_child (_tmp0_, (GtkWidget*) _tmp1_);
	_tmp2_ = self->priv->topbar;
	connections_topbar_show_collection_view (_tmp2_);
	_tmp3_ = self->priv->topbar;
	connections_topbar_set_title (_tmp3_, _ ("Connections"));
	_tmp4_ = self->notifications_bar;
	_tmp5_ = connections_notifications_bar_get_active_notification (_tmp4_);
	_tmp6_ = _tmp5_;
	if (CONNECTIONS_IS_AUTH_NOTIFICATION (_tmp6_)) {
		ConnectionsNotificationsBar* _tmp7_;
		_tmp7_ = self->notifications_bar;
		connections_notifications_bar_dismiss (_tmp7_);
	}
}

void
connections_window_show_preferences_window (ConnectionsWindow* self,
                                            ConnectionsConnection* connection)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (connection != NULL);
	if (CONNECTIONS_IS_VNC_CONNECTION (connection)) {
		ConnectionsVncPreferencesWindow* _tmp0_;
		ConnectionsVncPreferencesWindow* _tmp1_;
		_tmp0_ = connections_vnc_preferences_window_new (connection);
		g_object_ref_sink (_tmp0_);
		_tmp1_ = _tmp0_;
		gtk_window_present ((GtkWindow*) _tmp1_);
		_g_object_unref0 (_tmp1_);
	} else {
		if (CONNECTIONS_IS_RDP_CONNECTION (connection)) {
			ConnectionsRdpPreferencesWindow* _tmp2_;
			ConnectionsRdpPreferencesWindow* _tmp3_;
			_tmp2_ = connections_rdp_preferences_window_new (connection);
			g_object_ref_sink (_tmp2_);
			_tmp3_ = _tmp2_;
			gtk_window_present ((GtkWindow*) _tmp3_);
			_g_object_unref0 (_tmp3_);
		} else {
			gchar* _tmp4_;
			gchar* _tmp5_;
			gchar* _tmp6_;
			_tmp4_ = connections_connection_get_uri (connection);
			_tmp5_ = _tmp4_;
			_tmp6_ = _tmp5_;
			g_debug ("window.vala:119: Failed to launch preferences window for %s", _tmp6_);
			_g_free0 (_tmp6_);
		}
	}
}

static gboolean
connections_window_on_key_pressed (ConnectionsWindow* self,
                                   GtkWidget* widget,
                                   GdkEventKey* event)
{
	GdkModifierType default_modifiers = 0U;
	gboolean _tmp0_ = FALSE;
	GtkStack* _tmp15_;
	GtkWidget* _tmp16_;
	GtkWidget* _tmp17_;
	ConnectionsCollectionView* _tmp18_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (widget != NULL, FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	default_modifiers = gtk_accelerator_get_default_mod_mask ();
	if (event->keyval == GDK_KEY_f) {
		_tmp0_ = (event->state & default_modifiers) == GDK_CONTROL_MASK;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		ConnectionsCollectionView* _tmp1_;
		GtkSearchBar* _tmp2_;
		ConnectionsCollectionView* _tmp3_;
		GtkSearchBar* _tmp4_;
		gboolean _tmp5_;
		gboolean _tmp6_;
		_tmp1_ = self->collection_view;
		_tmp2_ = _tmp1_->search_bar;
		_tmp3_ = self->collection_view;
		_tmp4_ = _tmp3_->search_bar;
		g_object_get (_tmp4_, "search-mode-enabled", &_tmp5_, NULL);
		_tmp6_ = _tmp5_;
		g_object_set (_tmp2_, "search-mode-enabled", !_tmp6_, NULL);
		result = TRUE;
		return result;
	} else {
		if (event->keyval == GDK_KEY_F11) {
			gboolean _tmp7_;
			gboolean _tmp8_;
			_tmp7_ = connections_window_get_fullscreened (self);
			_tmp8_ = _tmp7_;
			connections_window_set_fullscreened (self, !_tmp8_);
			result = TRUE;
			return result;
		} else {
			gboolean _tmp9_ = FALSE;
			if (event->keyval == GDK_KEY_q) {
				_tmp9_ = (event->state & default_modifiers) == GDK_CONTROL_MASK;
			} else {
				_tmp9_ = FALSE;
			}
			if (_tmp9_) {
				ConnectionsApplication* _tmp10_;
				_tmp10_ = connections_application_application;
				connections_application_quit_app (_tmp10_);
				result = TRUE;
				return result;
			} else {
				if (event->keyval == GDK_KEY_F1) {
					ConnectionsApplication* _tmp11_;
					_tmp11_ = connections_application_application;
					g_action_group_activate_action ((GActionGroup*) _tmp11_, "help", NULL);
					result = TRUE;
					return result;
				} else {
					gboolean _tmp12_ = FALSE;
					if (event->keyval == GDK_KEY_n) {
						_tmp12_ = (event->state & default_modifiers) == GDK_CONTROL_MASK;
					} else {
						_tmp12_ = FALSE;
					}
					if (_tmp12_) {
						ConnectionsTopbar* _tmp13_;
						ConnectionsAssistant* _tmp14_;
						_tmp13_ = self->priv->topbar;
						_tmp14_ = _tmp13_->assistant;
						gtk_popover_popdown ((GtkPopover*) _tmp14_);
						result = TRUE;
						return result;
					}
				}
			}
		}
	}
	_tmp15_ = self->priv->stack;
	_tmp16_ = gtk_stack_get_visible_child (_tmp15_);
	_tmp17_ = _tmp16_;
	_tmp18_ = self->collection_view;
	if (_tmp17_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, gtk_widget_get_type (), GtkWidget)) {
		ConnectionsCollectionView* _tmp19_;
		GtkSearchBar* _tmp20_;
		_tmp19_ = self->collection_view;
		_tmp20_ = _tmp19_->search_bar;
		result = gtk_search_bar_handle_event (_tmp20_, (GdkEvent*) event);
		return result;
	}
	result = FALSE;
	return result;
}

static gboolean
_connections_window_on_key_pressed_gtk_widget_key_press_event (GtkWidget* _sender,
                                                               GdkEventKey* event,
                                                               gpointer self)
{
	gboolean result;
	result = connections_window_on_key_pressed ((ConnectionsWindow*) self, _sender, event);
	return result;
}

static gboolean
connections_window_on_delete_event (ConnectionsWindow* self)
{
	ConnectionsNotificationsBar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->notifications_bar;
	connections_notifications_bar_dismiss (_tmp0_);
	result = FALSE;
	return result;
}

static gboolean
_connections_window_on_delete_event_gtk_widget_delete_event (GtkWidget* _sender,
                                                             GdkEventAny* event,
                                                             gpointer self)
{
	gboolean result;
	result = connections_window_on_delete_event ((ConnectionsWindow*) self);
	return result;
}

gboolean
connections_window_get_fullscreened (ConnectionsWindow* self)
{
	gboolean result;
	GdkWindow* _tmp0_;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = gtk_widget_get_window ((GtkWidget*) self);
	result = (gdk_window_get_state (_tmp0_) & GDK_WINDOW_STATE_FULLSCREEN) == GDK_WINDOW_STATE_FULLSCREEN;
	return result;
}

void
connections_window_set_fullscreened (ConnectionsWindow* self,
                                     gboolean value)
{
	g_return_if_fail (self != NULL);
	if (value) {
		gtk_window_fullscreen ((GtkWindow*) self);
	} else {
		gtk_window_unfullscreen ((GtkWindow*) self);
	}
	g_object_notify_by_pspec ((GObject *) self, connections_window_properties[CONNECTIONS_WINDOW_FULLSCREENED_PROPERTY]);
}

static void
connections_window_class_init (ConnectionsWindowClass * klass,
                               gpointer klass_data)
{
	connections_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ConnectionsWindow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_connections_window_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_connections_window_set_property;
	G_OBJECT_CLASS (klass)->finalize = connections_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), CONNECTIONS_WINDOW_FULLSCREENED_PROPERTY, connections_window_properties[CONNECTIONS_WINDOW_FULLSCREENED_PROPERTY] = g_param_spec_boolean ("fullscreened", "fullscreened", "fullscreened", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/Connections/ui/window.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "topbar", FALSE, ConnectionsWindow_private_offset + G_STRUCT_OFFSET (ConnectionsWindowPrivate, topbar));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "stack", FALSE, ConnectionsWindow_private_offset + G_STRUCT_OFFSET (ConnectionsWindowPrivate, stack));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "empty_view", FALSE, ConnectionsWindow_private_offset + G_STRUCT_OFFSET (ConnectionsWindowPrivate, empty_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "collection_view", FALSE, G_STRUCT_OFFSET (ConnectionsWindow, collection_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "display_view", FALSE, ConnectionsWindow_private_offset + G_STRUCT_OFFSET (ConnectionsWindowPrivate, display_view));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "notifications_bar", FALSE, G_STRUCT_OFFSET (ConnectionsWindow, notifications_bar));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_key_pressed", G_CALLBACK(_connections_window_on_key_pressed_gtk_widget_key_press_event));
	gtk_widget_class_bind_template_callback_full (GTK_WIDGET_CLASS (klass), "on_delete_event", G_CALLBACK(_connections_window_on_delete_event_gtk_widget_delete_event));
}

static void
connections_window_instance_init (ConnectionsWindow * self,
                                  gpointer klass)
{
	self->priv = connections_window_get_instance_private (self);
	g_type_ensure (CONNECTIONS_TYPE_TOPBAR);
	g_type_ensure (CONNECTIONS_TYPE_COLLECTION_VIEW);
	g_type_ensure (CONNECTIONS_TYPE_DISPLAY_VIEW);
	g_type_ensure (CONNECTIONS_TYPE_NOTIFICATIONS_BAR);
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
connections_window_finalize (GObject * obj)
{
	ConnectionsWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, CONNECTIONS_TYPE_WINDOW, ConnectionsWindow);
	G_OBJECT_CLASS (connections_window_parent_class)->finalize (obj);
}

static GType
connections_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ConnectionsWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) connections_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ConnectionsWindow), 0, (GInstanceInitFunc) connections_window_instance_init, NULL };
	GType connections_window_type_id;
	connections_window_type_id = g_type_register_static (gtk_application_window_get_type (), "ConnectionsWindow", &g_define_type_info, 0);
	ConnectionsWindow_private_offset = g_type_add_instance_private (connections_window_type_id, sizeof (ConnectionsWindowPrivate));
	return connections_window_type_id;
}

GType
connections_window_get_type (void)
{
	static volatile gsize connections_window_type_id__once = 0;
	if (g_once_init_enter (&connections_window_type_id__once)) {
		GType connections_window_type_id;
		connections_window_type_id = connections_window_get_type_once ();
		g_once_init_leave (&connections_window_type_id__once, connections_window_type_id);
	}
	return connections_window_type_id__once;
}

static void
_vala_connections_window_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	ConnectionsWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CONNECTIONS_TYPE_WINDOW, ConnectionsWindow);
	switch (property_id) {
		case CONNECTIONS_WINDOW_FULLSCREENED_PROPERTY:
		g_value_set_boolean (value, connections_window_get_fullscreened (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_connections_window_set_property (GObject * object,
                                       guint property_id,
                                       const GValue * value,
                                       GParamSpec * pspec)
{
	ConnectionsWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, CONNECTIONS_TYPE_WINDOW, ConnectionsWindow);
	switch (property_id) {
		case CONNECTIONS_WINDOW_FULLSCREENED_PROPERTY:
		connections_window_set_fullscreened (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

