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

#include <adwaita.h>
#include <glib-object.h>
#include <webkit/webkit.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <gdk/gdk.h>
#include <float.h>
#include <math.h>
#include <graphene-gobject.h>
#include <glib/gi18n-lib.h>

#define BUILD_PROFILE "production"
#define BUILD_NAME "Tuba"
#define BUILD_VERSION "0.11.1"
#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 TUBA_VIEWS_TYPE_BROWSER (tuba_views_browser_get_type ())
#define TUBA_VIEWS_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_TYPE_BROWSER, TubaViewsBrowser))
#define TUBA_VIEWS_BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_TYPE_BROWSER, TubaViewsBrowserClass))
#define TUBA_VIEWS_IS_BROWSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_TYPE_BROWSER))
#define TUBA_VIEWS_IS_BROWSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_TYPE_BROWSER))
#define TUBA_VIEWS_BROWSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_TYPE_BROWSER, TubaViewsBrowserClass))

typedef struct _TubaViewsBrowser TubaViewsBrowser;
typedef struct _TubaViewsBrowserClass TubaViewsBrowserClass;
typedef struct _TubaViewsBrowserPrivate TubaViewsBrowserPrivate;

#define TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR (tuba_views_browser_header_bar_get_type ())
#define TUBA_VIEWS_BROWSER_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, TubaViewsBrowserHeaderBar))
#define TUBA_VIEWS_BROWSER_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, TubaViewsBrowserHeaderBarClass))
#define TUBA_VIEWS_BROWSER_IS_HEADER_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR))
#define TUBA_VIEWS_BROWSER_IS_HEADER_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR))
#define TUBA_VIEWS_BROWSER_HEADER_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, TubaViewsBrowserHeaderBarClass))

typedef struct _TubaViewsBrowserHeaderBar TubaViewsBrowserHeaderBar;
typedef struct _TubaViewsBrowserHeaderBarClass TubaViewsBrowserHeaderBarClass;
enum  {
	TUBA_VIEWS_BROWSER_0_PROPERTY,
	TUBA_VIEWS_BROWSER_NUM_PROPERTIES
};
static GParamSpec* tuba_views_browser_properties[TUBA_VIEWS_BROWSER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef enum  {
	TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_SECURE,
	TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_INSECURE,
	TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_UNKNOWN
} TubaViewsBrowserHeaderBarSecurity;

#define TUBA_VIEWS_BROWSER_HEADER_BAR_TYPE_SECURITY (tuba_views_browser_header_bar_security_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _TubaViewsBrowserHeaderBarPrivate TubaViewsBrowserHeaderBarPrivate;
enum  {
	TUBA_VIEWS_BROWSER_HEADER_BAR_0_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_TITLE_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_SUBTITLE_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_LOADING_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_PROGRESS_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_BACK_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_FORWARD_PROPERTY,
	TUBA_VIEWS_BROWSER_HEADER_BAR_NUM_PROPERTIES
};
static GParamSpec* tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_NUM_PROPERTIES];
typedef void (*GSimpleActionActivateCallback) (GSimpleAction* action, GVariant* parameter, gpointer user_data);
#define __vala_GdkRGBA_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkRGBA_free (var), NULL)))

#define TUBA_TYPE_APPLICATION (tuba_application_get_type ())
#define TUBA_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_APPLICATION, TubaApplication))
#define TUBA_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_APPLICATION, TubaApplicationClass))
#define TUBA_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_APPLICATION))
#define TUBA_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_APPLICATION))
#define TUBA_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_APPLICATION, TubaApplicationClass))

typedef struct _TubaApplication TubaApplication;
typedef struct _TubaApplicationClass TubaApplicationClass;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
enum  {
	TUBA_VIEWS_BROWSER_HEADER_BAR_STOP_LOADING_SIGNAL,
	TUBA_VIEWS_BROWSER_HEADER_BAR_REFRESH_SIGNAL,
	TUBA_VIEWS_BROWSER_HEADER_BAR_GO_BACK_SIGNAL,
	TUBA_VIEWS_BROWSER_HEADER_BAR_GO_FORWARD_SIGNAL,
	TUBA_VIEWS_BROWSER_HEADER_BAR_EXIT_SIGNAL,
	TUBA_VIEWS_BROWSER_HEADER_BAR_NUM_SIGNALS
};
static guint tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_NUM_SIGNALS] = {0};

struct _TubaViewsBrowser {
	AdwDialog parent_instance;
	TubaViewsBrowserPrivate * priv;
};

struct _TubaViewsBrowserClass {
	AdwDialogClass parent_class;
	void (*on_load_changed) (TubaViewsBrowser* self, WebKitLoadEvent load_event);
};

struct _TubaViewsBrowserPrivate {
	WebKitWebView* webview;
	TubaViewsBrowserHeaderBar* headerbar;
};

struct _TubaViewsBrowserHeaderBar {
	AdwBin parent_instance;
	TubaViewsBrowserHeaderBarPrivate * priv;
};

struct _TubaViewsBrowserHeaderBarClass {
	AdwBinClass parent_class;
};

struct _TubaViewsBrowserHeaderBarPrivate {
	GdkRGBA color;
	AdwWindowTitle* window_title;
	GtkImage* ssl_icon;
	GSimpleAction* go_back_action;
	GSimpleAction* go_forward_action;
	GSimpleAction* stop_loading_action;
	GSimpleAction* refresh_action;
	TubaViewsBrowserHeaderBarSecurity _security;
	gboolean _loading;
	gdouble _progress;
};

static gint TubaViewsBrowser_private_offset;
static gpointer tuba_views_browser_parent_class = NULL;
static gint TubaViewsBrowserHeaderBar_private_offset;
static gpointer tuba_views_browser_header_bar_parent_class = NULL;
VALA_EXTERN TubaApplication* tuba_app;

VALA_EXTERN GType tuba_views_browser_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBrowser, g_object_unref)
static GType tuba_views_browser_header_bar_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaViewsBrowserHeaderBar, g_object_unref)
VALA_EXTERN void tuba_views_browser_on_load_changed (TubaViewsBrowser* self,
                                         WebKitLoadEvent load_event);
VALA_EXTERN gboolean tuba_views_browser_grab_focus (TubaViewsBrowser* self);
VALA_EXTERN TubaViewsBrowser* tuba_views_browser_new_with_url (const gchar* url);
VALA_EXTERN TubaViewsBrowser* tuba_views_browser_construct_with_url (GType object_type,
                                                         const gchar* url);
VALA_EXTERN void tuba_views_browser_load_url (TubaViewsBrowser* self,
                                  const gchar* url);
static void tuba_views_browser_real_on_load_changed (TubaViewsBrowser* self,
                                              WebKitLoadEvent load_event);
static void tuba_views_browser_header_bar_set_can_go_forward (TubaViewsBrowserHeaderBar* self,
                                                       gboolean value);
static void tuba_views_browser_header_bar_set_can_go_back (TubaViewsBrowserHeaderBar* self,
                                                    gboolean value);
static GType tuba_views_browser_header_bar_security_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
static void tuba_views_browser_header_bar_set_security (TubaViewsBrowserHeaderBar* self,
                                                 TubaViewsBrowserHeaderBarSecurity value);
VALA_EXTERN gboolean tuba_views_browser_can_handle (GUri* uri,
                                        const gchar* url);
VALA_EXTERN gboolean tuba_views_browser_can_handle_url (const gchar* url);
VALA_EXTERN gboolean tuba_views_browser_can_handle_uri (GUri* uri);
VALA_EXTERN void tuba_views_browser_download_in_browser (TubaViewsBrowser* self,
                                             WebKitDownload* download);
VALA_EXTERN void tuba_utils_host_open_url (const gchar* _uri,
                               GAsyncReadyCallback _callback_,
                               gpointer _user_data_);
VALA_EXTERN gboolean tuba_utils_host_open_url_finish (GAsyncResult* _res_);
VALA_EXTERN gboolean tuba_views_browser_open_new_tab_in_browser (TubaViewsBrowser* self,
                                                     WebKitPolicyDecision* decision,
                                                     WebKitPolicyDecisionType type);
VALA_EXTERN GtkWidget* tuba_views_browser_on_create (TubaViewsBrowser* self,
                                         WebKitNavigationAction* navigation_action);
static void tuba_views_browser_on_go_back (TubaViewsBrowser* self);
static void tuba_views_browser_on_refresh (TubaViewsBrowser* self);
static void tuba_views_browser_on_stop_loading (TubaViewsBrowser* self);
static void tuba_views_browser_on_go_forward (TubaViewsBrowser* self);
static void tuba_views_browser_on_exit (TubaViewsBrowser* self);
VALA_EXTERN TubaViewsBrowser* tuba_views_browser_new (void);
VALA_EXTERN TubaViewsBrowser* tuba_views_browser_construct (GType object_type);
static void tuba_views_browser_header_bar_on_copy_url (TubaViewsBrowserHeaderBar* self);
static void _tuba_views_browser_header_bar_on_copy_url_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                  GVariant* parameter,
                                                                                  gpointer self);
static void tuba_views_browser_header_bar_on_open_in_browser (TubaViewsBrowserHeaderBar* self);
static void _tuba_views_browser_header_bar_on_open_in_browser_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                         GVariant* parameter,
                                                                                         gpointer self);
static void tuba_views_browser_header_bar_real_snapshot (GtkWidget* base,
                                                  GtkSnapshot* snapshot);
static gdouble tuba_views_browser_header_bar_get_progress (TubaViewsBrowserHeaderBar* self);
static void tuba_views_browser_header_bar_update_accent_color (TubaViewsBrowserHeaderBar* self);
static void _vala_GdkRGBA_free (GdkRGBA* self);
static const gchar* tuba_views_browser_header_bar_get_subtitle (TubaViewsBrowserHeaderBar* self);
VALA_EXTERN void tuba_utils_host_copy (const gchar* str);
VALA_EXTERN GType tuba_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaApplication, g_object_unref)
static void tuba_views_browser_header_bar_on_refresh (TubaViewsBrowserHeaderBar* self);
static void tuba_views_browser_header_bar_on_stop_loading (TubaViewsBrowserHeaderBar* self);
static void tuba_views_browser_header_bar_on_go_back (TubaViewsBrowserHeaderBar* self);
static void tuba_views_browser_header_bar_on_go_forward (TubaViewsBrowserHeaderBar* self);
static TubaViewsBrowserHeaderBar* tuba_views_browser_header_bar_new (void);
static TubaViewsBrowserHeaderBar* tuba_views_browser_header_bar_construct (GType object_type);
static TubaViewsBrowserHeaderBarSecurity tuba_views_browser_header_bar_get_security (TubaViewsBrowserHeaderBar* self);
static const gchar* tuba_views_browser_header_bar_get_title (TubaViewsBrowserHeaderBar* self);
static void tuba_views_browser_header_bar_set_title (TubaViewsBrowserHeaderBar* self,
                                              const gchar* value);
static void tuba_views_browser_header_bar_set_subtitle (TubaViewsBrowserHeaderBar* self,
                                                 const gchar* value);
static gboolean tuba_views_browser_header_bar_get_loading (TubaViewsBrowserHeaderBar* self);
static void tuba_views_browser_header_bar_set_loading (TubaViewsBrowserHeaderBar* self,
                                                gboolean value);
static void tuba_views_browser_header_bar_set_progress (TubaViewsBrowserHeaderBar* self,
                                                 gdouble value);
static GObject * tuba_views_browser_header_bar_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties);
static void _tuba_views_browser_header_bar_update_accent_color_g_object_notify (GObject* _sender,
                                                                         GParamSpec* pspec,
                                                                         gpointer self);
static void _tuba_views_browser_header_bar_on_go_back_g_simple_action_activate (GSimpleAction* _sender,
                                                                         GVariant* parameter,
                                                                         gpointer self);
static void _tuba_views_browser_header_bar_on_go_forward_g_simple_action_activate (GSimpleAction* _sender,
                                                                            GVariant* parameter,
                                                                            gpointer self);
static void _tuba_views_browser_header_bar_on_refresh_g_simple_action_activate (GSimpleAction* _sender,
                                                                         GVariant* parameter,
                                                                         gpointer self);
static void _tuba_views_browser_header_bar_on_stop_loading_g_simple_action_activate (GSimpleAction* _sender,
                                                                              GVariant* parameter,
                                                                              gpointer self);
static GVariant* _variant_new34 (const gchar* value);
static GVariant* _variant_new35 (const gchar* value);
static GVariant* _variant_new36 (const gchar* value);
static GVariant* _variant_new37 (const gchar* value);
static GVariant* _variant_new38 (const gchar* value);
static GVariant* _variant_new39 (const gchar* value);
static GVariant* _variant_new40 (const gchar* value);
static void tuba_views_browser_header_bar_finalize (GObject * obj);
static GType tuba_views_browser_header_bar_get_type_once (void);
static void _vala_tuba_views_browser_header_bar_get_property (GObject * object,
                                                       guint property_id,
                                                       GValue * value,
                                                       GParamSpec * pspec);
static void _vala_tuba_views_browser_header_bar_set_property (GObject * object,
                                                       guint property_id,
                                                       const GValue * value,
                                                       GParamSpec * pspec);
static GObject * tuba_views_browser_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties);
static void _tuba_views_browser_on_go_back_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                               gint n_press,
                                                               gdouble x,
                                                               gdouble y,
                                                               gpointer self);
static void _tuba_views_browser_on_go_forward_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                                  gint n_press,
                                                                  gdouble x,
                                                                  gdouble y,
                                                                  gpointer self);
static void _tuba_views_browser_on_go_back_tuba_views_browser_header_bar_go_back (TubaViewsBrowserHeaderBar* _sender,
                                                                           gpointer self);
static void _tuba_views_browser_on_refresh_tuba_views_browser_header_bar_refresh (TubaViewsBrowserHeaderBar* _sender,
                                                                           gpointer self);
static void _tuba_views_browser_on_stop_loading_tuba_views_browser_header_bar_stop_loading (TubaViewsBrowserHeaderBar* _sender,
                                                                                     gpointer self);
static void _tuba_views_browser_on_go_forward_tuba_views_browser_header_bar_go_forward (TubaViewsBrowserHeaderBar* _sender,
                                                                                 gpointer self);
static void _tuba_views_browser_on_exit_tuba_views_browser_header_bar_exit (TubaViewsBrowserHeaderBar* _sender,
                                                                     gpointer self);
static void _tuba_views_browser_on_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender,
                                                                       WebKitLoadEvent load_event,
                                                                       gpointer self);
static void _tuba_views_browser_download_in_browser_webkit_network_session_download_started (WebKitNetworkSession* _sender,
                                                                                      WebKitDownload* download,
                                                                                      gpointer self);
static gboolean _tuba_views_browser_open_new_tab_in_browser_webkit_web_view_decide_policy (WebKitWebView* _sender,
                                                                                    WebKitPolicyDecision* decision,
                                                                                    WebKitPolicyDecisionType type,
                                                                                    gpointer self);
static GtkWidget* _tuba_views_browser_on_create_webkit_web_view_create (WebKitWebView* _sender,
                                                                 WebKitNavigationAction* navigation_action,
                                                                 gpointer self);
static void tuba_views_browser_finalize (GObject * obj);
static GType tuba_views_browser_get_type_once (void);
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);

static const GActionEntry TUBA_VIEWS_BROWSER_HEADER_BAR_ACTION_ENTRIES[2] = {{"copy-url", _tuba_views_browser_header_bar_on_copy_url_gsimple_action_activate_callback}, {"open-in-browser", _tuba_views_browser_header_bar_on_open_in_browser_gsimple_action_activate_callback}};

static inline gpointer
tuba_views_browser_get_instance_private (TubaViewsBrowser* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsBrowser_private_offset);
}

gboolean
tuba_views_browser_grab_focus (TubaViewsBrowser* self)
{
	WebKitWebView* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->priv->webview;
	result = gtk_widget_grab_focus ((GtkWidget*) _tmp0_);
	return result;
}

TubaViewsBrowser*
tuba_views_browser_construct_with_url (GType object_type,
                                       const gchar* url)
{
	TubaViewsBrowser * self = NULL;
	g_return_val_if_fail (url != NULL, NULL);
	self = (TubaViewsBrowser*) g_object_new (object_type, NULL);
	tuba_views_browser_load_url (self, url);
	return self;
}

TubaViewsBrowser*
tuba_views_browser_new_with_url (const gchar* url)
{
	return tuba_views_browser_construct_with_url (TUBA_VIEWS_TYPE_BROWSER, url);
}

static void
tuba_views_browser_real_on_load_changed (TubaViewsBrowser* self,
                                         WebKitLoadEvent load_event)
{
	TubaViewsBrowserHeaderBar* _tmp0_;
	WebKitWebView* _tmp1_;
	TubaViewsBrowserHeaderBar* _tmp2_;
	WebKitWebView* _tmp3_;
	_tmp0_ = self->priv->headerbar;
	_tmp1_ = self->priv->webview;
	tuba_views_browser_header_bar_set_can_go_forward (_tmp0_, webkit_web_view_can_go_forward (_tmp1_));
	_tmp2_ = self->priv->headerbar;
	_tmp3_ = self->priv->webview;
	tuba_views_browser_header_bar_set_can_go_back (_tmp2_, webkit_web_view_can_go_back (_tmp3_));
	switch (load_event) {
		case WEBKIT_LOAD_FINISHED:
		{
			GTlsCertificateFlags tls_errors = 0U;
			gboolean secure = FALSE;
			WebKitWebView* _tmp4_;
			GTlsCertificateFlags _tmp5_ = 0U;
			gboolean _tmp6_;
			TubaViewsBrowserHeaderBarSecurity _tmp7_ = 0;
			gboolean _tmp8_ = FALSE;
			TubaViewsBrowserHeaderBar* _tmp9_;
			_tmp4_ = self->priv->webview;
			_tmp6_ = webkit_web_view_get_tls_info (_tmp4_, NULL, &_tmp5_);
			tls_errors = _tmp5_;
			secure = _tmp6_;
			if (secure) {
				_tmp8_ = tls_errors == G_TLS_CERTIFICATE_NO_FLAGS;
			} else {
				_tmp8_ = FALSE;
			}
			if (_tmp8_) {
				_tmp7_ = TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_SECURE;
			} else {
				_tmp7_ = TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_INSECURE;
			}
			_tmp9_ = self->priv->headerbar;
			tuba_views_browser_header_bar_set_security (_tmp9_, _tmp7_);
			break;
		}
		default:
		{
			TubaViewsBrowserHeaderBar* _tmp10_;
			_tmp10_ = self->priv->headerbar;
			tuba_views_browser_header_bar_set_security (_tmp10_, TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_UNKNOWN);
			break;
		}
	}
}

void
tuba_views_browser_on_load_changed (TubaViewsBrowser* self,
                                    WebKitLoadEvent load_event)
{
	TubaViewsBrowserClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = TUBA_VIEWS_BROWSER_GET_CLASS (self);
	if (_klass_->on_load_changed) {
		_klass_->on_load_changed (self, load_event);
	}
}

inline gboolean
tuba_views_browser_can_handle (GUri* uri,
                               const gchar* url)
{
	gboolean _tmp0_ = FALSE;
	gboolean result;
	g_return_val_if_fail (url != NULL, FALSE);
	if (uri == NULL) {
		_tmp0_ = tuba_views_browser_can_handle_url (url);
	} else {
		_tmp0_ = tuba_views_browser_can_handle_uri (uri);
	}
	result = _tmp0_;
	return result;
}

gboolean
tuba_views_browser_can_handle_uri (GUri* uri)
{
	const gchar* _tmp0_;
	gboolean result;
	g_return_val_if_fail (uri != NULL, FALSE);
	_tmp0_ = g_uri_get_scheme (uri);
	result = g_str_has_prefix (_tmp0_, "http");
	return result;
}

gboolean
tuba_views_browser_can_handle_url (const gchar* url)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gboolean _tmp2_;
	gboolean result;
	g_return_val_if_fail (url != NULL, FALSE);
	_tmp0_ = g_utf8_strdown (url, (gssize) -1);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_str_has_prefix (_tmp1_, "http");
	_g_free0 (_tmp1_);
	result = _tmp2_;
	return result;
}

void
tuba_views_browser_load_url (TubaViewsBrowser* self,
                             const gchar* url)
{
	WebKitWebView* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (url != NULL);
	_tmp0_ = self->priv->webview;
	webkit_web_view_load_uri (_tmp0_, url);
}

void
tuba_views_browser_download_in_browser (TubaViewsBrowser* self,
                                        WebKitDownload* download)
{
	WebKitURIRequest* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (download != NULL);
	webkit_download_cancel (download);
	_tmp0_ = webkit_download_get_request (download);
	_tmp1_ = webkit_uri_request_get_uri (_tmp0_);
	_tmp2_ = _tmp1_;
	tuba_utils_host_open_url (_tmp2_, NULL, NULL);
}

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

gboolean
tuba_views_browser_open_new_tab_in_browser (TubaViewsBrowser* self,
                                            WebKitPolicyDecision* decision,
                                            WebKitPolicyDecisionType type)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (decision != NULL, FALSE);
	switch (type) {
		case WEBKIT_POLICY_DECISION_TYPE_NEW_WINDOW_ACTION:
		{
			WebKitNavigationPolicyDecision* navigation_decision = NULL;
			WebKitNavigationPolicyDecision* _tmp0_;
			WebKitNavigationPolicyDecision* _tmp1_;
			WebKitNavigationPolicyDecision* _tmp2_;
			WebKitNavigationAction* _tmp3_;
			WebKitNavigationAction* _tmp4_;
			WebKitURIRequest* _tmp5_;
			const gchar* _tmp6_;
			const gchar* _tmp7_;
			WebKitNavigationPolicyDecision* _tmp8_;
			_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (decision, webkit_navigation_policy_decision_get_type ()) ? ((WebKitNavigationPolicyDecision*) decision) : NULL);
			navigation_decision = _tmp0_;
			_tmp1_ = navigation_decision;
			if (_tmp1_ == NULL) {
				result = FALSE;
				_g_object_unref0 (navigation_decision);
				return result;
			}
			_tmp2_ = navigation_decision;
			_tmp3_ = webkit_navigation_policy_decision_get_navigation_action (_tmp2_);
			_tmp4_ = _tmp3_;
			_tmp5_ = webkit_navigation_action_get_request (_tmp4_);
			_tmp6_ = webkit_uri_request_get_uri (_tmp5_);
			_tmp7_ = _tmp6_;
			tuba_views_browser_load_url (self, _tmp7_);
			_tmp8_ = navigation_decision;
			webkit_policy_decision_ignore ((WebKitPolicyDecision*) _tmp8_);
			result = TRUE;
			_g_object_unref0 (navigation_decision);
			return result;
		}
		case WEBKIT_POLICY_DECISION_TYPE_RESPONSE:
		{
			WebKitResponsePolicyDecision* response_decision = NULL;
			WebKitResponsePolicyDecision* _tmp9_;
			gboolean _tmp10_ = FALSE;
			gboolean _tmp11_ = FALSE;
			WebKitResponsePolicyDecision* _tmp12_;
			WebKitResponsePolicyDecision* _tmp19_;
			WebKitURIRequest* _tmp20_;
			WebKitURIRequest* _tmp21_;
			const gchar* _tmp22_;
			const gchar* _tmp23_;
			WebKitResponsePolicyDecision* _tmp24_;
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (decision, webkit_response_policy_decision_get_type ()) ? ((WebKitResponsePolicyDecision*) decision) : NULL);
			response_decision = _tmp9_;
			_tmp12_ = response_decision;
			if (_tmp12_ == NULL) {
				_tmp11_ = TRUE;
			} else {
				WebKitResponsePolicyDecision* _tmp13_;
				_tmp13_ = response_decision;
				_tmp11_ = webkit_response_policy_decision_is_mime_type_supported (_tmp13_);
			}
			if (_tmp11_) {
				_tmp10_ = TRUE;
			} else {
				WebKitResponsePolicyDecision* _tmp14_;
				WebKitURIResponse* _tmp15_;
				WebKitURIResponse* _tmp16_;
				const gchar* _tmp17_;
				const gchar* _tmp18_;
				_tmp14_ = response_decision;
				_tmp15_ = webkit_response_policy_decision_get_response (_tmp14_);
				_tmp16_ = _tmp15_;
				_tmp17_ = webkit_uri_response_get_mime_type (_tmp16_);
				_tmp18_ = _tmp17_;
				_tmp10_ = g_str_has_prefix (_tmp18_, "text/");
			}
			if (_tmp10_) {
				result = FALSE;
				_g_object_unref0 (response_decision);
				return result;
			}
			_tmp19_ = response_decision;
			_tmp20_ = webkit_response_policy_decision_get_request (_tmp19_);
			_tmp21_ = _tmp20_;
			_tmp22_ = webkit_uri_request_get_uri (_tmp21_);
			_tmp23_ = _tmp22_;
			tuba_utils_host_open_url (_tmp23_, NULL, NULL);
			_tmp24_ = response_decision;
			webkit_policy_decision_ignore ((WebKitPolicyDecision*) _tmp24_);
			result = TRUE;
			_g_object_unref0 (response_decision);
			return result;
		}
		default:
		{
			result = FALSE;
			return result;
		}
	}
}

GtkWidget*
tuba_views_browser_on_create (TubaViewsBrowser* self,
                              WebKitNavigationAction* navigation_action)
{
	WebKitURIRequest* _tmp0_;
	const gchar* _tmp1_;
	GtkWidget* _tmp2_;
	GtkWidget* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (navigation_action != NULL, NULL);
	_tmp0_ = webkit_navigation_action_get_request (navigation_action);
	_tmp1_ = webkit_uri_request_get_uri (_tmp0_);
	tuba_utils_host_open_url (_tmp1_, NULL, NULL);
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (NULL, gtk_widget_get_type (), GtkWidget));
	result = _tmp2_;
	return result;
}

static void
tuba_views_browser_on_go_back (TubaViewsBrowser* self)
{
	WebKitWebView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->webview;
	webkit_web_view_go_back (_tmp0_);
}

static void
tuba_views_browser_on_refresh (TubaViewsBrowser* self)
{
	WebKitWebView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->webview;
	webkit_web_view_reload (_tmp0_);
}

static void
tuba_views_browser_on_stop_loading (TubaViewsBrowser* self)
{
	WebKitWebView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->webview;
	webkit_web_view_stop_loading (_tmp0_);
}

static void
tuba_views_browser_on_go_forward (TubaViewsBrowser* self)
{
	WebKitWebView* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->webview;
	webkit_web_view_go_forward (_tmp0_);
}

static void
tuba_views_browser_on_exit (TubaViewsBrowser* self)
{
	g_return_if_fail (self != NULL);
	adw_dialog_force_close ((AdwDialog*) self);
}

TubaViewsBrowser*
tuba_views_browser_construct (GType object_type)
{
	TubaViewsBrowser * self = NULL;
	self = (TubaViewsBrowser*) g_object_new (object_type, NULL);
	return self;
}

TubaViewsBrowser*
tuba_views_browser_new (void)
{
	return tuba_views_browser_construct (TUBA_VIEWS_TYPE_BROWSER);
}

static inline gpointer
tuba_views_browser_header_bar_get_instance_private (TubaViewsBrowserHeaderBar* self)
{
	return G_STRUCT_MEMBER_P (self, TubaViewsBrowserHeaderBar_private_offset);
}

 G_GNUC_NO_INLINE static GType
tuba_views_browser_header_bar_security_get_type_once (void)
{
	static const GEnumValue values[] = {{TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_SECURE, "TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_SECURE", "secure"}, {TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_INSECURE, "TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_INSECURE", "insecure"}, {TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_UNKNOWN, "TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_UNKNOWN", "unknown"}, {0, NULL, NULL}};
	GType tuba_views_browser_header_bar_security_type_id;
	tuba_views_browser_header_bar_security_type_id = g_enum_register_static ("TubaViewsBrowserHeaderBarSecurity", values);
	return tuba_views_browser_header_bar_security_type_id;
}

GType
tuba_views_browser_header_bar_security_get_type (void)
{
	static GType tuba_views_browser_header_bar_security_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_browser_header_bar_security_type_id__once)) {
		GType tuba_views_browser_header_bar_security_type_id;
		tuba_views_browser_header_bar_security_type_id = tuba_views_browser_header_bar_security_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_browser_header_bar_security_type_id__once, tuba_views_browser_header_bar_security_type_id);
	}
	return tuba_views_browser_header_bar_security_type_id__once;
}

static void
_tuba_views_browser_header_bar_on_copy_url_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self)
{
	tuba_views_browser_header_bar_on_copy_url ((TubaViewsBrowserHeaderBar*) self);
}

static void
_tuba_views_browser_header_bar_on_open_in_browser_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                    GVariant* parameter,
                                                                                    gpointer self)
{
	tuba_views_browser_header_bar_on_open_in_browser ((TubaViewsBrowserHeaderBar*) self);
}

static void
tuba_views_browser_header_bar_real_snapshot (GtkWidget* base,
                                             GtkSnapshot* snapshot)
{
	TubaViewsBrowserHeaderBar * self;
	GdkRGBA _tmp0_;
	graphene_point_t _tmp1_ = {0};
	gdouble _tmp2_;
	gdouble _tmp3_;
	graphene_size_t _tmp4_ = {0};
	graphene_rect_t _tmp5_ = {0};
	self = (TubaViewsBrowserHeaderBar*) base;
	g_return_if_fail (snapshot != NULL);
	_tmp0_ = self->priv->color;
	memset (&_tmp1_, 0, sizeof (graphene_point_t));
	_tmp1_.x = (gfloat) 0;
	_tmp1_.y = (gfloat) 0;
	_tmp2_ = tuba_views_browser_header_bar_get_progress (self);
	_tmp3_ = _tmp2_;
	memset (&_tmp4_, 0, sizeof (graphene_size_t));
	_tmp4_.height = (gfloat) gtk_widget_get_height ((GtkWidget*) self);
	_tmp4_.width = (gfloat) (gtk_widget_get_width ((GtkWidget*) self) * _tmp3_);
	memset (&_tmp5_, 0, sizeof (graphene_rect_t));
	_tmp5_.origin = _tmp1_;
	_tmp5_.size = _tmp4_;
	gtk_snapshot_append_color (snapshot, &_tmp0_, &_tmp5_);
	GTK_WIDGET_CLASS (tuba_views_browser_header_bar_parent_class)->snapshot ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, adw_bin_get_type (), AdwBin), snapshot);
}

static void
_vala_GdkRGBA_free (GdkRGBA* self)
{
	g_boxed_free (gdk_rgba_get_type (), self);
}

static void
tuba_views_browser_header_bar_update_accent_color (TubaViewsBrowserHeaderBar* self)
{
	AdwStyleManager* _tmp0_;
	GdkRGBA* _tmp1_;
	GdkRGBA* _tmp2_;
	gdouble _tmp3_;
	gdouble _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = adw_style_manager_get_default ();
	_tmp1_ = adw_style_manager_get_accent_color_rgba (_tmp0_);
	_tmp2_ = _tmp1_;
	self->priv->color = *_tmp2_;
	__vala_GdkRGBA_free0 (_tmp2_);
	self->priv->color.alpha = 0.5f;
	_tmp3_ = tuba_views_browser_header_bar_get_progress (self);
	_tmp4_ = _tmp3_;
	if (_tmp4_ != ((gdouble) 0)) {
		gtk_widget_queue_draw ((GtkWidget*) self);
	}
}

static void
tuba_views_browser_header_bar_on_open_in_browser (TubaViewsBrowserHeaderBar* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_views_browser_header_bar_get_subtitle (self);
	_tmp1_ = _tmp0_;
	tuba_utils_host_open_url (_tmp1_, NULL, NULL);
	g_signal_emit (self, tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_EXIT_SIGNAL], 0);
}

static void
tuba_views_browser_header_bar_on_copy_url (TubaViewsBrowserHeaderBar* self)
{
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	TubaApplication* _tmp2_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_views_browser_header_bar_get_subtitle (self);
	_tmp1_ = _tmp0_;
	tuba_utils_host_copy (_tmp1_);
	_tmp2_ = tuba_app;
	g_signal_emit_by_name (_tmp2_, "toast", _ ("Copied url to clipboard"), (guint) 5, NULL, NULL, NULL);
}

static void
tuba_views_browser_header_bar_on_refresh (TubaViewsBrowserHeaderBar* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_REFRESH_SIGNAL], 0);
}

static void
tuba_views_browser_header_bar_on_stop_loading (TubaViewsBrowserHeaderBar* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_STOP_LOADING_SIGNAL], 0);
}

static void
tuba_views_browser_header_bar_on_go_back (TubaViewsBrowserHeaderBar* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_GO_BACK_SIGNAL], 0);
}

static void
tuba_views_browser_header_bar_on_go_forward (TubaViewsBrowserHeaderBar* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_GO_FORWARD_SIGNAL], 0);
}

static TubaViewsBrowserHeaderBar*
tuba_views_browser_header_bar_construct (GType object_type)
{
	TubaViewsBrowserHeaderBar * self = NULL;
	self = (TubaViewsBrowserHeaderBar*) g_object_new (object_type, NULL);
	return self;
}

static TubaViewsBrowserHeaderBar*
tuba_views_browser_header_bar_new (void)
{
	return tuba_views_browser_header_bar_construct (TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR);
}

static TubaViewsBrowserHeaderBarSecurity
tuba_views_browser_header_bar_get_security (TubaViewsBrowserHeaderBar* self)
{
	TubaViewsBrowserHeaderBarSecurity result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_security;
	return result;
}

static void
tuba_views_browser_header_bar_set_security (TubaViewsBrowserHeaderBar* self,
                                            TubaViewsBrowserHeaderBarSecurity value)
{
	g_return_if_fail (self != NULL);
	if (value != self->priv->_security) {
		GtkImage* _tmp5_;
		self->priv->_security = value;
		switch (value) {
			case TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_UNKNOWN:
			{
				GtkImage* _tmp0_;
				_tmp0_ = self->priv->ssl_icon;
				gtk_widget_set_visible ((GtkWidget*) _tmp0_, FALSE);
				return;
			}
			case TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_SECURE:
			{
				GtkImage* _tmp1_;
				GtkImage* _tmp2_;
				_tmp1_ = self->priv->ssl_icon;
				g_object_set (_tmp1_, "icon-name", "tuba-padlock2-symbolic", NULL);
				_tmp2_ = self->priv->ssl_icon;
				gtk_widget_set_tooltip_text ((GtkWidget*) _tmp2_, _ ("Secure"));
				break;
			}
			default:
			{
				GtkImage* _tmp3_;
				GtkImage* _tmp4_;
				_tmp3_ = self->priv->ssl_icon;
				g_object_set (_tmp3_, "icon-name", "tuba-channel-insecure-symbolic", NULL);
				_tmp4_ = self->priv->ssl_icon;
				gtk_widget_set_tooltip_text ((GtkWidget*) _tmp4_, _ ("Insecure"));
				break;
			}
		}
		_tmp5_ = self->priv->ssl_icon;
		gtk_widget_set_visible ((GtkWidget*) _tmp5_, TRUE);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_PROPERTY]);
}

static const gchar*
tuba_views_browser_header_bar_get_title (TubaViewsBrowserHeaderBar* self)
{
	const gchar* result;
	AdwWindowTitle* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->window_title;
	_tmp1_ = adw_window_title_get_title (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static void
tuba_views_browser_header_bar_set_title (TubaViewsBrowserHeaderBar* self,
                                         const gchar* value)
{
	AdwWindowTitle* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->window_title;
	adw_window_title_set_title (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_TITLE_PROPERTY]);
}

static const gchar*
tuba_views_browser_header_bar_get_subtitle (TubaViewsBrowserHeaderBar* self)
{
	const gchar* result;
	AdwWindowTitle* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->window_title;
	_tmp1_ = adw_window_title_get_subtitle (_tmp0_);
	_tmp2_ = _tmp1_;
	result = _tmp2_;
	return result;
}

static void
tuba_views_browser_header_bar_set_subtitle (TubaViewsBrowserHeaderBar* self,
                                            const gchar* value)
{
	AdwWindowTitle* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->window_title;
	adw_window_title_set_subtitle (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_SUBTITLE_PROPERTY]);
}

static gboolean
tuba_views_browser_header_bar_get_loading (TubaViewsBrowserHeaderBar* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_loading;
	return result;
}

static void
tuba_views_browser_header_bar_set_loading (TubaViewsBrowserHeaderBar* self,
                                           gboolean value)
{
	GSimpleAction* _tmp0_;
	GSimpleAction* _tmp1_;
	g_return_if_fail (self != NULL);
	self->priv->_loading = value;
	_tmp0_ = self->priv->refresh_action;
	g_simple_action_set_enabled (_tmp0_, !value);
	_tmp1_ = self->priv->stop_loading_action;
	g_simple_action_set_enabled (_tmp1_, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_LOADING_PROPERTY]);
}

static gdouble
tuba_views_browser_header_bar_get_progress (TubaViewsBrowserHeaderBar* self)
{
	gdouble result;
	g_return_val_if_fail (self != NULL, -1.0);
	result = self->priv->_progress;
	return result;
}

static void
tuba_views_browser_header_bar_set_progress (TubaViewsBrowserHeaderBar* self,
                                            gdouble value)
{
	g_return_if_fail (self != NULL);
	self->priv->_progress = value;
	if (value == ((gdouble) 1)) {
		self->priv->_progress = (gdouble) 0;
	}
	gtk_widget_queue_draw ((GtkWidget*) self);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_PROGRESS_PROPERTY]);
}

static void
tuba_views_browser_header_bar_set_can_go_back (TubaViewsBrowserHeaderBar* self,
                                               gboolean value)
{
	GSimpleAction* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->go_back_action;
	g_simple_action_set_enabled (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_BACK_PROPERTY]);
}

static void
tuba_views_browser_header_bar_set_can_go_forward (TubaViewsBrowserHeaderBar* self,
                                                  gboolean value)
{
	GSimpleAction* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->go_forward_action;
	g_simple_action_set_enabled (_tmp0_, value);
	g_object_notify_by_pspec ((GObject *) self, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_FORWARD_PROPERTY]);
}

static void
_tuba_views_browser_header_bar_update_accent_color_g_object_notify (GObject* _sender,
                                                                    GParamSpec* pspec,
                                                                    gpointer self)
{
	tuba_views_browser_header_bar_update_accent_color ((TubaViewsBrowserHeaderBar*) self);
}

static void
_tuba_views_browser_header_bar_on_go_back_g_simple_action_activate (GSimpleAction* _sender,
                                                                    GVariant* parameter,
                                                                    gpointer self)
{
	tuba_views_browser_header_bar_on_go_back ((TubaViewsBrowserHeaderBar*) self);
}

static void
_tuba_views_browser_header_bar_on_go_forward_g_simple_action_activate (GSimpleAction* _sender,
                                                                       GVariant* parameter,
                                                                       gpointer self)
{
	tuba_views_browser_header_bar_on_go_forward ((TubaViewsBrowserHeaderBar*) self);
}

static void
_tuba_views_browser_header_bar_on_refresh_g_simple_action_activate (GSimpleAction* _sender,
                                                                    GVariant* parameter,
                                                                    gpointer self)
{
	tuba_views_browser_header_bar_on_refresh ((TubaViewsBrowserHeaderBar*) self);
}

static void
_tuba_views_browser_header_bar_on_stop_loading_g_simple_action_activate (GSimpleAction* _sender,
                                                                         GVariant* parameter,
                                                                         gpointer self)
{
	tuba_views_browser_header_bar_on_stop_loading ((TubaViewsBrowserHeaderBar*) self);
}

static GVariant*
_variant_new34 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new35 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new36 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new37 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new38 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new39 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GVariant*
_variant_new40 (const gchar* value)
{
	return g_variant_ref_sink (g_variant_new_string (value));
}

static GObject *
tuba_views_browser_header_bar_constructor (GType type,
                                           guint n_construct_properties,
                                           GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsBrowserHeaderBar * self;
	AdwStyleManager* default_sm = NULL;
	AdwStyleManager* _tmp0_;
	AdwStyleManager* _tmp1_;
	AdwStyleManager* _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	AdwWindowTitle* _tmp7_;
	AdwHeaderBar* headerbar = NULL;
	AdwWindowTitle* _tmp8_;
	GtkWidget* _tmp9_;
	AdwHeaderBar* _tmp10_ = NULL;
	GtkImage* _tmp11_ = NULL;
	AdwHeaderBar* _tmp12_;
	GtkImage* _tmp13_;
	GSimpleActionGroup* actions = NULL;
	GSimpleActionGroup* _tmp14_;
	GSimpleActionGroup* _tmp15_;
	GSimpleAction* _tmp16_;
	GSimpleAction* _tmp17_;
	GSimpleAction* _tmp18_;
	GSimpleActionGroup* _tmp19_;
	GSimpleAction* _tmp20_;
	GSimpleAction* _tmp21_;
	GSimpleAction* _tmp22_;
	GSimpleAction* _tmp23_;
	GSimpleActionGroup* _tmp24_;
	GSimpleAction* _tmp25_;
	GSimpleAction* _tmp26_;
	GSimpleAction* _tmp27_;
	GSimpleActionGroup* _tmp28_;
	GSimpleAction* _tmp29_;
	GSimpleAction* _tmp30_;
	GSimpleAction* _tmp31_;
	GSimpleActionGroup* _tmp32_;
	GSimpleAction* _tmp33_;
	GSimpleActionGroup* _tmp34_;
	GMenu* sub_menu_model = NULL;
	GMenu* _tmp35_;
	GMenuItem* back_item = NULL;
	GMenuItem* _tmp36_;
	GMenuItem* _tmp37_;
	GVariant* _tmp38_;
	GMenu* _tmp39_;
	GMenuItem* _tmp40_;
	GMenuItem* refresh_item = NULL;
	GMenuItem* _tmp41_;
	GMenuItem* _tmp42_;
	GVariant* _tmp43_;
	GMenuItem* _tmp44_;
	GVariant* _tmp45_;
	GMenu* _tmp46_;
	GMenuItem* _tmp47_;
	GMenuItem* stop_item = NULL;
	GMenuItem* _tmp48_;
	GMenuItem* _tmp49_;
	GVariant* _tmp50_;
	GMenuItem* _tmp51_;
	GVariant* _tmp52_;
	GMenu* _tmp53_;
	GMenuItem* _tmp54_;
	GMenuItem* forward_item = NULL;
	GMenuItem* _tmp55_;
	GMenuItem* _tmp56_;
	GVariant* _tmp57_;
	GMenu* _tmp58_;
	GMenuItem* _tmp59_;
	GMenuItem* menu_section = NULL;
	GMenu* _tmp60_;
	GMenuItem* _tmp61_;
	GMenuItem* _tmp62_;
	GVariant* _tmp63_;
	GMenu* others_model = NULL;
	GMenu* _tmp64_;
	GMenu* _tmp65_;
	GMenu* _tmp66_;
	GMenu* menu_model = NULL;
	GMenu* _tmp67_;
	GMenu* _tmp68_;
	GMenuItem* _tmp69_;
	GMenu* _tmp70_;
	GMenu* _tmp71_;
	GtkMenuButton* menu_button = NULL;
	gchar* _tmp72_;
	GMenu* _tmp73_;
	GMenuModel* _tmp74_;
	gchar* _tmp75_;
	GtkMenuButton* _tmp76_ = NULL;
	AdwHeaderBar* _tmp77_;
	GtkMenuButton* _tmp78_;
	AdwHeaderBar* _tmp79_;
	parent_class = G_OBJECT_CLASS (tuba_views_browser_header_bar_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, TubaViewsBrowserHeaderBar);
	_tmp0_ = adw_style_manager_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	default_sm = _tmp1_;
	_tmp2_ = default_sm;
	_tmp3_ = adw_style_manager_get_system_supports_accent_colors (_tmp2_);
	_tmp4_ = _tmp3_;
	if (_tmp4_) {
		AdwStyleManager* _tmp5_;
		_tmp5_ = default_sm;
		g_signal_connect_object ((GObject*) _tmp5_, "notify::accent-color-rgba", (GCallback) _tuba_views_browser_header_bar_update_accent_color_g_object_notify, self, 0);
		tuba_views_browser_header_bar_update_accent_color (self);
	} else {
		GdkRGBA _tmp6_ = {0};
		_tmp6_.red = 120 / 255.0f;
		_tmp6_.green = 174 / 255.0f;
		_tmp6_.blue = 237 / 255.0f;
		_tmp6_.alpha = 0.5f;
		self->priv->color = _tmp6_;
	}
	_tmp7_ = (AdwWindowTitle*) adw_window_title_new ("", "");
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (self->priv->window_title);
	self->priv->window_title = _tmp7_;
	_tmp8_ = self->priv->window_title;
	_tmp9_ = _g_object_ref0 ((GtkWidget*) _tmp8_);
	_tmp10_ = (AdwHeaderBar*) adw_header_bar_new ();
	adw_header_bar_set_title_widget (_tmp10_, _tmp9_);
	_g_object_unref0 (_tmp9_);
	g_object_ref_sink (_tmp10_);
	headerbar = _tmp10_;
	_tmp11_ = (GtkImage*) gtk_image_new ();
	gtk_widget_set_visible ((GtkWidget*) _tmp11_, FALSE);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp11_, 8);
	g_object_ref_sink (_tmp11_);
	_g_object_unref0 (self->priv->ssl_icon);
	self->priv->ssl_icon = _tmp11_;
	_tmp12_ = headerbar;
	_tmp13_ = self->priv->ssl_icon;
	adw_header_bar_pack_start (_tmp12_, (GtkWidget*) _tmp13_);
	_tmp14_ = g_simple_action_group_new ();
	actions = _tmp14_;
	_tmp15_ = actions;
	g_action_map_add_action_entries ((GActionMap*) _tmp15_, TUBA_VIEWS_BROWSER_HEADER_BAR_ACTION_ENTRIES, (gint) G_N_ELEMENTS (TUBA_VIEWS_BROWSER_HEADER_BAR_ACTION_ENTRIES), self);
	_tmp16_ = g_simple_action_new ("go-back", NULL);
	_g_object_unref0 (self->priv->go_back_action);
	self->priv->go_back_action = _tmp16_;
	_tmp17_ = self->priv->go_back_action;
	g_signal_connect_object (_tmp17_, "activate", (GCallback) _tuba_views_browser_header_bar_on_go_back_g_simple_action_activate, self, 0);
	_tmp18_ = self->priv->go_back_action;
	g_simple_action_set_enabled (_tmp18_, FALSE);
	_tmp19_ = actions;
	_tmp20_ = self->priv->go_back_action;
	g_action_map_add_action ((GActionMap*) _tmp19_, (GAction*) _tmp20_);
	_tmp21_ = g_simple_action_new ("go-forward", NULL);
	_g_object_unref0 (self->priv->go_forward_action);
	self->priv->go_forward_action = _tmp21_;
	_tmp22_ = self->priv->go_forward_action;
	g_signal_connect_object (_tmp22_, "activate", (GCallback) _tuba_views_browser_header_bar_on_go_forward_g_simple_action_activate, self, 0);
	_tmp23_ = self->priv->go_forward_action;
	g_simple_action_set_enabled (_tmp23_, FALSE);
	_tmp24_ = actions;
	_tmp25_ = self->priv->go_forward_action;
	g_action_map_add_action ((GActionMap*) _tmp24_, (GAction*) _tmp25_);
	_tmp26_ = g_simple_action_new ("refresh", NULL);
	_g_object_unref0 (self->priv->refresh_action);
	self->priv->refresh_action = _tmp26_;
	_tmp27_ = self->priv->refresh_action;
	g_signal_connect_object (_tmp27_, "activate", (GCallback) _tuba_views_browser_header_bar_on_refresh_g_simple_action_activate, self, 0);
	_tmp28_ = actions;
	_tmp29_ = self->priv->refresh_action;
	g_action_map_add_action ((GActionMap*) _tmp28_, (GAction*) _tmp29_);
	_tmp30_ = g_simple_action_new ("stop-loading", NULL);
	_g_object_unref0 (self->priv->stop_loading_action);
	self->priv->stop_loading_action = _tmp30_;
	_tmp31_ = self->priv->stop_loading_action;
	g_signal_connect_object (_tmp31_, "activate", (GCallback) _tuba_views_browser_header_bar_on_stop_loading_g_simple_action_activate, self, 0);
	_tmp32_ = actions;
	_tmp33_ = self->priv->stop_loading_action;
	g_action_map_add_action ((GActionMap*) _tmp32_, (GAction*) _tmp33_);
	_tmp34_ = actions;
	gtk_widget_insert_action_group ((GtkWidget*) self, "browser", (GActionGroup*) _tmp34_);
	_tmp35_ = g_menu_new ();
	sub_menu_model = _tmp35_;
	_tmp36_ = g_menu_item_new (_ ("Back"), "browser.go-back");
	back_item = _tmp36_;
	_tmp37_ = back_item;
	_tmp38_ = _variant_new34 ("tuba-left-large-symbolic");
	g_menu_item_set_attribute_value (_tmp37_, "verb-icon", _tmp38_);
	_g_variant_unref0 (_tmp38_);
	_tmp39_ = sub_menu_model;
	_tmp40_ = back_item;
	g_menu_append_item (_tmp39_, _tmp40_);
	_tmp41_ = g_menu_item_new (_ ("Refresh"), "browser.refresh");
	refresh_item = _tmp41_;
	_tmp42_ = refresh_item;
	_tmp43_ = _variant_new35 ("tuba-view-refresh-symbolic");
	g_menu_item_set_attribute_value (_tmp42_, "verb-icon", _tmp43_);
	_g_variant_unref0 (_tmp43_);
	_tmp44_ = refresh_item;
	_tmp45_ = _variant_new36 ("action-disabled");
	g_menu_item_set_attribute_value (_tmp44_, "hidden-when", _tmp45_);
	_g_variant_unref0 (_tmp45_);
	_tmp46_ = sub_menu_model;
	_tmp47_ = refresh_item;
	g_menu_append_item (_tmp46_, _tmp47_);
	_tmp48_ = g_menu_item_new (_ ("Stop"), "browser.stop-loading");
	stop_item = _tmp48_;
	_tmp49_ = stop_item;
	_tmp50_ = _variant_new37 ("tuba-cross-large-symbolic");
	g_menu_item_set_attribute_value (_tmp49_, "verb-icon", _tmp50_);
	_g_variant_unref0 (_tmp50_);
	_tmp51_ = stop_item;
	_tmp52_ = _variant_new38 ("action-disabled");
	g_menu_item_set_attribute_value (_tmp51_, "hidden-when", _tmp52_);
	_g_variant_unref0 (_tmp52_);
	_tmp53_ = sub_menu_model;
	_tmp54_ = stop_item;
	g_menu_append_item (_tmp53_, _tmp54_);
	_tmp55_ = g_menu_item_new (_ ("Forward"), "browser.go-forward");
	forward_item = _tmp55_;
	_tmp56_ = forward_item;
	_tmp57_ = _variant_new39 ("tuba-right-large-symbolic");
	g_menu_item_set_attribute_value (_tmp56_, "verb-icon", _tmp57_);
	_g_variant_unref0 (_tmp57_);
	_tmp58_ = sub_menu_model;
	_tmp59_ = forward_item;
	g_menu_append_item (_tmp58_, _tmp59_);
	_tmp60_ = sub_menu_model;
	_tmp61_ = g_menu_item_new_section (NULL, (GMenuModel*) _tmp60_);
	menu_section = _tmp61_;
	_tmp62_ = menu_section;
	_tmp63_ = _variant_new40 ("horizontal-buttons");
	g_menu_item_set_attribute_value (_tmp62_, "display-hint", _tmp63_);
	_g_variant_unref0 (_tmp63_);
	_tmp64_ = g_menu_new ();
	others_model = _tmp64_;
	_tmp65_ = others_model;
	g_menu_append (_tmp65_, _ ("Open in Browser"), "browser.open-in-browser");
	_tmp66_ = others_model;
	g_menu_append (_tmp66_, _ ("Copy URL"), "browser.copy-url");
	_tmp67_ = g_menu_new ();
	menu_model = _tmp67_;
	_tmp68_ = menu_model;
	_tmp69_ = menu_section;
	g_menu_append_item (_tmp68_, _tmp69_);
	_tmp70_ = menu_model;
	_tmp71_ = others_model;
	g_menu_append_section (_tmp70_, NULL, (GMenuModel*) _tmp71_);
	_tmp72_ = g_strdup ("view-more-symbolic");
	_tmp73_ = menu_model;
	_tmp74_ = _g_object_ref0 ((GMenuModel*) _tmp73_);
	_tmp75_ = g_strdup (_ ("Menu"));
	_tmp76_ = (GtkMenuButton*) gtk_menu_button_new ();
	gtk_menu_button_set_icon_name (_tmp76_, _tmp72_);
	_g_free0 (_tmp72_);
	gtk_menu_button_set_primary (_tmp76_, TRUE);
	gtk_menu_button_set_menu_model (_tmp76_, _tmp74_);
	_g_object_unref0 (_tmp74_);
	gtk_widget_set_tooltip_text ((GtkWidget*) _tmp76_, _tmp75_);
	_g_free0 (_tmp75_);
	g_object_ref_sink (_tmp76_);
	menu_button = _tmp76_;
	_tmp77_ = headerbar;
	_tmp78_ = menu_button;
	adw_header_bar_pack_end (_tmp77_, (GtkWidget*) _tmp78_);
	_tmp79_ = headerbar;
	adw_bin_set_child ((AdwBin*) self, (GtkWidget*) _tmp79_);
	_g_object_unref0 (menu_button);
	_g_object_unref0 (menu_model);
	_g_object_unref0 (others_model);
	_g_object_unref0 (menu_section);
	_g_object_unref0 (forward_item);
	_g_object_unref0 (stop_item);
	_g_object_unref0 (refresh_item);
	_g_object_unref0 (back_item);
	_g_object_unref0 (sub_menu_model);
	_g_object_unref0 (actions);
	_g_object_unref0 (headerbar);
	_g_object_unref0 (default_sm);
	return obj;
}

static void
tuba_views_browser_header_bar_class_init (TubaViewsBrowserHeaderBarClass * klass,
                                          gpointer klass_data)
{
	tuba_views_browser_header_bar_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsBrowserHeaderBar_private_offset);
	((GtkWidgetClass *) klass)->snapshot = (void (*) (GtkWidget*, GtkSnapshot*)) tuba_views_browser_header_bar_real_snapshot;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_views_browser_header_bar_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_views_browser_header_bar_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_browser_header_bar_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_browser_header_bar_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_PROPERTY, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_PROPERTY] = g_param_spec_enum ("security", "security", "security", TUBA_VIEWS_BROWSER_HEADER_BAR_TYPE_SECURITY, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_BROWSER_HEADER_BAR_TITLE_PROPERTY, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_BROWSER_HEADER_BAR_SUBTITLE_PROPERTY, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_SUBTITLE_PROPERTY] = g_param_spec_string ("subtitle", "subtitle", "subtitle", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_BROWSER_HEADER_BAR_LOADING_PROPERTY, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_LOADING_PROPERTY] = g_param_spec_boolean ("loading", "loading", "loading", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_BROWSER_HEADER_BAR_PROGRESS_PROPERTY, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_PROGRESS_PROPERTY] = g_param_spec_double ("progress", "progress", "progress", -G_MAXDOUBLE, G_MAXDOUBLE, 0.0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_BACK_PROPERTY, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_BACK_PROPERTY] = g_param_spec_boolean ("can-go-back", "can-go-back", "can-go-back", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_FORWARD_PROPERTY, tuba_views_browser_header_bar_properties[TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_FORWARD_PROPERTY] = g_param_spec_boolean ("can-go-forward", "can-go-forward", "can-go-forward", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE));
	tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_STOP_LOADING_SIGNAL] = g_signal_new ("stop-loading", TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_REFRESH_SIGNAL] = g_signal_new ("refresh", TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_GO_BACK_SIGNAL] = g_signal_new ("go-back", TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_GO_FORWARD_SIGNAL] = g_signal_new ("go-forward", TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tuba_views_browser_header_bar_signals[TUBA_VIEWS_BROWSER_HEADER_BAR_EXIT_SIGNAL] = g_signal_new ("exit", TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
tuba_views_browser_header_bar_instance_init (TubaViewsBrowserHeaderBar * self,
                                             gpointer klass)
{
	self->priv = tuba_views_browser_header_bar_get_instance_private (self);
	self->priv->_security = TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_UNKNOWN;
	self->priv->_loading = FALSE;
	self->priv->_progress = (gdouble) 0;
}

static void
tuba_views_browser_header_bar_finalize (GObject * obj)
{
	TubaViewsBrowserHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, TubaViewsBrowserHeaderBar);
	g_debug ("Browser.vala:4: Destroying Browser HeaderBar");
	_g_object_unref0 (self->priv->window_title);
	_g_object_unref0 (self->priv->ssl_icon);
	_g_object_unref0 (self->priv->go_back_action);
	_g_object_unref0 (self->priv->go_forward_action);
	_g_object_unref0 (self->priv->stop_loading_action);
	_g_object_unref0 (self->priv->refresh_action);
	G_OBJECT_CLASS (tuba_views_browser_header_bar_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_browser_header_bar_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsBrowserHeaderBarClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_browser_header_bar_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsBrowserHeaderBar), 0, (GInstanceInitFunc) tuba_views_browser_header_bar_instance_init, NULL };
	GType tuba_views_browser_header_bar_type_id;
	tuba_views_browser_header_bar_type_id = g_type_register_static (adw_bin_get_type (), "TubaViewsBrowserHeaderBar", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsBrowserHeaderBar_private_offset = g_type_add_instance_private (tuba_views_browser_header_bar_type_id, sizeof (TubaViewsBrowserHeaderBarPrivate));
	return tuba_views_browser_header_bar_type_id;
}

static GType
tuba_views_browser_header_bar_get_type (void)
{
	static GType tuba_views_browser_header_bar_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_browser_header_bar_type_id__once)) {
		GType tuba_views_browser_header_bar_type_id;
		tuba_views_browser_header_bar_type_id = tuba_views_browser_header_bar_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_browser_header_bar_type_id__once, tuba_views_browser_header_bar_type_id);
	}
	return tuba_views_browser_header_bar_type_id__once;
}

static void
_vala_tuba_views_browser_header_bar_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec)
{
	TubaViewsBrowserHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, TubaViewsBrowserHeaderBar);
	switch (property_id) {
		case TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_PROPERTY:
		g_value_set_enum (value, tuba_views_browser_header_bar_get_security (self));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_TITLE_PROPERTY:
		g_value_set_string (value, tuba_views_browser_header_bar_get_title (self));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_SUBTITLE_PROPERTY:
		g_value_set_string (value, tuba_views_browser_header_bar_get_subtitle (self));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_LOADING_PROPERTY:
		g_value_set_boolean (value, tuba_views_browser_header_bar_get_loading (self));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_PROGRESS_PROPERTY:
		g_value_set_double (value, tuba_views_browser_header_bar_get_progress (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_views_browser_header_bar_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec)
{
	TubaViewsBrowserHeaderBar * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_VIEWS_BROWSER_TYPE_HEADER_BAR, TubaViewsBrowserHeaderBar);
	switch (property_id) {
		case TUBA_VIEWS_BROWSER_HEADER_BAR_SECURITY_PROPERTY:
		tuba_views_browser_header_bar_set_security (self, g_value_get_enum (value));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_TITLE_PROPERTY:
		tuba_views_browser_header_bar_set_title (self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_SUBTITLE_PROPERTY:
		tuba_views_browser_header_bar_set_subtitle (self, g_value_get_string (value));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_LOADING_PROPERTY:
		tuba_views_browser_header_bar_set_loading (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_PROGRESS_PROPERTY:
		tuba_views_browser_header_bar_set_progress (self, g_value_get_double (value));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_BACK_PROPERTY:
		tuba_views_browser_header_bar_set_can_go_back (self, g_value_get_boolean (value));
		break;
		case TUBA_VIEWS_BROWSER_HEADER_BAR_CAN_GO_FORWARD_PROPERTY:
		tuba_views_browser_header_bar_set_can_go_forward (self, g_value_get_boolean (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_tuba_views_browser_on_go_back_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                          gint n_press,
                                                          gdouble x,
                                                          gdouble y,
                                                          gpointer self)
{
	tuba_views_browser_on_go_back ((TubaViewsBrowser*) self);
}

static void
_tuba_views_browser_on_go_forward_gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                                             gint n_press,
                                                             gdouble x,
                                                             gdouble y,
                                                             gpointer self)
{
	tuba_views_browser_on_go_forward ((TubaViewsBrowser*) self);
}

static void
_tuba_views_browser_on_go_back_tuba_views_browser_header_bar_go_back (TubaViewsBrowserHeaderBar* _sender,
                                                                      gpointer self)
{
	tuba_views_browser_on_go_back ((TubaViewsBrowser*) self);
}

static void
_tuba_views_browser_on_refresh_tuba_views_browser_header_bar_refresh (TubaViewsBrowserHeaderBar* _sender,
                                                                      gpointer self)
{
	tuba_views_browser_on_refresh ((TubaViewsBrowser*) self);
}

static void
_tuba_views_browser_on_stop_loading_tuba_views_browser_header_bar_stop_loading (TubaViewsBrowserHeaderBar* _sender,
                                                                                gpointer self)
{
	tuba_views_browser_on_stop_loading ((TubaViewsBrowser*) self);
}

static void
_tuba_views_browser_on_go_forward_tuba_views_browser_header_bar_go_forward (TubaViewsBrowserHeaderBar* _sender,
                                                                            gpointer self)
{
	tuba_views_browser_on_go_forward ((TubaViewsBrowser*) self);
}

static void
_tuba_views_browser_on_exit_tuba_views_browser_header_bar_exit (TubaViewsBrowserHeaderBar* _sender,
                                                                gpointer self)
{
	tuba_views_browser_on_exit ((TubaViewsBrowser*) self);
}

static void
_tuba_views_browser_on_load_changed_webkit_web_view_load_changed (WebKitWebView* _sender,
                                                                  WebKitLoadEvent load_event,
                                                                  gpointer self)
{
	tuba_views_browser_on_load_changed ((TubaViewsBrowser*) self, load_event);
}

static void
_tuba_views_browser_download_in_browser_webkit_network_session_download_started (WebKitNetworkSession* _sender,
                                                                                 WebKitDownload* download,
                                                                                 gpointer self)
{
	tuba_views_browser_download_in_browser ((TubaViewsBrowser*) self, download);
}

static gboolean
_tuba_views_browser_open_new_tab_in_browser_webkit_web_view_decide_policy (WebKitWebView* _sender,
                                                                           WebKitPolicyDecision* decision,
                                                                           WebKitPolicyDecisionType type,
                                                                           gpointer self)
{
	gboolean result;
	result = tuba_views_browser_open_new_tab_in_browser ((TubaViewsBrowser*) self, decision, type);
	return result;
}

static GtkWidget*
_tuba_views_browser_on_create_webkit_web_view_create (WebKitWebView* _sender,
                                                      WebKitNavigationAction* navigation_action,
                                                      gpointer self)
{
	GtkWidget* result;
	result = tuba_views_browser_on_create ((TubaViewsBrowser*) self, navigation_action);
	return result;
}

static GObject *
tuba_views_browser_constructor (GType type,
                                guint n_construct_properties,
                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaViewsBrowser * self;
	WebKitWebView* _tmp0_ = NULL;
	WebKitSettings* webkit_settings = NULL;
	GtkSettings* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	WebKitSettings* _tmp4_ = NULL;
	WebKitWebView* _tmp6_;
	WebKitSettings* _tmp7_;
	GtkGestureClick* back_click_gesture = NULL;
	GtkGestureClick* _tmp8_ = NULL;
	GtkGestureClick* _tmp9_;
	WebKitWebView* _tmp10_;
	GtkGestureClick* _tmp11_;
	GtkEventController* _tmp12_;
	GtkGestureClick* forward_click_gesture = NULL;
	GtkGestureClick* _tmp13_ = NULL;
	GtkGestureClick* _tmp14_;
	WebKitWebView* _tmp15_;
	GtkGestureClick* _tmp16_;
	GtkEventController* _tmp17_;
	TubaViewsBrowserHeaderBar* _tmp18_;
	TubaViewsBrowserHeaderBar* _tmp19_;
	TubaViewsBrowserHeaderBar* _tmp20_;
	TubaViewsBrowserHeaderBar* _tmp21_;
	TubaViewsBrowserHeaderBar* _tmp22_;
	TubaViewsBrowserHeaderBar* _tmp23_;
	AdwToolbarView* toolbar_view = NULL;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar** _tmp26_;
	AdwToolbarView* _tmp27_ = NULL;
	AdwToolbarView* _tmp28_;
	TubaViewsBrowserHeaderBar* _tmp29_;
	WebKitWebView* _tmp30_;
	TubaViewsBrowserHeaderBar* _tmp31_;
	WebKitWebView* _tmp32_;
	TubaViewsBrowserHeaderBar* _tmp33_;
	WebKitWebView* _tmp34_;
	WebKitWebContext* _tmp35_;
	WebKitWebContext* _tmp36_;
	WebKitWebContext* _tmp37_;
	WebKitWebView* _tmp38_;
	TubaViewsBrowserHeaderBar* _tmp39_;
	WebKitWebView* _tmp40_;
	TubaViewsBrowserHeaderBar* _tmp41_;
	WebKitWebView* _tmp42_;
	WebKitWebView* _tmp43_;
	WebKitNetworkSession* _tmp44_;
	WebKitNetworkSession* _tmp45_;
	WebKitWebView* _tmp46_;
	WebKitWebView* _tmp47_;
	AdwToolbarView* _tmp48_;
	WebKitWebView* _tmp49_;
	AdwToolbarView* _tmp50_;
	WebKitWebView* _tmp51_;
	parent_class = G_OBJECT_CLASS (tuba_views_browser_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_BROWSER, TubaViewsBrowser);
	adw_dialog_set_content_width ((AdwDialog*) self, 1200);
	adw_dialog_set_content_height ((AdwDialog*) self, 1200);
	_tmp0_ = (WebKitWebView*) webkit_web_view_new ();
	gtk_widget_set_vexpand ((GtkWidget*) _tmp0_, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) _tmp0_, TRUE);
	g_object_ref_sink (_tmp0_);
	_g_object_unref0 (self->priv->webview);
	self->priv->webview = _tmp0_;
	_tmp1_ = gtk_settings_get_default ();
	g_object_get (_tmp1_, "gtk-font-name", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = webkit_settings_new ();
	webkit_settings_set_default_font_family (_tmp4_, _tmp3_);
	_g_free0 (_tmp3_);
	webkit_settings_set_allow_file_access_from_file_urls (_tmp4_, FALSE);
	webkit_settings_set_allow_modal_dialogs (_tmp4_, FALSE);
	webkit_settings_set_allow_universal_access_from_file_urls (_tmp4_, FALSE);
	webkit_settings_set_auto_load_images (_tmp4_, TRUE);
	webkit_settings_set_disable_web_security (_tmp4_, TRUE);
	webkit_settings_set_javascript_can_open_windows_automatically (_tmp4_, FALSE);
	webkit_settings_set_enable_developer_extras (_tmp4_, FALSE);
	webkit_settings_set_enable_back_forward_navigation_gestures (_tmp4_, TRUE);
	webkit_settings_set_enable_dns_prefetching (_tmp4_, FALSE);
	webkit_settings_set_enable_fullscreen (_tmp4_, TRUE);
	webkit_settings_set_enable_media (_tmp4_, TRUE);
	webkit_settings_set_enable_media_capabilities (_tmp4_, TRUE);
	webkit_settings_set_enable_mediasource (_tmp4_, TRUE);
	webkit_settings_set_enable_site_specific_quirks (_tmp4_, TRUE);
	webkit_settings_set_enable_webaudio (_tmp4_, TRUE);
	webkit_settings_set_enable_webgl (_tmp4_, TRUE);
	webkit_settings_set_enable_webrtc (_tmp4_, FALSE);
	webkit_settings_set_enable_write_console_messages_to_stdout (_tmp4_, FALSE);
	webkit_settings_set_javascript_can_access_clipboard (_tmp4_, FALSE);
	webkit_settings_set_javascript_can_open_windows_automatically (_tmp4_, FALSE);
	webkit_settings_set_enable_html5_database (_tmp4_, TRUE);
	webkit_settings_set_enable_html5_local_storage (_tmp4_, TRUE);
	webkit_settings_set_enable_smooth_scrolling (_tmp4_, TRUE);
	webkit_settings_set_hardware_acceleration_policy (_tmp4_, WEBKIT_HARDWARE_ACCELERATION_POLICY_NEVER);
	webkit_settings = _tmp4_;
	if (g_strcmp0 (BUILD_PROFILE, "development") != 0) {
		WebKitSettings* _tmp5_;
		_tmp5_ = webkit_settings;
		webkit_settings_set_user_agent_with_application_details (_tmp5_, BUILD_NAME, BUILD_VERSION);
	}
	_tmp6_ = self->priv->webview;
	_tmp7_ = webkit_settings;
	webkit_web_view_set_settings (_tmp6_, _tmp7_);
	_tmp8_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp8_, (guint) 8);
	back_click_gesture = _tmp8_;
	_tmp9_ = back_click_gesture;
	g_signal_connect_object (_tmp9_, "pressed", (GCallback) _tuba_views_browser_on_go_back_gtk_gesture_click_pressed, self, 0);
	_tmp10_ = self->priv->webview;
	_tmp11_ = back_click_gesture;
	_tmp12_ = _g_object_ref0 ((GtkEventController*) _tmp11_);
	gtk_widget_add_controller ((GtkWidget*) _tmp10_, _tmp12_);
	_tmp13_ = (GtkGestureClick*) gtk_gesture_click_new ();
	gtk_gesture_single_set_button ((GtkGestureSingle*) _tmp13_, (guint) 9);
	forward_click_gesture = _tmp13_;
	_tmp14_ = forward_click_gesture;
	g_signal_connect_object (_tmp14_, "pressed", (GCallback) _tuba_views_browser_on_go_forward_gtk_gesture_click_pressed, self, 0);
	_tmp15_ = self->priv->webview;
	_tmp16_ = forward_click_gesture;
	_tmp17_ = _g_object_ref0 ((GtkEventController*) _tmp16_);
	gtk_widget_add_controller ((GtkWidget*) _tmp15_, _tmp17_);
	_tmp18_ = tuba_views_browser_header_bar_new ();
	g_object_ref_sink (_tmp18_);
	_g_object_unref0 (self->priv->headerbar);
	self->priv->headerbar = _tmp18_;
	_tmp19_ = self->priv->headerbar;
	g_signal_connect_object (_tmp19_, "go-back", (GCallback) _tuba_views_browser_on_go_back_tuba_views_browser_header_bar_go_back, self, 0);
	_tmp20_ = self->priv->headerbar;
	g_signal_connect_object (_tmp20_, "refresh", (GCallback) _tuba_views_browser_on_refresh_tuba_views_browser_header_bar_refresh, self, 0);
	_tmp21_ = self->priv->headerbar;
	g_signal_connect_object (_tmp21_, "stop-loading", (GCallback) _tuba_views_browser_on_stop_loading_tuba_views_browser_header_bar_stop_loading, self, 0);
	_tmp22_ = self->priv->headerbar;
	g_signal_connect_object (_tmp22_, "go-forward", (GCallback) _tuba_views_browser_on_go_forward_tuba_views_browser_header_bar_go_forward, self, 0);
	_tmp23_ = self->priv->headerbar;
	g_signal_connect_object (_tmp23_, "exit", (GCallback) _tuba_views_browser_on_exit_tuba_views_browser_header_bar_exit, self, 0);
	_tmp24_ = g_strdup ("background");
	_tmp25_ = g_strdup ("browser");
	_tmp26_ = g_new0 (gchar*, 2 + 1);
	_tmp26_[0] = _tmp24_;
	_tmp26_[1] = _tmp25_;
	_tmp27_ = (AdwToolbarView*) adw_toolbar_view_new ();
	gtk_widget_set_css_classes ((GtkWidget*) _tmp27_, _tmp26_);
	_tmp26_ = (_vala_array_free (_tmp26_, 2, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp27_);
	toolbar_view = _tmp27_;
	_tmp28_ = toolbar_view;
	_tmp29_ = self->priv->headerbar;
	adw_toolbar_view_add_top_bar (_tmp28_, (GtkWidget*) _tmp29_);
	_tmp30_ = self->priv->webview;
	_tmp31_ = self->priv->headerbar;
	g_object_bind_property_with_closures ((GObject*) _tmp30_, "title", (GObject*) _tmp31_, "title", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp32_ = self->priv->webview;
	_tmp33_ = self->priv->headerbar;
	g_object_bind_property_with_closures ((GObject*) _tmp32_, "uri", (GObject*) _tmp33_, "subtitle", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp34_ = self->priv->webview;
	g_object_get (_tmp34_, "web-context", &_tmp35_, NULL);
	_tmp36_ = _tmp35_;
	_tmp37_ = _tmp36_;
	webkit_web_context_set_cache_model (_tmp37_, WEBKIT_CACHE_MODEL_DOCUMENT_BROWSER);
	_g_object_unref0 (_tmp37_);
	_tmp38_ = self->priv->webview;
	_tmp39_ = self->priv->headerbar;
	g_object_bind_property_with_closures ((GObject*) _tmp38_, "estimated-load-progress", (GObject*) _tmp39_, "progress", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp40_ = self->priv->webview;
	_tmp41_ = self->priv->headerbar;
	g_object_bind_property_with_closures ((GObject*) _tmp40_, "is-loading", (GObject*) _tmp41_, "loading", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp42_ = self->priv->webview;
	g_signal_connect_object (_tmp42_, "load-changed", (GCallback) _tuba_views_browser_on_load_changed_webkit_web_view_load_changed, self, 0);
	_tmp43_ = self->priv->webview;
	_tmp44_ = webkit_web_view_get_network_session (_tmp43_);
	_tmp45_ = _tmp44_;
	g_signal_connect_object (_tmp45_, "download-started", (GCallback) _tuba_views_browser_download_in_browser_webkit_network_session_download_started, self, 0);
	_tmp46_ = self->priv->webview;
	g_signal_connect_object (_tmp46_, "decide-policy", (GCallback) _tuba_views_browser_open_new_tab_in_browser_webkit_web_view_decide_policy, self, 0);
	_tmp47_ = self->priv->webview;
	g_signal_connect_object (_tmp47_, "create", (GCallback) _tuba_views_browser_on_create_webkit_web_view_create, self, 0);
	_tmp48_ = toolbar_view;
	_tmp49_ = self->priv->webview;
	adw_toolbar_view_set_content (_tmp48_, (GtkWidget*) _tmp49_);
	_tmp50_ = toolbar_view;
	adw_dialog_set_child ((AdwDialog*) self, (GtkWidget*) _tmp50_);
	_tmp51_ = self->priv->webview;
	g_object_set ((AdwDialog*) self, "focus-widget", (GtkWidget*) _tmp51_, NULL);
	_g_object_unref0 (toolbar_view);
	_g_object_unref0 (forward_click_gesture);
	_g_object_unref0 (back_click_gesture);
	_g_object_unref0 (webkit_settings);
	return obj;
}

static void
tuba_views_browser_class_init (TubaViewsBrowserClass * klass,
                               gpointer klass_data)
{
	tuba_views_browser_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaViewsBrowser_private_offset);
	((TubaViewsBrowserClass *) klass)->on_load_changed = (void (*) (TubaViewsBrowser*, WebKitLoadEvent)) tuba_views_browser_real_on_load_changed;
	G_OBJECT_CLASS (klass)->constructor = tuba_views_browser_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_views_browser_finalize;
}

static void
tuba_views_browser_instance_init (TubaViewsBrowser * self,
                                  gpointer klass)
{
	self->priv = tuba_views_browser_get_instance_private (self);
}

static void
tuba_views_browser_finalize (GObject * obj)
{
	TubaViewsBrowser * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_VIEWS_TYPE_BROWSER, TubaViewsBrowser);
	g_debug ("Browser.vala:248: Destroying Browser");
	_g_object_unref0 (self->priv->webview);
	_g_object_unref0 (self->priv->headerbar);
	G_OBJECT_CLASS (tuba_views_browser_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_views_browser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaViewsBrowserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_views_browser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaViewsBrowser), 0, (GInstanceInitFunc) tuba_views_browser_instance_init, NULL };
	GType tuba_views_browser_type_id;
	tuba_views_browser_type_id = g_type_register_static (adw_dialog_get_type (), "TubaViewsBrowser", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaViewsBrowser_private_offset = g_type_add_instance_private (tuba_views_browser_type_id, sizeof (TubaViewsBrowserPrivate));
	return tuba_views_browser_type_id;
}

GType
tuba_views_browser_get_type (void)
{
	static GType tuba_views_browser_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_views_browser_type_id__once)) {
		GType tuba_views_browser_type_id;
		tuba_views_browser_type_id = tuba_views_browser_get_type_once ();
		g_once_init_leave_pointer (&tuba_views_browser_type_id__once, tuba_views_browser_type_id);
	}
	return tuba_views_browser_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

