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

#include <gtk/gtk.h>
#include <glib-object.h>
#include <gdk/gdk.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include <gio/gio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <graphene-gobject.h>
#include <gtk4-layer-shell.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_TYPE_BLANK_WINDOW (sway_notification_center_blank_window_get_type ())
#define SWAY_NOTIFICATION_CENTER_BLANK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, SwayNotificationCenterBlankWindow))
#define SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, SwayNotificationCenterBlankWindowClass))
#define SWAY_NOTIFICATION_CENTER_IS_BLANK_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW))
#define SWAY_NOTIFICATION_CENTER_IS_BLANK_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW))
#define SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, SwayNotificationCenterBlankWindowClass))

typedef struct _SwayNotificationCenterBlankWindow SwayNotificationCenterBlankWindow;
typedef struct _SwayNotificationCenterBlankWindowClass SwayNotificationCenterBlankWindowClass;
typedef struct _SwayNotificationCenterBlankWindowPrivate SwayNotificationCenterBlankWindowPrivate;
enum  {
	SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_0_PROPERTY,
	SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_MONITOR_PROPERTY,
	SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_NUM_PROPERTIES
};
static GParamSpec* sway_notification_center_blank_window_properties[SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (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 __vala_GdkEventSequence_free0(var) ((var == NULL) ? NULL : (var = (_vala_GdkEventSequence_free (var), NULL)))
#define __vala_graphene_rect_t_free0(var) ((var == NULL) ? NULL : (var = (_vala_graphene_rect_t_free (var), NULL)))

#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;
typedef enum  {
	SWAY_NOTIFICATION_CENTER_LAYER_BACKGROUND,
	SWAY_NOTIFICATION_CENTER_LAYER_BOTTOM,
	SWAY_NOTIFICATION_CENTER_LAYER_TOP,
	SWAY_NOTIFICATION_CENTER_LAYER_OVERLAY
} SwayNotificationCenterLayer;

#define SWAY_NOTIFICATION_CENTER_TYPE_LAYER (sway_notification_center_layer_get_type ())

struct _SwayNotificationCenterBlankWindow {
	GtkApplicationWindow parent_instance;
	SwayNotificationCenterBlankWindowPrivate * priv;
};

struct _SwayNotificationCenterBlankWindowClass {
	GtkApplicationWindowClass parent_class;
};

struct _SwayNotificationCenterBlankWindowPrivate {
	GdkMonitor* _monitor;
	GtkGestureClick* blank_window_gesture;
	gboolean blank_window_down;
	gboolean blank_window_in;
};

static gint SwayNotificationCenterBlankWindow_private_offset;
static gpointer sway_notification_center_blank_window_parent_class = NULL;
VALA_EXTERN SwayNotificationCenterSwayncDaemon* sway_notification_center_swaync_daemon;

VALA_EXTERN GType sway_notification_center_blank_window_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SwayNotificationCenterBlankWindow, g_object_unref)
VALA_EXTERN SwayNotificationCenterBlankWindow* sway_notification_center_blank_window_new (GdkMonitor* monitor);
VALA_EXTERN SwayNotificationCenterBlankWindow* sway_notification_center_blank_window_construct (GType object_type,
                                                                                    GdkMonitor* monitor);
static void sway_notification_center_blank_window_set_monitor (SwayNotificationCenterBlankWindow* self,
                                                        GdkMonitor* value);
static void __lambda16_ (SwayNotificationCenterBlankWindow* self,
                  gint n_press,
                  gdouble x,
                  gdouble y);
static void ___lambda16__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                             gint n_press,
                                             gdouble x,
                                             gdouble y,
                                             gpointer self);
static void __lambda17_ (SwayNotificationCenterBlankWindow* self,
                  gint n_press,
                  gdouble x,
                  gdouble y);
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);
VALA_EXTERN void sway_notification_center_swaync_daemon_set_visibility (SwayNotificationCenterSwayncDaemon* self,
                                                            gboolean visibility,
                                                            GError** error);
static void _vala_GdkEventSequence_free (GdkEventSequence* self);
static void ___lambda17__gtk_gesture_click_released (GtkGestureClick* _sender,
                                              gint n_press,
                                              gdouble x,
                                              gdouble y,
                                              gpointer self);
static void __lambda99_ (SwayNotificationCenterBlankWindow* self,
                  GtkGesture* gesture,
                  GdkEventSequence* sequence);
static void _vala_graphene_rect_t_free (graphene_rect_t* self);
static graphene_rect_t* _vala_graphene_rect_t_copy (graphene_rect_t* self);
static void ___lambda99__gtk_gesture_update (GtkGesture* _sender,
                                      GdkEventSequence* sequence,
                                      gpointer self);
static void __lambda100_ (SwayNotificationCenterBlankWindow* self);
static void ___lambda100__gtk_gesture_cancel (GtkGesture* _sender,
                                       GdkEventSequence* sequence,
                                       gpointer self);
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 GType sway_notification_center_layer_get_type (void) G_GNUC_CONST ;
VALA_EXTERN SwayNotificationCenterLayer sway_notification_center_config_model_get_control_center_layer (SwayNotificationCenterConfigModel* self);
VALA_EXTERN GtkLayerShellLayer sway_notification_center_layer_to_layer (SwayNotificationCenterLayer self);
static void sway_notification_center_blank_window_real_snapshot (GtkWidget* base,
                                                          GtkSnapshot* snapshot);
VALA_EXTERN GdkMonitor* sway_notification_center_blank_window_get_monitor (SwayNotificationCenterBlankWindow* self);
static void sway_notification_center_blank_window_finalize (GObject * obj);
static GType sway_notification_center_blank_window_get_type_once (void);
static void _vala_sway_notification_center_blank_window_get_property (GObject * object,
                                                               guint property_id,
                                                               GValue * value,
                                                               GParamSpec * pspec);
static void _vala_sway_notification_center_blank_window_set_property (GObject * object,
                                                               guint property_id,
                                                               const GValue * value,
                                                               GParamSpec * pspec);

static inline gpointer
sway_notification_center_blank_window_get_instance_private (SwayNotificationCenterBlankWindow* self)
{
	return G_STRUCT_MEMBER_P (self, SwayNotificationCenterBlankWindow_private_offset);
}

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

static void
__lambda16_ (SwayNotificationCenterBlankWindow* self,
             gint n_press,
             gdouble x,
             gdouble y)
{
	self->priv->blank_window_in = TRUE;
	self->priv->blank_window_down = TRUE;
}

static void
___lambda16__gtk_gesture_click_pressed (GtkGestureClick* _sender,
                                        gint n_press,
                                        gdouble x,
                                        gdouble y,
                                        gpointer self)
{
	__lambda16_ ((SwayNotificationCenterBlankWindow*) self, n_press, x, y);
}

static void
_vala_GdkEventSequence_free (GdkEventSequence* self)
{
	g_boxed_free (gdk_event_sequence_get_type (), self);
}

static void
__lambda17_ (SwayNotificationCenterBlankWindow* self,
             gint n_press,
             gdouble x,
             gdouble y)
{
	GtkGestureClick* _tmp4_;
	GdkEventSequence* _tmp5_;
	GdkEventSequence* _tmp6_;
	gboolean _tmp7_;
	GError* _inner_error0_ = NULL;
	if (!self->priv->blank_window_down) {
		return;
	}
	self->priv->blank_window_down = FALSE;
	if (self->priv->blank_window_in) {
		{
			SwayNotificationCenterSwayncDaemon* _tmp0_;
			_tmp0_ = sway_notification_center_swaync_daemon;
			sway_notification_center_swaync_daemon_set_visibility (_tmp0_, FALSE, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		}
		goto __finally0;
		__catch0_g_error:
		{
			GError* e = NULL;
			FILE* _tmp1_;
			GError* _tmp2_;
			const gchar* _tmp3_;
			e = _inner_error0_;
			_inner_error0_ = NULL;
			_tmp1_ = stderr;
			_tmp2_ = e;
			_tmp3_ = _tmp2_->message;
			fprintf (_tmp1_, "ControlCenter BlankWindow Click Error: %s\n", _tmp3_);
			_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;
		}
	}
	_tmp4_ = self->priv->blank_window_gesture;
	_tmp5_ = gtk_gesture_single_get_current_sequence (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_gesture_single_get_type (), GtkGestureSingle));
	_tmp6_ = _tmp5_;
	_tmp7_ = _tmp6_ == NULL;
	__vala_GdkEventSequence_free0 (_tmp6_);
	if (_tmp7_) {
		self->priv->blank_window_in = FALSE;
	}
}

static void
___lambda17__gtk_gesture_click_released (GtkGestureClick* _sender,
                                         gint n_press,
                                         gdouble x,
                                         gdouble y,
                                         gpointer self)
{
	__lambda17_ ((SwayNotificationCenterBlankWindow*) self, n_press, x, y);
}

static void
_vala_graphene_rect_t_free (graphene_rect_t* self)
{
	g_boxed_free (graphene_rect_get_type (), self);
}

static graphene_rect_t*
_vala_graphene_rect_t_copy (graphene_rect_t* self)
{
	return g_boxed_copy (graphene_rect_get_type (), self);
}

static gpointer
__vala_graphene_rect_t_copy0 (gpointer self)
{
	return self ? _vala_graphene_rect_t_copy (self) : NULL;
}

static void
__lambda99_ (SwayNotificationCenterBlankWindow* self,
             GtkGesture* gesture,
             GdkEventSequence* sequence)
{
	GtkGestureSingle* gesture_single = NULL;
	GtkGestureSingle* _tmp0_;
	GtkGestureSingle* _tmp1_;
	GdkEventSequence* _tmp2_;
	GdkEventSequence* _tmp3_;
	gboolean _tmp4_;
	gdouble x = 0.0;
	gdouble y = 0.0;
	gdouble _tmp5_ = 0.0;
	gdouble _tmp6_ = 0.0;
	graphene_point_t click_point = {0};
	graphene_point_t _tmp7_ = {0};
	graphene_rect_t* bounds = NULL;
	graphene_rect_t _tmp8_ = {0};
	graphene_rect_t _tmp9_;
	graphene_rect_t* _tmp10_;
	gboolean _tmp11_ = FALSE;
	graphene_rect_t* _tmp12_;
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (gesture, gtk_gesture_get_type ()));
	_tmp0_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (gesture, gtk_gesture_single_get_type (), GtkGestureSingle));
	gesture_single = _tmp0_;
	_tmp1_ = gesture_single;
	_tmp2_ = gtk_gesture_single_get_current_sequence (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = sequence != _tmp3_;
	__vala_GdkEventSequence_free0 (_tmp3_);
	if (_tmp4_) {
		_g_object_unref0 (gesture_single);
		return;
	}
	gtk_gesture_get_point (gesture, sequence, &_tmp5_, &_tmp6_);
	x = _tmp5_;
	y = _tmp6_;
	memset (&_tmp7_, 0, sizeof (graphene_point_t));
	click_point = *graphene_point_init (&_tmp7_, (gfloat) x, (gfloat) y);
	bounds = NULL;
	gtk_widget_compute_bounds (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), &_tmp8_);
	__vala_graphene_rect_t_free0 (bounds);
	_tmp9_ = _tmp8_;
	_tmp10_ = __vala_graphene_rect_t_copy0 (&_tmp9_);
	bounds = _tmp10_;
	_tmp12_ = bounds;
	if (_tmp12_ != NULL) {
		graphene_rect_t* _tmp13_;
		graphene_point_t _tmp14_;
		_tmp13_ = bounds;
		_tmp14_ = click_point;
		_tmp11_ = graphene_rect_contains_point (_tmp13_, &_tmp14_);
	} else {
		_tmp11_ = FALSE;
	}
	if (_tmp11_) {
		self->priv->blank_window_in = FALSE;
	}
	__vala_graphene_rect_t_free0 (bounds);
	_g_object_unref0 (gesture_single);
}

static void
___lambda99__gtk_gesture_update (GtkGesture* _sender,
                                 GdkEventSequence* sequence,
                                 gpointer self)
{
	__lambda99_ ((SwayNotificationCenterBlankWindow*) self, _sender, sequence);
}

static void
__lambda100_ (SwayNotificationCenterBlankWindow* self)
{
	self->priv->blank_window_down = FALSE;
}

static void
___lambda100__gtk_gesture_cancel (GtkGesture* _sender,
                                  GdkEventSequence* sequence,
                                  gpointer self)
{
	__lambda100_ ((SwayNotificationCenterBlankWindow*) self);
}

SwayNotificationCenterBlankWindow*
sway_notification_center_blank_window_construct (GType object_type,
                                                 GdkMonitor* monitor)
{
	SwayNotificationCenterBlankWindow * self = NULL;
	GtkGestureClick* _tmp0_;
	GtkGestureClick* _tmp1_;
	GtkEventController* _tmp2_;
	GtkGestureClick* _tmp3_;
	GtkGestureClick* _tmp4_;
	GtkGestureClick* _tmp5_;
	GtkGestureClick* _tmp6_;
	GtkGestureClick* _tmp7_;
	GtkGestureClick* _tmp8_;
	GtkGestureClick* _tmp9_;
	GtkGestureClick* _tmp10_;
	SwayNotificationCenterConfigModel* _tmp15_;
	SwayNotificationCenterConfigModel* _tmp16_;
	SwayNotificationCenterLayer _tmp17_;
	SwayNotificationCenterLayer _tmp18_;
	g_return_val_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (monitor, gdk_monitor_get_type ()), NULL);
	self = (SwayNotificationCenterBlankWindow*) g_object_new (object_type, "css-name", "blankwindow", NULL);
	sway_notification_center_blank_window_set_monitor (self, monitor);
	_tmp0_ = (GtkGestureClick*) gtk_gesture_click_new ();
	if (_tmp0_) {
		g_object_set_data ((GObject *) _tmp0_, "vala-creation-function", "SwayNotificationCenter.BlankWindow.new");
	}
	_g_object_unref0 (self->priv->blank_window_gesture);
	self->priv->blank_window_gesture = _tmp0_;
	_tmp1_ = self->priv->blank_window_gesture;
	_tmp2_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, gtk_event_controller_get_type (), GtkEventController));
	gtk_widget_add_controller (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), _tmp2_);
	_tmp3_ = self->priv->blank_window_gesture;
	gtk_gesture_single_set_touch_only (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, gtk_gesture_single_get_type (), GtkGestureSingle), FALSE);
	_tmp4_ = self->priv->blank_window_gesture;
	gtk_gesture_single_set_exclusive (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, gtk_gesture_single_get_type (), GtkGestureSingle), TRUE);
	_tmp5_ = self->priv->blank_window_gesture;
	gtk_gesture_single_set_button (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, gtk_gesture_single_get_type (), GtkGestureSingle), (guint) GDK_BUTTON_PRIMARY);
	_tmp6_ = self->priv->blank_window_gesture;
	gtk_event_controller_set_propagation_phase (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, gtk_event_controller_get_type (), GtkEventController), GTK_PHASE_BUBBLE);
	_tmp7_ = self->priv->blank_window_gesture;
	g_signal_connect_object (_tmp7_, "pressed", (GCallback) ___lambda16__gtk_gesture_click_pressed, self, 0);
	_tmp8_ = self->priv->blank_window_gesture;
	g_signal_connect_object (_tmp8_, "released", (GCallback) ___lambda17__gtk_gesture_click_released, self, 0);
	_tmp9_ = self->priv->blank_window_gesture;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, gtk_gesture_get_type (), GtkGesture), "update", (GCallback) ___lambda99__gtk_gesture_update, self, 0);
	_tmp10_ = self->priv->blank_window_gesture;
	g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, gtk_gesture_get_type (), GtkGesture), "cancel", (GCallback) ___lambda100__gtk_gesture_cancel, self, 0);
	if (!gtk_layer_is_supported ()) {
		FILE* _tmp11_;
		FILE* _tmp12_;
		FILE* _tmp13_;
		FILE* _tmp14_;
		_tmp11_ = stderr;
		fprintf (_tmp11_, "GTKLAYERSHELL IS NOT SUPPORTED!\n");
		_tmp12_ = stderr;
		fprintf (_tmp12_, "Swaync only works on Wayland!\n");
		_tmp13_ = stderr;
		fprintf (_tmp13_, "If running waylans session, try running:\n");
		_tmp14_ = stderr;
		fprintf (_tmp14_, "\tGDK_BACKEND=wayland swaync\n");
		exit (1);
	}
	gtk_layer_init_for_window (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow));
	gtk_layer_set_namespace (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), "swaync-control-center");
	gtk_layer_set_monitor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), monitor);
	gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_TOP, TRUE);
	gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_BOTTOM, TRUE);
	gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_LEFT, TRUE);
	gtk_layer_set_anchor (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), GTK_LAYER_SHELL_EDGE_RIGHT, TRUE);
	gtk_layer_set_exclusive_zone (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), -1);
	_tmp15_ = sway_notification_center_config_model_get_instance ();
	_tmp16_ = _tmp15_;
	_tmp17_ = sway_notification_center_config_model_get_control_center_layer (_tmp16_);
	_tmp18_ = _tmp17_;
	gtk_layer_set_layer (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_window_get_type (), GtkWindow), sway_notification_center_layer_to_layer (_tmp18_));
	gtk_widget_add_css_class (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_widget_get_type (), GtkWidget), "blank-window");
	return self;
}

SwayNotificationCenterBlankWindow*
sway_notification_center_blank_window_new (GdkMonitor* monitor)
{
	return sway_notification_center_blank_window_construct (SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, monitor);
}

static void
sway_notification_center_blank_window_real_snapshot (GtkWidget* base,
                                                     GtkSnapshot* snapshot)
{
	SwayNotificationCenterBlankWindow * self;
	GdkRGBA color = {0};
	GdkRGBA _tmp0_ = {0};
	GdkRGBA _tmp1_;
	graphene_rect_t _tmp2_;
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, SwayNotificationCenterBlankWindow);
	g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (snapshot, gtk_snapshot_get_type ()));
	memset (&_tmp0_, 0, sizeof (GdkRGBA));
	_tmp0_.red = (gfloat) 0;
	_tmp0_.green = (gfloat) 0;
	_tmp0_.blue = (gfloat) 0;
	_tmp0_.alpha = (gfloat) 0;
	color = _tmp0_;
	_tmp1_ = color;
	_tmp2_ = *graphene_rect_zero ();
	gtk_snapshot_append_color (snapshot, &_tmp1_, &_tmp2_);
	GTK_WIDGET_CLASS (sway_notification_center_blank_window_parent_class)->snapshot (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, gtk_application_window_get_type (), GtkApplicationWindow), gtk_widget_get_type (), GtkWidget), snapshot);
}

GdkMonitor*
sway_notification_center_blank_window_get_monitor (SwayNotificationCenterBlankWindow* self)
{
	GdkMonitor* result;
	GdkMonitor* _tmp0_;
	g_return_val_if_fail (SWAY_NOTIFICATION_CENTER_IS_BLANK_WINDOW (self), NULL);
	_tmp0_ = self->priv->_monitor;
	result = _tmp0_;
	return result;
}

static void
sway_notification_center_blank_window_set_monitor (SwayNotificationCenterBlankWindow* self,
                                                   GdkMonitor* value)
{
	GdkMonitor* old_value;
	g_return_if_fail (SWAY_NOTIFICATION_CENTER_IS_BLANK_WINDOW (self));
	old_value = sway_notification_center_blank_window_get_monitor (self);
	if (old_value != value) {
		self->priv->_monitor = value;
		g_object_notify_by_pspec ((GObject *) self, sway_notification_center_blank_window_properties[SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_MONITOR_PROPERTY]);
	}
}

static void
sway_notification_center_blank_window_class_init (SwayNotificationCenterBlankWindowClass * klass,
                                                  gpointer klass_data)
{
	sway_notification_center_blank_window_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &SwayNotificationCenterBlankWindow_private_offset);
	((GtkWidgetClass *) klass)->snapshot = (void (*) (GtkWidget*, GtkSnapshot*)) sway_notification_center_blank_window_real_snapshot;
	G_OBJECT_CLASS (klass)->get_property = _vala_sway_notification_center_blank_window_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_sway_notification_center_blank_window_set_property;
	G_OBJECT_CLASS (klass)->finalize = sway_notification_center_blank_window_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_MONITOR_PROPERTY, sway_notification_center_blank_window_properties[SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_MONITOR_PROPERTY] = g_param_spec_object ("monitor", "monitor", "monitor", gdk_monitor_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
sway_notification_center_blank_window_instance_init (SwayNotificationCenterBlankWindow * self,
                                                     gpointer klass)
{
	self->priv = sway_notification_center_blank_window_get_instance_private (self);
	self->priv->blank_window_down = FALSE;
	self->priv->blank_window_in = FALSE;
}

static void
sway_notification_center_blank_window_finalize (GObject * obj)
{
	SwayNotificationCenterBlankWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, SwayNotificationCenterBlankWindow);
	_g_object_unref0 (self->priv->blank_window_gesture);
	G_OBJECT_CLASS (sway_notification_center_blank_window_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
sway_notification_center_blank_window_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SwayNotificationCenterBlankWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) sway_notification_center_blank_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SwayNotificationCenterBlankWindow), 0, (GInstanceInitFunc) sway_notification_center_blank_window_instance_init, NULL };
	GType sway_notification_center_blank_window_type_id;
	sway_notification_center_blank_window_type_id = g_type_register_static (gtk_application_window_get_type (), "SwayNotificationCenterBlankWindow", &g_define_type_info, 0);
	SwayNotificationCenterBlankWindow_private_offset = g_type_add_instance_private (sway_notification_center_blank_window_type_id, sizeof (SwayNotificationCenterBlankWindowPrivate));
	return sway_notification_center_blank_window_type_id;
}

GType
sway_notification_center_blank_window_get_type (void)
{
	static gsize sway_notification_center_blank_window_type_id__once = 0;
	if (g_once_init_enter (&sway_notification_center_blank_window_type_id__once)) {
		GType sway_notification_center_blank_window_type_id;
		sway_notification_center_blank_window_type_id = sway_notification_center_blank_window_get_type_once ();
		g_once_init_leave (&sway_notification_center_blank_window_type_id__once, sway_notification_center_blank_window_type_id);
	}
	return sway_notification_center_blank_window_type_id__once;
}

static void
_vala_sway_notification_center_blank_window_get_property (GObject * object,
                                                          guint property_id,
                                                          GValue * value,
                                                          GParamSpec * pspec)
{
	SwayNotificationCenterBlankWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, SwayNotificationCenterBlankWindow);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_MONITOR_PROPERTY:
		g_value_set_object (value, sway_notification_center_blank_window_get_monitor (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_sway_notification_center_blank_window_set_property (GObject * object,
                                                          guint property_id,
                                                          const GValue * value,
                                                          GParamSpec * pspec)
{
	SwayNotificationCenterBlankWindow * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SWAY_NOTIFICATION_CENTER_TYPE_BLANK_WINDOW, SwayNotificationCenterBlankWindow);
	switch (property_id) {
		case SWAY_NOTIFICATION_CENTER_BLANK_WINDOW_MONITOR_PROPERTY:
		sway_notification_center_blank_window_set_monitor (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

