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

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

#define TOOTLE_TYPE_APPLICATION (tootle_application_get_type ())
#define TOOTLE_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_APPLICATION, TootleApplication))
#define TOOTLE_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_APPLICATION, TootleApplicationClass))
#define TOOTLE_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_APPLICATION))
#define TOOTLE_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_APPLICATION))
#define TOOTLE_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_APPLICATION, TootleApplicationClass))

typedef struct _TootleApplication TootleApplication;
typedef struct _TootleApplicationClass TootleApplicationClass;

#define TOOTLE_DIALOGS_TYPE_MAIN_WINDOW (tootle_dialogs_main_window_get_type ())
#define TOOTLE_DIALOGS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindow))
#define TOOTLE_DIALOGS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW))
#define TOOTLE_DIALOGS_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_MAIN_WINDOW, TootleDialogsMainWindowClass))

typedef struct _TootleDialogsMainWindow TootleDialogsMainWindow;
typedef struct _TootleDialogsMainWindowClass TootleDialogsMainWindowClass;

#define TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT (tootle_dialogs_new_account_get_type ())
#define TOOTLE_DIALOGS_NEW_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT, TootleDialogsNewAccount))
#define TOOTLE_DIALOGS_NEW_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT, TootleDialogsNewAccountClass))
#define TOOTLE_DIALOGS_IS_NEW_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT))
#define TOOTLE_DIALOGS_IS_NEW_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT))
#define TOOTLE_DIALOGS_NEW_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_NEW_ACCOUNT, TootleDialogsNewAccountClass))

typedef struct _TootleDialogsNewAccount TootleDialogsNewAccount;
typedef struct _TootleDialogsNewAccountClass TootleDialogsNewAccountClass;

#define TOOTLE_TYPE_SETTINGS (tootle_settings_get_type ())
#define TOOTLE_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_SETTINGS, TootleSettings))
#define TOOTLE_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_SETTINGS, TootleSettingsClass))
#define TOOTLE_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_SETTINGS))
#define TOOTLE_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_SETTINGS))
#define TOOTLE_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_SETTINGS, TootleSettingsClass))

typedef struct _TootleSettings TootleSettings;
typedef struct _TootleSettingsClass TootleSettingsClass;

#define TOOTLE_TYPE_ACCOUNTS (tootle_accounts_get_type ())
#define TOOTLE_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccounts))
#define TOOTLE_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))
#define TOOTLE_IS_ACCOUNTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_IS_ACCOUNTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ACCOUNTS))
#define TOOTLE_ACCOUNTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ACCOUNTS, TootleAccountsClass))

typedef struct _TootleAccounts TootleAccounts;
typedef struct _TootleAccountsClass TootleAccountsClass;

#define TOOTLE_TYPE_NETWORK (tootle_network_get_type ())
#define TOOTLE_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_NETWORK, TootleNetwork))
#define TOOTLE_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_NETWORK, TootleNetworkClass))
#define TOOTLE_IS_NETWORK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_NETWORK))
#define TOOTLE_IS_NETWORK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_NETWORK))
#define TOOTLE_NETWORK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_NETWORK, TootleNetworkClass))

typedef struct _TootleNetwork TootleNetwork;
typedef struct _TootleNetworkClass TootleNetworkClass;

#define TOOTLE_TYPE_CACHE (tootle_cache_get_type ())
#define TOOTLE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_CACHE, TootleCache))
#define TOOTLE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_CACHE, TootleCacheClass))
#define TOOTLE_IS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_CACHE))
#define TOOTLE_IS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_CACHE))
#define TOOTLE_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_CACHE, TootleCacheClass))

typedef struct _TootleCache TootleCache;
typedef struct _TootleCacheClass TootleCacheClass;

#define TOOTLE_TYPE_STREAMS (tootle_streams_get_type ())
#define TOOTLE_STREAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_STREAMS, TootleStreams))
#define TOOTLE_STREAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_STREAMS, TootleStreamsClass))
#define TOOTLE_IS_STREAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_STREAMS))
#define TOOTLE_IS_STREAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_STREAMS))
#define TOOTLE_STREAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_STREAMS, TootleStreamsClass))

typedef struct _TootleStreams TootleStreams;
typedef struct _TootleStreamsClass TootleStreamsClass;
typedef struct _TootleApplicationPrivate TootleApplicationPrivate;
enum  {
	TOOTLE_APPLICATION_0_PROPERTY,
	TOOTLE_APPLICATION_APP_SETTINGS_PROPERTY,
	TOOTLE_APPLICATION_APP_ACCOUNTS_PROPERTY,
	TOOTLE_APPLICATION_APP_NETWORK_PROPERTY,
	TOOTLE_APPLICATION_APP_CACHE_PROPERTY,
	TOOTLE_APPLICATION_APP_STREAMS_PROPERTY,
	TOOTLE_APPLICATION_NUM_PROPERTIES
};
static GParamSpec* tootle_application_properties[TOOTLE_APPLICATION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TOOTLE_TYPE_ENTITY (tootle_entity_get_type ())
#define TOOTLE_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_TYPE_ENTITY, TootleEntity))
#define TOOTLE_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_TYPE_ENTITY, TootleEntityClass))
#define TOOTLE_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_TYPE_ENTITY))
#define TOOTLE_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_TYPE_ENTITY))
#define TOOTLE_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_TYPE_ENTITY, TootleEntityClass))

typedef struct _TootleEntity TootleEntity;
typedef struct _TootleEntityClass TootleEntityClass;

#define TOOTLE_API_TYPE_STATUS (tootle_api_status_get_type ())
#define TOOTLE_API_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_API_TYPE_STATUS, TootleAPIStatus))
#define TOOTLE_API_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_API_TYPE_STATUS, TootleAPIStatusClass))
#define TOOTLE_API_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_API_TYPE_STATUS))
#define TOOTLE_API_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_API_TYPE_STATUS))
#define TOOTLE_API_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_API_TYPE_STATUS, TootleAPIStatusClass))

typedef struct _TootleAPIStatus TootleAPIStatus;
typedef struct _TootleAPIStatusClass TootleAPIStatusClass;

#define TOOTLE_DIALOGS_TYPE_COMPOSE (tootle_dialogs_compose_get_type ())
#define TOOTLE_DIALOGS_COMPOSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_COMPOSE, TootleDialogsCompose))
#define TOOTLE_DIALOGS_COMPOSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_COMPOSE, TootleDialogsComposeClass))
#define TOOTLE_DIALOGS_IS_COMPOSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_COMPOSE))
#define TOOTLE_DIALOGS_IS_COMPOSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_COMPOSE))
#define TOOTLE_DIALOGS_COMPOSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_COMPOSE, TootleDialogsComposeClass))

typedef struct _TootleDialogsCompose TootleDialogsCompose;
typedef struct _TootleDialogsComposeClass TootleDialogsComposeClass;

#define TOOTLE_VIEWS_TYPE_BASE (tootle_views_base_get_type ())
#define TOOTLE_VIEWS_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBase))
#define TOOTLE_VIEWS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))
#define TOOTLE_VIEWS_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_IS_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_BASE))
#define TOOTLE_VIEWS_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_BASE, TootleViewsBaseClass))

typedef struct _TootleViewsBase TootleViewsBase;
typedef struct _TootleViewsBaseClass TootleViewsBaseClass;

#define TOOTLE_VIEWS_TYPE_TABBED_BASE (tootle_views_tabbed_base_get_type ())
#define TOOTLE_VIEWS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_TABBED_BASE, TootleViewsTabbedBase))
#define TOOTLE_VIEWS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_TABBED_BASE, TootleViewsTabbedBaseClass))
#define TOOTLE_VIEWS_IS_TABBED_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_TABBED_BASE))
#define TOOTLE_VIEWS_IS_TABBED_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_TABBED_BASE))
#define TOOTLE_VIEWS_TABBED_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_TABBED_BASE, TootleViewsTabbedBaseClass))

typedef struct _TootleViewsTabbedBase TootleViewsTabbedBase;
typedef struct _TootleViewsTabbedBaseClass TootleViewsTabbedBaseClass;

#define TOOTLE_VIEWS_TYPE_SEARCH (tootle_views_search_get_type ())
#define TOOTLE_VIEWS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_VIEWS_TYPE_SEARCH, TootleViewsSearch))
#define TOOTLE_VIEWS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_VIEWS_TYPE_SEARCH, TootleViewsSearchClass))
#define TOOTLE_VIEWS_IS_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_VIEWS_TYPE_SEARCH))
#define TOOTLE_VIEWS_IS_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_VIEWS_TYPE_SEARCH))
#define TOOTLE_VIEWS_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_VIEWS_TYPE_SEARCH, TootleViewsSearchClass))

typedef struct _TootleViewsSearch TootleViewsSearch;
typedef struct _TootleViewsSearchClass TootleViewsSearchClass;

#define TOOTLE_DIALOGS_TYPE_ABOUT (tootle_dialogs_about_get_type ())
#define TOOTLE_DIALOGS_ABOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TOOTLE_DIALOGS_TYPE_ABOUT, TootleDialogsAbout))
#define TOOTLE_DIALOGS_ABOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TOOTLE_DIALOGS_TYPE_ABOUT, TootleDialogsAboutClass))
#define TOOTLE_DIALOGS_IS_ABOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TOOTLE_DIALOGS_TYPE_ABOUT))
#define TOOTLE_DIALOGS_IS_ABOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TOOTLE_DIALOGS_TYPE_ABOUT))
#define TOOTLE_DIALOGS_ABOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TOOTLE_DIALOGS_TYPE_ABOUT, TootleDialogsAboutClass))

typedef struct _TootleDialogsAbout TootleDialogsAbout;
typedef struct _TootleDialogsAboutClass TootleDialogsAboutClass;
enum  {
	TOOTLE_APPLICATION_REFRESH_SIGNAL,
	TOOTLE_APPLICATION_TOAST_SIGNAL,
	TOOTLE_APPLICATION_ERROR_SIGNAL,
	TOOTLE_APPLICATION_NUM_SIGNALS
};
static guint tootle_application_signals[TOOTLE_APPLICATION_NUM_SIGNALS] = {0};

typedef enum  {
	TOOTLE_OOPSIE_USER,
	TOOTLE_OOPSIE_PARSING,
	TOOTLE_OOPSIE_INSTANCE,
	TOOTLE_OOPSIE_INTERNAL
} TootleOopsie;
#define TOOTLE_OOPSIE tootle_oopsie_quark ()
struct _TootleApplication {
	GtkApplication parent_instance;
	TootleApplicationPrivate * priv;
	GtkCssProvider* css_provider;
	GtkCssProvider* zoom_css_provider;
	gchar** ACCEL_ABOUT;
	gint ACCEL_ABOUT_length1;
	gchar** ACCEL_NEW_POST;
	gint ACCEL_NEW_POST_length1;
	gchar** ACCEL_BACK;
	gint ACCEL_BACK_length1;
	gchar** ACCEL_REFRESH;
	gint ACCEL_REFRESH_length1;
	gchar** ACCEL_SEARCH;
	gint ACCEL_SEARCH_length1;
	gchar** ACCEL_TIMELINE_0;
	gint ACCEL_TIMELINE_0_length1;
	gchar** ACCEL_TIMELINE_1;
	gint ACCEL_TIMELINE_1_length1;
	gchar** ACCEL_TIMELINE_2;
	gint ACCEL_TIMELINE_2_length1;
	gchar** ACCEL_TIMELINE_3;
	gint ACCEL_TIMELINE_3_length1;
};

struct _TootleApplicationClass {
	GtkApplicationClass parent_class;
};

extern TootleApplication* tootle_app;
TootleApplication* tootle_app = NULL;
extern TootleDialogsMainWindow* tootle_window;
TootleDialogsMainWindow* tootle_window = NULL;
extern TootleDialogsNewAccount* tootle_new_account_window;
TootleDialogsNewAccount* tootle_new_account_window = NULL;
extern GtkWindow* tootle_window_dummy;
GtkWindow* tootle_window_dummy = NULL;
extern TootleSettings* tootle_settings;
TootleSettings* tootle_settings = NULL;
extern TootleAccounts* tootle_accounts;
TootleAccounts* tootle_accounts = NULL;
extern TootleNetwork* tootle_network;
TootleNetwork* tootle_network = NULL;
extern TootleCache* tootle_cache;
TootleCache* tootle_cache = NULL;
extern TootleStreams* tootle_streams;
TootleStreams* tootle_streams = NULL;
extern gboolean tootle_start_hidden;
gboolean tootle_start_hidden = FALSE;
static gpointer tootle_application_parent_class = NULL;

GQuark tootle_oopsie_quark (void);
GType tootle_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleApplication, g_object_unref)
GType tootle_dialogs_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsMainWindow, g_object_unref)
GType tootle_dialogs_new_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsNewAccount, g_object_unref)
GType tootle_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleSettings, g_object_unref)
GType tootle_accounts_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAccounts, g_object_unref)
GType tootle_network_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleNetwork, g_object_unref)
GType tootle_cache_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleCache, g_object_unref)
GType tootle_streams_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleStreams, g_object_unref)
static void tootle_application_about_activated (TootleApplication* self);
static void _tootle_application_about_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                           GVariant* parameter,
                                                                           gpointer self);
static void tootle_application_compose_activated (TootleApplication* self);
static void _tootle_application_compose_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self);
static void tootle_application_back_activated (TootleApplication* self);
static void _tootle_application_back_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                          GVariant* parameter,
                                                                          gpointer self);
static void tootle_application_refresh_activated (TootleApplication* self);
static void _tootle_application_refresh_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                             GVariant* parameter,
                                                                             gpointer self);
static void tootle_application_search_activated (TootleApplication* self);
static void _tootle_application_search_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                            GVariant* parameter,
                                                                            gpointer self);
static void tootle_application_switch_timeline_activated (TootleApplication* self,
                                                   GSimpleAction* a,
                                                   GVariant* v);
static void _tootle_application_switch_timeline_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                     GVariant* parameter,
                                                                                     gpointer self);
static gint tootle_application_main (gchar** args,
                              gint args_length1);
TootleApplication* tootle_application_new (void);
TootleApplication* tootle_application_construct (GType object_type);
static void tootle_application_real_startup (GApplication* base);
void build_print_info (void);
TootleSettings* tootle_settings_new (void);
TootleSettings* tootle_settings_construct (GType object_type);
TootleStreams* tootle_streams_new (void);
TootleStreams* tootle_streams_construct (GType object_type);
TootleAccounts* tootle_accounts_new (void);
TootleAccounts* tootle_accounts_construct (GType object_type);
TootleNetwork* tootle_network_new (void);
TootleNetwork* tootle_network_construct (GType object_type);
TootleCache* tootle_cache_new (void);
TootleCache* tootle_cache_construct (GType object_type);
void tootle_accounts_init (TootleAccounts* self);
static void __lambda136_ (TootleApplication* self,
                   const gchar* title,
                   const gchar* msg);
void tootle_application_inform (TootleApplication* self,
                                GtkMessageType type,
                                const gchar* text,
                                const gchar* msg,
                                GtkWindow* win);
static void ___lambda136__tootle_application_error (TootleApplication* _sender,
                                             const gchar* title,
                                             const gchar* text,
                                             gpointer self);
#define BUILD_RESOURCES "/com/github/bleakgrey/tootle/"
static void tootle_application_real_activate (GApplication* base);
void tootle_application_present_window (TootleApplication* self);
static void tootle_application_real_open (GApplication* base,
                                   GFile** files,
                                   gint files_length1,
                                   const gchar* hint);
void tootle_dialogs_new_account_redirect (TootleDialogsNewAccount* self,
                                          const gchar* uri);
gboolean tootle_accounts_is_empty (TootleAccounts* self);
TootleDialogsNewAccount* tootle_dialogs_new_account_new (void);
TootleDialogsNewAccount* tootle_dialogs_new_account_construct (GType object_type);
TootleDialogsMainWindow* tootle_dialogs_main_window_new (GtkApplication* app);
TootleDialogsMainWindow* tootle_dialogs_main_window_construct (GType object_type,
                                                               GtkApplication* app);
gboolean tootle_application_on_window_closed (TootleApplication* self);
gboolean tootle_settings_get_work_in_background (TootleSettings* self);
TootleAPIStatus* tootle_api_status_new_empty (void);
TootleAPIStatus* tootle_api_status_construct_empty (GType object_type);
GType tootle_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleEntity, g_object_unref)
GType tootle_api_status_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleAPIStatus, g_object_unref)
TootleDialogsCompose* tootle_dialogs_compose_new (TootleAPIStatus* template);
TootleDialogsCompose* tootle_dialogs_compose_construct (GType object_type,
                                                        TootleAPIStatus* template);
GType tootle_dialogs_compose_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsCompose, g_object_unref)
gboolean tootle_dialogs_main_window_back (TootleDialogsMainWindow* self);
GType tootle_views_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsBase, g_object_unref)
TootleViewsBase* tootle_dialogs_main_window_open_view (TootleDialogsMainWindow* self,
                                                       TootleViewsBase* view);
TootleViewsSearch* tootle_views_search_new (void);
TootleViewsSearch* tootle_views_search_construct (GType object_type);
GType tootle_views_tabbed_base_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsTabbedBase, g_object_unref)
GType tootle_views_search_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleViewsSearch, g_object_unref)
void tootle_dialogs_main_window_switch_timeline (TootleDialogsMainWindow* self,
                                                 gint32 num) G_GNUC_DEPRECATED ;
TootleDialogsAbout* tootle_dialogs_about_new (void);
TootleDialogsAbout* tootle_dialogs_about_construct (GType object_type);
GType tootle_dialogs_about_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TootleDialogsAbout, g_object_unref)
gboolean tootle_application_question (TootleApplication* self,
                                      const gchar* text,
                                      const gchar* msg,
                                      GtkWindow* win);
TootleSettings* tootle_application_get_app_settings (TootleApplication* self);
TootleAccounts* tootle_application_get_app_accounts (TootleApplication* self);
TootleNetwork* tootle_application_get_app_network (TootleApplication* self);
TootleCache* tootle_application_get_app_cache (TootleApplication* self);
TootleStreams* tootle_application_get_app_streams (TootleApplication* self);
static void g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static GObject * tootle_application_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties);
#define BUILD_DOMAIN "com.github.bleakgrey.tootle"
static void tootle_application_finalize (GObject * obj);
static GType tootle_application_get_type_once (void);
static void _vala_tootle_application_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gint array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gint array_length,
                       GDestroyNotify destroy_func);

const GOptionEntry TOOTLE_APPLICATION_app_options[2] = {{"hidden", (gchar) 0, (gint) 0, G_OPTION_ARG_NONE, &tootle_start_hidden, "Do not show main window on start", NULL}, {NULL}};
const GActionEntry TOOTLE_APPLICATION_app_entries[6] = {{"about", _tootle_application_about_activated_gsimple_action_activate_callback}, {"compose", _tootle_application_compose_activated_gsimple_action_activate_callback}, {"back", _tootle_application_back_activated_gsimple_action_activate_callback}, {"refresh", _tootle_application_refresh_activated_gsimple_action_activate_callback}, {"search", _tootle_application_search_activated_gsimple_action_activate_callback}, {"switch-timeline", _tootle_application_switch_timeline_activated_gsimple_action_activate_callback, "i"}};

GQuark
tootle_oopsie_quark (void)
{
	return g_quark_from_static_string ("tootle-oopsie-quark");
}

static void
_tootle_application_about_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                      GVariant* parameter,
                                                                      gpointer self)
{
	tootle_application_about_activated ((TootleApplication*) self);
}

static void
_tootle_application_compose_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self)
{
	tootle_application_compose_activated ((TootleApplication*) self);
}

static void
_tootle_application_back_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                     GVariant* parameter,
                                                                     gpointer self)
{
	tootle_application_back_activated ((TootleApplication*) self);
}

static void
_tootle_application_refresh_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                        GVariant* parameter,
                                                                        gpointer self)
{
	tootle_application_refresh_activated ((TootleApplication*) self);
}

static void
_tootle_application_search_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                       GVariant* parameter,
                                                                       gpointer self)
{
	tootle_application_search_activated ((TootleApplication*) self);
}

static void
_tootle_application_switch_timeline_activated_gsimple_action_activate_callback (GSimpleAction* action,
                                                                                GVariant* parameter,
                                                                                gpointer self)
{
	tootle_application_switch_timeline_activated ((TootleApplication*) self, action, parameter);
}

static gint
tootle_application_main (gchar** args,
                         gint args_length1)
{
	TootleApplication* _tmp5_;
	TootleApplication* _tmp6_;
	GError* _inner_error0_ = NULL;
	gint result = 0;
	gtk_init ((gint*) (&args_length1), &args);
	{
		GOptionContext* opt_context = NULL;
		GOptionContext* _tmp0_;
		_tmp0_ = g_option_context_new ("- Options");
		opt_context = _tmp0_;
		g_option_context_add_main_entries (opt_context, TOOTLE_APPLICATION_app_options, NULL);
		g_option_context_parse (opt_context, (gint*) (&args_length1), &args, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gint _tmp1_ = -1;
			_g_option_context_free0 (opt_context);
			if (_inner_error0_->domain == G_OPTION_ERROR) {
				goto __catch0_g_option_error;
			}
			g_critical ("file %s: line %d: unexpected 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 _tmp1_;
		}
		_g_option_context_free0 (opt_context);
	}
	goto __finally0;
	__catch0_g_option_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_warning ("Application.vala:78: %s", _tmp3_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp4_ = -1;
		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 _tmp4_;
	}
	_tmp5_ = tootle_application_new ();
	_g_object_unref0 (tootle_app);
	tootle_app = _tmp5_;
	_tmp6_ = tootle_app;
	result = g_application_run ((GApplication*) _tmp6_, (gint) args_length1, args);
	return result;
}

int
main (int argc,
      char ** argv)
{
	return tootle_application_main (argv, argc);
}

static void
__lambda136_ (TootleApplication* self,
              const gchar* title,
              const gchar* msg)
{
	TootleDialogsMainWindow* _tmp0_;
	g_return_if_fail (title != NULL);
	_tmp0_ = tootle_window;
	tootle_application_inform (self, GTK_MESSAGE_ERROR, title, msg, (GtkWindow*) _tmp0_);
}

static void
___lambda136__tootle_application_error (TootleApplication* _sender,
                                        const gchar* title,
                                        const gchar* text,
                                        gpointer self)
{
	__lambda136_ ((TootleApplication*) self, title, text);
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

static void
tootle_application_real_startup (GApplication* base)
{
	TootleApplication * self;
	TootleSettings* _tmp0_;
	TootleStreams* _tmp1_;
	TootleAccounts* _tmp2_;
	TootleNetwork* _tmp3_;
	TootleCache* _tmp4_;
	TootleAccounts* _tmp5_;
	TootleApplication* _tmp6_;
	GtkWindow* _tmp7_;
	GtkWindow* _tmp8_;
	GtkCssProvider* _tmp9_;
	const gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	GdkScreen* _tmp13_;
	GtkCssProvider* _tmp14_;
	GdkScreen* _tmp15_;
	GtkCssProvider* _tmp16_;
	gchar** _tmp17_;
	gint _tmp17__length1;
	gchar** _tmp18_;
	gint _tmp18__length1;
	gchar** _tmp19_;
	gint _tmp19__length1;
	gchar** _tmp20_;
	gint _tmp20__length1;
	gchar** _tmp21_;
	gint _tmp21__length1;
	gchar** _tmp22_;
	gint _tmp22__length1;
	gchar** _tmp23_;
	gint _tmp23__length1;
	gchar** _tmp24_;
	gint _tmp24__length1;
	gchar** _tmp25_;
	gint _tmp25__length1;
	self = (TootleApplication*) base;
	G_APPLICATION_CLASS (tootle_application_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_get_type (), GtkApplication));
	build_print_info ();
	hdy_init ();
	_tmp0_ = tootle_settings_new ();
	_g_object_unref0 (tootle_settings);
	tootle_settings = _tmp0_;
	_tmp1_ = tootle_streams_new ();
	_g_object_unref0 (tootle_streams);
	tootle_streams = _tmp1_;
	_tmp2_ = tootle_accounts_new ();
	_g_object_unref0 (tootle_accounts);
	tootle_accounts = _tmp2_;
	_tmp3_ = tootle_network_new ();
	_g_object_unref0 (tootle_network);
	tootle_network = _tmp3_;
	_tmp4_ = tootle_cache_new ();
	_g_object_unref0 (tootle_cache);
	tootle_cache = _tmp4_;
	_tmp5_ = tootle_accounts;
	tootle_accounts_init (_tmp5_);
	_tmp6_ = tootle_app;
	g_signal_connect_object (_tmp6_, "error", (GCallback) ___lambda136__tootle_application_error, self, 0);
	_tmp7_ = (GtkWindow*) gtk_window_new (GTK_WINDOW_TOPLEVEL);
	g_object_ref_sink (_tmp7_);
	_g_object_unref0 (tootle_window_dummy);
	tootle_window_dummy = _tmp7_;
	_tmp8_ = tootle_window_dummy;
	gtk_application_add_window ((GtkApplication*) self, _tmp8_);
	_tmp9_ = self->css_provider;
	_tmp10_ = string_to_string (BUILD_RESOURCES);
	_tmp11_ = g_strconcat (_tmp10_, "app.css", NULL);
	_tmp12_ = _tmp11_;
	gtk_css_provider_load_from_resource (_tmp9_, _tmp12_);
	_g_free0 (_tmp12_);
	_tmp13_ = gdk_screen_get_default ();
	_tmp14_ = self->css_provider;
	gtk_style_context_add_provider_for_screen (_tmp13_, (GtkStyleProvider*) _tmp14_, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
	_tmp15_ = gdk_screen_get_default ();
	_tmp16_ = self->zoom_css_provider;
	gtk_style_context_add_provider_for_screen (_tmp15_, (GtkStyleProvider*) _tmp16_, (guint) GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
	_tmp17_ = self->ACCEL_ABOUT;
	_tmp17__length1 = self->ACCEL_ABOUT_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.about", _tmp17_);
	_tmp18_ = self->ACCEL_NEW_POST;
	_tmp18__length1 = self->ACCEL_NEW_POST_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.compose", _tmp18_);
	_tmp19_ = self->ACCEL_BACK;
	_tmp19__length1 = self->ACCEL_BACK_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.back", _tmp19_);
	_tmp20_ = self->ACCEL_REFRESH;
	_tmp20__length1 = self->ACCEL_REFRESH_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.refresh", _tmp20_);
	_tmp21_ = self->ACCEL_SEARCH;
	_tmp21__length1 = self->ACCEL_SEARCH_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.search", _tmp21_);
	_tmp22_ = self->ACCEL_TIMELINE_0;
	_tmp22__length1 = self->ACCEL_TIMELINE_0_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.switch-timeline(0)", _tmp22_);
	_tmp23_ = self->ACCEL_TIMELINE_1;
	_tmp23__length1 = self->ACCEL_TIMELINE_1_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.switch-timeline(1)", _tmp23_);
	_tmp24_ = self->ACCEL_TIMELINE_2;
	_tmp24__length1 = self->ACCEL_TIMELINE_2_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.switch-timeline(2)", _tmp24_);
	_tmp25_ = self->ACCEL_TIMELINE_3;
	_tmp25__length1 = self->ACCEL_TIMELINE_3_length1;
	gtk_application_set_accels_for_action ((GtkApplication*) self, "app.switch-timeline(3)", _tmp25_);
	g_action_map_add_action_entries ((GActionMap*) self, TOOTLE_APPLICATION_app_entries, (gint) G_N_ELEMENTS (TOOTLE_APPLICATION_app_entries), self);
}

static void
tootle_application_real_activate (GApplication* base)
{
	TootleApplication * self;
	self = (TootleApplication*) base;
	tootle_application_present_window (self);
	if (tootle_start_hidden) {
		tootle_start_hidden = FALSE;
		return;
	}
}

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

static void
tootle_application_real_open (GApplication* base,
                              GFile** files,
                              gint files_length1,
                              const gchar* hint)
{
	TootleApplication * self;
	self = (TootleApplication*) base;
	g_return_if_fail (hint != NULL);
	{
		GFile** file_collection = NULL;
		gint file_collection_length1 = 0;
		gint _file_collection_size_ = 0;
		gint file_it = 0;
		file_collection = files;
		file_collection_length1 = files_length1;
		for (file_it = 0; file_it < file_collection_length1; file_it = file_it + 1) {
			GFile* _tmp0_;
			GFile* file = NULL;
			_tmp0_ = _g_object_ref0 (file_collection[file_it]);
			file = _tmp0_;
			{
				gchar* uri = NULL;
				GFile* _tmp1_;
				gchar* _tmp2_;
				TootleDialogsNewAccount* _tmp3_;
				_tmp1_ = file;
				_tmp2_ = g_file_get_uri (_tmp1_);
				uri = _tmp2_;
				_tmp3_ = tootle_new_account_window;
				if (_tmp3_ != NULL) {
					TootleDialogsNewAccount* _tmp4_;
					const gchar* _tmp5_;
					_tmp4_ = tootle_new_account_window;
					_tmp5_ = uri;
					tootle_dialogs_new_account_redirect (_tmp4_, _tmp5_);
				} else {
					const gchar* _tmp6_;
					const gchar* _tmp7_;
					gchar* _tmp8_;
					gchar* _tmp9_;
					_tmp6_ = uri;
					_tmp7_ = string_to_string (_tmp6_);
					_tmp8_ = g_strconcat ("Received an unexpected uri to open: ", _tmp7_, NULL);
					_tmp9_ = _tmp8_;
					g_warning ("Application.vala:135: %s", _tmp9_);
					_g_free0 (_tmp9_);
				}
				_g_free0 (uri);
				_g_object_unref0 (file);
				return;
			}
		}
	}
}

void
tootle_application_present_window (TootleApplication* self)
{
	TootleAccounts* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tootle_accounts;
	if (tootle_accounts_is_empty (_tmp0_)) {
		TootleDialogsNewAccount* _tmp1_;
		g_message ("Application.vala:142: Presenting NewAccount dialog");
		_tmp1_ = tootle_new_account_window;
		if (_tmp1_ == NULL) {
			TootleDialogsNewAccount* _tmp2_;
			TootleDialogsNewAccount* _tmp3_;
			_tmp2_ = tootle_dialogs_new_account_new ();
			g_object_ref_sink (_tmp2_);
			_tmp3_ = _tmp2_;
			_g_object_unref0 (_tmp3_);
		}
	} else {
		TootleDialogsMainWindow* _tmp4_;
		TootleDialogsMainWindow* _tmp6_;
		g_message ("Application.vala:147: Presenting MainWindow");
		_tmp4_ = tootle_window;
		if (_tmp4_ == NULL) {
			TootleDialogsMainWindow* _tmp5_;
			_tmp5_ = tootle_dialogs_main_window_new ((GtkApplication*) self);
			g_object_ref_sink (_tmp5_);
			_g_object_unref0 (tootle_window);
			tootle_window = _tmp5_;
		}
		_tmp6_ = tootle_window;
		gtk_window_present ((GtkWindow*) _tmp6_);
	}
}

gboolean
tootle_application_on_window_closed (TootleApplication* self)
{
	gboolean _tmp0_ = FALSE;
	TootleSettings* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp1_ = tootle_settings;
	_tmp2_ = tootle_settings_get_work_in_background (_tmp1_);
	_tmp3_ = _tmp2_;
	if (!_tmp3_) {
		_tmp0_ = TRUE;
	} else {
		TootleAccounts* _tmp4_;
		_tmp4_ = tootle_accounts;
		_tmp0_ = tootle_accounts_is_empty (_tmp4_);
	}
	if (_tmp0_) {
		TootleApplication* _tmp5_;
		GtkWindow* _tmp6_;
		_tmp5_ = tootle_app;
		_tmp6_ = tootle_window_dummy;
		gtk_application_remove_window ((GtkApplication*) _tmp5_, _tmp6_);
	}
	result = FALSE;
	return result;
}

static void
tootle_application_compose_activated (TootleApplication* self)
{
	TootleAPIStatus* _tmp0_;
	TootleAPIStatus* _tmp1_;
	TootleDialogsCompose* _tmp2_;
	TootleDialogsCompose* _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tootle_api_status_new_empty ();
	_tmp1_ = _tmp0_;
	_tmp2_ = tootle_dialogs_compose_new (_tmp1_);
	g_object_ref_sink (_tmp2_);
	_tmp3_ = _tmp2_;
	_g_object_unref0 (_tmp3_);
	_g_object_unref0 (_tmp1_);
}

static void
tootle_application_back_activated (TootleApplication* self)
{
	TootleDialogsMainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tootle_window;
	tootle_dialogs_main_window_back (_tmp0_);
}

static void
tootle_application_search_activated (TootleApplication* self)
{
	TootleDialogsMainWindow* _tmp0_;
	TootleViewsSearch* _tmp1_;
	TootleViewsSearch* _tmp2_;
	TootleViewsBase* _tmp3_;
	TootleViewsBase* _tmp4_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tootle_window;
	_tmp1_ = tootle_views_search_new ();
	g_object_ref_sink (_tmp1_);
	_tmp2_ = _tmp1_;
	_tmp3_ = tootle_dialogs_main_window_open_view (_tmp0_, (TootleViewsBase*) _tmp2_);
	_tmp4_ = _tmp3_;
	_g_object_unref0 (_tmp4_);
	_g_object_unref0 (_tmp2_);
}

static void
tootle_application_refresh_activated (TootleApplication* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit (self, tootle_application_signals[TOOTLE_APPLICATION_REFRESH_SIGNAL], 0);
}

static void
tootle_application_switch_timeline_activated (TootleApplication* self,
                                              GSimpleAction* a,
                                              GVariant* v)
{
	gint32 num = 0;
	TootleDialogsMainWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (a != NULL);
	num = g_variant_get_int32 (v);
	_tmp0_ = tootle_window;
	tootle_dialogs_main_window_switch_timeline (_tmp0_, num);
}

static void
tootle_application_about_activated (TootleApplication* self)
{
	TootleDialogsAbout* _tmp0_;
	TootleDialogsAbout* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tootle_dialogs_about_new ();
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	_g_object_unref0 (_tmp1_);
}

void
tootle_application_inform (TootleApplication* self,
                           GtkMessageType type,
                           const gchar* text,
                           const gchar* msg,
                           GtkWindow* win)
{
	GtkMessageDialog* dlg = NULL;
	GtkMessageDialog* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = (GtkMessageDialog*) gtk_message_dialog_new (win, GTK_DIALOG_MODAL, type, GTK_BUTTONS_OK, NULL);
	g_object_ref_sink (_tmp0_);
	dlg = _tmp0_;
	g_object_set (dlg, "text", text, NULL);
	g_object_set (dlg, "secondary-text", msg, NULL);
	gtk_window_set_transient_for ((GtkWindow*) dlg, win);
	gtk_dialog_run ((GtkDialog*) dlg);
	gtk_widget_destroy ((GtkWidget*) dlg);
	_g_object_unref0 (dlg);
}

gboolean
tootle_application_question (TootleApplication* self,
                             const gchar* text,
                             const gchar* msg,
                             GtkWindow* win)
{
	GtkMessageDialog* dlg = NULL;
	GtkMessageDialog* _tmp0_;
	gint i = 0;
	gboolean result = FALSE;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (text != NULL, FALSE);
	_tmp0_ = (GtkMessageDialog*) gtk_message_dialog_new (win, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, NULL);
	g_object_ref_sink (_tmp0_);
	dlg = _tmp0_;
	g_object_set (dlg, "text", text, NULL);
	g_object_set (dlg, "secondary-text", msg, NULL);
	gtk_window_set_transient_for ((GtkWindow*) dlg, win);
	i = gtk_dialog_run ((GtkDialog*) dlg);
	gtk_widget_destroy ((GtkWidget*) dlg);
	result = i == ((gint) GTK_RESPONSE_YES);
	_g_object_unref0 (dlg);
	return result;
}

TootleApplication*
tootle_application_construct (GType object_type)
{
	TootleApplication * self = NULL;
	self = (TootleApplication*) g_object_new (object_type, NULL);
	return self;
}

TootleApplication*
tootle_application_new (void)
{
	return tootle_application_construct (TOOTLE_TYPE_APPLICATION);
}

TootleSettings*
tootle_application_get_app_settings (TootleApplication* self)
{
	TootleSettings* result;
	TootleSettings* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = tootle_settings;
	result = _tmp0_;
	return result;
}

TootleAccounts*
tootle_application_get_app_accounts (TootleApplication* self)
{
	TootleAccounts* result;
	TootleAccounts* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = tootle_accounts;
	result = _tmp0_;
	return result;
}

TootleNetwork*
tootle_application_get_app_network (TootleApplication* self)
{
	TootleNetwork* result;
	TootleNetwork* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = tootle_network;
	result = _tmp0_;
	return result;
}

TootleCache*
tootle_application_get_app_cache (TootleApplication* self)
{
	TootleCache* result;
	TootleCache* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = tootle_cache;
	result = _tmp0_;
	return result;
}

TootleStreams*
tootle_application_get_app_streams (TootleApplication* self)
{
	TootleStreams* result;
	TootleStreams* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = tootle_streams;
	result = _tmp0_;
	return result;
}

static void
g_cclosure_user_marshal_VOID__STRING_STRING (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__STRING_STRING) (gpointer data1, const char* arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__STRING_STRING callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
	g_return_if_fail (n_param_values == 3);
	if (G_CCLOSURE_SWAP_DATA (closure)) {
		data1 = closure->data;
		data2 = param_values->data[0].v_pointer;
	} else {
		data1 = param_values->data[0].v_pointer;
		data2 = closure->data;
	}
	callback = (GMarshalFunc_VOID__STRING_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_string (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static GObject *
tootle_application_constructor (GType type,
                                guint n_construct_properties,
                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TootleApplication * self;
	parent_class = G_OBJECT_CLASS (tootle_application_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_TYPE_APPLICATION, TootleApplication);
	g_application_set_application_id ((GApplication*) self, BUILD_DOMAIN);
	g_application_set_flags ((GApplication*) self, G_APPLICATION_HANDLES_OPEN);
	return obj;
}

static void
tootle_application_class_init (TootleApplicationClass * klass,
                               gpointer klass_data)
{
	tootle_application_parent_class = g_type_class_peek_parent (klass);
	((GApplicationClass *) klass)->startup = (void (*) (GApplication*)) tootle_application_real_startup;
	((GApplicationClass *) klass)->activate = (void (*) (GApplication*)) tootle_application_real_activate;
	((GApplicationClass *) klass)->open = (void (*) (GApplication*, GFile**, gint, const gchar*)) tootle_application_real_open;
	G_OBJECT_CLASS (klass)->get_property = _vala_tootle_application_get_property;
	G_OBJECT_CLASS (klass)->constructor = tootle_application_constructor;
	G_OBJECT_CLASS (klass)->finalize = tootle_application_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_APPLICATION_APP_SETTINGS_PROPERTY, tootle_application_properties[TOOTLE_APPLICATION_APP_SETTINGS_PROPERTY] = g_param_spec_object ("app-settings", "app-settings", "app-settings", TOOTLE_TYPE_SETTINGS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_APPLICATION_APP_ACCOUNTS_PROPERTY, tootle_application_properties[TOOTLE_APPLICATION_APP_ACCOUNTS_PROPERTY] = g_param_spec_object ("app-accounts", "app-accounts", "app-accounts", TOOTLE_TYPE_ACCOUNTS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_APPLICATION_APP_NETWORK_PROPERTY, tootle_application_properties[TOOTLE_APPLICATION_APP_NETWORK_PROPERTY] = g_param_spec_object ("app-network", "app-network", "app-network", TOOTLE_TYPE_NETWORK, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_APPLICATION_APP_CACHE_PROPERTY, tootle_application_properties[TOOTLE_APPLICATION_APP_CACHE_PROPERTY] = g_param_spec_object ("app-cache", "app-cache", "app-cache", TOOTLE_TYPE_CACHE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TOOTLE_APPLICATION_APP_STREAMS_PROPERTY, tootle_application_properties[TOOTLE_APPLICATION_APP_STREAMS_PROPERTY] = g_param_spec_object ("app-streams", "app-streams", "app-streams", TOOTLE_TYPE_STREAMS, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	tootle_application_signals[TOOTLE_APPLICATION_REFRESH_SIGNAL] = g_signal_new ("refresh", TOOTLE_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	tootle_application_signals[TOOTLE_APPLICATION_TOAST_SIGNAL] = g_signal_new ("toast", TOOTLE_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
	tootle_application_signals[TOOTLE_APPLICATION_ERROR_SIGNAL] = g_signal_new ("error", TOOTLE_TYPE_APPLICATION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_STRING, G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
}

static void
tootle_application_instance_init (TootleApplication * self,
                                  gpointer klass)
{
	GtkCssProvider* _tmp0_;
	GtkCssProvider* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar* _tmp4_;
	gchar** _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar** _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar** _tmp11_;
	gchar* _tmp12_;
	gchar** _tmp13_;
	gchar* _tmp14_;
	gchar** _tmp15_;
	gchar* _tmp16_;
	gchar** _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gchar* _tmp20_;
	gchar** _tmp21_;
	_tmp0_ = gtk_css_provider_new ();
	self->css_provider = _tmp0_;
	_tmp1_ = gtk_css_provider_new ();
	self->zoom_css_provider = _tmp1_;
	_tmp2_ = g_strdup ("F1");
	_tmp3_ = g_new0 (gchar*, 1 + 1);
	_tmp3_[0] = _tmp2_;
	self->ACCEL_ABOUT = _tmp3_;
	self->ACCEL_ABOUT_length1 = 1;
	_tmp4_ = g_strdup ("<Ctrl>T");
	_tmp5_ = g_new0 (gchar*, 1 + 1);
	_tmp5_[0] = _tmp4_;
	self->ACCEL_NEW_POST = _tmp5_;
	self->ACCEL_NEW_POST_length1 = 1;
	_tmp6_ = g_strdup ("<Alt>BackSpace");
	_tmp7_ = g_strdup ("<Alt>Left");
	_tmp8_ = g_new0 (gchar*, 2 + 1);
	_tmp8_[0] = _tmp6_;
	_tmp8_[1] = _tmp7_;
	self->ACCEL_BACK = _tmp8_;
	self->ACCEL_BACK_length1 = 2;
	_tmp9_ = g_strdup ("<Ctrl>R");
	_tmp10_ = g_strdup ("F5");
	_tmp11_ = g_new0 (gchar*, 2 + 1);
	_tmp11_[0] = _tmp9_;
	_tmp11_[1] = _tmp10_;
	self->ACCEL_REFRESH = _tmp11_;
	self->ACCEL_REFRESH_length1 = 2;
	_tmp12_ = g_strdup ("<Ctrl>F");
	_tmp13_ = g_new0 (gchar*, 1 + 1);
	_tmp13_[0] = _tmp12_;
	self->ACCEL_SEARCH = _tmp13_;
	self->ACCEL_SEARCH_length1 = 1;
	_tmp14_ = g_strdup ("<Alt>1");
	_tmp15_ = g_new0 (gchar*, 1 + 1);
	_tmp15_[0] = _tmp14_;
	self->ACCEL_TIMELINE_0 = _tmp15_;
	self->ACCEL_TIMELINE_0_length1 = 1;
	_tmp16_ = g_strdup ("<Alt>2");
	_tmp17_ = g_new0 (gchar*, 1 + 1);
	_tmp17_[0] = _tmp16_;
	self->ACCEL_TIMELINE_1 = _tmp17_;
	self->ACCEL_TIMELINE_1_length1 = 1;
	_tmp18_ = g_strdup ("<Alt>3");
	_tmp19_ = g_new0 (gchar*, 1 + 1);
	_tmp19_[0] = _tmp18_;
	self->ACCEL_TIMELINE_2 = _tmp19_;
	self->ACCEL_TIMELINE_2_length1 = 1;
	_tmp20_ = g_strdup ("<Alt>4");
	_tmp21_ = g_new0 (gchar*, 1 + 1);
	_tmp21_[0] = _tmp20_;
	self->ACCEL_TIMELINE_3 = _tmp21_;
	self->ACCEL_TIMELINE_3_length1 = 1;
}

static void
tootle_application_finalize (GObject * obj)
{
	TootleApplication * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TOOTLE_TYPE_APPLICATION, TootleApplication);
	_g_object_unref0 (self->css_provider);
	_g_object_unref0 (self->zoom_css_provider);
	self->ACCEL_ABOUT = (_vala_array_free (self->ACCEL_ABOUT, self->ACCEL_ABOUT_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_NEW_POST = (_vala_array_free (self->ACCEL_NEW_POST, self->ACCEL_NEW_POST_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_BACK = (_vala_array_free (self->ACCEL_BACK, self->ACCEL_BACK_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_REFRESH = (_vala_array_free (self->ACCEL_REFRESH, self->ACCEL_REFRESH_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_SEARCH = (_vala_array_free (self->ACCEL_SEARCH, self->ACCEL_SEARCH_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_TIMELINE_0 = (_vala_array_free (self->ACCEL_TIMELINE_0, self->ACCEL_TIMELINE_0_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_TIMELINE_1 = (_vala_array_free (self->ACCEL_TIMELINE_1, self->ACCEL_TIMELINE_1_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_TIMELINE_2 = (_vala_array_free (self->ACCEL_TIMELINE_2, self->ACCEL_TIMELINE_2_length1, (GDestroyNotify) g_free), NULL);
	self->ACCEL_TIMELINE_3 = (_vala_array_free (self->ACCEL_TIMELINE_3, self->ACCEL_TIMELINE_3_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (tootle_application_parent_class)->finalize (obj);
}

static GType
tootle_application_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TootleApplicationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tootle_application_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TootleApplication), 0, (GInstanceInitFunc) tootle_application_instance_init, NULL };
	GType tootle_application_type_id;
	tootle_application_type_id = g_type_register_static (gtk_application_get_type (), "TootleApplication", &g_define_type_info, 0);
	return tootle_application_type_id;
}

GType
tootle_application_get_type (void)
{
	static volatile gsize tootle_application_type_id__volatile = 0;
	if (g_once_init_enter (&tootle_application_type_id__volatile)) {
		GType tootle_application_type_id;
		tootle_application_type_id = tootle_application_get_type_once ();
		g_once_init_leave (&tootle_application_type_id__volatile, tootle_application_type_id);
	}
	return tootle_application_type_id__volatile;
}

static void
_vala_tootle_application_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	TootleApplication * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TOOTLE_TYPE_APPLICATION, TootleApplication);
	switch (property_id) {
		case TOOTLE_APPLICATION_APP_SETTINGS_PROPERTY:
		g_value_set_object (value, tootle_application_get_app_settings (self));
		break;
		case TOOTLE_APPLICATION_APP_ACCOUNTS_PROPERTY:
		g_value_set_object (value, tootle_application_get_app_accounts (self));
		break;
		case TOOTLE_APPLICATION_APP_NETWORK_PROPERTY:
		g_value_set_object (value, tootle_application_get_app_network (self));
		break;
		case TOOTLE_APPLICATION_APP_CACHE_PROPERTY:
		g_value_set_object (value, tootle_application_get_app_cache (self));
		break;
		case TOOTLE_APPLICATION_APP_STREAMS_PROPERTY:
		g_value_set_object (value, tootle_application_get_app_streams (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_array_destroy (gpointer array,
                     gint array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gint 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,
                  gint array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

