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

#include <gtksourceview/gtksource.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib.h>
#include <libspelling.h>
#include <stdlib.h>
#include <string.h>
#include <adwaita.h>
#include <gio/gio.h>
#include <gdk/gdk.h>
#include <glib/gi18n-lib.h>
#include <pango/pango.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 TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW (tuba_widgets_sandwich_source_view_get_type ())
#define TUBA_WIDGETS_SANDWICH_SOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceView))
#define TUBA_WIDGETS_SANDWICH_SOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceViewClass))
#define TUBA_WIDGETS_IS_SANDWICH_SOURCE_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW))
#define TUBA_WIDGETS_IS_SANDWICH_SOURCE_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW))
#define TUBA_WIDGETS_SANDWICH_SOURCE_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceViewClass))

typedef struct _TubaWidgetsSandwichSourceView TubaWidgetsSandwichSourceView;
typedef struct _TubaWidgetsSandwichSourceViewClass TubaWidgetsSandwichSourceViewClass;
typedef struct _TubaWidgetsSandwichSourceViewPrivate TubaWidgetsSandwichSourceViewPrivate;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE (tuba_dialogs_composer_components_attachable_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, TubaDialogsComposerComponentsAttachable))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_ATTACHABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, TubaDialogsComposerComponentsAttachableIface))

typedef struct _TubaDialogsComposerComponentsAttachable TubaDialogsComposerComponentsAttachable;
typedef struct _TubaDialogsComposerComponentsAttachableIface TubaDialogsComposerComponentsAttachableIface;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR (tuba_dialogs_composer_components_editor_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditor))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditorClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditorClass))

typedef struct _TubaDialogsComposerComponentsEditor TubaDialogsComposerComponentsEditor;
typedef struct _TubaDialogsComposerComponentsEditorClass TubaDialogsComposerComponentsEditorClass;
typedef struct _TubaDialogsComposerComponentsEditorPrivate TubaDialogsComposerComponentsEditorPrivate;

#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK (tuba_dialogs_composer_components_editor_placeholder_hack_get_type ())
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_PLACEHOLDER_HACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK, TubaDialogsComposerComponentsEditorPlaceholderHack))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_PLACEHOLDER_HACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK, TubaDialogsComposerComponentsEditorPlaceholderHackClass))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_IS_PLACEHOLDER_HACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_IS_PLACEHOLDER_HACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK))
#define TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_PLACEHOLDER_HACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK, TubaDialogsComposerComponentsEditorPlaceholderHackClass))

typedef struct _TubaDialogsComposerComponentsEditorPlaceholderHack TubaDialogsComposerComponentsEditorPlaceholderHack;
typedef struct _TubaDialogsComposerComponentsEditorPlaceholderHackClass TubaDialogsComposerComponentsEditorPlaceholderHackClass;
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_EDIT_MODE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_LOCALE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_TYPE_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CHAR_COUNT_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef enum  {
	TUBA_UTILS_TRACKING_CLEANUP_TYPE_STRIP_TRACKING,
	TUBA_UTILS_TRACKING_CLEANUP_TYPE_SPECIFIC_LENGTH
} TubaUtilsTrackingCleanupType;

#define TUBA_UTILS_TRACKING_TYPE_CLEANUP_TYPE (tuba_utils_tracking_cleanup_type_get_type ())

#define TUBA_TYPE_ACCOUNT_STORE (tuba_account_store_get_type ())
#define TUBA_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStore))
#define TUBA_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))
#define TUBA_IS_ACCOUNT_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_IS_ACCOUNT_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ACCOUNT_STORE))
#define TUBA_ACCOUNT_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ACCOUNT_STORE, TubaAccountStoreClass))

typedef struct _TubaAccountStore TubaAccountStore;
typedef struct _TubaAccountStoreClass TubaAccountStoreClass;

#define TUBA_TYPE_ENTITY (tuba_entity_get_type ())
#define TUBA_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_ENTITY, TubaEntity))
#define TUBA_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_ENTITY, TubaEntityClass))
#define TUBA_IS_ENTITY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_ENTITY))
#define TUBA_IS_ENTITY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_ENTITY))
#define TUBA_ENTITY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_ENTITY, TubaEntityClass))

typedef struct _TubaEntity TubaEntity;
typedef struct _TubaEntityClass TubaEntityClass;

#define TUBA_API_TYPE_ACCOUNT (tuba_api_account_get_type ())
#define TUBA_API_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccount))
#define TUBA_API_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))
#define TUBA_API_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_ACCOUNT))
#define TUBA_API_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_ACCOUNT, TubaAPIAccountClass))

typedef struct _TubaAPIAccount TubaAPIAccount;
typedef struct _TubaAPIAccountClass TubaAPIAccountClass;

#define TUBA_TYPE_INSTANCE_ACCOUNT (tuba_instance_account_get_type ())
#define TUBA_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccount))
#define TUBA_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))
#define TUBA_IS_INSTANCE_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_IS_INSTANCE_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_INSTANCE_ACCOUNT))
#define TUBA_INSTANCE_ACCOUNT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_INSTANCE_ACCOUNT, TubaInstanceAccountClass))

typedef struct _TubaInstanceAccount TubaInstanceAccount;
typedef struct _TubaInstanceAccountClass TubaInstanceAccountClass;

#define TUBA_API_TYPE_INSTANCE (tuba_api_instance_get_type ())
#define TUBA_API_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_API_TYPE_INSTANCE, TubaAPIInstance))
#define TUBA_API_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_API_TYPE_INSTANCE, TubaAPIInstanceClass))
#define TUBA_API_IS_INSTANCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_API_TYPE_INSTANCE))
#define TUBA_API_IS_INSTANCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_API_TYPE_INSTANCE))
#define TUBA_API_INSTANCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_API_TYPE_INSTANCE, TubaAPIInstanceClass))

typedef struct _TubaAPIInstance TubaAPIInstance;
typedef struct _TubaAPIInstanceClass TubaAPIInstanceClass;

#define TUBA_TYPE_SETTINGS (tuba_settings_get_type ())
#define TUBA_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_SETTINGS, TubaSettings))
#define TUBA_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_SETTINGS, TubaSettingsClass))
#define TUBA_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_SETTINGS))
#define TUBA_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_SETTINGS))
#define TUBA_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_SETTINGS, TubaSettingsClass))

typedef struct _TubaSettings TubaSettings;
typedef struct _TubaSettingsClass TubaSettingsClass;
typedef struct _TubaDialogsComposerComponentsEditorPlaceholderHackPrivate TubaDialogsComposerComponentsEditorPlaceholderHackPrivate;
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_PLACEHOLDER_HACK_0_PROPERTY,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_PLACEHOLDER_HACK_NUM_PROPERTIES
};
static GParamSpec* tuba_dialogs_composer_components_editor_placeholder_hack_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_PLACEHOLDER_HACK_NUM_PROPERTIES];

#define TUBA_TYPE_COMPLETION_PROVIDER (tuba_completion_provider_get_type ())
#define TUBA_COMPLETION_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_COMPLETION_PROVIDER, TubaCompletionProvider))
#define TUBA_COMPLETION_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_COMPLETION_PROVIDER, TubaCompletionProviderClass))
#define TUBA_IS_COMPLETION_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_COMPLETION_PROVIDER))
#define TUBA_IS_COMPLETION_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_COMPLETION_PROVIDER))
#define TUBA_COMPLETION_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_COMPLETION_PROVIDER, TubaCompletionProviderClass))

typedef struct _TubaCompletionProvider TubaCompletionProvider;
typedef struct _TubaCompletionProviderClass TubaCompletionProviderClass;

#define TUBA_TYPE_HANDLE_PROVIDER (tuba_handle_provider_get_type ())
#define TUBA_HANDLE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_HANDLE_PROVIDER, TubaHandleProvider))
#define TUBA_HANDLE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_HANDLE_PROVIDER, TubaHandleProviderClass))
#define TUBA_IS_HANDLE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_HANDLE_PROVIDER))
#define TUBA_IS_HANDLE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_HANDLE_PROVIDER))
#define TUBA_HANDLE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_HANDLE_PROVIDER, TubaHandleProviderClass))

typedef struct _TubaHandleProvider TubaHandleProvider;
typedef struct _TubaHandleProviderClass TubaHandleProviderClass;

#define TUBA_TYPE_HASHTAG_PROVIDER (tuba_hashtag_provider_get_type ())
#define TUBA_HASHTAG_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_HASHTAG_PROVIDER, TubaHashtagProvider))
#define TUBA_HASHTAG_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_HASHTAG_PROVIDER, TubaHashtagProviderClass))
#define TUBA_IS_HASHTAG_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_HASHTAG_PROVIDER))
#define TUBA_IS_HASHTAG_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_HASHTAG_PROVIDER))
#define TUBA_HASHTAG_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_HASHTAG_PROVIDER, TubaHashtagProviderClass))

typedef struct _TubaHashtagProvider TubaHashtagProvider;
typedef struct _TubaHashtagProviderClass TubaHashtagProviderClass;

#define TUBA_TYPE_EMOJI_PROVIDER (tuba_emoji_provider_get_type ())
#define TUBA_EMOJI_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TUBA_TYPE_EMOJI_PROVIDER, TubaEmojiProvider))
#define TUBA_EMOJI_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TUBA_TYPE_EMOJI_PROVIDER, TubaEmojiProviderClass))
#define TUBA_IS_EMOJI_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TUBA_TYPE_EMOJI_PROVIDER))
#define TUBA_IS_EMOJI_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TUBA_TYPE_EMOJI_PROVIDER))
#define TUBA_EMOJI_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TUBA_TYPE_EMOJI_PROVIDER, TubaEmojiProviderClass))

typedef struct _TubaEmojiProvider TubaEmojiProvider;
typedef struct _TubaEmojiProviderClass TubaEmojiProviderClass;
enum  {
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CTRL_RETURN_PRESSED_SIGNAL,
	TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_NUM_SIGNALS
};
static guint tuba_dialogs_composer_components_editor_signals[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_NUM_SIGNALS] = {0};

struct _TubaWidgetsSandwichSourceView {
	GtkSourceView parent_instance;
	TubaWidgetsSandwichSourceViewPrivate * priv;
};

struct _TubaWidgetsSandwichSourceViewClass {
	GtkSourceViewClass parent_class;
	void (*add_top_child) (TubaWidgetsSandwichSourceView* self, GtkWidget* new_top_child);
	void (*add_bottom_child) (TubaWidgetsSandwichSourceView* self, GtkWidget* new_bottom_child, gboolean append);
	void (*remove_bottom_child) (TubaWidgetsSandwichSourceView* self, GtkWidget* old_bottom_child);
	void (*clear_child_widget) (TubaWidgetsSandwichSourceView* self, GtkWidget* widget);
	void (*setup_child_widget) (TubaWidgetsSandwichSourceView* self, GtkWidget* wdgt);
};

struct _TubaDialogsComposerComponentsAttachableIface {
	GTypeInterface parent_iface;
	gboolean (*get_edit_mode) (TubaDialogsComposerComponentsAttachable* self);
	void (*set_edit_mode) (TubaDialogsComposerComponentsAttachable* self, gboolean value);
};

struct _TubaDialogsComposerComponentsEditor {
	TubaWidgetsSandwichSourceView parent_instance;
	TubaDialogsComposerComponentsEditorPrivate * priv;
	GtkLabel* status_title;
	TubaDialogsComposerComponentsEditorPlaceholderHack* placeholder;
	SpellingTextBufferAdapter* adapter;
};

struct _TubaDialogsComposerComponentsEditorClass {
	TubaWidgetsSandwichSourceViewClass parent_class;
};

struct _TubaDialogsComposerComponentsEditorPrivate {
	gboolean _edit_mode;
	gchar* _locale;
	gchar* _content_type;
	gint64 _char_count;
	gchar* original_libspelling_lang;
	gchar* original_libspelling_lang_iso639;
	GtkSourceLanguageManager* lang_manager;
	GtkBox* status_box;
};

struct _TubaDialogsComposerComponentsEditorPlaceholderHack {
	GtkWidget parent_instance;
	TubaDialogsComposerComponentsEditorPlaceholderHackPrivate * priv;
};

struct _TubaDialogsComposerComponentsEditorPlaceholderHackClass {
	GtkWidgetClass parent_class;
};

struct _TubaDialogsComposerComponentsEditorPlaceholderHackPrivate {
	GtkLabel* label;
};

static gint TubaDialogsComposerComponentsEditor_private_offset;
static gpointer tuba_dialogs_composer_components_editor_parent_class = NULL;
VALA_EXTERN TubaAccountStore* tuba_accounts;
VALA_EXTERN TubaSettings* tuba_settings;
static gint TubaDialogsComposerComponentsEditorPlaceholderHack_private_offset;
static gpointer tuba_dialogs_composer_components_editor_placeholder_hack_parent_class = NULL;
static TubaDialogsComposerComponentsAttachableIface * tuba_dialogs_composer_components_editor_tuba_dialogs_composer_components_attachable_parent_iface = NULL;

VALA_EXTERN GType tuba_widgets_sandwich_source_view_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaWidgetsSandwichSourceView, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_attachable_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsAttachable, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_editor_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsEditor, g_object_unref)
VALA_EXTERN GType tuba_dialogs_composer_components_editor_placeholder_hack_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaDialogsComposerComponentsEditorPlaceholderHack, g_object_unref)
VALA_EXTERN void tuba_widgets_sandwich_source_view_add_bottom_child (TubaWidgetsSandwichSourceView* self,
                                                         GtkWidget* new_bottom_child,
                                                         gboolean append);
VALA_EXTERN void tuba_widgets_sandwich_source_view_clear_child_widget (TubaWidgetsSandwichSourceView* self,
                                                           GtkWidget* widget);
VALA_EXTERN void tuba_widgets_sandwich_source_view_setup_child_widget (TubaWidgetsSandwichSourceView* self,
                                                           GtkWidget* wdgt);
VALA_EXTERN void tuba_dialogs_composer_components_editor_insert_string_at_cursor (TubaDialogsComposerComponentsEditor* self,
                                                                      const gchar* text);
static void tuba_dialogs_composer_components_editor_update_spelling_lang (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN const gchar* tuba_dialogs_composer_components_editor_get_locale (TubaDialogsComposerComponentsEditor* self);
static void tuba_dialogs_composer_components_editor_count_chars (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN GType tuba_utils_tracking_cleanup_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN gchar* tuba_utils_tracking_cleanup_content_with_uris (gchar* content,
                                                      GUri** uris,
                                                      gint uris_length1,
                                                      TubaUtilsTrackingCleanupType cleanup_type,
                                                      gint characters_reserved_per_url);
VALA_EXTERN GUri** tuba_utils_tracking_extract_uris (const gchar* content,
                                         gint* result_length1);
VALA_EXTERN GType tuba_account_store_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAccountStore, g_object_unref)
VALA_EXTERN GType tuba_entity_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEntity, g_object_unref)
VALA_EXTERN GType tuba_api_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIAccount, g_object_unref)
VALA_EXTERN GType tuba_instance_account_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaInstanceAccount, g_object_unref)
VALA_EXTERN TubaInstanceAccount* tuba_account_store_get_active (TubaAccountStore* self);
VALA_EXTERN GType tuba_api_instance_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaAPIInstance, g_object_unref)
VALA_EXTERN TubaAPIInstance* tuba_instance_account_get_instance_info (TubaInstanceAccount* self);
VALA_EXTERN gint tuba_api_instance_get_compat_status_characters_reserved_per_url (TubaAPIInstance* self);
VALA_EXTERN gchar* tuba_utils_counting_replace_mentions (const gchar* content);
VALA_EXTERN gint tuba_utils_counting_chars (const gchar* content,
                                const gchar* language);
static void tuba_dialogs_composer_components_editor_set_char_count (TubaDialogsComposerComponentsEditor* self,
                                                             gint64 value);
static void tuba_dialogs_composer_components_editor_on_content_changed (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN gint64 tuba_dialogs_composer_components_editor_get_char_count (TubaDialogsComposerComponentsEditor* self);
static void tuba_dialogs_composer_components_editor_real_add_bottom_child (TubaWidgetsSandwichSourceView* base,
                                                                    GtkWidget* new_bottom_child,
                                                                    gboolean append);
VALA_EXTERN gboolean tuba_widgets_sandwich_source_view_has_bottom_child (TubaWidgetsSandwichSourceView* self,
                                                             GtkWidget* child);
VALA_EXTERN void tuba_widgets_sandwich_source_view_scroll_to_widget (TubaWidgetsSandwichSourceView* self,
                                                         gboolean bottom);
static void tuba_dialogs_composer_components_editor_connect_child_attachable (TubaDialogsComposerComponentsEditor* self,
                                                                       TubaDialogsComposerComponentsAttachable* attachable);
VALA_EXTERN void tuba_dialogs_composer_components_editor_scroll_request (TubaDialogsComposerComponentsEditor* self,
                                                             gboolean bottom);
static void _tuba_dialogs_composer_components_editor_scroll_request_tuba_dialogs_composer_components_attachable_scroll (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                                 gboolean end,
                                                                                                                 gpointer self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_toast_request (TubaDialogsComposerComponentsEditor* self,
                                                            AdwToast* toast_obj);
static void _tuba_dialogs_composer_components_editor_toast_request_tuba_dialogs_composer_components_attachable_toast (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                               AdwToast* toast,
                                                                                                               gpointer self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_push_subpage_request (TubaDialogsComposerComponentsEditor* self,
                                                                   AdwNavigationPage* page);
static void _tuba_dialogs_composer_components_editor_push_subpage_request_tuba_dialogs_composer_components_attachable_push_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                                             AdwNavigationPage* page,
                                                                                                                             gpointer self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_pop_request (TubaDialogsComposerComponentsEditor* self);
static void _tuba_dialogs_composer_components_editor_pop_request_tuba_dialogs_composer_components_attachable_pop_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                                   gpointer self);
VALA_EXTERN gboolean tuba_dialogs_composer_components_attachable_get_edit_mode (TubaDialogsComposerComponentsAttachable* self);
VALA_EXTERN void tuba_dialogs_composer_components_attachable_set_edit_mode (TubaDialogsComposerComponentsAttachable* self,
                                                                gboolean value);
static void tuba_dialogs_composer_components_editor_disconnect_child_attachable (TubaDialogsComposerComponentsEditor* self,
                                                                          TubaDialogsComposerComponentsAttachable* attachable);
static void tuba_dialogs_composer_components_editor_real_clear_child_widget (TubaWidgetsSandwichSourceView* base,
                                                                      GtkWidget* widget);
static void tuba_dialogs_composer_components_editor_real_setup_child_widget (TubaWidgetsSandwichSourceView* base,
                                                                      GtkWidget* widget);
static void tuba_dialogs_composer_components_editor_update_spelling_settings (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN GType tuba_settings_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaSettings, g_object_unref)
VALA_EXTERN void tuba_settings_set_spellchecker_enabled (TubaSettings* self,
                                             gboolean value);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_title (TubaDialogsComposerComponentsEditor* self,
                                                        const gchar* label,
                                                        GtkWidget* sub_widget);
static gboolean tuba_dialogs_composer_components_editor_on_keypress (TubaDialogsComposerComponentsEditor* self,
                                                              guint keyval,
                                                              guint keycode,
                                                              GdkModifierType modifier);
VALA_EXTERN void tuba_dialogs_composer_components_editor_update_style_scheme (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_update_language_highlight (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN const gchar* tuba_dialogs_composer_components_editor_get_content_type (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN void tuba_widgets_sandwich_source_view_scroll_animated (TubaWidgetsSandwichSourceView* self,
                                                        gboolean end);
static void tuba_dialogs_composer_components_editor_real_measure (GtkWidget* base,
                                                           GtkOrientation orientation,
                                                           gint for_size,
                                                           gint* minimum,
                                                           gint* natural,
                                                           gint* minimum_baseline,
                                                           gint* natural_baseline);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_cursor_at_start (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_on_paste (TubaDialogsComposerComponentsEditor* self,
                                                       GdkClipboard* clp);
VALA_EXTERN gboolean tuba_settings_get_strip_tracking (TubaSettings* self);
static void tuba_dialogs_composer_components_editor_undo (TubaDialogsComposerComponentsEditor* self);
static void _tuba_dialogs_composer_components_editor_undo_adw_toast_button_clicked (AdwToast* _sender,
                                                                             gpointer self);
VALA_EXTERN TubaDialogsComposerComponentsEditor* tuba_dialogs_composer_components_editor_new (void);
VALA_EXTERN TubaDialogsComposerComponentsEditor* tuba_dialogs_composer_components_editor_construct (GType object_type);
VALA_EXTERN TubaWidgetsSandwichSourceView* tuba_widgets_sandwich_source_view_new (void);
VALA_EXTERN TubaWidgetsSandwichSourceView* tuba_widgets_sandwich_source_view_construct (GType object_type);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_locale (TubaDialogsComposerComponentsEditor* self,
                                                         const gchar* value);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_content_type (TubaDialogsComposerComponentsEditor* self,
                                                               const gchar* value);
VALA_EXTERN gchar* tuba_dialogs_composer_components_editor_get_content (TubaDialogsComposerComponentsEditor* self);
VALA_EXTERN void tuba_dialogs_composer_components_editor_set_content (TubaDialogsComposerComponentsEditor* self,
                                                          const gchar* value);
VALA_EXTERN TubaDialogsComposerComponentsEditorPlaceholderHack* tuba_dialogs_composer_components_editor_placeholder_hack_new (GtkLabel* label);
VALA_EXTERN TubaDialogsComposerComponentsEditorPlaceholderHack* tuba_dialogs_composer_components_editor_placeholder_hack_construct (GType object_type,
                                                                                                                        GtkLabel* label);
static GtkSizeRequestMode tuba_dialogs_composer_components_editor_placeholder_hack_real_get_request_mode (GtkWidget* base);
static void tuba_dialogs_composer_components_editor_placeholder_hack_real_measure (GtkWidget* base,
                                                                            GtkOrientation orientation,
                                                                            gint for_size,
                                                                            gint* minimum,
                                                                            gint* natural,
                                                                            gint* minimum_baseline,
                                                                            gint* natural_baseline);
static void tuba_dialogs_composer_components_editor_placeholder_hack_real_size_allocate (GtkWidget* base,
                                                                                  gint width,
                                                                                  gint height,
                                                                                  gint baseline);
static void tuba_dialogs_composer_components_editor_placeholder_hack_real_dispose (GObject* base);
static void tuba_dialogs_composer_components_editor_placeholder_hack_finalize (GObject * obj);
static GType tuba_dialogs_composer_components_editor_placeholder_hack_get_type_once (void);
static GObject * tuba_dialogs_composer_components_editor_constructor (GType type,
                                                               guint n_construct_properties,
                                                               GObjectConstructParam * construct_properties);
VALA_EXTERN gboolean tuba_settings_get_spellchecker_enabled (TubaSettings* self);
static void _tuba_dialogs_composer_components_editor_update_spelling_settings_g_object_notify (GObject* _sender,
                                                                                        GParamSpec* pspec,
                                                                                        gpointer self);
static gboolean _tuba_dialogs_composer_components_editor_on_keypress_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                                    guint keyval,
                                                                                                    guint keycode,
                                                                                                    GdkModifierType state,
                                                                                                    gpointer self);
VALA_EXTERN TubaHandleProvider* tuba_handle_provider_new (void);
VALA_EXTERN TubaHandleProvider* tuba_handle_provider_construct (GType object_type);
VALA_EXTERN GType tuba_completion_provider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaCompletionProvider, g_object_unref)
VALA_EXTERN GType tuba_handle_provider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaHandleProvider, g_object_unref)
VALA_EXTERN TubaHashtagProvider* tuba_hashtag_provider_new (void);
VALA_EXTERN TubaHashtagProvider* tuba_hashtag_provider_construct (GType object_type);
VALA_EXTERN GType tuba_hashtag_provider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaHashtagProvider, g_object_unref)
VALA_EXTERN TubaEmojiProvider* tuba_emoji_provider_new (void);
VALA_EXTERN TubaEmojiProvider* tuba_emoji_provider_construct (GType object_type);
VALA_EXTERN GType tuba_emoji_provider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (TubaEmojiProvider, g_object_unref)
static void _tuba_dialogs_composer_components_editor_update_style_scheme_g_object_notify (GObject* _sender,
                                                                                   GParamSpec* pspec,
                                                                                   gpointer self);
static void _tuba_dialogs_composer_components_editor_on_paste_gtk_text_buffer_paste_done (GtkTextBuffer* _sender,
                                                                                   GdkClipboard* clipboard,
                                                                                   gpointer self);
static void _tuba_dialogs_composer_components_editor_on_content_changed_gtk_text_buffer_changed (GtkTextBuffer* _sender,
                                                                                          gpointer self);
VALA_EXTERN void tuba_widgets_sandwich_source_view_add_top_child (TubaWidgetsSandwichSourceView* self,
                                                      GtkWidget* new_top_child);
static void tuba_dialogs_composer_components_editor_finalize (GObject * obj);
static GType tuba_dialogs_composer_components_editor_get_type_once (void);
static void _vala_tuba_dialogs_composer_components_editor_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec);
static void _vala_tuba_dialogs_composer_components_editor_set_property (GObject * object,
                                                                 guint property_id,
                                                                 const GValue * value,
                                                                 GParamSpec * pspec);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);
static gssize _vala_array_length (gpointer array);

static inline gpointer
tuba_dialogs_composer_components_editor_get_instance_private (TubaDialogsComposerComponentsEditor* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerComponentsEditor_private_offset);
}

static guint8*
string_get_data (const gchar* self,
                 gint* result_length1)
{
	guint8* result;
	guint8* res = NULL;
	gint res_length1;
	gint _res_size_;
	gint _tmp0_;
	gint _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	g_return_val_if_fail (self != NULL, NULL);
	res = (guint8*) self;
	res_length1 = -1;
	_res_size_ = res_length1;
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	res_length1 = (gint) _tmp1_;
	_tmp2_ = res;
	_tmp2__length1 = res_length1;
	if (result_length1) {
		*result_length1 = _tmp2__length1;
	}
	result = _tmp2_;
	return result;
}

void
tuba_dialogs_composer_components_editor_insert_string_at_cursor (TubaDialogsComposerComponentsEditor* self,
                                                                 const gchar* text)
{
	GtkTextBuffer* _tmp0_;
	GtkTextBuffer* _tmp1_;
	guint8* _tmp2_;
	gint _tmp2__length1;
	gint _tmp3_ = 0;
	guint8* _tmp4_;
	gint _tmp4__length1;
	g_return_if_fail (self != NULL);
	g_return_if_fail (text != NULL);
	_tmp0_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = string_get_data (text, &_tmp3_);
	_tmp2__length1 = _tmp3_;
	_tmp4_ = _tmp2_;
	_tmp4__length1 = _tmp2__length1;
	gtk_text_buffer_insert_at_cursor (_tmp1_, text, _tmp4__length1);
}

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

static void
tuba_dialogs_composer_components_editor_update_spelling_lang (TubaDialogsComposerComponentsEditor* self)
{
	const gchar* _tmp0_ = NULL;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* new_locale = NULL;
	gchar* _tmp7_;
	SpellingChecker* checker = NULL;
	SpellingChecker* _tmp8_;
	SpellingChecker* _tmp9_;
	SpellingChecker* _tmp10_;
	const gchar* _tmp11_;
	gchar* new_lang = NULL;
	SpellingChecker* _tmp12_;
	const gchar* _tmp13_;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	gboolean _tmp16_ = FALSE;
	const gchar* _tmp17_;
	g_return_if_fail (self != NULL);
	_tmp1_ = self->priv->original_libspelling_lang_iso639;
	_tmp2_ = tuba_dialogs_composer_components_editor_get_locale (self);
	_tmp3_ = _tmp2_;
	if (g_strcmp0 (_tmp1_, _tmp3_) == 0) {
		const gchar* _tmp4_;
		_tmp4_ = self->priv->original_libspelling_lang;
		_tmp0_ = _tmp4_;
	} else {
		const gchar* _tmp5_;
		const gchar* _tmp6_;
		_tmp5_ = tuba_dialogs_composer_components_editor_get_locale (self);
		_tmp6_ = _tmp5_;
		_tmp0_ = _tmp6_;
	}
	_tmp7_ = g_strdup (_tmp0_);
	new_locale = _tmp7_;
	_tmp8_ = spelling_checker_get_default ();
	_tmp9_ = _g_object_ref0 (_tmp8_);
	checker = _tmp9_;
	_tmp10_ = checker;
	_tmp11_ = new_locale;
	spelling_checker_set_language (_tmp10_, _tmp11_);
	_tmp12_ = checker;
	_tmp13_ = spelling_checker_get_language (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = g_strdup (_tmp14_);
	new_lang = _tmp15_;
	_tmp17_ = new_lang;
	if (_tmp17_ == NULL) {
		const gchar* _tmp18_;
		_tmp18_ = self->priv->original_libspelling_lang;
		_tmp16_ = _tmp18_ != NULL;
	} else {
		_tmp16_ = FALSE;
	}
	if (_tmp16_) {
		SpellingChecker* _tmp19_;
		const gchar* _tmp20_;
		_tmp19_ = checker;
		_tmp20_ = self->priv->original_libspelling_lang;
		spelling_checker_set_language (_tmp19_, _tmp20_);
	}
	_g_free0 (new_lang);
	_g_object_unref0 (checker);
	_g_free0 (new_locale);
}

static void
tuba_dialogs_composer_components_editor_count_chars (TubaDialogsComposerComponentsEditor* self)
{
	gchar* replaced_urls = NULL;
	GtkTextBuffer* _tmp0_;
	GtkTextBuffer* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	GtkTextBuffer* _tmp4_;
	GtkTextBuffer* _tmp5_;
	gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gint _tmp9_ = 0;
	GUri** _tmp10_;
	GUri** _tmp11_;
	gint _tmp11__length1;
	TubaAccountStore* _tmp12_;
	TubaInstanceAccount* _tmp13_;
	TubaInstanceAccount* _tmp14_;
	TubaAPIInstance* _tmp15_;
	TubaAPIInstance* _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	gchar* replaced_mentions = NULL;
	gchar* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp1_ = _tmp0_;
	g_object_get (_tmp1_, "text", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	_tmp4_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp5_ = _tmp4_;
	g_object_get (_tmp5_, "text", &_tmp6_, NULL);
	_tmp7_ = _tmp6_;
	_tmp8_ = _tmp7_;
	_tmp10_ = tuba_utils_tracking_extract_uris (_tmp8_, &_tmp9_);
	_tmp11_ = _tmp10_;
	_tmp11__length1 = _tmp9_;
	_tmp12_ = tuba_accounts;
	_tmp13_ = tuba_account_store_get_active (_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp15_ = tuba_instance_account_get_instance_info (_tmp14_);
	_tmp16_ = _tmp15_;
	_tmp17_ = tuba_api_instance_get_compat_status_characters_reserved_per_url (_tmp16_);
	_tmp18_ = _tmp17_;
	_tmp19_ = tuba_utils_tracking_cleanup_content_with_uris (_tmp3_, _tmp11_, (gint) _tmp9_, TUBA_UTILS_TRACKING_CLEANUP_TYPE_SPECIFIC_LENGTH, _tmp18_);
	_tmp20_ = _tmp19_;
	_tmp11_ = (_vala_array_free (_tmp11_, _tmp11__length1, (GDestroyNotify) g_uri_unref), NULL);
	_g_free0 (_tmp8_);
	replaced_urls = _tmp20_;
	_tmp21_ = tuba_utils_counting_replace_mentions (replaced_urls);
	replaced_mentions = _tmp21_;
	_tmp22_ = tuba_dialogs_composer_components_editor_get_locale (self);
	_tmp23_ = _tmp22_;
	tuba_dialogs_composer_components_editor_set_char_count (self, (gint64) tuba_utils_counting_chars (replaced_mentions, _tmp23_));
	_g_free0 (replaced_mentions);
	_g_free0 (replaced_urls);
}

static void
tuba_dialogs_composer_components_editor_on_content_changed (TubaDialogsComposerComponentsEditor* self)
{
	TubaDialogsComposerComponentsEditorPlaceholderHack* _tmp0_;
	gint64 _tmp1_;
	g_return_if_fail (self != NULL);
	g_signal_emit_by_name ((GtkSourceView*) self, "show-completion");
	tuba_dialogs_composer_components_editor_count_chars (self);
	_tmp0_ = self->placeholder;
	_tmp1_ = self->priv->_char_count;
	gtk_widget_set_visible ((GtkWidget*) _tmp0_, _tmp1_ == ((gint64) 0));
}

static void
tuba_dialogs_composer_components_editor_real_add_bottom_child (TubaWidgetsSandwichSourceView* base,
                                                               GtkWidget* new_bottom_child,
                                                               gboolean append)
{
	TubaDialogsComposerComponentsEditor * self;
	self = (TubaDialogsComposerComponentsEditor*) base;
	g_return_if_fail (new_bottom_child != NULL);
	if (tuba_widgets_sandwich_source_view_has_bottom_child ((TubaWidgetsSandwichSourceView*) self, new_bottom_child)) {
		return;
	}
	TUBA_WIDGETS_SANDWICH_SOURCE_VIEW_CLASS (tuba_dialogs_composer_components_editor_parent_class)->add_bottom_child (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceView), new_bottom_child, append);
	tuba_widgets_sandwich_source_view_scroll_to_widget ((TubaWidgetsSandwichSourceView*) self, TRUE);
}

static void
_tuba_dialogs_composer_components_editor_scroll_request_tuba_dialogs_composer_components_attachable_scroll (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                            gboolean end,
                                                                                                            gpointer self)
{
	tuba_dialogs_composer_components_editor_scroll_request ((TubaDialogsComposerComponentsEditor*) self, end);
}

static void
_tuba_dialogs_composer_components_editor_toast_request_tuba_dialogs_composer_components_attachable_toast (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                          AdwToast* toast,
                                                                                                          gpointer self)
{
	tuba_dialogs_composer_components_editor_toast_request ((TubaDialogsComposerComponentsEditor*) self, toast);
}

static void
_tuba_dialogs_composer_components_editor_push_subpage_request_tuba_dialogs_composer_components_attachable_push_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                                        AdwNavigationPage* page,
                                                                                                                        gpointer self)
{
	tuba_dialogs_composer_components_editor_push_subpage_request ((TubaDialogsComposerComponentsEditor*) self, page);
}

static void
_tuba_dialogs_composer_components_editor_pop_request_tuba_dialogs_composer_components_attachable_pop_subpage (TubaDialogsComposerComponentsAttachable* _sender,
                                                                                                              gpointer self)
{
	tuba_dialogs_composer_components_editor_pop_request ((TubaDialogsComposerComponentsEditor*) self);
}

static void
tuba_dialogs_composer_components_editor_connect_child_attachable (TubaDialogsComposerComponentsEditor* self,
                                                                  TubaDialogsComposerComponentsAttachable* attachable)
{
	gboolean _tmp0_;
	gboolean _tmp1_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (attachable != NULL);
	g_signal_connect_object (attachable, "scroll", (GCallback) _tuba_dialogs_composer_components_editor_scroll_request_tuba_dialogs_composer_components_attachable_scroll, self, 0);
	g_signal_connect_object (attachable, "toast", (GCallback) _tuba_dialogs_composer_components_editor_toast_request_tuba_dialogs_composer_components_attachable_toast, self, 0);
	g_signal_connect_object (attachable, "push-subpage", (GCallback) _tuba_dialogs_composer_components_editor_push_subpage_request_tuba_dialogs_composer_components_attachable_push_subpage, self, 0);
	g_signal_connect_object (attachable, "pop-subpage", (GCallback) _tuba_dialogs_composer_components_editor_pop_request_tuba_dialogs_composer_components_attachable_pop_subpage, self, 0);
	_tmp0_ = tuba_dialogs_composer_components_attachable_get_edit_mode ((TubaDialogsComposerComponentsAttachable*) self);
	_tmp1_ = _tmp0_;
	tuba_dialogs_composer_components_attachable_set_edit_mode (attachable, _tmp1_);
}

static void
tuba_dialogs_composer_components_editor_disconnect_child_attachable (TubaDialogsComposerComponentsEditor* self,
                                                                     TubaDialogsComposerComponentsAttachable* attachable)
{
	guint _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	guint _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (attachable != NULL);
	g_signal_parse_name ("scroll", TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, &_tmp0_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (attachable, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp0_, 0, NULL, (GCallback) _tuba_dialogs_composer_components_editor_scroll_request_tuba_dialogs_composer_components_attachable_scroll, self);
	g_signal_parse_name ("toast", TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, &_tmp1_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (attachable, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _tuba_dialogs_composer_components_editor_toast_request_tuba_dialogs_composer_components_attachable_toast, self);
	g_signal_parse_name ("push-subpage", TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, &_tmp2_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (attachable, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp2_, 0, NULL, (GCallback) _tuba_dialogs_composer_components_editor_push_subpage_request_tuba_dialogs_composer_components_attachable_push_subpage, self);
	g_signal_parse_name ("pop-subpage", TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, &_tmp3_, NULL, FALSE);
	g_signal_handlers_disconnect_matched (attachable, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _tuba_dialogs_composer_components_editor_pop_request_tuba_dialogs_composer_components_attachable_pop_subpage, self);
}

static void
tuba_dialogs_composer_components_editor_real_clear_child_widget (TubaWidgetsSandwichSourceView* base,
                                                                 GtkWidget* widget)
{
	TubaDialogsComposerComponentsEditor * self;
	self = (TubaDialogsComposerComponentsEditor*) base;
	g_return_if_fail (widget != NULL);
	if (TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHABLE (widget)) {
		tuba_dialogs_composer_components_editor_disconnect_child_attachable (self, TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHABLE (widget) ? ((TubaDialogsComposerComponentsAttachable*) widget) : NULL);
	}
	TUBA_WIDGETS_SANDWICH_SOURCE_VIEW_CLASS (tuba_dialogs_composer_components_editor_parent_class)->clear_child_widget (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceView), widget);
}

static void
tuba_dialogs_composer_components_editor_real_setup_child_widget (TubaWidgetsSandwichSourceView* base,
                                                                 GtkWidget* widget)
{
	TubaDialogsComposerComponentsEditor * self;
	self = (TubaDialogsComposerComponentsEditor*) base;
	g_return_if_fail (widget != NULL);
	if (TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHABLE (widget)) {
		tuba_dialogs_composer_components_editor_connect_child_attachable (self, TUBA_DIALOGS_COMPOSER_COMPONENTS_IS_ATTACHABLE (widget) ? ((TubaDialogsComposerComponentsAttachable*) widget) : NULL);
		gtk_widget_add_css_class (widget, "editor-component");
	}
	TUBA_WIDGETS_SANDWICH_SOURCE_VIEW_CLASS (tuba_dialogs_composer_components_editor_parent_class)->setup_child_widget (G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceView), widget);
}

static void
tuba_dialogs_composer_components_editor_update_spelling_settings (TubaDialogsComposerComponentsEditor* self)
{
	TubaSettings* _tmp0_;
	SpellingTextBufferAdapter* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	g_return_if_fail (self != NULL);
	_tmp0_ = tuba_settings;
	_tmp1_ = self->adapter;
	_tmp2_ = spelling_text_buffer_adapter_get_enabled (_tmp1_);
	_tmp3_ = _tmp2_;
	tuba_settings_set_spellchecker_enabled (_tmp0_, _tmp3_);
}

void
tuba_dialogs_composer_components_editor_set_title (TubaDialogsComposerComponentsEditor* self,
                                                   const gchar* label,
                                                   GtkWidget* sub_widget)
{
	GtkLabel* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (label != NULL);
	_tmp0_ = self->status_title;
	_tmp1_ = gtk_label_get_label (_tmp0_);
	_tmp2_ = _tmp1_;
	if (g_strcmp0 (_tmp2_, label) != 0) {
		GtkLabel* _tmp3_;
		_tmp3_ = self->status_title;
		gtk_label_set_label (_tmp3_, label);
	}
	if (sub_widget != NULL) {
		GtkBox* _tmp4_;
		_tmp4_ = self->priv->status_box;
		gtk_box_append (_tmp4_, sub_widget);
	}
}

static gboolean
tuba_dialogs_composer_components_editor_on_keypress (TubaDialogsComposerComponentsEditor* self,
                                                     guint keyval,
                                                     guint keycode,
                                                     GdkModifierType modifier)
{
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	modifier = modifier & GDK_MODIFIER_MASK;
	if (keyval == GDK_KEY_Return) {
		_tmp1_ = TRUE;
	} else {
		_tmp1_ = keyval == GDK_KEY_KP_Enter;
	}
	if (_tmp1_) {
		gboolean _tmp2_ = FALSE;
		if (modifier == GDK_CONTROL_MASK) {
			_tmp2_ = TRUE;
		} else {
			_tmp2_ = modifier == (GDK_CONTROL_MASK | GDK_LOCK_MASK);
		}
		_tmp0_ = _tmp2_;
	} else {
		_tmp0_ = FALSE;
	}
	if (_tmp0_) {
		g_signal_emit (self, tuba_dialogs_composer_components_editor_signals[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CTRL_RETURN_PRESSED_SIGNAL], 0);
		result = TRUE;
		return result;
	}
	result = FALSE;
	return result;
}

void
tuba_dialogs_composer_components_editor_update_style_scheme (TubaDialogsComposerComponentsEditor* self)
{
	GtkSourceStyleSchemeManager* manager = NULL;
	GtkSourceStyleSchemeManager* _tmp0_;
	GtkSourceStyleSchemeManager* _tmp1_;
	AdwStyleManager* adw_manager = NULL;
	AdwStyleManager* _tmp2_;
	AdwStyleManager* _tmp3_;
	gchar* scheme_name = NULL;
	gchar* _tmp4_;
	AdwStyleManager* _tmp5_;
	AdwStyleManager* _tmp27_;
	gboolean _tmp28_;
	gboolean _tmp29_;
	GtkTextBuffer* _tmp32_;
	GtkTextBuffer* _tmp33_;
	GtkSourceStyleSchemeManager* _tmp34_;
	const gchar* _tmp35_;
	GtkSourceStyleScheme* _tmp36_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_source_style_scheme_manager_get_default ();
	_tmp1_ = _g_object_ref0 (_tmp0_);
	manager = _tmp1_;
	_tmp2_ = adw_style_manager_get_default ();
	_tmp3_ = _g_object_ref0 (_tmp2_);
	adw_manager = _tmp3_;
	_tmp4_ = g_strdup ("Fedi");
	scheme_name = _tmp4_;
	_tmp5_ = adw_manager;
	if (adw_style_manager_get_system_supports_accent_colors (_tmp5_)) {
		AdwStyleManager* _tmp6_;
		_tmp6_ = adw_manager;
		switch (adw_style_manager_get_accent_color (_tmp6_)) {
			case ADW_ACCENT_COLOR_YELLOW:
			{
				const gchar* _tmp7_;
				gchar* _tmp8_;
				_tmp7_ = scheme_name;
				_tmp8_ = g_strconcat (_tmp7_, "-yellow", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp8_;
				break;
			}
			case ADW_ACCENT_COLOR_TEAL:
			{
				const gchar* _tmp9_;
				gchar* _tmp10_;
				_tmp9_ = scheme_name;
				_tmp10_ = g_strconcat (_tmp9_, "-teal", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp10_;
				break;
			}
			case ADW_ACCENT_COLOR_PURPLE:
			{
				const gchar* _tmp11_;
				gchar* _tmp12_;
				_tmp11_ = scheme_name;
				_tmp12_ = g_strconcat (_tmp11_, "-purple", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp12_;
				break;
			}
			case ADW_ACCENT_COLOR_RED:
			{
				const gchar* _tmp13_;
				gchar* _tmp14_;
				_tmp13_ = scheme_name;
				_tmp14_ = g_strconcat (_tmp13_, "-red", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp14_;
				break;
			}
			case ADW_ACCENT_COLOR_GREEN:
			{
				const gchar* _tmp15_;
				gchar* _tmp16_;
				_tmp15_ = scheme_name;
				_tmp16_ = g_strconcat (_tmp15_, "-green", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp16_;
				break;
			}
			case ADW_ACCENT_COLOR_ORANGE:
			{
				const gchar* _tmp17_;
				gchar* _tmp18_;
				_tmp17_ = scheme_name;
				_tmp18_ = g_strconcat (_tmp17_, "-orange", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp18_;
				break;
			}
			case ADW_ACCENT_COLOR_SLATE:
			{
				const gchar* _tmp19_;
				gchar* _tmp20_;
				_tmp19_ = scheme_name;
				_tmp20_ = g_strconcat (_tmp19_, "-slate", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp20_;
				break;
			}
			case ADW_ACCENT_COLOR_PINK:
			{
				const gchar* _tmp21_;
				gchar* _tmp22_;
				_tmp21_ = scheme_name;
				_tmp22_ = g_strconcat (_tmp21_, "-pink", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp22_;
				break;
			}
			default:
			{
				const gchar* _tmp23_;
				gchar* _tmp24_;
				_tmp23_ = scheme_name;
				_tmp24_ = g_strconcat (_tmp23_, "-blue", NULL);
				_g_free0 (scheme_name);
				scheme_name = _tmp24_;
				break;
			}
		}
	} else {
		const gchar* _tmp25_;
		gchar* _tmp26_;
		_tmp25_ = scheme_name;
		_tmp26_ = g_strconcat (_tmp25_, "-blue", NULL);
		_g_free0 (scheme_name);
		scheme_name = _tmp26_;
	}
	_tmp27_ = adw_manager;
	_tmp28_ = adw_style_manager_get_dark (_tmp27_);
	_tmp29_ = _tmp28_;
	if (_tmp29_) {
		const gchar* _tmp30_;
		gchar* _tmp31_;
		_tmp30_ = scheme_name;
		_tmp31_ = g_strconcat (_tmp30_, "-dark", NULL);
		_g_free0 (scheme_name);
		scheme_name = _tmp31_;
	}
	_tmp32_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp33_ = _tmp32_;
	_tmp34_ = manager;
	_tmp35_ = scheme_name;
	_tmp36_ = gtk_source_style_scheme_manager_get_scheme (_tmp34_, _tmp35_);
	gtk_source_buffer_set_style_scheme (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, gtk_source_buffer_get_type (), GtkSourceBuffer), _tmp36_);
	_g_free0 (scheme_name);
	_g_object_unref0 (adw_manager);
	_g_object_unref0 (manager);
}

void
tuba_dialogs_composer_components_editor_update_language_highlight (TubaDialogsComposerComponentsEditor* self)
{
	GtkTextBuffer* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkSourceLanguageManager* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GtkSourceLanguage* _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp1_ = _tmp0_;
	_tmp2_ = self->priv->lang_manager;
	_tmp3_ = tuba_dialogs_composer_components_editor_get_content_type (self);
	_tmp4_ = _tmp3_;
	_tmp5_ = gtk_source_language_manager_get_language (_tmp2_, _tmp4_);
	gtk_source_buffer_set_language (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_source_buffer_get_type (), GtkSourceBuffer), _tmp5_);
}

void
tuba_dialogs_composer_components_editor_scroll_request (TubaDialogsComposerComponentsEditor* self,
                                                        gboolean bottom)
{
	g_return_if_fail (self != NULL);
	tuba_widgets_sandwich_source_view_scroll_animated ((TubaWidgetsSandwichSourceView*) self, bottom);
}

void
tuba_dialogs_composer_components_editor_toast_request (TubaDialogsComposerComponentsEditor* self,
                                                       AdwToast* toast_obj)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (toast_obj != NULL);
	g_signal_emit_by_name ((TubaDialogsComposerComponentsAttachable*) self, "toast", toast_obj);
}

void
tuba_dialogs_composer_components_editor_push_subpage_request (TubaDialogsComposerComponentsEditor* self,
                                                              AdwNavigationPage* page)
{
	g_return_if_fail (self != NULL);
	g_return_if_fail (page != NULL);
	g_signal_emit_by_name ((TubaDialogsComposerComponentsAttachable*) self, "push-subpage", page);
}

void
tuba_dialogs_composer_components_editor_pop_request (TubaDialogsComposerComponentsEditor* self)
{
	g_return_if_fail (self != NULL);
	g_signal_emit_by_name ((TubaDialogsComposerComponentsAttachable*) self, "pop-subpage");
}

static void
tuba_dialogs_composer_components_editor_real_measure (GtkWidget* base,
                                                      GtkOrientation orientation,
                                                      gint for_size,
                                                      gint* minimum,
                                                      gint* natural,
                                                      gint* minimum_baseline,
                                                      gint* natural_baseline)
{
	TubaDialogsComposerComponentsEditor * self;
	gint _vala_minimum = 0;
	gint _vala_natural = 0;
	gint _vala_minimum_baseline = 0;
	gint _vala_natural_baseline = 0;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	self = (TubaDialogsComposerComponentsEditor*) base;
	GTK_WIDGET_CLASS (tuba_dialogs_composer_components_editor_parent_class)->measure ((GtkWidget*) G_TYPE_CHECK_INSTANCE_CAST (self, TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, TubaWidgetsSandwichSourceView), orientation, for_size, &_tmp0_, &_tmp1_, &_tmp2_, &_tmp3_);
	_vala_minimum = _tmp0_;
	_vala_natural = _tmp1_;
	_vala_minimum_baseline = _tmp2_;
	_vala_natural_baseline = _tmp3_;
	if (orientation == GTK_ORIENTATION_HORIZONTAL) {
		_tmp4_ = 423;
	} else {
		_tmp4_ = MAX (_vala_natural, 300);
	}
	_vala_natural = MAX (_vala_minimum, _tmp4_);
	if (minimum) {
		*minimum = _vala_minimum;
	}
	if (natural) {
		*natural = _vala_natural;
	}
	if (minimum_baseline) {
		*minimum_baseline = _vala_minimum_baseline;
	}
	if (natural_baseline) {
		*natural_baseline = _vala_natural_baseline;
	}
}

void
tuba_dialogs_composer_components_editor_set_cursor_at_start (TubaDialogsComposerComponentsEditor* self)
{
	GtkTextIter star_iter = {0};
	GtkTextBuffer* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkTextIter _tmp2_ = {0};
	GtkTextBuffer* _tmp3_;
	GtkTextBuffer* _tmp4_;
	GtkTextIter _tmp5_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp1_ = _tmp0_;
	gtk_text_buffer_get_start_iter (_tmp1_, &_tmp2_);
	star_iter = _tmp2_;
	_tmp3_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp4_ = _tmp3_;
	_tmp5_ = star_iter;
	gtk_text_buffer_place_cursor (_tmp4_, &_tmp5_);
}

static void
_tuba_dialogs_composer_components_editor_undo_adw_toast_button_clicked (AdwToast* _sender,
                                                                        gpointer self)
{
	tuba_dialogs_composer_components_editor_undo ((TubaDialogsComposerComponentsEditor*) self);
}

void
tuba_dialogs_composer_components_editor_on_paste (TubaDialogsComposerComponentsEditor* self,
                                                  GdkClipboard* clp)
{
	TubaSettings* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	gchar* clean_buffer = NULL;
	GtkTextBuffer* _tmp3_;
	GtkTextBuffer* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	GtkTextBuffer* _tmp7_;
	GtkTextBuffer* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gint _tmp12_ = 0;
	GUri** _tmp13_;
	GUri** _tmp14_;
	gint _tmp14__length1;
	gchar* _tmp15_;
	gchar* _tmp16_;
	const gchar* _tmp17_;
	GtkTextBuffer* _tmp18_;
	GtkTextBuffer* _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gboolean _tmp23_;
	GtkTextIter start_iter = {0};
	GtkTextIter end_iter = {0};
	GtkTextBuffer* _tmp24_;
	GtkTextBuffer* _tmp25_;
	GtkTextIter _tmp26_ = {0};
	GtkTextIter _tmp27_ = {0};
	GtkTextBuffer* _tmp28_;
	GtkTextBuffer* _tmp29_;
	GtkTextBuffer* _tmp30_;
	GtkTextBuffer* _tmp31_;
	GtkTextBuffer* _tmp32_;
	GtkTextBuffer* _tmp33_;
	const gchar* _tmp34_;
	GtkTextBuffer* _tmp35_;
	GtkTextBuffer* _tmp36_;
	AdwToast* toast_obj = NULL;
	gchar* _tmp37_;
	AdwToast* _tmp38_ = NULL;
	AdwToast* _tmp39_;
	AdwToast* _tmp40_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (clp != NULL);
	_tmp0_ = tuba_settings;
	_tmp1_ = tuba_settings_get_strip_tracking (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		return;
	}
	_tmp3_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp4_ = _tmp3_;
	g_object_get (_tmp4_, "text", &_tmp5_, NULL);
	_tmp6_ = _tmp5_;
	_tmp7_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp8_ = _tmp7_;
	g_object_get (_tmp8_, "text", &_tmp9_, NULL);
	_tmp10_ = _tmp9_;
	_tmp11_ = _tmp10_;
	_tmp13_ = tuba_utils_tracking_extract_uris (_tmp11_, &_tmp12_);
	_tmp14_ = _tmp13_;
	_tmp14__length1 = _tmp12_;
	_tmp15_ = tuba_utils_tracking_cleanup_content_with_uris (_tmp6_, _tmp14_, (gint) _tmp12_, TUBA_UTILS_TRACKING_CLEANUP_TYPE_STRIP_TRACKING, 23);
	_tmp16_ = _tmp15_;
	_tmp14_ = (_vala_array_free (_tmp14_, _tmp14__length1, (GDestroyNotify) g_uri_unref), NULL);
	_g_free0 (_tmp11_);
	clean_buffer = _tmp16_;
	_tmp17_ = clean_buffer;
	_tmp18_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp19_ = _tmp18_;
	g_object_get (_tmp19_, "text", &_tmp20_, NULL);
	_tmp21_ = _tmp20_;
	_tmp22_ = _tmp21_;
	_tmp23_ = g_strcmp0 (_tmp17_, _tmp22_) == 0;
	_g_free0 (_tmp22_);
	if (_tmp23_) {
		_g_free0 (clean_buffer);
		return;
	}
	_tmp24_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp25_ = _tmp24_;
	gtk_text_buffer_get_bounds (_tmp25_, &_tmp26_, &_tmp27_);
	start_iter = _tmp26_;
	end_iter = _tmp27_;
	_tmp28_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp29_ = _tmp28_;
	gtk_text_buffer_begin_user_action (_tmp29_);
	_tmp30_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp31_ = _tmp30_;
	gtk_text_buffer_delete (_tmp31_, &start_iter, &end_iter);
	_tmp32_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp33_ = _tmp32_;
	_tmp34_ = clean_buffer;
	gtk_text_buffer_insert (_tmp33_, &start_iter, _tmp34_, -1);
	_tmp35_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp36_ = _tmp35_;
	gtk_text_buffer_end_user_action (_tmp36_);
	_tmp37_ = g_strdup (_ ("Undo"));
	_tmp38_ = adw_toast_new (_ ("Stripped tracking parameters"));
	adw_toast_set_timeout (_tmp38_, (guint) 3);
	adw_toast_set_button_label (_tmp38_, _tmp37_);
	_g_free0 (_tmp37_);
	toast_obj = _tmp38_;
	_tmp39_ = toast_obj;
	g_signal_connect_object (_tmp39_, "button-clicked", (GCallback) _tuba_dialogs_composer_components_editor_undo_adw_toast_button_clicked, self, 0);
	_tmp40_ = toast_obj;
	g_signal_emit_by_name ((TubaDialogsComposerComponentsAttachable*) self, "toast", _tmp40_);
	_g_object_unref0 (toast_obj);
	_g_free0 (clean_buffer);
}

static void
tuba_dialogs_composer_components_editor_undo (TubaDialogsComposerComponentsEditor* self)
{
	GtkTextBuffer* _tmp0_;
	GtkTextBuffer* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp1_ = _tmp0_;
	gtk_text_buffer_undo (_tmp1_);
}

TubaDialogsComposerComponentsEditor*
tuba_dialogs_composer_components_editor_construct (GType object_type)
{
	TubaDialogsComposerComponentsEditor * self = NULL;
	self = (TubaDialogsComposerComponentsEditor*) tuba_widgets_sandwich_source_view_construct (object_type);
	return self;
}

TubaDialogsComposerComponentsEditor*
tuba_dialogs_composer_components_editor_new (void)
{
	return tuba_dialogs_composer_components_editor_construct (TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR);
}

static gboolean
tuba_dialogs_composer_components_editor_real_get_edit_mode (TubaDialogsComposerComponentsAttachable* base)
{
	gboolean result;
	TubaDialogsComposerComponentsEditor* self;
	self = (TubaDialogsComposerComponentsEditor*) base;
	result = self->priv->_edit_mode;
	return result;
}

static void
tuba_dialogs_composer_components_editor_real_set_edit_mode (TubaDialogsComposerComponentsAttachable* base,
                                                            gboolean value)
{
	TubaDialogsComposerComponentsEditor* self;
	gboolean old_value;
	self = (TubaDialogsComposerComponentsEditor*) base;
	old_value = tuba_dialogs_composer_components_editor_real_get_edit_mode (base);
	if (old_value != value) {
		self->priv->_edit_mode = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_EDIT_MODE_PROPERTY]);
	}
}

const gchar*
tuba_dialogs_composer_components_editor_get_locale (TubaDialogsComposerComponentsEditor* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_locale;
	result = _tmp0_;
	return result;
}

void
tuba_dialogs_composer_components_editor_set_locale (TubaDialogsComposerComponentsEditor* self,
                                                    const gchar* value)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_locale;
	if (g_strcmp0 (_tmp0_, value) != 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (value);
		_g_free0 (self->priv->_locale);
		self->priv->_locale = _tmp1_;
		tuba_dialogs_composer_components_editor_count_chars (self);
		tuba_dialogs_composer_components_editor_update_spelling_lang (self);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_LOCALE_PROPERTY]);
}

const gchar*
tuba_dialogs_composer_components_editor_get_content_type (TubaDialogsComposerComponentsEditor* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_content_type;
	result = _tmp0_;
	return result;
}

void
tuba_dialogs_composer_components_editor_set_content_type (TubaDialogsComposerComponentsEditor* self,
                                                          const gchar* value)
{
	const gchar* _tmp0_;
	g_return_if_fail (self != NULL);
	_tmp0_ = self->priv->_content_type;
	if (g_strcmp0 (_tmp0_, value) != 0) {
		gchar* _tmp1_;
		_tmp1_ = g_strdup (value);
		_g_free0 (self->priv->_content_type);
		self->priv->_content_type = _tmp1_;
		tuba_dialogs_composer_components_editor_update_language_highlight (self);
	}
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_TYPE_PROPERTY]);
}

gint64
tuba_dialogs_composer_components_editor_get_char_count (TubaDialogsComposerComponentsEditor* self)
{
	gint64 result;
	g_return_val_if_fail (self != NULL, -1LL);
	result = self->priv->_char_count;
	return result;
}

static void
tuba_dialogs_composer_components_editor_set_char_count (TubaDialogsComposerComponentsEditor* self,
                                                        gint64 value)
{
	gint64 old_value;
	g_return_if_fail (self != NULL);
	old_value = tuba_dialogs_composer_components_editor_get_char_count (self);
	if (old_value != value) {
		self->priv->_char_count = value;
		g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CHAR_COUNT_PROPERTY]);
	}
}

gchar*
tuba_dialogs_composer_components_editor_get_content (TubaDialogsComposerComponentsEditor* self)
{
	gchar* result;
	GtkTextBuffer* _tmp0_;
	GtkTextBuffer* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp1_ = _tmp0_;
	g_object_get (_tmp1_, "text", &_tmp2_, NULL);
	_tmp3_ = _tmp2_;
	result = _tmp3_;
	return result;
}

void
tuba_dialogs_composer_components_editor_set_content (TubaDialogsComposerComponentsEditor* self,
                                                     const gchar* value)
{
	GtkTextBuffer* _tmp0_;
	GtkTextBuffer* _tmp1_;
	g_return_if_fail (self != NULL);
	_tmp0_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp1_ = _tmp0_;
	g_object_set (_tmp1_, "text", value, NULL);
	g_object_notify_by_pspec ((GObject *) self, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_PROPERTY]);
}

static inline gpointer
tuba_dialogs_composer_components_editor_placeholder_hack_get_instance_private (TubaDialogsComposerComponentsEditorPlaceholderHack* self)
{
	return G_STRUCT_MEMBER_P (self, TubaDialogsComposerComponentsEditorPlaceholderHack_private_offset);
}

TubaDialogsComposerComponentsEditorPlaceholderHack*
tuba_dialogs_composer_components_editor_placeholder_hack_construct (GType object_type,
                                                                    GtkLabel* label)
{
	TubaDialogsComposerComponentsEditorPlaceholderHack * self = NULL;
	GtkLabel* _tmp0_;
	g_return_val_if_fail (label != NULL, NULL);
	self = (TubaDialogsComposerComponentsEditorPlaceholderHack*) g_object_new (object_type, NULL);
	_tmp0_ = _g_object_ref0 (label);
	_g_object_unref0 (self->priv->label);
	self->priv->label = _tmp0_;
	gtk_widget_set_parent ((GtkWidget*) label, (GtkWidget*) self);
	return self;
}

TubaDialogsComposerComponentsEditorPlaceholderHack*
tuba_dialogs_composer_components_editor_placeholder_hack_new (GtkLabel* label)
{
	return tuba_dialogs_composer_components_editor_placeholder_hack_construct (TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK, label);
}

static GtkSizeRequestMode
tuba_dialogs_composer_components_editor_placeholder_hack_real_get_request_mode (GtkWidget* base)
{
	TubaDialogsComposerComponentsEditorPlaceholderHack * self;
	GtkLabel* _tmp0_;
	GtkSizeRequestMode result;
	self = (TubaDialogsComposerComponentsEditorPlaceholderHack*) base;
	_tmp0_ = self->priv->label;
	result = gtk_widget_get_request_mode ((GtkWidget*) _tmp0_);
	return result;
}

static void
tuba_dialogs_composer_components_editor_placeholder_hack_real_measure (GtkWidget* base,
                                                                       GtkOrientation orientation,
                                                                       gint for_size,
                                                                       gint* minimum,
                                                                       gint* natural,
                                                                       gint* minimum_baseline,
                                                                       gint* natural_baseline)
{
	TubaDialogsComposerComponentsEditorPlaceholderHack * self;
	gint _vala_minimum = 0;
	gint _vala_natural = 0;
	gint _vala_minimum_baseline = 0;
	gint _vala_natural_baseline = 0;
	GtkLabel* _tmp0_;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	gint _tmp4_ = 0;
	self = (TubaDialogsComposerComponentsEditorPlaceholderHack*) base;
	_tmp0_ = self->priv->label;
	gtk_widget_measure ((GtkWidget*) _tmp0_, orientation, for_size, &_tmp1_, &_tmp2_, &_tmp3_, &_tmp4_);
	_vala_minimum = _tmp1_;
	_vala_natural = _tmp2_;
	_vala_minimum_baseline = _tmp3_;
	_vala_natural_baseline = _tmp4_;
	if (orientation == GTK_ORIENTATION_HORIZONTAL) {
		_vala_natural = MAX (500, _vala_minimum);
	}
	if (minimum) {
		*minimum = _vala_minimum;
	}
	if (natural) {
		*natural = _vala_natural;
	}
	if (minimum_baseline) {
		*minimum_baseline = _vala_minimum_baseline;
	}
	if (natural_baseline) {
		*natural_baseline = _vala_natural_baseline;
	}
}

static void
tuba_dialogs_composer_components_editor_placeholder_hack_real_size_allocate (GtkWidget* base,
                                                                             gint width,
                                                                             gint height,
                                                                             gint baseline)
{
	TubaDialogsComposerComponentsEditorPlaceholderHack * self;
	GtkLabel* _tmp0_;
	self = (TubaDialogsComposerComponentsEditorPlaceholderHack*) base;
	_tmp0_ = self->priv->label;
	gtk_widget_allocate ((GtkWidget*) _tmp0_, 500, height, baseline, NULL);
}

static void
tuba_dialogs_composer_components_editor_placeholder_hack_real_dispose (GObject* base)
{
	TubaDialogsComposerComponentsEditorPlaceholderHack * self;
	GtkLabel* _tmp0_;
	self = (TubaDialogsComposerComponentsEditorPlaceholderHack*) base;
	_tmp0_ = self->priv->label;
	gtk_widget_unparent ((GtkWidget*) _tmp0_);
	_g_object_unref0 (self->priv->label);
	self->priv->label = NULL;
	G_OBJECT_CLASS (tuba_dialogs_composer_components_editor_placeholder_hack_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
}

static void
tuba_dialogs_composer_components_editor_placeholder_hack_class_init (TubaDialogsComposerComponentsEditorPlaceholderHackClass * klass,
                                                                     gpointer klass_data)
{
	tuba_dialogs_composer_components_editor_placeholder_hack_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerComponentsEditorPlaceholderHack_private_offset);
	((GtkWidgetClass *) klass)->get_request_mode = (GtkSizeRequestMode (*) (GtkWidget*)) tuba_dialogs_composer_components_editor_placeholder_hack_real_get_request_mode;
	((GtkWidgetClass *) klass)->measure = (void (*) (GtkWidget*, GtkOrientation, gint, gint*, gint*, gint*, gint*)) tuba_dialogs_composer_components_editor_placeholder_hack_real_measure;
	((GtkWidgetClass *) klass)->size_allocate = (void (*) (GtkWidget*, gint, gint, gint)) tuba_dialogs_composer_components_editor_placeholder_hack_real_size_allocate;
	((GObjectClass *) klass)->dispose = (void (*) (GObject*)) tuba_dialogs_composer_components_editor_placeholder_hack_real_dispose;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_components_editor_placeholder_hack_finalize;
	gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (klass), GTK_ACCESSIBLE_ROLE_PRESENTATION);
}

static void
tuba_dialogs_composer_components_editor_placeholder_hack_instance_init (TubaDialogsComposerComponentsEditorPlaceholderHack * self,
                                                                        gpointer klass)
{
	self->priv = tuba_dialogs_composer_components_editor_placeholder_hack_get_instance_private (self);
}

static void
tuba_dialogs_composer_components_editor_placeholder_hack_finalize (GObject * obj)
{
	TubaDialogsComposerComponentsEditorPlaceholderHack * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_TYPE_PLACEHOLDER_HACK, TubaDialogsComposerComponentsEditorPlaceholderHack);
	g_debug ("Editor.vala:47: Destroying Composer PlaceholderHack");
	_g_object_unref0 (self->priv->label);
	G_OBJECT_CLASS (tuba_dialogs_composer_components_editor_placeholder_hack_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_components_editor_placeholder_hack_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerComponentsEditorPlaceholderHackClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_components_editor_placeholder_hack_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerComponentsEditorPlaceholderHack), 0, (GInstanceInitFunc) tuba_dialogs_composer_components_editor_placeholder_hack_instance_init, NULL };
	GType tuba_dialogs_composer_components_editor_placeholder_hack_type_id;
	tuba_dialogs_composer_components_editor_placeholder_hack_type_id = g_type_register_static (gtk_widget_get_type (), "TubaDialogsComposerComponentsEditorPlaceholderHack", &g_define_type_info, G_TYPE_FLAG_NONE);
	TubaDialogsComposerComponentsEditorPlaceholderHack_private_offset = g_type_add_instance_private (tuba_dialogs_composer_components_editor_placeholder_hack_type_id, sizeof (TubaDialogsComposerComponentsEditorPlaceholderHackPrivate));
	return tuba_dialogs_composer_components_editor_placeholder_hack_type_id;
}

GType
tuba_dialogs_composer_components_editor_placeholder_hack_get_type (void)
{
	static GType tuba_dialogs_composer_components_editor_placeholder_hack_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_components_editor_placeholder_hack_type_id__once)) {
		GType tuba_dialogs_composer_components_editor_placeholder_hack_type_id;
		tuba_dialogs_composer_components_editor_placeholder_hack_type_id = tuba_dialogs_composer_components_editor_placeholder_hack_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_components_editor_placeholder_hack_type_id__once, tuba_dialogs_composer_components_editor_placeholder_hack_type_id);
	}
	return tuba_dialogs_composer_components_editor_placeholder_hack_type_id__once;
}

static void
_tuba_dialogs_composer_components_editor_update_spelling_settings_g_object_notify (GObject* _sender,
                                                                                   GParamSpec* pspec,
                                                                                   gpointer self)
{
	tuba_dialogs_composer_components_editor_update_spelling_settings ((TubaDialogsComposerComponentsEditor*) self);
}

static gboolean
_tuba_dialogs_composer_components_editor_on_keypress_gtk_event_controller_key_key_pressed (GtkEventControllerKey* _sender,
                                                                                           guint keyval,
                                                                                           guint keycode,
                                                                                           GdkModifierType state,
                                                                                           gpointer self)
{
	gboolean result;
	result = tuba_dialogs_composer_components_editor_on_keypress ((TubaDialogsComposerComponentsEditor*) self, keyval, keycode, state);
	return result;
}

static void
_tuba_dialogs_composer_components_editor_update_style_scheme_g_object_notify (GObject* _sender,
                                                                              GParamSpec* pspec,
                                                                              gpointer self)
{
	tuba_dialogs_composer_components_editor_update_style_scheme ((TubaDialogsComposerComponentsEditor*) self);
}

static void
_tuba_dialogs_composer_components_editor_on_paste_gtk_text_buffer_paste_done (GtkTextBuffer* _sender,
                                                                              GdkClipboard* clipboard,
                                                                              gpointer self)
{
	tuba_dialogs_composer_components_editor_on_paste ((TubaDialogsComposerComponentsEditor*) self, clipboard);
}

static void
_tuba_dialogs_composer_components_editor_on_content_changed_gtk_text_buffer_changed (GtkTextBuffer* _sender,
                                                                                     gpointer self)
{
	tuba_dialogs_composer_components_editor_on_content_changed ((TubaDialogsComposerComponentsEditor*) self);
}

static GObject *
tuba_dialogs_composer_components_editor_constructor (GType type,
                                                     guint n_construct_properties,
                                                     GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	TubaDialogsComposerComponentsEditor * self;
	GtkSourceLanguageManager* _tmp0_;
	GtkTextBuffer* _tmp1_;
	GtkTextBuffer* _tmp2_;
	SpellingChecker* _tmp3_;
	SpellingTextBufferAdapter* _tmp4_;
	SpellingChecker* _tmp5_;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	const gchar* _tmp9_;
	SpellingTextBufferAdapter* _tmp16_;
	GMenuModel* _tmp17_;
	SpellingTextBufferAdapter* _tmp18_;
	SpellingTextBufferAdapter* _tmp19_;
	TubaSettings* _tmp20_;
	gboolean _tmp21_;
	gboolean _tmp22_;
	SpellingTextBufferAdapter* _tmp23_;
	GtkEventControllerKey* keypress_controller = NULL;
	GtkEventControllerKey* _tmp24_;
	GtkEventControllerKey* _tmp25_;
	GtkEventControllerKey* _tmp26_;
	GtkEventController* _tmp27_;
	GtkSourceCompletion* _tmp28_;
	GtkSourceCompletion* _tmp29_;
	TubaHandleProvider* _tmp30_;
	TubaHandleProvider* _tmp31_;
	GtkSourceCompletion* _tmp32_;
	GtkSourceCompletion* _tmp33_;
	TubaHashtagProvider* _tmp34_;
	TubaHashtagProvider* _tmp35_;
	GtkSourceCompletion* _tmp36_;
	GtkSourceCompletion* _tmp37_;
	TubaEmojiProvider* _tmp38_;
	TubaEmojiProvider* _tmp39_;
	GtkSourceCompletion* _tmp40_;
	GtkSourceCompletion* _tmp41_;
	GtkSourceCompletion* _tmp42_;
	GtkSourceCompletion* _tmp43_;
	GtkSourceCompletion* _tmp44_;
	GtkSourceCompletion* _tmp45_;
	GtkTextBuffer* _tmp46_;
	GtkTextBuffer* _tmp47_;
	GtkTextBuffer* _tmp48_;
	GtkTextBuffer* _tmp49_;
	AdwStyleManager* adw_manager = NULL;
	AdwStyleManager* _tmp50_;
	AdwStyleManager* _tmp51_;
	AdwStyleManager* _tmp52_;
	AdwStyleManager* _tmp53_;
	GtkTextBuffer* _tmp54_;
	GtkTextBuffer* _tmp55_;
	GtkTextBuffer* _tmp56_;
	GtkTextBuffer* _tmp57_;
	gchar* _tmp58_;
	gchar** _tmp59_;
	GtkBox* _tmp60_ = NULL;
	gchar* _tmp61_;
	gchar** _tmp62_;
	GtkLabel* _tmp63_ = NULL;
	GtkBox* _tmp64_;
	GtkLabel* _tmp65_;
	GtkBox* _tmp66_;
	GtkAlign _tmp67_ = 0;
	gchar* _tmp68_;
	gchar** _tmp69_;
	GtkLabel* _tmp70_ = NULL;
	GtkLabel* _tmp71_;
	TubaDialogsComposerComponentsEditorPlaceholderHack* _tmp72_;
	TubaDialogsComposerComponentsEditorPlaceholderHack* _tmp73_;
	GtkWidget* view_child = NULL;
	TubaDialogsComposerComponentsEditorPlaceholderHack* _tmp74_;
	GtkWidget* _tmp75_;
	GtkWidget* _tmp76_;
	parent_class = G_OBJECT_CLASS (tuba_dialogs_composer_components_editor_parent_class);
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditor);
	_tmp0_ = gtk_source_language_manager_new ();
	_g_object_unref0 (self->priv->lang_manager);
	self->priv->lang_manager = _tmp0_;
	gtk_widget_set_overflow ((GtkWidget*) self, GTK_OVERFLOW_VISIBLE);
	gtk_widget_set_vexpand ((GtkWidget*) self, TRUE);
	gtk_widget_set_hexpand ((GtkWidget*) self, TRUE);
	gtk_text_view_set_right_margin ((GtkTextView*) self, 6);
	gtk_text_view_set_left_margin ((GtkTextView*) self, 6);
	gtk_text_view_set_accepts_tab ((GtkTextView*) self, FALSE);
	gtk_text_view_set_wrap_mode ((GtkTextView*) self, GTK_WRAP_WORD_CHAR);
	gtk_source_view_set_tab_width ((GtkSourceView*) self, (guint) 1);
	gtk_text_view_set_input_hints ((GtkTextView*) self, (GTK_INPUT_HINT_WORD_COMPLETION | GTK_INPUT_HINT_SPELLCHECK) | GTK_INPUT_HINT_EMOJI);
	gtk_widget_remove_css_class ((GtkWidget*) self, "view");
	gtk_widget_add_css_class ((GtkWidget*) self, "font-large");
	gtk_widget_add_css_class ((GtkWidget*) self, "reset");
	_tmp1_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp2_ = _tmp1_;
	_tmp3_ = spelling_checker_get_default ();
	_tmp4_ = spelling_text_buffer_adapter_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, gtk_source_buffer_get_type (), GtkSourceBuffer), _tmp3_);
	_g_object_unref0 (self->adapter);
	self->adapter = _tmp4_;
	_tmp5_ = spelling_checker_get_default ();
	_tmp6_ = spelling_checker_get_language (_tmp5_);
	_tmp7_ = _tmp6_;
	_tmp8_ = g_strdup (_tmp7_);
	_g_free0 (self->priv->original_libspelling_lang);
	self->priv->original_libspelling_lang = _tmp8_;
	_tmp9_ = self->priv->original_libspelling_lang;
	if (_tmp9_ != NULL) {
		const gchar* _tmp10_;
		gchar** _tmp11_;
		gchar** _tmp12_;
		gchar** _tmp13_;
		gint _tmp13__length1;
		const gchar* _tmp14_;
		gchar* _tmp15_;
		_tmp10_ = self->priv->original_libspelling_lang;
		_tmp12_ = _tmp11_ = g_strsplit_set (_tmp10_, "-_", 2);
		_tmp13_ = _tmp12_;
		_tmp13__length1 = _vala_array_length (_tmp11_);
		_tmp14_ = _tmp13_[0];
		_tmp15_ = g_strdup (_tmp14_);
		_g_free0 (self->priv->original_libspelling_lang_iso639);
		self->priv->original_libspelling_lang_iso639 = _tmp15_;
		_tmp13_ = (_vala_array_free (_tmp13_, _tmp13__length1, (GDestroyNotify) g_free), NULL);
	}
	_tmp16_ = self->adapter;
	_tmp17_ = spelling_text_buffer_adapter_get_menu_model (_tmp16_);
	gtk_text_view_set_extra_menu ((GtkTextView*) self, _tmp17_);
	_tmp18_ = self->adapter;
	gtk_widget_insert_action_group ((GtkWidget*) self, "spelling", (GActionGroup*) _tmp18_);
	_tmp19_ = self->adapter;
	_tmp20_ = tuba_settings;
	_tmp21_ = tuba_settings_get_spellchecker_enabled (_tmp20_);
	_tmp22_ = _tmp21_;
	spelling_text_buffer_adapter_set_enabled (_tmp19_, _tmp22_);
	_tmp23_ = self->adapter;
	g_signal_connect_object ((GObject*) _tmp23_, "notify::enabled", (GCallback) _tuba_dialogs_composer_components_editor_update_spelling_settings_g_object_notify, self, 0);
	_tmp24_ = (GtkEventControllerKey*) gtk_event_controller_key_new ();
	keypress_controller = _tmp24_;
	_tmp25_ = keypress_controller;
	g_signal_connect_object (_tmp25_, "key-pressed", (GCallback) _tuba_dialogs_composer_components_editor_on_keypress_gtk_event_controller_key_key_pressed, self, 0);
	_tmp26_ = keypress_controller;
	_tmp27_ = _g_object_ref0 ((GtkEventController*) _tmp26_);
	gtk_widget_add_controller ((GtkWidget*) self, _tmp27_);
	_tmp28_ = gtk_source_view_get_completion ((GtkSourceView*) self);
	_tmp29_ = _tmp28_;
	_tmp30_ = tuba_handle_provider_new ();
	_tmp31_ = _tmp30_;
	gtk_source_completion_add_provider (_tmp29_, (GtkSourceCompletionProvider*) _tmp31_);
	_g_object_unref0 (_tmp31_);
	_tmp32_ = gtk_source_view_get_completion ((GtkSourceView*) self);
	_tmp33_ = _tmp32_;
	_tmp34_ = tuba_hashtag_provider_new ();
	_tmp35_ = _tmp34_;
	gtk_source_completion_add_provider (_tmp33_, (GtkSourceCompletionProvider*) _tmp35_);
	_g_object_unref0 (_tmp35_);
	_tmp36_ = gtk_source_view_get_completion ((GtkSourceView*) self);
	_tmp37_ = _tmp36_;
	_tmp38_ = tuba_emoji_provider_new ();
	_tmp39_ = _tmp38_;
	gtk_source_completion_add_provider (_tmp37_, (GtkSourceCompletionProvider*) _tmp39_);
	_g_object_unref0 (_tmp39_);
	_tmp40_ = gtk_source_view_get_completion ((GtkSourceView*) self);
	_tmp41_ = _tmp40_;
	g_object_set (_tmp41_, "select-on-show", TRUE, NULL);
	_tmp42_ = gtk_source_view_get_completion ((GtkSourceView*) self);
	_tmp43_ = _tmp42_;
	g_object_set (_tmp43_, "show-icons", TRUE, NULL);
	_tmp44_ = gtk_source_view_get_completion ((GtkSourceView*) self);
	_tmp45_ = _tmp44_;
	gtk_source_completion_set_page_size (_tmp45_, (guint) 3);
	_tmp46_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp47_ = _tmp46_;
	gtk_source_buffer_set_highlight_matching_brackets (G_TYPE_CHECK_INSTANCE_CAST (_tmp47_, gtk_source_buffer_get_type (), GtkSourceBuffer), TRUE);
	_tmp48_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp49_ = _tmp48_;
	gtk_source_buffer_set_highlight_syntax (G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, gtk_source_buffer_get_type (), GtkSourceBuffer), TRUE);
	_tmp50_ = adw_style_manager_get_default ();
	_tmp51_ = _g_object_ref0 (_tmp50_);
	adw_manager = _tmp51_;
	_tmp52_ = adw_manager;
	g_signal_connect_object ((GObject*) _tmp52_, "notify::dark", (GCallback) _tuba_dialogs_composer_components_editor_update_style_scheme_g_object_notify, self, 0);
	_tmp53_ = adw_manager;
	g_signal_connect_object ((GObject*) _tmp53_, "notify::accent-color-rgba", (GCallback) _tuba_dialogs_composer_components_editor_update_style_scheme_g_object_notify, self, 0);
	tuba_dialogs_composer_components_editor_update_style_scheme (self);
	tuba_dialogs_composer_components_editor_update_language_highlight (self);
	_tmp54_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp55_ = _tmp54_;
	g_signal_connect_object (_tmp55_, "paste-done", (GCallback) _tuba_dialogs_composer_components_editor_on_paste_gtk_text_buffer_paste_done, self, 0);
	_tmp56_ = gtk_text_view_get_buffer ((GtkTextView*) self);
	_tmp57_ = _tmp56_;
	g_signal_connect_object (_tmp57_, "changed", (GCallback) _tuba_dialogs_composer_components_editor_on_content_changed_gtk_text_buffer_changed, self, 0);
	_tmp58_ = g_strdup ("background-none");
	_tmp59_ = g_new0 (gchar*, 1 + 1);
	_tmp59_[0] = _tmp58_;
	_tmp60_ = (GtkBox*) gtk_box_new (GTK_ORIENTATION_VERTICAL, 30);
	gtk_widget_set_valign ((GtkWidget*) _tmp60_, GTK_ALIGN_START);
	gtk_widget_set_vexpand ((GtkWidget*) _tmp60_, TRUE);
	gtk_widget_set_margin_bottom ((GtkWidget*) _tmp60_, 28);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp60_, _tmp59_);
	_tmp59_ = (_vala_array_free (_tmp59_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp60_);
	_g_object_unref0 (self->priv->status_box);
	self->priv->status_box = _tmp60_;
	_tmp61_ = g_strdup ("title-2");
	_tmp62_ = g_new0 (gchar*, 1 + 1);
	_tmp62_[0] = _tmp61_;
	_tmp63_ = (GtkLabel*) gtk_label_new (_ ("New Post"));
	gtk_label_set_wrap (_tmp63_, TRUE);
	gtk_label_set_wrap_mode (_tmp63_, PANGO_WRAP_WORD_CHAR);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp63_, _tmp62_);
	_tmp62_ = (_vala_array_free (_tmp62_, 1, (GDestroyNotify) g_free), NULL);
	gtk_label_set_justify (_tmp63_, GTK_JUSTIFY_CENTER);
	gtk_label_set_ellipsize (_tmp63_, PANGO_ELLIPSIZE_END);
	gtk_label_set_lines (_tmp63_, 3);
	g_object_set ((GtkAccessible*) _tmp63_, "accessible-role", GTK_ACCESSIBLE_ROLE_PRESENTATION, NULL);
	g_object_ref_sink (_tmp63_);
	_g_object_unref0 (self->status_title);
	self->status_title = _tmp63_;
	_tmp64_ = self->priv->status_box;
	_tmp65_ = self->status_title;
	gtk_box_append (_tmp64_, (GtkWidget*) _tmp65_);
	_tmp66_ = self->priv->status_box;
	tuba_widgets_sandwich_source_view_add_top_child ((TubaWidgetsSandwichSourceView*) self, (GtkWidget*) _tmp66_);
	if (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) {
		_tmp67_ = GTK_ALIGN_END;
	} else {
		_tmp67_ = GTK_ALIGN_START;
	}
	_tmp68_ = g_strdup ("font-large");
	_tmp69_ = g_new0 (gchar*, 1 + 1);
	_tmp69_[0] = _tmp68_;
	_tmp70_ = (GtkLabel*) gtk_label_new (_ ("What's on your mind?"));
	gtk_widget_set_valign ((GtkWidget*) _tmp70_, GTK_ALIGN_START);
	gtk_widget_set_halign ((GtkWidget*) _tmp70_, _tmp67_);
	gtk_label_set_justify (_tmp70_, GTK_JUSTIFY_FILL);
	gtk_widget_set_margin_start ((GtkWidget*) _tmp70_, 8);
	gtk_widget_set_margin_end ((GtkWidget*) _tmp70_, 8);
	gtk_label_set_wrap (_tmp70_, TRUE);
	gtk_label_set_wrap_mode (_tmp70_, PANGO_WRAP_WORD_CHAR);
	gtk_widget_set_sensitive ((GtkWidget*) _tmp70_, FALSE);
	gtk_widget_set_css_classes ((GtkWidget*) _tmp70_, _tmp69_);
	_tmp69_ = (_vala_array_free (_tmp69_, 1, (GDestroyNotify) g_free), NULL);
	g_object_ref_sink (_tmp70_);
	_tmp71_ = _tmp70_;
	_tmp72_ = tuba_dialogs_composer_components_editor_placeholder_hack_new (_tmp71_);
	g_object_ref_sink (_tmp72_);
	_g_object_unref0 (self->placeholder);
	self->placeholder = _tmp72_;
	_g_object_unref0 (_tmp71_);
	_tmp73_ = self->placeholder;
	gtk_text_view_add_overlay ((GtkTextView*) self, (GtkWidget*) _tmp73_, 0, 0);
	gtk_accessible_update_property ((GtkAccessible*) self, GTK_ACCESSIBLE_PROPERTY_PLACEHOLDER, _ ("What's on your mind?"), -1, -1);
	_tmp74_ = self->placeholder;
	_tmp75_ = gtk_widget_get_parent ((GtkWidget*) _tmp74_);
	view_child = _tmp75_;
	_tmp76_ = view_child;
	if (_tmp76_ != NULL) {
		GtkWidget* _tmp77_;
		GtkWidget* _tmp78_;
		_tmp77_ = view_child;
		_tmp78_ = view_child;
		gtk_widget_set_can_focus (_tmp78_, FALSE);
		gtk_widget_set_can_target (_tmp77_, FALSE);
	}
	_g_object_unref0 (adw_manager);
	_g_object_unref0 (keypress_controller);
	return obj;
}

static void
tuba_dialogs_composer_components_editor_class_init (TubaDialogsComposerComponentsEditorClass * klass,
                                                    gpointer klass_data)
{
	tuba_dialogs_composer_components_editor_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &TubaDialogsComposerComponentsEditor_private_offset);
	((TubaWidgetsSandwichSourceViewClass *) klass)->add_bottom_child = (void (*) (TubaWidgetsSandwichSourceView*, GtkWidget*, gboolean)) tuba_dialogs_composer_components_editor_real_add_bottom_child;
	((TubaWidgetsSandwichSourceViewClass *) klass)->clear_child_widget = (void (*) (TubaWidgetsSandwichSourceView*, GtkWidget*)) tuba_dialogs_composer_components_editor_real_clear_child_widget;
	((TubaWidgetsSandwichSourceViewClass *) klass)->setup_child_widget = (void (*) (TubaWidgetsSandwichSourceView*, GtkWidget*)) tuba_dialogs_composer_components_editor_real_setup_child_widget;
	((GtkWidgetClass *) klass)->measure = (void (*) (GtkWidget*, GtkOrientation, gint, gint*, gint*, gint*, gint*)) tuba_dialogs_composer_components_editor_real_measure;
	G_OBJECT_CLASS (klass)->get_property = _vala_tuba_dialogs_composer_components_editor_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_tuba_dialogs_composer_components_editor_set_property;
	G_OBJECT_CLASS (klass)->constructor = tuba_dialogs_composer_components_editor_constructor;
	G_OBJECT_CLASS (klass)->finalize = tuba_dialogs_composer_components_editor_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_EDIT_MODE_PROPERTY, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_EDIT_MODE_PROPERTY] = g_param_spec_boolean ("edit-mode", "edit-mode", "edit-mode", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_LOCALE_PROPERTY, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_LOCALE_PROPERTY] = g_param_spec_string ("locale", "locale", "locale", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_TYPE_PROPERTY, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_TYPE_PROPERTY] = g_param_spec_string ("content-type", "content-type", "content-type", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CHAR_COUNT_PROPERTY, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CHAR_COUNT_PROPERTY] = g_param_spec_int64 ("char-count", "char-count", "char-count", G_MININT64, G_MAXINT64, (gint64) 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_PROPERTY, tuba_dialogs_composer_components_editor_properties[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_PROPERTY] = g_param_spec_string ("content", "content", "content", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	tuba_dialogs_composer_components_editor_signals[TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CTRL_RETURN_PRESSED_SIGNAL] = g_signal_new ("ctrl-return-pressed", TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
	gtk_widget_class_set_accessible_role (GTK_WIDGET_CLASS (klass), GTK_ACCESSIBLE_ROLE_GROUP);
}

static void
tuba_dialogs_composer_components_editor_tuba_dialogs_composer_components_attachable_interface_init (TubaDialogsComposerComponentsAttachableIface * iface,
                                                                                                    gpointer iface_data)
{
	tuba_dialogs_composer_components_editor_tuba_dialogs_composer_components_attachable_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_edit_mode = tuba_dialogs_composer_components_editor_real_get_edit_mode;
	iface->set_edit_mode = tuba_dialogs_composer_components_editor_real_set_edit_mode;
}

static void
tuba_dialogs_composer_components_editor_instance_init (TubaDialogsComposerComponentsEditor * self,
                                                       gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = tuba_dialogs_composer_components_editor_get_instance_private (self);
	self->priv->_edit_mode = FALSE;
	_tmp0_ = g_strdup ("en");
	self->priv->_locale = _tmp0_;
	_tmp1_ = g_strdup ("fedi-basic");
	self->priv->_content_type = _tmp1_;
	self->priv->_char_count = (gint64) 0;
	self->priv->original_libspelling_lang = NULL;
	self->priv->original_libspelling_lang_iso639 = NULL;
}

static void
tuba_dialogs_composer_components_editor_finalize (GObject * obj)
{
	TubaDialogsComposerComponentsEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditor);
	g_debug ("Editor.vala:6: Destroying Composer Editor");
	_g_free0 (self->priv->_locale);
	_g_free0 (self->priv->_content_type);
	_g_object_unref0 (self->status_title);
	_g_object_unref0 (self->placeholder);
	_g_object_unref0 (self->adapter);
	_g_free0 (self->priv->original_libspelling_lang);
	_g_free0 (self->priv->original_libspelling_lang_iso639);
	_g_object_unref0 (self->priv->lang_manager);
	_g_object_unref0 (self->priv->status_box);
	G_OBJECT_CLASS (tuba_dialogs_composer_components_editor_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
tuba_dialogs_composer_components_editor_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (TubaDialogsComposerComponentsEditorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tuba_dialogs_composer_components_editor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TubaDialogsComposerComponentsEditor), 0, (GInstanceInitFunc) tuba_dialogs_composer_components_editor_instance_init, NULL };
	static const GInterfaceInfo tuba_dialogs_composer_components_attachable_info = { (GInterfaceInitFunc) tuba_dialogs_composer_components_editor_tuba_dialogs_composer_components_attachable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType tuba_dialogs_composer_components_editor_type_id;
	tuba_dialogs_composer_components_editor_type_id = g_type_register_static (TUBA_WIDGETS_TYPE_SANDWICH_SOURCE_VIEW, "TubaDialogsComposerComponentsEditor", &g_define_type_info, G_TYPE_FLAG_NONE);
	g_type_add_interface_static (tuba_dialogs_composer_components_editor_type_id, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_ATTACHABLE, &tuba_dialogs_composer_components_attachable_info);
	TubaDialogsComposerComponentsEditor_private_offset = g_type_add_instance_private (tuba_dialogs_composer_components_editor_type_id, sizeof (TubaDialogsComposerComponentsEditorPrivate));
	return tuba_dialogs_composer_components_editor_type_id;
}

GType
tuba_dialogs_composer_components_editor_get_type (void)
{
	static GType tuba_dialogs_composer_components_editor_type_id__once = 0;
	if (g_once_init_enter_pointer (&tuba_dialogs_composer_components_editor_type_id__once)) {
		GType tuba_dialogs_composer_components_editor_type_id;
		tuba_dialogs_composer_components_editor_type_id = tuba_dialogs_composer_components_editor_get_type_once ();
		g_once_init_leave_pointer (&tuba_dialogs_composer_components_editor_type_id__once, tuba_dialogs_composer_components_editor_type_id);
	}
	return tuba_dialogs_composer_components_editor_type_id__once;
}

static void
_vala_tuba_dialogs_composer_components_editor_get_property (GObject * object,
                                                            guint property_id,
                                                            GValue * value,
                                                            GParamSpec * pspec)
{
	TubaDialogsComposerComponentsEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditor);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_EDIT_MODE_PROPERTY:
		g_value_set_boolean (value, tuba_dialogs_composer_components_attachable_get_edit_mode ((TubaDialogsComposerComponentsAttachable*) self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_LOCALE_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_components_editor_get_locale (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_TYPE_PROPERTY:
		g_value_set_string (value, tuba_dialogs_composer_components_editor_get_content_type (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CHAR_COUNT_PROPERTY:
		g_value_set_int64 (value, tuba_dialogs_composer_components_editor_get_char_count (self));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_PROPERTY:
		g_value_take_string (value, tuba_dialogs_composer_components_editor_get_content (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_tuba_dialogs_composer_components_editor_set_property (GObject * object,
                                                            guint property_id,
                                                            const GValue * value,
                                                            GParamSpec * pspec)
{
	TubaDialogsComposerComponentsEditor * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TUBA_DIALOGS_COMPOSER_COMPONENTS_TYPE_EDITOR, TubaDialogsComposerComponentsEditor);
	switch (property_id) {
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_EDIT_MODE_PROPERTY:
		tuba_dialogs_composer_components_attachable_set_edit_mode ((TubaDialogsComposerComponentsAttachable*) self, g_value_get_boolean (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_LOCALE_PROPERTY:
		tuba_dialogs_composer_components_editor_set_locale (self, g_value_get_string (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_TYPE_PROPERTY:
		tuba_dialogs_composer_components_editor_set_content_type (self, g_value_get_string (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CHAR_COUNT_PROPERTY:
		tuba_dialogs_composer_components_editor_set_char_count (self, g_value_get_int64 (value));
		break;
		case TUBA_DIALOGS_COMPOSER_COMPONENTS_EDITOR_CONTENT_PROPERTY:
		tuba_dialogs_composer_components_editor_set_content (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

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

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

static gssize
_vala_array_length (gpointer array)
{
	gssize length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}

