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

/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
 * -*- coding: utf-8 -*-
 *
 * Copyright (C) 2011 ~ 2018 Deepin, Inc.
 *               2011 ~ 2018 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 <gtk/gtk.h>
#include <glib-object.h>
#include <gee.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <math.h>
#include <gdk/gdk.h>
#include <vte/vte.h>
#include <cairo-gobject.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

#define WIDGETS_TYPE_WORKSPACE (widgets_workspace_get_type ())
#define WIDGETS_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_WORKSPACE, WidgetsWorkspace))
#define WIDGETS_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_WORKSPACE, WidgetsWorkspaceClass))
#define WIDGETS_IS_WORKSPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_WORKSPACE))
#define WIDGETS_IS_WORKSPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_WORKSPACE))
#define WIDGETS_WORKSPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_WORKSPACE, WidgetsWorkspaceClass))

typedef struct _WidgetsWorkspace WidgetsWorkspace;
typedef struct _WidgetsWorkspaceClass WidgetsWorkspaceClass;
typedef struct _WidgetsWorkspacePrivate WidgetsWorkspacePrivate;

#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 ANIMATION_TYPE_ANIMATE_TIMER (animation_animate_timer_get_type ())
#define ANIMATION_ANIMATE_TIMER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANIMATION_TYPE_ANIMATE_TIMER, AnimationAnimateTimer))
#define ANIMATION_ANIMATE_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANIMATION_TYPE_ANIMATE_TIMER, AnimationAnimateTimerClass))
#define ANIMATION_IS_ANIMATE_TIMER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANIMATION_TYPE_ANIMATE_TIMER))
#define ANIMATION_IS_ANIMATE_TIMER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANIMATION_TYPE_ANIMATE_TIMER))
#define ANIMATION_ANIMATE_TIMER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANIMATION_TYPE_ANIMATE_TIMER, AnimationAnimateTimerClass))

typedef struct _AnimationAnimateTimer AnimationAnimateTimer;
typedef struct _AnimationAnimateTimerClass AnimationAnimateTimerClass;

#define WIDGETS_TYPE_TERM (widgets_term_get_type ())
#define WIDGETS_TERM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_TERM, WidgetsTerm))
#define WIDGETS_TERM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_TERM, WidgetsTermClass))
#define WIDGETS_IS_TERM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_TERM))
#define WIDGETS_IS_TERM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_TERM))
#define WIDGETS_TERM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_TERM, WidgetsTermClass))

typedef struct _WidgetsTerm WidgetsTerm;
typedef struct _WidgetsTermClass WidgetsTermClass;

#define WIDGETS_TYPE_BASE_PANEL (widgets_base_panel_get_type ())
#define WIDGETS_BASE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_BASE_PANEL, WidgetsBasePanel))
#define WIDGETS_BASE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_BASE_PANEL, WidgetsBasePanelClass))
#define WIDGETS_IS_BASE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_BASE_PANEL))
#define WIDGETS_IS_BASE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_BASE_PANEL))
#define WIDGETS_BASE_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_BASE_PANEL, WidgetsBasePanelClass))

typedef struct _WidgetsBasePanel WidgetsBasePanel;
typedef struct _WidgetsBasePanelClass WidgetsBasePanelClass;

#define WIDGETS_TYPE_COMMAND_PANEL (widgets_command_panel_get_type ())
#define WIDGETS_COMMAND_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_COMMAND_PANEL, WidgetsCommandPanel))
#define WIDGETS_COMMAND_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_COMMAND_PANEL, WidgetsCommandPanelClass))
#define WIDGETS_IS_COMMAND_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_COMMAND_PANEL))
#define WIDGETS_IS_COMMAND_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_COMMAND_PANEL))
#define WIDGETS_COMMAND_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_COMMAND_PANEL, WidgetsCommandPanelClass))

typedef struct _WidgetsCommandPanel WidgetsCommandPanel;
typedef struct _WidgetsCommandPanelClass WidgetsCommandPanelClass;

#define WIDGETS_TYPE_ENCODING_PANEL (widgets_encoding_panel_get_type ())
#define WIDGETS_ENCODING_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ENCODING_PANEL, WidgetsEncodingPanel))
#define WIDGETS_ENCODING_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ENCODING_PANEL, WidgetsEncodingPanelClass))
#define WIDGETS_IS_ENCODING_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ENCODING_PANEL))
#define WIDGETS_IS_ENCODING_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ENCODING_PANEL))
#define WIDGETS_ENCODING_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ENCODING_PANEL, WidgetsEncodingPanelClass))

typedef struct _WidgetsEncodingPanel WidgetsEncodingPanel;
typedef struct _WidgetsEncodingPanelClass WidgetsEncodingPanelClass;

#define WIDGETS_TYPE_REMOTE_PANEL (widgets_remote_panel_get_type ())
#define WIDGETS_REMOTE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_REMOTE_PANEL, WidgetsRemotePanel))
#define WIDGETS_REMOTE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_REMOTE_PANEL, WidgetsRemotePanelClass))
#define WIDGETS_IS_REMOTE_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_REMOTE_PANEL))
#define WIDGETS_IS_REMOTE_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_REMOTE_PANEL))
#define WIDGETS_REMOTE_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_REMOTE_PANEL, WidgetsRemotePanelClass))

typedef struct _WidgetsRemotePanel WidgetsRemotePanel;
typedef struct _WidgetsRemotePanelClass WidgetsRemotePanelClass;

#define WIDGETS_TYPE_SEARCH_PANEL (widgets_search_panel_get_type ())
#define WIDGETS_SEARCH_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_SEARCH_PANEL, WidgetsSearchPanel))
#define WIDGETS_SEARCH_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_SEARCH_PANEL, WidgetsSearchPanelClass))
#define WIDGETS_IS_SEARCH_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_SEARCH_PANEL))
#define WIDGETS_IS_SEARCH_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_SEARCH_PANEL))
#define WIDGETS_SEARCH_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_SEARCH_PANEL, WidgetsSearchPanelClass))

typedef struct _WidgetsSearchPanel WidgetsSearchPanel;
typedef struct _WidgetsSearchPanelClass WidgetsSearchPanelClass;

#define WIDGETS_TYPE_THEME_PANEL (widgets_theme_panel_get_type ())
#define WIDGETS_THEME_PANEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_THEME_PANEL, WidgetsThemePanel))
#define WIDGETS_THEME_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_THEME_PANEL, WidgetsThemePanelClass))
#define WIDGETS_IS_THEME_PANEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_THEME_PANEL))
#define WIDGETS_IS_THEME_PANEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_THEME_PANEL))
#define WIDGETS_THEME_PANEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_THEME_PANEL, WidgetsThemePanelClass))

typedef struct _WidgetsThemePanel WidgetsThemePanel;
typedef struct _WidgetsThemePanelClass WidgetsThemePanelClass;

#define WIDGETS_TYPE_HIGHLIGHT_FRAME (widgets_highlight_frame_get_type ())
#define WIDGETS_HIGHLIGHT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_HIGHLIGHT_FRAME, WidgetsHighlightFrame))
#define WIDGETS_HIGHLIGHT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_HIGHLIGHT_FRAME, WidgetsHighlightFrameClass))
#define WIDGETS_IS_HIGHLIGHT_FRAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_HIGHLIGHT_FRAME))
#define WIDGETS_IS_HIGHLIGHT_FRAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_HIGHLIGHT_FRAME))
#define WIDGETS_HIGHLIGHT_FRAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_HIGHLIGHT_FRAME, WidgetsHighlightFrameClass))

typedef struct _WidgetsHighlightFrame WidgetsHighlightFrame;
typedef struct _WidgetsHighlightFrameClass WidgetsHighlightFrameClass;
enum  {
	WIDGETS_WORKSPACE_0_PROPERTY,
	WIDGETS_WORKSPACE_NUM_PROPERTIES
};
static GParamSpec* widgets_workspace_properties[WIDGETS_WORKSPACE_NUM_PROPERTIES];
typedef enum  {
	WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_LEFT,
	WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_RIGHT,
	WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_UP,
	WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_DOWN
} WidgetsWorkspaceWorkspaceResizeKey;

#define WIDGETS_WORKSPACE_TYPE_WORKSPACE_RESIZE_KEY (widgets_workspace_workspace_resize_key_get_type ())
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) ((var == NULL) ? NULL : (var = (g_free (var), NULL)))
typedef gdouble (*AnimationAnimateTimerEasingFunc) (gdouble x, gpointer user_data);
typedef struct _Block53Data Block53Data;
typedef struct _WidgetsTermPrivate WidgetsTermPrivate;

#define MENU_TYPE_MENU (menu_menu_get_type ())
#define MENU_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MENU_TYPE_MENU, MenuMenu))
#define MENU_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MENU_TYPE_MENU, MenuMenuClass))
#define MENU_IS_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MENU_TYPE_MENU))
#define MENU_IS_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MENU_TYPE_MENU))
#define MENU_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MENU_TYPE_MENU, MenuMenuClass))

typedef struct _MenuMenu MenuMenu;
typedef struct _MenuMenuClass MenuMenuClass;
typedef struct _Block54Data Block54Data;
typedef struct _Block55Data Block55Data;

#define WIDGETS_TYPE_DIALOG (widgets_dialog_get_type ())
#define WIDGETS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_DIALOG, WidgetsDialog))
#define WIDGETS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_DIALOG, WidgetsDialogClass))
#define WIDGETS_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_DIALOG))
#define WIDGETS_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_DIALOG))
#define WIDGETS_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_DIALOG, WidgetsDialogClass))

typedef struct _WidgetsDialog WidgetsDialog;
typedef struct _WidgetsDialogClass WidgetsDialogClass;

#define WIDGETS_TYPE_CONFIRM_DIALOG (widgets_confirm_dialog_get_type ())
#define WIDGETS_CONFIRM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialog))
#define WIDGETS_CONFIRM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialogClass))
#define WIDGETS_IS_CONFIRM_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CONFIRM_DIALOG))
#define WIDGETS_IS_CONFIRM_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CONFIRM_DIALOG))
#define WIDGETS_CONFIRM_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CONFIRM_DIALOG, WidgetsConfirmDialogClass))

typedef struct _WidgetsConfirmDialog WidgetsConfirmDialog;
typedef struct _WidgetsConfirmDialogClass WidgetsConfirmDialogClass;

#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;
typedef struct _Block56Data Block56Data;
typedef struct _Block57Data Block57Data;
typedef struct _Block58Data Block58Data;
typedef struct _Block59Data Block59Data;
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;
typedef struct _ConfigConfigPrivate ConfigConfigPrivate;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _WidgetsSearchPanelPrivate WidgetsSearchPanelPrivate;

#define WIDGETS_TYPE_ENTRY (widgets_entry_get_type ())
#define WIDGETS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_ENTRY, WidgetsEntry))
#define WIDGETS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_ENTRY, WidgetsEntryClass))
#define WIDGETS_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_ENTRY))
#define WIDGETS_IS_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_ENTRY))
#define WIDGETS_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_ENTRY, WidgetsEntryClass))

typedef struct _WidgetsEntry WidgetsEntry;
typedef struct _WidgetsEntryClass WidgetsEntryClass;

#define WIDGETS_TYPE_CLICK_EVENT_BOX (widgets_click_event_box_get_type ())
#define WIDGETS_CLICK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBox))
#define WIDGETS_CLICK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBoxClass))
#define WIDGETS_IS_CLICK_EVENT_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX))
#define WIDGETS_IS_CLICK_EVENT_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_CLICK_EVENT_BOX))
#define WIDGETS_CLICK_EVENT_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_CLICK_EVENT_BOX, WidgetsClickEventBoxClass))

typedef struct _WidgetsClickEventBox WidgetsClickEventBox;
typedef struct _WidgetsClickEventBoxClass WidgetsClickEventBoxClass;

#define WIDGETS_TYPE_IMAGE_BUTTON (widgets_image_button_get_type ())
#define WIDGETS_IMAGE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WIDGETS_TYPE_IMAGE_BUTTON, WidgetsImageButton))
#define WIDGETS_IMAGE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WIDGETS_TYPE_IMAGE_BUTTON, WidgetsImageButtonClass))
#define WIDGETS_IS_IMAGE_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WIDGETS_TYPE_IMAGE_BUTTON))
#define WIDGETS_IS_IMAGE_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WIDGETS_TYPE_IMAGE_BUTTON))
#define WIDGETS_IMAGE_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), WIDGETS_TYPE_IMAGE_BUTTON, WidgetsImageButtonClass))

typedef struct _WidgetsImageButton WidgetsImageButton;
typedef struct _WidgetsImageButtonClass WidgetsImageButtonClass;
enum  {
	WIDGETS_WORKSPACE_CHANGE_TITLE_SIGNAL,
	WIDGETS_WORKSPACE_EXIT_SIGNAL,
	WIDGETS_WORKSPACE_HIGHLIGHT_TAB_SIGNAL,
	WIDGETS_WORKSPACE_NUM_SIGNALS
};
static guint widgets_workspace_signals[WIDGETS_WORKSPACE_NUM_SIGNALS] = {0};

struct _WidgetsWorkspace {
	GtkOverlay parent_instance;
	WidgetsWorkspacePrivate * priv;
	WidgetsWorkspaceManager* workspace_manager;
	AnimationAnimateTimer* command_panel_hide_timer;
	AnimationAnimateTimer* command_panel_show_timer;
	AnimationAnimateTimer* encoding_panel_hide_timer;
	AnimationAnimateTimer* encoding_panel_show_timer;
	AnimationAnimateTimer* remote_panel_hide_timer;
	AnimationAnimateTimer* remote_panel_show_timer;
	AnimationAnimateTimer* theme_panel_hide_timer;
	AnimationAnimateTimer* theme_panel_show_timer;
	GeeArrayList* term_list;
	WidgetsCommandPanel* command_panel;
	WidgetsEncodingPanel* encoding_panel;
	WidgetsRemotePanel* remote_panel;
	WidgetsSearchPanel* search_panel;
	WidgetsTerm* focus_terminal;
	WidgetsTerm* terminal_before_popup;
	WidgetsThemePanel* theme_panel;
	WidgetsHighlightFrame* highlight_frame;
	gint PANED_HANDLE_SIZE;
	gint hide_slider_interval;
	gint hide_slider_start_x;
	gint index;
	gint show_slider_interval;
	gint show_slider_start_x;
	guint* highlight_frame_timeout_source_id;
};

struct _WidgetsWorkspaceClass {
	GtkOverlayClass parent_class;
};

struct _Block53Data {
	int _ref_count_;
	WidgetsWorkspace* self;
	WidgetsTerm* term;
};

struct _WidgetsTerm {
	GtkOverlay parent_instance;
	WidgetsTermPrivate * priv;
	GeeArrayList* command_execute_y_coordinates;
	GPid child_pid;
	GdkRGBA background_color;
	GdkRGBA foreground_color;
	GtkScrollbar* scrollbar;
	MenuMenu* menu;
	VteTerminal* term;
	WidgetsWorkspaceManager* workspace_manager;
	gboolean child_has_exit;
	gboolean has_print_exit_notify;
	gboolean has_select_all;
	gboolean is_first_term;
	gboolean is_press_scrollbar;
	gboolean login_remote_server;
	gboolean press_anything;
	gdouble zoom_factor;
	gint font_size;
	gint hide_scrollbar_offset;
	gint show_scrollbar_offset;
	gchar* current_dir;
	gchar* current_title;
	gchar* expect_file_path;
	gchar* customize_title;
	gchar* remote_server_title;
	gchar* uri_at_right_press;
	gchar* server_info;
	guint launch_idle_id;
	guint* hide_scrollbar_timeout_source_id;
	GKeyFile* search_engine_config_file;
	gchar* search_engine_config_file_path;
};

struct _WidgetsTermClass {
	GtkOverlayClass parent_class;
};

struct _Block54Data {
	int _ref_count_;
	WidgetsWorkspace* self;
	gchar* term_dir;
};

struct _Block55Data {
	int _ref_count_;
	WidgetsWorkspace* self;
	WidgetsTerm* focus_term;
};

struct _Block56Data {
	int _ref_count_;
	WidgetsWorkspace* self;
	WidgetsTerm* focus_term;
};

struct _Block57Data {
	int _ref_count_;
	WidgetsWorkspace* self;
	gchar* split_term_server_info;
};

struct _Block58Data {
	int _ref_count_;
	WidgetsWorkspace* self;
	gchar* split_term_server_info;
};

struct _Block59Data {
	int _ref_count_;
	WidgetsWorkspace* self;
	GtkOrientation orientation;
};

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);
};

struct _ConfigConfig {
	GObject parent_instance;
	ConfigConfigPrivate * priv;
	GeeArrayList* backspace_key_erase_names;
	GeeArrayList* del_key_erase_names;
	GeeArrayList* encoding_names;
	GeeHashMap* erase_map;
	gdouble default_opacity;
	gint default_size;
	gchar* default_mono_font;
	GKeyFile* config_file;
	gchar* config_file_path;
	gchar* temp_theme;
};

struct _ConfigConfigClass {
	GObjectClass parent_class;
};

struct _WidgetsSearchPanel {
	GtkHBox parent_instance;
	WidgetsSearchPanelPrivate * priv;
	WidgetsEntry* search_entry;
	GtkBox* clear_button_box;
	WidgetsImageButton* clear_button;
	WidgetsImageButton* search_next_button;
	WidgetsImageButton* search_previous_button;
	WidgetsTerm* terminal;
	WidgetsImageButton* search_image;
	gint button_margin;
	gint margin_horizontal;
	gchar* search_text;
};

struct _WidgetsSearchPanelClass {
	GtkHBoxClass parent_class;
};

static gpointer widgets_workspace_parent_class = NULL;
VALA_EXTERN gint constant_SLIDER_WIDTH;
VALA_EXTERN gint constant_ENCODING_SLIDER_WIDTH;
VALA_EXTERN gint constant_THEME_SLIDER_WIDTH;
VALA_EXTERN gint constant_COMMAND_SLIDER_WIDTH;

VALA_EXTERN GType widgets_workspace_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsWorkspace, 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 animation_animate_timer_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AnimationAnimateTimer, g_object_unref)
VALA_EXTERN GType widgets_term_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsTerm, g_object_unref)
VALA_EXTERN GType widgets_base_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsBasePanel, g_object_unref)
VALA_EXTERN GType widgets_command_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsCommandPanel, g_object_unref)
VALA_EXTERN GType widgets_encoding_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsEncodingPanel, g_object_unref)
VALA_EXTERN GType widgets_remote_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsRemotePanel, g_object_unref)
VALA_EXTERN GType widgets_search_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsSearchPanel, g_object_unref)
VALA_EXTERN GType widgets_theme_panel_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsThemePanel, g_object_unref)
VALA_EXTERN GType widgets_highlight_frame_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsHighlightFrame, g_object_unref)
static GType widgets_workspace_workspace_resize_key_get_type (void) G_GNUC_CONST  G_GNUC_UNUSED ;
VALA_EXTERN WidgetsWorkspace* widgets_workspace_new (gint workspace_index,
                                         const gchar* work_directory,
                                         WidgetsWorkspaceManager* manager);
VALA_EXTERN WidgetsWorkspace* widgets_workspace_construct (GType object_type,
                                               gint workspace_index,
                                               const gchar* work_directory,
                                               WidgetsWorkspaceManager* manager);
VALA_EXTERN gdouble animation_animate_timer_ease_out_quint (gdouble x);
static gdouble _animation_animate_timer_ease_out_quint_animation_animate_timer_easing_func (gdouble x,
                                                                                     gpointer self);
VALA_EXTERN AnimationAnimateTimer* animation_animate_timer_new (AnimationAnimateTimerEasingFunc func,
                                                    gpointer func_target,
                                                    gint speed);
VALA_EXTERN AnimationAnimateTimer* animation_animate_timer_construct (GType object_type,
                                                          AnimationAnimateTimerEasingFunc func,
                                                          gpointer func_target,
                                                          gint speed);
VALA_EXTERN void widgets_workspace_remote_panel_show_animate (WidgetsWorkspace* self,
                                                  gdouble progress);
static void _widgets_workspace_remote_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                   gdouble progress,
                                                                                   gpointer self);
VALA_EXTERN gdouble animation_animate_timer_ease_in_quint (gdouble x);
static gdouble _animation_animate_timer_ease_in_quint_animation_animate_timer_easing_func (gdouble x,
                                                                                    gpointer self);
VALA_EXTERN void widgets_workspace_remote_panel_hide_animate (WidgetsWorkspace* self,
                                                  gdouble progress);
static void _widgets_workspace_remote_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                   gdouble progress,
                                                                                   gpointer self);
VALA_EXTERN void widgets_workspace_theme_panel_show_animate (WidgetsWorkspace* self,
                                                 gdouble progress);
static void _widgets_workspace_theme_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                  gdouble progress,
                                                                                  gpointer self);
VALA_EXTERN void widgets_workspace_theme_panel_hide_animate (WidgetsWorkspace* self,
                                                 gdouble progress);
static void _widgets_workspace_theme_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                  gdouble progress,
                                                                                  gpointer self);
VALA_EXTERN void widgets_workspace_encoding_panel_show_animate (WidgetsWorkspace* self,
                                                    gdouble progress);
static void _widgets_workspace_encoding_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                     gdouble progress,
                                                                                     gpointer self);
VALA_EXTERN void widgets_workspace_encoding_panel_hide_animate (WidgetsWorkspace* self,
                                                    gdouble progress);
static void _widgets_workspace_encoding_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                     gdouble progress,
                                                                                     gpointer self);
VALA_EXTERN void widgets_workspace_command_panel_show_animate (WidgetsWorkspace* self,
                                                   gdouble progress);
static void _widgets_workspace_command_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                    gdouble progress,
                                                                                    gpointer self);
VALA_EXTERN void widgets_workspace_command_panel_hide_animate (WidgetsWorkspace* self,
                                                   gdouble progress);
static void _widgets_workspace_command_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                    gdouble progress,
                                                                                    gpointer self);
VALA_EXTERN WidgetsTerm* widgets_workspace_new_term (WidgetsWorkspace* self,
                                         gboolean first_term,
                                         const gchar* work_directory);
VALA_EXTERN void widgets_workspace_manager_set_first_term (WidgetsWorkspaceManager* self,
                                               WidgetsTerm* term);
static Block53Data* block53_data_ref (Block53Data* _data53_);
static void block53_data_unref (void * _userdata_);
VALA_EXTERN WidgetsTerm* widgets_term_new (gboolean first_term,
                               const gchar* work_directory,
                               WidgetsWorkspaceManager* manager);
VALA_EXTERN WidgetsTerm* widgets_term_construct (GType object_type,
                                     gboolean first_term,
                                     const gchar* work_directory,
                                     WidgetsWorkspaceManager* manager);
static void __lambda198_ (WidgetsWorkspace* self,
                   WidgetsTerm* term,
                   const gchar* dir);
static void ___lambda198__widgets_term_change_title (WidgetsTerm* _sender,
                                              const gchar* dir,
                                              gpointer self);
static void __lambda199_ (WidgetsWorkspace* self,
                   WidgetsTerm* term);
static void ___lambda199__widgets_term_highlight_tab (WidgetsTerm* _sender,
                                               gpointer self);
static void __lambda200_ (WidgetsWorkspace* self,
                   WidgetsTerm* term);
VALA_EXTERN void widgets_workspace_remove_all_panels (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_close_term (WidgetsWorkspace* self,
                                   WidgetsTerm* term);
static void ___lambda200__widgets_term_exit (WidgetsTerm* _sender,
                                      gpointer self);
static void __lambda201_ (WidgetsWorkspace* self,
                   WidgetsTerm* w,
                   gint status);
VALA_EXTERN void widgets_workspace_reset_term (WidgetsWorkspace* self,
                                   gint exit_status);
static void ___lambda201__widgets_term_exit_with_bad_code (WidgetsTerm* _sender,
                                                    gint exit_status,
                                                    gpointer self);
VALA_EXTERN GType menu_menu_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MenuMenu, g_object_unref)
static gboolean __lambda203_ (Block53Data* _data53_,
                       GtkWidget* w,
                       GdkEventButton* e);
VALA_EXTERN void widgets_workspace_remove_search_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_hide_theme_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_hide_remote_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_hide_encoding_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_hide_command_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_update_focus_terminal (WidgetsWorkspace* self,
                                              WidgetsTerm* term);
static gboolean ___lambda203__gtk_widget_button_press_event (GtkWidget* _sender,
                                                      GdkEventButton* event,
                                                      gpointer self);
static Block54Data* block54_data_ref (Block54Data* _data54_);
static void block54_data_unref (void * _userdata_);
VALA_EXTERN WidgetsTerm* widgets_workspace_get_focus_term (WidgetsWorkspace* self,
                                               GtkContainer* container);
VALA_EXTERN gchar* widgets_term_get_cwd (WidgetsTerm* self);
VALA_EXTERN void widgets_workspace_split_vertical (WidgetsWorkspace* self);
static gboolean __lambda202_ (Block54Data* _data54_);
VALA_EXTERN guint8* utils_to_raw_data (const gchar* str,
                           gint* result_length1);
static gboolean ___lambda202__gsource_func (gpointer self);
VALA_EXTERN gboolean widgets_workspace_has_active_term (WidgetsWorkspace* self);
VALA_EXTERN gboolean widgets_term_has_foreground_process (WidgetsTerm* self);
VALA_EXTERN void widgets_workspace_close_focus_term (WidgetsWorkspace* self);
static Block55Data* block55_data_ref (Block55Data* _data55_);
static void block55_data_unref (void * _userdata_);
VALA_EXTERN GType widgets_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsDialog, g_object_unref)
VALA_EXTERN GType widgets_confirm_dialog_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsConfirmDialog, 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 WidgetsConfirmDialog* widgets_create_running_confirm_dialog (WidgetsConfigWindow* window);
static void ___lambda207_ (Block55Data* _data55_,
                    WidgetsConfirmDialog* d);
static void ____lambda207__widgets_confirm_dialog_confirm (WidgetsConfirmDialog* _sender,
                                                    gpointer self);
VALA_EXTERN void widgets_workspace_toggle_select_all (WidgetsWorkspace* self);
VALA_EXTERN void widgets_term_toggle_select_all (WidgetsTerm* self);
VALA_EXTERN void widgets_workspace_close_other_terms (WidgetsWorkspace* self);
static Block56Data* block56_data_ref (Block56Data* _data56_);
static void block56_data_unref (void * _userdata_);
static void ___lambda208_ (Block56Data* _data56_,
                    WidgetsConfirmDialog* d);
VALA_EXTERN void widgets_workspace_close_term_except (WidgetsWorkspace* self,
                                          WidgetsTerm* except_term);
static void ____lambda208__widgets_confirm_dialog_confirm (WidgetsConfirmDialog* _sender,
                                                    gpointer self);
VALA_EXTERN void widgets_workspace_clean_unused_parent (WidgetsWorkspace* self,
                                            GtkContainer* container);
VALA_EXTERN void widgets_term_focus_term (WidgetsTerm* self);
static Block57Data* block57_data_ref (Block57Data* _data57_);
static void block57_data_unref (void * _userdata_);
VALA_EXTERN void widgets_workspace_split (WidgetsWorkspace* self,
                              GtkOrientation orientation);
static gboolean ___lambda204_ (Block57Data* _data57_);
VALA_EXTERN void widgets_term_login_server (WidgetsTerm* self,
                                const gchar* info);
static gboolean ____lambda204__gsource_func (gpointer self);
VALA_EXTERN void widgets_workspace_split_horizontal (WidgetsWorkspace* self);
static Block58Data* block58_data_ref (Block58Data* _data58_);
static void block58_data_unref (void * _userdata_);
static gboolean ___lambda205_ (Block58Data* _data58_);
static gboolean ____lambda205__gsource_func (gpointer self);
static Block59Data* block59_data_ref (Block59Data* _data59_);
static void block59_data_unref (void * _userdata_);
static gboolean __lambda197_ (Block59Data* _data59_,
                       GtkWidget* w,
                       cairo_t* cr);
VALA_EXTERN void utils_propagate_draw (GtkContainer* widget,
                           cairo_t* cr);
VALA_EXTERN gboolean widgets_config_window_is_light_theme (WidgetsConfigWindow* self);
VALA_EXTERN GType config_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (ConfigConfig, g_object_unref)
VALA_EXTERN void utils_hex_to_rgba (const gchar* hex_color,
                        gdouble alpha,
                        GdkRGBA* result);
VALA_EXTERN void utils_set_context_color (cairo_t* cr,
                              GdkRGBA* color);
VALA_EXTERN void draw_draw_rectangle (cairo_t* cr,
                          gint x,
                          gint y,
                          gint w,
                          gint h,
                          gboolean fill);
static gboolean ___lambda197__gtk_widget_draw (GtkWidget* _sender,
                                        cairo_t* cr,
                                        gpointer self);
VALA_EXTERN void widgets_workspace_select_left_window (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_select_horizontal_terminal (WidgetsWorkspace* self,
                                                   gboolean left);
VALA_EXTERN void widgets_workspace_highlight_select_window (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_select_right_window (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_select_up_window (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_select_vertical_terminal (WidgetsWorkspace* self,
                                                 gboolean up);
VALA_EXTERN void widgets_workspace_select_down_window (WidgetsWorkspace* self);
VALA_EXTERN WidgetsHighlightFrame* widgets_highlight_frame_new (void);
VALA_EXTERN WidgetsHighlightFrame* widgets_highlight_frame_construct (GType object_type);
static gboolean ____lambda206_ (WidgetsWorkspace* self);
static gboolean _____lambda206__gsource_func (gpointer self);
static guint* _uint_dup (guint* self);
VALA_EXTERN GeeArrayList* widgets_workspace_find_intersects_horizontal_terminals (WidgetsWorkspace* self,
                                                                      GtkAllocation* rect,
                                                                      gboolean left);
VALA_EXTERN void utils_get_origin_allocation (GtkWidget* w,
                                  GtkAllocation* result);
VALA_EXTERN GeeArrayList* widgets_workspace_find_intersects_vertical_terminals (WidgetsWorkspace* self,
                                                                    GtkAllocation* rect,
                                                                    gboolean up);
VALA_EXTERN void widgets_workspace_search (WidgetsWorkspace* self,
                               const gchar* search_text);
VALA_EXTERN void widgets_workspace_remove_remote_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_remove_theme_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_remove_encoding_panel (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_remove_command_panel (WidgetsWorkspace* self);
VALA_EXTERN WidgetsSearchPanel* widgets_search_panel_new (WidgetsConfigWindow* config_window,
                                              WidgetsTerm* term,
                                              const gchar* init_search_text);
VALA_EXTERN WidgetsSearchPanel* widgets_search_panel_construct (GType object_type,
                                                    WidgetsConfigWindow* config_window,
                                                    WidgetsTerm* term,
                                                    const gchar* init_search_text);
static void ___lambda196_ (WidgetsWorkspace* self,
                    WidgetsSearchPanel* w);
static void ____lambda196__widgets_search_panel_quit_search (WidgetsSearchPanel* _sender,
                                                      gpointer self);
VALA_EXTERN GType widgets_entry_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsEntry, g_object_unref)
VALA_EXTERN GType widgets_click_event_box_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsClickEventBox, g_object_unref)
VALA_EXTERN GType widgets_image_button_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WidgetsImageButton, g_object_unref)
VALA_EXTERN void widgets_workspace_toggle_remote_panel (WidgetsWorkspace* self,
                                            WidgetsWorkspace* workspace);
VALA_EXTERN void widgets_workspace_show_remote_panel (WidgetsWorkspace* self,
                                          WidgetsWorkspace* workspace);
VALA_EXTERN void widgets_workspace_toggle_command_panel (WidgetsWorkspace* self,
                                             WidgetsWorkspace* workspace);
VALA_EXTERN void widgets_workspace_show_command_panel (WidgetsWorkspace* self,
                                           WidgetsWorkspace* workspace);
VALA_EXTERN WidgetsRemotePanel* widgets_remote_panel_new (WidgetsWorkspace* space,
                                              WidgetsWorkspaceManager* manager);
VALA_EXTERN WidgetsRemotePanel* widgets_remote_panel_construct (GType object_type,
                                                    WidgetsWorkspace* space,
                                                    WidgetsWorkspaceManager* manager);
VALA_EXTERN void animation_animate_timer_reset (AnimationAnimateTimer* self,
                                    gint temp_speed);
VALA_EXTERN WidgetsCommandPanel* widgets_command_panel_new (WidgetsWorkspace* space,
                                                WidgetsWorkspaceManager* manager);
VALA_EXTERN WidgetsCommandPanel* widgets_command_panel_construct (GType object_type,
                                                      WidgetsWorkspace* space,
                                                      WidgetsWorkspaceManager* manager);
VALA_EXTERN void widgets_workspace_show_encoding_panel (WidgetsWorkspace* self,
                                            WidgetsWorkspace* workspace);
VALA_EXTERN WidgetsEncodingPanel* widgets_encoding_panel_new (WidgetsWorkspace* space,
                                                  WidgetsWorkspaceManager* manager,
                                                  WidgetsTerm* term);
VALA_EXTERN WidgetsEncodingPanel* widgets_encoding_panel_construct (GType object_type,
                                                        WidgetsWorkspace* space,
                                                        WidgetsWorkspaceManager* manager,
                                                        WidgetsTerm* term);
VALA_EXTERN void animation_animate_timer_stop (AnimationAnimateTimer* self);
VALA_EXTERN void widgets_workspace_show_theme_panel (WidgetsWorkspace* self,
                                         WidgetsWorkspace* workspace);
VALA_EXTERN WidgetsThemePanel* widgets_theme_panel_new (WidgetsWorkspace* space,
                                            WidgetsWorkspaceManager* manager);
VALA_EXTERN WidgetsThemePanel* widgets_theme_panel_construct (GType object_type,
                                                  WidgetsWorkspace* space,
                                                  WidgetsWorkspaceManager* manager);
VALA_EXTERN void widgets_workspace_select_focus_terminal (WidgetsWorkspace* self);
static void widgets_workspace_resize_workspace (WidgetsWorkspace* self,
                                         WidgetsTerm* term,
                                         WidgetsWorkspaceWorkspaceResizeKey key);
static gboolean widgets_workspace_is_paned_correct (WidgetsWorkspace* self,
                                             GtkPaned* paned,
                                             WidgetsWorkspaceWorkspaceResizeKey key);
VALA_EXTERN void widgets_workspace_resize_workspace_left (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_resize_workspace_right (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_resize_workspace_up (WidgetsWorkspace* self);
VALA_EXTERN void widgets_workspace_resize_workspace_down (WidgetsWorkspace* self);
static void widgets_workspace_remove_panel (WidgetsWorkspace* self,
                                     GtkWidget* panel);
static void widgets_workspace_hide_panel (WidgetsWorkspace* self,
                                   GtkWidget* panel,
                                   gint panel_width,
                                   AnimationAnimateTimer* timer);
static void g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure,
                                               GValue * return_value,
                                               guint n_param_values,
                                               const GValue * param_values,
                                               gpointer invocation_hint,
                                               gpointer marshal_data);
static void widgets_workspace_finalize (GObject * obj);
static GType widgets_workspace_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static GType
widgets_workspace_workspace_resize_key_get_type_once (void)
{
	static const GEnumValue values[] = {{WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_LEFT, "WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_LEFT", "left"}, {WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_RIGHT, "WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_RIGHT", "right"}, {WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_UP, "WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_UP", "up"}, {WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_DOWN, "WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_DOWN", "down"}, {0, NULL, NULL}};
	GType widgets_workspace_workspace_resize_key_type_id;
	widgets_workspace_workspace_resize_key_type_id = g_enum_register_static ("WidgetsWorkspaceWorkspaceResizeKey", values);
	return widgets_workspace_workspace_resize_key_type_id;
}

static GType
widgets_workspace_workspace_resize_key_get_type (void)
{
	static volatile gsize widgets_workspace_workspace_resize_key_type_id__once = 0;
	if (g_once_init_enter (&widgets_workspace_workspace_resize_key_type_id__once)) {
		GType widgets_workspace_workspace_resize_key_type_id;
		widgets_workspace_workspace_resize_key_type_id = widgets_workspace_workspace_resize_key_get_type_once ();
		g_once_init_leave (&widgets_workspace_workspace_resize_key_type_id__once, widgets_workspace_workspace_resize_key_type_id);
	}
	return widgets_workspace_workspace_resize_key_type_id__once;
}

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

static gdouble
_animation_animate_timer_ease_out_quint_animation_animate_timer_easing_func (gdouble x,
                                                                             gpointer self)
{
	gdouble result;
	result = animation_animate_timer_ease_out_quint (x);
	return result;
}

static void
_widgets_workspace_remote_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                              gdouble progress,
                                                                              gpointer self)
{
	widgets_workspace_remote_panel_show_animate ((WidgetsWorkspace*) self, progress);
}

static gdouble
_animation_animate_timer_ease_in_quint_animation_animate_timer_easing_func (gdouble x,
                                                                            gpointer self)
{
	gdouble result;
	result = animation_animate_timer_ease_in_quint (x);
	return result;
}

static void
_widgets_workspace_remote_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                              gdouble progress,
                                                                              gpointer self)
{
	widgets_workspace_remote_panel_hide_animate ((WidgetsWorkspace*) self, progress);
}

static void
_widgets_workspace_theme_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                             gdouble progress,
                                                                             gpointer self)
{
	widgets_workspace_theme_panel_show_animate ((WidgetsWorkspace*) self, progress);
}

static void
_widgets_workspace_theme_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                             gdouble progress,
                                                                             gpointer self)
{
	widgets_workspace_theme_panel_hide_animate ((WidgetsWorkspace*) self, progress);
}

static void
_widgets_workspace_encoding_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                gdouble progress,
                                                                                gpointer self)
{
	widgets_workspace_encoding_panel_show_animate ((WidgetsWorkspace*) self, progress);
}

static void
_widgets_workspace_encoding_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                                gdouble progress,
                                                                                gpointer self)
{
	widgets_workspace_encoding_panel_hide_animate ((WidgetsWorkspace*) self, progress);
}

static void
_widgets_workspace_command_panel_show_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                               gdouble progress,
                                                                               gpointer self)
{
	widgets_workspace_command_panel_show_animate ((WidgetsWorkspace*) self, progress);
}

static void
_widgets_workspace_command_panel_hide_animate_animation_animate_timer_animate (AnimationAnimateTimer* _sender,
                                                                               gdouble progress,
                                                                               gpointer self)
{
	widgets_workspace_command_panel_hide_animate ((WidgetsWorkspace*) self, progress);
}

WidgetsWorkspace*
widgets_workspace_construct (GType object_type,
                             gint workspace_index,
                             const gchar* work_directory,
                             WidgetsWorkspaceManager* manager)
{
	WidgetsWorkspace * self = NULL;
	GeeArrayList* _tmp0_;
	WidgetsWorkspaceManager* _tmp1_;
	AnimationAnimateTimer* _tmp2_;
	AnimationAnimateTimer* _tmp3_;
	AnimationAnimateTimer* _tmp4_;
	AnimationAnimateTimer* _tmp5_;
	AnimationAnimateTimer* _tmp6_;
	AnimationAnimateTimer* _tmp7_;
	AnimationAnimateTimer* _tmp8_;
	AnimationAnimateTimer* _tmp9_;
	AnimationAnimateTimer* _tmp10_;
	AnimationAnimateTimer* _tmp11_;
	AnimationAnimateTimer* _tmp12_;
	AnimationAnimateTimer* _tmp13_;
	AnimationAnimateTimer* _tmp14_;
	AnimationAnimateTimer* _tmp15_;
	AnimationAnimateTimer* _tmp16_;
	AnimationAnimateTimer* _tmp17_;
	WidgetsTerm* term = NULL;
	WidgetsTerm* _tmp18_;
	WidgetsWorkspaceManager* _tmp19_;
	g_return_val_if_fail (manager != NULL, NULL);
	self = (WidgetsWorkspace*) g_object_new (object_type, NULL);
	self->index = workspace_index;
	_tmp0_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->term_list);
	self->term_list = _tmp0_;
	_tmp1_ = _g_object_ref0 (manager);
	_g_object_unref0 (self->workspace_manager);
	self->workspace_manager = _tmp1_;
	_tmp2_ = animation_animate_timer_new (_animation_animate_timer_ease_out_quint_animation_animate_timer_easing_func, NULL, self->show_slider_interval);
	_g_object_unref0 (self->remote_panel_show_timer);
	self->remote_panel_show_timer = _tmp2_;
	_tmp3_ = self->remote_panel_show_timer;
	g_signal_connect_object (_tmp3_, "animate", (GCallback) _widgets_workspace_remote_panel_show_animate_animation_animate_timer_animate, self, 0);
	_tmp4_ = animation_animate_timer_new (_animation_animate_timer_ease_in_quint_animation_animate_timer_easing_func, NULL, self->hide_slider_interval);
	_g_object_unref0 (self->remote_panel_hide_timer);
	self->remote_panel_hide_timer = _tmp4_;
	_tmp5_ = self->remote_panel_hide_timer;
	g_signal_connect_object (_tmp5_, "animate", (GCallback) _widgets_workspace_remote_panel_hide_animate_animation_animate_timer_animate, self, 0);
	_tmp6_ = animation_animate_timer_new (_animation_animate_timer_ease_out_quint_animation_animate_timer_easing_func, NULL, self->show_slider_interval);
	_g_object_unref0 (self->theme_panel_show_timer);
	self->theme_panel_show_timer = _tmp6_;
	_tmp7_ = self->theme_panel_show_timer;
	g_signal_connect_object (_tmp7_, "animate", (GCallback) _widgets_workspace_theme_panel_show_animate_animation_animate_timer_animate, self, 0);
	_tmp8_ = animation_animate_timer_new (_animation_animate_timer_ease_in_quint_animation_animate_timer_easing_func, NULL, self->hide_slider_interval);
	_g_object_unref0 (self->theme_panel_hide_timer);
	self->theme_panel_hide_timer = _tmp8_;
	_tmp9_ = self->theme_panel_hide_timer;
	g_signal_connect_object (_tmp9_, "animate", (GCallback) _widgets_workspace_theme_panel_hide_animate_animation_animate_timer_animate, self, 0);
	_tmp10_ = animation_animate_timer_new (_animation_animate_timer_ease_out_quint_animation_animate_timer_easing_func, NULL, self->show_slider_interval);
	_g_object_unref0 (self->encoding_panel_show_timer);
	self->encoding_panel_show_timer = _tmp10_;
	_tmp11_ = self->encoding_panel_show_timer;
	g_signal_connect_object (_tmp11_, "animate", (GCallback) _widgets_workspace_encoding_panel_show_animate_animation_animate_timer_animate, self, 0);
	_tmp12_ = animation_animate_timer_new (_animation_animate_timer_ease_in_quint_animation_animate_timer_easing_func, NULL, self->hide_slider_interval);
	_g_object_unref0 (self->encoding_panel_hide_timer);
	self->encoding_panel_hide_timer = _tmp12_;
	_tmp13_ = self->encoding_panel_hide_timer;
	g_signal_connect_object (_tmp13_, "animate", (GCallback) _widgets_workspace_encoding_panel_hide_animate_animation_animate_timer_animate, self, 0);
	_tmp14_ = animation_animate_timer_new (_animation_animate_timer_ease_out_quint_animation_animate_timer_easing_func, NULL, self->show_slider_interval);
	_g_object_unref0 (self->command_panel_show_timer);
	self->command_panel_show_timer = _tmp14_;
	_tmp15_ = self->command_panel_show_timer;
	g_signal_connect_object (_tmp15_, "animate", (GCallback) _widgets_workspace_command_panel_show_animate_animation_animate_timer_animate, self, 0);
	_tmp16_ = animation_animate_timer_new (_animation_animate_timer_ease_in_quint_animation_animate_timer_easing_func, NULL, self->hide_slider_interval);
	_g_object_unref0 (self->command_panel_hide_timer);
	self->command_panel_hide_timer = _tmp16_;
	_tmp17_ = self->command_panel_hide_timer;
	g_signal_connect_object (_tmp17_, "animate", (GCallback) _widgets_workspace_command_panel_hide_animate_animation_animate_timer_animate, self, 0);
	_tmp18_ = widgets_workspace_new_term (self, TRUE, work_directory);
	term = _tmp18_;
	_tmp19_ = self->workspace_manager;
	widgets_workspace_manager_set_first_term (_tmp19_, term);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) term);
	_g_object_unref0 (term);
	return self;
}

WidgetsWorkspace*
widgets_workspace_new (gint workspace_index,
                       const gchar* work_directory,
                       WidgetsWorkspaceManager* manager)
{
	return widgets_workspace_construct (WIDGETS_TYPE_WORKSPACE, workspace_index, work_directory, manager);
}

static Block53Data*
block53_data_ref (Block53Data* _data53_)
{
	g_atomic_int_inc (&_data53_->_ref_count_);
	return _data53_;
}

static void
block53_data_unref (void * _userdata_)
{
	Block53Data* _data53_;
	_data53_ = (Block53Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data53_->_ref_count_)) {
		WidgetsWorkspace* self;
		self = _data53_->self;
		_g_object_unref0 (_data53_->term);
		_g_object_unref0 (self);
		g_slice_free (Block53Data, _data53_);
	}
}

static void
__lambda198_ (WidgetsWorkspace* self,
              WidgetsTerm* term,
              const gchar* dir)
{
	g_return_if_fail (term != NULL);
	g_return_if_fail (dir != NULL);
	g_signal_emit (self, widgets_workspace_signals[WIDGETS_WORKSPACE_CHANGE_TITLE_SIGNAL], 0, self->index, dir);
}

static void
___lambda198__widgets_term_change_title (WidgetsTerm* _sender,
                                         const gchar* dir,
                                         gpointer self)
{
	__lambda198_ ((WidgetsWorkspace*) self, _sender, dir);
}

static void
__lambda199_ (WidgetsWorkspace* self,
              WidgetsTerm* term)
{
	g_return_if_fail (term != NULL);
	g_signal_emit (self, widgets_workspace_signals[WIDGETS_WORKSPACE_HIGHLIGHT_TAB_SIGNAL], 0, self->index);
}

static void
___lambda199__widgets_term_highlight_tab (WidgetsTerm* _sender,
                                          gpointer self)
{
	__lambda199_ ((WidgetsWorkspace*) self, _sender);
}

static void
__lambda200_ (WidgetsWorkspace* self,
              WidgetsTerm* term)
{
	g_return_if_fail (term != NULL);
	widgets_workspace_remove_all_panels (self);
	widgets_workspace_close_term (self, term);
}

static void
___lambda200__widgets_term_exit (WidgetsTerm* _sender,
                                 gpointer self)
{
	__lambda200_ ((WidgetsWorkspace*) self, _sender);
}

static void
__lambda201_ (WidgetsWorkspace* self,
              WidgetsTerm* w,
              gint status)
{
	g_return_if_fail (w != NULL);
	widgets_workspace_reset_term (self, status);
}

static void
___lambda201__widgets_term_exit_with_bad_code (WidgetsTerm* _sender,
                                               gint exit_status,
                                               gpointer self)
{
	__lambda201_ ((WidgetsWorkspace*) self, _sender, exit_status);
}

static gboolean
__lambda203_ (Block53Data* _data53_,
              GtkWidget* w,
              GdkEventButton* e)
{
	WidgetsWorkspace* self;
	gboolean result;
	self = _data53_->self;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (e != NULL, FALSE);
	widgets_workspace_remove_search_panel (self);
	widgets_workspace_hide_theme_panel (self);
	widgets_workspace_hide_remote_panel (self);
	widgets_workspace_hide_encoding_panel (self);
	widgets_workspace_hide_command_panel (self);
	widgets_workspace_update_focus_terminal (self, _data53_->term);
	result = FALSE;
	return result;
}

static gboolean
___lambda203__gtk_widget_button_press_event (GtkWidget* _sender,
                                             GdkEventButton* event,
                                             gpointer self)
{
	gboolean result;
	result = __lambda203_ (self, _sender, event);
	return result;
}

WidgetsTerm*
widgets_workspace_new_term (WidgetsWorkspace* self,
                            gboolean first_term,
                            const gchar* work_directory)
{
	Block53Data* _data53_;
	WidgetsWorkspaceManager* _tmp0_;
	WidgetsTerm* _tmp1_;
	VteTerminal* _tmp2_;
	GeeArrayList* _tmp3_;
	WidgetsTerm* _tmp4_;
	WidgetsTerm* result;
	g_return_val_if_fail (self != NULL, NULL);
	_data53_ = g_slice_new0 (Block53Data);
	_data53_->_ref_count_ = 1;
	_data53_->self = g_object_ref (self);
	_tmp0_ = self->workspace_manager;
	_tmp1_ = widgets_term_new (first_term, work_directory, _tmp0_);
	g_object_ref_sink (_tmp1_);
	_data53_->term = _tmp1_;
	g_signal_connect_object (_data53_->term, "change-title", (GCallback) ___lambda198__widgets_term_change_title, self, 0);
	g_signal_connect_object (_data53_->term, "highlight-tab", (GCallback) ___lambda199__widgets_term_highlight_tab, self, 0);
	g_signal_connect_object (_data53_->term, "exit", (GCallback) ___lambda200__widgets_term_exit, self, 0);
	g_signal_connect_object (_data53_->term, "exit-with-bad-code", (GCallback) ___lambda201__widgets_term_exit_with_bad_code, self, 0);
	_tmp2_ = _data53_->term->term;
	g_signal_connect_data ((GtkWidget*) _tmp2_, "button-press-event", (GCallback) ___lambda203__gtk_widget_button_press_event, block53_data_ref (_data53_), (GClosureNotify) block53_data_unref, 0);
	_tmp3_ = self->term_list;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, _data53_->term);
	_tmp4_ = _g_object_ref0 (_data53_->term);
	result = _tmp4_;
	block53_data_unref (_data53_);
	_data53_ = NULL;
	return result;
}

static Block54Data*
block54_data_ref (Block54Data* _data54_)
{
	g_atomic_int_inc (&_data54_->_ref_count_);
	return _data54_;
}

static void
block54_data_unref (void * _userdata_)
{
	Block54Data* _data54_;
	_data54_ = (Block54Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data54_->_ref_count_)) {
		WidgetsWorkspace* self;
		self = _data54_->self;
		_g_free0 (_data54_->term_dir);
		_g_object_unref0 (self);
		g_slice_free (Block54Data, _data54_);
	}
}

static gboolean
__lambda202_ (Block54Data* _data54_)
{
	WidgetsWorkspace* self;
	gint _tmp0_;
	gint _tmp1_;
	gboolean result;
	self = _data54_->self;
	_tmp0_ = strlen (_data54_->term_dir);
	_tmp1_ = _tmp0_;
	if (_tmp1_ > 0) {
		WidgetsTerm* new_focus_term = NULL;
		WidgetsTerm* _tmp2_;
		gchar* switch_command = NULL;
		gchar* _tmp3_;
		WidgetsTerm* _tmp4_;
		VteTerminal* _tmp5_;
		const gchar* _tmp6_;
		gint _tmp7_ = 0;
		guint8* _tmp8_;
		guint8* _tmp9_;
		gint _tmp9__length1;
		_tmp2_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
		new_focus_term = _tmp2_;
		_tmp3_ = g_strdup_printf ("cd %s\n", _data54_->term_dir);
		switch_command = _tmp3_;
		_tmp4_ = new_focus_term;
		_tmp5_ = _tmp4_->term;
		_tmp6_ = switch_command;
		_tmp8_ = utils_to_raw_data (_tmp6_, &_tmp7_);
		_tmp9_ = _tmp8_;
		_tmp9__length1 = _tmp7_;
		vte_terminal_feed_child (_tmp5_, _tmp9_, (gssize) _tmp7_);
		_tmp9_ = (g_free (_tmp9_), NULL);
		_g_free0 (switch_command);
		_g_object_unref0 (new_focus_term);
	}
	result = FALSE;
	return result;
}

static gboolean
___lambda202__gsource_func (gpointer self)
{
	gboolean result;
	result = __lambda202_ (self);
	return result;
}

void
widgets_workspace_reset_term (WidgetsWorkspace* self,
                              gint exit_status)
{
	Block54Data* _data54_;
	WidgetsTerm* focus_term = NULL;
	WidgetsTerm* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (self != NULL);
	_data54_ = g_slice_new0 (Block54Data);
	_data54_->_ref_count_ = 1;
	_data54_->self = g_object_ref (self);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	focus_term = _tmp0_;
	_tmp1_ = widgets_term_get_cwd (focus_term);
	_data54_->term_dir = _tmp1_;
	widgets_workspace_split_vertical (self);
	widgets_workspace_close_term (self, focus_term);
	g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 500, ___lambda202__gsource_func, block54_data_ref (_data54_), block54_data_unref);
	g_print ("Reset terminal after got exit status: %i\n", exit_status);
	_g_object_unref0 (focus_term);
	block54_data_unref (_data54_);
	_data54_ = NULL;
}

gboolean
widgets_workspace_has_active_term (WidgetsWorkspace* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	{
		GeeArrayList* _term_list = NULL;
		GeeArrayList* _tmp0_;
		gint _term_size = 0;
		GeeArrayList* _tmp1_;
		gint _tmp2_;
		gint _tmp3_;
		gint _term_index = 0;
		_tmp0_ = self->term_list;
		_term_list = _tmp0_;
		_tmp1_ = _term_list;
		_tmp2_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp1_);
		_tmp3_ = _tmp2_;
		_term_size = _tmp3_;
		_term_index = -1;
		while (TRUE) {
			gint _tmp4_;
			gint _tmp5_;
			WidgetsTerm* term = NULL;
			GeeArrayList* _tmp6_;
			gpointer _tmp7_;
			WidgetsTerm* _tmp8_;
			_term_index = _term_index + 1;
			_tmp4_ = _term_index;
			_tmp5_ = _term_size;
			if (!(_tmp4_ < _tmp5_)) {
				break;
			}
			_tmp6_ = _term_list;
			_tmp7_ = gee_abstract_list_get ((GeeAbstractList*) _tmp6_, _term_index);
			term = (WidgetsTerm*) _tmp7_;
			_tmp8_ = term;
			if (widgets_term_has_foreground_process (_tmp8_)) {
				result = TRUE;
				_g_object_unref0 (term);
				return result;
			}
			_g_object_unref0 (term);
		}
	}
	result = FALSE;
	return result;
}

static Block55Data*
block55_data_ref (Block55Data* _data55_)
{
	g_atomic_int_inc (&_data55_->_ref_count_);
	return _data55_;
}

static void
block55_data_unref (void * _userdata_)
{
	Block55Data* _data55_;
	_data55_ = (Block55Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data55_->_ref_count_)) {
		WidgetsWorkspace* self;
		self = _data55_->self;
		_g_object_unref0 (_data55_->focus_term);
		_g_object_unref0 (self);
		g_slice_free (Block55Data, _data55_);
	}
}

static void
___lambda207_ (Block55Data* _data55_,
               WidgetsConfirmDialog* d)
{
	WidgetsWorkspace* self;
	WidgetsTerm* _tmp0_;
	self = _data55_->self;
	g_return_if_fail (d != NULL);
	_tmp0_ = _data55_->focus_term;
	widgets_workspace_close_term (self, _tmp0_);
}

static void
____lambda207__widgets_confirm_dialog_confirm (WidgetsConfirmDialog* _sender,
                                               gpointer self)
{
	___lambda207_ (self, _sender);
}

void
widgets_workspace_close_focus_term (WidgetsWorkspace* self)
{
	Block55Data* _data55_;
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	_data55_ = g_slice_new0 (Block55Data);
	_data55_->_ref_count_ = 1;
	_data55_->self = g_object_ref (self);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_data55_->focus_term = _tmp0_;
	_tmp1_ = _data55_->focus_term;
	if (widgets_term_has_foreground_process (_tmp1_)) {
		WidgetsConfirmDialog* dialog = NULL;
		WidgetsTerm* _tmp2_;
		GtkWidget* _tmp3_;
		WidgetsConfirmDialog* _tmp4_;
		WidgetsConfirmDialog* _tmp5_;
		_tmp2_ = _data55_->focus_term;
		_tmp3_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp2_);
		_tmp4_ = widgets_create_running_confirm_dialog (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		dialog = _tmp4_;
		_tmp5_ = dialog;
		g_signal_connect_data (_tmp5_, "confirm", (GCallback) ____lambda207__widgets_confirm_dialog_confirm, block55_data_ref (_data55_), (GClosureNotify) block55_data_unref, 0);
		_g_object_unref0 (dialog);
	} else {
		WidgetsTerm* _tmp6_;
		_tmp6_ = _data55_->focus_term;
		widgets_workspace_close_term (self, _tmp6_);
	}
	block55_data_unref (_data55_);
	_data55_ = NULL;
}

void
widgets_workspace_toggle_select_all (WidgetsWorkspace* self)
{
	WidgetsTerm* focus_term = NULL;
	WidgetsTerm* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	focus_term = _tmp0_;
	widgets_term_toggle_select_all (focus_term);
	_g_object_unref0 (focus_term);
}

static Block56Data*
block56_data_ref (Block56Data* _data56_)
{
	g_atomic_int_inc (&_data56_->_ref_count_);
	return _data56_;
}

static void
block56_data_unref (void * _userdata_)
{
	Block56Data* _data56_;
	_data56_ = (Block56Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data56_->_ref_count_)) {
		WidgetsWorkspace* self;
		self = _data56_->self;
		_g_object_unref0 (_data56_->focus_term);
		_g_object_unref0 (self);
		g_slice_free (Block56Data, _data56_);
	}
}

static void
___lambda208_ (Block56Data* _data56_,
               WidgetsConfirmDialog* d)
{
	WidgetsWorkspace* self;
	WidgetsTerm* _tmp0_;
	self = _data56_->self;
	g_return_if_fail (d != NULL);
	_tmp0_ = _data56_->focus_term;
	widgets_workspace_close_term_except (self, _tmp0_);
}

static void
____lambda208__widgets_confirm_dialog_confirm (WidgetsConfirmDialog* _sender,
                                               gpointer self)
{
	___lambda208_ (self, _sender);
}

void
widgets_workspace_close_other_terms (WidgetsWorkspace* self)
{
	Block56Data* _data56_;
	WidgetsTerm* _tmp0_;
	gboolean has_active_process = FALSE;
	g_return_if_fail (self != NULL);
	_data56_ = g_slice_new0 (Block56Data);
	_data56_->_ref_count_ = 1;
	_data56_->self = g_object_ref (self);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_data56_->focus_term = _tmp0_;
	has_active_process = FALSE;
	{
		GeeArrayList* _term_list = NULL;
		GeeArrayList* _tmp1_;
		gint _term_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _term_index = 0;
		_tmp1_ = self->term_list;
		_term_list = _tmp1_;
		_tmp2_ = _term_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_term_size = _tmp4_;
		_term_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			WidgetsTerm* term = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			WidgetsTerm* _tmp9_;
			WidgetsTerm* _tmp10_;
			_term_index = _term_index + 1;
			_tmp5_ = _term_index;
			_tmp6_ = _term_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _term_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _term_index);
			term = (WidgetsTerm*) _tmp8_;
			_tmp9_ = term;
			_tmp10_ = _data56_->focus_term;
			if (_tmp9_ != _tmp10_) {
				WidgetsTerm* _tmp11_;
				_tmp11_ = term;
				if (widgets_term_has_foreground_process (_tmp11_)) {
					has_active_process = TRUE;
					_g_object_unref0 (term);
					break;
				}
			}
			_g_object_unref0 (term);
		}
	}
	if (has_active_process) {
		WidgetsConfirmDialog* dialog = NULL;
		WidgetsTerm* _tmp12_;
		GtkWidget* _tmp13_;
		WidgetsConfirmDialog* _tmp14_;
		WidgetsConfirmDialog* _tmp15_;
		_tmp12_ = _data56_->focus_term;
		_tmp13_ = gtk_widget_get_toplevel ((GtkWidget*) _tmp12_);
		_tmp14_ = widgets_create_running_confirm_dialog (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		dialog = _tmp14_;
		_tmp15_ = dialog;
		g_signal_connect_data (_tmp15_, "confirm", (GCallback) ____lambda208__widgets_confirm_dialog_confirm, block56_data_ref (_data56_), (GClosureNotify) block56_data_unref, 0);
		_g_object_unref0 (dialog);
	} else {
		WidgetsTerm* _tmp16_;
		_tmp16_ = _data56_->focus_term;
		widgets_workspace_close_term_except (self, _tmp16_);
	}
	block56_data_unref (_data56_);
	_data56_ = NULL;
}

void
widgets_workspace_close_term_except (WidgetsWorkspace* self,
                                     WidgetsTerm* except_term)
{
	GtkWidget* parent_widget = NULL;
	GtkContainer* _tmp0_;
	GtkWidget* _tmp1_;
	GtkWidget* _tmp2_;
	GList* _tmp3_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (except_term != NULL);
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) except_term);
	_tmp1_ = _g_object_ref0 ((GtkWidget*) _tmp0_);
	parent_widget = _tmp1_;
	_tmp2_ = parent_widget;
	gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_container_get_type (), GtkContainer), (GtkWidget*) except_term);
	_tmp3_ = gtk_container_get_children ((GtkContainer*) self);
	{
		GList* w_collection = NULL;
		GList* w_it = NULL;
		w_collection = _tmp3_;
		for (w_it = w_collection; w_it != NULL; w_it = w_it->next) {
			GtkWidget* _tmp4_;
			GtkWidget* w = NULL;
			_tmp4_ = _g_object_ref0 ((GtkWidget*) w_it->data);
			w = _tmp4_;
			{
				GtkWidget* _tmp5_;
				_tmp5_ = w;
				gtk_widget_destroy (_tmp5_);
				_g_object_unref0 (w);
			}
		}
		(w_collection == NULL) ? NULL : (w_collection = (g_list_free (w_collection), NULL));
	}
	_tmp6_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->term_list);
	self->term_list = _tmp6_;
	_tmp7_ = self->term_list;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, except_term);
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) except_term);
	_g_object_unref0 (parent_widget);
}

void
widgets_workspace_close_term (WidgetsWorkspace* self,
                              WidgetsTerm* term)
{
	GtkContainer* parent_widget = NULL;
	GtkContainer* _tmp0_;
	GtkContainer* _tmp1_;
	GeeArrayList* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (term != NULL);
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) term);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	parent_widget = _tmp1_;
	gtk_container_remove (parent_widget, (GtkWidget*) term);
	gtk_widget_destroy ((GtkWidget*) term);
	_tmp2_ = self->term_list;
	gee_abstract_collection_remove ((GeeAbstractCollection*) _tmp2_, term);
	widgets_workspace_clean_unused_parent (self, parent_widget);
	_g_object_unref0 (parent_widget);
}

void
widgets_workspace_clean_unused_parent (WidgetsWorkspace* self,
                                       GtkContainer* container)
{
	GList* _tmp0_;
	GList* _tmp1_;
	gboolean _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (container != NULL);
	_tmp0_ = gtk_container_get_children (container);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_list_length (_tmp1_) == ((guint) 0);
	(_tmp1_ == NULL) ? NULL : (_tmp1_ = (g_list_free (_tmp1_), NULL));
	if (_tmp2_) {
		if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) container), WIDGETS_TYPE_WORKSPACE)) {
			g_signal_emit (self, widgets_workspace_signals[WIDGETS_WORKSPACE_EXIT_SIGNAL], 0, self->index);
		} else {
			GtkContainer* parent_widget = NULL;
			GtkContainer* _tmp3_;
			GtkContainer* _tmp4_;
			GtkContainer* _tmp5_;
			GtkContainer* _tmp6_;
			_tmp3_ = gtk_widget_get_parent ((GtkWidget*) container);
			_tmp4_ = _g_object_ref0 (_tmp3_);
			parent_widget = _tmp4_;
			_tmp5_ = parent_widget;
			gtk_container_remove (_tmp5_, (GtkWidget*) container);
			gtk_widget_destroy ((GtkWidget*) container);
			_tmp6_ = parent_widget;
			widgets_workspace_clean_unused_parent (self, _tmp6_);
			_g_object_unref0 (parent_widget);
		}
	} else {
		if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) container), gtk_paned_get_type ())) {
			GtkWidget* first_child = NULL;
			GList* _tmp7_;
			GList* _tmp8_;
			gconstpointer _tmp9_;
			GtkWidget* _tmp10_;
			GtkWidget* _tmp11_;
			GtkWidget* _tmp12_;
			_tmp7_ = gtk_container_get_children (container);
			_tmp8_ = _tmp7_;
			_tmp9_ = g_list_nth_data (_tmp8_, (guint) 0);
			_tmp10_ = _g_object_ref0 ((GtkWidget*) _tmp9_);
			_tmp11_ = _tmp10_;
			(_tmp8_ == NULL) ? NULL : (_tmp8_ = (g_list_free (_tmp8_), NULL));
			first_child = _tmp11_;
			_tmp12_ = first_child;
			if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp12_), gtk_paned_get_type ())) {
				GtkWidget* _tmp13_;
				_tmp13_ = first_child;
				widgets_workspace_clean_unused_parent (self, (GtkContainer*) G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, gtk_paned_get_type (), GtkPaned));
			} else {
				GtkWidget* _tmp14_;
				_tmp14_ = first_child;
				widgets_term_focus_term (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, WIDGETS_TYPE_TERM, WidgetsTerm));
			}
			_g_object_unref0 (first_child);
		}
	}
}

WidgetsTerm*
widgets_workspace_get_focus_term (WidgetsWorkspace* self,
                                  GtkContainer* container)
{
	GtkWidget* focus_child = NULL;
	GtkWidget* _tmp0_;
	GtkWidget* _tmp1_;
	WidgetsTerm* _tmp2_;
	WidgetsTerm* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (container != NULL, NULL);
	_tmp0_ = gtk_container_get_focus_child (container);
	_tmp1_ = _g_object_ref0 (_tmp0_);
	focus_child = _tmp1_;
	_tmp2_ = self->terminal_before_popup;
	if (_tmp2_ != NULL) {
		WidgetsTerm* _tmp3_;
		WidgetsTerm* _tmp4_;
		_tmp3_ = self->terminal_before_popup;
		_tmp4_ = _g_object_ref0 (_tmp3_);
		result = _tmp4_;
		_g_object_unref0 (focus_child);
		return result;
	} else {
		GtkWidget* _tmp5_;
		_tmp5_ = focus_child;
		if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp5_), WIDGETS_TYPE_TERM)) {
			GtkWidget* _tmp6_;
			WidgetsTerm* _tmp7_;
			_tmp6_ = focus_child;
			_tmp7_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, WIDGETS_TYPE_TERM, WidgetsTerm));
			result = _tmp7_;
			_g_object_unref0 (focus_child);
			return result;
		} else {
			GtkWidget* _tmp8_;
			WidgetsTerm* _tmp9_;
			_tmp8_ = focus_child;
			_tmp9_ = widgets_workspace_get_focus_term (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_container_get_type (), GtkContainer));
			result = _tmp9_;
			_g_object_unref0 (focus_child);
			return result;
		}
	}
}

static Block57Data*
block57_data_ref (Block57Data* _data57_)
{
	g_atomic_int_inc (&_data57_->_ref_count_);
	return _data57_;
}

static void
block57_data_unref (void * _userdata_)
{
	Block57Data* _data57_;
	_data57_ = (Block57Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data57_->_ref_count_)) {
		WidgetsWorkspace* self;
		self = _data57_->self;
		_g_free0 (_data57_->split_term_server_info);
		_g_object_unref0 (self);
		g_slice_free (Block57Data, _data57_);
	}
}

static gboolean
___lambda204_ (Block57Data* _data57_)
{
	WidgetsWorkspace* self;
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	const gchar* _tmp2_;
	gboolean result;
	self = _data57_->self;
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _data57_->split_term_server_info;
	widgets_term_login_server (_tmp1_, _tmp2_);
	_g_object_unref0 (_tmp1_);
	result = FALSE;
	return result;
}

static gboolean
____lambda204__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda204_ (self);
	return result;
}

void
widgets_workspace_split_vertical (WidgetsWorkspace* self)
{
	Block57Data* _data57_;
	WidgetsTerm* focus_term = NULL;
	WidgetsTerm* _tmp0_;
	gboolean _tmp1_ = FALSE;
	WidgetsTerm* _tmp2_;
	const gchar* _tmp3_;
	WidgetsTerm* _tmp8_;
	WidgetsTerm* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	_data57_ = g_slice_new0 (Block57Data);
	_data57_->_ref_count_ = 1;
	_data57_->self = g_object_ref (self);
	_data57_->split_term_server_info = NULL;
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	focus_term = _tmp0_;
	_tmp2_ = focus_term;
	_tmp3_ = _tmp2_->server_info;
	if (_tmp3_ != NULL) {
		WidgetsTerm* _tmp4_;
		_tmp4_ = focus_term;
		_tmp1_ = _tmp4_->login_remote_server;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		WidgetsTerm* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp5_ = focus_term;
		_tmp6_ = _tmp5_->server_info;
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (_data57_->split_term_server_info);
		_data57_->split_term_server_info = _tmp7_;
	}
	widgets_workspace_split (self, GTK_ORIENTATION_HORIZONTAL);
	_tmp8_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp9_ = _tmp8_;
	widgets_workspace_update_focus_terminal (self, _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = _data57_->split_term_server_info;
	if (_tmp10_ != NULL) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 50, ____lambda204__gsource_func, block57_data_ref (_data57_), block57_data_unref);
	}
	_g_object_unref0 (focus_term);
	block57_data_unref (_data57_);
	_data57_ = NULL;
}

static Block58Data*
block58_data_ref (Block58Data* _data58_)
{
	g_atomic_int_inc (&_data58_->_ref_count_);
	return _data58_;
}

static void
block58_data_unref (void * _userdata_)
{
	Block58Data* _data58_;
	_data58_ = (Block58Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data58_->_ref_count_)) {
		WidgetsWorkspace* self;
		self = _data58_->self;
		_g_free0 (_data58_->split_term_server_info);
		_g_object_unref0 (self);
		g_slice_free (Block58Data, _data58_);
	}
}

static gboolean
___lambda205_ (Block58Data* _data58_)
{
	WidgetsWorkspace* self;
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	const gchar* _tmp2_;
	gboolean result;
	self = _data58_->self;
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = _data58_->split_term_server_info;
	widgets_term_login_server (_tmp1_, _tmp2_);
	_g_object_unref0 (_tmp1_);
	result = FALSE;
	return result;
}

static gboolean
____lambda205__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda205_ (self);
	return result;
}

void
widgets_workspace_split_horizontal (WidgetsWorkspace* self)
{
	Block58Data* _data58_;
	WidgetsTerm* focus_term = NULL;
	WidgetsTerm* _tmp0_;
	gboolean _tmp1_ = FALSE;
	WidgetsTerm* _tmp2_;
	const gchar* _tmp3_;
	WidgetsTerm* _tmp8_;
	WidgetsTerm* _tmp9_;
	const gchar* _tmp10_;
	g_return_if_fail (self != NULL);
	_data58_ = g_slice_new0 (Block58Data);
	_data58_->_ref_count_ = 1;
	_data58_->self = g_object_ref (self);
	_data58_->split_term_server_info = NULL;
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	focus_term = _tmp0_;
	_tmp2_ = focus_term;
	_tmp3_ = _tmp2_->server_info;
	if (_tmp3_ != NULL) {
		WidgetsTerm* _tmp4_;
		_tmp4_ = focus_term;
		_tmp1_ = _tmp4_->login_remote_server;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		WidgetsTerm* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_;
		_tmp5_ = focus_term;
		_tmp6_ = _tmp5_->server_info;
		_tmp7_ = g_strdup (_tmp6_);
		_g_free0 (_data58_->split_term_server_info);
		_data58_->split_term_server_info = _tmp7_;
	}
	widgets_workspace_split (self, GTK_ORIENTATION_VERTICAL);
	_tmp8_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp9_ = _tmp8_;
	widgets_workspace_update_focus_terminal (self, _tmp9_);
	_g_object_unref0 (_tmp9_);
	_tmp10_ = _data58_->split_term_server_info;
	if (_tmp10_ != NULL) {
		g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 50, ____lambda205__gsource_func, block58_data_ref (_data58_), block58_data_unref);
	}
	_g_object_unref0 (focus_term);
	block58_data_unref (_data58_);
	_data58_ = NULL;
}

static Block59Data*
block59_data_ref (Block59Data* _data59_)
{
	g_atomic_int_inc (&_data59_->_ref_count_);
	return _data59_;
}

static void
block59_data_unref (void * _userdata_)
{
	Block59Data* _data59_;
	_data59_ = (Block59Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data59_->_ref_count_)) {
		WidgetsWorkspace* self;
		self = _data59_->self;
		_g_object_unref0 (self);
		g_slice_free (Block59Data, _data59_);
	}
}

static gboolean
__lambda197_ (Block59Data* _data59_,
              GtkWidget* w,
              cairo_t* cr)
{
	WidgetsWorkspace* self;
	GtkPaned* paned_widget = NULL;
	GtkPaned* _tmp0_;
	GtkPaned* _tmp1_;
	GtkAllocation rect = {0};
	GtkAllocation _tmp2_ = {0};
	gint pos = 0;
	GtkPaned* _tmp3_;
	gboolean _tmp4_ = FALSE;
	gboolean _tmp5_ = FALSE;
	GError* _inner_error0_ = NULL;
	gboolean result;
	self = _data59_->self;
	g_return_val_if_fail (w != NULL, FALSE);
	g_return_val_if_fail (cr != NULL, FALSE);
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (w, gtk_paned_get_type (), GtkPaned));
	paned_widget = _tmp0_;
	_tmp1_ = paned_widget;
	utils_propagate_draw ((GtkContainer*) _tmp1_, cr);
	gtk_widget_get_allocation (w, &_tmp2_);
	rect = _tmp2_;
	_tmp3_ = paned_widget;
	pos = gtk_paned_get_position (_tmp3_);
	if (pos != 0) {
		GtkPaned* _tmp6_;
		GtkWidget* _tmp7_;
		_tmp6_ = paned_widget;
		_tmp7_ = gtk_paned_get_child1 (_tmp6_);
		_tmp5_ = _tmp7_ != NULL;
	} else {
		_tmp5_ = FALSE;
	}
	if (_tmp5_) {
		GtkPaned* _tmp8_;
		GtkWidget* _tmp9_;
		_tmp8_ = paned_widget;
		_tmp9_ = gtk_paned_get_child2 (_tmp8_);
		_tmp4_ = _tmp9_ != NULL;
	} else {
		_tmp4_ = FALSE;
	}
	if (_tmp4_) {
		WidgetsConfigWindow* parent_window = NULL;
		GtkWidget* _tmp10_;
		WidgetsConfigWindow* _tmp11_;
		GdkRGBA paned_background_color = {0};
		cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
		_tmp10_ = gtk_widget_get_toplevel (w);
		_tmp11_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		parent_window = _tmp11_;
		{
			const gchar* _tmp12_ = NULL;
			WidgetsConfigWindow* _tmp13_;
			gdouble _tmp14_ = 0.0;
			WidgetsConfigWindow* _tmp15_;
			ConfigConfig* _tmp16_;
			GKeyFile* _tmp17_;
			GdkRGBA _tmp19_ = {0};
			GdkRGBA _tmp20_;
			_tmp13_ = parent_window;
			if (widgets_config_window_is_light_theme (_tmp13_)) {
				_tmp12_ = "#bbbbbb";
			} else {
				_tmp12_ = "#111111";
			}
			_tmp15_ = parent_window;
			_tmp16_ = _tmp15_->config;
			_tmp17_ = _tmp16_->config_file;
			_tmp14_ = g_key_file_get_double (_tmp17_, "general", "opacity", &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				gboolean _tmp18_ = FALSE;
				if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
					goto __catch0_g_key_file_error;
				}
				_g_object_unref0 (parent_window);
				_g_object_unref0 (paned_widget);
				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 _tmp18_;
			}
			utils_hex_to_rgba (_tmp12_, _tmp14_, &_tmp19_);
			paned_background_color = _tmp19_;
			_tmp20_ = paned_background_color;
			utils_set_context_color (cr, &_tmp20_);
		}
		goto __finally0;
		__catch0_g_key_file_error:
		{
			GError* e = NULL;
			GError* _tmp21_;
			const gchar* _tmp22_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp21_ = e;
			_tmp22_ = _tmp21_->message;
			g_print ("Workapce split: %s\n", _tmp22_);
			_g_error_free0 (e);
		}
		__finally0:
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			gboolean _tmp23_ = FALSE;
			_g_object_unref0 (parent_window);
			_g_object_unref0 (paned_widget);
			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 _tmp23_;
		}
		if (_data59_->orientation == GTK_ORIENTATION_HORIZONTAL) {
			GtkAllocation _tmp24_;
			_tmp24_ = rect;
			draw_draw_rectangle (cr, pos, 0, 1, _tmp24_.height, TRUE);
		} else {
			GtkAllocation _tmp25_;
			_tmp25_ = rect;
			draw_draw_rectangle (cr, 0, pos, _tmp25_.width, 1, TRUE);
		}
		cairo_set_source_rgba (cr, (gdouble) 1, (gdouble) 1, (gdouble) 1, 0.1);
		if (_data59_->orientation == GTK_ORIENTATION_HORIZONTAL) {
			GtkAllocation _tmp26_;
			_tmp26_ = rect;
			draw_draw_rectangle (cr, pos, 0, 1, _tmp26_.height, TRUE);
		} else {
			GtkAllocation _tmp27_;
			_tmp27_ = rect;
			draw_draw_rectangle (cr, 0, pos, _tmp27_.width, 1, TRUE);
		}
		_g_object_unref0 (parent_window);
	}
	result = TRUE;
	_g_object_unref0 (paned_widget);
	return result;
}

static gboolean
___lambda197__gtk_widget_draw (GtkWidget* _sender,
                               cairo_t* cr,
                               gpointer self)
{
	gboolean result;
	result = __lambda197_ (self, _sender, cr);
	return result;
}

void
widgets_workspace_split (WidgetsWorkspace* self,
                         GtkOrientation orientation)
{
	Block59Data* _data59_;
	WidgetsTerm* focus_term = NULL;
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	WidgetsTerm* _tmp2_;
	GtkAllocation alloc = {0};
	WidgetsTerm* _tmp3_;
	GtkAllocation _tmp4_ = {0};
	GtkWidget* parent_widget = NULL;
	WidgetsTerm* _tmp5_;
	GtkContainer* _tmp6_;
	GtkWidget* _tmp7_;
	GtkWidget* _tmp8_;
	WidgetsTerm* _tmp9_;
	GtkPaned* paned = NULL;
	GtkPaned* _tmp10_;
	GtkPaned* _tmp11_;
	WidgetsTerm* term = NULL;
	WidgetsTerm* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	WidgetsTerm* _tmp15_;
	WidgetsTerm* _tmp16_;
	GtkPaned* _tmp17_;
	WidgetsTerm* _tmp18_;
	GtkPaned* _tmp19_;
	WidgetsTerm* _tmp20_;
	GtkWidget* _tmp25_;
	g_return_if_fail (self != NULL);
	_data59_ = g_slice_new0 (Block59Data);
	_data59_->_ref_count_ = 1;
	_data59_->self = g_object_ref (self);
	_data59_->orientation = orientation;
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	focus_term = _tmp0_;
	_tmp1_ = focus_term;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (self->terminal_before_popup);
	self->terminal_before_popup = _tmp2_;
	_tmp3_ = focus_term;
	gtk_widget_get_allocation ((GtkWidget*) _tmp3_, &_tmp4_);
	alloc = _tmp4_;
	_tmp5_ = focus_term;
	_tmp6_ = gtk_widget_get_parent ((GtkWidget*) _tmp5_);
	_tmp7_ = _g_object_ref0 ((GtkWidget*) _tmp6_);
	parent_widget = _tmp7_;
	_tmp8_ = parent_widget;
	_tmp9_ = focus_term;
	gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, gtk_container_get_type (), GtkContainer), (GtkWidget*) _tmp9_);
	_tmp10_ = (GtkPaned*) gtk_paned_new (_data59_->orientation);
	g_object_ref_sink (_tmp10_);
	paned = _tmp10_;
	_tmp11_ = paned;
	g_signal_connect_data ((GtkWidget*) _tmp11_, "draw", (GCallback) ___lambda197__gtk_widget_draw, block59_data_ref (_data59_), (GClosureNotify) block59_data_unref, 0);
	_tmp12_ = focus_term;
	_tmp13_ = widgets_term_get_cwd (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = widgets_workspace_new_term (self, FALSE, _tmp14_);
	_tmp16_ = _tmp15_;
	_g_free0 (_tmp14_);
	term = _tmp16_;
	_tmp17_ = paned;
	_tmp18_ = focus_term;
	gtk_paned_pack1 (_tmp17_, (GtkWidget*) _tmp18_, TRUE, FALSE);
	_tmp19_ = paned;
	_tmp20_ = term;
	gtk_paned_pack2 (_tmp19_, (GtkWidget*) _tmp20_, TRUE, FALSE);
	if (_data59_->orientation == GTK_ORIENTATION_HORIZONTAL) {
		GtkPaned* _tmp21_;
		GtkAllocation _tmp22_;
		_tmp21_ = paned;
		_tmp22_ = alloc;
		gtk_paned_set_position (_tmp21_, _tmp22_.width / 2);
	} else {
		GtkPaned* _tmp23_;
		GtkAllocation _tmp24_;
		_tmp23_ = paned;
		_tmp24_ = alloc;
		gtk_paned_set_position (_tmp23_, _tmp24_.height / 2);
	}
	_tmp25_ = parent_widget;
	if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp25_), WIDGETS_TYPE_WORKSPACE)) {
		GtkWidget* _tmp26_;
		GtkPaned* _tmp27_;
		_tmp26_ = parent_widget;
		_tmp27_ = paned;
		gtk_container_add ((GtkContainer*) G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, WIDGETS_TYPE_WORKSPACE, WidgetsWorkspace), (GtkWidget*) _tmp27_);
	} else {
		GtkWidget* _tmp28_;
		_tmp28_ = parent_widget;
		if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp28_), gtk_paned_get_type ())) {
			WidgetsTerm* _tmp29_;
			_tmp29_ = focus_term;
			if (_tmp29_->is_first_term) {
				GtkWidget* _tmp30_;
				GtkPaned* _tmp31_;
				_tmp30_ = parent_widget;
				_tmp31_ = paned;
				gtk_paned_pack1 (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_paned_get_type (), GtkPaned), (GtkWidget*) _tmp31_, TRUE, FALSE);
			} else {
				WidgetsTerm* _tmp32_;
				GtkWidget* _tmp33_;
				GtkPaned* _tmp34_;
				_tmp32_ = focus_term;
				_tmp32_->is_first_term = TRUE;
				_tmp33_ = parent_widget;
				_tmp34_ = paned;
				gtk_paned_pack2 (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_paned_get_type (), GtkPaned), (GtkWidget*) _tmp34_, TRUE, FALSE);
			}
		}
	}
	gtk_widget_show_all ((GtkWidget*) self);
	_g_object_unref0 (term);
	_g_object_unref0 (paned);
	_g_object_unref0 (parent_widget);
	_g_object_unref0 (focus_term);
	block59_data_unref (_data59_);
	_data59_ = NULL;
}

void
widgets_workspace_select_left_window (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	widgets_workspace_select_horizontal_terminal (self, TRUE);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_update_focus_terminal (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	widgets_workspace_highlight_select_window (self);
}

void
widgets_workspace_select_right_window (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	widgets_workspace_select_horizontal_terminal (self, FALSE);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_update_focus_terminal (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	widgets_workspace_highlight_select_window (self);
}

void
widgets_workspace_select_up_window (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	widgets_workspace_select_vertical_terminal (self, TRUE);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_update_focus_terminal (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	widgets_workspace_highlight_select_window (self);
}

void
widgets_workspace_select_down_window (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	widgets_workspace_select_vertical_terminal (self, FALSE);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_update_focus_terminal (self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	widgets_workspace_highlight_select_window (self);
}

static gboolean
____lambda206_ (WidgetsWorkspace* self)
{
	WidgetsHighlightFrame* _tmp0_;
	gboolean result;
	_tmp0_ = self->highlight_frame;
	if (_tmp0_ != NULL) {
		WidgetsHighlightFrame* _tmp1_;
		_tmp1_ = self->highlight_frame;
		gtk_container_remove ((GtkContainer*) self, (GtkWidget*) _tmp1_);
		_g_object_unref0 (self->highlight_frame);
		self->highlight_frame = NULL;
	}
	_g_free0 (self->highlight_frame_timeout_source_id);
	self->highlight_frame_timeout_source_id = NULL;
	result = FALSE;
	return result;
}

static gboolean
_____lambda206__gsource_func (gpointer self)
{
	gboolean result;
	result = ____lambda206_ ((WidgetsWorkspace*) self);
	return result;
}

static guint*
_uint_dup (guint* self)
{
	guint* dup;
	dup = g_new0 (guint, 1);
	memcpy (dup, self, sizeof (guint));
	return dup;
}

static gpointer
__uint_dup0 (gpointer self)
{
	return self ? _uint_dup (self) : NULL;
}

void
widgets_workspace_highlight_select_window (WidgetsWorkspace* self)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	{
		WidgetsConfigWindow* parent_window = NULL;
		GtkWidget* _tmp0_;
		WidgetsConfigWindow* _tmp1_;
		gboolean show_highlight_frame = FALSE;
		ConfigConfig* _tmp2_;
		GKeyFile* _tmp3_;
		_tmp0_ = gtk_widget_get_toplevel ((GtkWidget*) self);
		_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow));
		parent_window = _tmp1_;
		_tmp2_ = parent_window->config;
		_tmp3_ = _tmp2_->config_file;
		show_highlight_frame = g_key_file_get_boolean (_tmp3_, "advanced", "show_highlight_frame", &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (parent_window);
			if (_inner_error0_->domain == G_KEY_FILE_ERROR) {
				goto __catch0_g_key_file_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;
		}
		if (show_highlight_frame) {
			GtkAllocation rect = {0};
			GtkAllocation _tmp4_ = {0};
			WidgetsTerm* focus_term = NULL;
			WidgetsTerm* _tmp5_;
			gint term_x = 0;
			gint term_y = 0;
			WidgetsTerm* _tmp6_;
			gint _tmp7_ = 0;
			gint _tmp8_ = 0;
			GtkAllocation term_rect = {0};
			WidgetsTerm* _tmp9_;
			GtkAllocation _tmp10_ = {0};
			WidgetsHighlightFrame* _tmp11_;
			guint* _tmp13_;
			WidgetsHighlightFrame* _tmp15_;
			WidgetsHighlightFrame* _tmp16_;
			GtkAllocation _tmp17_;
			GtkAllocation _tmp18_;
			WidgetsHighlightFrame* _tmp19_;
			WidgetsHighlightFrame* _tmp20_;
			GtkAllocation _tmp21_;
			GtkAllocation _tmp22_;
			WidgetsHighlightFrame* _tmp23_;
			WidgetsHighlightFrame* _tmp24_;
			GtkAllocation _tmp25_;
			GtkAllocation _tmp26_;
			WidgetsHighlightFrame* _tmp27_;
			guint _tmp28_;
			guint* _tmp29_;
			gtk_widget_get_allocation ((GtkWidget*) self, &_tmp4_);
			rect = _tmp4_;
			_tmp5_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
			focus_term = _tmp5_;
			_tmp6_ = focus_term;
			gtk_widget_translate_coordinates ((GtkWidget*) _tmp6_, (GtkWidget*) self, 0, 0, &_tmp7_, &_tmp8_);
			term_x = _tmp7_;
			term_y = _tmp8_;
			_tmp9_ = focus_term;
			gtk_widget_get_allocation ((GtkWidget*) _tmp9_, &_tmp10_);
			term_rect = _tmp10_;
			_tmp11_ = self->highlight_frame;
			if (_tmp11_ != NULL) {
				WidgetsHighlightFrame* _tmp12_;
				_tmp12_ = self->highlight_frame;
				gtk_container_remove ((GtkContainer*) self, (GtkWidget*) _tmp12_);
				_g_object_unref0 (self->highlight_frame);
				self->highlight_frame = NULL;
			}
			_tmp13_ = self->highlight_frame_timeout_source_id;
			if (_tmp13_ != NULL) {
				guint* _tmp14_;
				_tmp14_ = self->highlight_frame_timeout_source_id;
				g_source_remove (*_tmp14_);
				_g_free0 (self->highlight_frame_timeout_source_id);
				self->highlight_frame_timeout_source_id = NULL;
			}
			_tmp15_ = widgets_highlight_frame_new ();
			g_object_ref_sink (_tmp15_);
			_g_object_unref0 (self->highlight_frame);
			self->highlight_frame = _tmp15_;
			_tmp16_ = self->highlight_frame;
			_tmp17_ = term_rect;
			_tmp18_ = term_rect;
			gtk_widget_set_size_request ((GtkWidget*) _tmp16_, _tmp17_.width, _tmp18_.height);
			_tmp19_ = self->highlight_frame;
			gtk_widget_set_margin_start ((GtkWidget*) _tmp19_, term_x);
			_tmp20_ = self->highlight_frame;
			_tmp21_ = rect;
			_tmp22_ = term_rect;
			gtk_widget_set_margin_end ((GtkWidget*) _tmp20_, (_tmp21_.width - term_x) - _tmp22_.width);
			_tmp23_ = self->highlight_frame;
			gtk_widget_set_margin_top ((GtkWidget*) _tmp23_, term_y);
			_tmp24_ = self->highlight_frame;
			_tmp25_ = rect;
			_tmp26_ = term_rect;
			gtk_widget_set_margin_bottom ((GtkWidget*) _tmp24_, (_tmp25_.height - term_y) - _tmp26_.height);
			_tmp27_ = self->highlight_frame;
			gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp27_);
			gtk_widget_show_all ((GtkWidget*) self);
			_tmp28_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) 300, _____lambda206__gsource_func, g_object_ref (self), g_object_unref);
			_tmp29_ = __uint_dup0 (&_tmp28_);
			_g_free0 (self->highlight_frame_timeout_source_id);
			self->highlight_frame_timeout_source_id = _tmp29_;
			_g_object_unref0 (focus_term);
		}
		_g_object_unref0 (parent_window);
	}
	goto __finally0;
	__catch0_g_key_file_error:
	{
		GError* e = NULL;
		GError* _tmp30_;
		const gchar* _tmp31_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp30_ = e;
		_tmp31_ = _tmp30_->message;
		g_print ("%s\n", _tmp31_);
		_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;
	}
}

GeeArrayList*
widgets_workspace_find_intersects_horizontal_terminals (WidgetsWorkspace* self,
                                                        GtkAllocation* rect,
                                                        gboolean left)
{
	GeeArrayList* intersects_terminals = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (rect != NULL, NULL);
	_tmp0_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	intersects_terminals = _tmp0_;
	{
		GeeArrayList* _t_list = NULL;
		GeeArrayList* _tmp1_;
		gint _t_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _t_index = 0;
		_tmp1_ = self->term_list;
		_t_list = _tmp1_;
		_tmp2_ = _t_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_t_size = _tmp4_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			WidgetsTerm* t = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			GtkAllocation alloc = {0};
			WidgetsTerm* _tmp9_;
			GtkAllocation _tmp10_ = {0};
			gboolean _tmp11_ = FALSE;
			GtkAllocation _tmp12_;
			GtkAllocation _tmp13_;
			GtkAllocation _tmp14_;
			_t_index = _t_index + 1;
			_tmp5_ = _t_index;
			_tmp6_ = _t_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _t_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _t_index);
			t = (WidgetsTerm*) _tmp8_;
			_tmp9_ = t;
			utils_get_origin_allocation ((GtkWidget*) _tmp9_, &_tmp10_);
			alloc = _tmp10_;
			_tmp12_ = alloc;
			_tmp13_ = *rect;
			_tmp14_ = *rect;
			if (_tmp12_.y < ((_tmp13_.y + _tmp14_.height) + self->PANED_HANDLE_SIZE)) {
				GtkAllocation _tmp15_;
				GtkAllocation _tmp16_;
				GtkAllocation _tmp17_;
				_tmp15_ = alloc;
				_tmp16_ = alloc;
				_tmp17_ = *rect;
				_tmp11_ = ((_tmp15_.y + _tmp16_.height) + self->PANED_HANDLE_SIZE) > _tmp17_.y;
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				if (left) {
					GtkAllocation _tmp18_;
					GtkAllocation _tmp19_;
					GtkAllocation _tmp20_;
					_tmp18_ = alloc;
					_tmp19_ = alloc;
					_tmp20_ = *rect;
					if (((_tmp18_.x + _tmp19_.width) + self->PANED_HANDLE_SIZE) == _tmp20_.x) {
						GeeArrayList* _tmp21_;
						WidgetsTerm* _tmp22_;
						_tmp21_ = intersects_terminals;
						_tmp22_ = t;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp21_, _tmp22_);
					}
				} else {
					GtkAllocation _tmp23_;
					GtkAllocation _tmp24_;
					GtkAllocation _tmp25_;
					_tmp23_ = alloc;
					_tmp24_ = *rect;
					_tmp25_ = *rect;
					if (_tmp23_.x == ((_tmp24_.x + _tmp25_.width) + self->PANED_HANDLE_SIZE)) {
						GeeArrayList* _tmp26_;
						WidgetsTerm* _tmp27_;
						_tmp26_ = intersects_terminals;
						_tmp27_ = t;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp26_, _tmp27_);
					}
				}
			}
			_g_object_unref0 (t);
		}
	}
	result = intersects_terminals;
	return result;
}

void
widgets_workspace_select_horizontal_terminal (WidgetsWorkspace* self,
                                              gboolean left)
{
	WidgetsTerm* focus_term = NULL;
	WidgetsTerm* _tmp0_;
	GtkAllocation rect = {0};
	WidgetsTerm* _tmp1_;
	GtkAllocation _tmp2_ = {0};
	gint y = 0;
	GtkAllocation _tmp3_;
	gint h = 0;
	GtkAllocation _tmp4_;
	GeeArrayList* intersects_terminals = NULL;
	GtkAllocation _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	focus_term = _tmp0_;
	_tmp1_ = focus_term;
	utils_get_origin_allocation ((GtkWidget*) _tmp1_, &_tmp2_);
	rect = _tmp2_;
	_tmp3_ = rect;
	y = _tmp3_.y;
	_tmp4_ = rect;
	h = _tmp4_.height;
	_tmp5_ = rect;
	_tmp6_ = widgets_workspace_find_intersects_horizontal_terminals (self, &_tmp5_, left);
	intersects_terminals = _tmp6_;
	_tmp7_ = intersects_terminals;
	_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ > 0) {
		GeeArrayList* same_coordinate_terminals = NULL;
		GeeArrayList* _tmp10_;
		GeeArrayList* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		_tmp10_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		same_coordinate_terminals = _tmp10_;
		{
			GeeArrayList* _t_list = NULL;
			GeeArrayList* _tmp11_;
			gint _t_size = 0;
			GeeArrayList* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			gint _t_index = 0;
			_tmp11_ = intersects_terminals;
			_t_list = _tmp11_;
			_tmp12_ = _t_list;
			_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
			_tmp14_ = _tmp13_;
			_t_size = _tmp14_;
			_t_index = -1;
			while (TRUE) {
				gint _tmp15_;
				gint _tmp16_;
				WidgetsTerm* t = NULL;
				GeeArrayList* _tmp17_;
				gpointer _tmp18_;
				GtkAllocation alloc = {0};
				WidgetsTerm* _tmp19_;
				GtkAllocation _tmp20_ = {0};
				GtkAllocation _tmp21_;
				_t_index = _t_index + 1;
				_tmp15_ = _t_index;
				_tmp16_ = _t_size;
				if (!(_tmp15_ < _tmp16_)) {
					break;
				}
				_tmp17_ = _t_list;
				_tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, _t_index);
				t = (WidgetsTerm*) _tmp18_;
				_tmp19_ = t;
				utils_get_origin_allocation ((GtkWidget*) _tmp19_, &_tmp20_);
				alloc = _tmp20_;
				_tmp21_ = alloc;
				if (_tmp21_.y == y) {
					GeeArrayList* _tmp22_;
					WidgetsTerm* _tmp23_;
					_tmp22_ = same_coordinate_terminals;
					_tmp23_ = t;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp23_);
				}
				_g_object_unref0 (t);
			}
		}
		_tmp24_ = same_coordinate_terminals;
		_tmp25_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp24_);
		_tmp26_ = _tmp25_;
		if (_tmp26_ > 0) {
			GeeArrayList* _tmp27_;
			gpointer _tmp28_;
			WidgetsTerm* _tmp29_;
			_tmp27_ = same_coordinate_terminals;
			_tmp28_ = gee_abstract_list_get ((GeeAbstractList*) _tmp27_, 0);
			_tmp29_ = (WidgetsTerm*) _tmp28_;
			widgets_term_focus_term (_tmp29_);
			_g_object_unref0 (_tmp29_);
		} else {
			GeeArrayList* bigger_match_terminals = NULL;
			GeeArrayList* _tmp30_;
			GeeArrayList* _tmp47_;
			gint _tmp48_;
			gint _tmp49_;
			_tmp30_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
			bigger_match_terminals = _tmp30_;
			{
				GeeArrayList* _t_list = NULL;
				GeeArrayList* _tmp31_;
				gint _t_size = 0;
				GeeArrayList* _tmp32_;
				gint _tmp33_;
				gint _tmp34_;
				gint _t_index = 0;
				_tmp31_ = intersects_terminals;
				_t_list = _tmp31_;
				_tmp32_ = _t_list;
				_tmp33_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp32_);
				_tmp34_ = _tmp33_;
				_t_size = _tmp34_;
				_t_index = -1;
				while (TRUE) {
					gint _tmp35_;
					gint _tmp36_;
					WidgetsTerm* t = NULL;
					GeeArrayList* _tmp37_;
					gpointer _tmp38_;
					GtkAllocation alloc = {0};
					WidgetsTerm* _tmp39_;
					GtkAllocation _tmp40_ = {0};
					gboolean _tmp41_ = FALSE;
					GtkAllocation _tmp42_;
					_t_index = _t_index + 1;
					_tmp35_ = _t_index;
					_tmp36_ = _t_size;
					if (!(_tmp35_ < _tmp36_)) {
						break;
					}
					_tmp37_ = _t_list;
					_tmp38_ = gee_abstract_list_get ((GeeAbstractList*) _tmp37_, _t_index);
					t = (WidgetsTerm*) _tmp38_;
					_tmp39_ = t;
					utils_get_origin_allocation ((GtkWidget*) _tmp39_, &_tmp40_);
					alloc = _tmp40_;
					_tmp42_ = alloc;
					if (_tmp42_.y < y) {
						GtkAllocation _tmp43_;
						GtkAllocation _tmp44_;
						_tmp43_ = alloc;
						_tmp44_ = alloc;
						_tmp41_ = (_tmp43_.y + _tmp44_.height) >= (y + h);
					} else {
						_tmp41_ = FALSE;
					}
					if (_tmp41_) {
						GeeArrayList* _tmp45_;
						WidgetsTerm* _tmp46_;
						_tmp45_ = bigger_match_terminals;
						_tmp46_ = t;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp45_, _tmp46_);
					}
					_g_object_unref0 (t);
				}
			}
			_tmp47_ = bigger_match_terminals;
			_tmp48_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp47_);
			_tmp49_ = _tmp48_;
			if (_tmp49_ > 0) {
				GeeArrayList* _tmp50_;
				gpointer _tmp51_;
				WidgetsTerm* _tmp52_;
				_tmp50_ = bigger_match_terminals;
				_tmp51_ = gee_abstract_list_get ((GeeAbstractList*) _tmp50_, 0);
				_tmp52_ = (WidgetsTerm*) _tmp51_;
				widgets_term_focus_term (_tmp52_);
				_g_object_unref0 (_tmp52_);
			} else {
				WidgetsTerm* biggest_intersectant_terminal = NULL;
				gint area = 0;
				WidgetsTerm* _tmp69_;
				biggest_intersectant_terminal = NULL;
				area = 0;
				{
					GeeArrayList* _t_list = NULL;
					GeeArrayList* _tmp53_;
					gint _t_size = 0;
					GeeArrayList* _tmp54_;
					gint _tmp55_;
					gint _tmp56_;
					gint _t_index = 0;
					_tmp53_ = intersects_terminals;
					_t_list = _tmp53_;
					_tmp54_ = _t_list;
					_tmp55_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp54_);
					_tmp56_ = _tmp55_;
					_t_size = _tmp56_;
					_t_index = -1;
					while (TRUE) {
						gint _tmp57_;
						gint _tmp58_;
						WidgetsTerm* t = NULL;
						GeeArrayList* _tmp59_;
						gpointer _tmp60_;
						GtkAllocation alloc = {0};
						WidgetsTerm* _tmp61_;
						GtkAllocation _tmp62_ = {0};
						gint term_area = 0;
						GtkAllocation _tmp63_;
						GtkAllocation _tmp64_;
						GtkAllocation _tmp65_;
						GtkAllocation _tmp66_;
						_t_index = _t_index + 1;
						_tmp57_ = _t_index;
						_tmp58_ = _t_size;
						if (!(_tmp57_ < _tmp58_)) {
							break;
						}
						_tmp59_ = _t_list;
						_tmp60_ = gee_abstract_list_get ((GeeAbstractList*) _tmp59_, _t_index);
						t = (WidgetsTerm*) _tmp60_;
						_tmp61_ = t;
						utils_get_origin_allocation ((GtkWidget*) _tmp61_, &_tmp62_);
						alloc = _tmp62_;
						_tmp63_ = alloc;
						_tmp64_ = alloc;
						_tmp65_ = alloc;
						_tmp66_ = alloc;
						term_area = ((_tmp63_.height + h) - abs (_tmp64_.y - y)) - (abs (((_tmp65_.y + _tmp66_.height) - y) - h) / 2);
						if (term_area > area) {
							WidgetsTerm* _tmp67_;
							WidgetsTerm* _tmp68_;
							_tmp67_ = t;
							_tmp68_ = _g_object_ref0 (_tmp67_);
							_g_object_unref0 (biggest_intersectant_terminal);
							biggest_intersectant_terminal = _tmp68_;
						}
						_g_object_unref0 (t);
					}
				}
				_tmp69_ = biggest_intersectant_terminal;
				if (_tmp69_ != NULL) {
					WidgetsTerm* _tmp70_;
					_tmp70_ = biggest_intersectant_terminal;
					widgets_term_focus_term (_tmp70_);
				}
				_g_object_unref0 (biggest_intersectant_terminal);
			}
			_g_object_unref0 (bigger_match_terminals);
		}
		_g_object_unref0 (same_coordinate_terminals);
	}
	_g_object_unref0 (intersects_terminals);
	_g_object_unref0 (focus_term);
}

GeeArrayList*
widgets_workspace_find_intersects_vertical_terminals (WidgetsWorkspace* self,
                                                      GtkAllocation* rect,
                                                      gboolean up)
{
	GeeArrayList* intersects_terminals = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* result;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (rect != NULL, NULL);
	_tmp0_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	intersects_terminals = _tmp0_;
	{
		GeeArrayList* _t_list = NULL;
		GeeArrayList* _tmp1_;
		gint _t_size = 0;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _t_index = 0;
		_tmp1_ = self->term_list;
		_t_list = _tmp1_;
		_tmp2_ = _t_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_t_size = _tmp4_;
		_t_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			WidgetsTerm* t = NULL;
			GeeArrayList* _tmp7_;
			gpointer _tmp8_;
			GtkAllocation alloc = {0};
			WidgetsTerm* _tmp9_;
			GtkAllocation _tmp10_ = {0};
			gboolean _tmp11_ = FALSE;
			GtkAllocation _tmp12_;
			GtkAllocation _tmp13_;
			GtkAllocation _tmp14_;
			_t_index = _t_index + 1;
			_tmp5_ = _t_index;
			_tmp6_ = _t_size;
			if (!(_tmp5_ < _tmp6_)) {
				break;
			}
			_tmp7_ = _t_list;
			_tmp8_ = gee_abstract_list_get ((GeeAbstractList*) _tmp7_, _t_index);
			t = (WidgetsTerm*) _tmp8_;
			_tmp9_ = t;
			utils_get_origin_allocation ((GtkWidget*) _tmp9_, &_tmp10_);
			alloc = _tmp10_;
			_tmp12_ = alloc;
			_tmp13_ = *rect;
			_tmp14_ = *rect;
			if (_tmp12_.x < ((_tmp13_.x + _tmp14_.width) + self->PANED_HANDLE_SIZE)) {
				GtkAllocation _tmp15_;
				GtkAllocation _tmp16_;
				GtkAllocation _tmp17_;
				_tmp15_ = alloc;
				_tmp16_ = alloc;
				_tmp17_ = *rect;
				_tmp11_ = ((_tmp15_.x + _tmp16_.width) + self->PANED_HANDLE_SIZE) > _tmp17_.x;
			} else {
				_tmp11_ = FALSE;
			}
			if (_tmp11_) {
				if (up) {
					GtkAllocation _tmp18_;
					GtkAllocation _tmp19_;
					GtkAllocation _tmp20_;
					_tmp18_ = alloc;
					_tmp19_ = alloc;
					_tmp20_ = *rect;
					if (((_tmp18_.y + _tmp19_.height) + self->PANED_HANDLE_SIZE) == _tmp20_.y) {
						GeeArrayList* _tmp21_;
						WidgetsTerm* _tmp22_;
						_tmp21_ = intersects_terminals;
						_tmp22_ = t;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp21_, _tmp22_);
					}
				} else {
					GtkAllocation _tmp23_;
					GtkAllocation _tmp24_;
					GtkAllocation _tmp25_;
					_tmp23_ = alloc;
					_tmp24_ = *rect;
					_tmp25_ = *rect;
					if (_tmp23_.y == ((_tmp24_.y + _tmp25_.height) + self->PANED_HANDLE_SIZE)) {
						GeeArrayList* _tmp26_;
						WidgetsTerm* _tmp27_;
						_tmp26_ = intersects_terminals;
						_tmp27_ = t;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp26_, _tmp27_);
					}
				}
			}
			_g_object_unref0 (t);
		}
	}
	result = intersects_terminals;
	return result;
}

void
widgets_workspace_select_vertical_terminal (WidgetsWorkspace* self,
                                            gboolean up)
{
	WidgetsTerm* focus_term = NULL;
	WidgetsTerm* _tmp0_;
	GtkAllocation rect = {0};
	WidgetsTerm* _tmp1_;
	GtkAllocation _tmp2_ = {0};
	gint x = 0;
	GtkAllocation _tmp3_;
	gint w = 0;
	GtkAllocation _tmp4_;
	GeeArrayList* intersects_terminals = NULL;
	GtkAllocation _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	gint _tmp8_;
	gint _tmp9_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	focus_term = _tmp0_;
	_tmp1_ = focus_term;
	utils_get_origin_allocation ((GtkWidget*) _tmp1_, &_tmp2_);
	rect = _tmp2_;
	_tmp3_ = rect;
	x = _tmp3_.x;
	_tmp4_ = rect;
	w = _tmp4_.width;
	_tmp5_ = rect;
	_tmp6_ = widgets_workspace_find_intersects_vertical_terminals (self, &_tmp5_, up);
	intersects_terminals = _tmp6_;
	_tmp7_ = intersects_terminals;
	_tmp8_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp7_);
	_tmp9_ = _tmp8_;
	if (_tmp9_ > 0) {
		GeeArrayList* same_coordinate_terminals = NULL;
		GeeArrayList* _tmp10_;
		GeeArrayList* _tmp24_;
		gint _tmp25_;
		gint _tmp26_;
		_tmp10_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
		same_coordinate_terminals = _tmp10_;
		{
			GeeArrayList* _t_list = NULL;
			GeeArrayList* _tmp11_;
			gint _t_size = 0;
			GeeArrayList* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			gint _t_index = 0;
			_tmp11_ = intersects_terminals;
			_t_list = _tmp11_;
			_tmp12_ = _t_list;
			_tmp13_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp12_);
			_tmp14_ = _tmp13_;
			_t_size = _tmp14_;
			_t_index = -1;
			while (TRUE) {
				gint _tmp15_;
				gint _tmp16_;
				WidgetsTerm* t = NULL;
				GeeArrayList* _tmp17_;
				gpointer _tmp18_;
				GtkAllocation alloc = {0};
				WidgetsTerm* _tmp19_;
				GtkAllocation _tmp20_ = {0};
				GtkAllocation _tmp21_;
				_t_index = _t_index + 1;
				_tmp15_ = _t_index;
				_tmp16_ = _t_size;
				if (!(_tmp15_ < _tmp16_)) {
					break;
				}
				_tmp17_ = _t_list;
				_tmp18_ = gee_abstract_list_get ((GeeAbstractList*) _tmp17_, _t_index);
				t = (WidgetsTerm*) _tmp18_;
				_tmp19_ = t;
				utils_get_origin_allocation ((GtkWidget*) _tmp19_, &_tmp20_);
				alloc = _tmp20_;
				_tmp21_ = alloc;
				if (_tmp21_.x == x) {
					GeeArrayList* _tmp22_;
					WidgetsTerm* _tmp23_;
					_tmp22_ = same_coordinate_terminals;
					_tmp23_ = t;
					gee_abstract_collection_add ((GeeAbstractCollection*) _tmp22_, _tmp23_);
				}
				_g_object_unref0 (t);
			}
		}
		_tmp24_ = same_coordinate_terminals;
		_tmp25_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp24_);
		_tmp26_ = _tmp25_;
		if (_tmp26_ > 0) {
			GeeArrayList* _tmp27_;
			gpointer _tmp28_;
			WidgetsTerm* _tmp29_;
			_tmp27_ = same_coordinate_terminals;
			_tmp28_ = gee_abstract_list_get ((GeeAbstractList*) _tmp27_, 0);
			_tmp29_ = (WidgetsTerm*) _tmp28_;
			widgets_term_focus_term (_tmp29_);
			_g_object_unref0 (_tmp29_);
		} else {
			GeeArrayList* bigger_match_terminals = NULL;
			GeeArrayList* _tmp30_;
			GeeArrayList* _tmp47_;
			gint _tmp48_;
			gint _tmp49_;
			_tmp30_ = gee_array_list_new (WIDGETS_TYPE_TERM, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
			bigger_match_terminals = _tmp30_;
			{
				GeeArrayList* _t_list = NULL;
				GeeArrayList* _tmp31_;
				gint _t_size = 0;
				GeeArrayList* _tmp32_;
				gint _tmp33_;
				gint _tmp34_;
				gint _t_index = 0;
				_tmp31_ = intersects_terminals;
				_t_list = _tmp31_;
				_tmp32_ = _t_list;
				_tmp33_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp32_);
				_tmp34_ = _tmp33_;
				_t_size = _tmp34_;
				_t_index = -1;
				while (TRUE) {
					gint _tmp35_;
					gint _tmp36_;
					WidgetsTerm* t = NULL;
					GeeArrayList* _tmp37_;
					gpointer _tmp38_;
					GtkAllocation alloc = {0};
					WidgetsTerm* _tmp39_;
					GtkAllocation _tmp40_ = {0};
					gboolean _tmp41_ = FALSE;
					GtkAllocation _tmp42_;
					_t_index = _t_index + 1;
					_tmp35_ = _t_index;
					_tmp36_ = _t_size;
					if (!(_tmp35_ < _tmp36_)) {
						break;
					}
					_tmp37_ = _t_list;
					_tmp38_ = gee_abstract_list_get ((GeeAbstractList*) _tmp37_, _t_index);
					t = (WidgetsTerm*) _tmp38_;
					_tmp39_ = t;
					utils_get_origin_allocation ((GtkWidget*) _tmp39_, &_tmp40_);
					alloc = _tmp40_;
					_tmp42_ = alloc;
					if (_tmp42_.x < x) {
						GtkAllocation _tmp43_;
						GtkAllocation _tmp44_;
						_tmp43_ = alloc;
						_tmp44_ = alloc;
						_tmp41_ = (_tmp43_.x + _tmp44_.width) >= (x + w);
					} else {
						_tmp41_ = FALSE;
					}
					if (_tmp41_) {
						GeeArrayList* _tmp45_;
						WidgetsTerm* _tmp46_;
						_tmp45_ = bigger_match_terminals;
						_tmp46_ = t;
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp45_, _tmp46_);
					}
					_g_object_unref0 (t);
				}
			}
			_tmp47_ = bigger_match_terminals;
			_tmp48_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp47_);
			_tmp49_ = _tmp48_;
			if (_tmp49_ > 0) {
				GeeArrayList* _tmp50_;
				gpointer _tmp51_;
				WidgetsTerm* _tmp52_;
				_tmp50_ = bigger_match_terminals;
				_tmp51_ = gee_abstract_list_get ((GeeAbstractList*) _tmp50_, 0);
				_tmp52_ = (WidgetsTerm*) _tmp51_;
				widgets_term_focus_term (_tmp52_);
				_g_object_unref0 (_tmp52_);
			} else {
				WidgetsTerm* biggest_intersectant_terminal = NULL;
				gint area = 0;
				WidgetsTerm* _tmp69_;
				biggest_intersectant_terminal = NULL;
				area = 0;
				{
					GeeArrayList* _t_list = NULL;
					GeeArrayList* _tmp53_;
					gint _t_size = 0;
					GeeArrayList* _tmp54_;
					gint _tmp55_;
					gint _tmp56_;
					gint _t_index = 0;
					_tmp53_ = intersects_terminals;
					_t_list = _tmp53_;
					_tmp54_ = _t_list;
					_tmp55_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp54_);
					_tmp56_ = _tmp55_;
					_t_size = _tmp56_;
					_t_index = -1;
					while (TRUE) {
						gint _tmp57_;
						gint _tmp58_;
						WidgetsTerm* t = NULL;
						GeeArrayList* _tmp59_;
						gpointer _tmp60_;
						GtkAllocation alloc = {0};
						WidgetsTerm* _tmp61_;
						GtkAllocation _tmp62_ = {0};
						gint term_area = 0;
						GtkAllocation _tmp63_;
						GtkAllocation _tmp64_;
						GtkAllocation _tmp65_;
						GtkAllocation _tmp66_;
						_t_index = _t_index + 1;
						_tmp57_ = _t_index;
						_tmp58_ = _t_size;
						if (!(_tmp57_ < _tmp58_)) {
							break;
						}
						_tmp59_ = _t_list;
						_tmp60_ = gee_abstract_list_get ((GeeAbstractList*) _tmp59_, _t_index);
						t = (WidgetsTerm*) _tmp60_;
						_tmp61_ = t;
						utils_get_origin_allocation ((GtkWidget*) _tmp61_, &_tmp62_);
						alloc = _tmp62_;
						_tmp63_ = alloc;
						_tmp64_ = alloc;
						_tmp65_ = alloc;
						_tmp66_ = alloc;
						term_area = ((_tmp63_.width + w) - abs (_tmp64_.x - x)) - (abs (((_tmp65_.x + _tmp66_.width) - x) - w) / 2);
						if (term_area > area) {
							WidgetsTerm* _tmp67_;
							WidgetsTerm* _tmp68_;
							_tmp67_ = t;
							_tmp68_ = _g_object_ref0 (_tmp67_);
							_g_object_unref0 (biggest_intersectant_terminal);
							biggest_intersectant_terminal = _tmp68_;
						}
						_g_object_unref0 (t);
					}
				}
				_tmp69_ = biggest_intersectant_terminal;
				if (_tmp69_ != NULL) {
					WidgetsTerm* _tmp70_;
					_tmp70_ = biggest_intersectant_terminal;
					widgets_term_focus_term (_tmp70_);
				}
				_g_object_unref0 (biggest_intersectant_terminal);
			}
			_g_object_unref0 (bigger_match_terminals);
		}
		_g_object_unref0 (same_coordinate_terminals);
	}
	_g_object_unref0 (intersects_terminals);
	_g_object_unref0 (focus_term);
}

static void
___lambda196_ (WidgetsWorkspace* self,
               WidgetsSearchPanel* w)
{
	g_return_if_fail (w != NULL);
	widgets_workspace_remove_search_panel (self);
}

static void
____lambda196__widgets_search_panel_quit_search (WidgetsSearchPanel* _sender,
                                                 gpointer self)
{
	___lambda196_ ((WidgetsWorkspace*) self, _sender);
}

void
widgets_workspace_search (WidgetsWorkspace* self,
                          const gchar* search_text)
{
	WidgetsTerm* _tmp0_;
	gboolean _tmp1_ = FALSE;
	WidgetsSearchPanel* _tmp2_;
	WidgetsSearchPanel* _tmp9_;
	WidgetsEntry* _tmp10_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (search_text != NULL);
	widgets_workspace_remove_remote_panel (self);
	widgets_workspace_remove_theme_panel (self);
	widgets_workspace_remove_encoding_panel (self);
	widgets_workspace_remove_command_panel (self);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_g_object_unref0 (self->terminal_before_popup);
	self->terminal_before_popup = _tmp0_;
	_tmp2_ = self->search_panel;
	if (_tmp2_ == NULL) {
		WidgetsTerm* _tmp3_;
		_tmp3_ = self->terminal_before_popup;
		_tmp1_ = _tmp3_ != NULL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GtkWidget* _tmp4_;
		WidgetsTerm* _tmp5_;
		WidgetsSearchPanel* _tmp6_;
		WidgetsSearchPanel* _tmp7_;
		WidgetsSearchPanel* _tmp8_;
		_tmp4_ = gtk_widget_get_toplevel ((GtkWidget*) self);
		_tmp5_ = self->terminal_before_popup;
		_tmp6_ = widgets_search_panel_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, WIDGETS_TYPE_CONFIG_WINDOW, WidgetsConfigWindow), _tmp5_, search_text);
		g_object_ref_sink (_tmp6_);
		_g_object_unref0 (self->search_panel);
		self->search_panel = _tmp6_;
		_tmp7_ = self->search_panel;
		g_signal_connect_object (_tmp7_, "quit-search", (GCallback) ____lambda196__widgets_search_panel_quit_search, self, 0);
		_tmp8_ = self->search_panel;
		gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp8_);
		gtk_widget_show_all ((GtkWidget*) self);
	}
	_tmp9_ = self->search_panel;
	_tmp10_ = _tmp9_->search_entry;
	gtk_widget_grab_focus ((GtkWidget*) _tmp10_);
}

void
widgets_workspace_toggle_remote_panel (WidgetsWorkspace* self,
                                       WidgetsWorkspace* workspace)
{
	WidgetsRemotePanel* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (workspace != NULL);
	_tmp0_ = self->remote_panel;
	if (_tmp0_ == NULL) {
		widgets_workspace_show_remote_panel (self, workspace);
	} else {
		widgets_workspace_hide_remote_panel (self);
	}
}

void
widgets_workspace_toggle_command_panel (WidgetsWorkspace* self,
                                        WidgetsWorkspace* workspace)
{
	WidgetsCommandPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (workspace != NULL);
	_tmp0_ = self->command_panel;
	if (_tmp0_ == NULL) {
		widgets_workspace_show_command_panel (self, workspace);
	} else {
		widgets_workspace_hide_command_panel (self);
	}
}

void
widgets_workspace_show_remote_panel (WidgetsWorkspace* self,
                                     WidgetsWorkspace* workspace)
{
	WidgetsRemotePanel* _tmp0_;
	WidgetsTerm* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (workspace != NULL);
	widgets_workspace_remove_search_panel (self);
	widgets_workspace_remove_theme_panel (self);
	widgets_workspace_remove_encoding_panel (self);
	widgets_workspace_remove_command_panel (self);
	_tmp0_ = self->remote_panel;
	if (_tmp0_ == NULL) {
		GtkAllocation rect = {0};
		GtkAllocation _tmp1_ = {0};
		WidgetsWorkspaceManager* _tmp2_;
		WidgetsRemotePanel* _tmp3_;
		WidgetsRemotePanel* _tmp4_;
		GtkAllocation _tmp5_;
		WidgetsRemotePanel* _tmp6_;
		WidgetsRemotePanel* _tmp7_;
		GtkAllocation _tmp8_;
		GtkAllocation _tmp9_;
		AnimationAnimateTimer* _tmp10_;
		gtk_widget_get_allocation ((GtkWidget*) self, &_tmp1_);
		rect = _tmp1_;
		_tmp2_ = self->workspace_manager;
		_tmp3_ = widgets_remote_panel_new (workspace, _tmp2_);
		g_object_ref_sink (_tmp3_);
		_g_object_unref0 (self->remote_panel);
		self->remote_panel = _tmp3_;
		_tmp4_ = self->remote_panel;
		_tmp5_ = rect;
		gtk_widget_set_size_request ((GtkWidget*) _tmp4_, constant_SLIDER_WIDTH, _tmp5_.height);
		_tmp6_ = self->remote_panel;
		gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp6_);
		gtk_widget_show_all ((GtkWidget*) self);
		_tmp7_ = self->remote_panel;
		_tmp8_ = rect;
		gtk_widget_set_margin_left ((GtkWidget*) _tmp7_, _tmp8_.width);
		_tmp9_ = rect;
		self->show_slider_start_x = _tmp9_.width;
		_tmp10_ = self->remote_panel_show_timer;
		animation_animate_timer_reset (_tmp10_, -1);
	}
	_tmp11_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_g_object_unref0 (self->terminal_before_popup);
	self->terminal_before_popup = _tmp11_;
}

void
widgets_workspace_show_command_panel (WidgetsWorkspace* self,
                                      WidgetsWorkspace* workspace)
{
	WidgetsCommandPanel* _tmp0_;
	WidgetsTerm* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (workspace != NULL);
	widgets_workspace_remove_search_panel (self);
	widgets_workspace_remove_theme_panel (self);
	widgets_workspace_remove_encoding_panel (self);
	widgets_workspace_remove_remote_panel (self);
	_tmp0_ = self->command_panel;
	if (_tmp0_ == NULL) {
		GtkAllocation rect = {0};
		GtkAllocation _tmp1_ = {0};
		WidgetsWorkspaceManager* _tmp2_;
		WidgetsCommandPanel* _tmp3_;
		WidgetsCommandPanel* _tmp4_;
		GtkAllocation _tmp5_;
		WidgetsCommandPanel* _tmp6_;
		WidgetsCommandPanel* _tmp7_;
		GtkAllocation _tmp8_;
		GtkAllocation _tmp9_;
		AnimationAnimateTimer* _tmp10_;
		gtk_widget_get_allocation ((GtkWidget*) self, &_tmp1_);
		rect = _tmp1_;
		_tmp2_ = self->workspace_manager;
		_tmp3_ = widgets_command_panel_new (workspace, _tmp2_);
		g_object_ref_sink (_tmp3_);
		_g_object_unref0 (self->command_panel);
		self->command_panel = _tmp3_;
		_tmp4_ = self->command_panel;
		_tmp5_ = rect;
		gtk_widget_set_size_request ((GtkWidget*) _tmp4_, constant_SLIDER_WIDTH, _tmp5_.height);
		_tmp6_ = self->command_panel;
		gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp6_);
		gtk_widget_show_all ((GtkWidget*) self);
		_tmp7_ = self->command_panel;
		_tmp8_ = rect;
		gtk_widget_set_margin_left ((GtkWidget*) _tmp7_, _tmp8_.width);
		_tmp9_ = rect;
		self->show_slider_start_x = _tmp9_.width;
		_tmp10_ = self->command_panel_show_timer;
		animation_animate_timer_reset (_tmp10_, -1);
	}
	_tmp11_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_g_object_unref0 (self->terminal_before_popup);
	self->terminal_before_popup = _tmp11_;
}

void
widgets_workspace_show_encoding_panel (WidgetsWorkspace* self,
                                       WidgetsWorkspace* workspace)
{
	WidgetsEncodingPanel* _tmp0_;
	WidgetsTerm* _tmp13_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (workspace != NULL);
	widgets_workspace_remove_search_panel (self);
	widgets_workspace_remove_remote_panel (self);
	widgets_workspace_remove_theme_panel (self);
	widgets_workspace_remove_command_panel (self);
	_tmp0_ = self->encoding_panel;
	if (_tmp0_ == NULL) {
		GtkAllocation rect = {0};
		GtkAllocation _tmp1_ = {0};
		WidgetsTerm* focus_term = NULL;
		WidgetsTerm* _tmp2_;
		WidgetsWorkspaceManager* _tmp3_;
		WidgetsTerm* _tmp4_;
		WidgetsEncodingPanel* _tmp5_;
		WidgetsEncodingPanel* _tmp6_;
		GtkAllocation _tmp7_;
		WidgetsEncodingPanel* _tmp8_;
		WidgetsEncodingPanel* _tmp9_;
		GtkAllocation _tmp10_;
		GtkAllocation _tmp11_;
		AnimationAnimateTimer* _tmp12_;
		gtk_widget_get_allocation ((GtkWidget*) self, &_tmp1_);
		rect = _tmp1_;
		_tmp2_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
		focus_term = _tmp2_;
		_tmp3_ = self->workspace_manager;
		_tmp4_ = focus_term;
		_tmp5_ = widgets_encoding_panel_new (workspace, _tmp3_, _tmp4_);
		g_object_ref_sink (_tmp5_);
		_g_object_unref0 (self->encoding_panel);
		self->encoding_panel = _tmp5_;
		_tmp6_ = self->encoding_panel;
		_tmp7_ = rect;
		gtk_widget_set_size_request ((GtkWidget*) _tmp6_, constant_ENCODING_SLIDER_WIDTH, _tmp7_.height);
		_tmp8_ = self->encoding_panel;
		gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp8_);
		gtk_widget_show_all ((GtkWidget*) self);
		_tmp9_ = self->encoding_panel;
		_tmp10_ = rect;
		gtk_widget_set_margin_left ((GtkWidget*) _tmp9_, _tmp10_.width);
		_tmp11_ = rect;
		self->show_slider_start_x = _tmp11_.width;
		_tmp12_ = self->encoding_panel_show_timer;
		animation_animate_timer_reset (_tmp12_, -1);
		_g_object_unref0 (focus_term);
	}
	_tmp13_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_g_object_unref0 (self->terminal_before_popup);
	self->terminal_before_popup = _tmp13_;
}

void
widgets_workspace_remote_panel_show_animate (WidgetsWorkspace* self,
                                             gdouble progress)
{
	WidgetsRemotePanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->remote_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->show_slider_start_x - (constant_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->remote_panel_show_timer;
		animation_animate_timer_stop (_tmp1_);
	}
}

void
widgets_workspace_remote_panel_hide_animate (WidgetsWorkspace* self,
                                             gdouble progress)
{
	WidgetsRemotePanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->remote_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->hide_slider_start_x + (constant_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->remote_panel_hide_timer;
		animation_animate_timer_stop (_tmp1_);
		widgets_workspace_remove_remote_panel (self);
	}
}

void
widgets_workspace_show_theme_panel (WidgetsWorkspace* self,
                                    WidgetsWorkspace* workspace)
{
	WidgetsThemePanel* _tmp0_;
	WidgetsTerm* _tmp11_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (workspace != NULL);
	widgets_workspace_remove_search_panel (self);
	widgets_workspace_remove_remote_panel (self);
	widgets_workspace_remove_encoding_panel (self);
	widgets_workspace_remove_command_panel (self);
	_tmp0_ = self->theme_panel;
	if (_tmp0_ == NULL) {
		GtkAllocation rect = {0};
		GtkAllocation _tmp1_ = {0};
		WidgetsWorkspaceManager* _tmp2_;
		WidgetsThemePanel* _tmp3_;
		WidgetsThemePanel* _tmp4_;
		GtkAllocation _tmp5_;
		WidgetsThemePanel* _tmp6_;
		WidgetsThemePanel* _tmp7_;
		GtkAllocation _tmp8_;
		GtkAllocation _tmp9_;
		AnimationAnimateTimer* _tmp10_;
		gtk_widget_get_allocation ((GtkWidget*) self, &_tmp1_);
		rect = _tmp1_;
		_tmp2_ = self->workspace_manager;
		_tmp3_ = widgets_theme_panel_new (workspace, _tmp2_);
		g_object_ref_sink (_tmp3_);
		_g_object_unref0 (self->theme_panel);
		self->theme_panel = _tmp3_;
		_tmp4_ = self->theme_panel;
		_tmp5_ = rect;
		gtk_widget_set_size_request ((GtkWidget*) _tmp4_, constant_THEME_SLIDER_WIDTH, _tmp5_.height);
		_tmp6_ = self->theme_panel;
		gtk_overlay_add_overlay ((GtkOverlay*) self, (GtkWidget*) _tmp6_);
		gtk_widget_show_all ((GtkWidget*) self);
		_tmp7_ = self->theme_panel;
		_tmp8_ = rect;
		gtk_widget_set_margin_left ((GtkWidget*) _tmp7_, _tmp8_.width);
		_tmp9_ = rect;
		self->show_slider_start_x = _tmp9_.width;
		_tmp10_ = self->theme_panel_show_timer;
		animation_animate_timer_reset (_tmp10_, -1);
	}
	_tmp11_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_g_object_unref0 (self->terminal_before_popup);
	self->terminal_before_popup = _tmp11_;
}

void
widgets_workspace_theme_panel_show_animate (WidgetsWorkspace* self,
                                            gdouble progress)
{
	WidgetsThemePanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->theme_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->show_slider_start_x - (constant_THEME_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->theme_panel_show_timer;
		animation_animate_timer_stop (_tmp1_);
	}
}

void
widgets_workspace_theme_panel_hide_animate (WidgetsWorkspace* self,
                                            gdouble progress)
{
	WidgetsThemePanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->theme_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->hide_slider_start_x + (constant_THEME_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->theme_panel_hide_timer;
		animation_animate_timer_stop (_tmp1_);
		widgets_workspace_remove_theme_panel (self);
	}
}

void
widgets_workspace_command_panel_show_animate (WidgetsWorkspace* self,
                                              gdouble progress)
{
	WidgetsCommandPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->command_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->show_slider_start_x - (constant_COMMAND_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->command_panel_show_timer;
		animation_animate_timer_stop (_tmp1_);
	}
}

void
widgets_workspace_command_panel_hide_animate (WidgetsWorkspace* self,
                                              gdouble progress)
{
	WidgetsCommandPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->command_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->hide_slider_start_x + (constant_COMMAND_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->command_panel_hide_timer;
		animation_animate_timer_stop (_tmp1_);
		widgets_workspace_remove_command_panel (self);
	}
}

void
widgets_workspace_encoding_panel_show_animate (WidgetsWorkspace* self,
                                               gdouble progress)
{
	WidgetsEncodingPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->encoding_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->show_slider_start_x - (constant_ENCODING_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->encoding_panel_show_timer;
		animation_animate_timer_stop (_tmp1_);
	}
}

void
widgets_workspace_encoding_panel_hide_animate (WidgetsWorkspace* self,
                                               gdouble progress)
{
	WidgetsEncodingPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->encoding_panel;
	gtk_widget_set_margin_left ((GtkWidget*) _tmp0_, (gint) (self->hide_slider_start_x + (constant_ENCODING_SLIDER_WIDTH * progress)));
	if (progress >= 1.0) {
		AnimationAnimateTimer* _tmp1_;
		_tmp1_ = self->encoding_panel_hide_timer;
		animation_animate_timer_stop (_tmp1_);
		widgets_workspace_remove_encoding_panel (self);
	}
}

void
widgets_workspace_update_focus_terminal (WidgetsWorkspace* self,
                                         WidgetsTerm* term)
{
	WidgetsTerm* _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (term != NULL);
	_tmp0_ = _g_object_ref0 (term);
	_g_object_unref0 (self->focus_terminal);
	self->focus_terminal = _tmp0_;
}

void
widgets_workspace_select_focus_terminal (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->focus_terminal;
	if (_tmp0_ != NULL) {
		WidgetsTerm* _tmp1_;
		_tmp1_ = self->focus_terminal;
		widgets_term_focus_term (_tmp1_);
	}
}

static void
widgets_workspace_resize_workspace (WidgetsWorkspace* self,
                                    WidgetsTerm* term,
                                    WidgetsWorkspaceWorkspaceResizeKey key)
{
	GtkPaned* paned = NULL;
	GtkContainer* _tmp0_;
	GtkPaned* _tmp1_;
	gboolean correct_paned_found = FALSE;
	GtkPaned* _tmp2_;
	gint value = 0;
	gboolean _tmp10_ = FALSE;
	gint pos = 0;
	GtkPaned* _tmp11_;
	GtkPaned* _tmp12_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (term != NULL);
	_tmp0_ = gtk_widget_get_parent ((GtkWidget*) term);
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, gtk_paned_get_type (), GtkPaned));
	paned = _tmp1_;
	_tmp2_ = paned;
	correct_paned_found = widgets_workspace_is_paned_correct (self, _tmp2_, key);
	while (TRUE) {
		gboolean _tmp3_ = FALSE;
		GtkPaned* _tmp4_;
		GtkContainer* _tmp5_;
		GtkPaned* _tmp6_;
		GtkContainer* _tmp7_;
		GtkPaned* _tmp8_;
		GtkPaned* _tmp9_;
		_tmp4_ = paned;
		_tmp5_ = gtk_widget_get_parent ((GtkWidget*) _tmp4_);
		if (g_type_is_a (G_TYPE_FROM_INSTANCE ((GObject*) _tmp5_), gtk_paned_get_type ())) {
			_tmp3_ = !correct_paned_found;
		} else {
			_tmp3_ = FALSE;
		}
		if (!_tmp3_) {
			break;
		}
		_tmp6_ = paned;
		_tmp7_ = gtk_widget_get_parent ((GtkWidget*) _tmp6_);
		_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_paned_get_type (), GtkPaned));
		_g_object_unref0 (paned);
		paned = _tmp8_;
		_tmp9_ = paned;
		correct_paned_found = widgets_workspace_is_paned_correct (self, _tmp9_, key);
	}
	if (!correct_paned_found) {
		_g_object_unref0 (paned);
		return;
	}
	value = 0;
	if (key == WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_LEFT) {
		_tmp10_ = TRUE;
	} else {
		_tmp10_ = key == WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_UP;
	}
	if (_tmp10_) {
		value = -20;
	} else {
		value = 20;
	}
	_tmp11_ = paned;
	pos = gtk_paned_get_position (_tmp11_) + value;
	_tmp12_ = paned;
	gtk_paned_set_position (_tmp12_, pos);
	_g_object_unref0 (paned);
}

static gboolean
widgets_workspace_is_paned_correct (WidgetsWorkspace* self,
                                    GtkPaned* paned,
                                    WidgetsWorkspaceWorkspaceResizeKey key)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (paned != NULL, FALSE);
	if (key == WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_LEFT) {
		_tmp2_ = TRUE;
	} else {
		_tmp2_ = key == WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_RIGHT;
	}
	if (_tmp2_) {
		_tmp1_ = gtk_orientable_get_orientation ((GtkOrientable*) paned) == GTK_ORIENTATION_HORIZONTAL;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		_tmp0_ = TRUE;
	} else {
		gboolean _tmp3_ = FALSE;
		gboolean _tmp4_ = FALSE;
		if (key == WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_UP) {
			_tmp4_ = TRUE;
		} else {
			_tmp4_ = key == WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_DOWN;
		}
		if (_tmp4_) {
			_tmp3_ = gtk_orientable_get_orientation ((GtkOrientable*) paned) == GTK_ORIENTATION_VERTICAL;
		} else {
			_tmp3_ = FALSE;
		}
		_tmp0_ = _tmp3_;
	}
	result = _tmp0_;
	return result;
}

void
widgets_workspace_resize_workspace_left (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_resize_workspace (self, _tmp1_, WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_LEFT);
	_g_object_unref0 (_tmp1_);
}

void
widgets_workspace_resize_workspace_right (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_resize_workspace (self, _tmp1_, WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_RIGHT);
	_g_object_unref0 (_tmp1_);
}

void
widgets_workspace_resize_workspace_up (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_resize_workspace (self, _tmp1_, WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_UP);
	_g_object_unref0 (_tmp1_);
}

void
widgets_workspace_resize_workspace_down (WidgetsWorkspace* self)
{
	WidgetsTerm* _tmp0_;
	WidgetsTerm* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = widgets_workspace_get_focus_term (self, (GtkContainer*) self);
	_tmp1_ = _tmp0_;
	widgets_workspace_resize_workspace (self, _tmp1_, WIDGETS_WORKSPACE_WORKSPACE_RESIZE_KEY_DOWN);
	_g_object_unref0 (_tmp1_);
}

void
widgets_workspace_remove_all_panels (WidgetsWorkspace* self)
{
	g_return_if_fail (self != NULL);
	widgets_workspace_remove_search_panel (self);
	widgets_workspace_remove_remote_panel (self);
	widgets_workspace_remove_theme_panel (self);
	widgets_workspace_remove_encoding_panel (self);
	widgets_workspace_remove_command_panel (self);
}

void
widgets_workspace_remove_theme_panel (WidgetsWorkspace* self)
{
	WidgetsThemePanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->theme_panel;
	widgets_workspace_remove_panel (self, (GtkWidget*) _tmp0_);
	_g_object_unref0 (self->theme_panel);
	self->theme_panel = NULL;
}

void
widgets_workspace_remove_command_panel (WidgetsWorkspace* self)
{
	WidgetsCommandPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->command_panel;
	widgets_workspace_remove_panel (self, (GtkWidget*) _tmp0_);
	_g_object_unref0 (self->command_panel);
	self->command_panel = NULL;
}

void
widgets_workspace_remove_encoding_panel (WidgetsWorkspace* self)
{
	WidgetsEncodingPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->encoding_panel;
	widgets_workspace_remove_panel (self, (GtkWidget*) _tmp0_);
	_g_object_unref0 (self->encoding_panel);
	self->encoding_panel = NULL;
}

void
widgets_workspace_remove_search_panel (WidgetsWorkspace* self)
{
	WidgetsSearchPanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->search_panel;
	widgets_workspace_remove_panel (self, (GtkWidget*) _tmp0_);
	_g_object_unref0 (self->search_panel);
	self->search_panel = NULL;
}

void
widgets_workspace_remove_remote_panel (WidgetsWorkspace* self)
{
	WidgetsRemotePanel* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->remote_panel;
	widgets_workspace_remove_panel (self, (GtkWidget*) _tmp0_);
	_g_object_unref0 (self->remote_panel);
	self->remote_panel = NULL;
}

static void
widgets_workspace_remove_panel (WidgetsWorkspace* self,
                                GtkWidget* panel)
{
	WidgetsTerm* _tmp4_;
	g_return_if_fail (self != NULL);
	if (panel != NULL) {
		GtkWidget* panel_parent = NULL;
		GtkContainer* _tmp0_;
		GtkWidget* _tmp1_;
		GtkWidget* _tmp2_;
		_tmp0_ = gtk_widget_get_parent (panel);
		_tmp1_ = _g_object_ref0 ((GtkWidget*) _tmp0_);
		panel_parent = _tmp1_;
		_tmp2_ = panel_parent;
		if (_tmp2_ != NULL) {
			GtkWidget* _tmp3_;
			_tmp3_ = panel_parent;
			gtk_container_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_container_get_type (), GtkContainer), panel);
		}
		gtk_widget_destroy (panel);
		_g_object_unref0 (panel_parent);
	}
	_tmp4_ = self->terminal_before_popup;
	if (_tmp4_ != NULL) {
		WidgetsTerm* _tmp5_;
		WidgetsTerm* _tmp6_;
		VteTerminal* _tmp7_;
		_tmp5_ = self->terminal_before_popup;
		widgets_term_focus_term (_tmp5_);
		_tmp6_ = self->terminal_before_popup;
		_tmp7_ = _tmp6_->term;
		vte_terminal_unselect_all (_tmp7_);
		_g_object_unref0 (self->terminal_before_popup);
		self->terminal_before_popup = NULL;
	}
}

void
widgets_workspace_hide_remote_panel (WidgetsWorkspace* self)
{
	WidgetsRemotePanel* _tmp0_;
	AnimationAnimateTimer* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->remote_panel;
	_tmp1_ = self->remote_panel_hide_timer;
	widgets_workspace_hide_panel (self, (GtkWidget*) _tmp0_, constant_SLIDER_WIDTH, _tmp1_);
}

void
widgets_workspace_hide_encoding_panel (WidgetsWorkspace* self)
{
	WidgetsEncodingPanel* _tmp0_;
	AnimationAnimateTimer* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->encoding_panel;
	_tmp1_ = self->encoding_panel_hide_timer;
	widgets_workspace_hide_panel (self, (GtkWidget*) _tmp0_, constant_ENCODING_SLIDER_WIDTH, _tmp1_);
}

void
widgets_workspace_hide_theme_panel (WidgetsWorkspace* self)
{
	WidgetsThemePanel* _tmp0_;
	AnimationAnimateTimer* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->theme_panel;
	_tmp1_ = self->theme_panel_hide_timer;
	widgets_workspace_hide_panel (self, (GtkWidget*) _tmp0_, constant_THEME_SLIDER_WIDTH, _tmp1_);
}

void
widgets_workspace_hide_command_panel (WidgetsWorkspace* self)
{
	WidgetsCommandPanel* _tmp0_;
	AnimationAnimateTimer* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->command_panel;
	_tmp1_ = self->command_panel_hide_timer;
	widgets_workspace_hide_panel (self, (GtkWidget*) _tmp0_, constant_COMMAND_SLIDER_WIDTH, _tmp1_);
}

static void
widgets_workspace_hide_panel (WidgetsWorkspace* self,
                              GtkWidget* panel,
                              gint panel_width,
                              AnimationAnimateTimer* timer)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (timer != NULL);
	if (panel != NULL) {
		GtkAllocation rect = {0};
		GtkAllocation _tmp0_ = {0};
		GtkAllocation _tmp1_;
		gtk_widget_get_allocation ((GtkWidget*) self, &_tmp0_);
		rect = _tmp0_;
		_tmp1_ = rect;
		self->hide_slider_start_x = _tmp1_.width - panel_width;
		animation_animate_timer_reset (timer, -1);
	}
}

static void
g_cclosure_user_marshal_VOID__INT_STRING (GClosure * closure,
                                          GValue * return_value,
                                          guint n_param_values,
                                          const GValue * param_values,
                                          gpointer invocation_hint,
                                          gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__INT_STRING) (gpointer data1, gint arg_1, const char* arg_2, gpointer data2);
	register GMarshalFunc_VOID__INT_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__INT_STRING) (marshal_data ? marshal_data : cc->callback);
	callback (data1, g_value_get_int (param_values + 1), g_value_get_string (param_values + 2), data2);
}

static void
widgets_workspace_class_init (WidgetsWorkspaceClass * klass,
                              gpointer klass_data)
{
	widgets_workspace_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = widgets_workspace_finalize;
	widgets_workspace_signals[WIDGETS_WORKSPACE_CHANGE_TITLE_SIGNAL] = g_signal_new ("change-title", WIDGETS_TYPE_WORKSPACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__INT_STRING, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_STRING);
	widgets_workspace_signals[WIDGETS_WORKSPACE_EXIT_SIGNAL] = g_signal_new ("exit", WIDGETS_TYPE_WORKSPACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
	widgets_workspace_signals[WIDGETS_WORKSPACE_HIGHLIGHT_TAB_SIGNAL] = g_signal_new ("highlight-tab", WIDGETS_TYPE_WORKSPACE, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT);
}

static void
widgets_workspace_instance_init (WidgetsWorkspace * self,
                                 gpointer klass)
{
	self->PANED_HANDLE_SIZE = 1;
	self->hide_slider_interval = 500;
	self->show_slider_interval = 500;
	self->highlight_frame_timeout_source_id = NULL;
}

static void
widgets_workspace_finalize (GObject * obj)
{
	WidgetsWorkspace * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, WIDGETS_TYPE_WORKSPACE, WidgetsWorkspace);
	_g_object_unref0 (self->workspace_manager);
	_g_object_unref0 (self->command_panel_hide_timer);
	_g_object_unref0 (self->command_panel_show_timer);
	_g_object_unref0 (self->encoding_panel_hide_timer);
	_g_object_unref0 (self->encoding_panel_show_timer);
	_g_object_unref0 (self->remote_panel_hide_timer);
	_g_object_unref0 (self->remote_panel_show_timer);
	_g_object_unref0 (self->theme_panel_hide_timer);
	_g_object_unref0 (self->theme_panel_show_timer);
	_g_object_unref0 (self->term_list);
	_g_object_unref0 (self->command_panel);
	_g_object_unref0 (self->encoding_panel);
	_g_object_unref0 (self->remote_panel);
	_g_object_unref0 (self->search_panel);
	_g_object_unref0 (self->focus_terminal);
	_g_object_unref0 (self->terminal_before_popup);
	_g_object_unref0 (self->theme_panel);
	_g_object_unref0 (self->highlight_frame);
	_g_free0 (self->highlight_frame_timeout_source_id);
	G_OBJECT_CLASS (widgets_workspace_parent_class)->finalize (obj);
}

static GType
widgets_workspace_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (WidgetsWorkspaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) widgets_workspace_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (WidgetsWorkspace), 0, (GInstanceInitFunc) widgets_workspace_instance_init, NULL };
	GType widgets_workspace_type_id;
	widgets_workspace_type_id = g_type_register_static (gtk_overlay_get_type (), "WidgetsWorkspace", &g_define_type_info, 0);
	return widgets_workspace_type_id;
}

GType
widgets_workspace_get_type (void)
{
	static volatile gsize widgets_workspace_type_id__once = 0;
	if (g_once_init_enter (&widgets_workspace_type_id__once)) {
		GType widgets_workspace_type_id;
		widgets_workspace_type_id = widgets_workspace_get_type_once ();
		g_once_init_leave (&widgets_workspace_type_id__once, widgets_workspace_type_id);
	}
	return widgets_workspace_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

