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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
 * -*- coding: utf-8 -*-
 *
 * Copyright (C) 2011 ~ 2017 Deepin, Inc.
 *               2011 ~ 2017 Wang Yong
 *
 * Author:     Wang Yong <wangyong@deepin.com>
 * Maintainer: Wang Yong <wangyong@deepin.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib-object.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gee.h>
#include <locale.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>

#define GETTEXT_PACKAGE "deepin-terminal-gtk"
#define CONSTANT_VERSION "5.0.4.4"
#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 TYPE_APPLICATION (application_get_type ())
#define APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APPLICATION, Application))
#define APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APPLICATION, ApplicationClass))
#define IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APPLICATION))
#define IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APPLICATION))
#define APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APPLICATION, ApplicationClass))

typedef struct _Application Application;
typedef struct _ApplicationClass ApplicationClass;
typedef struct _ApplicationPrivate ApplicationPrivate;

#define WIDGETS_TYPE_CONFIG_WINDOW (widgets_config_window_get_type ())
#define WIDGETS_CONFIG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow))
#define WIDGETS_CONFIG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindowClass))
#define WIDGETS_IS_CONFIG_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CONFIG_WINDOW))
#define WIDGETS_IS_CONFIG_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CONFIG_WINDOW))
#define WIDGETS_CONFIG_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindowClass))

typedef struct _WidgetsConfigWindow WidgetsConfigWindow;
typedef struct _WidgetsConfigWindowClass WidgetsConfigWindowClass;

#define WIDGETS_TYPE_QUAKE_WINDOW (widgets_quake_window_get_type ())
#define WIDGETS_QUAKE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_QUAKE_WINDOW, WidgetsQuakeWindow))
#define WIDGETS_QUAKE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_QUAKE_WINDOW, WidgetsQuakeWindowClass))
#define WIDGETS_IS_QUAKE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_QUAKE_WINDOW))
#define WIDGETS_IS_QUAKE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_QUAKE_WINDOW))
#define WIDGETS_QUAKE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_QUAKE_WINDOW, WidgetsQuakeWindowClass))

typedef struct _WidgetsQuakeWindow WidgetsQuakeWindow;
typedef struct _WidgetsQuakeWindowClass WidgetsQuakeWindowClass;

#define WIDGETS_TYPE_WINDOW (widgets_window_get_type ())
#define WIDGETS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WINDOW, WidgetsWindow))
#define WIDGETS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WINDOW, WidgetsWindowClass))
#define WIDGETS_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WINDOW))
#define WIDGETS_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WINDOW))
#define WIDGETS_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WINDOW, WidgetsWindowClass))

typedef struct _WidgetsWindow WidgetsWindow;
typedef struct _WidgetsWindowClass WidgetsWindowClass;

#define WIDGETS_TYPE_WORKSPACE_MANAGER (widgets_workspace_manager_get_type ())
#define WIDGETS_WORKSPACE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WORKSPACE_MANAGER, WidgetsWorkspaceManager))
#define WIDGETS_WORKSPACE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WORKSPACE_MANAGER, WidgetsWorkspaceManagerClass))
#define WIDGETS_IS_WORKSPACE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WORKSPACE_MANAGER))
#define WIDGETS_IS_WORKSPACE_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WORKSPACE_MANAGER))
#define WIDGETS_WORKSPACE_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WORKSPACE_MANAGER, WidgetsWorkspaceManagerClass))

typedef struct _WidgetsWorkspaceManager WidgetsWorkspaceManager;
typedef struct _WidgetsWorkspaceManagerClass WidgetsWorkspaceManagerClass;

#define TYPE_TERMINAL_APP (terminal_app_get_type ())
#define TERMINAL_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TERMINAL_APP, TerminalApp))
#define TERMINAL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TERMINAL_APP, TerminalAppClass))
#define IS_TERMINAL_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TERMINAL_APP))
#define IS_TERMINAL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TERMINAL_APP))
#define TERMINAL_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TERMINAL_APP, TerminalAppClass))

typedef struct _TerminalApp TerminalApp;
typedef struct _TerminalAppClass TerminalAppClass;
typedef struct _TerminalAppPrivate TerminalAppPrivate;
enum  {
	TERMINAL_APP_0_PROPERTY,
	TERMINAL_APP_NUM_PROPERTIES
};
static GParamSpec* terminal_app_properties[TERMINAL_APP_NUM_PROPERTIES];
enum  {
	TERMINAL_APP_QUIT_SIGNAL,
	TERMINAL_APP_NUM_SIGNALS
};
static guint terminal_app_signals[TERMINAL_APP_NUM_SIGNALS] = {0};

#define TYPE_QUAKE_TERMINAL_APP (quake_terminal_app_get_type ())
#define QUAKE_TERMINAL_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUAKE_TERMINAL_APP, QuakeTerminalApp))
#define QUAKE_TERMINAL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_QUAKE_TERMINAL_APP, QuakeTerminalAppClass))
#define IS_QUAKE_TERMINAL_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUAKE_TERMINAL_APP))
#define IS_QUAKE_TERMINAL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_QUAKE_TERMINAL_APP))
#define QUAKE_TERMINAL_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_QUAKE_TERMINAL_APP, QuakeTerminalAppClass))

typedef struct _QuakeTerminalApp QuakeTerminalApp;
typedef struct _QuakeTerminalAppClass QuakeTerminalAppClass;
typedef struct _QuakeTerminalAppPrivate QuakeTerminalAppPrivate;
enum  {
	QUAKE_TERMINAL_APP_0_PROPERTY,
	QUAKE_TERMINAL_APP_NUM_PROPERTIES
};
static GParamSpec* quake_terminal_app_properties[QUAKE_TERMINAL_APP_NUM_PROPERTIES];

#define TYPE_QUAKE_DAEMON (quake_daemon_get_type ())
#define QUAKE_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_QUAKE_DAEMON, QuakeDaemon))
#define IS_QUAKE_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_QUAKE_DAEMON))
#define QUAKE_DAEMON_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_QUAKE_DAEMON, QuakeDaemonIface))

typedef struct _QuakeDaemon QuakeDaemon;
typedef struct _QuakeDaemonIface QuakeDaemonIface;

#define TYPE_QUAKE_DAEMON_PROXY (quake_daemon_proxy_get_type ())
typedef GDBusProxy QuakeDaemonProxy;
typedef GDBusProxyClass QuakeDaemonProxyClass;
enum  {
	APPLICATION_0_PROPERTY,
	APPLICATION_NUM_PROPERTIES
};
static GParamSpec* application_properties[APPLICATION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
typedef struct _Block1Data Block1Data;
typedef struct _Block2Data Block2Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define WIDGETS_TYPE_TABBAR (widgets_tabbar_get_type ())
#define WIDGETS_TABBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_TABBAR, WidgetsTabbar))
#define WIDGETS_TABBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_TABBAR, WidgetsTabbarClass))
#define WIDGETS_IS_TABBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_TABBAR))
#define WIDGETS_IS_TABBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_TABBAR))
#define WIDGETS_TABBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_TABBAR, WidgetsTabbarClass))

typedef struct _WidgetsTabbar WidgetsTabbar;
typedef struct _WidgetsTabbarClass WidgetsTabbarClass;
typedef struct _WidgetsConfigWindowPrivate WidgetsConfigWindowPrivate;

#define CONFIG_TYPE_CONFIG (config_config_get_type ())
#define CONFIG_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_CONFIG, ConfigConfig))
#define CONFIG_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_CONFIG, ConfigConfigClass))
#define CONFIG_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_CONFIG))
#define CONFIG_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_CONFIG))
#define CONFIG_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_CONFIG, ConfigConfigClass))

typedef struct _ConfigConfig ConfigConfig;
typedef struct _ConfigConfigClass ConfigConfigClass;

struct _Application {
	GObject parent_instance;
	ApplicationPrivate * priv;
	WidgetsQuakeWindow* quake_window;
	WidgetsWindow* window;
	WidgetsWorkspaceManager* workspace_manager;
};

struct _ApplicationClass {
	GObjectClass parent_class;
};

struct _TerminalApp {
	Application parent_instance;
	TerminalAppPrivate * priv;
};

struct _TerminalAppClass {
	ApplicationClass parent_class;
};

struct _QuakeTerminalApp {
	Application parent_instance;
	QuakeTerminalAppPrivate * priv;
};

struct _QuakeTerminalAppClass {
	ApplicationClass parent_class;
};

struct _QuakeDaemonIface {
	GTypeInterface parent_iface;
	void (*show_or_hide) (QuakeDaemon* self, GError** error);
};

struct _ApplicationPrivate {
	gboolean inited;
};

struct _Block1Data {
	int _ref_count_;
	QuakeTerminalApp* app;
};

struct _Block2Data {
	int _ref_count_;
	TerminalApp* app;
};

struct _WidgetsConfigWindow {
	GtkWindow parent_instance;
	WidgetsConfigWindowPrivate * priv;
	ConfigConfig* config;
	GdkRGBA title_line_dark_color;
	GdkRGBA title_line_light_color;
	GdkScreen* screen_monitor;
	GtkBox* box;
	GtkBox* top_box;
	GtkBox* window_frame_box;
	GtkBox* window_widget_box;
	WidgetsWorkspaceManager* workspace_manager;
	gboolean quake_mode;
	gboolean show_quake_menu;
	gboolean* config_theme_is_light;
	gint active_tab_underline_width;
	gint active_tab_underline_x;
	gint cache_height;
	gint cache_width;
	gint reset_timeout_delay;
	gint resize_cache_x;
	gint resize_cache_y;
	gint resize_cache_width;
	gint resize_cache_height;
	gint resize_timeout_delay;
	guint* reset_timeout_source_id;
	guint* resize_timeout_source_id;
};

struct _WidgetsConfigWindowClass {
	GtkWindowClass parent_class;
	void (*toggle_fullscreen) (WidgetsConfigWindow* self);
	void (*window_save_before_quit) (WidgetsConfigWindow* self);
	GdkCursorType* (*get_frame_cursor_type) (WidgetsConfigWindow* self, gdouble x, gdouble y);
	void (*update_frame) (WidgetsConfigWindow* self);
	GdkCursorType* (*get_cursor_type) (WidgetsConfigWindow* self, gdouble x, gdouble y);
};

static gpointer terminal_app_parent_class = NULL;
static gpointer quake_terminal_app_parent_class = NULL;
static gint Application_private_offset;
static gpointer application_parent_class = NULL;
static gboolean application_quake_mode;
static gboolean application_quake_mode = FALSE;
static gchar* application_window_mode;
static gchar* application_window_mode = NULL;
static gchar* application_work_directory;
static gchar* application_work_directory = NULL;
static gchar* application_load_theme;
static gchar* application_load_theme = NULL;
static gchar* application_open_tab;
static gchar* application_open_tab = NULL;
VALA_EXTERN gchar** application_pass_options;
gchar** application_pass_options = NULL;
VALA_EXTERN GeeArrayList* application_commands;
GeeArrayList* application_commands = NULL;
VALA_EXTERN gint64 application_start_time;
gint64 application_start_time = 0LL;
static gboolean application_version;
static gboolean application_version = FALSE;

VALA_EXTERN GType application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Application, g_object_unref)
VALA_EXTERN GType widgets_config_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfigWindow, g_object_unref)
VALA_EXTERN GType widgets_quake_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsQuakeWindow, g_object_unref)
VALA_EXTERN GType widgets_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWindow, g_object_unref)
VALA_EXTERN GType widgets_workspace_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWorkspaceManager, g_object_unref)
VALA_EXTERN GType terminal_app_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TerminalApp, g_object_unref)
VALA_EXTERN guint terminal_app_register_object (void* object,
                                    GDBusConnection* connection,
                                    const gchar* path,
                                    GError** error);
VALA_EXTERN void terminal_app_on_bus_acquired (GDBusConnection* conn,
                                   TerminalApp* app);
VALA_EXTERN void terminal_app_exit (TerminalApp* self);
VALA_EXTERN void widgets_config_window_quit (WidgetsConfigWindow* self);
VALA_EXTERN TerminalApp* terminal_app_new (void);
VALA_EXTERN TerminalApp* terminal_app_construct (GType object_type);
VALA_EXTERN Application* application_new (void);
VALA_EXTERN Application* application_construct (GType object_type);
static GType terminal_app_get_type_once (void);
static void _dbus_terminal_app_exit (TerminalApp* self,
                              GVariant* _parameters_,
                              GDBusMethodInvocation* invocation);
static void terminal_app_dbus_interface_method_call (GDBusConnection* connection,
                                              const gchar* sender,
                                              const gchar* object_path,
                                              const gchar* interface_name,
                                              const gchar* method_name,
                                              GVariant* parameters,
                                              GDBusMethodInvocation* invocation,
                                              gpointer user_data);
static GVariant* terminal_app_dbus_interface_get_property (GDBusConnection* connection,
                                                    const gchar* sender,
                                                    const gchar* object_path,
                                                    const gchar* interface_name,
                                                    const gchar* property_name,
                                                    GError** error,
                                                    gpointer user_data);
static gboolean terminal_app_dbus_interface_set_property (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* property_name,
                                                   GVariant* value,
                                                   GError** error,
                                                   gpointer user_data);
static void _dbus_terminal_app_quit (GObject* _sender,
                              gpointer* _data);
static void _terminal_app_unregister_object (gpointer user_data);
VALA_EXTERN GType quake_terminal_app_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (QuakeTerminalApp, g_object_unref)
VALA_EXTERN guint quake_terminal_app_register_object (void* object,
                                          GDBusConnection* connection,
                                          const gchar* path,
                                          GError** error);
VALA_EXTERN void quake_terminal_app_on_bus_acquired (GDBusConnection* conn,
                                         QuakeTerminalApp* app);
VALA_EXTERN void quake_terminal_app_show_or_hide (QuakeTerminalApp* self);
VALA_EXTERN void widgets_quake_window_toggle_quake_window (WidgetsQuakeWindow* self);
VALA_EXTERN QuakeTerminalApp* quake_terminal_app_new (void);
VALA_EXTERN QuakeTerminalApp* quake_terminal_app_construct (GType object_type);
static GType quake_terminal_app_get_type_once (void);
static void _dbus_quake_terminal_app_show_or_hide (QuakeTerminalApp* self,
                                            GVariant* _parameters_,
                                            GDBusMethodInvocation* invocation);
static void quake_terminal_app_dbus_interface_method_call (GDBusConnection* connection,
                                                    const gchar* sender,
                                                    const gchar* object_path,
                                                    const gchar* interface_name,
                                                    const gchar* method_name,
                                                    GVariant* parameters,
                                                    GDBusMethodInvocation* invocation,
                                                    gpointer user_data);
static GVariant* quake_terminal_app_dbus_interface_get_property (GDBusConnection* connection,
                                                          const gchar* sender,
                                                          const gchar* object_path,
                                                          const gchar* interface_name,
                                                          const gchar* property_name,
                                                          GError** error,
                                                          gpointer user_data);
static gboolean quake_terminal_app_dbus_interface_set_property (GDBusConnection* connection,
                                                         const gchar* sender,
                                                         const gchar* object_path,
                                                         const gchar* interface_name,
                                                         const gchar* property_name,
                                                         GVariant* value,
                                                         GError** error,
                                                         gpointer user_data);
static void _quake_terminal_app_unregister_object (gpointer user_data);
VALA_EXTERN GType quake_daemon_proxy_get_type (void) G_GNUC_CONST ;
VALA_EXTERN guint quake_daemon_register_object (void* object,
                                    GDBusConnection* connection,
                                    const gchar* path,
                                    GError** error);
VALA_EXTERN GType quake_daemon_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (QuakeDaemon, g_object_unref)
VALA_EXTERN void quake_daemon_show_or_hide (QuakeDaemon* self,
                                GError** error);
static GType quake_daemon_get_type_once (void);
static void quake_daemon_proxy_g_signal (GDBusProxy* proxy,
                                  const gchar* sender_name,
                                  const gchar* signal_name,
                                  GVariant* parameters);
static void quake_daemon_proxy_show_or_hide (QuakeDaemon* self,
                                      GError** error);
static void quake_daemon_proxy_quake_daemon_interface_init (QuakeDaemonIface* iface);
static void _dbus_quake_daemon_show_or_hide (QuakeDaemon* self,
                                      GVariant* _parameters_,
                                      GDBusMethodInvocation* invocation);
static void quake_daemon_dbus_interface_method_call (GDBusConnection* connection,
                                              const gchar* sender,
                                              const gchar* object_path,
                                              const gchar* interface_name,
                                              const gchar* method_name,
                                              GVariant* parameters,
                                              GDBusMethodInvocation* invocation,
                                              gpointer user_data);
static GVariant* quake_daemon_dbus_interface_get_property (GDBusConnection* connection,
                                                    const gchar* sender,
                                                    const gchar* object_path,
                                                    const gchar* interface_name,
                                                    const gchar* property_name,
                                                    GError** error,
                                                    gpointer user_data);
static gboolean quake_daemon_dbus_interface_set_property (GDBusConnection* connection,
                                                   const gchar* sender,
                                                   const gchar* object_path,
                                                   const gchar* interface_name,
                                                   const gchar* property_name,
                                                   GVariant* value,
                                                   GError** error,
                                                   gpointer user_data);
static void _quake_daemon_unregister_object (gpointer user_data);
static void application_main (gchar** args,
                       gint args_length1);
static Block1Data* block1_data_ref (Block1Data* _data1_);
static void block1_data_unref (void * _userdata_);
static void ____lambda277_ (Block1Data* _data1_,
                     GDBusConnection* con);
static void _____lambda277__gbus_acquired_callback (GDBusConnection* connection,
                                             const gchar* name,
                                             gpointer self);
static void ____lambda278_ (Block1Data* _data1_);
VALA_EXTERN void application_run (Application* self,
                      gboolean has_start);
static void _____lambda278__gbus_name_acquired_callback (GDBusConnection* connection,
                                                  const gchar* name,
                                                  gpointer self);
static void ____lambda279_ (Block1Data* _data1_);
static void _____lambda279__gbus_name_lost_callback (GDBusConnection* connection,
                                              const gchar* name,
                                              gpointer self);
static Block2Data* block2_data_ref (Block2Data* _data2_);
static void block2_data_unref (void * _userdata_);
static void ____lambda280_ (Block2Data* _data2_,
                     GDBusConnection* con);
static void _____lambda280__gbus_acquired_callback (GDBusConnection* connection,
                                             const gchar* name,
                                             gpointer self);
static void ____lambda281_ (Block2Data* _data2_);
static void _____lambda281__gbus_name_acquired_callback (GDBusConnection* connection,
                                                  const gchar* name,
                                                  gpointer self);
static void ____lambda282_ (Block2Data* _data2_);
static void _____lambda282__gbus_name_lost_callback (GDBusConnection* connection,
                                              const gchar* name,
                                              gpointer self);
VALA_EXTERN void utils_load_css_theme (const gchar* css_path);
VALA_EXTERN gchar* utils_get_root_path (const gchar* file_path);
VALA_EXTERN void utils_set_tiling_wm (void);
VALA_EXTERN GType widgets_tabbar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsTabbar, g_object_unref)
VALA_EXTERN WidgetsTabbar* widgets_tabbar_new (void);
VALA_EXTERN WidgetsTabbar* widgets_tabbar_construct (GType object_type);
VALA_EXTERN WidgetsWorkspaceManager* widgets_workspace_manager_new (WidgetsTabbar* t,
                                                        const gchar* work_directory);
VALA_EXTERN WidgetsWorkspaceManager* widgets_workspace_manager_construct (GType object_type,
                                                              WidgetsTabbar* t,
                                                              const gchar* work_directory);
VALA_EXTERN void widgets_workspace_manager_new_workspace (WidgetsWorkspaceManager* self,
                                              const gchar* work_directory,
                                              gboolean remote_serve_action);
VALA_EXTERN WidgetsQuakeWindow* widgets_quake_window_new (void);
VALA_EXTERN WidgetsQuakeWindow* widgets_quake_window_construct (GType object_type);
VALA_EXTERN void widgets_quake_window_show_window (WidgetsQuakeWindow* self,
                                       WidgetsWorkspaceManager* workspace_manager,
                                       WidgetsTabbar* tabbar);
VALA_EXTERN void utils_write_log (const gchar* log);
VALA_EXTERN void widgets_tabbar_init (WidgetsTabbar* self,
                          WidgetsWorkspaceManager* workspace_manager,
                          WidgetsConfigWindow* window);
VALA_EXTERN WidgetsWindow* widgets_window_new (const gchar* window_mode);
VALA_EXTERN WidgetsWindow* widgets_window_construct (GType object_type,
                                         const gchar* window_mode);
VALA_EXTERN GType config_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigConfig, g_object_unref)
VALA_EXTERN void config_config_load_temp_theme (ConfigConfig* self,
                                    const gchar* theme_name);
VALA_EXTERN void widgets_window_show_window (WidgetsWindow* self,
                                 TerminalApp* app,
                                 WidgetsWorkspaceManager* workspace_manager,
                                 WidgetsTabbar* tabbar,
                                 gboolean has_start);
static void application_finalize (GObject * obj);
static GType application_get_type_once (void);

static const GDBusArgInfo * const _terminal_app_dbus_arg_info_exit_in[] = {NULL};
static const GDBusArgInfo * const _terminal_app_dbus_arg_info_exit_out[] = {NULL};
static const GDBusMethodInfo _terminal_app_dbus_method_info_exit = {-1, "Exit", (GDBusArgInfo **) (&_terminal_app_dbus_arg_info_exit_in), (GDBusArgInfo **) (&_terminal_app_dbus_arg_info_exit_out), NULL};
static const GDBusMethodInfo * const _terminal_app_dbus_method_info[] = {&_terminal_app_dbus_method_info_exit, NULL};
static const GDBusArgInfo * const _terminal_app_dbus_arg_info_quit[] = {NULL};
static const GDBusSignalInfo _terminal_app_dbus_signal_info_quit = {-1, "Quit", (GDBusArgInfo **) (&_terminal_app_dbus_arg_info_quit), NULL};
static const GDBusSignalInfo * const _terminal_app_dbus_signal_info[] = {&_terminal_app_dbus_signal_info_quit, NULL};
static const GDBusPropertyInfo * const _terminal_app_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _terminal_app_dbus_interface_info = {-1, "com.deepin.terminal", (GDBusMethodInfo **) (&_terminal_app_dbus_method_info), (GDBusSignalInfo **) (&_terminal_app_dbus_signal_info), (GDBusPropertyInfo **) (&_terminal_app_dbus_property_info), NULL};
static const GDBusInterfaceVTable _terminal_app_dbus_interface_vtable = {terminal_app_dbus_interface_method_call, terminal_app_dbus_interface_get_property, terminal_app_dbus_interface_set_property};
static const GDBusArgInfo * const _quake_terminal_app_dbus_arg_info_show_or_hide_in[] = {NULL};
static const GDBusArgInfo * const _quake_terminal_app_dbus_arg_info_show_or_hide_out[] = {NULL};
static const GDBusMethodInfo _quake_terminal_app_dbus_method_info_show_or_hide = {-1, "ShowOrHide", (GDBusArgInfo **) (&_quake_terminal_app_dbus_arg_info_show_or_hide_in), (GDBusArgInfo **) (&_quake_terminal_app_dbus_arg_info_show_or_hide_out), NULL};
static const GDBusMethodInfo * const _quake_terminal_app_dbus_method_info[] = {&_quake_terminal_app_dbus_method_info_show_or_hide, NULL};
static const GDBusSignalInfo * const _quake_terminal_app_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _quake_terminal_app_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _quake_terminal_app_dbus_interface_info = {-1, "com.deepin.quake_terminal", (GDBusMethodInfo **) (&_quake_terminal_app_dbus_method_info), (GDBusSignalInfo **) (&_quake_terminal_app_dbus_signal_info), (GDBusPropertyInfo **) (&_quake_terminal_app_dbus_property_info), NULL};
static const GDBusInterfaceVTable _quake_terminal_app_dbus_interface_vtable = {quake_terminal_app_dbus_interface_method_call, quake_terminal_app_dbus_interface_get_property, quake_terminal_app_dbus_interface_set_property};
static const GDBusArgInfo * const _quake_daemon_dbus_arg_info_show_or_hide_in[] = {NULL};
static const GDBusArgInfo * const _quake_daemon_dbus_arg_info_show_or_hide_out[] = {NULL};
static const GDBusMethodInfo _quake_daemon_dbus_method_info_show_or_hide = {-1, "ShowOrHide", (GDBusArgInfo **) (&_quake_daemon_dbus_arg_info_show_or_hide_in), (GDBusArgInfo **) (&_quake_daemon_dbus_arg_info_show_or_hide_out), NULL};
static const GDBusMethodInfo * const _quake_daemon_dbus_method_info[] = {&_quake_daemon_dbus_method_info_show_or_hide, NULL};
static const GDBusSignalInfo * const _quake_daemon_dbus_signal_info[] = {NULL};
static const GDBusPropertyInfo * const _quake_daemon_dbus_property_info[] = {NULL};
static const GDBusInterfaceInfo _quake_daemon_dbus_interface_info = {-1, "com.deepin.quake_terminal", (GDBusMethodInfo **) (&_quake_daemon_dbus_method_info), (GDBusSignalInfo **) (&_quake_daemon_dbus_signal_info), (GDBusPropertyInfo **) (&_quake_daemon_dbus_property_info), NULL};
static const GDBusInterfaceVTable _quake_daemon_dbus_interface_vtable = {quake_daemon_dbus_interface_method_call, quake_daemon_dbus_interface_get_property, quake_daemon_dbus_interface_set_property};

void
terminal_app_on_bus_acquired (GDBusConnection* conn,
                              TerminalApp* app)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (conn != NULL);
	g_return_if_fail (app != NULL);
	{
		terminal_app_register_object (app, conn, "/com/deepin/terminal", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		FILE* _tmp0_;
		g_clear_error (&_inner_error0_);
		_tmp0_ = stderr;
		fprintf (_tmp0_, "Could not register service\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

void
terminal_app_exit (TerminalApp* self)
{
	WidgetsWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	g_signal_emit (self, terminal_app_signals[TERMINAL_APP_QUIT_SIGNAL], 0);
	_tmp0_ = ((Application*) self)->window;
	widgets_config_window_quit ((WidgetsConfigWindow*) _tmp0_);
}

TerminalApp*
terminal_app_construct (GType object_type)
{
	TerminalApp * self = NULL;
	self = (TerminalApp*) application_construct (object_type);
	return self;
}

TerminalApp*
terminal_app_new (void)
{
	return terminal_app_construct (TYPE_TERMINAL_APP);
}

static void
terminal_app_class_init (TerminalAppClass * klass,
                         gpointer klass_data)
{
	terminal_app_parent_class = g_type_class_peek_parent (klass);
	terminal_app_signals[TERMINAL_APP_QUIT_SIGNAL] = g_signal_new ("quit", TYPE_TERMINAL_APP, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
}

static void
terminal_app_instance_init (TerminalApp * self,
                            gpointer klass)
{
}

static GType
terminal_app_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TerminalAppClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) terminal_app_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TerminalApp), 0, (GInstanceInitFunc) terminal_app_instance_init, NULL };
	GType terminal_app_type_id;
	terminal_app_type_id = g_type_register_static (TYPE_APPLICATION, "TerminalApp", &g_define_type_info, 0);
	g_type_set_qdata (terminal_app_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) terminal_app_register_object);
	return terminal_app_type_id;
}

GType
terminal_app_get_type (void)
{
	static volatile gsize terminal_app_type_id__once = 0;
	if (g_once_init_enter (&terminal_app_type_id__once)) {
		GType terminal_app_type_id;
		terminal_app_type_id = terminal_app_get_type_once ();
		g_once_init_leave (&terminal_app_type_id__once, terminal_app_type_id);
	}
	return terminal_app_type_id__once;
}

static void
_dbus_terminal_app_exit (TerminalApp* self,
                         GVariant* _parameters_,
                         GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	terminal_app_exit (self);
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
terminal_app_dbus_interface_method_call (GDBusConnection* connection,
                                         const gchar* sender,
                                         const gchar* object_path,
                                         const gchar* interface_name,
                                         const gchar* method_name,
                                         GVariant* parameters,
                                         GDBusMethodInvocation* invocation,
                                         gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "Exit") == 0) {
		_dbus_terminal_app_exit (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
terminal_app_dbus_interface_get_property (GDBusConnection* connection,
                                          const gchar* sender,
                                          const gchar* object_path,
                                          const gchar* interface_name,
                                          const gchar* property_name,
                                          GError** error,
                                          gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}

static gboolean
terminal_app_dbus_interface_set_property (GDBusConnection* connection,
                                          const gchar* sender,
                                          const gchar* object_path,
                                          const gchar* interface_name,
                                          const gchar* property_name,
                                          GVariant* value,
                                          GError** error,
                                          gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

static void
_dbus_terminal_app_quit (GObject* _sender,
                         gpointer* _data)
{
	GDBusConnection * _connection;
	const gchar * _path;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	_connection = _data[1];
	_path = _data[2];
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_connection_emit_signal (_connection, NULL, _path, "com.deepin.terminal", "Quit", _arguments, NULL);
}

guint
terminal_app_register_object (gpointer object,
                              GDBusConnection* connection,
                              const gchar* path,
                              GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_terminal_app_dbus_interface_info), &_terminal_app_dbus_interface_vtable, data, _terminal_app_unregister_object, error);
	if (!result) {
		return 0;
	}
	g_signal_connect (object, "quit", (GCallback) _dbus_terminal_app_quit, data);
	return result;
}

static void
_terminal_app_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_signal_handlers_disconnect_by_func (data[0], _dbus_terminal_app_quit, data);
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
quake_terminal_app_on_bus_acquired (GDBusConnection* conn,
                                    QuakeTerminalApp* app)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (conn != NULL);
	g_return_if_fail (app != NULL);
	{
		quake_terminal_app_register_object (app, conn, "/com/deepin/quake_terminal", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		FILE* _tmp0_;
		g_clear_error (&_inner_error0_);
		_tmp0_ = stderr;
		fprintf (_tmp0_, "Could not register service\n");
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

void
quake_terminal_app_show_or_hide (QuakeTerminalApp* self)
{
	WidgetsQuakeWindow* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = ((Application*) self)->quake_window;
	widgets_quake_window_toggle_quake_window (_tmp0_);
}

QuakeTerminalApp*
quake_terminal_app_construct (GType object_type)
{
	QuakeTerminalApp * self = NULL;
	self = (QuakeTerminalApp*) application_construct (object_type);
	return self;
}

QuakeTerminalApp*
quake_terminal_app_new (void)
{
	return quake_terminal_app_construct (TYPE_QUAKE_TERMINAL_APP);
}

static void
quake_terminal_app_class_init (QuakeTerminalAppClass * klass,
                               gpointer klass_data)
{
	quake_terminal_app_parent_class = g_type_class_peek_parent (klass);
}

static void
quake_terminal_app_instance_init (QuakeTerminalApp * self,
                                  gpointer klass)
{
}

static GType
quake_terminal_app_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (QuakeTerminalAppClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) quake_terminal_app_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (QuakeTerminalApp), 0, (GInstanceInitFunc) quake_terminal_app_instance_init, NULL };
	GType quake_terminal_app_type_id;
	quake_terminal_app_type_id = g_type_register_static (TYPE_APPLICATION, "QuakeTerminalApp", &g_define_type_info, 0);
	g_type_set_qdata (quake_terminal_app_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) quake_terminal_app_register_object);
	return quake_terminal_app_type_id;
}

GType
quake_terminal_app_get_type (void)
{
	static volatile gsize quake_terminal_app_type_id__once = 0;
	if (g_once_init_enter (&quake_terminal_app_type_id__once)) {
		GType quake_terminal_app_type_id;
		quake_terminal_app_type_id = quake_terminal_app_get_type_once ();
		g_once_init_leave (&quake_terminal_app_type_id__once, quake_terminal_app_type_id);
	}
	return quake_terminal_app_type_id__once;
}

static void
_dbus_quake_terminal_app_show_or_hide (QuakeTerminalApp* self,
                                       GVariant* _parameters_,
                                       GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	quake_terminal_app_show_or_hide (self);
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
quake_terminal_app_dbus_interface_method_call (GDBusConnection* connection,
                                               const gchar* sender,
                                               const gchar* object_path,
                                               const gchar* interface_name,
                                               const gchar* method_name,
                                               GVariant* parameters,
                                               GDBusMethodInvocation* invocation,
                                               gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "ShowOrHide") == 0) {
		_dbus_quake_terminal_app_show_or_hide (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
quake_terminal_app_dbus_interface_get_property (GDBusConnection* connection,
                                                const gchar* sender,
                                                const gchar* object_path,
                                                const gchar* interface_name,
                                                const gchar* property_name,
                                                GError** error,
                                                gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}

static gboolean
quake_terminal_app_dbus_interface_set_property (GDBusConnection* connection,
                                                const gchar* sender,
                                                const gchar* object_path,
                                                const gchar* interface_name,
                                                const gchar* property_name,
                                                GVariant* value,
                                                GError** error,
                                                gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

guint
quake_terminal_app_register_object (gpointer object,
                                    GDBusConnection* connection,
                                    const gchar* path,
                                    GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_quake_terminal_app_dbus_interface_info), &_quake_terminal_app_dbus_interface_vtable, data, _quake_terminal_app_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_quake_terminal_app_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

void
quake_daemon_show_or_hide (QuakeDaemon* self,
                           GError** error)
{
	QuakeDaemonIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = QUAKE_DAEMON_GET_INTERFACE (self);
	if (_iface_->show_or_hide) {
		_iface_->show_or_hide (self, error);
	}
}

static void
quake_daemon_default_init (QuakeDaemonIface * iface,
                           gpointer iface_data)
{
}

static GType
quake_daemon_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (QuakeDaemonIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) quake_daemon_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType quake_daemon_type_id;
	quake_daemon_type_id = g_type_register_static (G_TYPE_INTERFACE, "QuakeDaemon", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (quake_daemon_type_id, G_TYPE_OBJECT);
	g_type_set_qdata (quake_daemon_type_id, g_quark_from_static_string ("vala-dbus-proxy-type"), (void*) quake_daemon_proxy_get_type);
	g_type_set_qdata (quake_daemon_type_id, g_quark_from_static_string ("vala-dbus-interface-name"), "com.deepin.quake_terminal");
	g_type_set_qdata (quake_daemon_type_id, g_quark_from_static_string ("vala-dbus-interface-info"), (void*) (&_quake_daemon_dbus_interface_info));
	g_type_set_qdata (quake_daemon_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) quake_daemon_register_object);
	return quake_daemon_type_id;
}

GType
quake_daemon_get_type (void)
{
	static volatile gsize quake_daemon_type_id__once = 0;
	if (g_once_init_enter (&quake_daemon_type_id__once)) {
		GType quake_daemon_type_id;
		quake_daemon_type_id = quake_daemon_get_type_once ();
		g_once_init_leave (&quake_daemon_type_id__once, quake_daemon_type_id);
	}
	return quake_daemon_type_id__once;
}

G_DEFINE_TYPE_EXTENDED (QuakeDaemonProxy, quake_daemon_proxy, G_TYPE_DBUS_PROXY, 0, G_IMPLEMENT_INTERFACE (TYPE_QUAKE_DAEMON, quake_daemon_proxy_quake_daemon_interface_init) )
static void
quake_daemon_proxy_class_init (QuakeDaemonProxyClass* klass)
{
	G_DBUS_PROXY_CLASS (klass)->g_signal = quake_daemon_proxy_g_signal;
}

static void
quake_daemon_proxy_g_signal (GDBusProxy* proxy,
                             const gchar* sender_name,
                             const gchar* signal_name,
                             GVariant* parameters)
{
}

static void
quake_daemon_proxy_init (QuakeDaemonProxy* self)
{
	g_dbus_proxy_set_interface_info (G_DBUS_PROXY (self), (GDBusInterfaceInfo *) (&_quake_daemon_dbus_interface_info));
}

static void
quake_daemon_proxy_show_or_hide (QuakeDaemon* self,
                                 GError** error)
{
	GDBusMessage *_message;
	GVariant *_arguments;
	GVariantBuilder _arguments_builder;
	GDBusMessage *_reply_message;
	_message = g_dbus_message_new_method_call (g_dbus_proxy_get_name ((GDBusProxy *) self), g_dbus_proxy_get_object_path ((GDBusProxy *) self), "com.deepin.quake_terminal", "ShowOrHide");
	g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE);
	_arguments = g_variant_builder_end (&_arguments_builder);
	g_dbus_message_set_body (_message, _arguments);
	_reply_message = g_dbus_connection_send_message_with_reply_sync (g_dbus_proxy_get_connection ((GDBusProxy *) self), _message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, g_dbus_proxy_get_default_timeout ((GDBusProxy *) self), NULL, NULL, error);
	g_object_unref (_message);
	if (!_reply_message) {
		return;
	}
	if (g_dbus_message_to_gerror (_reply_message, error)) {
		g_object_unref (_reply_message);
		return;
	}
	g_object_unref (_reply_message);
}

static void
quake_daemon_proxy_quake_daemon_interface_init (QuakeDaemonIface* iface)
{
	iface->show_or_hide = quake_daemon_proxy_show_or_hide;
}

static void
_dbus_quake_daemon_show_or_hide (QuakeDaemon* self,
                                 GVariant* _parameters_,
                                 GDBusMethodInvocation* invocation)
{
	GError* error = NULL;
	GVariantIter _arguments_iter;
	GDBusMessage* _reply_message = NULL;
	GVariant* _reply;
	GVariantBuilder _reply_builder;
	g_variant_iter_init (&_arguments_iter, _parameters_);
	quake_daemon_show_or_hide (self, &error);
	if (error) {
		g_dbus_method_invocation_take_error (invocation, error);
		return;
	}
	_reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation));
	g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE);
	_reply = g_variant_builder_end (&_reply_builder);
	g_dbus_message_set_body (_reply_message, _reply);
	g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
	g_object_unref (invocation);
	g_object_unref (_reply_message);
}

static void
quake_daemon_dbus_interface_method_call (GDBusConnection* connection,
                                         const gchar* sender,
                                         const gchar* object_path,
                                         const gchar* interface_name,
                                         const gchar* method_name,
                                         GVariant* parameters,
                                         GDBusMethodInvocation* invocation,
                                         gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	if (strcmp (method_name, "ShowOrHide") == 0) {
		_dbus_quake_daemon_show_or_hide (object, parameters, invocation);
	} else {
		g_object_unref (invocation);
	}
}

static GVariant*
quake_daemon_dbus_interface_get_property (GDBusConnection* connection,
                                          const gchar* sender,
                                          const gchar* object_path,
                                          const gchar* interface_name,
                                          const gchar* property_name,
                                          GError** error,
                                          gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return NULL;
}

static gboolean
quake_daemon_dbus_interface_set_property (GDBusConnection* connection,
                                          const gchar* sender,
                                          const gchar* object_path,
                                          const gchar* interface_name,
                                          const gchar* property_name,
                                          GVariant* value,
                                          GError** error,
                                          gpointer user_data)
{
	gpointer* data;
	gpointer object;
	data = user_data;
	object = data[0];
	return FALSE;
}

guint
quake_daemon_register_object (gpointer object,
                              GDBusConnection* connection,
                              const gchar* path,
                              GError** error)
{
	guint result;
	gpointer *data;
	data = g_new (gpointer, 3);
	data[0] = g_object_ref (object);
	data[1] = g_object_ref (connection);
	data[2] = g_strdup (path);
	result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_quake_daemon_dbus_interface_info), &_quake_daemon_dbus_interface_vtable, data, _quake_daemon_unregister_object, error);
	if (!result) {
		return 0;
	}
	return result;
}

static void
_quake_daemon_unregister_object (gpointer user_data)
{
	gpointer* data;
	data = user_data;
	g_object_unref (data[0]);
	g_object_unref (data[1]);
	g_free (data[2]);
	g_free (data);
}

static inline gpointer
application_get_instance_private (Application* self)
{
	return G_STRUCT_MEMBER_P (self, Application_private_offset);
}

static Block1Data*
block1_data_ref (Block1Data* _data1_)
{
	g_atomic_int_inc (&_data1_->_ref_count_);
	return _data1_;
}

static void
block1_data_unref (void * _userdata_)
{
	Block1Data* _data1_;
	_data1_ = (Block1Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
		_g_object_unref0 (_data1_->app);
		g_slice_free (Block1Data, _data1_);
	}
}

static void
____lambda277_ (Block1Data* _data1_,
                GDBusConnection* con)
{
	QuakeTerminalApp* _tmp0_;
	g_return_if_fail (con != NULL);
	_tmp0_ = _data1_->app;
	quake_terminal_app_on_bus_acquired (con, _tmp0_);
}

static void
_____lambda277__gbus_acquired_callback (GDBusConnection* connection,
                                        const gchar* name,
                                        gpointer self)
{
	____lambda277_ (self, connection);
}

static void
____lambda278_ (Block1Data* _data1_)
{
	QuakeTerminalApp* _tmp0_;
	_tmp0_ = _data1_->app;
	application_run ((Application*) _tmp0_, FALSE);
}

static void
_____lambda278__gbus_name_acquired_callback (GDBusConnection* connection,
                                             const gchar* name,
                                             gpointer self)
{
	____lambda278_ (self);
}

static void
____lambda279_ (Block1Data* _data1_)
{
	QuakeTerminalApp* _tmp0_;
	_tmp0_ = _data1_->app;
	application_run ((Application*) _tmp0_, TRUE);
}

static void
_____lambda279__gbus_name_lost_callback (GDBusConnection* connection,
                                         const gchar* name,
                                         gpointer self)
{
	____lambda279_ (self);
}

static Block2Data*
block2_data_ref (Block2Data* _data2_)
{
	g_atomic_int_inc (&_data2_->_ref_count_);
	return _data2_;
}

static void
block2_data_unref (void * _userdata_)
{
	Block2Data* _data2_;
	_data2_ = (Block2Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
		_g_object_unref0 (_data2_->app);
		g_slice_free (Block2Data, _data2_);
	}
}

static void
____lambda280_ (Block2Data* _data2_,
                GDBusConnection* con)
{
	TerminalApp* _tmp0_;
	g_return_if_fail (con != NULL);
	_tmp0_ = _data2_->app;
	terminal_app_on_bus_acquired (con, _tmp0_);
}

static void
_____lambda280__gbus_acquired_callback (GDBusConnection* connection,
                                        const gchar* name,
                                        gpointer self)
{
	____lambda280_ (self, connection);
}

static void
____lambda281_ (Block2Data* _data2_)
{
	TerminalApp* _tmp0_;
	_tmp0_ = _data2_->app;
	application_run ((Application*) _tmp0_, FALSE);
}

static void
_____lambda281__gbus_name_acquired_callback (GDBusConnection* connection,
                                             const gchar* name,
                                             gpointer self)
{
	____lambda281_ (self);
}

static void
____lambda282_ (Block2Data* _data2_)
{
	TerminalApp* _tmp0_;
	_tmp0_ = _data2_->app;
	application_run ((Application*) _tmp0_, TRUE);
}

static void
_____lambda282__gbus_name_lost_callback (GDBusConnection* connection,
                                         const gchar* name,
                                         gpointer self)
{
	____lambda282_ (self);
}

static void
application_main (gchar** args,
                  gint args_length1)
{
	GeeArrayList* _tmp0_;
	gboolean find_command_flag = FALSE;
	GError* _inner_error0_ = NULL;
	application_start_time = g_get_real_time () / 1000;
	g_setenv ("IBUS_DISABLE_SNOOPER", "1", TRUE);
	g_setenv ("NO_AT_BRIDGE", "1", TRUE);
	setlocale (LC_ALL, "");
	bind_textdomain_codeset (GETTEXT_PACKAGE, "utf-8");
	bindtextdomain (GETTEXT_PACKAGE, "/usr/share/locale");
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
	_g_object_unref0 (application_commands);
	application_commands = _tmp0_;
	find_command_flag = FALSE;
	{
		gchar** arg_collection = NULL;
		gint arg_collection_length1 = 0;
		gint _arg_collection_size_ = 0;
		gint arg_it = 0;
		arg_collection = args;
		arg_collection_length1 = args_length1;
		for (arg_it = 0; arg_it < arg_collection_length1; arg_it = arg_it + 1) {
			gchar* _tmp1_;
			gchar* arg = NULL;
			_tmp1_ = g_strdup (arg_collection[arg_it]);
			arg = _tmp1_;
			{
				gboolean _tmp4_ = FALSE;
				const gchar* _tmp5_;
				if (find_command_flag) {
					GeeArrayList* _tmp2_;
					const gchar* _tmp3_;
					_tmp2_ = application_commands;
					_tmp3_ = arg;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp3_);
				}
				_tmp5_ = arg;
				if (g_strcmp0 (_tmp5_, "-e") == 0) {
					_tmp4_ = TRUE;
				} else {
					const gchar* _tmp6_;
					_tmp6_ = arg;
					_tmp4_ = g_strcmp0 (_tmp6_, "-x") == 0;
				}
				if (_tmp4_) {
					find_command_flag = TRUE;
				}
				_g_free0 (arg);
			}
		}
	}
	{
		gchar* window_mode_description = NULL;
		gchar* _tmp7_;
		GOptionEntry* pass_options = NULL;
		GOptionEntry _tmp8_ = {0};
		GOptionEntry _tmp9_ = {0};
		GOptionEntry _tmp10_ = {0};
		GOptionEntry _tmp11_ = {0};
		GOptionEntry _tmp12_ = {0};
		GOptionEntry _tmp13_ = {0};
		GOptionEntry _tmp14_ = {0};
		GOptionEntry _tmp15_ = {0};
		GOptionEntry _tmp16_ = {0};
		GOptionEntry* _tmp17_;
		gint pass_options_length1;
		gint _pass_options_size_;
		GOptionContext* opt_context = NULL;
		GOptionContext* _tmp18_;
		_tmp7_ = g_strdup_printf ("%s (normal, maximize, fullscreen, tiling)", _ ("Set the terminal window mode"));
		window_mode_description = _tmp7_;
		memset (&_tmp8_, 0, sizeof (GOptionEntry));
		_tmp8_.long_name = "version";
		_tmp8_.short_name = (gchar) 0;
		_tmp8_.flags = (gint) 0;
		_tmp8_.arg = G_OPTION_ARG_NONE;
		_tmp8_.arg_data = &application_version;
		_tmp8_.description = _ ("Display version");
		_tmp8_.arg_description = NULL;
		memset (&_tmp9_, 0, sizeof (GOptionEntry));
		_tmp9_.long_name = "work-directory";
		_tmp9_.short_name = 'w';
		_tmp9_.flags = (gint) 0;
		_tmp9_.arg = G_OPTION_ARG_FILENAME;
		_tmp9_.arg_data = &application_work_directory;
		_tmp9_.description = _ ("Set the terminal startup directory");
		_tmp9_.arg_description = NULL;
		memset (&_tmp10_, 0, sizeof (GOptionEntry));
		_tmp10_.long_name = "window-mode";
		_tmp10_.short_name = 'm';
		_tmp10_.flags = (gint) 0;
		_tmp10_.arg = G_OPTION_ARG_STRING;
		_tmp10_.arg_data = &application_window_mode;
		_tmp10_.description = window_mode_description;
		_tmp10_.arg_description = NULL;
		memset (&_tmp11_, 0, sizeof (GOptionEntry));
		_tmp11_.long_name = "execute";
		_tmp11_.short_name = 'e';
		_tmp11_.flags = (gint) 0;
		_tmp11_.arg = G_OPTION_ARG_STRING_ARRAY;
		_tmp11_.arg_data = &application_pass_options;
		_tmp11_.description = _ ("Run a program in the terminal");
		_tmp11_.arg_description = NULL;
		memset (&_tmp12_, 0, sizeof (GOptionEntry));
		_tmp12_.long_name = "execute";
		_tmp12_.short_name = 'x';
		_tmp12_.flags = (gint) 0;
		_tmp12_.arg = G_OPTION_ARG_STRING_ARRAY;
		_tmp12_.arg_data = &application_pass_options;
		_tmp12_.description = _ ("Run a program in the terminal");
		_tmp12_.arg_description = NULL;
		memset (&_tmp13_, 0, sizeof (GOptionEntry));
		_tmp13_.long_name = "quake-mode";
		_tmp13_.short_name = 'q';
		_tmp13_.flags = (gint) 0;
		_tmp13_.arg = G_OPTION_ARG_NONE;
		_tmp13_.arg_data = &application_quake_mode;
		_tmp13_.description = _ ("Quake mode");
		_tmp13_.arg_description = NULL;
		memset (&_tmp14_, 0, sizeof (GOptionEntry));
		_tmp14_.long_name = "load-theme";
		_tmp14_.short_name = 'l';
		_tmp14_.flags = (gint) 0;
		_tmp14_.arg = G_OPTION_ARG_STRING;
		_tmp14_.arg_data = &application_load_theme;
		_tmp14_.description = _ ("Load theme");
		_tmp14_.arg_description = NULL;
		memset (&_tmp15_, 0, sizeof (GOptionEntry));
		_tmp15_.long_name = "tab";
		_tmp15_.short_name = 't';
		_tmp15_.flags = (gint) 0;
		_tmp15_.arg = G_OPTION_ARG_STRING;
		_tmp15_.arg_data = &application_open_tab;
		_tmp15_.description = _ ("Open tabs");
		_tmp15_.arg_description = NULL;
		memset (&_tmp16_, 0, sizeof (GOptionEntry));
		_tmp17_ = g_new0 (GOptionEntry, 9);
		_tmp17_[0] = _tmp8_;
		_tmp17_[1] = _tmp9_;
		_tmp17_[2] = _tmp10_;
		_tmp17_[3] = _tmp11_;
		_tmp17_[4] = _tmp12_;
		_tmp17_[5] = _tmp13_;
		_tmp17_[6] = _tmp14_;
		_tmp17_[7] = _tmp15_;
		_tmp17_[8] = _tmp16_;
		pass_options = _tmp17_;
		pass_options_length1 = 9;
		_pass_options_size_ = pass_options_length1;
		_tmp18_ = g_option_context_new (_ ("Deepin Terminal"));
		opt_context = _tmp18_;
		g_option_context_set_summary (opt_context, _ ("Deepin Teminal is an advanced terminal emulator with window-splitting," \
" workspaces, remote management, Quake mode and other features."));
		g_option_context_set_help_enabled (opt_context, TRUE);
		g_option_context_add_main_entries (opt_context, pass_options, NULL);
		g_option_context_parse (opt_context, (gint*) (&args_length1), &args, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_option_context_free0 (opt_context);
			pass_options = (g_free (pass_options), NULL);
			_g_free0 (window_mode_description);
			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;
		}
		_g_option_context_free0 (opt_context);
		pass_options = (g_free (pass_options), NULL);
		_g_free0 (window_mode_description);
	}
	goto __finally0;
	__catch0_g_option_error:
	{
		g_clear_error (&_inner_error0_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
	if (application_version) {
		FILE* _tmp19_;
		gchar* _tmp20_;
		gchar* _tmp21_;
		FILE* _tmp22_;
		_tmp19_ = stdout;
		_tmp20_ = g_strdup_printf ("Deepin Terminal %s\n", CONSTANT_VERSION);
		_tmp21_ = _tmp20_;
		fprintf (_tmp19_, "%s", _tmp21_);
		_g_free0 (_tmp21_);
		_tmp22_ = stdout;
		fprintf (_tmp22_, "Copyright 2011-2017 Deepin, Inc.\n");
	} else {
		gtk_init ((gint*) (&args_length1), &args);
		if (application_quake_mode) {
			Block1Data* _data1_;
			QuakeTerminalApp* _tmp23_;
			_data1_ = g_slice_new0 (Block1Data);
			_data1_->_ref_count_ = 1;
			_tmp23_ = quake_terminal_app_new ();
			_data1_->app = _tmp23_;
			g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "com.deepin.quake_terminal", G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((_____lambda277__gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda277__gbus_acquired_callback, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref)), (GClosure*) ((_____lambda278__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda278__gbus_name_acquired_callback, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref)), (GClosure*) ((_____lambda279__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda279__gbus_name_lost_callback, block1_data_ref (_data1_), (GClosureNotify) block1_data_unref)));
			block1_data_unref (_data1_);
			_data1_ = NULL;
		} else {
			Block2Data* _data2_;
			TerminalApp* _tmp24_;
			_data2_ = g_slice_new0 (Block2Data);
			_data2_->_ref_count_ = 1;
			_tmp24_ = terminal_app_new ();
			_data2_->app = _tmp24_;
			g_bus_own_name_with_closures (G_BUS_TYPE_SESSION, "com.deepin.terminal", G_BUS_NAME_OWNER_FLAGS_NONE, (GClosure*) ((_____lambda280__gbus_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda280__gbus_acquired_callback, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref)), (GClosure*) ((_____lambda281__gbus_name_acquired_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda281__gbus_name_acquired_callback, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref)), (GClosure*) ((_____lambda282__gbus_name_lost_callback == NULL) ? NULL : g_cclosure_new ((GCallback) _____lambda282__gbus_name_lost_callback, block2_data_ref (_data2_), (GClosureNotify) block2_data_unref)));
			block2_data_unref (_data2_);
			_data2_ = NULL;
		}
		gtk_main ();
	}
}

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

void
application_run (Application* self,
                 gboolean has_start)
{
	gboolean _tmp0_ = FALSE;
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	if (self->priv->inited) {
		return;
	}
	self->priv->inited = TRUE;
	if (has_start) {
		_tmp0_ = application_quake_mode;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		{
			QuakeDaemon* daemon = NULL;
			QuakeDaemon* _tmp1_;
			QuakeDaemon* _tmp2_;
			_tmp1_ = (QuakeDaemon*) g_initable_new (TYPE_QUAKE_DAEMON_PROXY, NULL, &_inner_error0_, "g-flags", 0, "g-name", "com.deepin.quake_terminal", "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", "/com/deepin/quake_terminal", "g-interface-name", "com.deepin.quake_terminal", NULL);
			daemon = (QuakeDaemon*) _tmp1_;
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_tmp2_ = daemon;
			quake_daemon_show_or_hide (_tmp2_, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (daemon);
				goto __catch0_g_error;
			}
			_g_object_unref0 (daemon);
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			FILE* _tmp3_;
			GError* _tmp4_;
			const gchar* _tmp5_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp3_ = stderr;
			_tmp4_ = e;
			_tmp5_ = _tmp4_->message;
			fprintf (_tmp3_, "%s\n", _tmp5_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
			g_clear_error (&_inner_error0_);
			return;
		}
		gtk_main_quit ();
	} else {
		gchar* _tmp6_;
		gchar* _tmp7_;
		const gchar* _tmp8_;
		WidgetsTabbar* tabbar = NULL;
		WidgetsTabbar* _tmp9_;
		WidgetsTabbar* _tmp10_;
		const gchar* _tmp11_;
		WidgetsWorkspaceManager* _tmp12_;
		const gchar* _tmp13_;
		_tmp6_ = utils_get_root_path ("style.css");
		_tmp7_ = _tmp6_;
		utils_load_css_theme (_tmp7_);
		_g_free0 (_tmp7_);
		_tmp8_ = application_window_mode;
		if (g_strcmp0 (_tmp8_, "tiling") == 0) {
			utils_set_tiling_wm ();
		}
		_tmp9_ = widgets_tabbar_new ();
		g_object_ref_sink (_tmp9_);
		tabbar = _tmp9_;
		_tmp10_ = tabbar;
		_tmp11_ = application_work_directory;
		_tmp12_ = widgets_workspace_manager_new (_tmp10_, _tmp11_);
		g_object_ref_sink (_tmp12_);
		_g_object_unref0 (self->workspace_manager);
		self->workspace_manager = _tmp12_;
		_tmp13_ = application_open_tab;
		if (_tmp13_ != NULL) {
			gint new_tab = 0;
			const gchar* _tmp14_;
			_tmp14_ = application_open_tab;
			new_tab = atoi (_tmp14_);
			{
				gint tab = 0;
				tab = 1;
				{
					gboolean _tmp15_ = FALSE;
					_tmp15_ = TRUE;
					while (TRUE) {
						WidgetsWorkspaceManager* _tmp17_;
						const gchar* _tmp18_;
						if (!_tmp15_) {
							gint _tmp16_;
							_tmp16_ = tab;
							tab = _tmp16_ + 1;
						}
						_tmp15_ = FALSE;
						if (!(tab < new_tab)) {
							break;
						}
						_tmp17_ = self->workspace_manager;
						_tmp18_ = application_work_directory;
						widgets_workspace_manager_new_workspace (_tmp17_, _tmp18_, FALSE);
					}
				}
			}
		}
		if (application_quake_mode) {
			WidgetsQuakeWindow* _tmp19_;
			WidgetsQuakeWindow* _tmp20_;
			WidgetsWorkspaceManager* _tmp21_;
			WidgetsTabbar* _tmp22_;
			gchar* _tmp23_;
			gchar* _tmp24_;
			gchar* _tmp25_;
			gchar* _tmp26_;
			WidgetsTabbar* _tmp27_;
			WidgetsWorkspaceManager* _tmp28_;
			WidgetsQuakeWindow* _tmp29_;
			_tmp19_ = widgets_quake_window_new ();
			g_object_ref_sink (_tmp19_);
			_g_object_unref0 (self->quake_window);
			self->quake_window = _tmp19_;
			_tmp20_ = self->quake_window;
			_tmp21_ = self->workspace_manager;
			_tmp22_ = tabbar;
			widgets_quake_window_show_window (_tmp20_, _tmp21_, _tmp22_);
			_tmp23_ = g_strdup_printf ("%" G_GINT64_FORMAT, (g_get_real_time () / 1000) - application_start_time);
			_tmp24_ = _tmp23_;
			_tmp25_ = g_strdup_printf ("Deepin quake terminal start in: %s\n", _tmp24_);
			_tmp26_ = _tmp25_;
			utils_write_log (_tmp26_);
			_g_free0 (_tmp26_);
			_g_free0 (_tmp24_);
			_tmp27_ = tabbar;
			_tmp28_ = self->workspace_manager;
			_tmp29_ = self->quake_window;
			widgets_tabbar_init (_tmp27_, _tmp28_, (WidgetsConfigWindow*) _tmp29_);
		} else {
			const gchar* _tmp30_;
			WidgetsWindow* _tmp31_;
			WidgetsWindow* _tmp32_;
			const gchar* _tmp33_;
			WidgetsWindow* _tmp37_;
			WidgetsWorkspaceManager* _tmp38_;
			WidgetsTabbar* _tmp39_;
			gchar* _tmp40_;
			gchar* _tmp41_;
			gchar* _tmp42_;
			gchar* _tmp43_;
			WidgetsTabbar* _tmp44_;
			WidgetsWorkspaceManager* _tmp45_;
			WidgetsWindow* _tmp46_;
			_tmp30_ = application_window_mode;
			_tmp31_ = widgets_window_new (_tmp30_);
			g_object_ref_sink (_tmp31_);
			_g_object_unref0 (self->window);
			self->window = _tmp31_;
			_tmp32_ = self->window;
			gtk_window_set_has_resize_grip ((GtkWindow*) _tmp32_, TRUE);
			_tmp33_ = application_load_theme;
			if (_tmp33_ != NULL) {
				WidgetsWindow* _tmp34_;
				ConfigConfig* _tmp35_;
				const gchar* _tmp36_;
				_tmp34_ = self->window;
				_tmp35_ = ((WidgetsConfigWindow*) _tmp34_)->config;
				_tmp36_ = application_load_theme;
				config_config_load_temp_theme (_tmp35_, _tmp36_);
			}
			_tmp37_ = self->window;
			_tmp38_ = self->workspace_manager;
			_tmp39_ = tabbar;
			widgets_window_show_window (_tmp37_, G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_TERMINAL_APP, TerminalApp), _tmp38_, _tmp39_, has_start);
			_tmp40_ = g_strdup_printf ("%" G_GINT64_FORMAT, (g_get_real_time () / 1000) - application_start_time);
			_tmp41_ = _tmp40_;
			_tmp42_ = g_strdup_printf ("Deepin terminal start in: %s\n", _tmp41_);
			_tmp43_ = _tmp42_;
			utils_write_log (_tmp43_);
			_g_free0 (_tmp43_);
			_g_free0 (_tmp41_);
			_tmp44_ = tabbar;
			_tmp45_ = self->workspace_manager;
			_tmp46_ = self->window;
			widgets_tabbar_init (_tmp44_, _tmp45_, (WidgetsConfigWindow*) _tmp46_);
		}
		_g_object_unref0 (tabbar);
	}
}

Application*
application_construct (GType object_type)
{
	Application * self = NULL;
	self = (Application*) g_object_new (object_type, NULL);
	return self;
}

Application*
application_new (void)
{
	return application_construct (TYPE_APPLICATION);
}

static void
application_class_init (ApplicationClass * klass,
                        gpointer klass_data)
{
	application_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &Application_private_offset);
	G_OBJECT_CLASS (klass)->finalize = application_finalize;
}

static void
application_instance_init (Application * self,
                           gpointer klass)
{
	self->priv = application_get_instance_private (self);
	self->priv->inited = FALSE;
}

static void
application_finalize (GObject * obj)
{
	Application * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_APPLICATION, Application);
	_g_object_unref0 (self->quake_window);
	_g_object_unref0 (self->window);
	_g_object_unref0 (self->workspace_manager);
	G_OBJECT_CLASS (application_parent_class)->finalize (obj);
}

static GType
application_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ApplicationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) application_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Application), 0, (GInstanceInitFunc) application_instance_init, NULL };
	GType application_type_id;
	application_type_id = g_type_register_static (G_TYPE_OBJECT, "Application", &g_define_type_info, 0);
	Application_private_offset = g_type_add_instance_private (application_type_id, sizeof (ApplicationPrivate));
	return application_type_id;
}

GType
application_get_type (void)
{
	static volatile gsize application_type_id__once = 0;
	if (g_once_init_enter (&application_type_id__once)) {
		GType application_type_id;
		application_type_id = application_get_type_once ();
		g_once_init_leave (&application_type_id__once, application_type_id);
	}
	return application_type_id__once;
}

