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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>
#include <json-glib/json-glib.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;

#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;
typedef struct _SwayNotificationCenterWidgetsInhibitorsPrivate SwayNotificationCenterWidgetsInhibitorsPrivate;
enum  {
	SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_WIDGET_NAME_PROPERTY,
	SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_widgets_inhibitors_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC_DAEMON (sway_notification_center_swaync_daemon_get_type ())
#define SWAY_NOTIFICATION_CENTER_SWAYNC_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC_DAEMON, SwayNotificationCenterSwayncDaemon))
#define SWAY_NOTIFICATION_CENTER_SWAYNC_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC_DAEMON, SwayNotificationCenterSwayncDaemonClass))
#define SWAY_NOTIFICATION_CENTER_IS_SWAYNC_DAEMON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC_DAEMON))
#define SWAY_NOTIFICATION_CENTER_IS_SWAYNC_DAEMON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC_DAEMON))
#define SWAY_NOTIFICATION_CENTER_SWAYNC_DAEMON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_TYPE_SWAYNC_DAEMON, SwayNotificationCenterSwayncDaemonClass))

typedef struct _SwayNotificationCenterSwayncDaemon SwayNotificationCenterSwayncDaemon;
typedef struct _SwayNotificationCenterSwayncDaemonClass SwayNotificationCenterSwayncDaemonClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))

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 _SwayNotificationCenterWidgetsInhibitors {
	SwayNotificationCenterWidgetsBaseWidget parent_instance;
	SwayNotificationCenterWidgetsInhibitorsPrivate * priv;
};

struct _SwayNotificationCenterWidgetsInhibitorsClass {
	SwayNotificationCenterWidgetsBaseWidgetClass parent_class;
};

struct _SwayNotificationCenterWidgetsInhibitorsPrivate {
	GtkLabel* title_widget;
	GtkButton* clear_all_button;
	gchar* title;
	gboolean has_clear_all_button;
	gchar* button_text;
};

static gint SwayNotificationCenterWidgetsInhibitors_private_offset;
static gpointer sway_notification_center_widgets_inhibitors_parent_class = NULL;
VALA_EXTERN SwayNotificationCenterSwayncDaemon* sway_notification_center_swaync_daemon;

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 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);
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 SwayNotificationCenterWidgetsBaseWidget* sway_notification_center_widgets_base_widget_construct (GType object_type,
                                                                                                 const gchar* suffix);
VALA_EXTERN GType sway_notification_center_swaync_daemon_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterSwayncDaemon, g_object_unref)
VALA_EXTERN guint sway_notification_center_swaync_daemon_register_object (void* object,
                                                              GDBusConnection* connection,
                                                              const gchar* path,
                                                              GError** error);
static void __lambda88_ (SwayNotificationCenterWidgetsInhibitors* self,
                  guint length);
VALA_EXTERN gboolean sway_notification_center_swaync_daemon_get_inhibited (SwayNotificationCenterSwayncDaemon* self);
static void ___lambda88__sway_notification_center_swaync_daemon_inhibited_changed (SwayNotificationCenterSwayncDaemon* _sender,
                                                                            guint length,
                                                                            gpointer self);
VALA_EXTERN JsonObject* sway_notification_center_widgets_base_widget_get_config (SwayNotificationCenterWidgetsBaseWidget* self,
                                                                     GtkWidget* widget);
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 gboolean* _bool_dup (gboolean* self);
static void ___lambda89_ (SwayNotificationCenterWidgetsInhibitors* self);
VALA_EXTERN gboolean sway_notification_center_swaync_daemon_clear_inhibitors (SwayNotificationCenterSwayncDaemon* self,
                                                                  GError** error);
static void ____lambda89__gtk_button_clicked (GtkButton* _sender,
                                       gpointer self);
static void sway_notification_center_widgets_inhibitors_finalize (GObject * obj);
static GType sway_notification_center_widgets_inhibitors_get_type_once (void);
static void _vala_sway_notification_center_widgets_inhibitors_get_property (GObject * object,
                                                                     guint property_id,
                                                                     GValue * value,
                                                                     GParamSpec * pspec);

static inline gpointer
sway_notification_center_widgets_inhibitors_get_instance_private (SwayNotificationCenterWidgetsInhibitors* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterWidgetsInhibitors_private_offset);
}

static void
__lambda88_ (SwayNotificationCenterWidgetsInhibitors* self,
             guint length)
{
	SwayNotificationCenterSwayncDaemon* _tmp0_;
	gboolean _tmp1_;
	gboolean _tmp2_;
	GtkLabel* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	_tmp0_ = sway_notification_center_swaync_daemon;
	_tmp1_ = sway_notification_center_swaync_daemon_get_inhibited (_tmp0_);
	_tmp2_ = _tmp1_;
	if (!_tmp2_) {
		gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
		return;
	}
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_tmp3_ = self->priv->title_widget;
	_tmp4_ = self->priv->title;
	_tmp5_ = g_strdup_printf ("%s %u", _tmp4_, length);
	_tmp6_ = _tmp5_;
	gtk_label_set_text (_tmp3_, _tmp6_);
	_g_free0 (_tmp6_);
}

static void
___lambda88__sway_notification_center_swaync_daemon_inhibited_changed (SwayNotificationCenterSwayncDaemon* _sender,
                                                                       guint length,
                                                                       gpointer self)
{
	__lambda88_ ((SwayNotificationCenterWidgetsInhibitors*) self, length);
}

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

static void
___lambda89_ (SwayNotificationCenterWidgetsInhibitors* self)
{
	GError* _inner_error0_ = NULL;
	{
		SwayNotificationCenterSwayncDaemon* _tmp0_;
		_tmp0_ = sway_notification_center_swaync_daemon;
		sway_notification_center_swaync_daemon_clear_inhibitors (_tmp0_, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = e;
		_tmp2_ = _tmp1_->message;
		g_critical ("inhibitors.vala:62: Error: %s\n", _tmp2_);
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
____lambda89__gtk_button_clicked (GtkButton* _sender,
                                  gpointer self)
{
	___lambda89_ ((SwayNotificationCenterWidgetsInhibitors*) self);
}

SwayNotificationCenterWidgetsInhibitors*
sway_notification_center_widgets_inhibitors_construct (GType object_type,
                                                       const gchar* suffix)
{
	SwayNotificationCenterWidgetsInhibitors * self = NULL;
	SwayNotificationCenterSwayncDaemon* _tmp0_;
	JsonObject* config = NULL;
	JsonObject* _tmp1_;
	JsonObject* _tmp2_;
	const gchar* _tmp19_;
	GtkLabel* _tmp20_;
	GtkLabel* _tmp21_;
	GtkLabel* _tmp22_;
	GtkLabel* _tmp23_;
	GtkLabel* _tmp24_;
	g_return_val_if_fail (suffix != NULL, NULL);
	self = (SwayNotificationCenterWidgetsInhibitors*) sway_notification_center_widgets_base_widget_construct (object_type, suffix);
	_tmp0_ = sway_notification_center_swaync_daemon;
	g_signal_connect_object (_tmp0_, "inhibited-changed", (GCallback) ___lambda88__sway_notification_center_swaync_daemon_inhibited_changed, self, 0);
	_tmp1_ = sway_notification_center_widgets_base_widget_get_config (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	config = _tmp1_;
	_tmp2_ = config;
	if (_tmp2_ != NULL) {
		gchar* title = NULL;
		JsonObject* _tmp3_;
		gpointer _tmp4_;
		const gchar* _tmp5_;
		gboolean found_clear_all = FALSE;
		gboolean* has_clear_all_button = NULL;
		JsonObject* _tmp8_;
		gboolean _tmp9_ = FALSE;
		gpointer _tmp10_;
		gboolean _tmp11_;
		gboolean* _tmp12_;
		gchar* button_text = NULL;
		JsonObject* _tmp14_;
		gpointer _tmp15_;
		const gchar* _tmp16_;
		_tmp3_ = config;
		_tmp4_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp3_, "text", NULL);
		title = (gchar*) _tmp4_;
		_tmp5_ = title;
		if (_tmp5_ != NULL) {
			const gchar* _tmp6_;
			gchar* _tmp7_;
			_tmp6_ = title;
			_tmp7_ = g_strdup (_tmp6_);
			_g_free0 (self->priv->title);
			self->priv->title = _tmp7_;
		}
		_tmp8_ = config;
		_tmp10_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_BOOLEAN, NULL, NULL, _tmp8_, "clear-all-button", &_tmp9_);
		found_clear_all = _tmp9_;
		_tmp11_ = (gboolean) ((gintptr) _tmp10_);
		_tmp12_ = __bool_dup0 (&_tmp11_);
		has_clear_all_button = _tmp12_;
		if (found_clear_all) {
			gboolean* _tmp13_;
			_tmp13_ = has_clear_all_button;
			self->priv->has_clear_all_button = *_tmp13_;
		}
		_tmp14_ = config;
		_tmp15_ = sway_notification_center_widgets_base_widget_get_prop (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget), G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, _tmp14_, "button-text", NULL);
		button_text = (gchar*) _tmp15_;
		_tmp16_ = button_text;
		if (_tmp16_ != NULL) {
			const gchar* _tmp17_;
			gchar* _tmp18_;
			_tmp17_ = button_text;
			_tmp18_ = g_strdup (_tmp17_);
			_g_free0 (self->priv->button_text);
			self->priv->button_text = _tmp18_;
		}
		_g_free0 (button_text);
		_g_free0 (has_clear_all_button);
		_g_free0 (title);
	}
	_tmp19_ = self->priv->title;
	_tmp20_ = (GtkLabel*) gtk_label_new (_tmp19_);
	if (_tmp20_) {
		g_object_set_data ((GObject *) _tmp20_, "vala-creation-function", "SwayNotificationCenter.Widgets.Inhibitors.new");
	}
	g_object_ref_sink (_tmp20_);
	_g_object_unref0 (self->priv->title_widget);
	self->priv->title_widget = _tmp20_;
	_tmp21_ = self->priv->title_widget;
	gtk_widget_set_halign (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_START);
	_tmp22_ = self->priv->title_widget;
	gtk_widget_set_hexpand (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, gtk_widget_get_type (), GtkWidget), TRUE);
	_tmp23_ = self->priv->title_widget;
	gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, gtk_widget_get_type (), GtkWidget));
	_tmp24_ = self->priv->title_widget;
	gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, gtk_widget_get_type (), GtkWidget));
	if (self->priv->has_clear_all_button) {
		const gchar* _tmp25_;
		GtkButton* _tmp26_;
		GtkButton* _tmp27_;
		GtkButton* _tmp28_;
		GtkButton* _tmp29_;
		GtkButton* _tmp30_;
		GtkButton* _tmp31_;
		_tmp25_ = self->priv->button_text;
		_tmp26_ = (GtkButton*) gtk_button_new_with_label (_tmp25_);
		if (_tmp26_) {
			g_object_set_data ((GObject *) _tmp26_, "vala-creation-function", "SwayNotificationCenter.Widgets.Inhibitors.new");
		}
		g_object_ref_sink (_tmp26_);
		_g_object_unref0 (self->priv->clear_all_button);
		self->priv->clear_all_button = _tmp26_;
		_tmp27_ = self->priv->clear_all_button;
		g_signal_connect_object (_tmp27_, "clicked", (GCallback) ____lambda89__gtk_button_clicked, self, 0);
		_tmp28_ = self->priv->clear_all_button;
		gtk_widget_set_can_focus (G_TYPE_CHECK_INSTANCE_CAST (_tmp28_, gtk_widget_get_type (), GtkWidget), FALSE);
		_tmp29_ = self->priv->clear_all_button;
		gtk_widget_set_valign (G_TYPE_CHECK_INSTANCE_CAST (_tmp29_, gtk_widget_get_type (), GtkWidget), GTK_ALIGN_CENTER);
		_tmp30_ = self->priv->clear_all_button;
		gtk_widget_show (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, gtk_widget_get_type (), GtkWidget));
		_tmp31_ = self->priv->clear_all_button;
		gtk_box_append (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_box_get_type (), GtkBox), G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, gtk_widget_get_type (), GtkWidget));
	}
	gtk_widget_hide (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget));
	_json_object_unref0 (config);
	return self;
}

SwayNotificationCenterWidgetsInhibitors*
sway_notification_center_widgets_inhibitors_new (const gchar* suffix)
{
	return sway_notification_center_widgets_inhibitors_construct (SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS, suffix);
}

static const gchar*
sway_notification_center_widgets_inhibitors_real_get_widget_name (SwayNotificationCenterWidgetsBaseWidget* base)
{
	const gchar* result;
	SwayNotificationCenterWidgetsInhibitors* self;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS, SwayNotificationCenterWidgetsInhibitors);
	result = "inhibitors";
	return result;
}

static void
sway_notification_center_widgets_inhibitors_class_init (SwayNotificationCenterWidgetsInhibitorsClass * klass,
                                                        gpointer klass_data)
{
	sway_notification_center_widgets_inhibitors_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterWidgetsInhibitors_private_offset);
	SWAY_NOTIFICATION_CENTER_WIDGETS_BASE_WIDGET_CLASS (klass)->get_widget_name = (const gchar* (*) (SwayNotificationCenterWidgetsBaseWidget*)) sway_notification_center_widgets_inhibitors_real_get_widget_name;
	G_OBJECT_CLASS (klass)->get_property = _vala_sway_notification_center_widgets_inhibitors_get_property;
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_widgets_inhibitors_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_WIDGET_NAME_PROPERTY, sway_notification_center_widgets_inhibitors_properties[SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_WIDGET_NAME_PROPERTY] = g_param_spec_string ("widget-name", "widget-name", "widget-name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
sway_notification_center_widgets_inhibitors_instance_init (SwayNotificationCenterWidgetsInhibitors * self,
                                                           gpointer klass)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	self->priv = sway_notification_center_widgets_inhibitors_get_instance_private (self);
	_tmp0_ = g_strdup ("Inhibitors");
	self->priv->title = _tmp0_;
	self->priv->has_clear_all_button = TRUE;
	_tmp1_ = g_strdup ("Clear All");
	self->priv->button_text = _tmp1_;
}

static void
sway_notification_center_widgets_inhibitors_finalize (GObject * obj)
{
	SwayNotificationCenterWidgetsInhibitors * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS, SwayNotificationCenterWidgetsInhibitors);
	_g_object_unref0 (self->priv->title_widget);
	_g_object_unref0 (self->priv->clear_all_button);
	_g_free0 (self->priv->title);
	_g_free0 (self->priv->button_text);
	G_OBJECT_CLASS (sway_notification_center_widgets_inhibitors_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_widgets_inhibitors_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterWidgetsInhibitorsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_widgets_inhibitors_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterWidgetsInhibitors), 0, (GInstanceInitFunc) sway_notification_center_widgets_inhibitors_instance_init, NULL };
	GType sway_notification_center_widgets_inhibitors_type_id;
	sway_notification_center_widgets_inhibitors_type_id = g_type_register_static (SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, "SwayNotificationCenterWidgetsInhibitors", &g_define_type_info, 0);
	SwayNotificationCenterWidgetsInhibitors_private_offset = g_type_add_instance_private (sway_notification_center_widgets_inhibitors_type_id, sizeof (SwayNotificationCenterWidgetsInhibitorsPrivate));
	return sway_notification_center_widgets_inhibitors_type_id;
}

GType
sway_notification_center_widgets_inhibitors_get_type (void)
{
	static gsize sway_notification_center_widgets_inhibitors_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_widgets_inhibitors_type_id__once)) {
		GType sway_notification_center_widgets_inhibitors_type_id;
		sway_notification_center_widgets_inhibitors_type_id = sway_notification_center_widgets_inhibitors_get_type_once ();
		g_once_init_leave (&sway_notification_center_widgets_inhibitors_type_id__once, sway_notification_center_widgets_inhibitors_type_id);
	}
	return sway_notification_center_widgets_inhibitors_type_id__once;
}

static void
_vala_sway_notification_center_widgets_inhibitors_get_property (GObject * object,
                                                                guint property_id,
                                                                GValue * value,
                                                                GParamSpec * pspec)
{
	SwayNotificationCenterWidgetsInhibitors * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_INHIBITORS, SwayNotificationCenterWidgetsInhibitors);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_WIDGETS_INHIBITORS_WIDGET_NAME_PROPERTY:
		g_value_set_string (value, sway_notification_center_widgets_base_widget_get_widget_name (G_TYPE_CHECK_INSTANCE_CAST (self, SWAY_NOTIFICATION_CENTER_WIDGETS_TYPE_BASE_WIDGET, SwayNotificationCenterWidgetsBaseWidget)));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

