/* baseWidget.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from baseWidget.vala, do not modify */

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <json-glib/json-glib.h>
#include <gio/gio.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 SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET (sway_notification_center_widgets_base_widget_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidgetClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidgetClass))

typedef struct _SwayNotificationCenterWidgetsBaseWidget SwayNotificationCenterWidgetsBaseWidget;
typedef struct _SwayNotificationCenterWidgetsBaseWidgetClass SwayNotificationCenterWidgetsBaseWidgetClass;
typedef struct _SwayNotificationCenterWidgetsBaseWidgetPrivate SwayNotificationCenterWidgetsBaseWidgetPrivate;
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_WIDGET_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CSS_CLASS_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_KEY_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_SUFFIX_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_widgets_base_widget_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_NUM_PROPERTIES];
typedef enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_TOGGLE,
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_NORMAL
} SwayNotificationCenterWidgetsBaseWidgetButtonType;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_TYPE_BUTTON_TYPE (sway_notification_center_widgets_base_widget_button_type_get_type ())
#define _g_free0(var) (var = (g_free (var), NULL))

#define SWAY_NOTIFICATION_CENTER_TYPE_ORDERED_HASH_TABLE (sway_notification_center_ordered_hash_table_get_type ())
#define SWAY_NOTIFICATION_CENTER_ORDERED_HASH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_TYPE_ORDERED_HASH_TABLE, SwayNotificationCenterOrderedHashTable))
#define SWAY_NOTIFICATION_CENTER_ORDERED_HASH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_TYPE_ORDERED_HASH_TABLE, SwayNotificationCenterOrderedHashTableClass))
#define SWAY_NOTIFICATION_CENTER_IS_ORDERED_HASH_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_TYPE_ORDERED_HASH_TABLE))
#define SWAY_NOTIFICATION_CENTER_IS_ORDERED_HASH_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_TYPE_ORDERED_HASH_TABLE))
#define SWAY_NOTIFICATION_CENTER_ORDERED_HASH_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_TYPE_ORDERED_HASH_TABLE, SwayNotificationCenterOrderedHashTableClass))

typedef struct _SwayNotificationCenterOrderedHashTable SwayNotificationCenterOrderedHashTable;
typedef struct _SwayNotificationCenterOrderedHashTableClass SwayNotificationCenterOrderedHashTableClass;

#define SWAY_NOTIFICATION_CENTER_TYPE_CONFIG_MODEL (sway_notification_center_config_model_get_type ())
#define SWAY_NOTIFICATION_CENTER_CONFIG_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_TYPE_CONFIG_MODEL, SwayNotificationCenterConfigModel))
#define SWAY_NOTIFICATION_CENTER_CONFIG_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_TYPE_CONFIG_MODEL, SwayNotificationCenterConfigModelClass))
#define SWAY_NOTIFICATION_CENTER_IS_CONFIG_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_TYPE_CONFIG_MODEL))
#define SWAY_NOTIFICATION_CENTER_IS_CONFIG_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_TYPE_CONFIG_MODEL))
#define SWAY_NOTIFICATION_CENTER_CONFIG_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_TYPE_CONFIG_MODEL, SwayNotificationCenterConfigModelClass))

typedef struct _SwayNotificationCenterConfigModel SwayNotificationCenterConfigModel;
typedef struct _SwayNotificationCenterConfigModelClass SwayNotificationCenterConfigModelClass;
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#define __vala_JsonNode_free0(var) ((var == NULL) ? NULL : (var = (_vala_JsonNode_free (var), NULL)))

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_ACTION (sway_notification_center_widgets_action_get_type ())
typedef struct _SwayNotificationCenterWidgetsAction SwayNotificationCenterWidgetsAction;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData;

struct _SwayNotificationCenterWidgetsBaseWidget {
	GtkBox parent_instance;
	SwayNotificationCenterWidgetsBaseWidgetPrivate * priv;
};

struct _SwayNotificationCenterWidgetsBaseWidgetClass {
	GtkBoxClass parent_class;
	void (*on_cc_visibility_change) (SwayNotificationCenterWidgetsBaseWidget* self, gboolean value);
	const gchar* (*get_widget_name) (SwayNotificationCenterWidgetsBaseWidget* self);
};

struct _SwayNotificationCenterWidgetsBaseWidgetPrivate {
	gchar* _key;
	gchar* _suffix;
};

struct _SwayNotificationCenterWidgetsAction {
	gchar* label;
	gchar* command;
	SwayNotificationCenterWidgetsBaseWidgetButtonType* type;
	gchar* update_command;
	gboolean* active;
};

struct _SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	SwayNotificationCenterWidgetsBaseWidget* self;
	gchar* cmd;
	gchar** env_additions;
	gint env_additions_length1;
	gchar* msg;
	gchar* _tmp0_;
	gchar* _tmp1_;
};

static gint SwayNotificationCenterWidgetsBaseWidget_private_offset;
static gpointer sway_notification_center_widgets_base_widget_parent_class = NULL;

VALA_EXTERN GType sway_notification_center_widgets_base_widget_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsBaseWidget, g_object_unref)
VALA_EXTERN void sway_notification_center_widgets_base_widget_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                           gboolean value);
VALA_EXTERN GType sway_notification_center_widgets_base_widget_button_type_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterWidgetsBaseWidgetButtonType sway_notification_center_widgets_base_widget_button_type_parse (const gchar* value);
VALA_EXTERN SwayNotificationCenterWidgetsBaseWidget* sway_notification_center_widgets_base_widget_construct (GType object_type,
                                                                                                 const gchar* suffix);
static void sway_notification_center_widgets_base_widget_set_suffix (SwayNotificationCenterWidgetsBaseWidget* self,
                                                              const gchar* value);
VALA_EXTERN const gchar* sway_notification_center_widgets_base_widget_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* self);
static void sway_notification_center_widgets_base_widget_set_key (SwayNotificationCenterWidgetsBaseWidget* self,
                                                           const gchar* value);
VALA_EXTERN gchar* sway_notification_center_widgets_base_widget_get_css_class_name (SwayNotificationCenterWidgetsBaseWidget* self);
VALA_EXTERN JsonObject* sway_notification_center_widgets_base_widget_get_config (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                     GtkWidget* widget);
VALA_EXTERN gpointer sway_notification_center_ordered_hash_table_ref (gpointer instance);
VALA_EXTERN void sway_notification_center_ordered_hash_table_unref (gpointer instance);
VALA_EXTERN GParamSpec* sway_notification_center_param_spec_ordered_hash_table (const gchar* name,
                                                                    const gchar* nick,
                                                                    const gchar* blurb,
                                                                    GType object_type,
                                                                    GParamFlags flags);
VALA_EXTERN void sway_notification_center_value_set_ordered_hash_table (GValue* value,
                                                            gpointer v_object);
VALA_EXTERN void sway_notification_center_value_take_ordered_hash_table (GValue* value,
                                                             gpointer v_object);
VALA_EXTERN gpointer sway_notification_center_value_get_ordered_hash_table (const GValue* value);
VALA_EXTERN GType sway_notification_center_ordered_hash_table_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterOrderedHashTable, sway_notification_center_ordered_hash_table_unref)
VALA_EXTERN GType sway_notification_center_config_model_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterConfigModel, g_object_unref)
VALA_EXTERN SwayNotificationCenterConfigModel* sway_notification_center_config_model_get_instance (void);
VALA_EXTERN SwayNotificationCenterOrderedHashTable* sway_notification_center_config_model_get_widget_config (SwayNotificationCenterConfigModel* self);
VALA_EXTERN gboolean sway_notification_center_ordered_hash_table_lookup_extended (SwayNotificationCenterOrderedHashTable* self,
                                                                      const gchar* lookup_key,
                                                                      const gchar** orig_key,
                                                                      gconstpointer* value);
VALA_EXTERN const gchar* sway_notification_center_widgets_base_widget_get_key (SwayNotificationCenterWidgetsBaseWidget* self);
static void sway_notification_center_widgets_base_widget_real_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                                gboolean value);
VALA_EXTERN gpointer sway_notification_center_widgets_base_widget_get_prop (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                GType t_type,
                                                                GBoxedCopyFunc t_dup_func,
                                                                GDestroyNotify t_destroy_func,
                                                                JsonObject* config,
                                                                const gchar* value_key,
                                                                gboolean* found);
static JsonNode* _vala_JsonNode_copy (JsonNode* self);
VALA_EXTERN GType sway_notification_center_functions_get_base_type (GType type);
static void _vala_JsonNode_free (JsonNode* self);
VALA_EXTERN JsonArray* sway_notification_center_widgets_base_widget_get_prop_array (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                        JsonObject* config,
                                                                        const gchar* value_key);
VALA_EXTERN GType sway_notification_center_widgets_action_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterWidgetsAction* sway_notification_center_widgets_action_dup (const SwayNotificationCenterWidgetsAction* self);
VALA_EXTERN void sway_notification_center_widgets_action_free (SwayNotificationCenterWidgetsAction* self);
VALA_EXTERN void sway_notification_center_widgets_action_copy (const SwayNotificationCenterWidgetsAction* self,
                                                   SwayNotificationCenterWidgetsAction* dest);
VALA_EXTERN void sway_notification_center_widgets_action_destroy (SwayNotificationCenterWidgetsAction* self);
G_DEFINE_AUTO_CLEANUP_CLEAR_FUNC (SwayNotificationCenterWidgetsAction, sway_notification_center_widgets_action_destroy)
VALA_EXTERN SwayNotificationCenterWidgetsAction* sway_notification_center_widgets_base_widget_parse_actions (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                                                 JsonArray* actions,
                                                                                                 gint* result_length1);
static SwayNotificationCenterWidgetsBaseWidgetButtonType* _sway_notification_center_widgets_base_widget_button_type_dup (SwayNotificationCenterWidgetsBaseWidgetButtonType* self);
static gboolean* _bool_dup (gboolean* self);
static void sway_notification_center_widgets_base_widget_execute_command_data_free (gpointer _data);
VALA_EXTERN void sway_notification_center_widgets_base_widget_execute_command (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                   const gchar* cmd,
                                                                   gchar** env_additions,
                                                                   gint env_additions_length1,
                                                                   GAsyncReadyCallback _callback_,
                                                                   gpointer _user_data_);
VALA_EXTERN void sway_notification_center_widgets_base_widget_execute_command_finish (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                          GAsyncResult* _res_);
static gboolean sway_notification_center_widgets_base_widget_execute_command_co (SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData* _data_);
VALA_EXTERN void sway_notification_center_functions_execute_command (const gchar* cmd,
                                                         gchar** env_additions,
                                                         gint env_additions_length1,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_);
VALA_EXTERN gboolean sway_notification_center_functions_execute_command_finish (GAsyncResult* _res_,
                                                                    gchar** msg);
static void sway_notification_center_widgets_base_widget_execute_command_ready (GObject* source_object,
                                                                         GAsyncResult* _res_,
                                                                         gpointer _user_data_);
VALA_EXTERN const gchar* sway_notification_center_widgets_base_widget_get_suffix (SwayNotificationCenterWidgetsBaseWidget* self);
static void sway_notification_center_widgets_base_widget_finalize (GObject * obj);
static GType sway_notification_center_widgets_base_widget_get_type_once (void);
static void _vala_sway_notification_center_widgets_base_widget_get_property (GObject * object,
                                                                      guint property_id,
                                                                      GValue * value,
                                                                      GParamSpec * pspec);
static void _vala_sway_notification_center_widgets_base_widget_set_property (GObject * object,
                                                                      guint property_id,
                                                                      const GValue * value,
                                                                      GParamSpec * pspec);

static inline gpointer
sway_notification_center_widgets_base_widget_get_instance_private (SwayNotificationCenterWidgetsBaseWidget* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterWidgetsBaseWidget_private_offset);
}

SwayNotificationCenterWidgetsBaseWidgetButtonType
sway_notification_center_widgets_base_widget_button_type_parse (const gchar* value)
{
	const gchar* _tmp0_;
	GQuark _tmp2_ = 0U;
	static GQuark _tmp1_label0 = 0;
	SwayNotificationCenterWidgetsBaseWidgetButtonType result;
	g_return_val_if_fail (value != NULL, 0);
	_tmp0_ = value;
	_tmp2_ = (NULL == _tmp0_) ? 0 : g_quark_from_string (_tmp0_);
	if (_tmp2_ == ((0 != _tmp1_label0) ? _tmp1_label0 : (_tmp1_label0 = g_quark_from_static_string ("toggle")))) {
		switch (0) {
			default:
			{
				result = SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_TOGGLE;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				result = SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_NORMAL;
				return result;
			}
		}
	}
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_base_widget_button_type_get_type_once (void)
{
	static const GEnumValue values[] = {{SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_TOGGLE, "SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_TOGGLE", "toggle"}, {SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_NORMAL, "SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_BUTTON_TYPE_NORMAL", "normal"}, {0, NULL, NULL}};
	GType sway_notification_center_widgets_base_widget_button_type_type_id;
	sway_notification_center_widgets_base_widget_button_type_type_id = g_enum_register_static ("SwayNotificationCenterWidgetsBaseWidgetButtonType", values);
	return sway_notification_center_widgets_base_widget_button_type_type_id;
}

GType
sway_notification_center_widgets_base_widget_button_type_get_type (void)
{
	static gsize sway_notification_center_widgets_base_widget_button_type_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_base_widget_button_type_type_id__once)) {
		GType sway_notification_center_widgets_base_widget_button_type_type_id;
		sway_notification_center_widgets_base_widget_button_type_type_id = sway_notification_center_widgets_base_widget_button_type_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_base_widget_button_type_type_id__once, sway_notification_center_widgets_base_widget_button_type_type_id);
	}
	return sway_notification_center_widgets_base_widget_button_type_type_id__once;
}

SwayNotificationCenterWidgetsBaseWidget*
sway_notification_center_widgets_base_widget_construct (GType object_type,
                                                        const gchar* suffix)
{
	SwayNotificationCenterWidgetsBaseWidget * self = NULL;
	gchar* _tmp0_ = NULL;
	gint _tmp1_;
	gint _tmp2_;
	const gchar* _tmp5_;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gint _tmp12_;
	gint _tmp13_;
	g_return_val_if_fail (suffix != NULL, NULL);
	self = (SwayNotificationCenterWidgetsBaseWidget*) g_object_new (object_type, NULL);
	sway_notification_center_widgets_base_widget_set_suffix (self, suffix);
	_tmp1_ = strlen (suffix);
	_tmp2_ = _tmp1_;
	if (_tmp2_ > 0) {
		gchar* _tmp3_;
		_tmp3_ = g_strdup_printf ("#%s", suffix);
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp3_;
	} else {
		gchar* _tmp4_;
		_tmp4_ = g_strdup ("");
		_g_free0 (_tmp0_);
		_tmp0_ = _tmp4_;
	}
	_tmp5_ = sway_notification_center_widgets_base_widget_get_widget_name (self);
	_tmp6_ = _tmp5_;
	_tmp7_ = g_strconcat (_tmp6_, _tmp0_, NULL);
	_tmp8_ = _tmp7_;
	sway_notification_center_widgets_base_widget_set_key (self, _tmp8_);
	_g_free0 (_tmp8_);
	gtk_widget_set_overflow (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), GTK_OVERFLOW_HIDDEN);
	gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "widget");
	_tmp9_ = sway_notification_center_widgets_base_widget_get_css_class_name (self);
	_tmp10_ = _tmp9_;
	_tmp11_ = _tmp10_;
	gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp11_);
	_g_free0 (_tmp11_);
	_tmp12_ = strlen (suffix);
	_tmp13_ = _tmp12_;
	if (_tmp13_ > 0) {
		gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), suffix);
	}
	_g_free0 (_tmp0_);
	return self;
}

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

JsonObject*
sway_notification_center_widgets_base_widget_get_config (SwayNotificationCenterWidgetsBaseWidget* self,
                                                         GtkWidget* widget)
{
	SwayNotificationCenterOrderedHashTable* config = NULL;
	SwayNotificationCenterConfigModel* _tmp0_;
	SwayNotificationCenterConfigModel* _tmp1_;
	SwayNotificationCenterOrderedHashTable* _tmp2_;
	SwayNotificationCenterOrderedHashTable* _tmp3_;
	gchar* orig_key = NULL;
	JsonObject* props = NULL;
	gboolean _result_ = FALSE;
	SwayNotificationCenterOrderedHashTable* _tmp4_;
	const gchar* _tmp5_;
	const gchar* _tmp6_ = NULL;
	gconstpointer _tmp7_ = NULL;
	gboolean _tmp8_;
	gchar* _tmp9_;
	JsonObject* _tmp10_;
	gboolean _tmp11_ = FALSE;
	gboolean _tmp12_ = FALSE;
	JsonObject* result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (widget, gtk_widget_get_type ()), NULL);
	_tmp0_ = sway_notification_center_config_model_get_instance ();
	_tmp1_ = _tmp0_;
	_tmp2_ = sway_notification_center_config_model_get_widget_config (_tmp1_);
	_tmp3_ = _tmp2_;
	config = _tmp3_;
	orig_key = NULL;
	props = NULL;
	_tmp4_ = config;
	_tmp5_ = self->priv->_key;
	_tmp8_ = sway_notification_center_ordered_hash_table_lookup_extended (_tmp4_, _tmp5_, &_tmp6_, &_tmp7_);
	_g_free0 (orig_key);
	_tmp9_ = g_strdup (_tmp6_);
	orig_key = _tmp9_;
	_json_object_unref0 (props);
	_tmp10_ = _json_object_ref0 ((JsonObject*) _tmp7_);
	props = _tmp10_;
	_result_ = _tmp8_;
	if (!_result_) {
		_tmp12_ = TRUE;
	} else {
		const gchar* _tmp13_;
		_tmp13_ = orig_key;
		_tmp12_ = _tmp13_ == NULL;
	}
	if (_tmp12_) {
		_tmp11_ = TRUE;
	} else {
		JsonObject* _tmp14_;
		_tmp14_ = props;
		_tmp11_ = _tmp14_ == NULL;
	}
	if (_tmp11_) {
		const gchar* _tmp15_;
		_tmp15_ = self->priv->_key;
		g_warning ("baseWidget.vala:47: %s: Config not found! Using default config...\n", _tmp15_);
		result = NULL;
		_json_object_unref0 (props);
		_g_free0 (orig_key);
		return result;
	}
	result = props;
	_g_free0 (orig_key);
	return result;
}

static void
sway_notification_center_widgets_base_widget_real_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                           gboolean value)
{
}

void
sway_notification_center_widgets_base_widget_on_cc_visibility_change (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                      gboolean value)
{
	SwayNotificationCenterWidgetsBaseWidgetClass* _klass_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self));
	_klass_ = SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_GET_CLASS (self);
	if (_klass_->on_cc_visibility_change) {
		_klass_->on_cc_visibility_change (self, value);
	}
}

static JsonNode*
_vala_JsonNode_copy (JsonNode* self)
{
	return g_boxed_copy (json_node_get_type (), self);
}

static gpointer
__vala_JsonNode_copy0 (gpointer self)
{
	return self ? _vala_JsonNode_copy (self) : NULL;
}

static void
_vala_JsonNode_free (JsonNode* self)
{
	g_boxed_free (json_node_get_type (), self);
}

gpointer
sway_notification_center_widgets_base_widget_get_prop (SwayNotificationCenterWidgetsBaseWidget* self,
                                                       GType t_type,
                                                       GBoxedCopyFunc t_dup_func,
                                                       GDestroyNotify t_destroy_func,
                                                       JsonObject* config,
                                                       const gchar* value_key,
                                                       gboolean* found)
{
	gboolean _vala_found = FALSE;
	JsonNode* member = NULL;
	JsonNode* _tmp1_;
	JsonNode* _tmp2_;
	GType base_type = 0UL;
	JsonNode* _tmp3_;
	GType generic_base_type = 0UL;
	gpointer result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	g_return_val_if_fail (config != NULL, NULL);
	g_return_val_if_fail (value_key != NULL, NULL);
	_vala_found = FALSE;
	if (!json_object_has_member (config, value_key)) {
		const gchar* _tmp0_;
		_tmp0_ = self->priv->_key;
		g_debug ("baseWidget.vala:59: %s: Config doesn't have key: %s!\n", _tmp0_, value_key);
		result = NULL;
		if (found) {
			*found = _vala_found;
		}
		return result;
	}
	_tmp1_ = json_object_get_member (config, value_key);
	_tmp2_ = __vala_JsonNode_copy0 (_tmp1_);
	member = _tmp2_;
	_tmp3_ = member;
	base_type = sway_notification_center_functions_get_base_type (json_node_get_value_type (_tmp3_));
	generic_base_type = sway_notification_center_functions_get_base_type (t_type);
	if (generic_base_type == G_TYPE_INT) {
		generic_base_type = G_TYPE_INT64;
	}
	if (!g_type_is_a (base_type, generic_base_type)) {
		const gchar* _tmp4_;
		const gchar* _tmp5_;
		JsonNode* _tmp6_;
		const gchar* _tmp7_;
		_tmp4_ = self->priv->_key;
		_tmp5_ = g_type_name (t_type);
		_tmp6_ = member;
		_tmp7_ = g_type_name (json_node_get_value_type (_tmp6_));
		g_warning ("baseWidget.vala:73: %s: Config type %s doesn't match: %s!\n", _tmp4_, _tmp5_, _tmp7_);
		result = NULL;
		__vala_JsonNode_free0 (member);
		if (found) {
			*found = _vala_found;
		}
		return result;
	}
	_vala_found = TRUE;
	switch (generic_base_type) {
		case G_TYPE_STRING:
		{
			JsonNode* _tmp8_;
			const gchar* _tmp9_;
			gpointer _tmp10_;
			_tmp8_ = member;
			_tmp9_ = json_node_get_string (_tmp8_);
			_tmp10_ = ((_tmp9_ != NULL) && (t_dup_func != NULL)) ? t_dup_func ((gpointer) _tmp9_) : ((gpointer) _tmp9_);
			result = _tmp10_;
			__vala_JsonNode_free0 (member);
			if (found) {
				*found = _vala_found;
			}
			return result;
		}
		case G_TYPE_INT64:
		{
			JsonNode* _tmp11_;
			_tmp11_ = member;
			result = (gpointer) ((gintptr) json_node_get_int (_tmp11_));
			__vala_JsonNode_free0 (member);
			if (found) {
				*found = _vala_found;
			}
			return result;
		}
		case G_TYPE_BOOLEAN:
		{
			JsonNode* _tmp12_;
			_tmp12_ = member;
			result = (gpointer) ((gintptr) json_node_get_boolean (_tmp12_));
			__vala_JsonNode_free0 (member);
			if (found) {
				*found = _vala_found;
			}
			return result;
		}
		default:
		{
			_vala_found = FALSE;
			result = NULL;
			__vala_JsonNode_free0 (member);
			if (found) {
				*found = _vala_found;
			}
			return result;
		}
	}
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

JsonArray*
sway_notification_center_widgets_base_widget_get_prop_array (SwayNotificationCenterWidgetsBaseWidget* self,
                                                             JsonObject* config,
                                                             const gchar* value_key)
{
	JsonNode* member = NULL;
	JsonNode* _tmp1_;
	JsonNode* _tmp2_;
	JsonNode* _tmp3_;
	JsonArray* _tmp4_;
	JsonArray* _tmp5_;
	JsonArray* result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	g_return_val_if_fail (config != NULL, NULL);
	g_return_val_if_fail (value_key != NULL, NULL);
	if (!json_object_has_member (config, value_key)) {
		const gchar* _tmp0_;
		_tmp0_ = self->priv->_key;
		g_debug ("baseWidget.vala:95: %s: Config doesn't have key: %s!\n", _tmp0_, value_key);
		result = NULL;
		return result;
	}
	_tmp1_ = json_object_get_member (config, value_key);
	_tmp2_ = __vala_JsonNode_copy0 (_tmp1_);
	member = _tmp2_;
	_tmp3_ = member;
	if (json_node_get_node_type (_tmp3_) != JSON_NODE_ARRAY) {
		g_debug ("baseWidget.vala:100: Unable to find Json Array for member %s", value_key);
	}
	_tmp4_ = json_object_get_array_member (config, value_key);
	_tmp5_ = _json_array_ref0 (_tmp4_);
	result = _tmp5_;
	__vala_JsonNode_free0 (member);
	return result;
}

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

static gpointer
__sway_notification_center_widgets_base_widget_button_type_dup0 (gpointer self)
{
	return self ? _sway_notification_center_widgets_base_widget_button_type_dup (self) : NULL;
}

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

static gpointer
__bool_dup0 (gpointer self)
{
	return self ? _bool_dup (self) : NULL;
}

SwayNotificationCenterWidgetsAction*
sway_notification_center_widgets_base_widget_parse_actions (SwayNotificationCenterWidgetsBaseWidget* self,
                                                            JsonArray* actions,
                                                            gint* result_length1)
{
	SwayNotificationCenterWidgetsAction* res = NULL;
	SwayNotificationCenterWidgetsAction* _tmp0_;
	gint res_length1;
	gint _res_size_;
	SwayNotificationCenterWidgetsAction* _tmp27_;
	gint _tmp27__length1;
	SwayNotificationCenterWidgetsAction* result;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	g_return_val_if_fail (actions != NULL, NULL);
	_tmp0_ = g_new0 (SwayNotificationCenterWidgetsAction, json_array_get_length (actions));
	res = _tmp0_;
	res_length1 = json_array_get_length (actions);
	_res_size_ = res_length1;
	{
		gint i = 0;
		i = 0;
		{
			gboolean _tmp1_ = FALSE;
			_tmp1_ = TRUE;
			while (TRUE) {
				gchar* label = NULL;
				JsonObject* _tmp3_;
				const gchar* _tmp4_;
				gchar* _tmp5_;
				gchar* command = NULL;
				JsonObject* _tmp6_;
				const gchar* _tmp7_;
				gchar* _tmp8_;
				gchar* t = NULL;
				JsonObject* _tmp9_;
				const gchar* _tmp10_;
				gchar* _tmp11_;
				SwayNotificationCenterWidgetsBaseWidgetButtonType type = 0;
				const gchar* _tmp12_;
				gchar* update_command = NULL;
				JsonObject* _tmp13_;
				const gchar* _tmp14_;
				gchar* _tmp15_;
				gboolean active = FALSE;
				JsonObject* _tmp16_;
				SwayNotificationCenterWidgetsAction* _tmp17_;
				gint _tmp17__length1;
				const gchar* _tmp18_;
				gchar* _tmp19_;
				const gchar* _tmp20_;
				gchar* _tmp21_;
				SwayNotificationCenterWidgetsBaseWidgetButtonType* _tmp22_;
				const gchar* _tmp23_;
				gchar* _tmp24_;
				gboolean* _tmp25_;
				SwayNotificationCenterWidgetsAction _tmp26_ = {0};
				if (!_tmp1_) {
					gint _tmp2_;
					_tmp2_ = i;
					i = _tmp2_ + 1;
				}
				_tmp1_ = FALSE;
				if (!(((guint) i) < json_array_get_length (actions))) {
					break;
				}
				_tmp3_ = json_array_get_object_element (actions, (guint) i);
				_tmp4_ = json_object_get_string_member_with_default (_tmp3_, "label", "label");
				_tmp5_ = g_strdup (_tmp4_);
				label = _tmp5_;
				_tmp6_ = json_array_get_object_element (actions, (guint) i);
				_tmp7_ = json_object_get_string_member_with_default (_tmp6_, "command", "");
				_tmp8_ = g_strdup (_tmp7_);
				command = _tmp8_;
				_tmp9_ = json_array_get_object_element (actions, (guint) i);
				_tmp10_ = json_object_get_string_member_with_default (_tmp9_, "type", "normal");
				_tmp11_ = g_strdup (_tmp10_);
				t = _tmp11_;
				_tmp12_ = t;
				type = sway_notification_center_widgets_base_widget_button_type_parse (_tmp12_);
				_tmp13_ = json_array_get_object_element (actions, (guint) i);
				_tmp14_ = json_object_get_string_member_with_default (_tmp13_, "update-command", "");
				_tmp15_ = g_strdup (_tmp14_);
				update_command = _tmp15_;
				_tmp16_ = json_array_get_object_element (actions, (guint) i);
				active = json_object_get_boolean_member_with_default (_tmp16_, "active", FALSE);
				_tmp17_ = res;
				_tmp17__length1 = res_length1;
				_tmp18_ = label;
				_tmp19_ = g_strdup (_tmp18_);
				_tmp20_ = command;
				_tmp21_ = g_strdup (_tmp20_);
				_tmp22_ = __sway_notification_center_widgets_base_widget_button_type_dup0 (&type);
				_tmp23_ = update_command;
				_tmp24_ = g_strdup (_tmp23_);
				_tmp25_ = __bool_dup0 (&active);
				memset (&_tmp26_, 0, sizeof (SwayNotificationCenterWidgetsAction));
				_g_free0 (_tmp26_.label);
				_tmp26_.label = _tmp19_;
				_g_free0 (_tmp26_.command);
				_tmp26_.command = _tmp21_;
				_g_free0 (_tmp26_.type);
				_tmp26_.type = _tmp22_;
				_g_free0 (_tmp26_.update_command);
				_tmp26_.update_command = _tmp24_;
				_g_free0 (_tmp26_.active);
				_tmp26_.active = _tmp25_;
				sway_notification_center_widgets_action_destroy (&_tmp17_[i]);
				_tmp17_[i] = _tmp26_;
				_g_free0 (update_command);
				_g_free0 (t);
				_g_free0 (command);
				_g_free0 (label);
			}
		}
	}
	_tmp27_ = res;
	_tmp27__length1 = res_length1;
	if (result_length1) {
		*result_length1 = _tmp27__length1;
	}
	result = _tmp27_;
	return result;
}

static void
sway_notification_center_widgets_base_widget_execute_command_data_free (gpointer _data)
{
	SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData* _data_;
	_data_ = _data;
	_g_free0 (_data_->cmd);
	_g_object_unref0 (_data_->self);
	g_slice_free (SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData, _data_);
}

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

void
sway_notification_center_widgets_base_widget_execute_command (SwayNotificationCenterWidgetsBaseWidget* self,
                                                              const gchar* cmd,
                                                              gchar** env_additions,
                                                              gint env_additions_length1,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_)
{
	SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData* _data_;
	SwayNotificationCenterWidgetsBaseWidget* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self));
	g_return_if_fail (cmd != NULL);
	_data_ = g_slice_new0 (SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, sway_notification_center_widgets_base_widget_execute_command_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (cmd);
	_g_free0 (_data_->cmd);
	_data_->cmd = _tmp1_;
	_data_->env_additions = env_additions;
	_data_->env_additions_length1 = env_additions_length1;
	sway_notification_center_widgets_base_widget_execute_command_co (_data_);
}

void
sway_notification_center_widgets_base_widget_execute_command_finish (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                     GAsyncResult* _res_)
{
	SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
sway_notification_center_widgets_base_widget_execute_command_ready (GObject* source_object,
                                                                    GAsyncResult* _res_,
                                                                    gpointer _user_data_)
{
	SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	sway_notification_center_widgets_base_widget_execute_command_co (_data_);
}

static gboolean
sway_notification_center_widgets_base_widget_execute_command_co (SwayNotificationCenterWidgetsBaseWidgetExecuteCommandData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_strdup ("");
	_data_->msg = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_state_ = 1;
	sway_notification_center_functions_execute_command (_data_->cmd, _data_->env_additions, (gint) _data_->env_additions_length1, sway_notification_center_widgets_base_widget_execute_command_ready, _data_);
	return FALSE;
	_state_1:
	sway_notification_center_functions_execute_command_finish (_data_->_res_, &_data_->_tmp1_);
	_g_free0 (_data_->msg);
	_data_->msg = _data_->_tmp1_;
	_g_free0 (_data_->msg);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

const gchar*
sway_notification_center_widgets_base_widget_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* self)
{
	SwayNotificationCenterWidgetsBaseWidgetClass* _klass_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	_klass_ = SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_GET_CLASS (self);
	if (_klass_->get_widget_name) {
		return _klass_->get_widget_name (self);
	}
	return NULL;
}

gchar*
sway_notification_center_widgets_base_widget_get_css_class_name (SwayNotificationCenterWidgetsBaseWidget* self)
{
	gchar* result;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	_tmp0_ = sway_notification_center_widgets_base_widget_get_widget_name (self);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_strdup_printf ("widget-%s", _tmp1_);
	result = _tmp2_;
	return result;
}

const gchar*
sway_notification_center_widgets_base_widget_get_key (SwayNotificationCenterWidgetsBaseWidget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	_tmp0_ = self->priv->_key;
	result = _tmp0_;
	return result;
}

static void
sway_notification_center_widgets_base_widget_set_key (SwayNotificationCenterWidgetsBaseWidget* self,
                                                      const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self));
	old_value = sway_notification_center_widgets_base_widget_get_key (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_key);
		self->priv->_key = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_base_widget_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_KEY_PROPERTY]);
	}
}

const gchar*
sway_notification_center_widgets_base_widget_get_suffix (SwayNotificationCenterWidgetsBaseWidget* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self), NULL);
	_tmp0_ = self->priv->_suffix;
	result = _tmp0_;
	return result;
}

static void
sway_notification_center_widgets_base_widget_set_suffix (SwayNotificationCenterWidgetsBaseWidget* self,
                                                         const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BASE_WIDGET (self));
	old_value = sway_notification_center_widgets_base_widget_get_suffix (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_suffix);
		self->priv->_suffix = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_widgets_base_widget_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_SUFFIX_PROPERTY]);
	}
}

static void
sway_notification_center_widgets_base_widget_class_init (SwayNotificationCenterWidgetsBaseWidgetClass * klass,
                                                         gpointer klass_data)
{
	sway_notification_center_widgets_base_widget_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterWidgetsBaseWidget_private_offset);
	((SwayNotificationCenterWidgetsBaseWidgetClass *) klass)->on_cc_visibility_change = (void (*) (SwayNotificationCenterWidgetsBaseWidget*, gboolean)) sway_notification_center_widgets_base_widget_real_on_cc_visibility_change;
	G_OBJECT_CLASS (klass)->get_property = _vala_sway_notification_center_widgets_base_widget_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_sway_notification_center_widgets_base_widget_set_property;
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_widgets_base_widget_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_WIDGET_NAME_PROPERTY, sway_notification_center_widgets_base_widget_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_WIDGET_NAME_PROPERTY] = g_param_spec_string ("widget-name", "widget-name", "widget-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CSS_CLASS_NAME_PROPERTY, sway_notification_center_widgets_base_widget_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CSS_CLASS_NAME_PROPERTY] = g_param_spec_string ("css-class-name", "css-class-name", "css-class-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_KEY_PROPERTY, sway_notification_center_widgets_base_widget_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_KEY_PROPERTY] = g_param_spec_string ("key", "key", "key", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_SUFFIX_PROPERTY, sway_notification_center_widgets_base_widget_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_SUFFIX_PROPERTY] = g_param_spec_string ("suffix", "suffix", "suffix", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
sway_notification_center_widgets_base_widget_instance_init (SwayNotificationCenterWidgetsBaseWidget * self,
                                                            gpointer klass)
{
	self->priv = sway_notification_center_widgets_base_widget_get_instance_private (self);
}

static void
sway_notification_center_widgets_base_widget_finalize (GObject * obj)
{
	SwayNotificationCenterWidgetsBaseWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
	_g_free0 (self->priv->_key);
	_g_free0 (self->priv->_suffix);
	G_OBJECT_CLASS (sway_notification_center_widgets_base_widget_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_base_widget_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterWidgetsBaseWidgetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_widgets_base_widget_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterWidgetsBaseWidget), 0, (GInstanceInitFunc) sway_notification_center_widgets_base_widget_instance_init, NULL };
	GType sway_notification_center_widgets_base_widget_type_id;
	sway_notification_center_widgets_base_widget_type_id = g_type_register_static (gtk_box_get_type (), "SwayNotificationCenterWidgetsBaseWidget", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
	SwayNotificationCenterWidgetsBaseWidget_private_offset = g_type_add_instance_private (sway_notification_center_widgets_base_widget_type_id, sizeof (SwayNotificationCenterWidgetsBaseWidgetPrivate));
	return sway_notification_center_widgets_base_widget_type_id;
}

GType
sway_notification_center_widgets_base_widget_get_type (void)
{
	static gsize sway_notification_center_widgets_base_widget_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_base_widget_type_id__once)) {
		GType sway_notification_center_widgets_base_widget_type_id;
		sway_notification_center_widgets_base_widget_type_id = sway_notification_center_widgets_base_widget_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_base_widget_type_id__once, sway_notification_center_widgets_base_widget_type_id);
	}
	return sway_notification_center_widgets_base_widget_type_id__once;
}

static void
_vala_sway_notification_center_widgets_base_widget_get_property (GObject * object,
                                                                 guint property_id,
                                                                 GValue * value,
                                                                 GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsBaseWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CSS_CLASS_NAME_PROPERTY:
		g_value_take_string (value, sway_notification_center_widgets_base_widget_get_css_class_name (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_KEY_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_base_widget_get_key (self));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_SUFFIX_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_base_widget_get_suffix (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_sway_notification_center_widgets_base_widget_set_property (GObject * object,
                                                                 guint property_id,
                                                                 const GValue * value,
                                                                 GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsBaseWidget * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_KEY_PROPERTY:
		sway_notification_center_widgets_base_widget_set_key (self, g_value_get_string (value));
		break;
		case SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_SUFFIX_PROPERTY:
		sway_notification_center_widgets_base_widget_set_suffix (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

