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

#include <adwaita.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include "libdino.h"
#include <gdk/gdk.h>
#include <cairo-gobject.h>
#include "dino_i18n.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 DINO_UI_TYPE_MAIN_WINDOW (dino_ui_main_window_get_type ())
#define DINO_UI_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindow))
#define DINO_UI_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindowClass))
#define DINO_UI_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_MAIN_WINDOW))
#define DINO_UI_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_MAIN_WINDOW))
#define DINO_UI_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindowClass))

typedef struct _DinoUiMainWindow DinoUiMainWindow;
typedef struct _DinoUiMainWindowClass DinoUiMainWindowClass;
typedef struct _DinoUiMainWindowPrivate DinoUiMainWindowPrivate;

#define DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER (dino_ui_main_window_placeholder_get_type ())
#define DINO_UI_MAIN_WINDOW_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, DinoUiMainWindowPlaceholder))
#define DINO_UI_MAIN_WINDOW_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, DinoUiMainWindowPlaceholderClass))
#define DINO_UI_IS_MAIN_WINDOW_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER))
#define DINO_UI_IS_MAIN_WINDOW_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER))
#define DINO_UI_MAIN_WINDOW_PLACEHOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, DinoUiMainWindowPlaceholderClass))

typedef struct _DinoUiMainWindowPlaceholder DinoUiMainWindowPlaceholder;
typedef struct _DinoUiMainWindowPlaceholderClass DinoUiMainWindowPlaceholderClass;

#define DINO_UI_TYPE_WELCOME_PLACEHOLDER (dino_ui_welcome_placeholder_get_type ())
#define DINO_UI_WELCOME_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_WELCOME_PLACEHOLDER, DinoUiWelcomePlaceholder))
#define DINO_UI_WELCOME_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_WELCOME_PLACEHOLDER, DinoUiWelcomePlaceholderClass))
#define DINO_UI_IS_WELCOME_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_WELCOME_PLACEHOLDER))
#define DINO_UI_IS_WELCOME_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_WELCOME_PLACEHOLDER))
#define DINO_UI_WELCOME_PLACEHOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_WELCOME_PLACEHOLDER, DinoUiWelcomePlaceholderClass))

typedef struct _DinoUiWelcomePlaceholder DinoUiWelcomePlaceholder;
typedef struct _DinoUiWelcomePlaceholderClass DinoUiWelcomePlaceholderClass;

#define DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER (dino_ui_no_accounts_placeholder_get_type ())
#define DINO_UI_NO_ACCOUNTS_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER, DinoUiNoAccountsPlaceholder))
#define DINO_UI_NO_ACCOUNTS_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER, DinoUiNoAccountsPlaceholderClass))
#define DINO_UI_IS_NO_ACCOUNTS_PLACEHOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER))
#define DINO_UI_IS_NO_ACCOUNTS_PLACEHOLDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER))
#define DINO_UI_NO_ACCOUNTS_PLACEHOLDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER, DinoUiNoAccountsPlaceholderClass))

typedef struct _DinoUiNoAccountsPlaceholder DinoUiNoAccountsPlaceholder;
typedef struct _DinoUiNoAccountsPlaceholderClass DinoUiNoAccountsPlaceholderClass;

#define DINO_UI_TYPE_CONVERSATION_VIEW (dino_ui_conversation_view_get_type ())
#define DINO_UI_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationView))
#define DINO_UI_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationViewClass))
#define DINO_UI_IS_CONVERSATION_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_VIEW))
#define DINO_UI_IS_CONVERSATION_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_VIEW))
#define DINO_UI_CONVERSATION_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationViewClass))

typedef struct _DinoUiConversationView DinoUiConversationView;
typedef struct _DinoUiConversationViewClass DinoUiConversationViewClass;

#define DINO_UI_TYPE_CONVERSATION_SELECTOR (dino_ui_conversation_selector_get_type ())
#define DINO_UI_CONVERSATION_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR, DinoUiConversationSelector))
#define DINO_UI_CONVERSATION_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_SELECTOR, DinoUiConversationSelectorClass))
#define DINO_UI_IS_CONVERSATION_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR))
#define DINO_UI_IS_CONVERSATION_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_SELECTOR))
#define DINO_UI_CONVERSATION_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_SELECTOR, DinoUiConversationSelectorClass))

typedef struct _DinoUiConversationSelector DinoUiConversationSelector;
typedef struct _DinoUiConversationSelectorClass DinoUiConversationSelectorClass;

#define DINO_UI_TYPE_CONVERSATION_TITLEBAR (dino_ui_conversation_titlebar_get_type ())
#define DINO_UI_CONVERSATION_TITLEBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebar))
#define DINO_UI_CONVERSATION_TITLEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebarClass))
#define DINO_UI_IS_CONVERSATION_TITLEBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR))
#define DINO_UI_IS_CONVERSATION_TITLEBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONVERSATION_TITLEBAR))
#define DINO_UI_CONVERSATION_TITLEBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONVERSATION_TITLEBAR, DinoUiConversationTitlebarClass))

typedef struct _DinoUiConversationTitlebar DinoUiConversationTitlebar;
typedef struct _DinoUiConversationTitlebarClass DinoUiConversationTitlebarClass;

#define DINO_UI_TYPE_GLOBAL_SEARCH (dino_ui_global_search_get_type ())
#define DINO_UI_GLOBAL_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_GLOBAL_SEARCH, DinoUiGlobalSearch))
#define DINO_UI_GLOBAL_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_GLOBAL_SEARCH, DinoUiGlobalSearchClass))
#define DINO_UI_IS_GLOBAL_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_GLOBAL_SEARCH))
#define DINO_UI_IS_GLOBAL_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_GLOBAL_SEARCH))
#define DINO_UI_GLOBAL_SEARCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_GLOBAL_SEARCH, DinoUiGlobalSearchClass))

typedef struct _DinoUiGlobalSearch DinoUiGlobalSearch;
typedef struct _DinoUiGlobalSearchClass DinoUiGlobalSearchClass;

#define DINO_UI_TYPE_CONFIG (dino_ui_config_get_type ())
#define DINO_UI_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_CONFIG, DinoUiConfig))
#define DINO_UI_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_CONFIG, DinoUiConfigClass))
#define DINO_UI_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_CONFIG))
#define DINO_UI_IS_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_CONFIG))
#define DINO_UI_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_CONFIG, DinoUiConfigClass))

typedef struct _DinoUiConfig DinoUiConfig;
typedef struct _DinoUiConfigClass DinoUiConfigClass;
enum  {
	DINO_UI_MAIN_WINDOW_0_PROPERTY,
	DINO_UI_MAIN_WINDOW_TITLE_PROPERTY,
	DINO_UI_MAIN_WINDOW_SUBTITLE_PROPERTY,
	DINO_UI_MAIN_WINDOW_NUM_PROPERTIES
};
static GParamSpec* dino_ui_main_window_properties[DINO_UI_MAIN_WINDOW_NUM_PROPERTIES];
typedef enum  {
	DINO_UI_MAIN_WINDOW_STACK_STATE_CLEAN_START,
	DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_ACCOUNTS,
	DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_CONVERSATIONS,
	DINO_UI_MAIN_WINDOW_STACK_STATE_CONVERSATION
} DinoUiMainWindowStackState;

#define DINO_UI_MAIN_WINDOW_TYPE_STACK_STATE (dino_ui_main_window_stack_state_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _dino_ui_global_search_unref0(var) ((var == NULL) ? NULL : (var = (dino_ui_global_search_unref (var), NULL)))
#define _qlite_database_unref0(var) ((var == NULL) ? NULL : (var = (qlite_database_unref (var), NULL)))

#define DINO_UI_TYPE_APPLICATION (dino_ui_application_get_type ())
#define DINO_UI_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplication))
#define DINO_UI_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))
#define DINO_UI_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DINO_UI_TYPE_APPLICATION))
#define DINO_UI_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DINO_UI_TYPE_APPLICATION, DinoUiApplicationClass))

typedef struct _DinoUiApplication DinoUiApplication;
typedef struct _DinoUiApplicationClass DinoUiApplicationClass;
enum  {
	DINO_UI_MAIN_WINDOW_CONVERSATION_SELECTED_SIGNAL,
	DINO_UI_MAIN_WINDOW_NUM_SIGNALS
};
static guint dino_ui_main_window_signals[DINO_UI_MAIN_WINDOW_NUM_SIGNALS] = {0};
typedef struct _DinoUiMainWindowPlaceholderPrivate DinoUiMainWindowPlaceholderPrivate;
typedef struct _DinoUiWelcomePlaceholderPrivate DinoUiWelcomePlaceholderPrivate;
enum  {
	DINO_UI_WELCOME_PLACEHOLDER_0_PROPERTY,
	DINO_UI_WELCOME_PLACEHOLDER_NUM_PROPERTIES
};
static GParamSpec* dino_ui_welcome_placeholder_properties[DINO_UI_WELCOME_PLACEHOLDER_NUM_PROPERTIES];
typedef struct _DinoUiNoAccountsPlaceholderPrivate DinoUiNoAccountsPlaceholderPrivate;
enum  {
	DINO_UI_NO_ACCOUNTS_PLACEHOLDER_0_PROPERTY,
	DINO_UI_NO_ACCOUNTS_PLACEHOLDER_NUM_PROPERTIES
};
static GParamSpec* dino_ui_no_accounts_placeholder_properties[DINO_UI_NO_ACCOUNTS_PLACEHOLDER_NUM_PROPERTIES];
enum  {
	DINO_UI_MAIN_WINDOW_PLACEHOLDER_0_PROPERTY,
	DINO_UI_MAIN_WINDOW_PLACEHOLDER_NUM_PROPERTIES
};
static GParamSpec* dino_ui_main_window_placeholder_properties[DINO_UI_MAIN_WINDOW_PLACEHOLDER_NUM_PROPERTIES];

struct _DinoUiMainWindow {
	AdwApplicationWindow parent_instance;
	DinoUiMainWindowPrivate * priv;
	DinoUiWelcomePlaceholder* welcome_placeholder;
	DinoUiNoAccountsPlaceholder* accounts_placeholder;
	DinoUiConversationView* conversation_view;
	DinoUiConversationSelector* conversation_selector;
	DinoUiConversationTitlebar* conversation_titlebar;
	GtkWidget* conversation_list_titlebar;
	GtkBox* box;
	GtkBox* left_box;
	GtkBox* right_box;
	AdwFlap* search_flap;
	DinoUiGlobalSearch* global_search;
};

struct _DinoUiMainWindowClass {
	AdwApplicationWindowClass parent_class;
};

struct _DinoUiMainWindowPrivate {
	gchar* _title;
	gchar* _subtitle;
	AdwLeaflet* leaflet;
	GtkStack* stack;
	GtkStack* left_stack;
	GtkStack* right_stack;
	DinoStreamInteractor* stream_interactor;
	DinoDatabase* db;
	DinoUiConfig* config;
};

struct _DinoUiMainWindowPlaceholder {
	GtkBox parent_instance;
	DinoUiMainWindowPlaceholderPrivate * priv;
	AdwStatusPage* status_page;
	GtkButton* primary_button;
	GtkButton* secondary_button;
};

struct _DinoUiMainWindowPlaceholderClass {
	GtkBoxClass parent_class;
};

struct _DinoUiWelcomePlaceholder {
	DinoUiMainWindowPlaceholder parent_instance;
	DinoUiWelcomePlaceholderPrivate * priv;
};

struct _DinoUiWelcomePlaceholderClass {
	DinoUiMainWindowPlaceholderClass parent_class;
};

struct _DinoUiNoAccountsPlaceholder {
	DinoUiMainWindowPlaceholder parent_instance;
	DinoUiNoAccountsPlaceholderPrivate * priv;
};

struct _DinoUiNoAccountsPlaceholderClass {
	DinoUiMainWindowPlaceholderClass parent_class;
};

static gint DinoUiMainWindow_private_offset;
static gpointer dino_ui_main_window_parent_class = NULL;
static gpointer dino_ui_welcome_placeholder_parent_class = NULL;
static gpointer dino_ui_no_accounts_placeholder_parent_class = NULL;
static gpointer dino_ui_main_window_placeholder_parent_class = NULL;

VALA_EXTERN GType dino_ui_main_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiMainWindow, g_object_unref)
VALA_EXTERN GType dino_ui_main_window_placeholder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiMainWindowPlaceholder, g_object_unref)
VALA_EXTERN GType dino_ui_welcome_placeholder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiWelcomePlaceholder, g_object_unref)
VALA_EXTERN GType dino_ui_no_accounts_placeholder_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiNoAccountsPlaceholder, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationView, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_selector_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationSelector, g_object_unref)
VALA_EXTERN GType dino_ui_conversation_titlebar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConversationTitlebar, g_object_unref)
VALA_EXTERN gpointer dino_ui_global_search_ref (gpointer instance);
VALA_EXTERN void dino_ui_global_search_unref (gpointer instance);
VALA_EXTERN GParamSpec* dino_ui_param_spec_global_search (const gchar* name,
                                              const gchar* nick,
                                              const gchar* blurb,
                                              GType object_type,
                                              GParamFlags flags);
VALA_EXTERN void dino_ui_value_set_global_search (GValue* value,
                                      gpointer v_object);
VALA_EXTERN void dino_ui_value_take_global_search (GValue* value,
                                       gpointer v_object);
VALA_EXTERN gpointer dino_ui_value_get_global_search (const GValue* value);
VALA_EXTERN GType dino_ui_global_search_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiGlobalSearch, dino_ui_global_search_unref)
VALA_EXTERN GType dino_ui_config_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiConfig, g_object_unref)
VALA_EXTERN GType dino_ui_main_window_stack_state_get_type (void) G_GNUC_CONST ;
VALA_EXTERN DinoUiWelcomePlaceholder* dino_ui_welcome_placeholder_new (void);
VALA_EXTERN DinoUiWelcomePlaceholder* dino_ui_welcome_placeholder_construct (GType object_type);
VALA_EXTERN DinoUiNoAccountsPlaceholder* dino_ui_no_accounts_placeholder_new (void);
VALA_EXTERN DinoUiNoAccountsPlaceholder* dino_ui_no_accounts_placeholder_construct (GType object_type);
VALA_EXTERN GType dino_ui_application_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (DinoUiApplication, g_object_unref)
VALA_EXTERN DinoUiMainWindow* dino_ui_main_window_new (DinoUiApplication* application,
                                           DinoStreamInteractor* stream_interactor,
                                           DinoDatabase* db,
                                           DinoUiConfig* config);
VALA_EXTERN DinoUiMainWindow* dino_ui_main_window_construct (GType object_type,
                                                 DinoUiApplication* application,
                                                 DinoStreamInteractor* stream_interactor,
                                                 DinoDatabase* db,
                                                 DinoUiConfig* config);
VALA_EXTERN void dino_ui_main_window_set_title (DinoUiMainWindow* self,
                                    const gchar* value);
VALA_EXTERN void dino_ui_main_window_restore_window_size (DinoUiMainWindow* self);
static void _dino_ui_main_window_restore_window_size_gtk_widget_realize (GtkWidget* _sender,
                                                                  gpointer self);
static void dino_ui_main_window_setup_unified (DinoUiMainWindow* self);
static void dino_ui_main_window_setup_headerbar (DinoUiMainWindow* self);
static void dino_ui_main_window_setup_stack (DinoUiMainWindow* self);
VALA_EXTERN DinoUiConversationSelector* dino_ui_conversation_selector_init (DinoUiConversationSelector* self,
                                                                DinoStreamInteractor* stream_interactor);
static void __lambda156_ (DinoUiMainWindow* self);
static void ___lambda156__dino_ui_conversation_selector_conversation_selected (DinoUiConversationSelector* _sender,
                                                                        DinoEntitiesConversation* conversation,
                                                                        gpointer self);
VALA_EXTERN DinoUiGlobalSearch* dino_ui_global_search_new (DinoStreamInteractor* stream_interactor);
VALA_EXTERN DinoUiGlobalSearch* dino_ui_global_search_construct (GType object_type,
                                                     DinoStreamInteractor* stream_interactor);
VALA_EXTERN GtkWidget* dino_ui_global_search_get_widget (DinoUiGlobalSearch* self);
VALA_EXTERN AdwHeaderBar* dino_ui_get_conversation_list_titlebar (void);
VALA_EXTERN DinoUiConversationTitlebar* dino_ui_conversation_titlebar_new (void);
VALA_EXTERN DinoUiConversationTitlebar* dino_ui_conversation_titlebar_construct (GType object_type);
VALA_EXTERN GtkWidget* dino_ui_conversation_titlebar_get_widget (DinoUiConversationTitlebar* self);
static void __lambda157_ (DinoUiMainWindow* self);
VALA_EXTERN void dino_ui_conversation_titlebar_set_back_button_visible (DinoUiConversationTitlebar* self,
                                                            gboolean value);
static void ___lambda157__g_object_notify (GObject* _sender,
                                    GParamSpec* pspec,
                                    gpointer self);
static void __lambda158_ (DinoUiMainWindow* self);
static void ___lambda158__dino_ui_conversation_titlebar_back_pressed (DinoUiConversationTitlebar* _sender,
                                                               gpointer self);
VALA_EXTERN void dino_ui_main_window_set_stack_state (DinoUiMainWindow* self,
                                          DinoUiMainWindowStackState stack_state);
VALA_EXTERN void dino_ui_main_window_loop_conversations (DinoUiMainWindow* self,
                                             gboolean backwards);
VALA_EXTERN void dino_ui_conversation_selector_loop_conversations (DinoUiConversationSelector* self,
                                                       gboolean backwards);
VALA_EXTERN gint dino_ui_config_get_window_width (DinoUiConfig* self);
VALA_EXTERN gint dino_ui_config_get_window_height (DinoUiConfig* self);
VALA_EXTERN gboolean dino_ui_config_get_window_maximize (DinoUiConfig* self);
static void __lambda155_ (DinoUiMainWindow* self);
VALA_EXTERN void dino_ui_main_window_save_window_size (DinoUiMainWindow* self);
VALA_EXTERN void dino_ui_config_set_window_maximize (DinoUiConfig* self,
                                         gboolean value);
static void ___lambda155__gtk_widget_unrealize (GtkWidget* _sender,
                                         gpointer self);
VALA_EXTERN void dino_ui_config_set_window_width (DinoUiConfig* self,
                                      gint value);
VALA_EXTERN void dino_ui_config_set_window_height (DinoUiConfig* self,
                                       gint value);
VALA_EXTERN const gchar* dino_ui_main_window_get_title (DinoUiMainWindow* self);
VALA_EXTERN const gchar* dino_ui_main_window_get_subtitle (DinoUiMainWindow* self);
VALA_EXTERN void dino_ui_main_window_set_subtitle (DinoUiMainWindow* self,
                                       const gchar* value);
static gboolean _dino_ui_main_window___lambda159_ (GtkWidget* widget,
                                            GVariant* args);
static gboolean __dino_ui_main_window___lambda159__gtk_shortcut_func (GtkWidget* widget,
                                                               GVariant* args,
                                                               gpointer self);
static void dino_ui_main_window_finalize (GObject * obj);
static GType dino_ui_main_window_get_type_once (void);
static void _vala_dino_ui_main_window_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec);
static void _vala_dino_ui_main_window_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec);
VALA_EXTERN DinoUiMainWindowPlaceholder* dino_ui_main_window_placeholder_new (void);
VALA_EXTERN DinoUiMainWindowPlaceholder* dino_ui_main_window_placeholder_construct (GType object_type);
static GType dino_ui_welcome_placeholder_get_type_once (void);
static GType dino_ui_no_accounts_placeholder_get_type_once (void);
static void dino_ui_main_window_placeholder_finalize (GObject * obj);
static GType dino_ui_main_window_placeholder_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
dino_ui_main_window_get_instance_private (DinoUiMainWindow* self)
{
	return G_STRUCT_MEMBER_P (self, DinoUiMainWindow_private_offset);
}

static GType
dino_ui_main_window_stack_state_get_type_once (void)
{
	static const GEnumValue values[] = {{DINO_UI_MAIN_WINDOW_STACK_STATE_CLEAN_START, "DINO_UI_MAIN_WINDOW_STACK_STATE_CLEAN_START", "clean-start"}, {DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_ACCOUNTS, "DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_ACCOUNTS", "no-active-accounts"}, {DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_CONVERSATIONS, "DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_CONVERSATIONS", "no-active-conversations"}, {DINO_UI_MAIN_WINDOW_STACK_STATE_CONVERSATION, "DINO_UI_MAIN_WINDOW_STACK_STATE_CONVERSATION", "conversation"}, {0, NULL, NULL}};
	GType dino_ui_main_window_stack_state_type_id;
	dino_ui_main_window_stack_state_type_id = g_enum_register_static ("DinoUiMainWindowStackState", values);
	return dino_ui_main_window_stack_state_type_id;
}

GType
dino_ui_main_window_stack_state_get_type (void)
{
	static volatile gsize dino_ui_main_window_stack_state_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_main_window_stack_state_type_id__once)) {
		GType dino_ui_main_window_stack_state_type_id;
		dino_ui_main_window_stack_state_type_id = dino_ui_main_window_stack_state_get_type_once ();
		g_once_init_leave (&dino_ui_main_window_stack_state_type_id__once, dino_ui_main_window_stack_state_type_id);
	}
	return dino_ui_main_window_stack_state_type_id__once;
}

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

static gpointer
_qlite_database_ref0 (gpointer self)
{
	return self ? qlite_database_ref (self) : NULL;
}

static void
_dino_ui_main_window_restore_window_size_gtk_widget_realize (GtkWidget* _sender,
                                                             gpointer self)
{
	dino_ui_main_window_restore_window_size ((DinoUiMainWindow*) self);
}

DinoUiMainWindow*
dino_ui_main_window_construct (GType object_type,
                               DinoUiApplication* application,
                               DinoStreamInteractor* stream_interactor,
                               DinoDatabase* db,
                               DinoUiConfig* config)
{
	DinoUiMainWindow * self = NULL;
	DinoStreamInteractor* _tmp0_;
	DinoDatabase* _tmp1_;
	DinoUiConfig* _tmp2_;
	g_return_val_if_fail (application != NULL, NULL);
	g_return_val_if_fail (stream_interactor != NULL, NULL);
	g_return_val_if_fail (db != NULL, NULL);
	g_return_val_if_fail (config != NULL, NULL);
	self = (DinoUiMainWindow*) g_object_new (object_type, "application", application, NULL);
	_tmp0_ = _g_object_ref0 (stream_interactor);
	_g_object_unref0 (self->priv->stream_interactor);
	self->priv->stream_interactor = _tmp0_;
	_tmp1_ = _qlite_database_ref0 (db);
	_qlite_database_unref0 (self->priv->db);
	self->priv->db = _tmp1_;
	_tmp2_ = _g_object_ref0 (config);
	_g_object_unref0 (self->priv->config);
	self->priv->config = _tmp2_;
	dino_ui_main_window_set_title (self, "Dino");
	gtk_widget_add_css_class ((GtkWidget*) self, "dino-main");
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "realize", (GCallback) _dino_ui_main_window_restore_window_size_gtk_widget_realize, self, 0);
	dino_ui_main_window_setup_unified (self);
	dino_ui_main_window_setup_headerbar (self);
	dino_ui_main_window_setup_stack (self);
	return self;
}

DinoUiMainWindow*
dino_ui_main_window_new (DinoUiApplication* application,
                         DinoStreamInteractor* stream_interactor,
                         DinoDatabase* db,
                         DinoUiConfig* config)
{
	return dino_ui_main_window_construct (DINO_UI_TYPE_MAIN_WINDOW, application, stream_interactor, db, config);
}

static void
__lambda156_ (DinoUiMainWindow* self)
{
	AdwLeaflet* _tmp0_;
	_tmp0_ = self->priv->leaflet;
	adw_leaflet_navigate (_tmp0_, ADW_NAVIGATION_DIRECTION_FORWARD);
}

static void
___lambda156__dino_ui_conversation_selector_conversation_selected (DinoUiConversationSelector* _sender,
                                                                   DinoEntitiesConversation* conversation,
                                                                   gpointer self)
{
	__lambda156_ ((DinoUiMainWindow*) self);
}

static void
dino_ui_main_window_setup_unified (DinoUiMainWindow* self)
{
	GtkBuilder* builder = NULL;
	GtkBuilder* _tmp0_;
	GObject* _tmp1_;
	AdwLeaflet* _tmp2_;
	GtkBox* _tmp3_;
	AdwLeaflet* _tmp4_;
	GObject* _tmp5_;
	GtkBox* _tmp6_;
	GObject* _tmp7_;
	GtkBox* _tmp8_;
	GObject* _tmp9_;
	GtkStack* _tmp10_;
	GObject* _tmp11_;
	GtkStack* _tmp12_;
	GObject* _tmp13_;
	DinoUiConversationView* _tmp14_;
	GObject* _tmp15_;
	AdwFlap* _tmp16_;
	GObject* _tmp17_;
	DinoStreamInteractor* _tmp18_;
	DinoUiConversationSelector* _tmp19_;
	DinoUiConversationSelector* _tmp20_;
	AdwBin* search_frame = NULL;
	GObject* _tmp21_;
	AdwBin* _tmp22_;
	DinoStreamInteractor* _tmp23_;
	DinoUiGlobalSearch* _tmp24_;
	DinoUiGlobalSearch* _tmp25_;
	GtkWidget* _tmp26_;
	GtkWidget* _tmp27_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_builder_new_from_resource ("/im/dino/Dino/unified_main_content.ui");
	builder = _tmp0_;
	_tmp1_ = gtk_builder_get_object (builder, "leaflet");
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, adw_leaflet_get_type (), AdwLeaflet));
	_g_object_unref0 (self->priv->leaflet);
	self->priv->leaflet = _tmp2_;
	_tmp3_ = self->box;
	_tmp4_ = self->priv->leaflet;
	gtk_box_append (_tmp3_, (GtkWidget*) _tmp4_);
	_tmp5_ = gtk_builder_get_object (builder, "left_box");
	_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_box_get_type (), GtkBox));
	_g_object_unref0 (self->left_box);
	self->left_box = _tmp6_;
	_tmp7_ = gtk_builder_get_object (builder, "right_box");
	_tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, gtk_box_get_type (), GtkBox));
	_g_object_unref0 (self->right_box);
	self->right_box = _tmp8_;
	_tmp9_ = gtk_builder_get_object (builder, "left_stack");
	_tmp10_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_stack_get_type (), GtkStack));
	_g_object_unref0 (self->priv->left_stack);
	self->priv->left_stack = _tmp10_;
	_tmp11_ = gtk_builder_get_object (builder, "right_stack");
	_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, gtk_stack_get_type (), GtkStack));
	_g_object_unref0 (self->priv->right_stack);
	self->priv->right_stack = _tmp12_;
	_tmp13_ = gtk_builder_get_object (builder, "conversation_view");
	_tmp14_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, DINO_UI_TYPE_CONVERSATION_VIEW, DinoUiConversationView));
	_g_object_unref0 (self->conversation_view);
	self->conversation_view = _tmp14_;
	_tmp15_ = gtk_builder_get_object (builder, "search_flap");
	_tmp16_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, adw_flap_get_type (), AdwFlap));
	_g_object_unref0 (self->search_flap);
	self->search_flap = _tmp16_;
	_tmp17_ = gtk_builder_get_object (builder, "conversation_list");
	_tmp18_ = self->priv->stream_interactor;
	_tmp19_ = dino_ui_conversation_selector_init (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, DINO_UI_TYPE_CONVERSATION_SELECTOR, DinoUiConversationSelector), _tmp18_);
	_g_object_unref0 (self->conversation_selector);
	self->conversation_selector = _tmp19_;
	_tmp20_ = self->conversation_selector;
	g_signal_connect_object (_tmp20_, "conversation-selected", (GCallback) ___lambda156__dino_ui_conversation_selector_conversation_selected, self, G_CONNECT_AFTER);
	_tmp21_ = gtk_builder_get_object (builder, "search_frame");
	_tmp22_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, adw_bin_get_type (), AdwBin));
	search_frame = _tmp22_;
	_tmp23_ = self->priv->stream_interactor;
	_tmp24_ = dino_ui_global_search_new (_tmp23_);
	_dino_ui_global_search_unref0 (self->global_search);
	self->global_search = _tmp24_;
	_tmp25_ = self->global_search;
	_tmp26_ = dino_ui_global_search_get_widget (_tmp25_);
	_tmp27_ = _tmp26_;
	adw_bin_set_child (search_frame, _tmp27_);
	_g_object_unref0 (_tmp27_);
	_g_object_unref0 (search_frame);
	_g_object_unref0 (builder);
}

static void
__lambda157_ (DinoUiMainWindow* self)
{
	DinoUiConversationTitlebar* _tmp0_;
	AdwLeaflet* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	_tmp0_ = self->conversation_titlebar;
	_tmp1_ = self->priv->leaflet;
	_tmp2_ = adw_leaflet_get_folded (_tmp1_);
	_tmp3_ = _tmp2_;
	dino_ui_conversation_titlebar_set_back_button_visible (_tmp0_, _tmp3_);
}

static void
___lambda157__g_object_notify (GObject* _sender,
                               GParamSpec* pspec,
                               gpointer self)
{
	__lambda157_ ((DinoUiMainWindow*) self);
}

static void
__lambda158_ (DinoUiMainWindow* self)
{
	AdwLeaflet* _tmp0_;
	_tmp0_ = self->priv->leaflet;
	adw_leaflet_navigate (_tmp0_, ADW_NAVIGATION_DIRECTION_BACK);
}

static void
___lambda158__dino_ui_conversation_titlebar_back_pressed (DinoUiConversationTitlebar* _sender,
                                                          gpointer self)
{
	__lambda158_ ((DinoUiMainWindow*) self);
}

static void
dino_ui_main_window_setup_headerbar (DinoUiMainWindow* self)
{
	AdwHeaderBar* _tmp0_;
	DinoUiConversationTitlebar* _tmp1_;
	AdwLeaflet* _tmp2_;
	GtkWidget* _tmp3_;
	AdwLeaflet* _tmp4_;
	DinoUiConversationTitlebar* _tmp5_;
	GtkWidget* _tmp6_;
	GtkWidget* _tmp7_;
	GtkBox* _tmp8_;
	GtkWidget* _tmp9_;
	GtkBox* _tmp10_;
	DinoUiConversationTitlebar* _tmp11_;
	GtkWidget* _tmp12_;
	GtkWidget* _tmp13_;
	AdwLeaflet* _tmp14_;
	DinoUiConversationTitlebar* _tmp15_;
	g_return_if_fail (self != NULL);
	_tmp0_ = dino_ui_get_conversation_list_titlebar ();
	_g_object_unref0 (self->conversation_list_titlebar);
	self->conversation_list_titlebar = (GtkWidget*) _tmp0_;
	_tmp1_ = dino_ui_conversation_titlebar_new ();
	_g_object_unref0 (self->conversation_titlebar);
	self->conversation_titlebar = _tmp1_;
	_tmp2_ = self->priv->leaflet;
	_tmp3_ = self->conversation_list_titlebar;
	g_object_bind_property_with_closures ((GObject*) _tmp2_, "folded", (GObject*) _tmp3_, "show-end-title-buttons", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_tmp4_ = self->priv->leaflet;
	_tmp5_ = self->conversation_titlebar;
	_tmp6_ = dino_ui_conversation_titlebar_get_widget (_tmp5_);
	_tmp7_ = _tmp6_;
	g_object_bind_property_with_closures ((GObject*) _tmp4_, "folded", (GObject*) _tmp7_, "show-start-title-buttons", G_BINDING_SYNC_CREATE, (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)), (GClosure*) ((NULL == NULL) ? NULL : g_cclosure_new ((GCallback) NULL, NULL, (GClosureNotify) NULL)));
	_g_object_unref0 (_tmp7_);
	_tmp8_ = self->left_box;
	_tmp9_ = self->conversation_list_titlebar;
	gtk_box_prepend (_tmp8_, _tmp9_);
	_tmp10_ = self->right_box;
	_tmp11_ = self->conversation_titlebar;
	_tmp12_ = dino_ui_conversation_titlebar_get_widget (_tmp11_);
	_tmp13_ = _tmp12_;
	gtk_box_prepend (_tmp10_, _tmp13_);
	_g_object_unref0 (_tmp13_);
	_tmp14_ = self->priv->leaflet;
	g_signal_connect_object ((GObject*) _tmp14_, "notify::folded", (GCallback) ___lambda157__g_object_notify, self, G_CONNECT_AFTER);
	_tmp15_ = self->conversation_titlebar;
	g_signal_connect_object (_tmp15_, "back-pressed", (GCallback) ___lambda158__dino_ui_conversation_titlebar_back_pressed, self, 0);
}

static void
dino_ui_main_window_setup_stack (DinoUiMainWindow* self)
{
	GtkStack* _tmp0_;
	GtkBox* _tmp1_;
	GtkStack* _tmp2_;
	DinoUiWelcomePlaceholder* _tmp3_;
	GtkStack* _tmp4_;
	DinoUiNoAccountsPlaceholder* _tmp5_;
	GtkStack* _tmp6_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->stack;
	_tmp1_ = self->box;
	gtk_stack_add_named (_tmp0_, (GtkWidget*) _tmp1_, "main");
	_tmp2_ = self->priv->stack;
	_tmp3_ = self->welcome_placeholder;
	gtk_stack_add_named (_tmp2_, (GtkWidget*) _tmp3_, "welcome_placeholder");
	_tmp4_ = self->priv->stack;
	_tmp5_ = self->accounts_placeholder;
	gtk_stack_add_named (_tmp4_, (GtkWidget*) _tmp5_, "accounts_placeholder");
	_tmp6_ = self->priv->stack;
	adw_application_window_set_content ((AdwApplicationWindow*) self, (GtkWidget*) _tmp6_);
}

void
dino_ui_main_window_set_stack_state (DinoUiMainWindow* self,
                                     DinoUiMainWindowStackState stack_state)
{
	g_return_if_fail (self != NULL);
	if (stack_state == DINO_UI_MAIN_WINDOW_STACK_STATE_CONVERSATION) {
		GtkStack* _tmp0_;
		GtkStack* _tmp1_;
		GtkStack* _tmp2_;
		_tmp0_ = self->priv->left_stack;
		gtk_stack_set_visible_child_name (_tmp0_, "content");
		_tmp1_ = self->priv->right_stack;
		gtk_stack_set_visible_child_name (_tmp1_, "content");
		_tmp2_ = self->priv->stack;
		gtk_stack_set_visible_child_name (_tmp2_, "main");
	} else {
		gboolean _tmp3_ = FALSE;
		if (stack_state == DINO_UI_MAIN_WINDOW_STACK_STATE_CLEAN_START) {
			_tmp3_ = TRUE;
		} else {
			_tmp3_ = stack_state == DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_ACCOUNTS;
		}
		if (_tmp3_) {
			if (stack_state == DINO_UI_MAIN_WINDOW_STACK_STATE_CLEAN_START) {
				GtkStack* _tmp4_;
				_tmp4_ = self->priv->stack;
				gtk_stack_set_visible_child_name (_tmp4_, "welcome_placeholder");
			} else {
				if (stack_state == DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_ACCOUNTS) {
					GtkStack* _tmp5_;
					_tmp5_ = self->priv->stack;
					gtk_stack_set_visible_child_name (_tmp5_, "accounts_placeholder");
				}
			}
		} else {
			if (stack_state == DINO_UI_MAIN_WINDOW_STACK_STATE_NO_ACTIVE_CONVERSATIONS) {
				GtkStack* _tmp6_;
				GtkStack* _tmp7_;
				GtkStack* _tmp8_;
				_tmp6_ = self->priv->stack;
				gtk_stack_set_visible_child_name (_tmp6_, "main");
				_tmp7_ = self->priv->left_stack;
				gtk_stack_set_visible_child_name (_tmp7_, "placeholder");
				_tmp8_ = self->priv->right_stack;
				gtk_stack_set_visible_child_name (_tmp8_, "placeholder");
			}
		}
	}
}

void
dino_ui_main_window_loop_conversations (DinoUiMainWindow* self,
                                        gboolean backwards)
{
	DinoUiConversationSelector* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->conversation_selector;
	dino_ui_conversation_selector_loop_conversations (_tmp0_, backwards);
}

static void
__lambda155_ (DinoUiMainWindow* self)
{
	DinoUiConfig* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	dino_ui_main_window_save_window_size (self);
	_tmp0_ = self->priv->config;
	g_object_get ((GtkWindow*) self, "maximized", &_tmp1_, NULL);
	_tmp2_ = _tmp1_;
	dino_ui_config_set_window_maximize (_tmp0_, _tmp2_);
}

static void
___lambda155__gtk_widget_unrealize (GtkWidget* _sender,
                                    gpointer self)
{
	__lambda155_ ((DinoUiMainWindow*) self);
}

void
dino_ui_main_window_restore_window_size (DinoUiMainWindow* self)
{
	GdkDisplay* display = NULL;
	GdkDisplay* _tmp0_;
	GdkDisplay* _tmp1_;
	GdkDisplay* _tmp2_;
	DinoUiConfig* _tmp30_;
	gboolean _tmp31_;
	gboolean _tmp32_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gdk_display_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	display = _tmp1_;
	_tmp2_ = display;
	if (_tmp2_ != NULL) {
		GdkSurface* surface = NULL;
		GdkSurface* _tmp3_;
		GdkSurface* _tmp4_;
		GdkMonitor* monitor = NULL;
		GdkDisplay* _tmp5_;
		GdkSurface* _tmp6_;
		GdkMonitor* _tmp7_;
		GdkMonitor* _tmp8_;
		gboolean _tmp9_ = FALSE;
		gboolean _tmp10_ = FALSE;
		GdkMonitor* _tmp11_;
		_tmp3_ = gtk_native_get_surface ((GtkNative*) self);
		_tmp4_ = _g_object_ref0 (_tmp3_);
		surface = _tmp4_;
		_tmp5_ = display;
		_tmp6_ = surface;
		_tmp7_ = gdk_display_get_monitor_at_surface (_tmp5_, _tmp6_);
		_tmp8_ = _g_object_ref0 (_tmp7_);
		monitor = _tmp8_;
		_tmp11_ = monitor;
		if (_tmp11_ != NULL) {
			DinoUiConfig* _tmp12_;
			gint _tmp13_;
			gint _tmp14_;
			GdkMonitor* _tmp15_;
			GdkRectangle _tmp16_ = {0};
			GdkRectangle _tmp17_;
			_tmp12_ = self->priv->config;
			_tmp13_ = dino_ui_config_get_window_width (_tmp12_);
			_tmp14_ = _tmp13_;
			_tmp15_ = monitor;
			gdk_monitor_get_geometry (_tmp15_, &_tmp16_);
			_tmp17_ = _tmp16_;
			_tmp10_ = _tmp14_ <= _tmp17_.width;
		} else {
			_tmp10_ = FALSE;
		}
		if (_tmp10_) {
			DinoUiConfig* _tmp18_;
			gint _tmp19_;
			gint _tmp20_;
			GdkMonitor* _tmp21_;
			GdkRectangle _tmp22_ = {0};
			GdkRectangle _tmp23_;
			_tmp18_ = self->priv->config;
			_tmp19_ = dino_ui_config_get_window_height (_tmp18_);
			_tmp20_ = _tmp19_;
			_tmp21_ = monitor;
			gdk_monitor_get_geometry (_tmp21_, &_tmp22_);
			_tmp23_ = _tmp22_;
			_tmp9_ = _tmp20_ <= _tmp23_.height;
		} else {
			_tmp9_ = FALSE;
		}
		if (_tmp9_) {
			DinoUiConfig* _tmp24_;
			gint _tmp25_;
			gint _tmp26_;
			DinoUiConfig* _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			_tmp24_ = self->priv->config;
			_tmp25_ = dino_ui_config_get_window_width (_tmp24_);
			_tmp26_ = _tmp25_;
			_tmp27_ = self->priv->config;
			_tmp28_ = dino_ui_config_get_window_height (_tmp27_);
			_tmp29_ = _tmp28_;
			gtk_window_set_default_size ((GtkWindow*) self, _tmp26_, _tmp29_);
		}
		_g_object_unref0 (monitor);
		_g_object_unref0 (surface);
	}
	_tmp30_ = self->priv->config;
	_tmp31_ = dino_ui_config_get_window_maximize (_tmp30_);
	_tmp32_ = _tmp31_;
	if (_tmp32_) {
		gtk_window_maximize ((GtkWindow*) self);
	}
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "unrealize", (GCallback) ___lambda155__gtk_widget_unrealize, self, 0);
	_g_object_unref0 (display);
}

void
dino_ui_main_window_save_window_size (DinoUiMainWindow* self)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	GdkDisplay* display = NULL;
	GdkDisplay* _tmp2_;
	GdkDisplay* _tmp3_;
	GdkSurface* surface = NULL;
	GdkSurface* _tmp4_;
	GdkSurface* _tmp5_;
	gboolean _tmp6_ = FALSE;
	GdkDisplay* _tmp7_;
	g_return_if_fail (self != NULL);
	g_object_get ((GtkWindow*) self, "maximized", &_tmp0_, NULL);
	_tmp1_ = _tmp0_;
	if (_tmp1_) {
		return;
	}
	_tmp2_ = gtk_root_get_display ((GtkRoot*) self);
	_tmp3_ = _g_object_ref0 (_tmp2_);
	display = _tmp3_;
	_tmp4_ = gtk_native_get_surface ((GtkNative*) self);
	_tmp5_ = _g_object_ref0 (_tmp4_);
	surface = _tmp5_;
	_tmp7_ = display;
	if (_tmp7_ != NULL) {
		GdkSurface* _tmp8_;
		_tmp8_ = surface;
		_tmp6_ = _tmp8_ != NULL;
	} else {
		_tmp6_ = FALSE;
	}
	if (_tmp6_) {
		GdkMonitor* monitor = NULL;
		GdkDisplay* _tmp9_;
		GdkSurface* _tmp10_;
		GdkMonitor* _tmp11_;
		GdkMonitor* _tmp12_;
		gboolean _tmp13_ = FALSE;
		gboolean _tmp14_ = FALSE;
		DinoUiConfig* _tmp15_;
		gint _tmp16_;
		gint _tmp17_;
		gint _tmp18_;
		gint _tmp19_;
		gboolean _tmp30_ = FALSE;
		gboolean _tmp31_ = FALSE;
		DinoUiConfig* _tmp32_;
		gint _tmp33_;
		gint _tmp34_;
		gint _tmp35_;
		gint _tmp36_;
		_tmp9_ = display;
		_tmp10_ = surface;
		_tmp11_ = gdk_display_get_monitor_at_surface (_tmp9_, _tmp10_);
		_tmp12_ = _g_object_ref0 (_tmp11_);
		monitor = _tmp12_;
		_tmp15_ = self->priv->config;
		_tmp16_ = dino_ui_config_get_window_width (_tmp15_);
		_tmp17_ = _tmp16_;
		g_object_get ((GtkWindow*) self, "default-width", &_tmp18_, NULL);
		_tmp19_ = _tmp18_;
		if (_tmp17_ != _tmp19_) {
			gint _tmp20_;
			gint _tmp21_;
			g_object_get ((GtkWindow*) self, "default-width", &_tmp20_, NULL);
			_tmp21_ = _tmp20_;
			_tmp14_ = _tmp21_ > 0;
		} else {
			_tmp14_ = FALSE;
		}
		if (_tmp14_) {
			gint _tmp22_;
			gint _tmp23_;
			GdkMonitor* _tmp24_;
			GdkRectangle _tmp25_ = {0};
			GdkRectangle _tmp26_;
			g_object_get ((GtkWindow*) self, "default-width", &_tmp22_, NULL);
			_tmp23_ = _tmp22_;
			_tmp24_ = monitor;
			gdk_monitor_get_geometry (_tmp24_, &_tmp25_);
			_tmp26_ = _tmp25_;
			_tmp13_ = _tmp23_ <= _tmp26_.width;
		} else {
			_tmp13_ = FALSE;
		}
		if (_tmp13_) {
			DinoUiConfig* _tmp27_;
			gint _tmp28_;
			gint _tmp29_;
			_tmp27_ = self->priv->config;
			g_object_get ((GtkWindow*) self, "default-width", &_tmp28_, NULL);
			_tmp29_ = _tmp28_;
			dino_ui_config_set_window_width (_tmp27_, _tmp29_);
		}
		_tmp32_ = self->priv->config;
		_tmp33_ = dino_ui_config_get_window_height (_tmp32_);
		_tmp34_ = _tmp33_;
		g_object_get ((GtkWindow*) self, "default-height", &_tmp35_, NULL);
		_tmp36_ = _tmp35_;
		if (_tmp34_ != _tmp36_) {
			gint _tmp37_;
			gint _tmp38_;
			g_object_get ((GtkWindow*) self, "default-height", &_tmp37_, NULL);
			_tmp38_ = _tmp37_;
			_tmp31_ = _tmp38_ > 0;
		} else {
			_tmp31_ = FALSE;
		}
		if (_tmp31_) {
			gint _tmp39_;
			gint _tmp40_;
			GdkMonitor* _tmp41_;
			GdkRectangle _tmp42_ = {0};
			GdkRectangle _tmp43_;
			g_object_get ((GtkWindow*) self, "default-height", &_tmp39_, NULL);
			_tmp40_ = _tmp39_;
			_tmp41_ = monitor;
			gdk_monitor_get_geometry (_tmp41_, &_tmp42_);
			_tmp43_ = _tmp42_;
			_tmp30_ = _tmp40_ <= _tmp43_.height;
		} else {
			_tmp30_ = FALSE;
		}
		if (_tmp30_) {
			DinoUiConfig* _tmp44_;
			gint _tmp45_;
			gint _tmp46_;
			_tmp44_ = self->priv->config;
			g_object_get ((GtkWindow*) self, "default-height", &_tmp45_, NULL);
			_tmp46_ = _tmp45_;
			dino_ui_config_set_window_height (_tmp44_, _tmp46_);
		}
		_g_object_unref0 (monitor);
	}
	_g_object_unref0 (surface);
	_g_object_unref0 (display);
}

const gchar*
dino_ui_main_window_get_title (DinoUiMainWindow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_title;
	result = _tmp0_;
	return result;
}

void
dino_ui_main_window_set_title (DinoUiMainWindow* self,
                               const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_main_window_get_title (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_title);
		self->priv->_title = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_main_window_properties[DINO_UI_MAIN_WINDOW_TITLE_PROPERTY]);
	}
}

const gchar*
dino_ui_main_window_get_subtitle (DinoUiMainWindow* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_subtitle;
	result = _tmp0_;
	return result;
}

void
dino_ui_main_window_set_subtitle (DinoUiMainWindow* self,
                                  const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = dino_ui_main_window_get_subtitle (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_subtitle);
		self->priv->_subtitle = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, dino_ui_main_window_properties[DINO_UI_MAIN_WINDOW_SUBTITLE_PROPERTY]);
	}
}

static gboolean
_dino_ui_main_window___lambda159_ (GtkWidget* widget,
                                   GVariant* args)
{
	AdwFlap* _tmp0_;
	gboolean result;
	g_return_val_if_fail (widget != NULL, FALSE);
	_tmp0_ = G_TYPE_CHECK_INSTANCE_CAST (widget, DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindow)->search_flap;
	adw_flap_set_reveal_flap (_tmp0_, TRUE);
	result = FALSE;
	return result;
}

static gboolean
__dino_ui_main_window___lambda159__gtk_shortcut_func (GtkWidget* widget,
                                                      GVariant* args,
                                                      gpointer self)
{
	gboolean result;
	result = _dino_ui_main_window___lambda159_ (widget, args);
	return result;
}

static void
dino_ui_main_window_base_init (DinoUiMainWindowClass * klass)
{
	GtkShortcut* shortcut = NULL;
	GtkKeyvalTrigger* _tmp0_;
	GtkCallbackAction* _tmp1_;
	GtkShortcut* _tmp2_;
	GtkShortcut* _tmp3_;
	_tmp0_ = (GtkKeyvalTrigger*) gtk_keyval_trigger_new (GDK_KEY_F, GDK_CONTROL_MASK);
	_tmp1_ = (GtkCallbackAction*) gtk_callback_action_new (__dino_ui_main_window___lambda159__gtk_shortcut_func, NULL, NULL);
	_tmp2_ = gtk_shortcut_new ((GtkShortcutTrigger*) _tmp0_, (GtkShortcutAction*) _tmp1_);
	shortcut = _tmp2_;
	_tmp3_ = shortcut;
	gtk_widget_class_add_shortcut (GTK_WIDGET_CLASS (klass), _tmp3_);
	_g_object_unref0 (shortcut);
}

static void
dino_ui_main_window_class_init (DinoUiMainWindowClass * klass,
                                gpointer klass_data)
{
	dino_ui_main_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &DinoUiMainWindow_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_dino_ui_main_window_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_dino_ui_main_window_set_property;
	G_OBJECT_CLASS (klass)->finalize = dino_ui_main_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_MAIN_WINDOW_TITLE_PROPERTY, dino_ui_main_window_properties[DINO_UI_MAIN_WINDOW_TITLE_PROPERTY] = g_param_spec_string ("title", "title", "title", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), DINO_UI_MAIN_WINDOW_SUBTITLE_PROPERTY, dino_ui_main_window_properties[DINO_UI_MAIN_WINDOW_SUBTITLE_PROPERTY] = g_param_spec_string ("subtitle", "subtitle", "subtitle", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	dino_ui_main_window_signals[DINO_UI_MAIN_WINDOW_CONVERSATION_SELECTED_SIGNAL] = g_signal_new ("conversation-selected", DINO_UI_TYPE_MAIN_WINDOW, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, DINO_ENTITIES_TYPE_CONVERSATION);
}

static void
dino_ui_main_window_instance_init (DinoUiMainWindow * self,
                                   gpointer klass)
{
	DinoUiWelcomePlaceholder* _tmp0_;
	DinoUiNoAccountsPlaceholder* _tmp1_;
	GtkBox* _tmp2_ = NULL;
	GtkStack* _tmp3_;
	self->priv = dino_ui_main_window_get_instance_private (self);
	_tmp0_ = dino_ui_welcome_placeholder_new ();
	g_object_ref_sink (_tmp0_);
	self->welcome_placeholder = _tmp0_;
	_tmp1_ = dino_ui_no_accounts_placeholder_new ();
	g_object_ref_sink (_tmp1_);
	self->accounts_placeholder = _tmp1_;
	_tmp2_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
	gtk_orientable_set_orientation ((GtkOrientable*) _tmp2_, GTK_ORIENTATION_VERTICAL);
	g_object_ref_sink (_tmp2_);
	self->box = _tmp2_;
	_tmp3_ = (GtkStack*) gtk_stack_new ();
	g_object_ref_sink (_tmp3_);
	self->priv->stack = _tmp3_;
}

static void
dino_ui_main_window_finalize (GObject * obj)
{
	DinoUiMainWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindow);
	_g_free0 (self->priv->_title);
	_g_free0 (self->priv->_subtitle);
	_g_object_unref0 (self->welcome_placeholder);
	_g_object_unref0 (self->accounts_placeholder);
	_g_object_unref0 (self->conversation_view);
	_g_object_unref0 (self->conversation_selector);
	_g_object_unref0 (self->conversation_titlebar);
	_g_object_unref0 (self->conversation_list_titlebar);
	_g_object_unref0 (self->box);
	_g_object_unref0 (self->priv->leaflet);
	_g_object_unref0 (self->left_box);
	_g_object_unref0 (self->right_box);
	_g_object_unref0 (self->search_flap);
	_dino_ui_global_search_unref0 (self->global_search);
	_g_object_unref0 (self->priv->stack);
	_g_object_unref0 (self->priv->left_stack);
	_g_object_unref0 (self->priv->right_stack);
	_g_object_unref0 (self->priv->stream_interactor);
	_qlite_database_unref0 (self->priv->db);
	_g_object_unref0 (self->priv->config);
	G_OBJECT_CLASS (dino_ui_main_window_parent_class)->finalize (obj);
}

static GType
dino_ui_main_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiMainWindowClass), (GBaseInitFunc) dino_ui_main_window_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_main_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiMainWindow), 0, (GInstanceInitFunc) dino_ui_main_window_instance_init, NULL };
	GType dino_ui_main_window_type_id;
	dino_ui_main_window_type_id = g_type_register_static (adw_application_window_get_type (), "DinoUiMainWindow", &g_define_type_info, 0);
	DinoUiMainWindow_private_offset = g_type_add_instance_private (dino_ui_main_window_type_id, sizeof (DinoUiMainWindowPrivate));
	return dino_ui_main_window_type_id;
}

GType
dino_ui_main_window_get_type (void)
{
	static volatile gsize dino_ui_main_window_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_main_window_type_id__once)) {
		GType dino_ui_main_window_type_id;
		dino_ui_main_window_type_id = dino_ui_main_window_get_type_once ();
		g_once_init_leave (&dino_ui_main_window_type_id__once, dino_ui_main_window_type_id);
	}
	return dino_ui_main_window_type_id__once;
}

static void
_vala_dino_ui_main_window_get_property (GObject * object,
                                        guint property_id,
                                        GValue * value,
                                        GParamSpec * pspec)
{
	DinoUiMainWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindow);
	switch (property_id) {
		case DINO_UI_MAIN_WINDOW_TITLE_PROPERTY:
		g_value_set_string (value, dino_ui_main_window_get_title (self));
		break;
		case DINO_UI_MAIN_WINDOW_SUBTITLE_PROPERTY:
		g_value_set_string (value, dino_ui_main_window_get_subtitle (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_dino_ui_main_window_set_property (GObject * object,
                                        guint property_id,
                                        const GValue * value,
                                        GParamSpec * pspec)
{
	DinoUiMainWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, DINO_UI_TYPE_MAIN_WINDOW, DinoUiMainWindow);
	switch (property_id) {
		case DINO_UI_MAIN_WINDOW_TITLE_PROPERTY:
		dino_ui_main_window_set_title (self, g_value_get_string (value));
		break;
		case DINO_UI_MAIN_WINDOW_SUBTITLE_PROPERTY:
		dino_ui_main_window_set_subtitle (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

DinoUiWelcomePlaceholder*
dino_ui_welcome_placeholder_construct (GType object_type)
{
	DinoUiWelcomePlaceholder * self = NULL;
	AdwStatusPage* _tmp0_;
	const gchar* _tmp1_;
	AdwStatusPage* _tmp2_;
	const gchar* _tmp3_;
	GtkButton* _tmp4_;
	const gchar* _tmp5_;
	GtkButton* _tmp6_;
	self = (DinoUiWelcomePlaceholder*) dino_ui_main_window_placeholder_construct (object_type);
	_tmp0_ = ((DinoUiMainWindowPlaceholder*) self)->status_page;
	_tmp1_ = dino_gettext ("Welcome to Dino!");
	adw_status_page_set_title (_tmp0_, _tmp1_);
	_tmp2_ = ((DinoUiMainWindowPlaceholder*) self)->status_page;
	_tmp3_ = dino_gettext ("Sign in or create an account to get started.");
	adw_status_page_set_description (_tmp2_, _tmp3_);
	_tmp4_ = ((DinoUiMainWindowPlaceholder*) self)->primary_button;
	_tmp5_ = dino_gettext ("Set up account");
	gtk_button_set_label (_tmp4_, _tmp5_);
	_tmp6_ = ((DinoUiMainWindowPlaceholder*) self)->primary_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp6_, TRUE);
	return self;
}

DinoUiWelcomePlaceholder*
dino_ui_welcome_placeholder_new (void)
{
	return dino_ui_welcome_placeholder_construct (DINO_UI_TYPE_WELCOME_PLACEHOLDER);
}

static void
dino_ui_welcome_placeholder_class_init (DinoUiWelcomePlaceholderClass * klass,
                                        gpointer klass_data)
{
	dino_ui_welcome_placeholder_parent_class = g_type_class_peek_parent (klass);
}

static void
dino_ui_welcome_placeholder_instance_init (DinoUiWelcomePlaceholder * self,
                                           gpointer klass)
{
}

static GType
dino_ui_welcome_placeholder_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiWelcomePlaceholderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_welcome_placeholder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiWelcomePlaceholder), 0, (GInstanceInitFunc) dino_ui_welcome_placeholder_instance_init, NULL };
	GType dino_ui_welcome_placeholder_type_id;
	dino_ui_welcome_placeholder_type_id = g_type_register_static (DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, "DinoUiWelcomePlaceholder", &g_define_type_info, 0);
	return dino_ui_welcome_placeholder_type_id;
}

GType
dino_ui_welcome_placeholder_get_type (void)
{
	static volatile gsize dino_ui_welcome_placeholder_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_welcome_placeholder_type_id__once)) {
		GType dino_ui_welcome_placeholder_type_id;
		dino_ui_welcome_placeholder_type_id = dino_ui_welcome_placeholder_get_type_once ();
		g_once_init_leave (&dino_ui_welcome_placeholder_type_id__once, dino_ui_welcome_placeholder_type_id);
	}
	return dino_ui_welcome_placeholder_type_id__once;
}

DinoUiNoAccountsPlaceholder*
dino_ui_no_accounts_placeholder_construct (GType object_type)
{
	DinoUiNoAccountsPlaceholder * self = NULL;
	AdwStatusPage* _tmp0_;
	const gchar* _tmp1_;
	GtkButton* _tmp2_;
	const gchar* _tmp3_;
	GtkButton* _tmp4_;
	self = (DinoUiNoAccountsPlaceholder*) dino_ui_main_window_placeholder_construct (object_type);
	_tmp0_ = ((DinoUiMainWindowPlaceholder*) self)->status_page;
	_tmp1_ = dino_gettext ("No active accounts");
	adw_status_page_set_title (_tmp0_, _tmp1_);
	_tmp2_ = ((DinoUiMainWindowPlaceholder*) self)->primary_button;
	_tmp3_ = dino_gettext ("Manage accounts");
	gtk_button_set_label (_tmp2_, _tmp3_);
	_tmp4_ = ((DinoUiMainWindowPlaceholder*) self)->primary_button;
	gtk_widget_set_visible ((GtkWidget*) _tmp4_, TRUE);
	return self;
}

DinoUiNoAccountsPlaceholder*
dino_ui_no_accounts_placeholder_new (void)
{
	return dino_ui_no_accounts_placeholder_construct (DINO_UI_TYPE_NO_ACCOUNTS_PLACEHOLDER);
}

static void
dino_ui_no_accounts_placeholder_class_init (DinoUiNoAccountsPlaceholderClass * klass,
                                            gpointer klass_data)
{
	dino_ui_no_accounts_placeholder_parent_class = g_type_class_peek_parent (klass);
}

static void
dino_ui_no_accounts_placeholder_instance_init (DinoUiNoAccountsPlaceholder * self,
                                               gpointer klass)
{
}

static GType
dino_ui_no_accounts_placeholder_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiNoAccountsPlaceholderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_no_accounts_placeholder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiNoAccountsPlaceholder), 0, (GInstanceInitFunc) dino_ui_no_accounts_placeholder_instance_init, NULL };
	GType dino_ui_no_accounts_placeholder_type_id;
	dino_ui_no_accounts_placeholder_type_id = g_type_register_static (DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, "DinoUiNoAccountsPlaceholder", &g_define_type_info, 0);
	return dino_ui_no_accounts_placeholder_type_id;
}

GType
dino_ui_no_accounts_placeholder_get_type (void)
{
	static volatile gsize dino_ui_no_accounts_placeholder_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_no_accounts_placeholder_type_id__once)) {
		GType dino_ui_no_accounts_placeholder_type_id;
		dino_ui_no_accounts_placeholder_type_id = dino_ui_no_accounts_placeholder_get_type_once ();
		g_once_init_leave (&dino_ui_no_accounts_placeholder_type_id__once, dino_ui_no_accounts_placeholder_type_id);
	}
	return dino_ui_no_accounts_placeholder_type_id__once;
}

DinoUiMainWindowPlaceholder*
dino_ui_main_window_placeholder_construct (GType object_type)
{
	DinoUiMainWindowPlaceholder * self = NULL;
	self = (DinoUiMainWindowPlaceholder*) g_object_new (object_type, NULL);
	return self;
}

DinoUiMainWindowPlaceholder*
dino_ui_main_window_placeholder_new (void)
{
	return dino_ui_main_window_placeholder_construct (DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER);
}

static void
dino_ui_main_window_placeholder_class_init (DinoUiMainWindowPlaceholderClass * klass,
                                            gpointer klass_data)
{
	dino_ui_main_window_placeholder_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = dino_ui_main_window_placeholder_finalize;
	gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/im/dino/Dino/unified_window_placeholder.ui");
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "status_page", FALSE, G_STRUCT_OFFSET (DinoUiMainWindowPlaceholder, status_page));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "primary_button", FALSE, G_STRUCT_OFFSET (DinoUiMainWindowPlaceholder, primary_button));
	gtk_widget_class_bind_template_child_full (GTK_WIDGET_CLASS (klass), "secondary_button", FALSE, G_STRUCT_OFFSET (DinoUiMainWindowPlaceholder, secondary_button));
}

static void
dino_ui_main_window_placeholder_instance_init (DinoUiMainWindowPlaceholder * self,
                                               gpointer klass)
{
	gtk_widget_init_template (GTK_WIDGET (self));
}

static void
dino_ui_main_window_placeholder_finalize (GObject * obj)
{
	DinoUiMainWindowPlaceholder * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DINO_UI_TYPE_MAIN_WINDOW_PLACEHOLDER, DinoUiMainWindowPlaceholder);
	G_OBJECT_CLASS (dino_ui_main_window_placeholder_parent_class)->finalize (obj);
}

static GType
dino_ui_main_window_placeholder_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (DinoUiMainWindowPlaceholderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dino_ui_main_window_placeholder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DinoUiMainWindowPlaceholder), 0, (GInstanceInitFunc) dino_ui_main_window_placeholder_instance_init, NULL };
	GType dino_ui_main_window_placeholder_type_id;
	dino_ui_main_window_placeholder_type_id = g_type_register_static (gtk_box_get_type (), "DinoUiMainWindowPlaceholder", &g_define_type_info, 0);
	return dino_ui_main_window_placeholder_type_id;
}

GType
dino_ui_main_window_placeholder_get_type (void)
{
	static volatile gsize dino_ui_main_window_placeholder_type_id__once = 0;
	if (g_once_init_enter (&dino_ui_main_window_placeholder_type_id__once)) {
		GType dino_ui_main_window_placeholder_type_id;
		dino_ui_main_window_placeholder_type_id = dino_ui_main_window_placeholder_get_type_once ();
		g_once_init_leave (&dino_ui_main_window_placeholder_type_id__once, dino_ui_main_window_placeholder_type_id);
	}
	return dino_ui_main_window_placeholder_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;
}

