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

#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gtk/gtk.h>
#include <glib-object.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;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_TITLE (sway_notification_center_widgets_title_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_TITLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_TITLE, SwayNotificationCenterWidgetsTitle))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_TITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_TITLE, SwayNotificationCenterWidgetsTitleClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_TITLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_TITLE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_TITLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_TITLE))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_TITLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_TITLE, SwayNotificationCenterWidgetsTitleClass))

typedef struct _SwayNotificationCenterWidgetsTitle SwayNotificationCenterWidgetsTitle;
typedef struct _SwayNotificationCenterWidgetsTitleClass SwayNotificationCenterWidgetsTitleClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_DND (sway_notification_center_widgets_dnd_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_DND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_DND, SwayNotificationCenterWidgetsDnd))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_DND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_DND, SwayNotificationCenterWidgetsDndClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_DND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_DND))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_DND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_DND))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_DND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_DND, SwayNotificationCenterWidgetsDndClass))

typedef struct _SwayNotificationCenterWidgetsDnd SwayNotificationCenterWidgetsDnd;
typedef struct _SwayNotificationCenterWidgetsDndClass SwayNotificationCenterWidgetsDndClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_LABEL (sway_notification_center_widgets_label_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_LABEL, SwayNotificationCenterWidgetsLabel))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_LABEL, SwayNotificationCenterWidgetsLabelClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_LABEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_LABEL))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_LABEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_LABEL))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_LABEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_LABEL, SwayNotificationCenterWidgetsLabelClass))

typedef struct _SwayNotificationCenterWidgetsLabel SwayNotificationCenterWidgetsLabel;
typedef struct _SwayNotificationCenterWidgetsLabelClass SwayNotificationCenterWidgetsLabelClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS (sway_notification_center_widgets_mpris_mpris_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMpris))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMprisClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_IS_MPRIS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_MPRIS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_MPRIS_TYPE_MPRIS, SwayNotificationCenterWidgetsMprisMprisClass))

typedef struct _SwayNotificationCenterWidgetsMprisMpris SwayNotificationCenterWidgetsMprisMpris;
typedef struct _SwayNotificationCenterWidgetsMprisMprisClass SwayNotificationCenterWidgetsMprisMprisClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_MENUBAR (sway_notification_center_widgets_menubar_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MENUBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_MENUBAR, SwayNotificationCenterWidgetsMenubar))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MENUBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_MENUBAR, SwayNotificationCenterWidgetsMenubarClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_MENUBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_MENUBAR))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_MENUBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_MENUBAR))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_MENUBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_MENUBAR, SwayNotificationCenterWidgetsMenubarClass))

typedef struct _SwayNotificationCenterWidgetsMenubar SwayNotificationCenterWidgetsMenubar;
typedef struct _SwayNotificationCenterWidgetsMenubarClass SwayNotificationCenterWidgetsMenubarClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BUTTONS_GRID (sway_notification_center_widgets_buttons_grid_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BUTTONS_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BUTTONS_GRID, SwayNotificationCenterWidgetsButtonsGrid))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BUTTONS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BUTTONS_GRID, SwayNotificationCenterWidgetsButtonsGridClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BUTTONS_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BUTTONS_GRID))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BUTTONS_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BUTTONS_GRID))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BUTTONS_GRID_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BUTTONS_GRID, SwayNotificationCenterWidgetsButtonsGridClass))

typedef struct _SwayNotificationCenterWidgetsButtonsGrid SwayNotificationCenterWidgetsButtonsGrid;
typedef struct _SwayNotificationCenterWidgetsButtonsGridClass SwayNotificationCenterWidgetsButtonsGridClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER (sway_notification_center_widgets_slider_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSlider))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSliderClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_SLIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_SLIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_SLIDER, SwayNotificationCenterWidgetsSliderClass))

typedef struct _SwayNotificationCenterWidgetsSlider SwayNotificationCenterWidgetsSlider;
typedef struct _SwayNotificationCenterWidgetsSliderClass SwayNotificationCenterWidgetsSliderClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_VOLUME (sway_notification_center_widgets_volume_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_VOLUME, SwayNotificationCenterWidgetsVolume))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_VOLUME, SwayNotificationCenterWidgetsVolumeClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_VOLUME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_VOLUME))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_VOLUME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_VOLUME))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_VOLUME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_VOLUME, SwayNotificationCenterWidgetsVolumeClass))

typedef struct _SwayNotificationCenterWidgetsVolume SwayNotificationCenterWidgetsVolume;
typedef struct _SwayNotificationCenterWidgetsVolumeClass SwayNotificationCenterWidgetsVolumeClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BACKLIGHT (sway_notification_center_widgets_backlight_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BACKLIGHT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BACKLIGHT, SwayNotificationCenterWidgetsBacklight))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BACKLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BACKLIGHT, SwayNotificationCenterWidgetsBacklightClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BACKLIGHT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BACKLIGHT))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_BACKLIGHT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BACKLIGHT))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_BACKLIGHT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BACKLIGHT, SwayNotificationCenterWidgetsBacklightClass))

typedef struct _SwayNotificationCenterWidgetsBacklight SwayNotificationCenterWidgetsBacklight;
typedef struct _SwayNotificationCenterWidgetsBacklightClass SwayNotificationCenterWidgetsBacklightClass;

#define SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS (sway_notification_center_widgets_inhibitors_get_type ())
#define SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS, SwayNotificationCenterWidgetsInhibitors))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS, SwayNotificationCenterWidgetsInhibitorsClass))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_INHIBITORS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_IS_INHIBITORS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS))
#define SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS, SwayNotificationCenterWidgetsInhibitorsClass))

typedef struct _SwayNotificationCenterWidgetsInhibitors SwayNotificationCenterWidgetsInhibitors;
typedef struct _SwayNotificationCenterWidgetsInhibitorsClass SwayNotificationCenterWidgetsInhibitorsClass;

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 SwayNotificationCenterWidgetsBaseWidget* sway_notification_center_widgets_get_widget_from_key (gchar* key,
                                                                                               gboolean* is_notifications);
VALA_EXTERN SwayNotificationCenterWidgetsTitle* sway_notification_center_widgets_title_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsTitle* sway_notification_center_widgets_title_construct (GType object_type,
                                                                                      const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_title_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsTitle, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsDnd* sway_notification_center_widgets_dnd_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsDnd* sway_notification_center_widgets_dnd_construct (GType object_type,
                                                                                  const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_dnd_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsDnd, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsLabel* sway_notification_center_widgets_label_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsLabel* sway_notification_center_widgets_label_construct (GType object_type,
                                                                                      const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_label_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsLabel, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsMprisMpris* sway_notification_center_widgets_mpris_mpris_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsMprisMpris* sway_notification_center_widgets_mpris_mpris_construct (GType object_type,
                                                                                                 const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_mpris_mpris_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsMprisMpris, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsMenubar* sway_notification_center_widgets_menubar_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsMenubar* sway_notification_center_widgets_menubar_construct (GType object_type,
                                                                                          const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_menubar_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsMenubar, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsButtonsGrid* sway_notification_center_widgets_buttons_grid_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsButtonsGrid* sway_notification_center_widgets_buttons_grid_construct (GType object_type,
                                                                                                   const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_buttons_grid_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsButtonsGrid, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsSlider* sway_notification_center_widgets_slider_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsSlider* sway_notification_center_widgets_slider_construct (GType object_type,
                                                                                        const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_slider_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsSlider, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsVolume* sway_notification_center_widgets_volume_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsVolume* sway_notification_center_widgets_volume_construct (GType object_type,
                                                                                        const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_volume_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsVolume, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsBacklight* sway_notification_center_widgets_backlight_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsBacklight* sway_notification_center_widgets_backlight_construct (GType object_type,
                                                                                              const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_backlight_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsBacklight, g_object_unref)
VALA_EXTERN SwayNotificationCenterWidgetsInhibitors* sway_notification_center_widgets_inhibitors_new (const gchar* suffix);
VALA_EXTERN SwayNotificationCenterWidgetsInhibitors* sway_notification_center_widgets_inhibitors_construct (GType object_type,
                                                                                                const gchar* suffix);
VALA_EXTERN GType sway_notification_center_widgets_inhibitors_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterWidgetsInhibitors, g_object_unref)
VALA_EXTERN const gchar* sway_notification_center_widgets_base_widget_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* self);
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);

SwayNotificationCenterWidgetsBaseWidget*
sway_notification_center_widgets_get_widget_from_key (gchar* key,
                                                      gboolean* is_notifications)
{
	gboolean _vala_is_notifications = FALSE;
	gchar** key_seperated = NULL;
	gchar** _tmp0_;
	gchar** _tmp1_;
	gint key_seperated_length1;
	gint _key_seperated_size_;
	gchar* suffix = NULL;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	gchar** _tmp7_;
	gint _tmp7__length1;
	SwayNotificationCenterWidgetsBaseWidget* widget = NULL;
	const gchar* _tmp11_;
	GQuark _tmp13_ = 0U;
	static GQuark _tmp12_label0 = 0;
	static GQuark _tmp12_label1 = 0;
	static GQuark _tmp12_label2 = 0;
	static GQuark _tmp12_label3 = 0;
	static GQuark _tmp12_label4 = 0;
	static GQuark _tmp12_label5 = 0;
	static GQuark _tmp12_label6 = 0;
	static GQuark _tmp12_label7 = 0;
	static GQuark _tmp12_label8 = 0;
	static GQuark _tmp12_label9 = 0;
	static GQuark _tmp12_label10 = 0;
	SwayNotificationCenterWidgetsBaseWidget* _tmp34_;
	const gchar* _tmp35_;
	const gchar* _tmp36_;
	SwayNotificationCenterWidgetsBaseWidget* result;
	g_return_val_if_fail (key != NULL, NULL);
	_vala_is_notifications = FALSE;
	_tmp1_ = _tmp0_ = g_strsplit (key, "#", 0);
	key_seperated = _tmp1_;
	key_seperated_length1 = _vala_array_length (_tmp0_);
	_key_seperated_size_ = key_seperated_length1;
	_tmp2_ = g_strdup ("");
	suffix = _tmp2_;
	_tmp3_ = key_seperated;
	_tmp3__length1 = key_seperated_length1;
	if (_tmp3__length1 > 0) {
		gchar** _tmp4_;
		gint _tmp4__length1;
		const gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp4_ = key_seperated;
		_tmp4__length1 = key_seperated_length1;
		_tmp5_ = _tmp4_[0];
		_tmp6_ = g_strdup (_tmp5_);
		_g_free0 (key);
		key = _tmp6_;
	}
	_tmp7_ = key_seperated;
	_tmp7__length1 = key_seperated_length1;
	if (_tmp7__length1 > 1) {
		gchar** _tmp8_;
		gint _tmp8__length1;
		const gchar* _tmp9_;
		gchar* _tmp10_;
		_tmp8_ = key_seperated;
		_tmp8__length1 = key_seperated_length1;
		_tmp9_ = _tmp8_[1];
		_tmp10_ = g_strdup (_tmp9_);
		_g_free0 (suffix);
		suffix = _tmp10_;
	}
	_tmp11_ = key;
	_tmp13_ = (NULL == _tmp11_) ? 0 : g_quark_from_string (_tmp11_);
	if (_tmp13_ == ((0 != _tmp12_label0) ? _tmp12_label0 : (_tmp12_label0 = g_quark_from_static_string ("notifications")))) {
		switch (0) {
			default:
			{
				_vala_is_notifications = TRUE;
				g_message ("factory.vala:17: Loading widget: widget-notifications");
				result = NULL;
				_g_object_unref0 (widget);
				_g_free0 (suffix);
				key_seperated = (_vala_array_free (key_seperated, key_seperated_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (key);
				if (is_notifications) {
					*is_notifications = _vala_is_notifications;
				}
				return result;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label1) ? _tmp12_label1 : (_tmp12_label1 = g_quark_from_static_string ("title")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp14_;
				SwayNotificationCenterWidgetsTitle* _tmp15_;
				_tmp14_ = suffix;
				_tmp15_ = sway_notification_center_widgets_title_new (_tmp14_);
				if (_tmp15_) {
					g_object_set_data ((GObject *) _tmp15_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp15_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label2) ? _tmp12_label2 : (_tmp12_label2 = g_quark_from_static_string ("dnd")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp16_;
				SwayNotificationCenterWidgetsDnd* _tmp17_;
				_tmp16_ = suffix;
				_tmp17_ = sway_notification_center_widgets_dnd_new (_tmp16_);
				if (_tmp17_) {
					g_object_set_data ((GObject *) _tmp17_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp17_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label3) ? _tmp12_label3 : (_tmp12_label3 = g_quark_from_static_string ("label")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp18_;
				SwayNotificationCenterWidgetsLabel* _tmp19_;
				_tmp18_ = suffix;
				_tmp19_ = sway_notification_center_widgets_label_new (_tmp18_);
				if (_tmp19_) {
					g_object_set_data ((GObject *) _tmp19_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp19_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label4) ? _tmp12_label4 : (_tmp12_label4 = g_quark_from_static_string ("mpris")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp20_;
				SwayNotificationCenterWidgetsMprisMpris* _tmp21_;
				_tmp20_ = suffix;
				_tmp21_ = sway_notification_center_widgets_mpris_mpris_new (_tmp20_);
				if (_tmp21_) {
					g_object_set_data ((GObject *) _tmp21_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp21_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label5) ? _tmp12_label5 : (_tmp12_label5 = g_quark_from_static_string ("menubar")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp22_;
				SwayNotificationCenterWidgetsMenubar* _tmp23_;
				_tmp22_ = suffix;
				_tmp23_ = sway_notification_center_widgets_menubar_new (_tmp22_);
				if (_tmp23_) {
					g_object_set_data ((GObject *) _tmp23_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp23_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label6) ? _tmp12_label6 : (_tmp12_label6 = g_quark_from_static_string ("buttons-grid")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp24_;
				SwayNotificationCenterWidgetsButtonsGrid* _tmp25_;
				_tmp24_ = suffix;
				_tmp25_ = sway_notification_center_widgets_buttons_grid_new (_tmp24_);
				if (_tmp25_) {
					g_object_set_data ((GObject *) _tmp25_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp25_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp25_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label7) ? _tmp12_label7 : (_tmp12_label7 = g_quark_from_static_string ("slider")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp26_;
				SwayNotificationCenterWidgetsSlider* _tmp27_;
				_tmp26_ = suffix;
				_tmp27_ = sway_notification_center_widgets_slider_new (_tmp26_);
				if (_tmp27_) {
					g_object_set_data ((GObject *) _tmp27_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp27_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label8) ? _tmp12_label8 : (_tmp12_label8 = g_quark_from_static_string ("volume")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp28_;
				SwayNotificationCenterWidgetsVolume* _tmp29_;
				_tmp28_ = suffix;
				_tmp29_ = sway_notification_center_widgets_volume_new (_tmp28_);
				if (_tmp29_) {
					g_object_set_data ((GObject *) _tmp29_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp29_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label9) ? _tmp12_label9 : (_tmp12_label9 = g_quark_from_static_string ("backlight")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp30_;
				SwayNotificationCenterWidgetsBacklight* _tmp31_;
				_tmp30_ = suffix;
				_tmp31_ = sway_notification_center_widgets_backlight_new (_tmp30_);
				if (_tmp31_) {
					g_object_set_data ((GObject *) _tmp31_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp31_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else if (_tmp13_ == ((0 != _tmp12_label10) ? _tmp12_label10 : (_tmp12_label10 = g_quark_from_static_string ("inhibitors")))) {
		switch (0) {
			default:
			{
				const gchar* _tmp32_;
				SwayNotificationCenterWidgetsInhibitors* _tmp33_;
				_tmp32_ = suffix;
				_tmp33_ = sway_notification_center_widgets_inhibitors_new (_tmp32_);
				if (_tmp33_) {
					g_object_set_data ((GObject *) _tmp33_, "vala-creation-function", "SwayNotificationCenter.Widgets.get_widget_from_key");
				}
				g_object_ref_sink (_tmp33_);
				_g_object_unref0 (widget);
				widget = G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				g_warning ("factory.vala:52: Could not find widget: \"%s\"!", key);
				result = NULL;
				_g_object_unref0 (widget);
				_g_free0 (suffix);
				key_seperated = (_vala_array_free (key_seperated, key_seperated_length1, (GDestroyNotify) g_free), NULL);
				_g_free0 (key);
				if (is_notifications) {
					*is_notifications = _vala_is_notifications;
				}
				return result;
			}
		}
	}
	_tmp34_ = widget;
	_tmp35_ = sway_notification_center_widgets_base_widget_get_widget_name (_tmp34_);
	_tmp36_ = _tmp35_;
	g_message ("factory.vala:55: Loading widget: %s", _tmp36_);
	result = widget;
	_g_free0 (suffix);
	key_seperated = (_vala_array_free (key_seperated, key_seperated_length1, (GDestroyNotify) g_free), NULL);
	_g_free0 (key);
	if (is_notifications) {
		*is_notifications = _vala_is_notifications;
	}
	return result;
}

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

